@volverjs/ui-vue 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Volver.d.ts +121 -0
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +68 -0
- package/dist/components/VvAccordion/index.d.ts +47 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +98 -0
- package/dist/components/VvAccordionGroup/index.d.ts +54 -0
- package/dist/components/VvAction/VvAction.es.js +26 -26
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +110 -0
- package/dist/components/VvAction/index.d.ts +2 -0
- package/dist/components/VvAlert/VvAlert.es.js +43 -44
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +124 -0
- package/dist/components/VvAlert/index.d.ts +104 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +97 -0
- package/dist/components/VvAlertGroup/index.d.ts +47 -0
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +24 -0
- package/dist/components/VvAvatar/index.d.ts +10 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +50 -0
- package/dist/components/VvAvatarGroup/index.d.ts +28 -0
- package/dist/components/VvBadge/VvBadge.vue.d.ts +24 -0
- package/dist/components/VvBadge/index.d.ts +7 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +39 -0
- package/dist/components/VvBreadcrumb/index.d.ts +8 -0
- package/dist/components/VvButton/VvButton.es.js +186 -187
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +221 -0
- package/dist/components/VvButton/index.d.ts +131 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +84 -0
- package/dist/components/VvButtonGroup/index.d.ts +37 -0
- package/dist/components/VvCard/VvCard.vue.d.ts +30 -0
- package/dist/components/VvCard/index.d.ts +7 -0
- package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +187 -0
- package/dist/components/VvCheckbox/index.d.ts +94 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +212 -0
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +346 -0
- package/dist/components/VvCombobox/index.d.ts +694 -0
- package/dist/components/VvDialog/VvDialog.vue.d.ts +73 -0
- package/dist/components/VvDialog/index.d.ts +45 -0
- package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +258 -0
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +118 -0
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +22 -0
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +22 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +82 -0
- package/dist/components/VvDropdown/index.d.ts +120 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -31
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +6 -0
- package/dist/components/VvIcon/index.d.ts +86 -0
- package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +361 -0
- package/dist/components/VvInputFile/index.d.ts +204 -0
- package/dist/components/VvInputText/VvInputText.es.js +595 -588
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +524 -0
- package/dist/components/VvInputText/VvInputTextActions.d.ts +4 -0
- package/dist/components/VvInputText/index.d.ts +313 -0
- package/dist/components/VvNav/VvNav.es.js +63 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +48 -0
- package/dist/components/VvNav/VvNavItem.vue.d.ts +14 -0
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +3 -0
- package/dist/components/VvNav/index.d.ts +11 -0
- package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +38 -0
- package/dist/components/VvProgress/index.d.ts +33 -0
- package/dist/components/VvRadio/VvRadio.es.js +222 -224
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +179 -0
- package/dist/components/VvRadio/index.d.ts +80 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +212 -0
- package/dist/components/VvRadioGroup/index.d.ts +2 -0
- package/dist/components/VvSelect/VvSelect.es.js +200 -203
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +183 -0
- package/dist/components/VvSelect/index.d.ts +298 -0
- package/dist/components/VvTab/VvTab.es.js +35 -35
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +64 -0
- package/dist/components/VvTab/index.d.ts +19 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +384 -0
- package/dist/components/VvTextarea/index.d.ts +190 -0
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +37 -0
- package/dist/components/VvTooltip/index.d.ts +19 -0
- package/dist/components/VvVirtualScroll/VvVirtualScroll.vue.d.ts +51 -0
- package/dist/components/common/HintSlot.d.ts +57 -0
- package/dist/components/common/VvInputClearAction.d.ts +52 -0
- package/dist/components/common/VvInputPasswordAction.d.ts +71 -0
- package/dist/components/common/VvInputStepAction.d.ts +50 -0
- package/dist/components/index.d.ts +34 -0
- package/dist/components/index.es.js +1965 -1958
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlerInject.d.ts +4 -0
- package/dist/composables/alert/useAlert.d.ts +92 -0
- package/dist/composables/alert/useAlertProvide.d.ts +10 -0
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/useDropdownInject.d.ts +12 -0
- package/dist/composables/dropdown/useDropdownProvide.d.ts +40 -0
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/useGroupStateInject.d.ts +9 -0
- package/dist/composables/group/useGroupStateProvide.d.ts +6 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/index.es.js +34 -34
- package/dist/composables/index.umd.js +2 -2
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentFocus.d.ts +4 -0
- package/dist/composables/useComponentIcon.d.ts +11 -0
- package/dist/composables/useDebouncedInput.d.ts +5 -0
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +2 -0
- package/dist/composables/useOptions.d.ts +8 -0
- package/dist/composables/usePersistence.d.ts +3 -0
- package/dist/composables/useTextCount.d.ts +10 -0
- package/dist/composables/useUniqueId.d.ts +2 -0
- package/dist/composables/useVirtualScroll.d.ts +35 -0
- package/dist/composables/useVolver.d.ts +4 -0
- package/dist/constants.d.ts +104 -0
- package/dist/directives/index.d.ts +3 -0
- package/dist/directives/index.es.js +22 -22
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.d.ts +3 -0
- package/dist/directives/v-contextmenu.es.js +13 -13
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.d.ts +3 -0
- package/dist/icons.d.ts +1889 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +19 -19
- package/dist/index.umd.js +1 -1
- package/dist/json-render/catalog.d.ts +395 -0
- package/dist/json-render/components.d.ts +111 -0
- package/dist/json-render/definitions.d.ts +697 -0
- package/dist/json-render/index.d.ts +55 -0
- package/dist/json-render/index.es.js +1877 -1870
- package/dist/json-render/index.umd.js +1 -1
- package/dist/json-render/registry.d.ts +34 -0
- package/dist/props/index.d.ts +959 -0
- package/dist/resolvers/unplugin.d.ts +38 -0
- package/dist/resolvers/unplugin.es.js +28 -28
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +9 -0
- package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +2 -0
- package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +13 -0
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +9 -0
- package/dist/stories/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1788 -0
- package/dist/stories/Alert/Alert.settings.d.ts +4 -0
- package/dist/stories/Alert/Alert.stories.d.ts +9 -0
- package/dist/stories/Alert/Alert.test.d.ts +2 -0
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
- package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +4 -0
- package/dist/stories/Avatar/Avatar.settings.d.ts +5 -0
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
- package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
- package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
- package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +14 -0
- package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
- package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
- package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
- package/dist/stories/Badge/Badge.settings.d.ts +5 -0
- package/dist/stories/Badge/Badge.stories.d.ts +7 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +13 -0
- package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
- package/dist/stories/Button/Button.settings.d.ts +4 -0
- package/dist/stories/Button/Button.stories.d.ts +6 -0
- package/dist/stories/Button/Button.test.d.ts +2 -0
- package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
- package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
- package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
- package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
- package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +5 -0
- package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroup.test.d.ts +2 -0
- package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
- package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
- package/dist/stories/Card/Card.settings.d.ts +6 -0
- package/dist/stories/Card/Card.stories.d.ts +6 -0
- package/dist/stories/Card/Card.test.d.ts +2 -0
- package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +15 -0
- package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/stories/Checkbox/Checkbox.test.d.ts +2 -0
- package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
- package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.test.d.ts +2 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +4 -0
- package/dist/stories/Combobox/Combobox.stories.d.ts +24 -0
- package/dist/stories/Combobox/Combobox.test.d.ts +2 -0
- package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +9 -0
- package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +11 -0
- package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
- package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +5 -0
- package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +7 -0
- package/dist/stories/Icon/Icon.stories.d.ts +8 -0
- package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/InputText/InputText.settings.d.ts +11 -0
- package/dist/stories/InputText/InputText.stories.d.ts +16 -0
- package/dist/stories/InputText/InputText.test.d.ts +5 -0
- package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextIso.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
- package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
- package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextSuggestions.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
- package/dist/stories/Nav/Nav.settings.d.ts +4 -0
- package/dist/stories/Nav/Nav.stories.d.ts +6 -0
- package/dist/stories/Nav/Nav.test.d.ts +2 -0
- package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
- package/dist/stories/Progress/Progress.settings.d.ts +7 -0
- package/dist/stories/Progress/Progress.stories.d.ts +7 -0
- package/dist/stories/Progress/Progress.test.d.ts +2 -0
- package/dist/stories/Radio/Radio.settings.d.ts +12 -0
- package/dist/stories/Radio/Radio.stories.d.ts +11 -0
- package/dist/stories/Radio/Radio.test.d.ts +2 -0
- package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +2 -0
- package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
- package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Select/Select.settings.d.ts +8 -0
- package/dist/stories/Select/Select.stories.d.ts +16 -0
- package/dist/stories/Select/Select.test.d.ts +2 -0
- package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
- package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
- package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -0
- package/dist/stories/Tab/Tab.stories.d.ts +6 -0
- package/dist/stories/Tab/Tab.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +9 -0
- package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +2 -0
- package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
- package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
- package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +5 -0
- package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
- package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
- package/dist/stories/VirtualScroll/VirtualScroll.settings.d.ts +5 -0
- package/dist/stories/VirtualScroll/VirtualScroll.stories.d.ts +7 -0
- package/dist/stories/VirtualScroll/VirtualScroll.test.d.ts +2 -0
- package/dist/stories/VirtualScroll/VirtualScrollWithComposable.stories.d.ts +4 -0
- package/dist/stories/argTypes.d.ts +56 -0
- package/dist/test/expect.d.ts +18 -0
- package/dist/test/options.d.ts +1 -0
- package/dist/test/sleep.d.ts +1 -0
- package/dist/types/alert.d.ts +15 -0
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +15 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +59 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +9 -0
- package/dist/types/nav.d.ts +17 -0
- package/dist/utils/DateUtilities.d.ts +14 -0
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/dist/utils/FileUtilities.d.ts +14 -0
- package/dist/utils/ObjectUtilities.d.ts +76 -0
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +3 -2
- package/src/Volver.ts +8 -6
- package/src/components/VvAction/index.ts +1 -3
- package/src/components/VvButton/VvButton.vue +1 -1
- package/src/components/VvCheckboxGroup/index.ts +1 -3
- package/src/components/VvCombobox/VvCombobox.vue +3 -3
- package/src/components/VvDropdown/VvDropdown.vue +8 -8
- package/src/components/VvIcon/VvIcon.vue +3 -6
- package/src/components/VvInputFile/VvInputFile.vue +6 -6
- package/src/components/VvInputText/VvInputText.vue +95 -78
- package/src/components/VvRadioGroup/index.ts +1 -3
- package/src/composables/useBlurhash.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useDefaults.ts +55 -44
- package/src/composables/useModifiers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/resolvers/unplugin.ts +6 -6
- package/src/types/alert.ts +1 -1
- package/src/types/nav.ts +1 -1
- package/src/utils/DateUtilities.ts +3 -3
- package/src/utils/DomUtilities.ts +7 -1
- package/src/utils/ObjectUtilities.ts +60 -59
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,Q){typeof exports=="object"&&typeof module<"u"?module.exports=Q(require("vue"),require("vue-imask"),require("@floating-ui/vue"),require("@vueuse/core"),require("mitt"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","vue-imask","@floating-ui/vue","@vueuse/core","mitt","@iconify/vue"],Q):(e=typeof globalThis<"u"?globalThis:e||self,e.VvInputText=Q(e.Vue,e.vueImask,e.FloatingUiVue,e.VueuseCore,e.mitt,e.IconifyVue))})(this,function(e,Q,C,k,ye,ee){var dt=Object.create,je=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ct=Object.getOwnPropertyNames,ft=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty,mt=(t,a,l,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(var r=ct(a),i=0,f=r.length,p;i<f;i++)p=r[i],!pt.call(t,p)&&p!==l&&je(t,p,{get:(h=>a[h]).bind(null,p),enumerable:!(o=ut(a,p))||o.enumerable});return t},vt=(t,a,l)=>(l=t!=null?dt(ft(t)):{},mt(a||!t||!t.__esModule?je(l,"default",{value:t,enumerable:!0}):l,t));ye=vt(ye,1);var O=t=>t.toString().padStart(2,"0"),ht=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:?\d{2})?$/;function ze(t){if(typeof t!="string"||!ht.test(t))return!1;const a=new Date(t);return!Number.isNaN(a.getTime())&&a.toISOString()===t}function Ue(t,a="date",l){if(typeof t=="string"&&!ze(t))return"";const o=new Date(t);if(Number.isNaN(o.getTime()))return"";let r=`${o.getFullYear()}-${O(o.getMonth()+1)}`;if(a==="month"||(r+=`-${O(o.getDate())}`,a==="date"))return r;const i=l?`${O(o.getHours())}:${O(o.getMinutes())}:${O(o.getSeconds())}`:`${O(o.getHours())}:${O(o.getMinutes())}`;return a==="time"?i:`${r}T${i}`}var gt=/^\d{4}-\d{2}-\d{2}$/,bt=/^\d{4}-\d{2}$/,yt=/^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/,St=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/;function wt(t,a="date"){if(!t?.trim())return null;const l=new Date,o=l.getFullYear(),r=l.getMonth(),i=l.getDate();if(a==="date"){if(!gt.test(t))throw new Error("Invalid date format. Expected: YYYY-MM-DD");return new Date(`${t}T00:00:00`)}if(a==="month"){if(!bt.test(t))throw new Error("Invalid month format. Expected: YYYY-MM");return new Date(`${t}-01T00:00:00`)}if(a==="time"){if(!yt.test(t))throw new Error("Invalid time format. Expected: HH:mm or HH:mm:ss");return t.length===8?new Date(`${o}-${O(r+1)}-${O(i)}T${t}`):new Date(`${o}-${O(r+1)}-${O(i)}T${t}:00`)}if(!St.test(t))throw new Error("Invalid datetime format. Expected: YYYY-MM-DDThh:mm or YYYY-MM-DDThh:mm:ss");return t.length===16?new Date(`${t}:00`):new Date(`${t}`)}function ie(t){return(a=>a==null||a===""||Array.isArray(a)&&a.length===0||!(a instanceof Date)&&typeof a=="object"&&Object.keys(a).length===0)((0,e.unref)(t))}function Et(t){return typeof t=="string"}function We(t){return Array.isArray(t)?t.filter(a=>Et(a)).join(" "):t}function Dt(t,a){const l=(0,e.computed)(()=>(0,e.isRef)(t)?t.value:t),o=(0,e.computed)(()=>We(l.value.invalidLabel)),r=(0,e.computed)(()=>We(l.value.validLabel)),i=(0,e.computed)(()=>l.value.loadingLabel),f=(0,e.computed)(()=>l.value.hintLabel),p=(0,e.computed)(()=>!!(l.value.loading&&(a.loading||i.value))),h=(0,e.computed)(()=>!p.value&&!!(l.value.invalid&&(a.invalid||o.value))),m=(0,e.computed)(()=>!p.value&&!h.value&&!!(l.value.valid&&(a.valid||r.value))),E=(0,e.computed)(()=>!p.value&&!h.value&&!m.value&&!!(a.hint||f.value)),u=(0,e.computed)(()=>h.value||m.value||p.value||E.value);return{hasInvalidLabelOrSlot:h,hasHintLabelOrSlot:E,hasValidLabelOrSlot:m,hasLoadingLabelOrSlot:p,hintSlotScope:(0,e.computed)(()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading})),HintSlot:(0,e.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:u,invalidLabel:o,validLabel:r,loadingLabel:i,hintLabel:f,hasInvalidLabelOrSlot:h,hasValidLabelOrSlot:m,hasLoadingLabelOrSlot:p,hasHintLabelOrSlot:E}},render(){if(this.isVisible){let b;return this.hasInvalidLabelOrSlot&&(b="alert"),this.hasValidLabelOrSlot&&(b="status"),this.hasLoadingLabelOrSlot?(0,e.h)(this.tag,{role:b},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,e.h)(this.tag,{role:b},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,e.h)(this.tag,{role:b},this.$slots.valid?.()??this.validLabel):(0,e.h)(this.tag,{role:b},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}var q=(function(t){return t.local="local",t.session="session",t})({}),Ye=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),P=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),kt=(function(t){return t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t})({}),se=(function(t){return t.before="before",t.after="after",t})({}),qe=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),Pt=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),Ct=(function(t){return t.button="button",t.link="link",t.menuitem="menuitem",t})({}),Se=(function(t){return t.listbox="listbox",t.menu="menu",t})({}),Ke=(function(t){return t.option="option",t.presentation="presentation",t})({}),It=Symbol.for("volver"),Tt=Symbol.for("dropdownTrigger"),Xe=Symbol.for("dropdownItem"),$t=Symbol.for("dropdownAction"),x={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},Ot={prefix:"normal"},xt={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},we={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},Ee={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},De={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},te={disabled:{type:Boolean,default:!1}},Ge={required:{type:Boolean,default:!1}},Lt={selected:{type:Boolean,default:!1}},Nt={active:{type:Boolean,default:!1}},Vt={current:{type:Boolean,default:!1}},ta={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:x.clear},labelClear:{type:String,default:"Clear"}},At={pressed:{type:Boolean,default:!1}},de={label:{type:[String,Number],default:void 0}},ke={readonly:{type:Boolean,default:!1}},oe={modifiers:{type:[String,Array],default:void 0}},Pe={hintLabel:{type:String,default:""}},Bt={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},Mt={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},_t={debounce:{type:[Number,String],default:void 0}},Rt={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:se.before,validation:t=>Object.values(se).includes(t)}},Je={tabindex:{type:[String,Number],default:0}},Ht={floating:{type:Boolean,default:!1}},Ft={unselectable:{type:Boolean,default:!0}},Ze={id:[String,Number]},jt={placement:{type:String,default:P.bottom,validator:t=>Object.values(P).includes(t)||Object.values(kt).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(Ye).includes(t)},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}},Qe={...Ze,name:{type:String,required:!0}},zt={autofocus:{type:Boolean,default:!1}},Ut={autocomplete:{type:String,default:"off"}},Wt={...Qe,...zt,...Ut,...Je,...te,...ke,...we,...Ee,...Pe,...De,...oe,...Mt,..._t,...Rt,...Ht,...de,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...Ge},oa={...Qe,...Je,...we,...Ee,...Pe,...te,...ke,...oe,...de,...De,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},aa={...we,...Ee,...Bt,...Pe,...te,...ke,...oe,...de,...De,...Ge,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},na={...te,...de,...At,...Nt,...Vt,...xt,type:{type:String,default:qe.button,validator:t=>Object.values(qe).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:Pt.button}},Yt={storageType:{type:String,default:q.local,validator:t=>Object.values(q).includes(t)},storageKey:String},qt={...Ze,...jt,...oe,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:Se.menu,validator:t=>Object.values(Se).includes(t)}},Kt={focusOnHover:{type:Boolean,default:!1}},Xt={...te,...Lt,...Ft,...oe,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function et(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function Gt({reference:t,id:a,expanded:l,aria:o}){const r=(0,ye.default)();return{bus:r,component:(0,e.defineComponent)({name:"VvDropdownTriggerProvider",setup(){(0,e.provide)(Tt,{reference:t,id:a,expanded:l,aria:o,bus:r})},render(){return(0,e.h)(e.Fragment,{},this.$slots.default?.())}})}}function Jt({role:t,...a}){const l=(0,e.computed)(()=>t.value===Se.listbox?Ke.option:Ke.presentation);return(0,e.provide)(Xe,{role:l,...a}),{itemRole:l}}function Zt({expanded:t}){(0,e.provide)($t,{role:(0,e.ref)(Ct.menuitem),expanded:t})}function ue(t,a,l){return(0,e.computed)(()=>{const o={[t]:!0},r=typeof a?.value=="string"?a.value.split(" "):a?.value;return r&&Array.isArray(r)&&r.forEach(i=>{i&&(o[`${t}--${i}`]=!0)}),l&&Object.keys(l.value).forEach(i=>{o[`${t}--${i}`]=(0,e.unref)(l.value[i])}),o})}var Qt=["id","tabindex","role","aria-labelledby"],eo={name:"VvDropdown",inheritAttrs:!1},to=(0,e.defineComponent)({...eo,props:qt,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{expose:a,emit:l}){const o=t,r=l,{id:i}=(0,e.toRefs)(o),f=et(i),p=(0,e.useAttrs)(),h=(0,e.ref)("auto"),m=(0,e.ref)("auto"),E=(0,e.ref)(),u=(0,e.ref)(),b=(0,e.ref)(),L=(0,e.ref)(),T=(0,e.computed)({get:()=>o.reference??E.value,set:s=>{E.value=s}}),F=(0,e.ref)(!1);(0,e.onMounted)(()=>{(0,k.useMutationObserver)(u.value,()=>{F.value=window.getComputedStyle(u.value).getPropertyValue("--dropdown-custom-position")?.trim()==="true"},{attributeFilter:["style"],window})});function K(s,g,W){return typeof s=="boolean"?g():W(s)}const $e=(0,e.computed)(()=>{const s=[];if(o.autoPlacement?s.push(K(o.autoPlacement,()=>(0,C.autoPlacement)(),g=>(0,C.autoPlacement)(g))):o.flip&&s.push(K(o.flip,()=>(0,C.flip)({fallbackStrategy:"initialPlacement"}),g=>(0,C.flip)(g))),o.shift&&s.push(K(o.shift,()=>(0,C.shift)(),g=>(0,C.shift)(g))),o.size){const g=({availableWidth:W,availableHeight:Ve})=>{h.value=`${W}px`,m.value=`${Ve}px`};s.push(K(o.size,()=>(0,C.size)({apply:g}),W=>(0,C.size)({...W,apply:g})))}return o.offset&&s.push(["string","number"].includes(typeof o.offset)?(0,C.offset)(Number(o.offset)):(0,C.offset)(o.offset)),o.arrow&&s.push((0,C.arrow)({element:b})),s}),{x:Oe,y:xe,middlewareData:j,placement:z,strategy:Le}=(0,C.useFloating)(T,u,{whileElementsMounted:(...s)=>(0,C.autoUpdate)(...s,{animationFrame:o.strategy===Ye.fixed}),placement:(0,e.computed)(()=>o.placement),strategy:(0,e.computed)(()=>o.strategy),middleware:$e}),S=(0,e.computed)(()=>{if(F.value)return;const s=o.triggerWidth&&T.value?`${T.value?.offsetWidth}px`:void 0;return{position:Le.value,top:`${xe.value??0}px`,left:`${Oe.value??0}px`,maxWidth:s?void 0:h.value,maxHeight:m.value,width:s}}),fe=(0,e.computed)(()=>z.value.split("-")[0]),pe=(0,e.computed)(()=>{if(F.value)return;const s={[P.top]:P.bottom,[P.right]:P.left,[P.bottom]:P.top,[P.left]:P.right}[fe.value];return{left:j.value.arrow?.x!==void 0?`${j.value.arrow?.x}px`:void 0,top:j.value.arrow?.y!==void 0?`${j.value.arrow?.y}px`:void 0,[s]:`${-(b.value?.offsetWidth??0)/2}px`}}),U=(0,k.useVModel)(o,"modelValue",r),X=(0,e.ref)(!1),y=(0,e.computed)({get:()=>U.value??X.value,set:s=>{if(U.value===void 0){X.value=s;return}U.value=s}});function c(){y.value=!0}function B(){y.value=!1}function M(){y.value=!y.value}function me(s){T.value=s}(0,k.onClickOutside)(u,()=>{!o.keepOpen&&y.value&&(y.value=!1)},{ignore:[T]});const Ne=(0,e.computed)(()=>T.value?.getAttribute?.("id")??void 0),ae=(0,e.computed)(()=>({"aria-controls":f.value,"aria-haspopup":!0,"aria-expanded":y.value})),{component:N,bus:R}=Gt({reference:T,id:f,expanded:y,aria:ae});R.on("click",M);const{role:ve,modifiers:he}=(0,e.toRefs)(o),w=ue("vv-dropdown",he,(0,e.computed)(()=>({arrow:o.arrow}))),{focused:_}=(0,k.useFocusWithin)(u);function I(s){return s?[...s.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(g=>!g.hasAttribute("disabled")&&!g.getAttribute("aria-hidden")):[]}function ne(){(0,e.nextTick)(()=>{const s=I(u.value);s.length>0&&s[0].focus({preventScroll:!0})})}function $(){(0,e.nextTick)(()=>{const s=I(L.value);s.length>0&&s[0].focus({preventScroll:!0})})}function re(){(0,e.nextTick)(()=>{if(_.value){const s=I(u.value);if(s.length===0||!document.activeElement)return;const g=s.indexOf(document.activeElement);g<s.length-1?s[g+1].focus({preventScroll:!0}):s[0].focus({preventScroll:!0})}})}function G(){(0,e.nextTick)(()=>{if(_.value){const s=I(u.value);if(s.length===0||!document.activeElement)return;const g=s.indexOf(document.activeElement);if(g>0){s[g-1].focus({preventScroll:!0});return}s.at(-1)?.focus({preventScroll:!0})}})}(0,e.watch)(y,s=>{s&&o.autofocusFirst&&ne()}),a({toggle:M,show:c,hide:B,init:me,focusFirst:ne,focusFirstListElement:$,focusNext:re,focusPrev:G,customPosition:F});const{itemRole:le}=Jt({role:ve,expanded:y,focused:_,hovered:(0,k.useElementHover)(u)});(0,k.onKeyStroke)("Escape",s=>{y.value&&(s.preventDefault(),B())}),(0,k.onKeyStroke)("ArrowDown",s=>{y.value&&_.value&&(s.preventDefault(),re())}),(0,k.onKeyStroke)("ArrowUp",s=>{y.value&&_.value&&(s.preventDefault(),G())}),(0,k.onKeyStroke)([" ","Enter"],s=>{const g=s.target;y.value&&_.value&&g&&g?.click()});const J={"before-enter":()=>{r(y.value?"beforeExpand":"beforeCollapse"),r("beforeEnter")},"after-leave":()=>{r(y.value?"afterExpand":"afterCollapse"),r("afterLeave")},enter:()=>{r("enter")},"after-enter":()=>{r("afterEnter")},"enter-cancelled":()=>{r("enterCancelled")},"before-leave":()=>{r("beforeLeave")},leave:()=>{r("leave")},"leave-cancelled":()=>{r("leaveCancelled")}};return(s,g)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createVNode)((0,e.unref)(N),null,{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(s.$slots,"default",(0,e.normalizeProps)((0,e.guardReactiveProps)({init:me,show:c,hide:B,toggle:M,expanded:(0,e.unref)(y),aria:(0,e.unref)(ae)})))]),_:3}),(0,e.createVNode)(e.Transition,(0,e.mergeProps)({name:s.transitionName},(0,e.toHandlers)(J),{persisted:""}),{default:(0,e.withCtx)(()=>[(0,e.withDirectives)((0,e.createElementVNode)("div",{ref_key:"floatingEl",ref:u,style:(0,e.normalizeStyle)((0,e.unref)(S)),class:(0,e.normalizeClass)((0,e.unref)(w))},[o.arrow?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,ref_key:"arrowEl",ref:b,style:(0,e.normalizeStyle)((0,e.unref)(pe)),class:"vv-dropdown__arrow"},null,4)):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(s.$slots,"before",(0,e.normalizeProps)((0,e.guardReactiveProps)({show:c,hide:B,toggle:M,expanded:(0,e.unref)(y)}))),(0,e.createElementVNode)("div",(0,e.mergeProps)((0,e.unref)(p),{id:(0,e.unref)(f),ref_key:"listEl",ref:L,tabindex:(0,e.unref)(y)?void 0:-1,role:(0,e.unref)(ve),"aria-labelledby":(0,e.unref)(Ne),class:"vv-dropdown__list"}),[(0,e.renderSlot)(s.$slots,"items",(0,e.normalizeProps)((0,e.guardReactiveProps)({show:c,hide:B,toggle:M,expanded:(0,e.unref)(y),role:(0,e.unref)(le)})))],16,Qt),(0,e.renderSlot)(s.$slots,"after",(0,e.normalizeProps)((0,e.guardReactiveProps)({show:c,hide:B,toggle:M,expanded:(0,e.unref)(y)})))],6),[[e.vShow,(0,e.unref)(y)]])]),_:3},16,["name"])],64))}}),oo=to;function ao(){return(0,e.inject)(Xe,{})}var no={name:"VvDropdownItem"},ro=(0,e.defineComponent)({...no,props:Kt,setup(t){const a=t,{role:l,expanded:o}=ao(),r=(0,e.ref)(null);Zt({expanded:o});const i=(0,k.useElementHover)(r),{focused:f}=(0,k.useFocus)(r),{focused:p}=(0,k.useFocusWithin)(r);return(0,e.watch)(i,h=>{h&&a.focusOnHover&&(f.value=!0)}),(h,m)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",(0,e.mergeProps)({role:(0,e.unref)(l)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":(0,e.unref)(f)||(0,e.unref)(p)}]}),[(0,e.renderSlot)(h.$slots,"default")],16))}}),lo=ro,io=["title"],so={name:"VvDropdownOption"},uo=(0,e.defineComponent)({...so,props:Xt,setup(t){const a=t,{modifiers:l}=(0,e.toRefs)(a),o=ue("vv-dropdown-option",l,(0,e.computed)(()=>({disabled:a.disabled,selected:a.selected,unselectable:a.unselectable&&a.selected}))),r=(0,e.computed)(()=>a.selected?a.unselectable?a.deselectHintLabel:a.selectedHintLabel:a.disabled?"":a.selectHintLabel);return(i,f)=>((0,e.openBlock)(),(0,e.createBlock)(lo,{class:(0,e.normalizeClass)((0,e.unref)(o)),tabindex:i.disabled?-1:0,"aria-selected":i.selected,"aria-disabled":i.disabled,"focus-on-hover":i.focusOnHover},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,"default"),(0,e.createElementVNode)("span",{class:"vv-dropdown-option__hint",title:(0,e.unref)(r)},[(0,e.renderSlot)(i.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)({disabled:i.disabled,selected:i.selected,unselectable:i.unselectable})),()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)),1)])],8,io)]),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}}),co=uo;function Ce(){return(0,e.inject)(It,void 0)}var fo={name:"VvIcon"},po=(0,e.defineComponent)({...fo,props:(0,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:{}},Ot),setup(t){const a=t,l=(0,e.computed)(()=>typeof a.rotate=="string"?Number.parseFloat(a.rotate):a.rotate),o=(0,e.ref)(!0),r=Ce(),{modifiers:i}=(0,e.toRefs)(a),f=ue("vv-icon",i),p=(0,e.computed)(()=>a.provider||r?.iconsProvider),h=(0,e.computed)(()=>{const u=a.name??"",b=`@${p.value}:${a.prefix}:${u}`;if((0,ee.iconLoaded)(b))return b;const L=r?.iconsCollections.find(T=>(0,ee.iconLoaded)(`@${p.value}:${T.prefix}:${u}`));return L?`@${p.value}:${L.prefix}:${u}`:u});function m(u){const b=typeof window<"u"?new window.DOMParser:null;return b?b.parseFromString(u,"text/html").querySelector("svg"):null}function E(u){const b=m(u),L=b?.innerHTML.trim()||"";b&&L&&(0,ee.addIcon)(`@${p.value}:${a.prefix}:${a.name}`,{body:L,height:b.viewBox.baseVal.height,width:b.viewBox.baseVal.width})}return r&&a.src&&!(0,ee.iconLoaded)(`@${p.value}:${a.prefix}:${a.name}`)&&(o.value=!1,r.fetchIcon(a.src).then(u=>{u&&E(u),o.value=!0}).catch(u=>{throw o.value=!0,new Error(`Error during fetch icon: ${u?.message}`)})),a.svg&&E(a.svg),(u,b)=>(0,e.unref)(o)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(ee.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(f)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(l),color:t.color,icon:(0,e.unref)(h)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),A=po,d={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},mo=["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","suggestion:selected","suggestion:removed","focus","blur","keyup","keydown","keypress","clear"],tt={...Wt,...Yt,modelValue:[String,Number,Date],type:{type:String,default:d.TEXT,validator:t=>Object.values(d).includes(t)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:[String,Object],default:x.showPassword},iconHidePassword:{type:[String,Object],default:x.hidePassword},iconClear:{type:[String,Object],default:x.clear},iconRemoveSuggestion:{type:[String,Object],default:x.remove},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},labelRemoveSuggestion:{type:String,default:"Remove suggestion"},iMask:{type:Object,default:void 0},masked:{type:String,default:void 0},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String},selectOnFocus:{type:Boolean,default:!1},maxSuggestions:{type:Number,default:5},suggestions:{type:Array,default:void 0},inputMode:{type:String,default:"text"}};function ce(t,a){const l=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),o=(0,e.computed)(()=>a?.value===se.before?l.value:void 0),r=(0,e.computed)(()=>a?.value===se.after?l.value:void 0);return{hasIcon:l,hasIconLeft:(0,e.computed)(()=>a?.value===P.left?l.value:void 0),hasIconRight:(0,e.computed)(()=>a?.value===P.right?l.value:void 0),hasIconTop:(0,e.computed)(()=>a?.value===P.top?l.value:void 0),hasIconBottom:(0,e.computed)(()=>a?.value===P.bottom?l.value:void 0),hasIconBefore:o,hasIconAfter:r}}var ot=(0,e.defineComponent)({components:{VvIcon:A},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:a}){const{hasIcon:l}=ce((0,e.computed)(()=>t.icon));function o(r){r?.stopPropagation(),t.disabled||a("clear")}return{hasIcon:l,onClick:o}},render(){const t=this.hasIcon?(0,e.h)(A,{...this.hasIcon,class:`vv-${this.inputType}__icon`}):void 0;return(0,e.h)("button",{disabled:this.disabled,class:`vv-${this.inputType}__action`,ariaLabel:this.label,type:"button",onClick:this.onClick},t)}}),at=(0,e.defineComponent)({components:{VvIcon:A},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:[String,Object],default:x.showPassword},iconHide:{type:[String,Object],default:x.hidePassword}},emits:["toggle-password"],setup(t,{emit:a}){const l=(0,e.ref)(!1),o=(0,e.computed)(()=>l.value?t.iconHide:t.iconShow),{hasIcon:r}=ce(o);function i(f){f?.stopPropagation(),t.disabled||(l.value=!l.value,a("toggle-password",l.value))}return{active:l,activeIcon:o,hasIcon:r,onClick:i}},render(){const t=this.hasIcon?(0,e.h)(A,{...this.hasIcon,class:`vv-${this.inputType}__icon`}):void 0;return(0,e.h)("button",{disabled:this.disabled,class:`vv-${this.inputType}__action`,ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),Ie=(0,e.defineComponent)({components:{VvIcon:A},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:t=>["up","down"].includes(t),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:a}){const l=(0,e.computed)(()=>t.mode==="up");return{isUp:l,onClick:r=>{r?.stopPropagation(),t.disabled||a(l.value?"step-up":"step-down")}}},render(){return(0,e.h)("button",{class:[`vv-${this.inputType}__action`,`vv-${this.inputType}__action-chevron`,this.isUp?`vv-${this.inputType}__action-chevron-up`:void 0],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}});function Te(t,a,l){return{name:"VvInputTextActions",components:{VvIcon:A,VvInputPasswordAction:at,VvInputStepAction:Ie,VvInputClearAction:ot},setup(){return{isDirty:l,isDisabled:(0,e.computed)(()=>a.disabled||a.readonly),labelStepUp:a.labelStepUp,labelStepDown:a.labelStepDown,labelShowPassword:a.labelShowPassword,labelHidePassword:a.labelHidePassword,labelClear:a.labelClear,iconShowPassword:a.iconShowPassword,iconHidePassword:a.iconHidePassword}},render(){let o=null;switch(t){case d.SEARCH:{const{onClear:r}=this.$attrs;o=[(0,e.h)(ot,{disabled:this.isDisabled||!this.isDirty,label:this.labelClear,onClear:r})];break}case d.PASSWORD:{const{onTogglePassword:r}=this.$attrs;o=[(0,e.h)(at,{disabled:this.isDisabled,onTogglePassword:r,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case d.NUMBER:{const{onStepUp:r,onStepDown:i}=this.$attrs;o=[(0,e.h)(Ie,{mode:"up",disabled:this.isDisabled||a.max!==void 0&&a.modelValue===a.max,label:this.labelStepUp,onStepUp:r,onStepDown:i}),(0,e.h)(Ie,{mode:"down",disabled:this.isDisabled||a.min!==void 0&&a.modelValue===a.min,label:this.labelStepDown,onStepUp:r,onStepDown:i})];break}}return Array.isArray(o)?(0,e.h)("div",{class:"vv-input-text__actions-group"},o):o}}}function vo(t,a,l){const o=Ce(),r=(0,e.computed)(()=>{if(!(!o||!o.defaults.value?.[t]))return o.defaults.value[t]});return(0,e.computed)(()=>{if(r.value===void 0)return l;const i=r.value,f=a,p=l;return Object.keys(f).reduce((h,m)=>{const E=p[m];if(h[m]=E,m in i){if(Array.isArray(f[m])){const u=f[m];u.length&&u[0]===E&&(h[m]=i[m])}if(typeof f[m]=="function"){const u=f[m];u()===E&&(h[m]=i[m])}if(typeof f[m]=="object"){let u=f[m].default;typeof u=="function"&&(u=u()),typeof u=="object"?JSON.stringify(u)===JSON.stringify(E)&&(h[m]=i[m]):u===E&&(h[m]=i[m])}}return h},{})})}function ho(t,a,l=0,{getter:o=i=>i,setter:r=i=>i}={}){let i;return typeof l=="string"&&(l=Number.parseInt(l)),(0,e.computed)({get:()=>o(t?.value),set:f=>{i&&clearTimeout(i),i=setTimeout(()=>{a("update:modelValue",r(f))},l)}})}function go(t,a){const{focused:l}=(0,k.useFocus)(t);return(0,e.watch)(l,o=>{a(o?"focus":"blur",(0,e.unref)(t))}),{focused:l}}function bo(t,a){const l=(0,e.computed)(()=>((0,e.unref)(t)??"").length),o=(0,e.computed)(()=>a?.lowerLimit!==void 0&&l.value<a?.lowerLimit?l.value-a.lowerLimit:a?.upperLimit!==void 0?a.upperLimit-l.value:0);return{length:l,gap:o,formatted:(0,e.computed)(()=>a?.mode===!1?"":a?.mode==="limit"&&a?.upperLimit?`${l.value} / ${a.lowerLimit?`${a.lowerLimit}-`:""}${a.upperLimit}`:a?.mode==="countdown"?o.value===0?void 0:o.value:l.value)}}function yo(t,a=q.local,l){const o=(0,e.ref)();l&&(o.value=l);let r;return(0,e.onMounted)(()=>{t&&(0,e.watch)(t,(i,f)=>{const p=(0,e.unref)(a)===q.session?sessionStorage:localStorage;if(f&&f!==i&&p.removeItem(f),i){r=(0,k.useStorage)(i,r?.value??o.value,p),r.value&&(o.value=r.value);return}r=void 0},{immediate:!0}),(0,e.isRef)(a)&&(0,e.watch)(a,(i,f)=>{if(t?.value){if(i){const p=i===q.session?sessionStorage:localStorage;r=(0,k.useStorage)(t.value,r?.value??o.value,p)}f&&f!==i&&(f===q.session?sessionStorage:localStorage).removeItem(t.value)}})}),(0,e.watch)(o,i=>{r&&(r.value=i)},{deep:!0,immediate:!0}),o}var So=["for"],wo={key:0,class:"vv-input-text__input-before"},Eo=["id"],Do={key:1,class:"vv-input-text__unit"},ko={key:5,class:"vv-input-text__input-after"},Po={key:6,class:"vv-input-text__limit"},Co={class:"flex-1"},Io=["title","onClick"],To={name:"VvInputText"},$o=(0,e.defineComponent)({...To,props:tt,emits:mo,setup(t,{expose:a,emit:l}){const o=t,r=l,i=(0,e.useSlots)(),f=Ce(),p=vo("VvInputText",tt,o),{count:h,debounce:m,icon:E,iconPosition:u,iconRemoveSuggestion:b,id:L,invalid:T,label:F,labelRemoveSuggestion:K,loading:$e,maxlength:Oe,minlength:xe,modelValue:j,step:z,storageType:Le,type:S,unit:fe,valid:pe}=(0,e.toRefs)(o),U=et(L),X=(0,e.computed)(()=>`${U.value}-hint`),y=(0,e.computed)(()=>o.floating&&ie(o.placeholder)?" ":o.placeholder),c=ho(j,r,m?.value??0),B=(0,e.computed)(()=>{const n=typeof z.value=="number"?z.value:Number.parseInt(z.value);return Number.isNaN(n)?!1:n%60!==0}),M=/^-0?[.,]?[0*]?$/,me=/./,Ne=/^-$|^$/,ae=(0,e.ref)(!1),N=(0,e.ref)(),R=(0,e.ref)(),{el:ve,mask:he,typed:w,masked:_,unmasked:I}=(0,Q.useIMask)((0,e.computed)(()=>{if(!o.iMask)return{mask:me};if(o.iMask.mask===Number){const n={...o.iMask};return o.min&&(n.min=Number(o.min)),o.max&&(n.max=Number(o.max)),n}return o.iMask}),{emit:r,onAccept:()=>{if(ae.value){if(r("update:masked",_.value),S.value===d.NUMBER){if(Ne.test(I.value)){if(c.value===null||c.value===void 0)return;c.value=void 0;return}if(M.test(I.value)){c.value=0;return}if(typeof w.value!="number"){c.value=Number(w.value);return}c.value=w.value;return}if(S.value===d.DATETIME_LOCAL||S.value===d.DATE||S.value===d.TIME||S.value===d.MONTH){if(!w.value){if(!c.value)return;if(N.value){c.value=void 0;return}c.value="";return}if(!(w.value instanceof Date)&&!N.value&&!R.value){c.value=w.value;return}let n=w.value;if(n instanceof Date||(n=wt(w.value,S.value)),N.value||R.value){const v=new Date(N.value||R.value);if((S.value===d.DATETIME_LOCAL||S.value===d.DATE||S.value===d.MONTH)&&(v.setFullYear(n.getFullYear()),v.setMonth(n.getMonth())),(S.value===d.DATETIME_LOCAL||S.value===d.DATE)&&v.setDate(n.getDate()),(S.value===d.DATETIME_LOCAL||S.value===d.TIME)&&(v.setHours(n.getHours()),v.setMinutes(n.getMinutes()),v.setSeconds(n.getSeconds())),N.value instanceof Date){if(c.value?.getTime()===v.getTime())return;c.value=v;return}c.value=v.toISOString();return}c.value=Ue(n,S.value,B.value);return}!c.value&&!I.value||(c.value=I.value)}}});function ne(n){if(n==null){w.value="",I.value="";return}if(o.iMask?.mask===Date){w.value=n instanceof Date?n:new Date(n);return}if(!(S.value===d.NUMBER&&M.test(I.value)&&n===0)){if(Fe.value){if(n instanceof Date||ze(n)){if(n instanceof Date?(N.value=n,R.value=void 0):(R.value=n,N.value=void 0),S.value!==d.WEEK){const v=new Date(n),D=S.value;w.value=Ue(v,D,B.value),I.value=w.value}return}N.value=void 0,R.value=void 0}w.value=n,I.value=`${w.value}`}}(0,e.onMounted)(()=>{he.value&&(ae.value=!0,ne(o.modelValue))}),(0,e.watch)(()=>o.modelValue,n=>{he.value&&ne(n)}),(0,e.watch)(()=>o.masked,n=>{_.value=n??""});const $=ve,re=(0,e.ref)(),G=(0,e.ref)(),le=(0,e.ref)();a({$input:$,$inner:re,$wrapper:G});const{focused:J}=go($,r),s=(0,e.computed)(()=>J.value&&!o.disabled&&!o.readonly);function g(n){n?W():Ve()}function W(){p.value.selectOnFocus&&$.value&&$.value.select(),Z.value.size&&le.value?.show()}function Ve(){if(!Y.value||!V.value)return;const n=o.maxSuggestions;c.value!==void 0&&c.value!==null&&c.value!==""&&(V.value.size>=n&&!V.value.has(c.value)&&(V.value=new Set([...V.value].slice(V.value.size-n+1))),V.value.add(c.value))}(0,e.watch)(s,g),(0,e.watch)((0,k.useElementVisibility)($),n=>{n&&o.autofocus&&!o.disabled&&!o.readonly&&(J.value=!0)});const Ae=(0,e.ref)(!1),nt=(0,e.computed)(()=>o.type===d.PASSWORD);function rt(){Ae.value=!Ae.value}const xo=(0,e.computed)(()=>Fe.value),Be=(0,e.computed)(()=>o.type===d.NUMBER);function Me(){if(!H.value){if(o.iMask){w.value=Number(w.value)+Number(z?.value??1);return}$.value.stepUp(),c.value=Number($.value.value)}}function _e(){if(!H.value){if(o.iMask){w.value=Number(w.value)-Number(z?.value??1);return}$.value.stepDown(),c.value=Number($.value.value)}}const Lo=(0,e.computed)(()=>o.type===d.SEARCH);function lt(){c.value="",r("clear")}const{hasIconBefore:Re,hasIconAfter:it}=ce(E,u),He=(0,e.computed)(()=>{if(it.value!==void 0)return it.value;switch(o.type){case d.COLOR:return{name:x.showColorPicker};case d.DATE:case d.DATETIME_LOCAL:case d.WEEK:case d.MONTH:return{name:x.showDatePicker};case d.TIME:return{name:x.showTimePicker}}}),{hasIcon:st}=ce(b),{formatted:No}=bo(c,{mode:h.value,upperLimit:Number(Oe?.value),lowerLimit:Number(xe?.value)}),H=(0,e.computed)(()=>o.disabled||o.readonly),Vo=(0,e.computed)(()=>H.value?-1:o.tabindex),Y=(0,e.computed)(()=>!ie(j?.value)),Ao=(0,e.computed)(()=>{if(T.value===!0)return!0;if(pe.value===!0)return!1}),V=yo((0,e.computed)(()=>o.storageKey??(f?.experimentalFeatures.forceInputSuggestions?o.name:void 0)),Le,new Set),Z=(0,e.computed)(()=>{const n=new Map;if(V.value)for(const v of V.value)n.set(v,{isFromStorage:!0});if(o.suggestions)for(const v of o.suggestions)n.set(v,{isFromStorage:!1});return n}),Bo=(0,e.computed)(()=>Z.value.size===0?[]:[...Z.value.entries()].filter(([n])=>ie(c.value)||`${n}`.toLowerCase().includes(`${c.value}`.toLowerCase())&&n!==c.value).reverse().map(([n])=>n)),Mo=(0,e.computed)(()=>Z.value.size>0);function _o(n){c.value=n,le.value?.hide(),r("suggestion:selected",n)}function Ro(n){Z.value.get(n)?.isFromStorage&&(V.value?.delete(n),r("suggestion:removed",n))}const{modifiers:Ho}=(0,e.toRefs)(o),Fo=ue("vv-input-text",Ho,(0,e.computed)(()=>({valid:pe.value,invalid:T.value,loading:$e.value,disabled:o.disabled,required:o.required,readonly:o.readonly,"icon-before":!!Re.value,"icon-after":!!He.value,floating:o.floating&&!ie(o.label),dirty:Y.value,focus:s.value&&!H.value,"auto-width":o.autoWidth}))),jo=(0,e.computed)(()=>[d.TEXT,d.SEARCH,d.URL,d.TEL,d.EMAIL,d.PASSWORD].includes(S.value)),Fe=(0,e.computed)(()=>[d.DATE,d.MONTH,d.WEEK,d.TIME,d.DATETIME_LOCAL].includes(S.value)),zo=(0,e.computed)(()=>[d.TEXT,d.SEARCH,d.URL,d.TEL,d.EMAIL,d.PASSWORD].includes(S.value)),Uo=(0,e.computed)(()=>{const n=nt.value&&Ae.value||xo.value&&!Y.value&&!J.value||o.iMask?d.TEXT:o.type,v={type:n,name:o.name,tabindex:Vo.value,disabled:o.disabled,readonly:o.readonly,required:o.required,autocomplete:o.autocomplete,"aria-invalid":Ao.value,"aria-describedby":Yo.value?X.value:void 0,"aria-errormessage":qo.value?X.value:void 0,inputMode:o.inputMode};if(Fe.value||n===d.NUMBER){let D=o.max;n===d.DATE&&!D&&(D="9999-12-31"),v.step=o.step,v.max=D!==void 0?String(D):void 0,v.min=o.min!==void 0?String(o.min):void 0}return(jo.value||n===d.TEXT||n===d.NUMBER)&&(v.placeholder=y.value),zo.value&&(v.minlength=o.minlength,v.maxlength=o.maxlength,v.pattern=o.pattern),n===d.EMAIL&&(v.multiple=o.multiple),v}),ge=(0,e.computed)(()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue,togglePassword:rt,stepUp:Me,stepDown:_e,clear:lt})),{HintSlot:Wo,hasHintLabelOrSlot:Yo,hasInvalidLabelOrSlot:qo,hintSlotScope:be}=Dt(p,i),Ko=Te(d.PASSWORD,o,Y),Xo=Te(d.NUMBER,o,Y),Go=Te(d.SEARCH,o,Y);function Jo(){H.value||(J.value=!0)}const Zo=(0,e.computed)(()=>{if(o.autoWidth)return{width:c.value!==void 0?`${String(c.value).length+1}ch`:void 0}});function Qo(n){switch(n.code){case"ArrowUp":Be.value&&(Me(),n.preventDefault());break;case"ArrowDown":Be.value&&(_e(),n.preventDefault());break}r("keydown",n)}return(n,v)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)((0,e.unref)(Fo))},[(0,e.unref)(F)?((0,e.openBlock)(),(0,e.createElementBlock)("label",{key:0,for:(0,e.unref)(U),class:"vv-input-text__label"},(0,e.toDisplayString)((0,e.unref)(F)),9,So)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",{ref_key:"wrapperEl",ref:G,class:"vv-input-text__wrapper"},[n.$slots.before?((0,e.openBlock)(),(0,e.createElementBlock)("div",wo,[(0,e.renderSlot)(n.$slots,"before",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))))])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",{ref_key:"innerEl",ref:re,class:"vv-input-text__inner",onClick:(0,e.withModifiers)(Jo,["stop"])},[(0,e.unref)(Re)?((0,e.openBlock)(),(0,e.createBlock)(A,(0,e.mergeProps)({key:0},(0,e.unref)(Re),{class:"vv-input-text__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("input",(0,e.mergeProps)({id:(0,e.unref)(U),ref_key:"inputEl",ref:$},(0,e.unref)(Uo),{style:(0,e.unref)(Zo),onKeyup:v[0]||(v[0]=D=>r("keyup",D)),onKeydown:Qo,onKeypress:v[1]||(v[1]=D=>r("keypress",D))}),null,16,Eo),((0,e.unref)(fe)||n.$slots.unit)&&(0,e.unref)(Y)?((0,e.openBlock)(),(0,e.createElementBlock)("div",Do,[(0,e.renderSlot)(n.$slots,"unit",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))),()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(fe)),1)])])):(0,e.createCommentVNode)("v-if",!0)],512),(0,e.unref)(He)?((0,e.openBlock)(),(0,e.createBlock)(A,(0,e.mergeProps)({key:1},(0,e.unref)(He),{class:"vv-input-text__icon vv-input-text__icon-after"}),null,16)):(0,e.unref)(nt)&&!n.hideActions&&!(0,e.unref)(H)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(Ko),{key:2,onTogglePassword:rt})):(0,e.unref)(Be)&&!n.hideActions&&!(0,e.unref)(H)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(Xo),{key:3,onStepUp:Me,onStepDown:_e})):(0,e.unref)(Lo)&&!n.hideActions&&!(0,e.unref)(H)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(Go),{key:4,onClear:lt})):(0,e.createCommentVNode)("v-if",!0),n.$slots.after?((0,e.openBlock)(),(0,e.createElementBlock)("div",ko,[(0,e.renderSlot)(n.$slots,"after",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))))])):(0,e.createCommentVNode)("v-if",!0),(0,e.unref)(h)?((0,e.openBlock)(),(0,e.createElementBlock)("span",Po,[(0,e.renderSlot)(n.$slots,"count",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))),()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(No)),1)])])):(0,e.createCommentVNode)("v-if",!0)],512),(0,e.createVNode)((0,e.unref)(Wo),{id:(0,e.unref)(X),class:"vv-input-text__hint"},(0,e.createSlots)({_:2},[n.$slots.hint?{name:"hint",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"0"}:void 0,n.$slots.loading?{name:"loading",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"loading",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"1"}:void 0,n.$slots.valid?{name:"valid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"valid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"2"}:void 0,n.$slots.invalid?{name:"invalid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"invalid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"3"}:void 0]),1032,["id"]),(0,e.unref)(Mo)?((0,e.openBlock)(),(0,e.createBlock)(oo,{key:1,ref_key:"suggestionsDropdownEl",ref:le,reference:(0,e.unref)(G),"autofocus-first":!1,"trigger-width":!0},{items:(0,e.withCtx)(()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(Bo),D=>((0,e.openBlock)(),(0,e.createBlock)(co,{key:String(D),onClick:(0,e.withModifiers)(ea=>_o(D),["stop"])},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)("div",Co,[(0,e.renderSlot)(n.$slots,"suggestion",(0,e.mergeProps)({ref_for:!0},{value:D}),()=>[(0,e.createTextVNode)((0,e.toDisplayString)(D),1)])]),(0,e.unref)(Z).get(D)?.isFromStorage&&(0,e.unref)(st)?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,type:"button",tabindex:"-1",class:"cursor-pointer",title:(0,e.unref)(K),onClick:(0,e.withModifiers)(ea=>Ro(D),["stop"])},[(0,e.createVNode)(A,(0,e.mergeProps)({ref_for:!0},(0,e.unref)(st)),null,16)],8,Io)):(0,e.createCommentVNode)("v-if",!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["reference"])):(0,e.createCommentVNode)("v-if",!0)],2))}}),Oo=$o;return Oo});
|
|
1
|
+
(function(e,J){typeof exports=="object"&&typeof module<"u"?module.exports=J(require("vue"),require("vue-imask"),require("@floating-ui/vue"),require("@vueuse/core"),require("mitt"),require("@iconify/vue")):typeof define=="function"&&define.amd?define(["vue","vue-imask","@floating-ui/vue","@vueuse/core","mitt","@iconify/vue"],J):(e=typeof globalThis<"u"?globalThis:e||self,e.VvInputText=J(e.Vue,e.vueImask,e.FloatingUiVue,e.VueuseCore,e.mitt,e.IconifyVue))})(this,function(e,J,T,k,ye,Z){var dt=Object.create,je=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ct=Object.getOwnPropertyNames,ft=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty,mt=(t,a,l,o)=>{if(a&&typeof a=="object"||typeof a=="function")for(var r=ct(a),s=0,p=r.length,f;s<p;s++)f=r[s],!pt.call(t,f)&&f!==l&&je(t,f,{get:(g=>a[g]).bind(null,f),enumerable:!(o=ut(a,f))||o.enumerable});return t},vt=(t,a,l)=>(l=t!=null?dt(ft(t)):{},mt(a||!t||!t.__esModule?je(l,"default",{value:t,enumerable:!0}):l,t));ye=vt(ye,1);var O=t=>t.toString().padStart(2,"0"),ht=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;function ze(t){if(typeof t!="string"||!ht.test(t))return!1;const a=new Date(t);return!Number.isNaN(a.getTime())&&a.toISOString()===t}function Ue(t,a="date",l){if(typeof t=="string"&&!ze(t))return"";const o=new Date(t);if(Number.isNaN(o.getTime()))return"";let r=`${o.getFullYear()}-${O(o.getMonth()+1)}`;if(a==="month"||(r+=`-${O(o.getDate())}`,a==="date"))return r;const s=l?`${O(o.getHours())}:${O(o.getMinutes())}:${O(o.getSeconds())}`:`${O(o.getHours())}:${O(o.getMinutes())}`;return a==="time"?s:`${r}T${s}`}var gt=/^\d{4}-\d{2}-\d{2}$/,bt=/^\d{4}-\d{2}$/,yt=/^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/,St=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/;function wt(t,a="date"){if(!t?.trim())return null;const l=new Date,o=l.getFullYear(),r=l.getMonth(),s=l.getDate();if(a==="date"){if(!gt.test(t))throw new Error("Invalid date format. Expected: YYYY-MM-DD");return new Date(`${t}T00:00:00`)}if(a==="month"){if(!bt.test(t))throw new Error("Invalid month format. Expected: YYYY-MM");return new Date(`${t}-01T00:00:00`)}if(a==="time"){if(!yt.test(t))throw new Error("Invalid time format. Expected: HH:mm or HH:mm:ss");return t.length===8?new Date(`${o}-${O(r+1)}-${O(s)}T${t}`):new Date(`${o}-${O(r+1)}-${O(s)}T${t}:00`)}if(!St.test(t))throw new Error("Invalid datetime format. Expected: YYYY-MM-DDThh:mm or YYYY-MM-DDThh:mm:ss");return t.length===16?new Date(`${t}:00`):new Date(`${t}`)}function ae(t){return(a=>a==null||a===""||Array.isArray(a)&&a.length===0||!(a instanceof Date)&&typeof a=="object"&&Object.keys(a).length===0)((0,e.unref)(t))}function Et(t){return typeof t=="string"}function We(t){return Array.isArray(t)?t.filter(a=>Et(a)).join(" "):t}function kt(t,a){const l=(0,e.computed)(()=>(0,e.isRef)(t)?t.value:t),o=(0,e.computed)(()=>We(l.value.invalidLabel)),r=(0,e.computed)(()=>We(l.value.validLabel)),s=(0,e.computed)(()=>l.value.loadingLabel),p=(0,e.computed)(()=>l.value.hintLabel),f=(0,e.computed)(()=>!!(l.value.loading&&(a.loading||s.value))),g=(0,e.computed)(()=>!f.value&&!!(l.value.invalid&&(a.invalid||o.value))),w=(0,e.computed)(()=>!f.value&&!g.value&&!!(l.value.valid&&(a.valid||r.value))),P=(0,e.computed)(()=>!f.value&&!g.value&&!w.value&&!!(a.hint||p.value)),m=(0,e.computed)(()=>g.value||w.value||f.value||P.value);return{hasInvalidLabelOrSlot:g,hasHintLabelOrSlot:P,hasValidLabelOrSlot:w,hasLoadingLabelOrSlot:f,hintSlotScope:(0,e.computed)(()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading})),HintSlot:(0,e.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:m,invalidLabel:o,validLabel:r,loadingLabel:s,hintLabel:p,hasInvalidLabelOrSlot:g,hasValidLabelOrSlot:w,hasLoadingLabelOrSlot:f,hasHintLabelOrSlot:P}},render(){if(this.isVisible){let b;return this.hasInvalidLabelOrSlot&&(b="alert"),this.hasValidLabelOrSlot&&(b="status"),this.hasLoadingLabelOrSlot?(0,e.h)(this.tag,{role:b},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,e.h)(this.tag,{role:b},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,e.h)(this.tag,{role:b},this.$slots.valid?.()??this.validLabel):(0,e.h)(this.tag,{role:b},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}var q=(function(t){return t.local="local",t.session="session",t})({}),Ye=(function(t){return t.absolute="absolute",t.fixed="fixed",t})({}),D=(function(t){return t.left="left",t.right="right",t.top="top",t.bottom="bottom",t})({}),Dt=(function(t){return t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t})({}),re=(function(t){return t.before="before",t.after="after",t})({}),qe=(function(t){return t.button="button",t.submit="submit",t.reset="reset",t})({}),Pt=(function(t){return t.nuxtLink="nuxt-link",t.routerLink="router-link",t.a="a",t.button="button",t})({}),Tt=(function(t){return t.button="button",t.link="link",t.menuitem="menuitem",t})({}),Se=(function(t){return t.listbox="listbox",t.menu="menu",t})({}),Ke=(function(t){return t.option="option",t.presentation="presentation",t})({}),It=Symbol.for("volver"),Ct=Symbol.for("dropdownTrigger"),Xe=Symbol.for("dropdownItem"),$t=Symbol.for("dropdownAction"),N={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},Ot={prefix:"normal"},Nt={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},we={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},Ee={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},ke={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},Q={disabled:{type:Boolean,default:!1}},Ge={required:{type:Boolean,default:!1}},xt={selected:{type:Boolean,default:!1}},Lt={active:{type:Boolean,default:!1}},At={current:{type:Boolean,default:!1}},na={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:N.clear},labelClear:{type:String,default:"Clear"}},Bt={pressed:{type:Boolean,default:!1}},ne={label:{type:[String,Number],default:void 0}},De={readonly:{type:Boolean,default:!1}},ee={modifiers:{type:[String,Array],default:void 0}},Pe={hintLabel:{type:String,default:""}},Vt={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},Mt={count:{type:[Boolean,String],default:!1,validator:t=>[!0,!1,"limit","countdown"].includes(t)}},_t={debounce:{type:[Number,String],default:void 0}},Rt={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:re.before,validation:t=>Object.values(re).includes(t)}},Je={tabindex:{type:[String,Number],default:0}},Ht={floating:{type:Boolean,default:!1}},Ft={unselectable:{type:Boolean,default:!0}},Ze={id:[String,Number]},jt={placement:{type:String,default:D.bottom,validator:t=>Object.values(D).includes(t)||Object.values(Dt).includes(t)},strategy:{type:String,default:void 0,validator:t=>Object.values(Ye).includes(t)},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}},Qe={...Ze,name:{type:String,required:!0}},zt={autofocus:{type:Boolean,default:!1}},Ut={autocomplete:{type:String,default:"off"}},Wt={...Qe,...zt,...Ut,...Je,...Q,...De,...we,...Ee,...Pe,...ke,...ee,...Mt,..._t,...Rt,...Ht,...ne,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...Ge},la={...Qe,...Je,...we,...Ee,...Pe,...Q,...De,...ee,...ne,...ke,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},ia={...we,...Ee,...Vt,...Pe,...Q,...De,...ee,...ne,...ke,...Ge,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},sa={...Q,...ne,...Bt,...Lt,...At,...Nt,type:{type:String,default:qe.button,validator:t=>Object.values(qe).includes(t)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:Pt.button}},Yt={storageType:{type:String,default:q.local,validator:t=>Object.values(q).includes(t)},storageKey:String},qt={...Ze,...jt,...ee,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:Se.menu,validator:t=>Object.values(Se).includes(t)}},Kt={focusOnHover:{type:Boolean,default:!1}},Xt={...Q,...xt,...Ft,...ee,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function et(t){return(0,e.computed)(()=>String(t?.value||(0,e.useId)()))}function Gt({reference:t,id:a,expanded:l,aria:o}){const r=(0,ye.default)();return{bus:r,component:(0,e.defineComponent)({name:"VvDropdownTriggerProvider",setup(){(0,e.provide)(Ct,{reference:t,id:a,expanded:l,aria:o,bus:r})},render(){return(0,e.h)(e.Fragment,{},this.$slots.default?.())}})}}function Jt({role:t,...a}){const l=(0,e.computed)(()=>t.value===Se.listbox?Ke.option:Ke.presentation);return(0,e.provide)(Xe,{role:l,...a}),{itemRole:l}}function Zt({expanded:t}){(0,e.provide)($t,{role:(0,e.ref)(Tt.menuitem),expanded:t})}function le(t,a,l){return(0,e.computed)(()=>{const o={[t]:!0},r=typeof a?.value=="string"?a.value.split(" "):a?.value;return r&&Array.isArray(r)&&r.forEach(s=>{s&&(o[`${t}--${s}`]=!0)}),l&&Object.keys(l.value).forEach(s=>{o[`${t}--${s}`]=(0,e.unref)(l.value[s])}),o})}var Qt=["id","tabindex","role","aria-labelledby"],eo={name:"VvDropdown",inheritAttrs:!1},to=(0,e.defineComponent)({...eo,props:qt,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{expose:a,emit:l}){const o=t,r=l,{id:s}=(0,e.toRefs)(o),p=et(s),f=(0,e.useAttrs)(),g=(0,e.ref)("auto"),w=(0,e.ref)("auto"),P=(0,e.ref)(),m=(0,e.ref)(),b=(0,e.ref)(),x=(0,e.ref)(),C=(0,e.computed)({get:()=>o.reference??P.value,set:i=>{P.value=i}}),j=(0,e.ref)(!1);(0,e.onMounted)(()=>{(0,k.useMutationObserver)(m.value,()=>{j.value=globalThis.getComputedStyle(m.value).getPropertyValue("--dropdown-custom-position")?.trim()==="true"},{attributeFilter:["style"],window:globalThis.window})});function K(i,v,A){return typeof i=="boolean"?v():A(i)}const $e=(0,e.computed)(()=>{const i=[];if(o.autoPlacement?i.push(K(o.autoPlacement,()=>(0,T.autoPlacement)(),v=>(0,T.autoPlacement)(v))):o.flip&&i.push(K(o.flip,()=>(0,T.flip)({fallbackStrategy:"initialPlacement"}),v=>(0,T.flip)(v))),o.shift&&i.push(K(o.shift,()=>(0,T.shift)(),v=>(0,T.shift)(v))),o.size){const v=({availableWidth:A,availableHeight:he})=>{g.value=`${A}px`,w.value=`${he}px`};i.push(K(o.size,()=>(0,T.size)({apply:v}),A=>(0,T.size)({...A,apply:v})))}return o.offset&&i.push(["string","number"].includes(typeof o.offset)?(0,T.offset)(Number(o.offset)):(0,T.offset)(o.offset)),o.arrow&&i.push((0,T.arrow)({element:b})),i}),{x:Oe,y:Ne,middlewareData:z,placement:U,strategy:xe}=(0,T.useFloating)(C,m,{whileElementsMounted:(...i)=>(0,T.autoUpdate)(...i,{animationFrame:o.strategy===Ye.fixed}),placement:(0,e.computed)(()=>o.placement),strategy:(0,e.computed)(()=>o.strategy),middleware:$e}),y=(0,e.computed)(()=>{if(j.value)return;const i=o.triggerWidth&&C.value?`${C.value?.offsetWidth}px`:void 0;return{position:xe.value,top:`${Ne.value??0}px`,left:`${Oe.value??0}px`,maxWidth:i?void 0:g.value,maxHeight:w.value,width:i}}),se=(0,e.computed)(()=>U.value.split("-")[0]),de=(0,e.computed)(()=>{if(j.value)return;const i={[D.top]:D.bottom,[D.right]:D.left,[D.bottom]:D.top,[D.left]:D.right}[se.value];return{left:z.value.arrow?.x===void 0?void 0:`${z.value.arrow?.x}px`,top:z.value.arrow?.y===void 0?void 0:`${z.value.arrow?.y}px`,[i]:`${-(b.value?.offsetWidth??0)/2}px`}}),W=(0,k.useVModel)(o,"modelValue",r),X=(0,e.ref)(!1),h=(0,e.computed)({get:()=>W.value??X.value,set:i=>{if(W.value===void 0){X.value=i;return}W.value=i}});function u(){h.value=!0}function M(){h.value=!1}function _(){h.value=!h.value}function ue(i){C.value=i}(0,k.onClickOutside)(m,()=>{!o.keepOpen&&h.value&&(h.value=!1)},{ignore:[C]});const Le=(0,e.computed)(()=>C.value?.getAttribute?.("id")??void 0),te=(0,e.computed)(()=>({"aria-controls":p.value,"aria-haspopup":!0,"aria-expanded":h.value})),{component:L,bus:H}=Gt({reference:C,id:p,expanded:h,aria:te});H.on("click",_);const{role:ce,modifiers:fe}=(0,e.toRefs)(o),S=le("vv-dropdown",fe,(0,e.computed)(()=>({arrow:o.arrow}))),{focused:R}=(0,k.useFocusWithin)(m);function I(i){return i?[...i.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter(v=>!v.hasAttribute("disabled")&&!v.getAttribute("aria-hidden")):[]}function pe(){(0,e.nextTick)(()=>{const i=I(m.value);i.length>0&&i[0].focus({preventScroll:!0})})}function Ae(){(0,e.nextTick)(()=>{const i=I(x.value);i.length>0&&i[0].focus({preventScroll:!0})})}function me(){(0,e.nextTick)(()=>{if(R.value){const i=I(m.value);if(i.length===0||!document.activeElement)return;const v=i.indexOf(document.activeElement);v<i.length-1?i[v+1].focus({preventScroll:!0}):i[0].focus({preventScroll:!0})}})}function oe(){(0,e.nextTick)(()=>{if(R.value){const i=I(m.value);if(i.length===0||!document.activeElement)return;const v=i.indexOf(document.activeElement);if(v>0){i[v-1].focus({preventScroll:!0});return}i.at(-1)?.focus({preventScroll:!0})}})}(0,e.watch)(h,i=>{i&&o.autofocusFirst&&pe()}),a({toggle:_,show:u,hide:M,init:ue,focusFirst:pe,focusFirstListElement:Ae,focusNext:me,focusPrev:oe,customPosition:j});const{itemRole:$}=Jt({role:ce,expanded:h,focused:R,hovered:(0,k.useElementHover)(m)});(0,k.onKeyStroke)("Escape",i=>{h.value&&(i.preventDefault(),M())}),(0,k.onKeyStroke)("ArrowDown",i=>{h.value&&R.value&&(i.preventDefault(),me())}),(0,k.onKeyStroke)("ArrowUp",i=>{h.value&&R.value&&(i.preventDefault(),oe())}),(0,k.onKeyStroke)([" ","Enter"],i=>{const v=i.target;h.value&&R.value&&v&&v?.click()});const ve={"before-enter":()=>{r(h.value?"beforeExpand":"beforeCollapse"),r("beforeEnter")},"after-leave":()=>{r(h.value?"afterExpand":"afterCollapse"),r("afterLeave")},enter:()=>{r("enter")},"after-enter":()=>{r("afterEnter")},"enter-cancelled":()=>{r("enterCancelled")},"before-leave":()=>{r("beforeLeave")},leave:()=>{r("leave")},"leave-cancelled":()=>{r("leaveCancelled")}};return(i,v)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createVNode)((0,e.unref)(L),null,{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(i.$slots,"default",(0,e.normalizeProps)((0,e.guardReactiveProps)({init:ue,show:u,hide:M,toggle:_,expanded:(0,e.unref)(h),aria:(0,e.unref)(te)})))]),_:3}),(0,e.createVNode)(e.Transition,(0,e.mergeProps)({name:i.transitionName},(0,e.toHandlers)(ve),{persisted:""}),{default:(0,e.withCtx)(()=>[(0,e.withDirectives)((0,e.createElementVNode)("div",{ref_key:"floatingEl",ref:m,style:(0,e.normalizeStyle)((0,e.unref)(y)),class:(0,e.normalizeClass)((0,e.unref)(S))},[o.arrow?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,ref_key:"arrowEl",ref:b,style:(0,e.normalizeStyle)((0,e.unref)(de)),class:"vv-dropdown__arrow"},null,4)):(0,e.createCommentVNode)("v-if",!0),(0,e.renderSlot)(i.$slots,"before",(0,e.normalizeProps)((0,e.guardReactiveProps)({show:u,hide:M,toggle:_,expanded:(0,e.unref)(h)}))),(0,e.createElementVNode)("div",(0,e.mergeProps)((0,e.unref)(f),{id:(0,e.unref)(p),ref_key:"listEl",ref:x,tabindex:(0,e.unref)(h)?void 0:-1,role:(0,e.unref)(ce),"aria-labelledby":(0,e.unref)(Le),class:"vv-dropdown__list"}),[(0,e.renderSlot)(i.$slots,"items",(0,e.normalizeProps)((0,e.guardReactiveProps)({show:u,hide:M,toggle:_,expanded:(0,e.unref)(h),role:(0,e.unref)($)})))],16,Qt),(0,e.renderSlot)(i.$slots,"after",(0,e.normalizeProps)((0,e.guardReactiveProps)({show:u,hide:M,toggle:_,expanded:(0,e.unref)(h)})))],6),[[e.vShow,(0,e.unref)(h)]])]),_:3},16,["name"])],64))}}),oo=to;function ao(){return(0,e.inject)(Xe,{})}var ro={name:"VvDropdownItem"},no=(0,e.defineComponent)({...ro,props:Kt,setup(t){const a=t,{role:l,expanded:o}=ao(),r=(0,e.ref)(null);Zt({expanded:o});const s=(0,k.useElementHover)(r),{focused:p}=(0,k.useFocus)(r),{focused:f}=(0,k.useFocusWithin)(r);return(0,e.watch)(s,g=>{g&&a.focusOnHover&&(p.value=!0)}),(g,w)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",(0,e.mergeProps)({role:(0,e.unref)(l)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":(0,e.unref)(p)||(0,e.unref)(f)}]}),[(0,e.renderSlot)(g.$slots,"default")],16))}}),lo=no,io=["title"],so={name:"VvDropdownOption"},uo=(0,e.defineComponent)({...so,props:Xt,setup(t){const a=t,{modifiers:l}=(0,e.toRefs)(a),o=le("vv-dropdown-option",l,(0,e.computed)(()=>({disabled:a.disabled,selected:a.selected,unselectable:a.unselectable&&a.selected}))),r=(0,e.computed)(()=>a.selected?a.unselectable?a.deselectHintLabel:a.selectedHintLabel:a.disabled?"":a.selectHintLabel);return(s,p)=>((0,e.openBlock)(),(0,e.createBlock)(lo,{class:(0,e.normalizeClass)((0,e.unref)(o)),tabindex:s.disabled?-1:0,"aria-selected":s.selected,"aria-disabled":s.disabled,"focus-on-hover":s.focusOnHover},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(s.$slots,"default"),(0,e.createElementVNode)("span",{class:"vv-dropdown-option__hint",title:(0,e.unref)(r)},[(0,e.renderSlot)(s.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)({disabled:s.disabled,selected:s.selected,unselectable:s.unselectable})),()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)),1)])],8,io)]),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}}),co=uo;function Te(){return(0,e.inject)(It,void 0)}var fo={name:"VvIcon"},po=(0,e.defineComponent)({...fo,props:(0,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:{}},Ot),setup(t){const a=t,l=(0,e.computed)(()=>typeof a.rotate=="string"?Number.parseFloat(a.rotate):a.rotate),o=(0,e.ref)(!0),r=Te(),{modifiers:s}=(0,e.toRefs)(a),p=le("vv-icon",s),f=(0,e.computed)(()=>a.provider||r?.iconsProvider),g=(0,e.computed)(()=>{const m=a.name??"",b=`@${f.value}:${a.prefix}:${m}`;if((0,Z.iconLoaded)(b))return b;const x=r?.iconsCollections.find(C=>(0,Z.iconLoaded)(`@${f.value}:${C.prefix}:${m}`));return x?`@${f.value}:${x.prefix}:${m}`:m});function w(m){return globalThis.window===void 0?null:new globalThis.DOMParser().parseFromString(m,"text/html").querySelector("svg")}function P(m){const b=w(m),x=b?.innerHTML.trim()||"";b&&x&&(0,Z.addIcon)(`@${f.value}:${a.prefix}:${a.name}`,{body:x,height:b.viewBox.baseVal.height,width:b.viewBox.baseVal.width})}return r&&a.src&&!(0,Z.iconLoaded)(`@${f.value}:${a.prefix}:${a.name}`)&&(o.value=!1,r.fetchIcon(a.src).then(m=>{m&&P(m),o.value=!0}).catch(m=>{throw o.value=!0,new Error(`Error during fetch icon: ${m?.message}`)})),a.svg&&P(a.svg),(m,b)=>(0,e.unref)(o)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(Z.Icon),(0,e.mergeProps)({key:0,class:(0,e.unref)(p)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:(0,e.unref)(l),color:t.color,icon:(0,e.unref)(g)},{onLoad:t.onLoad}),null,16,["class","onLoad"])):(0,e.createCommentVNode)("v-if",!0)}}),V=po,d={TEXT:"text",PASSWORD:"password",NUMBER:"number",EMAIL:"email",TEL:"tel",URL:"url",COLOR:"color",SEARCH:"search",DATE:"date",TIME:"time",DATETIME_LOCAL:"datetime-local",MONTH:"month",WEEK:"week"},mo=["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","suggestion:selected","suggestion:removed","focus","blur","keyup","keydown","keypress","clear"],tt={...Wt,...Yt,modelValue:[String,Number,Date],type:{type:String,default:d.TEXT,validator:t=>Object.values(d).includes(t)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:[String,Object],default:N.showPassword},iconHidePassword:{type:[String,Object],default:N.hidePassword},iconClear:{type:[String,Object],default:N.clear},iconRemoveSuggestion:{type:[String,Object],default:N.remove},labelStepUp:{type:String,default:"Increase value"},labelStepDown:{type:String,default:"Decrease value"},labelShowPassword:{type:String,default:"Show password"},labelHidePassword:{type:String,default:"Hide password"},labelClear:{type:String,default:"Clear"},labelRemoveSuggestion:{type:String,default:"Remove suggestion"},iMask:{type:Object,default:void 0},masked:{type:String,default:void 0},autoWidth:{type:Boolean,default:!1},hideActions:{type:Boolean,default:!1},unit:{type:String},selectOnFocus:{type:Boolean,default:!1},maxSuggestions:{type:Number,default:5},suggestions:{type:Array,default:void 0},inputMode:{type:String,default:"text"}};function ie(t,a){const l=(0,e.computed)(()=>typeof t?.value=="string"?{name:t?.value}:t?.value),o=(0,e.computed)(()=>a?.value===re.before?l.value:void 0),r=(0,e.computed)(()=>a?.value===re.after?l.value:void 0);return{hasIcon:l,hasIconLeft:(0,e.computed)(()=>a?.value===D.left?l.value:void 0),hasIconRight:(0,e.computed)(()=>a?.value===D.right?l.value:void 0),hasIconTop:(0,e.computed)(()=>a?.value===D.top?l.value:void 0),hasIconBottom:(0,e.computed)(()=>a?.value===D.bottom?l.value:void 0),hasIconBefore:o,hasIconAfter:r}}var ot=(0,e.defineComponent)({components:{VvIcon:V},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:a}){const{hasIcon:l}=ie((0,e.computed)(()=>t.icon));function o(r){r?.stopPropagation(),t.disabled||a("clear")}return{hasIcon:l,onClick:o}},render(){const t=this.hasIcon?(0,e.h)(V,{...this.hasIcon,class:`vv-${this.inputType}__icon`}):void 0;return(0,e.h)("button",{disabled:this.disabled,class:`vv-${this.inputType}__action`,ariaLabel:this.label,type:"button",onClick:this.onClick},t)}}),at=(0,e.defineComponent)({components:{VvIcon:V},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:[String,Object],default:N.showPassword},iconHide:{type:[String,Object],default:N.hidePassword}},emits:["toggle-password"],setup(t,{emit:a}){const l=(0,e.ref)(!1),o=(0,e.computed)(()=>l.value?t.iconHide:t.iconShow),{hasIcon:r}=ie(o);function s(p){p?.stopPropagation(),t.disabled||(l.value=!l.value,a("toggle-password",l.value))}return{active:l,activeIcon:o,hasIcon:r,onClick:s}},render(){const t=this.hasIcon?(0,e.h)(V,{...this.hasIcon,class:`vv-${this.inputType}__icon`}):void 0;return(0,e.h)("button",{disabled:this.disabled,class:`vv-${this.inputType}__action`,ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),Ie=(0,e.defineComponent)({components:{VvIcon:V},props:{inputType:{type:String,default:"input-text"},disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:t=>["up","down"].includes(t),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:a}){const l=(0,e.computed)(()=>t.mode==="up");return{isUp:l,onClick:r=>{r?.stopPropagation(),t.disabled||a(l.value?"step-up":"step-down")}}},render(){return(0,e.h)("button",{class:[`vv-${this.inputType}__action`,`vv-${this.inputType}__action-chevron`,this.isUp?`vv-${this.inputType}__action-chevron-up`:void 0],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}});function Ce(t,a,l){return{name:"VvInputTextActions",components:{VvIcon:V,VvInputPasswordAction:at,VvInputStepAction:Ie,VvInputClearAction:ot},setup(){return{isDirty:l,isDisabled:(0,e.computed)(()=>a.disabled||a.readonly),labelStepUp:a.labelStepUp,labelStepDown:a.labelStepDown,labelShowPassword:a.labelShowPassword,labelHidePassword:a.labelHidePassword,labelClear:a.labelClear,iconShowPassword:a.iconShowPassword,iconHidePassword:a.iconHidePassword}},render(){let o=null;switch(t){case d.SEARCH:{const{onClear:r}=this.$attrs;o=[(0,e.h)(ot,{disabled:this.isDisabled||!this.isDirty,label:this.labelClear,onClear:r})];break}case d.PASSWORD:{const{onTogglePassword:r}=this.$attrs;o=[(0,e.h)(at,{disabled:this.isDisabled,onTogglePassword:r,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case d.NUMBER:{const{onStepUp:r,onStepDown:s}=this.$attrs;o=[(0,e.h)(Ie,{mode:"up",disabled:this.isDisabled||a.max!==void 0&&a.modelValue===a.max,label:this.labelStepUp,onStepUp:r,onStepDown:s}),(0,e.h)(Ie,{mode:"down",disabled:this.isDisabled||a.min!==void 0&&a.modelValue===a.min,label:this.labelStepDown,onStepUp:r,onStepDown:s})];break}}return Array.isArray(o)?(0,e.h)("div",{class:"vv-input-text__actions-group"},o):o}}}function vo(t,a,l){let o=a;if(Array.isArray(t)&&t.length){const r=t[0];r()===a&&(o=l)}if(typeof t=="function"&&t()===a&&(o=l),typeof t=="object"){let r=t.default;typeof r=="function"&&(r=r()),(typeof r=="object"?JSON.stringify(r)===JSON.stringify(a):r===a)&&(o=l)}return o}function ho(t,a,l){const o=Te(),r=(0,e.computed)(()=>{if(o?.defaults.value?.[t])return o.defaults.value[t]});return(0,e.computed)(()=>{if(r.value===void 0)return l;const s=r.value,p=a,f=l;return Object.keys(p).reduce((g,w)=>{const P=f[w];return g[w]=w in s?vo(p[w],P,s[w]):P,g},{})})}function go(t,a,l=0,{getter:o=s=>s,setter:r=s=>s}={}){let s;return typeof l=="string"&&(l=Number.parseInt(l)),(0,e.computed)({get:()=>o(t?.value),set:p=>{s&&clearTimeout(s),s=setTimeout(()=>{a("update:modelValue",r(p))},l)}})}function bo(t,a){const{focused:l}=(0,k.useFocus)(t);return(0,e.watch)(l,o=>{a(o?"focus":"blur",(0,e.unref)(t))}),{focused:l}}function yo(t,a){const l=(0,e.computed)(()=>((0,e.unref)(t)??"").length),o=(0,e.computed)(()=>a?.lowerLimit!==void 0&&l.value<a?.lowerLimit?l.value-a.lowerLimit:a?.upperLimit!==void 0?a.upperLimit-l.value:0);return{length:l,gap:o,formatted:(0,e.computed)(()=>a?.mode===!1?"":a?.mode==="limit"&&a?.upperLimit?`${l.value} / ${a.lowerLimit?`${a.lowerLimit}-`:""}${a.upperLimit}`:a?.mode==="countdown"?o.value===0?void 0:o.value:l.value)}}function So(t,a=q.local,l){const o=(0,e.ref)();l&&(o.value=l);let r;return(0,e.onMounted)(()=>{t&&(0,e.watch)(t,(s,p)=>{const f=(0,e.unref)(a)===q.session?sessionStorage:localStorage;if(p&&p!==s&&f.removeItem(p),s){r=(0,k.useStorage)(s,r?.value??o.value,f),r.value&&(o.value=r.value);return}r=void 0},{immediate:!0}),(0,e.isRef)(a)&&(0,e.watch)(a,(s,p)=>{if(t?.value){if(s){const f=s===q.session?sessionStorage:localStorage;r=(0,k.useStorage)(t.value,r?.value??o.value,f)}p&&p!==s&&(p===q.session?sessionStorage:localStorage).removeItem(t.value)}})}),(0,e.watch)(o,s=>{r&&(r.value=s)},{deep:!0,immediate:!0}),o}var wo=["for"],Eo={key:0,class:"vv-input-text__input-before"},ko=["id"],Do={key:1,class:"vv-input-text__unit"},Po={key:5,class:"vv-input-text__input-after"},To={key:6,class:"vv-input-text__limit"},Io={class:"flex-1"},Co=["title","onClick"],$o={name:"VvInputText"},Oo=(0,e.defineComponent)({...$o,props:tt,emits:mo,setup(t,{expose:a,emit:l}){const o=t,r=l,s=(0,e.useSlots)(),p=Te(),f=ho("VvInputText",tt,o),{count:g,debounce:w,icon:P,iconPosition:m,iconRemoveSuggestion:b,id:x,invalid:C,label:j,labelRemoveSuggestion:K,loading:$e,maxlength:Oe,minlength:Ne,modelValue:z,step:U,storageType:xe,type:y,unit:se,valid:de}=(0,e.toRefs)(o),W=et(x),X=(0,e.computed)(()=>`${W.value}-hint`),h=(0,e.computed)(()=>o.floating&&ae(o.placeholder)?" ":o.placeholder),u=go(z,r,w?.value??0),M=(0,e.computed)(()=>{const n=typeof U.value=="number"?U.value:Number.parseInt(U.value);return Number.isNaN(n)?!1:n%60!==0}),_=/^-0?[.,]?[0*]?$/,ue=/./,Le=/^-$|^$/,te=(0,e.ref)(!1),L=(0,e.ref)(),H=(0,e.ref)(),{el:ce,mask:fe,typed:S,masked:R,unmasked:I}=(0,J.useIMask)((0,e.computed)(()=>{if(!o.iMask)return{mask:ue};if(o.iMask.mask===Number){const n={...o.iMask};return o.min&&(n.min=Number(o.min)),o.max&&(n.max=Number(o.max)),n}return o.iMask}),{emit:r,onAccept:()=>{if(te.value){if(r("update:masked",R.value),y.value===d.NUMBER){pe();return}if(y.value===d.DATETIME_LOCAL||y.value===d.DATE||y.value===d.TIME||y.value===d.MONTH){me();return}!u.value&&!I.value||(u.value=I.value)}}});function pe(){if(Le.test(I.value)){if(u.value===null||u.value===void 0)return;u.value=void 0;return}if(_.test(I.value)){u.value=0;return}if(typeof S.value!="number"){u.value=Number(S.value);return}u.value=S.value}function Ae(n){const c=new Date(L.value||H.value);if((y.value===d.DATETIME_LOCAL||y.value===d.DATE||y.value===d.MONTH)&&(c.setFullYear(n.getFullYear()),c.setMonth(n.getMonth())),(y.value===d.DATETIME_LOCAL||y.value===d.DATE)&&c.setDate(n.getDate()),(y.value===d.DATETIME_LOCAL||y.value===d.TIME)&&(c.setHours(n.getHours()),c.setMinutes(n.getMinutes()),c.setSeconds(n.getSeconds())),L.value instanceof Date){if(u.value?.getTime()===c.getTime())return;u.value=c;return}u.value=c.toISOString()}function me(){const n=y.value;if(!S.value){if(!u.value)return;if(L.value){u.value=void 0;return}u.value="";return}if(!(S.value instanceof Date)&&!L.value&&!H.value){u.value=S.value;return}let c=S.value;if(c instanceof Date||(c=wt(S.value,n)),L.value||H.value){Ae(c);return}u.value=Ue(c,n,M.value)}function oe(n){if(n==null){S.value="",I.value="";return}if(o.iMask?.mask===Date){S.value=n instanceof Date?n:new Date(n);return}if(!(y.value===d.NUMBER&&_.test(I.value)&&n===0)){if(Fe.value){if(n instanceof Date||ze(n)){if(n instanceof Date?(L.value=n,H.value=void 0):(H.value=n,L.value=void 0),y.value!==d.WEEK){const c=new Date(n),E=y.value;S.value=Ue(c,E,M.value),I.value=S.value}return}L.value=void 0,H.value=void 0}S.value=n,I.value=`${S.value}`}}(0,e.onMounted)(()=>{fe.value&&(te.value=!0,oe(o.modelValue))}),(0,e.watch)(()=>o.modelValue,n=>{fe.value&&oe(n)}),(0,e.watch)(()=>o.masked,n=>{R.value=n??""});const $=ce,ve=(0,e.ref)(),i=(0,e.ref)(),v=(0,e.ref)();a({$input:$,$inner:ve,$wrapper:i});const{focused:A}=bo($,r),he=(0,e.computed)(()=>A.value&&!o.disabled&&!o.readonly);function xo(n){n?Lo():Ao()}function Lo(){f.value.selectOnFocus&&$.value&&$.value.select(),G.value.size&&v.value?.show()}function Ao(){if(!Y.value||!B.value)return;const n=o.maxSuggestions;u.value!==void 0&&u.value!==null&&u.value!==""&&(B.value.size>=n&&!B.value.has(u.value)&&(B.value=new Set([...B.value].slice(B.value.size-n+1))),B.value.add(u.value))}(0,e.watch)(he,xo),(0,e.watch)((0,k.useElementVisibility)($),n=>{n&&o.autofocus&&!o.disabled&&!o.readonly&&(A.value=!0)});const Be=(0,e.ref)(!1),rt=(0,e.computed)(()=>o.type===d.PASSWORD);function nt(){Be.value=!Be.value}const Bo=(0,e.computed)(()=>Fe.value),Ve=(0,e.computed)(()=>o.type===d.NUMBER);function Me(){if(!F.value){if(o.iMask){S.value=Number(S.value)+Number(U?.value??1);return}$.value.stepUp(),u.value=Number($.value.value)}}function _e(){if(!F.value){if(o.iMask){S.value=Number(S.value)-Number(U?.value??1);return}$.value.stepDown(),u.value=Number($.value.value)}}const Vo=(0,e.computed)(()=>o.type===d.SEARCH);function lt(){u.value="",r("clear")}const{hasIconBefore:Re,hasIconAfter:it}=ie(P,m),He=(0,e.computed)(()=>{if(it.value!==void 0)return it.value;switch(o.type){case d.COLOR:return{name:N.showColorPicker};case d.DATE:case d.DATETIME_LOCAL:case d.WEEK:case d.MONTH:return{name:N.showDatePicker};case d.TIME:return{name:N.showTimePicker}}}),{hasIcon:st}=ie(b),{formatted:Mo}=yo(u,{mode:g.value,upperLimit:Number(Oe?.value),lowerLimit:Number(Ne?.value)}),F=(0,e.computed)(()=>o.disabled||o.readonly),_o=(0,e.computed)(()=>F.value?-1:o.tabindex),Y=(0,e.computed)(()=>!ae(z?.value)),Ro=(0,e.computed)(()=>{if(C.value===!0)return!0;if(de.value===!0)return!1}),B=So((0,e.computed)(()=>o.storageKey??(p?.experimentalFeatures.forceInputSuggestions?o.name:void 0)),xe,new Set),G=(0,e.computed)(()=>{const n=new Map;if(B.value)for(const c of B.value)n.set(c,{isFromStorage:!0});if(o.suggestions)for(const c of o.suggestions)n.set(c,{isFromStorage:!1});return n}),Ho=(0,e.computed)(()=>G.value.size===0?[]:[...G.value.entries()].filter(([n])=>ae(u.value)||`${n}`.toLowerCase().includes(`${u.value}`.toLowerCase())&&n!==u.value).reverse().map(([n])=>n)),Fo=(0,e.computed)(()=>G.value.size>0);function jo(n){u.value=n,v.value?.hide(),r("suggestion:selected",n)}function zo(n){G.value.get(n)?.isFromStorage&&(B.value?.delete(n),r("suggestion:removed",n))}const{modifiers:Uo}=(0,e.toRefs)(o),Wo=le("vv-input-text",Uo,(0,e.computed)(()=>({valid:de.value,invalid:C.value,loading:$e.value,disabled:o.disabled,required:o.required,readonly:o.readonly,"icon-before":!!Re.value,"icon-after":!!He.value,floating:o.floating&&!ae(o.label),dirty:Y.value,focus:he.value&&!F.value,"auto-width":o.autoWidth}))),Yo=(0,e.computed)(()=>[d.TEXT,d.SEARCH,d.URL,d.TEL,d.EMAIL,d.PASSWORD].includes(y.value)),Fe=(0,e.computed)(()=>[d.DATE,d.MONTH,d.WEEK,d.TIME,d.DATETIME_LOCAL].includes(y.value)),qo=(0,e.computed)(()=>[d.TEXT,d.SEARCH,d.URL,d.TEL,d.EMAIL,d.PASSWORD].includes(y.value)),Ko=(0,e.computed)(()=>{const n=rt.value&&Be.value||Bo.value&&!Y.value&&!A.value||o.iMask?d.TEXT:o.type,c={type:n,name:o.name,tabindex:_o.value,disabled:o.disabled,readonly:o.readonly,required:o.required,autocomplete:o.autocomplete,"aria-invalid":Ro.value,"aria-describedby":Go.value?X.value:void 0,"aria-errormessage":Jo.value?X.value:void 0,inputMode:o.inputMode};if(Fe.value||n===d.NUMBER){let E=o.max;n===d.DATE&&!E&&(E="9999-12-31"),c.step=o.step,c.max=E===void 0?void 0:String(E),c.min=o.min===void 0?void 0:String(o.min)}return(Yo.value||n===d.TEXT||n===d.NUMBER)&&(c.placeholder=h.value),qo.value&&(c.minlength=o.minlength,c.maxlength=o.maxlength,c.pattern=o.pattern),n===d.EMAIL&&(c.multiple=o.multiple),c}),ge=(0,e.computed)(()=>({valid:o.valid,invalid:o.invalid,modelValue:o.modelValue,togglePassword:nt,stepUp:Me,stepDown:_e,clear:lt})),{HintSlot:Xo,hasHintLabelOrSlot:Go,hasInvalidLabelOrSlot:Jo,hintSlotScope:be}=kt(f,s),Zo=Ce(d.PASSWORD,o,Y),Qo=Ce(d.NUMBER,o,Y),ea=Ce(d.SEARCH,o,Y);function ta(){F.value||(A.value=!0)}const oa=(0,e.computed)(()=>{if(o.autoWidth)return{width:u.value===void 0?void 0:`${String(u.value).length+1}ch`}});function aa(n){switch(n.code){case"ArrowUp":Ve.value&&(Me(),n.preventDefault());break;case"ArrowDown":Ve.value&&(_e(),n.preventDefault());break}r("keydown",n)}return(n,c)=>((0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)((0,e.unref)(Wo))},[(0,e.unref)(j)?((0,e.openBlock)(),(0,e.createElementBlock)("label",{key:0,for:(0,e.unref)(W),class:"vv-input-text__label"},(0,e.toDisplayString)((0,e.unref)(j)),9,wo)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",{ref_key:"wrapperEl",ref:i,class:"vv-input-text__wrapper"},[n.$slots.before?((0,e.openBlock)(),(0,e.createElementBlock)("div",Eo,[(0,e.renderSlot)(n.$slots,"before",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))))])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",{ref_key:"innerEl",ref:ve,class:"vv-input-text__inner",onClick:(0,e.withModifiers)(ta,["stop"])},[(0,e.unref)(Re)?((0,e.openBlock)(),(0,e.createBlock)(V,(0,e.mergeProps)({key:0},(0,e.unref)(Re),{class:"vv-input-text__icon"}),null,16)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("input",(0,e.mergeProps)({id:(0,e.unref)(W),ref_key:"inputEl",ref:$},(0,e.unref)(Ko),{style:(0,e.unref)(oa),onKeyup:c[0]||(c[0]=E=>r("keyup",E)),onKeydown:aa,onKeypress:c[1]||(c[1]=E=>r("keypress",E))}),null,16,ko),((0,e.unref)(se)||n.$slots.unit)&&(0,e.unref)(Y)?((0,e.openBlock)(),(0,e.createElementBlock)("div",Do,[(0,e.renderSlot)(n.$slots,"unit",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))),()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(se)),1)])])):(0,e.createCommentVNode)("v-if",!0)],512),(0,e.unref)(He)?((0,e.openBlock)(),(0,e.createBlock)(V,(0,e.mergeProps)({key:1},(0,e.unref)(He),{class:"vv-input-text__icon vv-input-text__icon-after"}),null,16)):(0,e.unref)(rt)&&!n.hideActions&&!(0,e.unref)(F)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(Zo),{key:2,onTogglePassword:nt})):(0,e.unref)(Ve)&&!n.hideActions&&!(0,e.unref)(F)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(Qo),{key:3,onStepUp:Me,onStepDown:_e})):(0,e.unref)(Vo)&&!n.hideActions&&!(0,e.unref)(F)?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(ea),{key:4,onClear:lt})):(0,e.createCommentVNode)("v-if",!0),n.$slots.after?((0,e.openBlock)(),(0,e.createElementBlock)("div",Po,[(0,e.renderSlot)(n.$slots,"after",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))))])):(0,e.createCommentVNode)("v-if",!0),(0,e.unref)(g)?((0,e.openBlock)(),(0,e.createElementBlock)("span",To,[(0,e.renderSlot)(n.$slots,"count",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(ge))),()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(Mo)),1)])])):(0,e.createCommentVNode)("v-if",!0)],512),(0,e.createVNode)((0,e.unref)(Xo),{id:(0,e.unref)(X),class:"vv-input-text__hint"},(0,e.createSlots)({_:2},[n.$slots.hint?{name:"hint",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"hint",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"0"}:void 0,n.$slots.loading?{name:"loading",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"loading",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"1"}:void 0,n.$slots.valid?{name:"valid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"valid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"2"}:void 0,n.$slots.invalid?{name:"invalid",fn:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,"invalid",(0,e.normalizeProps)((0,e.guardReactiveProps)((0,e.unref)(be))))]),key:"3"}:void 0]),1032,["id"]),(0,e.unref)(Fo)?((0,e.openBlock)(),(0,e.createBlock)(oo,{key:1,ref_key:"suggestionsDropdownEl",ref:v,reference:(0,e.unref)(i),"autofocus-first":!1,"trigger-width":!0},{items:(0,e.withCtx)(()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(Ho),E=>((0,e.openBlock)(),(0,e.createBlock)(co,{key:String(E),onClick:(0,e.withModifiers)(ra=>jo(E),["stop"])},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)("div",Io,[(0,e.renderSlot)(n.$slots,"suggestion",(0,e.mergeProps)({ref_for:!0},{value:E}),()=>[(0,e.createTextVNode)((0,e.toDisplayString)(E),1)])]),(0,e.unref)(G).get(E)?.isFromStorage&&(0,e.unref)(st)?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,type:"button",tabindex:"-1",class:"cursor-pointer",title:(0,e.unref)(K),onClick:(0,e.withModifiers)(ra=>zo(E),["stop"])},[(0,e.createVNode)(V,(0,e.mergeProps)({ref_for:!0},(0,e.unref)(st)),null,16)],8,Co)):(0,e.createCommentVNode)("v-if",!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["reference"])):(0,e.createCommentVNode)("v-if",!0)],2))}}),No=Oo;return No});
|