@volverjs/ui-vue 0.0.10-beta.58 → 0.0.10-beta.59

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 (88) hide show
  1. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +2 -2
  2. package/dist/components/VvAccordion/index.d.ts +2 -2
  3. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +10 -10
  4. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  5. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +14 -14
  6. package/dist/components/VvAccordionGroup/index.d.ts +5 -5
  7. package/dist/components/VvAction/VvAction.vue.d.ts +2 -2
  8. package/dist/components/VvAction/index.d.ts +1 -1
  9. package/dist/components/VvAlert/VvAlert.vue.d.ts +8 -8
  10. package/dist/components/VvAlert/index.d.ts +3 -4
  11. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +11 -11
  12. package/dist/components/VvAlertGroup/index.d.ts +5 -5
  13. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -2
  14. package/dist/components/VvAvatar/index.d.ts +1 -1
  15. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
  16. package/dist/components/VvAvatarGroup/index.d.ts +3 -3
  17. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  18. package/dist/components/VvBadge/index.d.ts +1 -1
  19. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +15 -15
  20. package/dist/components/VvBreadcrumb/index.d.ts +2 -2
  21. package/dist/components/VvButton/VvButton.vue.d.ts +8 -8
  22. package/dist/components/VvButton/index.d.ts +2 -2
  23. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -6
  24. package/dist/components/VvButtonGroup/index.d.ts +3 -3
  25. package/dist/components/VvCard/VvCard.vue.d.ts +2 -2
  26. package/dist/components/VvCard/index.d.ts +1 -1
  27. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -3
  28. package/dist/components/VvCheckbox/index.d.ts +1 -1
  29. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +6 -6
  30. package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
  31. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +560 -219
  32. package/dist/components/VvCombobox/index.d.ts +241 -21
  33. package/dist/components/VvDialog/VvDialog.vue.d.ts +2 -2
  34. package/dist/components/VvDialog/index.d.ts +1 -1
  35. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +272 -37
  36. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +8 -16
  37. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
  38. package/dist/components/VvDropdown/index.d.ts +117 -9
  39. package/dist/components/VvIcon/VvIcon.vue.d.ts +1 -1
  40. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
  41. package/dist/components/VvInputFile/index.d.ts +8 -8
  42. package/dist/components/VvInputText/VvInputClearAction.d.ts +3 -3
  43. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +5 -5
  44. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  45. package/dist/components/VvInputText/VvInputText.es.js +16 -16
  46. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  47. package/dist/components/VvInputText/VvInputText.vue.d.ts +21 -21
  48. package/dist/components/VvInputText/index.d.ts +24 -7
  49. package/dist/components/VvNav/VvNav.vue.d.ts +13 -13
  50. package/dist/components/VvNav/index.d.ts +2 -2
  51. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  52. package/dist/components/VvProgress/index.d.ts +1 -1
  53. package/dist/components/VvRadio/VvRadio.vue.d.ts +3 -3
  54. package/dist/components/VvRadio/index.d.ts +1 -1
  55. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +6 -6
  56. package/dist/components/VvRadioGroup/index.d.ts +2 -2
  57. package/dist/components/VvSelect/VvSelect.vue.d.ts +183 -62
  58. package/dist/components/VvSelect/index.d.ts +8 -8
  59. package/dist/components/VvTab/VvTab.vue.d.ts +15 -15
  60. package/dist/components/VvTab/index.d.ts +3 -3
  61. package/dist/components/VvTextarea/VvTextarea.es.js +10 -10
  62. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  63. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +11 -11
  64. package/dist/components/VvTextarea/index.d.ts +9 -6
  65. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +4 -4
  66. package/dist/components/VvTooltip/index.d.ts +1 -1
  67. package/dist/components/index.es.js +16 -16
  68. package/dist/components/index.umd.js +1 -1
  69. package/dist/composables/alert/useAlert.d.ts +12 -12
  70. package/dist/composables/dropdown/useDropdownContextmenu.d.ts +1 -1
  71. package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +1 -1
  72. package/dist/composables/group/useGroupStateInject.d.ts +1 -1
  73. package/dist/composables/useBlurhash.d.ts +1 -1
  74. package/dist/composables/useOptions.d.ts +3 -3
  75. package/dist/composables/usePersistence.d.ts +1 -1
  76. package/dist/icons.es.js +3 -3
  77. package/dist/icons.umd.js +1 -1
  78. package/dist/props/index.d.ts +121 -14
  79. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +362 -298
  80. package/dist/test/expect.d.ts +1 -0
  81. package/dist/utils/DateUtilities.d.ts +9 -0
  82. package/dist/utils/ObjectUtilities.d.ts +1 -1
  83. package/package.json +30 -30
  84. package/src/assets/icons/detailed.json +1 -1
  85. package/src/assets/icons/normal.json +1 -1
  86. package/src/assets/icons/simple.json +1 -1
  87. package/src/composables/usePersistence.ts +13 -12
  88. package/src/utils/DateUtilities.ts +24 -7
@@ -1,68 +1,114 @@
1
1
  import type { Option } from '../../types/generic';
2
- declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
- props: __VLS_PrettifyLocal<Pick<Partial<{
4
- floating: boolean;
5
- label: string | number;
6
- disabled: boolean;
7
- modelValue: string | number | boolean | unknown[] | Record<string, any>;
8
- modifiers: string | string[];
9
- icon: string | import("../VvIcon").VvIconProps;
10
- iconPosition: "before" | "after";
11
- required: boolean;
12
- loading: boolean;
13
- loadingLabel: string;
14
- unselectable: boolean;
15
- multiple: boolean;
16
- readonly: boolean;
17
- hintLabel: string;
18
- invalid: boolean;
19
- invalidLabel: string | unknown[];
20
- valid: boolean;
21
- validLabel: string | unknown[];
22
- tabindex: string | number;
23
- options: T[];
24
- labelKey: string | Function;
25
- valueKey: string | Function;
26
- disabledKey: string | Function;
27
- autoselectFirst: boolean;
28
- autocomplete: string;
29
- autofocus: boolean;
30
- }> & Omit<{
31
- readonly floating: boolean;
32
- readonly disabled: boolean;
33
- readonly iconPosition: "before" | "after";
34
- readonly required: boolean;
35
- readonly loading: boolean;
36
- readonly loadingLabel: string;
37
- readonly unselectable: boolean;
38
- readonly multiple: boolean;
39
- readonly readonly: boolean;
40
- readonly hintLabel: string;
41
- readonly invalid: boolean;
42
- readonly valid: boolean;
43
- readonly tabindex: string | number;
44
- readonly options: T[];
45
- readonly labelKey: string | Function;
46
- readonly valueKey: string | Function;
47
- readonly disabledKey: string | Function;
48
- readonly autoselectFirst: boolean;
49
- readonly autocomplete: string;
50
- readonly autofocus: boolean;
51
- readonly size?: string | number | undefined;
2
+ declare const _default: <T extends string | Option>(__VLS_props: {
3
+ floating?: boolean | undefined;
4
+ readonly name?: string | undefined;
5
+ options?: T[] | undefined;
6
+ readonly size?: string | number | undefined;
7
+ label?: string | number | undefined;
8
+ disabled?: boolean | undefined;
9
+ modelValue?: string | number | boolean | unknown[] | Record<string, any> | undefined;
10
+ modifiers?: string | string[] | undefined;
11
+ invalid?: boolean | undefined;
12
+ readonly id?: string | number | undefined;
13
+ readonly onFocus?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
14
+ readonly onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
15
+ icon?: string | import("../VvIcon").VvIconProps | undefined;
16
+ iconPosition?: "before" | "after" | undefined;
17
+ required?: boolean | undefined;
18
+ loading?: boolean | undefined;
19
+ loadingLabel?: string | undefined;
20
+ unselectable?: boolean | undefined;
21
+ multiple?: boolean | undefined;
22
+ readonly?: boolean | undefined;
23
+ hintLabel?: string | undefined;
24
+ invalidLabel?: string | unknown[] | undefined;
25
+ valid?: boolean | undefined;
26
+ validLabel?: string | unknown[] | undefined;
27
+ tabindex?: string | number | undefined;
28
+ labelKey?: string | Function | undefined;
29
+ valueKey?: string | Function | undefined;
30
+ disabledKey?: string | Function | undefined;
31
+ readonly "onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
32
+ autoselectFirst?: boolean | undefined;
33
+ readonly placeholder?: string | undefined;
34
+ autocomplete?: string | undefined;
35
+ autofocus?: boolean | undefined;
36
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
37
+ slots: {
38
+ before?(_: {
39
+ valid: boolean;
40
+ invalid: boolean;
41
+ modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
42
+ }): any;
43
+ after?(_: {
44
+ valid: boolean;
45
+ invalid: boolean;
46
+ modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
47
+ }): any;
48
+ hint?(_: {
49
+ modelValue: unknown;
50
+ valid: boolean;
51
+ invalid: boolean;
52
+ loading: boolean;
53
+ }): any;
54
+ loading?(_: {
55
+ modelValue: unknown;
56
+ valid: boolean;
57
+ invalid: boolean;
58
+ loading: boolean;
59
+ }): any;
60
+ valid?(_: {
61
+ modelValue: unknown;
62
+ valid: boolean;
63
+ invalid: boolean;
64
+ loading: boolean;
65
+ }): any;
66
+ invalid?(_: {
67
+ modelValue: unknown;
68
+ valid: boolean;
69
+ invalid: boolean;
70
+ loading: boolean;
71
+ }): any;
72
+ };
73
+ attrs: any;
74
+ emit: ((evt: "update:modelValue", args_0: any) => void) & ((evt: "blur", args_0: import("@vueuse/core").MaybeElement) => void) & ((evt: "focus", args_0: import("@vueuse/core").MaybeElement) => void);
75
+ } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
76
+ props: {
77
+ floating?: boolean | undefined;
52
78
  readonly name?: string | undefined;
53
- readonly label?: string | number | undefined;
54
- readonly modelValue?: string | number | boolean | unknown[] | Record<string, any> | undefined;
55
- readonly modifiers?: string | string[] | undefined;
79
+ options?: T[] | undefined;
80
+ readonly size?: string | number | undefined;
81
+ label?: string | number | undefined;
82
+ disabled?: boolean | undefined;
83
+ modelValue?: string | number | boolean | unknown[] | Record<string, any> | undefined;
84
+ modifiers?: string | string[] | undefined;
85
+ invalid?: boolean | undefined;
56
86
  readonly id?: string | number | undefined;
57
- readonly icon?: string | import("../VvIcon").VvIconProps | undefined;
58
- readonly invalidLabel?: string | unknown[] | undefined;
59
- readonly validLabel?: string | unknown[] | undefined;
60
- readonly placeholder?: string | undefined;
61
- readonly "onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
62
- readonly onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
63
87
  readonly onFocus?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
64
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "floating" | "label" | "disabled" | "modelValue" | "modifiers" | "icon" | "iconPosition" | "required" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "readonly" | "hintLabel" | "invalid" | "invalidLabel" | "valid" | "validLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "autoselectFirst" | "autocomplete" | "autofocus">, "size" | "name" | "id" | "onFocus" | "onBlur" | "onUpdate:modelValue" | "placeholder" | ("floating" | "label" | "disabled" | "modelValue" | "modifiers" | "icon" | "iconPosition" | "required" | "loading" | "loadingLabel" | "unselectable" | "multiple" | "readonly" | "hintLabel" | "invalid" | "invalidLabel" | "valid" | "validLabel" | "tabindex" | "options" | "labelKey" | "valueKey" | "disabledKey" | "autoselectFirst" | "autocomplete" | "autofocus")> & Partial<{}> & {}> & import("vue").PublicProps;
65
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
88
+ readonly onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
89
+ icon?: string | import("../VvIcon").VvIconProps | undefined;
90
+ iconPosition?: "before" | "after" | undefined;
91
+ required?: boolean | undefined;
92
+ loading?: boolean | undefined;
93
+ loadingLabel?: string | undefined;
94
+ unselectable?: boolean | undefined;
95
+ multiple?: boolean | undefined;
96
+ readonly?: boolean | undefined;
97
+ hintLabel?: string | undefined;
98
+ invalidLabel?: string | unknown[] | undefined;
99
+ valid?: boolean | undefined;
100
+ validLabel?: string | unknown[] | undefined;
101
+ tabindex?: string | number | undefined;
102
+ labelKey?: string | Function | undefined;
103
+ valueKey?: string | Function | undefined;
104
+ disabledKey?: string | Function | undefined;
105
+ readonly "onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
106
+ autoselectFirst?: boolean | undefined;
107
+ readonly placeholder?: string | undefined;
108
+ autocomplete?: string | undefined;
109
+ autofocus?: boolean | undefined;
110
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
111
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
66
112
  attrs: any;
67
113
  slots: {
68
114
  before?(_: {
@@ -104,7 +150,82 @@ declare const _default: <T extends string | Option>(__VLS_props: NonNullable<Awa
104
150
  }>) => globalThis.VNode<import("vue").RendererNode, import("vue").RendererElement, {
105
151
  [key: string]: any;
106
152
  }> & {
107
- __ctx?: Awaited<typeof __VLS_setup>;
153
+ __ctx?: {
154
+ props: {
155
+ floating?: boolean | undefined;
156
+ readonly name?: string | undefined;
157
+ options?: T[] | undefined;
158
+ readonly size?: string | number | undefined;
159
+ label?: string | number | undefined;
160
+ disabled?: boolean | undefined;
161
+ modelValue?: string | number | boolean | unknown[] | Record<string, any> | undefined;
162
+ modifiers?: string | string[] | undefined;
163
+ invalid?: boolean | undefined;
164
+ readonly id?: string | number | undefined;
165
+ readonly onFocus?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
166
+ readonly onBlur?: ((args_0: import("@vueuse/core").MaybeElement) => any) | undefined;
167
+ icon?: string | import("../VvIcon").VvIconProps | undefined;
168
+ iconPosition?: "before" | "after" | undefined;
169
+ required?: boolean | undefined;
170
+ loading?: boolean | undefined;
171
+ loadingLabel?: string | undefined;
172
+ unselectable?: boolean | undefined;
173
+ multiple?: boolean | undefined;
174
+ readonly?: boolean | undefined;
175
+ hintLabel?: string | undefined;
176
+ invalidLabel?: string | unknown[] | undefined;
177
+ valid?: boolean | undefined;
178
+ validLabel?: string | unknown[] | undefined;
179
+ tabindex?: string | number | undefined;
180
+ labelKey?: string | Function | undefined;
181
+ valueKey?: string | Function | undefined;
182
+ disabledKey?: string | Function | undefined;
183
+ readonly "onUpdate:modelValue"?: ((args_0: any) => any) | undefined;
184
+ autoselectFirst?: boolean | undefined;
185
+ readonly placeholder?: string | undefined;
186
+ autocomplete?: string | undefined;
187
+ autofocus?: boolean | undefined;
188
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
189
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
190
+ attrs: any;
191
+ slots: {
192
+ before?(_: {
193
+ valid: boolean;
194
+ invalid: boolean;
195
+ modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
196
+ }): any;
197
+ after?(_: {
198
+ valid: boolean;
199
+ invalid: boolean;
200
+ modelValue: string | number | boolean | unknown[] | Record<string, any> | undefined;
201
+ }): any;
202
+ hint?(_: {
203
+ modelValue: unknown;
204
+ valid: boolean;
205
+ invalid: boolean;
206
+ loading: boolean;
207
+ }): any;
208
+ loading?(_: {
209
+ modelValue: unknown;
210
+ valid: boolean;
211
+ invalid: boolean;
212
+ loading: boolean;
213
+ }): any;
214
+ valid?(_: {
215
+ modelValue: unknown;
216
+ valid: boolean;
217
+ invalid: boolean;
218
+ loading: boolean;
219
+ }): any;
220
+ invalid?(_: {
221
+ modelValue: unknown;
222
+ valid: boolean;
223
+ invalid: boolean;
224
+ loading: boolean;
225
+ }): any;
226
+ };
227
+ emit: ((evt: "update:modelValue", args_0: any) => void) & ((evt: "blur", args_0: import("@vueuse/core").MaybeElement) => void) & ((evt: "focus", args_0: import("@vueuse/core").MaybeElement) => void);
228
+ } | undefined;
108
229
  };
109
230
  export default _default;
110
231
  type __VLS_PrettifyLocal<T> = {
@@ -56,16 +56,16 @@ export declare const VvSelectProps: {
56
56
  default: boolean;
57
57
  };
58
58
  icon: {
59
- type: PropType<string | import("../VvIcon").VvIconProps>;
59
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
60
60
  default: undefined;
61
61
  };
62
62
  iconPosition: {
63
- type: PropType<`${import("../../constants").Position}`>;
63
+ type: globalThis.PropType<"before" | "after">;
64
64
  default: import("../../constants").Position;
65
65
  validation: (value: import("../../constants").Position) => boolean;
66
66
  };
67
67
  options: {
68
- type: PropType<(Option | string)[]>;
68
+ type: globalThis.PropType<(string | Option)[]>;
69
69
  default: () => never[];
70
70
  };
71
71
  labelKey: {
@@ -81,7 +81,7 @@ export declare const VvSelectProps: {
81
81
  default: string;
82
82
  };
83
83
  modifiers: {
84
- type: PropType<string | string[]>;
84
+ type: globalThis.PropType<string | string[]>;
85
85
  default: undefined;
86
86
  };
87
87
  readonly: {
@@ -140,7 +140,7 @@ export declare const VvSelectProps: {
140
140
  };
141
141
  export declare function useVvSelectProps<T extends Option | string>(): {
142
142
  options: {
143
- type: PropType<T[]>;
143
+ type: globalThis.PropType<T[]>;
144
144
  default: () => never[];
145
145
  };
146
146
  /**
@@ -193,11 +193,11 @@ export declare function useVvSelectProps<T extends Option | string>(): {
193
193
  default: boolean;
194
194
  };
195
195
  icon: {
196
- type: PropType<string | import("../VvIcon").VvIconProps>;
196
+ type: globalThis.PropType<string | import("../VvIcon").VvIconProps>;
197
197
  default: undefined;
198
198
  };
199
199
  iconPosition: {
200
- type: PropType<`${import("../../constants").Position}`>;
200
+ type: globalThis.PropType<"before" | "after">;
201
201
  default: import("../../constants").Position;
202
202
  validation: (value: import("../../constants").Position) => boolean;
203
203
  };
@@ -214,7 +214,7 @@ export declare function useVvSelectProps<T extends Option | string>(): {
214
214
  default: string;
215
215
  };
216
216
  modifiers: {
217
- type: PropType<string | string[]>;
217
+ type: globalThis.PropType<string | string[]>;
218
218
  default: undefined;
219
219
  };
220
220
  readonly: {
@@ -1,34 +1,34 @@
1
1
  import type { NavItemTab } from '@/types/nav';
2
2
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
3
3
  navModifiers: {
4
- type: PropType<string | string[]>;
4
+ type: globalThis.PropType<string | string[]>;
5
5
  };
6
6
  modelValue: {
7
7
  type: StringConstructor;
8
8
  default: string;
9
9
  };
10
10
  items: {
11
- type: PropType<NavItemTab[]>;
11
+ type: globalThis.PropType<NavItemTab[]>;
12
12
  default: () => never[];
13
13
  };
14
14
  modifiers: {
15
- type: PropType<string | string[]>;
15
+ type: globalThis.PropType<string | string[]>;
16
16
  default: undefined;
17
17
  };
18
18
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
19
19
  navModifiers: {
20
- type: PropType<string | string[]>;
20
+ type: globalThis.PropType<string | string[]>;
21
21
  };
22
22
  modelValue: {
23
23
  type: StringConstructor;
24
24
  default: string;
25
25
  };
26
26
  items: {
27
- type: PropType<NavItemTab[]>;
27
+ type: globalThis.PropType<NavItemTab[]>;
28
28
  default: () => never[];
29
29
  };
30
30
  modifiers: {
31
- type: PropType<string | string[]>;
31
+ type: globalThis.PropType<string | string[]>;
32
32
  default: undefined;
33
33
  };
34
34
  }>> & Readonly<{}>, {
@@ -39,15 +39,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<gl
39
39
  "nav-item"?(_: {
40
40
  item: {
41
41
  label: string;
42
- ariaLabel?: string;
43
- title?: string;
44
- to?: string | Record<string, unknown>;
45
- href?: string;
46
- target?: string;
47
- rel?: string;
48
- disabled?: boolean;
49
- current?: boolean;
50
- class?: string | string[];
42
+ ariaLabel?: string | undefined;
43
+ title?: string | undefined;
44
+ to?: string | Record<string, unknown> | undefined;
45
+ href?: string | undefined;
46
+ target?: string | undefined;
47
+ rel?: string | undefined;
48
+ disabled?: boolean | undefined;
49
+ current?: boolean | undefined;
50
+ class?: string | string[] | undefined;
51
51
  };
52
52
  data: Record<string, unknown> | undefined;
53
53
  index: number;
@@ -1,18 +1,18 @@
1
1
  import type { NavItemTab } from '@/types/nav';
2
2
  export declare const VvTabProps: {
3
3
  navModifiers: {
4
- type: PropType<string | string[]>;
4
+ type: globalThis.PropType<string | string[]>;
5
5
  };
6
6
  modelValue: {
7
7
  type: StringConstructor;
8
8
  default: string;
9
9
  };
10
10
  items: {
11
- type: PropType<NavItemTab[]>;
11
+ type: globalThis.PropType<NavItemTab[]>;
12
12
  default: () => never[];
13
13
  };
14
14
  modifiers: {
15
- type: PropType<string | string[]>;
15
+ type: globalThis.PropType<string | string[]>;
16
16
  default: undefined;
17
17
  };
18
18
  };
@@ -1654,6 +1654,9 @@ function usePersistence(storageKey, storageType = StorageType.local, defaultValu
1654
1654
  (storageValue == null ? void 0 : storageValue.value) ?? localValue.value,
1655
1655
  storage
1656
1656
  );
1657
+ if (storageValue.value) {
1658
+ localValue.value = storageValue.value;
1659
+ }
1657
1660
  return;
1658
1661
  }
1659
1662
  storageValue = void 0;
@@ -1682,18 +1685,15 @@ function usePersistence(storageKey, storageType = StorageType.local, defaultValu
1682
1685
  });
1683
1686
  }
1684
1687
  });
1685
- return computed({
1686
- get: () => {
1687
- return (storageValue == null ? void 0 : storageValue.value) ?? localValue.value;
1688
- },
1689
- set: (value) => {
1690
- if (storageValue) {
1691
- storageValue.value = value;
1692
- return;
1693
- }
1694
- localValue.value = value;
1688
+ watch(localValue, (newValue) => {
1689
+ if (storageValue) {
1690
+ storageValue.value = newValue;
1695
1691
  }
1692
+ }, {
1693
+ deep: true,
1694
+ immediate: true
1696
1695
  });
1696
+ return localValue;
1697
1697
  }
1698
1698
  const _hoisted_1 = ["for"];
1699
1699
  const _hoisted_2 = {
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("@vueuse/core"),require("mitt"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","@vueuse/core","mitt","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.core,e.mitt,e.vue$2)}(this,(function(e,t,o,l,a){"use strict";var n=(e=>(e.local="local",e.session="session",e))(n||{}),r=(e=>(e.absolute="absolute",e.fixed="fixed",e))(r||{}),i=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(i||{}),u=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(u||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),s=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(s||{}),c=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(c||{}),v=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(v||{}),f=(e=>(e.listbox="listbox",e.menu="menu",e))(f||{}),p=(e=>(e.option="option",e.presentation="presentation",e))(p||{});const m=Symbol.for("volver"),g=Symbol.for("dropdownTrigger"),b=Symbol.for("dropdownItem"),h=Symbol.for("dropdownAction"),y={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},S={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},x={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},w={disabled:{type:Boolean,default:!1}},k={required:{type:Boolean,default:!1}},B={selected:{type:Boolean,default:!1}},L=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),$={readonly:{type:Boolean,default:!1}},V={modifiers:{type:[String,Array],default:void 0}},E={hintLabel:{type:String,default:""}},O={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},P={debounce:{type:[Number,String],default:void 0}},C={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},N={tabindex:{type:[String,Number],default:0}},_={floating:{type:Boolean,default:!1}},z={unselectable:{type:Boolean,default:!0}},R={id:[String,Number]},j={placement:{type:String,default:i.bottom,validator:e=>Object.values(i).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(r).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},I={...{...R,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...N,...w,...$,...y,...S,...E,...x,...V,...O,...P,...C,..._,...L,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...k};s.button,c.button;const F={prefix:"normal"},A={...I,...{storageType:{type:String,default:n.local,validator:e=>Object.values(n).includes(e)},storageKey:String},modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},iconRemoveSuggestion:{type:[String,Object],default:"trash"},labelRemoveSuggestion:{type:String,default:"Remove suggestion"},maxSuggestions:{type:Number,default:5},selectOnFocus:{type:Boolean,default:!1},resizable:Boolean};function H(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function D(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const T={...R,...j,...V,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:f.menu,validator:e=>Object.values(f).includes(e)}},q={focusOnHover:{type:Boolean,default:!1}},M={...w,...B,...z,...V,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function W(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}function K(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const J=["id","tabindex","role","aria-labelledby"],U=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:T,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(a,{expose:n,emit:u}){const d=a,s=u,{id:c}=e.toRefs(d),v=W(c),m=e.useAttrs(),h=e.ref("auto"),y=e.ref("auto"),S=e.ref(),x=e.ref(),w=e.ref(),k=e.ref(),B=e.computed({get:()=>d.reference??S.value,set:e=>{S.value=e}}),L=e.ref(!1);e.onMounted((()=>{o.useMutationObserver(x.value,(()=>{var e;L.value="true"===(null==(e=window.getComputedStyle(x.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const $=e.computed((()=>{const e=[];if(d.autoPlacement?"boolean"==typeof d.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(d.autoPlacement)):d.flip&&("boolean"==typeof d.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(d.flip))),d.shift&&("boolean"==typeof d.shift?e.push(t.shift()):e.push(t.shift(d.shift))),d.size){const o=({availableWidth:e,availableHeight:t})=>{h.value=`${e}px`,y.value=`${t}px`};"boolean"==typeof d.size?e.push(t.size({apply:o})):e.push(t.size({...d.size,apply:o}))}return d.offset&&(e.push(t.offset(Number(d.offset))),["string","number"].includes(typeof d.offset)?e.push(t.offset(Number(d.offset))):e.push(t.offset(d.offset))),d.arrow&&e.push(t.arrow({element:w})),e})),{x:V,y:E,middlewareData:O,placement:P,strategy:C}=t.useFloating(B,x,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:d.strategy===r.fixed}),placement:e.computed((()=>d.placement)),strategy:e.computed((()=>d.strategy)),middleware:$}),N=e.computed((()=>{var e;if(L.value)return;const t=d.triggerWidth&&B.value?`${null==(e=B.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${E.value??0}px`,left:`${V.value??0}px`,maxWidth:t?void 0:h.value,maxHeight:y.value,width:t}})),_=e.computed((()=>P.value.split("-")[0])),z=e.computed((()=>{var e,t,o,l,a;if(L.value)return;const n={[i.top]:i.bottom,[i.right]:i.left,[i.bottom]:i.top,[i.left]:i.right}[_.value];return{left:void 0!==(null==(e=O.value.arrow)?void 0:e.x)?`${null==(t=O.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=O.value.arrow)?void 0:o.y)?`${null==(l=O.value.arrow)?void 0:l.y}px`:void 0,[n]:-((null==(a=w.value)?void 0:a.offsetWidth)??0)/2+"px"}})),R=o.useVModel(d,"modelValue",s),j=e.ref(!1),I=e.computed({get:()=>R.value??j.value,set:e=>{void 0!==R.value?R.value=e:j.value=e}});function F(){I.value=!0}function A(){I.value=!1}function H(){I.value=!I.value}function D(e){B.value=e}n({toggle:H,show:F,hide:A,init:D,customPosition:L}),e.watch(I,(t=>{t&&d.autofocusFirst&&e.nextTick((()=>{const e=Z(x.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),o.onClickOutside(x,(()=>{!d.keepOpen&&I.value&&(I.value=!1)}),{ignore:[B]});const T=e.computed((()=>{var e,t;return(null==(t=null==(e=B.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),q=e.computed((()=>({"aria-controls":v.value,"aria-haspopup":!0,"aria-expanded":I.value}))),{component:M,bus:U}=function({reference:t,id:o,expanded:a,aria:n}){const r=l(),i=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(g,{reference:t,id:o,expanded:a,aria:n,bus:r})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:r,component:i}}({reference:B,id:v,expanded:I,aria:q});U.on("click",H);const{role:G,modifiers:Q}=e.toRefs(d),X=K("vv-dropdown",Q,e.computed((()=>({arrow:d.arrow})))),{focused:Y}=o.useFocusWithin(x);function Z(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}const ee=o.useElementHover(x),{itemRole:te}=function({role:t,...o}){const l=e.computed((()=>t.value===f.listbox?p.option:p.presentation));return e.provide(b,{role:l,...o}),{itemRole:l}}({role:G,expanded:I,focused:Y,hovered:ee});o.onKeyStroke("Escape",(e=>{I.value&&(e.preventDefault(),A())})),o.onKeyStroke("ArrowDown",(t=>{I.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=Z(x.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),o.onKeyStroke("ArrowUp",(t=>{I.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=Z(x.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),o.onKeyStroke([" ","Enter"],(e=>{const t=e.target;I.value&&Y.value&&t&&(null==t||t.click())}));const oe={"before-enter":()=>{s(I.value?"beforeExpand":"beforeCollapse"),s("beforeEnter")},"after-leave":()=>{s(I.value?"afterExpand":"afterCollapse"),s("afterLeave")},enter:()=>{s("enter")},"after-enter":()=>{s("afterEnter")},"enter-cancelled":()=>{s("enterCancelled")},"before-leave":()=>{s("beforeLeave")},leave:()=>{s("leave")},"leave-cancelled":()=>{s("leaveCancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(M),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:D,show:F,hide:A,toggle:H,expanded:e.unref(I),aria:e.unref(q)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(oe),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:x,style:e.normalizeStyle(e.unref(N)),class:e.normalizeClass(e.unref(X))},[d.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:w,style:e.normalizeStyle(e.unref(z)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(I)}))),e.createElementVNode("div",e.mergeProps(e.unref(m),{id:e.unref(v),ref_key:"listEl",ref:k,tabindex:e.unref(I)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(T),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(te)})))],16,J),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(I)})))],6),[[e.vShow,e.unref(I)]])])),_:3},16,["name"])],64))}});const G=e.defineComponent({name:"VvDropdownItem",props:q,setup(t){const l=t,{role:a,expanded:n}=e.inject(b,{}),r=e.ref(null);!function({expanded:t}){e.provide(h,{role:e.ref(v.menuitem),expanded:t})}({expanded:n});const i=o.useElementHover(r),{focused:u}=o.useFocus(r),{focused:d}=o.useFocusWithin(r);return e.watch(i,(e=>{e&&l.focusOnHover&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(a)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(d)}]}),[e.renderSlot(t.$slots,"default")],16))}}),Q=["title"],X=e.defineComponent({name:"VvDropdownOption",props:M,setup(t){const o=t,{modifiers:l}=e.toRefs(o),a=K("vv-dropdown-option",l,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),n=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?"":o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(G,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled,"focus-on-hover":t.focusOnHover},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,Q)])),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}});function Y(){return e.inject(m)}const Z=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},F),setup(t){const o=t,l=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=Y(),{modifiers:i}=e.toRefs(o),u=K("vv-icon",i),d=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(a.iconExists(t))return t;const l=null==r?void 0:r.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return a.iconExists(o)}));return l?`@${d.value}:${l.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),l=(null==t?void 0:t.innerHTML.trim())||"";t&&l&&a.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:l,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return r&&o.src&&!a.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(a.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(l),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function ee(t,o){const l=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==o?void 0:o.value)===d.before?l.value:void 0)),n=e.computed((()=>(null==o?void 0:o.value)===d.after?l.value:void 0)),r=e.computed((()=>(null==o?void 0:o.value)===i.left?l.value:void 0)),u=e.computed((()=>(null==o?void 0:o.value)===i.right?l.value:void 0)),s=e.computed((()=>(null==o?void 0:o.value)===i.top?l.value:void 0)),c=e.computed((()=>(null==o?void 0:o.value)===i.bottom?l.value:void 0));return{hasIcon:l,hasIconLeft:r,hasIconRight:u,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:n}}const te=["for"],oe={key:0,class:"vv-textarea__input-before"},le={class:"vv-textarea__inner"},ae=["id"],ne={key:1,class:"vv-textarea__input-after"},re={key:2,class:"vv-textarea__limit"},ie={class:"flex-1"},ue=["title","onClick"];return e.defineComponent({name:"VvTextarea",props:A,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:l}){const a=t,r=l,i=e.useSlots(),u=function(t,o,l){const a=Y(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return l;const e=n.value,t=o,a=l;return Object.keys(t).reduce(((o,l)=>{const n=a[l];if(o[l]=n,l in e){if(Array.isArray(t[l])){const a=t[l];a.length&&a[0]===n&&(o[l]=e[l])}if("function"==typeof t[l]&&(0,t[l])()===n&&(o[l]=e[l]),"object"==typeof t[l]){let a=t[l].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(o[l]=e[l]):a===n&&(o[l]=e[l])}}return o}),{})}))}("VvTextarea",A,a),d=e.ref(),s=e.ref(),c=e.ref(),{id:v,icon:f,iconPosition:p,iconRemoveSuggestion:m,labelRemoveSuggestion:g,label:b,modelValue:h,count:y,valid:S,invalid:x,loading:w,modifiers:k,debounce:B,minlength:L,maxlength:$,storageKey:V,storageType:E}=e.toRefs(a),O=W(v),P=e.computed((()=>`${O.value}-hint`)),C=e.computed((()=>a.floating&&H(a.placeholder)?" ":a.placeholder)),N=function(t,o,l=0,{getter:a=e=>e,setter:n=e=>e}={}){let r;return"string"==typeof l&&(l=Number.parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{r&&clearTimeout(r),r=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}(h,r,null==B?void 0:B.value),{hasIconBefore:_,hasIconAfter:z}=ee(f,p),{hasIcon:R}=ee(m),{focused:j}=function(t,l){const{focused:a}=o.useFocus(t);return e.watch(a,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:a}}(d,r),I=e.computed((()=>j.value&&!a.disabled&&!a.readonly));e.watch(I,(e=>{var t,o;if(e&&u.value.selectOnFocus&&d.value&&d.value.select(),e&&(null==(t=Q.value)?void 0:t.size))null==(o=c.value)||o.show();else if(J.value&&Q.value){const e=a.maxSuggestions;Q.value.size>=e&&!Q.value.has(N.value)&&(Q.value=new Set([...Q.value].slice(Q.value.size-e+1))),Q.value.add(N.value)}}));const F=o.useElementVisibility(d);e.watch(F,(e=>{e&&a.autofocus&&(j.value=!0)}));const{formatted:T}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(N,{mode:null==y?void 0:y.value,upperLimit:Number(null==$?void 0:$.value),lowerLimit:Number(null==L?void 0:L.value)}),q=e.computed((()=>!a.disabled&&!a.readonly)),M=e.computed((()=>q.value?a.tabindex:-1)),J=e.computed((()=>!H(h))),G=e.computed((()=>!0===a.invalid||!0!==a.valid&&void 0)),Q=function(t,l=n.local,a){const r=e.ref();let i;return a&&(r.value=a),e.onMounted((()=>{t&&e.watch(t,((t,a)=>{const u=e.unref(l)===n.session?sessionStorage:localStorage;a&&a!==t&&u.removeItem(a),i=t?o.useStorage(t,(null==i?void 0:i.value)??r.value,u):void 0}),{immediate:!0}),e.isRef(l)&&e.watch(l,((e,l)=>{if(null==t?void 0:t.value){if(e){const l=e===n.session?sessionStorage:localStorage;i=o.useStorage(t.value,(null==i?void 0:i.value)??r.value,l)}l&&l!==e&&(l===n.session?sessionStorage:localStorage).removeItem(t.value)}}))})),e.computed({get:()=>(null==i?void 0:i.value)??r.value,set:e=>{i?i.value=e:r.value=e}})}(V,E,new Set),de=e.computed((()=>Q.value?[...Q.value].filter((e=>H(N.value)||`${e}`.toLowerCase().includes(`${N.value}`.toLowerCase())&&e!==N.value)).reverse():[])),se=e.computed((()=>(null==V?void 0:V.value)&&Q.value&&Q.value.size>0));const{HintSlot:ce,hasHintLabelOrSlot:ve,hasInvalidLabelOrSlot:fe,hintSlotScope:pe}=function(t,o){const l=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>D(l.value.invalidLabel))),n=e.computed((()=>D(l.value.validLabel))),r=e.computed((()=>l.value.loadingLabel)),i=e.computed((()=>l.value.hintLabel)),u=e.computed((()=>Boolean(l.value.loading&&(o.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(l.value.invalid&&(o.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(l.value.valid&&(o.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(o.hint||i.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),f=e.computed((()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,o,l,a,n,r,i,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(u,i),me=K("vv-textarea",k,e.computed((()=>({valid:S.value,invalid:x.value,loading:w.value,disabled:a.disabled,readonly:a.readonly,required:a.required,"icon-before":void 0!==_.value,"icon-after":void 0!==z.value,floating:a.floating&&!H(a.label),dirty:J.value,focus:j.value,resizable:a.resizable})))),ge=e.computed((()=>({name:a.name,placeholder:C.value,tabindex:M.value,disabled:a.disabled,readonly:a.readonly,required:a.required,autocomplete:a.autocomplete,minlength:a.minlength,maxlength:a.maxlength,cols:a.cols,rows:a.rows,wrap:a.wrap,spellcheck:a.spellcheck,"aria-invalid":G.value,"aria-describedby":ve.value?P.value:void 0,"aria-errormessage":fe.value?P.value:void 0}))),be=e.computed((()=>({valid:a.valid,invalid:a.invalid,modelValue:a.modelValue,hintLabel:a.hintLabel,maxlength:a.maxlength,minlength:a.minlength,clear:he})));function he(){N.value=void 0}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(me))},[e.unref(b)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(O),class:"vv-textarea__label"},e.toDisplayString(e.unref(b)),9,te)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:s,class:"vv-textarea__wrapper"},[t.$slots.before?(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",le,[e.unref(_)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:0},e.unref(_),{class:"vv-textarea__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(O),ref_key:"textareaEl",ref:d,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(N)?N.value=t:null)},e.unref(ge),{onKeyup:o[1]||(o[1]=e=>r("keyup",e))}),null,16,ae),[[e.vModelText,e.unref(N)]]),e.unref(z)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:1},e.unref(z),{class:"vv-textarea__icon vv-textarea__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])):e.createCommentVNode("v-if",!0),e.unref(y)?(e.openBlock(),e.createElementBlock("span",re,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(be))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)),1)]))])):e.createCommentVNode("v-if",!0)],512),e.createVNode(e.unref(ce),{id:e.unref(P),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"3"}:void 0]),1032,["id"]),e.unref(se)?(e.openBlock(),e.createBlock(U,{key:1,ref_key:"suggestionsDropdownEl",ref:c,reference:e.unref(s),"autofocus-first":!1,"trigger-width":!0},{items:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(de),(o=>(e.openBlock(),e.createBlock(X,{key:o,onClick:e.withModifiers((e=>{return t=o,N.value=t,void(null==(l=c.value)||l.hide());var t,l}),["stop"])},{default:e.withCtx((()=>[e.createElementVNode("div",ie,[e.renderSlot(t.$slots,"suggestion",e.mergeProps({ref_for:!0},{value:o}),(()=>[e.createTextVNode(e.toDisplayString(o),1)]))]),e.unref(Q)&&e.unref(R)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",tabindex:"-1",class:"cursor-pointer",title:e.unref(g),onClick:e.withModifiers((e=>{return t=o,void(null==(l=Q.value)||l.delete(t));var t,l}),["stop"])},[e.createVNode(Z,e.mergeProps({ref_for:!0},e.unref(R)),null,16)],8,ue)):e.createCommentVNode("v-if",!0)])),_:2},1032,["onClick"])))),128))])),_:3},8,["reference"])):e.createCommentVNode("v-if",!0)],2))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("@vueuse/core"),require("mitt"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","@vueuse/core","mitt","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.core,e.mitt,e.vue$2)}(this,(function(e,t,o,l,a){"use strict";var n=(e=>(e.local="local",e.session="session",e))(n||{}),r=(e=>(e.absolute="absolute",e.fixed="fixed",e))(r||{}),i=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(i||{}),u=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(u||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),s=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(s||{}),c=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(c||{}),v=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(v||{}),f=(e=>(e.listbox="listbox",e.menu="menu",e))(f||{}),p=(e=>(e.option="option",e.presentation="presentation",e))(p||{});const m=Symbol.for("volver"),g=Symbol.for("dropdownTrigger"),b=Symbol.for("dropdownItem"),h=Symbol.for("dropdownAction"),y={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},S={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},x={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},w={disabled:{type:Boolean,default:!1}},k={required:{type:Boolean,default:!1}},B={selected:{type:Boolean,default:!1}},L=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),$={readonly:{type:Boolean,default:!1}},V={modifiers:{type:[String,Array],default:void 0}},E={hintLabel:{type:String,default:""}},O={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},P={debounce:{type:[Number,String],default:void 0}},C={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},N={tabindex:{type:[String,Number],default:0}},_={floating:{type:Boolean,default:!1}},z={unselectable:{type:Boolean,default:!0}},R={id:[String,Number]},j={placement:{type:String,default:i.bottom,validator:e=>Object.values(i).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(r).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},I={...{...R,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...N,...w,...$,...y,...S,...E,...x,...V,...O,...P,...C,..._,...L,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...k};s.button,c.button;const F={prefix:"normal"},A={...I,...{storageType:{type:String,default:n.local,validator:e=>Object.values(n).includes(e)},storageKey:String},modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},iconRemoveSuggestion:{type:[String,Object],default:"trash"},labelRemoveSuggestion:{type:String,default:"Remove suggestion"},maxSuggestions:{type:Number,default:5},selectOnFocus:{type:Boolean,default:!1},resizable:Boolean};function H(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function D(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const T={...R,...j,...V,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:f.menu,validator:e=>Object.values(f).includes(e)}},q={focusOnHover:{type:Boolean,default:!1}},M={...w,...B,...z,...V,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function W(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}function K(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const J=["id","tabindex","role","aria-labelledby"],U=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:T,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(a,{expose:n,emit:u}){const d=a,s=u,{id:c}=e.toRefs(d),v=W(c),m=e.useAttrs(),h=e.ref("auto"),y=e.ref("auto"),S=e.ref(),x=e.ref(),w=e.ref(),k=e.ref(),B=e.computed({get:()=>d.reference??S.value,set:e=>{S.value=e}}),L=e.ref(!1);e.onMounted((()=>{o.useMutationObserver(x.value,(()=>{var e;L.value="true"===(null==(e=window.getComputedStyle(x.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const $=e.computed((()=>{const e=[];if(d.autoPlacement?"boolean"==typeof d.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(d.autoPlacement)):d.flip&&("boolean"==typeof d.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(d.flip))),d.shift&&("boolean"==typeof d.shift?e.push(t.shift()):e.push(t.shift(d.shift))),d.size){const o=({availableWidth:e,availableHeight:t})=>{h.value=`${e}px`,y.value=`${t}px`};"boolean"==typeof d.size?e.push(t.size({apply:o})):e.push(t.size({...d.size,apply:o}))}return d.offset&&(e.push(t.offset(Number(d.offset))),["string","number"].includes(typeof d.offset)?e.push(t.offset(Number(d.offset))):e.push(t.offset(d.offset))),d.arrow&&e.push(t.arrow({element:w})),e})),{x:V,y:E,middlewareData:O,placement:P,strategy:C}=t.useFloating(B,x,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:d.strategy===r.fixed}),placement:e.computed((()=>d.placement)),strategy:e.computed((()=>d.strategy)),middleware:$}),N=e.computed((()=>{var e;if(L.value)return;const t=d.triggerWidth&&B.value?`${null==(e=B.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${E.value??0}px`,left:`${V.value??0}px`,maxWidth:t?void 0:h.value,maxHeight:y.value,width:t}})),_=e.computed((()=>P.value.split("-")[0])),z=e.computed((()=>{var e,t,o,l,a;if(L.value)return;const n={[i.top]:i.bottom,[i.right]:i.left,[i.bottom]:i.top,[i.left]:i.right}[_.value];return{left:void 0!==(null==(e=O.value.arrow)?void 0:e.x)?`${null==(t=O.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=O.value.arrow)?void 0:o.y)?`${null==(l=O.value.arrow)?void 0:l.y}px`:void 0,[n]:-((null==(a=w.value)?void 0:a.offsetWidth)??0)/2+"px"}})),R=o.useVModel(d,"modelValue",s),j=e.ref(!1),I=e.computed({get:()=>R.value??j.value,set:e=>{void 0!==R.value?R.value=e:j.value=e}});function F(){I.value=!0}function A(){I.value=!1}function H(){I.value=!I.value}function D(e){B.value=e}n({toggle:H,show:F,hide:A,init:D,customPosition:L}),e.watch(I,(t=>{t&&d.autofocusFirst&&e.nextTick((()=>{const e=Z(x.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),o.onClickOutside(x,(()=>{!d.keepOpen&&I.value&&(I.value=!1)}),{ignore:[B]});const T=e.computed((()=>{var e,t;return(null==(t=null==(e=B.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),q=e.computed((()=>({"aria-controls":v.value,"aria-haspopup":!0,"aria-expanded":I.value}))),{component:M,bus:U}=function({reference:t,id:o,expanded:a,aria:n}){const r=l(),i=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(g,{reference:t,id:o,expanded:a,aria:n,bus:r})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:r,component:i}}({reference:B,id:v,expanded:I,aria:q});U.on("click",H);const{role:G,modifiers:Q}=e.toRefs(d),X=K("vv-dropdown",Q,e.computed((()=>({arrow:d.arrow})))),{focused:Y}=o.useFocusWithin(x);function Z(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}const ee=o.useElementHover(x),{itemRole:te}=function({role:t,...o}){const l=e.computed((()=>t.value===f.listbox?p.option:p.presentation));return e.provide(b,{role:l,...o}),{itemRole:l}}({role:G,expanded:I,focused:Y,hovered:ee});o.onKeyStroke("Escape",(e=>{I.value&&(e.preventDefault(),A())})),o.onKeyStroke("ArrowDown",(t=>{I.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=Z(x.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),o.onKeyStroke("ArrowUp",(t=>{I.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=Z(x.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),o.onKeyStroke([" ","Enter"],(e=>{const t=e.target;I.value&&Y.value&&t&&(null==t||t.click())}));const oe={"before-enter":()=>{s(I.value?"beforeExpand":"beforeCollapse"),s("beforeEnter")},"after-leave":()=>{s(I.value?"afterExpand":"afterCollapse"),s("afterLeave")},enter:()=>{s("enter")},"after-enter":()=>{s("afterEnter")},"enter-cancelled":()=>{s("enterCancelled")},"before-leave":()=>{s("beforeLeave")},leave:()=>{s("leave")},"leave-cancelled":()=>{s("leaveCancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(M),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:D,show:F,hide:A,toggle:H,expanded:e.unref(I),aria:e.unref(q)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(oe),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:x,style:e.normalizeStyle(e.unref(N)),class:e.normalizeClass(e.unref(X))},[d.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:w,style:e.normalizeStyle(e.unref(z)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(I)}))),e.createElementVNode("div",e.mergeProps(e.unref(m),{id:e.unref(v),ref_key:"listEl",ref:k,tabindex:e.unref(I)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(T),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(te)})))],16,J),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(I)})))],6),[[e.vShow,e.unref(I)]])])),_:3},16,["name"])],64))}});const G=e.defineComponent({name:"VvDropdownItem",props:q,setup(t){const l=t,{role:a,expanded:n}=e.inject(b,{}),r=e.ref(null);!function({expanded:t}){e.provide(h,{role:e.ref(v.menuitem),expanded:t})}({expanded:n});const i=o.useElementHover(r),{focused:u}=o.useFocus(r),{focused:d}=o.useFocusWithin(r);return e.watch(i,(e=>{e&&l.focusOnHover&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(a)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(d)}]}),[e.renderSlot(t.$slots,"default")],16))}}),Q=["title"],X=e.defineComponent({name:"VvDropdownOption",props:M,setup(t){const o=t,{modifiers:l}=e.toRefs(o),a=K("vv-dropdown-option",l,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),n=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?"":o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(G,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled,"focus-on-hover":t.focusOnHover},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,Q)])),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}});function Y(){return e.inject(m)}const Z=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},F),setup(t){const o=t,l=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=Y(),{modifiers:i}=e.toRefs(o),u=K("vv-icon",i),d=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(a.iconExists(t))return t;const l=null==r?void 0:r.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return a.iconExists(o)}));return l?`@${d.value}:${l.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),l=(null==t?void 0:t.innerHTML.trim())||"";t&&l&&a.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:l,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return r&&o.src&&!a.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(a.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(l),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function ee(t,o){const l=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==o?void 0:o.value)===d.before?l.value:void 0)),n=e.computed((()=>(null==o?void 0:o.value)===d.after?l.value:void 0)),r=e.computed((()=>(null==o?void 0:o.value)===i.left?l.value:void 0)),u=e.computed((()=>(null==o?void 0:o.value)===i.right?l.value:void 0)),s=e.computed((()=>(null==o?void 0:o.value)===i.top?l.value:void 0)),c=e.computed((()=>(null==o?void 0:o.value)===i.bottom?l.value:void 0));return{hasIcon:l,hasIconLeft:r,hasIconRight:u,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:n}}const te=["for"],oe={key:0,class:"vv-textarea__input-before"},le={class:"vv-textarea__inner"},ae=["id"],ne={key:1,class:"vv-textarea__input-after"},re={key:2,class:"vv-textarea__limit"},ie={class:"flex-1"},ue=["title","onClick"];return e.defineComponent({name:"VvTextarea",props:A,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:l}){const a=t,r=l,i=e.useSlots(),u=function(t,o,l){const a=Y(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return l;const e=n.value,t=o,a=l;return Object.keys(t).reduce(((o,l)=>{const n=a[l];if(o[l]=n,l in e){if(Array.isArray(t[l])){const a=t[l];a.length&&a[0]===n&&(o[l]=e[l])}if("function"==typeof t[l]&&(0,t[l])()===n&&(o[l]=e[l]),"object"==typeof t[l]){let a=t[l].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(o[l]=e[l]):a===n&&(o[l]=e[l])}}return o}),{})}))}("VvTextarea",A,a),d=e.ref(),s=e.ref(),c=e.ref(),{id:v,icon:f,iconPosition:p,iconRemoveSuggestion:m,labelRemoveSuggestion:g,label:b,modelValue:h,count:y,valid:S,invalid:x,loading:w,modifiers:k,debounce:B,minlength:L,maxlength:$,storageKey:V,storageType:E}=e.toRefs(a),O=W(v),P=e.computed((()=>`${O.value}-hint`)),C=e.computed((()=>a.floating&&H(a.placeholder)?" ":a.placeholder)),N=function(t,o,l=0,{getter:a=e=>e,setter:n=e=>e}={}){let r;return"string"==typeof l&&(l=Number.parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{r&&clearTimeout(r),r=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}(h,r,null==B?void 0:B.value),{hasIconBefore:_,hasIconAfter:z}=ee(f,p),{hasIcon:R}=ee(m),{focused:j}=function(t,l){const{focused:a}=o.useFocus(t);return e.watch(a,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:a}}(d,r),I=e.computed((()=>j.value&&!a.disabled&&!a.readonly));e.watch(I,(e=>{var t,o;if(e&&u.value.selectOnFocus&&d.value&&d.value.select(),e&&(null==(t=Q.value)?void 0:t.size))null==(o=c.value)||o.show();else if(J.value&&Q.value){const e=a.maxSuggestions;Q.value.size>=e&&!Q.value.has(N.value)&&(Q.value=new Set([...Q.value].slice(Q.value.size-e+1))),Q.value.add(N.value)}}));const F=o.useElementVisibility(d);e.watch(F,(e=>{e&&a.autofocus&&(j.value=!0)}));const{formatted:T}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(N,{mode:null==y?void 0:y.value,upperLimit:Number(null==$?void 0:$.value),lowerLimit:Number(null==L?void 0:L.value)}),q=e.computed((()=>!a.disabled&&!a.readonly)),M=e.computed((()=>q.value?a.tabindex:-1)),J=e.computed((()=>!H(h))),G=e.computed((()=>!0===a.invalid||!0!==a.valid&&void 0)),Q=function(t,l=n.local,a){const r=e.ref();let i;return a&&(r.value=a),e.onMounted((()=>{t&&e.watch(t,((t,a)=>{const u=e.unref(l)===n.session?sessionStorage:localStorage;if(a&&a!==t&&u.removeItem(a),t)return i=o.useStorage(t,(null==i?void 0:i.value)??r.value,u),void(i.value&&(r.value=i.value));i=void 0}),{immediate:!0}),e.isRef(l)&&e.watch(l,((e,l)=>{if(null==t?void 0:t.value){if(e){const l=e===n.session?sessionStorage:localStorage;i=o.useStorage(t.value,(null==i?void 0:i.value)??r.value,l)}l&&l!==e&&(l===n.session?sessionStorage:localStorage).removeItem(t.value)}}))})),e.watch(r,(e=>{i&&(i.value=e)}),{deep:!0,immediate:!0}),r}(V,E,new Set),de=e.computed((()=>Q.value?[...Q.value].filter((e=>H(N.value)||`${e}`.toLowerCase().includes(`${N.value}`.toLowerCase())&&e!==N.value)).reverse():[])),se=e.computed((()=>(null==V?void 0:V.value)&&Q.value&&Q.value.size>0));const{HintSlot:ce,hasHintLabelOrSlot:ve,hasInvalidLabelOrSlot:fe,hintSlotScope:pe}=function(t,o){const l=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>D(l.value.invalidLabel))),n=e.computed((()=>D(l.value.validLabel))),r=e.computed((()=>l.value.loadingLabel)),i=e.computed((()=>l.value.hintLabel)),u=e.computed((()=>Boolean(l.value.loading&&(o.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(l.value.invalid&&(o.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(l.value.valid&&(o.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(o.hint||i.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),f=e.computed((()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var t,o,l,a,n,r,i,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(r=(n=this.$slots).valid)?void 0:r.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(i=this.$slots).hint)?void 0:u.call(i))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(u,i),me=K("vv-textarea",k,e.computed((()=>({valid:S.value,invalid:x.value,loading:w.value,disabled:a.disabled,readonly:a.readonly,required:a.required,"icon-before":void 0!==_.value,"icon-after":void 0!==z.value,floating:a.floating&&!H(a.label),dirty:J.value,focus:j.value,resizable:a.resizable})))),ge=e.computed((()=>({name:a.name,placeholder:C.value,tabindex:M.value,disabled:a.disabled,readonly:a.readonly,required:a.required,autocomplete:a.autocomplete,minlength:a.minlength,maxlength:a.maxlength,cols:a.cols,rows:a.rows,wrap:a.wrap,spellcheck:a.spellcheck,"aria-invalid":G.value,"aria-describedby":ve.value?P.value:void 0,"aria-errormessage":fe.value?P.value:void 0}))),be=e.computed((()=>({valid:a.valid,invalid:a.invalid,modelValue:a.modelValue,hintLabel:a.hintLabel,maxlength:a.maxlength,minlength:a.minlength,clear:he})));function he(){N.value=void 0}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(me))},[e.unref(b)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(O),class:"vv-textarea__label"},e.toDisplayString(e.unref(b)),9,te)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:s,class:"vv-textarea__wrapper"},[t.$slots.before?(e.openBlock(),e.createElementBlock("div",oe,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",le,[e.unref(_)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:0},e.unref(_),{class:"vv-textarea__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(O),ref_key:"textareaEl",ref:d,"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(N)?N.value=t:null)},e.unref(ge),{onKeyup:o[1]||(o[1]=e=>r("keyup",e))}),null,16,ae),[[e.vModelText,e.unref(N)]]),e.unref(z)?(e.openBlock(),e.createBlock(Z,e.mergeProps({key:1},e.unref(z),{class:"vv-textarea__icon vv-textarea__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",ne,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(be))))])):e.createCommentVNode("v-if",!0),e.unref(y)?(e.openBlock(),e.createElementBlock("span",re,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(be))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(T)),1)]))])):e.createCommentVNode("v-if",!0)],512),e.createVNode(e.unref(ce),{id:e.unref(P),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(pe))))])),key:"3"}:void 0]),1032,["id"]),e.unref(se)?(e.openBlock(),e.createBlock(U,{key:1,ref_key:"suggestionsDropdownEl",ref:c,reference:e.unref(s),"autofocus-first":!1,"trigger-width":!0},{items:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(de),(o=>(e.openBlock(),e.createBlock(X,{key:o,onClick:e.withModifiers((e=>{return t=o,N.value=t,void(null==(l=c.value)||l.hide());var t,l}),["stop"])},{default:e.withCtx((()=>[e.createElementVNode("div",ie,[e.renderSlot(t.$slots,"suggestion",e.mergeProps({ref_for:!0},{value:o}),(()=>[e.createTextVNode(e.toDisplayString(o),1)]))]),e.unref(Q)&&e.unref(R)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",tabindex:"-1",class:"cursor-pointer",title:e.unref(g),onClick:e.withModifiers((e=>{return t=o,void(null==(l=Q.value)||l.delete(t));var t,l}),["stop"])},[e.createVNode(Z,e.mergeProps({ref_for:!0},e.unref(R)),null,16)],8,ue)):e.createCommentVNode("v-if",!0)])),_:2},1032,["onClick"])))),128))])),_:3},8,["reference"])):e.createCommentVNode("v-if",!0)],2))}})}));