@volverjs/ui-vue 0.0.10-beta.5 → 0.0.10-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +148 -51
- package/auto-imports.d.ts +25 -12
- package/bin/icons.cjs +1 -1
- package/bin/icons.js +28 -20
- package/dist/Volver.d.ts +11 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +192 -104
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +29 -10
- package/dist/components/VvAccordion/index.d.ts +8 -9
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +485 -206
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +61 -18
- package/dist/components/VvAccordionGroup/index.d.ts +16 -8
- package/dist/components/VvAction/VvAction.es.js +84 -33
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +61 -28
- package/dist/components/VvAction/index.d.ts +26 -10
- package/dist/components/VvAlert/VvAlert.es.js +350 -318
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +25 -17
- package/dist/components/VvAlert/index.d.ts +20 -11
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +388 -327
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +22 -17
- package/dist/components/VvAlertGroup/index.d.ts +10 -18
- package/dist/components/VvAvatar/VvAvatar.es.js +66 -28
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +13 -5
- package/dist/components/VvAvatar/index.d.ts +4 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +147 -74
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +17 -10
- package/dist/components/VvAvatarGroup/index.d.ts +6 -3
- package/dist/components/VvBadge/VvBadge.es.js +78 -34
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +13 -5
- package/dist/components/VvBadge/index.d.ts +4 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +294 -83
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +28 -8
- package/dist/components/VvBreadcrumb/index.d.ts +6 -10
- package/dist/components/VvButton/VvButton.es.js +510 -488
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +97 -45
- package/dist/components/VvButton/index.d.ts +52 -30
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +95 -45
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +35 -17
- package/dist/components/VvButtonGroup/index.d.ts +13 -4
- package/dist/components/VvCard/VvCard.es.js +87 -42
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +13 -5
- package/dist/components/VvCard/index.d.ts +4 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -136
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -35
- package/dist/components/VvCheckbox/index.d.ts +52 -19
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +408 -322
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +103 -34
- package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
- package/dist/components/VvCombobox/VvCombobox.es.js +2304 -1992
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +258 -672
- package/dist/components/VvCombobox/index.d.ts +377 -135
- package/dist/components/VvDialog/VvDialog.es.js +177 -297
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +23 -7
- package/dist/components/VvDialog/index.d.ts +12 -0
- package/dist/components/VvDropdown/VvDropdown.es.js +172 -102
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +110 -315
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +77 -28
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +13 -5
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +38 -10
- package/dist/components/VvDropdown/index.d.ts +52 -118
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +165 -60
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +337 -10
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +24 -102
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +4 -68
- package/dist/components/VvIcon/index.d.ts +33 -48
- package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +317 -0
- package/dist/components/VvInputFile/index.d.ts +193 -0
- package/dist/components/VvInputText/VvInputClearAction.d.ts +16 -10
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +20 -14
- package/dist/components/VvInputText/VvInputStepAction.d.ts +11 -7
- package/dist/components/VvInputText/VvInputText.es.js +1491 -551
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +216 -68
- package/dist/components/VvInputText/index.d.ts +101 -31
- package/dist/components/VvNav/VvNav.es.js +155 -75
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +32 -11
- package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
- package/dist/components/VvNav/index.d.ts +5 -2
- package/dist/components/VvNavItem/VvNavItem.es.js +100 -39
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +73 -27
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +13 -6
- package/dist/components/VvProgress/index.d.ts +4 -1
- package/dist/components/VvRadio/VvRadio.es.js +175 -135
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -33
- package/dist/components/VvRadio/index.d.ts +50 -17
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +406 -321
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +103 -34
- package/dist/components/VvRadioGroup/index.d.ts +45 -12
- package/dist/components/VvSelect/VvSelect.es.js +677 -611
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +107 -199
- package/dist/components/VvSelect/index.d.ts +196 -16
- package/dist/components/VvTab/VvTab.es.js +230 -110
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +34 -12
- package/dist/components/VvTab/index.d.ts +6 -3
- package/dist/components/VvTextarea/VvTextarea.es.js +606 -597
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +159 -54
- package/dist/components/VvTextarea/index.d.ts +69 -20
- package/dist/components/VvTooltip/VvTooltip.es.js +83 -30
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +16 -9
- package/dist/components/VvTooltip/index.d.ts +5 -2
- package/dist/components/common/HintSlot.d.ts +8 -9
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.es.js +4086 -2029
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlerInject.d.ts +4 -0
- package/dist/composables/alert/useAlert.d.ts +71 -6
- package/dist/composables/alert/{useProvideAlert.d.ts → useAlertProvide.d.ts} +1 -1
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/useDropdownInject.d.ts +12 -0
- package/dist/composables/dropdown/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -7
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/useGroupStateInject.d.ts +9 -0
- package/dist/composables/group/useGroupStateProvide.d.ts +6 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.es.js +178 -6
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentFocus.d.ts +2 -2
- package/dist/composables/useComponentIcon.d.ts +9 -8
- package/dist/composables/useOptions.d.ts +5 -5
- package/dist/composables/usePersistence.d.ts +3 -0
- package/dist/composables/useUniqueId.d.ts +2 -2
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/constants.d.ts +35 -33
- package/dist/directives/index.d.ts +3 -5
- package/dist/directives/index.es.js +247 -82
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.es.js +137 -31
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.es.js +101 -39
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.d.ts +17 -17
- package/dist/icons.es.js +516 -516
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +74 -6
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +277 -193
- package/dist/resolvers/unplugin.d.ts +6 -1
- package/dist/resolvers/unplugin.es.js +87 -10
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +2 -57
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +2 -66
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +2 -127
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1304 -538
- package/dist/stories/Alert/Alert.settings.d.ts +2 -109
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +2 -85
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +2 -38
- package/dist/stories/Badge/Badge.settings.d.ts +2 -26
- package/dist/stories/Badge/Badge.test.d.ts +1 -1
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +2 -18
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +2 -194
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +2 -40
- package/dist/stories/Card/Card.settings.d.ts +2 -63
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +2 -132
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +1 -141
- package/dist/stories/Combobox/Combobox.settings.d.ts +2 -609
- package/dist/stories/Combobox/Combobox.stories.d.ts +1 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +1 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +2 -47
- package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +2 -205
- package/dist/stories/Icon/Icon.settings.d.ts +3 -68
- package/dist/stories/InputFile/InputFile.settings.d.ts +6 -0
- package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
- package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
- package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
- package/dist/stories/InputText/InputText.settings.d.ts +2 -438
- package/dist/stories/Nav/Nav.settings.d.ts +2 -10
- package/dist/stories/Progress/Progress.settings.d.ts +2 -27
- package/dist/stories/Radio/Radio.settings.d.ts +1 -110
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -141
- package/dist/stories/Select/Select.settings.d.ts +2 -246
- package/dist/stories/Select/Select.stories.d.ts +1 -0
- package/dist/stories/Tab/Tab.settings.d.ts +2 -15
- package/dist/stories/Textarea/Textarea.settings.d.ts +2 -287
- package/dist/stories/argTypes.d.ts +27 -866
- package/dist/test/expect.d.ts +1 -2
- package/dist/test/options.d.ts +1 -1
- package/dist/test/sleep.d.ts +1 -1
- package/dist/types/alert.d.ts +9 -7
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/generic.d.ts +1 -2
- package/dist/types/group.d.ts +37 -15
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +9 -0
- package/dist/types/nav.d.ts +2 -2
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/dist/utils/ObjectUtilities.d.ts +8 -9
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +238 -246
- package/src/Volver.ts +251 -246
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +163 -100
- package/src/components/VvAccordion/index.ts +65 -80
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +224 -106
- package/src/components/VvAccordionGroup/index.ts +42 -42
- package/src/components/VvAction/VvAction.vue +144 -130
- package/src/components/VvAlert/VvAlert.vue +72 -70
- package/src/components/VvAlert/index.ts +149 -147
- package/src/components/VvAlertGroup/VvAlertGroup.vue +57 -56
- package/src/components/VvAlertGroup/index.ts +102 -118
- package/src/components/VvAvatar/VvAvatar.vue +20 -14
- package/src/components/VvAvatar/index.ts +5 -5
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +58 -53
- package/src/components/VvAvatarGroup/index.ts +21 -21
- package/src/components/VvBadge/VvBadge.vue +15 -14
- package/src/components/VvBadge/index.ts +2 -2
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +50 -48
- package/src/components/VvBreadcrumb/index.ts +3 -9
- package/src/components/VvButton/VvButton.vue +163 -152
- package/src/components/VvButton/index.ts +104 -111
- package/src/components/VvButtonGroup/VvButtonGroup.vue +73 -65
- package/src/components/VvButtonGroup/index.ts +23 -22
- package/src/components/VvCard/VvCard.vue +30 -30
- package/src/components/VvCard/index.ts +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +186 -184
- package/src/components/VvCheckbox/index.ts +45 -45
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +88 -87
- package/src/components/VvCombobox/VvCombobox.vue +655 -619
- package/src/components/VvCombobox/index.ts +210 -168
- package/src/components/VvDialog/VvDialog.vue +139 -129
- package/src/components/VvDialog/index.ts +42 -36
- package/src/components/VvDropdown/VvDropdown.vue +466 -445
- package/src/components/VvDropdown/VvDropdownAction.vue +37 -39
- package/src/components/VvDropdown/VvDropdownItem.vue +30 -26
- package/src/components/VvDropdown/VvDropdownOptgroup.vue +13 -12
- package/src/components/VvDropdown/VvDropdownOption.vue +47 -64
- package/src/components/VvDropdown/index.ts +61 -27
- package/src/components/VvIcon/README.md +1 -1
- package/src/components/VvIcon/VvIcon.vue +133 -133
- package/src/components/VvIcon/index.ts +84 -97
- package/src/components/VvInputFile/VvInputFile.vue +413 -0
- package/src/components/VvInputFile/index.ts +143 -0
- package/src/components/VvInputText/VvInputClearAction.ts +51 -47
- package/src/components/VvInputText/VvInputPasswordAction.ts +66 -62
- package/src/components/VvInputText/VvInputStepAction.ts +43 -43
- package/src/components/VvInputText/VvInputText.vue +652 -516
- package/src/components/VvInputText/VvInputTextActions.ts +87 -87
- package/src/components/VvInputText/index.ts +201 -186
- package/src/components/VvNav/VvNav.vue +40 -36
- package/src/components/VvNav/VvNavItem.vue +12 -12
- package/src/components/VvNav/VvNavSeparator.vue +6 -6
- package/src/components/VvNav/index.ts +2 -2
- package/src/components/VvProgress/VvProgress.vue +27 -27
- package/src/components/VvProgress/index.ts +28 -28
- package/src/components/VvRadio/VvRadio.vue +115 -112
- package/src/components/VvRadio/index.ts +29 -29
- package/src/components/VvRadioGroup/VvRadioGroup.vue +91 -90
- package/src/components/VvSelect/VvSelect.vue +262 -241
- package/src/components/VvSelect/index.ts +88 -63
- package/src/components/VvTab/VvTab.vue +79 -69
- package/src/components/VvTab/index.ts +13 -13
- package/src/components/VvTextarea/VvTextarea.vue +218 -219
- package/src/components/VvTextarea/index.ts +35 -35
- package/src/components/VvTooltip/VvTooltip.vue +22 -16
- package/src/components/VvTooltip/index.ts +12 -12
- package/src/components/common/HintSlot.ts +151 -152
- package/src/components/index.ts +10 -0
- package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +1 -1
- package/src/composables/alert/useAlert.ts +76 -73
- package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +12 -12
- package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
- package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +6 -6
- package/src/composables/dropdown/useDropdownProvide.ts +94 -0
- package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
- package/src/composables/group/useGroupStateInject.ts +55 -0
- package/src/composables/group/useGroupStateProvide.ts +14 -0
- package/src/composables/index.ts +3 -0
- package/src/composables/useBlurhash.ts +68 -0
- package/src/composables/useComponentFocus.ts +9 -9
- package/src/composables/useComponentIcon.ts +36 -35
- package/src/composables/useDebouncedInput.ts +25 -25
- package/src/composables/useDefaults.ts +81 -80
- package/src/composables/useModifiers.ts +29 -29
- package/src/composables/useOptions.ts +51 -42
- package/src/composables/usePersistence.ts +74 -0
- package/src/composables/useTextCount.ts +46 -46
- package/src/composables/useUniqueId.ts +4 -4
- package/src/composables/useVolver.ts +1 -1
- package/src/constants.ts +98 -83
- package/src/directives/index.ts +3 -6
- package/src/directives/v-contextmenu.ts +26 -34
- package/src/directives/v-tooltip.ts +20 -11
- package/src/icons.ts +2 -2
- package/src/index.ts +6 -4
- package/src/props/index.ts +461 -384
- package/src/resolvers/unplugin.ts +154 -144
- package/src/shims.d.ts +4 -5
- package/src/stories/Accordion/Accordion.settings.ts +51 -50
- package/src/stories/Accordion/Accordion.stories.ts +21 -21
- package/src/stories/Accordion/Accordion.test.ts +56 -54
- package/src/stories/Accordion/AccordionSlots.stories.ts +13 -13
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +70 -67
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +41 -39
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +49 -45
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +36 -36
- package/src/stories/Alert/Alert.settings.ts +117 -116
- package/src/stories/Alert/Alert.stories.ts +30 -30
- package/src/stories/Alert/Alert.test.ts +78 -80
- package/src/stories/Alert/AlertModifiers.stories.ts +45 -45
- package/src/stories/Alert/AlertSlots.stories.ts +35 -35
- package/src/stories/AlertGroup/AlertGroup.settings.ts +107 -105
- package/src/stories/AlertGroup/AlertGroup.stories.ts +25 -25
- package/src/stories/AlertGroup/AlertGroup.test.ts +69 -71
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +68 -68
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +23 -23
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +58 -58
- package/src/stories/Avatar/Avatar.settings.ts +29 -29
- package/src/stories/Avatar/Avatar.stories.ts +22 -22
- package/src/stories/Avatar/Avatar.test.ts +22 -24
- package/src/stories/Avatar/AvatarBadge.stories.ts +15 -15
- package/src/stories/Avatar/AvatarModifiers.stories.ts +60 -60
- package/src/stories/Avatar/AvatarSlots.stories.ts +17 -17
- package/src/stories/AvatarGroup/AvatarGroup.settings.ts +54 -53
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +17 -17
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +24 -26
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +15 -15
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +17 -17
- package/src/stories/Badge/Badge.settings.ts +21 -20
- package/src/stories/Badge/Badge.stories.ts +24 -24
- package/src/stories/Badge/Badge.test.ts +8 -8
- package/src/stories/Badge/BadgeSlots.stories.ts +10 -10
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +116 -0
- package/src/stories/Breadcrumb/Breadcrumb.settings.ts +35 -34
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +23 -23
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +44 -43
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +19 -19
- package/src/stories/Button/Button.settings.ts +147 -151
- package/src/stories/Button/Button.stories.ts +19 -19
- package/src/stories/Button/Button.test.ts +41 -42
- package/src/stories/Button/ButtonIcon.stories.ts +42 -42
- package/src/stories/Button/ButtonLink.stories.ts +24 -24
- package/src/stories/Button/ButtonLoading.stories.ts +22 -22
- package/src/stories/Button/ButtonModifiers.stories.ts +91 -91
- package/src/stories/Button/ButtonSlots.stories.ts +47 -47
- package/src/stories/Button/ButtonState.stories.ts +23 -23
- package/src/stories/Button/ButtonToggle.stories.ts +30 -30
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +33 -24
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +19 -19
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +23 -26
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +20 -20
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +17 -17
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +22 -22
- package/src/stories/Card/Card.settings.ts +49 -48
- package/src/stories/Card/Card.stories.ts +22 -22
- package/src/stories/Card/Card.test.ts +14 -16
- package/src/stories/Card/CardSlots.stories.ts +42 -42
- package/src/stories/Checkbox/Checkbox.settings.ts +36 -35
- package/src/stories/Checkbox/Checkbox.stories.ts +57 -57
- package/src/stories/Checkbox/Checkbox.test.ts +63 -66
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +18 -18
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +15 -15
- package/src/stories/CheckboxGroup/CheckboxGroup.settings.ts +9 -9
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +50 -50
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +64 -68
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +34 -34
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +23 -23
- package/src/stories/Combobox/Combobox.settings.ts +408 -385
- package/src/stories/Combobox/Combobox.stories.ts +116 -107
- package/src/stories/Combobox/Combobox.test.ts +92 -92
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +25 -24
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +32 -22
- package/src/stories/Combobox/ComboboxOptions.stories.ts +81 -84
- package/src/stories/Combobox/ComboboxSlots.stories.ts +55 -54
- package/src/stories/Dialog/Dialog.settings.ts +49 -40
- package/src/stories/Dialog/Dialog.stories.ts +28 -28
- package/src/stories/Dialog/Dialog.test.ts +49 -54
- package/src/stories/Dialog/DialogModifiers.stories.ts +42 -0
- package/src/stories/Dialog/DialogSlots.stories.ts +20 -20
- package/src/stories/Dropdown/Dropdown.settings.ts +62 -61
- package/src/stories/Dropdown/Dropdown.stories.ts +60 -60
- package/src/stories/Dropdown/Dropdown.test.ts +9 -13
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +18 -19
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +19 -19
- package/src/stories/Dropdown/DropdownSlots.stories.ts +51 -51
- package/src/stories/Icon/Icon.settings.ts +66 -65
- package/src/stories/Icon/Icon.stories.ts +29 -30
- package/src/stories/Icon/IconsCollection.stories.ts +24 -24
- package/src/stories/InputFile/InputFile.settings.ts +37 -0
- package/src/stories/InputFile/InputFile.stories.ts +97 -0
- package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
- package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
- package/src/stories/InputText/InputText.settings.ts +248 -246
- package/src/stories/InputText/InputText.stories.ts +68 -68
- package/src/stories/InputText/InputText.test.ts +119 -122
- package/src/stories/InputText/InputTextIconPosition.stories.ts +24 -24
- package/src/stories/InputText/InputTextLength.stories.ts +33 -33
- package/src/stories/InputText/InputTextMask.stories.ts +91 -91
- package/src/stories/InputText/InputTextMinMax.stories.ts +30 -30
- package/src/stories/InputText/InputTextSlots.stories.ts +20 -20
- package/src/stories/InputText/InputTextType.stories.ts +70 -70
- package/src/stories/Nav/Nav.settings.ts +27 -27
- package/src/stories/Nav/Nav.stories.ts +18 -18
- package/src/stories/Nav/Nav.test.ts +10 -12
- package/src/stories/Nav/NavModifiers.stories.ts +25 -25
- package/src/stories/Progress/Progress.settings.ts +24 -23
- package/src/stories/Progress/Progress.stories.ts +23 -23
- package/src/stories/Progress/Progress.test.ts +5 -5
- package/src/stories/Radio/Radio.settings.ts +9 -9
- package/src/stories/Radio/Radio.stories.ts +47 -47
- package/src/stories/Radio/Radio.test.ts +54 -57
- package/src/stories/Radio/RadioSlots.stories.ts +15 -15
- package/src/stories/RadioGroup/RadioGroup.settings.ts +9 -9
- package/src/stories/RadioGroup/RadioGroup.stories.ts +51 -52
- package/src/stories/RadioGroup/RadioGroup.test.ts +64 -68
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +35 -35
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +23 -23
- package/src/stories/Select/Select.settings.ts +72 -71
- package/src/stories/Select/Select.stories.ts +75 -66
- package/src/stories/Select/Select.test.ts +67 -70
- package/src/stories/Select/SelectIconPosition.stories.ts +27 -26
- package/src/stories/Select/SelectOptions.stories.ts +55 -55
- package/src/stories/Select/SelectSlots.stories.ts +21 -20
- package/src/stories/Tab/Tab.settings.ts +34 -34
- package/src/stories/Tab/Tab.stories.ts +16 -16
- package/src/stories/Tab/Tab.test.ts +17 -19
- package/src/stories/Textarea/Textarea.settings.ts +80 -78
- package/src/stories/Textarea/Textarea.stories.ts +63 -63
- package/src/stories/Textarea/Textarea.test.ts +70 -73
- package/src/stories/Textarea/TextareaLength.stories.ts +33 -33
- package/src/stories/Textarea/TextareaSlots.stories.ts +20 -20
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +24 -24
- package/src/stories/Tooltip/Tooltip.settings.ts +16 -17
- package/src/stories/Tooltip/Tooltip.stories.ts +18 -18
- package/src/stories/Tooltip/Tooltip.test.ts +53 -54
- package/src/stories/Tooltip/TooltipDirective.stories.ts +37 -37
- package/src/stories/argTypes.ts +506 -505
- package/src/test/expect.ts +74 -79
- package/src/test/options.ts +17 -16
- package/src/test/sleep.ts +3 -2
- package/src/test/types.d.ts +12 -12
- package/src/types/alert.ts +21 -17
- package/src/types/blurhash.ts +21 -0
- package/src/types/floating-ui.ts +1 -1
- package/src/types/generic.ts +2 -3
- package/src/types/group.ts +35 -27
- package/src/types/index.ts +7 -0
- package/src/types/input-file.ts +10 -0
- package/src/types/nav.ts +13 -14
- package/src/utils/DomUtilities.ts +15 -0
- package/src/utils/ObjectUtilities.ts +192 -188
- package/src/workers/blurhash.ts +9 -0
- package/dist/composables/alert/useInjectAlert.d.ts +0 -9
- package/dist/composables/dropdown/useInjectDropdown.d.ts +0 -32
- package/dist/composables/group/useInjectedGroupState.d.ts +0 -10
- package/dist/composables/group/useProvideGroupState.d.ts +0 -6
- package/src/composables/dropdown/useProvideDropdown.ts +0 -94
- package/src/composables/group/useInjectedGroupState.ts +0 -51
- package/src/composables/group/useProvideGroupState.ts +0 -20
- /package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("@vueuse/core"),require("vuedraggable"),require("@iconify/vue")):"function"==typeof define&&define.amd?define(["vue","@vueuse/core","vuedraggable","@iconify/vue"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvInputFile=l(e.vue,e.core,e.Sortable,e.vue$1)}(this,(function(e,l,t,o){"use strict";var a=(e=>(e.local="local",e.session="session",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{});const d=Symbol.for("volver"),s=Symbol.for("buttonGroup"),v=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownAction"),f={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},p={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},m={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},g={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},b={disabled:{type:Boolean,default:!1}},y={active:{type:Boolean,default:!1}},h={current:{type:Boolean,default:!1}},k={pressed:{type:Boolean,default:!1}},S={label:{type:[String,Number],default:void 0}},B={readonly:{type:Boolean,default:!1}},L={modifiers:{type:[String,Array],default:void 0}},V={hintLabel:{type:String,default:""}},w={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:i.before,validation:e=>Object.values(i).includes(e)}},A={unselectable:{type:Boolean,default:!0}},$={id:[String,Number]};n.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const C={...$,name:{type:String,required:!0}},N={...b,...S,...k,...y,...h,...f,type:{type:String,default:r.button,validator:e=>Object.values(r).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:u.button}};a.local;const x="add",O="edit",_="download",I={prefix:"normal"},P={...C,...L,...p,...m,...V,...S,...g,...B,...b,...w,modelValue:{type:Object},progress:{type:[Number,String],default:void 0},placeholder:{type:String,default:void 0},accept:{type:String,default:"*"},multiple:{type:Boolean,default:!1},capture:{type:String,default:void 0,validation:e=>void 0===e||["user","environment"].includes(e)},max:{type:[Number,String],default:void 0},dropArea:{type:Boolean,default:!1},sortable:{type:Boolean,default:!1},labelAdd:{type:String,default:"Add file"},iconAdd:{type:[String,Object],default:x},labelReplace:{type:String,default:"Replace file"},iconReplace:{type:[String,Object],default:O},labelDownload:{type:String,default:"Downlaod file"},iconDownload:{type:[String,Object],default:_},labelRemove:{type:String,default:"Remove file"}};function R(e,l,t){return j(e,l)}function j(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const t=Array.isArray(e),o=Array.isArray(l);let a,n,i;if(t&&o){if(n=e.length,n!==l.length)return!1;for(a=n;0!=a--;)if(!j(e[a],l[a]))return!1;return!0}if(t!==o)return!1;const r=e instanceof Date,u=l instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===l.getTime();const d=e instanceof RegExp,s=l instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===l.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(l).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(l,v[a]))return!1;for(a=n;0!=a--;)if(i=v[a],!j(e[i],l[i]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(l)}function E(e,l){if(null!=e&&l&&l.length)for(const t of l)if(R(e,t))return!0;return!1}function D(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const M={...N,...$,...L,...A,...g,...w,iconPosition:{type:String,default:n.left,validator:e=>Object.values(n).includes(e)},loadingIcon:{type:String,default:"eos-icons:bubble-loading"},toggle:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:void 0},uncheckedValue:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0}};function F(l,t){const{group:o,isInGroup:a,getGroupOrLocalRef:n}=function(l){const t=e.inject(l,void 0),o=e.computed((()=>void 0!==t));return{group:t,isInGroup:o,getGroupOrLocalRef:function(l,o,a){const n=null==t?void 0:t[l];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const i=e.toRef(o,l);return e.computed({get:()=>i.value,set(e){a&&a(`update:${l}`,e)}})}}}(s),{id:i,iconPosition:r,icon:u,label:d,pressed:v}=e.toRefs(l),c=n("modelValue",l,t),f=n("toggle",l),p=n("unselectable",l),m=e.computed((()=>(null==o?void 0:o.multiple.value)??!1)),g=e.computed((()=>{let e=l.modifiers,t=null==o?void 0:o.modifiers.value;const a=new Set;return e&&(Array.isArray(e)||(e=e.split(" ")),e.forEach((e=>a.add(e)))),t&&(Array.isArray(t)||(t=t.split(" ")),t.forEach((e=>a.add(e)))),Array.from(a)})),b=e.computed((()=>Boolean(l.disabled||(null==o?void 0:o.disabled.value))));return{group:o,isInGroup:a,modelValue:c,toggle:f,unselectable:p,multiple:m,modifiers:g,disabled:b,id:i,pressed:v,iconPosition:r,icon:u,label:d}}const z=N;function T(){return e.inject(d)}const U=e.defineComponent({name:"VvAction",props:z,emits:["click","mouseover","mouseleave"],setup(l,{expose:t,emit:o}){const a=l,n=o,i=e.getCurrentInstance(),r=T(),d=e.ref(null);t({$el:d});const{reference:s,bus:f,aria:p,expanded:m}=e.inject(v,{});e.watch((()=>d.value),(e=>{s&&(s.value=e)}));const g=e.computed((()=>a.pressed||(null==m?void 0:m.value))),{role:b}=e.inject(c,{}),y=e.computed((()=>{switch(!0){case a.disabled:return u.button;case void 0!==a.to:return(null==r?void 0:r.nuxt)?u.nuxtLink:u.routerLink;case void 0!==a.href:return u.a;default:return a.defaultTag}})),h=e.computed((()=>{const e={...null==p?void 0:p.value,ariaPressed:!!g.value||void 0,ariaLabel:a.ariaLabel,role:null==b?void 0:b.value};switch(y.value){case u.a:return{...e,href:a.href,target:a.target,rel:a.rel};case u.routerLink:case u.nuxtLink:return{...e,to:a.to,target:a.target};case u.button:return{...e,type:a.type,disabled:a.disabled};default:return e}}));function k(e){var l;a.disabled?e.preventDefault():(null==(l=null==i?void 0:i.vnode.props)?void 0:l.onClick)?n("click",e):null==f||f.emit("click",e)}function S(e){var l;(null==(l=null==i?void 0:i.vnode.props)?void 0:l.onMouseover)?n("mouseover",e):null==f||f.emit("mouseover",e)}function B(e){var l;(null==(l=null==i?void 0:i.vnode.props)?void 0:l.onMouseleave)?n("mouseleave",e):null==f||f.emit("mouseleave",e)}return(l,t)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(h),{ref_key:"element",ref:d,class:{active:l.active,pressed:e.unref(g),disabled:l.disabled,current:l.current},onClickPassive:k,onMouseoverPassive:S,onMouseleavePassive:B}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]))])),_:3},16,["class"]))}});function q(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 G=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:{}},I),setup(l){const t=l,a=e.computed((()=>"string"==typeof t.rotate?Number.parseFloat(t.rotate):t.rotate)),n=e.ref(!0),i=T(),{modifiers:r}=e.toRefs(t),u=q("vv-icon",r),d=e.computed((()=>t.provider||(null==i?void 0:i.iconsProvider))),s=e.computed((()=>{const e=t.name??"",l=`@${d.value}:${t.prefix}:${e}`;if(o.iconExists(l))return l;const a=null==i?void 0:i.iconsCollections.find((l=>{const t=`@${d.value}:${l.prefix}:${e}`;return o.iconExists(t)}));return a?`@${d.value}:${a.prefix}:${e}`:e}));function v(e){const l=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==l?void 0:l.innerHTML.trim())||"";l&&a&&o.addIcon(`@${d.value}:${t.prefix}:${t.name}`,{body:a,height:l.viewBox.baseVal.height,width:l.viewBox.baseVal.width})}return i&&t.src&&!o.iconExists(`@${d.value}:${t.prefix}:${t.name}`)&&(n.value=!1,i.fetchIcon(t.src).then((e=>{e&&(v(e),n.value=!0)})).catch((e=>{throw new Error(`Error during fetch icon: ${null==e?void 0:e.message}`)}))),t.svg&&v(t.svg),(l,t)=>e.unref(n)?(e.openBlock(),e.createBlock(e.unref(o.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)}});function H(l){return e.computed((()=>String((null==l?void 0:l.value)||e.useId())))}function J(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)===i.before?o.value:void 0)),r=e.computed((()=>(null==t?void 0:t.value)===i.after?o.value:void 0)),u=e.computed((()=>(null==t?void 0:t.value)===n.left?o.value:void 0)),d=e.computed((()=>(null==t?void 0:t.value)===n.right?o.value:void 0)),s=e.computed((()=>(null==t?void 0:t.value)===n.top?o.value:void 0)),v=e.computed((()=>(null==t?void 0:t.value)===n.bottom?o.value:void 0));return{hasIcon:o,hasIconLeft:u,hasIconRight:d,hasIconTop:s,hasIconBottom:v,hasIconBefore:a,hasIconAfter:r}}const K={key:1,class:"vv-button__label"},Y={key:1,class:"vv-button__label"},Z=e.defineComponent({name:"VvButton",inheritAttrs:!1,props:M,emits:["update:modelValue"],setup(l,{expose:t,emit:o}){const a=l,i=o,r=e.useAttrs(),u=e.useSlots(),{id:d,modifiers:s,iconPosition:v,icon:c,label:f,modelValue:p,disabled:m,toggle:g,unselectable:b}=F(a,i),y=H(d),h=e.computed((()=>(null==r?void 0:r.name)||y.value)),k=e.ref(null);t({$el:e.computed((()=>{var e;return null==(e=k.value)?void 0:e.$el}))});const S=e.computed((()=>g.value?Array.isArray(p.value)?E(h.value,p.value):R(h.value,p.value):a.pressed)),B=q("vv-button",s,e.computed((()=>({reverse:[n.right,n.bottom].includes(v.value),column:[n.top,n.bottom].includes(v.value),"icon-only":Boolean((null==c?void 0:c.value)&&!(null==f?void 0:f.value)&&!u.default)})))),{hasIcon:L}=J(c),V=e.computed((()=>void 0!==a.value?a.value:h.value)),w=e.computed((()=>{if(g.value)return{onClick:A}}));function A(){if(g.value){if(Array.isArray(p.value))return E(V.value,p.value)?void(b.value&&(p.value=p.value.filter((e=>e!==V.value)))):void p.value.push(V.value);if(V.value===p.value&&b.value)return void(p.value=a.uncheckedValue);p.value=V.value}}return(l,t)=>(e.openBlock(),e.createBlock(U,e.mergeProps({...e.unref(r),...e.unref(w),disabled:e.unref(m),pressed:e.unref(S),active:l.active,type:l.type,to:l.to,href:l.href,target:l.target,rel:l.rel,ariaLabel:l.ariaLabel},{id:e.unref(y),ref_key:"element",ref:k,class:e.unref(B)}),{default:e.withCtx((()=>[e.renderSlot(l.$slots,"default",{},(()=>[l.loading?e.renderSlot(l.$slots,"loading",{key:0},(()=>[l.loadingIcon?(e.openBlock(),e.createBlock(G,{key:0,class:"vv-button__loading-icon",name:l.loadingIcon},null,8,["name"])):e.createCommentVNode("v-if",!0),l.loadingLabel?(e.openBlock(),e.createElementBlock("span",K,e.toDisplayString(l.loadingLabel),1)):e.createCommentVNode("v-if",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.renderSlot(l.$slots,"before"),e.unref(L)?(e.openBlock(),e.createBlock(G,e.mergeProps({key:0},e.unref(L),{class:"vv-button__icon"}),null,16)):e.createCommentVNode("v-if",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("span",Y,[e.renderSlot(l.$slots,"label",{},(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)]))])):e.createCommentVNode("v-if",!0),e.renderSlot(l.$slots,"after")],64))]))])),_:3},16,["id","class"]))}});const Q=["for"],W={class:"vv-input-file__preview"},X=["src","alt"],ee={class:"vv-input-file__wrapper"},le=["id","readonly","disabled","placeholder","aria-describedby","aria-invalid","aria-errormessage","multiple","accept","capture","name"],te=["value"],oe=["onClick"],ae=["title","onClick"],ne={class:"vv-input-file__item-name"},ie={class:"vv-input-file__item-info"},re=["title","disabled","onClick"];return e.defineComponent({name:"VvInputFile",props:P,emits:["remove","download","update:modelValue"],setup(o,{emit:a}){const n=o,i=a,r=e.useSlots(),u=function(l,t,o){const a=T(),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}),{})}))}("VvInputFile",P,n),{modifiers:d,id:s,readonly:v,disabled:c,icon:f,iconPosition:p,iconDownload:m}=e.toRefs(n),g=H(s),b=e.computed((()=>`${g.value}-hint`)),y=e.computed((()=>{if(!n.progress)return!1;const e="string"==typeof n.progress?Number.parseInt(n.progress):n.progress;return e>0&&e<100})),{hasIconBefore:h,hasIconAfter:k}=J(f,p),{hasIcon:S}=J(m),B=q("vv-input-file",d,e.computed((()=>({dragging:I.value,loading:n.loading&&!y.value,valid:!0===n.valid,invalid:!0===n.invalid,"icon-before":!!h.value,"icon-after":!!k.value,"drop-area":O.value})))),{HintSlot:L,hasHintLabelOrSlot:V,hasInvalidLabelOrSlot:w,hintSlotScope:A}=function(l,t){const o=e.computed((()=>e.isRef(l)?l.value:l)),a=e.computed((()=>D(o.value.invalidLabel))),n=e.computed((()=>D(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)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(t.hint||r.value))),c=e.computed((()=>d.value||s.value||u.value||v.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:c,invalidLabel:a,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),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:v,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hintSlotScope:f,HintSlot:p}}(u,r),$=l.useVModel(n,"modelValue",i),C=e.computed({get:()=>{var e;return $.value&&(Array.isArray($.value)||(null==(e=$.value)?void 0:e.name))?Array.isArray($.value)?$.value:[$.value]:[]},set:e=>{_.value?$.value=e:$.value=null==e?void 0:e[0]}}),N=e.computed((()=>n.disabled||n.readonly)),x=e.computed((()=>"string"==typeof n.max?Number.parseInt(n.max):n.max)),O=e.computed((()=>n.dropArea&&!N.value)),_=e.computed((()=>!!n.multiple&&(!x.value||x.value-C.value.length>1))),I=e.ref(!1),R=e.ref();function j(){I.value=!0}function E(){I.value=!1}function M(e){var l,t;(null==(l=e.dataTransfer)?void 0:l.files)&&(I.value=!1,z(null==(t=e.dataTransfer)?void 0:t.files))}function F(){var e;(null==(e=R.value)?void 0:e.files)&&(z(R.value.files),R.value.value="")}function z(e){if(!n.multiple)return Array.isArray($.value)?void($.value=[...e]):void($.value=e[0]);let l=[];l=!Array.isArray($.value)&&$.value?[$.value]:$.value&&Array.isArray($.value)?[...$.value]:l;for(const t of e){if(x.value&&l.length>=x.value)break;l.push(t)}$.value=l,K.value=l.length-1}function U(){R.value&&(N.value||R.value.click())}const K=e.ref(0),Y=["image/jpeg","image/png"],ue=e.computed((()=>{if(0===C.value.length)return;if(!C.value[K.value])return;if(C.value[K.value]instanceof File){const e=C.value[K.value];if(!Y.includes(e.type))return;return URL.createObjectURL(e)}const e=C.value[K.value];return e.thumbnailUrl?e.thumbnailUrl:Y.includes(e.type)?e.url:void 0}));function de(e,l){if(!e)return;if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return`${Number.parseFloat((e/1024**t).toFixed(2))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}`}e.watch(ue,((e,l)=>{l&&URL.revokeObjectURL(l)})),e.onBeforeUnmount((()=>{ue.value&&URL.revokeObjectURL(ue.value)}));const se=e.computed((()=>0===C.value.length||_.value?n.labelAdd:n.labelReplace)),ve=e.computed((()=>0===C.value.length||_.value?n.iconAdd:n.iconReplace));function ce({newIndex:e}){null!==e&&(K.value=e)}return(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(B))},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(g)},e.toDisplayString(l.label),9,Q)):e.createCommentVNode("v-if",!0),O.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vv-input-file__drop-area",onDragenter:e.withModifiers(j,["prevent","stop"]),onDragleave:e.withModifiers(E,["prevent","stop"]),onDrop:e.withModifiers(M,["prevent","stop"]),onDragover:o[0]||(o[0]=e.withModifiers((()=>{}),["prevent","stop"])),onClick:e.withModifiers(U,["stop"])},[e.renderSlot(l.$slots,"drop-area",{},(()=>[e.createElementVNode("picture",W,[ue.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:ue.value,alt:C.value[K.value].name},null,8,X)):e.createCommentVNode("v-if",!0)]),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(Z,{key:0,modifiers:"action",label:ue.value?void 0:se.value,title:ue.value?se.value:void 0,disabled:e.unref(c),class:e.normalizeClass({"vv-input-file__drop-area-action":ue.value}),icon:ve.value,onClick:e.withModifiers(U,["stop"])},null,8,["label","title","disabled","class","icon"]))]))],32)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ee,[e.unref(h)?(e.openBlock(),e.createBlock(G,e.normalizeProps(e.mergeProps({key:0},e.unref(h))),null,16)):e.createCommentVNode("v-if",!0),e.createElementVNode("input",{id:e.unref(g),ref_key:"inputEl",ref:R,type:"file",readonly:e.unref(v),disabled:e.unref(c),placeholder:l.placeholder,"aria-describedby":e.unref(V)?b.value:void 0,"aria-invalid":l.invalid,"aria-errormessage":e.unref(w)?b.value:void 0,multiple:_.value,accept:l.accept,capture:l.capture,name:l.name,onChange:F},null,40,le),y.value?(e.openBlock(),e.createElementBlock("progress",{key:1,class:"vv-input-file__progress",value:l.progress,max:"100"},e.toDisplayString(l.progress)+"% ",9,te)):e.createCommentVNode("v-if",!0),e.unref(k)?(e.openBlock(),e.createBlock(G,e.normalizeProps(e.mergeProps({key:2},e.unref(k))),null,16)):e.createCommentVNode("v-if",!0)]),e.createVNode(e.unref(t),{modelValue:C.value,"onUpdate:modelValue":o[1]||(o[1]=e=>C.value=e),tag:"ul",class:"vv-input-file__list","item-key":"name",move:()=>l.sortable,onEnd:ce},{item:e.withCtx((({element:t,index:o})=>[e.createElementVNode("li",{class:e.normalizeClass(["vv-input-file__item",{active:o===K.value&&O.value&&C.value.length>1,"cursor-move":l.sortable}]),onClick:e.withModifiers((e=>function(e){K.value=e}(o)),["stop"])},[e.unref(S)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"vv-input-file__item-action",title:l.labelDownload,onClick:e.withModifiers((e=>function(e){i("download",e);const l=e instanceof File?URL.createObjectURL(e):e.url;if(!l)return;const t=document.createElement("a");t.href=l,t.setAttribute("download",e.name),document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href)}(t)),["stop"])},[e.createVNode(G,e.normalizeProps(e.guardReactiveProps(e.unref(S))),null,16)],8,ae)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ne,e.toDisplayString(t.name),1),e.createElementVNode("small",ie,e.toDisplayString(de(t.size)),1),e.unref(v)?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"vv-input-file__item-remove",title:l.labelRemove,disabled:e.unref(c),onClick:e.withModifiers((e=>function(e){const l=Array.isArray($.value)?$.value[e]:$.value;if(!l)return;if(i("remove",l),!Array.isArray($.value))return void($.value=void 0);K.value===e&&(K.value=0);const t=[...$.value];t.splice(e,1),$.value=t}(o)),["stop"])},null,8,re))],10,oe)])),_:1},8,["modelValue","move"]),e.createVNode(e.unref(L),{id:b.value,class:"vv-input-file__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(A))))])),key:"3"}:void 0]),1032,["id"])],2))}})}));
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import type { UploadedFile } from '../../types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: PropType<File | UploadedFile | (File | UploadedFile)[]>;
|
|
5
|
+
};
|
|
6
|
+
progress: {
|
|
7
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
placeholder: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
13
|
+
};
|
|
14
|
+
accept: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
multiple: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
capture: {
|
|
23
|
+
type: PropType<"user" | "environment">;
|
|
24
|
+
default: undefined;
|
|
25
|
+
validation: (value?: string) => boolean;
|
|
26
|
+
};
|
|
27
|
+
max: {
|
|
28
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
dropArea: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
sortable: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
labelAdd: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
iconAdd: {
|
|
44
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
45
|
+
default: "add";
|
|
46
|
+
};
|
|
47
|
+
labelReplace: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
iconReplace: {
|
|
52
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
53
|
+
default: "edit";
|
|
54
|
+
};
|
|
55
|
+
labelDownload: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
iconDownload: {
|
|
60
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
61
|
+
default: "download";
|
|
62
|
+
};
|
|
63
|
+
labelRemove: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
icon: {
|
|
68
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
69
|
+
default: undefined;
|
|
70
|
+
};
|
|
71
|
+
iconPosition: {
|
|
72
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
73
|
+
default: import("../../constants").Position;
|
|
74
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
75
|
+
};
|
|
76
|
+
disabled: {
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
|
+
readonly: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
loading: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
loadingLabel: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
label: {
|
|
93
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
96
|
+
hintLabel: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
default: string;
|
|
99
|
+
};
|
|
100
|
+
invalid: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
|
+
invalidLabel: {
|
|
105
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
106
|
+
default: undefined;
|
|
107
|
+
};
|
|
108
|
+
valid: {
|
|
109
|
+
type: BooleanConstructor;
|
|
110
|
+
default: boolean;
|
|
111
|
+
};
|
|
112
|
+
validLabel: {
|
|
113
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
114
|
+
default: undefined;
|
|
115
|
+
};
|
|
116
|
+
modifiers: {
|
|
117
|
+
type: PropType<string | string[]>;
|
|
118
|
+
default: undefined;
|
|
119
|
+
};
|
|
120
|
+
name: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
required: boolean;
|
|
123
|
+
};
|
|
124
|
+
id: (StringConstructor | NumberConstructor)[];
|
|
125
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
126
|
+
download: (args_0: File | UploadedFile) => any;
|
|
127
|
+
"update:modelValue": (args_0: File | UploadedFile | (File | UploadedFile)[] | undefined) => any;
|
|
128
|
+
remove: (args_0: File | UploadedFile) => any;
|
|
129
|
+
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
130
|
+
modelValue: {
|
|
131
|
+
type: PropType<File | UploadedFile | (File | UploadedFile)[]>;
|
|
132
|
+
};
|
|
133
|
+
progress: {
|
|
134
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
135
|
+
default: undefined;
|
|
136
|
+
};
|
|
137
|
+
placeholder: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
default: undefined;
|
|
140
|
+
};
|
|
141
|
+
accept: {
|
|
142
|
+
type: StringConstructor;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
145
|
+
multiple: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
default: boolean;
|
|
148
|
+
};
|
|
149
|
+
capture: {
|
|
150
|
+
type: PropType<"user" | "environment">;
|
|
151
|
+
default: undefined;
|
|
152
|
+
validation: (value?: string) => boolean;
|
|
153
|
+
};
|
|
154
|
+
max: {
|
|
155
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
dropArea: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
162
|
+
sortable: {
|
|
163
|
+
type: BooleanConstructor;
|
|
164
|
+
default: boolean;
|
|
165
|
+
};
|
|
166
|
+
labelAdd: {
|
|
167
|
+
type: StringConstructor;
|
|
168
|
+
default: string;
|
|
169
|
+
};
|
|
170
|
+
iconAdd: {
|
|
171
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
172
|
+
default: "add";
|
|
173
|
+
};
|
|
174
|
+
labelReplace: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
default: string;
|
|
177
|
+
};
|
|
178
|
+
iconReplace: {
|
|
179
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
180
|
+
default: "edit";
|
|
181
|
+
};
|
|
182
|
+
labelDownload: {
|
|
183
|
+
type: StringConstructor;
|
|
184
|
+
default: string;
|
|
185
|
+
};
|
|
186
|
+
iconDownload: {
|
|
187
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
188
|
+
default: "download";
|
|
189
|
+
};
|
|
190
|
+
labelRemove: {
|
|
191
|
+
type: StringConstructor;
|
|
192
|
+
default: string;
|
|
193
|
+
};
|
|
194
|
+
icon: {
|
|
195
|
+
type: PropType<string | import("../VvIcon").VvIconProps>;
|
|
196
|
+
default: undefined;
|
|
197
|
+
};
|
|
198
|
+
iconPosition: {
|
|
199
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
200
|
+
default: import("../../constants").Position;
|
|
201
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
202
|
+
};
|
|
203
|
+
disabled: {
|
|
204
|
+
type: BooleanConstructor;
|
|
205
|
+
default: boolean;
|
|
206
|
+
};
|
|
207
|
+
readonly: {
|
|
208
|
+
type: BooleanConstructor;
|
|
209
|
+
default: boolean;
|
|
210
|
+
};
|
|
211
|
+
loading: {
|
|
212
|
+
type: BooleanConstructor;
|
|
213
|
+
default: boolean;
|
|
214
|
+
};
|
|
215
|
+
loadingLabel: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
default: string;
|
|
218
|
+
};
|
|
219
|
+
label: {
|
|
220
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
221
|
+
default: undefined;
|
|
222
|
+
};
|
|
223
|
+
hintLabel: {
|
|
224
|
+
type: StringConstructor;
|
|
225
|
+
default: string;
|
|
226
|
+
};
|
|
227
|
+
invalid: {
|
|
228
|
+
type: BooleanConstructor;
|
|
229
|
+
default: boolean;
|
|
230
|
+
};
|
|
231
|
+
invalidLabel: {
|
|
232
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
233
|
+
default: undefined;
|
|
234
|
+
};
|
|
235
|
+
valid: {
|
|
236
|
+
type: BooleanConstructor;
|
|
237
|
+
default: boolean;
|
|
238
|
+
};
|
|
239
|
+
validLabel: {
|
|
240
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
241
|
+
default: undefined;
|
|
242
|
+
};
|
|
243
|
+
modifiers: {
|
|
244
|
+
type: PropType<string | string[]>;
|
|
245
|
+
default: undefined;
|
|
246
|
+
};
|
|
247
|
+
name: {
|
|
248
|
+
type: StringConstructor;
|
|
249
|
+
required: boolean;
|
|
250
|
+
};
|
|
251
|
+
id: (StringConstructor | NumberConstructor)[];
|
|
252
|
+
}>> & Readonly<{
|
|
253
|
+
onDownload?: ((args_0: File | UploadedFile) => any) | undefined;
|
|
254
|
+
"onUpdate:modelValue"?: ((args_0: File | UploadedFile | (File | UploadedFile)[] | undefined) => any) | undefined;
|
|
255
|
+
onRemove?: ((args_0: File | UploadedFile) => any) | undefined;
|
|
256
|
+
}>, {
|
|
257
|
+
label: string | number;
|
|
258
|
+
disabled: boolean;
|
|
259
|
+
modifiers: string | string[];
|
|
260
|
+
progress: string | number;
|
|
261
|
+
icon: string | import("../VvIcon").VvIconProps;
|
|
262
|
+
iconPosition: "before" | "after";
|
|
263
|
+
loading: boolean;
|
|
264
|
+
loadingLabel: string;
|
|
265
|
+
multiple: boolean;
|
|
266
|
+
readonly: boolean;
|
|
267
|
+
hintLabel: string;
|
|
268
|
+
invalid: boolean;
|
|
269
|
+
invalidLabel: string | unknown[];
|
|
270
|
+
valid: boolean;
|
|
271
|
+
validLabel: string | unknown[];
|
|
272
|
+
placeholder: string;
|
|
273
|
+
accept: string;
|
|
274
|
+
capture: "user" | "environment";
|
|
275
|
+
max: string | number;
|
|
276
|
+
dropArea: boolean;
|
|
277
|
+
sortable: boolean;
|
|
278
|
+
labelAdd: string;
|
|
279
|
+
iconAdd: string | import("../VvIcon").VvIconProps;
|
|
280
|
+
labelReplace: string;
|
|
281
|
+
iconReplace: string | import("../VvIcon").VvIconProps;
|
|
282
|
+
labelDownload: string;
|
|
283
|
+
iconDownload: string | import("../VvIcon").VvIconProps;
|
|
284
|
+
labelRemove: string;
|
|
285
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>, {
|
|
286
|
+
"drop-area"?(_: {}): any;
|
|
287
|
+
hint?(_: {
|
|
288
|
+
modelValue: unknown;
|
|
289
|
+
valid: boolean;
|
|
290
|
+
invalid: boolean;
|
|
291
|
+
loading: boolean;
|
|
292
|
+
}): any;
|
|
293
|
+
loading?(_: {
|
|
294
|
+
modelValue: unknown;
|
|
295
|
+
valid: boolean;
|
|
296
|
+
invalid: boolean;
|
|
297
|
+
loading: boolean;
|
|
298
|
+
}): any;
|
|
299
|
+
valid?(_: {
|
|
300
|
+
modelValue: unknown;
|
|
301
|
+
valid: boolean;
|
|
302
|
+
invalid: boolean;
|
|
303
|
+
loading: boolean;
|
|
304
|
+
}): any;
|
|
305
|
+
invalid?(_: {
|
|
306
|
+
modelValue: unknown;
|
|
307
|
+
valid: boolean;
|
|
308
|
+
invalid: boolean;
|
|
309
|
+
loading: boolean;
|
|
310
|
+
}): any;
|
|
311
|
+
}>;
|
|
312
|
+
export default _default;
|
|
313
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
314
|
+
new (): {
|
|
315
|
+
$slots: S;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import type { UploadedFile } from '@/types';
|
|
2
|
+
import { type VvIconProps } from '../VvIcon';
|
|
3
|
+
export type VvInputFileEvents = {
|
|
4
|
+
'remove': [
|
|
5
|
+
File | UploadedFile
|
|
6
|
+
];
|
|
7
|
+
'download': [
|
|
8
|
+
File | UploadedFile
|
|
9
|
+
];
|
|
10
|
+
'update:modelValue': [
|
|
11
|
+
File | UploadedFile | (File | UploadedFile)[] | undefined
|
|
12
|
+
];
|
|
13
|
+
};
|
|
14
|
+
export declare const VvInputFileProps: {
|
|
15
|
+
/**
|
|
16
|
+
* Input value
|
|
17
|
+
*/
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: PropType<File | UploadedFile | (File | UploadedFile)[]>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Whether to show progress bar
|
|
23
|
+
*/
|
|
24
|
+
progress: {
|
|
25
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Input
|
|
30
|
+
* Text that appears in the form control when it has no value set
|
|
31
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
|
|
32
|
+
*/
|
|
33
|
+
placeholder: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: undefined;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* File types to accept
|
|
39
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
|
|
40
|
+
*/
|
|
41
|
+
accept: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Whether to allow multiple values
|
|
47
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#multiple
|
|
48
|
+
*/
|
|
49
|
+
multiple: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Front or rear camera
|
|
55
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/capture
|
|
56
|
+
*/
|
|
57
|
+
capture: {
|
|
58
|
+
type: PropType<"user" | "environment">;
|
|
59
|
+
default: undefined;
|
|
60
|
+
validation: (value?: string) => boolean;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Max number of files
|
|
64
|
+
*/
|
|
65
|
+
max: {
|
|
66
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
67
|
+
default: undefined;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Show drop area
|
|
71
|
+
*/
|
|
72
|
+
dropArea: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Enable sorting
|
|
78
|
+
*/
|
|
79
|
+
sortable: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Label for add button
|
|
85
|
+
*/
|
|
86
|
+
labelAdd: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* VvIcon name for add button
|
|
92
|
+
* @see VVIcon
|
|
93
|
+
*/
|
|
94
|
+
iconAdd: {
|
|
95
|
+
type: PropType<string | VvIconProps>;
|
|
96
|
+
default: "add";
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Label for replace button
|
|
100
|
+
*/
|
|
101
|
+
labelReplace: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* VvIcon name for replace button
|
|
107
|
+
* @see VVIcon
|
|
108
|
+
*/
|
|
109
|
+
iconReplace: {
|
|
110
|
+
type: PropType<string | VvIconProps>;
|
|
111
|
+
default: "edit";
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Label for download button
|
|
115
|
+
*/
|
|
116
|
+
labelDownload: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* VvIcon name for download button
|
|
122
|
+
* @see VVIcon
|
|
123
|
+
*/
|
|
124
|
+
iconDownload: {
|
|
125
|
+
type: PropType<string | VvIconProps>;
|
|
126
|
+
default: "download";
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Label for remove button
|
|
130
|
+
*/
|
|
131
|
+
labelRemove: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: string;
|
|
134
|
+
};
|
|
135
|
+
icon: {
|
|
136
|
+
type: PropType<string | VvIconProps>;
|
|
137
|
+
default: undefined;
|
|
138
|
+
};
|
|
139
|
+
iconPosition: {
|
|
140
|
+
type: PropType<`${import("../../constants").Position}`>;
|
|
141
|
+
default: import("../../constants").Position;
|
|
142
|
+
validation: (value: import("../../constants").Position) => boolean;
|
|
143
|
+
};
|
|
144
|
+
disabled: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
148
|
+
readonly: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
152
|
+
loading: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
loadingLabel: {
|
|
157
|
+
type: StringConstructor;
|
|
158
|
+
default: string;
|
|
159
|
+
};
|
|
160
|
+
label: {
|
|
161
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
162
|
+
default: undefined;
|
|
163
|
+
};
|
|
164
|
+
hintLabel: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
default: string;
|
|
167
|
+
};
|
|
168
|
+
invalid: {
|
|
169
|
+
type: BooleanConstructor;
|
|
170
|
+
default: boolean;
|
|
171
|
+
};
|
|
172
|
+
invalidLabel: {
|
|
173
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
174
|
+
default: undefined;
|
|
175
|
+
};
|
|
176
|
+
valid: {
|
|
177
|
+
type: BooleanConstructor;
|
|
178
|
+
default: boolean;
|
|
179
|
+
};
|
|
180
|
+
validLabel: {
|
|
181
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
182
|
+
default: undefined;
|
|
183
|
+
};
|
|
184
|
+
modifiers: {
|
|
185
|
+
type: PropType<string | string[]>;
|
|
186
|
+
default: undefined;
|
|
187
|
+
};
|
|
188
|
+
name: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
required: boolean;
|
|
191
|
+
};
|
|
192
|
+
id: (StringConstructor | NumberConstructor)[];
|
|
193
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { VvIconProps } from '../VvIcon';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
3
|
disabled: {
|
|
3
4
|
type: BooleanConstructor;
|
|
4
5
|
default: boolean;
|
|
@@ -8,12 +9,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
9
|
default: string;
|
|
9
10
|
};
|
|
10
11
|
icon: {
|
|
11
|
-
type:
|
|
12
|
+
type: PropType<string | VvIconProps>;
|
|
12
13
|
default: string;
|
|
13
14
|
};
|
|
14
|
-
}
|
|
15
|
+
}>, {
|
|
16
|
+
hasIcon: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
15
17
|
onClick: (e: Event) => void;
|
|
16
|
-
},
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clear"[], "clear", import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
17
19
|
disabled: {
|
|
18
20
|
type: BooleanConstructor;
|
|
19
21
|
default: boolean;
|
|
@@ -23,14 +25,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
25
|
default: string;
|
|
24
26
|
};
|
|
25
27
|
icon: {
|
|
26
|
-
type:
|
|
28
|
+
type: PropType<string | VvIconProps>;
|
|
27
29
|
default: string;
|
|
28
30
|
};
|
|
29
|
-
}>> & {
|
|
31
|
+
}>> & Readonly<{
|
|
30
32
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
31
|
-
}
|
|
32
|
-
disabled: boolean;
|
|
33
|
+
}>, {
|
|
33
34
|
label: string;
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
icon: string | VvIconProps;
|
|
37
|
+
}, {}, {
|
|
38
|
+
VvIcon: import("vue").DefineComponent<VvIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VvIconProps> & Readonly<{}>, {
|
|
39
|
+
prefix: import("../VvIcon").IconPrefix | string;
|
|
40
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
42
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type VvIconProps } from '../VvIcon';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
3
|
disabled: {
|
|
3
4
|
type: BooleanConstructor;
|
|
4
5
|
default: boolean;
|
|
@@ -12,18 +13,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12
13
|
default: string;
|
|
13
14
|
};
|
|
14
15
|
iconShow: {
|
|
15
|
-
type:
|
|
16
|
+
type: PropType<string | VvIconProps>;
|
|
16
17
|
default: "eye-on";
|
|
17
18
|
};
|
|
18
19
|
iconHide: {
|
|
19
|
-
type:
|
|
20
|
+
type: PropType<string | VvIconProps>;
|
|
20
21
|
default: "eye-off";
|
|
21
22
|
};
|
|
22
|
-
}
|
|
23
|
-
active: globalThis.Ref<boolean>;
|
|
24
|
-
activeIcon: globalThis.ComputedRef<string>;
|
|
23
|
+
}>, {
|
|
24
|
+
active: globalThis.Ref<boolean, boolean>;
|
|
25
|
+
activeIcon: globalThis.ComputedRef<string | VvIconProps>;
|
|
26
|
+
hasIcon: globalThis.ComputedRef<VvIconProps | undefined>;
|
|
25
27
|
onClick: (e: Event) => void;
|
|
26
|
-
},
|
|
28
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "toggle-password"[], "toggle-password", import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
27
29
|
disabled: {
|
|
28
30
|
type: BooleanConstructor;
|
|
29
31
|
default: boolean;
|
|
@@ -37,20 +39,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
39
|
default: string;
|
|
38
40
|
};
|
|
39
41
|
iconShow: {
|
|
40
|
-
type:
|
|
42
|
+
type: PropType<string | VvIconProps>;
|
|
41
43
|
default: "eye-on";
|
|
42
44
|
};
|
|
43
45
|
iconHide: {
|
|
44
|
-
type:
|
|
46
|
+
type: PropType<string | VvIconProps>;
|
|
45
47
|
default: "eye-off";
|
|
46
48
|
};
|
|
47
|
-
}>> & {
|
|
49
|
+
}>> & Readonly<{
|
|
48
50
|
"onToggle-password"?: ((...args: any[]) => any) | undefined;
|
|
49
|
-
}
|
|
51
|
+
}>, {
|
|
50
52
|
disabled: boolean;
|
|
51
53
|
labelShow: string;
|
|
52
54
|
labelHide: string;
|
|
53
|
-
iconShow: string;
|
|
54
|
-
iconHide: string;
|
|
55
|
-
}, {}
|
|
55
|
+
iconShow: string | VvIconProps;
|
|
56
|
+
iconHide: string | VvIconProps;
|
|
57
|
+
}, {}, {
|
|
58
|
+
VvIcon: import("vue").DefineComponent<VvIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VvIconProps> & Readonly<{}>, {
|
|
59
|
+
prefix: import("../VvIcon").IconPrefix | string;
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
61
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
56
62
|
export default _default;
|