@volverjs/ui-vue 0.0.10-beta.35 → 0.0.10-beta.37
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 +17 -17
- 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 +16 -12
- 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 +905 -888
- 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
|
@@ -270,7 +270,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
270
270
|
const props = __props;
|
|
271
271
|
const hasRotate = computed(() => {
|
|
272
272
|
if (typeof props.rotate === "string") {
|
|
273
|
-
return parseFloat(props.rotate);
|
|
273
|
+
return Number.parseFloat(props.rotate);
|
|
274
274
|
}
|
|
275
275
|
return props.rotate;
|
|
276
276
|
});
|
|
@@ -356,6 +356,201 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
|
+
function useComponentIcon(icon, iconPosition) {
|
|
360
|
+
const hasIcon = computed(() => {
|
|
361
|
+
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
362
|
+
return { name: icon == null ? void 0 : icon.value };
|
|
363
|
+
}
|
|
364
|
+
return icon == null ? void 0 : icon.value;
|
|
365
|
+
});
|
|
366
|
+
const hasIconBefore = computed(
|
|
367
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
368
|
+
);
|
|
369
|
+
const hasIconAfter = computed(
|
|
370
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
371
|
+
);
|
|
372
|
+
const hasIconLeft = computed(
|
|
373
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
374
|
+
);
|
|
375
|
+
const hasIconRight = computed(
|
|
376
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
377
|
+
);
|
|
378
|
+
const hasIconTop = computed(
|
|
379
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
380
|
+
);
|
|
381
|
+
const hasIconBottom = computed(
|
|
382
|
+
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
383
|
+
);
|
|
384
|
+
return {
|
|
385
|
+
hasIcon,
|
|
386
|
+
hasIconLeft,
|
|
387
|
+
hasIconRight,
|
|
388
|
+
hasIconTop,
|
|
389
|
+
hasIconBottom,
|
|
390
|
+
hasIconBefore,
|
|
391
|
+
hasIconAfter
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
const VvInputPasswordAction = defineComponent({
|
|
395
|
+
components: {
|
|
396
|
+
VvIcon: _sfc_main$4
|
|
397
|
+
},
|
|
398
|
+
props: {
|
|
399
|
+
disabled: {
|
|
400
|
+
type: Boolean,
|
|
401
|
+
default: false
|
|
402
|
+
},
|
|
403
|
+
labelShow: {
|
|
404
|
+
type: String,
|
|
405
|
+
default: "Show password"
|
|
406
|
+
},
|
|
407
|
+
labelHide: {
|
|
408
|
+
type: String,
|
|
409
|
+
default: "Hide password"
|
|
410
|
+
},
|
|
411
|
+
iconShow: {
|
|
412
|
+
type: [String, Object],
|
|
413
|
+
default: ACTION_ICONS.showPassword
|
|
414
|
+
},
|
|
415
|
+
iconHide: {
|
|
416
|
+
type: [String, Object],
|
|
417
|
+
default: ACTION_ICONS.hidePassword
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
emits: ["toggle-password"],
|
|
421
|
+
setup(props, { emit }) {
|
|
422
|
+
const active = ref(false);
|
|
423
|
+
const activeIcon = computed(
|
|
424
|
+
() => active.value ? props.iconHide : props.iconShow
|
|
425
|
+
);
|
|
426
|
+
const { hasIcon } = useComponentIcon(activeIcon);
|
|
427
|
+
function onClick(e) {
|
|
428
|
+
e == null ? void 0 : e.stopPropagation();
|
|
429
|
+
if (!props.disabled) {
|
|
430
|
+
active.value = !active.value;
|
|
431
|
+
emit("toggle-password", active.value);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return {
|
|
435
|
+
active,
|
|
436
|
+
activeIcon,
|
|
437
|
+
hasIcon,
|
|
438
|
+
onClick
|
|
439
|
+
};
|
|
440
|
+
},
|
|
441
|
+
render() {
|
|
442
|
+
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
443
|
+
...this.hasIcon,
|
|
444
|
+
class: "vv-input-text__icon"
|
|
445
|
+
}) : void 0;
|
|
446
|
+
return h(
|
|
447
|
+
"button",
|
|
448
|
+
{
|
|
449
|
+
disabled: this.disabled,
|
|
450
|
+
class: "vv-input-text__action",
|
|
451
|
+
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
452
|
+
type: "button",
|
|
453
|
+
onClick: this.onClick
|
|
454
|
+
},
|
|
455
|
+
icon
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
const VvInputStepAction = defineComponent({
|
|
460
|
+
components: {
|
|
461
|
+
VvIcon: _sfc_main$4
|
|
462
|
+
},
|
|
463
|
+
props: {
|
|
464
|
+
disabled: {
|
|
465
|
+
type: Boolean,
|
|
466
|
+
default: false
|
|
467
|
+
},
|
|
468
|
+
label: {
|
|
469
|
+
type: String
|
|
470
|
+
},
|
|
471
|
+
mode: {
|
|
472
|
+
type: String,
|
|
473
|
+
validator: (v) => ["up", "down"].includes(v),
|
|
474
|
+
default: "up"
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
emits: ["step-up", "step-down"],
|
|
478
|
+
setup(props, { emit }) {
|
|
479
|
+
const isUp = computed(() => props.mode === "up");
|
|
480
|
+
const onClick = (e) => {
|
|
481
|
+
e == null ? void 0 : e.stopPropagation();
|
|
482
|
+
if (!props.disabled) {
|
|
483
|
+
emit(isUp.value ? "step-up" : "step-down");
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
return {
|
|
487
|
+
isUp,
|
|
488
|
+
onClick
|
|
489
|
+
};
|
|
490
|
+
},
|
|
491
|
+
render() {
|
|
492
|
+
return h("button", {
|
|
493
|
+
class: [
|
|
494
|
+
"vv-input-text__action vv-input-text__action-chevron",
|
|
495
|
+
this.isUp && "vv-input-text__action-chevron-up"
|
|
496
|
+
],
|
|
497
|
+
disabled: this.disabled,
|
|
498
|
+
ariaLabel: this.label,
|
|
499
|
+
type: "button",
|
|
500
|
+
onClick: this.onClick
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
const VvInputClearAction = defineComponent({
|
|
505
|
+
components: {
|
|
506
|
+
VvIcon: _sfc_main$4
|
|
507
|
+
},
|
|
508
|
+
props: {
|
|
509
|
+
disabled: {
|
|
510
|
+
type: Boolean,
|
|
511
|
+
default: false
|
|
512
|
+
},
|
|
513
|
+
label: {
|
|
514
|
+
type: String,
|
|
515
|
+
default: "Clear"
|
|
516
|
+
},
|
|
517
|
+
icon: {
|
|
518
|
+
type: [String, Object],
|
|
519
|
+
default: "close"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
emits: ["clear"],
|
|
523
|
+
setup(props, { emit }) {
|
|
524
|
+
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
525
|
+
function onClick(e) {
|
|
526
|
+
e == null ? void 0 : e.stopPropagation();
|
|
527
|
+
if (!props.disabled) {
|
|
528
|
+
emit("clear");
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
return {
|
|
532
|
+
hasIcon,
|
|
533
|
+
onClick
|
|
534
|
+
};
|
|
535
|
+
},
|
|
536
|
+
render() {
|
|
537
|
+
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
538
|
+
...this.hasIcon,
|
|
539
|
+
class: "vv-input-text__icon"
|
|
540
|
+
}) : void 0;
|
|
541
|
+
return h(
|
|
542
|
+
"button",
|
|
543
|
+
{
|
|
544
|
+
disabled: this.disabled,
|
|
545
|
+
class: "vv-input-text__action",
|
|
546
|
+
ariaLabel: this.label,
|
|
547
|
+
type: "button",
|
|
548
|
+
onClick: this.onClick
|
|
549
|
+
},
|
|
550
|
+
icon
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
});
|
|
359
554
|
const LinkProps = {
|
|
360
555
|
/**
|
|
361
556
|
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
@@ -973,201 +1168,6 @@ const VvInputTextProps = {
|
|
|
973
1168
|
default: 5
|
|
974
1169
|
}
|
|
975
1170
|
};
|
|
976
|
-
function useComponentIcon(icon, iconPosition) {
|
|
977
|
-
const hasIcon = computed(() => {
|
|
978
|
-
if (typeof (icon == null ? void 0 : icon.value) === "string") {
|
|
979
|
-
return { name: icon == null ? void 0 : icon.value };
|
|
980
|
-
}
|
|
981
|
-
return icon == null ? void 0 : icon.value;
|
|
982
|
-
});
|
|
983
|
-
const hasIconBefore = computed(
|
|
984
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
|
|
985
|
-
);
|
|
986
|
-
const hasIconAfter = computed(
|
|
987
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
|
|
988
|
-
);
|
|
989
|
-
const hasIconLeft = computed(
|
|
990
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
|
|
991
|
-
);
|
|
992
|
-
const hasIconRight = computed(
|
|
993
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
|
|
994
|
-
);
|
|
995
|
-
const hasIconTop = computed(
|
|
996
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
|
|
997
|
-
);
|
|
998
|
-
const hasIconBottom = computed(
|
|
999
|
-
() => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
|
|
1000
|
-
);
|
|
1001
|
-
return {
|
|
1002
|
-
hasIcon,
|
|
1003
|
-
hasIconLeft,
|
|
1004
|
-
hasIconRight,
|
|
1005
|
-
hasIconTop,
|
|
1006
|
-
hasIconBottom,
|
|
1007
|
-
hasIconBefore,
|
|
1008
|
-
hasIconAfter
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
const VvInputPasswordAction = defineComponent({
|
|
1012
|
-
components: {
|
|
1013
|
-
VvIcon: _sfc_main$4
|
|
1014
|
-
},
|
|
1015
|
-
props: {
|
|
1016
|
-
disabled: {
|
|
1017
|
-
type: Boolean,
|
|
1018
|
-
default: false
|
|
1019
|
-
},
|
|
1020
|
-
labelShow: {
|
|
1021
|
-
type: String,
|
|
1022
|
-
default: "Show password"
|
|
1023
|
-
},
|
|
1024
|
-
labelHide: {
|
|
1025
|
-
type: String,
|
|
1026
|
-
default: "Hide password"
|
|
1027
|
-
},
|
|
1028
|
-
iconShow: {
|
|
1029
|
-
type: [String, Object],
|
|
1030
|
-
default: ACTION_ICONS.showPassword
|
|
1031
|
-
},
|
|
1032
|
-
iconHide: {
|
|
1033
|
-
type: [String, Object],
|
|
1034
|
-
default: ACTION_ICONS.hidePassword
|
|
1035
|
-
}
|
|
1036
|
-
},
|
|
1037
|
-
emits: ["toggle-password"],
|
|
1038
|
-
setup(props, { emit }) {
|
|
1039
|
-
const active = ref(false);
|
|
1040
|
-
const activeIcon = computed(
|
|
1041
|
-
() => active.value ? props.iconHide : props.iconShow
|
|
1042
|
-
);
|
|
1043
|
-
const { hasIcon } = useComponentIcon(activeIcon);
|
|
1044
|
-
function onClick(e) {
|
|
1045
|
-
e == null ? void 0 : e.stopPropagation();
|
|
1046
|
-
if (!props.disabled) {
|
|
1047
|
-
active.value = !active.value;
|
|
1048
|
-
emit("toggle-password", active.value);
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
return {
|
|
1052
|
-
active,
|
|
1053
|
-
activeIcon,
|
|
1054
|
-
hasIcon,
|
|
1055
|
-
onClick
|
|
1056
|
-
};
|
|
1057
|
-
},
|
|
1058
|
-
render() {
|
|
1059
|
-
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
1060
|
-
...this.hasIcon,
|
|
1061
|
-
class: "vv-input-text__icon"
|
|
1062
|
-
}) : void 0;
|
|
1063
|
-
return h(
|
|
1064
|
-
"button",
|
|
1065
|
-
{
|
|
1066
|
-
disabled: this.disabled,
|
|
1067
|
-
class: "vv-input-text__action",
|
|
1068
|
-
ariaLabel: this.active ? this.labelHide : this.labelShow,
|
|
1069
|
-
type: "button",
|
|
1070
|
-
onClick: this.onClick
|
|
1071
|
-
},
|
|
1072
|
-
icon
|
|
1073
|
-
);
|
|
1074
|
-
}
|
|
1075
|
-
});
|
|
1076
|
-
const VvInputStepAction = defineComponent({
|
|
1077
|
-
components: {
|
|
1078
|
-
VvIcon: _sfc_main$4
|
|
1079
|
-
},
|
|
1080
|
-
props: {
|
|
1081
|
-
disabled: {
|
|
1082
|
-
type: Boolean,
|
|
1083
|
-
default: false
|
|
1084
|
-
},
|
|
1085
|
-
label: {
|
|
1086
|
-
type: String
|
|
1087
|
-
},
|
|
1088
|
-
mode: {
|
|
1089
|
-
type: String,
|
|
1090
|
-
validator: (v) => ["up", "down"].includes(v),
|
|
1091
|
-
default: "up"
|
|
1092
|
-
}
|
|
1093
|
-
},
|
|
1094
|
-
emits: ["step-up", "step-down"],
|
|
1095
|
-
setup(props, { emit }) {
|
|
1096
|
-
const isUp = computed(() => props.mode === "up");
|
|
1097
|
-
const onClick = (e) => {
|
|
1098
|
-
e == null ? void 0 : e.stopPropagation();
|
|
1099
|
-
if (!props.disabled) {
|
|
1100
|
-
emit(isUp.value ? "step-up" : "step-down");
|
|
1101
|
-
}
|
|
1102
|
-
};
|
|
1103
|
-
return {
|
|
1104
|
-
isUp,
|
|
1105
|
-
onClick
|
|
1106
|
-
};
|
|
1107
|
-
},
|
|
1108
|
-
render() {
|
|
1109
|
-
return h("button", {
|
|
1110
|
-
class: [
|
|
1111
|
-
"vv-input-text__action vv-input-text__action-chevron",
|
|
1112
|
-
this.isUp && "vv-input-text__action-chevron-up"
|
|
1113
|
-
],
|
|
1114
|
-
disabled: this.disabled,
|
|
1115
|
-
ariaLabel: this.label,
|
|
1116
|
-
type: "button",
|
|
1117
|
-
onClick: this.onClick
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1120
|
-
});
|
|
1121
|
-
const VvInputClearAction = defineComponent({
|
|
1122
|
-
components: {
|
|
1123
|
-
VvIcon: _sfc_main$4
|
|
1124
|
-
},
|
|
1125
|
-
props: {
|
|
1126
|
-
disabled: {
|
|
1127
|
-
type: Boolean,
|
|
1128
|
-
default: false
|
|
1129
|
-
},
|
|
1130
|
-
label: {
|
|
1131
|
-
type: String,
|
|
1132
|
-
default: "Clear"
|
|
1133
|
-
},
|
|
1134
|
-
icon: {
|
|
1135
|
-
type: [String, Object],
|
|
1136
|
-
default: "close"
|
|
1137
|
-
}
|
|
1138
|
-
},
|
|
1139
|
-
emits: ["clear"],
|
|
1140
|
-
setup(props, { emit }) {
|
|
1141
|
-
const { hasIcon } = useComponentIcon(computed(() => props.icon));
|
|
1142
|
-
function onClick(e) {
|
|
1143
|
-
e == null ? void 0 : e.stopPropagation();
|
|
1144
|
-
if (!props.disabled) {
|
|
1145
|
-
emit("clear");
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
return {
|
|
1149
|
-
hasIcon,
|
|
1150
|
-
onClick
|
|
1151
|
-
};
|
|
1152
|
-
},
|
|
1153
|
-
render() {
|
|
1154
|
-
const icon = this.hasIcon ? h(_sfc_main$4, {
|
|
1155
|
-
...this.hasIcon,
|
|
1156
|
-
class: "vv-input-text__icon"
|
|
1157
|
-
}) : void 0;
|
|
1158
|
-
return h(
|
|
1159
|
-
"button",
|
|
1160
|
-
{
|
|
1161
|
-
disabled: this.disabled,
|
|
1162
|
-
class: "vv-input-text__action",
|
|
1163
|
-
ariaLabel: this.label,
|
|
1164
|
-
type: "button",
|
|
1165
|
-
onClick: this.onClick
|
|
1166
|
-
},
|
|
1167
|
-
icon
|
|
1168
|
-
);
|
|
1169
|
-
}
|
|
1170
|
-
});
|
|
1171
1171
|
function VvInputTextActionsFactory(type, parentProps) {
|
|
1172
1172
|
return {
|
|
1173
1173
|
name: "VvInputTextActions",
|
|
@@ -1297,7 +1297,9 @@ const VvDropdownOptionProps = {
|
|
|
1297
1297
|
default: false
|
|
1298
1298
|
}
|
|
1299
1299
|
};
|
|
1300
|
-
|
|
1300
|
+
function useUniqueId(id) {
|
|
1301
|
+
return computed(() => String((id == null ? void 0 : id.value) || uid()));
|
|
1302
|
+
}
|
|
1301
1303
|
function useProvideDropdownTrigger({
|
|
1302
1304
|
reference,
|
|
1303
1305
|
id,
|
|
@@ -1357,6 +1359,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1357
1359
|
props: VvDropdownProps,
|
|
1358
1360
|
emits: [
|
|
1359
1361
|
"update:modelValue",
|
|
1362
|
+
"beforeEnter",
|
|
1363
|
+
"afterLeave",
|
|
1360
1364
|
"beforeExpand",
|
|
1361
1365
|
"beforeCollapse",
|
|
1362
1366
|
"afterExpand",
|
|
@@ -1364,11 +1368,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1364
1368
|
"before-enter",
|
|
1365
1369
|
"after-leave",
|
|
1366
1370
|
"enter",
|
|
1367
|
-
"
|
|
1368
|
-
"
|
|
1369
|
-
"
|
|
1371
|
+
"afterEnter",
|
|
1372
|
+
"enterCancelled",
|
|
1373
|
+
"beforeLeave",
|
|
1370
1374
|
"leave",
|
|
1371
|
-
"
|
|
1375
|
+
"leaveCancelled"
|
|
1372
1376
|
],
|
|
1373
1377
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
1374
1378
|
const props = __props;
|
|
@@ -1527,18 +1531,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1527
1531
|
modelValue.value = newValue;
|
|
1528
1532
|
}
|
|
1529
1533
|
});
|
|
1530
|
-
|
|
1534
|
+
function show() {
|
|
1531
1535
|
expanded.value = true;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1536
|
+
}
|
|
1537
|
+
function hide() {
|
|
1534
1538
|
expanded.value = false;
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1539
|
+
}
|
|
1540
|
+
function toggle() {
|
|
1537
1541
|
expanded.value = !expanded.value;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1542
|
+
}
|
|
1543
|
+
function init(el) {
|
|
1540
1544
|
referenceEl.value = el;
|
|
1541
|
-
}
|
|
1545
|
+
}
|
|
1542
1546
|
__expose({
|
|
1543
1547
|
toggle,
|
|
1544
1548
|
show,
|
|
@@ -1606,7 +1610,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1606
1610
|
(el) => !el.hasAttribute("disabled") && !el.getAttribute("aria-hidden")
|
|
1607
1611
|
);
|
|
1608
1612
|
}
|
|
1609
|
-
|
|
1613
|
+
function focusNext() {
|
|
1610
1614
|
nextTick(() => {
|
|
1611
1615
|
if (focused.value) {
|
|
1612
1616
|
const focusableElements = getKeyboardFocusableElements(
|
|
@@ -1629,8 +1633,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1629
1633
|
}
|
|
1630
1634
|
}
|
|
1631
1635
|
});
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1636
|
+
}
|
|
1637
|
+
function focusPrev() {
|
|
1634
1638
|
nextTick(() => {
|
|
1635
1639
|
if (focused.value) {
|
|
1636
1640
|
const focusableElements = getKeyboardFocusableElements(
|
|
@@ -1653,7 +1657,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1653
1657
|
}
|
|
1654
1658
|
}
|
|
1655
1659
|
});
|
|
1656
|
-
}
|
|
1660
|
+
}
|
|
1657
1661
|
const hovered = useElementHover(floatingEl);
|
|
1658
1662
|
const { itemRole } = useProvideDropdownItem({
|
|
1659
1663
|
role,
|
|
@@ -1688,29 +1692,29 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1688
1692
|
const dropdownTransitionHandlers = {
|
|
1689
1693
|
"before-enter": () => {
|
|
1690
1694
|
emit(expanded.value ? "beforeExpand" : "beforeCollapse");
|
|
1691
|
-
emit("
|
|
1695
|
+
emit("beforeEnter");
|
|
1692
1696
|
},
|
|
1693
1697
|
"after-leave": () => {
|
|
1694
1698
|
emit(expanded.value ? "afterExpand" : "afterCollapse");
|
|
1695
|
-
emit("
|
|
1699
|
+
emit("afterLeave");
|
|
1696
1700
|
},
|
|
1697
|
-
enter: () => {
|
|
1701
|
+
"enter": () => {
|
|
1698
1702
|
emit("enter");
|
|
1699
1703
|
},
|
|
1700
1704
|
"after-enter": () => {
|
|
1701
|
-
emit("
|
|
1705
|
+
emit("afterEnter");
|
|
1702
1706
|
},
|
|
1703
1707
|
"enter-cancelled": () => {
|
|
1704
|
-
emit("
|
|
1708
|
+
emit("enterCancelled");
|
|
1705
1709
|
},
|
|
1706
1710
|
"before-leave": () => {
|
|
1707
|
-
emit("
|
|
1711
|
+
emit("beforeLeave");
|
|
1708
1712
|
},
|
|
1709
|
-
leave: () => {
|
|
1713
|
+
"leave": () => {
|
|
1710
1714
|
emit("leave");
|
|
1711
1715
|
},
|
|
1712
1716
|
"leave-cancelled": () => {
|
|
1713
|
-
emit("
|
|
1717
|
+
emit("leaveCancelled");
|
|
1714
1718
|
}
|
|
1715
1719
|
};
|
|
1716
1720
|
return (_ctx, _cache) => {
|
|
@@ -1936,7 +1940,7 @@ function useDebouncedInput(modelValue, emit, ms = 0, {
|
|
|
1936
1940
|
} = {}) {
|
|
1937
1941
|
let timeout;
|
|
1938
1942
|
if (typeof ms === "string") {
|
|
1939
|
-
ms = parseInt(ms);
|
|
1943
|
+
ms = Number.parseInt(ms);
|
|
1940
1944
|
}
|
|
1941
1945
|
return computed({
|
|
1942
1946
|
get: () => getter(modelValue == null ? void 0 : modelValue.value),
|
|
@@ -1993,7 +1997,7 @@ function useTextCount(text, options) {
|
|
|
1993
1997
|
formatted
|
|
1994
1998
|
};
|
|
1995
1999
|
}
|
|
1996
|
-
|
|
2000
|
+
function usePersistence(storageKey, storageType = StorageType.local, defaultValue) {
|
|
1997
2001
|
const localValue = ref();
|
|
1998
2002
|
if (defaultValue) {
|
|
1999
2003
|
localValue.value = defaultValue;
|
|
@@ -2052,7 +2056,7 @@ const usePersistence = (storageKey, storageType = StorageType.local, defaultValu
|
|
|
2052
2056
|
localValue.value = value;
|
|
2053
2057
|
}
|
|
2054
2058
|
});
|
|
2055
|
-
}
|
|
2059
|
+
}
|
|
2056
2060
|
const _hoisted_1 = ["for"];
|
|
2057
2061
|
const _hoisted_2 = {
|
|
2058
2062
|
key: 0,
|
|
@@ -2090,24 +2094,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2090
2094
|
props
|
|
2091
2095
|
);
|
|
2092
2096
|
const {
|
|
2093
|
-
|
|
2097
|
+
count,
|
|
2098
|
+
debounce,
|
|
2094
2099
|
icon,
|
|
2095
2100
|
iconPosition,
|
|
2096
2101
|
iconRemoveSuggestion,
|
|
2097
|
-
|
|
2098
|
-
modelValue,
|
|
2099
|
-
count,
|
|
2100
|
-
valid,
|
|
2102
|
+
id,
|
|
2101
2103
|
invalid,
|
|
2104
|
+
label,
|
|
2102
2105
|
loading,
|
|
2103
|
-
debounce,
|
|
2104
2106
|
maxlength,
|
|
2105
2107
|
minlength,
|
|
2106
|
-
|
|
2107
|
-
iMask,
|
|
2108
|
+
modelValue,
|
|
2108
2109
|
step,
|
|
2109
2110
|
storageKey,
|
|
2110
|
-
storageType
|
|
2111
|
+
storageType,
|
|
2112
|
+
type,
|
|
2113
|
+
valid
|
|
2111
2114
|
} = toRefs(props);
|
|
2112
2115
|
const hasId = useUniqueId(id);
|
|
2113
2116
|
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
@@ -2123,7 +2126,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2123
2126
|
const maskReady = ref(false);
|
|
2124
2127
|
const { el, mask, typed, masked, unmasked } = useIMask(
|
|
2125
2128
|
computed(
|
|
2126
|
-
() =>
|
|
2129
|
+
() => props.iMask ?? {
|
|
2127
2130
|
mask: /./
|
|
2128
2131
|
}
|
|
2129
2132
|
),
|
|
@@ -2169,7 +2172,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2169
2172
|
if (!(date instanceof Date)) {
|
|
2170
2173
|
date = new Date(date);
|
|
2171
2174
|
}
|
|
2172
|
-
localModelValue.value = `${date.getFullYear()}-${
|
|
2175
|
+
localModelValue.value = `${date.getFullYear()}-${`0${date.getMonth() + 1}`.slice(-2)}-${`0${date.getDate()}`.slice(-2)}`;
|
|
2173
2176
|
return;
|
|
2174
2177
|
}
|
|
2175
2178
|
if (type.value === INPUT_TYPES.DATETIME_LOCAL) {
|
|
@@ -2188,7 +2191,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2188
2191
|
if (!(typed.value instanceof Date)) {
|
|
2189
2192
|
date = new Date(date);
|
|
2190
2193
|
}
|
|
2191
|
-
localModelValue.value = `${date.getFullYear()}-${
|
|
2194
|
+
localModelValue.value = `${date.getFullYear()}-${`0${date.getMonth() + 1}`.slice(-2)}-${`0${date.getDate()}`.slice(-2)}T${`0${date.getHours()}`.slice(-2)}:${`0${date.getMinutes()}`.slice(-2)}`;
|
|
2192
2195
|
return;
|
|
2193
2196
|
}
|
|
2194
2197
|
if (!localModelValue.value && !unmasked.value) {
|
|
@@ -2198,25 +2201,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2198
2201
|
}
|
|
2199
2202
|
}
|
|
2200
2203
|
);
|
|
2201
|
-
|
|
2204
|
+
function updateMaskValue(newValue) {
|
|
2202
2205
|
var _a;
|
|
2203
|
-
if (
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
return;
|
|
2208
|
-
}
|
|
2209
|
-
if (((_a = iMask.value) == null ? void 0 : _a.mask) === Date) {
|
|
2210
|
-
typed.value = new Date(newValue);
|
|
2211
|
-
return;
|
|
2212
|
-
}
|
|
2213
|
-
if (type.value === INPUT_TYPES.NUMBER && NEGATIVE_ZERO_REGEX.test(unmasked.value) && newValue === 0) {
|
|
2214
|
-
return;
|
|
2215
|
-
}
|
|
2216
|
-
typed.value = newValue;
|
|
2217
|
-
unmasked.value = `${typed.value}`;
|
|
2206
|
+
if (newValue === void 0) {
|
|
2207
|
+
typed.value = "";
|
|
2208
|
+
unmasked.value = "";
|
|
2209
|
+
return;
|
|
2218
2210
|
}
|
|
2219
|
-
|
|
2211
|
+
if (((_a = props.iMask) == null ? void 0 : _a.mask) === Date) {
|
|
2212
|
+
typed.value = new Date(newValue);
|
|
2213
|
+
return;
|
|
2214
|
+
}
|
|
2215
|
+
if (type.value === INPUT_TYPES.NUMBER && NEGATIVE_ZERO_REGEX.test(unmasked.value) && newValue === 0) {
|
|
2216
|
+
return;
|
|
2217
|
+
}
|
|
2218
|
+
typed.value = newValue;
|
|
2219
|
+
unmasked.value = `${typed.value}`;
|
|
2220
|
+
}
|
|
2220
2221
|
onMounted(() => {
|
|
2221
2222
|
if (mask.value) {
|
|
2222
2223
|
maskReady.value = true;
|
|
@@ -2277,37 +2278,37 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2277
2278
|
});
|
|
2278
2279
|
const showPassword = ref(false);
|
|
2279
2280
|
const isPassword = computed(() => props.type === INPUT_TYPES.PASSWORD);
|
|
2280
|
-
|
|
2281
|
+
function onTogglePassword() {
|
|
2281
2282
|
showPassword.value = !showPassword.value;
|
|
2282
|
-
}
|
|
2283
|
+
}
|
|
2283
2284
|
const isDateTime = computed(
|
|
2284
2285
|
() => props.type === INPUT_TYPES.TIME || props.type === INPUT_TYPES.DATETIME_LOCAL || props.type === INPUT_TYPES.DATE || props.type === INPUT_TYPES.WEEK || props.type === INPUT_TYPES.MONTH
|
|
2285
2286
|
);
|
|
2286
2287
|
const isNumber = computed(() => props.type === INPUT_TYPES.NUMBER);
|
|
2287
|
-
|
|
2288
|
+
function onStepUp() {
|
|
2288
2289
|
if (isClickable.value) {
|
|
2289
|
-
if (iMask
|
|
2290
|
+
if (props.iMask) {
|
|
2290
2291
|
typed.value = typed.value + Number((step == null ? void 0 : step.value) ?? 1);
|
|
2291
2292
|
return;
|
|
2292
2293
|
}
|
|
2293
2294
|
inputEl.value.stepUp();
|
|
2294
2295
|
localModelValue.value = Number(unref(inputEl).value);
|
|
2295
2296
|
}
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2297
|
+
}
|
|
2298
|
+
function onStepDown() {
|
|
2298
2299
|
if (isClickable.value) {
|
|
2299
|
-
if (iMask
|
|
2300
|
+
if (props.iMask) {
|
|
2300
2301
|
typed.value = typed.value - Number((step == null ? void 0 : step.value) ?? 1);
|
|
2301
2302
|
return;
|
|
2302
2303
|
}
|
|
2303
2304
|
inputEl.value.stepDown();
|
|
2304
2305
|
localModelValue.value = Number(unref(inputEl).value);
|
|
2305
2306
|
}
|
|
2306
|
-
}
|
|
2307
|
+
}
|
|
2307
2308
|
const isSearch = computed(() => props.type === INPUT_TYPES.SEARCH);
|
|
2308
|
-
|
|
2309
|
+
function onClear() {
|
|
2309
2310
|
localModelValue.value = "";
|
|
2310
|
-
}
|
|
2311
|
+
}
|
|
2311
2312
|
const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
|
|
2312
2313
|
const iconAfter = computed(() => {
|
|
2313
2314
|
if (hasIconAfter.value !== void 0) {
|
|
@@ -2362,30 +2363,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2362
2363
|
const hasSuggestions = computed(
|
|
2363
2364
|
() => (storageKey == null ? void 0 : storageKey.value) && suggestions.value && suggestions.value.size > 0
|
|
2364
2365
|
);
|
|
2365
|
-
|
|
2366
|
+
function onSuggestionSelect(suggestion) {
|
|
2366
2367
|
var _a;
|
|
2367
2368
|
localModelValue.value = suggestion;
|
|
2368
2369
|
(_a = dropdownEl.value) == null ? void 0 : _a.hide();
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2370
|
+
}
|
|
2371
|
+
function onSuggestionRemove(suggestion) {
|
|
2371
2372
|
var _a;
|
|
2372
2373
|
(_a = suggestions.value) == null ? void 0 : _a.delete(suggestion);
|
|
2373
|
-
}
|
|
2374
|
+
}
|
|
2374
2375
|
const { modifiers } = toRefs(props);
|
|
2375
2376
|
const bemCssClasses = useModifiers(
|
|
2376
2377
|
"vv-input-text",
|
|
2377
2378
|
modifiers,
|
|
2378
2379
|
computed(() => ({
|
|
2379
|
-
valid: valid.value,
|
|
2380
|
-
invalid: invalid.value,
|
|
2381
|
-
loading: loading.value,
|
|
2382
|
-
disabled: props.disabled,
|
|
2383
|
-
readonly: props.readonly,
|
|
2380
|
+
"valid": valid.value,
|
|
2381
|
+
"invalid": invalid.value,
|
|
2382
|
+
"loading": loading.value,
|
|
2383
|
+
"disabled": props.disabled,
|
|
2384
|
+
"readonly": props.readonly,
|
|
2384
2385
|
"icon-before": !!hasIconBefore.value,
|
|
2385
2386
|
"icon-after": !!iconAfter.value,
|
|
2386
|
-
floating: props.floating && !isEmpty(props.label),
|
|
2387
|
-
dirty: isDirty.value,
|
|
2388
|
-
focus: isFocused.value,
|
|
2387
|
+
"floating": props.floating && !isEmpty(props.label),
|
|
2388
|
+
"dirty": isDirty.value,
|
|
2389
|
+
"focus": isFocused.value,
|
|
2389
2390
|
"auto-width": props.autoWidth
|
|
2390
2391
|
}))
|
|
2391
2392
|
);
|
|
@@ -2397,19 +2398,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2397
2398
|
if (isDateTime.value && !isDirty.value && !focused.value) {
|
|
2398
2399
|
return INPUT_TYPES.TEXT;
|
|
2399
2400
|
}
|
|
2400
|
-
if (iMask
|
|
2401
|
+
if (props.iMask) {
|
|
2401
2402
|
return INPUT_TYPES.TEXT;
|
|
2402
2403
|
}
|
|
2403
2404
|
return props.type;
|
|
2404
2405
|
})();
|
|
2405
2406
|
const toReturn = {
|
|
2406
2407
|
type: type2,
|
|
2407
|
-
name: props.name,
|
|
2408
|
-
tabindex: hasTabindex.value,
|
|
2409
|
-
disabled: props.disabled,
|
|
2410
|
-
readonly: props.readonly,
|
|
2411
|
-
required: props.required,
|
|
2412
|
-
autocomplete: props.autocomplete,
|
|
2408
|
+
"name": props.name,
|
|
2409
|
+
"tabindex": hasTabindex.value,
|
|
2410
|
+
"disabled": props.disabled,
|
|
2411
|
+
"readonly": props.readonly,
|
|
2412
|
+
"required": props.required,
|
|
2413
|
+
"autocomplete": props.autocomplete,
|
|
2413
2414
|
"aria-invalid": isInvalid.value,
|
|
2414
2415
|
"aria-describedby": hasHintLabelOrSlot.value ? hasHintId.value : void 0,
|
|
2415
2416
|
"aria-errormessage": hasInvalidLabelOrSlot.value ? hasHintId.value : void 0
|
|
@@ -2463,11 +2464,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2463
2464
|
INPUT_TYPES.SEARCH,
|
|
2464
2465
|
props
|
|
2465
2466
|
);
|
|
2466
|
-
|
|
2467
|
+
function onClickInner() {
|
|
2467
2468
|
if (isClickable.value) {
|
|
2468
2469
|
focused.value = true;
|
|
2469
2470
|
}
|
|
2470
|
-
}
|
|
2471
|
+
}
|
|
2471
2472
|
const hasStyle = computed(() => {
|
|
2472
2473
|
if (!props.autoWidth) {
|
|
2473
2474
|
return void 0;
|
|
@@ -2476,7 +2477,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2476
2477
|
width: localModelValue.value !== void 0 ? `${String(localModelValue.value).length + 1}ch` : void 0
|
|
2477
2478
|
};
|
|
2478
2479
|
});
|
|
2479
|
-
|
|
2480
|
+
function onKeyDown(event) {
|
|
2480
2481
|
switch (event.code) {
|
|
2481
2482
|
case "ArrowUp":
|
|
2482
2483
|
if (isNumber.value) {
|
|
@@ -2492,7 +2493,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2492
2493
|
break;
|
|
2493
2494
|
}
|
|
2494
2495
|
emit("keydown", event);
|
|
2495
|
-
}
|
|
2496
|
+
}
|
|
2496
2497
|
return (_ctx, _cache) => {
|
|
2497
2498
|
return openBlock(), createElementBlock(
|
|
2498
2499
|
"div",
|