@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.30
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/LICENSE +1 -1
- package/README.md +106 -10
- package/auto-imports.d.ts +7 -2
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +22 -15
- package/dist/.storybook/main.d.ts +3 -0
- package/dist/.storybook/preview.d.ts +89 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +78 -27
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +204 -171
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +118 -48
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.es.js +78 -28
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +276 -60
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +291 -252
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.es.js +86 -36
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -120
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.es.js +140 -153
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +138 -71
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +23 -96
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputText/VvInputText.es.js +1237 -324
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvNav/VvNav.es.js +135 -56
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +72 -26
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +160 -103
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.es.js +251 -238
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvTab/VvTab.es.js +191 -75
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +3534 -1650
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +92 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/directives/index.es.js +99 -43
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +97 -38
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +267 -267
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +90 -16
- package/dist/index.umd.js +1 -1
- package/dist/resolvers/unplugin.es.js +87 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/src/components/VvAccordion/VvAccordion.vue.d.ts +194 -0
- package/dist/{components → src/components}/VvAccordion/index.d.ts +8 -9
- package/dist/src/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +92 -0
- package/dist/{components → src/components}/VvAccordionGroup/index.d.ts +14 -6
- package/dist/{components → src/components}/VvAction/VvAction.vue.d.ts +57 -22
- package/dist/{components → src/components}/VvAction/index.d.ts +25 -9
- package/dist/{components → src/components}/VvAlert/VvAlert.vue.d.ts +24 -14
- package/dist/{components → src/components}/VvAlert/index.d.ts +17 -9
- package/dist/{components → src/components}/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
- package/dist/{components → src/components}/VvAlertGroup/index.d.ts +6 -14
- package/dist/src/components/VvAvatar/VvAvatar.vue.d.ts +23 -0
- package/dist/{components → src/components}/VvAvatar/index.d.ts +4 -1
- package/dist/{components → src/components}/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
- package/dist/{components → src/components}/VvAvatarGroup/index.d.ts +4 -1
- package/dist/{components → src/components}/VvBadge/VvBadge.vue.d.ts +12 -4
- package/dist/src/components/VvBadge/index.d.ts +7 -0
- package/dist/src/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +38 -0
- package/dist/src/components/VvBreadcrumb/index.d.ts +8 -0
- package/dist/{components → src/components}/VvButton/VvButton.vue.d.ts +94 -40
- package/dist/{components → src/components}/VvButton/index.d.ts +51 -29
- package/dist/{components → src/components}/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
- package/dist/{components → src/components}/VvButtonGroup/index.d.ts +8 -2
- package/dist/{components → src/components}/VvCard/VvCard.vue.d.ts +12 -4
- package/dist/src/components/VvCard/index.d.ts +7 -0
- package/dist/src/components/VvCheckbox/VvCheckbox.vue.d.ts +184 -0
- package/dist/{components → src/components}/VvCheckbox/index.d.ts +47 -14
- package/dist/{components → src/components}/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
- package/dist/src/components/VvCheckboxGroup/index.d.ts +75 -0
- package/dist/{components → src/components}/VvCombobox/VvCombobox.vue.d.ts +171 -104
- package/dist/{components → src/components}/VvCombobox/index.d.ts +62 -26
- package/dist/{components → src/components}/VvDialog/VvDialog.vue.d.ts +4 -4
- package/dist/{components → src/components}/VvDropdown/VvDropdown.vue.d.ts +101 -75
- package/dist/src/components/VvDropdown/VvDropdownAction.vue.d.ts +114 -0
- package/dist/src/components/VvDropdown/VvDropdownItem.vue.d.ts +21 -0
- package/dist/src/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +14 -0
- package/dist/{components → src/components}/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
- package/dist/{components → src/components}/VvDropdown/index.d.ts +52 -10
- package/dist/src/components/VvIcon/VvIcon.vue.d.ts +26 -0
- package/dist/{components → src/components}/VvIcon/index.d.ts +33 -48
- package/dist/src/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
- package/dist/src/components/VvInputFile/index.d.ts +200 -0
- package/dist/{components → src/components}/VvInputText/VvInputClearAction.d.ts +7 -5
- package/dist/{components → src/components}/VvInputText/VvInputPasswordAction.d.ts +10 -8
- package/dist/{components → src/components}/VvInputText/VvInputStepAction.d.ts +2 -2
- package/dist/{components → src/components}/VvInputText/VvInputText.vue.d.ts +207 -57
- package/dist/{components → src/components}/VvInputText/index.d.ts +99 -29
- package/dist/src/components/VvNav/VvNav.vue.d.ts +48 -0
- package/dist/{components → src/components}/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/src/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
- package/dist/src/components/VvNav/index.d.ts +11 -0
- package/dist/{components → src/components}/VvProgress/VvProgress.vue.d.ts +10 -3
- package/dist/{components → src/components}/VvProgress/index.d.ts +4 -1
- package/dist/src/components/VvRadio/VvRadio.vue.d.ts +176 -0
- package/dist/src/components/VvRadio/index.d.ts +80 -0
- package/dist/{components → src/components}/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
- package/dist/src/components/VvRadioGroup/index.d.ts +75 -0
- package/dist/{components → src/components}/VvSelect/VvSelect.vue.d.ts +117 -44
- package/dist/{components → src/components}/VvSelect/index.d.ts +48 -14
- package/dist/src/components/VvTab/VvTab.vue.d.ts +63 -0
- package/dist/{components → src/components}/VvTab/index.d.ts +4 -1
- package/dist/{components → src/components}/VvTextarea/VvTextarea.vue.d.ts +156 -49
- package/dist/{components → src/components}/VvTextarea/index.d.ts +68 -19
- package/dist/src/components/VvTooltip/VvTooltip.vue.d.ts +36 -0
- package/dist/{components → src/components}/VvTooltip/index.d.ts +5 -2
- package/dist/{components → src/components}/common/HintSlot.d.ts +1 -1
- package/dist/{components → src/components}/index.d.ts +10 -0
- package/dist/src/composables/alert/useAlert.d.ts +122 -0
- package/dist/src/composables/alert/useInjectAlert.d.ts +4 -0
- package/dist/src/composables/dropdown/useInjectDropdown.d.ts +12 -0
- package/dist/{composables → src/composables}/dropdown/useProvideDropdown.d.ts +3 -4
- package/dist/src/composables/group/useInjectedGroupState.d.ts +9 -0
- package/dist/src/composables/group/useProvideGroupState.d.ts +6 -0
- package/dist/{composables → src/composables}/index.d.ts +1 -0
- package/dist/src/composables/useBlurhash.d.ts +7 -0
- package/dist/src/composables/useComponentIcon.d.ts +11 -0
- package/dist/src/composables/usePersistence.d.ts +2 -0
- package/dist/src/composables/useVolver.d.ts +1 -0
- package/dist/{constants.d.ts → src/constants.d.ts} +34 -32
- package/dist/src/directives/index.d.ts +3 -0
- package/dist/{index.d.ts → src/index.d.ts} +3 -1
- package/dist/{props → src/props}/index.d.ts +272 -81
- package/dist/{resolvers → src/resolvers}/unplugin.d.ts +6 -1
- package/dist/src/stories/AccordionGroup/AccordionGroup.stories.d.ts +188 -0
- package/dist/src/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1262 -0
- package/dist/{stories → src/stories}/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/src/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/{stories → src/stories}/Button/Button.settings.d.ts +0 -1
- package/dist/{stories → src/stories}/Combobox/Combobox.settings.d.ts +8 -0
- package/dist/{stories → src/stories}/Icon/Icon.settings.d.ts +1 -0
- package/dist/src/stories/InputFile/InputFile.settings.d.ts +56 -0
- package/dist/src/stories/InputFile/InputFile.stories.d.ts +12 -0
- package/dist/src/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/src/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/src/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/src/stories/Tab/Tab.settings.d.ts +4 -0
- package/dist/{test → src/test}/expect.d.ts +1 -1
- package/dist/src/types/alert.d.ts +15 -0
- package/dist/src/types/blurhash.d.ts +12 -0
- package/dist/{types → src/types}/generic.d.ts +1 -2
- package/dist/src/types/group.d.ts +59 -0
- package/dist/src/types/index.d.ts +7 -0
- package/dist/src/types/input-file.d.ts +16 -0
- package/dist/{types → src/types}/nav.d.ts +2 -2
- package/dist/{utils → src/utils}/ObjectUtilities.d.ts +0 -1
- package/dist/src/workers/blurhash.d.ts +1 -0
- package/package.json +78 -78
- package/src/Volver.ts +31 -20
- 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 +121 -58
- package/src/components/VvAccordion/index.ts +8 -23
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
- package/src/components/VvAccordionGroup/index.ts +6 -6
- package/src/components/VvAction/VvAction.vue +17 -5
- package/src/components/VvAlert/index.ts +14 -9
- package/src/components/VvAlertGroup/index.ts +3 -15
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
- package/src/components/VvBreadcrumb/index.ts +2 -8
- package/src/components/VvButton/VvButton.vue +17 -7
- package/src/components/VvButton/index.ts +9 -16
- package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
- package/src/components/VvCombobox/VvCombobox.vue +15 -12
- package/src/components/VvCombobox/index.ts +4 -0
- package/src/components/VvDropdown/VvDropdown.vue +11 -2
- package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
- package/src/components/VvDropdown/index.ts +35 -1
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvIcon/index.ts +35 -48
- package/src/components/VvInputFile/VvInputFile.vue +395 -0
- package/src/components/VvInputFile/index.ts +135 -0
- package/src/components/VvInputText/VvInputClearAction.ts +10 -6
- package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
- package/src/components/VvInputText/VvInputText.vue +141 -33
- package/src/components/VvInputText/index.ts +31 -16
- package/src/components/VvNav/VvNav.vue +4 -2
- package/src/components/VvRadio/index.ts +5 -5
- package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
- package/src/components/VvSelect/VvSelect.vue +5 -8
- package/src/components/VvTab/VvTab.vue +5 -1
- package/src/components/VvTextarea/VvTextarea.vue +6 -9
- package/src/components/index.ts +10 -0
- package/src/composables/alert/useAlert.ts +12 -9
- package/src/composables/dropdown/useProvideDropdown.ts +4 -4
- package/src/composables/group/useInjectedGroupState.ts +20 -16
- package/src/composables/group/useProvideGroupState.ts +10 -15
- package/src/composables/index.ts +1 -0
- package/src/composables/useBlurhash.ts +76 -0
- package/src/composables/useComponentIcon.ts +15 -14
- package/src/composables/usePersistence.ts +76 -0
- package/src/composables/useUniqueId.ts +2 -2
- package/src/constants.ts +47 -32
- package/src/directives/index.ts +3 -6
- package/src/directives/v-tooltip.ts +19 -10
- package/src/index.ts +3 -1
- package/src/props/index.ts +108 -31
- package/src/resolvers/unplugin.ts +24 -14
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
- package/src/stories/Button/Button.settings.ts +1 -4
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
- package/src/stories/Combobox/Combobox.settings.ts +8 -0
- package/src/stories/Combobox/Combobox.test.ts +1 -1
- package/src/stories/Dialog/Dialog.test.ts +2 -2
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Icon/Icon.settings.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +36 -0
- package/src/stories/InputFile/InputFile.stories.ts +89 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- package/src/stories/InputText/InputText.test.ts +1 -1
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Progress/Progress.test.ts +1 -1
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Tab/Tab.settings.ts +2 -2
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/argTypes.ts +1 -1
- package/src/test/expect.ts +2 -4
- package/src/types/alert.ts +11 -7
- package/src/types/blurhash.ts +21 -0
- package/src/types/generic.ts +3 -3
- package/src/types/group.ts +22 -14
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +18 -0
- package/src/types/nav.ts +2 -3
- package/src/utils/ObjectUtilities.ts +0 -11
- package/src/workers/blurhash.ts +9 -0
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +0 -42
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +0 -47
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +0 -15
- package/dist/components/VvBadge/index.d.ts +0 -4
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +0 -18
- package/dist/components/VvBreadcrumb/index.d.ts +0 -12
- package/dist/components/VvCard/index.d.ts +0 -4
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +0 -112
- package/dist/components/VvCheckboxGroup/index.d.ts +0 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +0 -73
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +0 -9
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +0 -6
- package/dist/components/VvIcon/VvIcon.vue.d.ts +0 -69
- package/dist/components/VvNav/VvNav.vue.d.ts +0 -25
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +0 -2
- package/dist/components/VvNav/index.d.ts +0 -8
- package/dist/components/VvRadio/VvRadio.vue.d.ts +0 -104
- package/dist/components/VvRadio/index.d.ts +0 -47
- package/dist/components/VvRadioGroup/index.d.ts +0 -42
- package/dist/components/VvTab/VvTab.vue.d.ts +0 -39
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +0 -29
- package/dist/composables/alert/useAlert.d.ts +0 -27
- package/dist/composables/alert/useInjectAlert.d.ts +0 -9
- package/dist/composables/dropdown/useInjectDropdown.d.ts +0 -32
- package/dist/composables/group/useInjectedGroupState.d.ts +0 -10
- package/dist/composables/group/useProvideGroupState.d.ts +0 -6
- package/dist/composables/useComponentIcon.d.ts +0 -10
- package/dist/composables/useVolver.d.ts +0 -1
- package/dist/directives/index.d.ts +0 -5
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +0 -134
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +0 -679
- package/dist/stories/Tab/Tab.settings.d.ts +0 -17
- package/dist/types/alert.d.ts +0 -13
- package/dist/types/group.d.ts +0 -37
- package/dist/{Volver.d.ts → src/Volver.d.ts} +1 -1
- /package/dist/{components → src/components}/VvDialog/index.d.ts +0 -0
- /package/dist/{components → src/components}/VvInputText/VvInputTextActions.d.ts +0 -0
- /package/dist/{composables → src/composables}/alert/useProvideAlert.d.ts +0 -0
- /package/dist/{composables → src/composables}/useComponentFocus.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDebouncedInput.d.ts +0 -0
- /package/dist/{composables → src/composables}/useDefaults.d.ts +0 -0
- /package/dist/{composables → src/composables}/useModifiers.d.ts +0 -0
- /package/dist/{composables → src/composables}/useOptions.d.ts +0 -0
- /package/dist/{composables → src/composables}/useTextCount.d.ts +0 -0
- /package/dist/{composables → src/composables}/useUniqueId.d.ts +0 -0
- /package/dist/{directives → src/directives}/v-contextmenu.d.ts +0 -0
- /package/dist/{directives → src/directives}/v-tooltip.d.ts +0 -0
- /package/dist/{icons.d.ts → src/icons.d.ts} +0 -0
- /package/dist/{stories → src/stories}/Accordion/Accordion.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Accordion/Accordion.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Accordion/Accordion.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Accordion/AccordionSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AccordionGroup/AccordionGroup.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/AccordionGroup/AccordionGroup.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Alert/Alert.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Alert/Alert.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Alert/Alert.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Alert/AlertModifiers.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Alert/AlertSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AlertGroup/AlertGroup.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/AlertGroup/AlertGroup.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AlertGroup/AlertGroup.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/AlertGroup/AlertGroupPosition.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AlertGroup/AlertGroupSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Avatar/Avatar.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Avatar/Avatar.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Avatar/Avatar.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Avatar/AvatarBadge.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Avatar/AvatarModifiers.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Avatar/AvatarSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroup.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroup.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroup.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroupModifiers.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Badge/Badge.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Badge/Badge.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Badge/Badge.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Badge/BadgeSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Breadcrumb/Breadcrumb.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Breadcrumb/Breadcrumb.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Breadcrumb/Breadcrumb.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Breadcrumb/BreadcrumbSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/Button.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/Button.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonIcon.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonLink.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonLoading.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonModifiers.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonState.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Button/ButtonToggle.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroup.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroup.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroup.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroupModifiers.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroupSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/ButtonGroup/ButtonGroupToggle.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Card/Card.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Card/Card.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Card/Card.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Card/CardSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Checkbox/Checkbox.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Checkbox/Checkbox.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Checkbox/Checkbox.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Checkbox/CheckboxBinary.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Checkbox/CheckboxSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroup.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroup.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroup.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Combobox/Combobox.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Combobox/Combobox.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Combobox/ComboboxIconPosition.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Combobox/ComboboxMultiple.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Combobox/ComboboxOptions.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Combobox/ComboboxSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dialog/Dialog.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dialog/Dialog.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dialog/Dialog.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dialog/DialogSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dropdown/Dropdown.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dropdown/Dropdown.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dropdown/Dropdown.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dropdown/DropdownContextmenuDirective.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dropdown/DropdownMultilevel.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Dropdown/DropdownSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Icon/Icon.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Icon/IconsCollection.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputText.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputText.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputText.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputTextIconPosition.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputTextLength.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputTextMask.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputTextMinMax.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputTextSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/InputText/InputTextType.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Nav/Nav.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Nav/Nav.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Nav/Nav.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Nav/NavModifiers.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Progress/Progress.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Progress/Progress.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Progress/Progress.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Radio/Radio.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Radio/Radio.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Radio/Radio.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Radio/RadioSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/RadioGroup/RadioGroup.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/RadioGroup/RadioGroup.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/RadioGroup/RadioGroup.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/RadioGroup/RadioGroupOptions.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/RadioGroup/RadioGroupSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Select/Select.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Select/Select.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Select/Select.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Select/SelectIconPosition.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Select/SelectOptions.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Select/SelectSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Tab/Tab.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Tab/Tab.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Textarea/Textarea.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Textarea/Textarea.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Textarea/Textarea.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Textarea/TextareaLength.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Textarea/TextareaSlots.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Textarea/TextareatIconPosition.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Tooltip/Tooltip.settings.d.ts +0 -0
- /package/dist/{stories → src/stories}/Tooltip/Tooltip.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/Tooltip/Tooltip.test.d.ts +0 -0
- /package/dist/{stories → src/stories}/Tooltip/TooltipDirective.stories.d.ts +0 -0
- /package/dist/{stories → src/stories}/argTypes.d.ts +0 -0
- /package/dist/{test → src/test}/options.d.ts +0 -0
- /package/dist/{test → src/test}/sleep.d.ts +0 -0
- /package/dist/{types → src/types}/floating-ui.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("nanoid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","nanoid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.nanoid,e.core)}(this,(function(e,t,l,o){"use strict";function a(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function n(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const i={color:String,width:{type:[String,Number]},height:{type:[String,Number]},name:{type:String,required:!0},provider:{type:String},prefix:{type:String,default:"normal"},src:String,horizontalFlip:Boolean,verticalFlip:Boolean,flip:String,mode:String,inline:Boolean,rotate:[Number,String],onLoad:Function,svg:String,modifiers:{type:[String,Array]}};var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{});const s=Symbol.for("volver");function v(){return e.inject(s)}function c(t,l,o){return e.computed((()=>{const a={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const f=e.defineComponent({name:"VvIcon",props:i,setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=v(),{modifiers:r}=e.toRefs(o),u=c("vv-icon",r),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",l=`@${d.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==i?void 0:i.iconsCollections.find((l=>{const o=`@${d.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function f(e){const l=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==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return i&&o.src&&!t.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(f(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&f(o.svg),(l,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("",!0)}}),p={valid:Boolean,validLabel:[String,Array]},m={invalid:Boolean,invalidLabel:[String,Array]},h={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},g={disabled:Boolean},b=(Boolean,Boolean,Boolean,{label:[String,Number]}),y={readonly:Boolean},S={modifiers:[String,Array]},B={hintLabel:{type:String,default:""}},L={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},x={debounce:[Number,String]},$={icon:{type:[String,Object]},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},w={tabindex:{type:[String,Number],default:0}},k={floating:Boolean},V={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const N={...{...V,name:{type:String,required:!0}},...{autofocus:Boolean},...{autocomplete:{type:String,default:"off"}},...w,...g,...y,...p,...m,...B,...h,...S,...L,...x,...$,...k,...b,minlength:[String,Number],maxlength:[String,Number],placeholder:String,required:Boolean};d.button;const O={...N,modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},resizable:Boolean};const P=["for"],_={class:"vv-textarea__wrapper"},I={key:0,class:"vv-textarea__input-before"},C={class:"vv-textarea__inner"},E=["id"],z={key:1,class:"vv-textarea__input-after"},A={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:O,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:i}){const d=t,s=e.useSlots(),p=function(t,l,o){const a=v(),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 o;const e=n.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const n=a[o];if(l[o]=n,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===n&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===n&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(l[o]=e[o]):a===n&&(l[o]=e[o])}}return l}),{})}))}("VvTextarea",O,d),m=e.ref(),{id:h,icon:g,iconPosition:b,label:y,modelValue:S,count:B,valid:L,invalid:x,loading:$,modifiers:w,debounce:k,minlength:V,maxlength:N}=e.toRefs(d),j=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.nanoid()))))(h),R=e.computed((()=>`${j.value}-hint`)),q=e.computed((()=>d.floating&&a(d.placeholder)?" ":d.placeholder)),T=function(t,l,o=0,{getter:a=(e=>e),setter:n=(e=>e)}={}){let i;return"string"==typeof o&&(o=parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{i&&clearTimeout(i),i=setTimeout((()=>{l("update:modelValue",n(e))}),o)}})}(S,i,null==k?void 0:k.value),{hasIcon:F,hasIconBefore:D,hasIconAfter:H}=function(t,l){const o=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.before))),a=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===u.after))),n=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.left))),i=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.right))),d=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.top))),s=e.computed((()=>Boolean((null==t?void 0:t.value)&&l.value===r.bottom)));return{hasIcon:e.computed((()=>"string"==typeof(null==t?void 0:t.value)?{name:null==t?void 0:t.value}:null==t?void 0:t.value)),hasIconLeft:n,hasIconRight:i,hasIconTop:d,hasIconBottom:s,hasIconBefore:o,hasIconAfter:a}}(g,b),{focused:M}=function(t,l){const{focused:a}=o.useFocus(t);return e.watch(a,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:a}}(m,i),J=o.useElementVisibility(m);e.watch(J,(e=>{e&&d.autofocus&&(M.value=!0)}));const{formatted:K}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),n=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:n}}(T,{mode:null==B?void 0:B.value,upperLimit:Number(null==N?void 0:N.value),lowerLimit:Number(null==V?void 0:V.value)}),U=e.computed((()=>!d.disabled&&!d.readonly)),G=e.computed((()=>U.value?d.tabindex:-1)),Q=e.computed((()=>!a(S))),W=e.computed((()=>!0===d.invalid||!0!==d.valid&&void 0)),{HintSlot:X,hasHintLabelOrSlot:Y,hasInvalidLabelOrSlot:Z,hintSlotScope:ee}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>n(o.value.invalidLabel))),i=e.computed((()=>n(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),u=e.computed((()=>o.value.hintLabel)),d=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),s=e.computed((()=>!d.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),v=e.computed((()=>!d.value&&!s.value&&Boolean(o.value.valid&&(l.valid||i.value)))),c=e.computed((()=>!d.value&&!s.value&&!v.value&&Boolean(l.hint||u.value))),f=e.computed((()=>s.value||v.value||d.value||c.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:f,invalidLabel:a,validLabel:i,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:c}),render(){var t,l,o,a,n,i,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(n=this.$slots).valid)?void 0:i.call(n))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hintSlotScope:p,HintSlot:m}}(p,s),te=c("vv-textarea",w,e.computed((()=>({valid:L.value,invalid:x.value,loading:$.value,disabled:d.disabled,readonly:d.readonly,"icon-before":D.value,"icon-after":H.value,floating:d.floating&&!a(d.label),dirty:Q.value,focused:M.value,resizable:d.resizable})))),le=e.computed((()=>({name:d.name,placeholder:q.value,tabindex:G.value,disabled:d.disabled,readonly:d.readonly,required:d.required,autocomplete:d.autocomplete,minlength:d.minlength,maxlength:d.maxlength,cols:d.cols,rows:d.rows,wrap:d.wrap,spellcheck:d.spellcheck,"aria-invalid":W.value,"aria-describedby":Y.value?R.value:void 0,"aria-errormessage":Z.value?R.value:void 0}))),oe=e.computed((()=>({valid:d.valid,invalid:d.invalid,modelValue:d.modelValue,hintLabel:d.hintLabel,maxlength:d.maxlength,minlength:d.minlength,clear:ae}))),ae=()=>{T.value=void 0};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(te))},[e.unref(y)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(j),class:"vv-textarea__label"},e.toDisplayString(e.unref(y)),9,P)):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",I,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(oe))))])):e.createCommentVNode("",!0),e.createElementVNode("div",C,[e.unref(D)?(e.openBlock(),e.createBlock(f,e.mergeProps({key:0,class:"vv-textarea__icon"},e.unref(F)),null,16)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(j),ref_key:"textarea",ref:m,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(T)?T.value=t:null)},e.unref(le),{onKeyup:l[1]||(l[1]=e=>i("keyup",e))}),null,16,E),[[e.vModelText,e.unref(T)]]),e.unref(H)?(e.openBlock(),e.createBlock(f,e.mergeProps({key:1,class:"vv-textarea__icon vv-textarea__icon-after"},e.unref(F)),null,16)):e.createCommentVNode("",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",z,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(oe))))])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("span",A,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(oe))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(K)),1)]))])):e.createCommentVNode("",!0)]),e.createVNode(e.unref(X),{id:e.unref(R),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@iconify/vue"),require("uid"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTextarea=t(e.vue,e.vue$1,e.uid,e.core)}(this,(function(e,t,l,o){"use strict";function a(t){return null==(l=e.unref(t))||""===l||Array.isArray(l)&&0===l.length||!(l instanceof Date)&&"object"==typeof l&&0===Object.keys(l).length;var l}function i(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}const n={prefix:"normal"};var r=(e=>(e.local="local",e.session="session",e))(r||{}),u=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(u||{}),d=(e=>(e.before="before",e.after="after",e))(d||{}),s=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(s||{}),v=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(v||{});const c=Symbol.for("volver");function f(){return e.inject(c)}function p(t,l,o){return e.computed((()=>{const a={[t]:!0},i="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return i&&Array.isArray(i)&&i.forEach((e=>{e&&(a[`${t}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((l=>{a[`${t}--${l}`]=e.unref(o.value[l])})),a}))}const m=e.defineComponent({name:"VvIcon",props:e.mergeDefaults({name:{},color:{},width:{},height:{},provider:{},prefix:{},src:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{},mode:{},inline:{type:Boolean},rotate:{},onLoad:{type:Function},svg:{},modifiers:{}},n),setup(l){const o=l,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),i=e.ref(!0),n=f(),{modifiers:r}=e.toRefs(o),u=p("vv-icon",r),d=e.computed((()=>o.provider||(null==n?void 0:n.iconsProvider))),s=e.computed((()=>{const e=o.name??"",l=`@${d.value}:${o.prefix}:${e}`;if(t.iconExists(l))return l;const a=null==n?void 0:n.iconsCollections.find((l=>{const o=`@${d.value}:${l.prefix}:${e}`;return t.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=function(e){let 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==l?void 0:l.innerHTML.trim())||"";l&&a&&t.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return n&&o.src&&!t.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(i.value=!1,n.fetchIcon(o.src).then((e=>{e&&(v(e),i.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&v(o.svg),(l,o)=>e.unref(i)?(e.openBlock(),e.createBlock(e.unref(t.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:l.inline,width:l.width,height:l.height,horizontalFlip:l.horizontalFlip,verticalFlip:l.verticalFlip,flip:l.flip,rotate:e.unref(a),color:l.color,onLoad:l.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}}),h={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},g={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},b={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},y={disabled:{type:Boolean,default:!1}},S=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),L={readonly:{type:Boolean,default:!1}},B={modifiers:{type:[String,Array],default:void 0}},x={hintLabel:{type:String,default:""}},$={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},k={debounce:{type:[Number,String],default:void 0}},w={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:d.before,validation:e=>Object.values(d).includes(e)}},V={tabindex:{type:[String,Number],default:0}},O={floating:{type:Boolean,default:!1}},N={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...{...N,name:{type:String,required:!0}},...{autofocus:{type:Boolean,default:!1}},...{autocomplete:{type:String,default:"off"}},...V,...y,...L,...h,...g,...x,...b,...B,...$,...k,...w,...O,...S,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}};s.button,v.button,r.local;const _={...P,modelValue:String,cols:{type:[String,Number],default:20},rows:{type:[String,Number],default:2},wrap:{type:String,default:"soft"},spellcheck:{type:[Boolean,String],default:"default"},resizable:Boolean};const I=["for"],C={class:"vv-textarea__wrapper"},E={key:0,class:"vv-textarea__input-before"},z={class:"vv-textarea__inner"},A=["id"],j={key:1,class:"vv-textarea__input-after"},R={key:2,class:"vv-textarea__limit"};return e.defineComponent({name:"VvTextarea",props:_,emits:["update:modelValue","focus","blur","keyup"],setup(t,{emit:n}){const r=t,s=n,v=e.useSlots(),c=function(t,l,o){const a=f(),i=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===i.value)return o;const e=i.value,t=l,a=o;return Object.keys(t).reduce(((l,o)=>{const i=a[o];if(l[o]=i,o in e){if(Array.isArray(t[o])){const a=t[o];a.length&&a[0]===i&&(l[o]=e[o])}if("function"==typeof t[o]&&(0,t[o])()===i&&(l[o]=e[o]),"object"==typeof t[o]){let a=t[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(i)&&(l[o]=e[o]):a===i&&(l[o]=e[o])}}return l}),{})}))}("VvTextarea",_,r),h=e.ref(),{id:g,icon:b,iconPosition:y,label:S,modelValue:L,count:B,valid:x,invalid:$,loading:k,modifiers:w,debounce:V,minlength:O,maxlength:N}=e.toRefs(r),P=(t=>e.computed((()=>String((null==t?void 0:t.value)||l.uid()))))(g),T=e.computed((()=>`${P.value}-hint`)),q=e.computed((()=>r.floating&&a(r.placeholder)?" ":r.placeholder)),F=function(t,l,o=0,{getter:a=(e=>e),setter:i=(e=>e)}={}){let n;return"string"==typeof o&&(o=parseInt(o)),e.computed({get:()=>a(null==t?void 0:t.value),set:e=>{n&&clearTimeout(n),n=setTimeout((()=>{l("update:modelValue",i(e))}),o)}})}(L,s,null==V?void 0:V.value),{hasIconBefore:D,hasIconAfter:H}=function(t,l){const o=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==l?void 0:l.value)===d.before?o.value:void 0)),i=e.computed((()=>(null==l?void 0:l.value)===d.after?o.value:void 0)),n=e.computed((()=>(null==l?void 0:l.value)===u.left?o.value:void 0)),r=e.computed((()=>(null==l?void 0:l.value)===u.right?o.value:void 0)),s=e.computed((()=>(null==l?void 0:l.value)===u.top?o.value:void 0)),v=e.computed((()=>(null==l?void 0:l.value)===u.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:n,hasIconRight:r,hasIconTop:s,hasIconBottom:v,hasIconBefore:a,hasIconAfter:i}}(b,y),{focused:M}=function(t,l){const{focused:a}=o.useFocus(t);return e.watch(a,(o=>{l(o?"focus":"blur",e.unref(t))})),{focused:a}}(h,s),J=o.useElementVisibility(h);e.watch(J,(e=>{e&&r.autofocus&&(M.value=!0)}));const{formatted:K}=function(t,l){const o=e.computed((()=>(e.unref(t)??"").length)),a=e.computed((()=>void 0!==(null==l?void 0:l.lowerLimit)&&o.value<(null==l?void 0:l.lowerLimit)?o.value-l.lowerLimit:void 0!==(null==l?void 0:l.upperLimit)&&o.value<(null==l?void 0:l.upperLimit)?l.upperLimit-o.value:0)),i=e.computed((()=>{if(!1===(null==l?void 0:l.mode))return"";if("limit"===(null==l?void 0:l.mode)&&(null==l?void 0:l.upperLimit))return`${o.value} / ${l.lowerLimit?`${l.lowerLimit}-`:""}${l.upperLimit}`;if("countdown"===(null==l?void 0:l.mode)){if(0===a.value)return;return a}return o.value}));return{length:o,gap:a,formatted:i}}(F,{mode:null==B?void 0:B.value,upperLimit:Number(null==N?void 0:N.value),lowerLimit:Number(null==O?void 0:O.value)}),U=e.computed((()=>!r.disabled&&!r.readonly)),G=e.computed((()=>U.value?r.tabindex:-1)),Q=e.computed((()=>!a(L))),W=e.computed((()=>!0===r.invalid||!0!==r.valid&&void 0)),{HintSlot:X,hasHintLabelOrSlot:Y,hasInvalidLabelOrSlot:Z,hintSlotScope:ee}=function(t,l){const o=e.computed((()=>e.isRef(t)?t.value:t)),a=e.computed((()=>i(o.value.invalidLabel))),n=e.computed((()=>i(o.value.validLabel))),r=e.computed((()=>o.value.loadingLabel)),u=e.computed((()=>o.value.hintLabel)),d=e.computed((()=>Boolean(o.value.loading&&(l.loading||r.value)))),s=e.computed((()=>!d.value&&Boolean(o.value.invalid&&(l.invalid||a.value)))),v=e.computed((()=>!d.value&&!s.value&&Boolean(o.value.valid&&(l.valid||n.value)))),c=e.computed((()=>!d.value&&!s.value&&!v.value&&Boolean(l.hint||u.value))),f=e.computed((()=>s.value||v.value||d.value||c.value)),p=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),m=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:f,invalidLabel:a,validLabel:n,loadingLabel:r,hintLabel:u,hasInvalidLabelOrSlot:s,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hasHintLabelOrSlot:c}),render(){var t,l,o,a,i,n,r,u;if(this.isVisible){let d;return this.hasInvalidLabelOrSlot&&(d="alert"),this.hasValidLabelOrSlot&&(d="status"),this.hasLoadingLabelOrSlot?e.h(this.tag,{role:d},(null==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(a=(o=this.$slots).invalid)?void 0:a.call(o))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(n=(i=this.$slots).valid)?void 0:n.call(i))??this.validLabel):e.h(this.tag,{role:d},(null==(u=(r=this.$slots).hint)?void 0:u.call(r))??this.$slots.hint??this.hintLabel)}return null}});return{hasInvalidLabelOrSlot:s,hasHintLabelOrSlot:c,hasValidLabelOrSlot:v,hasLoadingLabelOrSlot:d,hintSlotScope:p,HintSlot:m}}(c,v),te=p("vv-textarea",w,e.computed((()=>({valid:x.value,invalid:$.value,loading:k.value,disabled:r.disabled,readonly:r.readonly,"icon-before":void 0!==D.value,"icon-after":void 0!==H.value,floating:r.floating&&!a(r.label),dirty:Q.value,focus:M.value,resizable:r.resizable})))),le=e.computed((()=>({name:r.name,placeholder:q.value,tabindex:G.value,disabled:r.disabled,readonly:r.readonly,required:r.required,autocomplete:r.autocomplete,minlength:r.minlength,maxlength:r.maxlength,cols:r.cols,rows:r.rows,wrap:r.wrap,spellcheck:r.spellcheck,"aria-invalid":W.value,"aria-describedby":Y.value?T.value:void 0,"aria-errormessage":Z.value?T.value:void 0}))),oe=e.computed((()=>({valid:r.valid,invalid:r.invalid,modelValue:r.modelValue,hintLabel:r.hintLabel,maxlength:r.maxlength,minlength:r.minlength,clear:ae}))),ae=()=>{F.value=void 0};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(te))},[e.unref(S)?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(P),class:"vv-textarea__label"},e.toDisplayString(e.unref(S)),9,I)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",C,[t.$slots.before?(e.openBlock(),e.createElementBlock("div",E,[e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(oe))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",z,[e.unref(D)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0},e.unref(D),{class:"vv-textarea__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("textarea",e.mergeProps({id:e.unref(P),ref_key:"textarea",ref:h,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(F)?F.value=t:null)},e.unref(le),{onKeyup:l[1]||(l[1]=e=>s("keyup",e))}),null,16,A),[[e.vModelText,e.unref(F)]]),e.unref(H)?(e.openBlock(),e.createBlock(m,e.mergeProps({key:1},e.unref(H),{class:"vv-textarea__icon vv-textarea__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),t.$slots.after?(e.openBlock(),e.createElementBlock("div",j,[e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(oe))))])):e.createCommentVNode("v-if",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("span",R,[e.renderSlot(t.$slots,"count",e.normalizeProps(e.guardReactiveProps(e.unref(oe))),(()=>[e.createTextVNode(e.toDisplayString(e.unref(K)),1)]))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(X),{id:e.unref(T),class:"vv-textarea__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(ee))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
3
|
+
StorageType2["local"] = "local";
|
|
4
|
+
StorageType2["session"] = "session";
|
|
5
|
+
return StorageType2;
|
|
6
|
+
})(StorageType || {});
|
|
2
7
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
3
8
|
Strategy2["absolute"] = "absolute";
|
|
4
9
|
Strategy2["fixed"] = "fixed";
|
|
@@ -33,13 +38,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
33
38
|
ButtonType2["reset"] = "reset";
|
|
34
39
|
return ButtonType2;
|
|
35
40
|
})(ButtonType || {});
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return
|
|
42
|
-
})(
|
|
41
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
42
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
43
|
+
ActionTag2["routerLink"] = "router-link";
|
|
44
|
+
ActionTag2["a"] = "a";
|
|
45
|
+
ActionTag2["button"] = "button";
|
|
46
|
+
return ActionTag2;
|
|
47
|
+
})(ActionTag || {});
|
|
43
48
|
const LinkProps = {
|
|
44
49
|
/**
|
|
45
50
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -55,10 +60,7 @@ const LinkProps = {
|
|
|
55
60
|
/**
|
|
56
61
|
* Anchor target
|
|
57
62
|
*/
|
|
58
|
-
target:
|
|
59
|
-
type: String,
|
|
60
|
-
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
61
|
-
},
|
|
63
|
+
target: String,
|
|
62
64
|
/**
|
|
63
65
|
* Anchor rel
|
|
64
66
|
*/
|
|
@@ -71,44 +73,65 @@ const DisabledProps = {
|
|
|
71
73
|
/**
|
|
72
74
|
* Whether the form control is disabled
|
|
73
75
|
*/
|
|
74
|
-
disabled:
|
|
76
|
+
disabled: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
}
|
|
75
80
|
};
|
|
76
81
|
const ActiveProps = {
|
|
77
82
|
/**
|
|
78
83
|
* Whether the item is active
|
|
79
84
|
*/
|
|
80
|
-
active:
|
|
85
|
+
active: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
}
|
|
81
89
|
};
|
|
82
90
|
const CurrentProps = {
|
|
83
91
|
/**
|
|
84
92
|
* Whether the item is current
|
|
85
93
|
*/
|
|
86
|
-
current:
|
|
94
|
+
current: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
}
|
|
87
98
|
};
|
|
88
99
|
const PressedProps = {
|
|
89
100
|
/**
|
|
90
101
|
* Whether the item is pressed
|
|
91
102
|
*/
|
|
92
|
-
pressed:
|
|
103
|
+
pressed: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false
|
|
106
|
+
}
|
|
93
107
|
};
|
|
94
108
|
const LabelProps = {
|
|
95
109
|
/**
|
|
96
110
|
* The item label
|
|
97
111
|
*/
|
|
98
|
-
label:
|
|
112
|
+
label: {
|
|
113
|
+
type: [String, Number],
|
|
114
|
+
default: void 0
|
|
115
|
+
}
|
|
99
116
|
};
|
|
100
117
|
const ModifiersProps = {
|
|
101
118
|
/**
|
|
102
119
|
* Component BEM modifiers
|
|
103
120
|
*/
|
|
104
|
-
modifiers:
|
|
121
|
+
modifiers: {
|
|
122
|
+
type: [String, Array],
|
|
123
|
+
default: void 0
|
|
124
|
+
}
|
|
105
125
|
};
|
|
106
126
|
({
|
|
107
127
|
/**
|
|
108
128
|
* VvIcon name or props
|
|
109
129
|
* @see VVIcon
|
|
110
130
|
*/
|
|
111
|
-
icon: {
|
|
131
|
+
icon: {
|
|
132
|
+
type: [String, Object],
|
|
133
|
+
default: void 0
|
|
134
|
+
},
|
|
112
135
|
/**
|
|
113
136
|
* VvIcon position
|
|
114
137
|
*/
|
|
@@ -139,7 +162,8 @@ const ModifiersProps = {
|
|
|
139
162
|
* Dropdown show / hide transition name
|
|
140
163
|
*/
|
|
141
164
|
transitionName: {
|
|
142
|
-
type: String
|
|
165
|
+
type: String,
|
|
166
|
+
default: void 0
|
|
143
167
|
},
|
|
144
168
|
/**
|
|
145
169
|
* Offset of the dropdown from the trigger
|
|
@@ -207,7 +231,8 @@ const ModifiersProps = {
|
|
|
207
231
|
* Set dropdown width to the same as the trigger
|
|
208
232
|
*/
|
|
209
233
|
triggerWidth: {
|
|
210
|
-
type: Boolean
|
|
234
|
+
type: Boolean,
|
|
235
|
+
default: false
|
|
211
236
|
}
|
|
212
237
|
});
|
|
213
238
|
({
|
|
@@ -231,8 +256,23 @@ const ModifiersProps = {
|
|
|
231
256
|
ariaLabel: {
|
|
232
257
|
type: String,
|
|
233
258
|
default: void 0
|
|
259
|
+
},
|
|
260
|
+
/**
|
|
261
|
+
* Default tag for the action
|
|
262
|
+
*/
|
|
263
|
+
defaultTag: {
|
|
264
|
+
type: String,
|
|
265
|
+
default: ActionTag.button
|
|
234
266
|
}
|
|
235
267
|
});
|
|
268
|
+
({
|
|
269
|
+
storageType: {
|
|
270
|
+
type: String,
|
|
271
|
+
default: StorageType.local,
|
|
272
|
+
validator: (value) => Object.values(StorageType).includes(value)
|
|
273
|
+
},
|
|
274
|
+
storageKey: String
|
|
275
|
+
});
|
|
236
276
|
const VvTooltipProps = {
|
|
237
277
|
...ModifiersProps,
|
|
238
278
|
/**
|
|
@@ -284,15 +324,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
284
324
|
}))
|
|
285
325
|
);
|
|
286
326
|
return (_ctx, _cache) => {
|
|
287
|
-
return openBlock(), createElementBlock(
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
327
|
+
return openBlock(), createElementBlock(
|
|
328
|
+
"span",
|
|
329
|
+
{
|
|
330
|
+
class: normalizeClass(unref(bemCssClasses)),
|
|
331
|
+
role: "tooltip",
|
|
332
|
+
inert: ""
|
|
333
|
+
},
|
|
334
|
+
[
|
|
335
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
336
|
+
createTextVNode(
|
|
337
|
+
toDisplayString(_ctx.value),
|
|
338
|
+
1
|
|
339
|
+
/* TEXT */
|
|
340
|
+
)
|
|
341
|
+
])
|
|
342
|
+
],
|
|
343
|
+
2
|
|
344
|
+
/* CLASS */
|
|
345
|
+
);
|
|
296
346
|
};
|
|
297
347
|
}
|
|
298
348
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e
|
|
1
|
+
!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(o="undefined"!=typeof globalThis?globalThis:o||self).VvTooltip=e(o.vue)}(this,(function(o){"use strict";var e=(o=>(o.local="local",o.session="session",o))(e||{}),t=(o=>(o.left="left",o.right="right",o.top="top",o.bottom="bottom",o))(t||{}),n=(o=>(o.before="before",o.after="after",o))(n||{}),l=(o=>(o.button="button",o.submit="submit",o.reset="reset",o))(l||{}),r=(o=>(o.nuxtLink="nuxt-link",o.routerLink="router-link",o.a="a",o.button="button",o))(r||{});Boolean,Boolean,Boolean,Boolean;const i={modifiers:{type:[String,Array],default:void 0}};n.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,l.button,r.button,e.local;const a={...i,position:{type:String,default:t.bottom},value:{type:String}};return o.defineComponent({__name:"VvTooltip",props:a,setup(e){const t=e,{modifiers:n}=o.toRefs(t),l=function(e,t,n){return o.computed((()=>{const l={[e]:!0},r="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return r&&Array.isArray(r)&&r.forEach((o=>{o&&(l[`${e}--${o}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{l[`${e}--${t}`]=o.unref(n.value[t])})),l}))}("vv-tooltip",n,o.computed((()=>({[t.position]:!0}))));return(e,t)=>(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(o.unref(l)),role:"tooltip",inert:""},[o.renderSlot(e.$slots,"default",{},(()=>[o.createTextVNode(o.toDisplayString(e.value),1)]))],2))}})}));
|