@volverjs/ui-vue 0.0.6-beta.6 → 0.0.6
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 +3 -5
- package/auto-imports.d.ts +11 -0
- package/dist/components/VvAccordion/VvAccordion.es.js +220 -4
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +8 -8
- package/dist/components/VvAccordion/index.d.ts +1 -4
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +221 -8
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +6 -6
- package/dist/components/VvAccordionGroup/index.d.ts +2 -5
- package/dist/components/VvAction/VvAction.es.js +12 -8
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAction/VvAction.vue.d.ts +4 -4
- package/dist/components/VvAction/index.d.ts +1 -1
- package/dist/components/VvAlert/VvAlert.es.js +661 -0
- package/dist/components/VvAlert/VvAlert.umd.js +1 -0
- package/dist/components/VvAlert/VvAlert.vue.d.ts +104 -0
- package/dist/components/VvAlert/index.d.ts +95 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.es.js +799 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -0
- package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +89 -0
- package/dist/components/VvAlertGroup/index.d.ts +55 -0
- package/dist/components/VvAvatar/VvAvatar.es.js +3 -3
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +2 -2
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +3 -3
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +2 -2
- package/dist/components/VvBadge/VvBadge.es.js +3 -3
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +3 -3
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +3 -3
- package/dist/components/VvButton/VvButton.es.js +39 -29
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +13 -13
- package/dist/components/VvButton/index.d.ts +2 -2
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +3 -3
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +4 -4
- package/dist/components/VvCard/VvCard.es.js +221 -2
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCard/VvCard.vue.d.ts +5 -5
- package/dist/components/VvCheckbox/VvCheckbox.es.js +154 -101
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +46 -10
- package/dist/components/VvCheckbox/index.d.ts +8 -3
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -104
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +44 -8
- package/dist/components/VvCheckboxGroup/index.d.ts +8 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +271 -174
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +73 -37
- package/dist/components/VvCombobox/index.d.ts +13 -7
- package/dist/components/VvDialog/VvDialog.es.js +44 -33
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +7 -7
- package/dist/components/VvDialog/index.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdown.es.js +39 -25
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +21 -17
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +4 -4
- package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +2 -2
- package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +4 -4
- package/dist/components/VvDropdown/index.d.ts +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -11
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +9 -5
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +3 -3
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +12 -8
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.es.js +25 -19
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +3 -3
- package/dist/components/VvIcon/index.d.ts +2 -2
- package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +165 -141
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +46 -22
- package/dist/components/VvInputText/index.d.ts +5 -5
- package/dist/components/VvNav/VvNav.es.js +12 -8
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +1 -1
- package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +1 -1
- package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +1 -1
- package/dist/components/VvProgress/VvProgress.es.js +3 -3
- package/dist/components/VvProgress/VvProgress.vue.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +154 -101
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +46 -10
- package/dist/components/VvRadio/index.d.ts +8 -3
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -104
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +44 -8
- package/dist/components/VvRadioGroup/index.d.ts +8 -3
- package/dist/components/VvSelect/VvSelect.es.js +166 -140
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +42 -18
- package/dist/components/VvSelect/index.d.ts +4 -4
- package/dist/components/VvTab/VvTab.es.js +12 -8
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTab/VvTab.vue.d.ts +1 -1
- package/dist/components/VvTextarea/VvTextarea.es.js +163 -139
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +40 -16
- package/dist/components/VvTextarea/index.d.ts +3 -3
- package/dist/components/VvTooltip/VvTooltip.es.js +3 -3
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +2 -2
- package/dist/components/common/HintSlot.d.ts +38 -12
- package/dist/components/index.es.js +1066 -768
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/alert/useInjectAlert.d.ts +9 -0
- package/dist/composables/alert/useProvideAlert.d.ts +10 -0
- package/dist/composables/dropdown/useInjectDropdown.d.ts +17 -16
- package/dist/composables/dropdown/useProvideDropdown.d.ts +7 -3
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useVolver.d.ts +1 -2
- package/dist/constants.d.ts +33 -4
- package/dist/directives/index.es.js +3 -3
- package/dist/directives/v-tooltip.es.js +3 -3
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/props/index.d.ts +38 -16
- package/dist/resolvers/unplugin.es.js +6 -3
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Accordion/Accordion.settings.d.ts +18 -17
- package/dist/stories/Accordion/Accordion.stories.d.ts +7 -0
- package/dist/stories/Accordion/AccordionSlots.stories.d.ts +7 -0
- package/dist/stories/AccordionGroup/AccordionGroup.settings.d.ts +23 -4
- package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +134 -0
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +894 -0
- package/dist/stories/Alert/Alert.settings.d.ts +105 -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 +97 -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/Avatar/Avatar.settings.d.ts +2 -33
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -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 +0 -6
- package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -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 +0 -3
- package/dist/stories/Badge/Badge.stories.d.ts +7 -0
- package/dist/stories/Badge/BadgeSlots.stories.d.ts +6 -0
- package/dist/stories/Breadcrumb/Breadcrumb.stories.d.ts +7 -0
- package/dist/stories/Breadcrumb/Breadcrumb.test.d.ts +1 -1
- package/dist/stories/Breadcrumb/BreadcrumbSlots.stories.d.ts +6 -0
- package/dist/stories/Button/Button.settings.d.ts +1 -18
- package/dist/stories/Button/Button.stories.d.ts +6 -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 +0 -4
- package/dist/stories/ButtonGroup/ButtonGroup.stories.d.ts +6 -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 +0 -3
- package/dist/stories/Card/Card.stories.d.ts +6 -0
- package/dist/stories/Card/CardSlots.stories.d.ts +9 -0
- package/dist/stories/Checkbox/Checkbox.settings.d.ts +1 -21
- package/dist/stories/Checkbox/Checkbox.stories.d.ts +13 -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 +1 -27
- package/dist/stories/CheckboxGroup/CheckboxGroup.stories.d.ts +12 -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 +2 -54
- package/dist/stories/Combobox/Combobox.stories.d.ts +21 -0
- package/dist/stories/Combobox/ComboboxIconPosition.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxMultiple.stories.d.ts +8 -0
- package/dist/stories/Combobox/ComboboxOptions.stories.d.ts +9 -0
- package/dist/stories/Combobox/ComboboxSlots.stories.d.ts +10 -0
- package/dist/stories/Dialog/Dialog.settings.d.ts +1 -1
- package/dist/stories/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/stories/Dialog/DialogSlots.stories.d.ts +8 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +1 -1
- package/dist/stories/Dropdown/Dropdown.stories.d.ts +9 -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 +1 -3
- package/dist/stories/Icon/Icon.stories.d.ts +8 -0
- package/dist/stories/Icon/IconsCollection.stories.d.ts +6 -0
- package/dist/stories/InputText/InputText.settings.d.ts +1 -74
- package/dist/stories/InputText/InputText.stories.d.ts +15 -0
- package/dist/stories/InputText/InputTextIconPosition.stories.d.ts +8 -0
- package/dist/stories/InputText/InputTextLength.stories.d.ts +10 -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/InputTextType.stories.d.ts +18 -0
- package/dist/stories/Nav/Nav.settings.d.ts +0 -3
- package/dist/stories/Nav/Nav.stories.d.ts +6 -0
- package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
- package/dist/stories/Progress/Progress.settings.d.ts +0 -6
- package/dist/stories/Progress/Progress.stories.d.ts +7 -0
- package/dist/stories/Radio/Radio.settings.d.ts +1 -19
- package/dist/stories/Radio/Radio.stories.d.ts +11 -0
- package/dist/stories/Radio/RadioSlots.stories.d.ts +7 -0
- package/dist/stories/RadioGroup/RadioGroup.settings.d.ts +1 -27
- package/dist/stories/RadioGroup/RadioGroup.stories.d.ts +12 -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 +1 -47
- package/dist/stories/Select/Select.stories.d.ts +15 -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.stories.d.ts +6 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +1 -43
- package/dist/stories/Textarea/Textarea.stories.d.ts +14 -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 +2 -39
- package/dist/stories/Tooltip/Tooltip.stories.d.ts +6 -0
- package/dist/stories/Tooltip/TooltipDirective.stories.d.ts +10 -0
- package/dist/stories/argTypes.d.ts +5 -125
- package/package.json +68 -52
- 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/index.ts +2 -4
- package/src/components/VvAccordionGroup/index.ts +3 -4
- package/src/components/VvAction/VvAction.vue +1 -1
- package/src/components/VvAlert/VvAlert.vue +54 -0
- package/src/components/VvAlert/index.ts +162 -0
- package/src/components/VvAlertGroup/VvAlertGroup.vue +34 -0
- package/src/components/VvAlertGroup/index.ts +122 -0
- package/src/components/VvCard/index.ts +3 -1
- package/src/components/VvCheckbox/VvCheckbox.vue +23 -2
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +15 -2
- package/src/components/VvCombobox/VvCombobox.vue +41 -24
- package/src/components/VvCombobox/index.ts +9 -3
- package/src/components/VvDialog/VvDialog.vue +11 -7
- package/src/components/VvDialog/index.ts +2 -2
- package/src/components/VvDropdown/VvDropdown.vue +23 -5
- package/src/components/VvDropdown/VvDropdownItem.vue +2 -2
- package/src/components/VvIcon/VvIcon.vue +37 -34
- package/src/components/VvIcon/index.ts +2 -2
- package/src/components/VvInputText/VvInputText.vue +26 -9
- package/src/components/VvRadio/VvRadio.vue +23 -2
- package/src/components/VvRadioGroup/VvRadioGroup.vue +15 -2
- package/src/components/VvSelect/VvSelect.vue +26 -9
- package/src/components/VvTextarea/VvTextarea.vue +26 -9
- package/src/components/common/HintSlot.ts +129 -170
- package/src/composables/alert/useInjectAlert.ts +8 -0
- package/src/composables/alert/useProvideAlert.ts +23 -0
- package/src/composables/dropdown/useInjectDropdown.ts +3 -28
- package/src/composables/dropdown/useProvideDropdown.ts +14 -15
- package/src/composables/useOptions.ts +9 -7
- package/src/composables/useVolver.ts +1 -2
- package/src/constants.ts +42 -4
- package/src/props/index.ts +5 -3
- package/src/resolvers/unplugin.ts +6 -3
- package/src/stories/Accordion/Accordion.settings.ts +18 -7
- package/src/stories/Accordion/Accordion.stories.ts +45 -0
- package/src/stories/Accordion/AccordionSlots.stories.ts +29 -0
- package/src/stories/AccordionGroup/AccordionGroup.settings.ts +22 -0
- package/src/stories/AccordionGroup/AccordionGroup.stories.ts +62 -0
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +53 -0
- package/src/stories/Alert/Alert.settings.ts +110 -0
- package/src/stories/Alert/Alert.stories.ts +60 -0
- package/src/stories/Alert/Alert.test.ts +95 -0
- package/src/stories/Alert/AlertModifiers.stories.ts +77 -0
- package/src/stories/Alert/AlertSlots.stories.ts +74 -0
- package/src/stories/AlertGroup/AlertGroup.settings.ts +110 -0
- package/src/stories/AlertGroup/AlertGroup.stories.ts +50 -0
- package/src/stories/AlertGroup/AlertGroup.test.ts +76 -0
- package/src/stories/AlertGroup/AlertGroupPosition.stories.ts +103 -0
- package/src/stories/AlertGroup/AlertGroupSlots.stories.ts +67 -0
- package/src/stories/Avatar/Avatar.settings.ts +7 -6
- package/src/stories/Avatar/Avatar.stories.ts +42 -0
- package/src/stories/Avatar/Avatar.test.ts +1 -1
- package/src/stories/Avatar/AvatarBadge.stories.ts +36 -0
- package/src/stories/Avatar/AvatarModifiers.stories.ts +100 -0
- package/src/stories/Avatar/AvatarSlots.stories.ts +34 -0
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
- package/src/stories/AvatarGroup/{AvatarGroupSlotDefault.stories.mdx → AvatarGroupSlotDefault.stories.ts} +24 -30
- package/src/stories/Badge/Badge.stories.ts +43 -0
- package/src/stories/Badge/BadgeSlots.stories.ts +23 -0
- package/src/stories/Breadcrumb/Breadcrumb.stories.ts +41 -0
- package/src/stories/Breadcrumb/Breadcrumb.test.ts +1 -1
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.ts +37 -0
- package/src/stories/Button/Button.settings.ts +2 -11
- package/src/stories/Button/Button.stories.ts +38 -0
- package/src/stories/Button/ButtonIcon.stories.ts +67 -0
- package/src/stories/Button/ButtonLink.stories.ts +40 -0
- package/src/stories/Button/ButtonLoading.stories.ts +41 -0
- package/src/stories/Button/ButtonModifiers.stories.ts +158 -0
- package/src/stories/Button/ButtonSlots.stories.ts +87 -0
- package/src/stories/Button/ButtonState.stories.ts +42 -0
- package/src/stories/Button/ButtonToggle.stories.ts +52 -0
- package/src/stories/ButtonGroup/ButtonGroup.stories.ts +39 -0
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.ts +39 -0
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.ts +38 -0
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.ts +41 -0
- package/src/stories/Card/Card.stories.ts +46 -0
- package/src/stories/Card/CardSlots.stories.ts +81 -0
- package/src/stories/Checkbox/Checkbox.settings.ts +0 -2
- package/src/stories/Checkbox/Checkbox.stories.ts +97 -0
- package/src/stories/Checkbox/CheckboxBinary.stories.ts +33 -0
- package/src/stories/Checkbox/CheckboxSlots.stories.ts +31 -0
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.ts +87 -0
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.ts +53 -0
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.ts +47 -0
- package/src/stories/Combobox/Combobox.settings.ts +3 -23
- package/src/stories/Combobox/Combobox.stories.ts +176 -0
- package/src/stories/Combobox/Combobox.test.ts +2 -2
- package/src/stories/Combobox/ComboboxIconPosition.stories.ts +43 -0
- package/src/stories/Combobox/ComboboxMultiple.stories.ts +41 -0
- package/src/stories/Combobox/ComboboxOptions.stories.ts +78 -0
- package/src/stories/Combobox/ComboboxSlots.stories.ts +104 -0
- package/src/stories/Dialog/Dialog.settings.ts +1 -1
- package/src/stories/Dialog/Dialog.stories.ts +51 -0
- package/src/stories/Dialog/Dialog.test.ts +2 -2
- package/src/stories/Dialog/DialogSlots.stories.ts +39 -0
- package/src/stories/Dropdown/Dropdown.stories.ts +107 -0
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.ts +49 -0
- package/src/stories/Dropdown/DropdownMultilevel.stories.ts +61 -0
- package/src/stories/Dropdown/DropdownSlots.stories.ts +95 -0
- package/src/stories/Icon/Icon.settings.ts +1 -0
- package/src/stories/Icon/Icon.stories.ts +48 -0
- package/src/stories/Icon/IconsCollection.stories.ts +53 -0
- package/src/stories/InputText/InputText.settings.ts +3 -39
- package/src/stories/InputText/InputText.stories.ts +121 -0
- package/src/stories/InputText/InputTextIconPosition.stories.ts +43 -0
- package/src/stories/InputText/InputTextLength.stories.ts +58 -0
- package/src/stories/InputText/InputTextMinMax.stories.ts +51 -0
- package/src/stories/InputText/InputTextSlots.stories.ts +39 -0
- package/src/stories/InputText/InputTextType.stories.ts +119 -0
- package/src/stories/Nav/Nav.stories.ts +33 -0
- package/src/stories/Nav/NavModifiers.stories.ts +47 -0
- package/src/stories/Progress/Progress.settings.ts +0 -3
- package/src/stories/Progress/Progress.stories.ts +41 -0
- package/src/stories/Radio/Radio.stories.ts +81 -0
- package/src/stories/Radio/RadioSlots.stories.ts +31 -0
- package/src/stories/RadioGroup/RadioGroup.stories.ts +88 -0
- package/src/stories/RadioGroup/RadioGroupOptions.stories.ts +53 -0
- package/src/stories/RadioGroup/RadioGroupSlots.stories.ts +47 -0
- package/src/stories/Select/Select.settings.ts +0 -5
- package/src/stories/Select/Select.stories.ts +113 -0
- package/src/stories/Select/SelectIconPosition.stories.ts +43 -0
- package/src/stories/Select/SelectOptions.stories.ts +77 -0
- package/src/stories/Select/SelectSlots.stories.ts +39 -0
- package/src/stories/Tab/Tab.stories.ts +70 -0
- package/src/stories/Textarea/Textarea.settings.ts +0 -8
- package/src/stories/Textarea/Textarea.stories.ts +107 -0
- package/src/stories/Textarea/TextareaLength.stories.ts +58 -0
- package/src/stories/Textarea/TextareaSlots.stories.ts +39 -0
- package/src/stories/Textarea/TextareatIconPosition.stories.ts +43 -0
- package/src/stories/Tooltip/Tooltip.settings.ts +4 -4
- package/src/stories/Tooltip/Tooltip.stories.ts +40 -0
- package/src/stories/Tooltip/TooltipDirective.stories.ts +68 -0
- package/src/stories/argTypes.ts +5 -59
- package/src/stories/Accordion/Accordion.stories.mdx +0 -45
- package/src/stories/Accordion/AccordionSlots.stories.mdx +0 -58
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +0 -58
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +0 -59
- package/src/stories/Avatar/Avatar.stories.mdx +0 -40
- package/src/stories/Avatar/AvatarBadge.stories.mdx +0 -41
- package/src/stories/Avatar/AvatarModifiers.stories.mdx +0 -87
- package/src/stories/Avatar/AvatarSlotDefault.stories.mdx +0 -29
- package/src/stories/AvatarGroup/AvatarGroup.stories.mdx +0 -30
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.mdx +0 -24
- package/src/stories/Badge/Badge.stories.mdx +0 -51
- package/src/stories/Badge/BadgeSlots.stories.mdx +0 -20
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +0 -50
- package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +0 -43
- package/src/stories/Button/Button.stories.mdx +0 -35
- package/src/stories/Button/ButtonIcon.stories.mdx +0 -153
- package/src/stories/Button/ButtonLink.stories.mdx +0 -72
- package/src/stories/Button/ButtonLoading.stories.mdx +0 -108
- package/src/stories/Button/ButtonModifiers.stories.mdx +0 -257
- package/src/stories/Button/ButtonSlots.stories.mdx +0 -116
- package/src/stories/Button/ButtonState.stories.mdx +0 -66
- package/src/stories/Button/ButtonToggle.stories.mdx +0 -112
- package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +0 -37
- package/src/stories/ButtonGroup/ButtonGroupModifiers.stories.mdx +0 -52
- package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +0 -37
- package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +0 -73
- package/src/stories/Card/Card.stories.mdx +0 -40
- package/src/stories/Card/CardSlots.stories.mdx +0 -98
- package/src/stories/Checkbox/Checkbox.stories.mdx +0 -164
- package/src/stories/Checkbox/CheckboxBinary.stories.mdx +0 -68
- package/src/stories/Checkbox/CheckboxSlots.stories.mdx +0 -46
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +0 -135
- package/src/stories/CheckboxGroup/CheckboxGroupOptions.stories.mdx +0 -100
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +0 -68
- package/src/stories/Combobox/Combobox.stories.mdx +0 -324
- package/src/stories/Combobox/ComboboxIconPosition.stories.mdx +0 -78
- package/src/stories/Combobox/ComboboxMultiple.stories.mdx +0 -73
- package/src/stories/Combobox/ComboboxOptions.stories.mdx +0 -135
- package/src/stories/Combobox/ComboboxSlots.stories.mdx +0 -153
- package/src/stories/Dialog/Dialog.stories.mdx +0 -56
- package/src/stories/Dialog/DialogSlots.stories.mdx +0 -63
- package/src/stories/Dropdown/Dropdown.stories.mdx +0 -124
- package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +0 -41
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +0 -56
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +0 -114
- package/src/stories/Icon/Icon.stories.mdx +0 -91
- package/src/stories/Icon/IconsCollection.stories.mdx +0 -69
- package/src/stories/InputText/InputText.stories.mdx +0 -211
- package/src/stories/InputText/InputTextIconPosition.stories.mdx +0 -78
- package/src/stories/InputText/InputTextLength.stories.mdx +0 -110
- package/src/stories/InputText/InputTextMinMax.stories.mdx +0 -112
- package/src/stories/InputText/InputTextSlots.stories.mdx +0 -69
- package/src/stories/InputText/InputTextType.stories.mdx +0 -259
- package/src/stories/Nav/Nav.stories.mdx +0 -28
- package/src/stories/Nav/NavModifiers.stories.mdx +0 -48
- package/src/stories/Progress/Progress.stories.mdx +0 -30
- package/src/stories/Radio/Radio.stories.mdx +0 -128
- package/src/stories/Radio/RadioSlots.stories.mdx +0 -46
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +0 -135
- package/src/stories/RadioGroup/RadioGroupOptions.stories.mdx +0 -100
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +0 -68
- package/src/stories/Select/Select.stories.mdx +0 -196
- package/src/stories/Select/SelectIconPosition.stories.mdx +0 -78
- package/src/stories/Select/SelectOptions.stories.mdx +0 -135
- package/src/stories/Select/SelectSlots.stories.mdx +0 -48
- package/src/stories/Tab/Tab.stories.mdx +0 -65
- package/src/stories/Textarea/Textarea.stories.mdx +0 -187
- package/src/stories/Textarea/TextareaLength.stories.mdx +0 -110
- package/src/stories/Textarea/TextareaSlots.stories.mdx +0 -69
- package/src/stories/Textarea/TextareatIconPosition.stories.mdx +0 -78
- package/src/stories/Tooltip/Tooltip.stories.mdx +0 -102
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +0 -99
|
@@ -1,8 +1,227 @@
|
|
|
1
1
|
import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
var Side = /* @__PURE__ */ ((Side2) => {
|
|
3
|
+
Side2["left"] = "left";
|
|
4
|
+
Side2["right"] = "right";
|
|
5
|
+
Side2["top"] = "top";
|
|
6
|
+
Side2["bottom"] = "bottom";
|
|
7
|
+
return Side2;
|
|
8
|
+
})(Side || {});
|
|
9
|
+
var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
10
|
+
Placement2["topStart"] = "top-start";
|
|
11
|
+
Placement2["topEnd"] = "top-end";
|
|
12
|
+
Placement2["bottomStart"] = "bottom-start";
|
|
13
|
+
Placement2["bottomEnd"] = "bottom-end";
|
|
14
|
+
Placement2["leftStart"] = "left-start";
|
|
15
|
+
Placement2["leftEnd"] = "left-end";
|
|
16
|
+
Placement2["rightStart"] = "right-start";
|
|
17
|
+
Placement2["rightEnd"] = "right-end";
|
|
18
|
+
return Placement2;
|
|
19
|
+
})(Placement || {});
|
|
20
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
21
|
+
Position2["before"] = "before";
|
|
22
|
+
Position2["after"] = "after";
|
|
23
|
+
return Position2;
|
|
24
|
+
})(Position || {});
|
|
25
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
26
|
+
ButtonType2["button"] = "button";
|
|
27
|
+
ButtonType2["submit"] = "submit";
|
|
28
|
+
ButtonType2["reset"] = "reset";
|
|
29
|
+
return ButtonType2;
|
|
30
|
+
})(ButtonType || {});
|
|
31
|
+
var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
|
|
32
|
+
AnchorTarget2["_blank"] = "_blank";
|
|
33
|
+
AnchorTarget2["_self"] = "_self";
|
|
34
|
+
AnchorTarget2["_parent"] = "_parent";
|
|
35
|
+
AnchorTarget2["_top"] = "_top";
|
|
36
|
+
return AnchorTarget2;
|
|
37
|
+
})(AnchorTarget || {});
|
|
38
|
+
const LinkProps = {
|
|
39
|
+
/**
|
|
40
|
+
* The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
|
|
41
|
+
* @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
|
|
42
|
+
*/
|
|
43
|
+
to: {
|
|
44
|
+
type: [String, Object]
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Anchor href
|
|
48
|
+
*/
|
|
49
|
+
href: String,
|
|
50
|
+
/**
|
|
51
|
+
* Anchor target
|
|
52
|
+
*/
|
|
53
|
+
target: {
|
|
54
|
+
type: String,
|
|
55
|
+
validator: (value) => Object.values(AnchorTarget).includes(value)
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Anchor rel
|
|
59
|
+
*/
|
|
60
|
+
rel: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "noopener noreferrer"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const DisabledProps = {
|
|
66
|
+
/**
|
|
67
|
+
* Whether the form control is disabled
|
|
68
|
+
*/
|
|
69
|
+
disabled: Boolean
|
|
70
|
+
};
|
|
71
|
+
const ActiveProps = {
|
|
72
|
+
/**
|
|
73
|
+
* Whether the item is active
|
|
74
|
+
*/
|
|
75
|
+
active: Boolean
|
|
76
|
+
};
|
|
77
|
+
const PressedProps = {
|
|
78
|
+
/**
|
|
79
|
+
* Whether the item is pressed
|
|
80
|
+
*/
|
|
81
|
+
pressed: Boolean
|
|
82
|
+
};
|
|
83
|
+
const LabelProps = {
|
|
84
|
+
/**
|
|
85
|
+
* The item label
|
|
86
|
+
*/
|
|
87
|
+
label: [String, Number]
|
|
88
|
+
};
|
|
89
|
+
const ModifiersProps = {
|
|
90
|
+
/**
|
|
91
|
+
* Component BEM modifiers
|
|
92
|
+
*/
|
|
4
93
|
modifiers: [String, Array]
|
|
5
94
|
};
|
|
95
|
+
({
|
|
96
|
+
/**
|
|
97
|
+
* VvIcon name or props
|
|
98
|
+
* @see VVIcon
|
|
99
|
+
*/
|
|
100
|
+
icon: { type: [String, Object] },
|
|
101
|
+
/**
|
|
102
|
+
* VvIcon position
|
|
103
|
+
*/
|
|
104
|
+
iconPosition: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: Position.before,
|
|
107
|
+
validation: (value) => Object.values(Position).includes(value)
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
({
|
|
111
|
+
/**
|
|
112
|
+
* Dropdown placement
|
|
113
|
+
*/
|
|
114
|
+
placement: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: Side.bottom,
|
|
117
|
+
validator: (value) => {
|
|
118
|
+
return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* Dropdown strategy
|
|
123
|
+
*/
|
|
124
|
+
strategy: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: "absolute",
|
|
127
|
+
validator: (value) => {
|
|
128
|
+
return ["fixed", "absolute"].includes(value);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Dropdown show / hide transition name
|
|
133
|
+
*/
|
|
134
|
+
transitionName: {
|
|
135
|
+
type: String
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Offset of the dropdown from the trigger
|
|
139
|
+
* @see https://floating-ui.com/docs/offset
|
|
140
|
+
*/
|
|
141
|
+
offset: {
|
|
142
|
+
type: [Number, String, Object],
|
|
143
|
+
default: 0
|
|
144
|
+
},
|
|
145
|
+
/**
|
|
146
|
+
* Move dropdown to the side if there is no space in the default position
|
|
147
|
+
* @see https://floating-ui.com/docs/shift
|
|
148
|
+
*/
|
|
149
|
+
shift: {
|
|
150
|
+
type: [Boolean, Object],
|
|
151
|
+
default: false
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Flip dropdown position if there is no space in the default position
|
|
155
|
+
* @see https://floating-ui.com/docs/flip
|
|
156
|
+
*/
|
|
157
|
+
flip: {
|
|
158
|
+
type: [Boolean, Object],
|
|
159
|
+
default: true
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Size of the dropdown
|
|
163
|
+
* @see https://floating-ui.com/docs/size
|
|
164
|
+
*/
|
|
165
|
+
size: {
|
|
166
|
+
type: [Boolean, Object],
|
|
167
|
+
default: () => ({ padding: 10 })
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Automatically change the position of the dropdown
|
|
171
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
172
|
+
*/
|
|
173
|
+
autoPlacement: {
|
|
174
|
+
type: [Boolean, Object],
|
|
175
|
+
default: false
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
* Add arrow to the dropdown
|
|
179
|
+
* @see https://floating-ui.com/docs/arrow
|
|
180
|
+
*/
|
|
181
|
+
arrow: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: false
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Keep open dropdown on click outside
|
|
187
|
+
*/
|
|
188
|
+
keepOpen: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
default: false
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* Autofocus first item on dropdown open
|
|
194
|
+
*/
|
|
195
|
+
autofocusFirst: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: true
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* Set dropdown width to the same as the trigger
|
|
201
|
+
*/
|
|
202
|
+
triggerWidth: {
|
|
203
|
+
type: Boolean
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
({
|
|
207
|
+
...DisabledProps,
|
|
208
|
+
...LabelProps,
|
|
209
|
+
...PressedProps,
|
|
210
|
+
...ActiveProps,
|
|
211
|
+
...LinkProps,
|
|
212
|
+
/**
|
|
213
|
+
* Button type
|
|
214
|
+
*/
|
|
215
|
+
type: {
|
|
216
|
+
type: String,
|
|
217
|
+
default: ButtonType.button,
|
|
218
|
+
validator: (value) => Object.values(ButtonType).includes(value)
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
const VvCardProps = {
|
|
222
|
+
...ModifiersProps,
|
|
223
|
+
title: String
|
|
224
|
+
};
|
|
6
225
|
function useModifiers(prefix, modifiers, others) {
|
|
7
226
|
return computed(() => {
|
|
8
227
|
const toReturn = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCard=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{});Boolean,Boolean,Boolean;const r={modifiers:[String,Array]};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button;const l={...r,title:String};const a={key:0,class:"vv-card__header"},s={key:1,class:"vv-card__content"},c={key:2,class:"vv-card__footer"};return e.defineComponent({name:"VvCard",props:l,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-card",n);return(o,t)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass(e.unref(r))},[o.$slots.header||o.title?(e.openBlock(),e.createElementBlock("header",a,[e.renderSlot(o.$slots,"header",{},(()=>[e.createTextVNode(e.toDisplayString(o.title),1)]))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default"),o.$slots.content?(e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(o.$slots,"content")])):e.createCommentVNode("",!0),o.$slots.footer?(e.openBlock(),e.createElementBlock("footer",c,[e.renderSlot(o.$slots,"footer")])):e.createCommentVNode("",!0)],2))}})}));
|
|
@@ -4,11 +4,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
4
4
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5
5
|
title: StringConstructor;
|
|
6
6
|
modifiers: globalThis.PropType<string | string[]>;
|
|
7
|
-
}>>, {}>, {
|
|
8
|
-
header
|
|
9
|
-
default
|
|
10
|
-
content
|
|
11
|
-
footer
|
|
7
|
+
}>>, {}, {}>, {
|
|
8
|
+
header?(_: {}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
content?(_: {}): any;
|
|
11
|
+
footer?(_: {}): any;
|
|
12
12
|
}>;
|
|
13
13
|
export default _default;
|
|
14
14
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { unref, inject, computed, toRef, toRefs,
|
|
2
|
-
import { toReactive } from "@vueuse/core";
|
|
1
|
+
import { unref, inject, computed, toRef, toRefs, defineComponent, h, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, isRef, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
|
|
3
2
|
import { nanoid } from "nanoid";
|
|
4
3
|
var Side = /* @__PURE__ */ ((Side2) => {
|
|
5
4
|
Side2["left"] = "left";
|
|
@@ -85,6 +84,19 @@ const InvalidProps = {
|
|
|
85
84
|
*/
|
|
86
85
|
invalidLabel: [String, Array]
|
|
87
86
|
};
|
|
87
|
+
const LoadingProps = {
|
|
88
|
+
/**
|
|
89
|
+
* Loading status
|
|
90
|
+
*/
|
|
91
|
+
loading: Boolean,
|
|
92
|
+
/**
|
|
93
|
+
* Loading label
|
|
94
|
+
*/
|
|
95
|
+
loadingLabel: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "Loading..."
|
|
98
|
+
}
|
|
99
|
+
};
|
|
88
100
|
const DisabledProps = {
|
|
89
101
|
/**
|
|
90
102
|
* Whether the form control is disabled
|
|
@@ -229,11 +241,11 @@ const IdProps = {
|
|
|
229
241
|
default: false
|
|
230
242
|
},
|
|
231
243
|
/**
|
|
232
|
-
*
|
|
244
|
+
* Keep open dropdown on click outside
|
|
233
245
|
*/
|
|
234
|
-
|
|
246
|
+
keepOpen: {
|
|
235
247
|
type: Boolean,
|
|
236
|
-
default:
|
|
248
|
+
default: false
|
|
237
249
|
},
|
|
238
250
|
/**
|
|
239
251
|
* Autofocus first item on dropdown open
|
|
@@ -268,6 +280,7 @@ const CheckboxRadioProps = {
|
|
|
268
280
|
...ReadonlyProps,
|
|
269
281
|
...ModifiersProps,
|
|
270
282
|
...LabelProps,
|
|
283
|
+
...LoadingProps,
|
|
271
284
|
/**
|
|
272
285
|
* Input value
|
|
273
286
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
@@ -460,111 +473,114 @@ function useGroupProps(props, emit) {
|
|
|
460
473
|
disabled
|
|
461
474
|
};
|
|
462
475
|
}
|
|
463
|
-
function joinLines(
|
|
464
|
-
if (Array.isArray(
|
|
465
|
-
return
|
|
476
|
+
function joinLines(items) {
|
|
477
|
+
if (Array.isArray(items)) {
|
|
478
|
+
return items.filter((item) => isString(item)).join(" ");
|
|
466
479
|
}
|
|
467
|
-
return
|
|
480
|
+
return items;
|
|
468
481
|
}
|
|
469
|
-
function HintSlotFactory(
|
|
470
|
-
const
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
valid,
|
|
480
|
-
validLabel,
|
|
481
|
-
invalid,
|
|
482
|
-
invalidLabel,
|
|
483
|
-
...otherProps
|
|
484
|
-
} = toRefs(parentProps);
|
|
485
|
-
const loading = resolveFieldData(otherProps, "loading");
|
|
486
|
-
const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
|
|
487
|
-
const hasInvalid = computed(() => {
|
|
488
|
-
if (!invalid.value) {
|
|
489
|
-
return false;
|
|
490
|
-
}
|
|
491
|
-
if (invalid.value && invalidSlot) {
|
|
492
|
-
return true;
|
|
493
|
-
}
|
|
494
|
-
if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
|
|
495
|
-
return true;
|
|
496
|
-
}
|
|
497
|
-
if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
|
|
498
|
-
return true;
|
|
499
|
-
}
|
|
500
|
-
return false;
|
|
501
|
-
});
|
|
502
|
-
const hasHint = computed(
|
|
503
|
-
() => !!(hintLabel && hintLabel.value || hintSlot)
|
|
482
|
+
function HintSlotFactory(props, slots) {
|
|
483
|
+
const invalidLabel = computed(() => joinLines(props.invalidLabel));
|
|
484
|
+
const validLabel = computed(() => joinLines(props.validLabel));
|
|
485
|
+
const loadingLabel = computed(() => props.loadingLabel);
|
|
486
|
+
const hintLabel = computed(() => props.hintLabel);
|
|
487
|
+
const hasLoadingLabelOrSlot = computed(
|
|
488
|
+
() => Boolean(props.loading && (slots.loading || loadingLabel.value))
|
|
489
|
+
);
|
|
490
|
+
const hasInvalidLabelOrSlot = computed(
|
|
491
|
+
() => !hasLoadingLabelOrSlot.value && Boolean(props.invalid && (slots.invalid || invalidLabel.value))
|
|
504
492
|
);
|
|
505
|
-
const
|
|
506
|
-
() =>
|
|
493
|
+
const hasValidLabelOrSlot = computed(
|
|
494
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && Boolean(props.valid && (slots.valid || validLabel.value))
|
|
507
495
|
);
|
|
508
|
-
const
|
|
509
|
-
() =>
|
|
496
|
+
const hasHintLabelOrSlot = computed(
|
|
497
|
+
() => !hasLoadingLabelOrSlot.value && !hasInvalidLabelOrSlot.value && !hasValidLabelOrSlot.value && Boolean(slots.hint || hintLabel.value)
|
|
510
498
|
);
|
|
511
499
|
const isVisible = computed(
|
|
512
|
-
() =>
|
|
500
|
+
() => hasInvalidLabelOrSlot.value || hasValidLabelOrSlot.value || hasLoadingLabelOrSlot.value || hasHintLabelOrSlot.value
|
|
513
501
|
);
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
502
|
+
const hintSlotScope = computed(() => ({
|
|
503
|
+
modelValue: props.modelValue,
|
|
504
|
+
valid: props.valid,
|
|
505
|
+
invalid: props.invalid,
|
|
506
|
+
loading: props.loading
|
|
507
|
+
}));
|
|
508
|
+
const HintSlot = defineComponent({
|
|
509
|
+
name: "HintSlot",
|
|
510
|
+
props: {
|
|
511
|
+
tag: {
|
|
512
|
+
type: String,
|
|
513
|
+
default: "small"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
setup() {
|
|
517
|
+
return {
|
|
518
|
+
isVisible,
|
|
519
|
+
invalidLabel,
|
|
520
|
+
validLabel,
|
|
521
|
+
loadingLabel,
|
|
522
|
+
hintLabel,
|
|
523
|
+
hasInvalidLabelOrSlot,
|
|
524
|
+
hasValidLabelOrSlot,
|
|
525
|
+
hasLoadingLabelOrSlot,
|
|
526
|
+
hasHintLabelOrSlot
|
|
527
|
+
};
|
|
528
|
+
},
|
|
529
|
+
render() {
|
|
530
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
531
|
+
if (this.isVisible) {
|
|
532
|
+
let role;
|
|
533
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
534
|
+
role = "alert";
|
|
525
535
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
hintLabel,
|
|
531
|
-
modelValue,
|
|
532
|
-
valid,
|
|
533
|
-
validLabel,
|
|
534
|
-
invalid,
|
|
535
|
-
invalidLabel,
|
|
536
|
-
loading,
|
|
537
|
-
loadingLabel,
|
|
538
|
-
...props.params
|
|
539
|
-
});
|
|
540
|
-
if (invalid == null ? void 0 : invalid.value) {
|
|
541
|
-
return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
542
|
-
}
|
|
543
|
-
if (valid == null ? void 0 : valid.value)
|
|
544
|
-
return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
545
|
-
if (loading == null ? void 0 : loading.value)
|
|
546
|
-
return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
547
|
-
return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
|
|
548
|
-
});
|
|
549
|
-
return {
|
|
550
|
-
isVisible,
|
|
551
|
-
hasInvalid,
|
|
552
|
-
hasValid,
|
|
553
|
-
hintContent
|
|
554
|
-
};
|
|
555
|
-
},
|
|
556
|
-
render() {
|
|
557
|
-
if (this.isVisible) {
|
|
536
|
+
if (this.hasValidLabelOrSlot) {
|
|
537
|
+
role = "status";
|
|
538
|
+
}
|
|
539
|
+
if (this.hasLoadingLabelOrSlot) {
|
|
558
540
|
return h(
|
|
559
|
-
|
|
541
|
+
this.tag,
|
|
560
542
|
{
|
|
561
|
-
role
|
|
543
|
+
role
|
|
562
544
|
},
|
|
563
|
-
this.
|
|
545
|
+
((_b = (_a = this.$slots).loading) == null ? void 0 : _b.call(_a)) ?? this.loadingLabel
|
|
564
546
|
);
|
|
565
547
|
}
|
|
548
|
+
if (this.hasInvalidLabelOrSlot) {
|
|
549
|
+
return h(
|
|
550
|
+
this.tag,
|
|
551
|
+
{
|
|
552
|
+
role
|
|
553
|
+
},
|
|
554
|
+
((_d = (_c = this.$slots).invalid) == null ? void 0 : _d.call(_c)) ?? this.$slots.invalid ?? this.invalidLabel
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
if (this.hasValidLabelOrSlot) {
|
|
558
|
+
return h(
|
|
559
|
+
this.tag,
|
|
560
|
+
{
|
|
561
|
+
role
|
|
562
|
+
},
|
|
563
|
+
((_f = (_e = this.$slots).valid) == null ? void 0 : _f.call(_e)) ?? this.validLabel
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
return h(
|
|
567
|
+
this.tag,
|
|
568
|
+
{
|
|
569
|
+
role
|
|
570
|
+
},
|
|
571
|
+
((_h = (_g = this.$slots).hint) == null ? void 0 : _h.call(_g)) ?? this.$slots.hint ?? this.hintLabel
|
|
572
|
+
);
|
|
566
573
|
}
|
|
574
|
+
return null;
|
|
567
575
|
}
|
|
576
|
+
});
|
|
577
|
+
return {
|
|
578
|
+
hasInvalidLabelOrSlot,
|
|
579
|
+
hasHintLabelOrSlot,
|
|
580
|
+
hasValidLabelOrSlot,
|
|
581
|
+
hasLoadingLabelOrSlot,
|
|
582
|
+
hintSlotScope,
|
|
583
|
+
HintSlot
|
|
568
584
|
};
|
|
569
585
|
}
|
|
570
586
|
const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
|
|
@@ -592,7 +608,7 @@ function useModifiers(prefix, modifiers, others) {
|
|
|
592
608
|
});
|
|
593
609
|
}
|
|
594
610
|
const _hoisted_1 = ["for"];
|
|
595
|
-
const _hoisted_2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"];
|
|
611
|
+
const _hoisted_2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid", "aria-describedby", "aria-errormessage"];
|
|
596
612
|
const __default__ = {
|
|
597
613
|
name: "VvCheckbox"
|
|
598
614
|
};
|
|
@@ -615,6 +631,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
615
631
|
isInGroup
|
|
616
632
|
} = useGroupProps(props, emit);
|
|
617
633
|
const hasId = useUniqueId(id);
|
|
634
|
+
const hasHintId = computed(() => `${hasId.value}-hint`);
|
|
618
635
|
const tabindex = computed(() => isDisabled.value ? -1 : props.tabindex);
|
|
619
636
|
const input = ref();
|
|
620
637
|
const isBinary = computed(
|
|
@@ -709,7 +726,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
709
726
|
input.value.indeterminate = true;
|
|
710
727
|
}
|
|
711
728
|
});
|
|
712
|
-
const {
|
|
729
|
+
const {
|
|
730
|
+
HintSlot,
|
|
731
|
+
hasHintLabelOrSlot,
|
|
732
|
+
hasInvalidLabelOrSlot,
|
|
733
|
+
hintSlotScope
|
|
734
|
+
} = HintSlotFactory(props, slots);
|
|
713
735
|
return (_ctx, _cache) => {
|
|
714
736
|
return openBlock(), createElementBlock("label", {
|
|
715
737
|
class: normalizeClass(unref(bemCssClasses)),
|
|
@@ -726,7 +748,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
726
748
|
disabled: unref(isDisabled),
|
|
727
749
|
value: unref(hasValue),
|
|
728
750
|
tabindex: unref(tabindex),
|
|
729
|
-
"aria-invalid": unref(isInvalid)
|
|
751
|
+
"aria-invalid": unref(isInvalid),
|
|
752
|
+
"aria-describedby": unref(hasHintLabelOrSlot) ? unref(hasHintId) : void 0,
|
|
753
|
+
"aria-errormessage": unref(hasInvalidLabelOrSlot) ? unref(hasHintId) : void 0
|
|
730
754
|
}, null, 8, _hoisted_2), [
|
|
731
755
|
[vModelCheckbox, unref(localModelValue)]
|
|
732
756
|
]),
|
|
@@ -734,9 +758,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
734
758
|
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
735
759
|
]),
|
|
736
760
|
createVNode(unref(HintSlot), {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
},
|
|
761
|
+
id: unref(hasHintId),
|
|
762
|
+
class: "vv-checkbox__hint"
|
|
763
|
+
}, createSlots({ _: 2 }, [
|
|
764
|
+
_ctx.$slots.hint ? {
|
|
765
|
+
name: "hint",
|
|
766
|
+
fn: withCtx(() => [
|
|
767
|
+
renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
768
|
+
]),
|
|
769
|
+
key: "0"
|
|
770
|
+
} : void 0,
|
|
771
|
+
_ctx.$slots.loading ? {
|
|
772
|
+
name: "loading",
|
|
773
|
+
fn: withCtx(() => [
|
|
774
|
+
renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
775
|
+
]),
|
|
776
|
+
key: "1"
|
|
777
|
+
} : void 0,
|
|
778
|
+
_ctx.$slots.valid ? {
|
|
779
|
+
name: "valid",
|
|
780
|
+
fn: withCtx(() => [
|
|
781
|
+
renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
782
|
+
]),
|
|
783
|
+
key: "2"
|
|
784
|
+
} : void 0,
|
|
785
|
+
_ctx.$slots.invalid ? {
|
|
786
|
+
name: "invalid",
|
|
787
|
+
fn: withCtx(() => [
|
|
788
|
+
renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
|
|
789
|
+
]),
|
|
790
|
+
key: "3"
|
|
791
|
+
} : void 0
|
|
792
|
+
]), 1032, ["id"])
|
|
740
793
|
], 10, _hoisted_1);
|
|
741
794
|
};
|
|
742
795
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("
|
|
1
|
+
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?module.exports=l(require("vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","nanoid"],l):(e="undefined"!=typeof globalThis?globalThis:e||self).VvCheckbox=l(e.vue,e.nanoid)}(this,(function(e,l){"use strict";var a=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(a||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{});const o=Symbol.for("checkGroup"),i={valid:Boolean,validLabel:[String,Array]},r={invalid:Boolean,invalidLabel:[String,Array]},u={loading:Boolean,loadingLabel:{type:String,default:"Loading..."}},d={disabled:Boolean},s=(Boolean,Boolean,{label:[String,Number]}),v={readonly:Boolean},c={modifiers:[String,Array]},f={hintLabel:{type:String,default:""}};t.before;const h={tabindex:{type:[String,Number],default:0}},b={id:[String,Number]};a.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const p={...{...b,name:{type:String,required:!0}},...h,...i,...r,...f,...d,...v,...c,...s,...u,value:[String,Number,Boolean],modelValue:[Object,Number,Boolean,String]};function m(e,l,a){return a?y(e,a)===y(l,a):g(e,l)}function g(e,l){if(e===l)return!0;if(e&&l&&"object"==typeof e&&"object"==typeof l){const a=Array.isArray(e),t=Array.isArray(l);let n,o,i;if(a&&t){if(o=e.length,o!=l.length)return!1;for(n=o;0!=n--;)if(!g(e[n],l[n]))return!1;return!0}if(a!=t)return!1;const r=e instanceof Date,u=l instanceof Date;if(r!=u)return!1;if(r&&u)return e.getTime()==l.getTime();const d=e instanceof RegExp,s=l instanceof RegExp;if(d!=s)return!1;if(d&&s)return e.toString()==l.toString();const v=Object.keys(e);if(o=v.length,o!==Object.keys(l).length)return!1;for(n=o;0!=n--;)if(!Object.prototype.hasOwnProperty.call(l,v[n]))return!1;for(n=o;0!=n--;)if(i=v[n],!g(e[i],l[i]))return!1;return!0}return e!=e&&l!=l}function y(e,l){if(e&&Object.keys(e).length&&l){if(-1===l.indexOf("."))return e[l];{const a=l.split(".");let t=e;for(let l=0,n=a.length;l<n;++l){if(null==e)return null;t=t[a[l]]}return t}}return null}function S(l){const a=e.inject(l,void 0),t=e.computed((()=>{return l=a,!(null==(t=e.unref(l))||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length);var l,t}));return{group:a,isInGroup:t,getGroupOrLocalRef:function(l,t,n){if(null==a?void 0:a.value){const t=e.unref(a.value)[l];return e.computed({get:()=>null==t?void 0:t.value,set(e){t.value=e}})}const o=e.toRef(t,l);return e.computed({get:()=>o.value,set(e){n&&n(`update:${l}`,e)}})}}}n.button;const L={...p,...c,indeterminate:Boolean,uncheckedValue:[String,Number,Boolean],switch:Boolean};function B(e){return Array.isArray(e)?e.filter((e=>{return"string"==typeof(l=e)||l instanceof String;var l})).join(" "):e}const k=["for"],O=["id","name","disabled","value","tabindex","aria-invalid","aria-describedby","aria-errormessage"];return e.defineComponent({name:"VvCheckbox",props:L,emits:["click","update:modelValue","change","blur"],setup(a,{emit:t}){const n=a,i=e.useSlots(),{id:r,disabled:u,readonly:d,valid:s,invalid:v,propsSwitch:c,modelValue:f,indeterminate:h,isInGroup:b}=function(l,a){const{group:t,isInGroup:n,getGroupOrLocalRef:i}=S(o),{id:r,switch:u,indeterminate:d}=e.toRefs(l),s=i("modelValue",l,a),v=i("valid",l),c=i("invalid",l),f=e.computed((()=>{var e;return Boolean(l.readonly||(null==(e=null==t?void 0:t.value)?void 0:e.readonly.value))})),h=e.computed((()=>{var e;return Boolean(l.disabled||(null==(e=null==t?void 0:t.value)?void 0:e.disabled.value))}));return{id:r,propsSwitch:u,indeterminate:d,group:t,isInGroup:n,modelValue:s,valid:v,invalid:c,readonly:f,disabled:h}}(n,t),p=(a=>e.computed((()=>String((null==a?void 0:a.value)||l.nanoid()))))(r),g=e.computed((()=>`${p.value}-hint`)),y=e.computed((()=>x.value?-1:n.tabindex)),L=e.ref(),V=e.computed((()=>void 0!==n.uncheckedValue&&!b.value)),x=e.computed((()=>u.value||d.value)),A=e.computed((()=>!0===v.value||!0!==s.value&&void 0)),$=e.computed((()=>V.value?f.value===n.value:Array.isArray(f.value)?function(e,l){if(null!=e&&l&&l.length)for(const a of l)if(m(e,a))return!0;return!1}(n.value,f.value):m(n.value,f.value))),w=e.computed((()=>!!h.value||!($.value||!V.value||n.uncheckedValue===f.value))),j=e.computed((()=>{if(!V.value)return!["string","number","boolean"].includes(typeof n.value)||n.value})),R=e.computed({get:()=>$.value,set(e){if(V.value)f.value=e?n.value:n.uncheckedValue;else if(Array.isArray(f.value)||b.value){const l=new Set(Array.isArray(f.value)?f.value:void 0!==f.value?[f.value]:[]);e?l.add(n.value):l.delete(n.value),f.value=[...l]}else f.value=e?n.value:void 0;t("change",e)}}),{modifiers:C}=e.toRefs(n),I=function(l,a,t){return e.computed((()=>{const n={[l]:!0},o="string"==typeof(null==a?void 0:a.value)?a.value.split(" "):null==a?void 0:a.value;return o&&Array.isArray(o)&&o.forEach((e=>{e&&(n[`${l}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((a=>{n[`${l}--${a}`]=e.unref(t.value[a])})),n}))}("vv-checkbox",C,e.computed((()=>({switch:c.value,valid:s.value,invalid:v.value,disabled:u.value,readonly:d.value,indeterminate:h.value}))));e.watchEffect((()=>{V.value&&Array.isArray(f.value)&&console.warn("[VvCheckbox] The model value is an array but the component is in binary mode.")})),e.watch((()=>w.value),(e=>{L.value.indeterminate=!!e})),e.onMounted((()=>{w.value&&(L.value.indeterminate=!0)}));const{HintSlot:N,hasHintLabelOrSlot:P,hasInvalidLabelOrSlot:E,hintSlotScope:G}=function(l,a){const t=e.computed((()=>B(l.invalidLabel))),n=e.computed((()=>B(l.validLabel))),o=e.computed((()=>l.loadingLabel)),i=e.computed((()=>l.hintLabel)),r=e.computed((()=>Boolean(l.loading&&(a.loading||o.value)))),u=e.computed((()=>!r.value&&Boolean(l.invalid&&(a.invalid||t.value)))),d=e.computed((()=>!r.value&&!u.value&&Boolean(l.valid&&(a.valid||n.value)))),s=e.computed((()=>!r.value&&!u.value&&!d.value&&Boolean(a.hint||i.value))),v=e.computed((()=>u.value||d.value||r.value||s.value)),c=e.computed((()=>({modelValue:l.modelValue,valid:l.valid,invalid:l.invalid,loading:l.loading}))),f=e.defineComponent({name:"HintSlot",props:{tag:{type:String,default:"small"}},setup:()=>({isVisible:v,invalidLabel:t,validLabel:n,loadingLabel:o,hintLabel:i,hasInvalidLabelOrSlot:u,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:r,hasHintLabelOrSlot:s}),render(){var l,a,t,n,o,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==(a=(l=this.$slots).loading)?void 0:a.call(l))??this.loadingLabel):this.hasInvalidLabelOrSlot?e.h(this.tag,{role:d},(null==(n=(t=this.$slots).invalid)?void 0:n.call(t))??this.$slots.invalid??this.invalidLabel):this.hasValidLabelOrSlot?e.h(this.tag,{role:d},(null==(i=(o=this.$slots).valid)?void 0:i.call(o))??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:u,hasHintLabelOrSlot:s,hasValidLabelOrSlot:d,hasLoadingLabelOrSlot:r,hintSlotScope:c,HintSlot:f}}(n,i);return(l,a)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(I)),for:e.unref(p)},[e.withDirectives(e.createElementVNode("input",{id:e.unref(p),ref_key:"input",ref:L,"onUpdate:modelValue":a[0]||(a[0]=l=>e.isRef(R)?R.value=l:null),type:"checkbox",class:"vv-checkbox__input",name:l.name,disabled:e.unref(x),value:e.unref(j),tabindex:e.unref(y),"aria-invalid":e.unref(A),"aria-describedby":e.unref(P)?e.unref(g):void 0,"aria-errormessage":e.unref(E)?e.unref(g):void 0},null,8,O),[[e.vModelCheckbox,e.unref(R)]]),e.renderSlot(l.$slots,"default",{value:e.unref(f)},(()=>[e.createTextVNode(e.toDisplayString(l.label),1)])),e.createVNode(e.unref(N),{id:e.unref(g),class:"vv-checkbox__hint"},e.createSlots({_:2},[l.$slots.hint?{name:"hint",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"hint",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"0"}:void 0,l.$slots.loading?{name:"loading",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"loading",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"1"}:void 0,l.$slots.valid?{name:"valid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"valid",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"2"}:void 0,l.$slots.invalid?{name:"invalid",fn:e.withCtx((()=>[e.renderSlot(l.$slots,"invalid",e.normalizeProps(e.guardReactiveProps(e.unref(G))))])),key:"3"}:void 0]),1032,["id"])],10,k))}})}));
|