vuetify 3.3.12 → 3.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +152 -16
- package/dist/json/importMap.json +4 -4
- package/dist/json/tags.json +34 -0
- package/dist/json/web-types.json +462 -48
- package/dist/vuetify-labs.css +1718 -606
- package/dist/vuetify-labs.d.ts +880 -276
- package/dist/vuetify-labs.esm.js +373 -189
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +372 -188
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1591 -479
- package/dist/vuetify.d.ts +865 -267
- package/dist/vuetify.esm.js +373 -189
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +372 -188
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +920 -905
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.mts +6 -6
- package/lib/components/VAutocomplete/VAutocomplete.mjs +6 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +62 -14
- package/lib/components/VAvatar/VAvatar.mjs +2 -1
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.mts +6 -0
- package/lib/components/VBanner/VBanner.mjs +5 -3
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/index.d.mts +10 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.css +1 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.sass +1 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +9 -4
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +28 -2
- package/lib/components/VBtn/VBtn.css +3 -0
- package/lib/components/VBtn/VBtn.sass +3 -0
- package/lib/components/VCarousel/index.d.mts +26 -0
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +14 -11
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.mts +15 -1
- package/lib/components/VColorPicker/VColorPickerEdit.css +4 -2
- package/lib/components/VColorPicker/VColorPickerPreview.css +16 -6
- package/lib/components/VColorPicker/VColorPickerPreview.mjs +28 -2
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.sass +4 -0
- package/lib/components/VColorPicker/_variables.scss +1 -0
- package/lib/components/VCombobox/VCombobox.mjs +6 -2
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +62 -14
- package/lib/components/VDialog/index.d.mts +41 -20
- package/lib/components/VField/VField.css +11 -6
- package/lib/components/VField/VField.mjs +5 -3
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +1 -0
- package/lib/components/VField/index.d.mts +4 -4
- package/lib/components/VFileInput/VFileInput.css +4 -0
- package/lib/components/VFileInput/VFileInput.sass +5 -1
- package/lib/components/VFileInput/_variables.scss +2 -1
- package/lib/components/VFileInput/index.d.mts +4 -4
- package/lib/components/VGrid/VGrid.css +153 -142
- package/lib/components/VImg/VImg.mjs +13 -1
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.mts +26 -0
- package/lib/components/VList/VList.css +1 -1
- package/lib/components/VList/VList.sass +1 -1
- package/lib/components/VList/VListItem.css +15 -10
- package/lib/components/VList/VListItem.mjs +6 -3
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +17 -10
- package/lib/components/VList/index.d.mts +12 -12
- package/lib/components/VMenu/VMenu.mjs +4 -3
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +46 -25
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +0 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +5 -3
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +0 -1
- package/lib/components/VNavigationDrawer/_variables.scss +0 -1
- package/lib/components/VNavigationDrawer/index.d.mts +10 -0
- package/lib/components/VOverlay/VOverlay.mjs +9 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +17 -8
- package/lib/components/VOverlay/locationStrategies.mjs +9 -9
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/scrollStrategies.mjs +3 -3
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +50 -21
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.css +3 -2
- package/lib/components/VRadio/index.d.mts +9 -1
- package/lib/components/VRadioGroup/VRadioGroup.css +6 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.sass +5 -0
- package/lib/components/VRadioGroup/_variables.scss +3 -1
- package/lib/components/VRadioGroup/index.d.mts +3 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.mts +128 -33
- package/lib/components/VSelect/VSelect.mjs +14 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +62 -14
- package/lib/components/VSelectionControl/VSelectionControl.mjs +27 -21
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +33 -25
- package/lib/components/VSlideGroup/VSlideGroup.mjs +5 -3
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +10 -0
- package/lib/components/VSlider/VSlider.mjs +2 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.css +8 -4
- package/lib/components/VSlider/VSliderTrack.css +22 -12
- package/lib/components/VSlider/index.d.mts +128 -33
- package/lib/components/VSlider/slider.mjs +5 -1
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +41 -20
- package/lib/components/VSwitch/VSwitch.css +24 -17
- package/lib/components/VSwitch/VSwitch.mjs +37 -28
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.sass +20 -11
- package/lib/components/VSwitch/_variables.scss +18 -6
- package/lib/components/VSwitch/index.d.mts +9 -1
- package/lib/components/VTabs/index.d.mts +10 -0
- package/lib/components/VTextField/VTextField.css +9 -2
- package/lib/components/VTextField/VTextField.mjs +6 -3
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/VTextField.sass +10 -3
- package/lib/components/VTextField/index.d.mts +22 -16
- package/lib/components/VTextarea/VTextarea.mjs +1 -2
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.mts +4 -4
- package/lib/components/VTimeline/VTimeline.css +21 -11
- package/lib/components/VTimeline/VTimeline.sass +6 -1
- package/lib/components/VToolbar/VToolbar.css +4 -2
- package/lib/components/VTooltip/index.d.mts +41 -20
- package/lib/components/index.d.mts +836 -265
- package/lib/components/transitions/dialog-transition.mjs +4 -3
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/components/transitions/index.d.mts +6 -6
- package/lib/composables/defaults.mjs +9 -9
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/directiveComponent.mjs +69 -0
- package/lib/composables/directiveComponent.mjs.map +1 -0
- package/lib/composables/display.mjs +23 -3
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/theme.mjs +7 -7
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/fa.mjs +2 -1
- package/lib/iconsets/fa.mjs.map +1 -1
- package/lib/iconsets/fa4.mjs +2 -1
- package/lib/iconsets/fa4.mjs.map +1 -1
- package/lib/iconsets/md.mjs +2 -1
- package/lib/iconsets/md.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.mjs +2 -1
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/iconsets/mdi.mjs +2 -1
- package/lib/iconsets/mdi.mjs.map +1 -1
- package/lib/index.d.mts +33 -2
- package/lib/labs/VBottomSheet/index.d.mts +14 -8
- package/lib/labs/VDateInput/index.d.mts +10 -4
- package/lib/labs/VDatePicker/VDatePickerControls.css +1 -1
- package/lib/labs/VOtpInput/index.d.mts +4 -4
- package/lib/labs/components.d.mts +18 -12
- package/lib/locale/af.mjs +1 -0
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +1 -0
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +1 -0
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +1 -0
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +1 -0
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +1 -0
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +1 -0
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +1 -0
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +1 -0
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +1 -0
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +1 -0
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +1 -0
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +1 -0
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +1 -0
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +1 -0
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +1 -0
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +1 -0
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +1 -0
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +1 -0
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +1 -0
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +42 -0
- package/lib/locale/it.mjs +1 -0
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +1 -0
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/ko.mjs +1 -0
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +1 -0
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +1 -0
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +1 -0
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +1 -0
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +1 -0
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +1 -0
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +1 -0
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +1 -0
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +1 -0
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +1 -0
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +1 -0
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +1 -0
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +1 -0
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +1 -0
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +1 -0
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +1 -0
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +1 -0
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +1 -0
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +1 -0
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/styles/main.css +1026 -0
- package/lib/styles/settings/_utilities.scss +20 -0
- package/lib/styles/tools/_rtl.sass +4 -2
- package/lib/util/box.mjs +12 -0
- package/lib/util/box.mjs.map +1 -1
- package/lib/util/globals.mjs +1 -0
- package/lib/util/globals.mjs.map +1 -1
- package/lib/util/helpers.mjs +19 -5
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/injectSelf.mjs +2 -1
- package/lib/util/injectSelf.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { Ref, EffectScope, ComponentPropsOptions, ExtractPropTypes } from 'vue';
|
|
|
4
4
|
interface ScrollStrategyData {
|
|
5
5
|
root: Ref<HTMLElement | undefined>;
|
|
6
6
|
contentEl: Ref<HTMLElement | undefined>;
|
|
7
|
-
|
|
7
|
+
targetEl: Ref<HTMLElement | undefined>;
|
|
8
8
|
isActive: Ref<boolean>;
|
|
9
9
|
updateLocation: Ref<((e: Event) => void) | undefined>;
|
|
10
10
|
}
|
|
@@ -52,7 +52,7 @@ interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions
|
|
|
52
52
|
|
|
53
53
|
interface LocationStrategyData {
|
|
54
54
|
contentEl: Ref<HTMLElement | undefined>;
|
|
55
|
-
|
|
55
|
+
target: Ref<HTMLElement | [x: number, y: number] | undefined>;
|
|
56
56
|
isActive: Ref<boolean>;
|
|
57
57
|
isRtl: Ref<boolean>;
|
|
58
58
|
}
|
|
@@ -125,6 +125,7 @@ declare const VSnackbar: {
|
|
|
125
125
|
minHeight?: string | number | undefined;
|
|
126
126
|
minWidth?: string | number | undefined;
|
|
127
127
|
position?: "fixed" | "absolute" | "static" | "relative" | "sticky" | undefined;
|
|
128
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
128
129
|
class?: any;
|
|
129
130
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
130
131
|
activator?: ((arg: {
|
|
@@ -187,7 +188,7 @@ declare const VSnackbar: {
|
|
|
187
188
|
[key: string]: any;
|
|
188
189
|
}>) => void)[] | undefined;
|
|
189
190
|
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
190
|
-
activator?:
|
|
191
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
191
192
|
"v-slot:activator"?: false | ((arg: {
|
|
192
193
|
isActive: boolean;
|
|
193
194
|
props: Record<string, any>;
|
|
@@ -256,11 +257,12 @@ declare const VSnackbar: {
|
|
|
256
257
|
minHeight?: string | number | undefined;
|
|
257
258
|
minWidth?: string | number | undefined;
|
|
258
259
|
position?: "fixed" | "absolute" | "static" | "relative" | "sticky" | undefined;
|
|
260
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
259
261
|
class?: any;
|
|
260
262
|
theme?: string | undefined;
|
|
261
263
|
contentClass?: any;
|
|
262
264
|
rounded?: string | number | boolean | undefined;
|
|
263
|
-
activator?:
|
|
265
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
264
266
|
closeDelay?: string | number | undefined;
|
|
265
267
|
openDelay?: string | number | undefined;
|
|
266
268
|
openOnClick?: boolean | undefined;
|
|
@@ -331,6 +333,7 @@ declare const VSnackbar: {
|
|
|
331
333
|
maxWidth?: string | number | undefined;
|
|
332
334
|
minHeight?: string | number | undefined;
|
|
333
335
|
minWidth?: string | number | undefined;
|
|
336
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
334
337
|
class?: any;
|
|
335
338
|
onAfterLeave?: (() => any) | undefined;
|
|
336
339
|
$children?: vue.VNodeChild | {
|
|
@@ -400,7 +403,7 @@ declare const VSnackbar: {
|
|
|
400
403
|
[key: string]: any;
|
|
401
404
|
}>) => void)[] | undefined;
|
|
402
405
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
403
|
-
activator?:
|
|
406
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
404
407
|
"v-slot:activator"?: false | ((arg: {
|
|
405
408
|
isActive: boolean;
|
|
406
409
|
props: Record<string, any>;
|
|
@@ -467,10 +470,11 @@ declare const VSnackbar: {
|
|
|
467
470
|
maxWidth?: string | number | undefined;
|
|
468
471
|
minHeight?: string | number | undefined;
|
|
469
472
|
minWidth?: string | number | undefined;
|
|
473
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
470
474
|
class?: any;
|
|
471
475
|
theme?: string | undefined;
|
|
472
476
|
contentClass?: any;
|
|
473
|
-
activator?:
|
|
477
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
474
478
|
closeDelay?: string | number | undefined;
|
|
475
479
|
openDelay?: string | number | undefined;
|
|
476
480
|
openOnClick?: boolean | undefined;
|
|
@@ -512,6 +516,7 @@ declare const VSnackbar: {
|
|
|
512
516
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
513
517
|
}, {
|
|
514
518
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
519
|
+
target: vue.ComputedRef<HTMLElement | [x: number, y: number] | undefined>;
|
|
515
520
|
animateClick: () => void;
|
|
516
521
|
contentEl: vue.Ref<HTMLElement | undefined>;
|
|
517
522
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
@@ -613,10 +618,11 @@ declare const VSnackbar: {
|
|
|
613
618
|
maxWidth?: string | number | undefined;
|
|
614
619
|
minHeight?: string | number | undefined;
|
|
615
620
|
minWidth?: string | number | undefined;
|
|
621
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
616
622
|
class?: any;
|
|
617
623
|
theme?: string | undefined;
|
|
618
624
|
contentClass?: any;
|
|
619
|
-
activator?:
|
|
625
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
620
626
|
closeDelay?: string | number | undefined;
|
|
621
627
|
openDelay?: string | number | undefined;
|
|
622
628
|
openOnClick?: boolean | undefined;
|
|
@@ -658,12 +664,13 @@ declare const VSnackbar: {
|
|
|
658
664
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
659
665
|
} & vue.ShallowUnwrapRef<{
|
|
660
666
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
667
|
+
target: vue.ComputedRef<HTMLElement | [x: number, y: number] | undefined>;
|
|
661
668
|
animateClick: () => void;
|
|
662
669
|
contentEl: vue.Ref<HTMLElement | undefined>;
|
|
663
670
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
664
671
|
localTop: vue.ComputedRef<boolean>;
|
|
665
672
|
updateLocation: vue.Ref<((e: Event) => void) | undefined>;
|
|
666
|
-
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "class" | "onAfterLeave" | "$children" | "ref" | "ref_for" | "ref_key" | "theme" | "v-slot:default" | "v-slots" | "contentClass" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "persistent" | "scrim" | "_disableGlobalStack")>, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
673
|
+
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "target" | "class" | "onAfterLeave" | "$children" | "ref" | "ref_for" | "ref_key" | "theme" | "v-slot:default" | "v-slots" | "contentClass" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "persistent" | "scrim" | "_disableGlobalStack")>, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
667
674
|
'update:modelValue': (v: boolean) => boolean;
|
|
668
675
|
}, string, {
|
|
669
676
|
absolute: boolean;
|
|
@@ -759,11 +766,12 @@ declare const VSnackbar: {
|
|
|
759
766
|
minHeight?: string | number | undefined;
|
|
760
767
|
minWidth?: string | number | undefined;
|
|
761
768
|
position?: "fixed" | "absolute" | "static" | "relative" | "sticky" | undefined;
|
|
769
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
762
770
|
class?: any;
|
|
763
771
|
theme?: string | undefined;
|
|
764
772
|
contentClass?: any;
|
|
765
773
|
rounded?: string | number | boolean | undefined;
|
|
766
|
-
activator?:
|
|
774
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
767
775
|
closeDelay?: string | number | undefined;
|
|
768
776
|
openDelay?: string | number | undefined;
|
|
769
777
|
openOnClick?: boolean | undefined;
|
|
@@ -834,6 +842,7 @@ declare const VSnackbar: {
|
|
|
834
842
|
maxWidth?: string | number | undefined;
|
|
835
843
|
minHeight?: string | number | undefined;
|
|
836
844
|
minWidth?: string | number | undefined;
|
|
845
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
837
846
|
class?: any;
|
|
838
847
|
onAfterLeave?: (() => any) | undefined;
|
|
839
848
|
$children?: vue.VNodeChild | {
|
|
@@ -903,7 +912,7 @@ declare const VSnackbar: {
|
|
|
903
912
|
[key: string]: any;
|
|
904
913
|
}>) => void)[] | undefined;
|
|
905
914
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
906
|
-
activator?:
|
|
915
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
907
916
|
"v-slot:activator"?: false | ((arg: {
|
|
908
917
|
isActive: boolean;
|
|
909
918
|
props: Record<string, any>;
|
|
@@ -970,10 +979,11 @@ declare const VSnackbar: {
|
|
|
970
979
|
maxWidth?: string | number | undefined;
|
|
971
980
|
minHeight?: string | number | undefined;
|
|
972
981
|
minWidth?: string | number | undefined;
|
|
982
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
973
983
|
class?: any;
|
|
974
984
|
theme?: string | undefined;
|
|
975
985
|
contentClass?: any;
|
|
976
|
-
activator?:
|
|
986
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
977
987
|
closeDelay?: string | number | undefined;
|
|
978
988
|
openDelay?: string | number | undefined;
|
|
979
989
|
openOnClick?: boolean | undefined;
|
|
@@ -1015,6 +1025,7 @@ declare const VSnackbar: {
|
|
|
1015
1025
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1016
1026
|
}, {
|
|
1017
1027
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
1028
|
+
target: vue.ComputedRef<HTMLElement | [x: number, y: number] | undefined>;
|
|
1018
1029
|
animateClick: () => void;
|
|
1019
1030
|
contentEl: vue.Ref<HTMLElement | undefined>;
|
|
1020
1031
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
@@ -1116,10 +1127,11 @@ declare const VSnackbar: {
|
|
|
1116
1127
|
maxWidth?: string | number | undefined;
|
|
1117
1128
|
minHeight?: string | number | undefined;
|
|
1118
1129
|
minWidth?: string | number | undefined;
|
|
1130
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
1119
1131
|
class?: any;
|
|
1120
1132
|
theme?: string | undefined;
|
|
1121
1133
|
contentClass?: any;
|
|
1122
|
-
activator?:
|
|
1134
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
1123
1135
|
closeDelay?: string | number | undefined;
|
|
1124
1136
|
openDelay?: string | number | undefined;
|
|
1125
1137
|
openOnClick?: boolean | undefined;
|
|
@@ -1161,12 +1173,13 @@ declare const VSnackbar: {
|
|
|
1161
1173
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1162
1174
|
} & vue.ShallowUnwrapRef<{
|
|
1163
1175
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
1176
|
+
target: vue.ComputedRef<HTMLElement | [x: number, y: number] | undefined>;
|
|
1164
1177
|
animateClick: () => void;
|
|
1165
1178
|
contentEl: vue.Ref<HTMLElement | undefined>;
|
|
1166
1179
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
1167
1180
|
localTop: vue.ComputedRef<boolean>;
|
|
1168
1181
|
updateLocation: vue.Ref<((e: Event) => void) | undefined>;
|
|
1169
|
-
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "class" | "onAfterLeave" | "$children" | "ref" | "ref_for" | "ref_key" | "theme" | "v-slot:default" | "v-slots" | "contentClass" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "persistent" | "scrim" | "_disableGlobalStack")>, `$${any}`>> & {} & vue.ComponentCustomProperties & {};
|
|
1182
|
+
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "target" | "class" | "onAfterLeave" | "$children" | "ref" | "ref_for" | "ref_key" | "theme" | "v-slot:default" | "v-slots" | "contentClass" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "persistent" | "scrim" | "_disableGlobalStack")>, `$${any}`>> & {} & vue.ComponentCustomProperties & {};
|
|
1170
1183
|
__isFragment?: undefined;
|
|
1171
1184
|
__isTeleport?: undefined;
|
|
1172
1185
|
__isSuspense?: undefined;
|
|
@@ -1204,11 +1217,12 @@ declare const VSnackbar: {
|
|
|
1204
1217
|
minHeight?: string | number | undefined;
|
|
1205
1218
|
minWidth?: string | number | undefined;
|
|
1206
1219
|
position?: "fixed" | "absolute" | "static" | "relative" | "sticky" | undefined;
|
|
1220
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
1207
1221
|
class?: any;
|
|
1208
1222
|
theme?: string | undefined;
|
|
1209
1223
|
contentClass?: any;
|
|
1210
1224
|
rounded?: string | number | boolean | undefined;
|
|
1211
|
-
activator?:
|
|
1225
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
1212
1226
|
closeDelay?: string | number | undefined;
|
|
1213
1227
|
openDelay?: string | number | undefined;
|
|
1214
1228
|
openOnClick?: boolean | undefined;
|
|
@@ -1279,6 +1293,7 @@ declare const VSnackbar: {
|
|
|
1279
1293
|
maxWidth?: string | number | undefined;
|
|
1280
1294
|
minHeight?: string | number | undefined;
|
|
1281
1295
|
minWidth?: string | number | undefined;
|
|
1296
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
1282
1297
|
class?: any;
|
|
1283
1298
|
onAfterLeave?: (() => any) | undefined;
|
|
1284
1299
|
$children?: vue.VNodeChild | {
|
|
@@ -1348,7 +1363,7 @@ declare const VSnackbar: {
|
|
|
1348
1363
|
[key: string]: any;
|
|
1349
1364
|
}>) => void)[] | undefined;
|
|
1350
1365
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
1351
|
-
activator?:
|
|
1366
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
1352
1367
|
"v-slot:activator"?: false | ((arg: {
|
|
1353
1368
|
isActive: boolean;
|
|
1354
1369
|
props: Record<string, any>;
|
|
@@ -1415,10 +1430,11 @@ declare const VSnackbar: {
|
|
|
1415
1430
|
maxWidth?: string | number | undefined;
|
|
1416
1431
|
minHeight?: string | number | undefined;
|
|
1417
1432
|
minWidth?: string | number | undefined;
|
|
1433
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
1418
1434
|
class?: any;
|
|
1419
1435
|
theme?: string | undefined;
|
|
1420
1436
|
contentClass?: any;
|
|
1421
|
-
activator?:
|
|
1437
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
1422
1438
|
closeDelay?: string | number | undefined;
|
|
1423
1439
|
openDelay?: string | number | undefined;
|
|
1424
1440
|
openOnClick?: boolean | undefined;
|
|
@@ -1460,6 +1476,7 @@ declare const VSnackbar: {
|
|
|
1460
1476
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1461
1477
|
}, {
|
|
1462
1478
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
1479
|
+
target: vue.ComputedRef<HTMLElement | [x: number, y: number] | undefined>;
|
|
1463
1480
|
animateClick: () => void;
|
|
1464
1481
|
contentEl: vue.Ref<HTMLElement | undefined>;
|
|
1465
1482
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
@@ -1561,10 +1578,11 @@ declare const VSnackbar: {
|
|
|
1561
1578
|
maxWidth?: string | number | undefined;
|
|
1562
1579
|
minHeight?: string | number | undefined;
|
|
1563
1580
|
minWidth?: string | number | undefined;
|
|
1581
|
+
target?: Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined;
|
|
1564
1582
|
class?: any;
|
|
1565
1583
|
theme?: string | undefined;
|
|
1566
1584
|
contentClass?: any;
|
|
1567
|
-
activator?:
|
|
1585
|
+
activator?: Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined;
|
|
1568
1586
|
closeDelay?: string | number | undefined;
|
|
1569
1587
|
openDelay?: string | number | undefined;
|
|
1570
1588
|
openOnClick?: boolean | undefined;
|
|
@@ -1606,12 +1624,13 @@ declare const VSnackbar: {
|
|
|
1606
1624
|
"onClick:outside"?: ((e: MouseEvent) => any) | undefined;
|
|
1607
1625
|
} & vue.ShallowUnwrapRef<{
|
|
1608
1626
|
activatorEl: vue.Ref<HTMLElement | undefined>;
|
|
1627
|
+
target: vue.ComputedRef<HTMLElement | [x: number, y: number] | undefined>;
|
|
1609
1628
|
animateClick: () => void;
|
|
1610
1629
|
contentEl: vue.Ref<HTMLElement | undefined>;
|
|
1611
1630
|
globalTop: Readonly<vue.Ref<boolean>>;
|
|
1612
1631
|
localTop: vue.ComputedRef<boolean>;
|
|
1613
1632
|
updateLocation: vue.Ref<((e: Event) => void) | undefined>;
|
|
1614
|
-
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "class" | "onAfterLeave" | "$children" | "ref" | "ref_for" | "ref_key" | "theme" | "v-slot:default" | "v-slots" | "contentClass" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "persistent" | "scrim" | "_disableGlobalStack")>, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1633
|
+
}> & {} & vue.ComponentCustomProperties & {}, "offset" | "key" | "height" | "width" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "target" | "class" | "onAfterLeave" | "$children" | "ref" | "ref_for" | "ref_key" | "theme" | "v-slot:default" | "v-slots" | "contentClass" | "onVnodeBeforeMount" | "onVnodeMounted" | "onVnodeBeforeUpdate" | "onVnodeUpdated" | "onVnodeBeforeUnmount" | "onVnodeUnmounted" | "onUpdate:modelValue" | "activator" | "v-slot:activator" | "closeDelay" | "openDelay" | "contentProps" | "attach" | "onClick:outside" | ("absolute" | "location" | "origin" | "transition" | "zIndex" | "style" | "eager" | "disabled" | "modelValue" | "locationStrategy" | "scrollStrategy" | "activatorProps" | "openOnClick" | "openOnHover" | "openOnFocus" | "closeOnContentClick" | "closeOnBack" | "contained" | "noClickAnimation" | "persistent" | "scrim" | "_disableGlobalStack")>, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1615
1634
|
'update:modelValue': (v: boolean) => boolean;
|
|
1616
1635
|
}, string, {
|
|
1617
1636
|
absolute: boolean;
|
|
@@ -1692,13 +1711,14 @@ declare const VSnackbar: {
|
|
|
1692
1711
|
type: vue.PropType<vue.StyleValue>;
|
|
1693
1712
|
default: null;
|
|
1694
1713
|
};
|
|
1714
|
+
target: vue.PropType<Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined>;
|
|
1695
1715
|
eager: BooleanConstructor;
|
|
1696
1716
|
disabled: BooleanConstructor;
|
|
1697
1717
|
class: vue.PropType<any>;
|
|
1698
1718
|
theme: StringConstructor;
|
|
1699
1719
|
contentClass: null;
|
|
1700
1720
|
modelValue: BooleanConstructor;
|
|
1701
|
-
activator: vue.PropType<
|
|
1721
|
+
activator: vue.PropType<Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined>;
|
|
1702
1722
|
locationStrategy: {
|
|
1703
1723
|
type: vue.PropType<"connected" | "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
|
1704
1724
|
updateLocation: (e: Event) => void;
|
|
@@ -1788,13 +1808,14 @@ declare const VSnackbar: {
|
|
|
1788
1808
|
type: vue.PropType<vue.StyleValue>;
|
|
1789
1809
|
default: null;
|
|
1790
1810
|
};
|
|
1811
|
+
target: vue.PropType<Element | "cursor" | "parent" | (string & {}) | vue.ComponentPublicInstance | [x: number, y: number] | undefined>;
|
|
1791
1812
|
eager: BooleanConstructor;
|
|
1792
1813
|
disabled: BooleanConstructor;
|
|
1793
1814
|
class: vue.PropType<any>;
|
|
1794
1815
|
theme: StringConstructor;
|
|
1795
1816
|
contentClass: null;
|
|
1796
1817
|
modelValue: BooleanConstructor;
|
|
1797
|
-
activator: vue.PropType<
|
|
1818
|
+
activator: vue.PropType<Element | "parent" | (string & {}) | vue.ComponentPublicInstance | undefined>;
|
|
1798
1819
|
locationStrategy: {
|
|
1799
1820
|
type: vue.PropType<"connected" | "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
|
1800
1821
|
updateLocation: (e: Event) => void;
|
|
@@ -11,52 +11,56 @@
|
|
|
11
11
|
|
|
12
12
|
.v-switch__track,
|
|
13
13
|
.v-switch__thumb {
|
|
14
|
-
background-color: currentColor;
|
|
15
14
|
transition: none;
|
|
16
15
|
}
|
|
17
16
|
.v-selection-control--error:not(.v-selection-control--disabled) .v-switch__track,
|
|
18
17
|
.v-selection-control--error:not(.v-selection-control--disabled) .v-switch__thumb {
|
|
19
18
|
background-color: rgb(var(--v-theme-error));
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.v-selection-control--dirty .v-switch__thumb {
|
|
23
|
-
color: currentColor;
|
|
19
|
+
color: rgb(var(--v-theme-on-error));
|
|
24
20
|
}
|
|
25
21
|
|
|
26
22
|
.v-switch__track {
|
|
27
|
-
|
|
23
|
+
background-color: currentColor;
|
|
24
|
+
border-radius: 9999px;
|
|
28
25
|
height: 14px;
|
|
29
26
|
opacity: 0.6;
|
|
30
27
|
width: 36px;
|
|
31
28
|
cursor: pointer;
|
|
29
|
+
transition: 0.2s color cubic-bezier(0.4, 0, 0.2, 1);
|
|
32
30
|
}
|
|
33
31
|
.v-switch--inset .v-switch__track {
|
|
34
|
-
border-radius:
|
|
35
|
-
height:
|
|
36
|
-
width:
|
|
32
|
+
border-radius: 9999px;
|
|
33
|
+
height: 32px;
|
|
34
|
+
width: 52px;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
.v-switch__thumb {
|
|
40
38
|
align-items: center;
|
|
41
39
|
border-radius: 50%;
|
|
42
|
-
|
|
40
|
+
background: rgb(var(--v-theme-surface));
|
|
41
|
+
color: rgb(var(--v-theme-on-surface));
|
|
43
42
|
display: flex;
|
|
44
43
|
height: 20px;
|
|
45
44
|
justify-content: center;
|
|
46
45
|
width: 20px;
|
|
47
46
|
pointer-events: none;
|
|
48
|
-
transition: 0.15s transform cubic-bezier(0
|
|
47
|
+
transition: 0.15s 0.05s transform cubic-bezier(0, 0, 0.2, 1);
|
|
48
|
+
position: relative;
|
|
49
|
+
overflow: hidden;
|
|
49
50
|
box-shadow: 0px 2px 4px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 4px 5px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 10px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
|
|
50
51
|
}
|
|
51
52
|
.v-switch--inset .v-switch__thumb {
|
|
53
|
+
height: 24px;
|
|
54
|
+
width: 24px;
|
|
55
|
+
transform: scale(0.6666666667);
|
|
52
56
|
box-shadow: 0px 0px 0px 0px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
|
|
53
57
|
}
|
|
54
|
-
.v-switch
|
|
55
|
-
|
|
58
|
+
.v-switch--inset .v-switch__thumb--filled {
|
|
59
|
+
transform: none;
|
|
56
60
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
.v-switch--inset .v-selection-control--dirty .v-switch__thumb {
|
|
62
|
+
transform: none;
|
|
63
|
+
transition: 0.15s 0.05s transform cubic-bezier(0, 0, 0.2, 1);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
.v-switch .v-selection-control {
|
|
@@ -64,10 +68,13 @@
|
|
|
64
68
|
}
|
|
65
69
|
.v-switch .v-selection-control__input {
|
|
66
70
|
border-radius: 50%;
|
|
67
|
-
transition: 0.
|
|
71
|
+
transition: 0.2s transform cubic-bezier(0.4, 0, 0.2, 1);
|
|
68
72
|
transform: translateX(-10px);
|
|
69
73
|
position: absolute;
|
|
70
74
|
}
|
|
75
|
+
.v-switch .v-selection-control__input .v-icon {
|
|
76
|
+
position: absolute;
|
|
77
|
+
}
|
|
71
78
|
.v-switch .v-selection-control--dirty .v-selection-control__input {
|
|
72
79
|
transform: translateX(10px);
|
|
73
80
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
1
|
+
import { mergeProps as _mergeProps, Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
|
2
2
|
// Styles
|
|
3
3
|
import "./VSwitch.css";
|
|
4
4
|
|
|
5
5
|
// Components
|
|
6
|
+
import { VScaleTransition } from "../transitions/index.mjs";
|
|
7
|
+
import { VIcon } from "../VIcon/index.mjs";
|
|
6
8
|
import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
|
|
7
9
|
import { VProgressCircular } from "../VProgressCircular/index.mjs";
|
|
8
10
|
import { makeVSelectionControlProps, VSelectionControl } from "../VSelectionControl/VSelectionControl.mjs"; // Composables
|
|
@@ -46,6 +48,7 @@ export const VSwitch = genericComponent()({
|
|
|
46
48
|
focus,
|
|
47
49
|
blur
|
|
48
50
|
} = useFocus(props);
|
|
51
|
+
const control = ref();
|
|
49
52
|
const loaderColor = computed(() => {
|
|
50
53
|
return typeof props.loading === 'string' && props.loading !== '' ? props.loading : props.color;
|
|
51
54
|
});
|
|
@@ -56,16 +59,15 @@ export const VSwitch = genericComponent()({
|
|
|
56
59
|
indeterminate.value = false;
|
|
57
60
|
}
|
|
58
61
|
}
|
|
62
|
+
function onTrackClick(e) {
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
control.value?.input?.click();
|
|
66
|
+
}
|
|
59
67
|
useRender(() => {
|
|
60
|
-
const [
|
|
68
|
+
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
61
69
|
const [inputProps, _1] = VInput.filterProps(props);
|
|
62
70
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
|
63
|
-
const control = ref();
|
|
64
|
-
function onClick(e) {
|
|
65
|
-
e.stopPropagation();
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
control.value?.input?.click();
|
|
68
|
-
}
|
|
69
71
|
return _createVNode(VInput, _mergeProps({
|
|
70
72
|
"class": ['v-switch', {
|
|
71
73
|
'v-switch--inset': props.inset
|
|
@@ -73,7 +75,7 @@ export const VSwitch = genericComponent()({
|
|
|
73
75
|
'v-switch--indeterminate': indeterminate.value
|
|
74
76
|
}, loaderClasses.value, props.class],
|
|
75
77
|
"style": props.style
|
|
76
|
-
},
|
|
78
|
+
}, rootAttrs, inputProps, {
|
|
77
79
|
"id": id.value,
|
|
78
80
|
"focused": isFocused.value
|
|
79
81
|
}), {
|
|
@@ -103,29 +105,36 @@ export const VSwitch = genericComponent()({
|
|
|
103
105
|
...slots,
|
|
104
106
|
default: () => _createVNode("div", {
|
|
105
107
|
"class": "v-switch__track",
|
|
106
|
-
"onClick":
|
|
108
|
+
"onClick": onTrackClick
|
|
107
109
|
}, null),
|
|
108
110
|
input: _ref3 => {
|
|
109
111
|
let {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
inputNode,
|
|
113
|
+
icon
|
|
112
114
|
} = _ref3;
|
|
113
|
-
return _createVNode("div", {
|
|
114
|
-
"class": ['v-switch__thumb',
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
115
|
+
return _createVNode(_Fragment, null, [inputNode, _createVNode("div", {
|
|
116
|
+
"class": ['v-switch__thumb', {
|
|
117
|
+
'v-switch__thumb--filled': icon || props.loading
|
|
118
|
+
}]
|
|
119
|
+
}, [_createVNode(VScaleTransition, null, {
|
|
120
|
+
default: () => [!props.loading ? icon && _createVNode(VIcon, {
|
|
121
|
+
"key": icon,
|
|
122
|
+
"icon": icon,
|
|
123
|
+
"size": "x-small"
|
|
124
|
+
}, null) : _createVNode(LoaderSlot, {
|
|
125
|
+
"name": "v-switch",
|
|
126
|
+
"active": true,
|
|
127
|
+
"color": isValid.value === false ? undefined : loaderColor.value
|
|
128
|
+
}, {
|
|
129
|
+
default: slotProps => slots.loader ? slots.loader(slotProps) : _createVNode(VProgressCircular, {
|
|
130
|
+
"active": slotProps.isActive,
|
|
131
|
+
"color": slotProps.color,
|
|
132
|
+
"indeterminate": true,
|
|
133
|
+
"size": "16",
|
|
134
|
+
"width": "2"
|
|
135
|
+
}, null)
|
|
136
|
+
})]
|
|
137
|
+
})])]);
|
|
129
138
|
}
|
|
130
139
|
});
|
|
131
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSwitch.mjs","names":["makeVInputProps","VInput","VProgressCircular","makeVSelectionControlProps","VSelectionControl","useFocus","LoaderSlot","useLoader","useProxiedModel","computed","ref","filterInputAttrs","genericComponent","getUid","propsFactory","useRender","makeVSwitchProps","indeterminate","Boolean","inset","flat","loading","type","String","default","VSwitch","name","inheritAttrs","props","emits","focused","update:modelValue","val","setup","_ref","attrs","slots","model","loaderClasses","isFocused","focus","blur","loaderColor","color","uid","id","onChange","value","inputAttrs","controlAttrs","inputProps","_1","filterProps","controlProps","_2","control","onClick","e","stopPropagation","preventDefault","input","click","_createVNode","_mergeProps","class","style","_ref2","messagesId","isDisabled","isReadonly","isValid","$event","undefined","_ref3","textColorClasses","textColorStyles","slotProps","loader","isActive"],"sources":["../../../src/components/VSwitch/VSwitch.tsx"],"sourcesContent":["// Styles\nimport './VSwitch.sass'\n\n// Components\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VProgressCircular } from '@/components/VProgressCircular'\nimport { makeVSelectionControlProps, VSelectionControl } from '@/components/VSelectionControl/VSelectionControl'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { LoaderSlot, useLoader } from '@/composables/loader'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VSelectionControlSlots } from '@/components/VSelectionControl/VSelectionControl'\nimport type { LoaderSlotProps } from '@/composables/loader'\n\nexport type VSwitchSlots =\n & VInputSlots\n & VSelectionControlSlots\n & { loader: LoaderSlotProps }\n\nexport const makeVSwitchProps = propsFactory({\n indeterminate: Boolean,\n inset: Boolean,\n flat: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n\n ...makeVInputProps(),\n ...makeVSelectionControlProps(),\n}, 'VSwitch')\n\nexport const VSwitch = genericComponent<VSwitchSlots>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: makeVSwitchProps(),\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': () => true,\n 'update:indeterminate': (val: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const indeterminate = useProxiedModel(props, 'indeterminate')\n const model = useProxiedModel(props, 'modelValue')\n const { loaderClasses } = useLoader(props)\n const { isFocused, focus, blur } = useFocus(props)\n\n const loaderColor = computed(() => {\n return typeof props.loading === 'string' && props.loading !== ''\n ? props.loading\n : props.color\n })\n\n const uid = getUid()\n const id = computed(() => props.id || `switch-${uid}`)\n\n function onChange () {\n if (indeterminate.value) {\n indeterminate.value = false\n }\n }\n\n useRender(() => {\n const [inputAttrs, controlAttrs] = filterInputAttrs(attrs)\n const [inputProps, _1] = VInput.filterProps(props)\n const [controlProps, _2] = VSelectionControl.filterProps(props)\n const control = ref<VSelectionControl>()\n\n function onClick (e: Event) {\n e.stopPropagation()\n e.preventDefault()\n control.value?.input?.click()\n }\n\n return (\n <VInput\n class={[\n 'v-switch',\n { 'v-switch--inset': props.inset },\n { 'v-switch--indeterminate': indeterminate.value },\n loaderClasses.value,\n props.class,\n ]}\n style={ props.style }\n { ...inputAttrs }\n { ...inputProps }\n id={ id.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VSelectionControl\n ref={ control }\n { ...controlProps }\n v-model={ model.value }\n id={ id.value }\n aria-describedby={ messagesId.value }\n type=\"checkbox\"\n onUpdate:modelValue={ onChange }\n aria-checked={ indeterminate.value ? 'mixed' : undefined }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n onFocus={ focus }\n onBlur={ blur }\n { ...controlAttrs }\n >\n {{\n ...slots,\n default: () => (<div class=\"v-switch__track\" onClick={ onClick }></div>),\n input: ({ textColorClasses, textColorStyles }) => (\n <div\n class={[\n 'v-switch__thumb',\n textColorClasses.value,\n ]}\n style={ textColorStyles.value }\n >\n { props.loading && (\n <LoaderSlot\n name=\"v-switch\"\n active\n color={ isValid.value === false ? undefined : loaderColor.value }\n >\n { slotProps => (\n slots.loader\n ? slots.loader(slotProps)\n : (\n <VProgressCircular\n active={ slotProps.isActive }\n color={ slotProps.color }\n indeterminate\n size=\"16\"\n width=\"2\"\n />\n )\n )}\n </LoaderSlot>\n )}\n </div>\n ),\n }}\n </VSelectionControl>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VSwitch = InstanceType<typeof VSwitch>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,iBAAiB;AAAA,SACjBC,0BAA0B,EAAEC,iBAAiB,sDAEtD;AAAA,SACSC,QAAQ;AAAA,SACRC,UAAU,EAAEC,SAAS;AAAA,SACrBC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC1BC,gBAAgB,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,SAAS,gCAE5E;AAUA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,aAAa,EAAEC,OAAO;EACtBC,KAAK,EAAED,OAAO;EACdE,IAAI,EAAEF,OAAO;EACbG,OAAO,EAAE;IACPC,IAAI,EAAE,CAACJ,OAAO,EAAEK,MAAM,CAAC;IACvBC,OAAO,EAAE;EACX,CAAC;EAED,GAAGxB,eAAe,EAAE;EACpB,GAAGG,0BAA0B;AAC/B,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,MAAMsB,OAAO,GAAGb,gBAAgB,EAAgB,CAAC;EACtDc,IAAI,EAAE,SAAS;EAEfC,YAAY,EAAE,KAAK;EAEnBC,KAAK,EAAEZ,gBAAgB,EAAE;EAEzBa,KAAK,EAAE;IACL,gBAAgB,EAAGC,OAAgB,IAAK,IAAI;IAC5C,mBAAmB,EAAEC,CAAA,KAAM,IAAI;IAC/B,sBAAsB,EAAGC,GAAY,IAAK;EAC5C,CAAC;EAEDC,KAAKA,CAAEL,KAAK,EAAAM,IAAA,EAAoB;IAAA,IAAlB;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC5B,MAAMjB,aAAa,GAAGT,eAAe,CAAC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AAA,SACO4B,eAAe,CAAC5B;cAAK,IAE3BnB,KAAK,CAACP,OAAO,IAAAyC,YAAA,CAAAxD,UAAA;gBAAA,QAEN,UAAU;gBAAA;gBAAA,SAEPgE,OAAO,CAACvB,KAAK,KAAK,KAAK,GAAGyB,SAAS,GAAG9B,WAAW,CAACK;cAAK;gBAAAvB,OAAA,EAE7DoD,SAAS,IACTxC,KAAK,CAACyC,MAAM,GACRzC,KAAK,CAACyC,MAAM,CAACD,SAAS,CAAC,GAAAd,YAAA,CAAA5D,iBAAA;kBAAA,UAGV0E,SAAS,CAACE,QAAQ;kBAAA,SACnBF,SAAS,CAACjC,KAAK;kBAAA;kBAAA,QAElB,IAAI;kBAAA,SACH;gBAAG;cAGlB,EAEJ;YAAA;UAEJ;QAAA;MAGN;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VSwitch.mjs","names":["VScaleTransition","VIcon","makeVInputProps","VInput","VProgressCircular","makeVSelectionControlProps","VSelectionControl","useFocus","LoaderSlot","useLoader","useProxiedModel","computed","ref","filterInputAttrs","genericComponent","getUid","propsFactory","useRender","makeVSwitchProps","indeterminate","Boolean","inset","flat","loading","type","String","default","VSwitch","name","inheritAttrs","props","emits","focused","update:modelValue","val","setup","_ref","attrs","slots","model","loaderClasses","isFocused","focus","blur","control","loaderColor","color","uid","id","onChange","value","onTrackClick","e","stopPropagation","preventDefault","input","click","rootAttrs","controlAttrs","inputProps","_1","filterProps","controlProps","_2","_createVNode","_mergeProps","class","style","_ref2","messagesId","isDisabled","isReadonly","isValid","$event","undefined","_ref3","inputNode","icon","_Fragment","slotProps","loader","isActive"],"sources":["../../../src/components/VSwitch/VSwitch.tsx"],"sourcesContent":["// Styles\nimport './VSwitch.sass'\n\n// Components\nimport { VScaleTransition } from '@/components/transitions'\nimport { VIcon } from '@/components/VIcon'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VProgressCircular } from '@/components/VProgressCircular'\nimport { makeVSelectionControlProps, VSelectionControl } from '@/components/VSelectionControl/VSelectionControl'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { LoaderSlot, useLoader } from '@/composables/loader'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VSelectionControlSlots } from '@/components/VSelectionControl/VSelectionControl'\nimport type { LoaderSlotProps } from '@/composables/loader'\n\nexport type VSwitchSlots =\n & VInputSlots\n & VSelectionControlSlots\n & { loader: LoaderSlotProps }\n\nexport const makeVSwitchProps = propsFactory({\n indeterminate: Boolean,\n inset: Boolean,\n flat: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n\n ...makeVInputProps(),\n ...makeVSelectionControlProps(),\n}, 'VSwitch')\n\nexport const VSwitch = genericComponent<VSwitchSlots>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: makeVSwitchProps(),\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': () => true,\n 'update:indeterminate': (val: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const indeterminate = useProxiedModel(props, 'indeterminate')\n const model = useProxiedModel(props, 'modelValue')\n const { loaderClasses } = useLoader(props)\n const { isFocused, focus, blur } = useFocus(props)\n const control = ref<VSelectionControl>()\n\n const loaderColor = computed(() => {\n return typeof props.loading === 'string' && props.loading !== ''\n ? props.loading\n : props.color\n })\n\n const uid = getUid()\n const id = computed(() => props.id || `switch-${uid}`)\n\n function onChange () {\n if (indeterminate.value) {\n indeterminate.value = false\n }\n }\n function onTrackClick (e: Event) {\n e.stopPropagation()\n e.preventDefault()\n control.value?.input?.click()\n }\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const [inputProps, _1] = VInput.filterProps(props)\n const [controlProps, _2] = VSelectionControl.filterProps(props)\n\n return (\n <VInput\n class={[\n 'v-switch',\n { 'v-switch--inset': props.inset },\n { 'v-switch--indeterminate': indeterminate.value },\n loaderClasses.value,\n props.class,\n ]}\n style={ props.style }\n { ...rootAttrs }\n { ...inputProps }\n id={ id.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VSelectionControl\n ref={ control }\n { ...controlProps }\n v-model={ model.value }\n id={ id.value }\n aria-describedby={ messagesId.value }\n type=\"checkbox\"\n onUpdate:modelValue={ onChange }\n aria-checked={ indeterminate.value ? 'mixed' : undefined }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n onFocus={ focus }\n onBlur={ blur }\n { ...controlAttrs }\n >\n {{\n ...slots,\n default: () => (<div class=\"v-switch__track\" onClick={ onTrackClick }></div>),\n input: ({ inputNode, icon }) => (\n <>\n { inputNode }\n <div\n class={[\n 'v-switch__thumb',\n { 'v-switch__thumb--filled': icon || props.loading },\n ]}\n >\n <VScaleTransition>\n { !props.loading ? (\n icon && <VIcon key={ icon as any } icon={ icon } size=\"x-small\" />\n ) : (\n <LoaderSlot\n name=\"v-switch\"\n active\n color={ isValid.value === false ? undefined : loaderColor.value }\n >\n { slotProps => (\n slots.loader\n ? slots.loader(slotProps)\n : (\n <VProgressCircular\n active={ slotProps.isActive }\n color={ slotProps.color }\n indeterminate\n size=\"16\"\n width=\"2\"\n />\n )\n )}\n </LoaderSlot>\n )}\n </VScaleTransition>\n </div>\n </>\n ),\n }}\n </VSelectionControl>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VSwitch = InstanceType<typeof VSwitch>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB;AAAA,SAChBC,KAAK;AAAA,SACLC,eAAe,EAAEC,MAAM;AAAA,SACvBC,iBAAiB;AAAA,SACjBC,0BAA0B,EAAEC,iBAAiB,sDAEtD;A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Ab,YAAA,CAAAxD,UAAA;kBAAA,QAG3D,UAAU;kBAAA;kBAAA,SAEPgE,OAAO,CAACtB,KAAK,KAAK,KAAK,GAAGwB,SAAS,GAAG7B,WAAW,CAACK;gBAAK;kBAAAxB,OAAA,EAE7DqD,SAAS,IACTzC,KAAK,CAAC0C,MAAM,GACR1C,KAAK,CAAC0C,MAAM,CAACD,SAAS,CAAC,GAAAf,YAAA,CAAA5D,iBAAA;oBAAA,UAGZ2E,SAAS,CAACE,QAAQ;oBAAA,SACnBF,SAAS,CAACjC,KAAK;oBAAA;oBAAA,QAElB,IAAI;oBAAA,SACH;kBAAG;gBAGhB,EAEJ;cAAA;YAAA;UAIR;QAAA;MAGN;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -15,22 +15,20 @@
|
|
|
15
15
|
|
|
16
16
|
.v-switch__track,
|
|
17
17
|
.v-switch__thumb
|
|
18
|
-
background-color: currentColor
|
|
19
18
|
transition: none
|
|
20
19
|
|
|
21
20
|
.v-selection-control--error:not(.v-selection-control--disabled) &
|
|
22
21
|
background-color: $switch-error-background-color
|
|
23
|
-
|
|
24
|
-
.v-switch__thumb
|
|
25
|
-
.v-selection-control--dirty &
|
|
26
|
-
color: currentColor
|
|
22
|
+
color: $switch-error-color
|
|
27
23
|
|
|
28
24
|
.v-switch__track
|
|
25
|
+
background-color: currentColor
|
|
29
26
|
border-radius: $switch-track-radius
|
|
30
27
|
height: $switch-track-height
|
|
31
28
|
opacity: $switch-track-opacity
|
|
32
29
|
width: $switch-track-width
|
|
33
30
|
cursor: pointer
|
|
31
|
+
transition: $switch-track-transition
|
|
34
32
|
|
|
35
33
|
.v-switch--inset &
|
|
36
34
|
border-radius: $switch-inset-track-border-radius
|
|
@@ -40,24 +38,32 @@
|
|
|
40
38
|
.v-switch__thumb
|
|
41
39
|
align-items: center
|
|
42
40
|
border-radius: $switch-thumb-radius
|
|
43
|
-
|
|
41
|
+
background: $switch-thumb-background
|
|
42
|
+
color: $switch-thumb-color
|
|
44
43
|
display: flex
|
|
45
44
|
height: $switch-thumb-height
|
|
46
45
|
justify-content: center
|
|
47
46
|
width: $switch-thumb-width
|
|
48
47
|
pointer-events: none
|
|
49
|
-
transition:
|
|
48
|
+
transition: .15s .05s transform settings.$decelerated-easing
|
|
49
|
+
position: relative
|
|
50
|
+
overflow: hidden
|
|
50
51
|
|
|
51
52
|
@include tools.elevation($switch-thumb-elevation)
|
|
52
53
|
|
|
53
54
|
.v-switch--inset &
|
|
55
|
+
height: $switch-inset-thumb-height
|
|
56
|
+
width: $switch-inset-thumb-width
|
|
57
|
+
transform: scale(calc($switch-inset-thumb-off-height / $switch-inset-thumb-height))
|
|
58
|
+
|
|
54
59
|
@include tools.elevation(0)
|
|
55
60
|
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
&--filled
|
|
62
|
+
transform: none
|
|
58
63
|
|
|
59
|
-
.v-switch--
|
|
60
|
-
|
|
64
|
+
.v-switch--inset .v-selection-control--dirty &
|
|
65
|
+
transform: none
|
|
66
|
+
transition: .15s .05s transform settings.$decelerated-easing
|
|
61
67
|
|
|
62
68
|
.v-switch
|
|
63
69
|
$switch-thumb-transform: $switch-track-width * .5 - $switch-thumb-width * .5 + $switch-thumb-offset
|
|
@@ -71,6 +77,9 @@
|
|
|
71
77
|
transform: translateX(-$switch-thumb-transform)
|
|
72
78
|
position: absolute
|
|
73
79
|
|
|
80
|
+
.v-icon
|
|
81
|
+
position: absolute
|
|
82
|
+
|
|
74
83
|
.v-selection-control--dirty
|
|
75
84
|
.v-selection-control__input
|
|
76
85
|
transform: translateX($switch-thumb-transform)
|