@volverjs/ui-vue 0.0.10-beta.34 → 0.0.10-beta.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -77
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +5 -5
- package/dist/Volver.d.ts +10 -10
- package/dist/components/VvAccordion/VvAccordion.es.js +11 -11
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +17 -17
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.es.js +6 -6
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +23 -21
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/index.d.ts +2 -2
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +351 -349
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +3 -3
- package/dist/components/VvAlertGroup/index.d.ts +1 -1
- package/dist/components/VvAvatar/VvAvatar.es.js +4 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +11 -3
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +10 -10
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +31 -25
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +208 -202
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +3 -3
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +21 -15
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/VvCombobox/VvCombobox.es.js +454 -446
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +5 -5
- package/dist/components/VvCombobox/index.d.ts +5 -10
- package/dist/components/VvDialog/VvDialog.es.js +11 -11
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +29 -25
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +12 -8
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +11 -14
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +61 -55
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +2 -2
- package/dist/components/VvInputFile/index.d.ts +6 -6
- package/dist/components/VvInputText/VvInputText.es.js +287 -286
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +2 -2
- package/dist/components/VvInputText/index.d.ts +7 -2
- package/dist/components/VvNav/VvNav.es.js +23 -20
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.es.js +6 -6
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +208 -202
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +21 -15
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +22 -20
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +2 -2
- package/dist/components/VvTab/VvTab.es.js +29 -23
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +29 -27
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +2 -2
- package/dist/components/VvTooltip/VvTooltip.es.js +4 -1
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/common/HintSlot.d.ts +3 -4
- package/dist/components/index.es.js +893 -876
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +2 -2
- package/dist/composables/index.es.js +10 -10
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +1 -1
- package/dist/composables/usePersistence.d.ts +2 -1
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/directives/index.es.js +5 -2
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +1 -1
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +4 -1
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.es.js +2 -2
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
- package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Badge/Badge.test.d.ts +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
- package/dist/test/options.d.ts +1 -1
- package/dist/test/sleep.d.ts +1 -1
- package/dist/types/alert.d.ts +1 -1
- package/dist/utils/ObjectUtilities.d.ts +7 -7
- package/package.json +232 -239
- package/src/Volver.ts +243 -243
- 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 +155 -155
- package/src/components/VvAccordion/index.ts +62 -62
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +220 -219
- package/src/components/VvAccordionGroup/index.ts +41 -41
- package/src/components/VvAction/VvAction.vue +144 -142
- package/src/components/VvAlert/VvAlert.vue +72 -70
- package/src/components/VvAlert/index.ts +147 -150
- package/src/components/VvAlertGroup/VvAlertGroup.vue +56 -55
- package/src/components/VvAlertGroup/index.ts +99 -103
- 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 +49 -48
- package/src/components/VvBreadcrumb/index.ts +2 -2
- package/src/components/VvButton/VvButton.vue +163 -162
- package/src/components/VvButton/index.ts +102 -102
- package/src/components/VvButtonGroup/VvButtonGroup.vue +72 -72
- package/src/components/VvButtonGroup/index.ts +22 -22
- package/src/components/VvCard/VvCard.vue +30 -30
- package/src/components/VvCard/index.ts +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +185 -180
- package/src/components/VvCheckbox/index.ts +44 -44
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +88 -86
- package/src/components/VvCombobox/VvCombobox.vue +633 -623
- package/src/components/VvCombobox/index.ts +166 -166
- package/src/components/VvDialog/VvDialog.vue +131 -129
- package/src/components/VvDialog/index.ts +35 -35
- package/src/components/VvDropdown/VvDropdown.vue +464 -452
- package/src/components/VvDropdown/VvDropdownAction.vue +37 -39
- package/src/components/VvDropdown/VvDropdownItem.vue +29 -28
- package/src/components/VvDropdown/VvDropdownOptgroup.vue +13 -12
- package/src/components/VvDropdown/VvDropdownOption.vue +47 -47
- package/src/components/VvDropdown/index.ts +53 -53
- package/src/components/VvIcon/README.md +1 -1
- package/src/components/VvIcon/VvIcon.vue +133 -133
- package/src/components/VvIcon/index.ts +77 -77
- package/src/components/VvInputFile/VvInputFile.vue +367 -363
- package/src/components/VvInputFile/index.ts +125 -125
- package/src/components/VvInputText/VvInputClearAction.ts +50 -50
- package/src/components/VvInputText/VvInputPasswordAction.ts +65 -65
- package/src/components/VvInputText/VvInputStepAction.ts +43 -43
- package/src/components/VvInputText/VvInputText.vue +636 -637
- package/src/components/VvInputText/VvInputTextActions.ts +86 -86
- package/src/components/VvInputText/index.ts +198 -198
- package/src/components/VvNav/VvNav.vue +40 -33
- 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 -26
- package/src/components/VvProgress/index.ts +28 -28
- package/src/components/VvRadio/VvRadio.vue +115 -112
- package/src/components/VvRadio/index.ts +27 -27
- package/src/components/VvRadioGroup/VvRadioGroup.vue +91 -89
- package/src/components/VvSelect/VvSelect.vue +241 -238
- package/src/components/VvSelect/index.ts +62 -62
- package/src/components/VvTab/VvTab.vue +79 -73
- package/src/components/VvTab/index.ts +12 -12
- package/src/components/VvTextarea/VvTextarea.vue +218 -216
- 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 +149 -150
- package/src/composables/alert/useAlert.ts +74 -74
- package/src/composables/alert/useInjectAlert.ts +1 -1
- package/src/composables/alert/useProvideAlert.ts +10 -10
- package/src/composables/dropdown/useInjectDropdown.ts +6 -6
- package/src/composables/dropdown/useProvideDropdown.ts +62 -62
- package/src/composables/group/useInjectedGroupState.ts +41 -41
- package/src/composables/group/useProvideGroupState.ts +1 -2
- package/src/composables/useBlurhash.ts +52 -60
- package/src/composables/useComponentFocus.ts +9 -9
- package/src/composables/useComponentIcon.ts +35 -35
- package/src/composables/useDebouncedInput.ts +25 -25
- package/src/composables/useDefaults.ts +77 -76
- package/src/composables/useModifiers.ts +29 -29
- package/src/composables/useOptions.ts +45 -43
- package/src/composables/usePersistence.ts +70 -72
- package/src/composables/useTextCount.ts +44 -44
- package/src/composables/useUniqueId.ts +3 -2
- package/src/composables/useVolver.ts +1 -1
- package/src/constants.ts +70 -70
- package/src/directives/v-contextmenu.ts +34 -34
- package/src/directives/v-tooltip.ts +17 -17
- package/src/index.ts +3 -3
- package/src/props/index.ts +453 -453
- package/src/resolvers/unplugin.ts +138 -138
- package/src/shims.d.ts +4 -5
- package/src/stories/Accordion/Accordion.settings.ts +49 -49
- 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 +69 -67
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +37 -37
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +49 -47
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +34 -34
- package/src/stories/Alert/Alert.settings.ts +115 -115
- package/src/stories/Alert/Alert.stories.ts +30 -30
- package/src/stories/Alert/Alert.test.ts +78 -78
- 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 +104 -104
- package/src/stories/AlertGroup/AlertGroup.stories.ts +25 -25
- package/src/stories/AlertGroup/AlertGroup.test.ts +67 -67
- 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 +57 -57
- package/src/stories/Avatar/Avatar.settings.ts +29 -29
- package/src/stories/Avatar/Avatar.stories.ts +23 -23
- package/src/stories/Avatar/Avatar.test.ts +22 -22
- package/src/stories/Avatar/AvatarBadge.stories.ts +15 -15
- package/src/stories/Avatar/AvatarModifiers.stories.ts +61 -61
- package/src/stories/Avatar/AvatarSlots.stories.ts +18 -18
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +53 -53
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +17 -17
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +24 -24
- 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 +20 -20
- package/src/stories/Badge/Badge.stories.ts +23 -23
- 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 +77 -76
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +34 -34
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +22 -22
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +44 -43
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +17 -17
- package/src/stories/Button/Button.settings.ts +144 -144
- package/src/stories/Button/Button.stories.ts +18 -18
- package/src/stories/Button/Button.test.ts +41 -40
- 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 +32 -32
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +19 -19
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +23 -22
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +20 -20
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +18 -18
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +22 -22
- package/src/stories/Card/Card.settings.ts +48 -48
- package/src/stories/Card/Card.stories.ts +22 -22
- package/src/stories/Card/Card.test.ts +14 -14
- package/src/stories/Card/CardSlots.stories.ts +42 -42
- package/src/stories/Checkbox/Checkbox.settings.ts +35 -35
- package/src/stories/Checkbox/Checkbox.stories.ts +57 -57
- package/src/stories/Checkbox/Checkbox.test.ts +63 -62
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +17 -17
- 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 +63 -63
- 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 +390 -390
- package/src/stories/Combobox/Combobox.stories.ts +107 -107
- package/src/stories/Combobox/Combobox.test.ts +89 -87
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +24 -24
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +22 -22
- package/src/stories/Combobox/ComboboxOptions.stories.ts +84 -84
- package/src/stories/Combobox/ComboboxSlots.stories.ts +55 -55
- package/src/stories/Dialog/Dialog.settings.ts +39 -39
- package/src/stories/Dialog/Dialog.stories.ts +28 -28
- package/src/stories/Dialog/Dialog.test.ts +49 -49
- package/src/stories/Dialog/DialogSlots.stories.ts +20 -20
- package/src/stories/Dropdown/Dropdown.settings.ts +62 -62
- package/src/stories/Dropdown/Dropdown.stories.ts +59 -59
- package/src/stories/Dropdown/Dropdown.test.ts +9 -9
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +16 -16
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +18 -18
- package/src/stories/Dropdown/DropdownSlots.stories.ts +49 -49
- package/src/stories/Icon/Icon.settings.ts +64 -64
- package/src/stories/Icon/Icon.stories.ts +28 -28
- package/src/stories/Icon/IconsCollection.stories.ts +22 -22
- package/src/stories/InputFile/InputFile.settings.ts +29 -29
- package/src/stories/InputFile/InputFile.stories.ts +54 -54
- package/src/stories/InputFile/InputFileDropArea.stories.ts +34 -34
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +24 -24
- package/src/stories/InputFile/InputFileSlots.stories.ts +17 -17
- package/src/stories/InputText/InputText.settings.ts +245 -246
- package/src/stories/InputText/InputText.stories.ts +67 -67
- package/src/stories/InputText/InputText.test.ts +118 -117
- 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 +29 -29
- 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 +25 -25
- package/src/stories/Nav/Nav.stories.ts +17 -17
- package/src/stories/Nav/Nav.test.ts +10 -10
- package/src/stories/Nav/NavModifiers.stories.ts +25 -25
- package/src/stories/Progress/Progress.settings.ts +23 -23
- package/src/stories/Progress/Progress.stories.ts +23 -23
- package/src/stories/Progress/Progress.test.ts +4 -4
- 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 -53
- 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 +50 -50
- package/src/stories/RadioGroup/RadioGroup.test.ts +63 -63
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +34 -34
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +23 -23
- package/src/stories/Select/Select.settings.ts +70 -70
- package/src/stories/Select/Select.stories.ts +66 -66
- package/src/stories/Select/Select.test.ts +65 -64
- package/src/stories/Select/SelectIconPosition.stories.ts +24 -24
- package/src/stories/Select/SelectOptions.stories.ts +54 -54
- package/src/stories/Select/SelectSlots.stories.ts +20 -20
- package/src/stories/Tab/Tab.settings.ts +32 -32
- package/src/stories/Tab/Tab.stories.ts +17 -17
- package/src/stories/Tab/Tab.test.ts +17 -17
- package/src/stories/Textarea/Textarea.settings.ts +78 -79
- package/src/stories/Textarea/Textarea.stories.ts +63 -63
- package/src/stories/Textarea/Textarea.test.ts +70 -69
- 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 -16
- package/src/stories/Tooltip/Tooltip.stories.ts +18 -18
- package/src/stories/Tooltip/Tooltip.test.ts +53 -52
- package/src/stories/Tooltip/TooltipDirective.stories.ts +37 -37
- package/src/stories/argTypes.ts +484 -485
- package/src/test/expect.ts +71 -74
- package/src/test/options.ts +17 -16
- package/src/test/sleep.ts +3 -2
- package/src/test/types.d.ts +11 -11
- package/src/types/alert.ts +18 -18
- package/src/types/blurhash.ts +18 -18
- package/src/types/generic.ts +1 -2
- package/src/types/group.ts +21 -21
- package/src/types/input-file.ts +17 -17
- package/src/types/nav.ts +13 -13
- package/src/utils/ObjectUtilities.ts +192 -177
|
@@ -107,7 +107,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
const props = __props;
|
|
108
108
|
const hasRotate = computed(() => {
|
|
109
109
|
if (typeof props.rotate === "string") {
|
|
110
|
-
return parseFloat(props.rotate);
|
|
110
|
+
return Number.parseFloat(props.rotate);
|
|
111
111
|
}
|
|
112
112
|
return props.rotate;
|
|
113
113
|
});
|
|
@@ -774,7 +774,9 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
774
774
|
}, {});
|
|
775
775
|
});
|
|
776
776
|
}
|
|
777
|
-
|
|
777
|
+
function useUniqueId(id) {
|
|
778
|
+
return computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
779
|
+
}
|
|
778
780
|
function useComponentFocus(inputTemplateRef, emit) {
|
|
779
781
|
const { focused } = useFocus(inputTemplateRef);
|
|
780
782
|
watch(focused, (newValue) => {
|
|
@@ -931,28 +933,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
931
933
|
"vv-select",
|
|
932
934
|
modifiers,
|
|
933
935
|
computed(() => ({
|
|
934
|
-
valid: valid.value,
|
|
935
|
-
invalid: invalid.value,
|
|
936
|
-
loading: loading.value,
|
|
937
|
-
disabled: disabled.value,
|
|
938
|
-
readonly: readonly.value,
|
|
936
|
+
"valid": valid.value,
|
|
937
|
+
"invalid": invalid.value,
|
|
938
|
+
"loading": loading.value,
|
|
939
|
+
"disabled": disabled.value,
|
|
940
|
+
"readonly": readonly.value,
|
|
939
941
|
"icon-before": hasIconBefore.value !== void 0,
|
|
940
942
|
"icon-after": hasIconAfter.value !== void 0,
|
|
941
|
-
dirty: isDirty.value,
|
|
942
|
-
focus: focused.value,
|
|
943
|
-
floating: floating.value,
|
|
944
|
-
multiple: multiple.value
|
|
943
|
+
"dirty": isDirty.value,
|
|
944
|
+
"focus": focused.value,
|
|
945
|
+
"floating": floating.value,
|
|
946
|
+
"multiple": multiple.value
|
|
945
947
|
}))
|
|
946
948
|
);
|
|
947
949
|
const hasAttrs = computed(() => {
|
|
948
950
|
return {
|
|
949
|
-
name: props.name,
|
|
950
|
-
tabindex: hasTabindex.value,
|
|
951
|
-
disabled: isDisabled.value,
|
|
952
|
-
required: props.required,
|
|
953
|
-
size: props.size,
|
|
954
|
-
autocomplete: props.autocomplete,
|
|
955
|
-
multiple: props.multiple,
|
|
951
|
+
"name": props.name,
|
|
952
|
+
"tabindex": hasTabindex.value,
|
|
953
|
+
"disabled": isDisabled.value,
|
|
954
|
+
"required": props.required,
|
|
955
|
+
"size": props.size,
|
|
956
|
+
"autocomplete": props.autocomplete,
|
|
957
|
+
"multiple": props.multiple,
|
|
956
958
|
"aria-invalid": isInvalid.value,
|
|
957
959
|
"aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
|
|
958
960
|
"aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
|
|
@@ -980,11 +982,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
980
982
|
emit("update:modelValue", newValue);
|
|
981
983
|
}
|
|
982
984
|
});
|
|
983
|
-
|
|
985
|
+
function isGroup(option) {
|
|
984
986
|
if (typeof option === "string")
|
|
985
987
|
return false;
|
|
986
988
|
return option && option.options && option.options.length > 0;
|
|
987
|
-
}
|
|
989
|
+
}
|
|
988
990
|
return (_ctx, _cache) => {
|
|
989
991
|
return openBlock(), createElementBlock(
|
|
990
992
|
"div",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@iconify/vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid","@vueuse/core","ts-dot-prop"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvSelect=l(e.vue,e.vue$1,e.uid,e.core,e.tsDotProp)}(this,(function(e,l,t,o,a){"use strict";const n={prefix:"normal"};var i=(e=>(e.local="local",e.session="session",e))(i||{}),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||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{});const c=Symbol.for("volver");function v(){return e.inject(c)}function f(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const p=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(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=v(),{modifiers:r}=e.toRefs(o),u=f("vv-icon",r),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function m(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const b={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},h={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},g={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}}),B={readonly:{type:Boolean,default:!1}},k={modifiers:{type:[String,Array],default:void 0}},L={hintLabel:{type:String,default:""}},$={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},V={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},O={tabindex:{type:[String,Number],default:0}},w={floating:{type:Boolean,default:!1}},x={unselectable:{type:Boolean,default:!0}},E={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...E,name:{type:String,required:!0}},I={autofocus:{type:Boolean,default:!1}},N={autocomplete:{type:String,default:"off"}};d.button,s.button,i.local;const _={...P,...I,...N,...O,...b,...h,...L,...g,...y,...B,...k,...$,...V,...w,...x,...S,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};const j=["for"],A={class:"vv-select__wrapper"},C={key:0,class:"vv-select__input-before"},F={class:"vv-select__inner"},z=["id"],D=["disabled","hidden"],R=["disabled","value"],q=["disabled","label"],H=["disabled","value"],K={key:1,class:"vv-select__input-after"};return e.defineComponent({name:"VvSelect",props:_,emits:["update:modelValue","focus","blur"],setup(l,{emit:n}){const i=l,d=n,s=e.useSlots(),c=function(l,t,o){const a=v(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvSelect",_,i),b=e.ref(),{HintSlot:h,hasHintLabelOrSlot:g,hasInvalidLabelOrSlot:y,hintSlotScope:S}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>m(o.value.invalidLabel))),n=e.computed((()=>m(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var l,t,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==(t=(l=this.$slots).loading)?void 0:t.call(l))??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:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(c,s),{id:B,modifiers:k,disabled:L,readonly:$,loading:V,icon:O,iconPosition:w,invalid:x,valid:E,floating:P,multiple:I}=e.toRefs(i),N=(l=>e.computed((()=>String((null==l?void 0:l.value)||t.uid()))))(B),M=e.computed((()=>`${N.value}-hint`)),{focused:T}=function(l,t){const{focused:a}=o.useFocus(l);return e.watch(a,(o=>{t(o?"focus":"blur",e.unref(l))})),{focused:a}}(b,d),J=o.useElementVisibility(b);e.watch(J,(e=>{e&&i.autofocus&&(T.value=!0)}));const{hasIconBefore:G,hasIconAfter:U}=function(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===u.before?o.value:void 0)),n=e.computed((()=>(null==t?void 0:t.value)===u.after?o.value:void 0)),i=e.computed((()=>(null==t?void 0:t.value)===r.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===r.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===r.top?o.value:void 0)),c=e.computed((()=>(null==t?void 0:t.value)===r.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:i,hasIconRight:d,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:n}}(O,w),Q=e.computed((()=>{return l=i.modelValue,!(null==(t=e.unref(l))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var l,t})),W=e.computed((()=>i.disabled||i.readonly)),X=e.computed((()=>W.value?-1:i.tabindex)),Y=e.computed((()=>!0===i.invalid||!0!==i.valid&&void 0)),Z=f("vv-select",k,e.computed((()=>({valid:E.value,invalid:x.value,loading:V.value,disabled:L.value,readonly:$.value,"icon-before":void 0!==G.value,"icon-after":void 0!==U.value,dirty:Q.value,focus:T.value,floating:P.value,multiple:I.value})))),ee=e.computed((()=>({name:i.name,tabindex:X.value,disabled:W.value,required:i.required,size:i.size,autocomplete:i.autocomplete,multiple:i.multiple,"aria-invalid":Y.value,"aria-describedby":g.value?M.value:void 0,"aria-errormessage":y.value?M.value:void 0}))),le=e.computed((()=>({valid:i.valid,invalid:i.invalid,modelValue:i.modelValue}))),{getOptionLabel:te,getOptionValue:oe,isOptionDisabled:ae,getOptionGrouped:ne}=function(l){const{options:t,labelKey:o,valueKey:n,disabledKey:i}=e.toRefs(l);return{options:t,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof o.value?o.value(e):a.get(e,o.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):a.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):a.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(i),ie=e.computed({get:()=>i.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),d("update:modelValue",e)}}),re=e=>"string"!=typeof e&&(e&&e.options&&e.options.length>0);return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Z))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(N)},e.toDisplayString(l.label),9,j)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",A,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",F,[e.unref(G)?(e.openBlock(),e.createBlock(p,e.mergeProps({key:0},e.unref(G),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(N),ref_key:"select",ref:b,"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(ie)?ie.value=l:null)},e.unref(ee)),[l.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!l.unselectable,hidden:!l.unselectable},e.toDisplayString(l.placeholder),9,D)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,((l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[re(l)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${t}`,disabled:e.unref(ae)(l),label:e.unref(te)(l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne)(l),((l,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${t}-item-${o}`,disabled:e.unref(ae)(l),value:e.unref(oe)(l)},e.toDisplayString(e.unref(te)(l)),9,H)))),128))],8,q)):(e.openBlock(),e.createElementBlock("option",{key:t,disabled:e.unref(ae)(l),value:e.unref(oe)(l)},e.toDisplayString(e.unref(te)(l)),9,R))],64)))),256))],16,z),[[e.vModelSelect,e.unref(ie)]]),e.unref(U)?(e.openBlock(),e.createBlock(p,e.mergeProps({key:1},e.unref(U),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(h),{id:e.unref(M),class:"vv-select__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@iconify/vue"),require("uid"),require("@vueuse/core"),require("ts-dot-prop")):"function"==typeof define&&define.amd?define(["vue","@iconify/vue","uid","@vueuse/core","ts-dot-prop"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvSelect=l(e.vue,e.vue$1,e.uid,e.core,e.tsDotProp)}(this,(function(e,l,t,o,a){"use strict";const n={prefix:"normal"};var i=(e=>(e.local="local",e.session="session",e))(i||{}),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||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{});const c=Symbol.for("volver");function v(){return e.inject(c)}function f(l,t,o){return e.computed((()=>{const a={[l]:!0},n="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${l}--${e}`]=!0)})),o&&Object.keys(o.value).forEach((t=>{a[`${l}--${t}`]=e.unref(o.value[t])})),a}))}const p=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(t){const o=t,a=e.computed((()=>"string"==typeof o.rotate?Number.parseFloat(o.rotate):o.rotate)),n=e.ref(!0),i=v(),{modifiers:r}=e.toRefs(o),u=f("vv-icon",r),d=e.computed((()=>o.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=o.name??"",t=`@${d.value}:${o.prefix}:${e}`;if(l.iconExists(t))return t;const a=null==i?void 0:i.iconsCollections.find((t=>{const o=`@${d.value}:${t.prefix}:${e}`;return l.iconExists(o)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function c(e){const t=function(e){let l;if("undefined"==typeof window){const{JSDOM:e}=require("jsdom");l=(new e).window}return(l?new l.DOMParser:new window.DOMParser).parseFromString(e,"text/html").querySelector("svg")}(e),a=(null==t?void 0:t.innerHTML.trim())||"";t&&a&&l.addIcon(`@${d.value}:${o.prefix}:${o.name}`,{body:a,height:t.viewBox.baseVal.height,width:t.viewBox.baseVal.width})}return i&&o.src&&!l.iconExists(`@${d.value}:${o.prefix}:${o.name}`)&&(n.value=!1,i.fetchIcon(o.src).then((e=>{e&&(c(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),o.svg&&c(o.svg),(t,o)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(l.Icon),e.mergeProps({key:0,class:e.unref(u)},{inline:t.inline,width:t.width,height:t.height,horizontalFlip:t.horizontalFlip,verticalFlip:t.verticalFlip,flip:t.flip,rotate:e.unref(a),color:t.color,onLoad:t.onLoad,icon:e.unref(s)}),null,16,["class"])):e.createCommentVNode("v-if",!0)}});function m(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const b={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},h={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},g={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}}),B={readonly:{type:Boolean,default:!1}},k={modifiers:{type:[String,Array],default:void 0}},L={hintLabel:{type:String,default:""}},$={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},V={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:u.before,validation:e=>Object.values(u).includes(e)}},O={tabindex:{type:[String,Number],default:0}},w={floating:{type:Boolean,default:!1}},x={unselectable:{type:Boolean,default:!0}},E={id:[String,Number]};r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...E,name:{type:String,required:!0}},N={autofocus:{type:Boolean,default:!1}},I={autocomplete:{type:String,default:"off"}};d.button,s.button,i.local;const _={...P,...N,...I,...O,...b,...h,...L,...g,...y,...B,...k,...$,...V,...w,...x,...S,multiple:Boolean,required:Boolean,size:[String,Number],modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},placeholder:String};const j=["for"],A={class:"vv-select__wrapper"},C={key:0,class:"vv-select__input-before"},F={class:"vv-select__inner"},z=["id"],D=["disabled","hidden"],R=["disabled","value"],q=["disabled","label"],H=["disabled","value"],K={key:1,class:"vv-select__input-after"};return e.defineComponent({name:"VvSelect",props:_,emits:["update:modelValue","focus","blur"],setup(l,{emit:n}){const i=l,d=n,s=e.useSlots(),c=function(l,t,o){const a=v(),n=e.computed((()=>{var e;if(a&&(null==(e=a.defaults.value)?void 0:e[l]))return a.defaults.value[l]}));return e.computed((()=>{if(void 0===n.value)return o;const e=n.value,l=t,a=o;return Object.keys(l).reduce(((t,o)=>{const n=a[o];if(t[o]=n,o in e){if(Array.isArray(l[o])){const a=l[o];a.length&&a[0]===n&&(t[o]=e[o])}if("function"==typeof l[o]&&(0,l[o])()===n&&(t[o]=e[o]),"object"==typeof l[o]){let a=l[o].default;"function"==typeof a&&(a=a()),"object"==typeof a?JSON.stringify(a)===JSON.stringify(n)&&(t[o]=e[o]):a===n&&(t[o]=e[o])}}return t}),{})}))}("VvSelect",_,i),b=e.ref(),{HintSlot:h,hasHintLabelOrSlot:g,hasInvalidLabelOrSlot:y,hintSlotScope:S}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>m(o.value.invalidLabel))),n=e.computed((()=>m(o.value.validLabel))),i=e.computed((()=>o.value.loadingLabel)),r=e.computed((()=>o.value.hintLabel)),u=e.computed((()=>Boolean(o.value.loading&&(t.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(o.value.invalid&&(t.invalid||a.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(o.value.valid&&(t.valid||n.value)))),c=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),v=e.computed((()=>d.value||s.value||u.value||c.value)),f=e.computed((()=>({modelValue:o.value.modelValue,valid:o.value.valid,invalid:o.value.invalid,loading:o.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:c}),render(){var l,t,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==(t=(l=this.$slots).loading)?void 0:t.call(l))??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:d,hasHintLabelOrSlot:c,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(c,s),{id:B,modifiers:k,disabled:L,readonly:$,loading:V,icon:O,iconPosition:w,invalid:x,valid:E,floating:P,multiple:N}=e.toRefs(i),I=function(l){return e.computed((()=>String((null==l?void 0:l.value)||t.uid())))}(B),M=e.computed((()=>`${I.value}-hint`)),{focused:T}=function(l,t){const{focused:a}=o.useFocus(l);return e.watch(a,(o=>{t(o?"focus":"blur",e.unref(l))})),{focused:a}}(b,d),J=o.useElementVisibility(b);e.watch(J,(e=>{e&&i.autofocus&&(T.value=!0)}));const{hasIconBefore:G,hasIconAfter:U}=function(l,t){const o=e.computed((()=>"string"==typeof(null==l?void 0:l.value)?{name:null==l?void 0:l.value}:null==l?void 0:l.value)),a=e.computed((()=>(null==t?void 0:t.value)===u.before?o.value:void 0)),n=e.computed((()=>(null==t?void 0:t.value)===u.after?o.value:void 0)),i=e.computed((()=>(null==t?void 0:t.value)===r.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===r.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===r.top?o.value:void 0)),c=e.computed((()=>(null==t?void 0:t.value)===r.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:i,hasIconRight:d,hasIconTop:s,hasIconBottom:c,hasIconBefore:a,hasIconAfter:n}}(O,w),Q=e.computed((()=>{return l=i.modelValue,!(null==(t=e.unref(l))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var l,t})),W=e.computed((()=>i.disabled||i.readonly)),X=e.computed((()=>W.value?-1:i.tabindex)),Y=e.computed((()=>!0===i.invalid||!0!==i.valid&&void 0)),Z=f("vv-select",k,e.computed((()=>({valid:E.value,invalid:x.value,loading:V.value,disabled:L.value,readonly:$.value,"icon-before":void 0!==G.value,"icon-after":void 0!==U.value,dirty:Q.value,focus:T.value,floating:P.value,multiple:N.value})))),ee=e.computed((()=>({name:i.name,tabindex:X.value,disabled:W.value,required:i.required,size:i.size,autocomplete:i.autocomplete,multiple:i.multiple,"aria-invalid":Y.value,"aria-describedby":g.value?M.value:void 0,"aria-errormessage":y.value?M.value:void 0}))),le=e.computed((()=>({valid:i.valid,invalid:i.invalid,modelValue:i.modelValue}))),{getOptionLabel:te,getOptionValue:oe,isOptionDisabled:ae,getOptionGrouped:ne}=function(l){const{options:t,labelKey:o,valueKey:n,disabledKey:i}=e.toRefs(l);return{options:t,getOptionLabel:e=>"object"!=typeof e&&null!==e?e:String("function"==typeof o.value?o.value(e):a.get(e,o.value)),getOptionValue:e=>"object"!=typeof e&&null!==e?e:"function"==typeof n.value?n.value(e):a.get(e,n.value),isOptionDisabled:e=>("object"==typeof e||null===e)&&("function"==typeof i.value?i.value(e):a.get(e,i.value)),getOptionGrouped:e=>"object"!=typeof e&&null!==e?[]:e.options||[]}}(i),ie=e.computed({get:()=>i.modelValue,set:e=>{Array.isArray(e)&&(e=e.filter((e=>void 0!==e))),d("update:modelValue",e)}});function re(e){return"string"!=typeof e&&(e&&e.options&&e.options.length>0)}return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(Z))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(I)},e.toDisplayString(l.label),9,j)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",A,[l.$slots.before?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(l.$slots,"before",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",F,[e.unref(G)?(e.openBlock(),e.createBlock(p,e.mergeProps({key:0},e.unref(G),{class:"vv-select__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.withDirectives(e.createElementVNode("select",e.mergeProps({id:e.unref(I),ref_key:"select",ref:b,"onUpdate:modelValue":t[0]||(t[0]=l=>e.isRef(ie)?ie.value=l:null)},e.unref(ee)),[l.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,value:void 0,disabled:!l.unselectable,hidden:!l.unselectable},e.toDisplayString(l.placeholder),9,D)):e.createCommentVNode("v-if",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.options,((l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[re(l)?(e.openBlock(),e.createElementBlock("optgroup",{key:`group-${t}`,disabled:e.unref(ae)(l),label:e.unref(te)(l)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne)(l),((l,o)=>(e.openBlock(),e.createElementBlock("option",{key:`group-${t}-item-${o}`,disabled:e.unref(ae)(l),value:e.unref(oe)(l)},e.toDisplayString(e.unref(te)(l)),9,H)))),128))],8,q)):(e.openBlock(),e.createElementBlock("option",{key:t,disabled:e.unref(ae)(l),value:e.unref(oe)(l)},e.toDisplayString(e.unref(te)(l)),9,R))],64)))),256))],16,z),[[e.vModelSelect,e.unref(ie)]]),e.unref(U)?(e.openBlock(),e.createBlock(p,e.mergeProps({key:1},e.unref(U),{class:"vv-select__icon vv-select__icon-after"}),null,16)):e.createCommentVNode("v-if",!0)]),l.$slots.after?(e.openBlock(),e.createElementBlock("div",K,[e.renderSlot(l.$slots,"after",e.normalizeProps(e.guardReactiveProps(e.unref(le))))])):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(h),{id:e.unref(M),class:"vv-select__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(S))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
@@ -223,10 +223,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
223
223
|
unselectable: boolean;
|
|
224
224
|
multiple: boolean;
|
|
225
225
|
hintLabel: string;
|
|
226
|
-
invalid: boolean;
|
|
227
|
-
invalidLabel: string | unknown[];
|
|
228
226
|
valid: boolean;
|
|
229
227
|
validLabel: string | unknown[];
|
|
228
|
+
invalid: boolean;
|
|
229
|
+
invalidLabel: string | unknown[];
|
|
230
230
|
tabindex: string | number;
|
|
231
231
|
labelKey: string | Function;
|
|
232
232
|
valueKey: string | Function;
|
|
@@ -301,11 +301,6 @@ const VvTabProps = {
|
|
|
301
301
|
}
|
|
302
302
|
};
|
|
303
303
|
const VvTabEvents = ["update:modelValue"];
|
|
304
|
-
const VvNavProps = {
|
|
305
|
-
...ModifiersProps,
|
|
306
|
-
...NavProps
|
|
307
|
-
};
|
|
308
|
-
const VvNavEvents = ["click"];
|
|
309
304
|
const VvActionEvents = ["click", "mouseover", "mouseleave"];
|
|
310
305
|
const VvActionProps = ActionProps;
|
|
311
306
|
function useVolver() {
|
|
@@ -317,11 +312,11 @@ function useInjectedDropdownTrigger() {
|
|
|
317
312
|
function useInjectedDropdownAction() {
|
|
318
313
|
return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
|
|
319
314
|
}
|
|
320
|
-
const __default__$
|
|
315
|
+
const __default__$3 = {
|
|
321
316
|
name: "VvAction"
|
|
322
317
|
};
|
|
323
318
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
324
|
-
...__default__$
|
|
319
|
+
...__default__$3,
|
|
325
320
|
props: VvActionProps,
|
|
326
321
|
emits: VvActionEvents,
|
|
327
322
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -393,7 +388,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
393
388
|
return toReturn;
|
|
394
389
|
}
|
|
395
390
|
});
|
|
396
|
-
|
|
391
|
+
function onClick(e) {
|
|
397
392
|
var _a;
|
|
398
393
|
if (props.disabled) {
|
|
399
394
|
e.preventDefault();
|
|
@@ -404,23 +399,23 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
404
399
|
return;
|
|
405
400
|
}
|
|
406
401
|
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
|
|
407
|
-
}
|
|
408
|
-
|
|
402
|
+
}
|
|
403
|
+
function onMouseover(e) {
|
|
409
404
|
var _a;
|
|
410
405
|
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseover) {
|
|
411
406
|
emit("mouseover", e);
|
|
412
407
|
return;
|
|
413
408
|
}
|
|
414
409
|
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
|
|
415
|
-
}
|
|
416
|
-
|
|
410
|
+
}
|
|
411
|
+
function onMouseleave(e) {
|
|
417
412
|
var _a;
|
|
418
413
|
if ((_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onMouseleave) {
|
|
419
414
|
emit("mouseleave", e);
|
|
420
415
|
return;
|
|
421
416
|
}
|
|
422
417
|
dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
|
|
423
|
-
}
|
|
418
|
+
}
|
|
424
419
|
return (_ctx, _cache) => {
|
|
425
420
|
return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
|
|
426
421
|
ref_key: "element",
|
|
@@ -454,12 +449,12 @@ const _hoisted_1 = {
|
|
|
454
449
|
class: "vv-nav__item",
|
|
455
450
|
role: "presentation"
|
|
456
451
|
};
|
|
457
|
-
const __default__ = {
|
|
452
|
+
const __default__$2 = {
|
|
458
453
|
name: "VvNavItem",
|
|
459
454
|
inheritAttrs: false
|
|
460
455
|
};
|
|
461
456
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
462
|
-
...__default__,
|
|
457
|
+
...__default__$2,
|
|
463
458
|
setup(__props) {
|
|
464
459
|
return (_ctx, _cache) => {
|
|
465
460
|
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
@@ -483,6 +478,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
483
478
|
};
|
|
484
479
|
}
|
|
485
480
|
});
|
|
481
|
+
const VvNavProps = {
|
|
482
|
+
...ModifiersProps,
|
|
483
|
+
...NavProps
|
|
484
|
+
};
|
|
485
|
+
const VvNavEvents = ["click"];
|
|
486
486
|
function useModifiers(prefix, modifiers, others) {
|
|
487
487
|
return computed(() => {
|
|
488
488
|
const toReturn = {
|
|
@@ -506,26 +506,29 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
506
506
|
return toReturn;
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
+
const __default__$1 = {
|
|
510
|
+
name: "VvNav"
|
|
511
|
+
};
|
|
509
512
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
510
|
-
|
|
513
|
+
...__default__$1,
|
|
511
514
|
props: VvNavProps,
|
|
512
515
|
emits: VvNavEvents,
|
|
513
516
|
setup(__props, { emit: __emit }) {
|
|
514
517
|
const props = __props;
|
|
515
|
-
const { modifiers } = toRefs(props);
|
|
516
518
|
const emit = __emit;
|
|
517
|
-
const
|
|
519
|
+
const { modifiers } = toRefs(props);
|
|
520
|
+
function onClick(event) {
|
|
518
521
|
var _a;
|
|
519
522
|
const target = event.target;
|
|
520
523
|
if (target == null ? void 0 : target.dataset.index) {
|
|
521
|
-
const index = parseInt(target.dataset.index);
|
|
524
|
+
const index = Number.parseInt(target.dataset.index);
|
|
522
525
|
const item = (_a = props.items) == null ? void 0 : _a[index];
|
|
523
526
|
if (!item || (item == null ? void 0 : item.disabled)) {
|
|
524
527
|
return;
|
|
525
528
|
}
|
|
526
529
|
emit("click", item);
|
|
527
530
|
}
|
|
528
|
-
}
|
|
531
|
+
}
|
|
529
532
|
const bemCssClasses = useModifiers("vv-nav", modifiers);
|
|
530
533
|
return (_ctx, _cache) => {
|
|
531
534
|
return openBlock(), createElementBlock(
|
|
@@ -568,8 +571,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
568
571
|
};
|
|
569
572
|
}
|
|
570
573
|
});
|
|
574
|
+
const __default__ = {
|
|
575
|
+
name: "VvTab"
|
|
576
|
+
};
|
|
571
577
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
572
|
-
|
|
578
|
+
...__default__,
|
|
573
579
|
props: VvTabProps,
|
|
574
580
|
emits: VvTabEvents,
|
|
575
581
|
setup(__props, { emit: __emit }) {
|
|
@@ -602,11 +608,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
602
608
|
...Array.isArray(props.navModifiers) ? props.navModifiers : ((_a = props.navModifiers) == null ? void 0 : _a.split(" ")) ?? []
|
|
603
609
|
];
|
|
604
610
|
});
|
|
605
|
-
|
|
611
|
+
function onNavClick(item) {
|
|
606
612
|
if (item.tab) {
|
|
607
613
|
activeTabKey.value = item.tab;
|
|
608
614
|
}
|
|
609
|
-
}
|
|
615
|
+
}
|
|
610
616
|
const navItems = computed(
|
|
611
617
|
() => props.items.map((item) => ({
|
|
612
618
|
current: item.tab === activeTabKey.value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvTab=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});const a=Symbol.for("volver"),i=Symbol.for("dropdownTrigger"),u=Symbol.for("dropdownAction"),s={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},d={disabled:{type:Boolean,default:!1}},c={active:{type:Boolean,default:!1}},v={current:{type:Boolean,default:!1}},f={pressed:{type:Boolean,default:!1}},m={label:{type:[String,Number],default:void 0}},p={modifiers:{type:[String,Array],default:void 0}};n.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const b={...d,...m,...f,...c,...v,...s,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:l.button}},y={items:{type:Array,default:()=>[]}};t.local;const k={...p,navModifiers:{type:[String,Array]},modelValue:{type:String,default:""},items:{type:Array,default:()=>[]}},g=b;const B=e.defineComponent({name:"VvAction",props:g,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:n}){const r=t,s=n,d=e.getCurrentInstance(),c=e.inject(a),v=e.ref(null);o({$el:v});const{reference:f,bus:m,aria:p,expanded:b}=e.inject(i,{});e.watch((()=>v.value),(e=>{f&&(f.value=e)}));const y=e.computed((()=>r.pressed||(null==b?void 0:b.value))),{role:k}=e.inject(u,{}),g=e.computed((()=>{switch(!0){case r.disabled:return l.button;case void 0!==r.to:return(null==c?void 0:c.nuxt)?l.nuxtLink:l.routerLink;case void 0!==r.href:return l.a;default:return r.defaultTag}})),B=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!y.value||void 0,ariaLabel:r.ariaLabel,role:null==k?void 0:k.value};switch(g.value){case l.a:return{...e,href:r.href,target:r.target,rel:r.rel};case l.routerLink:case l.nuxtLink:return{...e,to:r.to,target:r.target};case l.button:return{...e,type:r.type,disabled:r.disabled};default:return e}}));function h(e){var t;r.disabled?e.preventDefault():(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onClick)?s("click",e):null==m||m.emit("click",e)}function x(e){var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseover)?s("mouseover",e):null==m||m.emit("mouseover",e)}function S(e){var t;(null==(t=null==d?void 0:d.vnode.props)?void 0:t.onMouseleave)?s("mouseleave",e):null==m||m.emit("mouseleave",e)}return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(g)),e.mergeProps(e.unref(B),{ref_key:"element",ref:v,class:{active:t.active,pressed:e.unref(y),disabled:t.disabled,current:t.current},onClickPassive:h,onMouseoverPassive:x,onMouseleavePassive:S}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}}),h={class:"vv-nav__item",role:"presentation"},x=e.defineComponent({name:"VvNavItem",inheritAttrs:!1,setup:t=>(t,o)=>(e.openBlock(),e.createElementBlock("li",h,[e.createVNode(B,e.mergeProps(t.$attrs,{class:"vv-nav__item-label",role:"menuitem"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default")])),_:3},16)]))}),S={...p,...y};function C(t,o,n){return e.computed((()=>{const r={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((o=>{r[`${t}--${o}`]=e.unref(n.value[o])})),r}))}const _=e.defineComponent({name:"VvNav",props:S,emits:["click"],setup(t,{emit:o}){const n=t,r=o,{modifiers:l}=e.toRefs(n);function a(e){var t;const o=e.target;if(null==o?void 0:o.dataset.index){const e=Number.parseInt(o.dataset.index),l=null==(t=n.items)?void 0:t[e];if(!l||(null==l?void 0:l.disabled))return;r("click",l)}}const i=C("vv-nav",l);return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i))},[e.createElementVNode("ul",{class:"vv-nav__menu",role:"menu",onClick:e.withModifiers(a,["stop"])},[e.renderSlot(t.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(({on:o={},data:n,...r},l)=>(e.openBlock(),e.createBlock(x,e.mergeProps({key:l,"data-index":l,ref_for:!0},r,e.toHandlers(o)),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"item",e.mergeProps({ref_for:!0},{item:r,data:n,index:l}))])),_:2},1040,["data-index"])))),128))]))])],2))}});return e.defineComponent({name:"VvTab",props:k,emits:["update:modelValue"],setup(t,{emit:o}){const n=t,r=o,{modifiers:l,items:a}=e.toRefs(n),i=e.computed((()=>a.value.reduce(((e,t)=>(t.tab&&e.push(t.tab),e)),[]))),u=e.ref(),s=e.computed({get:()=>{var e;return n.modelValue||u.value||(null==(e=i.value)?void 0:e[0])},set:e=>{u.value=e,r("update:modelValue",e)}}),d=e.computed((()=>{var e;return["tabs",...Array.isArray(n.navModifiers)?n.navModifiers:(null==(e=n.navModifiers)?void 0:e.split(" "))??[]]}));function c(e){e.tab&&(s.value=e.tab)}const v=e.computed((()=>n.items.map((e=>({current:e.tab===s.value,...e}))))),f=C("vv-tab",l);return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(f))},[e.createVNode(_,e.mergeProps({items:e.unref(v),modifiers:e.unref(d)},{onClick:c}),{item:e.withCtx((({item:o,data:n,index:r})=>[e.renderSlot(t.$slots,"nav-item",e.normalizeProps(e.guardReactiveProps({item:o,data:n,index:r})))])),_:3},16),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),((o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[o.tab?(e.openBlock(),e.createElementBlock("article",{key:0,class:e.normalizeClass([{target:e.unref(s)===o.tab},"vv-tab__panel"])},[e.renderSlot(t.$slots,`panel::${o.tab}`)],2)):e.createCommentVNode("v-if",!0)],64)))),128))],2))}})}));
|
|
@@ -230,7 +230,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
230
230
|
const props = __props;
|
|
231
231
|
const hasRotate = computed(() => {
|
|
232
232
|
if (typeof props.rotate === "string") {
|
|
233
|
-
return parseFloat(props.rotate);
|
|
233
|
+
return Number.parseFloat(props.rotate);
|
|
234
234
|
}
|
|
235
235
|
return props.rotate;
|
|
236
236
|
});
|
|
@@ -810,14 +810,16 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
810
810
|
}, {});
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
|
|
813
|
+
function useUniqueId(id) {
|
|
814
|
+
return computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
815
|
+
}
|
|
814
816
|
function useDebouncedInput(modelValue, emit, ms = 0, {
|
|
815
817
|
getter = (value) => value,
|
|
816
818
|
setter = (value) => value
|
|
817
819
|
} = {}) {
|
|
818
820
|
let timeout;
|
|
819
821
|
if (typeof ms === "string") {
|
|
820
|
-
ms = parseInt(ms);
|
|
822
|
+
ms = Number.parseInt(ms);
|
|
821
823
|
}
|
|
822
824
|
return computed({
|
|
823
825
|
get: () => getter(modelValue == null ? void 0 : modelValue.value),
|
|
@@ -1000,34 +1002,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1000
1002
|
"vv-textarea",
|
|
1001
1003
|
modifiers,
|
|
1002
1004
|
computed(() => ({
|
|
1003
|
-
valid: valid.value,
|
|
1004
|
-
invalid: invalid.value,
|
|
1005
|
-
loading: loading.value,
|
|
1006
|
-
disabled: props.disabled,
|
|
1007
|
-
readonly: props.readonly,
|
|
1005
|
+
"valid": valid.value,
|
|
1006
|
+
"invalid": invalid.value,
|
|
1007
|
+
"loading": loading.value,
|
|
1008
|
+
"disabled": props.disabled,
|
|
1009
|
+
"readonly": props.readonly,
|
|
1008
1010
|
"icon-before": hasIconBefore.value !== void 0,
|
|
1009
1011
|
"icon-after": hasIconAfter.value !== void 0,
|
|
1010
|
-
floating: props.floating && !isEmpty(props.label),
|
|
1011
|
-
dirty: isDirty.value,
|
|
1012
|
-
focus: focused.value,
|
|
1013
|
-
resizable: props.resizable
|
|
1012
|
+
"floating": props.floating && !isEmpty(props.label),
|
|
1013
|
+
"dirty": isDirty.value,
|
|
1014
|
+
"focus": focused.value,
|
|
1015
|
+
"resizable": props.resizable
|
|
1014
1016
|
}))
|
|
1015
1017
|
);
|
|
1016
1018
|
const hasAttrs = computed(
|
|
1017
1019
|
() => ({
|
|
1018
|
-
name: props.name,
|
|
1019
|
-
placeholder: hasPlaceholder.value,
|
|
1020
|
-
tabindex: hasTabindex.value,
|
|
1021
|
-
disabled: props.disabled,
|
|
1022
|
-
readonly: props.readonly,
|
|
1023
|
-
required: props.required,
|
|
1024
|
-
autocomplete: props.autocomplete,
|
|
1025
|
-
minlength: props.minlength,
|
|
1026
|
-
maxlength: props.maxlength,
|
|
1027
|
-
cols: props.cols,
|
|
1028
|
-
rows: props.rows,
|
|
1029
|
-
wrap: props.wrap,
|
|
1030
|
-
spellcheck: props.spellcheck,
|
|
1020
|
+
"name": props.name,
|
|
1021
|
+
"placeholder": hasPlaceholder.value,
|
|
1022
|
+
"tabindex": hasTabindex.value,
|
|
1023
|
+
"disabled": props.disabled,
|
|
1024
|
+
"readonly": props.readonly,
|
|
1025
|
+
"required": props.required,
|
|
1026
|
+
"autocomplete": props.autocomplete,
|
|
1027
|
+
"minlength": props.minlength,
|
|
1028
|
+
"maxlength": props.maxlength,
|
|
1029
|
+
"cols": props.cols,
|
|
1030
|
+
"rows": props.rows,
|
|
1031
|
+
"wrap": props.wrap,
|
|
1032
|
+
"spellcheck": props.spellcheck,
|
|
1031
1033
|
"aria-invalid": isInvalid.value,
|
|
1032
1034
|
"aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
|
|
1033
1035
|
"aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
|
|
@@ -1042,9 +1044,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1042
1044
|
minlength: props.minlength,
|
|
1043
1045
|
clear: onClear
|
|
1044
1046
|
}));
|
|
1045
|
-
|
|
1047
|
+
function onClear() {
|
|
1046
1048
|
localModelValue.value = void 0;
|
|
1047
|
-
}
|
|
1049
|
+
}
|
|
1048
1050
|
return (_ctx, _cache) => {
|
|
1049
1051
|
return openBlock(), createElementBlock(
|
|
1050
1052
|
"div",
|
|
@@ -1 +1 @@
|
|
|
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
|
+
!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?Number.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}},N={floating:{type:Boolean,default:!1}},O={id:[String,Number]};u.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const P={...{...O,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,...N,...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:N,maxlength:O}=e.toRefs(r),P=function(t){return 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=Number.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==O?void 0:O.value),lowerLimit:Number(null==N?void 0:N.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})));function 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))}})}));
|
|
@@ -248,10 +248,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
248
248
|
loading: boolean;
|
|
249
249
|
loadingLabel: string;
|
|
250
250
|
hintLabel: string;
|
|
251
|
-
invalid: boolean;
|
|
252
|
-
invalidLabel: string | unknown[];
|
|
253
251
|
valid: boolean;
|
|
254
252
|
validLabel: string | unknown[];
|
|
253
|
+
invalid: boolean;
|
|
254
|
+
invalidLabel: string | unknown[];
|
|
255
255
|
tabindex: string | number;
|
|
256
256
|
placeholder: string;
|
|
257
257
|
autocomplete: string;
|
|
@@ -310,8 +310,11 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
310
310
|
return toReturn;
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
|
+
const __default__ = {
|
|
314
|
+
name: "VvTooltip"
|
|
315
|
+
};
|
|
313
316
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
314
|
-
|
|
317
|
+
...__default__,
|
|
315
318
|
props: VvTooltipProps,
|
|
316
319
|
setup(__props) {
|
|
317
320
|
const props = __props;
|
|
@@ -1 +1 @@
|
|
|
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({
|
|
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))}})}));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, Slots } from 'vue';
|
|
2
|
-
import type { Ref } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, Slots, Ref } from 'vue';
|
|
3
2
|
export type HintSlotProps = Readonly<ExtractPropTypes<{
|
|
4
3
|
hintLabel: {
|
|
5
4
|
type: StringConstructor;
|
|
@@ -16,8 +15,8 @@ export type HintSlotProps = Readonly<ExtractPropTypes<{
|
|
|
16
15
|
}>>;
|
|
17
16
|
/**
|
|
18
17
|
* Return a vue component (HintSlot) to render and manage hint, errors, valid, loading state and messages
|
|
19
|
-
* @param {HintSlotProps}
|
|
20
|
-
* @param {Slots}
|
|
18
|
+
* @param {HintSlotProps} propsOrRef vue props
|
|
19
|
+
* @param {Slots} slots vue slots
|
|
21
20
|
* @returns {Component} vue component
|
|
22
21
|
*/
|
|
23
22
|
export declare function HintSlotFactory(propsOrRef: HintSlotProps | Ref<HintSlotProps>, slots: Slots): {
|