@volverjs/ui-vue 0.0.10-beta.5 → 0.0.10-beta.50
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 +148 -51
- package/auto-imports.d.ts +25 -12
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +28 -20
- package/dist/Volver.d.ts +11 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +192 -104
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +29 -10
- package/dist/components/VvAccordion/index.d.ts +8 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +485 -206
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +61 -18
- package/dist/components/VvAccordionGroup/index.d.ts +16 -8
- package/dist/components/VvAction/VvAction.es.js +84 -33
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +61 -28
- package/dist/components/VvAction/index.d.ts +26 -10
- package/dist/components/VvAlert/VvAlert.es.js +350 -318
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +25 -17
- package/dist/components/VvAlert/index.d.ts +20 -11
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +388 -327
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +22 -17
- package/dist/components/VvAlertGroup/index.d.ts +10 -18
- package/dist/components/VvAvatar/VvAvatar.es.js +66 -28
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +13 -5
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +147 -74
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +17 -10
- package/dist/components/VvAvatarGroup/index.d.ts +6 -3
- package/dist/components/VvBadge/VvBadge.es.js +78 -34
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +13 -5
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +294 -83
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +28 -8
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +510 -488
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +97 -45
- package/dist/components/VvButton/index.d.ts +52 -30
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +95 -45
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +35 -17
- package/dist/components/VvButtonGroup/index.d.ts +13 -4
- package/dist/components/VvCard/VvCard.es.js +87 -42
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +13 -5
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -136
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -35
- package/dist/components/VvCheckbox/index.d.ts +52 -19
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +408 -322
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +103 -34
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +2304 -1992
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +258 -672
- package/dist/components/VvCombobox/index.d.ts +377 -135
- package/dist/components/VvDialog/VvDialog.es.js +177 -297
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +23 -7
- package/dist/components/VvDialog/index.d.ts +12 -0
- package/dist/components/VvDropdown/VvDropdown.es.js +172 -102
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +110 -315
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +77 -28
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +13 -5
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +38 -10
- package/dist/components/VvDropdown/index.d.ts +52 -118
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +165 -60
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +337 -10
- 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 +24 -102
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +4 -68
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +317 -0
- package/dist/components/VvInputFile/index.d.ts +193 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +16 -10
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +20 -14
- package/dist/components/VvInputText/VvInputStepAction.d.ts +11 -7
- package/dist/components/VvInputText/VvInputText.es.js +1491 -551
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +216 -68
- package/dist/components/VvInputText/index.d.ts +101 -31
- package/dist/components/VvNav/VvNav.es.js +155 -75
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +32 -11
- 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 +5 -2
- package/dist/components/VvNavItem/VvNavItem.es.js +100 -39
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +73 -27
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +13 -6
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +175 -135
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -33
- package/dist/components/VvRadio/index.d.ts +50 -17
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +406 -321
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +103 -34
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +677 -611
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +107 -199
- package/dist/components/VvSelect/index.d.ts +196 -16
- package/dist/components/VvTab/VvTab.es.js +230 -110
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +34 -12
- package/dist/components/VvTab/index.d.ts +6 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +606 -597
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +159 -54
- package/dist/components/VvTextarea/index.d.ts +69 -20
- package/dist/components/VvTooltip/VvTooltip.es.js +83 -30
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +16 -9
- package/dist/components/VvTooltip/index.d.ts +5 -2
- package/dist/components/common/HintSlot.d.ts +8 -9
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +4086 -2029
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlerInject.d.ts +4 -0
- package/dist/composables/alert/useAlert.d.ts +71 -6
- 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/useDropdownInject.d.ts +12 -0
- package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -7
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/useGroupStateInject.d.ts +9 -0
- package/dist/composables/group/useGroupStateProvide.d.ts +6 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.es.js +178 -6
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentFocus.d.ts +2 -2
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/useOptions.d.ts +5 -5
- package/dist/composables/usePersistence.d.ts +3 -0
- package/dist/composables/useUniqueId.d.ts +2 -2
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/constants.d.ts +35 -33
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +247 -82
- 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/directives/v-tooltip.es.js +101 -39
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.d.ts +17 -17
- package/dist/icons.es.js +516 -516
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +74 -6
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +277 -193
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +87 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -127
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1304 -538
- package/dist/stories/Alert/Alert.settings.d.ts +2 -109
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
- package/dist/stories/Badge/Badge.settings.d.ts +2 -26
- package/dist/stories/Badge/Badge.test.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +2 -194
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
- package/dist/stories/Card/Card.settings.d.ts +2 -63
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
- package/dist/stories/Combobox/Combobox.settings.d.ts +2 -609
- package/dist/stories/Combobox/Combobox.stories.d.ts +1 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +1 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
- package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
- package/dist/stories/Icon/Icon.settings.d.ts +3 -68
- package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/InputText/InputText.settings.d.ts +2 -438
- package/dist/stories/Nav/Nav.settings.d.ts +2 -10
- package/dist/stories/Progress/Progress.settings.d.ts +2 -27
- package/dist/stories/Radio/Radio.settings.d.ts +1 -110
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
- package/dist/stories/Select/Select.settings.d.ts +2 -246
- package/dist/stories/Select/Select.stories.d.ts +1 -0
- package/dist/stories/Tab/Tab.settings.d.ts +2 -15
- package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
- package/dist/stories/argTypes.d.ts +27 -866
- package/dist/test/expect.d.ts +1 -2
- package/dist/test/options.d.ts +1 -1
- package/dist/test/sleep.d.ts +1 -1
- package/dist/types/alert.d.ts +9 -7
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/generic.d.ts +1 -2
- package/dist/types/group.d.ts +37 -15
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +9 -0
- package/dist/types/nav.d.ts +2 -2
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +8 -9
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +238 -246
- package/src/Volver.ts +251 -246
- 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 +163 -100
- package/src/components/VvAccordion/index.ts +65 -80
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +224 -106
- package/src/components/VvAccordionGroup/index.ts +42 -42
- package/src/components/VvAction/VvAction.vue +144 -130
- package/src/components/VvAlert/VvAlert.vue +72 -70
- package/src/components/VvAlert/index.ts +149 -147
- package/src/components/VvAlertGroup/VvAlertGroup.vue +57 -56
- package/src/components/VvAlertGroup/index.ts +102 -118
- package/src/components/VvAvatar/VvAvatar.vue +20 -14
- package/src/components/VvAvatar/index.ts +5 -5
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +58 -53
- package/src/components/VvAvatarGroup/index.ts +21 -21
- package/src/components/VvBadge/VvBadge.vue +15 -14
- package/src/components/VvBadge/index.ts +2 -2
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +50 -48
- package/src/components/VvBreadcrumb/index.ts +3 -9
- package/src/components/VvButton/VvButton.vue +163 -152
- package/src/components/VvButton/index.ts +104 -111
- package/src/components/VvButtonGroup/VvButtonGroup.vue +73 -65
- package/src/components/VvButtonGroup/index.ts +23 -22
- package/src/components/VvCard/VvCard.vue +30 -30
- package/src/components/VvCard/index.ts +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +186 -184
- package/src/components/VvCheckbox/index.ts +45 -45
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +88 -87
- package/src/components/VvCombobox/VvCombobox.vue +655 -619
- package/src/components/VvCombobox/index.ts +210 -168
- package/src/components/VvDialog/VvDialog.vue +139 -129
- package/src/components/VvDialog/index.ts +42 -36
- package/src/components/VvDropdown/VvDropdown.vue +466 -445
- package/src/components/VvDropdown/VvDropdownAction.vue +37 -39
- package/src/components/VvDropdown/VvDropdownItem.vue +30 -26
- package/src/components/VvDropdown/VvDropdownOptgroup.vue +13 -12
- package/src/components/VvDropdown/VvDropdownOption.vue +47 -64
- package/src/components/VvDropdown/index.ts +61 -27
- package/src/components/VvIcon/README.md +1 -1
- package/src/components/VvIcon/VvIcon.vue +133 -133
- package/src/components/VvIcon/index.ts +84 -97
- package/src/components/VvInputFile/VvInputFile.vue +413 -0
- package/src/components/VvInputFile/index.ts +143 -0
- package/src/components/VvInputText/VvInputClearAction.ts +51 -47
- package/src/components/VvInputText/VvInputPasswordAction.ts +66 -62
- package/src/components/VvInputText/VvInputStepAction.ts +43 -43
- package/src/components/VvInputText/VvInputText.vue +652 -516
- package/src/components/VvInputText/VvInputTextActions.ts +87 -87
- package/src/components/VvInputText/index.ts +201 -186
- package/src/components/VvNav/VvNav.vue +40 -36
- package/src/components/VvNav/VvNavItem.vue +12 -12
- package/src/components/VvNav/VvNavSeparator.vue +6 -6
- package/src/components/VvNav/index.ts +2 -2
- package/src/components/VvProgress/VvProgress.vue +27 -27
- package/src/components/VvProgress/index.ts +28 -28
- package/src/components/VvRadio/VvRadio.vue +115 -112
- package/src/components/VvRadio/index.ts +29 -29
- package/src/components/VvRadioGroup/VvRadioGroup.vue +91 -90
- package/src/components/VvSelect/VvSelect.vue +262 -241
- package/src/components/VvSelect/index.ts +88 -63
- package/src/components/VvTab/VvTab.vue +79 -69
- package/src/components/VvTab/index.ts +13 -13
- package/src/components/VvTextarea/VvTextarea.vue +218 -219
- package/src/components/VvTextarea/index.ts +35 -35
- package/src/components/VvTooltip/VvTooltip.vue +22 -16
- package/src/components/VvTooltip/index.ts +12 -12
- package/src/components/common/HintSlot.ts +151 -152
- package/src/components/index.ts +10 -0
- package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +1 -1
- package/src/composables/alert/useAlert.ts +76 -73
- package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +12 -12
- package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
- package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +6 -6
- package/src/composables/dropdown/useDropdownProvide.ts +94 -0
- package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
- package/src/composables/group/useGroupStateInject.ts +55 -0
- package/src/composables/group/useGroupStateProvide.ts +14 -0
- package/src/composables/index.ts +3 -0
- package/src/composables/useBlurhash.ts +68 -0
- package/src/composables/useComponentFocus.ts +9 -9
- package/src/composables/useComponentIcon.ts +36 -35
- package/src/composables/useDebouncedInput.ts +25 -25
- package/src/composables/useDefaults.ts +81 -80
- package/src/composables/useModifiers.ts +29 -29
- package/src/composables/useOptions.ts +51 -42
- package/src/composables/usePersistence.ts +74 -0
- package/src/composables/useTextCount.ts +46 -46
- package/src/composables/useUniqueId.ts +4 -4
- package/src/composables/useVolver.ts +1 -1
- package/src/constants.ts +98 -83
- package/src/directives/index.ts +3 -6
- package/src/directives/v-contextmenu.ts +26 -34
- package/src/directives/v-tooltip.ts +20 -11
- package/src/icons.ts +2 -2
- package/src/index.ts +6 -4
- package/src/props/index.ts +461 -384
- package/src/resolvers/unplugin.ts +154 -144
- package/src/shims.d.ts +4 -5
- package/src/stories/Accordion/Accordion.settings.ts +51 -50
- package/src/stories/Accordion/Accordion.stories.ts +21 -21
- package/src/stories/Accordion/Accordion.test.ts +56 -54
- package/src/stories/Accordion/AccordionSlots.stories.ts +13 -13
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +70 -67
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +41 -39
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +49 -45
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +36 -36
- package/src/stories/Alert/Alert.settings.ts +117 -116
- package/src/stories/Alert/Alert.stories.ts +30 -30
- package/src/stories/Alert/Alert.test.ts +78 -80
- package/src/stories/Alert/AlertModifiers.stories.ts +45 -45
- package/src/stories/Alert/AlertSlots.stories.ts +35 -35
- package/src/stories/AlertGroup/AlertGroup.settings.ts +107 -105
- package/src/stories/AlertGroup/AlertGroup.stories.ts +25 -25
- package/src/stories/AlertGroup/AlertGroup.test.ts +69 -71
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +68 -68
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +23 -23
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +58 -58
- package/src/stories/Avatar/Avatar.settings.ts +29 -29
- package/src/stories/Avatar/Avatar.stories.ts +22 -22
- package/src/stories/Avatar/Avatar.test.ts +22 -24
- package/src/stories/Avatar/AvatarBadge.stories.ts +15 -15
- package/src/stories/Avatar/AvatarModifiers.stories.ts +60 -60
- package/src/stories/Avatar/AvatarSlots.stories.ts +17 -17
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +54 -53
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +17 -17
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +24 -26
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +15 -15
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +17 -17
- package/src/stories/Badge/Badge.settings.ts +21 -20
- package/src/stories/Badge/Badge.stories.ts +24 -24
- package/src/stories/Badge/Badge.test.ts +8 -8
- package/src/stories/Badge/BadgeSlots.stories.ts +10 -10
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +116 -0
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +35 -34
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +23 -23
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +44 -43
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +19 -19
- package/src/stories/Button/Button.settings.ts +147 -151
- package/src/stories/Button/Button.stories.ts +19 -19
- package/src/stories/Button/Button.test.ts +41 -42
- package/src/stories/Button/ButtonIcon.stories.ts +42 -42
- package/src/stories/Button/ButtonLink.stories.ts +24 -24
- package/src/stories/Button/ButtonLoading.stories.ts +22 -22
- package/src/stories/Button/ButtonModifiers.stories.ts +91 -91
- package/src/stories/Button/ButtonSlots.stories.ts +47 -47
- package/src/stories/Button/ButtonState.stories.ts +23 -23
- package/src/stories/Button/ButtonToggle.stories.ts +30 -30
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +33 -24
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +19 -19
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +23 -26
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +20 -20
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +17 -17
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +22 -22
- package/src/stories/Card/Card.settings.ts +49 -48
- package/src/stories/Card/Card.stories.ts +22 -22
- package/src/stories/Card/Card.test.ts +14 -16
- package/src/stories/Card/CardSlots.stories.ts +42 -42
- package/src/stories/Checkbox/Checkbox.settings.ts +36 -35
- package/src/stories/Checkbox/Checkbox.stories.ts +57 -57
- package/src/stories/Checkbox/Checkbox.test.ts +63 -66
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +18 -18
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +15 -15
- package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +9 -9
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +50 -50
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +64 -68
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +34 -34
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +23 -23
- package/src/stories/Combobox/Combobox.settings.ts +408 -385
- package/src/stories/Combobox/Combobox.stories.ts +116 -107
- package/src/stories/Combobox/Combobox.test.ts +92 -92
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +25 -24
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +32 -22
- package/src/stories/Combobox/ComboboxOptions.stories.ts +81 -84
- package/src/stories/Combobox/ComboboxSlots.stories.ts +55 -54
- package/src/stories/Dialog/Dialog.settings.ts +49 -40
- package/src/stories/Dialog/Dialog.stories.ts +28 -28
- package/src/stories/Dialog/Dialog.test.ts +49 -54
- package/src/stories/Dialog/DialogModifiers.stories.ts +42 -0
- package/src/stories/Dialog/DialogSlots.stories.ts +20 -20
- package/src/stories/Dropdown/Dropdown.settings.ts +62 -61
- package/src/stories/Dropdown/Dropdown.stories.ts +60 -60
- package/src/stories/Dropdown/Dropdown.test.ts +9 -13
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +18 -19
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +19 -19
- package/src/stories/Dropdown/DropdownSlots.stories.ts +51 -51
- package/src/stories/Icon/Icon.settings.ts +66 -65
- package/src/stories/Icon/Icon.stories.ts +29 -30
- package/src/stories/Icon/IconsCollection.stories.ts +24 -24
- package/src/stories/InputFile/InputFile.settings.ts +37 -0
- package/src/stories/InputFile/InputFile.stories.ts +97 -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.settings.ts +248 -246
- package/src/stories/InputText/InputText.stories.ts +68 -68
- package/src/stories/InputText/InputText.test.ts +119 -122
- package/src/stories/InputText/InputTextIconPosition.stories.ts +24 -24
- package/src/stories/InputText/InputTextLength.stories.ts +33 -33
- package/src/stories/InputText/InputTextMask.stories.ts +91 -91
- package/src/stories/InputText/InputTextMinMax.stories.ts +30 -30
- package/src/stories/InputText/InputTextSlots.stories.ts +20 -20
- package/src/stories/InputText/InputTextType.stories.ts +70 -70
- package/src/stories/Nav/Nav.settings.ts +27 -27
- package/src/stories/Nav/Nav.stories.ts +18 -18
- package/src/stories/Nav/Nav.test.ts +10 -12
- package/src/stories/Nav/NavModifiers.stories.ts +25 -25
- package/src/stories/Progress/Progress.settings.ts +24 -23
- package/src/stories/Progress/Progress.stories.ts +23 -23
- package/src/stories/Progress/Progress.test.ts +5 -5
- package/src/stories/Radio/Radio.settings.ts +9 -9
- package/src/stories/Radio/Radio.stories.ts +47 -47
- package/src/stories/Radio/Radio.test.ts +54 -57
- package/src/stories/Radio/RadioSlots.stories.ts +15 -15
- package/src/stories/RadioGroup/RadioGroup.settings.ts +9 -9
- package/src/stories/RadioGroup/RadioGroup.stories.ts +51 -52
- package/src/stories/RadioGroup/RadioGroup.test.ts +64 -68
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +35 -35
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +23 -23
- package/src/stories/Select/Select.settings.ts +72 -71
- package/src/stories/Select/Select.stories.ts +75 -66
- package/src/stories/Select/Select.test.ts +67 -70
- package/src/stories/Select/SelectIconPosition.stories.ts +27 -26
- package/src/stories/Select/SelectOptions.stories.ts +55 -55
- package/src/stories/Select/SelectSlots.stories.ts +21 -20
- package/src/stories/Tab/Tab.settings.ts +34 -34
- package/src/stories/Tab/Tab.stories.ts +16 -16
- package/src/stories/Tab/Tab.test.ts +17 -19
- package/src/stories/Textarea/Textarea.settings.ts +80 -78
- package/src/stories/Textarea/Textarea.stories.ts +63 -63
- package/src/stories/Textarea/Textarea.test.ts +70 -73
- package/src/stories/Textarea/TextareaLength.stories.ts +33 -33
- package/src/stories/Textarea/TextareaSlots.stories.ts +20 -20
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +24 -24
- package/src/stories/Tooltip/Tooltip.settings.ts +16 -17
- package/src/stories/Tooltip/Tooltip.stories.ts +18 -18
- package/src/stories/Tooltip/Tooltip.test.ts +53 -54
- package/src/stories/Tooltip/TooltipDirective.stories.ts +37 -37
- package/src/stories/argTypes.ts +506 -505
- package/src/test/expect.ts +74 -79
- package/src/test/options.ts +17 -16
- package/src/test/sleep.ts +3 -2
- package/src/test/types.d.ts +12 -12
- package/src/types/alert.ts +21 -17
- package/src/types/blurhash.ts +21 -0
- package/src/types/floating-ui.ts +1 -1
- package/src/types/generic.ts +2 -3
- package/src/types/group.ts +35 -27
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +10 -0
- package/src/types/nav.ts +13 -14
- package/src/utils/DomUtilities.ts +15 -0
- package/src/utils/ObjectUtilities.ts +192 -188
- package/src/workers/blurhash.ts +9 -0
- 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/src/composables/dropdown/useProvideDropdown.ts +0 -94
- package/src/composables/group/useInjectedGroupState.ts +0 -51
- package/src/composables/group/useProvideGroupState.ts +0 -20
- /package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
|
@@ -1,225 +1,11 @@
|
|
|
1
|
-
import { unref, computed, isRef, defineComponent, h, inject, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
|
|
1
|
+
import { unref, computed, isRef, defineComponent, h, inject, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, useId, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, vModelText, createTextVNode, createVNode, createSlots, withCtx } from "vue";
|
|
2
2
|
import { iconExists, Icon, addIcon } from "@iconify/vue";
|
|
3
|
-
import { uid } from "uid";
|
|
4
3
|
import { useFocus, useElementVisibility } from "@vueuse/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
function joinLines(items) {
|
|
12
|
-
if (Array.isArray(items)) {
|
|
13
|
-
return items.filter((item) => isString(item)).join(" ");
|
|
14
|
-
}
|
|
15
|
-
return items;
|
|
16
|
-
}
|
|
17
|
-
function HintSlotFactory(propsOrRef, slots) {
|
|
18
|
-
const props = computed(() => {
|
|
19
|
-
if (isRef(propsOrRef)) {
|
|
20
|
-
return propsOrRef.value;
|
|
21
|
-
}
|
|
22
|
-
return propsOrRef;
|
|
23
|
-
});
|
|
24
|
-
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
25
|
-
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
26
|
-
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
27
|
-
const hintLabel = computed(() => props.value.hintLabel);
|
|
28
|
-
const hasLoadingLabelOrSlot = computed(
|
|
29
|
-
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
30
|
-
);
|
|
31
|
-
const hasInvalidLabelOrSlot = computed(
|
|
32
|
-
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
33
|
-
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
34
|
-
)
|
|
35
|
-
);
|
|
36
|
-
const hasValidLabelOrSlot = computed(
|
|
37
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
38
|
-
);
|
|
39
|
-
const hasHintLabelOrSlot = computed(
|
|
40
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
41
|
-
);
|
|
42
|
-
const isVisible = computed(
|
|
43
|
-
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
44
|
-
);
|
|
45
|
-
const hintSlotScope = computed(() => ({
|
|
46
|
-
modelValue: props.value.modelValue,
|
|
47
|
-
valid: props.value.valid,
|
|
48
|
-
invalid: props.value.invalid,
|
|
49
|
-
loading: props.value.loading
|
|
50
|
-
}));
|
|
51
|
-
const HintSlot = defineComponent({
|
|
52
|
-
name: "HintSlot",
|
|
53
|
-
props: {
|
|
54
|
-
tag: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: "small"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
setup() {
|
|
60
|
-
return {
|
|
61
|
-
isVisible,
|
|
62
|
-
invalidLabel,
|
|
63
|
-
validLabel,
|
|
64
|
-
loadingLabel,
|
|
65
|
-
hintLabel,
|
|
66
|
-
hasInvalidLabelOrSlot,
|
|
67
|
-
hasValidLabelOrSlot,
|
|
68
|
-
hasLoadingLabelOrSlot,
|
|
69
|
-
hasHintLabelOrSlot
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
render() {
|
|
73
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
74
|
-
if (this.isVisible) {
|
|
75
|
-
let role;
|
|
76
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
77
|
-
role = "alert";
|
|
78
|
-
}
|
|
79
|
-
if (this.hasValidLabelOrSlot) {
|
|
80
|
-
role = "status";
|
|
81
|
-
}
|
|
82
|
-
if (this.hasLoadingLabelOrSlot) {
|
|
83
|
-
return h(
|
|
84
|
-
this.tag,
|
|
85
|
-
{
|
|
86
|
-
role
|
|
87
|
-
},
|
|
88
|
-
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
92
|
-
return h(
|
|
93
|
-
this.tag,
|
|
94
|
-
{
|
|
95
|
-
role
|
|
96
|
-
},
|
|
97
|
-
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
if (this.hasValidLabelOrSlot) {
|
|
101
|
-
return h(
|
|
102
|
-
this.tag,
|
|
103
|
-
{
|
|
104
|
-
role
|
|
105
|
-
},
|
|
106
|
-
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
return h(
|
|
110
|
-
this.tag,
|
|
111
|
-
{
|
|
112
|
-
role
|
|
113
|
-
},
|
|
114
|
-
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
return {
|
|
121
|
-
hasInvalidLabelOrSlot,
|
|
122
|
-
hasHintLabelOrSlot,
|
|
123
|
-
hasValidLabelOrSlot,
|
|
124
|
-
hasLoadingLabelOrSlot,
|
|
125
|
-
hintSlotScope,
|
|
126
|
-
HintSlot
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
const VvIconProps = {
|
|
130
|
-
/**
|
|
131
|
-
* Color
|
|
132
|
-
*/
|
|
133
|
-
color: String,
|
|
134
|
-
/**
|
|
135
|
-
* Width
|
|
136
|
-
*/
|
|
137
|
-
width: {
|
|
138
|
-
type: [String, Number]
|
|
139
|
-
},
|
|
140
|
-
/**
|
|
141
|
-
* Height
|
|
142
|
-
*/
|
|
143
|
-
height: {
|
|
144
|
-
type: [String, Number]
|
|
145
|
-
},
|
|
146
|
-
/**
|
|
147
|
-
* Icon name
|
|
148
|
-
* Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
|
|
149
|
-
* https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
150
|
-
*/
|
|
151
|
-
name: {
|
|
152
|
-
type: String,
|
|
153
|
-
required: true
|
|
154
|
-
},
|
|
155
|
-
/**
|
|
156
|
-
* By default 'vv'
|
|
157
|
-
* If custom collection is not added with "addCollection" DS class method, this prop could not be used
|
|
158
|
-
* Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
|
|
159
|
-
*/
|
|
160
|
-
provider: {
|
|
161
|
-
type: String
|
|
162
|
-
},
|
|
163
|
-
/**
|
|
164
|
-
* The name of icon set.
|
|
165
|
-
* Icon default options prefix: simple | normal | detailed
|
|
166
|
-
*/
|
|
167
|
-
prefix: {
|
|
168
|
-
type: String,
|
|
169
|
-
default: "normal"
|
|
170
|
-
},
|
|
171
|
-
/**
|
|
172
|
-
* Url remote SVG icon
|
|
173
|
-
*/
|
|
174
|
-
src: String,
|
|
175
|
-
/**
|
|
176
|
-
* Horizontal flip
|
|
177
|
-
*/
|
|
178
|
-
horizontalFlip: Boolean,
|
|
179
|
-
/**
|
|
180
|
-
* Vertical flip
|
|
181
|
-
*/
|
|
182
|
-
verticalFlip: Boolean,
|
|
183
|
-
/**
|
|
184
|
-
* String alternative to "horizontalFlip" and "verticalFlip".
|
|
185
|
-
* Example: https://docs.iconify.design/icon-components/vue/transform.html
|
|
186
|
-
*/
|
|
187
|
-
flip: String,
|
|
188
|
-
/**
|
|
189
|
-
* Icon render mode
|
|
190
|
-
* 'style' = 'bg' or 'mask', depending on icon content
|
|
191
|
-
* 'bg' = span with style using `background`
|
|
192
|
-
* 'mask' = span with style using `mask`
|
|
193
|
-
* 'svg' = svg
|
|
194
|
-
* Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
|
|
195
|
-
*/
|
|
196
|
-
mode: String,
|
|
197
|
-
/**
|
|
198
|
-
* Toggles inline or block mode
|
|
199
|
-
* Example https://docs.iconify.design/icon-components/vue/inline.html
|
|
200
|
-
*/
|
|
201
|
-
inline: Boolean,
|
|
202
|
-
/**
|
|
203
|
-
* rotates icon
|
|
204
|
-
* Example https://docs.iconify.design/icon-components/vue/transform.html
|
|
205
|
-
*/
|
|
206
|
-
rotate: [Number, String],
|
|
207
|
-
/**
|
|
208
|
-
* A callback that is called when icon data has been loaded
|
|
209
|
-
*/
|
|
210
|
-
onLoad: Function,
|
|
211
|
-
/**
|
|
212
|
-
* SVG icon string
|
|
213
|
-
*/
|
|
214
|
-
svg: String,
|
|
215
|
-
/**
|
|
216
|
-
* Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
|
|
217
|
-
* @values string | string[]
|
|
218
|
-
*/
|
|
219
|
-
modifiers: {
|
|
220
|
-
type: [String, Array]
|
|
221
|
-
}
|
|
222
|
-
};
|
|
4
|
+
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
5
|
+
StorageType2["local"] = "local";
|
|
6
|
+
StorageType2["session"] = "session";
|
|
7
|
+
return StorageType2;
|
|
8
|
+
})(StorageType || {});
|
|
223
9
|
var Strategy = /* @__PURE__ */ ((Strategy2) => {
|
|
224
10
|
Strategy2["absolute"] = "absolute";
|
|
225
11
|
Strategy2["fixed"] = "fixed";
|
|
@@ -254,136 +40,14 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
|
254
40
|
ButtonType2["reset"] = "reset";
|
|
255
41
|
return ButtonType2;
|
|
256
42
|
})(ButtonType || {});
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
return
|
|
263
|
-
})(
|
|
43
|
+
var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
|
|
44
|
+
ActionTag2["nuxtLink"] = "nuxt-link";
|
|
45
|
+
ActionTag2["routerLink"] = "router-link";
|
|
46
|
+
ActionTag2["a"] = "a";
|
|
47
|
+
ActionTag2["button"] = "button";
|
|
48
|
+
return ActionTag2;
|
|
49
|
+
})(ActionTag || {});
|
|
264
50
|
const INJECTION_KEY_VOLVER = Symbol.for("volver");
|
|
265
|
-
function useVolver() {
|
|
266
|
-
return inject(INJECTION_KEY_VOLVER);
|
|
267
|
-
}
|
|
268
|
-
function useModifiers(prefix, modifiers, others) {
|
|
269
|
-
return computed(() => {
|
|
270
|
-
const toReturn = {
|
|
271
|
-
[prefix]: true
|
|
272
|
-
};
|
|
273
|
-
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
274
|
-
if (modifiersArray) {
|
|
275
|
-
if (Array.isArray(modifiersArray)) {
|
|
276
|
-
modifiersArray.forEach((modifier) => {
|
|
277
|
-
if (modifier) {
|
|
278
|
-
toReturn[`${prefix}--${modifier}`] = true;
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
if (others) {
|
|
284
|
-
Object.keys(others.value).forEach((key) => {
|
|
285
|
-
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
return toReturn;
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
const __default__$1 = {
|
|
292
|
-
name: "VvIcon"
|
|
293
|
-
};
|
|
294
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
295
|
-
...__default__$1,
|
|
296
|
-
props: VvIconProps,
|
|
297
|
-
setup(__props) {
|
|
298
|
-
const props = __props;
|
|
299
|
-
const hasRotate = computed(() => {
|
|
300
|
-
if (typeof props.rotate === "string") {
|
|
301
|
-
return parseFloat(props.rotate);
|
|
302
|
-
}
|
|
303
|
-
return props.rotate;
|
|
304
|
-
});
|
|
305
|
-
const show = ref(true);
|
|
306
|
-
const volver = useVolver();
|
|
307
|
-
const { modifiers } = toRefs(props);
|
|
308
|
-
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
309
|
-
const provider = computed(() => {
|
|
310
|
-
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
311
|
-
});
|
|
312
|
-
const icon = computed(() => {
|
|
313
|
-
const name = props.name ?? "";
|
|
314
|
-
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
315
|
-
if (iconExists(iconName)) {
|
|
316
|
-
return iconName;
|
|
317
|
-
}
|
|
318
|
-
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
319
|
-
(iconsCollection2) => {
|
|
320
|
-
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
321
|
-
return iconExists(icon2);
|
|
322
|
-
}
|
|
323
|
-
);
|
|
324
|
-
if (iconsCollection) {
|
|
325
|
-
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
326
|
-
}
|
|
327
|
-
return name;
|
|
328
|
-
});
|
|
329
|
-
function getSvgContent(svg) {
|
|
330
|
-
let dom;
|
|
331
|
-
if (typeof window === "undefined") {
|
|
332
|
-
const { JSDOM } = require("jsdom");
|
|
333
|
-
dom = new JSDOM().window;
|
|
334
|
-
}
|
|
335
|
-
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
336
|
-
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
337
|
-
const svgEl = svgDomString.querySelector("svg");
|
|
338
|
-
return svgEl;
|
|
339
|
-
}
|
|
340
|
-
function addIconFromSvg(svg) {
|
|
341
|
-
const svgContentEl = getSvgContent(svg);
|
|
342
|
-
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
343
|
-
if (svgContentEl && svgContent) {
|
|
344
|
-
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
345
|
-
body: svgContent,
|
|
346
|
-
// Set height and width from svg content
|
|
347
|
-
height: svgContentEl.viewBox.baseVal.height,
|
|
348
|
-
width: svgContentEl.viewBox.baseVal.width
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (volver) {
|
|
353
|
-
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
354
|
-
show.value = false;
|
|
355
|
-
volver.fetchIcon(props.src).then((svg) => {
|
|
356
|
-
if (svg) {
|
|
357
|
-
addIconFromSvg(svg);
|
|
358
|
-
show.value = true;
|
|
359
|
-
}
|
|
360
|
-
}).catch((e) => {
|
|
361
|
-
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
if (props.svg) {
|
|
366
|
-
addIconFromSvg(props.svg);
|
|
367
|
-
}
|
|
368
|
-
return (_ctx, _cache) => {
|
|
369
|
-
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
370
|
-
key: 0,
|
|
371
|
-
class: unref(bemCssClasses)
|
|
372
|
-
}, {
|
|
373
|
-
inline: _ctx.inline,
|
|
374
|
-
width: _ctx.width,
|
|
375
|
-
height: _ctx.height,
|
|
376
|
-
horizontalFlip: _ctx.horizontalFlip,
|
|
377
|
-
verticalFlip: _ctx.verticalFlip,
|
|
378
|
-
flip: _ctx.flip,
|
|
379
|
-
rotate: unref(hasRotate),
|
|
380
|
-
color: _ctx.color,
|
|
381
|
-
onLoad: _ctx.onLoad,
|
|
382
|
-
icon: unref(icon)
|
|
383
|
-
}), null, 16, ["class"])) : createCommentVNode("", true);
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
51
|
const LinkProps = {
|
|
388
52
|
/**
|
|
389
53
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -399,10 +63,7 @@ const LinkProps = {
|
|
|
399
63
|
/**
|
|
400
64
|
* Anchor target
|
|
401
65
|
*/
|
|
402
|
-
target:
|
|
403
|
-
type: String,
|
|
404
|
-
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
405
|
-
},
|
|
66
|
+
target: String,
|
|
406
67
|
/**
|
|
407
68
|
* Anchor rel
|
|
408
69
|
*/
|
|
@@ -415,27 +76,33 @@ const ValidProps = {
|
|
|
415
76
|
/**
|
|
416
77
|
* Valid status
|
|
417
78
|
*/
|
|
418
|
-
valid: Boolean,
|
|
79
|
+
valid: { type: Boolean, default: false },
|
|
419
80
|
/**
|
|
420
81
|
* Valid label
|
|
421
82
|
*/
|
|
422
|
-
validLabel: [String, Array]
|
|
83
|
+
validLabel: { type: [String, Array], default: void 0 }
|
|
423
84
|
};
|
|
424
85
|
const InvalidProps = {
|
|
425
86
|
/**
|
|
426
87
|
* Invalid status
|
|
427
88
|
*/
|
|
428
|
-
invalid:
|
|
89
|
+
invalid: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false
|
|
92
|
+
},
|
|
429
93
|
/**
|
|
430
94
|
* Invalid label
|
|
431
95
|
*/
|
|
432
|
-
invalidLabel: [String, Array]
|
|
96
|
+
invalidLabel: { type: [String, Array], default: void 0 }
|
|
433
97
|
};
|
|
434
98
|
const LoadingProps = {
|
|
435
99
|
/**
|
|
436
100
|
* Loading status
|
|
437
101
|
*/
|
|
438
|
-
loading:
|
|
102
|
+
loading: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false
|
|
105
|
+
},
|
|
439
106
|
/**
|
|
440
107
|
* Loading label
|
|
441
108
|
*/
|
|
@@ -448,43 +115,64 @@ const DisabledProps = {
|
|
|
448
115
|
/**
|
|
449
116
|
* Whether the form control is disabled
|
|
450
117
|
*/
|
|
451
|
-
disabled:
|
|
118
|
+
disabled: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: false
|
|
121
|
+
}
|
|
452
122
|
};
|
|
453
123
|
const ActiveProps = {
|
|
454
124
|
/**
|
|
455
125
|
* Whether the item is active
|
|
456
126
|
*/
|
|
457
|
-
active:
|
|
127
|
+
active: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: false
|
|
130
|
+
}
|
|
458
131
|
};
|
|
459
132
|
const CurrentProps = {
|
|
460
133
|
/**
|
|
461
134
|
* Whether the item is current
|
|
462
135
|
*/
|
|
463
|
-
current:
|
|
136
|
+
current: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: false
|
|
139
|
+
}
|
|
464
140
|
};
|
|
465
141
|
const PressedProps = {
|
|
466
142
|
/**
|
|
467
143
|
* Whether the item is pressed
|
|
468
144
|
*/
|
|
469
|
-
pressed:
|
|
145
|
+
pressed: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false
|
|
148
|
+
}
|
|
470
149
|
};
|
|
471
150
|
const LabelProps = {
|
|
472
151
|
/**
|
|
473
152
|
* The item label
|
|
474
153
|
*/
|
|
475
|
-
label:
|
|
154
|
+
label: {
|
|
155
|
+
type: [String, Number],
|
|
156
|
+
default: void 0
|
|
157
|
+
}
|
|
476
158
|
};
|
|
477
159
|
const ReadonlyProps = {
|
|
478
160
|
/**
|
|
479
161
|
* The value is not editable
|
|
480
162
|
*/
|
|
481
|
-
readonly:
|
|
163
|
+
readonly: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
default: false
|
|
166
|
+
}
|
|
482
167
|
};
|
|
483
168
|
const ModifiersProps = {
|
|
484
169
|
/**
|
|
485
170
|
* Component BEM modifiers
|
|
486
171
|
*/
|
|
487
|
-
modifiers:
|
|
172
|
+
modifiers: {
|
|
173
|
+
type: [String, Array],
|
|
174
|
+
default: void 0
|
|
175
|
+
}
|
|
488
176
|
};
|
|
489
177
|
const HintProps = {
|
|
490
178
|
hintLabel: { type: String, default: "" }
|
|
@@ -503,14 +191,20 @@ const DebounceProps = {
|
|
|
503
191
|
/**
|
|
504
192
|
* Milliseconds to wait before emitting the input event
|
|
505
193
|
*/
|
|
506
|
-
debounce:
|
|
194
|
+
debounce: {
|
|
195
|
+
type: [Number, String],
|
|
196
|
+
default: void 0
|
|
197
|
+
}
|
|
507
198
|
};
|
|
508
199
|
const IconProps = {
|
|
509
200
|
/**
|
|
510
201
|
* VvIcon name or props
|
|
511
202
|
* @see VVIcon
|
|
512
203
|
*/
|
|
513
|
-
icon: {
|
|
204
|
+
icon: {
|
|
205
|
+
type: [String, Object],
|
|
206
|
+
default: void 0
|
|
207
|
+
},
|
|
514
208
|
/**
|
|
515
209
|
* VvIcon position
|
|
516
210
|
*/
|
|
@@ -531,7 +225,10 @@ const FloatingLabelProps = {
|
|
|
531
225
|
/**
|
|
532
226
|
* If true the label will be floating
|
|
533
227
|
*/
|
|
534
|
-
floating:
|
|
228
|
+
floating: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
default: false
|
|
231
|
+
}
|
|
535
232
|
};
|
|
536
233
|
const IdProps = {
|
|
537
234
|
/**
|
|
@@ -561,7 +258,8 @@ const IdProps = {
|
|
|
561
258
|
* Dropdown show / hide transition name
|
|
562
259
|
*/
|
|
563
260
|
transitionName: {
|
|
564
|
-
type: String
|
|
261
|
+
type: String,
|
|
262
|
+
default: void 0
|
|
565
263
|
},
|
|
566
264
|
/**
|
|
567
265
|
* Offset of the dropdown from the trigger
|
|
@@ -629,7 +327,8 @@ const IdProps = {
|
|
|
629
327
|
* Set dropdown width to the same as the trigger
|
|
630
328
|
*/
|
|
631
329
|
triggerWidth: {
|
|
632
|
-
type: Boolean
|
|
330
|
+
type: Boolean,
|
|
331
|
+
default: false
|
|
633
332
|
}
|
|
634
333
|
});
|
|
635
334
|
const IdNameProps = {
|
|
@@ -646,7 +345,10 @@ const AutofocusProps = {
|
|
|
646
345
|
* Global attribute autofocus
|
|
647
346
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
|
|
648
347
|
*/
|
|
649
|
-
autofocus:
|
|
348
|
+
autofocus: {
|
|
349
|
+
type: Boolean,
|
|
350
|
+
default: false
|
|
351
|
+
}
|
|
650
352
|
};
|
|
651
353
|
const AutocompleteProps = {
|
|
652
354
|
/**
|
|
@@ -655,117 +357,405 @@ const AutocompleteProps = {
|
|
|
655
357
|
*/
|
|
656
358
|
autocomplete: { type: String, default: "off" }
|
|
657
359
|
};
|
|
658
|
-
const InputTextareaProps = {
|
|
659
|
-
...IdNameProps,
|
|
660
|
-
...AutofocusProps,
|
|
661
|
-
...AutocompleteProps,
|
|
662
|
-
...TabindexProps,
|
|
663
|
-
...DisabledProps,
|
|
664
|
-
...ReadonlyProps,
|
|
665
|
-
...ValidProps,
|
|
666
|
-
...InvalidProps,
|
|
667
|
-
...HintProps,
|
|
668
|
-
...LoadingProps,
|
|
669
|
-
...ModifiersProps,
|
|
670
|
-
...CountProps,
|
|
671
|
-
...DebounceProps,
|
|
672
|
-
...IconProps,
|
|
673
|
-
...FloatingLabelProps,
|
|
674
|
-
...LabelProps,
|
|
675
|
-
/**
|
|
676
|
-
* Input / Textarea minlength
|
|
677
|
-
* Minimum length (number of characters) of value
|
|
678
|
-
* Available for input types: text, search, url, tel, email, password
|
|
679
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
680
|
-
*/
|
|
681
|
-
minlength: [String, Number],
|
|
682
|
-
/**
|
|
683
|
-
* Input / Textarea maxlength
|
|
684
|
-
* Maximum length (number of characters) of value
|
|
685
|
-
* Available for input types: text, search, url, tel, email, password
|
|
686
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
687
|
-
*/
|
|
688
|
-
maxlength: [String, Number],
|
|
689
|
-
/**
|
|
690
|
-
* Input / Textarea placeholder
|
|
691
|
-
* Text that appears in the form control when it has no value set
|
|
692
|
-
* Available for input types: text, search, url, tel, email, password, number
|
|
693
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
694
|
-
*/
|
|
695
|
-
placeholder:
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
*
|
|
701
|
-
|
|
702
|
-
|
|
360
|
+
const InputTextareaProps = {
|
|
361
|
+
...IdNameProps,
|
|
362
|
+
...AutofocusProps,
|
|
363
|
+
...AutocompleteProps,
|
|
364
|
+
...TabindexProps,
|
|
365
|
+
...DisabledProps,
|
|
366
|
+
...ReadonlyProps,
|
|
367
|
+
...ValidProps,
|
|
368
|
+
...InvalidProps,
|
|
369
|
+
...HintProps,
|
|
370
|
+
...LoadingProps,
|
|
371
|
+
...ModifiersProps,
|
|
372
|
+
...CountProps,
|
|
373
|
+
...DebounceProps,
|
|
374
|
+
...IconProps,
|
|
375
|
+
...FloatingLabelProps,
|
|
376
|
+
...LabelProps,
|
|
377
|
+
/**
|
|
378
|
+
* Input / Textarea minlength
|
|
379
|
+
* Minimum length (number of characters) of value
|
|
380
|
+
* Available for input types: text, search, url, tel, email, password
|
|
381
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
|
|
382
|
+
*/
|
|
383
|
+
minlength: { type: [String, Number], default: void 0 },
|
|
384
|
+
/**
|
|
385
|
+
* Input / Textarea maxlength
|
|
386
|
+
* Maximum length (number of characters) of value
|
|
387
|
+
* Available for input types: text, search, url, tel, email, password
|
|
388
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
|
|
389
|
+
*/
|
|
390
|
+
maxlength: { type: [String, Number], default: void 0 },
|
|
391
|
+
/**
|
|
392
|
+
* Input / Textarea placeholder
|
|
393
|
+
* Text that appears in the form control when it has no value set
|
|
394
|
+
* Available for input types: text, search, url, tel, email, password, number
|
|
395
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
396
|
+
*/
|
|
397
|
+
placeholder: {
|
|
398
|
+
type: String,
|
|
399
|
+
default: void 0
|
|
400
|
+
},
|
|
401
|
+
/**
|
|
402
|
+
* Input / Textarea required
|
|
403
|
+
* A value is required or must be check for the form to be submittable
|
|
404
|
+
* Available for all input types except color
|
|
405
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
|
|
406
|
+
*/
|
|
407
|
+
required: {
|
|
408
|
+
type: Boolean,
|
|
409
|
+
default: false
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
({
|
|
413
|
+
...DisabledProps,
|
|
414
|
+
...LabelProps,
|
|
415
|
+
...PressedProps,
|
|
416
|
+
...ActiveProps,
|
|
417
|
+
...CurrentProps,
|
|
418
|
+
...LinkProps,
|
|
419
|
+
/**
|
|
420
|
+
* Button type
|
|
421
|
+
*/
|
|
422
|
+
type: {
|
|
423
|
+
type: String,
|
|
424
|
+
default: ButtonType.button,
|
|
425
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
426
|
+
},
|
|
427
|
+
/**
|
|
428
|
+
* Button aria-label
|
|
429
|
+
*/
|
|
430
|
+
ariaLabel: {
|
|
431
|
+
type: String,
|
|
432
|
+
default: void 0
|
|
433
|
+
},
|
|
434
|
+
/**
|
|
435
|
+
* Default tag for the action
|
|
436
|
+
*/
|
|
437
|
+
defaultTag: {
|
|
438
|
+
type: String,
|
|
439
|
+
default: ActionTag.button
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
({
|
|
443
|
+
storageType: {
|
|
444
|
+
type: String,
|
|
445
|
+
default: StorageType.local,
|
|
446
|
+
validator: (value) => Object.values(StorageType).includes(value)
|
|
447
|
+
},
|
|
448
|
+
storageKey: String
|
|
449
|
+
});
|
|
450
|
+
const WRAP = {
|
|
451
|
+
hard: "hard",
|
|
452
|
+
soft: "soft"
|
|
453
|
+
};
|
|
454
|
+
const SPELLCHECK = {
|
|
455
|
+
true: true,
|
|
456
|
+
false: false,
|
|
457
|
+
default: "default"
|
|
458
|
+
};
|
|
459
|
+
const VvTextareaEvents = ["update:modelValue", "focus", "blur", "keyup"];
|
|
460
|
+
const VvTextareaProps = {
|
|
461
|
+
...InputTextareaProps,
|
|
462
|
+
/**
|
|
463
|
+
* Textarea value
|
|
464
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
|
|
465
|
+
*/
|
|
466
|
+
modelValue: String,
|
|
467
|
+
/**
|
|
468
|
+
* The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
|
|
469
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
|
|
470
|
+
*/
|
|
471
|
+
cols: { type: [String, Number], default: 20 },
|
|
472
|
+
/**
|
|
473
|
+
* The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
|
|
474
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
|
|
475
|
+
*/
|
|
476
|
+
rows: { type: [String, Number], default: 2 },
|
|
477
|
+
/**
|
|
478
|
+
* Indicates how the control should wrap the value for form submission.
|
|
479
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
480
|
+
*/
|
|
481
|
+
wrap: { type: String, default: WRAP.soft },
|
|
482
|
+
/**
|
|
483
|
+
* Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
|
|
484
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
485
|
+
*/
|
|
486
|
+
spellcheck: { type: [Boolean, String], default: SPELLCHECK.default },
|
|
487
|
+
/**
|
|
488
|
+
* If true, the textarea will be resizable
|
|
489
|
+
*/
|
|
490
|
+
resizable: Boolean
|
|
491
|
+
};
|
|
492
|
+
function isEmpty(value) {
|
|
493
|
+
return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
|
|
494
|
+
}
|
|
495
|
+
function isString(value) {
|
|
496
|
+
return typeof value === "string" || value instanceof String;
|
|
497
|
+
}
|
|
498
|
+
function joinLines(items) {
|
|
499
|
+
if (Array.isArray(items)) {
|
|
500
|
+
return items.filter((item) => isString(item)).join(" ");
|
|
501
|
+
}
|
|
502
|
+
return items;
|
|
503
|
+
}
|
|
504
|
+
function HintSlotFactory(propsOrRef, slots) {
|
|
505
|
+
const props = computed(() => {
|
|
506
|
+
if (isRef(propsOrRef)) {
|
|
507
|
+
return propsOrRef.value;
|
|
508
|
+
}
|
|
509
|
+
return propsOrRef;
|
|
510
|
+
});
|
|
511
|
+
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
512
|
+
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
513
|
+
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
514
|
+
const hintLabel = computed(() => props.value.hintLabel);
|
|
515
|
+
const hasLoadingLabelOrSlot = computed(
|
|
516
|
+
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
517
|
+
);
|
|
518
|
+
const hasInvalidLabelOrSlot = computed(
|
|
519
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
520
|
+
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
521
|
+
)
|
|
522
|
+
);
|
|
523
|
+
const hasValidLabelOrSlot = computed(
|
|
524
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
525
|
+
);
|
|
526
|
+
const hasHintLabelOrSlot = computed(
|
|
527
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
528
|
+
);
|
|
529
|
+
const isVisible = computed(
|
|
530
|
+
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
531
|
+
);
|
|
532
|
+
const hintSlotScope = computed(() => ({
|
|
533
|
+
modelValue: props.value.modelValue,
|
|
534
|
+
valid: props.value.valid,
|
|
535
|
+
invalid: props.value.invalid,
|
|
536
|
+
loading: props.value.loading
|
|
537
|
+
}));
|
|
538
|
+
const HintSlot = defineComponent({
|
|
539
|
+
name: "HintSlot",
|
|
540
|
+
props: {
|
|
541
|
+
tag: {
|
|
542
|
+
type: String,
|
|
543
|
+
default: "small"
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
setup() {
|
|
547
|
+
return {
|
|
548
|
+
isVisible,
|
|
549
|
+
invalidLabel,
|
|
550
|
+
validLabel,
|
|
551
|
+
loadingLabel,
|
|
552
|
+
hintLabel,
|
|
553
|
+
hasInvalidLabelOrSlot,
|
|
554
|
+
hasValidLabelOrSlot,
|
|
555
|
+
hasLoadingLabelOrSlot,
|
|
556
|
+
hasHintLabelOrSlot
|
|
557
|
+
};
|
|
558
|
+
},
|
|
559
|
+
render() {
|
|
560
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
561
|
+
if (this.isVisible) {
|
|
562
|
+
let role;
|
|
563
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
564
|
+
role = "alert";
|
|
565
|
+
}
|
|
566
|
+
if (this.hasValidLabelOrSlot) {
|
|
567
|
+
role = "status";
|
|
568
|
+
}
|
|
569
|
+
if (this.hasLoadingLabelOrSlot) {
|
|
570
|
+
return h(
|
|
571
|
+
this.tag,
|
|
572
|
+
{
|
|
573
|
+
role
|
|
574
|
+
},
|
|
575
|
+
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
579
|
+
return h(
|
|
580
|
+
this.tag,
|
|
581
|
+
{
|
|
582
|
+
role
|
|
583
|
+
},
|
|
584
|
+
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
if (this.hasValidLabelOrSlot) {
|
|
588
|
+
return h(
|
|
589
|
+
this.tag,
|
|
590
|
+
{
|
|
591
|
+
role
|
|
592
|
+
},
|
|
593
|
+
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
594
|
+
);
|
|
595
|
+
}
|
|
596
|
+
return h(
|
|
597
|
+
this.tag,
|
|
598
|
+
{
|
|
599
|
+
role
|
|
600
|
+
},
|
|
601
|
+
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
return null;
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
return {
|
|
608
|
+
hasInvalidLabelOrSlot,
|
|
609
|
+
hasHintLabelOrSlot,
|
|
610
|
+
hasValidLabelOrSlot,
|
|
611
|
+
hasLoadingLabelOrSlot,
|
|
612
|
+
hintSlotScope,
|
|
613
|
+
HintSlot
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
const VvIconPropsDefaults = {
|
|
617
|
+
prefix: "normal"
|
|
618
|
+
/* normal */
|
|
619
|
+
};
|
|
620
|
+
function useVolver() {
|
|
621
|
+
return inject(INJECTION_KEY_VOLVER);
|
|
622
|
+
}
|
|
623
|
+
function useModifiers(prefix, modifiers, others) {
|
|
624
|
+
return computed(() => {
|
|
625
|
+
const toReturn = {
|
|
626
|
+
[prefix]: true
|
|
627
|
+
};
|
|
628
|
+
const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
|
|
629
|
+
if (modifiersArray) {
|
|
630
|
+
if (Array.isArray(modifiersArray)) {
|
|
631
|
+
modifiersArray.forEach((modifier) => {
|
|
632
|
+
if (modifier) {
|
|
633
|
+
toReturn[`${prefix}--${modifier}`] = true;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
if (others) {
|
|
639
|
+
Object.keys(others.value).forEach((key) => {
|
|
640
|
+
toReturn[`${prefix}--${key}`] = unref(others.value[key]);
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
return toReturn;
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
const __default__$1 = {
|
|
647
|
+
name: "VvIcon"
|
|
703
648
|
};
|
|
704
|
-
({
|
|
705
|
-
...
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
type:
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
649
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
650
|
+
...__default__$1,
|
|
651
|
+
props: /* @__PURE__ */ mergeDefaults({
|
|
652
|
+
name: {},
|
|
653
|
+
color: {},
|
|
654
|
+
width: {},
|
|
655
|
+
height: {},
|
|
656
|
+
provider: {},
|
|
657
|
+
prefix: {},
|
|
658
|
+
src: {},
|
|
659
|
+
horizontalFlip: { type: Boolean },
|
|
660
|
+
verticalFlip: { type: Boolean },
|
|
661
|
+
flip: {},
|
|
662
|
+
mode: {},
|
|
663
|
+
inline: { type: Boolean },
|
|
664
|
+
rotate: {},
|
|
665
|
+
onLoad: { type: Function },
|
|
666
|
+
svg: {},
|
|
667
|
+
modifiers: {}
|
|
668
|
+
}, VvIconPropsDefaults),
|
|
669
|
+
setup(__props) {
|
|
670
|
+
const props = __props;
|
|
671
|
+
const hasRotate = computed(() => {
|
|
672
|
+
if (typeof props.rotate === "string") {
|
|
673
|
+
return Number.parseFloat(props.rotate);
|
|
674
|
+
}
|
|
675
|
+
return props.rotate;
|
|
676
|
+
});
|
|
677
|
+
const show = ref(true);
|
|
678
|
+
const volver = useVolver();
|
|
679
|
+
const { modifiers } = toRefs(props);
|
|
680
|
+
const bemCssClasses = useModifiers("vv-icon", modifiers);
|
|
681
|
+
const provider = computed(() => {
|
|
682
|
+
return props.provider || (volver == null ? void 0 : volver.iconsProvider);
|
|
683
|
+
});
|
|
684
|
+
const icon = computed(() => {
|
|
685
|
+
const name = props.name ?? "";
|
|
686
|
+
const iconName = `@${provider.value}:${props.prefix}:${name}`;
|
|
687
|
+
if (iconExists(iconName)) {
|
|
688
|
+
return iconName;
|
|
689
|
+
}
|
|
690
|
+
const iconsCollection = volver == null ? void 0 : volver.iconsCollections.find(
|
|
691
|
+
(iconsCollection2) => {
|
|
692
|
+
const icon2 = `@${provider.value}:${iconsCollection2.prefix}:${name}`;
|
|
693
|
+
return iconExists(icon2);
|
|
694
|
+
}
|
|
695
|
+
);
|
|
696
|
+
if (iconsCollection) {
|
|
697
|
+
return `@${provider.value}:${iconsCollection.prefix}:${name}`;
|
|
698
|
+
}
|
|
699
|
+
return name;
|
|
700
|
+
});
|
|
701
|
+
function getSvgContent(svg) {
|
|
702
|
+
let dom;
|
|
703
|
+
if (typeof window === "undefined") {
|
|
704
|
+
const { JSDOM } = require("jsdom");
|
|
705
|
+
dom = new JSDOM().window;
|
|
706
|
+
}
|
|
707
|
+
const domParser = dom ? new dom.DOMParser() : new window.DOMParser();
|
|
708
|
+
const svgDomString = domParser.parseFromString(svg, "text/html");
|
|
709
|
+
const svgEl = svgDomString.querySelector("svg");
|
|
710
|
+
return svgEl;
|
|
711
|
+
}
|
|
712
|
+
function addIconFromSvg(svg) {
|
|
713
|
+
const svgContentEl = getSvgContent(svg);
|
|
714
|
+
const svgContent = (svgContentEl == null ? void 0 : svgContentEl.innerHTML.trim()) || "";
|
|
715
|
+
if (svgContentEl && svgContent) {
|
|
716
|
+
addIcon(`@${provider.value}:${props.prefix}:${props.name}`, {
|
|
717
|
+
body: svgContent,
|
|
718
|
+
// Set height and width from svg content
|
|
719
|
+
height: svgContentEl.viewBox.baseVal.height,
|
|
720
|
+
width: svgContentEl.viewBox.baseVal.width
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
if (volver) {
|
|
725
|
+
if (props.src && !iconExists(`@${provider.value}:${props.prefix}:${props.name}`)) {
|
|
726
|
+
show.value = false;
|
|
727
|
+
volver.fetchIcon(props.src).then((svg) => {
|
|
728
|
+
if (svg) {
|
|
729
|
+
addIconFromSvg(svg);
|
|
730
|
+
show.value = true;
|
|
731
|
+
}
|
|
732
|
+
}).catch((e) => {
|
|
733
|
+
throw new Error(`Error during fetch icon: ${e == null ? void 0 : e.message}`);
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
if (props.svg) {
|
|
738
|
+
addIconFromSvg(props.svg);
|
|
739
|
+
}
|
|
740
|
+
return (_ctx, _cache) => {
|
|
741
|
+
return unref(show) ? (openBlock(), createBlock(unref(Icon), mergeProps({
|
|
742
|
+
key: 0,
|
|
743
|
+
class: unref(bemCssClasses)
|
|
744
|
+
}, {
|
|
745
|
+
inline: _ctx.inline,
|
|
746
|
+
width: _ctx.width,
|
|
747
|
+
height: _ctx.height,
|
|
748
|
+
horizontalFlip: _ctx.horizontalFlip,
|
|
749
|
+
verticalFlip: _ctx.verticalFlip,
|
|
750
|
+
flip: _ctx.flip,
|
|
751
|
+
rotate: unref(hasRotate),
|
|
752
|
+
color: _ctx.color,
|
|
753
|
+
onLoad: _ctx.onLoad,
|
|
754
|
+
icon: unref(icon)
|
|
755
|
+
}), null, 16, ["class"])) : createCommentVNode("v-if", true);
|
|
756
|
+
};
|
|
725
757
|
}
|
|
726
758
|
});
|
|
727
|
-
const WRAP = {
|
|
728
|
-
hard: "hard",
|
|
729
|
-
soft: "soft"
|
|
730
|
-
};
|
|
731
|
-
const SPELLCHECK = {
|
|
732
|
-
true: true,
|
|
733
|
-
false: false,
|
|
734
|
-
default: "default"
|
|
735
|
-
};
|
|
736
|
-
const VvTextareaEvents = ["update:modelValue", "focus", "blur", "keyup"];
|
|
737
|
-
const VvTextareaProps = {
|
|
738
|
-
...InputTextareaProps,
|
|
739
|
-
/**
|
|
740
|
-
* Textarea value
|
|
741
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#value
|
|
742
|
-
*/
|
|
743
|
-
modelValue: String,
|
|
744
|
-
/**
|
|
745
|
-
* The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
|
|
746
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#cols
|
|
747
|
-
*/
|
|
748
|
-
cols: { type: [String, Number], default: 20 },
|
|
749
|
-
/**
|
|
750
|
-
* The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.
|
|
751
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#rows
|
|
752
|
-
*/
|
|
753
|
-
rows: { type: [String, Number], default: 2 },
|
|
754
|
-
/**
|
|
755
|
-
* Indicates how the control should wrap the value for form submission.
|
|
756
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
757
|
-
*/
|
|
758
|
-
wrap: { type: String, default: WRAP.soft },
|
|
759
|
-
/**
|
|
760
|
-
* Specifies whether the <textarea> is subject to spell checking by the underlying browser/OS.
|
|
761
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap
|
|
762
|
-
*/
|
|
763
|
-
spellcheck: { type: [Boolean, String], default: SPELLCHECK.default },
|
|
764
|
-
/**
|
|
765
|
-
* If true, the textarea will be resizable
|
|
766
|
-
*/
|
|
767
|
-
resizable: Boolean
|
|
768
|
-
};
|
|
769
759
|
function useDefaults(componentName, propsDefinition, props) {
|
|
770
760
|
const volver = useVolver();
|
|
771
761
|
const volverComponentDefaults = computed(() => {
|
|
@@ -819,14 +809,16 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
819
809
|
}, {});
|
|
820
810
|
});
|
|
821
811
|
}
|
|
822
|
-
|
|
812
|
+
function useUniqueId(id) {
|
|
813
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
814
|
+
}
|
|
823
815
|
function useDebouncedInput(modelValue, emit, ms = 0, {
|
|
824
816
|
getter = (value) => value,
|
|
825
817
|
setter = (value) => value
|
|
826
818
|
} = {}) {
|
|
827
819
|
let timeout;
|
|
828
820
|
if (typeof ms === "string") {
|
|
829
|
-
ms = parseInt(ms);
|
|
821
|
+
ms = Number.parseInt(ms);
|
|
830
822
|
}
|
|
831
823
|
return computed({
|
|
832
824
|
get: () => getter(modelValue == null ? void 0 : modelValue.value),
|
|
@@ -841,30 +833,30 @@ function useDebouncedInput(modelValue, emit, ms = 0, {
|
|
|
841
833
|
});
|
|
842
834
|
}
|
|
843
835
|
function useComponentIcon(icon, iconPosition) {
|
|
836
|
+
const hasIcon = computed(() => {
|
|
837
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
838
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
839
|
+
}
|
|
840
|
+
return icon == null ? void 0 : icon.value;
|
|
841
|
+
});
|
|
844
842
|
const hasIconBefore = computed(
|
|
845
|
-
() =>
|
|
843
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
846
844
|
);
|
|
847
845
|
const hasIconAfter = computed(
|
|
848
|
-
() =>
|
|
846
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
849
847
|
);
|
|
850
848
|
const hasIconLeft = computed(
|
|
851
|
-
() =>
|
|
849
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
852
850
|
);
|
|
853
851
|
const hasIconRight = computed(
|
|
854
|
-
() =>
|
|
852
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
855
853
|
);
|
|
856
854
|
const hasIconTop = computed(
|
|
857
|
-
() =>
|
|
855
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
858
856
|
);
|
|
859
857
|
const hasIconBottom = computed(
|
|
860
|
-
() =>
|
|
858
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
861
859
|
);
|
|
862
|
-
const hasIcon = computed(() => {
|
|
863
|
-
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
864
|
-
return { name: icon == null ? void 0 : icon.value };
|
|
865
|
-
}
|
|
866
|
-
return icon == null ? void 0 : icon.value;
|
|
867
|
-
});
|
|
868
860
|
return {
|
|
869
861
|
hasIcon,
|
|
870
862
|
hasIconLeft,
|
|
@@ -941,8 +933,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
941
933
|
...__default__,
|
|
942
934
|
props: VvTextareaProps,
|
|
943
935
|
emits: VvTextareaEvents,
|
|
944
|
-
setup(__props, { emit }) {
|
|
936
|
+
setup(__props, { emit: __emit }) {
|
|
945
937
|
const props = __props;
|
|
938
|
+
const emit = __emit;
|
|
946
939
|
const slots = useSlots();
|
|
947
940
|
const propsDefaults = useDefaults(
|
|
948
941
|
"VvTextarea",
|
|
@@ -971,10 +964,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
971
964
|
() => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
|
|
972
965
|
);
|
|
973
966
|
const localModelValue = useDebouncedInput(modelValue, emit, debounce == null ? void 0 : debounce.value);
|
|
974
|
-
const {
|
|
975
|
-
icon,
|
|
976
|
-
iconPosition
|
|
977
|
-
);
|
|
967
|
+
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
978
968
|
const { focused } = useComponentFocus(textarea, emit);
|
|
979
969
|
const isVisible = useElementVisibility(textarea);
|
|
980
970
|
watch(isVisible, (newValue) => {
|
|
@@ -1011,34 +1001,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1011
1001
|
"vv-textarea",
|
|
1012
1002
|
modifiers,
|
|
1013
1003
|
computed(() => ({
|
|
1014
|
-
valid: valid.value,
|
|
1015
|
-
invalid: invalid.value,
|
|
1016
|
-
loading: loading.value,
|
|
1017
|
-
disabled: props.disabled,
|
|
1018
|
-
readonly: props.readonly,
|
|
1019
|
-
"icon-before": hasIconBefore.value,
|
|
1020
|
-
"icon-after": hasIconAfter.value,
|
|
1021
|
-
floating: props.floating && !isEmpty(props.label),
|
|
1022
|
-
dirty: isDirty.value,
|
|
1023
|
-
|
|
1024
|
-
resizable: props.resizable
|
|
1004
|
+
"valid": valid.value,
|
|
1005
|
+
"invalid": invalid.value,
|
|
1006
|
+
"loading": loading.value,
|
|
1007
|
+
"disabled": props.disabled,
|
|
1008
|
+
"readonly": props.readonly,
|
|
1009
|
+
"icon-before": hasIconBefore.value !== void 0,
|
|
1010
|
+
"icon-after": hasIconAfter.value !== void 0,
|
|
1011
|
+
"floating": props.floating && !isEmpty(props.label),
|
|
1012
|
+
"dirty": isDirty.value,
|
|
1013
|
+
"focus": focused.value,
|
|
1014
|
+
"resizable": props.resizable
|
|
1025
1015
|
}))
|
|
1026
1016
|
);
|
|
1027
1017
|
const hasAttrs = computed(
|
|
1028
1018
|
() => ({
|
|
1029
|
-
name: props.name,
|
|
1030
|
-
placeholder: hasPlaceholder.value,
|
|
1031
|
-
tabindex: hasTabindex.value,
|
|
1032
|
-
disabled: props.disabled,
|
|
1033
|
-
readonly: props.readonly,
|
|
1034
|
-
required: props.required,
|
|
1035
|
-
autocomplete: props.autocomplete,
|
|
1036
|
-
minlength: props.minlength,
|
|
1037
|
-
maxlength: props.maxlength,
|
|
1038
|
-
cols: props.cols,
|
|
1039
|
-
rows: props.rows,
|
|
1040
|
-
wrap: props.wrap,
|
|
1041
|
-
spellcheck: props.spellcheck,
|
|
1019
|
+
"name": props.name,
|
|
1020
|
+
"placeholder": hasPlaceholder.value,
|
|
1021
|
+
"tabindex": hasTabindex.value,
|
|
1022
|
+
"disabled": props.disabled,
|
|
1023
|
+
"readonly": props.readonly,
|
|
1024
|
+
"required": props.required,
|
|
1025
|
+
"autocomplete": props.autocomplete,
|
|
1026
|
+
"minlength": props.minlength,
|
|
1027
|
+
"maxlength": props.maxlength,
|
|
1028
|
+
"cols": props.cols,
|
|
1029
|
+
"rows": props.rows,
|
|
1030
|
+
"wrap": props.wrap,
|
|
1031
|
+
"spellcheck": props.spellcheck,
|
|
1042
1032
|
"aria-invalid": isInvalid.value,
|
|
1043
1033
|
"aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
|
|
1044
1034
|
"aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
|
|
@@ -1053,85 +1043,104 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1053
1043
|
minlength: props.minlength,
|
|
1054
1044
|
clear: onClear
|
|
1055
1045
|
}));
|
|
1056
|
-
|
|
1046
|
+
function onClear() {
|
|
1057
1047
|
localModelValue.value = void 0;
|
|
1058
|
-
}
|
|
1048
|
+
}
|
|
1059
1049
|
return (_ctx, _cache) => {
|
|
1060
|
-
return openBlock(), createElementBlock(
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1050
|
+
return openBlock(), createElementBlock(
|
|
1051
|
+
"div",
|
|
1052
|
+
{
|
|
1053
|
+
class: normalizeClass(unref(bemCssClasses))
|
|
1054
|
+
},
|
|
1055
|
+
[
|
|
1056
|
+
unref(label) ? (openBlock(), createElementBlock("label", {
|
|
1057
|
+
key: 0,
|
|
1058
|
+
for: unref(hasId),
|
|
1059
|
+
class: "vv-textarea__label"
|
|
1060
|
+
}, toDisplayString(unref(label)), 9, _hoisted_1)) : createCommentVNode("v-if", true),
|
|
1061
|
+
createElementVNode("div", _hoisted_2, [
|
|
1062
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
1063
|
+
renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1064
|
+
])) : createCommentVNode("v-if", true),
|
|
1065
|
+
createElementVNode("div", _hoisted_4, [
|
|
1066
|
+
unref(hasIconBefore) ? (openBlock(), createBlock(
|
|
1067
|
+
_sfc_main$1,
|
|
1068
|
+
mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-textarea__icon" }),
|
|
1069
|
+
null,
|
|
1070
|
+
16
|
|
1071
|
+
/* FULL_PROPS */
|
|
1072
|
+
)) : createCommentVNode("v-if", true),
|
|
1073
|
+
withDirectives(createElementVNode("textarea", mergeProps({
|
|
1074
|
+
id: unref(hasId),
|
|
1075
|
+
ref_key: "textarea",
|
|
1076
|
+
ref: textarea,
|
|
1077
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
|
|
1078
|
+
}, unref(hasAttrs), {
|
|
1079
|
+
onKeyup: _cache[1] || (_cache[1] = ($event) => emit("keyup", $event))
|
|
1080
|
+
}), null, 16, _hoisted_5), [
|
|
1081
|
+
[vModelText, unref(localModelValue)]
|
|
1082
|
+
]),
|
|
1083
|
+
unref(hasIconAfter) ? (openBlock(), createBlock(
|
|
1084
|
+
_sfc_main$1,
|
|
1085
|
+
mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-textarea__icon vv-textarea__icon-after" }),
|
|
1086
|
+
null,
|
|
1087
|
+
16
|
|
1088
|
+
/* FULL_PROPS */
|
|
1089
|
+
)) : createCommentVNode("v-if", true)
|
|
1086
1090
|
]),
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
1092
|
+
renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
|
|
1093
|
+
])) : createCommentVNode("v-if", true),
|
|
1094
|
+
unref(count) ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
1095
|
+
renderSlot(_ctx.$slots, "count", normalizeProps(guardReactiveProps(unref(slotProps))), () => [
|
|
1096
|
+
createTextVNode(
|
|
1097
|
+
toDisplayString(unref(countFormatted)),
|
|
1098
|
+
1
|
|
1099
|
+
/* TEXT */
|
|
1100
|
+
)
|
|
1101
|
+
])
|
|
1102
|
+
])) : createCommentVNode("v-if", true)
|
|
1091
1103
|
]),
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
} : void 0
|
|
1133
|
-
]), 1032, ["id"])
|
|
1134
|
-
], 2);
|
|
1104
|
+
createVNode(unref(HintSlot), {
|
|
1105
|
+
id: unref(hasHintId),
|
|
1106
|
+
class: "vv-textarea__hint"
|
|
1107
|
+
}, createSlots({
|
|
1108
|
+
_: 2
|
|
1109
|
+
/* DYNAMIC */
|
|
1110
|
+
}, [
|
|
1111
|
+
_ctx.$slots.hint ? {
|
|
1112
|
+
name: "hint",
|
|
1113
|
+
fn: withCtx(() => [
|
|
1114
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1115
|
+
]),
|
|
1116
|
+
key: "0"
|
|
1117
|
+
} : void 0,
|
|
1118
|
+
_ctx.$slots.loading ? {
|
|
1119
|
+
name: "loading",
|
|
1120
|
+
fn: withCtx(() => [
|
|
1121
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1122
|
+
]),
|
|
1123
|
+
key: "1"
|
|
1124
|
+
} : void 0,
|
|
1125
|
+
_ctx.$slots.valid ? {
|
|
1126
|
+
name: "valid",
|
|
1127
|
+
fn: withCtx(() => [
|
|
1128
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1129
|
+
]),
|
|
1130
|
+
key: "2"
|
|
1131
|
+
} : void 0,
|
|
1132
|
+
_ctx.$slots.invalid ? {
|
|
1133
|
+
name: "invalid",
|
|
1134
|
+
fn: withCtx(() => [
|
|
1135
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
1136
|
+
]),
|
|
1137
|
+
key: "3"
|
|
1138
|
+
} : void 0
|
|
1139
|
+
]), 1032, ["id"])
|
|
1140
|
+
],
|
|
1141
|
+
2
|
|
1142
|
+
/* CLASS */
|
|
1143
|
+
);
|
|
1135
1144
|
};
|
|
1136
1145
|
}
|
|
1137
1146
|
});
|