@volverjs/ui-vue 0.0.10-beta.47 → 0.0.10-beta.49
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/README.md +2 -2
- package/auto-imports.d.ts +19 -11
- package/bin/icons.js +1 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +4 -5
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -11
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +45 -46
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +11 -13
- package/dist/components/VvAccordionGroup/index.d.ts +2 -2
- package/dist/components/VvAction/VvAction.vue.d.ts +8 -10
- package/dist/components/VvAction/index.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +158 -161
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +20 -22
- package/dist/components/VvAlert/index.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +271 -274
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -11
- package/dist/components/VvAlertGroup/index.d.ts +2 -2
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +6 -6
- package/dist/components/VvAvatar/index.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +21 -22
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
- package/dist/components/VvAvatarGroup/index.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +6 -6
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +23 -23
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +19 -19
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +313 -314
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +14 -16
- package/dist/components/VvButton/index.d.ts +9 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -8
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +6 -6
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +186 -187
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +11 -13
- package/dist/components/VvCheckbox/index.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -191
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +11 -13
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
- package/dist/components/VvCombobox/VvCombobox.es.js +1864 -1865
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +72 -291
- package/dist/components/VvCombobox/index.d.ts +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -9
- package/dist/components/VvDialog/index.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +9 -10
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +51 -51
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +22 -16
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +6 -6
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -2
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +2 -2
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +2 -2
- package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -23
- package/dist/components/VvInputFile/VvInputFile.es.js +651 -652
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
- package/dist/components/VvInputFile/index.d.ts +4 -4
- package/dist/components/VvInputText/VvInputClearAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +11 -7
- package/dist/components/VvInputText/VvInputStepAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputText.es.js +715 -716
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -32
- package/dist/components/VvInputText/index.d.ts +1 -1
- package/dist/components/VvNav/VvNav.es.js +5 -5
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +8 -10
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +2 -2
- package/dist/components/VvProgress/VvProgress.vue.d.ts +6 -6
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +186 -187
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +10 -12
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -191
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +11 -13
- package/dist/components/VvRadioGroup/index.d.ts +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +337 -338
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +20 -131
- package/dist/components/VvSelect/index.d.ts +7 -7
- package/dist/components/VvTab/VvTab.es.js +18 -18
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +6 -8
- package/dist/components/VvTab/index.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +292 -293
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +14 -16
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +8 -8
- package/dist/components/common/HintSlot.d.ts +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.es.js +2760 -2763
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +4 -4
- package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -6
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/{useInjectedGroupState.d.ts → useGroupStateInject.d.ts} +1 -1
- package/dist/composables/group/{useProvideGroupState.d.ts → useGroupStateProvide.d.ts} +2 -2
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.es.js +87 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/composables/usePersistence.d.ts +1 -1
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/constants.d.ts +3 -3
- package/dist/directives/index.d.ts +2 -2
- package/dist/directives/index.es.js +145 -39
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +137 -31
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/icons.d.ts +17 -17
- package/dist/icons.es.js +424 -424
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +4 -4
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +178 -474
- package/dist/stories/Alert/Alert.settings.d.ts +1 -1
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
- package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
- package/dist/stories/Nav/Nav.settings.d.ts +1 -1
- package/dist/stories/Tab/Tab.settings.d.ts +1 -1
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/group.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/package.json +43 -43
- package/src/Volver.ts +3 -3
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +5 -5
- package/src/components/VvAccordion/index.ts +2 -2
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +5 -5
- package/src/components/VvAction/VvAction.vue +1 -1
- package/src/components/VvAlert/VvAlert.vue +1 -1
- package/src/components/VvAlert/index.ts +1 -1
- package/src/components/VvAlertGroup/VvAlertGroup.vue +1 -1
- package/src/components/VvAlertGroup/index.ts +3 -3
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +2 -2
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +3 -3
- package/src/components/VvButton/index.ts +4 -4
- package/src/components/VvButtonGroup/VvButtonGroup.vue +3 -3
- package/src/components/VvCheckbox/VvCheckbox.vue +2 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +2 -2
- package/src/components/VvCombobox/VvCombobox.vue +9 -9
- package/src/components/VvCombobox/index.ts +15 -15
- package/src/components/VvDropdown/VvDropdown.vue +19 -19
- package/src/components/VvDropdown/VvDropdownAction.vue +1 -1
- package/src/components/VvDropdown/VvDropdownItem.vue +1 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +1 -1
- package/src/components/VvDropdown/index.ts +2 -2
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvInputFile/VvInputFile.vue +7 -7
- package/src/components/VvInputFile/index.ts +7 -7
- package/src/components/VvInputText/VvInputPasswordAction.ts +1 -1
- package/src/components/VvInputText/VvInputText.vue +19 -19
- package/src/components/VvInputText/VvInputTextActions.ts +4 -4
- package/src/components/VvInputText/index.ts +2 -2
- package/src/components/VvNav/VvNav.vue +1 -1
- package/src/components/VvRadio/VvRadio.vue +1 -1
- package/src/components/VvRadio/index.ts +2 -2
- package/src/components/VvRadioGroup/VvRadioGroup.vue +2 -2
- package/src/components/VvSelect/VvSelect.vue +6 -6
- package/src/components/VvSelect/index.ts +12 -12
- package/src/components/VvTab/VvTab.vue +2 -2
- package/src/components/VvTab/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +1 -1
- package/src/components/common/HintSlot.ts +14 -14
- package/src/components/index.ts +1 -1
- package/src/composables/alert/useAlert.ts +2 -2
- package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +2 -2
- package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
- package/src/composables/dropdown/{useProvideDropdown.ts → useDropdownProvide.ts} +9 -9
- package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
- package/src/composables/group/{useInjectedGroupState.ts → useGroupStateInject.ts} +2 -2
- package/src/composables/group/{useProvideGroupState.ts → useGroupStateProvide.ts} +2 -2
- package/src/composables/index.ts +2 -0
- package/src/composables/useBlurhash.ts +2 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/usePersistence.ts +1 -1
- package/src/composables/useTextCount.ts +2 -2
- package/src/composables/useUniqueId.ts +2 -3
- package/src/constants.ts +5 -5
- package/src/directives/index.ts +2 -2
- package/src/directives/v-contextmenu.ts +21 -29
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +2 -2
- package/src/index.ts +1 -1
- package/src/props/index.ts +7 -7
- package/src/resolvers/unplugin.ts +5 -5
- package/src/stories/Accordion/Accordion.stories.ts +2 -2
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/Accordion/AccordionSlots.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +3 -3
- package/src/stories/Alert/Alert.settings.ts +1 -1
- package/src/stories/Alert/Alert.stories.ts +2 -2
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/Alert/AlertModifiers.stories.ts +2 -2
- package/src/stories/Alert/AlertSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.test.ts +3 -3
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/Avatar/AvatarBadge.stories.ts +1 -1
- package/src/stories/Avatar/AvatarModifiers.stories.ts +2 -2
- package/src/stories/Avatar/AvatarSlots.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +3 -3
- package/src/stories/Badge/Badge.stories.ts +2 -2
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Badge/BadgeSlots.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +37 -117
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +2 -2
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +5 -5
- package/src/stories/Button/Button.settings.ts +3 -3
- package/src/stories/Button/Button.stories.ts +2 -2
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/Button/ButtonIcon.stories.ts +2 -2
- package/src/stories/Button/ButtonLink.stories.ts +2 -2
- package/src/stories/Button/ButtonLoading.stories.ts +2 -2
- package/src/stories/Button/ButtonModifiers.stories.ts +2 -2
- package/src/stories/Button/ButtonSlots.stories.ts +3 -3
- package/src/stories/Button/ButtonState.stories.ts +2 -2
- package/src/stories/Button/ButtonToggle.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +2 -2
- package/src/stories/Card/Card.stories.ts +2 -2
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Card/CardSlots.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +2 -2
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +3 -3
- package/src/stories/Combobox/Combobox.settings.ts +9 -9
- package/src/stories/Combobox/Combobox.stories.ts +2 -2
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxOptions.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxSlots.stories.ts +3 -3
- package/src/stories/Dialog/Dialog.stories.ts +2 -2
- package/src/stories/Dialog/Dialog.test.ts +1 -1
- package/src/stories/Dialog/DialogModifiers.stories.ts +2 -2
- package/src/stories/Dialog/DialogSlots.stories.ts +2 -2
- package/src/stories/Dropdown/Dropdown.settings.ts +1 -1
- package/src/stories/Dropdown/Dropdown.stories.ts +4 -4
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +3 -4
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +4 -4
- package/src/stories/Dropdown/DropdownSlots.stories.ts +4 -4
- package/src/stories/Icon/Icon.settings.ts +1 -1
- package/src/stories/Icon/Icon.stories.ts +2 -2
- package/src/stories/Icon/IconsCollection.stories.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +1 -1
- package/src/stories/InputFile/InputFileDropArea.stories.ts +2 -2
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +2 -2
- package/src/stories/InputFile/InputFileSlots.stories.ts +2 -2
- package/src/stories/InputText/InputText.settings.ts +2 -2
- package/src/stories/InputText/InputText.stories.ts +2 -2
- package/src/stories/InputText/InputText.test.ts +2 -2
- package/src/stories/InputText/InputTextIconPosition.stories.ts +2 -2
- package/src/stories/InputText/InputTextLength.stories.ts +2 -2
- package/src/stories/InputText/InputTextMask.stories.ts +2 -2
- package/src/stories/InputText/InputTextMinMax.stories.ts +2 -2
- package/src/stories/InputText/InputTextSlots.stories.ts +2 -2
- package/src/stories/InputText/InputTextType.stories.ts +2 -2
- package/src/stories/Nav/Nav.settings.ts +1 -1
- package/src/stories/Nav/Nav.stories.ts +2 -2
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Nav/NavModifiers.stories.ts +2 -2
- package/src/stories/Progress/Progress.stories.ts +2 -2
- package/src/stories/Progress/Progress.test.ts +2 -2
- package/src/stories/Radio/Radio.stories.ts +2 -2
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/Radio/RadioSlots.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.test.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +3 -3
- package/src/stories/Select/Select.settings.ts +10 -10
- package/src/stories/Select/Select.stories.ts +2 -2
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
- package/src/stories/Select/SelectOptions.stories.ts +2 -2
- package/src/stories/Select/SelectSlots.stories.ts +2 -2
- package/src/stories/Tab/Tab.settings.ts +1 -1
- package/src/stories/Tab/Tab.stories.ts +1 -1
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.settings.ts +1 -1
- package/src/stories/Textarea/Textarea.stories.ts +2 -2
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Textarea/TextareaLength.stories.ts +2 -2
- package/src/stories/Textarea/TextareaSlots.stories.ts +2 -2
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +2 -2
- package/src/stories/Tooltip/Tooltip.stories.ts +3 -3
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/Tooltip/TooltipDirective.stories.ts +3 -3
- package/src/test/expect.ts +3 -3
- package/src/test/types.d.ts +2 -2
- package/src/types/floating-ui.ts +1 -1
- package/src/types/group.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/utils/DomUtilities.ts +15 -0
- package/src/utils/ObjectUtilities.ts +4 -4
- package/src/workers/blurhash.ts +1 -1
- package/dist/composables/alert/{useInjectAlert.d.ts → useAlerInject.d.ts} +0 -0
- package/dist/composables/dropdown/{useInjectDropdown.d.ts → useDropdownInject.d.ts} +0 -0
- package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
- package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +0 -0
- package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("vue-imask"),require("@iconify/vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","vue-imask","@iconify/vue","@floating-ui/vue","uid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.vueImask,e.vue$1,e.vue$2,e.uid,e.core,e.mitt)}(this,(function(e,t,o,l,a,n,i){"use strict";function r(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function u(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const s="eye-on",d="eye-off",c="calendar",v="time",p="color",f="close",m="trash",b={prefix:"normal"};var h=(e=>(e.local="local",e.session="session",e))(h||{}),g=(e=>(e.absolute="absolute",e.fixed="fixed",e))(g||{}),y=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(y||{}),S=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(S||{}),w=(e=>(e.before="before",e.after="after",e))(w||{}),k=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(k||{}),x=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(x||{}),E=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(E||{}),L=(e=>(e.listbox="listbox",e.menu="menu",e))(L||{}),B=(e=>(e.option="option",e.presentation="presentation",e))(B||{});const $=Symbol.for("volver"),C=Symbol.for("dropdownTrigger"),P=Symbol.for("dropdownItem"),O=Symbol.for("dropdownAction");function N(){return e.inject($)}function T(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const V=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},b),setup(t){const l=t,a=e.computed((()=>"string"==typeof l.rotate?Number.parseFloat(l.rotate):l.rotate)),n=e.ref(!0),i=N(),{modifiers:r}=e.toRefs(l),u=T("vv-icon",r),s=e.computed((()=>l.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=l.name??"",t=`@${s.value}:${l.prefix}:${e}`;if(o.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const l=`@${s.value}:${t.prefix}:${e}`;return o.iconExists(l)}));return a?`@${s.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&o.addIcon(`@${s.value}:${l.prefix}:${l.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&l.src&&!o.iconExists(`@${s.value}:${l.prefix}:${l.name}`)&&(n.value=!1,i.fetchIcon(l.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),l.svg&&c(l.svg),(t,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(o.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function A(t,o){const l=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==o?void 0:o.value)===w.before?l.value:void 0)),n=e.computed((()=>(null==o?void 0:o.value)===w.after?l.value:void 0)),i=e.computed((()=>(null==o?void 0:o.value)===y.left?l.value:void 0)),r=e.computed((()=>(null==o?void 0:o.value)===y.right?l.value:void 0)),u=e.computed((()=>(null==o?void 0:o.value)===y.top?l.value:void 0)),s=e.computed((()=>(null==o?void 0:o.value)===y.bottom?l.value:void 0));return{hasIcon:l,hasIconLeft:i,hasIconRight:r,hasIconTop:u,hasIconBottom:s,hasIconBefore:a,hasIconAfter:n}}const _=e.defineComponent({components:{VvIcon:V},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:[String,Object],default:s},iconHide:{type:[String,Object],default:d}},emits:["toggle-password"],setup(t,{emit:o}){const l=e.ref(!1),a=e.computed((()=>l.value?t.iconHide:t.iconShow)),{hasIcon:n}=A(a);return{active:l,activeIcon:a,hasIcon:n,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(l.value=!l.value,o("toggle-password",l.value))}}},render(){const t=this.hasIcon?e.h(V,{...this.hasIcon,class:"vv-input-text__icon"}):void 0;return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),D=e.defineComponent({components:{VvIcon:V},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:o}){const l=e.computed((()=>"up"===t.mode));return{isUp:l,onClick:e=>{null==e||e.stopPropagation(),t.disabled||o(l.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}}),I=e.defineComponent({components:{VvIcon:V},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:o}){const{hasIcon:l}=A(e.computed((()=>t.icon)));return{hasIcon:l,onClick:function(e){null==e||e.stopPropagation(),t.disabled||o("clear")}}},render(){const t=this.hasIcon?e.h(V,{...this.hasIcon,class:"vv-input-text__icon"}):void 0;return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}}),R={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},M={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},H={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},j={disabled:{type:Boolean,default:!1}},z={selected:{type:Boolean,default:!1}},U=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),F={readonly:{type:Boolean,default:!1}},W={modifiers:{type:[String,Array],default:void 0}},q={hintLabel:{type:String,default:""}},K={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},X={debounce:{type:[Number,String],default:void 0}},J={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:w.before,validation:e=>Object.values(w).includes(e)}},Y={tabindex:{type:[String,Number],default:0}},G={floating:{type:Boolean,default:!1}},Q={unselectable:{type:Boolean,default:!0}},Z={id:[String,Number]},ee={placement:{type:String,default:y.bottom,validator:e=>Object.values(y).includes(e)||Object.values(S).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(g).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},te={...{...Z,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...Y,...j,...F,...R,...M,...q,...H,...W,...K,...X,...J,...G,...U,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},required:{type:Boolean,default:!1}};k.button,x.button;const oe={storageType:{type:String,default:h.local,validator:e=>Object.values(h).includes(e)},storageKey:String},le={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"},ae={...te,...oe,modelValue:[String,Number],type:{type:String,default:le.TEXT,validator:e=>Object.values(le).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:[String,Object],default:s},iconHidePassword:{type:[String,Object],default:d},iconClear:{type:[String,Object],default:f},iconRemoveSuggestion:{type:[String,Object],default:m},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}};function ne(t,o){return{name:"VvInputTextActions",components:{VvIcon:V,VvInputPasswordAction:_,VvInputStepAction:D,VvInputClearAction:I},setup:()=>({isDisabled:e.computed((()=>o.disabled||o.readonly)),labelStepUp:o.labelStepUp,labelStepDown:o.labelStepDown,labelShowPassword:o.labelShowPassword,labelHidePassword:o.labelHidePassword,labelClear:o.labelClear,iconShowPassword:o.iconShowPassword,iconHidePassword:o.iconHidePassword}),render(){let l=null;switch(t){case le.SEARCH:{const{onClear:t}=this.$attrs;l=[e.h(I,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case le.PASSWORD:{const{onTogglePassword:t}=this.$attrs;l=[e.h(_,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case le.NUMBER:{const{onStepUp:t,onStepDown:a}=this.$attrs;l=[e.h(D,{mode:"up",disabled:this.isDisabled||void 0!==o.max&&o.modelValue===o.max,label:this.labelStepUp,onStepUp:t,onStepDown:a}),e.h(D,{mode:"down",disabled:this.isDisabled||void 0!==o.min&&o.modelValue===o.min,label:this.labelStepDown,onStepUp:t,onStepDown:a})];break}}return Array.isArray(l)?e.h("div",{class:"vv-input-text__actions-group"},l):l}}}const ie={...Z,...ee,...W,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:L.menu,validator:e=>Object.values(L).includes(e)}},re={focusOnHover:{type:Boolean,default:!1}},ue={...j,...z,...Q,...W,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function se(t){return e.computed((()=>String((null==t?void 0:t.value)||a.uid())))}const de=["id","tabindex","role","aria-labelledby"],ce=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:ie,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{expose:o,emit:a}){const r=t,u=a,{id:s}=e.toRefs(r),d=se(s),c=e.useAttrs(),v=e.ref("auto"),p=e.ref("auto"),f=e.ref(null),m=e.ref(),b=e.ref(null),h=e.ref(null),S=e.computed({get:()=>r.reference??f.value,set:e=>{f.value=e}}),w=e.ref(!1);e.onMounted((()=>{n.useMutationObserver(m.value,(()=>{var e;w.value="true"===(null==(e=window.getComputedStyle(m.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const k=e.computed((()=>{const e=[];if(r.autoPlacement?"boolean"==typeof r.autoPlacement?e.push(l.autoPlacement()):e.push(l.autoPlacement(r.autoPlacement)):r.flip&&("boolean"==typeof r.flip?e.push(l.flip({fallbackStrategy:"initialPlacement"})):e.push(l.flip(r.flip))),r.shift&&("boolean"==typeof r.shift?e.push(l.shift()):e.push(l.shift(r.shift))),r.size){const t=({availableWidth:e,availableHeight:t})=>{v.value=`${e}px`,p.value=`${t}px`};"boolean"==typeof r.size?e.push(l.size({apply:t})):e.push(l.size({...r.size,apply:t}))}return r.offset&&(e.push(l.offset(Number(r.offset))),["string","number"].includes(typeof r.offset)?e.push(l.offset(Number(r.offset))):e.push(l.offset(r.offset))),r.arrow&&e.push(l.arrow({element:b})),e})),{x:x,y:E,middlewareData:$,placement:O,strategy:N}=l.useFloating(S,m,{whileElementsMounted:(...e)=>l.autoUpdate(...e,{animationFrame:r.strategy===g.fixed}),placement:e.computed((()=>r.placement)),strategy:e.computed((()=>r.strategy)),middleware:k}),V=e.computed((()=>{var e;if(w.value)return;const t=r.triggerWidth&&S.value?`${null==(e=S.value)?void 0:e.offsetWidth}px`:void 0;return{position:N.value,top:`${E.value??0}px`,left:`${x.value??0}px`,maxWidth:t?void 0:v.value,maxHeight:p.value,width:t}})),A=e.computed((()=>O.value.split("-")[0])),_=e.computed((()=>{var e,t,o,l,a;if(w.value)return;const n={[y.top]:y.bottom,[y.right]:y.left,[y.bottom]:y.top,[y.left]:y.right}[A.value];return{left:void 0!==(null==(e=$.value.arrow)?void 0:e.x)?`${null==(t=$.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=$.value.arrow)?void 0:o.y)?`${null==(l=$.value.arrow)?void 0:l.y}px`:void 0,[n]:-((null==(a=b.value)?void 0:a.offsetWidth)??0)/2+"px"}})),D=n.useVModel(r,"modelValue",u),I=e.ref(!1),R=e.computed({get:()=>D.value??I.value,set:e=>{void 0!==D.value?D.value=e:I.value=e}});function M(){R.value=!0}function H(){R.value=!1}function j(){R.value=!R.value}function z(e){S.value=e}o({toggle:j,show:M,hide:H,init:z,customPosition:w}),e.watch(R,(t=>{t&&r.autofocusFirst&&e.nextTick((()=>{const e=G(m.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),n.onClickOutside(m,(()=>{!r.keepOpen&&R.value&&(R.value=!1)}),{ignore:[S]});const U=e.computed((()=>{var e,t;return(null==(t=null==(e=S.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),F=e.computed((()=>({"aria-controls":d.value,"aria-haspopup":!0,"aria-expanded":R.value}))),{component:W,bus:q}=function({reference:t,id:o,expanded:l,aria:a}){const n=i(),r=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(C,{reference:t,id:o,expanded:l,aria:a,bus:n})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:n,component:r}}({reference:S,id:d,expanded:R,aria:F});q.on("click",j);const{role:K,modifiers:X}=e.toRefs(r),J=T("vv-dropdown",X,e.computed((()=>({arrow:r.arrow})))),{focused:Y}=n.useFocusWithin(m);function G(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}const Q=n.useElementHover(m),{itemRole:Z}=function({role:t,...o}){const l=e.computed((()=>t.value===L.listbox?B.option:B.presentation));return e.provide(P,{role:l,...o}),{itemRole:l}}({role:K,expanded:R,focused:Y,hovered:Q});n.onKeyStroke("Escape",(e=>{R.value&&(e.preventDefault(),H())})),n.onKeyStroke("ArrowDown",(t=>{R.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=G(m.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),n.onKeyStroke("ArrowUp",(t=>{R.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=G(m.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),n.onKeyStroke([" ","Enter"],(e=>{const t=e.target;R.value&&Y.value&&t&&(null==t||t.click())}));const ee={"before-enter":()=>{u(R.value?"beforeExpand":"beforeCollapse"),u("beforeEnter")},"after-leave":()=>{u(R.value?"afterExpand":"afterCollapse"),u("afterLeave")},enter:()=>{u("enter")},"after-enter":()=>{u("afterEnter")},"enter-cancelled":()=>{u("enterCancelled")},"before-leave":()=>{u("beforeLeave")},leave:()=>{u("leave")},"leave-cancelled":()=>{u("leaveCancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(W),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:z,show:M,hide:H,toggle:j,expanded:e.unref(R),aria:e.unref(F)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(ee),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:m,style:e.normalizeStyle(e.unref(V)),class:e.normalizeClass(e.unref(J))},[r.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:b,style:e.normalizeStyle(e.unref(_)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)}))),e.createElementVNode("div",e.mergeProps(e.unref(c),{id:e.unref(d),ref_key:"listEl",ref:h,tabindex:e.unref(R)?void 0:-1,role:e.unref(K),"aria-labelledby":e.unref(U),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(Z)})))],16,de),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)})))],6),[[e.vShow,e.unref(R)]])])),_:3},16,["name"])],64))}});const ve=e.defineComponent({name:"VvDropdownItem",props:re,setup(t){const o=t,{role:l,expanded:a}=e.inject(P,{}),i=e.ref(null);!function({expanded:t}){e.provide(O,{role:e.ref(E.menuitem),expanded:t})}({expanded:a});const r=n.useElementHover(i),{focused:u}=n.useFocus(i),{focused:s}=n.useFocusWithin(i);return e.watch(r,(e=>{e&&o.focusOnHover&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(l)},{ref_key:"element",ref:i,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}}),pe=["title"],fe=e.defineComponent({name:"VvDropdownOption",props:ue,setup(t){const o=t,{modifiers:l}=e.toRefs(o),a=T("vv-dropdown-option",l,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),n=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?"":o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(ve,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled,"focus-on-hover":t.focusOnHover},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,pe)])),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}});const me=["for"],be={key:0,class:"vv-input-text__input-before"},he=["id"],ge={key:1,class:"vv-input-text__unit"},ye={key:5,class:"vv-input-text__input-after"},Se={key:6,class:"vv-input-text__limit"},we={class:"flex-1"},ke=["title","onClick"];return e.defineComponent({name:"VvInputText",props:ae,emits:["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","focus","blur","keyup","keydown","keypress"],setup(o,{expose:l,emit:a}){const i=o,s=a,d=e.useSlots(),f=function(t,o,l){const a=N(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return l;const e=n.value,t=o,a=l;return Object.keys(t).reduce(((o,l)=>{const n=a[l];if(o[l]=n,l in e){if(Array.isArray(t[l])){const a=t[l];a.length&&a[0]===n&&(o[l]=e[l])}if("function"==typeof t[l]&&(0,t[l])()===n&&(o[l]=e[l]),"object"==typeof t[l]){let a=t[l].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(o[l]=e[l]):a===n&&(o[l]=e[l])}}return o}),{})}))}("VvInputText",ae,i),{count:m,debounce:b,icon:g,iconPosition:y,iconRemoveSuggestion:S,id:w,invalid:k,label:x,loading:E,maxlength:L,minlength:B,modelValue:$,step:C,storageKey:P,storageType:O,type:_,valid:D}=e.toRefs(i),I=se(w),R=e.computed((()=>`${I.value}-hint`)),M=e.computed((()=>i.floating&&r(i.placeholder)?" ":i.placeholder)),H=function(t,o,l=0,{getter:a=e=>e,setter:n=e=>e}={}){let i;return"string"==typeof l&&(l=Number.parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}($,s,(null==b?void 0:b.value)??0),j=/^-0?[.,]?[0*]?$/,z=e.ref(!1),{el:U,mask:F,typed:W,masked:q,unmasked:K}=t.useIMask(e.computed((()=>{if(!i.iMask)return{mask:/./};if(i.iMask.mask===Number){const e={...i.iMask};return i.min&&(e.min=Number(i.min)),i.max&&(e.max=Number(i.max)),e}return i.iMask})),{emit:s,onAccept:()=>{if(z.value){if(s("update:masked",q.value),_.value===le.NUMBER){if(/^-$|^$/.test(K.value)){if(null===H.value||void 0===H.value)return;return void(H.value=void 0)}return j.test(K.value)?void(H.value=0):"number"!=typeof W.value?void(H.value=Number(W.value)):void(H.value=W.value)}if(_.value===le.DATE){if(U.value instanceof HTMLInputElement&&"date"===U.value.type)return void(H.value=U.value.value);let e=W.value;if(null===e||""===e){if(!H.value)return;return void(H.value="")}return e instanceof Date||(e=new Date(e)),void(H.value=`${e.getFullYear()}-${`0${e.getMonth()+1}`.slice(-2)}-${`0${e.getDate()}`.slice(-2)}`)}if(_.value===le.DATETIME_LOCAL){if(U.value instanceof HTMLInputElement&&"datetime-local"===U.value.type)return void(H.value=U.value.value);let e=W.value;if(null===e||""===e){if(!H.value)return;return void(H.value="")}return W.value instanceof Date||(e=new Date(e)),void(H.value=`${e.getFullYear()}-${`0${e.getMonth()+1}`.slice(-2)}-${`0${e.getDate()}`.slice(-2)}T${`0${e.getHours()}`.slice(-2)}:${`0${e.getMinutes()}`.slice(-2)}`)}(H.value||K.value)&&(H.value=K.value)}}});function X(e){var t;if(void 0===e)return W.value="",void(K.value="");(null==(t=i.iMask)?void 0:t.mask)!==Date?_.value===le.NUMBER&&j.test(K.value)&&0===e||(W.value=e,K.value=`${W.value}`):W.value=new Date(e)}e.onMounted((()=>{F.value&&(z.value=!0,X(i.modelValue))})),e.watch((()=>i.modelValue),(e=>{F.value&&X(e)})),e.watch((()=>i.masked),(e=>{q.value=e??""}));const J=U,Y=e.ref(),G=e.ref(),Q=e.ref();l({$inner:Y});const{focused:Z}=function(t,o){const{focused:l}=n.useFocus(t);return e.watch(l,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:l}}(J,s),ee=e.computed((()=>Z.value&&!i.disabled&&!i.readonly));e.watch(ee,(e=>{var t;e&&f.value.selectOnFocus&&J.value&&J.value.select(),e?null==(t=Q.value)||t.show():setTimeout((()=>{if(Te.value&&Ae.value){const e=i.maxSuggestions-1;Ae.value.size>e&&!Ae.value.has(H.value)&&(Ae.value=new Set([...Ae.value].slice(Ae.value.size-e))),Ae.value.add(H.value)}}),300)}));const te=n.useElementVisibility(J);e.watch(te,(e=>{e&&i.autofocus&&!i.disabled&&!i.readonly&&(Z.value=!0)}));const oe=e.ref(!1),ie=e.computed((()=>i.type===le.PASSWORD));function re(){oe.value=!oe.value}const ue=e.computed((()=>i.type===le.TIME||i.type===le.DATETIME_LOCAL||i.type===le.DATE||i.type===le.WEEK||i.type===le.MONTH)),de=e.computed((()=>i.type===le.NUMBER));function ve(){if(Oe.value){if(i.iMask)return void(W.value=Number(W.value)+Number((null==C?void 0:C.value)??1));J.value.stepUp(),H.value=Number(e.unref(J).value)}}function pe(){if(Oe.value){if(i.iMask)return void(W.value=Number(W.value)-Number((null==C?void 0:C.value)??1));J.value.stepDown(),H.value=Number(e.unref(J).value)}}const xe=e.computed((()=>i.type===le.SEARCH));function Ee(){H.value=""}const{hasIconBefore:Le,hasIconAfter:Be}=A(g,y),$e=e.computed((()=>{if(void 0!==Be.value)return Be.value;switch(i.type){case le.COLOR:return{name:p};case le.DATE:case le.DATETIME_LOCAL:case le.WEEK:case le.MONTH:return{name:c};case le.TIME:return{name:v}}})),{hasIcon:Ce}=A(S),{formatted:Pe}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(H,{mode:m.value,upperLimit:Number(null==L?void 0:L.value),lowerLimit:Number(null==B?void 0:B.value)}),Oe=e.computed((()=>!i.disabled&&!i.readonly)),Ne=e.computed((()=>Oe.value?i.tabindex:-1)),Te=e.computed((()=>!r($))),Ve=e.computed((()=>!0===k.value||!0!==D.value&&void 0)),Ae=function(t,o=h.local,l){const a=e.ref();let i;return l&&(a.value=l),t&&e.watch(t,((t,l)=>{const r=e.unref(o)===h.session?sessionStorage:localStorage;l&&l!==t&&r.removeItem(l),i=t?n.useStorage(t,(null==i?void 0:i.value)??a.value,r):void 0}),{immediate:!0}),e.isRef(o)&&e.watch(o,((e,o)=>{if(null==t?void 0:t.value){if(e){const o=e===h.session?sessionStorage:localStorage;i=n.useStorage(t.value,(null==i?void 0:i.value)??a.value,o)}o&&o!==e&&(o===h.session?sessionStorage:localStorage).removeItem(t.value)}})),e.computed({get:()=>(null==i?void 0:i.value)??a.value,set:e=>{i?i.value=e:a.value=e}})}(P,O,new Set),_e=e.computed((()=>Ae.value?[...Ae.value].filter((e=>r(H.value)||`${e}`.toLowerCase().includes(`${H.value}`.toLowerCase())&&e!==H.value)).reverse():[])),De=e.computed((()=>(null==P?void 0:P.value)&&Ae.value&&Ae.value.size>0));const{modifiers:Ie}=e.toRefs(i),Re=T("vv-input-text",Ie,e.computed((()=>({valid:D.value,invalid:k.value,loading:E.value,disabled:i.disabled,readonly:i.readonly,"icon-before":!!Le.value,"icon-after":!!$e.value,floating:i.floating&&!r(i.label),dirty:Te.value,focus:ee.value,"auto-width":i.autoWidth})))),Me=e.computed((()=>{const e=ie.value&&oe.value?le.TEXT:!ue.value||Te.value||Z.value?i.iMask?le.TEXT:i.type:le.TEXT,t={type:e,name:i.name,tabindex:Ne.value,disabled:i.disabled,readonly:i.readonly,required:i.required,autocomplete:i.autocomplete,"aria-invalid":Ve.value,"aria-describedby":ze.value?R.value:void 0,"aria-errormessage":Ue.value?R.value:void 0};if(e===le.DATE||e===le.MONTH||e===le.WEEK||e===le.TIME||e===le.DATETIME_LOCAL||e===le.NUMBER){let o=i.max;e!==le.DATE||o||(o="9999-12-31"),t.step=i.step,t.max=void 0!==o?String(o):void 0,t.min=void 0!==i.min?String(i.min):void 0}return e!==le.TEXT&&e!==le.SEARCH&&e!==le.URL&&e!==le.TEL&&e!==le.EMAIL&&e!==le.PASSWORD&&e!==le.NUMBER||(t.placeholder=M.value),e!==le.TEXT&&e!==le.SEARCH&&e!==le.URL&&e!==le.TEL&&e!==le.EMAIL&&e!==le.PASSWORD||(t.minlength=i.minlength,t.maxlength=i.maxlength,t.pattern=i.pattern),e===le.EMAIL&&(t.multiple=i.multiple),t})),He=e.computed((()=>({valid:i.valid,invalid:i.invalid,modelValue:i.modelValue,togglePassword:re,stepUp:ve,stepDown:pe,clear:Ee}))),{HintSlot:je,hasHintLabelOrSlot:ze,hasInvalidLabelOrSlot:Ue,hintSlotScope:Fe}=function(t,o){const l=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>u(l.value.invalidLabel))),n=e.computed((()=>u(l.value.validLabel))),i=e.computed((()=>l.value.loadingLabel)),r=e.computed((()=>l.value.hintLabel)),s=e.computed((()=>Boolean(l.value.loading&&(o.loading||i.value)))),d=e.computed((()=>!s.value&&Boolean(l.value.invalid&&(o.invalid||a.value)))),c=e.computed((()=>!s.value&&!d.value&&Boolean(l.value.valid&&(o.valid||n.value)))),v=e.computed((()=>!s.value&&!d.value&&!c.value&&Boolean(o.hint||r.value))),p=e.computed((()=>d.value||c.value||s.value||v.value)),f=e.computed((()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hasHintLabelOrSlot:v}),render(){var t,o,l,a,n,i,r,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hintSlotScope:f,HintSlot:m}}(f,d),We=ne(le.PASSWORD,i),qe=ne(le.NUMBER,i),Ke=ne(le.SEARCH,i);function Xe(){Oe.value&&(Z.value=!0)}const Je=e.computed((()=>{if(i.autoWidth)return{width:void 0!==H.value?`${String(H.value).length+1}ch`:void 0}}));function Ye(e){switch(e.code){case"ArrowUp":de.value&&(ve(),e.preventDefault());break;case"ArrowDown":de.value&&(pe(),e.preventDefault())}s("keydown",e)}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Re))},[e.unref(x)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(I),class:"vv-input-text__label"},e.toDisplayString(e.unref(x)),9,me)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:G,class:"vv-input-text__wrapper"},[t.$slots.before?(e.openBlock(),e.createElementBlock("div",be,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(He))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:Y,class:"vv-input-text__inner",onClick:e.withModifiers(Xe,["stop"])},[e.unref(Le)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0},e.unref(Le),{class:"vv-input-text__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(I),ref_key:"inputEl",ref:J},e.unref(Me),{style:e.unref(Je),onKeyup:o[0]||(o[0]=e=>s("keyup",e)),onKeydown:Ye,onKeypress:o[1]||(o[1]=e=>s("keypress",e))}),null,16,he),(t.unit||t.$slots.unit)&&e.unref(Te)?(e.openBlock(),e.createElementBlock("div",ge,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(He))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("v-if",!0)],512),e.unref($e)?(e.openBlock(),e.createBlock(V,e.mergeProps({key:1},e.unref($e),{class:"vv-input-text__icon vv-input-text__icon-after"}),null,16)):e.unref(ie)&&!t.hideActions&&e.unref(Oe)?(e.openBlock(),e.createBlock(e.unref(We),{key:2,onTogglePassword:re})):e.unref(de)&&!t.hideActions&&e.unref(Oe)?(e.openBlock(),e.createBlock(e.unref(qe),{key:3,onStepUp:ve,onStepDown:pe})):e.unref(xe)&&!t.hideActions&&e.unref(Oe)?(e.openBlock(),e.createBlock(e.unref(Ke),{key:4,onClear:Ee})):e.createCommentVNode("v-if",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",ye,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(He))))])):e.createCommentVNode("v-if",!0),e.unref(m)?(e.openBlock(),e.createElementBlock("span",Se,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(He))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(Pe)),1)]))])):e.createCommentVNode("v-if",!0)],512),e.createVNode(e.unref(je),{id:e.unref(R),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"3"}:void 0]),1032,["id"]),e.unref(De)?(e.openBlock(),e.createBlock(ce,{key:1,ref_key:"dropdownEl",ref:Q,reference:e.unref(G),"autofocus-first":!1,"trigger-width":!0},{items:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e),(o=>(e.openBlock(),e.createBlock(fe,{key:o,onClick:e.withModifiers((e=>{return t=o,H.value=t,void(null==(l=Q.value)||l.hide());var t,l}),["stop"])},{default:e.withCtx((()=>[e.createElementVNode("div",we,[e.renderSlot(t.$slots,"suggestion",e.mergeProps({ref_for:!0},{value:o}),(()=>[e.createTextVNode(e.toDisplayString(o),1)]))]),e.unref(Ae)&&e.unref(Ce)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",tabindex:"-1",class:"cursor-pointer",title:t.labelRemoveSuggestion,onClick:e.withModifiers((e=>{return t=o,void(null==(l=Ae.value)||l.delete(t));var t,l}),["stop"])},[e.createVNode(V,e.mergeProps({ref_for:!0},e.unref(Ce)),null,16)],8,ke)):e.createCommentVNode("v-if",!0)])),_:2},1032,["onClick"])))),128))])),_:3},8,["reference"])):e.createCommentVNode("v-if",!0)],2))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("vue-imask"),require("@floating-ui/vue"),require("@vueuse/core"),require("mitt"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","vue-imask","@floating-ui/vue","@vueuse/core","mitt","@iconify/vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputText=t(e.vue,e.vueImask,e.vue$1,e.core,e.mitt,e.vue$2)}(this,(function(e,t,o,l,a,n){"use strict";function i(t){return null==(o=e.unref(t))||""===o||Array.isArray(o)&&0===o.length||!(o instanceof Date)&&"object"==typeof o&&0===Object.keys(o).length;var o}function r(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}var u=(e=>(e.local="local",e.session="session",e))(u||{}),s=(e=>(e.absolute="absolute",e.fixed="fixed",e))(s||{}),d=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(d||{}),c=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(c||{}),v=(e=>(e.before="before",e.after="after",e))(v||{}),p=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(p||{}),f=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(f||{}),m=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(m||{}),b=(e=>(e.listbox="listbox",e.menu="menu",e))(b||{}),h=(e=>(e.option="option",e.presentation="presentation",e))(h||{});const g=Symbol.for("volver"),y=Symbol.for("dropdownTrigger"),S=Symbol.for("dropdownItem"),w=Symbol.for("dropdownAction"),k={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},x={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},E={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},L={disabled:{type:Boolean,default:!1}},B={selected:{type:Boolean,default:!1}},$=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),C={readonly:{type:Boolean,default:!1}},P={modifiers:{type:[String,Array],default:void 0}},O={hintLabel:{type:String,default:""}},T={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},N={debounce:{type:[Number,String],default:void 0}},V={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:v.before,validation:e=>Object.values(v).includes(e)}},A={tabindex:{type:[String,Number],default:0}},_={floating:{type:Boolean,default:!1}},D={unselectable:{type:Boolean,default:!0}},I={id:[String,Number]},R={placement:{type:String,default:d.bottom,validator:e=>Object.values(d).includes(e)||Object.values(c).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(s).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},M={...{...I,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...A,...L,...C,...k,...x,...O,...E,...P,...T,...N,...V,..._,...$,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},required:{type:Boolean,default:!1}};p.button,f.button;const H={storageType:{type:String,default:u.local,validator:e=>Object.values(u).includes(e)},storageKey:String},j={...I,...R,...P,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:b.menu,validator:e=>Object.values(b).includes(e)}},z={focusOnHover:{type:Boolean,default:!1}},U={...L,...B,...D,...P,deselectHintLabel:{type:String},selectHintLabel:{type:String},selectedHintLabel:{type:String},focusOnHover:{type:Boolean,default:!1}};function F(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}function W(t,o,l){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{a[`${t}--${o}`]=e.unref(l.value[o])})),a}))}const q=["id","tabindex","role","aria-labelledby"],K=e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:j,emits:["update:modelValue","beforeEnter","afterLeave","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","afterEnter","enterCancelled","beforeLeave","leave","leaveCancelled"],setup(t,{expose:n,emit:i}){const r=t,u=i,{id:c}=e.toRefs(r),v=F(c),p=e.useAttrs(),f=e.ref("auto"),m=e.ref("auto"),g=e.ref(),w=e.ref(),k=e.useTemplateRef("arrowEl"),x=e.useTemplateRef("listEl"),E=e.computed({get:()=>r.reference??g.value,set:e=>{g.value=e}}),L=e.ref(!1);e.onMounted((()=>{l.useMutationObserver(w.value,(()=>{var e;L.value="true"===(null==(e=window.getComputedStyle(w.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const B=e.computed((()=>{const e=[];if(r.autoPlacement?"boolean"==typeof r.autoPlacement?e.push(o.autoPlacement()):e.push(o.autoPlacement(r.autoPlacement)):r.flip&&("boolean"==typeof r.flip?e.push(o.flip({fallbackStrategy:"initialPlacement"})):e.push(o.flip(r.flip))),r.shift&&("boolean"==typeof r.shift?e.push(o.shift()):e.push(o.shift(r.shift))),r.size){const t=({availableWidth:e,availableHeight:t})=>{f.value=`${e}px`,m.value=`${t}px`};"boolean"==typeof r.size?e.push(o.size({apply:t})):e.push(o.size({...r.size,apply:t}))}return r.offset&&(e.push(o.offset(Number(r.offset))),["string","number"].includes(typeof r.offset)?e.push(o.offset(Number(r.offset))):e.push(o.offset(r.offset))),r.arrow&&e.push(o.arrow({element:k})),e})),{x:$,y:C,middlewareData:P,placement:O,strategy:T}=o.useFloating(E,w,{whileElementsMounted:(...e)=>o.autoUpdate(...e,{animationFrame:r.strategy===s.fixed}),placement:e.computed((()=>r.placement)),strategy:e.computed((()=>r.strategy)),middleware:B}),N=e.computed((()=>{var e;if(L.value)return;const t=r.triggerWidth&&E.value?`${null==(e=E.value)?void 0:e.offsetWidth}px`:void 0;return{position:T.value,top:`${C.value??0}px`,left:`${$.value??0}px`,maxWidth:t?void 0:f.value,maxHeight:m.value,width:t}})),V=e.computed((()=>O.value.split("-")[0])),A=e.computed((()=>{var e,t,o,l,a;if(L.value)return;const n={[d.top]:d.bottom,[d.right]:d.left,[d.bottom]:d.top,[d.left]:d.right}[V.value];return{left:void 0!==(null==(e=P.value.arrow)?void 0:e.x)?`${null==(t=P.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=P.value.arrow)?void 0:o.y)?`${null==(l=P.value.arrow)?void 0:l.y}px`:void 0,[n]:-((null==(a=k.value)?void 0:a.offsetWidth)??0)/2+"px"}})),_=l.useVModel(r,"modelValue",u),D=e.ref(!1),I=e.computed({get:()=>_.value??D.value,set:e=>{void 0!==_.value?_.value=e:D.value=e}});function R(){I.value=!0}function M(){I.value=!1}function H(){I.value=!I.value}function j(e){E.value=e}n({toggle:H,show:R,hide:M,init:j,customPosition:L}),e.watch(I,(t=>{t&&r.autofocusFirst&&e.nextTick((()=>{const e=Z(w.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),l.onClickOutside(w,(()=>{!r.keepOpen&&I.value&&(I.value=!1)}),{ignore:[E]});const z=e.computed((()=>{var e,t;return(null==(t=null==(e=E.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),U=e.computed((()=>({"aria-controls":v.value,"aria-haspopup":!0,"aria-expanded":I.value}))),{component:K,bus:X}=function({reference:t,id:o,expanded:l,aria:n}){const i=a(),r=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(y,{reference:t,id:o,expanded:l,aria:n,bus:i})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:i,component:r}}({reference:E,id:v,expanded:I,aria:U});X.on("click",H);const{role:J,modifiers:Y}=e.toRefs(r),G=W("vv-dropdown",Y,e.computed((()=>({arrow:r.arrow})))),{focused:Q}=l.useFocusWithin(w);function Z(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}const ee=l.useElementHover(w),{itemRole:te}=function({role:t,...o}){const l=e.computed((()=>t.value===b.listbox?h.option:h.presentation));return e.provide(S,{role:l,...o}),{itemRole:l}}({role:J,expanded:I,focused:Q,hovered:ee});l.onKeyStroke("Escape",(e=>{I.value&&(e.preventDefault(),M())})),l.onKeyStroke("ArrowDown",(t=>{I.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=Z(w.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),l.onKeyStroke("ArrowUp",(t=>{I.value&&Q.value&&(t.preventDefault(),e.nextTick((()=>{if(Q.value){const e=Z(w.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),l.onKeyStroke([" ","Enter"],(e=>{const t=e.target;I.value&&Q.value&&t&&(null==t||t.click())}));const oe={"before-enter":()=>{u(I.value?"beforeExpand":"beforeCollapse"),u("beforeEnter")},"after-leave":()=>{u(I.value?"afterExpand":"afterCollapse"),u("afterLeave")},enter:()=>{u("enter")},"after-enter":()=>{u("afterEnter")},"enter-cancelled":()=>{u("enterCancelled")},"before-leave":()=>{u("beforeLeave")},leave:()=>{u("leave")},"leave-cancelled":()=>{u("leaveCancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(K),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:j,show:R,hide:M,toggle:H,expanded:e.unref(I),aria:e.unref(U)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(oe),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:w,style:e.normalizeStyle(e.unref(N)),class:e.normalizeClass(e.unref(G))},[r.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:k,style:e.normalizeStyle(e.unref(A)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(I)}))),e.createElementVNode("div",e.mergeProps(e.unref(p),{id:e.unref(v),ref_key:"listEl",ref:x,tabindex:e.unref(I)?void 0:-1,role:e.unref(J),"aria-labelledby":e.unref(z),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(te)})))],16,q),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(I)})))],6),[[e.vShow,e.unref(I)]])])),_:3},16,["name"])],64))}});const X=e.defineComponent({name:"VvDropdownItem",props:z,setup(t){const o=t,{role:a,expanded:n}=e.inject(S,{}),i=e.ref(null);!function({expanded:t}){e.provide(w,{role:e.ref(m.menuitem),expanded:t})}({expanded:n});const r=l.useElementHover(i),{focused:u}=l.useFocus(i),{focused:s}=l.useFocusWithin(i);return e.watch(r,(e=>{e&&o.focusOnHover&&(u.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({role:e.unref(a)},{ref_key:"element",ref:i,class:["vv-dropdown__item",{"focus-visible":e.unref(u)||e.unref(s)}]}),[e.renderSlot(t.$slots,"default")],16))}}),J=["title"],Y=e.defineComponent({name:"VvDropdownOption",props:U,setup(t){const o=t,{modifiers:l}=e.toRefs(o),a=W("vv-dropdown-option",l,e.computed((()=>({disabled:o.disabled,selected:o.selected,unselectable:o.unselectable&&o.selected})))),n=e.computed((()=>o.selected?o.unselectable?o.deselectHintLabel:o.selectedHintLabel:o.disabled?"":o.selectHintLabel));return(t,o)=>(e.openBlock(),e.createBlock(X,{class:e.normalizeClass(e.unref(a)),tabindex:t.disabled?-1:0,"aria-selected":t.selected,"aria-disabled":t.disabled,"focus-on-hover":t.focusOnHover},{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default"),e.createElementVNode("span",{class:"vv-dropdown-option__hint",title:e.unref(n)},[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps({disabled:t.disabled,selected:t.selected,unselectable:t.unselectable})),(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)),1)]))],8,J)])),_:3},8,["class","tabindex","aria-selected","aria-disabled","focus-on-hover"]))}}),G="eye-on",Q="eye-off",Z="calendar",ee="time",te="color",oe="close",le="trash",ae={prefix:"normal"};function ne(){return e.inject(g)}const ie=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},ae),setup(t){const o=t,l=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),a=e.ref(!0),i=ne(),{modifiers:r}=e.toRefs(o),u=W("vv-icon",r),s=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),d=e.computed((()=>{const e=o.name??"",t=`@${s.value}:${o.prefix}:${e}`;if(n.iconExists(t))return t;const l=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${s.value}:${t.prefix}:${e}`;return n.iconExists(o)}));return l?`@${s.value}:${l.prefix}:${e}`:e}));function c(e){const t=function(e){let t;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");t=(new e).window}return(t?new t.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),l=(null==t?void 0:t.innerHTML.trim())||"";t&&l&&n.addIcon(`@${s.value}:${o.prefix}:${o.name}`,{body:l,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!n.iconExists(`@${s.value}:${o.prefix}:${o.name}`)&&(a.value=!1,i.fetchIcon(o.src).then((e=>{e&&(c(e),a.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(a)?(e.openBlock(),e.createBlock(e.unref(n.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(l),color:t.color,onLoad:t.onLoad,icon:e.unref(d)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),re={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"},ue={...M,...H,modelValue:[String,Number],type:{type:String,default:re.TEXT,validator:e=>Object.values(re).includes(e)},min:[Number,Date,String],max:[Number,Date,String],step:{type:[String,Number],default:1},pattern:String,multiple:Boolean,iconShowPassword:{type:[String,Object],default:G},iconHidePassword:{type:[String,Object],default:Q},iconClear:{type:[String,Object],default:oe},iconRemoveSuggestion:{type:[String,Object],default:le},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}};function se(t,o){const l=e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),a=e.computed((()=>(null==o?void 0:o.value)===v.before?l.value:void 0)),n=e.computed((()=>(null==o?void 0:o.value)===v.after?l.value:void 0)),i=e.computed((()=>(null==o?void 0:o.value)===d.left?l.value:void 0)),r=e.computed((()=>(null==o?void 0:o.value)===d.right?l.value:void 0)),u=e.computed((()=>(null==o?void 0:o.value)===d.top?l.value:void 0)),s=e.computed((()=>(null==o?void 0:o.value)===d.bottom?l.value:void 0));return{hasIcon:l,hasIconLeft:i,hasIconRight:r,hasIconTop:u,hasIconBottom:s,hasIconBefore:a,hasIconAfter:n}}const de=e.defineComponent({components:{VvIcon:ie},props:{disabled:{type:Boolean,default:!1},label:{type:String,default:"Clear"},icon:{type:[String,Object],default:"close"}},emits:["clear"],setup(t,{emit:o}){const{hasIcon:l}=se(e.computed((()=>t.icon)));return{hasIcon:l,onClick:function(e){null==e||e.stopPropagation(),t.disabled||o("clear")}}},render(){const t=this.hasIcon?e.h(ie,{...this.hasIcon,class:"vv-input-text__icon"}):void 0;return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.label,type:"button",onClick:this.onClick},t)}}),ce=e.defineComponent({components:{VvIcon:ie},props:{disabled:{type:Boolean,default:!1},labelShow:{type:String,default:"Show password"},labelHide:{type:String,default:"Hide password"},iconShow:{type:[String,Object],default:G},iconHide:{type:[String,Object],default:Q}},emits:["toggle-password"],setup(t,{emit:o}){const l=e.ref(!1),a=e.computed((()=>l.value?t.iconHide:t.iconShow)),{hasIcon:n}=se(a);return{active:l,activeIcon:a,hasIcon:n,onClick:function(e){null==e||e.stopPropagation(),t.disabled||(l.value=!l.value,o("toggle-password",l.value))}}},render(){const t=this.hasIcon?e.h(ie,{...this.hasIcon,class:"vv-input-text__icon"}):void 0;return e.h("button",{disabled:this.disabled,class:"vv-input-text__action",ariaLabel:this.active?this.labelHide:this.labelShow,type:"button",onClick:this.onClick},t)}}),ve=e.defineComponent({components:{VvIcon:ie},props:{disabled:{type:Boolean,default:!1},label:{type:String},mode:{type:String,validator:e=>["up","down"].includes(e),default:"up"}},emits:["step-up","step-down"],setup(t,{emit:o}){const l=e.computed((()=>"up"===t.mode));return{isUp:l,onClick:e=>{null==e||e.stopPropagation(),t.disabled||o(l.value?"step-up":"step-down")}}},render(){return e.h("button",{class:["vv-input-text__action vv-input-text__action-chevron",this.isUp&&"vv-input-text__action-chevron-up"],disabled:this.disabled,ariaLabel:this.label,type:"button",onClick:this.onClick})}});function pe(t,o){return{name:"VvInputTextActions",components:{VvIcon:ie,VvInputPasswordAction:ce,VvInputStepAction:ve,VvInputClearAction:de},setup:()=>({isDisabled:e.computed((()=>o.disabled||o.readonly)),labelStepUp:o.labelStepUp,labelStepDown:o.labelStepDown,labelShowPassword:o.labelShowPassword,labelHidePassword:o.labelHidePassword,labelClear:o.labelClear,iconShowPassword:o.iconShowPassword,iconHidePassword:o.iconHidePassword}),render(){let l=null;switch(t){case re.SEARCH:{const{onClear:t}=this.$attrs;l=[e.h(de,{disabled:this.isDisabled,label:this.labelShowPassword,onClear:t})];break}case re.PASSWORD:{const{onTogglePassword:t}=this.$attrs;l=[e.h(ce,{disabled:this.isDisabled,onTogglePassword:t,labelShow:this.labelShowPassword,labelHide:this.labelHidePassword,iconShow:this.iconShowPassword,iconHide:this.iconHidePassword})];break}case re.NUMBER:{const{onStepUp:t,onStepDown:a}=this.$attrs;l=[e.h(ve,{mode:"up",disabled:this.isDisabled||void 0!==o.max&&o.modelValue===o.max,label:this.labelStepUp,onStepUp:t,onStepDown:a}),e.h(ve,{mode:"down",disabled:this.isDisabled||void 0!==o.min&&o.modelValue===o.min,label:this.labelStepDown,onStepUp:t,onStepDown:a})];break}}return Array.isArray(l)?e.h("div",{class:"vv-input-text__actions-group"},l):l}}}const fe=["for"],me={key:0,class:"vv-input-text__input-before"},be=["id"],he={key:1,class:"vv-input-text__unit"},ge={key:5,class:"vv-input-text__input-after"},ye={key:6,class:"vv-input-text__limit"},Se={class:"flex-1"},we=["title","onClick"];return e.defineComponent({name:"VvInputText",props:ue,emits:["update:modelValue","update:masked","accept","accept:typed","accept:masked","accept:unmasked","complete","complete:typed","complete:masked","complete:unmasked","focus","blur","keyup","keydown","keypress"],setup(o,{expose:a,emit:n}){const s=o,d=n,c=e.useSlots(),v=function(t,o,l){const a=ne(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[t]))return a.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return l;const e=n.value,t=o,a=l;return Object.keys(t).reduce(((o,l)=>{const n=a[l];if(o[l]=n,l in e){if(Array.isArray(t[l])){const a=t[l];a.length&&a[0]===n&&(o[l]=e[l])}if("function"==typeof t[l]&&(0,t[l])()===n&&(o[l]=e[l]),"object"==typeof t[l]){let a=t[l].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(o[l]=e[l]):a===n&&(o[l]=e[l])}}return o}),{})}))}("VvInputText",ue,s),{count:p,debounce:f,icon:m,iconPosition:b,iconRemoveSuggestion:h,id:g,invalid:y,label:S,loading:w,maxlength:k,minlength:x,modelValue:E,step:L,storageKey:B,storageType:$,type:C,valid:P}=e.toRefs(s),O=F(g),T=e.computed((()=>`${O.value}-hint`)),N=e.computed((()=>s.floating&&i(s.placeholder)?" ":s.placeholder)),V=function(t,o,l=0,{getter:a=e=>e,setter:n=e=>e}={}){let i;return"string"==typeof l&&(l=Number.parseInt(l)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{o("update:modelValue",n(e))}),l)}})}(E,d,(null==f?void 0:f.value)??0),A=/^-0?[.,]?[0*]?$/,_=e.ref(!1),{el:D,mask:I,typed:R,masked:M,unmasked:H}=t.useIMask(e.computed((()=>{if(!s.iMask)return{mask:/./};if(s.iMask.mask===Number){const e={...s.iMask};return s.min&&(e.min=Number(s.min)),s.max&&(e.max=Number(s.max)),e}return s.iMask})),{emit:d,onAccept:()=>{if(_.value){if(d("update:masked",M.value),C.value===re.NUMBER){if(/^-$|^$/.test(H.value)){if(null===V.value||void 0===V.value)return;return void(V.value=void 0)}return A.test(H.value)?void(V.value=0):"number"!=typeof R.value?void(V.value=Number(R.value)):void(V.value=R.value)}if(C.value===re.DATE){if(D.value instanceof HTMLInputElement&&"date"===D.value.type)return void(V.value=D.value.value);let e=R.value;if(null===e||""===e){if(!V.value)return;return void(V.value="")}return e instanceof Date||(e=new Date(e)),void(V.value=`${e.getFullYear()}-${`0${e.getMonth()+1}`.slice(-2)}-${`0${e.getDate()}`.slice(-2)}`)}if(C.value===re.DATETIME_LOCAL){if(D.value instanceof HTMLInputElement&&"datetime-local"===D.value.type)return void(V.value=D.value.value);let e=R.value;if(null===e||""===e){if(!V.value)return;return void(V.value="")}return R.value instanceof Date||(e=new Date(e)),void(V.value=`${e.getFullYear()}-${`0${e.getMonth()+1}`.slice(-2)}-${`0${e.getDate()}`.slice(-2)}T${`0${e.getHours()}`.slice(-2)}:${`0${e.getMinutes()}`.slice(-2)}`)}(V.value||H.value)&&(V.value=H.value)}}});function j(e){var t;if(void 0===e)return R.value="",void(H.value="");(null==(t=s.iMask)?void 0:t.mask)!==Date?C.value===re.NUMBER&&A.test(H.value)&&0===e||(R.value=e,H.value=`${R.value}`):R.value=new Date(e)}e.onMounted((()=>{I.value&&(_.value=!0,j(s.modelValue))})),e.watch((()=>s.modelValue),(e=>{I.value&&j(e)})),e.watch((()=>s.masked),(e=>{M.value=e??""}));const z=D,U=e.useTemplateRef("innerEl"),q=e.useTemplateRef("wrapperEl"),X=e.useTemplateRef("dropdownEl");a({$inner:U});const{focused:J}=function(t,o){const{focused:a}=l.useFocus(t);return e.watch(a,(l=>{o(l?"focus":"blur",e.unref(t))})),{focused:a}}(z,d),G=e.computed((()=>J.value&&!s.disabled&&!s.readonly));e.watch(G,(e=>{var t;e&&v.value.selectOnFocus&&z.value&&z.value.select(),e?null==(t=X.value)||t.show():setTimeout((()=>{if(Ne.value&&Ae.value){const e=s.maxSuggestions-1;Ae.value.size>e&&!Ae.value.has(V.value)&&(Ae.value=new Set([...Ae.value].slice(Ae.value.size-e))),Ae.value.add(V.value)}}),300)}));const Q=l.useElementVisibility(z);e.watch(Q,(e=>{e&&s.autofocus&&!s.disabled&&!s.readonly&&(J.value=!0)}));const oe=e.ref(!1),le=e.computed((()=>s.type===re.PASSWORD));function ae(){oe.value=!oe.value}const de=e.computed((()=>s.type===re.TIME||s.type===re.DATETIME_LOCAL||s.type===re.DATE||s.type===re.WEEK||s.type===re.MONTH)),ce=e.computed((()=>s.type===re.NUMBER));function ve(){if(Oe.value){if(s.iMask)return void(R.value=Number(R.value)+Number((null==L?void 0:L.value)??1));z.value.stepUp(),V.value=Number(e.unref(z).value)}}function ke(){if(Oe.value){if(s.iMask)return void(R.value=Number(R.value)-Number((null==L?void 0:L.value)??1));z.value.stepDown(),V.value=Number(e.unref(z).value)}}const xe=e.computed((()=>s.type===re.SEARCH));function Ee(){V.value=""}const{hasIconBefore:Le,hasIconAfter:Be}=se(m,b),$e=e.computed((()=>{if(void 0!==Be.value)return Be.value;switch(s.type){case re.COLOR:return{name:te};case re.DATE:case re.DATETIME_LOCAL:case re.WEEK:case re.MONTH:return{name:Z};case re.TIME:return{name:ee}}})),{hasIcon:Ce}=se(h),{formatted:Pe}=function(t,o){const l=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==o?void 0:o.lowerLimit)&&l.value<(null==o?void 0:o.lowerLimit)?l.value-o.lowerLimit:void 0!==(null==o?void 0:o.upperLimit)&&l.value<(null==o?void 0:o.upperLimit)?o.upperLimit-l.value:0)),n=e.computed((()=>{if(!1===(null==o?void 0:o.mode))return"";if("limit"===(null==o?void 0:o.mode)&&(null==o?void 0:o.upperLimit))return`${l.value} / ${o.lowerLimit?`${o.lowerLimit}-`:""}${o.upperLimit}`;if("countdown"===(null==o?void 0:o.mode)){if(0===a.value)return;return a}return l.value}));return{length:l,gap:a,formatted:n}}(V,{mode:p.value,upperLimit:Number(null==k?void 0:k.value),lowerLimit:Number(null==x?void 0:x.value)}),Oe=e.computed((()=>!s.disabled&&!s.readonly)),Te=e.computed((()=>Oe.value?s.tabindex:-1)),Ne=e.computed((()=>!i(E))),Ve=e.computed((()=>!0===y.value||!0!==P.value&&void 0)),Ae=function(t,o=u.local,a){const n=e.ref();let i;return a&&(n.value=a),t&&e.watch(t,((t,a)=>{const r=e.unref(o)===u.session?sessionStorage:localStorage;a&&a!==t&&r.removeItem(a),i=t?l.useStorage(t,(null==i?void 0:i.value)??n.value,r):void 0}),{immediate:!0}),e.isRef(o)&&e.watch(o,((e,o)=>{if(null==t?void 0:t.value){if(e){const o=e===u.session?sessionStorage:localStorage;i=l.useStorage(t.value,(null==i?void 0:i.value)??n.value,o)}o&&o!==e&&(o===u.session?sessionStorage:localStorage).removeItem(t.value)}})),e.computed({get:()=>(null==i?void 0:i.value)??n.value,set:e=>{i?i.value=e:n.value=e}})}(B,$,new Set),_e=e.computed((()=>Ae.value?[...Ae.value].filter((e=>i(V.value)||`${e}`.toLowerCase().includes(`${V.value}`.toLowerCase())&&e!==V.value)).reverse():[])),De=e.computed((()=>(null==B?void 0:B.value)&&Ae.value&&Ae.value.size>0));const{modifiers:Ie}=e.toRefs(s),Re=W("vv-input-text",Ie,e.computed((()=>({valid:P.value,invalid:y.value,loading:w.value,disabled:s.disabled,readonly:s.readonly,"icon-before":!!Le.value,"icon-after":!!$e.value,floating:s.floating&&!i(s.label),dirty:Ne.value,focus:G.value,"auto-width":s.autoWidth})))),Me=e.computed((()=>{const e=le.value&&oe.value?re.TEXT:!de.value||Ne.value||J.value?s.iMask?re.TEXT:s.type:re.TEXT,t={type:e,name:s.name,tabindex:Te.value,disabled:s.disabled,readonly:s.readonly,required:s.required,autocomplete:s.autocomplete,"aria-invalid":Ve.value,"aria-describedby":ze.value?T.value:void 0,"aria-errormessage":Ue.value?T.value:void 0};if(e===re.DATE||e===re.MONTH||e===re.WEEK||e===re.TIME||e===re.DATETIME_LOCAL||e===re.NUMBER){let o=s.max;e!==re.DATE||o||(o="9999-12-31"),t.step=s.step,t.max=void 0!==o?String(o):void 0,t.min=void 0!==s.min?String(s.min):void 0}return e!==re.TEXT&&e!==re.SEARCH&&e!==re.URL&&e!==re.TEL&&e!==re.EMAIL&&e!==re.PASSWORD&&e!==re.NUMBER||(t.placeholder=N.value),e!==re.TEXT&&e!==re.SEARCH&&e!==re.URL&&e!==re.TEL&&e!==re.EMAIL&&e!==re.PASSWORD||(t.minlength=s.minlength,t.maxlength=s.maxlength,t.pattern=s.pattern),e===re.EMAIL&&(t.multiple=s.multiple),t})),He=e.computed((()=>({valid:s.valid,invalid:s.invalid,modelValue:s.modelValue,togglePassword:ae,stepUp:ve,stepDown:ke,clear:Ee}))),{HintSlot:je,hasHintLabelOrSlot:ze,hasInvalidLabelOrSlot:Ue,hintSlotScope:Fe}=function(t,o){const l=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>r(l.value.invalidLabel))),n=e.computed((()=>r(l.value.validLabel))),i=e.computed((()=>l.value.loadingLabel)),u=e.computed((()=>l.value.hintLabel)),s=e.computed((()=>Boolean(l.value.loading&&(o.loading||i.value)))),d=e.computed((()=>!s.value&&Boolean(l.value.invalid&&(o.invalid||a.value)))),c=e.computed((()=>!s.value&&!d.value&&Boolean(l.value.valid&&(o.valid||n.value)))),v=e.computed((()=>!s.value&&!d.value&&!c.value&&Boolean(o.hint||u.value))),p=e.computed((()=>d.value||c.value||s.value||v.value)),f=e.computed((()=>({modelValue:l.value.modelValue,valid:l.value.valid,invalid:l.value.invalid,loading:l.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:p,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:u,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hasHintLabelOrSlot:v}),render(){var t,o,l,a,n,i,r,u;if(this.isVisible){let s;return this.hasInvalidLabelOrSlot&&(s="alert"),this.hasValidLabelOrSlot&&(s="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:s},(null==(o=(t=this.$slots).loading)?void 0:o.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:s},(null==(a=(l=this.$slots).invalid)?void 0:a.call(l))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:s},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:s},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:c,hasLoadingLabelOrSlot:s,hintSlotScope:f,HintSlot:m}}(v,c),We=pe(re.PASSWORD,s),qe=pe(re.NUMBER,s),Ke=pe(re.SEARCH,s);function Xe(){Oe.value&&(J.value=!0)}const Je=e.computed((()=>{if(s.autoWidth)return{width:void 0!==V.value?`${String(V.value).length+1}ch`:void 0}}));function Ye(e){switch(e.code){case"ArrowUp":ce.value&&(ve(),e.preventDefault());break;case"ArrowDown":ce.value&&(ke(),e.preventDefault())}d("keydown",e)}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Re))},[e.unref(S)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(O),class:"vv-input-text__label"},e.toDisplayString(e.unref(S)),9,fe)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"wrapperEl",ref:q,class:"vv-input-text__wrapper"},[t.$slots.before?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(He))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"innerEl",ref:U,class:"vv-input-text__inner",onClick:e.withModifiers(Xe,["stop"])},[e.unref(Le)?(e.openBlock(),e.createBlock(ie,e.mergeProps({key:0},e.unref(Le),{class:"vv-input-text__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(O),ref_key:"inputEl",ref:z},e.unref(Me),{style:e.unref(Je),onKeyup:o[0]||(o[0]=e=>d("keyup",e)),onKeydown:Ye,onKeypress:o[1]||(o[1]=e=>d("keypress",e))}),null,16,be),(t.unit||t.$slots.unit)&&e.unref(Ne)?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(He))),(()=>[e.createTextVNode(e.toDisplayString(t.unit),1)]))])):e.createCommentVNode("v-if",!0)],512),e.unref($e)?(e.openBlock(),e.createBlock(ie,e.mergeProps({key:1},e.unref($e),{class:"vv-input-text__icon vv-input-text__icon-after"}),null,16)):e.unref(le)&&!t.hideActions&&e.unref(Oe)?(e.openBlock(),e.createBlock(e.unref(We),{key:2,onTogglePassword:ae})):e.unref(ce)&&!t.hideActions&&e.unref(Oe)?(e.openBlock(),e.createBlock(e.unref(qe),{key:3,onStepUp:ve,onStepDown:ke})):e.unref(xe)&&!t.hideActions&&e.unref(Oe)?(e.openBlock(),e.createBlock(e.unref(Ke),{key:4,onClear:Ee})):e.createCommentVNode("v-if",!0),t.$slots.after?(e.openBlock(),e.createElementBlock("div",ge,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(He))))])):e.createCommentVNode("v-if",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("span",ye,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(He))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(Pe)),1)]))])):e.createCommentVNode("v-if",!0)],512),e.createVNode(e.unref(je),{id:e.unref(T),class:"vv-input-text__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(Fe))))])),key:"3"}:void 0]),1032,["id"]),e.unref(De)?(e.openBlock(),e.createBlock(K,{key:1,ref_key:"dropdownEl",ref:X,reference:e.unref(q),"autofocus-first":!1,"trigger-width":!0},{items:e.withCtx((()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_e),(o=>(e.openBlock(),e.createBlock(Y,{key:o,onClick:e.withModifiers((e=>{return t=o,V.value=t,void(null==(l=X.value)||l.hide());var t,l}),["stop"])},{default:e.withCtx((()=>[e.createElementVNode("div",Se,[e.renderSlot(t.$slots,"suggestion",e.mergeProps({ref_for:!0},{value:o}),(()=>[e.createTextVNode(e.toDisplayString(o),1)]))]),e.unref(Ae)&&e.unref(Ce)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",tabindex:"-1",class:"cursor-pointer",title:t.labelRemoveSuggestion,onClick:e.withModifiers((e=>{return t=o,void(null==(l=Ae.value)||l.delete(t));var t,l}),["stop"])},[e.createVNode(ie,e.mergeProps({ref_for:!0},e.unref(Ce)),null,16)],8,we)):e.createCommentVNode("v-if",!0)])),_:2},1032,["onClick"])))),128))])),_:3},8,["reference"])):e.createCommentVNode("v-if",!0)],2))}})}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
modelValue: (StringConstructor | NumberConstructor)[];
|
|
3
3
|
type: {
|
|
4
|
-
type:
|
|
4
|
+
type: PropType<import("../VvInputText").InputType>;
|
|
5
5
|
default: "text";
|
|
6
6
|
validator: (value: import("../VvInputText").InputType) => boolean;
|
|
7
7
|
};
|
|
@@ -14,19 +14,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
14
14
|
pattern: StringConstructor;
|
|
15
15
|
multiple: BooleanConstructor;
|
|
16
16
|
iconShowPassword: {
|
|
17
|
-
type:
|
|
17
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
18
18
|
default: "eye-on";
|
|
19
19
|
};
|
|
20
20
|
iconHidePassword: {
|
|
21
|
-
type:
|
|
21
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
22
22
|
default: "eye-off";
|
|
23
23
|
};
|
|
24
24
|
iconClear: {
|
|
25
|
-
type:
|
|
25
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
26
26
|
default: "close";
|
|
27
27
|
};
|
|
28
28
|
iconRemoveSuggestion: {
|
|
29
|
-
type:
|
|
29
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
30
30
|
default: "trash";
|
|
31
31
|
};
|
|
32
32
|
labelStepUp: {
|
|
@@ -54,7 +54,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
54
54
|
default: string;
|
|
55
55
|
};
|
|
56
56
|
iMask: {
|
|
57
|
-
type:
|
|
57
|
+
type: PropType<import("imask").FactoryOpts>;
|
|
58
58
|
default: undefined;
|
|
59
59
|
};
|
|
60
60
|
masked: {
|
|
@@ -81,7 +81,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
81
81
|
default: number;
|
|
82
82
|
};
|
|
83
83
|
storageType: {
|
|
84
|
-
type:
|
|
84
|
+
type: PropType<`${import("../../constants").StorageType}`>;
|
|
85
85
|
default: import("../../constants").StorageType;
|
|
86
86
|
validator: (value: import("../../constants").StorageType) => boolean;
|
|
87
87
|
};
|
|
@@ -111,11 +111,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
111
111
|
default: boolean;
|
|
112
112
|
};
|
|
113
113
|
icon: {
|
|
114
|
-
type:
|
|
114
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
115
115
|
default: undefined;
|
|
116
116
|
};
|
|
117
117
|
iconPosition: {
|
|
118
|
-
type:
|
|
118
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
119
119
|
default: import("../../constants").Position;
|
|
120
120
|
validation: (value: import("../../constants").Position) => boolean;
|
|
121
121
|
};
|
|
@@ -129,7 +129,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
129
129
|
validator: (value: string) => boolean;
|
|
130
130
|
};
|
|
131
131
|
modifiers: {
|
|
132
|
-
type:
|
|
132
|
+
type: PropType<string | string[]>;
|
|
133
133
|
default: undefined;
|
|
134
134
|
};
|
|
135
135
|
loading: {
|
|
@@ -185,14 +185,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
185
185
|
required: boolean;
|
|
186
186
|
};
|
|
187
187
|
id: (StringConstructor | NumberConstructor)[];
|
|
188
|
-
}
|
|
189
|
-
$inner:
|
|
190
|
-
},
|
|
191
|
-
[x: string]: (...args: any[]) => void;
|
|
192
|
-
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
188
|
+
}>, {
|
|
189
|
+
$inner: Readonly<import("vue").ShallowRef<HTMLInputElement | null>>;
|
|
190
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
193
191
|
modelValue: (StringConstructor | NumberConstructor)[];
|
|
194
192
|
type: {
|
|
195
|
-
type:
|
|
193
|
+
type: PropType<import("../VvInputText").InputType>;
|
|
196
194
|
default: "text";
|
|
197
195
|
validator: (value: import("../VvInputText").InputType) => boolean;
|
|
198
196
|
};
|
|
@@ -205,19 +203,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
205
203
|
pattern: StringConstructor;
|
|
206
204
|
multiple: BooleanConstructor;
|
|
207
205
|
iconShowPassword: {
|
|
208
|
-
type:
|
|
206
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
209
207
|
default: "eye-on";
|
|
210
208
|
};
|
|
211
209
|
iconHidePassword: {
|
|
212
|
-
type:
|
|
210
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
213
211
|
default: "eye-off";
|
|
214
212
|
};
|
|
215
213
|
iconClear: {
|
|
216
|
-
type:
|
|
214
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
217
215
|
default: "close";
|
|
218
216
|
};
|
|
219
217
|
iconRemoveSuggestion: {
|
|
220
|
-
type:
|
|
218
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
221
219
|
default: "trash";
|
|
222
220
|
};
|
|
223
221
|
labelStepUp: {
|
|
@@ -245,7 +243,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
245
243
|
default: string;
|
|
246
244
|
};
|
|
247
245
|
iMask: {
|
|
248
|
-
type:
|
|
246
|
+
type: PropType<import("imask").FactoryOpts>;
|
|
249
247
|
default: undefined;
|
|
250
248
|
};
|
|
251
249
|
masked: {
|
|
@@ -272,7 +270,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
272
270
|
default: number;
|
|
273
271
|
};
|
|
274
272
|
storageType: {
|
|
275
|
-
type:
|
|
273
|
+
type: PropType<`${import("../../constants").StorageType}`>;
|
|
276
274
|
default: import("../../constants").StorageType;
|
|
277
275
|
validator: (value: import("../../constants").StorageType) => boolean;
|
|
278
276
|
};
|
|
@@ -302,11 +300,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
302
300
|
default: boolean;
|
|
303
301
|
};
|
|
304
302
|
icon: {
|
|
305
|
-
type:
|
|
303
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
306
304
|
default: undefined;
|
|
307
305
|
};
|
|
308
306
|
iconPosition: {
|
|
309
|
-
type:
|
|
307
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
310
308
|
default: import("../../constants").Position;
|
|
311
309
|
validation: (value: import("../../constants").Position) => boolean;
|
|
312
310
|
};
|
|
@@ -320,7 +318,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
320
318
|
validator: (value: string) => boolean;
|
|
321
319
|
};
|
|
322
320
|
modifiers: {
|
|
323
|
-
type:
|
|
321
|
+
type: PropType<string | string[]>;
|
|
324
322
|
default: undefined;
|
|
325
323
|
};
|
|
326
324
|
loading: {
|
|
@@ -376,25 +374,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
376
374
|
required: boolean;
|
|
377
375
|
};
|
|
378
376
|
id: (StringConstructor | NumberConstructor)[];
|
|
379
|
-
}
|
|
377
|
+
}>> & Readonly<{}>, {
|
|
380
378
|
floating: boolean;
|
|
381
379
|
label: string | number;
|
|
382
380
|
disabled: boolean;
|
|
383
381
|
modifiers: string | string[];
|
|
384
382
|
type: import("../VvInputText").InputType;
|
|
385
|
-
readonly: boolean;
|
|
386
383
|
storageType: "local" | "session";
|
|
387
|
-
required: boolean;
|
|
388
384
|
icon: string | import("../VvIcon").VvIconProps;
|
|
389
385
|
iconPosition: "before" | "after";
|
|
386
|
+
required: boolean;
|
|
390
387
|
loading: boolean;
|
|
391
388
|
loadingLabel: string;
|
|
392
389
|
multiple: boolean;
|
|
390
|
+
readonly: boolean;
|
|
393
391
|
hintLabel: string;
|
|
394
|
-
valid: boolean;
|
|
395
|
-
validLabel: string | unknown[];
|
|
396
392
|
invalid: boolean;
|
|
397
393
|
invalidLabel: string | unknown[];
|
|
394
|
+
valid: boolean;
|
|
395
|
+
validLabel: string | unknown[];
|
|
398
396
|
tabindex: string | number;
|
|
399
397
|
placeholder: string;
|
|
400
398
|
autocomplete: string;
|
|
@@ -420,7 +418,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
420
418
|
maxlength: string | number;
|
|
421
419
|
debounce: string | number;
|
|
422
420
|
count: string | boolean;
|
|
423
|
-
}, {}>, {
|
|
421
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
424
422
|
before?(_: {
|
|
425
423
|
valid: boolean;
|
|
426
424
|
invalid: boolean;
|
|
@@ -286,6 +286,11 @@ const NavProps = {
|
|
|
286
286
|
},
|
|
287
287
|
storageKey: String
|
|
288
288
|
});
|
|
289
|
+
const VvNavProps = {
|
|
290
|
+
...ModifiersProps,
|
|
291
|
+
...NavProps
|
|
292
|
+
};
|
|
293
|
+
const VvNavEvents = ["click"];
|
|
289
294
|
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
290
295
|
const VvActionProps = ActionProps;
|
|
291
296
|
function useVolver() {
|
|
@@ -463,11 +468,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
463
468
|
};
|
|
464
469
|
}
|
|
465
470
|
});
|
|
466
|
-
const VvNavProps = {
|
|
467
|
-
...ModifiersProps,
|
|
468
|
-
...NavProps
|
|
469
|
-
};
|
|
470
|
-
const VvNavEvents = ["click"];
|
|
471
471
|
function useModifiers(prefix, modifiers, others) {
|
|
472
472
|
return computed(() => {
|
|
473
473
|
const toReturn = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvNav=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),u=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},f={pressed:{type:Boolean,default:!1}},p={label:{type:[String,Number],default:void 0}},m={modifiers:{type:[String,Array],default:void 0}};n.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...p,...f,...c,...v,...s,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:l.button}},g={items:{type:Array,default:()=>[]}};t.local;const y=b;const
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvNav=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),u=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},f={pressed:{type:Boolean,default:!1}},p={label:{type:[String,Number],default:void 0}},m={modifiers:{type:[String,Array],default:void 0}};n.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...p,...f,...c,...v,...s,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:l.button}},g={items:{type:Array,default:()=>[]}};t.local;const y={...m,...g},k=b;const B=e.defineComponent({name:"VvAction",props:k,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,s=n,d=e.getCurrentInstance(),c=e.inject(a),v=e.ref(null);o({$el:v});const{reference:f,bus:p,aria:m,expanded:b}=e.inject(i,{});e.watch((()=>v.value),(e=>{f&&(f.value=e)}));const g=e.computed((()=>r.pressed||(null==b?void 0:b.value))),{role:y}=e.inject(u,{}),k=e.computed((()=>{switch(!0){case r.disabled:return l.button;case void 0!==r.to:return(null==c?void 0:c.nuxt)?l.nuxtLink:l.routerLink;case void 0!==r.href:return l.a;default:return r.defaultTag}})),B=e.computed((()=>{const e={...null==m?void 0:m.value,ariaPressed:!!g.value||void 0,ariaLabel:r.ariaLabel,role:null==y?void 0:y.value};switch(k.value){case l.a:return{...e,href:r.href,target:r.target,rel:r.rel};case l.routerLink:case l.nuxtLink:return{...e,to:r.to,target:r.target};case l.button:return{...e,type:r.type,disabled:r.disabled};default:return e}}));function h(e){var t;r.disabled?e.preventDefault():(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onClick)?s("click",e):null==p||p.emit("click",e)}function x(e){var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseover)?s("mouseover",e):null==p||p.emit("mouseover",e)}function S(e){var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseleave)?s("mouseleave",e):null==p||p.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(k)),e.mergeProps(e.unref(B),{ref_key:"element",ref:v,class:{active:t.active,pressed:e.unref(g),disabled:t.disabled,current:t.current},onClickPassive:h,onMouseoverPassive:x,onMouseleavePassive:S}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),h={class:"vv-nav__item",role:"presentation"},x=e.defineComponent({name:"VvNavItem",inheritAttrs:!1,setup:t=>(t,o)=>(e.openBlock(),e.createElementBlock("li",h,[e.createVNode(B,e.mergeProps(t.$attrs,{class:"vv-nav__item-label",role:"menuitem"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},16)]))});return e.defineComponent({name:"VvNav",props:y,emits:["click"],setup(t,{emit:o}){const n=t,r=o,{modifiers:l}=e.toRefs(n);function a(e){var t;const o=e.target;if(null==o?void 0:o.dataset.index){const e=Number.parseInt(o.dataset.index),l=null==(t=n.items)?void 0:t[e];if(!l||(null==l?void 0:l.disabled))return;r("click",l)}}const i=function(t,o){return e.computed((()=>{const e={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((o=>{o&&(e[`${t}--${o}`]=!0)})),e}))}("vv-nav",l);return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i))},[e.createElementVNode("ul",{class:"vv-nav__menu",role:"menu",onClick:e.withModifiers(a,["stop"])},[e.renderSlot(t.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(({on:o={},data:n,...r},l)=>(e.openBlock(),e.createBlock(x,e.mergeProps({key:l,"data-index":l,ref_for:!0},r,e.toHandlers(o)),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:r,data:n,index:l}))])),_:2},1040,["data-index"])))),128))]))])],2))}})}));
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
items: {
|
|
3
|
-
type:
|
|
3
|
+
type: PropType<import("../../index.js").NavItem[]>;
|
|
4
4
|
default: () => never[];
|
|
5
5
|
};
|
|
6
6
|
modifiers: {
|
|
7
|
-
type:
|
|
7
|
+
type: PropType<string | string[]>;
|
|
8
8
|
default: undefined;
|
|
9
9
|
};
|
|
10
|
-
}
|
|
11
|
-
[x: string]: (...args: any[]) => void;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
13
11
|
items: {
|
|
14
|
-
type:
|
|
12
|
+
type: PropType<import("../../index.js").NavItem[]>;
|
|
15
13
|
default: () => never[];
|
|
16
14
|
};
|
|
17
15
|
modifiers: {
|
|
18
|
-
type:
|
|
16
|
+
type: PropType<string | string[]>;
|
|
19
17
|
default: undefined;
|
|
20
18
|
};
|
|
21
|
-
}
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
22
20
|
modifiers: string | string[];
|
|
23
21
|
items: import("../../index.js").NavItem[];
|
|
24
|
-
}, {}>, {
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLElement>, {
|
|
25
23
|
default?(_: {}): any;
|
|
26
24
|
item?(_: {
|
|
27
25
|
item: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
2
2
|
default?(_: {}): any;
|
|
3
3
|
}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const VvNavProps: {
|
|
2
2
|
items: {
|
|
3
|
-
type:
|
|
3
|
+
type: PropType<import("../..").NavItem[]>;
|
|
4
4
|
default: () => never[];
|
|
5
5
|
};
|
|
6
6
|
modifiers: {
|
|
7
|
-
type:
|
|
7
|
+
type: PropType<string | string[]>;
|
|
8
8
|
default: undefined;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
value: {
|
|
3
3
|
type: (StringConstructor | NumberConstructor)[];
|
|
4
4
|
default: undefined;
|
|
@@ -11,10 +11,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
required: boolean;
|
|
12
12
|
};
|
|
13
13
|
modifiers: {
|
|
14
|
-
type:
|
|
14
|
+
type: PropType<string | string[]>;
|
|
15
15
|
default: undefined;
|
|
16
16
|
};
|
|
17
|
-
}
|
|
17
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
18
|
value: {
|
|
19
19
|
type: (StringConstructor | NumberConstructor)[];
|
|
20
20
|
default: undefined;
|
|
@@ -27,11 +27,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
required: boolean;
|
|
28
28
|
};
|
|
29
29
|
modifiers: {
|
|
30
|
-
type:
|
|
30
|
+
type: PropType<string | string[]>;
|
|
31
31
|
default: undefined;
|
|
32
32
|
};
|
|
33
|
-
}
|
|
33
|
+
}>> & Readonly<{}>, {
|
|
34
34
|
value: string | number;
|
|
35
35
|
modifiers: string | string[];
|
|
36
|
-
}, {}>;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLProgressElement>;
|
|
37
37
|
export default _default;
|