vuetify 3.4.11 → 3.5.1

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.
Files changed (121) hide show
  1. package/dist/json/attributes.json +306 -214
  2. package/dist/json/importMap.json +122 -122
  3. package/dist/json/tags.json +23 -0
  4. package/dist/json/web-types.json +969 -643
  5. package/dist/vuetify-labs.css +3064 -2986
  6. package/dist/vuetify-labs.d.ts +6203 -970
  7. package/dist/vuetify-labs.esm.js +15387 -15144
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +15386 -15142
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +599 -523
  12. package/dist/vuetify.d.ts +6239 -1006
  13. package/dist/vuetify.esm.js +15387 -15144
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +15386 -15142
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +759 -727
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/blueprints/index.d.mts +11 -1
  21. package/lib/blueprints/md1.d.mts +11 -1
  22. package/lib/blueprints/md2.d.mts +11 -1
  23. package/lib/blueprints/md3.d.mts +11 -1
  24. package/lib/components/VAlert/VAlert.css +2 -2
  25. package/lib/components/VAlert/_variables.scss +2 -2
  26. package/lib/components/VAutocomplete/VAutocomplete.css +1 -1
  27. package/lib/components/VAutocomplete/VAutocomplete.mjs +6 -2
  28. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  29. package/lib/components/VAutocomplete/VAutocomplete.sass +1 -1
  30. package/lib/components/VAutocomplete/index.d.mts +1698 -0
  31. package/lib/components/VBanner/index.d.mts +4 -4
  32. package/lib/components/VCard/VCard.css +6 -2
  33. package/lib/components/VCard/VCard.sass +5 -0
  34. package/lib/components/VCard/VCardItem.mjs +23 -10
  35. package/lib/components/VCard/VCardItem.mjs.map +1 -1
  36. package/lib/components/VCard/_variables.scss +2 -2
  37. package/lib/components/VCarousel/index.d.mts +30 -9
  38. package/lib/components/VChipGroup/VChipGroup.css +3 -3
  39. package/lib/components/VChipGroup/VChipGroup.mjs +21 -16
  40. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  41. package/lib/components/VChipGroup/VChipGroup.sass +4 -3
  42. package/lib/components/VChipGroup/index.d.mts +118 -1
  43. package/lib/components/VCombobox/VCombobox.css +1 -1
  44. package/lib/components/VCombobox/VCombobox.mjs +9 -3
  45. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  46. package/lib/components/VCombobox/VCombobox.sass +1 -1
  47. package/lib/components/VCombobox/index.d.mts +1704 -0
  48. package/lib/components/VDataIterator/index.d.mts +1 -0
  49. package/lib/components/VDataTable/VDataTable.css +2 -1
  50. package/lib/components/VDataTable/VDataTable.mjs +2 -1
  51. package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
  52. package/lib/components/VDataTable/VDataTable.sass +2 -1
  53. package/lib/components/VDataTable/VDataTableHeaders.mjs +6 -2
  54. package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
  55. package/lib/components/VDataTable/VDataTableVirtual.mjs +4 -3
  56. package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
  57. package/lib/components/VDataTable/composables/headers.mjs +16 -12
  58. package/lib/components/VDataTable/composables/headers.mjs.map +1 -1
  59. package/lib/components/VDataTable/composables/sort.mjs +13 -3
  60. package/lib/components/VDataTable/composables/sort.mjs.map +1 -1
  61. package/lib/components/VDataTable/index.d.mts +86 -30
  62. package/lib/components/VDataTable/types.mjs.map +1 -1
  63. package/lib/components/VDatePicker/VDatePickerMonth.mjs +56 -11
  64. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  65. package/lib/components/VDatePicker/index.d.mts +34 -19
  66. package/lib/components/VFileInput/VFileInput.mjs +2 -2
  67. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  68. package/lib/components/VImg/VImg.css +3 -0
  69. package/lib/components/VImg/VImg.mjs +14 -3
  70. package/lib/components/VImg/VImg.mjs.map +1 -1
  71. package/lib/components/VImg/VImg.sass +3 -0
  72. package/lib/components/VImg/_variables.scss +3 -0
  73. package/lib/components/VImg/index.d.mts +21 -0
  74. package/lib/components/VList/VList.mjs +5 -1
  75. package/lib/components/VList/VList.mjs.map +1 -1
  76. package/lib/components/VList/index.d.mts +12 -0
  77. package/lib/components/VSelect/VSelect.mjs +5 -2
  78. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  79. package/lib/components/VSelect/index.d.mts +1689 -0
  80. package/lib/components/VSlideGroup/index.d.mts +7 -7
  81. package/lib/components/VSlider/VSliderTrack.css +1 -1
  82. package/lib/components/VSlider/VSliderTrack.sass +1 -1
  83. package/lib/components/VSlider/_variables.scss +1 -0
  84. package/lib/components/VSwitch/VSwitch.css +22 -2
  85. package/lib/components/VSwitch/VSwitch.mjs +26 -3
  86. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  87. package/lib/components/VSwitch/VSwitch.sass +20 -2
  88. package/lib/components/VSwitch/index.d.mts +37 -6
  89. package/lib/components/VSystemBar/VSystemBar.css +2 -2
  90. package/lib/components/VSystemBar/_variables.scss +2 -2
  91. package/lib/components/VTabs/index.d.mts +14 -14
  92. package/lib/components/VTimeline/VTimeline.css +1 -1
  93. package/lib/components/VTimeline/_variables.scss +1 -1
  94. package/lib/components/VToolbar/VToolbar.css +2 -2
  95. package/lib/components/VToolbar/_variables.scss +2 -2
  96. package/lib/components/VWindow/index.d.mts +7 -7
  97. package/lib/components/index.d.mts +6196 -985
  98. package/lib/composables/goto.mjs +105 -0
  99. package/lib/composables/goto.mjs.map +1 -0
  100. package/lib/composables/index.mjs +1 -0
  101. package/lib/composables/index.mjs.map +1 -1
  102. package/lib/composables/locale.mjs +1 -0
  103. package/lib/composables/locale.mjs.map +1 -1
  104. package/lib/composables/theme.mjs +2 -0
  105. package/lib/composables/theme.mjs.map +1 -1
  106. package/lib/entry-bundler.mjs +1 -1
  107. package/lib/entry-bundler.mjs.map +1 -1
  108. package/lib/framework.mjs +6 -2
  109. package/lib/framework.mjs.map +1 -1
  110. package/lib/index.d.mts +60 -38
  111. package/lib/labs/VCalendar/VCalendar.css +4 -2
  112. package/lib/labs/VCalendar/VCalendar.sass +4 -2
  113. package/lib/labs/VCalendar/_variables.scss +5 -0
  114. package/lib/locale/index.d.mts +124 -22
  115. package/lib/locale/index.mjs +1 -0
  116. package/lib/locale/index.mjs.map +1 -1
  117. package/lib/locale/km.mjs +101 -0
  118. package/lib/locale/km.mjs.map +1 -0
  119. package/lib/styles/main.css +48 -0
  120. package/lib/styles/settings/_utilities.scss +6 -0
  121. package/package.json +2 -2
@@ -90,9 +90,9 @@ declare const VSlideGroup: {
90
90
  multiple: boolean;
91
91
  tag: string;
92
92
  selectedClass: string;
93
+ centerActive: boolean;
93
94
  nextIcon: IconValue;
94
95
  prevIcon: IconValue;
95
- centerActive: boolean;
96
96
  } & {
97
97
  max?: number | undefined;
98
98
  class?: any;
@@ -114,9 +114,9 @@ declare const VSlideGroup: {
114
114
  multiple: boolean;
115
115
  tag: string;
116
116
  selectedClass: string;
117
+ centerActive: boolean;
117
118
  nextIcon: IconValue;
118
119
  prevIcon: IconValue;
119
- centerActive: boolean;
120
120
  } & {
121
121
  max?: number | undefined;
122
122
  class?: any;
@@ -131,9 +131,9 @@ declare const VSlideGroup: {
131
131
  multiple: boolean;
132
132
  tag: string;
133
133
  selectedClass: string;
134
+ centerActive: boolean;
134
135
  nextIcon: IconValue;
135
136
  prevIcon: IconValue;
136
- centerActive: boolean;
137
137
  }, true, {}, vue.SlotsType<Partial<{
138
138
  default: (arg: SlideGroupSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
139
139
  [key: string]: any;
@@ -159,9 +159,9 @@ declare const VSlideGroup: {
159
159
  multiple: boolean;
160
160
  tag: string;
161
161
  selectedClass: string;
162
+ centerActive: boolean;
162
163
  nextIcon: IconValue;
163
164
  prevIcon: IconValue;
164
- centerActive: boolean;
165
165
  } & {
166
166
  max?: number | undefined;
167
167
  class?: any;
@@ -181,9 +181,9 @@ declare const VSlideGroup: {
181
181
  multiple: boolean;
182
182
  tag: string;
183
183
  selectedClass: string;
184
+ centerActive: boolean;
184
185
  nextIcon: IconValue;
185
186
  prevIcon: IconValue;
186
- centerActive: boolean;
187
187
  }>;
188
188
  __isFragment?: undefined;
189
189
  __isTeleport?: undefined;
@@ -196,9 +196,9 @@ declare const VSlideGroup: {
196
196
  multiple: boolean;
197
197
  tag: string;
198
198
  selectedClass: string;
199
+ centerActive: boolean;
199
200
  nextIcon: IconValue;
200
201
  prevIcon: IconValue;
201
- centerActive: boolean;
202
202
  } & {
203
203
  max?: number | undefined;
204
204
  class?: any;
@@ -220,9 +220,9 @@ declare const VSlideGroup: {
220
220
  multiple: boolean;
221
221
  tag: string;
222
222
  selectedClass: string;
223
+ centerActive: boolean;
223
224
  nextIcon: IconValue;
224
225
  prevIcon: IconValue;
225
- centerActive: boolean;
226
226
  }, {}, string, vue.SlotsType<Partial<{
227
227
  default: (arg: SlideGroupSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
228
228
  [key: string]: any;
@@ -10,7 +10,7 @@
10
10
  background-color: rgb(var(--v-theme-surface-variant));
11
11
  }
12
12
  .v-slider-track__tick--filled {
13
- background-color: rgb(var(--v-theme-on-surface-variant));
13
+ background-color: rgb(var(--v-theme-surface-light));
14
14
  }
15
15
 
16
16
  .v-slider-track {
@@ -15,7 +15,7 @@
15
15
  background-color: rgb(var(--v-theme-surface-variant))
16
16
 
17
17
  &--filled
18
- background-color: rgb(var(--v-theme-on-surface-variant))
18
+ background-color: $slider-tick-background
19
19
 
20
20
  // Elements
21
21
  .v-slider-track
@@ -21,6 +21,7 @@ $slider-thumb-label-offset: calc(var(--v-slider-thumb-size) / 2) !default;
21
21
  $slider-thumb-label-transition: .2s settings.$accelerated-easing !default;
22
22
  $slider-thumb-label-padding: 6px !default;
23
23
  $slider-thumb-touch-size: 42px !default;
24
+ $slider-tick-background: rgb(var(--v-theme-surface-light)) !default;
24
25
  $slider-tick-border-radius: 2px !default;
25
26
  $slider-tick-label-margin-top: 8px !default;
26
27
  $slider-tick-label-margin-start: 12px !default;
@@ -23,25 +23,45 @@
23
23
  color: rgb(var(--v-theme-on-error));
24
24
  }
25
25
 
26
+ .v-switch__track-true {
27
+ margin-inline-end: auto;
28
+ }
29
+ .v-selection-control:not(.v-selection-control--dirty) .v-switch__track-true {
30
+ opacity: 0;
31
+ }
32
+
33
+ .v-switch__track-false {
34
+ margin-inline-start: auto;
35
+ }
36
+ .v-selection-control--dirty .v-switch__track-false {
37
+ opacity: 0;
38
+ }
39
+
26
40
  .v-switch__track {
41
+ display: inline-flex;
42
+ align-items: center;
43
+ font-size: 0.5rem;
44
+ padding: 0 5px;
27
45
  background-color: rgb(var(--v-theme-surface-variant));
28
46
  border-radius: 9999px;
29
47
  height: 14px;
30
48
  opacity: 0.6;
31
- width: 36px;
49
+ min-width: 36px;
32
50
  cursor: pointer;
33
51
  transition: 0.2s background-color cubic-bezier(0.4, 0, 0.2, 1);
34
52
  }
35
53
  .v-switch--inset .v-switch__track {
36
54
  border-radius: 9999px;
55
+ font-size: 0.75rem;
37
56
  height: 32px;
38
- width: 52px;
57
+ min-width: 52px;
39
58
  }
40
59
 
41
60
  .v-switch__thumb {
42
61
  align-items: center;
43
62
  border-radius: 50%;
44
63
  display: flex;
64
+ font-size: 0.75rem;
45
65
  height: 20px;
46
66
  justify-content: center;
47
67
  width: 20px;
@@ -4,6 +4,7 @@ import "./VSwitch.css";
4
4
 
5
5
  // Components
6
6
  import { VScaleTransition } from "../transitions/index.mjs";
7
+ import { VDefaultsProvider } from "../VDefaultsProvider/VDefaultsProvider.mjs";
7
8
  import { VIcon } from "../VIcon/index.mjs";
8
9
  import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
9
10
  import { VProgressCircular } from "../VProgressCircular/index.mjs";
@@ -90,6 +91,10 @@ export const VSwitch = genericComponent()({
90
91
  isReadonly,
91
92
  isValid
92
93
  } = _ref2;
94
+ const slotProps = {
95
+ model,
96
+ isValid
97
+ };
93
98
  return _createVNode(VSelectionControl, _mergeProps({
94
99
  "ref": control
95
100
  }, controlProps, {
@@ -114,7 +119,13 @@ export const VSwitch = genericComponent()({
114
119
  "class": ['v-switch__track', ...backgroundColorClasses.value],
115
120
  "style": backgroundColorStyles.value,
116
121
  "onClick": onTrackClick
117
- }, null);
122
+ }, [slots['track-true'] && _createVNode("div", {
123
+ "key": "prepend",
124
+ "class": "v-switch__track-true"
125
+ }, [slots['track-true'](slotProps)]), slots['track-false'] && _createVNode("div", {
126
+ "key": "append",
127
+ "class": "v-switch__track-false"
128
+ }, [slots['track-false'](slotProps)])]);
118
129
  },
119
130
  input: _ref4 => {
120
131
  let {
@@ -128,9 +139,21 @@ export const VSwitch = genericComponent()({
128
139
  'v-switch__thumb--filled': icon || props.loading
129
140
  }, props.inset ? undefined : backgroundColorClasses.value],
130
141
  "style": props.inset ? undefined : backgroundColorStyles.value
131
- }, [_createVNode(VScaleTransition, null, {
142
+ }, [slots.thumb ? _createVNode(VDefaultsProvider, {
143
+ "defaults": {
144
+ VIcon: {
145
+ icon,
146
+ size: 'x-small'
147
+ }
148
+ }
149
+ }, {
150
+ default: () => [slots.thumb({
151
+ ...slotProps,
152
+ icon
153
+ })]
154
+ }) : _createVNode(VScaleTransition, null, {
132
155
  default: () => [!props.loading ? icon && _createVNode(VIcon, {
133
- "key": icon,
156
+ "key": String(icon),
134
157
  "icon": icon,
135
158
  "size": "x-small"
136
159
  }, null) : _createVNode(LoaderSlot, {
@@ -1 +1 @@
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","value","setup","_ref","attrs","slots","model","loaderClasses","isFocused","focus","blur","control","loaderColor","color","uid","id","onChange","onTrackClick","e","stopPropagation","preventDefault","input","click","rootAttrs","controlAttrs","inputProps","filterProps","controlProps","_createVNode","_mergeProps","class","$event","style","_ref2","messagesId","isDisabled","isReadonly","isValid","undefined","_ref3","backgroundColorClasses","backgroundColorStyles","_ref4","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'\nimport type { GenericProps } from '@/util'\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<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VSwitchSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: makeVSwitchProps(),\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (value: any) => true,\n 'update:indeterminate': (value: 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 = VInput.filterProps(props)\n const controlProps = 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 { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n focused={ isFocused.value }\n style={ props.style }\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: ({ backgroundColorClasses, backgroundColorStyles }) => (\n <div\n class={[\n 'v-switch__track',\n ...backgroundColorClasses.value,\n ]}\n style={ backgroundColorStyles.value }\n onClick={ onTrackClick }\n ></div>\n ),\n input: ({ inputNode, icon, backgroundColorClasses, backgroundColorStyles }) => (\n <>\n { inputNode }\n <div\n class={[\n 'v-switch__thumb',\n { 'v-switch__thumb--filled': icon || props.loading },\n props.inset ? undefined : backgroundColorClasses.value,\n ]}\n style={ props.inset ? undefined : backgroundColorStyles.value }\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;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;AAWA,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,CAAC,CAAC;EACpB,GA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CAACpC,KAAK,KAAK,KAAK,GAAGqC,SAAS,GAAG1B,WAAW,CAACX;gBAAK;kBAAAP,OAAA,EAE7DoD,SAAS,IACTzC,KAAK,CAAC0C,MAAM,GACR1C,KAAK,CAAC0C,MAAM,CAACD,SAAS,CAAC,GAAAlB,YAAA,CAAAxD,iBAAA;oBAAA,UAGZ0E,SAAS,CAACE,QAAQ;oBAAA,SACnBF,SAAS,CAACjC,KAAK;oBAAA;oBAAA;oBAAA;kBAAA;gBAM9B,EAEJ;cAAA;YAAA;UAIR;QAAA;MAGN;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VSwitch.mjs","names":["VScaleTransition","VDefaultsProvider","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","value","setup","_ref","attrs","slots","model","loaderClasses","isFocused","focus","blur","control","loaderColor","color","uid","id","onChange","onTrackClick","e","stopPropagation","preventDefault","input","click","rootAttrs","controlAttrs","inputProps","filterProps","controlProps","_createVNode","_mergeProps","class","$event","style","_ref2","messagesId","isDisabled","isReadonly","isValid","slotProps","undefined","_ref3","backgroundColorClasses","backgroundColorStyles","_ref4","inputNode","icon","_Fragment","thumb","size","loader","isActive"],"sources":["../../../src/components/VSwitch/VSwitch.tsx"],"sourcesContent":["// Styles\nimport './VSwitch.sass'\n\n// Components\nimport { VScaleTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\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 { ComputedRef, Ref } from 'vue'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VSelectionControlSlots } from '@/components/VSelectionControl/VSelectionControl'\nimport type { IconValue } from '@/composables/icons'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { GenericProps } from '@/util'\n\nexport type VSwitchSlot = {\n model: Ref<boolean>\n isValid: ComputedRef<boolean | null>\n}\n\nexport type VSwitchSlots =\n & VInputSlots\n & VSelectionControlSlots\n & {\n loader: LoaderSlotProps\n thumb: { icon: IconValue | undefined } & VSwitchSlot\n 'track-false': VSwitchSlot\n 'track-true': VSwitchSlot\n }\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<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VSwitchSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: makeVSwitchProps(),\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (value: any) => true,\n 'update:indeterminate': (value: 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 = VInput.filterProps(props)\n const controlProps = 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 { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n focused={ isFocused.value }\n style={ props.style }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => {\n const slotProps = {\n model,\n isValid,\n }\n\n return (\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: ({ backgroundColorClasses, backgroundColorStyles }) => (\n <div\n class={[\n 'v-switch__track',\n ...backgroundColorClasses.value,\n ]}\n style={ backgroundColorStyles.value }\n onClick={ onTrackClick }\n >\n { slots['track-true'] && (\n <div key=\"prepend\" class=\"v-switch__track-true\">\n { slots['track-true'](slotProps) }\n </div>\n )}\n\n { slots['track-false'] && (\n <div key=\"append\" class=\"v-switch__track-false\">\n { slots['track-false'](slotProps) }\n </div>\n )}\n </div>\n ),\n input: ({ inputNode, icon, backgroundColorClasses, backgroundColorStyles }) => (\n <>\n { inputNode }\n <div\n class={[\n 'v-switch__thumb',\n { 'v-switch__thumb--filled': icon || props.loading },\n props.inset ? undefined : backgroundColorClasses.value,\n ]}\n style={ props.inset ? undefined : backgroundColorStyles.value }\n >\n { slots.thumb ? (\n <VDefaultsProvider\n defaults={{\n VIcon: {\n icon,\n size: 'x-small',\n },\n }}\n >\n { slots.thumb({ ...slotProps, icon }) }\n </VDefaultsProvider>\n ) : (\n <VScaleTransition>\n { !props.loading ? (\n (icon && (\n <VIcon\n key={ String(icon) }\n icon={ icon }\n size=\"x-small\"\n />\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 )}\n </div>\n </>\n ),\n }}\n </VSelectionControl>\n )\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,iBAAiB;AAAA,SACjBC,KAAK;AAAA,SACLC,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;AAuBA,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,e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,CACvD;gBAAA,SACOH,KAAK,CAACT,KAAK,GAAGkD,SAAS,GAAGG,qBAAqB,CAACzC;cAAK,IAE3DI,KAAK,CAAC0C,KAAK,GAAAnB,YAAA,CAAA5D,iBAAA;gBAAA,YAEC;kBACRC,KAAK,EAAE;oBACL4E,IAAI;oBACJG,IAAI,EAAE;kBACR;gBACF;cAAC;gBAAAtD,OAAA,EAAAA,CAAA,MAECW,KAAK,CAAC0C,KAAK,CAAC;kBAAE,GAAGT,SAAS;kBAAEO;gBAAK,CAAC,CAAC;cAAA,KAAAjB,YAAA,CAAA7D,gBAAA;gBAAA2B,OAAA,EAAAA,CAAA,MAInC,CAACI,KAAK,CAACP,OAAO,GACbsD,IAAI,IAAAjB,YAAA,CAAA3D,KAAA;kBAAA,OAEKwB,MAAM,CAACoD,IAAI,CAAC;kBAAA,QACXA,IAAI;kBAAA;gBAAA,QAGd,GAAAjB,YAAA,CAAApD,UAAA;kBAAA;kBAAA;kBAAA,SAIS6D,OAAO,CAACpC,KAAK,KAAK,KAAK,GAAGsC,SAAS,GAAG3B,WAAW,CAACX;gBAAK;kBAAAP,OAAA,EAE7D4C,SAAS,IACTjC,KAAK,CAAC4C,MAAM,GACR5C,KAAK,CAAC4C,MAAM,CAACX,SAAS,CAAC,GAAAV,YAAA,CAAAxD,iBAAA;oBAAA,UAGZkE,SAAS,CAACY,QAAQ;oBAAA,SACnBZ,SAAS,CAACzB,KAAK;oBAAA;oBAAA;oBAAA;kBAAA;gBAM9B,EAEJ;cAAA,EAEJ;YAAA;UAGN;QAIT;MAAC;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
@@ -25,24 +25,42 @@
25
25
  background-color: $switch-error-background-color
26
26
  color: $switch-error-color
27
27
 
28
+ .v-switch__track-true
29
+ margin-inline-end: auto
30
+
31
+ .v-selection-control:not(.v-selection-control--dirty) &
32
+ opacity: 0
33
+
34
+ .v-switch__track-false
35
+ margin-inline-start: auto
36
+
37
+ .v-selection-control--dirty &
38
+ opacity: 0
39
+
28
40
  .v-switch__track
41
+ display: inline-flex
42
+ align-items: center
43
+ font-size: .5rem
44
+ padding: 0 5px
29
45
  background-color: $switch-track-background
30
46
  border-radius: $switch-track-radius
31
47
  height: $switch-track-height
32
48
  opacity: $switch-track-opacity
33
- width: $switch-track-width
49
+ min-width: $switch-track-width
34
50
  cursor: pointer
35
51
  transition: $switch-track-transition
36
52
 
37
53
  .v-switch--inset &
38
54
  border-radius: $switch-inset-track-border-radius
55
+ font-size: .75rem
39
56
  height: $switch-inset-track-height
40
- width: $switch-inset-track-width
57
+ min-width: $switch-inset-track-width
41
58
 
42
59
  .v-switch__thumb
43
60
  align-items: center
44
61
  border-radius: $switch-thumb-radius
45
62
  display: flex
63
+ font-size: .75rem
46
64
  height: $switch-thumb-height
47
65
  justify-content: center
48
66
  width: $switch-thumb-width
@@ -96,8 +96,17 @@ interface LoaderSlotProps {
96
96
  isActive: boolean;
97
97
  }
98
98
 
99
+ type VSwitchSlot = {
100
+ model: Ref<boolean>;
101
+ isValid: ComputedRef<boolean | null>;
102
+ };
99
103
  type VSwitchSlots = VInputSlots & VSelectionControlSlots & {
100
104
  loader: LoaderSlotProps;
105
+ thumb: {
106
+ icon: IconValue | undefined;
107
+ } & VSwitchSlot;
108
+ 'track-false': VSwitchSlot;
109
+ 'track-true': VSwitchSlot;
101
110
  };
102
111
  declare const VSwitch: {
103
112
  new (...args: any[]): vue.CreateComponentPublicInstance<{
@@ -154,7 +163,7 @@ declare const VSwitch: {
154
163
  'update:focused': (focused: boolean) => boolean;
155
164
  'update:modelValue': (value: any) => boolean;
156
165
  'update:indeterminate': (value: boolean) => boolean;
157
- }, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
166
+ }, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details" | "v-slot:thumb" | "v-slot:track-false" | "v-slot:track-true">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
158
167
  flat: boolean;
159
168
  inline: boolean;
160
169
  error: boolean;
@@ -229,8 +238,8 @@ declare const VSwitch: {
229
238
  persistentHint: boolean;
230
239
  }, true, {}, vue.SlotsType<Partial<{
231
240
  default: (arg: VInputSlot & {
232
- backgroundColorClasses: vue.Ref<string[]>;
233
- backgroundColorStyles: vue.Ref<vue.CSSProperties>;
241
+ backgroundColorClasses: Ref<string[]>;
242
+ backgroundColorStyles: Ref<vue.CSSProperties>;
234
243
  }) => vue.VNode<vue.RendererNode, vue.RendererElement, {
235
244
  [key: string]: any;
236
245
  }>[];
@@ -258,6 +267,17 @@ declare const VSwitch: {
258
267
  loader: (arg: LoaderSlotProps) => vue.VNode<vue.RendererNode, vue.RendererElement, {
259
268
  [key: string]: any;
260
269
  }>[];
270
+ thumb: (arg: {
271
+ icon: IconValue | undefined;
272
+ } & VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
273
+ [key: string]: any;
274
+ }>[];
275
+ 'track-false': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
276
+ [key: string]: any;
277
+ }>[];
278
+ 'track-true': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
279
+ [key: string]: any;
280
+ }>[];
261
281
  }>>, {
262
282
  P: {};
263
283
  B: {};
@@ -396,7 +416,7 @@ declare const VSwitch: {
396
416
  'update:focused': (focused: boolean) => boolean;
397
417
  'update:modelValue': (value: any) => boolean;
398
418
  'update:indeterminate': (value: boolean) => boolean;
399
- }, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details">, string, {
419
+ }, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details" | "v-slot:thumb" | "v-slot:track-false" | "v-slot:track-true">, string, {
400
420
  flat: boolean;
401
421
  inline: boolean;
402
422
  error: boolean;
@@ -421,8 +441,8 @@ declare const VSwitch: {
421
441
  persistentHint: boolean;
422
442
  }, {}, string, vue.SlotsType<Partial<{
423
443
  default: (arg: VInputSlot & {
424
- backgroundColorClasses: vue.Ref<string[]>;
425
- backgroundColorStyles: vue.Ref<vue.CSSProperties>;
444
+ backgroundColorClasses: Ref<string[]>;
445
+ backgroundColorStyles: Ref<vue.CSSProperties>;
426
446
  }) => vue.VNode<vue.RendererNode, vue.RendererElement, {
427
447
  [key: string]: any;
428
448
  }>[];
@@ -450,6 +470,17 @@ declare const VSwitch: {
450
470
  loader: (arg: LoaderSlotProps) => vue.VNode<vue.RendererNode, vue.RendererElement, {
451
471
  [key: string]: any;
452
472
  }>[];
473
+ thumb: (arg: {
474
+ icon: IconValue | undefined;
475
+ } & VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
476
+ [key: string]: any;
477
+ }>[];
478
+ 'track-false': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
479
+ [key: string]: any;
480
+ }>[];
481
+ 'track-true': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
482
+ [key: string]: any;
483
+ }>[];
453
484
  }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T>(props: {
454
485
  modelValue?: T | null | undefined;
455
486
  'onUpdate:modelValue'?: ((value: T | null) => void) | undefined;
@@ -10,8 +10,8 @@
10
10
  text-align: end;
11
11
  width: 100%;
12
12
  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-ambient-opacity, rgba(0, 0, 0, 0.12));
13
- background: rgba(var(--v-theme-on-surface-variant));
14
- color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity));
13
+ background: rgba(var(--v-theme-surface-light));
14
+ color: rgba(var(--v-theme-on-surface-light), var(--v-high-emphasis-opacity));
15
15
  font-size: 0.75rem;
16
16
  font-weight: 400;
17
17
  letter-spacing: 0.0333333333em;
@@ -3,9 +3,9 @@
3
3
  @use '../../styles/tools';
4
4
 
5
5
  // VSystemBar
6
- $system-bar-background: rgba(var(--v-theme-on-surface-variant)) !default;
6
+ $system-bar-background: rgba(var(--v-theme-surface-light)) !default;
7
7
  $system-bar-border-radius: map.get(settings.$rounded, 0) !default;
8
- $system-bar-color: rgba(var(--v-theme-on-surface), var(--v-medium-emphasis-opacity)) !default;
8
+ $system-bar-color: rgba(var(--v-theme-on-surface-light), var(--v-high-emphasis-opacity)) !default;
9
9
  $system-bar-elevation: 0 !default;
10
10
  $system-bar-flex: 1 1 auto !default;
11
11
  $system-bar-font-size: tools.map-deep-get(settings.$typography, 'caption', 'size') !default;
@@ -69,10 +69,10 @@ declare const VTabs: {
69
69
  density: Density;
70
70
  selectedClass: string;
71
71
  stacked: boolean;
72
- grow: boolean;
72
+ centerActive: boolean;
73
73
  nextIcon: IconValue;
74
74
  prevIcon: IconValue;
75
- centerActive: boolean;
75
+ grow: boolean;
76
76
  hideSlider: boolean;
77
77
  alignTabs: "center" | "end" | "start" | "title";
78
78
  fixedTabs: boolean;
@@ -111,10 +111,10 @@ declare const VTabs: {
111
111
  density: Density;
112
112
  selectedClass: string;
113
113
  stacked: boolean;
114
- grow: boolean;
114
+ centerActive: boolean;
115
115
  nextIcon: IconValue;
116
116
  prevIcon: IconValue;
117
- centerActive: boolean;
117
+ grow: boolean;
118
118
  hideSlider: boolean;
119
119
  alignTabs: "center" | "end" | "start" | "title";
120
120
  fixedTabs: boolean;
@@ -153,10 +153,10 @@ declare const VTabs: {
153
153
  modelValue: any;
154
154
  selectedClass: string;
155
155
  stacked: boolean;
156
- grow: boolean;
156
+ centerActive: boolean;
157
157
  nextIcon: IconValue;
158
158
  prevIcon: IconValue;
159
- centerActive: boolean;
159
+ grow: boolean;
160
160
  hideSlider: boolean;
161
161
  alignTabs: "center" | "end" | "start" | "title";
162
162
  fixedTabs: boolean;
@@ -183,10 +183,10 @@ declare const VTabs: {
183
183
  density: Density;
184
184
  selectedClass: string;
185
185
  stacked: boolean;
186
- grow: boolean;
186
+ centerActive: boolean;
187
187
  nextIcon: IconValue;
188
188
  prevIcon: IconValue;
189
- centerActive: boolean;
189
+ grow: boolean;
190
190
  hideSlider: boolean;
191
191
  alignTabs: "center" | "end" | "start" | "title";
192
192
  fixedTabs: boolean;
@@ -225,10 +225,10 @@ declare const VTabs: {
225
225
  modelValue: any;
226
226
  selectedClass: string;
227
227
  stacked: boolean;
228
- grow: boolean;
228
+ centerActive: boolean;
229
229
  nextIcon: IconValue;
230
230
  prevIcon: IconValue;
231
- centerActive: boolean;
231
+ grow: boolean;
232
232
  hideSlider: boolean;
233
233
  alignTabs: "center" | "end" | "start" | "title";
234
234
  fixedTabs: boolean;
@@ -248,10 +248,10 @@ declare const VTabs: {
248
248
  density: Density;
249
249
  selectedClass: string;
250
250
  stacked: boolean;
251
- grow: boolean;
251
+ centerActive: boolean;
252
252
  nextIcon: IconValue;
253
253
  prevIcon: IconValue;
254
- centerActive: boolean;
254
+ grow: boolean;
255
255
  hideSlider: boolean;
256
256
  alignTabs: "center" | "end" | "start" | "title";
257
257
  fixedTabs: boolean;
@@ -292,10 +292,10 @@ declare const VTabs: {
292
292
  modelValue: any;
293
293
  selectedClass: string;
294
294
  stacked: boolean;
295
- grow: boolean;
295
+ centerActive: boolean;
296
296
  nextIcon: IconValue;
297
297
  prevIcon: IconValue;
298
- centerActive: boolean;
298
+ grow: boolean;
299
299
  hideSlider: boolean;
300
300
  alignTabs: "center" | "end" | "start" | "title";
301
301
  fixedTabs: boolean;
@@ -1,5 +1,5 @@
1
1
  .v-timeline .v-timeline-divider__dot {
2
- background: rgb(var(--v-theme-on-surface-variant));
2
+ background: rgb(var(--v-theme-surface-light));
3
3
  }
4
4
  .v-timeline .v-timeline-divider__inner-dot {
5
5
  background: rgb(var(--v-theme-on-surface));
@@ -6,7 +6,7 @@ $timeline-density-comfortable-grid-template-start: auto min-content min-content
6
6
  $timeline-density-compact-grid-template-end: 0 min-content auto !default;
7
7
  $timeline-density-compact-grid-template-start: auto min-content 0 !default;
8
8
  $timeline-dot-border-radius: 50% !default;
9
- $timeline-dot-divider-background: rgb(var(--v-theme-on-surface-variant)) !default;
9
+ $timeline-dot-divider-background: rgb(var(--v-theme-surface-light)) !default;
10
10
  $timeline-dot-size: 38px !default;
11
11
  $timeline-inner-dot-divider-background: rgb(var(--v-theme-on-surface)) !default;
12
12
  $timeline-inset-divider-line: var(--v-timeline-line-inset) !default;
@@ -15,8 +15,8 @@
15
15
  border-width: 0;
16
16
  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-ambient-opacity, rgba(0, 0, 0, 0.12));
17
17
  border-radius: 0;
18
- background: rgb(var(--v-theme-on-surface-variant));
19
- color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
18
+ background: rgb(var(--v-theme-surface-light));
19
+ color: rgba(var(--v-theme-on-surface-light), var(--v-high-emphasis-opacity));
20
20
  }
21
21
  .v-toolbar--border {
22
22
  border-width: thin;
@@ -4,8 +4,8 @@
4
4
  @use "../../styles/tools/functions";
5
5
 
6
6
  // VToolbar
7
- $toolbar-background: rgb(var(--v-theme-on-surface-variant)) !default;
8
- $toolbar-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !default;
7
+ $toolbar-background: rgb(var(--v-theme-surface-light)) !default;
8
+ $toolbar-color: rgba(var(--v-theme-on-surface-light), var(--v-high-emphasis-opacity)) !default;
9
9
  $toolbar-border-color: settings.$border-color-root !default;
10
10
  $toolbar-border-radius: map.get(settings.$rounded, 0) !default;
11
11
  $toolbar-border-style: settings.$border-style-root !default;
@@ -121,9 +121,9 @@ declare const VWindow: {
121
121
  tag: string;
122
122
  mandatory: boolean | "force";
123
123
  selectedClass: string;
124
- continuous: boolean;
125
124
  nextIcon: IconValue;
126
125
  prevIcon: IconValue;
126
+ continuous: boolean;
127
127
  } & {
128
128
  class?: any;
129
129
  touch?: boolean | TouchHandlers | undefined;
@@ -141,9 +141,9 @@ declare const VWindow: {
141
141
  tag: string;
142
142
  mandatory: boolean | "force";
143
143
  selectedClass: string;
144
- continuous: boolean;
145
144
  nextIcon: IconValue;
146
145
  prevIcon: IconValue;
146
+ continuous: boolean;
147
147
  } & {
148
148
  class?: any;
149
149
  touch?: boolean | TouchHandlers | undefined;
@@ -158,9 +158,9 @@ declare const VWindow: {
158
158
  mandatory: boolean | "force";
159
159
  touch: boolean | TouchHandlers;
160
160
  selectedClass: string;
161
- continuous: boolean;
162
161
  nextIcon: IconValue;
163
162
  prevIcon: IconValue;
163
+ continuous: boolean;
164
164
  }, true, {}, vue.SlotsType<Partial<{
165
165
  default: (arg: {
166
166
  group: GroupProvide;
@@ -197,9 +197,9 @@ declare const VWindow: {
197
197
  tag: string;
198
198
  mandatory: boolean | "force";
199
199
  selectedClass: string;
200
- continuous: boolean;
201
200
  nextIcon: IconValue;
202
201
  prevIcon: IconValue;
202
+ continuous: boolean;
203
203
  } & {
204
204
  class?: any;
205
205
  touch?: boolean | TouchHandlers | undefined;
@@ -216,9 +216,9 @@ declare const VWindow: {
216
216
  mandatory: boolean | "force";
217
217
  touch: boolean | TouchHandlers;
218
218
  selectedClass: string;
219
- continuous: boolean;
220
219
  nextIcon: IconValue;
221
220
  prevIcon: IconValue;
221
+ continuous: boolean;
222
222
  }>;
223
223
  __isFragment?: undefined;
224
224
  __isTeleport?: undefined;
@@ -231,9 +231,9 @@ declare const VWindow: {
231
231
  tag: string;
232
232
  mandatory: boolean | "force";
233
233
  selectedClass: string;
234
- continuous: boolean;
235
234
  nextIcon: IconValue;
236
235
  prevIcon: IconValue;
236
+ continuous: boolean;
237
237
  } & {
238
238
  class?: any;
239
239
  touch?: boolean | TouchHandlers | undefined;
@@ -252,9 +252,9 @@ declare const VWindow: {
252
252
  mandatory: boolean | "force";
253
253
  touch: boolean | TouchHandlers;
254
254
  selectedClass: string;
255
- continuous: boolean;
256
255
  nextIcon: IconValue;
257
256
  prevIcon: IconValue;
257
+ continuous: boolean;
258
258
  }, {}, string, vue.SlotsType<Partial<{
259
259
  default: (arg: {
260
260
  group: GroupProvide;