routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+438
@@ -0,0 +1,438 @@
|
||||
@layer vuetify-components {
|
||||
.v-btn {
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
font-weight: 500;
|
||||
justify-content: center;
|
||||
letter-spacing: 0.0071428571em;
|
||||
line-height: normal;
|
||||
max-width: 100%;
|
||||
outline: none;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
text-indent: 0.0071428571em;
|
||||
text-transform: none;
|
||||
transition-property: box-shadow, transform, opacity, background;
|
||||
transition-duration: 0.28s;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
user-select: none;
|
||||
vertical-align: middle;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.v-locale--is-rtl .v-btn {
|
||||
text-indent: -0.0071428571em;
|
||||
}
|
||||
.v-btn--size-x-small {
|
||||
--v-btn-size: 0.625rem;
|
||||
--v-btn-height: 20px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 36px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.v-btn--size-small {
|
||||
--v-btn-size: 0.75rem;
|
||||
--v-btn-height: 28px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 50px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
.v-btn--size-default {
|
||||
--v-btn-size: 0.875rem;
|
||||
--v-btn-height: 36px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 64px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
.v-btn--size-large {
|
||||
--v-btn-size: 1rem;
|
||||
--v-btn-height: 44px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 78px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.v-btn--size-x-large {
|
||||
--v-btn-size: 1.125rem;
|
||||
--v-btn-height: 52px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 92px;
|
||||
padding: 0 24px;
|
||||
}
|
||||
.v-btn.v-btn--density-default {
|
||||
height: calc(var(--v-btn-height) + 0px);
|
||||
}
|
||||
.v-btn.v-btn--density-comfortable {
|
||||
height: calc(var(--v-btn-height) + -8px);
|
||||
}
|
||||
.v-btn.v-btn--density-compact {
|
||||
height: calc(var(--v-btn-height) + -12px);
|
||||
}
|
||||
.v-btn {
|
||||
border-color: rgba(var(--v-border-color), var(--v-border-opacity));
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
.v-btn--border {
|
||||
border-width: thin;
|
||||
box-shadow: none;
|
||||
}
|
||||
.v-btn--absolute {
|
||||
position: absolute;
|
||||
}
|
||||
.v-btn--fixed {
|
||||
position: fixed;
|
||||
}
|
||||
.v-btn:hover > .v-btn__overlay {
|
||||
opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
.v-btn:focus-visible > .v-btn__overlay {
|
||||
opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
.v-btn:focus > .v-btn__overlay {
|
||||
opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
}
|
||||
.v-btn--active > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true] > .v-btn__overlay {
|
||||
opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
.v-btn--active:hover > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:hover > .v-btn__overlay {
|
||||
opacity: calc((var(--v-activated-opacity) + var(--v-hover-opacity)) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
.v-btn--active:focus-visible > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:focus-visible > .v-btn__overlay {
|
||||
opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
@supports not selector(:focus-visible) {
|
||||
.v-btn--active:focus > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:focus > .v-btn__overlay {
|
||||
opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
}
|
||||
.v-btn--variant-plain, .v-btn--variant-outlined, .v-btn--variant-text, .v-btn--variant-tonal {
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
.v-btn--variant-plain {
|
||||
opacity: 0.62;
|
||||
}
|
||||
.v-btn--variant-plain:focus, .v-btn--variant-plain:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.v-btn--variant-plain .v-btn__overlay {
|
||||
display: none;
|
||||
}
|
||||
.v-btn--variant-elevated, .v-btn--variant-flat {
|
||||
background: rgb(var(--v-theme-surface));
|
||||
color: color-mix(in srgb, rgb(var(--v-theme-on-surface)) calc(var(--v-high-emphasis-opacity) * 100%), transparent);
|
||||
}
|
||||
.v-btn--variant-elevated {
|
||||
box-shadow: 0px 1px 2px 0px rgba(var(--v-shadow-color), var(--v-shadow-key-opacity, 0.3)), 0px 1px 3px 1px rgba(var(--v-shadow-color), var(--v-shadow-ambient-opacity, 0.15));
|
||||
--v-elevation-overlay: color-mix(in srgb, var(--v-elevation-overlay-color) 2%, transparent);
|
||||
}
|
||||
.v-btn--variant-flat {
|
||||
box-shadow: 0px 0px 0px 0px rgba(var(--v-shadow-color), var(--v-shadow-key-opacity, 0.3)), 0px 0px 0px 0px rgba(var(--v-shadow-color), var(--v-shadow-ambient-opacity, 0.15));
|
||||
--v-elevation-overlay: color-mix(in srgb, var(--v-elevation-overlay-color) 0%, transparent);
|
||||
}
|
||||
.v-btn--variant-outlined {
|
||||
border: thin solid currentColor;
|
||||
}
|
||||
.v-btn--variant-text .v-btn__overlay {
|
||||
background: currentColor;
|
||||
}
|
||||
.v-btn--variant-tonal .v-btn__underlay {
|
||||
background: currentColor;
|
||||
opacity: var(--v-activated-opacity);
|
||||
border-radius: inherit;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.v-btn .v-btn__underlay {
|
||||
position: absolute;
|
||||
}
|
||||
@supports selector(:focus-visible) {
|
||||
.v-btn::after {
|
||||
pointer-events: none;
|
||||
border: 2px solid currentColor;
|
||||
border-radius: inherit;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
.v-btn::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.v-btn:focus-visible::after {
|
||||
opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
|
||||
}
|
||||
}
|
||||
.v-btn--icon {
|
||||
border-radius: 50%;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.v-btn--icon.v-btn--size-default {
|
||||
--v-btn-size: 1rem;
|
||||
}
|
||||
.v-btn--icon.v-btn--density-default {
|
||||
width: calc(var(--v-btn-height) + 12px);
|
||||
height: calc(var(--v-btn-height) + 12px);
|
||||
}
|
||||
.v-btn--icon.v-btn--density-comfortable {
|
||||
width: calc(var(--v-btn-height) + 0px);
|
||||
height: calc(var(--v-btn-height) + 0px);
|
||||
}
|
||||
.v-btn--icon.v-btn--density-compact {
|
||||
width: calc(var(--v-btn-height) + -8px);
|
||||
height: calc(var(--v-btn-height) + -8px);
|
||||
}
|
||||
.v-btn--elevated:hover, .v-btn--elevated:focus {
|
||||
box-shadow: 0px 1px 2px 0px rgba(var(--v-shadow-color), var(--v-shadow-key-opacity, 0.3)), 0px 2px 6px 2px rgba(var(--v-shadow-color), var(--v-shadow-ambient-opacity, 0.15));
|
||||
--v-elevation-overlay: color-mix(in srgb, var(--v-elevation-overlay-color) 4%, transparent);
|
||||
}
|
||||
.v-btn--elevated:active {
|
||||
box-shadow: 0px 1px 2px 0px rgba(var(--v-shadow-color), var(--v-shadow-key-opacity, 0.3)), 0px 1px 3px 1px rgba(var(--v-shadow-color), var(--v-shadow-ambient-opacity, 0.15));
|
||||
--v-elevation-overlay: color-mix(in srgb, var(--v-elevation-overlay-color) 2%, transparent);
|
||||
}
|
||||
.v-btn--flat {
|
||||
box-shadow: none;
|
||||
}
|
||||
.v-btn--block {
|
||||
display: flex;
|
||||
flex: 1 0 auto;
|
||||
min-width: 100%;
|
||||
}
|
||||
.v-btn--spaced .v-btn__content {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.v-btn--spaced.v-btn--spaced-start > .v-btn__content {
|
||||
justify-content: end;
|
||||
}
|
||||
.v-btn--spaced.v-btn--spaced-end > .v-btn__content {
|
||||
justify-content: start;
|
||||
}
|
||||
.v-btn--disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.26;
|
||||
}
|
||||
.v-btn--disabled:hover {
|
||||
opacity: 0.26;
|
||||
}
|
||||
.v-btn--disabled.v-btn--variant-elevated, .v-btn--disabled.v-btn--variant-flat {
|
||||
box-shadow: none;
|
||||
opacity: 1;
|
||||
color: color-mix(in srgb, rgb(var(--v-theme-on-surface)) 26%, transparent);
|
||||
background: rgb(var(--v-theme-surface));
|
||||
}
|
||||
.v-btn--disabled.v-btn--variant-elevated .v-btn__overlay, .v-btn--disabled.v-btn--variant-flat .v-btn__overlay {
|
||||
opacity: 0.4615384615;
|
||||
}
|
||||
.v-btn--loading {
|
||||
pointer-events: none;
|
||||
}
|
||||
.v-btn--loading .v-btn__content,
|
||||
.v-btn--loading .v-btn__prepend,
|
||||
.v-btn--loading .v-btn__append {
|
||||
opacity: 0;
|
||||
}
|
||||
.v-btn--stacked {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.v-btn--stacked .v-btn__content {
|
||||
flex-direction: column;
|
||||
line-height: 1.25;
|
||||
}
|
||||
.v-btn--stacked .v-btn__prepend,
|
||||
.v-btn--stacked .v-btn__append,
|
||||
.v-btn--stacked .v-btn__content > .v-icon--start,
|
||||
.v-btn--stacked .v-btn__content > .v-icon--end {
|
||||
margin-inline: 0;
|
||||
}
|
||||
.v-btn--stacked.v-btn--size-x-small {
|
||||
--v-btn-size: 0.625rem;
|
||||
--v-btn-height: 56px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 56px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
.v-btn--stacked.v-btn--size-small {
|
||||
--v-btn-size: 0.75rem;
|
||||
--v-btn-height: 64px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 64px;
|
||||
padding: 0 14px;
|
||||
}
|
||||
.v-btn--stacked.v-btn--size-default {
|
||||
--v-btn-size: 0.875rem;
|
||||
--v-btn-height: 72px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 72px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
.v-btn--stacked.v-btn--size-large {
|
||||
--v-btn-size: 1rem;
|
||||
--v-btn-height: 80px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 80px;
|
||||
padding: 0 18px;
|
||||
}
|
||||
.v-btn--stacked.v-btn--size-x-large {
|
||||
--v-btn-size: 1.125rem;
|
||||
--v-btn-height: 88px;
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: 88px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.v-btn--stacked.v-btn--density-default {
|
||||
height: calc(var(--v-btn-height) + 0px);
|
||||
}
|
||||
.v-btn--stacked.v-btn--density-comfortable {
|
||||
height: calc(var(--v-btn-height) + -16px);
|
||||
}
|
||||
.v-btn--stacked.v-btn--density-compact {
|
||||
height: calc(var(--v-btn-height) + -24px);
|
||||
}
|
||||
.v-btn--slim {
|
||||
padding: 0 8px;
|
||||
}
|
||||
.v-btn--readonly {
|
||||
pointer-events: none;
|
||||
}
|
||||
.v-btn--rounded {
|
||||
border-radius: 24px;
|
||||
}
|
||||
.v-btn--rounded.v-btn--icon {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.v-btn .v-icon {
|
||||
--v-icon-size-multiplier: 0.8571428571;
|
||||
}
|
||||
.v-btn--icon .v-icon {
|
||||
--v-icon-size-multiplier: 1;
|
||||
}
|
||||
.v-btn--stacked .v-icon {
|
||||
--v-icon-size-multiplier: 1.1428571429;
|
||||
}
|
||||
.v-btn--stacked.v-btn--block {
|
||||
min-width: 100%;
|
||||
}
|
||||
.v-btn__loader {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.v-btn__loader > .v-progress-circular {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
}
|
||||
.v-btn__content,
|
||||
.v-btn__prepend,
|
||||
.v-btn__append {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
transition: transform, opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
.v-btn__prepend {
|
||||
margin-inline: calc(var(--v-btn-height) / -9) calc(var(--v-btn-height) / 4.5);
|
||||
}
|
||||
.v-btn--slim .v-btn__prepend {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
.v-btn__append {
|
||||
margin-inline: calc(var(--v-btn-height) / 4.5) calc(var(--v-btn-height) / -9);
|
||||
}
|
||||
.v-btn--slim .v-btn__append {
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
.v-btn__content {
|
||||
justify-content: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.v-btn__content > .v-icon--start {
|
||||
margin-inline: calc(var(--v-btn-height) / -9) calc(var(--v-btn-height) / 4.5);
|
||||
}
|
||||
.v-btn__content > .v-icon--end {
|
||||
margin-inline: calc(var(--v-btn-height) / 4.5) calc(var(--v-btn-height) / -9);
|
||||
}
|
||||
.v-btn--stacked .v-btn__content {
|
||||
white-space: normal;
|
||||
}
|
||||
.v-btn__overlay {
|
||||
background-color: currentColor;
|
||||
border-radius: inherit;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
}
|
||||
.v-btn__overlay,
|
||||
.v-btn__underlay {
|
||||
pointer-events: none;
|
||||
}
|
||||
.v-btn__overlay,
|
||||
.v-btn__underlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.v-pagination .v-btn {
|
||||
width: auto;
|
||||
padding-inline: 5px;
|
||||
}
|
||||
.v-pagination .v-btn.v-btn--density-default {
|
||||
min-width: calc(var(--v-btn-height) + 12px);
|
||||
}
|
||||
.v-pagination .v-btn.v-btn--density-comfortable {
|
||||
min-width: calc(var(--v-btn-height) + 0px);
|
||||
}
|
||||
.v-pagination .v-btn.v-btn--density-compact {
|
||||
min-width: calc(var(--v-btn-height) + -8px);
|
||||
}
|
||||
.v-pagination .v-btn {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.v-pagination .v-btn--rounded {
|
||||
border-radius: 50%;
|
||||
}
|
||||
.v-pagination .v-btn__overlay {
|
||||
transition: none;
|
||||
}
|
||||
.v-pagination__prev .v-btn, .v-pagination__next .v-btn {
|
||||
padding-inline: 0;
|
||||
}
|
||||
.v-pagination__prev .v-btn.v-btn--density-default, .v-pagination__next .v-btn.v-btn--density-default {
|
||||
width: calc(var(--v-btn-height) + 12px);
|
||||
}
|
||||
.v-pagination__prev .v-btn.v-btn--density-comfortable, .v-pagination__next .v-btn.v-btn--density-comfortable {
|
||||
width: calc(var(--v-btn-height) + 0px);
|
||||
}
|
||||
.v-pagination__prev .v-btn.v-btn--density-compact, .v-pagination__next .v-btn.v-btn--density-compact {
|
||||
width: calc(var(--v-btn-height) + -8px);
|
||||
}
|
||||
.v-pagination .v-pagination__item--is-active .v-btn__overlay {
|
||||
opacity: var(--v-border-opacity);
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
.v-btn:not(.v-btn--variant-text, .v-btn--variant-plain) {
|
||||
border: thin solid;
|
||||
}
|
||||
.v-btn:focus-visible {
|
||||
outline: 2px solid;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
+843
@@ -0,0 +1,843 @@
|
||||
|
||||
import { IconValue } from '../../composables/icons.js';
|
||||
import type { PropType } from 'vue';
|
||||
import type { RippleDirectiveBinding } from '../../directives/ripple/index.js';
|
||||
export type VBtnSlots = {
|
||||
default: never;
|
||||
prepend: never;
|
||||
append: never;
|
||||
loader: never;
|
||||
};
|
||||
export declare const makeVBtnProps: <Defaults extends {
|
||||
theme?: unknown;
|
||||
class?: unknown;
|
||||
style?: unknown;
|
||||
border?: unknown;
|
||||
density?: unknown;
|
||||
elevation?: unknown;
|
||||
rounded?: unknown;
|
||||
tile?: unknown;
|
||||
tag?: unknown;
|
||||
color?: unknown;
|
||||
variant?: unknown;
|
||||
value?: unknown;
|
||||
disabled?: unknown;
|
||||
selectedClass?: unknown;
|
||||
size?: unknown;
|
||||
height?: unknown;
|
||||
maxHeight?: unknown;
|
||||
maxWidth?: unknown;
|
||||
minHeight?: unknown;
|
||||
minWidth?: unknown;
|
||||
width?: unknown;
|
||||
location?: unknown;
|
||||
loading?: unknown;
|
||||
position?: unknown;
|
||||
href?: unknown;
|
||||
replace?: unknown;
|
||||
to?: unknown;
|
||||
exact?: unknown;
|
||||
active?: unknown;
|
||||
activeColor?: unknown;
|
||||
baseColor?: unknown;
|
||||
symbol?: unknown;
|
||||
flat?: unknown;
|
||||
icon?: unknown;
|
||||
prependIcon?: unknown;
|
||||
appendIcon?: unknown;
|
||||
block?: unknown;
|
||||
readonly?: unknown;
|
||||
slim?: unknown;
|
||||
stacked?: unknown;
|
||||
spaced?: unknown;
|
||||
ripple?: unknown;
|
||||
text?: unknown;
|
||||
} = {}>(defaults?: Defaults | undefined) => {
|
||||
theme: unknown extends Defaults["theme"] ? StringConstructor : {
|
||||
type: PropType<unknown extends Defaults["theme"] ? string : string | Defaults["theme"]>;
|
||||
default: unknown extends Defaults["theme"] ? string : string | Defaults["theme"];
|
||||
};
|
||||
class: unknown extends Defaults["class"] ? PropType<any> : {
|
||||
type: PropType<unknown extends Defaults["class"] ? any : any>;
|
||||
default: unknown extends Defaults["class"] ? any : any;
|
||||
};
|
||||
style: unknown extends Defaults["style"] ? {
|
||||
type: PropType<import("vue").StyleValue>;
|
||||
default: null;
|
||||
} : Omit<{
|
||||
type: PropType<import("vue").StyleValue>;
|
||||
default: null;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["style"] ? import("vue").StyleValue : Defaults["style"] | import("vue").StyleValue>;
|
||||
default: unknown extends Defaults["style"] ? import("vue").StyleValue : Defaults["style"] | NonNullable<import("vue").StyleValue>;
|
||||
};
|
||||
border: unknown extends Defaults["border"] ? (BooleanConstructor | NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["border"] ? string | number | boolean : string | number | boolean | Defaults["border"]>;
|
||||
default: unknown extends Defaults["border"] ? string | number | boolean : Defaults["border"] | NonNullable<string | number | boolean>;
|
||||
};
|
||||
density: unknown extends Defaults["density"] ? {
|
||||
type: PropType<import("../../composables/density.js").Density>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
} : Omit<{
|
||||
type: PropType<import("../../composables/density.js").Density>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["density"] ? import("../../composables/density.js").Density : Defaults["density"] | import("../../composables/density.js").Density>;
|
||||
default: unknown extends Defaults["density"] ? import("../../composables/density.js").Density : Defaults["density"] | NonNullable<import("../../composables/density.js").Density>;
|
||||
};
|
||||
elevation: unknown extends Defaults["elevation"] ? {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
validator: (value: string | number) => boolean;
|
||||
} : Omit<{
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
validator: (value: string | number) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["elevation"] ? string | number : string | number | Defaults["elevation"]>;
|
||||
default: unknown extends Defaults["elevation"] ? string | number : Defaults["elevation"] | NonNullable<string | number>;
|
||||
};
|
||||
rounded: unknown extends Defaults["rounded"] ? {
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
} : Omit<{
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["rounded"] ? string | number | boolean : string | number | boolean | Defaults["rounded"]>;
|
||||
default: unknown extends Defaults["rounded"] ? string | number | boolean : Defaults["rounded"] | NonNullable<string | number | boolean>;
|
||||
};
|
||||
tile: unknown extends Defaults["tile"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["tile"] ? boolean : boolean | Defaults["tile"]>;
|
||||
default: unknown extends Defaults["tile"] ? boolean : boolean | Defaults["tile"];
|
||||
};
|
||||
tag: unknown extends Defaults["tag"] ? Omit<{
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: string;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: NonNullable<string | import("../../util/index.js").JSXComponent>;
|
||||
} : Omit<Omit<{
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: string;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: NonNullable<string | import("../../util/index.js").JSXComponent>;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["tag"] ? string | import("../../util/index.js").JSXComponent : string | Defaults["tag"] | import("../../util/index.js").JSXComponent>;
|
||||
default: unknown extends Defaults["tag"] ? string | import("../../util/index.js").JSXComponent : Defaults["tag"] | NonNullable<string | import("../../util/index.js").JSXComponent>;
|
||||
};
|
||||
color: unknown extends Defaults["color"] ? StringConstructor : {
|
||||
type: PropType<unknown extends Defaults["color"] ? string : string | Defaults["color"]>;
|
||||
default: unknown extends Defaults["color"] ? string : string | Defaults["color"];
|
||||
};
|
||||
variant: unknown extends Defaults["variant"] ? Omit<{
|
||||
type: PropType<import("../../composables/variant.js").Variant>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
default: NonNullable<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
} : Omit<Omit<{
|
||||
type: PropType<import("../../composables/variant.js").Variant>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
default: NonNullable<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["variant"] ? "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal" : "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal" | Defaults["variant"]>;
|
||||
default: unknown extends Defaults["variant"] ? "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal" : Defaults["variant"] | NonNullable<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
};
|
||||
value: unknown extends Defaults["value"] ? null : {
|
||||
type: PropType<unknown extends Defaults["value"] ? any : any>;
|
||||
default: unknown extends Defaults["value"] ? any : any;
|
||||
};
|
||||
disabled: unknown extends Defaults["disabled"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["disabled"] ? boolean : boolean | Defaults["disabled"]>;
|
||||
default: unknown extends Defaults["disabled"] ? boolean : boolean | Defaults["disabled"];
|
||||
};
|
||||
selectedClass: unknown extends Defaults["selectedClass"] ? StringConstructor : {
|
||||
type: PropType<unknown extends Defaults["selectedClass"] ? string : string | Defaults["selectedClass"]>;
|
||||
default: unknown extends Defaults["selectedClass"] ? string : string | Defaults["selectedClass"];
|
||||
};
|
||||
size: unknown extends Defaults["size"] ? {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: string;
|
||||
} : Omit<{
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: string;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["size"] ? string | number : string | number | Defaults["size"]>;
|
||||
default: unknown extends Defaults["size"] ? string | number : Defaults["size"] | NonNullable<string | number>;
|
||||
};
|
||||
height: unknown extends Defaults["height"] ? (NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["height"] ? string | number : string | number | Defaults["height"]>;
|
||||
default: unknown extends Defaults["height"] ? string | number : Defaults["height"] | NonNullable<string | number>;
|
||||
};
|
||||
maxHeight: unknown extends Defaults["maxHeight"] ? (NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["maxHeight"] ? string | number : string | number | Defaults["maxHeight"]>;
|
||||
default: unknown extends Defaults["maxHeight"] ? string | number : Defaults["maxHeight"] | NonNullable<string | number>;
|
||||
};
|
||||
maxWidth: unknown extends Defaults["maxWidth"] ? (NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["maxWidth"] ? string | number : string | number | Defaults["maxWidth"]>;
|
||||
default: unknown extends Defaults["maxWidth"] ? string | number : Defaults["maxWidth"] | NonNullable<string | number>;
|
||||
};
|
||||
minHeight: unknown extends Defaults["minHeight"] ? (NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["minHeight"] ? string | number : string | number | Defaults["minHeight"]>;
|
||||
default: unknown extends Defaults["minHeight"] ? string | number : Defaults["minHeight"] | NonNullable<string | number>;
|
||||
};
|
||||
minWidth: unknown extends Defaults["minWidth"] ? (NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["minWidth"] ? string | number : string | number | Defaults["minWidth"]>;
|
||||
default: unknown extends Defaults["minWidth"] ? string | number : Defaults["minWidth"] | NonNullable<string | number>;
|
||||
};
|
||||
width: unknown extends Defaults["width"] ? (NumberConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["width"] ? string | number : string | number | Defaults["width"]>;
|
||||
default: unknown extends Defaults["width"] ? string | number : Defaults["width"] | NonNullable<string | number>;
|
||||
};
|
||||
location: unknown extends Defaults["location"] ? PropType<import("../../util/index.js").Anchor | null> : {
|
||||
type: PropType<unknown extends Defaults["location"] ? import("../../util/index.js").Anchor | null : Defaults["location"] | import("../../util/index.js").Anchor | null>;
|
||||
default: unknown extends Defaults["location"] ? import("../../util/index.js").Anchor | null : Defaults["location"] | NonNullable<import("../../util/index.js").Anchor | null>;
|
||||
};
|
||||
loading: unknown extends Defaults["loading"] ? (BooleanConstructor | StringConstructor)[] : {
|
||||
type: PropType<unknown extends Defaults["loading"] ? string | boolean : string | boolean | Defaults["loading"]>;
|
||||
default: unknown extends Defaults["loading"] ? string | boolean : Defaults["loading"] | NonNullable<string | boolean>;
|
||||
};
|
||||
position: unknown extends Defaults["position"] ? {
|
||||
type: PropType<"absolute" | "fixed" | "relative" | "static" | "sticky">;
|
||||
validator: (v: any) => boolean;
|
||||
} : Omit<{
|
||||
type: PropType<"absolute" | "fixed" | "relative" | "static" | "sticky">;
|
||||
validator: (v: any) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["position"] ? "absolute" | "fixed" | "relative" | "static" | "sticky" : "absolute" | "fixed" | "relative" | "static" | "sticky" | Defaults["position"]>;
|
||||
default: unknown extends Defaults["position"] ? "absolute" | "fixed" | "relative" | "static" | "sticky" : Defaults["position"] | NonNullable<"absolute" | "fixed" | "relative" | "static" | "sticky">;
|
||||
};
|
||||
href: unknown extends Defaults["href"] ? StringConstructor : {
|
||||
type: PropType<unknown extends Defaults["href"] ? string : string | Defaults["href"]>;
|
||||
default: unknown extends Defaults["href"] ? string : string | Defaults["href"];
|
||||
};
|
||||
replace: unknown extends Defaults["replace"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["replace"] ? boolean : boolean | Defaults["replace"]>;
|
||||
default: unknown extends Defaults["replace"] ? boolean : boolean | Defaults["replace"];
|
||||
};
|
||||
to: unknown extends Defaults["to"] ? PropType<string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric> : {
|
||||
type: PropType<unknown extends Defaults["to"] ? string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric : string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric | Defaults["to"]>;
|
||||
default: unknown extends Defaults["to"] ? string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric : Defaults["to"] | NonNullable<string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric>;
|
||||
};
|
||||
exact: unknown extends Defaults["exact"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["exact"] ? boolean : boolean | Defaults["exact"]>;
|
||||
default: unknown extends Defaults["exact"] ? boolean : boolean | Defaults["exact"];
|
||||
};
|
||||
active: unknown extends Defaults["active"] ? {
|
||||
type: BooleanConstructor;
|
||||
default: undefined;
|
||||
} : Omit<{
|
||||
type: BooleanConstructor;
|
||||
default: undefined;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["active"] ? boolean : boolean | Defaults["active"]>;
|
||||
default: unknown extends Defaults["active"] ? boolean : boolean | Defaults["active"];
|
||||
};
|
||||
activeColor: unknown extends Defaults["activeColor"] ? StringConstructor : {
|
||||
type: PropType<unknown extends Defaults["activeColor"] ? string : string | Defaults["activeColor"]>;
|
||||
default: unknown extends Defaults["activeColor"] ? string : string | Defaults["activeColor"];
|
||||
};
|
||||
baseColor: unknown extends Defaults["baseColor"] ? StringConstructor : {
|
||||
type: PropType<unknown extends Defaults["baseColor"] ? string : string | Defaults["baseColor"]>;
|
||||
default: unknown extends Defaults["baseColor"] ? string : string | Defaults["baseColor"];
|
||||
};
|
||||
symbol: unknown extends Defaults["symbol"] ? {
|
||||
type: null;
|
||||
default: import("vue").InjectionKey<import("../../composables/group.js").GroupProvide>;
|
||||
} : Omit<{
|
||||
type: null;
|
||||
default: import("vue").InjectionKey<import("../../composables/group.js").GroupProvide>;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["symbol"] ? any : any>;
|
||||
default: unknown extends Defaults["symbol"] ? any : any;
|
||||
};
|
||||
flat: unknown extends Defaults["flat"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["flat"] ? boolean : boolean | Defaults["flat"]>;
|
||||
default: unknown extends Defaults["flat"] ? boolean : boolean | Defaults["flat"];
|
||||
};
|
||||
icon: unknown extends Defaults["icon"] ? PropType<boolean | IconValue> : {
|
||||
type: PropType<unknown extends Defaults["icon"] ? boolean | IconValue : boolean | Defaults["icon"] | IconValue>;
|
||||
default: unknown extends Defaults["icon"] ? boolean | IconValue : Defaults["icon"] | NonNullable<boolean | IconValue>;
|
||||
};
|
||||
prependIcon: unknown extends Defaults["prependIcon"] ? PropType<IconValue> : {
|
||||
type: PropType<unknown extends Defaults["prependIcon"] ? IconValue : Defaults["prependIcon"] | IconValue>;
|
||||
default: unknown extends Defaults["prependIcon"] ? IconValue : Defaults["prependIcon"] | NonNullable<IconValue>;
|
||||
};
|
||||
appendIcon: unknown extends Defaults["appendIcon"] ? PropType<IconValue> : {
|
||||
type: PropType<unknown extends Defaults["appendIcon"] ? IconValue : Defaults["appendIcon"] | IconValue>;
|
||||
default: unknown extends Defaults["appendIcon"] ? IconValue : Defaults["appendIcon"] | NonNullable<IconValue>;
|
||||
};
|
||||
block: unknown extends Defaults["block"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["block"] ? boolean : boolean | Defaults["block"]>;
|
||||
default: unknown extends Defaults["block"] ? boolean : boolean | Defaults["block"];
|
||||
};
|
||||
readonly: unknown extends Defaults["readonly"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["readonly"] ? boolean : boolean | Defaults["readonly"]>;
|
||||
default: unknown extends Defaults["readonly"] ? boolean : boolean | Defaults["readonly"];
|
||||
};
|
||||
slim: unknown extends Defaults["slim"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["slim"] ? boolean : boolean | Defaults["slim"]>;
|
||||
default: unknown extends Defaults["slim"] ? boolean : boolean | Defaults["slim"];
|
||||
};
|
||||
stacked: unknown extends Defaults["stacked"] ? BooleanConstructor : {
|
||||
type: PropType<unknown extends Defaults["stacked"] ? boolean : boolean | Defaults["stacked"]>;
|
||||
default: unknown extends Defaults["stacked"] ? boolean : boolean | Defaults["stacked"];
|
||||
};
|
||||
spaced: unknown extends Defaults["spaced"] ? PropType<"both" | "end" | "start"> : {
|
||||
type: PropType<unknown extends Defaults["spaced"] ? "both" | "end" | "start" : "both" | "end" | "start" | Defaults["spaced"]>;
|
||||
default: unknown extends Defaults["spaced"] ? "both" | "end" | "start" : Defaults["spaced"] | NonNullable<"both" | "end" | "start">;
|
||||
};
|
||||
ripple: unknown extends Defaults["ripple"] ? {
|
||||
type: PropType<RippleDirectiveBinding['value']>;
|
||||
default: boolean;
|
||||
} : Omit<{
|
||||
type: PropType<RippleDirectiveBinding['value']>;
|
||||
default: boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["ripple"] ? boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | undefined : boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | Defaults["ripple"] | undefined>;
|
||||
default: unknown extends Defaults["ripple"] ? boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | undefined : Defaults["ripple"] | NonNullable<boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | undefined>;
|
||||
};
|
||||
text: unknown extends Defaults["text"] ? {
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
} : Omit<{
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<unknown extends Defaults["text"] ? string | number | boolean : string | number | boolean | Defaults["text"]>;
|
||||
default: unknown extends Defaults["text"] ? string | number | boolean : Defaults["text"] | NonNullable<string | number | boolean>;
|
||||
};
|
||||
};
|
||||
export declare const VBtn: {
|
||||
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<{
|
||||
style: string | false | import("vue").StyleValue[] | import("vue").CSSProperties | null;
|
||||
density: import("../../composables/density.js").Density;
|
||||
tile: boolean;
|
||||
tag: string | import("../../util/index.js").JSXComponent;
|
||||
variant: "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal";
|
||||
disabled: boolean;
|
||||
size: string | number;
|
||||
replace: boolean;
|
||||
exact: boolean;
|
||||
symbol: any;
|
||||
flat: boolean;
|
||||
block: boolean;
|
||||
readonly: boolean;
|
||||
slim: boolean;
|
||||
stacked: boolean;
|
||||
ripple: boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
};
|
||||
} & {
|
||||
theme?: string | undefined;
|
||||
class?: any;
|
||||
border?: string | number | boolean | undefined;
|
||||
elevation?: string | number | undefined;
|
||||
rounded?: string | number | boolean | undefined;
|
||||
color?: string | undefined;
|
||||
value?: any;
|
||||
selectedClass?: string | undefined;
|
||||
height?: string | number | undefined;
|
||||
maxHeight?: string | number | undefined;
|
||||
maxWidth?: string | number | undefined;
|
||||
minHeight?: string | number | undefined;
|
||||
minWidth?: string | number | undefined;
|
||||
width?: string | number | undefined;
|
||||
location?: import("../../util/index.js").Anchor | null | undefined;
|
||||
loading?: string | boolean | undefined;
|
||||
position?: "absolute" | "fixed" | "relative" | "static" | "sticky" | undefined;
|
||||
href?: string | undefined;
|
||||
to?: string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric | undefined;
|
||||
active?: boolean | undefined;
|
||||
activeColor?: string | undefined;
|
||||
baseColor?: string | undefined;
|
||||
icon?: boolean | IconValue | undefined;
|
||||
prependIcon?: IconValue | undefined;
|
||||
appendIcon?: IconValue | undefined;
|
||||
spaced?: "both" | "end" | "start" | undefined;
|
||||
text?: string | number | boolean | undefined;
|
||||
} & {
|
||||
$children?: {
|
||||
default?: (() => import("vue").VNodeChild) | undefined;
|
||||
prepend?: (() => import("vue").VNodeChild) | undefined;
|
||||
append?: (() => import("vue").VNodeChild) | undefined;
|
||||
loader?: (() => import("vue").VNodeChild) | undefined;
|
||||
} | {
|
||||
$stable?: boolean;
|
||||
} | (() => import("vue").VNodeChild) | import("vue").VNodeChild;
|
||||
'v-slots'?: {
|
||||
default?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
prepend?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
append?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
loader?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
} | undefined;
|
||||
} & {
|
||||
"v-slot:append"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:default"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:loader"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:prepend"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
} & {
|
||||
"onGroup:selected"?: ((val: {
|
||||
value: boolean;
|
||||
}) => any) | undefined;
|
||||
}, {
|
||||
group: import("../../composables/group.js").GroupItemProvide | null;
|
||||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
'group:selected': (val: {
|
||||
value: boolean;
|
||||
}) => true;
|
||||
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
|
||||
style: import("vue").StyleValue;
|
||||
density: import("../../composables/density.js").Density;
|
||||
rounded: string | number | boolean;
|
||||
tile: boolean;
|
||||
tag: string | import("../../util/index.js").JSXComponent;
|
||||
variant: "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal";
|
||||
disabled: boolean;
|
||||
size: string | number;
|
||||
replace: boolean;
|
||||
exact: boolean;
|
||||
active: boolean;
|
||||
symbol: any;
|
||||
flat: boolean;
|
||||
block: boolean;
|
||||
readonly: boolean;
|
||||
slim: boolean;
|
||||
stacked: boolean;
|
||||
ripple: boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | undefined;
|
||||
text: string | number | boolean;
|
||||
}, true, {}, import("vue").SlotsType<Partial<{
|
||||
default: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
prepend: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
append: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
loader: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
}>>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, {
|
||||
style: string | false | import("vue").StyleValue[] | import("vue").CSSProperties | null;
|
||||
density: import("../../composables/density.js").Density;
|
||||
tile: boolean;
|
||||
tag: string | import("../../util/index.js").JSXComponent;
|
||||
variant: "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal";
|
||||
disabled: boolean;
|
||||
size: string | number;
|
||||
replace: boolean;
|
||||
exact: boolean;
|
||||
symbol: any;
|
||||
flat: boolean;
|
||||
block: boolean;
|
||||
readonly: boolean;
|
||||
slim: boolean;
|
||||
stacked: boolean;
|
||||
ripple: boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
};
|
||||
} & {
|
||||
theme?: string | undefined;
|
||||
class?: any;
|
||||
border?: string | number | boolean | undefined;
|
||||
elevation?: string | number | undefined;
|
||||
rounded?: string | number | boolean | undefined;
|
||||
color?: string | undefined;
|
||||
value?: any;
|
||||
selectedClass?: string | undefined;
|
||||
height?: string | number | undefined;
|
||||
maxHeight?: string | number | undefined;
|
||||
maxWidth?: string | number | undefined;
|
||||
minHeight?: string | number | undefined;
|
||||
minWidth?: string | number | undefined;
|
||||
width?: string | number | undefined;
|
||||
location?: import("../../util/index.js").Anchor | null | undefined;
|
||||
loading?: string | boolean | undefined;
|
||||
position?: "absolute" | "fixed" | "relative" | "static" | "sticky" | undefined;
|
||||
href?: string | undefined;
|
||||
to?: string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric | undefined;
|
||||
active?: boolean | undefined;
|
||||
activeColor?: string | undefined;
|
||||
baseColor?: string | undefined;
|
||||
icon?: boolean | IconValue | undefined;
|
||||
prependIcon?: IconValue | undefined;
|
||||
appendIcon?: IconValue | undefined;
|
||||
spaced?: "both" | "end" | "start" | undefined;
|
||||
text?: string | number | boolean | undefined;
|
||||
} & {
|
||||
$children?: {
|
||||
default?: (() => import("vue").VNodeChild) | undefined;
|
||||
prepend?: (() => import("vue").VNodeChild) | undefined;
|
||||
append?: (() => import("vue").VNodeChild) | undefined;
|
||||
loader?: (() => import("vue").VNodeChild) | undefined;
|
||||
} | {
|
||||
$stable?: boolean;
|
||||
} | (() => import("vue").VNodeChild) | import("vue").VNodeChild;
|
||||
'v-slots'?: {
|
||||
default?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
prepend?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
append?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
loader?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
} | undefined;
|
||||
} & {
|
||||
"v-slot:append"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:default"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:loader"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:prepend"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
} & {
|
||||
"onGroup:selected"?: ((val: {
|
||||
value: boolean;
|
||||
}) => any) | undefined;
|
||||
}, {
|
||||
group: import("../../composables/group.js").GroupItemProvide | null;
|
||||
}, {}, {}, {}, {
|
||||
style: import("vue").StyleValue;
|
||||
density: import("../../composables/density.js").Density;
|
||||
rounded: string | number | boolean;
|
||||
tile: boolean;
|
||||
tag: string | import("../../util/index.js").JSXComponent;
|
||||
variant: "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal";
|
||||
disabled: boolean;
|
||||
size: string | number;
|
||||
replace: boolean;
|
||||
exact: boolean;
|
||||
active: boolean;
|
||||
symbol: any;
|
||||
flat: boolean;
|
||||
block: boolean;
|
||||
readonly: boolean;
|
||||
slim: boolean;
|
||||
stacked: boolean;
|
||||
ripple: boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | undefined;
|
||||
text: string | number | boolean;
|
||||
}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & import("vue").ComponentOptionsBase<{
|
||||
style: string | false | import("vue").StyleValue[] | import("vue").CSSProperties | null;
|
||||
density: import("../../composables/density.js").Density;
|
||||
tile: boolean;
|
||||
tag: string | import("../../util/index.js").JSXComponent;
|
||||
variant: "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal";
|
||||
disabled: boolean;
|
||||
size: string | number;
|
||||
replace: boolean;
|
||||
exact: boolean;
|
||||
symbol: any;
|
||||
flat: boolean;
|
||||
block: boolean;
|
||||
readonly: boolean;
|
||||
slim: boolean;
|
||||
stacked: boolean;
|
||||
ripple: boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
};
|
||||
} & {
|
||||
theme?: string | undefined;
|
||||
class?: any;
|
||||
border?: string | number | boolean | undefined;
|
||||
elevation?: string | number | undefined;
|
||||
rounded?: string | number | boolean | undefined;
|
||||
color?: string | undefined;
|
||||
value?: any;
|
||||
selectedClass?: string | undefined;
|
||||
height?: string | number | undefined;
|
||||
maxHeight?: string | number | undefined;
|
||||
maxWidth?: string | number | undefined;
|
||||
minHeight?: string | number | undefined;
|
||||
minWidth?: string | number | undefined;
|
||||
width?: string | number | undefined;
|
||||
location?: import("../../util/index.js").Anchor | null | undefined;
|
||||
loading?: string | boolean | undefined;
|
||||
position?: "absolute" | "fixed" | "relative" | "static" | "sticky" | undefined;
|
||||
href?: string | undefined;
|
||||
to?: string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric | undefined;
|
||||
active?: boolean | undefined;
|
||||
activeColor?: string | undefined;
|
||||
baseColor?: string | undefined;
|
||||
icon?: boolean | IconValue | undefined;
|
||||
prependIcon?: IconValue | undefined;
|
||||
appendIcon?: IconValue | undefined;
|
||||
spaced?: "both" | "end" | "start" | undefined;
|
||||
text?: string | number | boolean | undefined;
|
||||
} & {
|
||||
$children?: {
|
||||
default?: (() => import("vue").VNodeChild) | undefined;
|
||||
prepend?: (() => import("vue").VNodeChild) | undefined;
|
||||
append?: (() => import("vue").VNodeChild) | undefined;
|
||||
loader?: (() => import("vue").VNodeChild) | undefined;
|
||||
} | {
|
||||
$stable?: boolean;
|
||||
} | (() => import("vue").VNodeChild) | import("vue").VNodeChild;
|
||||
'v-slots'?: {
|
||||
default?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
prepend?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
append?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
loader?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
} | undefined;
|
||||
} & {
|
||||
"v-slot:append"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:default"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:loader"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
"v-slot:prepend"?: false | (() => import("vue").VNodeChild) | undefined;
|
||||
} & {
|
||||
"onGroup:selected"?: ((val: {
|
||||
value: boolean;
|
||||
}) => any) | undefined;
|
||||
}, {
|
||||
group: import("../../composables/group.js").GroupItemProvide | null;
|
||||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
||||
'group:selected': (val: {
|
||||
value: boolean;
|
||||
}) => true;
|
||||
}, string, {
|
||||
style: import("vue").StyleValue;
|
||||
density: import("../../composables/density.js").Density;
|
||||
rounded: string | number | boolean;
|
||||
tile: boolean;
|
||||
tag: string | import("../../util/index.js").JSXComponent;
|
||||
variant: "elevated" | "flat" | "outlined" | "plain" | "text" | "tonal";
|
||||
disabled: boolean;
|
||||
size: string | number;
|
||||
replace: boolean;
|
||||
exact: boolean;
|
||||
active: boolean;
|
||||
symbol: any;
|
||||
flat: boolean;
|
||||
block: boolean;
|
||||
readonly: boolean;
|
||||
slim: boolean;
|
||||
stacked: boolean;
|
||||
ripple: boolean | {
|
||||
class?: string;
|
||||
keys?: string[];
|
||||
} | undefined;
|
||||
text: string | number | boolean;
|
||||
}, {}, string, import("vue").SlotsType<Partial<{
|
||||
default: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
prepend: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
append: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
loader: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[];
|
||||
}>>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("../../util/index.js").FilterPropsOptions<{
|
||||
theme: StringConstructor;
|
||||
class: PropType<import("../../composables/component.js").ClassValue>;
|
||||
style: {
|
||||
type: PropType<import("vue").StyleValue>;
|
||||
default: null;
|
||||
};
|
||||
border: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
density: {
|
||||
type: PropType<import("../../composables/density.js").Density>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
};
|
||||
elevation: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
validator: (value: string | number) => boolean;
|
||||
};
|
||||
rounded: {
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
};
|
||||
tile: BooleanConstructor;
|
||||
tag: Omit<{
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: string;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: NonNullable<string | import("../../util/index.js").JSXComponent>;
|
||||
};
|
||||
color: StringConstructor;
|
||||
variant: Omit<{
|
||||
type: PropType<import("../../composables/variant.js").Variant>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
default: NonNullable<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
};
|
||||
value: null;
|
||||
disabled: BooleanConstructor;
|
||||
selectedClass: StringConstructor;
|
||||
size: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: string;
|
||||
};
|
||||
height: (NumberConstructor | StringConstructor)[];
|
||||
maxHeight: (NumberConstructor | StringConstructor)[];
|
||||
maxWidth: (NumberConstructor | StringConstructor)[];
|
||||
minHeight: (NumberConstructor | StringConstructor)[];
|
||||
minWidth: (NumberConstructor | StringConstructor)[];
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
location: PropType<import("../../util/index.js").Anchor | null>;
|
||||
loading: (BooleanConstructor | StringConstructor)[];
|
||||
position: {
|
||||
type: PropType<"absolute" | "fixed" | "relative" | "static" | "sticky">;
|
||||
validator: (v: any) => boolean;
|
||||
};
|
||||
href: StringConstructor;
|
||||
replace: BooleanConstructor;
|
||||
to: PropType<string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric>;
|
||||
exact: BooleanConstructor;
|
||||
active: {
|
||||
type: BooleanConstructor;
|
||||
default: undefined;
|
||||
};
|
||||
activeColor: StringConstructor;
|
||||
baseColor: StringConstructor;
|
||||
symbol: {
|
||||
type: null;
|
||||
default: import("vue").InjectionKey<import("../../composables/group.js").GroupProvide>;
|
||||
};
|
||||
flat: BooleanConstructor;
|
||||
icon: PropType<boolean | IconValue>;
|
||||
prependIcon: PropType<IconValue>;
|
||||
appendIcon: PropType<IconValue>;
|
||||
block: BooleanConstructor;
|
||||
readonly: BooleanConstructor;
|
||||
slim: BooleanConstructor;
|
||||
stacked: BooleanConstructor;
|
||||
spaced: PropType<'start' | 'end' | 'both'>;
|
||||
ripple: {
|
||||
type: PropType<RippleDirectiveBinding['value']>;
|
||||
default: boolean;
|
||||
};
|
||||
text: {
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
};
|
||||
}, import("vue").ExtractPropTypes<{
|
||||
theme: StringConstructor;
|
||||
class: PropType<import("../../composables/component.js").ClassValue>;
|
||||
style: {
|
||||
type: PropType<import("vue").StyleValue>;
|
||||
default: null;
|
||||
};
|
||||
border: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
density: {
|
||||
type: PropType<import("../../composables/density.js").Density>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
};
|
||||
elevation: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
validator: (value: string | number) => boolean;
|
||||
};
|
||||
rounded: {
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
};
|
||||
tile: BooleanConstructor;
|
||||
tag: Omit<{
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: string;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<string | import("../../util/index.js").JSXComponent>;
|
||||
default: NonNullable<string | import("../../util/index.js").JSXComponent>;
|
||||
};
|
||||
color: StringConstructor;
|
||||
variant: Omit<{
|
||||
type: PropType<import("../../composables/variant.js").Variant>;
|
||||
default: string;
|
||||
validator: (v: any) => boolean;
|
||||
}, "default" | "type"> & {
|
||||
type: PropType<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
default: NonNullable<"elevated" | "flat" | "outlined" | "plain" | "text" | "tonal">;
|
||||
};
|
||||
value: null;
|
||||
disabled: BooleanConstructor;
|
||||
selectedClass: StringConstructor;
|
||||
size: {
|
||||
type: (NumberConstructor | StringConstructor)[];
|
||||
default: string;
|
||||
};
|
||||
height: (NumberConstructor | StringConstructor)[];
|
||||
maxHeight: (NumberConstructor | StringConstructor)[];
|
||||
maxWidth: (NumberConstructor | StringConstructor)[];
|
||||
minHeight: (NumberConstructor | StringConstructor)[];
|
||||
minWidth: (NumberConstructor | StringConstructor)[];
|
||||
width: (NumberConstructor | StringConstructor)[];
|
||||
location: PropType<import("../../util/index.js").Anchor | null>;
|
||||
loading: (BooleanConstructor | StringConstructor)[];
|
||||
position: {
|
||||
type: PropType<"absolute" | "fixed" | "relative" | "static" | "sticky">;
|
||||
validator: (v: any) => boolean;
|
||||
};
|
||||
href: StringConstructor;
|
||||
replace: BooleanConstructor;
|
||||
to: PropType<string | import("vue-router").RouteLocationAsPathGeneric | import("vue-router").RouteLocationAsRelativeGeneric>;
|
||||
exact: BooleanConstructor;
|
||||
active: {
|
||||
type: BooleanConstructor;
|
||||
default: undefined;
|
||||
};
|
||||
activeColor: StringConstructor;
|
||||
baseColor: StringConstructor;
|
||||
symbol: {
|
||||
type: null;
|
||||
default: import("vue").InjectionKey<import("../../composables/group.js").GroupProvide>;
|
||||
};
|
||||
flat: BooleanConstructor;
|
||||
icon: PropType<boolean | IconValue>;
|
||||
prependIcon: PropType<IconValue>;
|
||||
appendIcon: PropType<IconValue>;
|
||||
block: BooleanConstructor;
|
||||
readonly: BooleanConstructor;
|
||||
slim: BooleanConstructor;
|
||||
stacked: BooleanConstructor;
|
||||
spaced: PropType<'start' | 'end' | 'both'>;
|
||||
ripple: {
|
||||
type: PropType<RippleDirectiveBinding['value']>;
|
||||
default: boolean;
|
||||
};
|
||||
text: {
|
||||
type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
|
||||
default: undefined;
|
||||
};
|
||||
}>>;
|
||||
export type VBtn = InstanceType<typeof VBtn>;
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
import { createVNode as _createVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps } from "vue";
|
||||
// Styles
|
||||
import "./VBtn.css";
|
||||
|
||||
// Components
|
||||
import { VBtnToggleSymbol } from "../VBtnToggle/VBtnToggle.js";
|
||||
import { VDefaultsProvider } from "../VDefaultsProvider/index.js";
|
||||
import { VIcon } from "../VIcon/index.js";
|
||||
import { VProgressCircular } from "../VProgressCircular/index.js"; // Composables
|
||||
import { makeBorderProps, useBorder } from "../../composables/border.js";
|
||||
import { makeComponentProps } from "../../composables/component.js";
|
||||
import { makeDensityProps, useDensity } from "../../composables/density.js";
|
||||
import { makeDimensionProps, useDimension } from "../../composables/dimensions.js";
|
||||
import { makeElevationProps, useElevation } from "../../composables/elevation.js";
|
||||
import { makeGroupItemProps, useGroupItem } from "../../composables/group.js";
|
||||
import { IconValue } from "../../composables/icons.js";
|
||||
import { makeLoaderProps, useLoader } from "../../composables/loader.js";
|
||||
import { makeLocationProps, useLocation } from "../../composables/location.js";
|
||||
import { makePositionProps, usePosition } from "../../composables/position.js";
|
||||
import { makeRoundedProps, useRounded } from "../../composables/rounded.js";
|
||||
import { makeRouterProps, useLink } from "../../composables/router.js";
|
||||
import { useSelectLink } from "../../composables/selectLink.js";
|
||||
import { makeSizeProps, useSize } from "../../composables/size.js";
|
||||
import { makeTagProps } from "../../composables/tag.js";
|
||||
import { makeThemeProps, provideTheme } from "../../composables/theme.js";
|
||||
import { genOverlays, makeVariantProps, useVariant } from "../../composables/variant.js"; // Directives
|
||||
import vRipple from "../../directives/ripple/index.js"; // Utilities
|
||||
import { computed, toDisplayString, toRef, withDirectives } from 'vue';
|
||||
import { genericComponent, propsFactory, useRender } from "../../util/index.js"; // Types
|
||||
export const makeVBtnProps = propsFactory({
|
||||
active: {
|
||||
type: Boolean,
|
||||
default: undefined
|
||||
},
|
||||
activeColor: String,
|
||||
baseColor: String,
|
||||
symbol: {
|
||||
type: null,
|
||||
default: VBtnToggleSymbol
|
||||
},
|
||||
flat: Boolean,
|
||||
icon: [Boolean, String, Function, Object],
|
||||
prependIcon: IconValue,
|
||||
appendIcon: IconValue,
|
||||
block: Boolean,
|
||||
readonly: Boolean,
|
||||
slim: Boolean,
|
||||
stacked: Boolean,
|
||||
spaced: String,
|
||||
ripple: {
|
||||
type: [Boolean, Object],
|
||||
default: true
|
||||
},
|
||||
text: {
|
||||
type: [String, Number, Boolean],
|
||||
default: undefined
|
||||
},
|
||||
...makeBorderProps(),
|
||||
...makeComponentProps(),
|
||||
...makeDensityProps(),
|
||||
...makeDimensionProps(),
|
||||
...makeElevationProps(),
|
||||
...makeGroupItemProps(),
|
||||
...makeLoaderProps(),
|
||||
...makeLocationProps(),
|
||||
...makePositionProps(),
|
||||
...makeRoundedProps(),
|
||||
...makeRouterProps(),
|
||||
...makeSizeProps(),
|
||||
...makeTagProps({
|
||||
tag: 'button'
|
||||
}),
|
||||
...makeThemeProps(),
|
||||
...makeVariantProps({
|
||||
variant: 'elevated'
|
||||
})
|
||||
}, 'VBtn');
|
||||
export const VBtn = genericComponent()({
|
||||
name: 'VBtn',
|
||||
props: makeVBtnProps(),
|
||||
emits: {
|
||||
'group:selected': val => true
|
||||
},
|
||||
setup(props, {
|
||||
attrs,
|
||||
slots
|
||||
}) {
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
borderClasses
|
||||
} = useBorder(props);
|
||||
const {
|
||||
densityClasses
|
||||
} = useDensity(props);
|
||||
const {
|
||||
dimensionStyles
|
||||
} = useDimension(props);
|
||||
const {
|
||||
elevationClasses
|
||||
} = useElevation(props);
|
||||
const {
|
||||
loaderClasses
|
||||
} = useLoader(props);
|
||||
const {
|
||||
locationStyles
|
||||
} = useLocation(props);
|
||||
const {
|
||||
positionClasses
|
||||
} = usePosition(props);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const {
|
||||
sizeClasses,
|
||||
sizeStyles
|
||||
} = useSize(props);
|
||||
const group = useGroupItem(props, props.symbol, false);
|
||||
const link = useLink(props, attrs);
|
||||
const isActive = computed(() => {
|
||||
if (props.active !== undefined) {
|
||||
return props.active;
|
||||
}
|
||||
if (link.isRouterLink.value) {
|
||||
return link.isActive?.value;
|
||||
}
|
||||
return group?.isSelected.value;
|
||||
});
|
||||
const color = toRef(() => isActive.value ? props.activeColor ?? props.color : props.color);
|
||||
const variantProps = computed(() => {
|
||||
const showColor = group?.isSelected.value && (!link.isLink.value || link.isActive?.value) || !group || link.isActive?.value;
|
||||
return {
|
||||
color: showColor ? color.value ?? props.baseColor : props.baseColor,
|
||||
variant: props.variant
|
||||
};
|
||||
});
|
||||
const {
|
||||
colorClasses,
|
||||
colorStyles,
|
||||
variantClasses
|
||||
} = useVariant(variantProps);
|
||||
const isDisabled = computed(() => group?.disabled.value || props.disabled);
|
||||
const isElevated = toRef(() => {
|
||||
return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);
|
||||
});
|
||||
const valueAttr = computed(() => {
|
||||
if (props.value === undefined || typeof props.value === 'symbol') return undefined;
|
||||
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
||||
});
|
||||
function onClick(e) {
|
||||
if (isDisabled.value || link.isLink.value && (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || attrs.target === '_blank')) return;
|
||||
if (link.isRouterLink.value) {
|
||||
link.navigate.value?.(e);
|
||||
} else {
|
||||
// Group active state for links is handled by useSelectLink
|
||||
group?.toggle();
|
||||
}
|
||||
}
|
||||
useSelectLink(link, group?.select);
|
||||
useRender(() => {
|
||||
const Tag = link.isLink.value ? 'a' : props.tag;
|
||||
const hasPrepend = !!(props.prependIcon || slots.prepend);
|
||||
const hasAppend = !!(props.appendIcon || slots.append);
|
||||
const hasIcon = !!(props.icon && props.icon !== true);
|
||||
return withDirectives(_createVNode(Tag, _mergeProps(link.linkProps, {
|
||||
"type": Tag === 'a' ? undefined : 'button',
|
||||
"class": ['v-btn', group?.selectedClass.value, {
|
||||
'v-btn--active': isActive.value,
|
||||
'v-btn--block': props.block,
|
||||
'v-btn--disabled': isDisabled.value,
|
||||
'v-btn--elevated': isElevated.value,
|
||||
'v-btn--flat': props.flat,
|
||||
'v-btn--icon': !!props.icon,
|
||||
'v-btn--loading': props.loading,
|
||||
'v-btn--readonly': props.readonly,
|
||||
'v-btn--slim': props.slim,
|
||||
'v-btn--stacked': props.stacked
|
||||
}, props.spaced ? ['v-btn--spaced', `v-btn--spaced-${props.spaced}`] : [], themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
|
||||
"style": [colorStyles.value, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],
|
||||
"aria-busy": props.loading ? true : undefined,
|
||||
"disabled": isDisabled.value && Tag !== 'a' || undefined,
|
||||
"tabindex": props.loading || props.readonly ? -1 : undefined,
|
||||
"onClick": onClick,
|
||||
"value": valueAttr.value
|
||||
}), {
|
||||
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && _createElementVNode("span", {
|
||||
"key": "prepend",
|
||||
"class": "v-btn__prepend"
|
||||
}, [!slots.prepend ? _createVNode(VIcon, {
|
||||
"key": "prepend-icon",
|
||||
"icon": props.prependIcon
|
||||
}, null) : _createVNode(VDefaultsProvider, {
|
||||
"key": "prepend-defaults",
|
||||
"disabled": !props.prependIcon,
|
||||
"defaults": {
|
||||
VIcon: {
|
||||
icon: props.prependIcon
|
||||
}
|
||||
}
|
||||
}, slots.prepend)]), _createElementVNode("span", {
|
||||
"class": "v-btn__content",
|
||||
"data-no-activator": ""
|
||||
}, [!slots.default && hasIcon ? _createVNode(VIcon, {
|
||||
"key": "content-icon",
|
||||
"icon": props.icon
|
||||
}, null) : _createVNode(VDefaultsProvider, {
|
||||
"key": "content-defaults",
|
||||
"disabled": !hasIcon,
|
||||
"defaults": {
|
||||
VIcon: {
|
||||
icon: props.icon
|
||||
}
|
||||
}
|
||||
}, {
|
||||
default: () => [slots.default?.() ?? toDisplayString(props.text)]
|
||||
})]), !props.icon && hasAppend && _createElementVNode("span", {
|
||||
"key": "append",
|
||||
"class": "v-btn__append"
|
||||
}, [!slots.append ? _createVNode(VIcon, {
|
||||
"key": "append-icon",
|
||||
"icon": props.appendIcon
|
||||
}, null) : _createVNode(VDefaultsProvider, {
|
||||
"key": "append-defaults",
|
||||
"disabled": !props.appendIcon,
|
||||
"defaults": {
|
||||
VIcon: {
|
||||
icon: props.appendIcon
|
||||
}
|
||||
}
|
||||
}, slots.append)]), !!props.loading && _createElementVNode("span", {
|
||||
"key": "loader",
|
||||
"class": "v-btn__loader"
|
||||
}, [slots.loader?.() ?? _createVNode(VProgressCircular, {
|
||||
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
||||
"indeterminate": true,
|
||||
"width": "2"
|
||||
}, null)])]
|
||||
}), [[vRipple, !isDisabled.value && props.ripple, '', {
|
||||
center: !!props.icon
|
||||
}]]);
|
||||
});
|
||||
return {
|
||||
group
|
||||
};
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VBtn.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+266
@@ -0,0 +1,266 @@
|
||||
@use 'sass:math'
|
||||
@use 'sass:map'
|
||||
@use 'sass:meta'
|
||||
@use '../../styles/settings'
|
||||
@use '../../styles/tools'
|
||||
@use './mixins' as *
|
||||
@use './variables' as *
|
||||
|
||||
@include tools.layer('components')
|
||||
.v-btn
|
||||
align-items: center
|
||||
border-radius: $button-border-radius
|
||||
display: inline-flex
|
||||
flex-direction: row
|
||||
font-weight: $button-font-weight
|
||||
justify-content: center
|
||||
letter-spacing: $button-text-letter-spacing
|
||||
line-height: $button-line-height
|
||||
max-width: $button-max-width
|
||||
outline: none
|
||||
position: relative
|
||||
text-decoration: none
|
||||
text-indent: $button-text-letter-spacing
|
||||
text-transform: $button-text-transform
|
||||
transition-property: $button-transition-property
|
||||
transition-duration: 0.28s
|
||||
transition-timing-function: settings.$standard-easing
|
||||
user-select: none
|
||||
vertical-align: $button-vertical-align
|
||||
flex-shrink: 0
|
||||
|
||||
.v-locale--is-rtl &
|
||||
@if meta.type-of($button-text-letter-spacing) == 'number'
|
||||
text-indent: -1 * $button-text-letter-spacing
|
||||
|
||||
@at-root
|
||||
@include button-sizes()
|
||||
@include button-density('height', $button-density)
|
||||
|
||||
@include tools.border($button-border...)
|
||||
@include tools.position($button-positions)
|
||||
@include tools.states('.v-btn__overlay')
|
||||
@include tools.variant($button-variants...)
|
||||
|
||||
@supports selector(:focus-visible)
|
||||
&::after
|
||||
pointer-events: none
|
||||
border: 2px solid currentColor
|
||||
border-radius: inherit
|
||||
opacity: 0
|
||||
transition: opacity .2s ease-in-out
|
||||
@include tools.absolute(true)
|
||||
|
||||
&:focus-visible::after
|
||||
opacity: calc(.25 * var(--v-theme-overlay-multiplier))
|
||||
|
||||
&--icon
|
||||
border-radius: $button-icon-border-radius
|
||||
min-width: 0
|
||||
padding: 0
|
||||
|
||||
// ensure that default
|
||||
// v-icon size is 24px
|
||||
&.v-btn--size-default
|
||||
--v-btn-size: #{$button-icon-font-size}
|
||||
|
||||
@at-root &
|
||||
@include button-density(('width', 'height'), $button-icon-density)
|
||||
|
||||
&--elevated
|
||||
&:hover,
|
||||
&:focus
|
||||
@include tools.elevation(map.get($button-elevation, 'hover'))
|
||||
|
||||
&:active
|
||||
@include tools.elevation(map.get($button-elevation, 'active'))
|
||||
|
||||
&--flat
|
||||
box-shadow: none
|
||||
|
||||
&--block
|
||||
display: flex
|
||||
flex: 1 0 auto
|
||||
min-width: 100%
|
||||
|
||||
&--spaced
|
||||
.v-btn__content
|
||||
flex-grow: 1
|
||||
|
||||
&.v-btn--spaced-start > .v-btn__content
|
||||
justify-content: end
|
||||
|
||||
&.v-btn--spaced-end > .v-btn__content
|
||||
justify-content: start
|
||||
|
||||
&--disabled
|
||||
pointer-events: none
|
||||
|
||||
@if ($button-colored-disabled)
|
||||
opacity: $button-disabled-opacity
|
||||
&:hover
|
||||
opacity: $button-disabled-opacity
|
||||
@else
|
||||
opacity: 1
|
||||
@include tools.layer('trumps')
|
||||
color: tools.theme-color('on-surface', $button-disabled-opacity)
|
||||
|
||||
&.v-btn--variant-elevated,
|
||||
&.v-btn--variant-flat
|
||||
box-shadow: none
|
||||
|
||||
@if ($button-colored-disabled)
|
||||
opacity: 1
|
||||
color: tools.theme-color('on-surface', $button-disabled-opacity)
|
||||
background: rgb(var(--v-theme-surface))
|
||||
@else
|
||||
@include tools.layer('trumps')
|
||||
background: rgb(var(--v-theme-surface))
|
||||
|
||||
.v-btn__overlay
|
||||
// __overlay uses currentColor, so we need to divide
|
||||
// by the text opacity to get the correct value
|
||||
opacity: math.div($button-disabled-overlay, $button-disabled-opacity)
|
||||
|
||||
&--loading
|
||||
pointer-events: none
|
||||
|
||||
.v-btn__content,
|
||||
.v-btn__prepend,
|
||||
.v-btn__append
|
||||
opacity: 0
|
||||
|
||||
&--stacked
|
||||
align-items: center
|
||||
flex-direction: column
|
||||
justify-content: center
|
||||
gap: $button-stacked-gap
|
||||
|
||||
.v-btn__content
|
||||
flex-direction: column
|
||||
line-height: $button-stacked-line-height
|
||||
|
||||
.v-btn__prepend,
|
||||
.v-btn__append,
|
||||
.v-btn__content > .v-icon--start,
|
||||
.v-btn__content > .v-icon--end
|
||||
margin-inline: 0
|
||||
|
||||
@at-root
|
||||
@include button-sizes($button-stacked-sizes, true)
|
||||
@include button-density('height', $button-stacked-density)
|
||||
|
||||
&--slim
|
||||
padding: $button-slim-padding
|
||||
|
||||
&--readonly
|
||||
pointer-events: none
|
||||
|
||||
&--rounded
|
||||
@include tools.rounded($button-rounded-border-radius)
|
||||
|
||||
&.v-btn--icon
|
||||
@include tools.rounded($button-border-radius)
|
||||
|
||||
.v-icon
|
||||
--v-icon-size-multiplier: #{calc(18/21)}
|
||||
|
||||
&--icon
|
||||
.v-icon
|
||||
--v-icon-size-multiplier: 1
|
||||
|
||||
&--stacked
|
||||
.v-icon
|
||||
--v-icon-size-multiplier: #{calc(24/21)}
|
||||
|
||||
&.v-btn--block
|
||||
min-width: 100%
|
||||
|
||||
.v-btn__loader
|
||||
align-items: center
|
||||
display: flex
|
||||
height: 100%
|
||||
justify-content: center
|
||||
left: 0
|
||||
position: absolute
|
||||
top: 0
|
||||
width: 100%
|
||||
|
||||
> .v-progress-circular
|
||||
width: $button-loader-size
|
||||
height: $button-loader-size
|
||||
|
||||
.v-btn__content,
|
||||
.v-btn__prepend,
|
||||
.v-btn__append
|
||||
align-items: center
|
||||
display: flex
|
||||
transition: $button-content-transition
|
||||
|
||||
.v-btn__prepend
|
||||
margin-inline: $button-margin-start $button-margin-end
|
||||
|
||||
.v-btn--slim &
|
||||
margin-inline-start: 0
|
||||
|
||||
.v-btn__append
|
||||
margin-inline: $button-margin-end $button-margin-start
|
||||
|
||||
.v-btn--slim &
|
||||
margin-inline-end: 0
|
||||
|
||||
.v-btn__content
|
||||
justify-content: center
|
||||
white-space: $button-white-space
|
||||
|
||||
> .v-icon--start
|
||||
margin-inline: $button-margin-start $button-margin-end
|
||||
|
||||
> .v-icon--end
|
||||
margin-inline: $button-margin-end $button-margin-start
|
||||
|
||||
.v-btn--stacked &
|
||||
white-space: normal
|
||||
|
||||
.v-btn__overlay
|
||||
background-color: currentColor
|
||||
border-radius: inherit
|
||||
opacity: 0
|
||||
transition: opacity .2s ease-in-out
|
||||
|
||||
.v-btn__overlay,
|
||||
.v-btn__underlay
|
||||
pointer-events: none
|
||||
@include tools.absolute()
|
||||
|
||||
// VPagination
|
||||
.v-pagination
|
||||
.v-btn
|
||||
width: auto
|
||||
padding-inline: $button-pagination-padding-inline
|
||||
@include button-density('min-width', $button-icon-density)
|
||||
@include tools.rounded($button-pagination-border-radius)
|
||||
|
||||
&--rounded
|
||||
@include tools.rounded($button-pagination-rounded-border-radius)
|
||||
|
||||
&__overlay
|
||||
transition: none
|
||||
|
||||
&__prev,
|
||||
&__next
|
||||
.v-btn
|
||||
padding-inline: 0
|
||||
@include button-density('width', $button-icon-density)
|
||||
|
||||
.v-pagination__item--is-active .v-btn__overlay
|
||||
opacity: $button-pagination-active-overlay-opacity
|
||||
|
||||
@media (forced-colors: active)
|
||||
.v-btn
|
||||
&:not(&--variant-text, &--variant-plain)
|
||||
border: thin solid
|
||||
|
||||
&:focus-visible
|
||||
outline: 2px solid
|
||||
outline-offset: 2px
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
@use 'sass:math';
|
||||
@use 'sass:map';
|
||||
@use 'sass:meta';
|
||||
@use '../../styles/settings';
|
||||
@use '../../styles/tools';
|
||||
@use './variables' as *;
|
||||
|
||||
@mixin button-sizes ($map: $button-sizes, $immediate: false) {
|
||||
@each $sizeName, $multiplier in settings.$size-scales {
|
||||
$size: map.get($map, 'font-size') + math.div(2 * $multiplier, 16);
|
||||
$height: map.get($map, 'height') + (settings.$size-scale * $multiplier);
|
||||
$selector: '.v-btn--size-#{$sizeName}';
|
||||
@if $immediate {
|
||||
$selector: '#{&}#{$selector}';
|
||||
}
|
||||
|
||||
#{$selector} {
|
||||
--v-btn-size: #{$size};
|
||||
--v-btn-height: #{$height};
|
||||
font-size: var(--v-btn-size);
|
||||
min-width: tools.roundEven($height * map.get($map, 'width-ratio'));
|
||||
padding: 0 tools.roundEven(math.div($height, map.get($map, 'padding-ratio')));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-density ($properties, $densities) {
|
||||
@each $density, $multiplier in $densities {
|
||||
$value: calc(var(--v-btn-height) + #{$multiplier * settings.$spacer});
|
||||
|
||||
&.v-btn--density-#{$density} {
|
||||
@if meta.type-of($properties) == "list" {
|
||||
@each $property in $properties {
|
||||
#{$property}: $value;
|
||||
}
|
||||
}
|
||||
@else {
|
||||
#{$properties}: $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
@use 'sass:math';
|
||||
@use 'sass:map';
|
||||
@use '../../styles/settings';
|
||||
@use '../../styles/tools';
|
||||
|
||||
// Defaults
|
||||
// if false, disabled buttons will be greyed out
|
||||
$button-colored-disabled: true !default;
|
||||
|
||||
$button-background: rgb(var(--v-theme-surface)) !default;
|
||||
$button-color: tools.theme-color('on-surface', var(--v-high-emphasis-opacity)) !default;
|
||||
$button-banner-actions-padding: 0 8px !default; // @deprecated
|
||||
$button-pagination-active-overlay-opacity: var(--v-border-opacity) !default;
|
||||
$button-pagination-border-radius: settings.$border-radius-root !default;
|
||||
$button-pagination-padding-inline: 5px !default;
|
||||
$button-pagination-rounded-border-radius: map.get(settings.$rounded, 'circle') !default;
|
||||
$button-border-color: settings.$border-color-root !default;
|
||||
$button-border-radius: settings.$border-radius-root !default;
|
||||
$button-border-style: settings.$border-style-root !default;
|
||||
$button-border-thin-width: thin !default;
|
||||
$button-border-width: 0 !default;
|
||||
$button-card-actions-padding: 0 8px !default; // @deprecated
|
||||
$button-content-transition: transform, opacity .2s settings.$standard-easing !default;
|
||||
$button-disabled-opacity: 0.26 !default;
|
||||
$button-disabled-overlay: 0.12 !default;
|
||||
$button-elevation: ('default': 1, 'hover': 2, 'active': 1) !default;
|
||||
$button-font-size: tools.map-deep-get(settings.$typography, 'label-large', 'size') !default;
|
||||
$button-font-weight: tools.map-deep-get(settings.$typography, 'label-large', 'weight') !default;
|
||||
$button-height: 36px !default;
|
||||
$button-stacked-height: 72px !default;
|
||||
$button-stacked-gap: 4px !default;
|
||||
$button-icon-border-radius: map.get(settings.$rounded, 'circle') !default;
|
||||
$button-icon-font-size: 1rem !default;
|
||||
$button-line-height: normal !default;
|
||||
$button-loader-size: 1.5em !default;
|
||||
$button-stacked-line-height: 1.25 !default;
|
||||
$button-plain-opacity: .62 !default;
|
||||
$button-padding-ratio: 2.25 !default;
|
||||
$button-stacked-padding-ratio: 4.5 !default;
|
||||
$button-margin-start-multiplier: -9 !default;
|
||||
$button-margin-end-multiplier: 4.5 !default;
|
||||
$button-margin-start: calc(var(--v-btn-height) / #{$button-margin-start-multiplier}) !default;
|
||||
$button-margin-end: calc(var(--v-btn-height) / #{$button-margin-end-multiplier}) !default;
|
||||
$button-max-width: 100% !default;
|
||||
$button-positions: absolute fixed !default;
|
||||
$button-text-letter-spacing: tools.map-deep-get(settings.$typography, 'label-large', 'letter-spacing') !default;
|
||||
$button-text-transform: none !default;
|
||||
$button-transition-property: box-shadow, transform, opacity, background !default;
|
||||
$button-vertical-align: middle !default;
|
||||
$button-width-ratio: math.div(16, 9) !default;
|
||||
$button-snackbar-action-padding: 0 8px !default; // @deprecated
|
||||
$button-slim-padding: 0 8px !default;
|
||||
$button-stacked-width-ratio: 1 !default;
|
||||
$button-rounded-border-radius: map.get(settings.$rounded, 'xl') !default;
|
||||
$button-white-space: nowrap !default;
|
||||
|
||||
$button-density: ('default': 0, 'comfortable': -2, 'compact': -3) !default;
|
||||
$button-stacked-density: ('default': 0, 'comfortable': -4, 'compact': -6) !default;
|
||||
$button-icon-density: ('default': 3, 'comfortable': 0, 'compact': -2) !default;
|
||||
|
||||
$button-border: (
|
||||
$button-border-color,
|
||||
$button-border-style,
|
||||
$button-border-width,
|
||||
$button-border-thin-width
|
||||
) !default;
|
||||
|
||||
$button-sizes: () !default;
|
||||
$button-sizes: map.merge(
|
||||
(
|
||||
'height': $button-height,
|
||||
'font-size': $button-font-size,
|
||||
'width-ratio': $button-width-ratio,
|
||||
'padding-ratio': $button-padding-ratio
|
||||
),
|
||||
$button-sizes
|
||||
);
|
||||
|
||||
$button-stacked-sizes: () !default;
|
||||
$button-stacked-sizes: map.merge(
|
||||
(
|
||||
'height': $button-stacked-height,
|
||||
'font-size': $button-font-size,
|
||||
'width-ratio': $button-stacked-width-ratio,
|
||||
'padding-ratio': $button-stacked-padding-ratio
|
||||
),
|
||||
$button-stacked-sizes
|
||||
);
|
||||
|
||||
$button-variants: (
|
||||
$button-background,
|
||||
$button-color,
|
||||
map.get($button-elevation, 'default'),
|
||||
$button-plain-opacity,
|
||||
'v-btn'
|
||||
) !default;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export { VBtn } from './VBtn.js';
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export { VBtn } from "./VBtn.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":["VBtn"],"sources":["../../../src/components/VBtn/index.ts"],"sourcesContent":["export { VBtn } from './VBtn'\n"],"mappings":"SAASA,IAAI","ignoreList":[]}
|
||||
Reference in New Issue
Block a user