@volverjs/ui-vue 0.0.10-beta.47 → 0.0.10-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/auto-imports.d.ts +19 -11
- package/bin/icons.js +1 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +4 -5
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -11
- package/dist/components/VvAccordion/index.d.ts +2 -2
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +45 -46
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +11 -13
- package/dist/components/VvAccordionGroup/index.d.ts +2 -2
- package/dist/components/VvAction/VvAction.vue.d.ts +8 -10
- package/dist/components/VvAction/index.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +158 -161
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +20 -22
- package/dist/components/VvAlert/index.d.ts +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +271 -274
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -11
- package/dist/components/VvAlertGroup/index.d.ts +2 -2
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +6 -6
- package/dist/components/VvAvatar/index.d.ts +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +21 -22
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +6 -6
- package/dist/components/VvAvatarGroup/index.d.ts +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +6 -6
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +23 -23
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +19 -19
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +313 -314
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +14 -16
- package/dist/components/VvButton/index.d.ts +9 -9
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +6 -8
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +6 -6
- package/dist/components/VvCard/index.d.ts +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +186 -187
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +11 -13
- package/dist/components/VvCheckbox/index.d.ts +7 -7
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -191
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +11 -13
- package/dist/components/VvCheckboxGroup/index.d.ts +2 -2
- package/dist/components/VvCombobox/VvCombobox.es.js +1864 -1865
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +72 -291
- package/dist/components/VvCombobox/index.d.ts +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -9
- package/dist/components/VvDialog/index.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +9 -10
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +51 -51
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +22 -16
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +6 -6
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +2 -2
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +2 -2
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +2 -2
- package/dist/components/VvIcon/VvIcon.vue.d.ts +2 -23
- package/dist/components/VvInputFile/VvInputFile.es.js +651 -652
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.vue.d.ts +19 -19
- package/dist/components/VvInputFile/index.d.ts +4 -4
- package/dist/components/VvInputText/VvInputClearAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +11 -7
- package/dist/components/VvInputText/VvInputStepAction.d.ts +10 -6
- package/dist/components/VvInputText/VvInputText.es.js +715 -716
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +30 -32
- package/dist/components/VvInputText/index.d.ts +1 -1
- package/dist/components/VvNav/VvNav.es.js +5 -5
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +8 -10
- 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 +2 -2
- package/dist/components/VvProgress/VvProgress.vue.d.ts +6 -6
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +186 -187
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +10 -12
- package/dist/components/VvRadio/index.d.ts +5 -5
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -191
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +11 -13
- package/dist/components/VvRadioGroup/index.d.ts +2 -2
- package/dist/components/VvSelect/VvSelect.es.js +337 -338
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +20 -131
- package/dist/components/VvSelect/index.d.ts +7 -7
- package/dist/components/VvTab/VvTab.es.js +18 -18
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +6 -8
- package/dist/components/VvTab/index.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +292 -293
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +14 -16
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +8 -8
- package/dist/components/common/HintSlot.d.ts +6 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.es.js +2760 -2763
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useAlert.d.ts +4 -4
- 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/{useProvideDropdown.d.ts → useDropdownProvide.d.ts} +6 -6
- package/dist/composables/dropdown/useDropdownVirtualElement.d.ts +17 -0
- package/dist/composables/group/{useInjectedGroupState.d.ts → useGroupStateInject.d.ts} +1 -1
- package/dist/composables/group/{useProvideGroupState.d.ts → useGroupStateProvide.d.ts} +2 -2
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.es.js +87 -3
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/composables/usePersistence.d.ts +1 -1
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/constants.d.ts +3 -3
- package/dist/directives/index.d.ts +2 -2
- package/dist/directives/index.es.js +145 -39
- 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/icons.d.ts +17 -17
- package/dist/icons.es.js +424 -424
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +4 -4
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +178 -474
- package/dist/stories/Alert/Alert.settings.d.ts +1 -1
- package/dist/stories/Alert/AlertModifiers.stories.d.ts +1 -1
- package/dist/stories/Alert/AlertSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupPosition.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupSlots.stories.d.ts +1 -1
- package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
- package/dist/stories/Button/Button.settings.d.ts +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +1 -1
- package/dist/stories/Nav/Nav.settings.d.ts +1 -1
- package/dist/stories/Tab/Tab.settings.d.ts +1 -1
- package/dist/types/floating-ui.d.ts +1 -1
- package/dist/types/group.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/DomUtilities.d.ts +1 -0
- package/package.json +43 -43
- package/src/Volver.ts +3 -3
- 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 +5 -5
- package/src/components/VvAccordion/index.ts +2 -2
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +5 -5
- package/src/components/VvAction/VvAction.vue +1 -1
- package/src/components/VvAlert/VvAlert.vue +1 -1
- package/src/components/VvAlert/index.ts +1 -1
- package/src/components/VvAlertGroup/VvAlertGroup.vue +1 -1
- package/src/components/VvAlertGroup/index.ts +3 -3
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +2 -2
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +3 -3
- package/src/components/VvButton/index.ts +4 -4
- package/src/components/VvButtonGroup/VvButtonGroup.vue +3 -3
- package/src/components/VvCheckbox/VvCheckbox.vue +2 -2
- package/src/components/VvCheckbox/index.ts +2 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +2 -2
- package/src/components/VvCombobox/VvCombobox.vue +9 -9
- package/src/components/VvCombobox/index.ts +15 -15
- package/src/components/VvDropdown/VvDropdown.vue +19 -19
- package/src/components/VvDropdown/VvDropdownAction.vue +1 -1
- package/src/components/VvDropdown/VvDropdownItem.vue +1 -1
- package/src/components/VvDropdown/VvDropdownOption.vue +1 -1
- package/src/components/VvDropdown/index.ts +2 -2
- package/src/components/VvIcon/VvIcon.vue +2 -2
- package/src/components/VvInputFile/VvInputFile.vue +7 -7
- package/src/components/VvInputFile/index.ts +7 -7
- package/src/components/VvInputText/VvInputPasswordAction.ts +1 -1
- package/src/components/VvInputText/VvInputText.vue +19 -19
- package/src/components/VvInputText/VvInputTextActions.ts +4 -4
- package/src/components/VvInputText/index.ts +2 -2
- package/src/components/VvNav/VvNav.vue +1 -1
- package/src/components/VvRadio/VvRadio.vue +1 -1
- package/src/components/VvRadio/index.ts +2 -2
- package/src/components/VvRadioGroup/VvRadioGroup.vue +2 -2
- package/src/components/VvSelect/VvSelect.vue +6 -6
- package/src/components/VvSelect/index.ts +12 -12
- package/src/components/VvTab/VvTab.vue +2 -2
- package/src/components/VvTab/index.ts +1 -1
- package/src/components/VvTextarea/VvTextarea.vue +1 -1
- package/src/components/common/HintSlot.ts +14 -14
- package/src/components/index.ts +1 -1
- package/src/composables/alert/useAlert.ts +2 -2
- package/src/composables/alert/{useProvideAlert.ts → useAlertProvide.ts} +2 -2
- package/src/composables/dropdown/useDropdownContextmenu.ts +22 -0
- package/src/composables/dropdown/{useProvideDropdown.ts → useDropdownProvide.ts} +9 -9
- package/src/composables/dropdown/useDropdownVirtualElement.ts +53 -0
- package/src/composables/group/{useInjectedGroupState.ts → useGroupStateInject.ts} +2 -2
- package/src/composables/group/{useProvideGroupState.ts → useGroupStateProvide.ts} +2 -2
- package/src/composables/index.ts +2 -0
- package/src/composables/useBlurhash.ts +2 -2
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/usePersistence.ts +1 -1
- package/src/composables/useTextCount.ts +2 -2
- package/src/composables/useUniqueId.ts +2 -3
- package/src/constants.ts +5 -5
- package/src/directives/index.ts +2 -2
- package/src/directives/v-contextmenu.ts +21 -29
- package/src/directives/v-tooltip.ts +2 -2
- package/src/icons.ts +2 -2
- package/src/index.ts +1 -1
- package/src/props/index.ts +7 -7
- package/src/resolvers/unplugin.ts +5 -5
- package/src/stories/Accordion/Accordion.stories.ts +2 -2
- package/src/stories/Accordion/Accordion.test.ts +1 -1
- package/src/stories/Accordion/AccordionSlots.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +2 -2
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +1 -1
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +3 -3
- package/src/stories/Alert/Alert.settings.ts +1 -1
- package/src/stories/Alert/Alert.stories.ts +2 -2
- package/src/stories/Alert/Alert.test.ts +1 -1
- package/src/stories/Alert/AlertModifiers.stories.ts +2 -2
- package/src/stories/Alert/AlertSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroup.test.ts +3 -3
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +2 -2
- package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.stories.ts +2 -2
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/Avatar/AvatarBadge.stories.ts +1 -1
- package/src/stories/Avatar/AvatarModifiers.stories.ts +2 -2
- package/src/stories/Avatar/AvatarSlots.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +2 -2
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +3 -3
- package/src/stories/Badge/Badge.stories.ts +2 -2
- package/src/stories/Badge/Badge.test.ts +1 -1
- package/src/stories/Badge/BadgeSlots.stories.ts +2 -2
- package/src/stories/Blurhash/BlurhashComposable.stories.ts +37 -117
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +2 -2
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +5 -5
- package/src/stories/Button/Button.settings.ts +3 -3
- package/src/stories/Button/Button.stories.ts +2 -2
- package/src/stories/Button/Button.test.ts +1 -1
- package/src/stories/Button/ButtonIcon.stories.ts +2 -2
- package/src/stories/Button/ButtonLink.stories.ts +2 -2
- package/src/stories/Button/ButtonLoading.stories.ts +2 -2
- package/src/stories/Button/ButtonModifiers.stories.ts +2 -2
- package/src/stories/Button/ButtonSlots.stories.ts +3 -3
- package/src/stories/Button/ButtonState.stories.ts +2 -2
- package/src/stories/Button/ButtonToggle.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.settings.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +2 -2
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +2 -2
- package/src/stories/Card/Card.stories.ts +2 -2
- package/src/stories/Card/Card.test.ts +1 -1
- package/src/stories/Card/CardSlots.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.stories.ts +2 -2
- package/src/stories/Checkbox/Checkbox.test.ts +1 -1
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +2 -2
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +2 -2
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +3 -3
- package/src/stories/Combobox/Combobox.settings.ts +9 -9
- package/src/stories/Combobox/Combobox.stories.ts +2 -2
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxOptions.stories.ts +2 -2
- package/src/stories/Combobox/ComboboxSlots.stories.ts +3 -3
- package/src/stories/Dialog/Dialog.stories.ts +2 -2
- package/src/stories/Dialog/Dialog.test.ts +1 -1
- package/src/stories/Dialog/DialogModifiers.stories.ts +2 -2
- package/src/stories/Dialog/DialogSlots.stories.ts +2 -2
- package/src/stories/Dropdown/Dropdown.settings.ts +1 -1
- package/src/stories/Dropdown/Dropdown.stories.ts +4 -4
- package/src/stories/Dropdown/Dropdown.test.ts +1 -1
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +3 -4
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +4 -4
- package/src/stories/Dropdown/DropdownSlots.stories.ts +4 -4
- package/src/stories/Icon/Icon.settings.ts +1 -1
- package/src/stories/Icon/Icon.stories.ts +2 -2
- package/src/stories/Icon/IconsCollection.stories.ts +3 -3
- package/src/stories/InputFile/InputFile.settings.ts +1 -1
- package/src/stories/InputFile/InputFile.stories.ts +1 -1
- package/src/stories/InputFile/InputFileDropArea.stories.ts +2 -2
- package/src/stories/InputFile/InputFileIconPosition.stories.ts +2 -2
- package/src/stories/InputFile/InputFileSlots.stories.ts +2 -2
- package/src/stories/InputText/InputText.settings.ts +2 -2
- package/src/stories/InputText/InputText.stories.ts +2 -2
- package/src/stories/InputText/InputText.test.ts +2 -2
- package/src/stories/InputText/InputTextIconPosition.stories.ts +2 -2
- package/src/stories/InputText/InputTextLength.stories.ts +2 -2
- package/src/stories/InputText/InputTextMask.stories.ts +2 -2
- package/src/stories/InputText/InputTextMinMax.stories.ts +2 -2
- package/src/stories/InputText/InputTextSlots.stories.ts +2 -2
- package/src/stories/InputText/InputTextType.stories.ts +2 -2
- package/src/stories/Nav/Nav.settings.ts +1 -1
- package/src/stories/Nav/Nav.stories.ts +2 -2
- package/src/stories/Nav/Nav.test.ts +1 -1
- package/src/stories/Nav/NavModifiers.stories.ts +2 -2
- package/src/stories/Progress/Progress.stories.ts +2 -2
- package/src/stories/Progress/Progress.test.ts +2 -2
- package/src/stories/Radio/Radio.stories.ts +2 -2
- package/src/stories/Radio/Radio.test.ts +1 -1
- package/src/stories/Radio/RadioSlots.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroup.test.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +2 -2
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +3 -3
- package/src/stories/Select/Select.settings.ts +10 -10
- package/src/stories/Select/Select.stories.ts +2 -2
- package/src/stories/Select/Select.test.ts +1 -1
- package/src/stories/Select/SelectIconPosition.stories.ts +2 -2
- package/src/stories/Select/SelectOptions.stories.ts +2 -2
- package/src/stories/Select/SelectSlots.stories.ts +2 -2
- package/src/stories/Tab/Tab.settings.ts +1 -1
- package/src/stories/Tab/Tab.stories.ts +1 -1
- package/src/stories/Tab/Tab.test.ts +1 -1
- package/src/stories/Textarea/Textarea.settings.ts +1 -1
- package/src/stories/Textarea/Textarea.stories.ts +2 -2
- package/src/stories/Textarea/Textarea.test.ts +1 -1
- package/src/stories/Textarea/TextareaLength.stories.ts +2 -2
- package/src/stories/Textarea/TextareaSlots.stories.ts +2 -2
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +2 -2
- package/src/stories/Tooltip/Tooltip.stories.ts +3 -3
- package/src/stories/Tooltip/Tooltip.test.ts +1 -1
- package/src/stories/Tooltip/TooltipDirective.stories.ts +3 -3
- package/src/test/expect.ts +3 -3
- package/src/test/types.d.ts +2 -2
- package/src/types/floating-ui.ts +1 -1
- package/src/types/group.ts +1 -1
- package/src/types/index.ts +2 -2
- package/src/utils/DomUtilities.ts +15 -0
- package/src/utils/ObjectUtilities.ts +4 -4
- package/src/workers/blurhash.ts +1 -1
- package/dist/composables/alert/{useInjectAlert.d.ts → useAlerInject.d.ts} +0 -0
- package/dist/composables/dropdown/{useInjectDropdown.d.ts → useDropdownInject.d.ts} +0 -0
- package/src/assets/icons/normal/{dulicate.svg → duplicate.svg} +0 -0
- package/src/composables/alert/{useInjectAlert.ts → useAlerInject.ts} +0 -0
- package/src/composables/dropdown/{useInjectDropdown.ts → useDropdownInject.ts} +1 -1
|
@@ -1,187 +1,4 @@
|
|
|
1
|
-
import { computed,
|
|
2
|
-
import { uid } from "uid";
|
|
3
|
-
function equals(obj1, obj2, field) {
|
|
4
|
-
return deepEquals(obj1, obj2);
|
|
5
|
-
}
|
|
6
|
-
function deepEquals(a, b) {
|
|
7
|
-
if (a === b)
|
|
8
|
-
return true;
|
|
9
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
10
|
-
const arrA = Array.isArray(a);
|
|
11
|
-
const arrB = Array.isArray(b);
|
|
12
|
-
let i, length, key;
|
|
13
|
-
if (arrA && arrB) {
|
|
14
|
-
length = a.length;
|
|
15
|
-
if (length !== b.length)
|
|
16
|
-
return false;
|
|
17
|
-
for (i = length; i-- !== 0; ) {
|
|
18
|
-
if (!deepEquals(a[i], b[i]))
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
if (arrA !== arrB)
|
|
24
|
-
return false;
|
|
25
|
-
const dateA = a instanceof Date;
|
|
26
|
-
const dateB = b instanceof Date;
|
|
27
|
-
if (dateA !== dateB)
|
|
28
|
-
return false;
|
|
29
|
-
if (dateA && dateB)
|
|
30
|
-
return a.getTime() === b.getTime();
|
|
31
|
-
const regexpA = a instanceof RegExp;
|
|
32
|
-
const regexpB = b instanceof RegExp;
|
|
33
|
-
if (regexpA !== regexpB)
|
|
34
|
-
return false;
|
|
35
|
-
if (regexpA && regexpB)
|
|
36
|
-
return a.toString() === b.toString();
|
|
37
|
-
const keys = Object.keys(a);
|
|
38
|
-
length = keys.length;
|
|
39
|
-
if (length !== Object.keys(b).length)
|
|
40
|
-
return false;
|
|
41
|
-
for (i = length; i-- !== 0; ) {
|
|
42
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
for (i = length; i-- !== 0; ) {
|
|
46
|
-
key = keys[i];
|
|
47
|
-
if (!deepEquals(a[key], b[key]))
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
return Number.isNaN(a) && Number.isNaN(b);
|
|
53
|
-
}
|
|
54
|
-
function contains(value, list) {
|
|
55
|
-
if (value != null && list && list.length) {
|
|
56
|
-
for (const val of list) {
|
|
57
|
-
if (equals(value, val)) {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
function isString(value) {
|
|
65
|
-
return typeof value === "string" || value instanceof String;
|
|
66
|
-
}
|
|
67
|
-
function joinLines(items) {
|
|
68
|
-
if (Array.isArray(items)) {
|
|
69
|
-
return items.filter((item) => isString(item)).join(" ");
|
|
70
|
-
}
|
|
71
|
-
return items;
|
|
72
|
-
}
|
|
73
|
-
function HintSlotFactory(propsOrRef, slots) {
|
|
74
|
-
const props = computed(() => {
|
|
75
|
-
if (isRef(propsOrRef)) {
|
|
76
|
-
return propsOrRef.value;
|
|
77
|
-
}
|
|
78
|
-
return propsOrRef;
|
|
79
|
-
});
|
|
80
|
-
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
81
|
-
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
82
|
-
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
83
|
-
const hintLabel = computed(() => props.value.hintLabel);
|
|
84
|
-
const hasLoadingLabelOrSlot = computed(
|
|
85
|
-
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
86
|
-
);
|
|
87
|
-
const hasInvalidLabelOrSlot = computed(
|
|
88
|
-
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
89
|
-
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
90
|
-
)
|
|
91
|
-
);
|
|
92
|
-
const hasValidLabelOrSlot = computed(
|
|
93
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
94
|
-
);
|
|
95
|
-
const hasHintLabelOrSlot = computed(
|
|
96
|
-
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
97
|
-
);
|
|
98
|
-
const isVisible = computed(
|
|
99
|
-
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
100
|
-
);
|
|
101
|
-
const hintSlotScope = computed(() => ({
|
|
102
|
-
modelValue: props.value.modelValue,
|
|
103
|
-
valid: props.value.valid,
|
|
104
|
-
invalid: props.value.invalid,
|
|
105
|
-
loading: props.value.loading
|
|
106
|
-
}));
|
|
107
|
-
const HintSlot = defineComponent({
|
|
108
|
-
name: "HintSlot",
|
|
109
|
-
props: {
|
|
110
|
-
tag: {
|
|
111
|
-
type: String,
|
|
112
|
-
default: "small"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
setup() {
|
|
116
|
-
return {
|
|
117
|
-
isVisible,
|
|
118
|
-
invalidLabel,
|
|
119
|
-
validLabel,
|
|
120
|
-
loadingLabel,
|
|
121
|
-
hintLabel,
|
|
122
|
-
hasInvalidLabelOrSlot,
|
|
123
|
-
hasValidLabelOrSlot,
|
|
124
|
-
hasLoadingLabelOrSlot,
|
|
125
|
-
hasHintLabelOrSlot
|
|
126
|
-
};
|
|
127
|
-
},
|
|
128
|
-
render() {
|
|
129
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
130
|
-
if (this.isVisible) {
|
|
131
|
-
let role;
|
|
132
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
133
|
-
role = "alert";
|
|
134
|
-
}
|
|
135
|
-
if (this.hasValidLabelOrSlot) {
|
|
136
|
-
role = "status";
|
|
137
|
-
}
|
|
138
|
-
if (this.hasLoadingLabelOrSlot) {
|
|
139
|
-
return h(
|
|
140
|
-
this.tag,
|
|
141
|
-
{
|
|
142
|
-
role
|
|
143
|
-
},
|
|
144
|
-
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
if (this.hasInvalidLabelOrSlot) {
|
|
148
|
-
return h(
|
|
149
|
-
this.tag,
|
|
150
|
-
{
|
|
151
|
-
role
|
|
152
|
-
},
|
|
153
|
-
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
if (this.hasValidLabelOrSlot) {
|
|
157
|
-
return h(
|
|
158
|
-
this.tag,
|
|
159
|
-
{
|
|
160
|
-
role
|
|
161
|
-
},
|
|
162
|
-
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
return h(
|
|
166
|
-
this.tag,
|
|
167
|
-
{
|
|
168
|
-
role
|
|
169
|
-
},
|
|
170
|
-
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
return null;
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
return {
|
|
177
|
-
hasInvalidLabelOrSlot,
|
|
178
|
-
hasHintLabelOrSlot,
|
|
179
|
-
hasValidLabelOrSlot,
|
|
180
|
-
hasLoadingLabelOrSlot,
|
|
181
|
-
hintSlotScope,
|
|
182
|
-
HintSlot
|
|
183
|
-
};
|
|
184
|
-
}
|
|
1
|
+
import { inject, computed, toRef, toRefs, isRef, defineComponent, h, useId, unref, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
|
|
185
2
|
var StorageType = /* @__PURE__ */ ((StorageType2) => {
|
|
186
3
|
StorageType2["local"] = "local";
|
|
187
4
|
StorageType2["session"] = "session";
|
|
@@ -561,7 +378,7 @@ const CheckboxRadioProps = {
|
|
|
561
378
|
},
|
|
562
379
|
storageKey: String
|
|
563
380
|
});
|
|
564
|
-
function
|
|
381
|
+
function useGroupStateInject(groupKey) {
|
|
565
382
|
const group = inject(groupKey, void 0);
|
|
566
383
|
const isInGroup = computed(() => group !== void 0);
|
|
567
384
|
function getGroupOrLocalRef(propName, props, emit) {
|
|
@@ -612,7 +429,7 @@ const VvCheckboxProps = {
|
|
|
612
429
|
};
|
|
613
430
|
const VvCheckboxEvents = ["click", "update:modelValue", "change", "blur"];
|
|
614
431
|
function useGroupProps(props, emit) {
|
|
615
|
-
const { group, isInGroup, getGroupOrLocalRef } =
|
|
432
|
+
const { group, isInGroup, getGroupOrLocalRef } = useGroupStateInject(INJECTION_KEY_CHECK_GROUP);
|
|
616
433
|
const { id, switch: propsSwitch, indeterminate } = toRefs(props);
|
|
617
434
|
const modelValue = getGroupOrLocalRef("modelValue", props, emit);
|
|
618
435
|
const valid = getGroupOrLocalRef("valid", props);
|
|
@@ -638,6 +455,188 @@ function useGroupProps(props, emit) {
|
|
|
638
455
|
disabled
|
|
639
456
|
};
|
|
640
457
|
}
|
|
458
|
+
function equals(obj1, obj2, field) {
|
|
459
|
+
return deepEquals(obj1, obj2);
|
|
460
|
+
}
|
|
461
|
+
function deepEquals(a, b) {
|
|
462
|
+
if (a === b)
|
|
463
|
+
return true;
|
|
464
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
465
|
+
const arrA = Array.isArray(a);
|
|
466
|
+
const arrB = Array.isArray(b);
|
|
467
|
+
let i, length, key;
|
|
468
|
+
if (arrA && arrB) {
|
|
469
|
+
length = a.length;
|
|
470
|
+
if (length !== b.length)
|
|
471
|
+
return false;
|
|
472
|
+
for (i = length; i-- !== 0; ) {
|
|
473
|
+
if (!deepEquals(a[i], b[i]))
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
return true;
|
|
477
|
+
}
|
|
478
|
+
if (arrA !== arrB)
|
|
479
|
+
return false;
|
|
480
|
+
const dateA = a instanceof Date;
|
|
481
|
+
const dateB = b instanceof Date;
|
|
482
|
+
if (dateA !== dateB)
|
|
483
|
+
return false;
|
|
484
|
+
if (dateA && dateB)
|
|
485
|
+
return a.getTime() === b.getTime();
|
|
486
|
+
const regexpA = a instanceof RegExp;
|
|
487
|
+
const regexpB = b instanceof RegExp;
|
|
488
|
+
if (regexpA !== regexpB)
|
|
489
|
+
return false;
|
|
490
|
+
if (regexpA && regexpB)
|
|
491
|
+
return a.toString() === b.toString();
|
|
492
|
+
const keys = Object.keys(a);
|
|
493
|
+
length = keys.length;
|
|
494
|
+
if (length !== Object.keys(b).length)
|
|
495
|
+
return false;
|
|
496
|
+
for (i = length; i-- !== 0; ) {
|
|
497
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
for (i = length; i-- !== 0; ) {
|
|
501
|
+
key = keys[i];
|
|
502
|
+
if (!deepEquals(a[key], b[key]))
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
return true;
|
|
506
|
+
}
|
|
507
|
+
return Number.isNaN(a) && Number.isNaN(b);
|
|
508
|
+
}
|
|
509
|
+
function contains(value, list) {
|
|
510
|
+
if (value != null && list && list.length) {
|
|
511
|
+
for (const val of list) {
|
|
512
|
+
if (equals(value, val)) {
|
|
513
|
+
return true;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
function isString(value) {
|
|
520
|
+
return typeof value === "string" || value instanceof String;
|
|
521
|
+
}
|
|
522
|
+
function joinLines(items) {
|
|
523
|
+
if (Array.isArray(items)) {
|
|
524
|
+
return items.filter((item) => isString(item)).join(" ");
|
|
525
|
+
}
|
|
526
|
+
return items;
|
|
527
|
+
}
|
|
528
|
+
function HintSlotFactory(propsOrRef, slots) {
|
|
529
|
+
const props = computed(() => {
|
|
530
|
+
if (isRef(propsOrRef)) {
|
|
531
|
+
return propsOrRef.value;
|
|
532
|
+
}
|
|
533
|
+
return propsOrRef;
|
|
534
|
+
});
|
|
535
|
+
const invalidLabel = computed(() => joinLines(props.value.invalidLabel));
|
|
536
|
+
const validLabel = computed(() => joinLines(props.value.validLabel));
|
|
537
|
+
const loadingLabel = computed(() => props.value.loadingLabel);
|
|
538
|
+
const hintLabel = computed(() => props.value.hintLabel);
|
|
539
|
+
const hasLoadingLabelOrSlot = computed(
|
|
540
|
+
() => Boolean(props.value.loading && (slots.loading || loadingLabel.value))
|
|
541
|
+
);
|
|
542
|
+
const hasInvalidLabelOrSlot = computed(
|
|
543
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(
|
|
544
|
+
props.value.invalid && (slots.invalid || invalidLabel.value)
|
|
545
|
+
)
|
|
546
|
+
);
|
|
547
|
+
const hasValidLabelOrSlot = computed(
|
|
548
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.value.valid && (slots.valid || validLabel.value))
|
|
549
|
+
);
|
|
550
|
+
const hasHintLabelOrSlot = computed(
|
|
551
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
552
|
+
);
|
|
553
|
+
const isVisible = computed(
|
|
554
|
+
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
555
|
+
);
|
|
556
|
+
const hintSlotScope = computed(() => ({
|
|
557
|
+
modelValue: props.value.modelValue,
|
|
558
|
+
valid: props.value.valid,
|
|
559
|
+
invalid: props.value.invalid,
|
|
560
|
+
loading: props.value.loading
|
|
561
|
+
}));
|
|
562
|
+
const HintSlot = defineComponent({
|
|
563
|
+
name: "HintSlot",
|
|
564
|
+
props: {
|
|
565
|
+
tag: {
|
|
566
|
+
type: String,
|
|
567
|
+
default: "small"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
setup() {
|
|
571
|
+
return {
|
|
572
|
+
isVisible,
|
|
573
|
+
invalidLabel,
|
|
574
|
+
validLabel,
|
|
575
|
+
loadingLabel,
|
|
576
|
+
hintLabel,
|
|
577
|
+
hasInvalidLabelOrSlot,
|
|
578
|
+
hasValidLabelOrSlot,
|
|
579
|
+
hasLoadingLabelOrSlot,
|
|
580
|
+
hasHintLabelOrSlot
|
|
581
|
+
};
|
|
582
|
+
},
|
|
583
|
+
render() {
|
|
584
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
585
|
+
if (this.isVisible) {
|
|
586
|
+
let role;
|
|
587
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
588
|
+
role = "alert";
|
|
589
|
+
}
|
|
590
|
+
if (this.hasValidLabelOrSlot) {
|
|
591
|
+
role = "status";
|
|
592
|
+
}
|
|
593
|
+
if (this.hasLoadingLabelOrSlot) {
|
|
594
|
+
return h(
|
|
595
|
+
this.tag,
|
|
596
|
+
{
|
|
597
|
+
role
|
|
598
|
+
},
|
|
599
|
+
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
603
|
+
return h(
|
|
604
|
+
this.tag,
|
|
605
|
+
{
|
|
606
|
+
role
|
|
607
|
+
},
|
|
608
|
+
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
if (this.hasValidLabelOrSlot) {
|
|
612
|
+
return h(
|
|
613
|
+
this.tag,
|
|
614
|
+
{
|
|
615
|
+
role
|
|
616
|
+
},
|
|
617
|
+
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
return h(
|
|
621
|
+
this.tag,
|
|
622
|
+
{
|
|
623
|
+
role
|
|
624
|
+
},
|
|
625
|
+
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
return null;
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
return {
|
|
632
|
+
hasInvalidLabelOrSlot,
|
|
633
|
+
hasHintLabelOrSlot,
|
|
634
|
+
hasValidLabelOrSlot,
|
|
635
|
+
hasLoadingLabelOrSlot,
|
|
636
|
+
hintSlotScope,
|
|
637
|
+
HintSlot
|
|
638
|
+
};
|
|
639
|
+
}
|
|
641
640
|
function useVolver() {
|
|
642
641
|
return inject(INJECTION_KEY_VOLVER);
|
|
643
642
|
}
|
|
@@ -695,7 +694,7 @@ function useDefaults(componentName, propsDefinition, props) {
|
|
|
695
694
|
});
|
|
696
695
|
}
|
|
697
696
|
function useUniqueId(id) {
|
|
698
|
-
return computed(() => String((id == null ? void 0 : id.value) ||
|
|
697
|
+
return computed(() => String((id == null ? void 0 : id.value) || useId()));
|
|
699
698
|
}
|
|
700
699
|
function useModifiers(prefix, modifiers, others) {
|
|
701
700
|
return computed(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.local="local",e.session="session",e))(t||{}),l=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(l||{}),a=(e=>(e.before="before",e.after="after",e))(a||{}),o=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(o||{}),n=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(n||{});const i=Symbol.for("volver"),r=Symbol.for("checkGroup"),u={valid:{type:Boolean,default:!1},validLabel:{type:[String,Array],default:void 0}},d={invalid:{type:Boolean,default:!1},invalidLabel:{type:[String,Array],default:void 0}},s={loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},v={disabled:{type:Boolean,default:!1}},c=(Boolean,Boolean,Boolean,{label:{type:[String,Number],default:void 0}}),f={readonly:{type:Boolean,default:!1}},p={modifiers:{type:[String,Array],default:void 0}},b={hintLabel:{type:String,default:""}};a.before;const h={tabindex:{type:[String,Number],default:0}},m={id:[String,Number]};l.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const y={...{...m,name:{type:String,required:!0}},...h,...u,...d,...b,...v,...f,...p,...c,...s,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[Object,Number,Boolean,String],default:void 0}};o.button,n.button,t.local;const g={...y,...p,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function S(t,l){const{group:a,isInGroup:o,getGroupOrLocalRef:n}=function(t){const l=e.inject(t,void 0),a=e.computed((()=>void 0!==l));return{group:l,isInGroup:a,getGroupOrLocalRef:function(t,a,o){const n=null==l?void 0:l[t];if(n)return e.computed({get:()=>n.value,set(e){n.value=e}});const i=e.toRef(a,t);return e.computed({get:()=>i.value,set(e){o&&o(`update:${t}`,e)}})}}}(r),{id:i,switch:u,indeterminate:d}=e.toRefs(t),s=n("modelValue",t,l),v=n("valid",t),c=n("invalid",t),f=e.computed((()=>Boolean(t.readonly||(null==a?void 0:a.readonly.value)))),p=e.computed((()=>Boolean(t.disabled||(null==a?void 0:a.disabled.value))));return{id:i,propsSwitch:u,indeterminate:d,group:a,isInGroup:o,modelValue:s,valid:v,invalid:c,readonly:f,disabled:p}}function L(e,t,l){return k(e,t)}function k(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){const l=Array.isArray(e),a=Array.isArray(t);let o,n,i;if(l&&a){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!k(e[o],t[o]))return!1;return!0}if(l!==a)return!1;const r=e instanceof Date,u=t instanceof Date;if(r!==u)return!1;if(r&&u)return e.getTime()===t.getTime();const d=e instanceof RegExp,s=t instanceof RegExp;if(d!==s)return!1;if(d&&s)return e.toString()===t.toString();const v=Object.keys(e);if(n=v.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,v[o]))return!1;for(o=n;0!=o--;)if(i=v[o],!k(e[i],t[i]))return!1;return!0}return Number.isNaN(e)&&Number.isNaN(t)}function B(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(t=e)||t instanceof String;var t})).join(" "):e}function O(t,l,a){const o=e.inject(i),n=e.computed((()=>{var e;if(o&&(null==(e=o.defaults.value)?void 0:e[t]))return o.defaults.value[t]}));return e.computed((()=>{if(void 0===n.value)return a;const e=n.value,t=l,o=a;return Object.keys(t).reduce(((l,a)=>{const n=o[a];if(l[a]=n,a in e){if(Array.isArray(t[a])){const o=t[a];if(o.length){o[0]===n&&(l[a]=e[a])}}if("function"==typeof t[a]){(0,t[a])()===n&&(l[a]=e[a])}if("object"==typeof t[a]){let o=t[a].default;"function"==typeof o&&(o=o()),"object"==typeof o?JSON.stringify(o)===JSON.stringify(n)&&(l[a]=e[a]):o===n&&(l[a]=e[a])}}return l}),{})}))}const V=["for"],x=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:g,emits:["click","update:modelValue","change","blur"],setup(t,{emit:l}){const a=t,o=l,n=e.useSlots(),i=O("VvCheckbox",g,a),{id:r,disabled:u,readonly:d,valid:s,invalid:v,propsSwitch:c,modelValue:f,indeterminate:p,isInGroup:b}=S(a,o),h=function(t){return e.computed((()=>String((null==t?void 0:t.value)||e.useId())))}(r),m=e.computed((()=>`${h.value}-hint`)),y=e.computed((()=>$.value?-1:a.tabindex)),k=e.ref(),A=e.computed((()=>void 0!==a.uncheckedValue&&!b.value)),$=e.computed((()=>u.value||d.value)),N=e.computed((()=>!0===v.value||!0!==s.value&&void 0)),w=e.computed((()=>A.value?f.value===a.value:Array.isArray(f.value)?function(e,t){if(null!=e&&t&&t.length)for(const l of t)if(L(e,l))return!0;return!1}(a.value,f.value):L(a.value,f.value))),j=e.computed((()=>!!p.value||!(w.value||!A.value||a.uncheckedValue===f.value))),R=e.computed((()=>{if(!A.value)return!["string","number","boolean"].includes(typeof a.value)||a.value})),C=e.computed({get:()=>w.value,set(e){if(A.value)f.value=e?a.value:a.uncheckedValue;else if(Array.isArray(f.value)||b.value){const t=f.value??[],l=new Set(Array.isArray(t)?t:[t]);e?l.add(a.value):l.delete(a.value),f.value=[...l]}else f.value=e?a.value:void 0;o("change",e)}}),{modifiers:I}=e.toRefs(a),P=function(t,l,a){return e.computed((()=>{const o={[t]:!0},n="string"==typeof(null==l?void 0:l.value)?l.value.split(" "):null==l?void 0:l.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(o[`${t}--${e}`]=!0)})),a&&Object.keys(a.value).forEach((l=>{o[`${t}--${l}`]=e.unref(a.value[l])})),o}))}("vv-checkbox",I,e.computed((()=>({switch:c.value,valid:s.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:p.value}))));e.watchEffect((()=>{A.value&&Array.isArray(f.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>j.value),(e=>{k.value.indeterminate=!!e})),e.onMounted((()=>{j.value&&(k.value.indeterminate=!0)}));const{HintSlot:E,hasHintLabelOrSlot:G,hasInvalidLabelOrSlot:H,hintSlotScope:T}=function(t,l){const a=e.computed((()=>e.isRef(t)?t.value:t)),o=e.computed((()=>B(a.value.invalidLabel))),n=e.computed((()=>B(a.value.validLabel))),i=e.computed((()=>a.value.loadingLabel)),r=e.computed((()=>a.value.hintLabel)),u=e.computed((()=>Boolean(a.value.loading&&(l.loading||i.value)))),d=e.computed((()=>!u.value&&Boolean(a.value.invalid&&(l.invalid||o.value)))),s=e.computed((()=>!u.value&&!d.value&&Boolean(a.value.valid&&(l.valid||n.value)))),v=e.computed((()=>!u.value&&!d.value&&!s.value&&Boolean(l.hint||r.value))),c=e.computed((()=>d.value||s.value||u.value||v.value)),f=e.computed((()=>({modelValue:a.value.modelValue,valid:a.value.valid,invalid:a.value.invalid,loading:a.value.loading}))),p=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:c,invalidLabel:o,validLabel:n,loadingLabel:i,hintLabel:r,hasInvalidLabelOrSlot:d,hasValidLabelOrSlot:s,hasLoadingLabelOrSlot:u,hasHintLabelOrSlot:v}),render(){var t,l,a,o,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==(l=(t=this.$slots).loading)?void 0:l.call(t))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(o=(a=this.$slots).invalid)?void 0:o.call(a))??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}}(i,n);return(t,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(P)),for:e.unref(h)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(h),ref_key:"input",ref:k,"onUpdate:modelValue":l[0]||(l[0]=t=>e.isRef(C)?C.value=t:null),type:"checkbox",class:"vv-checkbox__input",name:t.name,disabled:e.unref($),value:e.unref(R),tabindex:e.unref(y),"aria-invalid":e.unref(N),"aria-describedby":e.unref(G)?e.unref(m):void 0,"aria-errormessage":e.unref(H)?e.unref(m):void 0},null,8,x),[[e.vModelCheckbox,e.unref(C)]]),e.renderSlot(t.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)])),e.createVNode(e.unref(E),{id:e.unref(m),class:"vv-checkbox__hint"},e.createSlots({_:2},[t.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"0"}:void 0,t.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"1"}:void 0,t.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"2"}:void 0,t.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(t.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(T))))])),key:"3"}:void 0]),1032,["id"])],10,V))}})}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
2
|
indeterminate: BooleanConstructor;
|
|
3
3
|
uncheckedValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
4
4
|
switch: BooleanConstructor;
|
|
5
5
|
modifiers: {
|
|
6
|
-
type:
|
|
6
|
+
type: PropType<string | string[]>;
|
|
7
7
|
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
value: {
|
|
@@ -63,14 +63,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
63
63
|
required: boolean;
|
|
64
64
|
};
|
|
65
65
|
id: (StringConstructor | NumberConstructor)[];
|
|
66
|
-
}
|
|
67
|
-
[x: string]: (...args: any[]) => void;
|
|
68
|
-
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
66
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
69
67
|
indeterminate: BooleanConstructor;
|
|
70
68
|
uncheckedValue: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
71
69
|
switch: BooleanConstructor;
|
|
72
70
|
modifiers: {
|
|
73
|
-
type:
|
|
71
|
+
type: PropType<string | string[]>;
|
|
74
72
|
default: undefined;
|
|
75
73
|
};
|
|
76
74
|
value: {
|
|
@@ -130,26 +128,26 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
130
128
|
required: boolean;
|
|
131
129
|
};
|
|
132
130
|
id: (StringConstructor | NumberConstructor)[];
|
|
133
|
-
}
|
|
131
|
+
}>> & Readonly<{}>, {
|
|
134
132
|
label: string | number;
|
|
135
133
|
value: string | number | boolean;
|
|
136
134
|
disabled: boolean;
|
|
137
135
|
modelValue: string | number | boolean | Record<string, any>;
|
|
138
136
|
modifiers: string | string[];
|
|
139
|
-
readonly: boolean;
|
|
140
137
|
switch: boolean;
|
|
141
138
|
loading: boolean;
|
|
142
139
|
loadingLabel: string;
|
|
140
|
+
indeterminate: boolean;
|
|
141
|
+
readonly: boolean;
|
|
143
142
|
hintLabel: string;
|
|
144
|
-
valid: boolean;
|
|
145
|
-
validLabel: string | unknown[];
|
|
146
143
|
invalid: boolean;
|
|
147
144
|
invalidLabel: string | unknown[];
|
|
148
|
-
|
|
145
|
+
valid: boolean;
|
|
146
|
+
validLabel: string | unknown[];
|
|
149
147
|
tabindex: string | number;
|
|
150
|
-
}, {}>, {
|
|
148
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLLabelElement>, {
|
|
151
149
|
default?(_: {
|
|
152
|
-
value:
|
|
150
|
+
value: string | number | boolean | Record<string, any>;
|
|
153
151
|
}): any;
|
|
154
152
|
hint?(_: {
|
|
155
153
|
modelValue: unknown;
|
|
@@ -14,7 +14,7 @@ export declare const VvCheckboxProps: {
|
|
|
14
14
|
*/
|
|
15
15
|
switch: BooleanConstructor;
|
|
16
16
|
modifiers: {
|
|
17
|
-
type:
|
|
17
|
+
type: PropType<string | string[]>;
|
|
18
18
|
default: undefined;
|
|
19
19
|
};
|
|
20
20
|
value: {
|
|
@@ -81,14 +81,14 @@ export type VvCheckboxPropsTypes = ExtractPropTypes<typeof VvCheckboxProps>;
|
|
|
81
81
|
* Merges local and group props
|
|
82
82
|
*/
|
|
83
83
|
export declare function useGroupProps(props: VvCheckboxPropsTypes, emit: (event: (typeof VvCheckboxEvents)[number], value: unknown) => void): {
|
|
84
|
-
id: Ref<string | number | undefined> | undefined;
|
|
85
|
-
propsSwitch: Ref<boolean>;
|
|
86
|
-
indeterminate: Ref<boolean>;
|
|
84
|
+
id: Ref<string | number | undefined, string | number | undefined> | undefined;
|
|
85
|
+
propsSwitch: Ref<boolean, boolean>;
|
|
86
|
+
indeterminate: Ref<boolean, boolean>;
|
|
87
87
|
group: InputGroupState | undefined;
|
|
88
88
|
isInGroup: globalThis.ComputedRef<boolean>;
|
|
89
|
-
modelValue: Ref<unknown>;
|
|
90
|
-
valid: Ref<boolean>;
|
|
91
|
-
invalid: Ref<boolean>;
|
|
89
|
+
modelValue: Ref<unknown, unknown>;
|
|
90
|
+
valid: Ref<boolean, boolean>;
|
|
91
|
+
invalid: Ref<boolean, boolean>;
|
|
92
92
|
readonly: globalThis.ComputedRef<boolean>;
|
|
93
93
|
disabled: globalThis.ComputedRef<boolean>;
|
|
94
94
|
};
|