@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,12 +1,12 @@
|
|
|
1
|
-
import { Fragment as et, Transition as
|
|
2
|
-
import { useIMask as
|
|
3
|
-
import { arrow as
|
|
4
|
-
import { onClickOutside as
|
|
5
|
-
import
|
|
6
|
-
import { Icon as
|
|
7
|
-
var V = (e) => e.toString().padStart(2, "0"),
|
|
1
|
+
import { Fragment as et, Transition as ma, computed as i, createBlock as K, createCommentVNode as N, createElementBlock as M, createElementVNode as le, createSlots as ba, createTextVNode as Ae, createVNode as Ce, defineComponent as Y, guardReactiveProps as C, h as $, inject as Lt, isRef as At, mergeDefaults as ga, mergeProps as q, nextTick as $e, normalizeClass as tt, normalizeProps as O, normalizeStyle as mt, onMounted as at, openBlock as E, provide as ot, ref as _, renderList as ha, renderSlot as T, toDisplayString as fe, toHandlers as ya, toRefs as de, unref as r, useAttrs as Sa, useId as wa, useSlots as Ea, vShow as _a, watch as j, withCtx as G, withDirectives as Da, withModifiers as Ge } from "vue";
|
|
2
|
+
import { useIMask as Ia } from "vue-imask";
|
|
3
|
+
import { arrow as Ta, autoPlacement as bt, autoUpdate as $a, flip as gt, offset as ht, shift as yt, size as St, useFloating as ka } from "@floating-ui/vue";
|
|
4
|
+
import { onClickOutside as La, onKeyStroke as ke, useElementHover as Ct, useElementVisibility as Aa, useFocus as Ot, useFocusWithin as xt, useMutationObserver as Ca, useStorage as wt, useVModel as Oa } from "@vueuse/core";
|
|
5
|
+
import xa from "mitt";
|
|
6
|
+
import { Icon as Pa, addIcon as Na, iconLoaded as qe } from "@iconify/vue";
|
|
7
|
+
var V = (e) => e.toString().padStart(2, "0"), Ma = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
8
8
|
function Pt(e) {
|
|
9
|
-
if (typeof e != "string" || !
|
|
9
|
+
if (typeof e != "string" || !Ma.test(e)) return !1;
|
|
10
10
|
const a = new Date(e);
|
|
11
11
|
return !Number.isNaN(a.getTime()) && a.toISOString() === e;
|
|
12
12
|
}
|
|
@@ -15,45 +15,45 @@ function Et(e, a = "date", l) {
|
|
|
15
15
|
return "";
|
|
16
16
|
const t = new Date(e);
|
|
17
17
|
if (Number.isNaN(t.getTime())) return "";
|
|
18
|
-
let
|
|
19
|
-
if (a === "month" || (
|
|
18
|
+
let o = `${t.getFullYear()}-${V(t.getMonth() + 1)}`;
|
|
19
|
+
if (a === "month" || (o += `-${V(t.getDate())}`, a === "date")) return o;
|
|
20
20
|
const u = l ? `${V(t.getHours())}:${V(t.getMinutes())}:${V(t.getSeconds())}` : `${V(t.getHours())}:${V(t.getMinutes())}`;
|
|
21
|
-
return a === "time" ? u : `${
|
|
21
|
+
return a === "time" ? u : `${o}T${u}`;
|
|
22
22
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
23
|
+
var Va = /^\d{4}-\d{2}-\d{2}$/, Ra = /^\d{4}-\d{2}$/, Ba = /^(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d)?$/, Ha = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/;
|
|
24
|
+
function Fa(e, a = "date") {
|
|
25
25
|
if (!e?.trim()) return null;
|
|
26
|
-
const l = /* @__PURE__ */ new Date(), t = l.getFullYear(),
|
|
26
|
+
const l = /* @__PURE__ */ new Date(), t = l.getFullYear(), o = l.getMonth(), u = l.getDate();
|
|
27
27
|
if (a === "date") {
|
|
28
|
-
if (!
|
|
28
|
+
if (!Va.test(e)) throw new Error("Invalid date format. Expected: YYYY-MM-DD");
|
|
29
29
|
return /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
30
30
|
}
|
|
31
31
|
if (a === "month") {
|
|
32
|
-
if (!
|
|
32
|
+
if (!Ra.test(e)) throw new Error("Invalid month format. Expected: YYYY-MM");
|
|
33
33
|
return /* @__PURE__ */ new Date(`${e}-01T00:00:00`);
|
|
34
34
|
}
|
|
35
35
|
if (a === "time") {
|
|
36
|
-
if (!
|
|
37
|
-
return e.length === 8 ? /* @__PURE__ */ new Date(`${t}-${V(
|
|
36
|
+
if (!Ba.test(e)) throw new Error("Invalid time format. Expected: HH:mm or HH:mm:ss");
|
|
37
|
+
return e.length === 8 ? /* @__PURE__ */ new Date(`${t}-${V(o + 1)}-${V(u)}T${e}`) : /* @__PURE__ */ new Date(`${t}-${V(o + 1)}-${V(u)}T${e}:00`);
|
|
38
38
|
}
|
|
39
|
-
if (!
|
|
39
|
+
if (!Ha.test(e)) throw new Error("Invalid datetime format. Expected: YYYY-MM-DDThh:mm or YYYY-MM-DDThh:mm:ss");
|
|
40
40
|
return e.length === 16 ? /* @__PURE__ */ new Date(`${e}:00`) : /* @__PURE__ */ new Date(`${e}`);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Le(e) {
|
|
43
43
|
return ((a) => a == null || a === "" || Array.isArray(a) && a.length === 0 || !(a instanceof Date) && typeof a == "object" && Object.keys(a).length === 0)(r(e));
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function ja(e) {
|
|
46
46
|
return typeof e == "string";
|
|
47
47
|
}
|
|
48
48
|
function _t(e) {
|
|
49
|
-
return Array.isArray(e) ? e.filter((a) =>
|
|
49
|
+
return Array.isArray(e) ? e.filter((a) => ja(a)).join(" ") : e;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const l = i(() =>
|
|
51
|
+
function Ua(e, a) {
|
|
52
|
+
const l = i(() => At(e) ? e.value : e), t = i(() => _t(l.value.invalidLabel)), o = i(() => _t(l.value.validLabel)), u = i(() => l.value.loadingLabel), f = i(() => l.value.hintLabel), b = i(() => !!(l.value.loading && (a.loading || u.value))), S = i(() => !b.value && !!(l.value.invalid && (a.invalid || t.value))), D = i(() => !b.value && !S.value && !!(l.value.valid && (a.valid || o.value))), k = i(() => !b.value && !S.value && !D.value && !!(a.hint || f.value)), p = i(() => S.value || D.value || b.value || k.value);
|
|
53
53
|
return {
|
|
54
|
-
hasInvalidLabelOrSlot:
|
|
55
|
-
hasHintLabelOrSlot:
|
|
56
|
-
hasValidLabelOrSlot:
|
|
54
|
+
hasInvalidLabelOrSlot: S,
|
|
55
|
+
hasHintLabelOrSlot: k,
|
|
56
|
+
hasValidLabelOrSlot: D,
|
|
57
57
|
hasLoadingLabelOrSlot: b,
|
|
58
58
|
hintSlotScope: i(() => ({
|
|
59
59
|
modelValue: l.value.modelValue,
|
|
@@ -61,7 +61,7 @@ function Ha(e, a) {
|
|
|
61
61
|
invalid: l.value.invalid,
|
|
62
62
|
loading: l.value.loading
|
|
63
63
|
})),
|
|
64
|
-
HintSlot:
|
|
64
|
+
HintSlot: Y({
|
|
65
65
|
name: "HintSlot",
|
|
66
66
|
props: { tag: {
|
|
67
67
|
type: String,
|
|
@@ -69,48 +69,48 @@ function Ha(e, a) {
|
|
|
69
69
|
} },
|
|
70
70
|
setup() {
|
|
71
71
|
return {
|
|
72
|
-
isVisible:
|
|
72
|
+
isVisible: p,
|
|
73
73
|
invalidLabel: t,
|
|
74
|
-
validLabel:
|
|
74
|
+
validLabel: o,
|
|
75
75
|
loadingLabel: u,
|
|
76
76
|
hintLabel: f,
|
|
77
|
-
hasInvalidLabelOrSlot:
|
|
78
|
-
hasValidLabelOrSlot:
|
|
77
|
+
hasInvalidLabelOrSlot: S,
|
|
78
|
+
hasValidLabelOrSlot: D,
|
|
79
79
|
hasLoadingLabelOrSlot: b,
|
|
80
|
-
hasHintLabelOrSlot:
|
|
80
|
+
hasHintLabelOrSlot: k
|
|
81
81
|
};
|
|
82
82
|
},
|
|
83
83
|
render() {
|
|
84
84
|
if (this.isVisible) {
|
|
85
|
-
let
|
|
86
|
-
return this.hasInvalidLabelOrSlot && (
|
|
85
|
+
let h;
|
|
86
|
+
return this.hasInvalidLabelOrSlot && (h = "alert"), this.hasValidLabelOrSlot && (h = "status"), this.hasLoadingLabelOrSlot ? $(this.tag, { role: h }, this.$slots.loading?.() ?? this.loadingLabel) : this.hasInvalidLabelOrSlot ? $(this.tag, { role: h }, this.$slots.invalid?.() ?? this.$slots.invalid ?? this.invalidLabel) : this.hasValidLabelOrSlot ? $(this.tag, { role: h }, this.$slots.valid?.() ?? this.validLabel) : $(this.tag, { role: h }, this.$slots.hint?.() ?? this.$slots.hint ?? this.hintLabel);
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
90
|
})
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
var
|
|
93
|
+
var ue = /* @__PURE__ */ (function(e) {
|
|
94
94
|
return e.local = "local", e.session = "session", e;
|
|
95
95
|
})({}), Nt = /* @__PURE__ */ (function(e) {
|
|
96
96
|
return e.absolute = "absolute", e.fixed = "fixed", e;
|
|
97
|
-
})({}),
|
|
97
|
+
})({}), L = /* @__PURE__ */ (function(e) {
|
|
98
98
|
return e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e;
|
|
99
|
-
})({}),
|
|
99
|
+
})({}), Ya = /* @__PURE__ */ (function(e) {
|
|
100
100
|
return e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e;
|
|
101
|
-
})({}),
|
|
101
|
+
})({}), Oe = /* @__PURE__ */ (function(e) {
|
|
102
102
|
return e.before = "before", e.after = "after", e;
|
|
103
103
|
})({}), Dt = /* @__PURE__ */ (function(e) {
|
|
104
104
|
return e.button = "button", e.submit = "submit", e.reset = "reset", e;
|
|
105
|
-
})({}),
|
|
105
|
+
})({}), Wa = /* @__PURE__ */ (function(e) {
|
|
106
106
|
return e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e;
|
|
107
|
-
})({}),
|
|
107
|
+
})({}), Xa = /* @__PURE__ */ (function(e) {
|
|
108
108
|
return e.button = "button", e.link = "link", e.menuitem = "menuitem", e;
|
|
109
109
|
})({}), Qe = /* @__PURE__ */ (function(e) {
|
|
110
110
|
return e.listbox = "listbox", e.menu = "menu", e;
|
|
111
111
|
})({}), It = /* @__PURE__ */ (function(e) {
|
|
112
112
|
return e.option = "option", e.presentation = "presentation", e;
|
|
113
|
-
})({}),
|
|
113
|
+
})({}), za = /* @__PURE__ */ Symbol.for("volver"), Ka = /* @__PURE__ */ Symbol.for("dropdownTrigger"), Mt = /* @__PURE__ */ Symbol.for("dropdownItem"), Ga = /* @__PURE__ */ Symbol.for("dropdownAction"), U = {
|
|
114
114
|
showPassword: "eye-on",
|
|
115
115
|
hidePassword: "eye-off",
|
|
116
116
|
showDatePicker: "calendar",
|
|
@@ -121,7 +121,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
121
121
|
remove: "trash",
|
|
122
122
|
edit: "edit",
|
|
123
123
|
download: "download"
|
|
124
|
-
},
|
|
124
|
+
}, qa = { prefix: "normal" }, Ja = {
|
|
125
125
|
to: { type: [String, Object] },
|
|
126
126
|
href: String,
|
|
127
127
|
target: String,
|
|
@@ -156,35 +156,35 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
156
156
|
type: String,
|
|
157
157
|
default: "Loading..."
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, pe = { disabled: {
|
|
160
160
|
type: Boolean,
|
|
161
161
|
default: !1
|
|
162
162
|
} }, Vt = { required: {
|
|
163
163
|
type: Boolean,
|
|
164
164
|
default: !1
|
|
165
|
-
} },
|
|
165
|
+
} }, Za = { selected: {
|
|
166
166
|
type: Boolean,
|
|
167
167
|
default: !1
|
|
168
|
-
} },
|
|
168
|
+
} }, Qa = { active: {
|
|
169
169
|
type: Boolean,
|
|
170
170
|
default: !1
|
|
171
|
-
} },
|
|
171
|
+
} }, eo = { current: {
|
|
172
172
|
type: Boolean,
|
|
173
173
|
default: !1
|
|
174
|
-
} },
|
|
174
|
+
} }, on = {
|
|
175
175
|
showClearAction: {
|
|
176
176
|
type: Boolean,
|
|
177
177
|
default: !1
|
|
178
178
|
},
|
|
179
179
|
iconClear: {
|
|
180
180
|
type: [String, Object],
|
|
181
|
-
default:
|
|
181
|
+
default: U.clear
|
|
182
182
|
},
|
|
183
183
|
labelClear: {
|
|
184
184
|
type: String,
|
|
185
185
|
default: "Clear"
|
|
186
186
|
}
|
|
187
|
-
},
|
|
187
|
+
}, to = { pressed: {
|
|
188
188
|
type: Boolean,
|
|
189
189
|
default: !1
|
|
190
190
|
} }, Pe = { label: {
|
|
@@ -193,13 +193,13 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
193
193
|
} }, it = { readonly: {
|
|
194
194
|
type: Boolean,
|
|
195
195
|
default: !1
|
|
196
|
-
} },
|
|
196
|
+
} }, me = { modifiers: {
|
|
197
197
|
type: [String, Array],
|
|
198
198
|
default: void 0
|
|
199
199
|
} }, st = { hintLabel: {
|
|
200
200
|
type: String,
|
|
201
201
|
default: ""
|
|
202
|
-
} },
|
|
202
|
+
} }, ao = {
|
|
203
203
|
options: {
|
|
204
204
|
type: Array,
|
|
205
205
|
default: () => []
|
|
@@ -216,7 +216,7 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
216
216
|
type: [String, Function],
|
|
217
217
|
default: "disabled"
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, oo = { count: {
|
|
220
220
|
type: [Boolean, String],
|
|
221
221
|
default: !1,
|
|
222
222
|
validator: (e) => [
|
|
@@ -225,33 +225,33 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
225
225
|
"limit",
|
|
226
226
|
"countdown"
|
|
227
227
|
].includes(e)
|
|
228
|
-
} },
|
|
228
|
+
} }, no = { debounce: {
|
|
229
229
|
type: [Number, String],
|
|
230
230
|
default: void 0
|
|
231
|
-
} },
|
|
231
|
+
} }, lo = {
|
|
232
232
|
icon: {
|
|
233
233
|
type: [String, Object],
|
|
234
234
|
default: void 0
|
|
235
235
|
},
|
|
236
236
|
iconPosition: {
|
|
237
237
|
type: String,
|
|
238
|
-
default:
|
|
239
|
-
validation: (e) => Object.values(
|
|
238
|
+
default: Oe.before,
|
|
239
|
+
validation: (e) => Object.values(Oe).includes(e)
|
|
240
240
|
}
|
|
241
241
|
}, Rt = { tabindex: {
|
|
242
242
|
type: [String, Number],
|
|
243
243
|
default: 0
|
|
244
|
-
} },
|
|
244
|
+
} }, ro = { floating: {
|
|
245
245
|
type: Boolean,
|
|
246
246
|
default: !1
|
|
247
|
-
} },
|
|
247
|
+
} }, io = { unselectable: {
|
|
248
248
|
type: Boolean,
|
|
249
249
|
default: !0
|
|
250
|
-
} }, Bt = { id: [String, Number] },
|
|
250
|
+
} }, Bt = { id: [String, Number] }, so = {
|
|
251
251
|
placement: {
|
|
252
252
|
type: String,
|
|
253
|
-
default:
|
|
254
|
-
validator: (e) => Object.values(
|
|
253
|
+
default: L.bottom,
|
|
254
|
+
validator: (e) => Object.values(L).includes(e) || Object.values(Ya).includes(e)
|
|
255
255
|
},
|
|
256
256
|
strategy: {
|
|
257
257
|
type: String,
|
|
@@ -308,28 +308,28 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
308
308
|
type: String,
|
|
309
309
|
required: !0
|
|
310
310
|
}
|
|
311
|
-
},
|
|
311
|
+
}, uo = { autofocus: {
|
|
312
312
|
type: Boolean,
|
|
313
313
|
default: !1
|
|
314
|
-
} },
|
|
314
|
+
} }, vo = { autocomplete: {
|
|
315
315
|
type: String,
|
|
316
316
|
default: "off"
|
|
317
|
-
} },
|
|
317
|
+
} }, co = {
|
|
318
318
|
...Ht,
|
|
319
|
-
...
|
|
320
|
-
...
|
|
319
|
+
...uo,
|
|
320
|
+
...vo,
|
|
321
321
|
...Rt,
|
|
322
|
-
...
|
|
322
|
+
...pe,
|
|
323
323
|
...it,
|
|
324
324
|
...nt,
|
|
325
325
|
...lt,
|
|
326
326
|
...st,
|
|
327
327
|
...rt,
|
|
328
|
-
...
|
|
329
|
-
...eo,
|
|
330
|
-
...to,
|
|
331
|
-
...ao,
|
|
328
|
+
...me,
|
|
332
329
|
...oo,
|
|
330
|
+
...no,
|
|
331
|
+
...lo,
|
|
332
|
+
...ro,
|
|
333
333
|
...Pe,
|
|
334
334
|
minlength: {
|
|
335
335
|
type: [String, Number],
|
|
@@ -344,15 +344,15 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
344
344
|
default: void 0
|
|
345
345
|
},
|
|
346
346
|
...Vt
|
|
347
|
-
},
|
|
347
|
+
}, nn = {
|
|
348
348
|
...Ht,
|
|
349
349
|
...Rt,
|
|
350
350
|
...nt,
|
|
351
351
|
...lt,
|
|
352
352
|
...st,
|
|
353
|
-
...
|
|
353
|
+
...pe,
|
|
354
354
|
...it,
|
|
355
|
-
...
|
|
355
|
+
...me,
|
|
356
356
|
...Pe,
|
|
357
357
|
...rt,
|
|
358
358
|
value: {
|
|
@@ -372,14 +372,14 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
372
372
|
],
|
|
373
373
|
default: void 0
|
|
374
374
|
}
|
|
375
|
-
},
|
|
375
|
+
}, ln = {
|
|
376
376
|
...nt,
|
|
377
377
|
...lt,
|
|
378
|
-
...
|
|
378
|
+
...ao,
|
|
379
379
|
...st,
|
|
380
|
-
...
|
|
380
|
+
...pe,
|
|
381
381
|
...it,
|
|
382
|
-
...
|
|
382
|
+
...me,
|
|
383
383
|
...Pe,
|
|
384
384
|
...rt,
|
|
385
385
|
...Vt,
|
|
@@ -401,13 +401,13 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
401
401
|
type: Boolean,
|
|
402
402
|
default: !1
|
|
403
403
|
}
|
|
404
|
-
},
|
|
405
|
-
...
|
|
404
|
+
}, rn = {
|
|
405
|
+
...pe,
|
|
406
406
|
...Pe,
|
|
407
|
-
...
|
|
408
|
-
...
|
|
407
|
+
...to,
|
|
408
|
+
...Qa,
|
|
409
|
+
...eo,
|
|
409
410
|
...Ja,
|
|
410
|
-
...Ka,
|
|
411
411
|
type: {
|
|
412
412
|
type: String,
|
|
413
413
|
default: Dt.button,
|
|
@@ -419,19 +419,19 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
419
419
|
},
|
|
420
420
|
defaultTag: {
|
|
421
421
|
type: String,
|
|
422
|
-
default:
|
|
422
|
+
default: Wa.button
|
|
423
423
|
}
|
|
424
|
-
},
|
|
424
|
+
}, fo = {
|
|
425
425
|
storageType: {
|
|
426
426
|
type: String,
|
|
427
|
-
default:
|
|
428
|
-
validator: (e) => Object.values(
|
|
427
|
+
default: ue.local,
|
|
428
|
+
validator: (e) => Object.values(ue).includes(e)
|
|
429
429
|
},
|
|
430
430
|
storageKey: String
|
|
431
|
-
},
|
|
431
|
+
}, po = {
|
|
432
432
|
...Bt,
|
|
433
|
-
...
|
|
434
|
-
...
|
|
433
|
+
...so,
|
|
434
|
+
...me,
|
|
435
435
|
modelValue: {
|
|
436
436
|
type: Boolean,
|
|
437
437
|
default: void 0
|
|
@@ -445,14 +445,14 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
445
445
|
default: Qe.menu,
|
|
446
446
|
validator: (e) => Object.values(Qe).includes(e)
|
|
447
447
|
}
|
|
448
|
-
},
|
|
448
|
+
}, mo = { focusOnHover: {
|
|
449
449
|
type: Boolean,
|
|
450
450
|
default: !1
|
|
451
|
-
} },
|
|
452
|
-
...
|
|
453
|
-
...
|
|
454
|
-
...
|
|
455
|
-
...
|
|
451
|
+
} }, bo = {
|
|
452
|
+
...pe,
|
|
453
|
+
...Za,
|
|
454
|
+
...io,
|
|
455
|
+
...me,
|
|
456
456
|
deselectHintLabel: { type: String },
|
|
457
457
|
selectHintLabel: { type: String },
|
|
458
458
|
selectedHintLabel: { type: String },
|
|
@@ -462,63 +462,63 @@ var ve = /* @__PURE__ */ (function(e) {
|
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
464
|
function Ft(e) {
|
|
465
|
-
return i(() => String(e?.value ||
|
|
465
|
+
return i(() => String(e?.value || wa()));
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
const
|
|
467
|
+
function go({ reference: e, id: a, expanded: l, aria: t }) {
|
|
468
|
+
const o = xa();
|
|
469
469
|
return {
|
|
470
|
-
bus:
|
|
471
|
-
component:
|
|
470
|
+
bus: o,
|
|
471
|
+
component: Y({
|
|
472
472
|
name: "VvDropdownTriggerProvider",
|
|
473
473
|
setup() {
|
|
474
|
-
ot(
|
|
474
|
+
ot(Ka, {
|
|
475
475
|
reference: e,
|
|
476
476
|
id: a,
|
|
477
477
|
expanded: l,
|
|
478
478
|
aria: t,
|
|
479
|
-
bus:
|
|
479
|
+
bus: o
|
|
480
480
|
});
|
|
481
481
|
},
|
|
482
482
|
render() {
|
|
483
|
-
return
|
|
483
|
+
return $(et, {}, this.$slots.default?.());
|
|
484
484
|
}
|
|
485
485
|
})
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function ho({ role: e, ...a }) {
|
|
489
489
|
const l = i(() => e.value === Qe.listbox ? It.option : It.presentation);
|
|
490
490
|
return ot(Mt, {
|
|
491
491
|
role: l,
|
|
492
492
|
...a
|
|
493
493
|
}), { itemRole: l };
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
ot(
|
|
497
|
-
role:
|
|
495
|
+
function yo({ expanded: e }) {
|
|
496
|
+
ot(Ga, {
|
|
497
|
+
role: _(Xa.menuitem),
|
|
498
498
|
expanded: e
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
function Ne(e, a, l) {
|
|
502
502
|
return i(() => {
|
|
503
|
-
const t = { [e]: !0 },
|
|
504
|
-
return
|
|
503
|
+
const t = { [e]: !0 }, o = typeof a?.value == "string" ? a.value.split(" ") : a?.value;
|
|
504
|
+
return o && Array.isArray(o) && o.forEach((u) => {
|
|
505
505
|
u && (t[`${e}--${u}`] = !0);
|
|
506
506
|
}), l && Object.keys(l.value).forEach((u) => {
|
|
507
507
|
t[`${e}--${u}`] = r(l.value[u]);
|
|
508
508
|
}), t;
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
|
-
var
|
|
511
|
+
var So = [
|
|
512
512
|
"id",
|
|
513
513
|
"tabindex",
|
|
514
514
|
"role",
|
|
515
515
|
"aria-labelledby"
|
|
516
|
-
],
|
|
516
|
+
], wo = {
|
|
517
517
|
name: "VvDropdown",
|
|
518
518
|
inheritAttrs: !1
|
|
519
|
-
},
|
|
520
|
-
...
|
|
521
|
-
props:
|
|
519
|
+
}, Eo = /* @__PURE__ */ Y({
|
|
520
|
+
...wo,
|
|
521
|
+
props: po,
|
|
522
522
|
emits: [
|
|
523
523
|
"update:modelValue",
|
|
524
524
|
"beforeEnter",
|
|
@@ -537,293 +537,293 @@ var go = [
|
|
|
537
537
|
"leaveCancelled"
|
|
538
538
|
],
|
|
539
539
|
setup(e, { expose: a, emit: l }) {
|
|
540
|
-
const t = e,
|
|
541
|
-
get: () => t.reference ??
|
|
540
|
+
const t = e, o = l, { id: u } = de(t), f = Ft(u), b = Sa(), S = _("auto"), D = _("auto"), k = _(), p = _(), h = _(), R = _(), x = i({
|
|
541
|
+
get: () => t.reference ?? k.value,
|
|
542
542
|
set: (s) => {
|
|
543
|
-
|
|
543
|
+
k.value = s;
|
|
544
544
|
}
|
|
545
|
-
}),
|
|
545
|
+
}), ee = _(!1);
|
|
546
546
|
at(() => {
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
Ca(p.value, () => {
|
|
548
|
+
ee.value = globalThis.getComputedStyle(p.value).getPropertyValue("--dropdown-custom-position")?.trim() === "true";
|
|
549
549
|
}, {
|
|
550
550
|
attributeFilter: ["style"],
|
|
551
|
-
window
|
|
551
|
+
window: globalThis.window
|
|
552
552
|
});
|
|
553
553
|
});
|
|
554
|
-
function re(s,
|
|
555
|
-
return typeof s == "boolean" ?
|
|
554
|
+
function re(s, m, H) {
|
|
555
|
+
return typeof s == "boolean" ? m() : H(s);
|
|
556
556
|
}
|
|
557
557
|
const Me = i(() => {
|
|
558
558
|
const s = [];
|
|
559
|
-
if (t.autoPlacement ? s.push(re(t.autoPlacement, () => bt(), (
|
|
560
|
-
const
|
|
561
|
-
|
|
559
|
+
if (t.autoPlacement ? s.push(re(t.autoPlacement, () => bt(), (m) => bt(m))) : t.flip && s.push(re(t.flip, () => gt({ fallbackStrategy: "initialPlacement" }), (m) => gt(m))), t.shift && s.push(re(t.shift, () => yt(), (m) => yt(m))), t.size) {
|
|
560
|
+
const m = ({ availableWidth: H, availableHeight: De }) => {
|
|
561
|
+
S.value = `${H}px`, D.value = `${De}px`;
|
|
562
562
|
};
|
|
563
|
-
s.push(re(t.size, () => St({ apply:
|
|
564
|
-
...
|
|
565
|
-
apply:
|
|
563
|
+
s.push(re(t.size, () => St({ apply: m }), (H) => St({
|
|
564
|
+
...H,
|
|
565
|
+
apply: m
|
|
566
566
|
})));
|
|
567
567
|
}
|
|
568
|
-
return t.offset && s.push(["string", "number"].includes(typeof t.offset) ? ht(Number(t.offset)) : ht(t.offset)), t.arrow && s.push(
|
|
569
|
-
}), { x: Ve, y: Re, middlewareData:
|
|
570
|
-
whileElementsMounted: (...s) =>
|
|
568
|
+
return t.offset && s.push(["string", "number"].includes(typeof t.offset) ? ht(Number(t.offset)) : ht(t.offset)), t.arrow && s.push(Ta({ element: h })), s;
|
|
569
|
+
}), { x: Ve, y: Re, middlewareData: te, placement: ae, strategy: Be } = ka(x, p, {
|
|
570
|
+
whileElementsMounted: (...s) => $a(...s, { animationFrame: t.strategy === Nt.fixed }),
|
|
571
571
|
placement: i(() => t.placement),
|
|
572
572
|
strategy: i(() => t.strategy),
|
|
573
573
|
middleware: Me
|
|
574
|
-
}),
|
|
575
|
-
if (
|
|
574
|
+
}), y = i(() => {
|
|
575
|
+
if (ee.value) return;
|
|
576
576
|
const s = t.triggerWidth && x.value ? `${x.value?.offsetWidth}px` : void 0;
|
|
577
577
|
return {
|
|
578
578
|
position: Be.value,
|
|
579
579
|
top: `${Re.value ?? 0}px`,
|
|
580
580
|
left: `${Ve.value ?? 0}px`,
|
|
581
|
-
maxWidth: s ? void 0 :
|
|
582
|
-
maxHeight:
|
|
581
|
+
maxWidth: s ? void 0 : S.value,
|
|
582
|
+
maxHeight: D.value,
|
|
583
583
|
width: s
|
|
584
584
|
};
|
|
585
|
-
}),
|
|
586
|
-
if (
|
|
585
|
+
}), be = i(() => ae.value.split("-")[0]), ge = i(() => {
|
|
586
|
+
if (ee.value) return;
|
|
587
587
|
const s = {
|
|
588
|
-
[
|
|
589
|
-
[
|
|
590
|
-
[
|
|
591
|
-
[
|
|
592
|
-
}[
|
|
588
|
+
[L.top]: L.bottom,
|
|
589
|
+
[L.right]: L.left,
|
|
590
|
+
[L.bottom]: L.top,
|
|
591
|
+
[L.left]: L.right
|
|
592
|
+
}[be.value];
|
|
593
593
|
return {
|
|
594
|
-
left:
|
|
595
|
-
top:
|
|
596
|
-
[s]: `${-(
|
|
594
|
+
left: te.value.arrow?.x === void 0 ? void 0 : `${te.value.arrow?.x}px`,
|
|
595
|
+
top: te.value.arrow?.y === void 0 ? void 0 : `${te.value.arrow?.y}px`,
|
|
596
|
+
[s]: `${-(h.value?.offsetWidth ?? 0) / 2}px`
|
|
597
597
|
};
|
|
598
|
-
}),
|
|
599
|
-
get: () =>
|
|
598
|
+
}), oe = Oa(t, "modelValue", o), ie = _(!1), g = i({
|
|
599
|
+
get: () => oe.value ?? ie.value,
|
|
600
600
|
set: (s) => {
|
|
601
|
-
if (
|
|
601
|
+
if (oe.value === void 0) {
|
|
602
602
|
ie.value = s;
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
|
-
|
|
605
|
+
oe.value = s;
|
|
606
606
|
}
|
|
607
607
|
});
|
|
608
|
-
function
|
|
609
|
-
|
|
610
|
-
}
|
|
611
|
-
function Y() {
|
|
612
|
-
S.value = !1;
|
|
608
|
+
function v() {
|
|
609
|
+
g.value = !0;
|
|
613
610
|
}
|
|
614
611
|
function W() {
|
|
615
|
-
|
|
612
|
+
g.value = !1;
|
|
616
613
|
}
|
|
617
|
-
function
|
|
614
|
+
function X() {
|
|
615
|
+
g.value = !g.value;
|
|
616
|
+
}
|
|
617
|
+
function he(s) {
|
|
618
618
|
x.value = s;
|
|
619
619
|
}
|
|
620
|
-
|
|
621
|
-
!t.keepOpen &&
|
|
620
|
+
La(p, () => {
|
|
621
|
+
!t.keepOpen && g.value && (g.value = !1);
|
|
622
622
|
}, { ignore: [x] });
|
|
623
|
-
const He = i(() => x.value?.getAttribute?.("id") ?? void 0),
|
|
623
|
+
const He = i(() => x.value?.getAttribute?.("id") ?? void 0), ve = i(() => ({
|
|
624
624
|
"aria-controls": f.value,
|
|
625
625
|
"aria-haspopup": !0,
|
|
626
|
-
"aria-expanded":
|
|
627
|
-
})), { component: B, bus:
|
|
626
|
+
"aria-expanded": g.value
|
|
627
|
+
})), { component: B, bus: Z } = go({
|
|
628
628
|
reference: x,
|
|
629
629
|
id: f,
|
|
630
|
-
expanded:
|
|
631
|
-
aria:
|
|
630
|
+
expanded: g,
|
|
631
|
+
aria: ve
|
|
632
632
|
});
|
|
633
|
-
|
|
634
|
-
const { role:
|
|
635
|
-
function
|
|
636
|
-
return s ? [...s.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((
|
|
633
|
+
Z.on("click", X);
|
|
634
|
+
const { role: ye, modifiers: Se } = de(t), w = Ne("vv-dropdown", Se, i(() => ({ arrow: t.arrow }))), { focused: z } = xt(p);
|
|
635
|
+
function A(s) {
|
|
636
|
+
return s ? [...s.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((m) => !m.hasAttribute("disabled") && !m.getAttribute("aria-hidden")) : [];
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
640
|
-
const s =
|
|
638
|
+
function we() {
|
|
639
|
+
$e(() => {
|
|
640
|
+
const s = A(p.value);
|
|
641
641
|
s.length > 0 && s[0].focus({ preventScroll: !0 });
|
|
642
642
|
});
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
|
|
646
|
-
const s =
|
|
644
|
+
function Fe() {
|
|
645
|
+
$e(() => {
|
|
646
|
+
const s = A(R.value);
|
|
647
647
|
s.length > 0 && s[0].focus({ preventScroll: !0 });
|
|
648
648
|
});
|
|
649
649
|
}
|
|
650
|
-
function
|
|
651
|
-
|
|
652
|
-
if (
|
|
653
|
-
const s =
|
|
650
|
+
function Ee() {
|
|
651
|
+
$e(() => {
|
|
652
|
+
if (z.value) {
|
|
653
|
+
const s = A(p.value);
|
|
654
654
|
if (s.length === 0 || !document.activeElement) return;
|
|
655
|
-
const
|
|
656
|
-
|
|
655
|
+
const m = s.indexOf(document.activeElement);
|
|
656
|
+
m < s.length - 1 ? s[m + 1].focus({ preventScroll: !0 }) : s[0].focus({ preventScroll: !0 });
|
|
657
657
|
}
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
|
|
662
|
-
if (
|
|
663
|
-
const s =
|
|
660
|
+
function ce() {
|
|
661
|
+
$e(() => {
|
|
662
|
+
if (z.value) {
|
|
663
|
+
const s = A(p.value);
|
|
664
664
|
if (s.length === 0 || !document.activeElement) return;
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
667
|
-
s[
|
|
665
|
+
const m = s.indexOf(document.activeElement);
|
|
666
|
+
if (m > 0) {
|
|
667
|
+
s[m - 1].focus({ preventScroll: !0 });
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
670
|
s.at(-1)?.focus({ preventScroll: !0 });
|
|
671
671
|
}
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
|
-
|
|
675
|
-
s && t.autofocusFirst &&
|
|
674
|
+
j(g, (s) => {
|
|
675
|
+
s && t.autofocusFirst && we();
|
|
676
676
|
}), a({
|
|
677
|
-
toggle:
|
|
678
|
-
show:
|
|
679
|
-
hide:
|
|
680
|
-
init:
|
|
681
|
-
focusFirst:
|
|
682
|
-
focusFirstListElement:
|
|
683
|
-
focusNext:
|
|
684
|
-
focusPrev:
|
|
685
|
-
customPosition:
|
|
677
|
+
toggle: X,
|
|
678
|
+
show: v,
|
|
679
|
+
hide: W,
|
|
680
|
+
init: he,
|
|
681
|
+
focusFirst: we,
|
|
682
|
+
focusFirstListElement: Fe,
|
|
683
|
+
focusNext: Ee,
|
|
684
|
+
focusPrev: ce,
|
|
685
|
+
customPosition: ee
|
|
686
686
|
});
|
|
687
|
-
const { itemRole:
|
|
688
|
-
role:
|
|
689
|
-
expanded:
|
|
690
|
-
focused:
|
|
691
|
-
hovered:
|
|
687
|
+
const { itemRole: P } = ho({
|
|
688
|
+
role: ye,
|
|
689
|
+
expanded: g,
|
|
690
|
+
focused: z,
|
|
691
|
+
hovered: Ct(p)
|
|
692
692
|
});
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
}),
|
|
696
|
-
|
|
697
|
-
}),
|
|
698
|
-
|
|
699
|
-
}),
|
|
700
|
-
const
|
|
701
|
-
|
|
693
|
+
ke("Escape", (s) => {
|
|
694
|
+
g.value && (s.preventDefault(), W());
|
|
695
|
+
}), ke("ArrowDown", (s) => {
|
|
696
|
+
g.value && z.value && (s.preventDefault(), Ee());
|
|
697
|
+
}), ke("ArrowUp", (s) => {
|
|
698
|
+
g.value && z.value && (s.preventDefault(), ce());
|
|
699
|
+
}), ke([" ", "Enter"], (s) => {
|
|
700
|
+
const m = s.target;
|
|
701
|
+
g.value && z.value && m && m?.click();
|
|
702
702
|
});
|
|
703
|
-
const
|
|
703
|
+
const _e = {
|
|
704
704
|
"before-enter": () => {
|
|
705
|
-
|
|
705
|
+
o(g.value ? "beforeExpand" : "beforeCollapse"), o("beforeEnter");
|
|
706
706
|
},
|
|
707
707
|
"after-leave": () => {
|
|
708
|
-
|
|
708
|
+
o(g.value ? "afterExpand" : "afterCollapse"), o("afterLeave");
|
|
709
709
|
},
|
|
710
710
|
enter: () => {
|
|
711
|
-
|
|
711
|
+
o("enter");
|
|
712
712
|
},
|
|
713
713
|
"after-enter": () => {
|
|
714
|
-
|
|
714
|
+
o("afterEnter");
|
|
715
715
|
},
|
|
716
716
|
"enter-cancelled": () => {
|
|
717
|
-
|
|
717
|
+
o("enterCancelled");
|
|
718
718
|
},
|
|
719
719
|
"before-leave": () => {
|
|
720
|
-
|
|
720
|
+
o("beforeLeave");
|
|
721
721
|
},
|
|
722
722
|
leave: () => {
|
|
723
|
-
|
|
723
|
+
o("leave");
|
|
724
724
|
},
|
|
725
725
|
"leave-cancelled": () => {
|
|
726
|
-
|
|
726
|
+
o("leaveCancelled");
|
|
727
727
|
}
|
|
728
728
|
};
|
|
729
|
-
return (s,
|
|
730
|
-
default:
|
|
731
|
-
init:
|
|
732
|
-
show:
|
|
733
|
-
hide:
|
|
734
|
-
toggle:
|
|
735
|
-
expanded: r(
|
|
736
|
-
aria: r(
|
|
729
|
+
return (s, m) => (E(), M(et, null, [Ce(r(B), null, {
|
|
730
|
+
default: G(() => [T(s.$slots, "default", O(C({
|
|
731
|
+
init: he,
|
|
732
|
+
show: v,
|
|
733
|
+
hide: W,
|
|
734
|
+
toggle: X,
|
|
735
|
+
expanded: r(g),
|
|
736
|
+
aria: r(ve)
|
|
737
737
|
})))]),
|
|
738
738
|
_: 3
|
|
739
|
-
}),
|
|
740
|
-
default:
|
|
739
|
+
}), Ce(ma, q({ name: s.transitionName }, ya(_e), { persisted: "" }), {
|
|
740
|
+
default: G(() => [Da(le("div", {
|
|
741
741
|
ref_key: "floatingEl",
|
|
742
|
-
ref:
|
|
743
|
-
style: mt(r(
|
|
744
|
-
class: tt(r(
|
|
742
|
+
ref: p,
|
|
743
|
+
style: mt(r(y)),
|
|
744
|
+
class: tt(r(w))
|
|
745
745
|
}, [
|
|
746
|
-
t.arrow ? (
|
|
746
|
+
t.arrow ? (E(), M("div", {
|
|
747
747
|
key: 0,
|
|
748
748
|
ref_key: "arrowEl",
|
|
749
|
-
ref:
|
|
750
|
-
style: mt(r(
|
|
749
|
+
ref: h,
|
|
750
|
+
style: mt(r(ge)),
|
|
751
751
|
class: "vv-dropdown__arrow"
|
|
752
752
|
}, null, 4)) : N("v-if", !0),
|
|
753
|
-
T(s.$slots, "before",
|
|
754
|
-
show:
|
|
755
|
-
hide:
|
|
756
|
-
toggle:
|
|
757
|
-
expanded: r(
|
|
753
|
+
T(s.$slots, "before", O(C({
|
|
754
|
+
show: v,
|
|
755
|
+
hide: W,
|
|
756
|
+
toggle: X,
|
|
757
|
+
expanded: r(g)
|
|
758
758
|
}))),
|
|
759
|
-
le("div",
|
|
759
|
+
le("div", q(r(b), {
|
|
760
760
|
id: r(f),
|
|
761
761
|
ref_key: "listEl",
|
|
762
762
|
ref: R,
|
|
763
|
-
tabindex: r(
|
|
764
|
-
role: r(
|
|
763
|
+
tabindex: r(g) ? void 0 : -1,
|
|
764
|
+
role: r(ye),
|
|
765
765
|
"aria-labelledby": r(He),
|
|
766
766
|
class: "vv-dropdown__list"
|
|
767
|
-
}), [T(s.$slots, "items",
|
|
768
|
-
show:
|
|
769
|
-
hide:
|
|
770
|
-
toggle:
|
|
771
|
-
expanded: r(
|
|
772
|
-
role: r(
|
|
773
|
-
})))], 16,
|
|
774
|
-
T(s.$slots, "after",
|
|
775
|
-
show:
|
|
776
|
-
hide:
|
|
777
|
-
toggle:
|
|
778
|
-
expanded: r(
|
|
767
|
+
}), [T(s.$slots, "items", O(C({
|
|
768
|
+
show: v,
|
|
769
|
+
hide: W,
|
|
770
|
+
toggle: X,
|
|
771
|
+
expanded: r(g),
|
|
772
|
+
role: r(P)
|
|
773
|
+
})))], 16, So),
|
|
774
|
+
T(s.$slots, "after", O(C({
|
|
775
|
+
show: v,
|
|
776
|
+
hide: W,
|
|
777
|
+
toggle: X,
|
|
778
|
+
expanded: r(g)
|
|
779
779
|
})))
|
|
780
|
-
], 6), [[
|
|
780
|
+
], 6), [[_a, r(g)]])]),
|
|
781
781
|
_: 3
|
|
782
782
|
}, 16, ["name"])], 64));
|
|
783
783
|
}
|
|
784
|
-
}),
|
|
785
|
-
function
|
|
786
|
-
return
|
|
784
|
+
}), _o = Eo;
|
|
785
|
+
function Do() {
|
|
786
|
+
return Lt(Mt, {});
|
|
787
787
|
}
|
|
788
|
-
var
|
|
789
|
-
...
|
|
790
|
-
props:
|
|
788
|
+
var Io = { name: "VvDropdownItem" }, To = /* @__PURE__ */ Y({
|
|
789
|
+
...Io,
|
|
790
|
+
props: mo,
|
|
791
791
|
setup(e) {
|
|
792
|
-
const a = e, { role: l, expanded: t } =
|
|
793
|
-
|
|
794
|
-
const u =
|
|
795
|
-
return
|
|
796
|
-
|
|
797
|
-
}), (
|
|
792
|
+
const a = e, { role: l, expanded: t } = Do(), o = _(null);
|
|
793
|
+
yo({ expanded: t });
|
|
794
|
+
const u = Ct(o), { focused: f } = Ot(o), { focused: b } = xt(o);
|
|
795
|
+
return j(u, (S) => {
|
|
796
|
+
S && a.focusOnHover && (f.value = !0);
|
|
797
|
+
}), (S, D) => (E(), M("div", q({ role: r(l) }, {
|
|
798
798
|
ref_key: "element",
|
|
799
|
-
ref:
|
|
799
|
+
ref: o,
|
|
800
800
|
class: ["vv-dropdown__item", { "focus-visible": r(f) || r(b) }]
|
|
801
|
-
}), [T(
|
|
801
|
+
}), [T(S.$slots, "default")], 16));
|
|
802
802
|
}
|
|
803
|
-
}),
|
|
804
|
-
|
|
805
|
-
props:
|
|
803
|
+
}), $o = To, ko = ["title"], Lo = { name: "VvDropdownOption" }, Ao = /* @__PURE__ */ Y({
|
|
804
|
+
...Lo,
|
|
805
|
+
props: bo,
|
|
806
806
|
setup(e) {
|
|
807
|
-
const a = e, { modifiers: l } =
|
|
807
|
+
const a = e, { modifiers: l } = de(a), t = Ne("vv-dropdown-option", l, i(() => ({
|
|
808
808
|
disabled: a.disabled,
|
|
809
809
|
selected: a.selected,
|
|
810
810
|
unselectable: a.unselectable && a.selected
|
|
811
|
-
}))),
|
|
812
|
-
return (u, f) => (
|
|
811
|
+
}))), o = i(() => a.selected ? a.unselectable ? a.deselectHintLabel : a.selectedHintLabel : a.disabled ? "" : a.selectHintLabel);
|
|
812
|
+
return (u, f) => (E(), K($o, {
|
|
813
813
|
class: tt(r(t)),
|
|
814
814
|
tabindex: u.disabled ? -1 : 0,
|
|
815
815
|
"aria-selected": u.selected,
|
|
816
816
|
"aria-disabled": u.disabled,
|
|
817
817
|
"focus-on-hover": u.focusOnHover
|
|
818
818
|
}, {
|
|
819
|
-
default:
|
|
819
|
+
default: G(() => [T(u.$slots, "default"), le("span", {
|
|
820
820
|
class: "vv-dropdown-option__hint",
|
|
821
|
-
title: r(
|
|
822
|
-
}, [T(u.$slots, "hint",
|
|
821
|
+
title: r(o)
|
|
822
|
+
}, [T(u.$slots, "hint", O(C({
|
|
823
823
|
disabled: u.disabled,
|
|
824
824
|
selected: u.selected,
|
|
825
825
|
unselectable: u.unselectable
|
|
826
|
-
})), () => [
|
|
826
|
+
})), () => [Ae(fe(r(o)), 1)])], 8, ko)]),
|
|
827
827
|
_: 3
|
|
828
828
|
}, 8, [
|
|
829
829
|
"class",
|
|
@@ -833,13 +833,13 @@ var Eo = { name: "VvDropdownItem" }, _o = /* @__PURE__ */ U({
|
|
|
833
833
|
"focus-on-hover"
|
|
834
834
|
]));
|
|
835
835
|
}
|
|
836
|
-
}),
|
|
836
|
+
}), Co = Ao;
|
|
837
837
|
function ut() {
|
|
838
|
-
return
|
|
838
|
+
return Lt(za, void 0);
|
|
839
839
|
}
|
|
840
|
-
var
|
|
841
|
-
...
|
|
842
|
-
props: /* @__PURE__ */
|
|
840
|
+
var Oo = { name: "VvIcon" }, xo = /* @__PURE__ */ Y({
|
|
841
|
+
...Oo,
|
|
842
|
+
props: /* @__PURE__ */ ga({
|
|
843
843
|
name: {},
|
|
844
844
|
color: {},
|
|
845
845
|
width: {},
|
|
@@ -856,31 +856,30 @@ var Ao = { name: "VvIcon" }, Co = /* @__PURE__ */ U({
|
|
|
856
856
|
onLoad: { type: Function },
|
|
857
857
|
svg: {},
|
|
858
858
|
modifiers: {}
|
|
859
|
-
},
|
|
859
|
+
}, qa),
|
|
860
860
|
setup(e) {
|
|
861
|
-
const a = e, l = i(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), t =
|
|
862
|
-
const
|
|
863
|
-
if (qe(
|
|
864
|
-
const R =
|
|
865
|
-
return R ? `@${b.value}:${R.prefix}:${
|
|
861
|
+
const a = e, l = i(() => typeof a.rotate == "string" ? Number.parseFloat(a.rotate) : a.rotate), t = _(!0), o = ut(), { modifiers: u } = de(a), f = Ne("vv-icon", u), b = i(() => a.provider || o?.iconsProvider), S = i(() => {
|
|
862
|
+
const p = a.name ?? "", h = `@${b.value}:${a.prefix}:${p}`;
|
|
863
|
+
if (qe(h)) return h;
|
|
864
|
+
const R = o?.iconsCollections.find((x) => qe(`@${b.value}:${x.prefix}:${p}`));
|
|
865
|
+
return R ? `@${b.value}:${R.prefix}:${p}` : p;
|
|
866
866
|
});
|
|
867
|
-
function p
|
|
868
|
-
|
|
869
|
-
return y ? y.parseFromString(v, "text/html").querySelector("svg") : null;
|
|
867
|
+
function D(p) {
|
|
868
|
+
return globalThis.window === void 0 ? null : new globalThis.DOMParser().parseFromString(p, "text/html").querySelector("svg");
|
|
870
869
|
}
|
|
871
|
-
function
|
|
872
|
-
const
|
|
873
|
-
|
|
870
|
+
function k(p) {
|
|
871
|
+
const h = D(p), R = h?.innerHTML.trim() || "";
|
|
872
|
+
h && R && Na(`@${b.value}:${a.prefix}:${a.name}`, {
|
|
874
873
|
body: R,
|
|
875
|
-
height:
|
|
876
|
-
width:
|
|
874
|
+
height: h.viewBox.baseVal.height,
|
|
875
|
+
width: h.viewBox.baseVal.width
|
|
877
876
|
});
|
|
878
877
|
}
|
|
879
|
-
return
|
|
880
|
-
|
|
881
|
-
}).catch((
|
|
882
|
-
throw t.value = !0, new Error(`Error during fetch icon: ${
|
|
883
|
-
})), a.svg &&
|
|
878
|
+
return o && a.src && !qe(`@${b.value}:${a.prefix}:${a.name}`) && (t.value = !1, o.fetchIcon(a.src).then((p) => {
|
|
879
|
+
p && k(p), t.value = !0;
|
|
880
|
+
}).catch((p) => {
|
|
881
|
+
throw t.value = !0, new Error(`Error during fetch icon: ${p?.message}`);
|
|
882
|
+
})), a.svg && k(a.svg), (p, h) => r(t) ? (E(), K(r(Pa), q({
|
|
884
883
|
key: 0,
|
|
885
884
|
class: r(f)
|
|
886
885
|
}, {
|
|
@@ -892,10 +891,10 @@ var Ao = { name: "VvIcon" }, Co = /* @__PURE__ */ U({
|
|
|
892
891
|
flip: e.flip,
|
|
893
892
|
rotate: r(l),
|
|
894
893
|
color: e.color,
|
|
895
|
-
icon: r(
|
|
894
|
+
icon: r(S)
|
|
896
895
|
}, { onLoad: e.onLoad }), null, 16, ["class", "onLoad"])) : N("v-if", !0);
|
|
897
896
|
}
|
|
898
|
-
}),
|
|
897
|
+
}), J = xo, d = {
|
|
899
898
|
TEXT: "text",
|
|
900
899
|
PASSWORD: "password",
|
|
901
900
|
NUMBER: "number",
|
|
@@ -909,7 +908,7 @@ var Ao = { name: "VvIcon" }, Co = /* @__PURE__ */ U({
|
|
|
909
908
|
DATETIME_LOCAL: "datetime-local",
|
|
910
909
|
MONTH: "month",
|
|
911
910
|
WEEK: "week"
|
|
912
|
-
},
|
|
911
|
+
}, Po = [
|
|
913
912
|
"update:modelValue",
|
|
914
913
|
"update:masked",
|
|
915
914
|
"accept",
|
|
@@ -928,9 +927,9 @@ var Ao = { name: "VvIcon" }, Co = /* @__PURE__ */ U({
|
|
|
928
927
|
"keydown",
|
|
929
928
|
"keypress",
|
|
930
929
|
"clear"
|
|
931
|
-
],
|
|
932
|
-
...
|
|
933
|
-
...
|
|
930
|
+
], Tt = {
|
|
931
|
+
...co,
|
|
932
|
+
...fo,
|
|
934
933
|
modelValue: [
|
|
935
934
|
String,
|
|
936
935
|
Number,
|
|
@@ -959,19 +958,19 @@ var Ao = { name: "VvIcon" }, Co = /* @__PURE__ */ U({
|
|
|
959
958
|
multiple: Boolean,
|
|
960
959
|
iconShowPassword: {
|
|
961
960
|
type: [String, Object],
|
|
962
|
-
default:
|
|
961
|
+
default: U.showPassword
|
|
963
962
|
},
|
|
964
963
|
iconHidePassword: {
|
|
965
964
|
type: [String, Object],
|
|
966
|
-
default:
|
|
965
|
+
default: U.hidePassword
|
|
967
966
|
},
|
|
968
967
|
iconClear: {
|
|
969
968
|
type: [String, Object],
|
|
970
|
-
default:
|
|
969
|
+
default: U.clear
|
|
971
970
|
},
|
|
972
971
|
iconRemoveSuggestion: {
|
|
973
972
|
type: [String, Object],
|
|
974
|
-
default:
|
|
973
|
+
default: U.remove
|
|
975
974
|
},
|
|
976
975
|
labelStepUp: {
|
|
977
976
|
type: String,
|
|
@@ -1032,19 +1031,19 @@ var Ao = { name: "VvIcon" }, Co = /* @__PURE__ */ U({
|
|
|
1032
1031
|
}
|
|
1033
1032
|
};
|
|
1034
1033
|
function xe(e, a) {
|
|
1035
|
-
const l = i(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), t = i(() => a?.value ===
|
|
1034
|
+
const l = i(() => typeof e?.value == "string" ? { name: e?.value } : e?.value), t = i(() => a?.value === Oe.before ? l.value : void 0), o = i(() => a?.value === Oe.after ? l.value : void 0);
|
|
1036
1035
|
return {
|
|
1037
1036
|
hasIcon: l,
|
|
1038
|
-
hasIconLeft: i(() => a?.value ===
|
|
1039
|
-
hasIconRight: i(() => a?.value ===
|
|
1040
|
-
hasIconTop: i(() => a?.value ===
|
|
1041
|
-
hasIconBottom: i(() => a?.value ===
|
|
1037
|
+
hasIconLeft: i(() => a?.value === L.left ? l.value : void 0),
|
|
1038
|
+
hasIconRight: i(() => a?.value === L.right ? l.value : void 0),
|
|
1039
|
+
hasIconTop: i(() => a?.value === L.top ? l.value : void 0),
|
|
1040
|
+
hasIconBottom: i(() => a?.value === L.bottom ? l.value : void 0),
|
|
1042
1041
|
hasIconBefore: t,
|
|
1043
|
-
hasIconAfter:
|
|
1042
|
+
hasIconAfter: o
|
|
1044
1043
|
};
|
|
1045
1044
|
}
|
|
1046
|
-
var
|
|
1047
|
-
components: { VvIcon:
|
|
1045
|
+
var $t = Y({
|
|
1046
|
+
components: { VvIcon: J },
|
|
1048
1047
|
props: {
|
|
1049
1048
|
inputType: {
|
|
1050
1049
|
type: String,
|
|
@@ -1066,8 +1065,8 @@ var Tt = U({
|
|
|
1066
1065
|
emits: ["clear"],
|
|
1067
1066
|
setup(e, { emit: a }) {
|
|
1068
1067
|
const { hasIcon: l } = xe(i(() => e.icon));
|
|
1069
|
-
function t(
|
|
1070
|
-
|
|
1068
|
+
function t(o) {
|
|
1069
|
+
o?.stopPropagation(), e.disabled || a("clear");
|
|
1071
1070
|
}
|
|
1072
1071
|
return {
|
|
1073
1072
|
hasIcon: l,
|
|
@@ -1075,11 +1074,11 @@ var Tt = U({
|
|
|
1075
1074
|
};
|
|
1076
1075
|
},
|
|
1077
1076
|
render() {
|
|
1078
|
-
const e = this.hasIcon ?
|
|
1077
|
+
const e = this.hasIcon ? $(J, {
|
|
1079
1078
|
...this.hasIcon,
|
|
1080
1079
|
class: `vv-${this.inputType}__icon`
|
|
1081
1080
|
}) : void 0;
|
|
1082
|
-
return
|
|
1081
|
+
return $("button", {
|
|
1083
1082
|
disabled: this.disabled,
|
|
1084
1083
|
class: `vv-${this.inputType}__action`,
|
|
1085
1084
|
ariaLabel: this.label,
|
|
@@ -1087,8 +1086,8 @@ var Tt = U({
|
|
|
1087
1086
|
onClick: this.onClick
|
|
1088
1087
|
}, e);
|
|
1089
1088
|
}
|
|
1090
|
-
}),
|
|
1091
|
-
components: { VvIcon:
|
|
1089
|
+
}), kt = Y({
|
|
1090
|
+
components: { VvIcon: J },
|
|
1092
1091
|
props: {
|
|
1093
1092
|
inputType: {
|
|
1094
1093
|
type: String,
|
|
@@ -1108,32 +1107,32 @@ var Tt = U({
|
|
|
1108
1107
|
},
|
|
1109
1108
|
iconShow: {
|
|
1110
1109
|
type: [String, Object],
|
|
1111
|
-
default:
|
|
1110
|
+
default: U.showPassword
|
|
1112
1111
|
},
|
|
1113
1112
|
iconHide: {
|
|
1114
1113
|
type: [String, Object],
|
|
1115
|
-
default:
|
|
1114
|
+
default: U.hidePassword
|
|
1116
1115
|
}
|
|
1117
1116
|
},
|
|
1118
1117
|
emits: ["toggle-password"],
|
|
1119
1118
|
setup(e, { emit: a }) {
|
|
1120
|
-
const l =
|
|
1119
|
+
const l = _(!1), t = i(() => l.value ? e.iconHide : e.iconShow), { hasIcon: o } = xe(t);
|
|
1121
1120
|
function u(f) {
|
|
1122
1121
|
f?.stopPropagation(), e.disabled || (l.value = !l.value, a("toggle-password", l.value));
|
|
1123
1122
|
}
|
|
1124
1123
|
return {
|
|
1125
1124
|
active: l,
|
|
1126
1125
|
activeIcon: t,
|
|
1127
|
-
hasIcon:
|
|
1126
|
+
hasIcon: o,
|
|
1128
1127
|
onClick: u
|
|
1129
1128
|
};
|
|
1130
1129
|
},
|
|
1131
1130
|
render() {
|
|
1132
|
-
const e = this.hasIcon ?
|
|
1131
|
+
const e = this.hasIcon ? $(J, {
|
|
1133
1132
|
...this.hasIcon,
|
|
1134
1133
|
class: `vv-${this.inputType}__icon`
|
|
1135
1134
|
}) : void 0;
|
|
1136
|
-
return
|
|
1135
|
+
return $("button", {
|
|
1137
1136
|
disabled: this.disabled,
|
|
1138
1137
|
class: `vv-${this.inputType}__action`,
|
|
1139
1138
|
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
@@ -1141,8 +1140,8 @@ var Tt = U({
|
|
|
1141
1140
|
onClick: this.onClick
|
|
1142
1141
|
}, e);
|
|
1143
1142
|
}
|
|
1144
|
-
}), Je =
|
|
1145
|
-
components: { VvIcon:
|
|
1143
|
+
}), Je = Y({
|
|
1144
|
+
components: { VvIcon: J },
|
|
1146
1145
|
props: {
|
|
1147
1146
|
inputType: {
|
|
1148
1147
|
type: String,
|
|
@@ -1164,13 +1163,13 @@ var Tt = U({
|
|
|
1164
1163
|
const l = i(() => e.mode === "up");
|
|
1165
1164
|
return {
|
|
1166
1165
|
isUp: l,
|
|
1167
|
-
onClick: (
|
|
1168
|
-
|
|
1166
|
+
onClick: (o) => {
|
|
1167
|
+
o?.stopPropagation(), e.disabled || a(l.value ? "step-up" : "step-down");
|
|
1169
1168
|
}
|
|
1170
1169
|
};
|
|
1171
1170
|
},
|
|
1172
1171
|
render() {
|
|
1173
|
-
return
|
|
1172
|
+
return $("button", {
|
|
1174
1173
|
class: [
|
|
1175
1174
|
`vv-${this.inputType}__action`,
|
|
1176
1175
|
`vv-${this.inputType}__action-chevron`,
|
|
@@ -1187,10 +1186,10 @@ function Ze(e, a, l) {
|
|
|
1187
1186
|
return {
|
|
1188
1187
|
name: "VvInputTextActions",
|
|
1189
1188
|
components: {
|
|
1190
|
-
VvIcon:
|
|
1191
|
-
VvInputPasswordAction:
|
|
1189
|
+
VvIcon: J,
|
|
1190
|
+
VvInputPasswordAction: kt,
|
|
1192
1191
|
VvInputStepAction: Je,
|
|
1193
|
-
VvInputClearAction:
|
|
1192
|
+
VvInputClearAction: $t
|
|
1194
1193
|
},
|
|
1195
1194
|
setup() {
|
|
1196
1195
|
return {
|
|
@@ -1209,19 +1208,19 @@ function Ze(e, a, l) {
|
|
|
1209
1208
|
let t = null;
|
|
1210
1209
|
switch (e) {
|
|
1211
1210
|
case d.SEARCH: {
|
|
1212
|
-
const { onClear:
|
|
1213
|
-
t = [
|
|
1211
|
+
const { onClear: o } = this.$attrs;
|
|
1212
|
+
t = [$($t, {
|
|
1214
1213
|
disabled: this.isDisabled || !this.isDirty,
|
|
1215
1214
|
label: this.labelClear,
|
|
1216
|
-
onClear:
|
|
1215
|
+
onClear: o
|
|
1217
1216
|
})];
|
|
1218
1217
|
break;
|
|
1219
1218
|
}
|
|
1220
1219
|
case d.PASSWORD: {
|
|
1221
|
-
const { onTogglePassword:
|
|
1222
|
-
t = [
|
|
1220
|
+
const { onTogglePassword: o } = this.$attrs;
|
|
1221
|
+
t = [$(kt, {
|
|
1223
1222
|
disabled: this.isDisabled,
|
|
1224
|
-
onTogglePassword:
|
|
1223
|
+
onTogglePassword: o,
|
|
1225
1224
|
labelShow: this.labelShowPassword,
|
|
1226
1225
|
labelHide: this.labelHidePassword,
|
|
1227
1226
|
iconShow: this.iconShowPassword,
|
|
@@ -1230,73 +1229,71 @@ function Ze(e, a, l) {
|
|
|
1230
1229
|
break;
|
|
1231
1230
|
}
|
|
1232
1231
|
case d.NUMBER: {
|
|
1233
|
-
const { onStepUp:
|
|
1234
|
-
t = [
|
|
1232
|
+
const { onStepUp: o, onStepDown: u } = this.$attrs;
|
|
1233
|
+
t = [$(Je, {
|
|
1235
1234
|
mode: "up",
|
|
1236
1235
|
disabled: this.isDisabled || a.max !== void 0 && a.modelValue === a.max,
|
|
1237
1236
|
label: this.labelStepUp,
|
|
1238
|
-
onStepUp:
|
|
1237
|
+
onStepUp: o,
|
|
1239
1238
|
onStepDown: u
|
|
1240
|
-
}),
|
|
1239
|
+
}), $(Je, {
|
|
1241
1240
|
mode: "down",
|
|
1242
1241
|
disabled: this.isDisabled || a.min !== void 0 && a.modelValue === a.min,
|
|
1243
1242
|
label: this.labelStepDown,
|
|
1244
|
-
onStepUp:
|
|
1243
|
+
onStepUp: o,
|
|
1245
1244
|
onStepDown: u
|
|
1246
1245
|
})];
|
|
1247
1246
|
break;
|
|
1248
1247
|
}
|
|
1249
1248
|
}
|
|
1250
|
-
return Array.isArray(t) ?
|
|
1249
|
+
return Array.isArray(t) ? $("div", { class: "vv-input-text__actions-group" }, t) : t;
|
|
1251
1250
|
}
|
|
1252
1251
|
};
|
|
1253
1252
|
}
|
|
1254
|
-
function
|
|
1255
|
-
|
|
1256
|
-
|
|
1253
|
+
function No(e, a, l) {
|
|
1254
|
+
let t = a;
|
|
1255
|
+
if (Array.isArray(e) && e.length) {
|
|
1256
|
+
const o = e[0];
|
|
1257
|
+
o() === a && (t = l);
|
|
1258
|
+
}
|
|
1259
|
+
if (typeof e == "function" && e() === a && (t = l), typeof e == "object") {
|
|
1260
|
+
let o = e.default;
|
|
1261
|
+
typeof o == "function" && (o = o()), (typeof o == "object" ? JSON.stringify(o) === JSON.stringify(a) : o === a) && (t = l);
|
|
1262
|
+
}
|
|
1263
|
+
return t;
|
|
1264
|
+
}
|
|
1265
|
+
function Mo(e, a, l) {
|
|
1266
|
+
const t = ut(), o = i(() => {
|
|
1267
|
+
if (t?.defaults.value?.[e])
|
|
1257
1268
|
return t.defaults.value[e];
|
|
1258
1269
|
});
|
|
1259
1270
|
return i(() => {
|
|
1260
|
-
if (
|
|
1261
|
-
const u =
|
|
1262
|
-
return Object.keys(f).reduce((
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
if (Array.isArray(f[p])) {
|
|
1266
|
-
const v = f[p];
|
|
1267
|
-
v.length && v[0] === I && (h[p] = u[p]);
|
|
1268
|
-
}
|
|
1269
|
-
if (typeof f[p] == "function") {
|
|
1270
|
-
const v = f[p];
|
|
1271
|
-
v() === I && (h[p] = u[p]);
|
|
1272
|
-
}
|
|
1273
|
-
if (typeof f[p] == "object") {
|
|
1274
|
-
let v = f[p].default;
|
|
1275
|
-
typeof v == "function" && (v = v()), typeof v == "object" ? JSON.stringify(v) === JSON.stringify(I) && (h[p] = u[p]) : v === I && (h[p] = u[p]);
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
return h;
|
|
1271
|
+
if (o.value === void 0) return l;
|
|
1272
|
+
const u = o.value, f = a, b = l;
|
|
1273
|
+
return Object.keys(f).reduce((S, D) => {
|
|
1274
|
+
const k = b[D];
|
|
1275
|
+
return S[D] = D in u ? No(f[D], k, u[D]) : k, S;
|
|
1279
1276
|
}, {});
|
|
1280
1277
|
});
|
|
1281
1278
|
}
|
|
1282
|
-
function
|
|
1279
|
+
function Vo(e, a, l = 0, { getter: t = (u) => u, setter: o = (u) => u } = {}) {
|
|
1283
1280
|
let u;
|
|
1284
1281
|
return typeof l == "string" && (l = Number.parseInt(l)), i({
|
|
1285
1282
|
get: () => t(e?.value),
|
|
1286
1283
|
set: (f) => {
|
|
1287
1284
|
u && clearTimeout(u), u = setTimeout(() => {
|
|
1288
|
-
a("update:modelValue",
|
|
1285
|
+
a("update:modelValue", o(f));
|
|
1289
1286
|
}, l);
|
|
1290
1287
|
}
|
|
1291
1288
|
});
|
|
1292
1289
|
}
|
|
1293
|
-
function
|
|
1294
|
-
const { focused: l } =
|
|
1295
|
-
return
|
|
1290
|
+
function Ro(e, a) {
|
|
1291
|
+
const { focused: l } = Ot(e);
|
|
1292
|
+
return j(l, (t) => {
|
|
1296
1293
|
a(t ? "focus" : "blur", r(e));
|
|
1297
1294
|
}), { focused: l };
|
|
1298
1295
|
}
|
|
1299
|
-
function
|
|
1296
|
+
function Bo(e, a) {
|
|
1300
1297
|
const l = i(() => (r(e) ?? "").length), t = i(() => a?.lowerLimit !== void 0 && l.value < a?.lowerLimit ? l.value - a.lowerLimit : a?.upperLimit !== void 0 ? a.upperLimit - l.value : 0);
|
|
1301
1298
|
return {
|
|
1302
1299
|
length: l,
|
|
@@ -1304,226 +1301,236 @@ function No(e, a) {
|
|
|
1304
1301
|
formatted: i(() => a?.mode === !1 ? "" : a?.mode === "limit" && a?.upperLimit ? `${l.value} / ${a.lowerLimit ? `${a.lowerLimit}-` : ""}${a.upperLimit}` : a?.mode === "countdown" ? t.value === 0 ? void 0 : t.value : l.value)
|
|
1305
1302
|
};
|
|
1306
1303
|
}
|
|
1307
|
-
function
|
|
1308
|
-
const t =
|
|
1304
|
+
function Ho(e, a = ue.local, l) {
|
|
1305
|
+
const t = _();
|
|
1309
1306
|
l && (t.value = l);
|
|
1310
|
-
let
|
|
1307
|
+
let o;
|
|
1311
1308
|
return at(() => {
|
|
1312
|
-
e &&
|
|
1313
|
-
const b = r(a) ===
|
|
1309
|
+
e && j(e, (u, f) => {
|
|
1310
|
+
const b = r(a) === ue.session ? sessionStorage : localStorage;
|
|
1314
1311
|
if (f && f !== u && b.removeItem(f), u) {
|
|
1315
|
-
|
|
1312
|
+
o = wt(u, o?.value ?? t.value, b), o.value && (t.value = o.value);
|
|
1316
1313
|
return;
|
|
1317
1314
|
}
|
|
1318
|
-
|
|
1319
|
-
}, { immediate: !0 }),
|
|
1315
|
+
o = void 0;
|
|
1316
|
+
}, { immediate: !0 }), At(a) && j(a, (u, f) => {
|
|
1320
1317
|
if (e?.value) {
|
|
1321
1318
|
if (u) {
|
|
1322
|
-
const b = u ===
|
|
1323
|
-
|
|
1319
|
+
const b = u === ue.session ? sessionStorage : localStorage;
|
|
1320
|
+
o = wt(e.value, o?.value ?? t.value, b);
|
|
1324
1321
|
}
|
|
1325
|
-
f && f !== u && (f ===
|
|
1322
|
+
f && f !== u && (f === ue.session ? sessionStorage : localStorage).removeItem(e.value);
|
|
1326
1323
|
}
|
|
1327
1324
|
});
|
|
1328
|
-
}),
|
|
1329
|
-
|
|
1325
|
+
}), j(t, (u) => {
|
|
1326
|
+
o && (o.value = u);
|
|
1330
1327
|
}, {
|
|
1331
1328
|
deep: !0,
|
|
1332
1329
|
immediate: !0
|
|
1333
1330
|
}), t;
|
|
1334
1331
|
}
|
|
1335
|
-
var
|
|
1332
|
+
var Fo = ["for"], jo = {
|
|
1336
1333
|
key: 0,
|
|
1337
1334
|
class: "vv-input-text__input-before"
|
|
1338
|
-
},
|
|
1335
|
+
}, Uo = ["id"], Yo = {
|
|
1339
1336
|
key: 1,
|
|
1340
1337
|
class: "vv-input-text__unit"
|
|
1341
|
-
},
|
|
1338
|
+
}, Wo = {
|
|
1342
1339
|
key: 5,
|
|
1343
1340
|
class: "vv-input-text__input-after"
|
|
1344
|
-
},
|
|
1341
|
+
}, Xo = {
|
|
1345
1342
|
key: 6,
|
|
1346
1343
|
class: "vv-input-text__limit"
|
|
1347
|
-
},
|
|
1348
|
-
...
|
|
1349
|
-
props:
|
|
1350
|
-
emits:
|
|
1344
|
+
}, zo = { class: "flex-1" }, Ko = ["title", "onClick"], Go = { name: "VvInputText" }, qo = /* @__PURE__ */ Y({
|
|
1345
|
+
...Go,
|
|
1346
|
+
props: Tt,
|
|
1347
|
+
emits: Po,
|
|
1351
1348
|
setup(e, { expose: a, emit: l }) {
|
|
1352
|
-
const t = e,
|
|
1353
|
-
const
|
|
1354
|
-
return Number.isNaN(
|
|
1355
|
-
}),
|
|
1356
|
-
if (!t.iMask) return { mask:
|
|
1349
|
+
const t = e, o = l, u = Ea(), f = ut(), b = Mo("VvInputText", Tt, t), { count: S, debounce: D, icon: k, iconPosition: p, iconRemoveSuggestion: h, id: R, invalid: x, label: ee, labelRemoveSuggestion: re, loading: Me, maxlength: Ve, minlength: Re, modelValue: te, step: ae, storageType: Be, type: y, unit: be, valid: ge } = de(t), oe = Ft(R), ie = i(() => `${oe.value}-hint`), g = i(() => t.floating && Le(t.placeholder) ? " " : t.placeholder), v = Vo(te, o, D?.value ?? 0), W = i(() => {
|
|
1350
|
+
const n = typeof ae.value == "number" ? ae.value : Number.parseInt(ae.value);
|
|
1351
|
+
return Number.isNaN(n) ? !1 : n % 60 !== 0;
|
|
1352
|
+
}), X = /^-0?[.,]?[0*]?$/, he = /./, He = /^-$|^$/, ve = _(!1), B = _(), Z = _(), { el: ye, mask: Se, typed: w, masked: z, unmasked: A } = Ia(i(() => {
|
|
1353
|
+
if (!t.iMask) return { mask: he };
|
|
1357
1354
|
if (t.iMask.mask === Number) {
|
|
1358
|
-
const
|
|
1359
|
-
return t.min && (
|
|
1355
|
+
const n = { ...t.iMask };
|
|
1356
|
+
return t.min && (n.min = Number(t.min)), t.max && (n.max = Number(t.max)), n;
|
|
1360
1357
|
}
|
|
1361
1358
|
return t.iMask;
|
|
1362
1359
|
}), {
|
|
1363
|
-
emit:
|
|
1360
|
+
emit: o,
|
|
1364
1361
|
onAccept: () => {
|
|
1365
|
-
if (
|
|
1366
|
-
if (
|
|
1367
|
-
|
|
1368
|
-
if (c.value === null || c.value === void 0) return;
|
|
1369
|
-
c.value = void 0;
|
|
1370
|
-
return;
|
|
1371
|
-
}
|
|
1372
|
-
if (W.test(C.value)) {
|
|
1373
|
-
c.value = 0;
|
|
1374
|
-
return;
|
|
1375
|
-
}
|
|
1376
|
-
if (typeof E.value != "number") {
|
|
1377
|
-
c.value = Number(E.value);
|
|
1378
|
-
return;
|
|
1379
|
-
}
|
|
1380
|
-
c.value = E.value;
|
|
1362
|
+
if (ve.value) {
|
|
1363
|
+
if (o("update:masked", z.value), y.value === d.NUMBER) {
|
|
1364
|
+
we();
|
|
1381
1365
|
return;
|
|
1382
1366
|
}
|
|
1383
|
-
if (
|
|
1384
|
-
|
|
1385
|
-
if (!c.value) return;
|
|
1386
|
-
if (B.value) {
|
|
1387
|
-
c.value = void 0;
|
|
1388
|
-
return;
|
|
1389
|
-
}
|
|
1390
|
-
c.value = "";
|
|
1391
|
-
return;
|
|
1392
|
-
}
|
|
1393
|
-
if (!(E.value instanceof Date) && !B.value && !J.value) {
|
|
1394
|
-
c.value = E.value;
|
|
1395
|
-
return;
|
|
1396
|
-
}
|
|
1397
|
-
let o = E.value;
|
|
1398
|
-
if (o instanceof Date || (o = Ra(E.value, w.value)), B.value || J.value) {
|
|
1399
|
-
const m = new Date(B.value || J.value);
|
|
1400
|
-
if ((w.value === d.DATETIME_LOCAL || w.value === d.DATE || w.value === d.MONTH) && (m.setFullYear(o.getFullYear()), m.setMonth(o.getMonth())), (w.value === d.DATETIME_LOCAL || w.value === d.DATE) && m.setDate(o.getDate()), (w.value === d.DATETIME_LOCAL || w.value === d.TIME) && (m.setHours(o.getHours()), m.setMinutes(o.getMinutes()), m.setSeconds(o.getSeconds())), B.value instanceof Date) {
|
|
1401
|
-
if (c.value?.getTime() === m.getTime()) return;
|
|
1402
|
-
c.value = m;
|
|
1403
|
-
return;
|
|
1404
|
-
}
|
|
1405
|
-
c.value = m.toISOString();
|
|
1406
|
-
return;
|
|
1407
|
-
}
|
|
1408
|
-
c.value = Et(o, w.value, Y.value);
|
|
1367
|
+
if (y.value === d.DATETIME_LOCAL || y.value === d.DATE || y.value === d.TIME || y.value === d.MONTH) {
|
|
1368
|
+
Ee();
|
|
1409
1369
|
return;
|
|
1410
1370
|
}
|
|
1411
|
-
!
|
|
1371
|
+
!v.value && !A.value || (v.value = A.value);
|
|
1412
1372
|
}
|
|
1413
1373
|
}
|
|
1414
1374
|
});
|
|
1415
|
-
function
|
|
1416
|
-
if (
|
|
1417
|
-
|
|
1375
|
+
function we() {
|
|
1376
|
+
if (He.test(A.value)) {
|
|
1377
|
+
if (v.value === null || v.value === void 0) return;
|
|
1378
|
+
v.value = void 0;
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
if (X.test(A.value)) {
|
|
1382
|
+
v.value = 0;
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
if (typeof w.value != "number") {
|
|
1386
|
+
v.value = Number(w.value);
|
|
1387
|
+
return;
|
|
1388
|
+
}
|
|
1389
|
+
v.value = w.value;
|
|
1390
|
+
}
|
|
1391
|
+
function Fe(n) {
|
|
1392
|
+
const c = new Date(B.value || Z.value);
|
|
1393
|
+
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())), B.value instanceof Date) {
|
|
1394
|
+
if (v.value?.getTime() === c.getTime()) return;
|
|
1395
|
+
v.value = c;
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1398
|
+
v.value = c.toISOString();
|
|
1399
|
+
}
|
|
1400
|
+
function Ee() {
|
|
1401
|
+
const n = y.value;
|
|
1402
|
+
if (!w.value) {
|
|
1403
|
+
if (!v.value) return;
|
|
1404
|
+
if (B.value) {
|
|
1405
|
+
v.value = void 0;
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
v.value = "";
|
|
1409
|
+
return;
|
|
1410
|
+
}
|
|
1411
|
+
if (!(w.value instanceof Date) && !B.value && !Z.value) {
|
|
1412
|
+
v.value = w.value;
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
let c = w.value;
|
|
1416
|
+
if (c instanceof Date || (c = Fa(w.value, n)), B.value || Z.value) {
|
|
1417
|
+
Fe(c);
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1420
|
+
v.value = Et(c, n, W.value);
|
|
1421
|
+
}
|
|
1422
|
+
function ce(n) {
|
|
1423
|
+
if (n == null) {
|
|
1424
|
+
w.value = "", A.value = "";
|
|
1418
1425
|
return;
|
|
1419
1426
|
}
|
|
1420
1427
|
if (t.iMask?.mask === Date) {
|
|
1421
|
-
|
|
1428
|
+
w.value = n instanceof Date ? n : new Date(n);
|
|
1422
1429
|
return;
|
|
1423
1430
|
}
|
|
1424
|
-
if (!(
|
|
1431
|
+
if (!(y.value === d.NUMBER && X.test(A.value) && n === 0)) {
|
|
1425
1432
|
if (Ke.value) {
|
|
1426
|
-
if (
|
|
1427
|
-
if (
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1433
|
+
if (n instanceof Date || Pt(n)) {
|
|
1434
|
+
if (n instanceof Date ? (B.value = n, Z.value = void 0) : (Z.value = n, B.value = void 0), y.value !== d.WEEK) {
|
|
1435
|
+
const c = new Date(n), I = y.value;
|
|
1436
|
+
w.value = Et(c, I, W.value), A.value = w.value;
|
|
1430
1437
|
}
|
|
1431
1438
|
return;
|
|
1432
1439
|
}
|
|
1433
|
-
B.value = void 0,
|
|
1440
|
+
B.value = void 0, Z.value = void 0;
|
|
1434
1441
|
}
|
|
1435
|
-
|
|
1442
|
+
w.value = n, A.value = `${w.value}`;
|
|
1436
1443
|
}
|
|
1437
1444
|
}
|
|
1438
1445
|
at(() => {
|
|
1439
|
-
|
|
1440
|
-
}),
|
|
1441
|
-
|
|
1442
|
-
}),
|
|
1443
|
-
|
|
1446
|
+
Se.value && (ve.value = !0, ce(t.modelValue));
|
|
1447
|
+
}), j(() => t.modelValue, (n) => {
|
|
1448
|
+
Se.value && ce(n);
|
|
1449
|
+
}), j(() => t.masked, (n) => {
|
|
1450
|
+
z.value = n ?? "";
|
|
1444
1451
|
});
|
|
1445
|
-
const P =
|
|
1452
|
+
const P = ye, _e = _(), s = _(), m = _();
|
|
1446
1453
|
a({
|
|
1447
1454
|
$input: P,
|
|
1448
|
-
$inner:
|
|
1449
|
-
$wrapper:
|
|
1455
|
+
$inner: _e,
|
|
1456
|
+
$wrapper: s
|
|
1450
1457
|
});
|
|
1451
|
-
const { focused:
|
|
1452
|
-
function
|
|
1453
|
-
|
|
1458
|
+
const { focused: H } = Ro(P, o), De = i(() => H.value && !t.disabled && !t.readonly);
|
|
1459
|
+
function jt(n) {
|
|
1460
|
+
n ? Ut() : Yt();
|
|
1454
1461
|
}
|
|
1455
|
-
function
|
|
1456
|
-
b.value.selectOnFocus && P.value && P.value.select(),
|
|
1462
|
+
function Ut() {
|
|
1463
|
+
b.value.selectOnFocus && P.value && P.value.select(), se.value.size && m.value?.show();
|
|
1457
1464
|
}
|
|
1458
|
-
function
|
|
1459
|
-
if (!ne.value || !
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1465
|
+
function Yt() {
|
|
1466
|
+
if (!ne.value || !F.value) return;
|
|
1467
|
+
const n = t.maxSuggestions;
|
|
1468
|
+
v.value !== void 0 && v.value !== null && v.value !== "" && (F.value.size >= n && !F.value.has(v.value) && (F.value = new Set([...F.value].slice(F.value.size - n + 1))), F.value.add(v.value));
|
|
1462
1469
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1470
|
+
j(De, jt), j(Aa(P), (n) => {
|
|
1471
|
+
n && t.autofocus && !t.disabled && !t.readonly && (H.value = !0);
|
|
1465
1472
|
});
|
|
1466
|
-
const je =
|
|
1473
|
+
const je = _(!1), dt = i(() => t.type === d.PASSWORD);
|
|
1467
1474
|
function vt() {
|
|
1468
1475
|
je.value = !je.value;
|
|
1469
1476
|
}
|
|
1470
|
-
const
|
|
1477
|
+
const Wt = i(() => Ke.value), Ue = i(() => t.type === d.NUMBER);
|
|
1471
1478
|
function Ye() {
|
|
1472
|
-
if (!
|
|
1479
|
+
if (!Q.value) {
|
|
1473
1480
|
if (t.iMask) {
|
|
1474
|
-
|
|
1481
|
+
w.value = Number(w.value) + Number(ae?.value ?? 1);
|
|
1475
1482
|
return;
|
|
1476
1483
|
}
|
|
1477
|
-
P.value.stepUp(),
|
|
1484
|
+
P.value.stepUp(), v.value = Number(P.value.value);
|
|
1478
1485
|
}
|
|
1479
1486
|
}
|
|
1480
1487
|
function We() {
|
|
1481
|
-
if (!
|
|
1488
|
+
if (!Q.value) {
|
|
1482
1489
|
if (t.iMask) {
|
|
1483
|
-
|
|
1490
|
+
w.value = Number(w.value) - Number(ae?.value ?? 1);
|
|
1484
1491
|
return;
|
|
1485
1492
|
}
|
|
1486
|
-
P.value.stepDown(),
|
|
1493
|
+
P.value.stepDown(), v.value = Number(P.value.value);
|
|
1487
1494
|
}
|
|
1488
1495
|
}
|
|
1489
|
-
const
|
|
1496
|
+
const Xt = i(() => t.type === d.SEARCH);
|
|
1490
1497
|
function ct() {
|
|
1491
|
-
|
|
1498
|
+
v.value = "", o("clear");
|
|
1492
1499
|
}
|
|
1493
|
-
const { hasIconBefore: Xe, hasIconAfter: ft } = xe(
|
|
1500
|
+
const { hasIconBefore: Xe, hasIconAfter: ft } = xe(k, p), ze = i(() => {
|
|
1494
1501
|
if (ft.value !== void 0) return ft.value;
|
|
1495
1502
|
switch (t.type) {
|
|
1496
1503
|
case d.COLOR:
|
|
1497
|
-
return { name:
|
|
1504
|
+
return { name: U.showColorPicker };
|
|
1498
1505
|
case d.DATE:
|
|
1499
1506
|
case d.DATETIME_LOCAL:
|
|
1500
1507
|
case d.WEEK:
|
|
1501
1508
|
case d.MONTH:
|
|
1502
|
-
return { name:
|
|
1509
|
+
return { name: U.showDatePicker };
|
|
1503
1510
|
case d.TIME:
|
|
1504
|
-
return { name:
|
|
1511
|
+
return { name: U.showTimePicker };
|
|
1505
1512
|
}
|
|
1506
|
-
}), { hasIcon: pt } = xe(
|
|
1507
|
-
mode:
|
|
1513
|
+
}), { hasIcon: pt } = xe(h), { formatted: zt } = Bo(v, {
|
|
1514
|
+
mode: S.value,
|
|
1508
1515
|
upperLimit: Number(Ve?.value),
|
|
1509
1516
|
lowerLimit: Number(Re?.value)
|
|
1510
|
-
}),
|
|
1517
|
+
}), Q = i(() => t.disabled || t.readonly), Kt = i(() => Q.value ? -1 : t.tabindex), ne = i(() => !Le(te?.value)), Gt = i(() => {
|
|
1511
1518
|
if (x.value === !0) return !0;
|
|
1512
|
-
if (
|
|
1513
|
-
}),
|
|
1514
|
-
const
|
|
1515
|
-
if (
|
|
1516
|
-
if (t.suggestions) for (const
|
|
1517
|
-
return
|
|
1518
|
-
}),
|
|
1519
|
-
function
|
|
1520
|
-
|
|
1519
|
+
if (ge.value === !0) return !1;
|
|
1520
|
+
}), F = Ho(i(() => t.storageKey ?? (f?.experimentalFeatures.forceInputSuggestions ? t.name : void 0)), Be, /* @__PURE__ */ new Set()), se = i(() => {
|
|
1521
|
+
const n = /* @__PURE__ */ new Map();
|
|
1522
|
+
if (F.value) for (const c of F.value) n.set(c, { isFromStorage: !0 });
|
|
1523
|
+
if (t.suggestions) for (const c of t.suggestions) n.set(c, { isFromStorage: !1 });
|
|
1524
|
+
return n;
|
|
1525
|
+
}), qt = i(() => se.value.size === 0 ? [] : [...se.value.entries()].filter(([n]) => Le(v.value) || `${n}`.toLowerCase().includes(`${v.value}`.toLowerCase()) && n !== v.value).reverse().map(([n]) => n)), Jt = i(() => se.value.size > 0);
|
|
1526
|
+
function Zt(n) {
|
|
1527
|
+
v.value = n, m.value?.hide(), o("suggestion:selected", n);
|
|
1521
1528
|
}
|
|
1522
|
-
function
|
|
1523
|
-
|
|
1529
|
+
function Qt(n) {
|
|
1530
|
+
se.value.get(n)?.isFromStorage && (F.value?.delete(n), o("suggestion:removed", n));
|
|
1524
1531
|
}
|
|
1525
|
-
const { modifiers:
|
|
1526
|
-
valid:
|
|
1532
|
+
const { modifiers: ea } = de(t), ta = Ne("vv-input-text", ea, i(() => ({
|
|
1533
|
+
valid: ge.value,
|
|
1527
1534
|
invalid: x.value,
|
|
1528
1535
|
loading: Me.value,
|
|
1529
1536
|
disabled: t.disabled,
|
|
@@ -1531,49 +1538,49 @@ var Vo = ["for"], Ro = {
|
|
|
1531
1538
|
readonly: t.readonly,
|
|
1532
1539
|
"icon-before": !!Xe.value,
|
|
1533
1540
|
"icon-after": !!ze.value,
|
|
1534
|
-
floating: t.floating && !
|
|
1541
|
+
floating: t.floating && !Le(t.label),
|
|
1535
1542
|
dirty: ne.value,
|
|
1536
|
-
focus:
|
|
1543
|
+
focus: De.value && !Q.value,
|
|
1537
1544
|
"auto-width": t.autoWidth
|
|
1538
|
-
}))),
|
|
1545
|
+
}))), aa = i(() => [
|
|
1539
1546
|
d.TEXT,
|
|
1540
1547
|
d.SEARCH,
|
|
1541
1548
|
d.URL,
|
|
1542
1549
|
d.TEL,
|
|
1543
1550
|
d.EMAIL,
|
|
1544
1551
|
d.PASSWORD
|
|
1545
|
-
].includes(
|
|
1552
|
+
].includes(y.value)), Ke = i(() => [
|
|
1546
1553
|
d.DATE,
|
|
1547
1554
|
d.MONTH,
|
|
1548
1555
|
d.WEEK,
|
|
1549
1556
|
d.TIME,
|
|
1550
1557
|
d.DATETIME_LOCAL
|
|
1551
|
-
].includes(
|
|
1558
|
+
].includes(y.value)), oa = i(() => [
|
|
1552
1559
|
d.TEXT,
|
|
1553
1560
|
d.SEARCH,
|
|
1554
1561
|
d.URL,
|
|
1555
1562
|
d.TEL,
|
|
1556
1563
|
d.EMAIL,
|
|
1557
1564
|
d.PASSWORD
|
|
1558
|
-
].includes(
|
|
1559
|
-
const
|
|
1560
|
-
type:
|
|
1565
|
+
].includes(y.value)), na = i(() => {
|
|
1566
|
+
const n = dt.value && je.value || Wt.value && !ne.value && !H.value || t.iMask ? d.TEXT : t.type, c = {
|
|
1567
|
+
type: n,
|
|
1561
1568
|
name: t.name,
|
|
1562
|
-
tabindex:
|
|
1569
|
+
tabindex: Kt.value,
|
|
1563
1570
|
disabled: t.disabled,
|
|
1564
1571
|
readonly: t.readonly,
|
|
1565
1572
|
required: t.required,
|
|
1566
1573
|
autocomplete: t.autocomplete,
|
|
1567
|
-
"aria-invalid":
|
|
1568
|
-
"aria-describedby":
|
|
1569
|
-
"aria-errormessage":
|
|
1574
|
+
"aria-invalid": Gt.value,
|
|
1575
|
+
"aria-describedby": ra.value ? ie.value : void 0,
|
|
1576
|
+
"aria-errormessage": ia.value ? ie.value : void 0,
|
|
1570
1577
|
inputMode: t.inputMode
|
|
1571
1578
|
};
|
|
1572
|
-
if (Ke.value ||
|
|
1573
|
-
let
|
|
1574
|
-
|
|
1579
|
+
if (Ke.value || n === d.NUMBER) {
|
|
1580
|
+
let I = t.max;
|
|
1581
|
+
n === d.DATE && !I && (I = "9999-12-31"), c.step = t.step, c.max = I === void 0 ? void 0 : String(I), c.min = t.min === void 0 ? void 0 : String(t.min);
|
|
1575
1582
|
}
|
|
1576
|
-
return (
|
|
1583
|
+
return (aa.value || n === d.TEXT || n === d.NUMBER) && (c.placeholder = g.value), oa.value && (c.minlength = t.minlength, c.maxlength = t.maxlength, c.pattern = t.pattern), n === d.EMAIL && (c.multiple = t.multiple), c;
|
|
1577
1584
|
}), Ie = i(() => ({
|
|
1578
1585
|
valid: t.valid,
|
|
1579
1586
|
invalid: t.invalid,
|
|
@@ -1582,122 +1589,122 @@ var Vo = ["for"], Ro = {
|
|
|
1582
1589
|
stepUp: Ye,
|
|
1583
1590
|
stepDown: We,
|
|
1584
1591
|
clear: ct
|
|
1585
|
-
})), { HintSlot:
|
|
1586
|
-
function
|
|
1587
|
-
|
|
1592
|
+
})), { HintSlot: la, hasHintLabelOrSlot: ra, hasInvalidLabelOrSlot: ia, hintSlotScope: Te } = Ua(b, u), sa = Ze(d.PASSWORD, t, ne), ua = Ze(d.NUMBER, t, ne), da = Ze(d.SEARCH, t, ne);
|
|
1593
|
+
function va() {
|
|
1594
|
+
Q.value || (H.value = !0);
|
|
1588
1595
|
}
|
|
1589
|
-
const
|
|
1596
|
+
const ca = i(() => {
|
|
1590
1597
|
if (t.autoWidth)
|
|
1591
|
-
return { width:
|
|
1598
|
+
return { width: v.value === void 0 ? void 0 : `${String(v.value).length + 1}ch` };
|
|
1592
1599
|
});
|
|
1593
|
-
function
|
|
1594
|
-
switch (
|
|
1600
|
+
function fa(n) {
|
|
1601
|
+
switch (n.code) {
|
|
1595
1602
|
case "ArrowUp":
|
|
1596
|
-
Ue.value && (Ye(),
|
|
1603
|
+
Ue.value && (Ye(), n.preventDefault());
|
|
1597
1604
|
break;
|
|
1598
1605
|
case "ArrowDown":
|
|
1599
|
-
Ue.value && (We(),
|
|
1606
|
+
Ue.value && (We(), n.preventDefault());
|
|
1600
1607
|
break;
|
|
1601
1608
|
}
|
|
1602
|
-
|
|
1609
|
+
o("keydown", n);
|
|
1603
1610
|
}
|
|
1604
|
-
return (
|
|
1605
|
-
r(
|
|
1611
|
+
return (n, c) => (E(), M("div", { class: tt(r(ta)) }, [
|
|
1612
|
+
r(ee) ? (E(), M("label", {
|
|
1606
1613
|
key: 0,
|
|
1607
|
-
for: r(
|
|
1614
|
+
for: r(oe),
|
|
1608
1615
|
class: "vv-input-text__label"
|
|
1609
|
-
},
|
|
1616
|
+
}, fe(r(ee)), 9, Fo)) : N("v-if", !0),
|
|
1610
1617
|
le("div", {
|
|
1611
1618
|
ref_key: "wrapperEl",
|
|
1612
|
-
ref:
|
|
1619
|
+
ref: s,
|
|
1613
1620
|
class: "vv-input-text__wrapper"
|
|
1614
1621
|
}, [
|
|
1615
|
-
|
|
1622
|
+
n.$slots.before ? (E(), M("div", jo, [T(n.$slots, "before", O(C(r(Ie))))])) : N("v-if", !0),
|
|
1616
1623
|
le("div", {
|
|
1617
1624
|
ref_key: "innerEl",
|
|
1618
|
-
ref:
|
|
1625
|
+
ref: _e,
|
|
1619
1626
|
class: "vv-input-text__inner",
|
|
1620
|
-
onClick: Ge(
|
|
1627
|
+
onClick: Ge(va, ["stop"])
|
|
1621
1628
|
}, [
|
|
1622
|
-
r(Xe) ? (
|
|
1623
|
-
le("input",
|
|
1624
|
-
id: r(
|
|
1629
|
+
r(Xe) ? (E(), K(J, q({ key: 0 }, r(Xe), { class: "vv-input-text__icon" }), null, 16)) : N("v-if", !0),
|
|
1630
|
+
le("input", q({
|
|
1631
|
+
id: r(oe),
|
|
1625
1632
|
ref_key: "inputEl",
|
|
1626
1633
|
ref: P
|
|
1627
|
-
}, r(
|
|
1628
|
-
style: r(
|
|
1629
|
-
onKeyup:
|
|
1630
|
-
onKeydown:
|
|
1631
|
-
onKeypress:
|
|
1632
|
-
}), null, 16,
|
|
1633
|
-
(r(
|
|
1634
|
+
}, r(na), {
|
|
1635
|
+
style: r(ca),
|
|
1636
|
+
onKeyup: c[0] || (c[0] = (I) => o("keyup", I)),
|
|
1637
|
+
onKeydown: fa,
|
|
1638
|
+
onKeypress: c[1] || (c[1] = (I) => o("keypress", I))
|
|
1639
|
+
}), null, 16, Uo),
|
|
1640
|
+
(r(be) || n.$slots.unit) && r(ne) ? (E(), M("div", Yo, [T(n.$slots, "unit", O(C(r(Ie))), () => [Ae(fe(r(be)), 1)])])) : N("v-if", !0)
|
|
1634
1641
|
], 512),
|
|
1635
|
-
r(ze) ? (
|
|
1642
|
+
r(ze) ? (E(), K(J, q({ key: 1 }, r(ze), { class: "vv-input-text__icon vv-input-text__icon-after" }), null, 16)) : r(dt) && !n.hideActions && !r(Q) ? (E(), K(r(sa), {
|
|
1636
1643
|
key: 2,
|
|
1637
1644
|
onTogglePassword: vt
|
|
1638
|
-
})) : r(Ue) && !
|
|
1645
|
+
})) : r(Ue) && !n.hideActions && !r(Q) ? (E(), K(r(ua), {
|
|
1639
1646
|
key: 3,
|
|
1640
1647
|
onStepUp: Ye,
|
|
1641
1648
|
onStepDown: We
|
|
1642
|
-
})) : r(
|
|
1649
|
+
})) : r(Xt) && !n.hideActions && !r(Q) ? (E(), K(r(da), {
|
|
1643
1650
|
key: 4,
|
|
1644
1651
|
onClear: ct
|
|
1645
1652
|
})) : N("v-if", !0),
|
|
1646
|
-
|
|
1647
|
-
r(
|
|
1653
|
+
n.$slots.after ? (E(), M("div", Wo, [T(n.$slots, "after", O(C(r(Ie))))])) : N("v-if", !0),
|
|
1654
|
+
r(S) ? (E(), M("span", Xo, [T(n.$slots, "count", O(C(r(Ie))), () => [Ae(fe(r(zt)), 1)])])) : N("v-if", !0)
|
|
1648
1655
|
], 512),
|
|
1649
|
-
|
|
1656
|
+
Ce(r(la), {
|
|
1650
1657
|
id: r(ie),
|
|
1651
1658
|
class: "vv-input-text__hint"
|
|
1652
|
-
},
|
|
1653
|
-
|
|
1659
|
+
}, ba({ _: 2 }, [
|
|
1660
|
+
n.$slots.hint ? {
|
|
1654
1661
|
name: "hint",
|
|
1655
|
-
fn:
|
|
1662
|
+
fn: G(() => [T(n.$slots, "hint", O(C(r(Te))))]),
|
|
1656
1663
|
key: "0"
|
|
1657
1664
|
} : void 0,
|
|
1658
|
-
|
|
1665
|
+
n.$slots.loading ? {
|
|
1659
1666
|
name: "loading",
|
|
1660
|
-
fn:
|
|
1667
|
+
fn: G(() => [T(n.$slots, "loading", O(C(r(Te))))]),
|
|
1661
1668
|
key: "1"
|
|
1662
1669
|
} : void 0,
|
|
1663
|
-
|
|
1670
|
+
n.$slots.valid ? {
|
|
1664
1671
|
name: "valid",
|
|
1665
|
-
fn:
|
|
1672
|
+
fn: G(() => [T(n.$slots, "valid", O(C(r(Te))))]),
|
|
1666
1673
|
key: "2"
|
|
1667
1674
|
} : void 0,
|
|
1668
|
-
|
|
1675
|
+
n.$slots.invalid ? {
|
|
1669
1676
|
name: "invalid",
|
|
1670
|
-
fn:
|
|
1677
|
+
fn: G(() => [T(n.$slots, "invalid", O(C(r(Te))))]),
|
|
1671
1678
|
key: "3"
|
|
1672
1679
|
} : void 0
|
|
1673
1680
|
]), 1032, ["id"]),
|
|
1674
|
-
r(
|
|
1681
|
+
r(Jt) ? (E(), K(_o, {
|
|
1675
1682
|
key: 1,
|
|
1676
1683
|
ref_key: "suggestionsDropdownEl",
|
|
1677
|
-
ref:
|
|
1678
|
-
reference: r(
|
|
1684
|
+
ref: m,
|
|
1685
|
+
reference: r(s),
|
|
1679
1686
|
"autofocus-first": !1,
|
|
1680
1687
|
"trigger-width": !0
|
|
1681
1688
|
}, {
|
|
1682
|
-
items:
|
|
1683
|
-
key: String(
|
|
1684
|
-
onClick: Ge((
|
|
1689
|
+
items: G(() => [(E(!0), M(et, null, ha(r(qt), (I) => (E(), K(Co, {
|
|
1690
|
+
key: String(I),
|
|
1691
|
+
onClick: Ge((pa) => Zt(I), ["stop"])
|
|
1685
1692
|
}, {
|
|
1686
|
-
default:
|
|
1693
|
+
default: G(() => [le("div", zo, [T(n.$slots, "suggestion", q({ ref_for: !0 }, { value: I }), () => [Ae(fe(I), 1)])]), r(se).get(I)?.isFromStorage && r(pt) ? (E(), M("button", {
|
|
1687
1694
|
key: 0,
|
|
1688
1695
|
type: "button",
|
|
1689
1696
|
tabindex: "-1",
|
|
1690
1697
|
class: "cursor-pointer",
|
|
1691
1698
|
title: r(re),
|
|
1692
|
-
onClick: Ge((
|
|
1693
|
-
}, [
|
|
1699
|
+
onClick: Ge((pa) => Qt(I), ["stop"])
|
|
1700
|
+
}, [Ce(J, q({ ref_for: !0 }, r(pt)), null, 16)], 8, Ko)) : N("v-if", !0)]),
|
|
1694
1701
|
_: 2
|
|
1695
1702
|
}, 1032, ["onClick"]))), 128))]),
|
|
1696
1703
|
_: 3
|
|
1697
1704
|
}, 8, ["reference"])) : N("v-if", !0)
|
|
1698
1705
|
], 2));
|
|
1699
1706
|
}
|
|
1700
|
-
}),
|
|
1707
|
+
}), sn = qo;
|
|
1701
1708
|
export {
|
|
1702
|
-
|
|
1709
|
+
sn as default
|
|
1703
1710
|
};
|