@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,10 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Ref } from 'vue'
|
|
2
2
|
import type { AccordionGroupState } from '../../types/group'
|
|
3
3
|
import { INJECTION_KEY_ACCORDION_GROUP } from '../../constants'
|
|
4
|
+
import { ModifiersProps } from '@/props'
|
|
4
5
|
|
|
5
6
|
export const VvAccordionProps = {
|
|
7
|
+
...ModifiersProps,
|
|
6
8
|
/**
|
|
7
9
|
* Accordion name
|
|
8
10
|
*/
|
|
@@ -22,10 +24,6 @@ export const VvAccordionProps = {
|
|
|
22
24
|
type: Boolean,
|
|
23
25
|
default: undefined,
|
|
24
26
|
},
|
|
25
|
-
/**
|
|
26
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
27
|
-
*/
|
|
28
|
-
modifiers: [String, Array] as PropType<string | string[]>,
|
|
29
27
|
/**
|
|
30
28
|
* If true, the accordion will be disabled
|
|
31
29
|
*/
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ModifiersProps } from '@/props'
|
|
2
|
+
|
|
1
3
|
export interface VvAccordionGroupItem {
|
|
2
4
|
title: string
|
|
3
5
|
content: string
|
|
@@ -7,6 +9,7 @@ export interface VvAccordionGroupItem {
|
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export const VvAccordionGroupProps = {
|
|
12
|
+
...ModifiersProps,
|
|
10
13
|
/**
|
|
11
14
|
* VModel
|
|
12
15
|
*/
|
|
@@ -23,10 +26,6 @@ export const VvAccordionGroupProps = {
|
|
|
23
26
|
* If true, accordion items stay open when another item is opened
|
|
24
27
|
*/
|
|
25
28
|
collapse: Boolean,
|
|
26
|
-
/**
|
|
27
|
-
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion-group--'
|
|
28
|
-
*/
|
|
29
|
-
modifiers: [String, Array] as PropType<string | string[]>,
|
|
30
29
|
/**
|
|
31
30
|
* String or String[] of css classes (modifiers) that will be concatenated to prefix 'vv-accordion--'
|
|
32
31
|
*/
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'VvAlert',
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import VvIcon from '../VvIcon/VvIcon.vue'
|
|
9
|
+
import { useVvAlert, VvAlertEvents, VvAlertProps } from '.'
|
|
10
|
+
|
|
11
|
+
const props = defineProps(VvAlertProps)
|
|
12
|
+
const emit = defineEmits(VvAlertEvents)
|
|
13
|
+
const { hasProps, hasTitleId, hasIcon, close } = useVvAlert(props, emit)
|
|
14
|
+
defineExpose({ close })
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div v-bind="hasProps">
|
|
19
|
+
<div class="vv-alert__header">
|
|
20
|
+
<VvIcon v-if="hasIcon" v-bind="hasIcon" class="vv-alert__icon" />
|
|
21
|
+
<!-- @slot Header slot -->
|
|
22
|
+
<slot name="header">
|
|
23
|
+
<!-- @slot Before title slot -->
|
|
24
|
+
<slot name="title::before" />
|
|
25
|
+
<strong :id="hasTitleId" class="vv-alert__title">
|
|
26
|
+
{{ title }}
|
|
27
|
+
</strong>
|
|
28
|
+
<!-- @slot After title slot -->
|
|
29
|
+
<slot name="title::after" />
|
|
30
|
+
</slot>
|
|
31
|
+
<button
|
|
32
|
+
v-if="dismissable || autoClose"
|
|
33
|
+
class="vv-alert__close"
|
|
34
|
+
type="button"
|
|
35
|
+
:aria-label="closeLabel"
|
|
36
|
+
@click.stop="close"
|
|
37
|
+
>
|
|
38
|
+
<div class="vv-alert__close-mask"></div>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
<div v-if="$slots.default || content" class="vv-alert__content">
|
|
42
|
+
<!-- @slot Content slot -->
|
|
43
|
+
<slot>
|
|
44
|
+
{{ content }}
|
|
45
|
+
</slot>
|
|
46
|
+
</div>
|
|
47
|
+
<div v-if="$slots.footer || footer" class="vv-alert__footer">
|
|
48
|
+
<!-- @slot Footer slot -->
|
|
49
|
+
<slot name="footer">
|
|
50
|
+
{{ footer }}
|
|
51
|
+
</slot>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { IconProps, IdProps, ModifiersProps } from '@/props'
|
|
2
|
+
import type { ExtractPropTypes, PropType } from 'vue'
|
|
3
|
+
import { withModifiers } from 'vue'
|
|
4
|
+
|
|
5
|
+
export const VvAlertProps = {
|
|
6
|
+
...IdProps,
|
|
7
|
+
...ModifiersProps,
|
|
8
|
+
...IconProps,
|
|
9
|
+
/**
|
|
10
|
+
* The alert is dismissable
|
|
11
|
+
* @default false
|
|
12
|
+
* @type boolean
|
|
13
|
+
*/
|
|
14
|
+
dismissable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* The alert auto close after the specified time in milliseconds
|
|
20
|
+
* @default 0
|
|
21
|
+
* @type number
|
|
22
|
+
*/
|
|
23
|
+
autoClose: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 0,
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* The alert close label
|
|
29
|
+
* @default 'Close'
|
|
30
|
+
* @type string
|
|
31
|
+
*/
|
|
32
|
+
closeLabel: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'Close',
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* The alert title
|
|
38
|
+
* @default ''
|
|
39
|
+
* @type string
|
|
40
|
+
*/
|
|
41
|
+
title: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: '',
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* The alert content
|
|
47
|
+
* @default ''
|
|
48
|
+
* @type string
|
|
49
|
+
*/
|
|
50
|
+
content: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '',
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* The alert footer
|
|
56
|
+
* @default ''
|
|
57
|
+
* @type string
|
|
58
|
+
*/
|
|
59
|
+
footer: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: '',
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* The alert role
|
|
65
|
+
* @default 'alert'
|
|
66
|
+
* @type string
|
|
67
|
+
* @values 'alert', 'alertdialog'
|
|
68
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alert_Role
|
|
69
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Alertdialog_role
|
|
70
|
+
*/
|
|
71
|
+
role: {
|
|
72
|
+
type: String as PropType<'alert' | 'alertdialog'>,
|
|
73
|
+
default: 'alert',
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const VvAlertEvents = ['close']
|
|
78
|
+
|
|
79
|
+
export const useVvAlert = (
|
|
80
|
+
props: Readonly<ExtractPropTypes<typeof VvAlertProps>>,
|
|
81
|
+
emit: (event: string, ...args: unknown[]) => void,
|
|
82
|
+
) => {
|
|
83
|
+
const { bus } = useInjectedAlertGroup()
|
|
84
|
+
|
|
85
|
+
const hasId = useUniqueId(computed(() => props.id))
|
|
86
|
+
const hasTitleId = computed(() => `${hasId.value}-title`)
|
|
87
|
+
|
|
88
|
+
// icon
|
|
89
|
+
const hasIcon = computed(() =>
|
|
90
|
+
typeof props.icon === 'string' ? { name: props.icon } : props.icon,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
// props
|
|
94
|
+
const hasClass = useModifiers(
|
|
95
|
+
'vv-alert',
|
|
96
|
+
computed(() => props.modifiers),
|
|
97
|
+
computed(() => ({
|
|
98
|
+
dismissable: props.autoClose > 0 || props.dismissable,
|
|
99
|
+
'auto-close': props.autoClose > 0,
|
|
100
|
+
hover: isMouseover.value,
|
|
101
|
+
})),
|
|
102
|
+
)
|
|
103
|
+
const hasStyle = computed(() => ({
|
|
104
|
+
'--alert-duration': `${props.autoClose}ms`,
|
|
105
|
+
}))
|
|
106
|
+
|
|
107
|
+
// close
|
|
108
|
+
const close = () => {
|
|
109
|
+
if (timeout) {
|
|
110
|
+
clearTimeout(timeout)
|
|
111
|
+
}
|
|
112
|
+
emit('close', hasId.value)
|
|
113
|
+
bus?.emit('close', hasId.value)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// auto close
|
|
117
|
+
let timeout: ReturnType<typeof setTimeout>
|
|
118
|
+
watch(
|
|
119
|
+
() => props.autoClose,
|
|
120
|
+
(value) => {
|
|
121
|
+
if (value > 0) {
|
|
122
|
+
timeout = setTimeout(close, value)
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
if (timeout) {
|
|
126
|
+
clearTimeout(timeout)
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
immediate: true,
|
|
131
|
+
},
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
// listeners
|
|
135
|
+
const isMouseover = ref(false)
|
|
136
|
+
const onMouseover = withModifiers(() => {
|
|
137
|
+
isMouseover.value = true
|
|
138
|
+
if (timeout) {
|
|
139
|
+
clearTimeout(timeout)
|
|
140
|
+
}
|
|
141
|
+
}, ['passive'])
|
|
142
|
+
const onMouseleave = withModifiers(() => {
|
|
143
|
+
isMouseover.value = false
|
|
144
|
+
if (props.autoClose > 0) {
|
|
145
|
+
timeout = setTimeout(close, props.autoClose)
|
|
146
|
+
}
|
|
147
|
+
}, ['passive'])
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
close,
|
|
151
|
+
hasIcon,
|
|
152
|
+
hasTitleId,
|
|
153
|
+
hasProps: computed(() => ({
|
|
154
|
+
onMouseover,
|
|
155
|
+
onMouseleave,
|
|
156
|
+
class: hasClass.value,
|
|
157
|
+
style: hasStyle.value,
|
|
158
|
+
role: props.role,
|
|
159
|
+
'aria-labelledby': hasTitleId.value,
|
|
160
|
+
})),
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'VvAlertGroup',
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
import { useVvAlertGroup, VvAlertGroupEvents, VvAlertGroupProps } from '.'
|
|
9
|
+
import VvAlert from '../VvAlert/VvAlert.vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps(VvAlertGroupProps)
|
|
12
|
+
const emit = defineEmits(VvAlertGroupEvents)
|
|
13
|
+
const { hasProps, hasTransition } = useVvAlertGroup(props, emit)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div v-bind="hasProps">
|
|
18
|
+
<!-- @slot The slot before alert list -->
|
|
19
|
+
<slot name="before" />
|
|
20
|
+
<TransitionGroup
|
|
21
|
+
tag="div"
|
|
22
|
+
role="group"
|
|
23
|
+
:name="hasTransition"
|
|
24
|
+
class="vv-alert-group__list"
|
|
25
|
+
>
|
|
26
|
+
<!-- @slot The slot for alert list -->
|
|
27
|
+
<slot>
|
|
28
|
+
<VvAlert v-for="item in items" v-bind="item" :key="item.id" />
|
|
29
|
+
</slot>
|
|
30
|
+
</TransitionGroup>
|
|
31
|
+
<!-- @slot The slot after alert list -->
|
|
32
|
+
<slot name="after" />
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ModifiersProps } from '@/props'
|
|
2
|
+
import type { ExtractPropTypes } from 'vue'
|
|
3
|
+
|
|
4
|
+
export type AlertItem = {
|
|
5
|
+
id: string | number
|
|
6
|
+
title?: string
|
|
7
|
+
icon?: string | Record<string, unknown>
|
|
8
|
+
content?: string
|
|
9
|
+
footer?: string
|
|
10
|
+
modifiers?: string | string[]
|
|
11
|
+
dismissable?: boolean
|
|
12
|
+
autoClose?: number
|
|
13
|
+
closeLabel?: string
|
|
14
|
+
role?: 'alert' | 'alertdialog'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const VvAlertGroupProps = {
|
|
18
|
+
...ModifiersProps,
|
|
19
|
+
name: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
items: {
|
|
24
|
+
type: Array as PropType<AlertItem[]>,
|
|
25
|
+
default: () => [],
|
|
26
|
+
},
|
|
27
|
+
stack: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
31
|
+
reverse: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
inline: {
|
|
36
|
+
type: String as PropType<'start' | 'middle' | 'end'>,
|
|
37
|
+
default: undefined,
|
|
38
|
+
},
|
|
39
|
+
block: {
|
|
40
|
+
type: String as PropType<'top' | 'center' | 'bottom'>,
|
|
41
|
+
default: undefined,
|
|
42
|
+
},
|
|
43
|
+
position: {
|
|
44
|
+
type: String as PropType<'absolute' | 'fixed'>,
|
|
45
|
+
default: undefined,
|
|
46
|
+
},
|
|
47
|
+
transition: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: undefined,
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const VvAlertGroupEvents = ['close']
|
|
54
|
+
|
|
55
|
+
export const useVvAlertGroup = (
|
|
56
|
+
props: Readonly<ExtractPropTypes<typeof VvAlertGroupProps>>,
|
|
57
|
+
emit: (event: string, ...args: unknown[]) => void,
|
|
58
|
+
) => {
|
|
59
|
+
const bus = useProvideAlertGroup({ name: computed(() => props.name) })
|
|
60
|
+
|
|
61
|
+
// check props block and inline coexist
|
|
62
|
+
if ((props.block && !props.inline) || (!props.block && props.inline)) {
|
|
63
|
+
// eslint-disable-next-line
|
|
64
|
+
console.warn(
|
|
65
|
+
`[VvAlertGroup]: block and inline props must coexist at the same time.`,
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// props
|
|
70
|
+
const hasClass = computed(() => {
|
|
71
|
+
const toReturn: (string | Record<string, boolean>)[] = [
|
|
72
|
+
useModifiers(
|
|
73
|
+
'vv-alert-group',
|
|
74
|
+
computed(() => props.modifiers),
|
|
75
|
+
computed(() => ({
|
|
76
|
+
stack: props.stack,
|
|
77
|
+
reverse: props.reverse,
|
|
78
|
+
absolute: props.position === 'absolute',
|
|
79
|
+
fixed: props.position === 'fixed',
|
|
80
|
+
})),
|
|
81
|
+
).value,
|
|
82
|
+
]
|
|
83
|
+
if (props.inline && props.block) {
|
|
84
|
+
toReturn.push(`vv-alert-group--${props.block}-${props.inline}`)
|
|
85
|
+
}
|
|
86
|
+
return toReturn
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
const hasTransition = computed(() => {
|
|
90
|
+
if (props.transition) {
|
|
91
|
+
return props.transition
|
|
92
|
+
}
|
|
93
|
+
if (!props.position) {
|
|
94
|
+
return 'vv-alert--fade'
|
|
95
|
+
}
|
|
96
|
+
if (props.inline === 'start') {
|
|
97
|
+
return 'vv-alert--fade-inline-start'
|
|
98
|
+
}
|
|
99
|
+
if (props.inline === 'end') {
|
|
100
|
+
return 'vv-alert--fade-inline-end'
|
|
101
|
+
}
|
|
102
|
+
if (props.block === 'top') {
|
|
103
|
+
return 'vv-alert--fade-block-top'
|
|
104
|
+
}
|
|
105
|
+
if (props.block === 'bottom') {
|
|
106
|
+
return 'vv-alert--fade-block-bottom'
|
|
107
|
+
}
|
|
108
|
+
return 'vv-alert--fade'
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
// listeners
|
|
112
|
+
bus.on('close', (id: string) => {
|
|
113
|
+
emit('close', id)
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
hasTransition,
|
|
118
|
+
hasProps: computed(() => ({
|
|
119
|
+
class: hasClass.value,
|
|
120
|
+
})),
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
isInGroup,
|
|
27
27
|
} = useGroupProps(props, emit)
|
|
28
28
|
const hasId = useUniqueId(id)
|
|
29
|
+
const hasHintId = computed(() => `${hasId.value}-hint`)
|
|
29
30
|
const tabindex = computed(() => (isDisabled.value ? -1 : props.tabindex))
|
|
30
31
|
|
|
31
32
|
// template ref
|
|
@@ -144,7 +145,12 @@
|
|
|
144
145
|
})
|
|
145
146
|
|
|
146
147
|
// hint
|
|
147
|
-
const {
|
|
148
|
+
const {
|
|
149
|
+
HintSlot,
|
|
150
|
+
hasHintLabelOrSlot,
|
|
151
|
+
hasInvalidLabelOrSlot,
|
|
152
|
+
hintSlotScope,
|
|
153
|
+
} = HintSlotFactory(props, slots)
|
|
148
154
|
</script>
|
|
149
155
|
|
|
150
156
|
<template>
|
|
@@ -160,11 +166,26 @@
|
|
|
160
166
|
:value="hasValue"
|
|
161
167
|
:tabindex="tabindex"
|
|
162
168
|
:aria-invalid="isInvalid"
|
|
169
|
+
:aria-describedby="hasHintLabelOrSlot ? hasHintId : undefined"
|
|
170
|
+
:aria-errormessage="hasInvalidLabelOrSlot ? hasHintId : undefined"
|
|
163
171
|
/>
|
|
164
172
|
<!-- @slot Use this slot for check label -->
|
|
165
173
|
<slot :value="modelValue">
|
|
166
174
|
{{ label }}
|
|
167
175
|
</slot>
|
|
168
|
-
<HintSlot class="vv-checkbox__hint"
|
|
176
|
+
<HintSlot :id="hasHintId" class="vv-checkbox__hint">
|
|
177
|
+
<template v-if="$slots.hint" #hint>
|
|
178
|
+
<slot name="hint" v-bind="hintSlotScope" />
|
|
179
|
+
</template>
|
|
180
|
+
<template v-if="$slots.loading" #loading>
|
|
181
|
+
<slot name="loading" v-bind="hintSlotScope" />
|
|
182
|
+
</template>
|
|
183
|
+
<template v-if="$slots.valid" #valid>
|
|
184
|
+
<slot name="valid" v-bind="hintSlotScope" />
|
|
185
|
+
</template>
|
|
186
|
+
<template v-if="$slots.invalid" #invalid>
|
|
187
|
+
<slot name="invalid" v-bind="hintSlotScope" />
|
|
188
|
+
</template>
|
|
189
|
+
</HintSlot>
|
|
169
190
|
</label>
|
|
170
191
|
</template>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
value: getOptionValue(option),
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const { HintSlot } = HintSlotFactory(props, slots)
|
|
59
|
+
const { HintSlot, hintSlotScope } = HintSlotFactory(props, slots)
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
62
|
<template>
|
|
@@ -74,6 +74,19 @@
|
|
|
74
74
|
<!-- #endregion -->
|
|
75
75
|
<slot v-else />
|
|
76
76
|
</div>
|
|
77
|
-
<HintSlot class="vv-checkbox-group__hint"
|
|
77
|
+
<HintSlot class="vv-checkbox-group__hint">
|
|
78
|
+
<template v-if="$slots.hint" #hint>
|
|
79
|
+
<slot name="hint" v-bind="hintSlotScope" />
|
|
80
|
+
</template>
|
|
81
|
+
<template v-if="$slots.loading" #loading>
|
|
82
|
+
<slot name="loading" v-bind="hintSlotScope" />
|
|
83
|
+
</template>
|
|
84
|
+
<template v-if="$slots.valid" #valid>
|
|
85
|
+
<slot name="valid" v-bind="hintSlotScope" />
|
|
86
|
+
</template>
|
|
87
|
+
<template v-if="$slots.invalid" #invalid>
|
|
88
|
+
<slot name="invalid" v-bind="hintSlotScope" />
|
|
89
|
+
</template>
|
|
90
|
+
</HintSlot>
|
|
78
91
|
</fieldset>
|
|
79
92
|
</template>
|
|
@@ -39,7 +39,12 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// hint slot
|
|
42
|
-
const {
|
|
42
|
+
const {
|
|
43
|
+
HintSlot,
|
|
44
|
+
hasHintLabelOrSlot,
|
|
45
|
+
hasInvalidLabelOrSlot,
|
|
46
|
+
hintSlotScope,
|
|
47
|
+
} = HintSlotFactory(props, slots)
|
|
43
48
|
|
|
44
49
|
// template ref
|
|
45
50
|
const inputEl: Ref<HTMLElement | null> = ref(null)
|
|
@@ -93,19 +98,18 @@
|
|
|
93
98
|
if (props.disabled || props.readonly || !expanded.value) return
|
|
94
99
|
expanded.value = false
|
|
95
100
|
}
|
|
96
|
-
|
|
101
|
+
const onAfterExpand = () => {
|
|
97
102
|
if (searchable.value) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
inputSearchEl.value.focus()
|
|
102
|
-
}
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
searchText.value = ''
|
|
106
|
-
})
|
|
103
|
+
if (inputSearchEl.value) {
|
|
104
|
+
inputSearchEl.value.focus()
|
|
105
|
+
}
|
|
107
106
|
}
|
|
108
|
-
}
|
|
107
|
+
}
|
|
108
|
+
const onAfterCollapse = () => {
|
|
109
|
+
if (searchable.value) {
|
|
110
|
+
searchText.value = ''
|
|
111
|
+
}
|
|
112
|
+
}
|
|
109
113
|
|
|
110
114
|
// data
|
|
111
115
|
const {
|
|
@@ -233,12 +237,6 @@
|
|
|
233
237
|
.join(props.separator)
|
|
234
238
|
})
|
|
235
239
|
|
|
236
|
-
watch(selectedOptions, () => {
|
|
237
|
-
if (!props.multiple && props.autoClose) {
|
|
238
|
-
collapse()
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
|
|
242
240
|
/**
|
|
243
241
|
* Function triggered on click on input
|
|
244
242
|
*/
|
|
@@ -280,7 +278,7 @@
|
|
|
280
278
|
toReturn = [value as Option]
|
|
281
279
|
}
|
|
282
280
|
} else {
|
|
283
|
-
if (props.
|
|
281
|
+
if (!props.keepOpen) {
|
|
284
282
|
collapse()
|
|
285
283
|
}
|
|
286
284
|
if (props.unselectable && value === props.modelValue) {
|
|
@@ -328,7 +326,6 @@
|
|
|
328
326
|
flip: props.flip,
|
|
329
327
|
autoPlacement: props.autoPlacement,
|
|
330
328
|
arrow: props.arrow,
|
|
331
|
-
autoClose: props.autoClose,
|
|
332
329
|
autofocusFirst: searchable.value ? false : props.autofocusFirst,
|
|
333
330
|
triggerWidth: props.triggerWidth,
|
|
334
331
|
modifiers: props.dropdownModifiers,
|
|
@@ -368,6 +365,8 @@
|
|
|
368
365
|
v-model="expanded"
|
|
369
366
|
v-bind="dropdownProps"
|
|
370
367
|
:role="DropdownRole.listbox"
|
|
368
|
+
@after-expand="onAfterExpand"
|
|
369
|
+
@after-collapse="onAfterCollapse"
|
|
371
370
|
>
|
|
372
371
|
<template
|
|
373
372
|
v-if="searchable || $slots['dropdown::before']"
|
|
@@ -383,8 +382,6 @@
|
|
|
383
382
|
v-model="searchText"
|
|
384
383
|
aria-autocomplete="list"
|
|
385
384
|
:aria-controls="hasDropdownId"
|
|
386
|
-
:aria-labelledby="hasLabelId"
|
|
387
|
-
:aria-describedby="hasHintId"
|
|
388
385
|
autocomplete="off"
|
|
389
386
|
spellcheck="false"
|
|
390
387
|
type="search"
|
|
@@ -406,9 +403,16 @@
|
|
|
406
403
|
<div
|
|
407
404
|
ref="inputEl"
|
|
408
405
|
v-bind="aria"
|
|
409
|
-
:aria-labelledby="hasLabelId"
|
|
410
406
|
class="vv-select__input"
|
|
411
407
|
role="combobox"
|
|
408
|
+
:aria-expanded="expanded"
|
|
409
|
+
:aria-labelledby="hasLabelId"
|
|
410
|
+
:aria-describedby="
|
|
411
|
+
hasHintLabelOrSlot ? hasHintId : undefined
|
|
412
|
+
"
|
|
413
|
+
:aria-errormessage="
|
|
414
|
+
hasInvalidLabelOrSlot ? hasHintId : undefined
|
|
415
|
+
"
|
|
412
416
|
:tabindex="hasTabindex"
|
|
413
417
|
@click.passive="onClickInput"
|
|
414
418
|
>
|
|
@@ -558,7 +562,20 @@
|
|
|
558
562
|
</template>
|
|
559
563
|
</VvDropdown>
|
|
560
564
|
</div>
|
|
561
|
-
<HintSlot :id="hasHintId" class="vv-select__hint"
|
|
565
|
+
<HintSlot :id="hasHintId" class="vv-select__hint">
|
|
566
|
+
<template v-if="$slots.hint" #hint>
|
|
567
|
+
<slot name="hint" v-bind="hintSlotScope" />
|
|
568
|
+
</template>
|
|
569
|
+
<template v-if="$slots.loading" #loading>
|
|
570
|
+
<slot name="loading" v-bind="hintSlotScope" />
|
|
571
|
+
</template>
|
|
572
|
+
<template v-if="$slots.valid" #valid>
|
|
573
|
+
<slot name="valid" v-bind="hintSlotScope" />
|
|
574
|
+
</template>
|
|
575
|
+
<template v-if="$slots.invalid" #invalid>
|
|
576
|
+
<slot name="invalid" v-bind="hintSlotScope" />
|
|
577
|
+
</template>
|
|
578
|
+
</HintSlot>
|
|
562
579
|
</div>
|
|
563
580
|
<VvSelect
|
|
564
581
|
v-else
|
|
@@ -136,9 +136,15 @@ export const VvComboboxProps = {
|
|
|
136
136
|
/**
|
|
137
137
|
* Open dropdown on focus
|
|
138
138
|
*/
|
|
139
|
-
autoOpen:
|
|
139
|
+
autoOpen: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
default: false,
|
|
142
|
+
},
|
|
140
143
|
/**
|
|
141
|
-
*
|
|
144
|
+
* Keep open dropdown on single select
|
|
142
145
|
*/
|
|
143
|
-
|
|
146
|
+
keepOpen: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
default: false,
|
|
149
|
+
},
|
|
144
150
|
}
|