@volverjs/ui-vue 0.0.10-beta.31 → 0.0.10-beta.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +1 -131
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +4 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +5 -5
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +6 -7
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +1 -6
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +4 -8
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +2 -8
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -8
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +0 -22
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +16 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +7 -0
- package/dist/components/VvButtonGroup/index.d.ts +3 -0
- package/dist/components/VvCard/VvCard.es.js +1 -6
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +2 -23
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +6 -24
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +12 -31
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +29 -23
- package/dist/components/VvCombobox/index.d.ts +7 -7
- package/dist/components/VvDialog/VvDialog.es.js +1 -6
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +23 -23
- package/dist/components/VvDropdown/index.d.ts +7 -7
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +0 -5
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +1 -6
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +0 -22
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +16 -4
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvNav/VvNav.es.js +8 -10
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +4 -1
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +3 -3
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +0 -22
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +4 -23
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvTab/VvTab.es.js +7 -9
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/index.es.js +87 -69
- package/dist/components/index.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +7 -7
- package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -181
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +370 -11
- package/dist/stories/Alert/Alert.settings.d.ts +2 -109
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
- package/dist/stories/Badge/Badge.settings.d.ts +2 -26
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +2 -193
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
- package/dist/stories/Card/Card.settings.d.ts +2 -63
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
- package/dist/stories/Combobox/Combobox.settings.d.ts +2 -617
- package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
- package/dist/stories/Icon/Icon.settings.d.ts +2 -68
- package/dist/stories/InputFile/InputFile.settings.d.ts +2 -52
- package/dist/stories/InputText/InputText.settings.d.ts +2 -438
- package/dist/stories/Nav/Nav.settings.d.ts +2 -10
- package/dist/stories/Progress/Progress.settings.d.ts +2 -27
- package/dist/stories/Radio/Radio.settings.d.ts +1 -110
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
- package/dist/stories/Select/Select.settings.d.ts +2 -246
- package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
- package/dist/stories/argTypes.d.ts +27 -866
- package/package.json +45 -45
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAlert/index.ts +4 -4
- package/src/components/VvAlertGroup/VvAlertGroup.vue +0 -1
- package/src/components/VvBadge/VvBadge.vue +1 -1
- package/src/components/VvButtonGroup/VvButtonGroup.vue +11 -2
- package/src/components/VvButtonGroup/index.ts +1 -0
- package/src/components/VvCheckbox/VvCheckbox.vue +2 -5
- package/src/components/VvCombobox/VvCombobox.vue +2 -1
- package/src/components/VvInputText/VvInputText.vue +18 -3
- package/src/components/VvNav/VvNav.vue +1 -6
- package/src/components/VvNav/VvNavItem.vue +1 -1
- package/src/components/VvProgress/VvProgress.vue +0 -1
- package/src/composables/alert/useAlert.ts +3 -3
- package/src/stories/Accordion/Accordion.settings.ts +3 -2
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +4 -3
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +4 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +2 -6
- package/src/stories/Alert/Alert.settings.ts +8 -7
- package/src/stories/Alert/Alert.test.ts +1 -3
- package/src/stories/AlertGroup/AlertGroup.settings.ts +3 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +5 -7
- package/src/stories/Avatar/Avatar.test.ts +1 -3
- package/src/stories/Avatar/AvatarModifiers.stories.ts +1 -0
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +2 -1
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -3
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +1 -0
- package/src/stories/Badge/Badge.settings.ts +2 -1
- package/src/stories/Badge/Badge.stories.ts +2 -2
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +2 -1
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +1 -1
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
- package/src/stories/Button/Button.settings.ts +6 -6
- package/src/stories/Button/Button.stories.ts +1 -1
- package/src/stories/Button/Button.test.ts +1 -3
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +11 -1
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +2 -6
- package/src/stories/Card/Card.settings.ts +2 -1
- package/src/stories/Card/Card.test.ts +1 -3
- package/src/stories/Checkbox/Checkbox.settings.ts +5 -3
- package/src/stories/Checkbox/Checkbox.test.ts +2 -6
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -6
- package/src/stories/Combobox/Combobox.settings.ts +10 -10
- package/src/stories/Combobox/Combobox.test.ts +2 -6
- package/src/stories/Dialog/Dialog.settings.ts +2 -1
- package/src/stories/Dialog/Dialog.test.ts +3 -8
- package/src/stories/Dropdown/Dropdown.settings.ts +2 -1
- package/src/stories/Dropdown/Dropdown.test.ts +2 -6
- package/src/stories/Dropdown/DropdownSlots.stories.ts +1 -1
- package/src/stories/Icon/Icon.settings.ts +2 -1
- package/src/stories/Icon/Icon.stories.ts +0 -1
- package/src/stories/InputFile/InputFile.settings.ts +2 -1
- package/src/stories/InputText/InputText.settings.ts +8 -6
- package/src/stories/InputText/InputText.test.ts +2 -6
- package/src/stories/InputText/InputTextMinMax.stories.ts +1 -1
- package/src/stories/Nav/Nav.settings.ts +2 -2
- package/src/stories/Nav/Nav.stories.ts +1 -1
- package/src/stories/Nav/Nav.test.ts +2 -4
- package/src/stories/Progress/Progress.settings.ts +2 -1
- package/src/stories/Radio/Radio.test.ts +2 -6
- package/src/stories/RadioGroup/RadioGroup.stories.ts +1 -2
- package/src/stories/RadioGroup/RadioGroup.test.ts +2 -6
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +1 -1
- package/src/stories/Select/Select.settings.ts +4 -3
- package/src/stories/Select/Select.test.ts +3 -9
- package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
- package/src/stories/Select/SelectOptions.stories.ts +0 -1
- package/src/stories/Tab/Tab.test.ts +3 -5
- package/src/stories/Textarea/Textarea.settings.ts +5 -3
- package/src/stories/Textarea/Textarea.test.ts +2 -6
- package/src/stories/Tooltip/Tooltip.settings.ts +1 -1
- package/src/stories/Tooltip/Tooltip.test.ts +3 -5
- package/src/stories/argTypes.ts +47 -46
|
@@ -33,7 +33,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
33
33
|
default: undefined;
|
|
34
34
|
};
|
|
35
35
|
offset: {
|
|
36
|
-
type: globalThis.PropType<string | import("@floating-ui/
|
|
36
|
+
type: globalThis.PropType<string | import("@floating-ui/dom").OffsetOptions | undefined>;
|
|
37
37
|
default: number;
|
|
38
38
|
};
|
|
39
39
|
shift: {
|
|
@@ -49,7 +49,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
49
49
|
options?: any;
|
|
50
50
|
} | undefined;
|
|
51
51
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
52
|
-
} | import("@floating-ui/
|
|
52
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
53
53
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
54
54
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
55
55
|
altBoundary?: boolean | undefined;
|
|
@@ -73,11 +73,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
73
73
|
crossAxis?: boolean | undefined;
|
|
74
74
|
mainAxis?: boolean | undefined;
|
|
75
75
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
76
|
-
fallbackStrategy?: "
|
|
76
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
77
77
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
78
78
|
flipAlignment?: boolean | undefined;
|
|
79
79
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
80
|
-
} | import("@floating-ui/
|
|
80
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
81
81
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
82
82
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
83
83
|
altBoundary?: boolean | undefined;
|
|
@@ -85,7 +85,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
85
85
|
crossAxis?: boolean | undefined;
|
|
86
86
|
mainAxis?: boolean | undefined;
|
|
87
87
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
88
|
-
fallbackStrategy?: "
|
|
88
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
89
89
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
90
90
|
flipAlignment?: boolean | undefined;
|
|
91
91
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
@@ -113,7 +113,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
113
113
|
availableWidth: number;
|
|
114
114
|
availableHeight: number;
|
|
115
115
|
}) => void | Promise<void>) | undefined;
|
|
116
|
-
} | import("@floating-ui/
|
|
116
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
117
117
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
118
118
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
119
119
|
altBoundary?: boolean | undefined;
|
|
@@ -149,7 +149,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
149
149
|
autoAlignment?: boolean | undefined;
|
|
150
150
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
151
151
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
152
|
-
} | import("@floating-ui/
|
|
152
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
153
153
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
154
154
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
155
155
|
altBoundary?: boolean | undefined;
|
|
@@ -232,7 +232,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
232
232
|
default: undefined;
|
|
233
233
|
};
|
|
234
234
|
offset: {
|
|
235
|
-
type: globalThis.PropType<string | import("@floating-ui/
|
|
235
|
+
type: globalThis.PropType<string | import("@floating-ui/dom").OffsetOptions | undefined>;
|
|
236
236
|
default: number;
|
|
237
237
|
};
|
|
238
238
|
shift: {
|
|
@@ -248,7 +248,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
248
248
|
options?: any;
|
|
249
249
|
} | undefined;
|
|
250
250
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
251
|
-
} | import("@floating-ui/
|
|
251
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
252
252
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
253
253
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
254
254
|
altBoundary?: boolean | undefined;
|
|
@@ -272,11 +272,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
272
272
|
crossAxis?: boolean | undefined;
|
|
273
273
|
mainAxis?: boolean | undefined;
|
|
274
274
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
275
|
-
fallbackStrategy?: "
|
|
275
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
276
276
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
277
277
|
flipAlignment?: boolean | undefined;
|
|
278
278
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
279
|
-
} | import("@floating-ui/
|
|
279
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
280
280
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
281
281
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
282
282
|
altBoundary?: boolean | undefined;
|
|
@@ -284,7 +284,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
284
284
|
crossAxis?: boolean | undefined;
|
|
285
285
|
mainAxis?: boolean | undefined;
|
|
286
286
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
287
|
-
fallbackStrategy?: "
|
|
287
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
288
288
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
289
289
|
flipAlignment?: boolean | undefined;
|
|
290
290
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
@@ -312,7 +312,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
312
312
|
availableWidth: number;
|
|
313
313
|
availableHeight: number;
|
|
314
314
|
}) => void | Promise<void>) | undefined;
|
|
315
|
-
} | import("@floating-ui/
|
|
315
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
316
316
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
317
317
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
318
318
|
altBoundary?: boolean | undefined;
|
|
@@ -348,7 +348,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
348
348
|
autoAlignment?: boolean | undefined;
|
|
349
349
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
350
350
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
351
|
-
} | import("@floating-ui/
|
|
351
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
352
352
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
353
353
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
354
354
|
altBoundary?: boolean | undefined;
|
|
@@ -394,6 +394,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
394
394
|
onAfterCollapse?: ((...args: any[]) => any) | undefined;
|
|
395
395
|
}, {
|
|
396
396
|
reference: HTMLElement | null;
|
|
397
|
+
placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
398
|
+
strategy: "absolute" | "fixed";
|
|
397
399
|
size: boolean | {
|
|
398
400
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
399
401
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
@@ -414,7 +416,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
414
416
|
availableWidth: number;
|
|
415
417
|
availableHeight: number;
|
|
416
418
|
}) => void | Promise<void>) | undefined;
|
|
417
|
-
} | import("@floating-ui/
|
|
419
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
418
420
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
419
421
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
420
422
|
altBoundary?: boolean | undefined;
|
|
@@ -449,7 +451,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
449
451
|
options?: any;
|
|
450
452
|
} | undefined;
|
|
451
453
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
452
|
-
} | import("@floating-ui/
|
|
454
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
453
455
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
454
456
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
455
457
|
altBoundary?: boolean | undefined;
|
|
@@ -471,11 +473,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
471
473
|
crossAxis?: boolean | undefined;
|
|
472
474
|
mainAxis?: boolean | undefined;
|
|
473
475
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
474
|
-
fallbackStrategy?: "
|
|
476
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
475
477
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
476
478
|
flipAlignment?: boolean | undefined;
|
|
477
479
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
478
|
-
} | import("@floating-ui/
|
|
480
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
479
481
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
480
482
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
481
483
|
altBoundary?: boolean | undefined;
|
|
@@ -483,15 +485,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
483
485
|
crossAxis?: boolean | undefined;
|
|
484
486
|
mainAxis?: boolean | undefined;
|
|
485
487
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
486
|
-
fallbackStrategy?: "
|
|
488
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
487
489
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
488
490
|
flipAlignment?: boolean | undefined;
|
|
489
491
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
490
492
|
}> | undefined;
|
|
491
|
-
placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
|
|
492
|
-
strategy: "absolute" | "fixed";
|
|
493
493
|
transitionName: string;
|
|
494
|
-
offset: string | import("@floating-ui/
|
|
494
|
+
offset: string | import("@floating-ui/dom").OffsetOptions | undefined;
|
|
495
495
|
autoPlacement: boolean | {
|
|
496
496
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
497
497
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
@@ -502,7 +502,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
502
502
|
autoAlignment?: boolean | undefined;
|
|
503
503
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
504
504
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
505
|
-
} | import("@floating-ui/
|
|
505
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
506
506
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
507
507
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
508
508
|
altBoundary?: boolean | undefined;
|
|
@@ -42,7 +42,7 @@ export declare const VvDropdownProps: {
|
|
|
42
42
|
default: undefined;
|
|
43
43
|
};
|
|
44
44
|
offset: {
|
|
45
|
-
type: PropType<string | import("@floating-ui/
|
|
45
|
+
type: PropType<string | import("@floating-ui/dom").OffsetOptions | undefined>;
|
|
46
46
|
default: number;
|
|
47
47
|
};
|
|
48
48
|
shift: {
|
|
@@ -58,7 +58,7 @@ export declare const VvDropdownProps: {
|
|
|
58
58
|
options?: any;
|
|
59
59
|
} | undefined;
|
|
60
60
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
61
|
-
} | import("@floating-ui/
|
|
61
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
62
62
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
63
63
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
64
64
|
altBoundary?: boolean | undefined;
|
|
@@ -82,11 +82,11 @@ export declare const VvDropdownProps: {
|
|
|
82
82
|
crossAxis?: boolean | undefined;
|
|
83
83
|
mainAxis?: boolean | undefined;
|
|
84
84
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
85
|
-
fallbackStrategy?: "
|
|
85
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
86
86
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
87
87
|
flipAlignment?: boolean | undefined;
|
|
88
88
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
89
|
-
} | import("@floating-ui/
|
|
89
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
90
90
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
91
91
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
92
92
|
altBoundary?: boolean | undefined;
|
|
@@ -94,7 +94,7 @@ export declare const VvDropdownProps: {
|
|
|
94
94
|
crossAxis?: boolean | undefined;
|
|
95
95
|
mainAxis?: boolean | undefined;
|
|
96
96
|
fallbackPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
97
|
-
fallbackStrategy?: "
|
|
97
|
+
fallbackStrategy?: "initialPlacement" | "bestFit" | undefined;
|
|
98
98
|
fallbackAxisSideDirection?: "start" | "end" | "none" | undefined;
|
|
99
99
|
flipAlignment?: boolean | undefined;
|
|
100
100
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
@@ -122,7 +122,7 @@ export declare const VvDropdownProps: {
|
|
|
122
122
|
availableWidth: number;
|
|
123
123
|
availableHeight: number;
|
|
124
124
|
}) => void | Promise<void>) | undefined;
|
|
125
|
-
} | import("@floating-ui/
|
|
125
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
126
126
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
127
127
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
128
128
|
altBoundary?: boolean | undefined;
|
|
@@ -158,7 +158,7 @@ export declare const VvDropdownProps: {
|
|
|
158
158
|
autoAlignment?: boolean | undefined;
|
|
159
159
|
allowedPlacements?: import("@floating-ui/utils").Placement[] | undefined;
|
|
160
160
|
boundary?: import("@floating-ui/dom").Boundary | undefined;
|
|
161
|
-
} | import("@floating-ui/
|
|
161
|
+
} | import("@floating-ui/dom").Derivable<{
|
|
162
162
|
rootBoundary?: import("@floating-ui/core").RootBoundary | undefined;
|
|
163
163
|
elementContext?: import("@floating-ui/core").ElementContext | undefined;
|
|
164
164
|
altBoundary?: boolean | undefined;
|
|
@@ -542,11 +542,6 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
if (others) {
|
|
546
|
-
Object.keys(others.value).forEach((key) => {
|
|
547
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
545
|
return toReturn;
|
|
551
546
|
});
|
|
552
547
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var n=(e=>(e.local="local",e.session="session",e))(n||{}),r=(e=>(e.absolute="absolute",e.fixed="fixed",e))(r||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(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))(a||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{}),d=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(d||{}),c=(e=>(e.listbox="listbox",e.menu="menu",e))(c||{});const f=Symbol.for("volver"),p=Symbol.for("dropdownTrigger"),v=Symbol.for("dropdownItem"),m=Symbol.for("dropdownAction"),b={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},g={disabled:{type:Boolean,default:!1}},y={active:{type:Boolean,default:!1}},h={current:{type:Boolean,default:!1}},k={pressed:{type:Boolean,default:!1}},x={label:{type:[String,Number],default:void 0}},S={modifiers:{type:[String,Array],default:void 0}};u.before;l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const B={...g,...x,...k,...y,...h,...b,type:{type:String,default:i.button,validator:e=>Object.values(i).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:s.button}};n.local;const w=B;const C=e.defineComponent({name:"VvAction",props:w,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,l=n,a=e.getCurrentInstance(),u=e.inject(f),i=e.ref(null);o({$el:i});const{reference:d,bus:c,aria:v,expanded:b}=e.inject(p,{});e.watch((()=>i.value),(e=>{d&&(d.value=e)}));const g=e.computed((()=>r.pressed||(null==b?void 0:b.value))),{role:y}=e.inject(m,{}),h=e.computed((()=>{switch(!0){case r.disabled:return s.button;case void 0!==r.to:return(null==u?void 0:u.nuxt)?s.nuxtLink:s.routerLink;case void 0!==r.href:return s.a;default:return r.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!g.value||void 0,ariaLabel:r.ariaLabel,role:null==y?void 0:y.value};switch(h.value){case s.a:return{...e,href:r.href,target:r.target,rel:r.rel};case s.routerLink:case s.nuxtLink:return{...e,to:r.to,target:r.target};case s.button:return{...e,type:r.type,disabled:r.disabled};default:return e}})),x=e=>{var t;r.disabled?e.preventDefault():(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onClick)?l("click",e):null==c||c.emit("click",e)},S=e=>{var t;(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onMouseover)?l("mouseover",e):null==c||c.emit("mouseover",e)},B=e=>{var t;(null==(t=null==a?void 0:a.vnode.props)?void 0:t.onMouseleave)?l("mouseleave",e):null==c||c.emit("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),e.mergeProps(e.unref(k),{ref_key:"element",ref:i,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:x,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});Boolean,c.menu;const L={focusOnHover:{type:Boolean,default:!1}};const j=e.defineComponent({name:"VvDropdownItem",props:L,setup(t){const n=t,{role:r,expanded:l}=e.inject(v,{}),a=e.ref(null);!function({expanded:t}){e.provide(m,{role:e.ref(d.menuitem),expanded:t})}({expanded:l});const u=o.useElementHover(a),{focused:i}=o.useFocus(a),{focused:s}=o.useFocusWithin(a);return e.watch(u,(e=>{e&&n.focusOnHover&&(i.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:a,class:["vv-dropdown__item",{"focus-visible":e.unref(i)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({name:"VvDropdownAction",props:{...B,...S},setup(t){const o=t,{modifiers:n}=e.toRefs(o),r=function(t,o,n){return e.computed((()=>{const e={[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((o=>{o&&(e[`${t}--${o}`]=!0)})),e}))}("vv-dropdown-action",n);return(t,o)=>(e.openBlock(),e.createBlock(j,null,{default:e.withCtx((()=>[e.createVNode(C,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(r)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, computed,
|
|
1
|
+
import { inject, computed, defineComponent, mergeDefaults, ref, toRefs, unref, openBlock, createBlock, mergeProps, createCommentVNode } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
3
|
const VvIconPropsDefaults = {
|
|
4
4
|
prefix: "normal"
|
|
@@ -23,11 +23,6 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
if (others) {
|
|
27
|
-
Object.keys(others.value).forEach((key) => {
|
|
28
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
26
|
return toReturn;
|
|
32
27
|
});
|
|
33
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return 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:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i),{modifiers:c}=e.toRefs(r),a=function(o,n,i){return e.computed((()=>{const
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvIcon=o(e.vue,e.vue$1)}(this,(function(e,o){"use strict";const n={prefix:"normal"},i=Symbol.for("volver");return 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:{}},n),setup(n){const r=n,t=e.computed((()=>"string"==typeof r.rotate?parseFloat(r.rotate):r.rotate)),l=e.ref(!0),u=e.inject(i),{modifiers:c}=e.toRefs(r),a=function(o,n,i){return e.computed((()=>{const e={[o]:!0},i="string"==typeof(null==n?void 0:n.value)?n.value.split(" "):null==n?void 0:n.value;return i&&Array.isArray(i)&&i.forEach((n=>{n&&(e[`${o}--${n}`]=!0)})),e}))}("vv-icon",c),s=e.computed((()=>r.provider||(null==u?void 0:u.iconsProvider))),f=e.computed((()=>{const e=r.name??"",n=`@${s.value}:${r.prefix}:${e}`;if(o.iconExists(n))return n;const i=null==u?void 0:u.iconsCollections.find((n=>{const i=`@${s.value}:${n.prefix}:${e}`;return o.iconExists(i)}));return i?`@${s.value}:${i.prefix}:${e}`:e}));function d(e){const n=function(e){let o;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");o=(new e).window}return(o?new o.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),i=(null==n?void 0:n.innerHTML.trim())||"";n&&i&&o.addIcon(`@${s.value}:${r.prefix}:${r.name}`,{body:i,height:n.viewBox.baseVal.height,width:n.viewBox.baseVal.width})}return u&&r.src&&!o.iconExists(`@${s.value}:${r.prefix}:${r.name}`)&&(l.value=!1,u.fetchIcon(r.src).then((e=>{e&&(d(e),l.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),r.svg&&d(r.svg),(n,i)=>e.unref(l)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(a)},{inline:n.inline,width:n.width,height:n.height,horizontalFlip:n.horizontalFlip,verticalFlip:n.verticalFlip,flip:n.flip,rotate:e.unref(t),color:n.color,onLoad:n.onLoad,icon:e.unref(f)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}})}));
|
|
@@ -786,9 +786,6 @@ function useGroupProps(props, emit) {
|
|
|
786
786
|
}
|
|
787
787
|
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
788
788
|
function equals(obj1, obj2, field) {
|
|
789
|
-
if (field) {
|
|
790
|
-
return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
|
|
791
|
-
}
|
|
792
789
|
return deepEquals(obj1, obj2);
|
|
793
790
|
}
|
|
794
791
|
function deepEquals(a, b) {
|
|
@@ -835,25 +832,6 @@ function deepEquals(a, b) {
|
|
|
835
832
|
}
|
|
836
833
|
return a !== a && b !== b;
|
|
837
834
|
}
|
|
838
|
-
function resolveFieldData(data, field) {
|
|
839
|
-
if (data && Object.keys(data).length && field) {
|
|
840
|
-
if (field.indexOf(".") === -1) {
|
|
841
|
-
return data[field];
|
|
842
|
-
} else {
|
|
843
|
-
const fields = field.split(".");
|
|
844
|
-
let value = data;
|
|
845
|
-
for (let i = 0, len = fields.length; i < len; ++i) {
|
|
846
|
-
if (data == null) {
|
|
847
|
-
return null;
|
|
848
|
-
}
|
|
849
|
-
value = value[fields[i]];
|
|
850
|
-
}
|
|
851
|
-
return value;
|
|
852
|
-
}
|
|
853
|
-
} else {
|
|
854
|
-
return null;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
835
|
function contains(value, list) {
|
|
858
836
|
if (value != null && list && list.length) {
|
|
859
837
|
for (const val of list) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("@iconify/vue"),require("uid"),require("vuedraggable")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","@iconify/vue","uid","vuedraggable"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputFile=l(e.vue,e.core,e.vue$1,e.uid,e.Sortable)}(this,(function(e,l,t,o,a){"use strict";const n="add",r="edit",i="download",u={prefix:"normal"};var d=(e=>(e.local="local",e.session="session",e))(d||{}),s=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(s||{}),v=(e=>(e.before="before",e.after="after",e))(v||{}),c=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(c||{}),p=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(p||{});const f=Symbol.for("volver"),m=Symbol.for("buttonGroup"),g=Symbol.for("dropdownTrigger"),b=Symbol.for("dropdownAction");function y(){return e.inject(f)}function h(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const k=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:{}},u),setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=y(),{modifiers:i}=e.toRefs(o),u=h("vv-icon",i),d=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=o.name??"",l=`@${d.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const o=`@${d.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&o.src&&!t.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),S={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},B={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},L={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},V={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},w={disabled:{type:Boolean,default:!1}},A={active:{type:Boolean,default:!1}},$={current:{type:Boolean,default:!1}},C={pressed:{type:Boolean,default:!1}},O={label:{type:[String,Number],default:void 0}},x={readonly:{type:Boolean,default:!1}},_={modifiers:{type:[String,Array],default:void 0}},N={hintLabel:{type:String,default:""}},I={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:v.before,validation:e=>Object.values(v).includes(e)}},R={unselectable:{type:Boolean,default:!0}},j={id:[String,Number]};s.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...j,name:{type:String,required:!0}},E={...w,...O,...C,...A,...$,...S,type:{type:String,default:c.button,validator:e=>Object.values(c).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:p.button}};d.local;const D=E;const M=e.defineComponent({name:"VvAction",props:D,emits:["click","mouseover","mouseleave"],setup(l,{expose:t,emit:o}){const a=l,n=o,r=e.getCurrentInstance(),i=y(),u=e.ref(null);t({$el:u});const{reference:d,bus:s,aria:v,expanded:c}=e.inject(g,{});e.watch((()=>u.value),(e=>{d&&(d.value=e)}));const f=e.computed((()=>a.pressed||(null==c?void 0:c.value))),{role:m}=e.inject(b,{}),h=e.computed((()=>{switch(!0){case a.disabled:return p.button;case void 0!==a.to:return(null==i?void 0:i.nuxt)?p.nuxtLink:p.routerLink;case void 0!==a.href:return p.a;default:return a.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!f.value||void 0,ariaLabel:a.ariaLabel,role:null==m?void 0:m.value};switch(h.value){case p.a:return{...e,href:a.href,target:a.target,rel:a.rel};case p.routerLink:case p.nuxtLink:return{...e,to:a.to,target:a.target};case p.button:return{...e,type:a.type,disabled:a.disabled};default:return e}})),S=e=>{var l;a.disabled?e.preventDefault():(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onClick)?n("click",e):null==s||s.emit("click",e)},B=e=>{var l;(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onMouseover)?n("mouseover",e):null==s||s.emit("mouseover",e)},L=e=>{var l;(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onMouseleave)?n("mouseleave",e):null==s||s.emit("mouseleave",e)};return(l,t)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),e.mergeProps(e.unref(k),{ref_key:"element",ref:u,class:{active:l.active,pressed:e.unref(f),disabled:l.disabled,current:l.current},onClickPassive:S,onMouseoverPassive:B,onMouseleavePassive:L}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]))])),_:3},16,["class"]))}});const F={...E,...j,..._,...R,...V,...I,iconPosition:{type:String,default:s.left,validator:e=>Object.values(s).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function z(l,t){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(l){const t=e.inject(l,void 0),o=e.computed((()=>void 0!==t));return{group:t,isInGroup:o,getGroupOrLocalRef:function(l,o,a){const n=null==t?void 0:t[l];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const r=e.toRef(o,l);return e.computed({get:()=>r.value,set(e){a&&a(`update:${l}`,e)}})}}}(m),{id:r,iconPosition:i,icon:u,label:d,pressed:s}=e.toRefs(l),v=n("modelValue",l,t),c=n("toggle",l),p=n("unselectable",l),f=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),g=e.computed((()=>{let e=l.modifiers,t=null==o?void 0:o.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),t&&(Array.isArray(t)||(t=t.split(" ")),t.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>Boolean(l.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:v,toggle:c,unselectable:p,multiple:f,modifiers:g,disabled:b,id:r,pressed:s,iconPosition:i,icon:u,label:d}}const U=l=>e.computed((()=>String((null==l?void 0:l.value)||o.uid())));function T(e,l,t){return t?H(e,t)===H(l,t):q(e,l)}function q(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const t=Array.isArray(e),o=Array.isArray(l);let a,n,r;if(t&&o){if(n=e.length,n!=l.length)return!1;for(a=n;0!=a--;)if(!q(e[a],l[a]))return!1;return!0}if(t!=o)return!1;const i=e instanceof Date,u=l instanceof Date;if(i!=u)return!1;if(i&&u)return e.getTime()==l.getTime();const d=e instanceof RegExp,s=l instanceof RegExp;if(d!=s)return!1;if(d&&s)return e.toString()==l.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(l).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(l,v[a]))return!1;for(a=n;0!=a--;)if(r=v[a],!q(e[r],l[r]))return!1;return!0}return e!=e&&l!=l}function H(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const t=l.split(".");let o=e;for(let l=0,a=t.length;l<a;++l){if(null==e)return null;o=o[t[l]]}return o}}return null}function G(e,l){if(null!=e&&l&&l.length)for(const t of l)if(T(e,t))return!0;return!1}function J(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===v.before?o.value:void 0)),n=e.computed((()=>(null==t?void 0:t.value)===v.after?o.value:void 0)),r=e.computed((()=>(null==t?void 0:t.value)===s.left?o.value:void 0)),i=e.computed((()=>(null==t?void 0:t.value)===s.right?o.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===s.top?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===s.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:r,hasIconRight:i,hasIconTop:u,hasIconBottom:d,hasIconBefore:a,hasIconAfter:n}}const K={key:1,class:"vv-button__label"},Q={key:1,class:"vv-button__label"},W=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:F,emits:["update:modelValue"],setup(l,{expose:t,emit:o}){const a=l,n=e.useAttrs(),r=e.useSlots(),i=o,{id:u,modifiers:d,iconPosition:v,icon:c,label:p,modelValue:f,disabled:m,toggle:g,unselectable:b}=z(a,i),y=U(u),S=e.computed((()=>(null==n?void 0:n.name)||y.value)),B=e.ref(null);t({$el:e.computed((()=>{var e;return null==(e=B.value)?void 0:e.$el}))});const L=e.computed((()=>g.value?Array.isArray(f.value)?G(S.value,f.value):T(S.value,f.value):a.pressed)),V=h("vv-button",d,e.computed((()=>({reverse:[s.right,s.bottom].includes(v.value),column:[s.top,s.bottom].includes(v.value),"icon-only":Boolean((null==c?void 0:c.value)&&!(null==p?void 0:p.value)&&!r.default)})))),{hasIcon:w}=J(c),A=e.computed((()=>void 0!==a.value?a.value:S.value)),$=e.computed((()=>{if(g.value)return{onClick:C}})),C=()=>{if(g.value){if(Array.isArray(f.value))return G(A.value,f.value)?void(b.value&&(f.value=f.value.filter((e=>e!==A.value)))):void f.value.push(A.value);if(A.value===f.value&&b.value)return void(f.value=a.uncheckedValue);f.value=A.value}};return(l,t)=>(e.openBlock(),e.createBlock(M,e.mergeProps({...e.unref(n),...e.unref($),disabled:e.unref(m),pressed:e.unref(L),active:l.active,type:l.type,to:l.to,href:l.href,target:l.target,rel:l.rel,ariaLabel:l.ariaLabel},{id:e.unref(y),ref_key:"element",ref:B,class:e.unref(V)}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[l.loading?e.renderSlot(l.$slots,"loading",{key:0},(()=>[l.loadingIcon?(e.openBlock(),e.createBlock(k,{key:0,class:"vv-button__loading-icon",name:l.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),l.loadingLabel?(e.openBlock(),e.createElementBlock("span",K,e.toDisplayString(l.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(l.$slots,"before"),e.unref(w)?(e.openBlock(),e.createBlock(k,e.mergeProps({key:0},e.unref(w),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("span",Q,[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"after")],64))]))])),_:3},16,["id","class"]))}});function X(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const Y={...P,..._,...B,...L,...N,...O,...V,...x,...I,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:e=>void 0===e||["user","environment"].includes(e)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:n},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:r},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:i},labelRemove:{type:String,default:"Remove file"}};const Z=["for"],ee={class:"vv-input-file__preview"},le=["src","alt"],te={class:"vv-input-file__wrapper"},oe=["id","readonly","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],ae=["value"],ne=["onClick"],re=["title","onClick"],ie={class:"vv-input-file__item-name"},ue={class:"vv-input-file__item-info"},de=["title","onClick"];return e.defineComponent({name:"VvInputFile",props:Y,emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,i=e.useSlots(),u=function(l,t,o){const a=y(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvInputFile",Y,n),{modifiers:d,id:s,readonly:v,icon:c,iconPosition:p,iconDownload:f}=e.toRefs(n),m=U(s),g=e.computed((()=>`${m.value}-hint`)),b=e.computed((()=>{if(!n.progress)return!1;const e="string"==typeof n.progress?parseInt(n.progress):n.progress;return e>0&&e<100})),{hasIconBefore:S,hasIconAfter:B}=J(c,p),{hasIcon:L}=J(f),V=h("vv-input-file",d,e.computed((()=>({dragging:R.value,loading:n.loading&&!b.value,valid:!0===n.valid,invalid:!0===n.invalid,"icon-before":!!S.value,"icon-after":!!B.value,"drop-area":N.value})))),{HintSlot:w,hasHintLabelOrSlot:A,hasInvalidLabelOrSlot:$,hintSlotScope:C}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>X(o.value.invalidLabel))),n=e.computed((()=>X(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||i.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var l,t,o,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==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??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:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:f}}(u,i),O=l.useVModel(n,"modelValue",r),x=e.computed({get:()=>{var e;return O.value&&(Array.isArray(O.value)||(null==(e=O.value)?void 0:e.name))?Array.isArray(O.value)?O.value:[O.value]:[]},set:e=>{I.value?O.value=e:O.value=null==e?void 0:e[0]}}),_=e.computed((()=>"string"==typeof n.max?parseInt(n.max):n.max)),N=e.computed((()=>n.dropArea&&!v.value)),I=e.computed((()=>!!n.multiple&&(!_.value||_.value-x.value.length>1))),R=e.ref(!1),j=e.ref(),P=()=>{R.value=!0},E=()=>{R.value=!1},D=e=>{var l,t;(null==(l=e.dataTransfer)?void 0:l.files)&&(R.value=!1,F(null==(t=e.dataTransfer)?void 0:t.files))},M=()=>{var e;(null==(e=j.value)?void 0:e.files)&&(F(j.value.files),j.value.value="")},F=e=>{if(!n.multiple)return Array.isArray(O.value)?void(O.value=[...e]):void(O.value=e[0]);let l=[];l=!Array.isArray(O.value)&&O.value?[O.value]:O.value&&Array.isArray(O.value)?[...O.value]:l;for(const t of e){if(_.value&&l.length>=_.value)break;l.push(t)}O.value=l,T.value=l.length-1},z=()=>{j.value&&(v.value||j.value.click())},T=e.ref(0),q=["image/jpeg","image/png"],H=e.computed((()=>{if(0===x.value.length)return;if(!x.value[T.value])return;if(x.value[T.value]instanceof File){const e=x.value[T.value];if(!q.includes(e.type))return;return URL.createObjectURL(e)}const e=x.value[T.value];return e.thumbnailUrl?e.thumbnailUrl:q.includes(e.type)?e.url:void 0}));e.watch(H,((e,l)=>{l&&URL.revokeObjectURL(l)})),e.onBeforeUnmount((()=>{H.value&&URL.revokeObjectURL(H.value)}));const G=e=>{if(e)return Math.floor(e/1024)},K=e.computed((()=>0===x.value.length||I.value?n.labelAdd:n.labelReplace)),Q=e.computed((()=>0===x.value.length||I.value?n.iconAdd:n.iconReplace)),se=({newIndex:e})=>{null!==e&&(T.value=e)};return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(V))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(m)},e.toDisplayString(l.label),9,Z)):e.createCommentVNode("v-if",!0),N.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vv-input-file__drop-area",onDragenter:e.withModifiers(P,["prevent","stop"]),onDragleave:e.withModifiers(E,["prevent","stop"]),onDrop:e.withModifiers(D,["prevent","stop"]),onDragover:t[0]||(t[0]=e.withModifiers((()=>{}),["prevent","stop"])),onClick:e.withModifiers(z,["stop"])},[e.renderSlot(l.$slots,"drop-area",{},(()=>[e.createElementVNode("picture",ee,[H.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:H.value,alt:x.value[T.value].name},null,8,le)):e.createCommentVNode("v-if",!0)]),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(W,{key:0,modifiers:"action",label:H.value?void 0:K.value,title:H.value?K.value:void 0,class:e.normalizeClass({"vv-input-file__drop-area-action":H.value}),icon:Q.value,onClick:e.withModifiers(z,["stop"])},null,8,["label","title","class","icon"]))]))],32)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",te,[e.unref(S)?(e.openBlock(),e.createBlock(k,e.normalizeProps(e.mergeProps({key:0},e.unref(S))),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",{id:e.unref(m),ref_key:"inputEl",ref:j,type:"file",readonly:e.unref(v),placeholder:l.placeholder,"aria-describedby":e.unref(A)?g.value:void 0,"aria-invalid":l.invalid,"aria-errormessage":e.unref($)?g.value:void 0,multiple:I.value,accept:l.accept,capture:l.capture,name:l.name,onChange:M},null,40,oe),b.value?(e.openBlock(),e.createElementBlock("progress",{key:1,class:"vv-input-file__progress",value:l.progress,max:"100"},e.toDisplayString(l.progress)+"% ",9,ae)):e.createCommentVNode("v-if",!0),e.unref(B)?(e.openBlock(),e.createBlock(k,e.normalizeProps(e.mergeProps({key:2},e.unref(B))),null,16)):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(a),{modelValue:x.value,"onUpdate:modelValue":t[1]||(t[1]=e=>x.value=e),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>l.sortable,onEnd:se},{item:e.withCtx((({element:t,index:o})=>[e.createElementVNode("li",{class:e.normalizeClass(["vv-input-file__item",{active:o===T.value&&N.value&&x.value.length>1,"cursor-move":l.sortable}]),onClick:e.withModifiers((e=>(e=>{T.value=e})(o)),["stop"])},[e.unref(L)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vv-input-file__item-action",title:l.labelDownload,onClick:e.withModifiers((e=>(e=>{const l=document.createElement("a");e instanceof File?l.href=URL.createObjectURL(e):e.url&&(l.href=e.url),l.setAttribute("download",e.name),document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(l.href)})(t)),["stop"])},[e.createVNode(k,e.normalizeProps(e.guardReactiveProps(e.unref(L))),null,16)],8,re)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ie,e.toDisplayString(t.name),1),e.createElementVNode("small",ue,e.toDisplayString(G(t.size))+" KB ",1),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:l.labelRemove,onClick:e.withModifiers((e=>(e=>{if(!Array.isArray(O.value))return void(O.value=void 0);T.value===e&&(T.value=0);const l=[...O.value];l.splice(e,1),O.value=l})(o)),["stop"])},null,8,de))],10,ne)])),_:1},8,["modelValue","move"]),e.createVNode(e.unref(w),{id:g.value,class:"vv-input-file__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("@iconify/vue"),require("uid"),require("vuedraggable")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","@iconify/vue","uid","vuedraggable"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputFile=l(e.vue,e.core,e.vue$1,e.uid,e.Sortable)}(this,(function(e,l,t,o,a){"use strict";const n="add",r="edit",i="download",u={prefix:"normal"};var d=(e=>(e.local="local",e.session="session",e))(d||{}),s=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(s||{}),v=(e=>(e.before="before",e.after="after",e))(v||{}),c=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(c||{}),p=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(p||{});const f=Symbol.for("volver"),m=Symbol.for("buttonGroup"),g=Symbol.for("dropdownTrigger"),b=Symbol.for("dropdownAction");function y(){return e.inject(f)}function h(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const k=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:{}},u),setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),r=y(),{modifiers:i}=e.toRefs(o),u=h("vv-icon",i),d=e.computed((()=>o.provider||(null==r?void 0:r.iconsProvider))),s=e.computed((()=>{const e=o.name??"",l=`@${d.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==r?void 0:r.iconsCollections.find((l=>{const o=`@${d.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return r&&o.src&&!t.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,r.fetchIcon(o.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),S={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},B={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},L={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},V={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},w={disabled:{type:Boolean,default:!1}},A={active:{type:Boolean,default:!1}},$={current:{type:Boolean,default:!1}},C={pressed:{type:Boolean,default:!1}},O={label:{type:[String,Number],default:void 0}},x={readonly:{type:Boolean,default:!1}},_={modifiers:{type:[String,Array],default:void 0}},N={hintLabel:{type:String,default:""}},I={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:v.before,validation:e=>Object.values(v).includes(e)}},R={unselectable:{type:Boolean,default:!0}},P={id:[String,Number]};s.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const j={...P,name:{type:String,required:!0}},E={...w,...O,...C,...A,...$,...S,type:{type:String,default:c.button,validator:e=>Object.values(c).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:p.button}};d.local;const D=E;const M=e.defineComponent({name:"VvAction",props:D,emits:["click","mouseover","mouseleave"],setup(l,{expose:t,emit:o}){const a=l,n=o,r=e.getCurrentInstance(),i=y(),u=e.ref(null);t({$el:u});const{reference:d,bus:s,aria:v,expanded:c}=e.inject(g,{});e.watch((()=>u.value),(e=>{d&&(d.value=e)}));const f=e.computed((()=>a.pressed||(null==c?void 0:c.value))),{role:m}=e.inject(b,{}),h=e.computed((()=>{switch(!0){case a.disabled:return p.button;case void 0!==a.to:return(null==i?void 0:i.nuxt)?p.nuxtLink:p.routerLink;case void 0!==a.href:return p.a;default:return a.defaultTag}})),k=e.computed((()=>{const e={...null==v?void 0:v.value,ariaPressed:!!f.value||void 0,ariaLabel:a.ariaLabel,role:null==m?void 0:m.value};switch(h.value){case p.a:return{...e,href:a.href,target:a.target,rel:a.rel};case p.routerLink:case p.nuxtLink:return{...e,to:a.to,target:a.target};case p.button:return{...e,type:a.type,disabled:a.disabled};default:return e}})),S=e=>{var l;a.disabled?e.preventDefault():(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onClick)?n("click",e):null==s||s.emit("click",e)},B=e=>{var l;(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onMouseover)?n("mouseover",e):null==s||s.emit("mouseover",e)},L=e=>{var l;(null==(l=null==r?void 0:r.vnode.props)?void 0:l.onMouseleave)?n("mouseleave",e):null==s||s.emit("mouseleave",e)};return(l,t)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(h)),e.mergeProps(e.unref(k),{ref_key:"element",ref:u,class:{active:l.active,pressed:e.unref(f),disabled:l.disabled,current:l.current},onClickPassive:S,onMouseoverPassive:B,onMouseleavePassive:L}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]))])),_:3},16,["class"]))}});const F={...E,...P,..._,...R,...V,...I,iconPosition:{type:String,default:s.left,validator:e=>Object.values(s).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function z(l,t){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(l){const t=e.inject(l,void 0),o=e.computed((()=>void 0!==t));return{group:t,isInGroup:o,getGroupOrLocalRef:function(l,o,a){const n=null==t?void 0:t[l];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const r=e.toRef(o,l);return e.computed({get:()=>r.value,set(e){a&&a(`update:${l}`,e)}})}}}(m),{id:r,iconPosition:i,icon:u,label:d,pressed:s}=e.toRefs(l),v=n("modelValue",l,t),c=n("toggle",l),p=n("unselectable",l),f=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),g=e.computed((()=>{let e=l.modifiers,t=null==o?void 0:o.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),t&&(Array.isArray(t)||(t=t.split(" ")),t.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>Boolean(l.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:v,toggle:c,unselectable:p,multiple:f,modifiers:g,disabled:b,id:r,pressed:s,iconPosition:i,icon:u,label:d}}const U=l=>e.computed((()=>String((null==l?void 0:l.value)||o.uid())));function T(e,l,t){return q(e,l)}function q(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const t=Array.isArray(e),o=Array.isArray(l);let a,n,r;if(t&&o){if(n=e.length,n!=l.length)return!1;for(a=n;0!=a--;)if(!q(e[a],l[a]))return!1;return!0}if(t!=o)return!1;const i=e instanceof Date,u=l instanceof Date;if(i!=u)return!1;if(i&&u)return e.getTime()==l.getTime();const d=e instanceof RegExp,s=l instanceof RegExp;if(d!=s)return!1;if(d&&s)return e.toString()==l.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(l).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(l,v[a]))return!1;for(a=n;0!=a--;)if(r=v[a],!q(e[r],l[r]))return!1;return!0}return e!=e&&l!=l}function H(e,l){if(null!=e&&l&&l.length)for(const t of l)if(T(e,t))return!0;return!1}function G(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===v.before?o.value:void 0)),n=e.computed((()=>(null==t?void 0:t.value)===v.after?o.value:void 0)),r=e.computed((()=>(null==t?void 0:t.value)===s.left?o.value:void 0)),i=e.computed((()=>(null==t?void 0:t.value)===s.right?o.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===s.top?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===s.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:r,hasIconRight:i,hasIconTop:u,hasIconBottom:d,hasIconBefore:a,hasIconAfter:n}}const J={key:1,class:"vv-button__label"},K={key:1,class:"vv-button__label"},Q=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:F,emits:["update:modelValue"],setup(l,{expose:t,emit:o}){const a=l,n=e.useAttrs(),r=e.useSlots(),i=o,{id:u,modifiers:d,iconPosition:v,icon:c,label:p,modelValue:f,disabled:m,toggle:g,unselectable:b}=z(a,i),y=U(u),S=e.computed((()=>(null==n?void 0:n.name)||y.value)),B=e.ref(null);t({$el:e.computed((()=>{var e;return null==(e=B.value)?void 0:e.$el}))});const L=e.computed((()=>g.value?Array.isArray(f.value)?H(S.value,f.value):T(S.value,f.value):a.pressed)),V=h("vv-button",d,e.computed((()=>({reverse:[s.right,s.bottom].includes(v.value),column:[s.top,s.bottom].includes(v.value),"icon-only":Boolean((null==c?void 0:c.value)&&!(null==p?void 0:p.value)&&!r.default)})))),{hasIcon:w}=G(c),A=e.computed((()=>void 0!==a.value?a.value:S.value)),$=e.computed((()=>{if(g.value)return{onClick:C}})),C=()=>{if(g.value){if(Array.isArray(f.value))return H(A.value,f.value)?void(b.value&&(f.value=f.value.filter((e=>e!==A.value)))):void f.value.push(A.value);if(A.value===f.value&&b.value)return void(f.value=a.uncheckedValue);f.value=A.value}};return(l,t)=>(e.openBlock(),e.createBlock(M,e.mergeProps({...e.unref(n),...e.unref($),disabled:e.unref(m),pressed:e.unref(L),active:l.active,type:l.type,to:l.to,href:l.href,target:l.target,rel:l.rel,ariaLabel:l.ariaLabel},{id:e.unref(y),ref_key:"element",ref:B,class:e.unref(V)}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[l.loading?e.renderSlot(l.$slots,"loading",{key:0},(()=>[l.loadingIcon?(e.openBlock(),e.createBlock(k,{key:0,class:"vv-button__loading-icon",name:l.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),l.loadingLabel?(e.openBlock(),e.createElementBlock("span",J,e.toDisplayString(l.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(l.$slots,"before"),e.unref(w)?(e.openBlock(),e.createBlock(k,e.mergeProps({key:0},e.unref(w),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("span",K,[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"after")],64))]))])),_:3},16,["id","class"]))}});function W(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const X={...j,..._,...B,...L,...N,...O,...V,...x,...I,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:e=>void 0===e||["user","environment"].includes(e)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:n},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:r},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:i},labelRemove:{type:String,default:"Remove file"}};const Y=["for"],Z={class:"vv-input-file__preview"},ee=["src","alt"],le={class:"vv-input-file__wrapper"},te=["id","readonly","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],oe=["value"],ae=["onClick"],ne=["title","onClick"],re={class:"vv-input-file__item-name"},ie={class:"vv-input-file__item-info"},ue=["title","onClick"];return e.defineComponent({name:"VvInputFile",props:X,emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,i=e.useSlots(),u=function(l,t,o){const a=y(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvInputFile",X,n),{modifiers:d,id:s,readonly:v,icon:c,iconPosition:p,iconDownload:f}=e.toRefs(n),m=U(s),g=e.computed((()=>`${m.value}-hint`)),b=e.computed((()=>{if(!n.progress)return!1;const e="string"==typeof n.progress?parseInt(n.progress):n.progress;return e>0&&e<100})),{hasIconBefore:S,hasIconAfter:B}=G(c,p),{hasIcon:L}=G(f),V=h("vv-input-file",d,e.computed((()=>({dragging:R.value,loading:n.loading&&!b.value,valid:!0===n.valid,invalid:!0===n.invalid,"icon-before":!!S.value,"icon-after":!!B.value,"drop-area":N.value})))),{HintSlot:w,hasHintLabelOrSlot:A,hasInvalidLabelOrSlot:$,hintSlotScope:C}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>W(o.value.invalidLabel))),n=e.computed((()=>W(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),i=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||r.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||i.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:i,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var l,t,o,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==(t=(l=this.$slots).loading)?void 0:t.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??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:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:p,HintSlot:f}}(u,i),O=l.useVModel(n,"modelValue",r),x=e.computed({get:()=>{var e;return O.value&&(Array.isArray(O.value)||(null==(e=O.value)?void 0:e.name))?Array.isArray(O.value)?O.value:[O.value]:[]},set:e=>{I.value?O.value=e:O.value=null==e?void 0:e[0]}}),_=e.computed((()=>"string"==typeof n.max?parseInt(n.max):n.max)),N=e.computed((()=>n.dropArea&&!v.value)),I=e.computed((()=>!!n.multiple&&(!_.value||_.value-x.value.length>1))),R=e.ref(!1),P=e.ref(),j=()=>{R.value=!0},E=()=>{R.value=!1},D=e=>{var l,t;(null==(l=e.dataTransfer)?void 0:l.files)&&(R.value=!1,F(null==(t=e.dataTransfer)?void 0:t.files))},M=()=>{var e;(null==(e=P.value)?void 0:e.files)&&(F(P.value.files),P.value.value="")},F=e=>{if(!n.multiple)return Array.isArray(O.value)?void(O.value=[...e]):void(O.value=e[0]);let l=[];l=!Array.isArray(O.value)&&O.value?[O.value]:O.value&&Array.isArray(O.value)?[...O.value]:l;for(const t of e){if(_.value&&l.length>=_.value)break;l.push(t)}O.value=l,T.value=l.length-1},z=()=>{P.value&&(v.value||P.value.click())},T=e.ref(0),q=["image/jpeg","image/png"],H=e.computed((()=>{if(0===x.value.length)return;if(!x.value[T.value])return;if(x.value[T.value]instanceof File){const e=x.value[T.value];if(!q.includes(e.type))return;return URL.createObjectURL(e)}const e=x.value[T.value];return e.thumbnailUrl?e.thumbnailUrl:q.includes(e.type)?e.url:void 0}));e.watch(H,((e,l)=>{l&&URL.revokeObjectURL(l)})),e.onBeforeUnmount((()=>{H.value&&URL.revokeObjectURL(H.value)}));const J=e=>{if(e)return Math.floor(e/1024)},K=e.computed((()=>0===x.value.length||I.value?n.labelAdd:n.labelReplace)),de=e.computed((()=>0===x.value.length||I.value?n.iconAdd:n.iconReplace)),se=({newIndex:e})=>{null!==e&&(T.value=e)};return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(V))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(m)},e.toDisplayString(l.label),9,Y)):e.createCommentVNode("v-if",!0),N.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vv-input-file__drop-area",onDragenter:e.withModifiers(j,["prevent","stop"]),onDragleave:e.withModifiers(E,["prevent","stop"]),onDrop:e.withModifiers(D,["prevent","stop"]),onDragover:t[0]||(t[0]=e.withModifiers((()=>{}),["prevent","stop"])),onClick:e.withModifiers(z,["stop"])},[e.renderSlot(l.$slots,"drop-area",{},(()=>[e.createElementVNode("picture",Z,[H.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:H.value,alt:x.value[T.value].name},null,8,ee)):e.createCommentVNode("v-if",!0)]),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(Q,{key:0,modifiers:"action",label:H.value?void 0:K.value,title:H.value?K.value:void 0,class:e.normalizeClass({"vv-input-file__drop-area-action":H.value}),icon:de.value,onClick:e.withModifiers(z,["stop"])},null,8,["label","title","class","icon"]))]))],32)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",le,[e.unref(S)?(e.openBlock(),e.createBlock(k,e.normalizeProps(e.mergeProps({key:0},e.unref(S))),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",{id:e.unref(m),ref_key:"inputEl",ref:P,type:"file",readonly:e.unref(v),placeholder:l.placeholder,"aria-describedby":e.unref(A)?g.value:void 0,"aria-invalid":l.invalid,"aria-errormessage":e.unref($)?g.value:void 0,multiple:I.value,accept:l.accept,capture:l.capture,name:l.name,onChange:M},null,40,te),b.value?(e.openBlock(),e.createElementBlock("progress",{key:1,class:"vv-input-file__progress",value:l.progress,max:"100"},e.toDisplayString(l.progress)+"% ",9,oe)):e.createCommentVNode("v-if",!0),e.unref(B)?(e.openBlock(),e.createBlock(k,e.normalizeProps(e.mergeProps({key:2},e.unref(B))),null,16)):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(a),{modelValue:x.value,"onUpdate:modelValue":t[1]||(t[1]=e=>x.value=e),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>l.sortable,onEnd:se},{item:e.withCtx((({element:t,index:o})=>[e.createElementVNode("li",{class:e.normalizeClass(["vv-input-file__item",{active:o===T.value&&N.value&&x.value.length>1,"cursor-move":l.sortable}]),onClick:e.withModifiers((e=>(e=>{T.value=e})(o)),["stop"])},[e.unref(L)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vv-input-file__item-action",title:l.labelDownload,onClick:e.withModifiers((e=>(e=>{const l=document.createElement("a");e instanceof File?l.href=URL.createObjectURL(e):e.url&&(l.href=e.url),l.setAttribute("download",e.name),document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(l.href)})(t)),["stop"])},[e.createVNode(k,e.normalizeProps(e.guardReactiveProps(e.unref(L))),null,16)],8,ne)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",re,e.toDisplayString(t.name),1),e.createElementVNode("small",ie,e.toDisplayString(J(t.size))+" KB ",1),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:l.labelRemove,onClick:e.withModifiers((e=>(e=>{if(!Array.isArray(O.value))return void(O.value=void 0);T.value===e&&(T.value=0);const l=[...O.value];l.splice(e,1),O.value=l})(o)),["stop"])},null,8,ue))],10,ae)])),_:1},8,["modelValue","move"]),e.createVNode(e.unref(w),{id:g.value,class:"vv-input-file__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(C))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
@@ -2119,6 +2119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2119
2119
|
emit,
|
|
2120
2120
|
(debounce == null ? void 0 : debounce.value) ?? 0
|
|
2121
2121
|
);
|
|
2122
|
+
const NEGATIVE_ZERO_REGEX = /^-0?[.,]?[0*]?$/;
|
|
2122
2123
|
const maskReady = ref(false);
|
|
2123
2124
|
const { el, mask, typed, masked, unmasked } = useIMask(
|
|
2124
2125
|
computed(
|
|
@@ -2134,13 +2135,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2134
2135
|
}
|
|
2135
2136
|
emit("update:masked", masked.value);
|
|
2136
2137
|
if (type.value === INPUT_TYPES.NUMBER) {
|
|
2137
|
-
if (
|
|
2138
|
+
if (/^-$|^$/.test(unmasked.value)) {
|
|
2138
2139
|
if (localModelValue.value === null || localModelValue.value === void 0) {
|
|
2139
2140
|
return;
|
|
2140
2141
|
}
|
|
2141
2142
|
localModelValue.value = void 0;
|
|
2142
2143
|
return;
|
|
2143
2144
|
}
|
|
2145
|
+
if (NEGATIVE_ZERO_REGEX.test(unmasked.value)) {
|
|
2146
|
+
localModelValue.value = 0;
|
|
2147
|
+
return;
|
|
2148
|
+
}
|
|
2144
2149
|
if (typeof typed.value !== "number") {
|
|
2145
2150
|
localModelValue.value = Number(typed.value);
|
|
2146
2151
|
return;
|
|
@@ -2205,6 +2210,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2205
2210
|
typed.value = new Date(newValue);
|
|
2206
2211
|
return;
|
|
2207
2212
|
}
|
|
2213
|
+
if (type.value === INPUT_TYPES.NUMBER && NEGATIVE_ZERO_REGEX.test(unmasked.value) && newValue === 0) {
|
|
2214
|
+
return;
|
|
2215
|
+
}
|
|
2208
2216
|
typed.value = newValue;
|
|
2209
2217
|
unmasked.value = `${typed.value}`;
|
|
2210
2218
|
}
|
|
@@ -2407,8 +2415,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2407
2415
|
"aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
|
|
2408
2416
|
};
|
|
2409
2417
|
if (type2 === INPUT_TYPES.DATE || type2 === INPUT_TYPES.MONTH || type2 === INPUT_TYPES.WEEK || type2 === INPUT_TYPES.TIME || type2 === INPUT_TYPES.DATETIME_LOCAL || type2 === INPUT_TYPES.NUMBER) {
|
|
2418
|
+
let max = props.max;
|
|
2419
|
+
if (type2 === INPUT_TYPES.DATE && !max) {
|
|
2420
|
+
max = "9999-12-31";
|
|
2421
|
+
}
|
|
2410
2422
|
toReturn.step = props.step;
|
|
2411
|
-
toReturn.max =
|
|
2423
|
+
toReturn.max = max !== void 0 ? String(max) : void 0;
|
|
2412
2424
|
toReturn.min = props.min !== void 0 ? String(props.min) : void 0;
|
|
2413
2425
|
}
|
|
2414
2426
|
if (type2 === INPUT_TYPES.TEXT || type2 === INPUT_TYPES.SEARCH || type2 === INPUT_TYPES.URL || type2 === INPUT_TYPES.TEL || type2 === INPUT_TYPES.EMAIL || type2 === INPUT_TYPES.PASSWORD || type2 === INPUT_TYPES.NUMBER) {
|
|
@@ -2631,7 +2643,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2631
2643
|
}, {
|
|
2632
2644
|
default: withCtx(() => [
|
|
2633
2645
|
createElementVNode("div", _hoisted_7, [
|
|
2634
|
-
renderSlot(_ctx.$slots, "suggestion",
|
|
2646
|
+
renderSlot(_ctx.$slots, "suggestion", mergeProps({ ref_for: true }, { value }), () => [
|
|
2635
2647
|
createTextVNode(
|
|
2636
2648
|
toDisplayString(value),
|
|
2637
2649
|
1
|
|
@@ -2649,7 +2661,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2649
2661
|
}, [
|
|
2650
2662
|
createVNode(
|
|
2651
2663
|
_sfc_main$4,
|
|
2652
|
-
|
|
2664
|
+
mergeProps({ ref_for: true }, unref(hasIconRemoveSuggestion)),
|
|
2653
2665
|
null,
|
|
2654
2666
|
16
|
|
2655
2667
|
/* FULL_PROPS */
|