@vuetify/nightly 3.9.2-master.2025-07-29 → 3.9.3-dev.2025-07-30

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 (60) hide show
  1. package/CHANGELOG.md +6 -62
  2. package/dist/json/attributes.json +4301 -4281
  3. package/dist/json/importMap-labs.json +26 -26
  4. package/dist/json/importMap.json +188 -188
  5. package/dist/json/tags.json +5 -0
  6. package/dist/json/web-types.json +7597 -7527
  7. package/dist/vuetify-labs.cjs +228 -33
  8. package/dist/vuetify-labs.css +5466 -5464
  9. package/dist/vuetify-labs.d.ts +134 -71
  10. package/dist/vuetify-labs.esm.js +228 -33
  11. package/dist/vuetify-labs.esm.js.map +1 -1
  12. package/dist/vuetify-labs.js +228 -33
  13. package/dist/vuetify-labs.min.css +2 -2
  14. package/dist/vuetify.cjs +190 -24
  15. package/dist/vuetify.cjs.map +1 -1
  16. package/dist/vuetify.css +5163 -5161
  17. package/dist/vuetify.d.ts +124 -71
  18. package/dist/vuetify.esm.js +190 -24
  19. package/dist/vuetify.esm.js.map +1 -1
  20. package/dist/vuetify.js +190 -24
  21. package/dist/vuetify.js.map +1 -1
  22. package/dist/vuetify.min.css +2 -2
  23. package/dist/vuetify.min.js +731 -708
  24. package/dist/vuetify.min.js.map +1 -1
  25. package/lib/components/VAutocomplete/VAutocomplete.js +1 -0
  26. package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
  27. package/lib/components/VCombobox/VCombobox.js +11 -6
  28. package/lib/components/VCombobox/VCombobox.js.map +1 -1
  29. package/lib/components/VFileInput/VFileInput.d.ts +15 -0
  30. package/lib/components/VFileInput/VFileInput.js +38 -9
  31. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  32. package/lib/components/VList/VList.js +2 -1
  33. package/lib/components/VList/VList.js.map +1 -1
  34. package/lib/components/VList/VListItem.js +7 -1
  35. package/lib/components/VList/VListItem.js.map +1 -1
  36. package/lib/components/VProgressLinear/VProgressLinear.css +1 -1
  37. package/lib/components/VProgressLinear/VProgressLinear.d.ts +75 -0
  38. package/lib/components/VProgressLinear/VProgressLinear.js +32 -6
  39. package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
  40. package/lib/components/VProgressLinear/VProgressLinear.sass +1 -1
  41. package/lib/components/VProgressLinear/chunks.d.ts +55 -0
  42. package/lib/components/VProgressLinear/chunks.js +62 -0
  43. package/lib/components/VProgressLinear/chunks.js.map +1 -0
  44. package/lib/components/VSelect/VSelect.js +1 -0
  45. package/lib/components/VSelect/VSelect.js.map +1 -1
  46. package/lib/composables/fileFilter.d.ts +18 -0
  47. package/lib/composables/fileFilter.js +38 -0
  48. package/lib/composables/fileFilter.js.map +1 -0
  49. package/lib/composables/theme.d.ts +1 -0
  50. package/lib/composables/theme.js +3 -1
  51. package/lib/composables/theme.js.map +1 -1
  52. package/lib/entry-bundler.js +1 -1
  53. package/lib/entry-bundler.js.map +1 -1
  54. package/lib/framework.d.ts +72 -71
  55. package/lib/framework.js +1 -1
  56. package/lib/framework.js.map +1 -1
  57. package/lib/labs/VFileUpload/VFileUpload.d.ts +15 -0
  58. package/lib/labs/VFileUpload/VFileUpload.js +39 -9
  59. package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
  60. package/package.json +1 -1
@@ -6,6 +6,9 @@ export declare const makeVProgressLinearProps: <Defaults extends {
6
6
  location?: unknown;
7
7
  class?: unknown;
8
8
  style?: unknown;
9
+ chunkCount?: unknown;
10
+ chunkWidth?: unknown;
11
+ chunkGap?: unknown;
9
12
  absolute?: unknown;
10
13
  active?: unknown;
11
14
  bgColor?: unknown;
@@ -77,6 +80,36 @@ export declare const makeVProgressLinearProps: <Defaults extends {
77
80
  type: import("vue").PropType<unknown extends Defaults["style"] ? import("vue").StyleValue : import("vue").StyleValue | Defaults["style"]>;
78
81
  default: unknown extends Defaults["style"] ? import("vue").StyleValue : NonNullable<import("vue").StyleValue> | Defaults["style"];
79
82
  };
83
+ chunkCount: unknown extends Defaults["chunkCount"] ? {
84
+ type: (StringConstructor | NumberConstructor)[];
85
+ default: null;
86
+ } : Omit<{
87
+ type: (StringConstructor | NumberConstructor)[];
88
+ default: null;
89
+ }, "type" | "default"> & {
90
+ type: import("vue").PropType<unknown extends Defaults["chunkCount"] ? string | number : string | number | Defaults["chunkCount"]>;
91
+ default: unknown extends Defaults["chunkCount"] ? string | number : NonNullable<string | number> | Defaults["chunkCount"];
92
+ };
93
+ chunkWidth: unknown extends Defaults["chunkWidth"] ? {
94
+ type: (StringConstructor | NumberConstructor)[];
95
+ default: null;
96
+ } : Omit<{
97
+ type: (StringConstructor | NumberConstructor)[];
98
+ default: null;
99
+ }, "type" | "default"> & {
100
+ type: import("vue").PropType<unknown extends Defaults["chunkWidth"] ? string | number : string | number | Defaults["chunkWidth"]>;
101
+ default: unknown extends Defaults["chunkWidth"] ? string | number : NonNullable<string | number> | Defaults["chunkWidth"];
102
+ };
103
+ chunkGap: unknown extends Defaults["chunkGap"] ? {
104
+ type: (StringConstructor | NumberConstructor)[];
105
+ default: number;
106
+ } : Omit<{
107
+ type: (StringConstructor | NumberConstructor)[];
108
+ default: number;
109
+ }, "type" | "default"> & {
110
+ type: import("vue").PropType<unknown extends Defaults["chunkGap"] ? string | number : string | number | Defaults["chunkGap"]>;
111
+ default: unknown extends Defaults["chunkGap"] ? string | number : NonNullable<string | number> | Defaults["chunkGap"];
112
+ };
80
113
  absolute: unknown extends Defaults["absolute"] ? BooleanConstructor : {
81
114
  type: import("vue").PropType<unknown extends Defaults["absolute"] ? boolean : boolean | Defaults["absolute"]>;
82
115
  default: unknown extends Defaults["absolute"] ? boolean : boolean | Defaults["absolute"];
@@ -194,6 +227,9 @@ export declare const VProgressLinear: {
194
227
  indeterminate: boolean;
195
228
  modelValue: string | number;
196
229
  tile: boolean;
230
+ chunkCount: string | number;
231
+ chunkWidth: string | number;
232
+ chunkGap: string | number;
197
233
  bufferValue: string | number;
198
234
  clickable: boolean;
199
235
  striped: boolean;
@@ -249,6 +285,9 @@ export declare const VProgressLinear: {
249
285
  modelValue: string | number;
250
286
  rounded: string | number | boolean;
251
287
  tile: boolean;
288
+ chunkCount: string | number;
289
+ chunkWidth: string | number;
290
+ chunkGap: string | number;
252
291
  bufferValue: string | number;
253
292
  clickable: boolean;
254
293
  striped: boolean;
@@ -278,6 +317,9 @@ export declare const VProgressLinear: {
278
317
  indeterminate: boolean;
279
318
  modelValue: string | number;
280
319
  tile: boolean;
320
+ chunkCount: string | number;
321
+ chunkWidth: string | number;
322
+ chunkGap: string | number;
281
323
  bufferValue: string | number;
282
324
  clickable: boolean;
283
325
  striped: boolean;
@@ -331,6 +373,9 @@ export declare const VProgressLinear: {
331
373
  modelValue: string | number;
332
374
  rounded: string | number | boolean;
333
375
  tile: boolean;
376
+ chunkCount: string | number;
377
+ chunkWidth: string | number;
378
+ chunkGap: string | number;
334
379
  bufferValue: string | number;
335
380
  clickable: boolean;
336
381
  striped: boolean;
@@ -352,6 +397,9 @@ export declare const VProgressLinear: {
352
397
  indeterminate: boolean;
353
398
  modelValue: string | number;
354
399
  tile: boolean;
400
+ chunkCount: string | number;
401
+ chunkWidth: string | number;
402
+ chunkGap: string | number;
355
403
  bufferValue: string | number;
356
404
  clickable: boolean;
357
405
  striped: boolean;
@@ -407,6 +455,9 @@ export declare const VProgressLinear: {
407
455
  modelValue: string | number;
408
456
  rounded: string | number | boolean;
409
457
  tile: boolean;
458
+ chunkCount: string | number;
459
+ chunkWidth: string | number;
460
+ chunkGap: string | number;
410
461
  bufferValue: string | number;
411
462
  clickable: boolean;
412
463
  striped: boolean;
@@ -436,6 +487,18 @@ export declare const VProgressLinear: {
436
487
  type: import("vue").PropType<import("vue").StyleValue>;
437
488
  default: null;
438
489
  };
490
+ chunkCount: {
491
+ type: (StringConstructor | NumberConstructor)[];
492
+ default: null;
493
+ };
494
+ chunkWidth: {
495
+ type: (StringConstructor | NumberConstructor)[];
496
+ default: null;
497
+ };
498
+ chunkGap: {
499
+ type: (StringConstructor | NumberConstructor)[];
500
+ default: number;
501
+ };
439
502
  absolute: BooleanConstructor;
440
503
  active: {
441
504
  type: BooleanConstructor;
@@ -489,6 +552,18 @@ export declare const VProgressLinear: {
489
552
  type: import("vue").PropType<import("vue").StyleValue>;
490
553
  default: null;
491
554
  };
555
+ chunkCount: {
556
+ type: (StringConstructor | NumberConstructor)[];
557
+ default: null;
558
+ };
559
+ chunkWidth: {
560
+ type: (StringConstructor | NumberConstructor)[];
561
+ default: null;
562
+ };
563
+ chunkGap: {
564
+ type: (StringConstructor | NumberConstructor)[];
565
+ default: number;
566
+ };
492
567
  absolute: BooleanConstructor;
493
568
  active: {
494
569
  type: BooleanConstructor;
@@ -9,10 +9,13 @@ import { useIntersectionObserver } from "../../composables/intersectionObserver.
9
9
  import { useRtl } from "../../composables/locale.js";
10
10
  import { makeLocationProps, useLocation } from "../../composables/location.js";
11
11
  import { useProxiedModel } from "../../composables/proxiedModel.js";
12
+ import { useResizeObserver } from "../../composables/resizeObserver.js";
12
13
  import { makeRoundedProps, useRounded } from "../../composables/rounded.js";
13
14
  import { makeTagProps } from "../../composables/tag.js";
14
- import { makeThemeProps, provideTheme } from "../../composables/theme.js"; // Utilities
15
- import { computed, Transition } from 'vue';
15
+ import { makeThemeProps, provideTheme } from "../../composables/theme.js";
16
+ import { useToggleScope } from "../../composables/toggleScope.js"; // Utilities
17
+ import { computed, ref, shallowRef, Transition, watchEffect } from 'vue';
18
+ import { makeChunksProps, useChunks } from "./chunks.js";
16
19
  import { clamp, convertToUnit, genericComponent, IN_BROWSER, propsFactory, useRender } from "../../util/index.js";
17
20
  export const makeVProgressLinearProps = propsFactory({
18
21
  absolute: Boolean,
@@ -48,6 +51,7 @@ export const makeVProgressLinearProps = propsFactory({
48
51
  stream: Boolean,
49
52
  striped: Boolean,
50
53
  roundedBar: Boolean,
54
+ ...makeChunksProps(),
51
55
  ...makeComponentProps(),
52
56
  ...makeLocationProps({
53
57
  location: 'top'
@@ -66,6 +70,7 @@ export const VProgressLinear = genericComponent()({
66
70
  let {
67
71
  slots
68
72
  } = _ref;
73
+ const root = ref();
69
74
  const progress = useProxiedModel(props, 'modelValue');
70
75
  const {
71
76
  isRtl,
@@ -107,6 +112,24 @@ export const VProgressLinear = genericComponent()({
107
112
  const isReversed = computed(() => isRtl.value !== props.reverse);
108
113
  const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition');
109
114
  const isForcedColorsModeActive = IN_BROWSER && window.matchMedia?.('(forced-colors: active)').matches;
115
+ const containerWidth = shallowRef(0);
116
+ const {
117
+ hasChunks,
118
+ chunksMaskStyles,
119
+ snapValueToChunk
120
+ } = useChunks(props, containerWidth);
121
+ useToggleScope(hasChunks, () => {
122
+ const {
123
+ resizeRef
124
+ } = useResizeObserver(entries => containerWidth.value = entries[0].contentRect.width);
125
+ watchEffect(() => resizeRef.value = root.value);
126
+ });
127
+ const bufferWidth = computed(() => {
128
+ return hasChunks.value ? snapValueToChunk(normalizedBuffer.value) : normalizedBuffer.value;
129
+ });
130
+ const barWidth = computed(() => {
131
+ return hasChunks.value ? snapValueToChunk(normalizedValue.value) : normalizedValue.value;
132
+ });
110
133
  function handleClick(e) {
111
134
  if (!intersectionRef.value) return;
112
135
  const {
@@ -117,8 +140,11 @@ export const VProgressLinear = genericComponent()({
117
140
  const value = isReversed.value ? width - e.clientX + (right - width) : e.clientX - left;
118
141
  progress.value = Math.round(value / width * max.value);
119
142
  }
143
+ watchEffect(() => {
144
+ intersectionRef.value = root.value;
145
+ });
120
146
  useRender(() => _createVNode(props.tag, {
121
- "ref": intersectionRef,
147
+ "ref": root,
122
148
  "class": _normalizeClass(['v-progress-linear', {
123
149
  'v-progress-linear--absolute': props.absolute,
124
150
  'v-progress-linear--active': props.active && isIntersecting.value,
@@ -134,7 +160,7 @@ export const VProgressLinear = genericComponent()({
134
160
  height: props.active ? convertToUnit(height.value) : 0,
135
161
  '--v-progress-linear-height': convertToUnit(height.value),
136
162
  ...(props.absolute ? locationStyles.value : {})
137
- }, props.style]),
163
+ }, chunksMaskStyles.value, props.style]),
138
164
  "role": "progressbar",
139
165
  "aria-hidden": props.active ? 'false' : 'true',
140
166
  "aria-valuemin": "0",
@@ -164,7 +190,7 @@ export const VProgressLinear = genericComponent()({
164
190
  "class": _normalizeClass(['v-progress-linear__buffer', !isForcedColorsModeActive ? bufferColorClasses.value : undefined]),
165
191
  "style": _normalizeStyle([bufferColorStyles.value, {
166
192
  opacity: parseFloat(props.bufferOpacity),
167
- width: convertToUnit(normalizedBuffer.value, '%')
193
+ width: convertToUnit(bufferWidth.value, '%')
168
194
  }])
169
195
  }, null), _createVNode(Transition, {
170
196
  "name": transition.value
@@ -172,7 +198,7 @@ export const VProgressLinear = genericComponent()({
172
198
  default: () => [!props.indeterminate ? _createElementVNode("div", {
173
199
  "class": _normalizeClass(['v-progress-linear__determinate', !isForcedColorsModeActive ? barColorClasses.value : undefined]),
174
200
  "style": _normalizeStyle([barColorStyles.value, {
175
- width: convertToUnit(normalizedValue.value, '%')
201
+ width: convertToUnit(barWidth.value, '%')
176
202
  }])
177
203
  }, null) : _createElementVNode("div", {
178
204
  "class": "v-progress-linear__indeterminate"
@@ -1 +1 @@
1
- {"version":3,"file":"VProgressLinear.js","names":["useBackgroundColor","useTextColor","makeComponentProps","useIntersectionObserver","useRtl","makeLocationProps","useLocation","useProxiedModel","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","computed","Transition","clamp","convertToUnit","genericComponent","IN_BROWSER","propsFactory","useRender","makeVProgressLinearProps","absolute","Boolean","active","type","default","bgColor","String","bgOpacity","Number","bufferValue","bufferColor","bufferOpacity","clickable","color","height","indeterminate","max","modelValue","opacity","reverse","stream","striped","roundedBar","location","VProgressLinear","name","props","emits","value","setup","_ref","slots","progress","isRtl","rtlClasses","themeClasses","locationStyles","textColorClasses","textColorStyles","backgroundColorClasses","backgroundColorStyles","bufferColorClasses","bufferColorStyles","barColorClasses","barColorStyles","roundedClasses","intersectionRef","isIntersecting","parseFloat","normalizedBuffer","normalizedValue","isReversed","transition","isForcedColorsModeActive","window","matchMedia","matches","handleClick","e","left","right","width","getBoundingClientRect","clientX","Math","round","_createVNode","tag","_normalizeClass","rounded","class","_normalizeStyle","bottom","undefined","top","style","min","_createElementVNode","borderTop","map","bar","buffer"],"sources":["../../../src/components/VProgressLinear/VProgressLinear.tsx"],"sourcesContent":["// Styles\nimport './VProgressLinear.sass'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useRtl } from '@/composables/locale'\nimport { makeLocationProps, useLocation } from '@/composables/location'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, Transition } from 'vue'\nimport { clamp, convertToUnit, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\n\ntype VProgressLinearSlots = {\n default: { value: number, buffer: number }\n}\n\nexport const makeVProgressLinearProps = propsFactory({\n absolute: Boolean,\n active: {\n type: Boolean,\n default: true,\n },\n bgColor: String,\n bgOpacity: [Number, String],\n bufferValue: {\n type: [Number, String],\n default: 0,\n },\n bufferColor: String,\n bufferOpacity: [Number, String],\n clickable: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 4,\n },\n indeterminate: Boolean,\n max: {\n type: [Number, String],\n default: 100,\n },\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n opacity: [Number, String],\n reverse: Boolean,\n stream: Boolean,\n striped: Boolean,\n roundedBar: Boolean,\n\n ...makeComponentProps(),\n ...makeLocationProps({ location: 'top' } as const),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VProgressLinear')\n\nexport const VProgressLinear = genericComponent<VProgressLinearSlots>()({\n name: 'VProgressLinear',\n\n props: makeVProgressLinearProps(),\n\n emits: {\n 'update:modelValue': (value: number) => true,\n },\n\n setup (props, { slots }) {\n const progress = useProxiedModel(props, 'modelValue')\n const { isRtl, rtlClasses } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { locationStyles } = useLocation(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const {\n backgroundColorClasses,\n backgroundColorStyles,\n } = useBackgroundColor(() => props.bgColor || props.color)\n const {\n backgroundColorClasses: bufferColorClasses,\n backgroundColorStyles: bufferColorStyles,\n } = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color)\n const {\n backgroundColorClasses: barColorClasses,\n backgroundColorStyles: barColorStyles,\n } = useBackgroundColor(() => props.color)\n const { roundedClasses } = useRounded(props)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n\n const max = computed(() => parseFloat(props.max))\n const height = computed(() => parseFloat(props.height))\n const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100))\n const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100))\n const isReversed = computed(() => isRtl.value !== props.reverse)\n const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition')\n const isForcedColorsModeActive = IN_BROWSER && window.matchMedia?.('(forced-colors: active)').matches\n\n function handleClick (e: MouseEvent) {\n if (!intersectionRef.value) return\n\n const { left, right, width } = intersectionRef.value.getBoundingClientRect()\n const value = isReversed.value ? (width - e.clientX) + (right - width) : e.clientX - left\n\n progress.value = Math.round(value / width * max.value)\n }\n\n useRender(() => (\n <props.tag\n ref={ intersectionRef }\n class={[\n 'v-progress-linear',\n {\n 'v-progress-linear--absolute': props.absolute,\n 'v-progress-linear--active': props.active && isIntersecting.value,\n 'v-progress-linear--reverse': isReversed.value,\n 'v-progress-linear--rounded': props.rounded,\n 'v-progress-linear--rounded-bar': props.roundedBar,\n 'v-progress-linear--striped': props.striped,\n 'v-progress-linear--clickable': props.clickable,\n },\n roundedClasses.value,\n themeClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n {\n bottom: props.location === 'bottom' ? 0 : undefined,\n top: props.location === 'top' ? 0 : undefined,\n height: props.active ? convertToUnit(height.value) : 0,\n '--v-progress-linear-height': convertToUnit(height.value),\n ...(props.absolute ? locationStyles.value : {}),\n },\n props.style,\n ]}\n role=\"progressbar\"\n aria-hidden={ props.active ? 'false' : 'true' }\n aria-valuemin=\"0\"\n aria-valuemax={ props.max }\n aria-valuenow={ props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value) }\n onClick={ props.clickable && handleClick }\n >\n { props.stream && (\n <div\n key=\"stream\"\n class={[\n 'v-progress-linear__stream',\n textColorClasses.value,\n ]}\n style={{\n ...textColorStyles.value,\n [isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),\n borderTop: `${convertToUnit(height.value / 2)} dotted`,\n opacity: parseFloat(props.bufferOpacity!),\n top: `calc(50% - ${convertToUnit(height.value / 4)})`,\n width: convertToUnit(100 - normalizedBuffer.value, '%'),\n '--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1)),\n }}\n />\n )}\n\n <div\n class={[\n 'v-progress-linear__background',\n !isForcedColorsModeActive ? backgroundColorClasses.value : undefined,\n ]}\n style={[\n backgroundColorStyles.value,\n {\n opacity: parseFloat(props.bgOpacity!),\n width: props.stream ? 0 : undefined,\n },\n ]}\n />\n\n <div\n class={[\n 'v-progress-linear__buffer',\n !isForcedColorsModeActive ? bufferColorClasses.value : undefined,\n ]}\n style={[\n bufferColorStyles.value,\n {\n opacity: parseFloat(props.bufferOpacity!),\n width: convertToUnit(normalizedBuffer.value, '%'),\n },\n ]}\n />\n\n <Transition name={ transition.value }>\n { !props.indeterminate ? (\n <div\n class={[\n 'v-progress-linear__determinate',\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={[\n barColorStyles.value,\n { width: convertToUnit(normalizedValue.value, '%') },\n ]}\n />\n ) : (\n <div class=\"v-progress-linear__indeterminate\">\n {['long', 'short'].map(bar => (\n <div\n key={ bar }\n class={[\n 'v-progress-linear__indeterminate',\n bar,\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={ barColorStyles.value }\n />\n ))}\n </div>\n )}\n </Transition>\n\n { slots.default && (\n <div class=\"v-progress-linear__content\">\n { slots.default({ value: normalizedValue.value, buffer: normalizedBuffer.value }) }\n </div>\n )}\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VProgressLinear = InstanceType<typeof VProgressLinear>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB;AAAA,SAClBC,uBAAuB;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB,EAAEC,WAAW;AAAA,SAC9BC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,sCAErC;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,KAAK,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS;AAMpF,OAAO,MAAMC,wBAAwB,GAAGF,YAAY,CAAC;EACnDG,QAAQ,EAAEC,OAAO;EACjBC,MAAM,EAAE;IACNC,IAAI,EAAEF,OAAO;IACbG,OAAO,EAAE;EACX,CAAC;EACDC,OAAO,EAAEC,MAAM;EACfC,SAAS,EAAE,CAACC,MAAM,EAAEF,MAAM,CAAC;EAC3BG,WAAW,EAAE;IACXN,IAAI,EAAE,CAACK,MAAM,EAAEF,MAAM,CAAC;IACtBF,OAAO,EAAE;EACX,CAAC;EACDM,WAAW,EAAEJ,MAAM;EACnBK,aAAa,EAAE,CAACH,MAAM,EAAEF,MAAM,CAAC;EAC/BM,SAAS,EAAEX,OAAO;EAClBY,KAAK,EAAEP,MAAM;EACbQ,MAAM,EAAE;IACNX,IAAI,EAAE,CAACK,MAAM,EAAEF,MAAM,CAAC;IACtBF,OA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B,GAAGV,eAAe,CAACf,KAAK,GAAG6C,SAAS,CAC9D;UAAA,SAAAF,eAAA,CACM,CACL3B,cAAc,CAAChB,KAAK,EACpB;YAAEiC,KAAK,EAAEnE,aAAa,CAACwD,eAAe,CAACtB,KAAK,EAAE,GAAG;UAAE,CAAC,CACrD;QAAA,WAAAiD,mBAAA;UAAA;QAAA,IAIA,CAAC,MAAM,EAAE,OAAO,CAAC,CAACE,GAAG,CAACC,GAAG,IAAAH,mBAAA;UAAA,OAEhBG,GAAG;UAAA,SAAAZ,eAAA,CACF,CACL,kCAAkC,EAClCY,GAAG,EACH,CAAC3B,wBAAwB,GAAGV,eAAe,CAACf,KAAK,GAAG6C,SAAS,CAC9D;UAAA,SAAAF,eAAA,CACO3B,cAAc,CAAChB,KAAK;QAAA,QAE/B,CAAC,EAEL;MAAA,IAGDG,KAAK,CAAC3B,OAAO,IAAAyE,mBAAA;QAAA;MAAA,IAET9C,KAAK,CAAC3B,OAAO,CAAC;QAAEwB,KAAK,EAAEsB,eAAe,CAACtB,KAAK;QAAEqD,MAAM,EAAEhC,gBAAgB,CAACrB;MAAM,CAAC,CAAC,EAEpF;IAAA,EAEJ,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VProgressLinear.js","names":["useBackgroundColor","useTextColor","makeComponentProps","useIntersectionObserver","useRtl","makeLocationProps","useLocation","useProxiedModel","useResizeObserver","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","useToggleScope","computed","ref","shallowRef","Transition","watchEffect","makeChunksProps","useChunks","clamp","convertToUnit","genericComponent","IN_BROWSER","propsFactory","useRender","makeVProgressLinearProps","absolute","Boolean","active","type","default","bgColor","String","bgOpacity","Number","bufferValue","bufferColor","bufferOpacity","clickable","color","height","indeterminate","max","modelValue","opacity","reverse","stream","striped","roundedBar","location","VProgressLinear","name","props","emits","value","setup","_ref","slots","root","progress","isRtl","rtlClasses","themeClasses","locationStyles","textColorClasses","textColorStyles","backgroundColorClasses","backgroundColorStyles","bufferColorClasses","bufferColorStyles","barColorClasses","barColorStyles","roundedClasses","intersectionRef","isIntersecting","parseFloat","normalizedBuffer","normalizedValue","isReversed","transition","isForcedColorsModeActive","window","matchMedia","matches","containerWidth","hasChunks","chunksMaskStyles","snapValueToChunk","resizeRef","entries","contentRect","width","bufferWidth","barWidth","handleClick","e","left","right","getBoundingClientRect","clientX","Math","round","_createVNode","tag","_normalizeClass","rounded","class","_normalizeStyle","bottom","undefined","top","style","min","_createElementVNode","borderTop","map","bar","buffer"],"sources":["../../../src/components/VProgressLinear/VProgressLinear.tsx"],"sourcesContent":["// Styles\nimport './VProgressLinear.sass'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useRtl } from '@/composables/locale'\nimport { makeLocationProps, useLocation } from '@/composables/location'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, ref, shallowRef, Transition, watchEffect } from 'vue'\nimport { makeChunksProps, useChunks } from './chunks'\nimport { clamp, convertToUnit, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\n\ntype VProgressLinearSlots = {\n default: { value: number, buffer: number }\n}\n\nexport const makeVProgressLinearProps = propsFactory({\n absolute: Boolean,\n active: {\n type: Boolean,\n default: true,\n },\n bgColor: String,\n bgOpacity: [Number, String],\n bufferValue: {\n type: [Number, String],\n default: 0,\n },\n bufferColor: String,\n bufferOpacity: [Number, String],\n clickable: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 4,\n },\n indeterminate: Boolean,\n max: {\n type: [Number, String],\n default: 100,\n },\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n opacity: [Number, String],\n reverse: Boolean,\n stream: Boolean,\n striped: Boolean,\n roundedBar: Boolean,\n\n ...makeChunksProps(),\n ...makeComponentProps(),\n ...makeLocationProps({ location: 'top' } as const),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VProgressLinear')\n\nexport const VProgressLinear = genericComponent<VProgressLinearSlots>()({\n name: 'VProgressLinear',\n\n props: makeVProgressLinearProps(),\n\n emits: {\n 'update:modelValue': (value: number) => true,\n },\n\n setup (props, { slots }) {\n const root = ref<HTMLElement>()\n\n const progress = useProxiedModel(props, 'modelValue')\n const { isRtl, rtlClasses } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { locationStyles } = useLocation(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const {\n backgroundColorClasses,\n backgroundColorStyles,\n } = useBackgroundColor(() => props.bgColor || props.color)\n const {\n backgroundColorClasses: bufferColorClasses,\n backgroundColorStyles: bufferColorStyles,\n } = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color)\n const {\n backgroundColorClasses: barColorClasses,\n backgroundColorStyles: barColorStyles,\n } = useBackgroundColor(() => props.color)\n const { roundedClasses } = useRounded(props)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n\n const max = computed(() => parseFloat(props.max))\n const height = computed(() => parseFloat(props.height))\n const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100))\n const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100))\n const isReversed = computed(() => isRtl.value !== props.reverse)\n const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition')\n const isForcedColorsModeActive = IN_BROWSER && window.matchMedia?.('(forced-colors: active)').matches\n\n const containerWidth = shallowRef(0)\n const { hasChunks, chunksMaskStyles, snapValueToChunk } = useChunks(props, containerWidth)\n useToggleScope(hasChunks, () => {\n const { resizeRef } = useResizeObserver(entries => containerWidth.value = entries[0].contentRect.width)\n watchEffect(() => resizeRef.value = root.value)\n })\n\n const bufferWidth = computed(() => {\n return hasChunks.value\n ? snapValueToChunk(normalizedBuffer.value)\n : normalizedBuffer.value\n })\n\n const barWidth = computed(() => {\n return hasChunks.value\n ? snapValueToChunk(normalizedValue.value)\n : normalizedValue.value\n })\n\n function handleClick (e: MouseEvent) {\n if (!intersectionRef.value) return\n\n const { left, right, width } = intersectionRef.value.getBoundingClientRect()\n const value = isReversed.value ? (width - e.clientX) + (right - width) : e.clientX - left\n\n progress.value = Math.round(value / width * max.value)\n }\n\n watchEffect(() => {\n intersectionRef.value = root.value\n })\n\n useRender(() => (\n <props.tag\n ref={ root }\n class={[\n 'v-progress-linear',\n {\n 'v-progress-linear--absolute': props.absolute,\n 'v-progress-linear--active': props.active && isIntersecting.value,\n 'v-progress-linear--reverse': isReversed.value,\n 'v-progress-linear--rounded': props.rounded,\n 'v-progress-linear--rounded-bar': props.roundedBar,\n 'v-progress-linear--striped': props.striped,\n 'v-progress-linear--clickable': props.clickable,\n },\n roundedClasses.value,\n themeClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n {\n bottom: props.location === 'bottom' ? 0 : undefined,\n top: props.location === 'top' ? 0 : undefined,\n height: props.active ? convertToUnit(height.value) : 0,\n '--v-progress-linear-height': convertToUnit(height.value),\n ...(props.absolute ? locationStyles.value : {}),\n },\n chunksMaskStyles.value,\n props.style,\n ]}\n role=\"progressbar\"\n aria-hidden={ props.active ? 'false' : 'true' }\n aria-valuemin=\"0\"\n aria-valuemax={ props.max }\n aria-valuenow={ props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value) }\n onClick={ props.clickable && handleClick }\n >\n { props.stream && (\n <div\n key=\"stream\"\n class={[\n 'v-progress-linear__stream',\n textColorClasses.value,\n ]}\n style={{\n ...textColorStyles.value,\n [isReversed.value ? 'left' : 'right']: convertToUnit(-height.value),\n borderTop: `${convertToUnit(height.value / 2)} dotted`,\n opacity: parseFloat(props.bufferOpacity!),\n top: `calc(50% - ${convertToUnit(height.value / 4)})`,\n width: convertToUnit(100 - normalizedBuffer.value, '%'),\n '--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1)),\n }}\n />\n )}\n\n <div\n class={[\n 'v-progress-linear__background',\n !isForcedColorsModeActive ? backgroundColorClasses.value : undefined,\n ]}\n style={[\n backgroundColorStyles.value,\n {\n opacity: parseFloat(props.bgOpacity!),\n width: props.stream ? 0 : undefined,\n },\n ]}\n />\n\n <div\n class={[\n 'v-progress-linear__buffer',\n !isForcedColorsModeActive ? bufferColorClasses.value : undefined,\n ]}\n style={[\n bufferColorStyles.value,\n {\n opacity: parseFloat(props.bufferOpacity!),\n width: convertToUnit(bufferWidth.value, '%'),\n },\n ]}\n />\n\n <Transition name={ transition.value }>\n { !props.indeterminate ? (\n <div\n class={[\n 'v-progress-linear__determinate',\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={[\n barColorStyles.value,\n { width: convertToUnit(barWidth.value, '%') },\n ]}\n />\n ) : (\n <div class=\"v-progress-linear__indeterminate\">\n {['long', 'short'].map(bar => (\n <div\n key={ bar }\n class={[\n 'v-progress-linear__indeterminate',\n bar,\n !isForcedColorsModeActive ? barColorClasses.value : undefined,\n ]}\n style={ barColorStyles.value }\n />\n ))}\n </div>\n )}\n </Transition>\n\n { slots.default && (\n <div class=\"v-progress-linear__content\">\n { slots.default({ value: normalizedValue.value, buffer: normalizedBuffer.value }) }\n </div>\n )}\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VProgressLinear = InstanceType<typeof VProgressLinear>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB;AAAA,SAClBC,uBAAuB;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB,EAAEC,WAAW;AAAA,SAC9BC,eAAe;AAAA,SACfC,iBAAiB;AAAA,SACjBC,gBAAgB,EAAE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AO,CAAC;QAAEwB,KAAK,EAAEuB,eAAe,CAACvB,KAAK;QAAE+D,MAAM,EAAEzC,gBAAgB,CAACtB;MAAM,CAAC,CAAC,EAEpF;IAAA,EAEJ,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
@@ -7,7 +7,7 @@
7
7
  background: transparent
8
8
  overflow: hidden
9
9
  position: relative
10
- transition: $progress-linear-transition
10
+ transition: $progress-linear-transition, mask-size 0s
11
11
  width: 100%
12
12
 
13
13
  &--rounded
@@ -0,0 +1,55 @@
1
+ import type { MaybeRefOrGetter } from 'vue';
2
+ export interface ChunksProps {
3
+ chunkCount: number | string;
4
+ chunkWidth: number | string;
5
+ chunkGap: number | string;
6
+ }
7
+ export declare const makeChunksProps: <Defaults extends {
8
+ chunkCount?: unknown;
9
+ chunkWidth?: unknown;
10
+ chunkGap?: unknown;
11
+ } = {}>(defaults?: Defaults | undefined) => {
12
+ chunkCount: unknown extends Defaults["chunkCount"] ? {
13
+ type: (StringConstructor | NumberConstructor)[];
14
+ default: null;
15
+ } : Omit<{
16
+ type: (StringConstructor | NumberConstructor)[];
17
+ default: null;
18
+ }, "type" | "default"> & {
19
+ type: import("vue").PropType<unknown extends Defaults["chunkCount"] ? string | number : string | number | Defaults["chunkCount"]>;
20
+ default: unknown extends Defaults["chunkCount"] ? string | number : NonNullable<string | number> | Defaults["chunkCount"];
21
+ };
22
+ chunkWidth: unknown extends Defaults["chunkWidth"] ? {
23
+ type: (StringConstructor | NumberConstructor)[];
24
+ default: null;
25
+ } : Omit<{
26
+ type: (StringConstructor | NumberConstructor)[];
27
+ default: null;
28
+ }, "type" | "default"> & {
29
+ type: import("vue").PropType<unknown extends Defaults["chunkWidth"] ? string | number : string | number | Defaults["chunkWidth"]>;
30
+ default: unknown extends Defaults["chunkWidth"] ? string | number : NonNullable<string | number> | Defaults["chunkWidth"];
31
+ };
32
+ chunkGap: unknown extends Defaults["chunkGap"] ? {
33
+ type: (StringConstructor | NumberConstructor)[];
34
+ default: number;
35
+ } : Omit<{
36
+ type: (StringConstructor | NumberConstructor)[];
37
+ default: number;
38
+ }, "type" | "default"> & {
39
+ type: import("vue").PropType<unknown extends Defaults["chunkGap"] ? string | number : string | number | Defaults["chunkGap"]>;
40
+ default: unknown extends Defaults["chunkGap"] ? string | number : NonNullable<string | number> | Defaults["chunkGap"];
41
+ };
42
+ };
43
+ export declare function useChunks(props: ChunksProps, containerWidth: MaybeRefOrGetter<number | undefined>): {
44
+ hasChunks: Readonly<import("vue").Ref<boolean, boolean>>;
45
+ chunksMaskStyles: import("vue").ComputedRef<{
46
+ maskRepeat?: undefined;
47
+ maskImage?: undefined;
48
+ maskSize?: undefined;
49
+ } | {
50
+ maskRepeat: string;
51
+ maskImage: string;
52
+ maskSize: string;
53
+ }>;
54
+ snapValueToChunk: (val: number) => number;
55
+ };
@@ -0,0 +1,62 @@
1
+ // Utilities
2
+ import { computed, toRef, toValue } from 'vue';
3
+ import { clamp, convertToUnit, propsFactory } from "../../util/index.js"; // Types
4
+ // Composables
5
+ export const makeChunksProps = propsFactory({
6
+ chunkCount: {
7
+ type: [Number, String],
8
+ default: null
9
+ },
10
+ chunkWidth: {
11
+ type: [Number, String],
12
+ default: null
13
+ },
14
+ chunkGap: {
15
+ type: [Number, String],
16
+ default: 4
17
+ }
18
+ }, 'chunks');
19
+ export function useChunks(props, containerWidth) {
20
+ const hasChunks = toRef(() => !!props.chunkCount || !!props.chunkWidth);
21
+ const chunkWidth = computed(() => {
22
+ const containerSize = toValue(containerWidth);
23
+ if (!containerSize) {
24
+ return 0;
25
+ }
26
+ if (!props.chunkCount) {
27
+ return Number(props.chunkWidth);
28
+ }
29
+ const count = Number(props.chunkCount);
30
+ const availableWidth = containerSize - Number(props.chunkGap) * (count - 1);
31
+ return availableWidth / count;
32
+ });
33
+ const chunkGap = toRef(() => Number(props.chunkGap));
34
+ const chunksMaskStyles = computed(() => {
35
+ if (!hasChunks.value) {
36
+ return {};
37
+ }
38
+ const chunkGapPx = convertToUnit(chunkGap.value);
39
+ const chunkWidthPx = convertToUnit(chunkWidth.value);
40
+ return {
41
+ maskRepeat: 'repeat-x',
42
+ maskImage: `linear-gradient(90deg, #000, #000 ${chunkWidthPx}, transparent ${chunkWidthPx}, transparent)`,
43
+ maskSize: `calc(${chunkWidthPx} + ${chunkGapPx}) 100%`
44
+ };
45
+ });
46
+ function snapValueToChunk(val) {
47
+ const containerSize = toValue(containerWidth);
48
+ if (!containerSize) {
49
+ return val;
50
+ }
51
+ const gapRelativeSize = 100 * chunkGap.value / containerSize;
52
+ const chunkRelativeSize = 100 * (chunkWidth.value + chunkGap.value) / containerSize;
53
+ const filledChunks = Math.floor((val + gapRelativeSize) / chunkRelativeSize);
54
+ return clamp(0, filledChunks * chunkRelativeSize - gapRelativeSize / 2, 100);
55
+ }
56
+ return {
57
+ hasChunks,
58
+ chunksMaskStyles,
59
+ snapValueToChunk
60
+ };
61
+ }
62
+ //# sourceMappingURL=chunks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks.js","names":["computed","toRef","toValue","clamp","convertToUnit","propsFactory","makeChunksProps","chunkCount","type","Number","String","default","chunkWidth","chunkGap","useChunks","props","containerWidth","hasChunks","containerSize","count","availableWidth","chunksMaskStyles","value","chunkGapPx","chunkWidthPx","maskRepeat","maskImage","maskSize","snapValueToChunk","val","gapRelativeSize","chunkRelativeSize","filledChunks","Math","floor"],"sources":["../../../src/components/VProgressLinear/chunks.ts"],"sourcesContent":["// Utilities\nimport { computed, toRef, toValue } from 'vue'\nimport { clamp, convertToUnit, propsFactory } from '@/util'\n\n// Types\nimport type { MaybeRefOrGetter } from 'vue'\n\nexport interface ChunksProps {\n chunkCount: number | string\n chunkWidth: number | string\n chunkGap: number | string\n}\n\n// Composables\nexport const makeChunksProps = propsFactory({\n chunkCount: {\n type: [Number, String],\n default: null,\n },\n chunkWidth: {\n type: [Number, String],\n default: null,\n },\n chunkGap: {\n type: [Number, String],\n default: 4,\n },\n}, 'chunks')\n\nexport function useChunks (\n props: ChunksProps,\n containerWidth: MaybeRefOrGetter<number | undefined>,\n) {\n const hasChunks = toRef(() => !!props.chunkCount || !!props.chunkWidth)\n\n const chunkWidth = computed(() => {\n const containerSize = toValue(containerWidth)\n if (!containerSize) {\n return 0\n }\n\n if (!props.chunkCount) {\n return Number(props.chunkWidth)\n }\n\n const count = Number(props.chunkCount)\n const availableWidth = containerSize - Number(props.chunkGap) * (count - 1)\n return availableWidth / count\n })\n\n const chunkGap = toRef(() => Number(props.chunkGap))\n const chunksMaskStyles = computed(() => {\n if (!hasChunks.value) {\n return {}\n }\n\n const chunkGapPx = convertToUnit(chunkGap.value)\n const chunkWidthPx = convertToUnit(chunkWidth.value)\n\n return {\n maskRepeat: 'repeat-x',\n maskImage: `linear-gradient(90deg, #000, #000 ${chunkWidthPx}, transparent ${chunkWidthPx}, transparent)`,\n maskSize: `calc(${chunkWidthPx} + ${chunkGapPx}) 100%`,\n }\n })\n\n function snapValueToChunk (val: number) {\n const containerSize = toValue(containerWidth)\n if (!containerSize) {\n return val\n }\n\n const gapRelativeSize = 100 * chunkGap.value / containerSize\n const chunkRelativeSize = 100 * (chunkWidth.value + chunkGap.value) / containerSize\n const filledChunks = Math.floor((val + gapRelativeSize) / chunkRelativeSize)\n return clamp(0, filledChunks * chunkRelativeSize - gapRelativeSize / 2, 100)\n }\n\n return {\n hasChunks,\n chunksMaskStyles,\n snapValueToChunk,\n }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,KAAK,EAAEC,OAAO,QAAQ,KAAK;AAAA,SACrCC,KAAK,EAAEC,aAAa,EAAEC,YAAY,+BAE3C;AASA;AACA,OAAO,MAAMC,eAAe,GAAGD,YAAY,CAAC;EAC1CE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX,CAAC;EACDC,UAAU,EAAE;IACVJ,IAAI,EAAE,CAACC,MAAM,E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CF,YAAY,iBAAiBA,YAAY,gBAAgB;MACzGG,QAAQ,EAAE,QAAQH,YAAY,MAAMD,UAAU;IAChD,CAAC;EACH,CAAC,CAAC;EAEF,SAASK,gBAAgBA,CAAEC,GAAW,EAAE;IACtC,MAAMX,aAAa,GAAGhB,OAAO,CAACc,cAAc,CAAC;IAC7C,IAAI,CAACE,aAAa,EAAE;MAClB,OAAOW,GAAG;IACZ;IAEA,MAAMC,eAAe,GAAG,GAAG,GAAGjB,QAAQ,CAACS,KAAK,GAAGJ,aAAa;IAC5D,MAAMa,iBAAiB,GAAG,GAAG,IAAInB,UAAU,CAACU,KAAK,GAAGT,QAAQ,CAACS,KAAK,CAAC,GAAGJ,aAAa;IACnF,MAAMc,YAAY,GAAGC,IAAI,CAACC,KAAK,CAAC,CAACL,GAAG,GAAGC,eAAe,IAAIC,iBAAiB,CAAC;IAC5E,OAAO5B,KAAK,CAAC,CAAC,EAAE6B,YAAY,GAAGD,iBAAiB,GAAGD,eAAe,GAAG,CAAC,EAAE,GAAG,CAAC;EAC9E;EAEA,OAAO;IACLb,SAAS;IACTI,gBAAgB;IAChBO;EACF,CAAC;AACH","ignoreList":[]}
@@ -339,6 +339,7 @@ export const VSelect = genericComponent()({
339
339
  "onKeydown": onListKeydown,
340
340
  "onFocusin": onFocusin,
341
341
  "tabindex": "-1",
342
+ "selectable": true,
342
343
  "aria-live": "polite",
343
344
  "aria-label": `${props.label}-list`,
344
345
  "color": props.itemColor ?? props.color