vuetify 3.1.14 → 3.1.15

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 (97) hide show
  1. package/dist/json/attributes.json +149 -97
  2. package/dist/json/importMap.json +70 -70
  3. package/dist/json/tags.json +13 -0
  4. package/dist/json/web-types.json +440 -209
  5. package/dist/vuetify-labs.css +161 -152
  6. package/dist/vuetify-labs.d.ts +518 -160
  7. package/dist/vuetify-labs.esm.js +176 -116
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +176 -116
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +11 -2
  12. package/dist/vuetify.d.ts +486 -161
  13. package/dist/vuetify.esm.js +118 -68
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +118 -68
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +728 -717
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
  21. package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
  22. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  23. package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
  24. package/lib/components/VAutocomplete/index.d.ts +29 -17
  25. package/lib/components/VCard/VCard.mjs.map +1 -1
  26. package/lib/components/VCard/index.d.ts +21 -16
  27. package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
  28. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  29. package/lib/components/VCheckbox/index.d.ts +22 -1
  30. package/lib/components/VCombobox/VCombobox.css +1 -1
  31. package/lib/components/VCombobox/VCombobox.mjs +6 -4
  32. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  33. package/lib/components/VCombobox/VCombobox.sass +1 -1
  34. package/lib/components/VCombobox/index.d.ts +29 -17
  35. package/lib/components/VField/index.d.ts +6 -0
  36. package/lib/components/VFileInput/VFileInput.mjs +13 -17
  37. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  38. package/lib/components/VFileInput/index.d.ts +68 -23
  39. package/lib/components/VInput/VInput.mjs +14 -7
  40. package/lib/components/VInput/VInput.mjs.map +1 -1
  41. package/lib/components/VInput/index.d.ts +22 -1
  42. package/lib/components/VOverlay/locationStrategies.mjs +9 -4
  43. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  44. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
  45. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  46. package/lib/components/VRadioGroup/index.d.ts +22 -1
  47. package/lib/components/VRangeSlider/VRangeSlider.mjs +2 -2
  48. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  49. package/lib/components/VRangeSlider/index.d.ts +22 -1
  50. package/lib/components/VSelect/VSelect.mjs +6 -0
  51. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  52. package/lib/components/VSelect/index.d.ts +32 -17
  53. package/lib/components/VSlider/VSlider.mjs +2 -2
  54. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  55. package/lib/components/VSlider/index.d.ts +22 -1
  56. package/lib/components/VSwitch/VSwitch.mjs +5 -3
  57. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  58. package/lib/components/VSwitch/index.d.ts +43 -1
  59. package/lib/components/VTextField/VTextField.mjs +4 -12
  60. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  61. package/lib/components/VTextField/index.d.ts +70 -22
  62. package/lib/components/VTextarea/VTextarea.mjs +4 -12
  63. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  64. package/lib/components/VTextarea/index.d.ts +61 -22
  65. package/lib/components/VTreeview/_mixins.sass +0 -0
  66. package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -0
  67. package/lib/components/VValidation/index.d.ts +10 -1
  68. package/lib/components/index.d.ts +465 -140
  69. package/lib/composables/focus.mjs +3 -2
  70. package/lib/composables/focus.mjs.map +1 -1
  71. package/lib/composables/items.mjs +7 -2
  72. package/lib/composables/items.mjs.map +1 -1
  73. package/lib/entry-bundler.mjs +1 -1
  74. package/lib/framework.mjs +1 -1
  75. package/lib/iconsets/mdi-svg.mjs +2 -2
  76. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  77. package/lib/index.d.ts +21 -21
  78. package/lib/labs/VDataTable/VDataTable.mjs +2 -2
  79. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  80. package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
  81. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  82. package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
  83. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  84. package/lib/labs/VDataTable/VDataTableServer.mjs +2 -1
  85. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  86. package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
  87. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  88. package/lib/labs/VDataTable/composables/options.mjs +2 -1
  89. package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
  90. package/lib/labs/VDataTable/index.d.ts +44 -11
  91. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
  92. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  93. package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
  94. package/lib/labs/components.d.ts +53 -20
  95. package/lib/locale/el.mjs +0 -0
  96. package/lib/locale/index.mjs +0 -0
  97. package/package.json +2 -2
@@ -52,6 +52,7 @@ declare const VSlider: {
52
52
  errorMessages: string | string[];
53
53
  maxErrors: string | number;
54
54
  rules: ValidationRule[];
55
+ persistentHint: boolean;
55
56
  showTicks: boolean | "always";
56
57
  tickSize: string | number;
57
58
  trackSize: string | number;
@@ -74,6 +75,7 @@ declare const VSlider: {
74
75
  errorMessages: string | string[];
75
76
  maxErrors: string | number;
76
77
  rules: ValidationRule[];
78
+ persistentHint: boolean;
77
79
  showTicks: boolean | "always";
78
80
  tickSize: string | number;
79
81
  trackSize: string | number;
@@ -88,8 +90,10 @@ declare const VSlider: {
88
90
  appendIcon?: IconValue | undefined;
89
91
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
90
92
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
93
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
91
94
  validateOn?: "input" | "blur" | "submit" | undefined;
92
95
  validationValue?: any;
96
+ hint?: string | undefined;
93
97
  hideDetails?: boolean | "auto" | undefined;
94
98
  trackColor?: string | undefined;
95
99
  trackFillColor?: string | undefined;
@@ -131,7 +135,7 @@ declare const VSlider: {
131
135
  } & {
132
136
  "onUpdate:modelValue"?: ((v: number) => any) | undefined;
133
137
  "onUpdate:focused"?: ((value: boolean) => any) | undefined;
134
- } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "max" | "error" | "direction" | "disabled" | "readonly" | "step" | "min" | "elevation" | "messages" | "rounded" | "density" | "modelValue" | "focused" | "errorMessages" | "maxErrors" | "rules" | "showTicks" | "tickSize" | "trackSize" | "thumbLabel" | "thumbSize">;
138
+ } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "max" | "error" | "direction" | "disabled" | "readonly" | "step" | "min" | "elevation" | "messages" | "rounded" | "density" | "modelValue" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint" | "showTicks" | "tickSize" | "trackSize" | "thumbLabel" | "thumbSize">;
135
139
  $attrs: {
136
140
  [x: string]: unknown;
137
141
  };
@@ -162,6 +166,7 @@ declare const VSlider: {
162
166
  errorMessages: string | string[];
163
167
  maxErrors: string | number;
164
168
  rules: ValidationRule[];
169
+ persistentHint: boolean;
165
170
  showTicks: boolean | "always";
166
171
  tickSize: string | number;
167
172
  trackSize: string | number;
@@ -176,8 +181,10 @@ declare const VSlider: {
176
181
  appendIcon?: IconValue | undefined;
177
182
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
178
183
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
184
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
179
185
  validateOn?: "input" | "blur" | "submit" | undefined;
180
186
  validationValue?: any;
187
+ hint?: string | undefined;
181
188
  hideDetails?: boolean | "auto" | undefined;
182
189
  trackColor?: string | undefined;
183
190
  trackFillColor?: string | undefined;
@@ -240,6 +247,7 @@ declare const VSlider: {
240
247
  errorMessages: string | string[];
241
248
  maxErrors: string | number;
242
249
  rules: ValidationRule[];
250
+ persistentHint: boolean;
243
251
  showTicks: boolean | "always";
244
252
  tickSize: string | number;
245
253
  trackSize: string | number;
@@ -282,6 +290,7 @@ declare const VSlider: {
282
290
  errorMessages: string | string[];
283
291
  maxErrors: string | number;
284
292
  rules: ValidationRule[];
293
+ persistentHint: boolean;
285
294
  showTicks: boolean | "always";
286
295
  tickSize: string | number;
287
296
  trackSize: string | number;
@@ -296,8 +305,10 @@ declare const VSlider: {
296
305
  appendIcon?: IconValue | undefined;
297
306
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
298
307
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
308
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
299
309
  validateOn?: "input" | "blur" | "submit" | undefined;
300
310
  validationValue?: any;
311
+ hint?: string | undefined;
301
312
  hideDetails?: boolean | "auto" | undefined;
302
313
  trackColor?: string | undefined;
303
314
  trackFillColor?: string | undefined;
@@ -360,6 +371,7 @@ declare const VSlider: {
360
371
  errorMessages: string | string[];
361
372
  maxErrors: string | number;
362
373
  rules: ValidationRule[];
374
+ persistentHint: boolean;
363
375
  showTicks: boolean | "always";
364
376
  tickSize: string | number;
365
377
  trackSize: string | number;
@@ -374,8 +386,10 @@ declare const VSlider: {
374
386
  appendIcon?: IconValue | undefined;
375
387
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
376
388
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
389
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
377
390
  validateOn?: "input" | "blur" | "submit" | undefined;
378
391
  validationValue?: any;
392
+ hint?: string | undefined;
379
393
  hideDetails?: boolean | "auto" | undefined;
380
394
  trackColor?: string | undefined;
381
395
  trackFillColor?: string | undefined;
@@ -438,6 +452,7 @@ declare const VSlider: {
438
452
  errorMessages: string | string[];
439
453
  maxErrors: string | number;
440
454
  rules: ValidationRule[];
455
+ persistentHint: boolean;
441
456
  showTicks: boolean | "always";
442
457
  tickSize: string | number;
443
458
  trackSize: string | number;
@@ -449,6 +464,7 @@ declare const VSlider: {
449
464
  default: number;
450
465
  };
451
466
  focused: BooleanConstructor;
467
+ 'onUpdate:focused': vue.PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
452
468
  disabled: BooleanConstructor;
453
469
  error: BooleanConstructor;
454
470
  errorMessages: {
@@ -477,6 +493,8 @@ declare const VSlider: {
477
493
  appendIcon: vue.PropType<IconValue>;
478
494
  prependIcon: vue.PropType<IconValue>;
479
495
  hideDetails: vue.PropType<boolean | "auto">;
496
+ hint: StringConstructor;
497
+ persistentHint: BooleanConstructor;
480
498
  messages: {
481
499
  type: vue.PropType<string | string[]>;
482
500
  default: () => never[];
@@ -547,6 +565,7 @@ declare const VSlider: {
547
565
  default: number;
548
566
  };
549
567
  focused: BooleanConstructor;
568
+ 'onUpdate:focused': vue.PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
550
569
  disabled: BooleanConstructor;
551
570
  error: BooleanConstructor;
552
571
  errorMessages: {
@@ -575,6 +594,8 @@ declare const VSlider: {
575
594
  appendIcon: vue.PropType<IconValue>;
576
595
  prependIcon: vue.PropType<IconValue>;
577
596
  hideDetails: vue.PropType<boolean | "auto">;
597
+ hint: StringConstructor;
598
+ persistentHint: BooleanConstructor;
578
599
  messages: {
579
600
  type: vue.PropType<string | string[]>;
580
601
  default: () => never[];
@@ -4,7 +4,7 @@ import "./VSwitch.css";
4
4
 
5
5
  // Components
6
6
  import { makeSelectionControlProps, VSelectionControl } from "../VSelectionControl/VSelectionControl.mjs";
7
- import { filterInputProps, makeVInputProps, VInput } from "../VInput/VInput.mjs";
7
+ import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
8
8
  import { VProgressCircular } from "../VProgressCircular/index.mjs"; // Composables
9
9
  import { LoaderSlot, useLoader } from "../../composables/loader.mjs";
10
10
  import { useFocus } from "../../composables/focus.mjs";
@@ -57,10 +57,12 @@ export const VSwitch = genericComponent()({
57
57
  }
58
58
  useRender(() => {
59
59
  const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
60
- const [inputProps, _1] = filterInputProps(props);
60
+ const [inputProps, _1] = VInput.filterProps(props);
61
61
  const [controlProps, _2] = VSelectionControl.filterProps(props);
62
62
  const control = ref();
63
- function onClick() {
63
+ function onClick(e) {
64
+ e.stopPropagation();
65
+ e.preventDefault();
64
66
  control.value?.input?.click();
65
67
  }
66
68
  return _createVNode(VInput, _mergeProps({
@@ -1 +1 @@
1
- {"version":3,"file":"VSwitch.mjs","names":["makeSelectionControlProps","VSelectionControl","filterInputProps","makeVInputProps","VInput","VProgressCircular","LoaderSlot","useLoader","useFocus","useProxiedModel","computed","ref","filterInputAttrs","genericComponent","getUid","useRender","VSwitch","name","inheritAttrs","props","indeterminate","Boolean","inset","flat","loading","type","String","default","emits","focused","update:modelValue","val","setup","_ref","attrs","slots","model","loaderClasses","isFocused","focus","blur","loaderColor","color","uid","id","onChange","value","inputAttrs","controlAttrs","inputProps","_1","controlProps","_2","filterProps","control","onClick","input","click","_createVNode","_mergeProps","_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 { makeSelectionControlProps, VSelectionControl } from '@/components/VSelectionControl/VSelectionControl'\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { LoaderSlot, useLoader } from '@/composables/loader'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utility\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VSelectionControlSlots } from '@/components/VSelectionControl/VSelectionControl'\n\nexport type VSwitchSlots = VInputSlots & VSelectionControlSlots\n\nexport const VSwitch = genericComponent<VSwitchSlots>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: {\n indeterminate: Boolean,\n inset: Boolean,\n flat: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n\n ...makeVInputProps(),\n ...makeSelectionControlProps(),\n },\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] = filterInputProps(props)\n const [controlProps, _2] = VSelectionControl.filterProps(props)\n const control = ref<VSelectionControl>()\n\n function onClick () {\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 ]}\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,yBAAyB,EAAEC,iBAAiB;AAAA,SAC5CC,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,iBAAiB,0CAE1B;AAAA,SACSC,UAAU,EAAEC,SAAS;AAAA,SACrBC,QAAQ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ionControlProps","VSelectionControl","makeVInputProps","VInput","VProgressCircular","LoaderSlot","useLoader","useFocus","useProxiedModel","computed","ref","filterInputAttrs","genericComponent","getUid","useRender","VSwitch","name","inheritAttrs","props","indeterminate","Boolean","inset","flat","loading","type","String","default","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","_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 { makeSelectionControlProps, VSelectionControl } from '@/components/VSelectionControl/VSelectionControl'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { LoaderSlot, useLoader } from '@/composables/loader'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utility\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, 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 { MakeSlots } from '@/util'\n\nexport type VSwitchSlots =\n & VInputSlots\n & VSelectionControlSlots\n & MakeSlots<{ loader: [LoaderSlotProps] }>\n\nexport const VSwitch = genericComponent<VSwitchSlots>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: {\n indeterminate: Boolean,\n inset: Boolean,\n flat: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n\n ...makeVInputProps(),\n ...makeSelectionControlProps(),\n },\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 ]}\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,yBAAyB,EAAEC,iBAAiB;AAAA,SAC5CC,eAAe,EAAEC,MAAM;AAAA,SACvBC,iBAAiB,0CAE1B;AAAA,SACSC,UAAU,EAAEC,SAAS;AAAA,SACrBC,QAAQ;AAAA,SACRC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC1BC,gBAAgB,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,SAAS,gCAE9D;AAWA,OAAO,MAAMC,OAAO,GAAGH,gBAAgB,EAAgB,CAAC;EACtDI,IAAI,EAAE,SAAS;EAEfC,YAAY,EAAE,KAAK;EAEnBC,KAAK,EAAE;IACLC,aAAa,EAAEC,OAAO;IACtBC,KAAK,EAAED,OAAO;IACdE,IAAI,EAAEF,OAAO;IACbG,OAAO,EAAE;MACPC,IAAI,EAAE,CAACJ,OAAO,EAAEK,MAAM,CAAC;MACvBC,OAAO,EAAE;IACX,CAAC;IAED,GAAGxB,eAAe,EAAE;IACpB,GAAGF,yBAAyB;EAC9B,CAAC;EAED2B,KAAK,EAAE;IACL,gBAAgB,EAAGC,OAAgB,IAAK,IAAI;IAC5C,mBAAmB,EAAEC,CAAA,KAAM,IAAI;IAC/B,sBAAsB,EAAGC,GAAY,IAAK;EAC5C,CAAC;EAEDC,KAAKA,CAAEb,KAAK,EAAAc,IAAA,EAAoB;IAAA,IAAlB;MAAEC,KAAK;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC5B,MAAMb,aAAa,GAAGX,eAAe,CAACU,KAAK,EAAE,eAAe,CAAC;IA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,QAEN,UAAU;gBAAA;gBAAA,SAEP6D,OAAO,CAACrB,KAAK,KAAK,KAAK,GAAGuB,SAAS,GAAG5B,WAAW,CAACK;cAAK;gBAAAnB,OAAA,EAE7D8C,SAAS,IACTtC,KAAK,CAACuC,MAAM,GACRvC,KAAK,CAACuC,MAAM,CAACD,SAAS,CAAC,GAAAZ,YAAA,CAAAxD,iBAAA;kBAAA,UAGVoE,SAAS,CAACE,QAAQ;kBAAA,SACnBF,SAAS,CAAC/B,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"}
@@ -42,6 +42,11 @@ interface VInputSlot {
42
42
  validate: () => void;
43
43
  }
44
44
 
45
+ interface LoaderSlotProps {
46
+ color: string | undefined;
47
+ isActive: boolean;
48
+ }
49
+
45
50
  declare const VSwitch: {
46
51
  new (...args: any[]): {
47
52
  $: vue.ComponentInternalInstance;
@@ -64,6 +69,7 @@ declare const VSwitch: {
64
69
  errorMessages: string | string[];
65
70
  maxErrors: string | number;
66
71
  rules: ValidationRule[];
72
+ persistentHint: boolean;
67
73
  valueComparator: typeof deepEqual;
68
74
  }> & Omit<{
69
75
  flat: boolean;
@@ -83,6 +89,7 @@ declare const VSwitch: {
83
89
  errorMessages: string | string[];
84
90
  maxErrors: string | number;
85
91
  rules: ValidationRule[];
92
+ persistentHint: boolean;
86
93
  valueComparator: typeof deepEqual;
87
94
  } & {
88
95
  type?: string | undefined;
@@ -97,8 +104,10 @@ declare const VSwitch: {
97
104
  appendIcon?: IconValue | undefined;
98
105
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
99
106
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
107
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
100
108
  validateOn?: "input" | "blur" | "submit" | undefined;
101
109
  validationValue?: any;
110
+ hint?: string | undefined;
102
111
  hideDetails?: boolean | "auto" | undefined;
103
112
  falseIcon?: IconValue | undefined;
104
113
  trueIcon?: IconValue | undefined;
@@ -115,6 +124,7 @@ declare const VSwitch: {
115
124
  props: Record<string, unknown>;
116
125
  }) => vue.VNodeChild) | undefined;
117
126
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
127
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
118
128
  };
119
129
  $slots?: {
120
130
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -126,6 +136,7 @@ declare const VSwitch: {
126
136
  props: Record<string, unknown>;
127
137
  }) => vue.VNodeChild) | undefined;
128
138
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
139
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
129
140
  } | undefined;
130
141
  'v-slots'?: {
131
142
  default?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -137,6 +148,7 @@ declare const VSwitch: {
137
148
  props: Record<string, unknown>;
138
149
  }) => vue.VNodeChild) | undefined;
139
150
  input?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
151
+ loader?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
140
152
  } | undefined;
141
153
  } & {
142
154
  "v-slot:default"?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -148,11 +160,12 @@ declare const VSwitch: {
148
160
  props: Record<string, unknown>;
149
161
  }) => vue.VNodeChild) | undefined;
150
162
  "v-slot:input"?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
163
+ "v-slot:loader"?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
151
164
  } & {
152
165
  "onUpdate:modelValue"?: (() => any) | undefined;
153
166
  "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
154
167
  "onUpdate:indeterminate"?: ((val: boolean) => any) | undefined;
155
- } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "flat" | "inline" | "error" | "direction" | "inset" | "loading" | "disabled" | "multiple" | "readonly" | "indeterminate" | "messages" | "density" | "ripple" | "focused" | "errorMessages" | "maxErrors" | "rules" | "valueComparator">;
168
+ } & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "flat" | "inline" | "error" | "direction" | "inset" | "loading" | "disabled" | "multiple" | "readonly" | "indeterminate" | "messages" | "density" | "ripple" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint" | "valueComparator">;
156
169
  $attrs: {
157
170
  [x: string]: unknown;
158
171
  };
@@ -184,6 +197,7 @@ declare const VSwitch: {
184
197
  errorMessages: string | string[];
185
198
  maxErrors: string | number;
186
199
  rules: ValidationRule[];
200
+ persistentHint: boolean;
187
201
  valueComparator: typeof deepEqual;
188
202
  } & {
189
203
  type?: string | undefined;
@@ -198,8 +212,10 @@ declare const VSwitch: {
198
212
  appendIcon?: IconValue | undefined;
199
213
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
200
214
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
215
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
201
216
  validateOn?: "input" | "blur" | "submit" | undefined;
202
217
  validationValue?: any;
218
+ hint?: string | undefined;
203
219
  hideDetails?: boolean | "auto" | undefined;
204
220
  falseIcon?: IconValue | undefined;
205
221
  trueIcon?: IconValue | undefined;
@@ -216,6 +232,7 @@ declare const VSwitch: {
216
232
  props: Record<string, unknown>;
217
233
  }) => vue.VNodeChild) | undefined;
218
234
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
235
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
219
236
  };
220
237
  $slots?: {
221
238
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -227,6 +244,7 @@ declare const VSwitch: {
227
244
  props: Record<string, unknown>;
228
245
  }) => vue.VNodeChild) | undefined;
229
246
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
247
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
230
248
  } | undefined;
231
249
  'v-slots'?: {
232
250
  default?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -238,6 +256,7 @@ declare const VSwitch: {
238
256
  props: Record<string, unknown>;
239
257
  }) => vue.VNodeChild) | undefined;
240
258
  input?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
259
+ loader?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
241
260
  } | undefined;
242
261
  } & {
243
262
  "v-slot:default"?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -249,6 +268,7 @@ declare const VSwitch: {
249
268
  props: Record<string, unknown>;
250
269
  }) => vue.VNodeChild) | undefined;
251
270
  "v-slot:input"?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
271
+ "v-slot:loader"?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
252
272
  } & {
253
273
  "onUpdate:modelValue"?: (() => any) | undefined;
254
274
  "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
@@ -275,6 +295,7 @@ declare const VSwitch: {
275
295
  errorMessages: string | string[];
276
296
  maxErrors: string | number;
277
297
  rules: ValidationRule[];
298
+ persistentHint: boolean;
278
299
  valueComparator: typeof deepEqual;
279
300
  }, {}, string> & {
280
301
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
@@ -314,6 +335,7 @@ declare const VSwitch: {
314
335
  errorMessages: string | string[];
315
336
  maxErrors: string | number;
316
337
  rules: ValidationRule[];
338
+ persistentHint: boolean;
317
339
  valueComparator: typeof deepEqual;
318
340
  } & {
319
341
  type?: string | undefined;
@@ -328,8 +350,10 @@ declare const VSwitch: {
328
350
  appendIcon?: IconValue | undefined;
329
351
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
330
352
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
353
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
331
354
  validateOn?: "input" | "blur" | "submit" | undefined;
332
355
  validationValue?: any;
356
+ hint?: string | undefined;
333
357
  hideDetails?: boolean | "auto" | undefined;
334
358
  falseIcon?: IconValue | undefined;
335
359
  trueIcon?: IconValue | undefined;
@@ -346,6 +370,7 @@ declare const VSwitch: {
346
370
  props: Record<string, unknown>;
347
371
  }) => vue.VNodeChild) | undefined;
348
372
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
373
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
349
374
  };
350
375
  $slots?: {
351
376
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -357,6 +382,7 @@ declare const VSwitch: {
357
382
  props: Record<string, unknown>;
358
383
  }) => vue.VNodeChild) | undefined;
359
384
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
385
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
360
386
  } | undefined;
361
387
  'v-slots'?: {
362
388
  default?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -368,6 +394,7 @@ declare const VSwitch: {
368
394
  props: Record<string, unknown>;
369
395
  }) => vue.VNodeChild) | undefined;
370
396
  input?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
397
+ loader?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
371
398
  } | undefined;
372
399
  } & {
373
400
  "v-slot:default"?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -379,6 +406,7 @@ declare const VSwitch: {
379
406
  props: Record<string, unknown>;
380
407
  }) => vue.VNodeChild) | undefined;
381
408
  "v-slot:input"?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
409
+ "v-slot:loader"?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
382
410
  } & {
383
411
  "onUpdate:modelValue"?: (() => any) | undefined;
384
412
  "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
@@ -405,6 +433,7 @@ declare const VSwitch: {
405
433
  errorMessages: string | string[];
406
434
  maxErrors: string | number;
407
435
  rules: ValidationRule[];
436
+ persistentHint: boolean;
408
437
  valueComparator: typeof deepEqual;
409
438
  } & {
410
439
  type?: string | undefined;
@@ -419,8 +448,10 @@ declare const VSwitch: {
419
448
  appendIcon?: IconValue | undefined;
420
449
  'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
421
450
  'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
451
+ 'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
422
452
  validateOn?: "input" | "blur" | "submit" | undefined;
423
453
  validationValue?: any;
454
+ hint?: string | undefined;
424
455
  hideDetails?: boolean | "auto" | undefined;
425
456
  falseIcon?: IconValue | undefined;
426
457
  trueIcon?: IconValue | undefined;
@@ -437,6 +468,7 @@ declare const VSwitch: {
437
468
  props: Record<string, unknown>;
438
469
  }) => vue.VNodeChild) | undefined;
439
470
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
471
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
440
472
  };
441
473
  $slots?: {
442
474
  default?: (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -448,6 +480,7 @@ declare const VSwitch: {
448
480
  props: Record<string, unknown>;
449
481
  }) => vue.VNodeChild) | undefined;
450
482
  input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
483
+ loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
451
484
  } | undefined;
452
485
  'v-slots'?: {
453
486
  default?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -459,6 +492,7 @@ declare const VSwitch: {
459
492
  props: Record<string, unknown>;
460
493
  }) => vue.VNodeChild) | undefined;
461
494
  input?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
495
+ loader?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
462
496
  } | undefined;
463
497
  } & {
464
498
  "v-slot:default"?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
@@ -470,6 +504,7 @@ declare const VSwitch: {
470
504
  props: Record<string, unknown>;
471
505
  }) => vue.VNodeChild) | undefined;
472
506
  "v-slot:input"?: false | ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
507
+ "v-slot:loader"?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
473
508
  } & {
474
509
  "onUpdate:modelValue"?: (() => any) | undefined;
475
510
  "onUpdate:focused"?: ((focused: boolean) => any) | undefined;
@@ -496,6 +531,7 @@ declare const VSwitch: {
496
531
  errorMessages: string | string[];
497
532
  maxErrors: string | number;
498
533
  rules: ValidationRule[];
534
+ persistentHint: boolean;
499
535
  valueComparator: typeof deepEqual;
500
536
  }, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
501
537
  density: {
@@ -532,6 +568,7 @@ declare const VSwitch: {
532
568
  falseValue: null;
533
569
  value: null;
534
570
  focused: BooleanConstructor;
571
+ 'onUpdate:focused': vue.PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
535
572
  errorMessages: {
536
573
  type: vue.PropType<string | string[]>;
537
574
  default: () => never[];
@@ -549,6 +586,8 @@ declare const VSwitch: {
549
586
  appendIcon: vue.PropType<IconValue>;
550
587
  prependIcon: vue.PropType<IconValue>;
551
588
  hideDetails: vue.PropType<boolean | "auto">;
589
+ hint: StringConstructor;
590
+ persistentHint: BooleanConstructor;
552
591
  messages: {
553
592
  type: vue.PropType<string | string[]>;
554
593
  default: () => never[];
@@ -602,6 +641,7 @@ declare const VSwitch: {
602
641
  falseValue: null;
603
642
  value: null;
604
643
  focused: BooleanConstructor;
644
+ 'onUpdate:focused': vue.PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
605
645
  errorMessages: {
606
646
  type: vue.PropType<string | string[]>;
607
647
  default: () => never[];
@@ -619,6 +659,8 @@ declare const VSwitch: {
619
659
  appendIcon: vue.PropType<IconValue>;
620
660
  prependIcon: vue.PropType<IconValue>;
621
661
  hideDetails: vue.PropType<boolean | "auto">;
662
+ hint: StringConstructor;
663
+ persistentHint: BooleanConstructor;
622
664
  messages: {
623
665
  type: vue.PropType<string | string[]>;
624
666
  default: () => never[];
@@ -4,7 +4,7 @@ import "./VTextField.css";
4
4
 
5
5
  // Components
6
6
  import { filterFieldProps, makeVFieldProps, VField } from "../VField/VField.mjs";
7
- import { filterInputProps, makeVInputProps, VInput } from "../VInput/VInput.mjs";
7
+ import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
8
8
  import { VCounter } from "../VCounter/index.mjs"; // Directives
9
9
  import Intersect from "../../directives/intersect/index.mjs"; // Composables
10
10
  import { forwardRefs } from "../../composables/forwardRefs.mjs";
@@ -17,8 +17,6 @@ export const makeVTextFieldProps = propsFactory({
17
17
  autofocus: Boolean,
18
18
  counter: [Boolean, Number, String],
19
19
  counterValue: Function,
20
- hint: String,
21
- persistentHint: Boolean,
22
20
  prefix: String,
23
21
  placeholder: String,
24
22
  persistentPlaceholder: Boolean,
@@ -73,9 +71,6 @@ export const VTextField = genericComponent()({
73
71
  const vFieldRef = ref();
74
72
  const inputRef = ref();
75
73
  const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
76
- const messages = computed(() => {
77
- return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
78
- });
79
74
  function onFocus() {
80
75
  if (inputRef.value !== document.activeElement) {
81
76
  inputRef.value?.focus();
@@ -118,7 +113,7 @@ export const VTextField = genericComponent()({
118
113
  const [{
119
114
  modelValue: _,
120
115
  ...inputProps
121
- }] = filterInputProps(props);
116
+ }] = VInput.filterProps(props);
122
117
  const [fieldProps] = filterFieldProps(props);
123
118
  return _createVNode(VInput, _mergeProps({
124
119
  "ref": vInputRef,
@@ -128,12 +123,9 @@ export const VTextField = genericComponent()({
128
123
  'v-text-field--prefixed': props.prefix,
129
124
  'v-text-field--suffixed': props.suffix,
130
125
  'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
131
- }],
132
- "onClick:prepend": props['onClick:prepend'],
133
- "onClick:append": props['onClick:append']
126
+ }]
134
127
  }, rootAttrs, inputProps, {
135
- "focused": isFocused.value,
136
- "messages": messages.value
128
+ "focused": isFocused.value
137
129
  }), {
138
130
  ...slots,
139
131
  default: _ref2 => {
@@ -1 +1 @@
1
- {"version":3,"file":"VTextField.mjs","names":["filterFieldProps","makeVFieldProps","VField","filterInputProps","makeVInputProps","VInput","VCounter","Intersect","forwardRefs","useFocus","useProxiedModel","cloneVNode","computed","nextTick","ref","callEvent","filterInputAttrs","genericComponent","propsFactory","useRender","activeTypes","makeVTextFieldProps","autofocus","Boolean","counter","Number","String","counterValue","Function","hint","persistentHint","prefix","placeholder","persistentPlaceholder","persistentCounter","suffix","type","default","modelModifiers","Object","VTextField","name","directives","inheritAttrs","props","emits","e","focused","val","setup","_ref","attrs","emit","slots","model","isFocused","focus","blur","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","vInputRef","vFieldRef","inputRef","isActive","includes","messages","onFocus","document","activeElement","onControlMousedown","preventDefault","onControlClick","onClear","stopPropagation","onInput","el","trim","caretPosition","selectionStart","selectionEnd","hasCounter","hasDetails","details","rootAttrs","inputAttrs","modelValue","_","inputProps","fieldProps","_createVNode","_mergeProps","$event","variant","_ref2","id","isDisabled","isDirty","isReadonly","isValid","dirty","_ref3","class","fieldClass","slotProps","inputNode","_withDirectives","_resolveDirective","handler","once","_Fragment"],"sources":["../../../src/components/VTextField/VTextField.tsx"],"sourcesContent":["// Styles\nimport './VTextField.sass'\n\n// Components\nimport { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VCounter } from '@/components/VCounter'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { cloneVNode, computed, nextTick, ref } from 'vue'\nimport { callEvent, filterInputAttrs, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MakeSlots } from '@/util'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\nexport const makeVTextFieldProps = propsFactory({\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n hint: String,\n persistentHint: Boolean,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n modelModifiers: Object as PropType<Record<string, boolean>>,\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n}, 'v-text-field')\n\nexport const VTextField = genericComponent<Omit<VInputSlots & VFieldSlots, 'default'> & MakeSlots<{\n default: []\n}>>()({\n name: 'VTextField',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: makeVTextFieldProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value ?? '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as unknown as undefined\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n (entries[0].target as HTMLInputElement)?.focus?.()\n }\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VField>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n activeTypes.includes(props.type) ||\n props.persistentPlaceholder ||\n isFocused.value\n ))\n const messages = computed(() => {\n return props.messages.length\n ? props.messages\n : (isFocused.value || props.persistentHint) ? props.hint : ''\n })\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n\n if (e.target === inputRef.value) return\n\n onFocus()\n e.preventDefault()\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = null\n\n callEvent(props['onClick:clear'], e)\n })\n }\n function onInput (e: Event) {\n const el = e.target as HTMLInputElement\n model.value = el.value\n if (\n props.modelModifiers?.trim &&\n ['text', 'search', 'password', 'tel', 'url'].includes(props.type)\n ) {\n const caretPosition = [el.selectionStart, el.selectionEnd]\n nextTick(() => {\n el.selectionStart = caretPosition[0]\n el.selectionEnd = caretPosition[1]\n })\n }\n }\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = filterInputProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-text-field',\n {\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant),\n },\n ]}\n onClick:prepend={ props['onClick:prepend'] }\n onClick:append={ props['onClick:append'] }\n { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n messages={ messages.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n role=\"textbox\"\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value || props.dirty }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => {\n const inputNode = (\n <input\n ref={ inputRef }\n value={ model.value }\n onInput={ onInput }\n v-intersect={[{\n handler: onIntersect,\n }, null, ['once']]}\n autofocus={ props.autofocus }\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n name={ props.name }\n placeholder={ props.placeholder }\n size={ 1 }\n type={ props.type }\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n )\n\n return (\n <>\n { props.prefix && (\n <span class=\"v-text-field__prefix\">\n { props.prefix }\n </span>\n )}\n\n { slots.default ? (\n <div\n class={ fieldClass }\n data-no-activator=\"\"\n >\n { slots.default() }\n { inputNode }\n </div>\n ) : cloneVNode(inputNode, { class: fieldClass })}\n\n { props.suffix && (\n <span class=\"v-text-field__suffix\">\n { props.suffix }\n </span>\n )}\n </>\n )\n },\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ props.persistentCounter || isFocused.value }\n value={ counterValue.value }\n max={ max.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VTextField = InstanceType<typeof VTextField>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,QAAQ,iCAEjB;AAAA,OACOC,SAAS,8CAEhB;AAAA,SACSC,WAAW;AAAA,SACXC,QAAQ;AAAA,SACRC,eAAe,8CAExB;AACA,SAASC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAChDC,SAAS,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAE/E;AAMA,MAAMC,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;AAExF,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,SAAS,EAAEC,OAAO;EAClBC,OAAO,EAAE,CAACD,OAAO,EAAEE,MAAM,EAAEC,MAAM,CAAqC;EACtEC,YAAY,EAAEC,QAA4C;EAC1DC,IAAI,EAAEH,MAAM;EACZI,cAAc,EAAEP,OAAO;EACvBQ,MAAM,EAAEL,MAAM;EACdM,WAAW,EAAEN,MAAM;E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f2E,SAAS,KAEXrG,UAAU,CAACqG,SAAS,EAAE;gBAAEH,KAAK,EAAEC;cAAW,CAAC,CAAC,EAE9ClE,KAAK,CAACT,MAAM,IAAA8D,YAAA;gBAAA,SACA;cAAsB,IAC9BrD,KAAK,CAACT,MAAM,EAEjB;YAGP;UAAC;QAAA,CAGN;QACDuD,OAAO,EAAED,UAAU,GAAGsB,SAAS,IAAAd,YAAA,CAAAoB,SAAA,SAEzBhE,KAAK,CAACqC,OAAO,GAAGqB,SAAS,CAAC,EAE1BvB,UAAU,IAAAS,YAAA,CAAAoB,SAAA,SAAApB,YAAA,sBAAAA,YAAA,CAAA3F,QAAA;UAAA,UAKGsC,KAAK,CAACV,iBAAiB,IAAIqB,SAAS,CAACG,KAAK;UAAA,SAC3C/B,YAAY,CAAC+B,KAAK;UAAA,OACpBG,GAAG,CAACH;QAAK,GACGL,KAAK,CAAC7B,OAAO,GAGpC,EAEJ,GAAGuC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOvD,WAAW,CAAC,CAAC,CAAC,EAAE4D,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VTextField.mjs","names":["filterFieldProps","makeVFieldProps","VField","makeVInputProps","VInput","VCounter","Intersect","forwardRefs","useFocus","useProxiedModel","cloneVNode","computed","nextTick","ref","callEvent","filterInputAttrs","genericComponent","propsFactory","useRender","activeTypes","makeVTextFieldProps","autofocus","Boolean","counter","Number","String","counterValue","Function","prefix","placeholder","persistentPlaceholder","persistentCounter","suffix","type","default","modelModifiers","Object","VTextField","name","directives","inheritAttrs","props","emits","e","focused","val","setup","_ref","attrs","emit","slots","model","isFocused","focus","blur","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","vInputRef","vFieldRef","inputRef","isActive","includes","onFocus","document","activeElement","onControlMousedown","preventDefault","onControlClick","onClear","stopPropagation","onInput","el","trim","caretPosition","selectionStart","selectionEnd","hasCounter","hasDetails","details","rootAttrs","inputAttrs","modelValue","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","variant","_ref2","id","isDisabled","isDirty","isReadonly","isValid","dirty","_ref3","class","fieldClass","slotProps","inputNode","_withDirectives","_resolveDirective","handler","once","_Fragment"],"sources":["../../../src/components/VTextField/VTextField.tsx"],"sourcesContent":["// Styles\nimport './VTextField.sass'\n\n// Components\nimport { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VCounter } from '@/components/VCounter'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { cloneVNode, computed, nextTick, ref } from 'vue'\nimport { callEvent, filterInputAttrs, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { MakeSlots } from '@/util'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\nexport const makeVTextFieldProps = propsFactory({\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n modelModifiers: Object as PropType<Record<string, boolean>>,\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n}, 'v-text-field')\n\nexport const VTextField = genericComponent<Omit<VInputSlots & VFieldSlots, 'default'> & MakeSlots<{\n default: []\n}>>()({\n name: 'VTextField',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: makeVTextFieldProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value ?? '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as unknown as undefined\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n (entries[0].target as HTMLInputElement)?.focus?.()\n }\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VField>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n activeTypes.includes(props.type) ||\n props.persistentPlaceholder ||\n isFocused.value\n ))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n\n if (e.target === inputRef.value) return\n\n onFocus()\n e.preventDefault()\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = null\n\n callEvent(props['onClick:clear'], e)\n })\n }\n function onInput (e: Event) {\n const el = e.target as HTMLInputElement\n model.value = el.value\n if (\n props.modelModifiers?.trim &&\n ['text', 'search', 'password', 'tel', 'url'].includes(props.type)\n ) {\n const caretPosition = [el.selectionStart, el.selectionEnd]\n nextTick(() => {\n el.selectionStart = caretPosition[0]\n el.selectionEnd = caretPosition[1]\n })\n }\n }\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = VInput.filterProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-text-field',\n {\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant),\n },\n ]}\n { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n role=\"textbox\"\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value || props.dirty }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => {\n const inputNode = (\n <input\n ref={ inputRef }\n value={ model.value }\n onInput={ onInput }\n v-intersect={[{\n handler: onIntersect,\n }, null, ['once']]}\n autofocus={ props.autofocus }\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n name={ props.name }\n placeholder={ props.placeholder }\n size={ 1 }\n type={ props.type }\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n )\n\n return (\n <>\n { props.prefix && (\n <span class=\"v-text-field__prefix\">\n { props.prefix }\n </span>\n )}\n\n { slots.default ? (\n <div\n class={ fieldClass }\n data-no-activator=\"\"\n >\n { slots.default() }\n { inputNode }\n </div>\n ) : cloneVNode(inputNode, { class: fieldClass })}\n\n { props.suffix && (\n <span class=\"v-text-field__suffix\">\n { props.suffix }\n </span>\n )}\n </>\n )\n },\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ props.persistentCounter || isFocused.value }\n value={ counterValue.value }\n max={ max.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VTextField = InstanceType<typeof VTextField>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,eAAe,EAAEC,MAAM;AAAA,SACvBC,QAAQ,iCAEjB;AAAA,OACOC,SAAS,8CAEhB;AAAA,SACSC,WAAW;AAAA,SACXC,QAAQ;AAAA,SACRC,eAAe,8CAExB;AACA,SAASC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAChDC,SAAS,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAE/E;AAMA,MAAMC,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;AAExF,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,SAAS,EAAEC,OAAO;EAClBC,OAAO,EAAE,CAACD,OAAO,EAAEE,MAAM,EAAEC,MAAM,CAAqC;EACtEC,YAAY,EAAEC,QAA4C;EAC1DC,MAAM,EAAEH,MAAM;EACdI,WAAW,EAAEJ,MAAM;EACnBK,qBAAqB,EAAER,OAAO;EAC9BS,iBAAiB,EAAET,OAAO;EAC1BU,MAAM,EAAEP,MAAM;EACdQ,IAAI,EAAE;IACJA,IAAI,EAAER,MAAM;IACZS,OAAO,EAAE;EACX,CAAC;EACDC,cAAc,EAAEC,MAA2C;EAE3D,GAAGjC,eAAe,EAAE;EACpB,GAAGF,eAAe;AACpB,CAAC,EAAE,cAAc,CAA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