@volverjs/ui-vue 0.0.13 → 0.0.15
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/dist/Volver.d.ts +121 -0
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +68 -0
- package/dist/components/VvAccordion/index.d.ts +47 -0
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +98 -0
- package/dist/components/VvAccordionGroup/index.d.ts +54 -0
- package/dist/components/VvAction/VvAction.es.js +26 -26
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +110 -0
- package/dist/components/VvAction/index.d.ts +2 -0
- package/dist/components/VvAlert/VvAlert.es.js +43 -44
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +124 -0
- package/dist/components/VvAlert/index.d.ts +104 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +54 -55
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +97 -0
- package/dist/components/VvAlertGroup/index.d.ts +47 -0
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +24 -0
- package/dist/components/VvAvatar/index.d.ts +10 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +50 -0
- package/dist/components/VvAvatarGroup/index.d.ts +28 -0
- package/dist/components/VvBadge/VvBadge.vue.d.ts +24 -0
- package/dist/components/VvBadge/index.d.ts +7 -0
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +34 -34
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +39 -0
- package/dist/components/VvBreadcrumb/index.d.ts +8 -0
- package/dist/components/VvButton/VvButton.es.js +186 -187
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +221 -0
- package/dist/components/VvButton/index.d.ts +131 -0
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +84 -0
- package/dist/components/VvButtonGroup/index.d.ts +37 -0
- package/dist/components/VvCard/VvCard.vue.d.ts +30 -0
- package/dist/components/VvCard/index.d.ts +7 -0
- package/dist/components/VvCheckbox/VvCheckbox.es.js +215 -217
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +187 -0
- package/dist/components/VvCheckbox/index.d.ts +94 -0
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +235 -237
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +212 -0
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -0
- package/dist/components/VvCombobox/VvCombobox.es.js +810 -813
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +346 -0
- package/dist/components/VvCombobox/index.d.ts +694 -0
- package/dist/components/VvDialog/VvDialog.vue.d.ts +73 -0
- package/dist/components/VvDialog/index.d.ts +45 -0
- package/dist/components/VvDropdown/VvDropdown.es.js +4 -4
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +258 -0
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +118 -0
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +22 -0
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +22 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +82 -0
- package/dist/components/VvDropdown/index.d.ts +120 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +50 -50
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +30 -31
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +6 -0
- package/dist/components/VvIcon/index.d.ts +86 -0
- package/dist/components/VvInputFile/VvInputFile.es.js +415 -418
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +361 -0
- package/dist/components/VvInputFile/index.d.ts +204 -0
- package/dist/components/VvInputText/VvInputText.es.js +595 -588
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +524 -0
- package/dist/components/VvInputText/VvInputTextActions.d.ts +4 -0
- package/dist/components/VvInputText/index.d.ts +313 -0
- package/dist/components/VvNav/VvNav.es.js +63 -63
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +48 -0
- package/dist/components/VvNav/VvNavItem.vue.d.ts +14 -0
- package/dist/components/VvNav/VvNavSeparator.vue.d.ts +3 -0
- package/dist/components/VvNav/index.d.ts +11 -0
- package/dist/components/VvNavItem/VvNavItem.es.js +41 -41
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +38 -0
- package/dist/components/VvProgress/index.d.ts +33 -0
- package/dist/components/VvRadio/VvRadio.es.js +222 -224
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +179 -0
- package/dist/components/VvRadio/index.d.ts +80 -0
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +234 -236
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +212 -0
- package/dist/components/VvRadioGroup/index.d.ts +2 -0
- package/dist/components/VvSelect/VvSelect.es.js +200 -203
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +183 -0
- package/dist/components/VvSelect/index.d.ts +298 -0
- package/dist/components/VvTab/VvTab.es.js +35 -35
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +64 -0
- package/dist/components/VvTab/index.d.ts +19 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +341 -344
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +384 -0
- package/dist/components/VvTextarea/index.d.ts +190 -0
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +37 -0
- package/dist/components/VvTooltip/index.d.ts +19 -0
- package/dist/components/VvVirtualScroll/VvVirtualScroll.vue.d.ts +51 -0
- package/dist/components/common/HintSlot.d.ts +57 -0
- package/dist/components/common/VvInputClearAction.d.ts +52 -0
- package/dist/components/common/VvInputPasswordAction.d.ts +71 -0
- package/dist/components/common/VvInputStepAction.d.ts +50 -0
- package/dist/components/index.d.ts +34 -0
- package/dist/components/index.es.js +1965 -1958
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlerInject.d.ts +4 -0
- package/dist/composables/alert/useAlert.d.ts +92 -0
- package/dist/composables/alert/useAlertProvide.d.ts +10 -0
- package/dist/composables/dropdown/useDropdownContextmenu.d.ts +18 -0
- package/dist/composables/dropdown/useDropdownInject.d.ts +12 -0
- package/dist/composables/dropdown/useDropdownProvide.d.ts +40 -0
- 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 +5 -0
- package/dist/composables/index.es.js +34 -34
- package/dist/composables/index.umd.js +2 -2
- package/dist/composables/useBlurhash.d.ts +7 -0
- package/dist/composables/useComponentFocus.d.ts +4 -0
- package/dist/composables/useComponentIcon.d.ts +11 -0
- package/dist/composables/useDebouncedInput.d.ts +5 -0
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +2 -0
- package/dist/composables/useOptions.d.ts +8 -0
- package/dist/composables/usePersistence.d.ts +3 -0
- package/dist/composables/useTextCount.d.ts +10 -0
- package/dist/composables/useUniqueId.d.ts +2 -0
- package/dist/composables/useVirtualScroll.d.ts +35 -0
- package/dist/composables/useVolver.d.ts +4 -0
- package/dist/constants.d.ts +104 -0
- package/dist/directives/index.d.ts +3 -0
- package/dist/directives/index.es.js +22 -22
- package/dist/directives/index.umd.js +1 -1
- package/dist/directives/v-contextmenu.d.ts +3 -0
- package/dist/directives/v-contextmenu.es.js +13 -13
- package/dist/directives/v-contextmenu.umd.js +1 -1
- package/dist/directives/v-tooltip.d.ts +3 -0
- package/dist/icons.d.ts +1889 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +19 -19
- package/dist/index.umd.js +1 -1
- package/dist/json-render/catalog.d.ts +395 -0
- package/dist/json-render/components.d.ts +111 -0
- package/dist/json-render/definitions.d.ts +697 -0
- package/dist/json-render/index.d.ts +55 -0
- package/dist/json-render/index.es.js +1877 -1870
- package/dist/json-render/index.umd.js +1 -1
- package/dist/json-render/registry.d.ts +34 -0
- package/dist/props/index.d.ts +959 -0
- package/dist/resolvers/unplugin.d.ts +38 -0
- package/dist/resolvers/unplugin.es.js +28 -28
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +9 -0
- package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
- package/dist/stories/Accordion/Accordion.test.d.ts +2 -0
- package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +13 -0
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +9 -0
- package/dist/stories/AccordionGroup/AccordionGroup.test.d.ts +2 -0
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1788 -0
- package/dist/stories/Alert/Alert.settings.d.ts +4 -0
- package/dist/stories/Alert/Alert.stories.d.ts +9 -0
- package/dist/stories/Alert/Alert.test.d.ts +2 -0
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +13 -0
- package/dist/stories/Alert/AlertSlots.stories.d.ts +10 -0
- package/dist/stories/AlertGroup/AlertGroup.settings.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroup.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroup.test.d.ts +2 -0
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +14 -0
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +8 -0
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +4 -0
- package/dist/stories/Avatar/Avatar.settings.d.ts +5 -0
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
- package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
- package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
- package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +14 -0
- package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
- package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
- package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
- package/dist/stories/Badge/Badge.settings.d.ts +5 -0
- package/dist/stories/Badge/Badge.stories.d.ts +7 -0
- package/dist/stories/Badge/Badge.test.d.ts +2 -0
- package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
- package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
- package/dist/stories/Breadcrumb/Breadcrumb.settings.d.ts +13 -0
- package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +2 -0
- package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
- package/dist/stories/Button/Button.settings.d.ts +4 -0
- package/dist/stories/Button/Button.stories.d.ts +6 -0
- package/dist/stories/Button/Button.test.d.ts +2 -0
- package/dist/stories/Button/ButtonIcon.stories.d.ts +10 -0
- package/dist/stories/Button/ButtonLink.stories.d.ts +7 -0
- package/dist/stories/Button/ButtonLoading.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonModifiers.stories.d.ts +17 -0
- package/dist/stories/Button/ButtonSlots.stories.d.ts +9 -0
- package/dist/stories/Button/ButtonState.stories.d.ts +8 -0
- package/dist/stories/Button/ButtonToggle.stories.d.ts +9 -0
- package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +5 -0
- package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroup.test.d.ts +2 -0
- package/dist/stories/ButtonGroup/ButtonGroupModifiers.stories.d.ts +8 -0
- package/dist/stories/ButtonGroup/ButtonGroupSlots.stories.d.ts +6 -0
- package/dist/stories/ButtonGroup/ButtonGroupToggle.stories.d.ts +8 -0
- package/dist/stories/Card/Card.settings.d.ts +6 -0
- package/dist/stories/Card/Card.stories.d.ts +6 -0
- package/dist/stories/Card/Card.test.d.ts +2 -0
- package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +15 -0
- package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -0
- package/dist/stories/Checkbox/Checkbox.test.d.ts +2 -0
- package/dist/stories/Checkbox/CheckboxBinary.stories.d.ts +7 -0
- package/dist/stories/Checkbox/CheckboxSlots.stories.d.ts +7 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.settings.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -0
- package/dist/stories/CheckboxGroup/CheckboxGroup.test.d.ts +2 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupOptions.stories.d.ts +8 -0
- package/dist/stories/CheckboxGroup/CheckboxGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Combobox/Combobox.settings.d.ts +4 -0
- package/dist/stories/Combobox/Combobox.stories.d.ts +24 -0
- package/dist/stories/Combobox/Combobox.test.d.ts +2 -0
- package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +9 -0
- package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +11 -0
- package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/stories/Dialog/Dialog.test.d.ts +2 -0
- package/dist/stories/Dialog/DialogModifiers.stories.d.ts +8 -0
- package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +5 -0
- package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -0
- package/dist/stories/Dropdown/Dropdown.test.d.ts +2 -0
- package/dist/stories/Dropdown/DropdownContextmenuDirective.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownMultilevel.stories.d.ts +6 -0
- package/dist/stories/Dropdown/DropdownSlots.stories.d.ts +8 -0
- package/dist/stories/Icon/Icon.settings.d.ts +7 -0
- package/dist/stories/Icon/Icon.stories.d.ts +8 -0
- package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
- 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 +11 -0
- package/dist/stories/InputText/InputText.stories.d.ts +16 -0
- package/dist/stories/InputText/InputText.test.d.ts +5 -0
- package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextIso.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -0
- package/dist/stories/InputText/InputTextMask.stories.d.ts +12 -0
- package/dist/stories/InputText/InputTextMinMax.stories.d.ts +9 -0
- package/dist/stories/InputText/InputTextSlots.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextSuggestions.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextType.stories.d.ts +18 -0
- package/dist/stories/Nav/Nav.settings.d.ts +4 -0
- package/dist/stories/Nav/Nav.stories.d.ts +6 -0
- package/dist/stories/Nav/Nav.test.d.ts +2 -0
- package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
- package/dist/stories/Progress/Progress.settings.d.ts +7 -0
- package/dist/stories/Progress/Progress.stories.d.ts +7 -0
- package/dist/stories/Progress/Progress.test.d.ts +2 -0
- package/dist/stories/Radio/Radio.settings.d.ts +12 -0
- package/dist/stories/Radio/Radio.stories.d.ts +11 -0
- package/dist/stories/Radio/Radio.test.d.ts +2 -0
- package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -0
- package/dist/stories/RadioGroup/RadioGroup.test.d.ts +2 -0
- package/dist/stories/RadioGroup/RadioGroupOptions.stories.d.ts +8 -0
- package/dist/stories/RadioGroup/RadioGroupSlots.stories.d.ts +7 -0
- package/dist/stories/Select/Select.settings.d.ts +8 -0
- package/dist/stories/Select/Select.stories.d.ts +16 -0
- package/dist/stories/Select/Select.test.d.ts +2 -0
- package/dist/stories/Select/SelectIconPosition.stories.d.ts +8 -0
- package/dist/stories/Select/SelectOptions.stories.d.ts +9 -0
- package/dist/stories/Select/SelectSlots.stories.d.ts +8 -0
- package/dist/stories/Tab/Tab.settings.d.ts +4 -0
- package/dist/stories/Tab/Tab.stories.d.ts +6 -0
- package/dist/stories/Tab/Tab.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +9 -0
- package/dist/stories/Textarea/Textarea.stories.d.ts +14 -0
- package/dist/stories/Textarea/Textarea.test.d.ts +2 -0
- package/dist/stories/Textarea/TextareaLength.stories.d.ts +10 -0
- package/dist/stories/Textarea/TextareaSlots.stories.d.ts +8 -0
- package/dist/stories/Textarea/TextareatIconPosition.stories.d.ts +8 -0
- package/dist/stories/Tooltip/Tooltip.settings.d.ts +5 -0
- package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
- package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
- package/dist/stories/VirtualScroll/VirtualScroll.settings.d.ts +5 -0
- package/dist/stories/VirtualScroll/VirtualScroll.stories.d.ts +7 -0
- package/dist/stories/VirtualScroll/VirtualScroll.test.d.ts +2 -0
- package/dist/stories/VirtualScroll/VirtualScrollWithComposable.stories.d.ts +4 -0
- package/dist/stories/argTypes.d.ts +56 -0
- package/dist/test/expect.d.ts +18 -0
- package/dist/test/options.d.ts +1 -0
- package/dist/test/sleep.d.ts +1 -0
- package/dist/types/alert.d.ts +15 -0
- package/dist/types/blurhash.d.ts +12 -0
- package/dist/types/floating-ui.d.ts +15 -0
- package/dist/types/generic.d.ts +4 -0
- package/dist/types/group.d.ts +59 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/input-file.d.ts +9 -0
- package/dist/types/nav.d.ts +17 -0
- package/dist/utils/DateUtilities.d.ts +14 -0
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/dist/utils/FileUtilities.d.ts +14 -0
- package/dist/utils/ObjectUtilities.d.ts +76 -0
- package/dist/workers/blurhash.d.ts +1 -0
- package/package.json +3 -2
- package/src/Volver.ts +8 -6
- package/src/components/VvAction/index.ts +1 -3
- package/src/components/VvButton/VvButton.vue +1 -1
- package/src/components/VvCheckboxGroup/index.ts +1 -3
- package/src/components/VvCombobox/VvCombobox.vue +3 -3
- package/src/components/VvDropdown/VvDropdown.vue +8 -8
- package/src/components/VvIcon/VvIcon.vue +3 -6
- package/src/components/VvInputFile/VvInputFile.vue +6 -6
- package/src/components/VvInputText/VvInputText.vue +95 -78
- package/src/components/VvRadioGroup/index.ts +1 -3
- package/src/composables/useBlurhash.ts +1 -1
- package/src/composables/useDebouncedInput.ts +1 -1
- package/src/composables/useDefaults.ts +55 -44
- package/src/composables/useModifiers.ts +1 -1
- package/src/index.ts +2 -2
- package/src/resolvers/unplugin.ts +6 -6
- package/src/types/alert.ts +1 -1
- package/src/types/nav.ts +1 -1
- package/src/utils/DateUtilities.ts +3 -3
- package/src/utils/DomUtilities.ts +7 -1
- package/src/utils/ObjectUtilities.ts +60 -59
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("vue")):typeof define=="function"&&define.amd?define(["vue"],b):(t=typeof globalThis<"u"?globalThis:t||self,t.VvCheckbox=b(t.Vue))})(this,function(t){var b=(function(e){return e.local="local",e.session="session",e})({}),U=(function(e){return e.absolute="absolute",e.fixed="fixed",e})({}),w=(function(e){return e.left="left",e.right="right",e.top="top",e.bottom="bottom",e})({}),Y=(function(e){return e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e})({}),$=(function(e){return e.before="before",e.after="after",e})({}),R=(function(e){return e.button="button",e.submit="submit",e.reset="reset",e})({}),W=(function(e){return e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e})({}),Q=Symbol.for("volver"),X=Symbol.for("checkGroup"),Z={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},ee={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},B={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},V={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},C={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},m={disabled:{type:Boolean,default:!1}},E={required:{type:Boolean,default:!1}},te={active:{type:Boolean,default:!1}},ae={current:{type:Boolean,default:!1}},Ee={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:Z.clear},labelClear:{type:String,default:"Clear"}},re={pressed:{type:Boolean,default:!1}},S={label:{type:[String,Number],default:void 0}},A={readonly:{type:Boolean,default:!1}},P={modifiers:{type:[String,Array],default:void 0}},j={hintLabel:{type:String,default:""}},ne={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},le={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},oe={debounce:{type:[Number,String],default:void 0}},ie={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:$.before,validation:e=>Object.values($).includes(e)}},_={tabindex:{type:[String,Number],default:0}},se={floating:{type:Boolean,default:!1}},ue={id:[String,Number]},_e={placement:{type:String,default:w.bottom,validator:e=>Object.values(w).includes(e)||Object.values(Y).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(U).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},D={...ue,name:{type:String,required:!0}},de={autofocus:{type:Boolean,default:!1}},fe={autocomplete:{type:String,default:"off"}},De={...D,...de,...fe,..._,...m,...A,...B,...V,...j,...C,...P,...le,...oe,...ie,...se,...S,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...E},ce={...D,..._,...B,...V,...j,...m,...A,...P,...S,...C,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},Ge={...B,...V,...ne,...j,...m,...A,...P,...S,...C,...E,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},He={...m,...S,...re,...te,...ae,...ee,type:{type:String,default:R.button,validator:e=>Object.values(R).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:W.button}},qe={storageType:{type:String,default:b.local,validator:e=>Object.values(b).includes(e)},storageKey:String};function pe(e){const r=(0,t.inject)(e,void 0),a=(0,t.computed)(()=>r!==void 0);function i(n,o,s){const u=r?.[n];if(u)return(0,t.computed)({get(){return u.value},set(l){u.value=l}});const d=(0,t.toRef)(o,n);return(0,t.computed)({get(){return d.value},set(l){s&&s(`update:${n}`,l)}})}return{group:r,isInGroup:a,getGroupOrLocalRef:i}}var G={...ce,...P,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean},ve=["click","update:modelValue","change","blur"];function be(e,r){const{group:a,isInGroup:i,getGroupOrLocalRef:n}=pe(X),{id:o,switch:s,indeterminate:u}=(0,t.toRefs)(e);return{id:o,propsSwitch:s,indeterminate:u,group:a,isInGroup:i,modelValue:n("modelValue",e,r),valid:n("valid",e),invalid:n("invalid",e),readonly:(0,t.computed)(()=>!!(e.readonly||a?.readonly.value)),disabled:(0,t.computed)(()=>!!(e.disabled||a?.disabled.value))}}function H(e,r,a){return a?q(e,a)===q(r,a):k(e,r)}function k(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){const a=Array.isArray(e),i=Array.isArray(r);let n,o,s;if(a&&i){if(o=e.length,o!==r.length)return!1;for(n=o;n--!==0;)if(!k(e[n],r[n]))return!1;return!0}if(a!==i)return!1;const u=e instanceof Date,d=r instanceof Date;if(u!==d)return!1;if(u&&d)return e.getTime()===r.getTime();const l=e instanceof RegExp,v=r instanceof RegExp;if(l!==v)return!1;if(l&&v)return e.toString()===r.toString();const f=Object.keys(e);if(o=f.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.hasOwn(r,f[n]))return!1;for(n=o;n--!==0;)if(s=f[n],!k(e[s],r[s]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(r)}function q(e,r){if(e&&Object.keys(e).length&&r)if(r.includes(".")){const a=r.split(".");let i=e;for(let n=0,o=a.length;n<o;++n){if(e==null)return null;i=i[a[n]]}return i}else return e[r];else return null}function he(e,r){if(e!=null&&r&&r.length){for(const a of r)if(H(e,a))return!0}return!1}function ge(e){return typeof e=="string"}function F(e){return Array.isArray(e)?e.filter(r=>ge(r)).join(" "):e}function ye(e,r){const a=(0,t.computed)(()=>(0,t.isRef)(e)?e.value:e),i=(0,t.computed)(()=>F(a.value.invalidLabel)),n=(0,t.computed)(()=>F(a.value.validLabel)),o=(0,t.computed)(()=>a.value.loadingLabel),s=(0,t.computed)(()=>a.value.hintLabel),u=(0,t.computed)(()=>!!(a.value.loading&&(r.loading||o.value))),d=(0,t.computed)(()=>!u.value&&!!(a.value.invalid&&(r.invalid||i.value))),l=(0,t.computed)(()=>!u.value&&!d.value&&!!(a.value.valid&&(r.valid||n.value))),v=(0,t.computed)(()=>!u.value&&!d.value&&!l.value&&!!(r.hint||s.value)),f=(0,t.computed)(()=>d.value||l.value||u.value||v.value);return{hasInvalidLabelOrSlot:d,hasHintLabelOrSlot:v,hasValidLabelOrSlot:l,hasLoadingLabelOrSlot:u,hintSlotScope:(0,t.computed)(()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading})),HintSlot:(0,t.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:f,invalidLabel:i,validLabel:n,loadingLabel:o,hintLabel:s,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:l,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}},render(){if(this.isVisible){let c;return this.hasInvalidLabelOrSlot&&(c="alert"),this.hasValidLabelOrSlot&&(c="status"),this.hasLoadingLabelOrSlot?(0,t.h)(this.tag,{role:c},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,t.h)(this.tag,{role:c},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,t.h)(this.tag,{role:c},this.$slots.valid?.()??this.validLabel):(0,t.h)(this.tag,{role:c},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}function me(){return(0,t.inject)(Q,void 0)}function Se(e,r,a){const i=me(),n=(0,t.computed)(()=>{if(!(!i||!i.defaults.value?.[e]))return i.defaults.value[e]});return(0,t.computed)(()=>{if(n.value===void 0)return a;const o=n.value,s=r,u=a;return Object.keys(s).reduce((d,l)=>{const v=u[l];if(d[l]=v,l in o){if(Array.isArray(s[l])){const f=s[l];f.length&&f[0]===v&&(d[l]=o[l])}if(typeof s[l]=="function"){const f=s[l];f()===v&&(d[l]=o[l])}if(typeof s[l]=="object"){let f=s[l].default;typeof f=="function"&&(f=f()),typeof f=="object"?JSON.stringify(f)===JSON.stringify(v)&&(d[l]=o[l]):f===v&&(d[l]=o[l])}}return d},{})})}function Pe(e){return(0,t.computed)(()=>String(e?.value||(0,t.useId)()))}function Oe(e,r,a){return(0,t.computed)(()=>{const i={[e]:!0},n=typeof r?.value=="string"?r.value.split(" "):r?.value;return n&&Array.isArray(n)&&n.forEach(o=>{o&&(i[`${e}--${o}`]=!0)}),a&&Object.keys(a.value).forEach(o=>{i[`${e}--${o}`]=(0,t.unref)(a.value[o])}),i})}var Le=["for"],Be=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],Ve={name:"VvCheckbox"},Ce=(0,t.defineComponent)({...Ve,props:G,emits:ve,setup(e,{emit:r}){const a=e,i=r,n=(0,t.useSlots)(),o=Se("VvCheckbox",G,a),{id:s,disabled:u,readonly:d,valid:l,invalid:v,propsSwitch:f,modelValue:c,indeterminate:T,isInGroup:K}=be(a,i),N=Pe(s),x=(0,t.computed)(()=>`${N.value}-hint`),je=(0,t.computed)(()=>z.value?-1:a.tabindex),O=(0,t.ref)(),g=(0,t.computed)(()=>a.uncheckedValue!==void 0&&!K.value),z=(0,t.computed)(()=>u.value||d.value),ke=(0,t.computed)(()=>{if(v.value===!0)return!0;if(l.value===!0)return!1}),M=(0,t.computed)(()=>g.value?c.value===a.value:Array.isArray(c.value)?he(a.value,c.value):H(a.value,c.value)),J=(0,t.computed)(()=>!!(T.value||!M.value&&g.value&&a.uncheckedValue!==c.value)),Ne=(0,t.computed)(()=>{if(!g.value)return["string","number","boolean"].includes(typeof a.value)?a.value:!0}),I=(0,t.computed)({get(){return M.value},set(p){if(g.value)c.value=p?a.value:a.uncheckedValue;else if(Array.isArray(c.value)||K.value){const h=c.value??[],y=new Set(Array.isArray(h)?h:[h]);p?y.add(a.value):y.delete(a.value),c.value=[...y]}else c.value=p?a.value:void 0;i("change",p)}}),{modifiers:xe}=(0,t.toRefs)(a),Ie=Oe("vv-checkbox",xe,(0,t.computed)(()=>({switch:f.value,valid:l.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:T.value})));(0,t.watchEffect)(()=>{g.value&&Array.isArray(c.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")}),(0,t.watch)(()=>J.value,p=>{p?O.value.indeterminate=!0:O.value.indeterminate=!1}),(0,t.onMounted)(()=>{J.value&&(O.value.indeterminate=!0)});const{HintSlot:we,hasHintLabelOrSlot:$e,hasInvalidLabelOrSlot:Re,hintSlotScope:L}=ye(o,n);return(p,h)=>((0,t.openBlock)(),(0,t.createElementBlock)("label",{class:(0,t.normalizeClass)((0,t.unref)(Ie)),for:(0,t.unref)(N)},[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:(0,t.unref)(N),ref_key:"input",ref:O,"onUpdate:modelValue":h[0]||(h[0]=y=>(0,t.isRef)(I)?I.value=y:null),type:"checkbox",class:"vv-checkbox__input",name:p.name,disabled:(0,t.unref)(z),value:(0,t.unref)(Ne),tabindex:(0,t.unref)(je),"aria-invalid":(0,t.unref)(ke),"aria-describedby":(0,t.unref)($e)?(0,t.unref)(x):void 0,"aria-errormessage":(0,t.unref)(Re)?(0,t.unref)(x):void 0},null,8,Be),[[t.vModelCheckbox,(0,t.unref)(I)]]),(0,t.renderSlot)(p.$slots,"default",{value:(0,t.unref)(c)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(p.label),1)]),(0,t.createVNode)((0,t.unref)(we),{id:(0,t.unref)(x),class:"vv-checkbox__hint"},(0,t.createSlots)({_:2},[p.$slots.hint?{name:"hint",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(p.$slots,"hint",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(L))))]),key:"0"}:void 0,p.$slots.loading?{name:"loading",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(p.$slots,"loading",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(L))))]),key:"1"}:void 0,p.$slots.valid?{name:"valid",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(p.$slots,"valid",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(L))))]),key:"2"}:void 0,p.$slots.invalid?{name:"invalid",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(p.$slots,"invalid",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(L))))]),key:"3"}:void 0]),1032,["id"])],10,Le))}}),Ae=Ce;return Ae});
|
|
1
|
+
(function(t,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("vue")):typeof define=="function"&&define.amd?define(["vue"],v):(t=typeof globalThis<"u"?globalThis:t||self,t.VvCheckbox=v(t.Vue))})(this,function(t){var v=(function(e){return e.local="local",e.session="session",e})({}),U=(function(e){return e.absolute="absolute",e.fixed="fixed",e})({}),w=(function(e){return e.left="left",e.right="right",e.top="top",e.bottom="bottom",e})({}),Y=(function(e){return e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e})({}),E=(function(e){return e.before="before",e.after="after",e})({}),$=(function(e){return e.button="button",e.submit="submit",e.reset="reset",e})({}),W=(function(e){return e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e})({}),Q=Symbol.for("volver"),X=Symbol.for("checkGroup"),Z={showPassword:"eye-on",hidePassword:"eye-off",showDatePicker:"calendar",showTimePicker:"time",showColorPicker:"color",clear:"close",add:"add",remove:"trash",edit:"edit",download:"download"},ee={to:{type:[String,Object]},href:String,target:String,rel:{type:String,default:"noopener noreferrer"}},L={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},k={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},B={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},g={disabled:{type:Boolean,default:!1}},R={required:{type:Boolean,default:!1}},te={active:{type:Boolean,default:!1}},ae={current:{type:Boolean,default:!1}},qe={showClearAction:{type:Boolean,default:!1},iconClear:{type:[String,Object],default:Z.clear},labelClear:{type:String,default:"Clear"}},re={pressed:{type:Boolean,default:!1}},m={label:{type:[String,Number],default:void 0}},C={readonly:{type:Boolean,default:!1}},S={modifiers:{type:[String,Array],default:void 0}},V={hintLabel:{type:String,default:""}},le={options:{type:Array,default:()=>[]},labelKey:{type:[String,Function],default:"label"},valueKey:{type:[String,Function],default:"value"},disabledKey:{type:[String,Function],default:"disabled"}},ne={count:{type:[Boolean,String],default:!1,validator:e=>[!0,!1,"limit","countdown"].includes(e)}},oe={debounce:{type:[Number,String],default:void 0}},ie={icon:{type:[String,Object],default:void 0},iconPosition:{type:String,default:E.before,validation:e=>Object.values(E).includes(e)}},_={tabindex:{type:[String,Number],default:0}},ue={floating:{type:Boolean,default:!1}},se={id:[String,Number]},Ge={placement:{type:String,default:w.bottom,validator:e=>Object.values(w).includes(e)||Object.values(Y).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(U).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}},D={...se,name:{type:String,required:!0}},de={autofocus:{type:Boolean,default:!1}},fe={autocomplete:{type:String,default:"off"}},He={...D,...de,...fe,..._,...g,...C,...L,...k,...V,...B,...S,...ne,...oe,...ie,...ue,...m,minlength:{type:[String,Number],default:void 0},maxlength:{type:[String,Number],default:void 0},placeholder:{type:String,default:void 0},...R},ce={...D,..._,...L,...k,...V,...g,...C,...S,...m,...B,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}},Fe={...L,...k,...le,...V,...g,...C,...S,...m,...B,...R,modelValue:{type:[String,Array,Boolean,Number,Symbol],default:void 0},name:{type:String,required:!0},vertical:{type:Boolean,default:!1}},Te={...g,...m,...re,...te,...ae,...ee,type:{type:String,default:$.button,validator:e=>Object.values($).includes(e)},ariaLabel:{type:String,default:void 0},defaultTag:{type:String,default:W.button}},Ke={storageType:{type:String,default:v.local,validator:e=>Object.values(v).includes(e)},storageKey:String};function pe(e){const r=(0,t.inject)(e,void 0),a=(0,t.computed)(()=>r!==void 0);function n(l,o,f){const i=r?.[l];if(i)return(0,t.computed)({get(){return i.value},set(d){i.value=d}});const c=(0,t.toRef)(o,l);return(0,t.computed)({get(){return c.value},set(d){f&&f(`update:${l}`,d)}})}return{group:r,isInGroup:a,getGroupOrLocalRef:n}}var q={...ce,...S,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean},ve=["click","update:modelValue","change","blur"];function be(e,r){const{group:a,isInGroup:n,getGroupOrLocalRef:l}=pe(X),{id:o,switch:f,indeterminate:i}=(0,t.toRefs)(e);return{id:o,propsSwitch:f,indeterminate:i,group:a,isInGroup:n,modelValue:l("modelValue",e,r),valid:l("valid",e),invalid:l("invalid",e),readonly:(0,t.computed)(()=>!!(e.readonly||a?.readonly.value)),disabled:(0,t.computed)(()=>!!(e.disabled||a?.disabled.value))}}function G(e,r,a){return a?H(e,a)===H(r,a):A(e,r)}function ye(e,r){if(e.length!==r.length)return!1;for(let a=e.length;a--!==0;)if(!A(e[a],r[a]))return!1;return!0}function he(e,r){const a=Object.keys(e),{length:n}=a;if(n!==Object.keys(r).length)return!1;for(let l=n;l--!==0;)if(!Object.hasOwn(r,a[l]))return!1;for(let l=n;l--!==0;){const o=a[l];if(!A(e[o],r[o]))return!1}return!0}function A(e,r){if(e===r)return!0;if(!e||!r||typeof e!="object"||typeof r!="object")return Number.isNaN(e)&&Number.isNaN(r);const a=Array.isArray(e),n=Array.isArray(r);if(a!==n)return!1;if(a&&n)return ye(e,r);const l=e instanceof Date,o=r instanceof Date;if(l!==o)return!1;if(l&&o)return e.getTime()===r.getTime();const f=e instanceof RegExp,i=r instanceof RegExp;return f!==i?!1:f&&i?e.toString()===r.toString():he(e,r)}function H(e,r){if(e&&Object.keys(e).length&&r){if(!r.includes("."))return e[r];const a=r.split(".");let n=e;for(let l=0,o=a.length;l<o;++l){if(n==null)return null;n=n[a[l]]}return n}else return null}function ge(e,r){if(e!=null&&r?.length){for(const a of r)if(G(e,a))return!0}return!1}function me(e){return typeof e=="string"}function F(e){return Array.isArray(e)?e.filter(r=>me(r)).join(" "):e}function Se(e,r){const a=(0,t.computed)(()=>(0,t.isRef)(e)?e.value:e),n=(0,t.computed)(()=>F(a.value.invalidLabel)),l=(0,t.computed)(()=>F(a.value.validLabel)),o=(0,t.computed)(()=>a.value.loadingLabel),f=(0,t.computed)(()=>a.value.hintLabel),i=(0,t.computed)(()=>!!(a.value.loading&&(r.loading||o.value))),c=(0,t.computed)(()=>!i.value&&!!(a.value.invalid&&(r.invalid||n.value))),d=(0,t.computed)(()=>!i.value&&!c.value&&!!(a.value.valid&&(r.valid||l.value))),p=(0,t.computed)(()=>!i.value&&!c.value&&!d.value&&!!(r.hint||f.value)),j=(0,t.computed)(()=>c.value||d.value||i.value||p.value);return{hasInvalidLabelOrSlot:c,hasHintLabelOrSlot:p,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:i,hintSlotScope:(0,t.computed)(()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading})),HintSlot:(0,t.defineComponent)({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup(){return{isVisible:j,invalidLabel:n,validLabel:l,loadingLabel:o,hintLabel:f,hasInvalidLabelOrSlot:c,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:i,hasHintLabelOrSlot:p}},render(){if(this.isVisible){let u;return this.hasInvalidLabelOrSlot&&(u="alert"),this.hasValidLabelOrSlot&&(u="status"),this.hasLoadingLabelOrSlot?(0,t.h)(this.tag,{role:u},this.$slots.loading?.()??this.loadingLabel):this.hasInvalidLabelOrSlot?(0,t.h)(this.tag,{role:u},this.$slots.invalid?.()??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?(0,t.h)(this.tag,{role:u},this.$slots.valid?.()??this.validLabel):(0,t.h)(this.tag,{role:u},this.$slots.hint?.()??this.$slots.hint??this.hintLabel)}return null}})}}function Pe(){return(0,t.inject)(Q,void 0)}function Oe(e,r,a){let n=r;if(Array.isArray(e)&&e.length){const l=e[0];l()===r&&(n=a)}if(typeof e=="function"&&e()===r&&(n=a),typeof e=="object"){let l=e.default;typeof l=="function"&&(l=l()),(typeof l=="object"?JSON.stringify(l)===JSON.stringify(r):l===r)&&(n=a)}return n}function Le(e,r,a){const n=Pe(),l=(0,t.computed)(()=>{if(n?.defaults.value?.[e])return n.defaults.value[e]});return(0,t.computed)(()=>{if(l.value===void 0)return a;const o=l.value,f=r,i=a;return Object.keys(f).reduce((c,d)=>{const p=i[d];return c[d]=d in o?Oe(f[d],p,o[d]):p,c},{})})}function ke(e){return(0,t.computed)(()=>String(e?.value||(0,t.useId)()))}function Be(e,r,a){return(0,t.computed)(()=>{const n={[e]:!0},l=typeof r?.value=="string"?r.value.split(" "):r?.value;return l&&Array.isArray(l)&&l.forEach(o=>{o&&(n[`${e}--${o}`]=!0)}),a&&Object.keys(a.value).forEach(o=>{n[`${e}--${o}`]=(0,t.unref)(a.value[o])}),n})}var Ce=["for"],Ve=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"],Ae={name:"VvCheckbox"},je=(0,t.defineComponent)({...Ae,props:q,emits:ve,setup(e,{emit:r}){const a=e,n=r,l=(0,t.useSlots)(),o=Le("VvCheckbox",q,a),{id:f,disabled:i,readonly:c,valid:d,invalid:p,propsSwitch:j,modelValue:u,indeterminate:T,isInGroup:K}=be(a,n),N=ke(f),x=(0,t.computed)(()=>`${N.value}-hint`),xe=(0,t.computed)(()=>z.value?-1:a.tabindex),P=(0,t.ref)(),y=(0,t.computed)(()=>a.uncheckedValue!==void 0&&!K.value),z=(0,t.computed)(()=>i.value||c.value),Ie=(0,t.computed)(()=>{if(p.value===!0)return!0;if(d.value===!0)return!1}),M=(0,t.computed)(()=>y.value?u.value===a.value:Array.isArray(u.value)?ge(a.value,u.value):G(a.value,u.value)),J=(0,t.computed)(()=>!!(T.value||!M.value&&y.value&&a.uncheckedValue!==u.value)),we=(0,t.computed)(()=>{if(!y.value)return["string","number","boolean"].includes(typeof a.value)?a.value:!0}),I=(0,t.computed)({get(){return M.value},set(s){if(y.value)u.value=s?a.value:a.uncheckedValue;else if(Array.isArray(u.value)||K.value){const b=u.value??[],h=new Set(Array.isArray(b)?b:[b]);s?h.add(a.value):h.delete(a.value),u.value=[...h]}else u.value=s?a.value:void 0;n("change",s)}}),{modifiers:Ee}=(0,t.toRefs)(a),$e=Be("vv-checkbox",Ee,(0,t.computed)(()=>({switch:j.value,valid:d.value,invalid:p.value,disabled:i.value,readonly:c.value,indeterminate:T.value})));(0,t.watchEffect)(()=>{y.value&&Array.isArray(u.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")}),(0,t.watch)(()=>J.value,s=>{s?P.value.indeterminate=!0:P.value.indeterminate=!1}),(0,t.onMounted)(()=>{J.value&&(P.value.indeterminate=!0)});const{HintSlot:Re,hasHintLabelOrSlot:_e,hasInvalidLabelOrSlot:De,hintSlotScope:O}=Se(o,l);return(s,b)=>((0,t.openBlock)(),(0,t.createElementBlock)("label",{class:(0,t.normalizeClass)((0,t.unref)($e)),for:(0,t.unref)(N)},[(0,t.withDirectives)((0,t.createElementVNode)("input",{id:(0,t.unref)(N),ref_key:"input",ref:P,"onUpdate:modelValue":b[0]||(b[0]=h=>(0,t.isRef)(I)?I.value=h:null),type:"checkbox",class:"vv-checkbox__input",name:s.name,disabled:(0,t.unref)(z),value:(0,t.unref)(we),tabindex:(0,t.unref)(xe),"aria-invalid":(0,t.unref)(Ie),"aria-describedby":(0,t.unref)(_e)?(0,t.unref)(x):void 0,"aria-errormessage":(0,t.unref)(De)?(0,t.unref)(x):void 0},null,8,Ve),[[t.vModelCheckbox,(0,t.unref)(I)]]),(0,t.renderSlot)(s.$slots,"default",{value:(0,t.unref)(u)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.label),1)]),(0,t.createVNode)((0,t.unref)(Re),{id:(0,t.unref)(x),class:"vv-checkbox__hint"},(0,t.createSlots)({_:2},[s.$slots.hint?{name:"hint",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(s.$slots,"hint",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(O))))]),key:"0"}:void 0,s.$slots.loading?{name:"loading",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(s.$slots,"loading",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(O))))]),key:"1"}:void 0,s.$slots.valid?{name:"valid",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(s.$slots,"valid",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(O))))]),key:"2"}:void 0,s.$slots.invalid?{name:"invalid",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(s.$slots,"invalid",(0,t.normalizeProps)((0,t.guardReactiveProps)((0,t.unref)(O))))]),key:"3"}:void 0]),1032,["id"])],10,Ce))}}),Ne=je;return Ne});
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
indeterminate: BooleanConstructor;
|
|
5
|
+
uncheckedValue: (NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
6
|
+
switch: BooleanConstructor;
|
|
7
|
+
modifiers: {
|
|
8
|
+
type: PropType<string | string[]>;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
value: {
|
|
12
|
+
type: (NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: (NumberConstructor | ObjectConstructor | BooleanConstructor | StringConstructor)[];
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
loading: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
loadingLabel: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
label: {
|
|
28
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
29
|
+
default: undefined;
|
|
30
|
+
};
|
|
31
|
+
readonly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
disabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
hintLabel: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
invalid: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
invalidLabel: {
|
|
48
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
51
|
+
valid: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
validLabel: {
|
|
56
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
tabindex: {
|
|
60
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
61
|
+
default: number;
|
|
62
|
+
};
|
|
63
|
+
name: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
required: boolean;
|
|
66
|
+
};
|
|
67
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
68
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
69
|
+
indeterminate: BooleanConstructor;
|
|
70
|
+
uncheckedValue: (NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
71
|
+
switch: BooleanConstructor;
|
|
72
|
+
modifiers: {
|
|
73
|
+
type: PropType<string | string[]>;
|
|
74
|
+
default: undefined;
|
|
75
|
+
};
|
|
76
|
+
value: {
|
|
77
|
+
type: (NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
78
|
+
default: undefined;
|
|
79
|
+
};
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: (NumberConstructor | ObjectConstructor | BooleanConstructor | StringConstructor)[];
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
loading: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
loadingLabel: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
label: {
|
|
93
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
96
|
+
readonly: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
default: boolean;
|
|
99
|
+
};
|
|
100
|
+
disabled: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
default: boolean;
|
|
103
|
+
};
|
|
104
|
+
hintLabel: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
default: string;
|
|
107
|
+
};
|
|
108
|
+
invalid: {
|
|
109
|
+
type: BooleanConstructor;
|
|
110
|
+
default: boolean;
|
|
111
|
+
};
|
|
112
|
+
invalidLabel: {
|
|
113
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
114
|
+
default: undefined;
|
|
115
|
+
};
|
|
116
|
+
valid: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
validLabel: {
|
|
121
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
122
|
+
default: undefined;
|
|
123
|
+
};
|
|
124
|
+
tabindex: {
|
|
125
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
126
|
+
default: number;
|
|
127
|
+
};
|
|
128
|
+
name: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
required: boolean;
|
|
131
|
+
};
|
|
132
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
133
|
+
}>> & Readonly<{}>, {
|
|
134
|
+
modelValue: string | number | boolean | Record<string, any>;
|
|
135
|
+
modifiers: string | string[];
|
|
136
|
+
label: string | number;
|
|
137
|
+
value: string | number | boolean;
|
|
138
|
+
disabled: boolean;
|
|
139
|
+
switch: boolean;
|
|
140
|
+
tabindex: string | number;
|
|
141
|
+
invalid: boolean;
|
|
142
|
+
loading: boolean;
|
|
143
|
+
loadingLabel: string;
|
|
144
|
+
indeterminate: boolean;
|
|
145
|
+
readonly: boolean;
|
|
146
|
+
hintLabel: string;
|
|
147
|
+
invalidLabel: string | unknown[];
|
|
148
|
+
valid: boolean;
|
|
149
|
+
validLabel: string | unknown[];
|
|
150
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
151
|
+
default?: (props: {
|
|
152
|
+
value: unknown;
|
|
153
|
+
}) => any;
|
|
154
|
+
} & {
|
|
155
|
+
hint?: (props: {
|
|
156
|
+
modelValue: unknown;
|
|
157
|
+
valid: boolean;
|
|
158
|
+
invalid: boolean;
|
|
159
|
+
loading: boolean;
|
|
160
|
+
}) => any;
|
|
161
|
+
} & {
|
|
162
|
+
loading?: (props: {
|
|
163
|
+
modelValue: unknown;
|
|
164
|
+
valid: boolean;
|
|
165
|
+
invalid: boolean;
|
|
166
|
+
loading: boolean;
|
|
167
|
+
}) => any;
|
|
168
|
+
} & {
|
|
169
|
+
valid?: (props: {
|
|
170
|
+
modelValue: unknown;
|
|
171
|
+
valid: boolean;
|
|
172
|
+
invalid: boolean;
|
|
173
|
+
loading: boolean;
|
|
174
|
+
}) => any;
|
|
175
|
+
} & {
|
|
176
|
+
invalid?: (props: {
|
|
177
|
+
modelValue: unknown;
|
|
178
|
+
valid: boolean;
|
|
179
|
+
invalid: boolean;
|
|
180
|
+
loading: boolean;
|
|
181
|
+
}) => any;
|
|
182
|
+
}>;
|
|
183
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
184
|
+
new (): {
|
|
185
|
+
$slots: S;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { ExtractPropTypes, Ref } from 'vue';
|
|
2
|
+
import type { InputGroupState } from '../../types/group';
|
|
3
|
+
export declare const VvCheckboxProps: {
|
|
4
|
+
/**
|
|
5
|
+
* If true, the input will be indeterminated
|
|
6
|
+
*/
|
|
7
|
+
indeterminate: BooleanConstructor;
|
|
8
|
+
/**
|
|
9
|
+
* Value associated with the unchecked state
|
|
10
|
+
*/
|
|
11
|
+
uncheckedValue: (NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
12
|
+
/**
|
|
13
|
+
* If true, the input will be displayed as a switch
|
|
14
|
+
*/
|
|
15
|
+
switch: BooleanConstructor;
|
|
16
|
+
modifiers: {
|
|
17
|
+
type: PropType<string | string[]>;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
value: {
|
|
21
|
+
type: (NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: (NumberConstructor | ObjectConstructor | BooleanConstructor | StringConstructor)[];
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
loading: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
loadingLabel: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
label: {
|
|
37
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
38
|
+
default: undefined;
|
|
39
|
+
};
|
|
40
|
+
readonly: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
disabled: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
hintLabel: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
invalid: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
invalidLabel: {
|
|
57
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
58
|
+
default: undefined;
|
|
59
|
+
};
|
|
60
|
+
valid: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
validLabel: {
|
|
65
|
+
type: (ArrayConstructor | StringConstructor)[];
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
tabindex: {
|
|
69
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
70
|
+
default: number;
|
|
71
|
+
};
|
|
72
|
+
name: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
required: boolean;
|
|
75
|
+
};
|
|
76
|
+
id: (NumberConstructor | StringConstructor)[];
|
|
77
|
+
};
|
|
78
|
+
export declare const VvCheckboxEvents: string[];
|
|
79
|
+
export type VvCheckboxPropsTypes = ExtractPropTypes<typeof VvCheckboxProps>;
|
|
80
|
+
/**
|
|
81
|
+
* Merges local and group props
|
|
82
|
+
*/
|
|
83
|
+
export declare function useGroupProps(props: VvCheckboxPropsTypes, emit: (event: (typeof VvCheckboxEvents)[number], value: unknown) => void): {
|
|
84
|
+
id: Ref<string | number | undefined, string | number | undefined> | undefined;
|
|
85
|
+
propsSwitch: Ref<boolean, boolean>;
|
|
86
|
+
indeterminate: Ref<boolean, boolean>;
|
|
87
|
+
group: InputGroupState | undefined;
|
|
88
|
+
isInGroup: globalThis.ComputedRef<boolean>;
|
|
89
|
+
modelValue: Ref<unknown, unknown>;
|
|
90
|
+
valid: Ref<boolean, boolean>;
|
|
91
|
+
invalid: Ref<boolean, boolean>;
|
|
92
|
+
readonly: globalThis.ComputedRef<boolean>;
|
|
93
|
+
disabled: globalThis.ComputedRef<boolean>;
|
|
94
|
+
};
|