@volverjs/ui-vue 0.0.5 → 0.0.6-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/auto-imports.d.ts +11 -0
- package/dist/Volver.d.ts +1 -1
- package/dist/components/VvAccordion/VvAccordion.es.js +238 -5
- 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 +3 -6
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +243 -10
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +10 -62
- package/dist/components/VvAccordionGroup/index.d.ts +4 -33
- 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 +279 -0
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -0
- package/dist/components/VvAvatar/VvAvatar.vue.d.ts +15 -0
- package/dist/components/VvAvatar/index.d.ts +7 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +363 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -0
- package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +42 -0
- package/dist/components/VvAvatarGroup/index.d.ts +25 -0
- 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 +5 -31
- package/dist/components/VvBreadcrumb/index.d.ts +1 -14
- package/dist/components/VvButton/VvButton.es.js +90 -49
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +38 -13
- package/dist/components/VvButton/index.d.ts +27 -4
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +13 -7
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +10 -62
- package/dist/components/VvButtonGroup/index.d.ts +3 -29
- 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 +7 -7
- package/dist/components/VvCard/index.d.ts +1 -1
- 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 +47 -11
- package/dist/components/VvCheckbox/index.d.ts +9 -4
- 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 +272 -175
- 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 +45 -34
- 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 +24 -20
- 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 +2 -2
- 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 +26 -20
- 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 +3 -3
- 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 +166 -142
- 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 +454 -0
- package/dist/components/VvNav/VvNav.umd.js +1 -0
- package/dist/components/VvNav/VvNav.vue.d.ts +21 -0
- package/dist/components/VvNav/index.d.ts +19 -0
- package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +19 -0
- package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +1 -0
- package/dist/components/VvNavItemTitle/VvNavItemTitle.vue.d.ts +6 -0
- package/dist/components/VvNavSeparator/VvNavSeparator.d.ts +2 -0
- 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 +47 -11
- package/dist/components/VvRadio/index.d.ts +9 -4
- 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 +167 -141
- 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 +509 -0
- package/dist/components/VvTab/VvTab.umd.js +1 -0
- package/dist/components/VvTab/VvTab.vue.d.ts +26 -0
- package/dist/components/VvTab/index.d.ts +10 -0
- package/dist/components/VvTextarea/VvTextarea.es.js +164 -140
- 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 +1336 -981
- 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/group/useInjectedGroupState.d.ts +1 -1
- 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.d.ts +2 -2
- 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 +5 -0
- package/dist/stories/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/stories/Avatar/Avatar.test.d.ts +2 -0
- package/dist/stories/Avatar/AvatarBadge.stories.d.ts +6 -0
- package/dist/stories/Avatar/AvatarModifiers.stories.d.ts +13 -0
- package/dist/stories/Avatar/AvatarSlots.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.settings.d.ts +50 -0
- package/dist/stories/AvatarGroup/AvatarGroup.stories.d.ts +6 -0
- package/dist/stories/AvatarGroup/AvatarGroup.test.d.ts +2 -0
- package/dist/stories/AvatarGroup/AvatarGroupModifiers.stories.d.ts +7 -0
- package/dist/stories/AvatarGroup/AvatarGroupSlotDefault.stories.d.ts +6 -0
- package/dist/stories/Badge/Badge.settings.d.ts +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 +17 -9
- 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 +30 -0
- package/dist/stories/Nav/Nav.stories.d.ts +6 -0
- package/dist/stories/Nav/Nav.test.d.ts +2 -0
- package/dist/stories/Nav/NavModifiers.stories.d.ts +9 -0
- package/dist/stories/Progress/Progress.settings.d.ts +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.settings.d.ts +37 -0
- package/dist/stories/Tab/Tab.stories.d.ts +6 -0
- package/dist/stories/Tab/Tab.test.d.ts +2 -0
- package/dist/stories/Textarea/Textarea.settings.d.ts +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/dist/test/expect.d.ts +3 -0
- package/package.json +112 -56
- 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 +22 -7
- package/src/components/VvAccordionGroup/index.ts +8 -6
- 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/VvAvatar/VvAvatar.vue +21 -0
- package/src/components/VvAvatar/index.ts +9 -0
- package/src/components/VvAvatarGroup/VvAvatarGroup.vue +65 -0
- package/src/components/VvAvatarGroup/index.ts +28 -0
- package/src/components/VvBreadcrumb/index.ts +1 -1
- package/src/components/VvButton/VvButton.vue +9 -6
- package/src/components/VvButton/index.ts +44 -21
- package/src/components/VvButtonGroup/VvButtonGroup.vue +2 -2
- package/src/components/VvButtonGroup/index.ts +14 -2
- 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 +11 -5
- 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 +3 -3
- package/src/components/VvInputText/VvInputText.vue +26 -9
- package/src/components/VvNav/VvNav.vue +66 -0
- package/src/components/VvNav/index.ts +21 -0
- package/src/components/VvNavItemTitle/VvNavItemTitle.vue +11 -0
- package/src/components/VvNavSeparator/VvNavSeparator.ts +8 -0
- 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/VvTab/VvTab.vue +53 -0
- package/src/components/VvTab/index.ts +13 -0
- 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 +7 -5
- 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 +37 -0
- package/src/stories/Avatar/Avatar.stories.ts +42 -0
- package/src/stories/Avatar/Avatar.test.ts +34 -0
- 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.settings.ts +60 -0
- package/src/stories/AvatarGroup/AvatarGroup.stories.ts +35 -0
- package/src/stories/AvatarGroup/AvatarGroup.test.ts +36 -0
- package/src/stories/AvatarGroup/AvatarGroupModifiers.stories.ts +31 -0
- package/src/stories/AvatarGroup/AvatarGroupSlotDefault.stories.ts +39 -0
- 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 +14 -2
- 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.settings.ts +34 -0
- package/src/stories/Nav/Nav.stories.ts +33 -0
- package/src/stories/Nav/Nav.test.ts +32 -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.settings.ts +41 -0
- package/src/stories/Tab/Tab.stories.ts +70 -0
- package/src/stories/Tab/Tab.test.ts +37 -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/test/expect.ts +15 -0
- package/src/types/group.d.ts +5 -3
- 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/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 -50
- 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/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/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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ModifiersArgTypes } from '../argTypes'
|
|
2
|
+
|
|
3
|
+
export const defaultArgs = {
|
|
4
|
+
name: 'default',
|
|
5
|
+
items: [
|
|
6
|
+
{
|
|
7
|
+
id: 1,
|
|
8
|
+
title: 'Info!',
|
|
9
|
+
content: 'This is an info message.',
|
|
10
|
+
icon: 'information',
|
|
11
|
+
modifiers: 'info',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: 2,
|
|
15
|
+
title: 'Warning!',
|
|
16
|
+
content: 'This is an warning message.',
|
|
17
|
+
icon: 'warning',
|
|
18
|
+
modifiers: 'warning',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 3,
|
|
22
|
+
title: 'Danger!',
|
|
23
|
+
content: 'This is an danger message.',
|
|
24
|
+
icon: 'error',
|
|
25
|
+
modifiers: 'danger',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
stack: false,
|
|
29
|
+
reverse: false,
|
|
30
|
+
}
|
|
31
|
+
export const argTypes = {
|
|
32
|
+
name: {
|
|
33
|
+
description: 'The alert group name',
|
|
34
|
+
},
|
|
35
|
+
items: {
|
|
36
|
+
description: 'The alert group items',
|
|
37
|
+
table: {
|
|
38
|
+
defaultValue: {
|
|
39
|
+
summary: '[]',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
stack: {
|
|
44
|
+
description: 'Stack alerts',
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: 'false',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
reverse: {
|
|
52
|
+
description: 'Reverse alerts',
|
|
53
|
+
table: {
|
|
54
|
+
defaultValue: {
|
|
55
|
+
summary: 'false',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
position: {
|
|
60
|
+
description: 'The alert group position',
|
|
61
|
+
control: 'radio',
|
|
62
|
+
options: ['absolute', 'fixed'],
|
|
63
|
+
},
|
|
64
|
+
inline: {
|
|
65
|
+
description: 'The alert group inline alignment',
|
|
66
|
+
control: 'radio',
|
|
67
|
+
options: ['start', 'middle', 'end'],
|
|
68
|
+
},
|
|
69
|
+
block: {
|
|
70
|
+
description: 'The alert group block alignment',
|
|
71
|
+
control: 'radio',
|
|
72
|
+
options: ['top', 'center', 'bottom'],
|
|
73
|
+
},
|
|
74
|
+
transition: {
|
|
75
|
+
description: 'The alert group transition',
|
|
76
|
+
control: 'text',
|
|
77
|
+
},
|
|
78
|
+
...ModifiersArgTypes,
|
|
79
|
+
// slots
|
|
80
|
+
default: {
|
|
81
|
+
control: {
|
|
82
|
+
type: 'text',
|
|
83
|
+
},
|
|
84
|
+
table: {
|
|
85
|
+
type: {
|
|
86
|
+
summary: 'html',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
before: {
|
|
91
|
+
control: {
|
|
92
|
+
type: 'text',
|
|
93
|
+
},
|
|
94
|
+
table: {
|
|
95
|
+
type: {
|
|
96
|
+
summary: 'html',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
after: {
|
|
101
|
+
control: {
|
|
102
|
+
type: 'text',
|
|
103
|
+
},
|
|
104
|
+
table: {
|
|
105
|
+
type: {
|
|
106
|
+
summary: 'html',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvAlertGroup from '@/components/VvAlertGroup/VvAlertGroup.vue'
|
|
3
|
+
import { defaultTest } from './AlertGroup.test'
|
|
4
|
+
import { defaultArgs, argTypes } from './AlertGroup.settings'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvAlertGroup> = {
|
|
7
|
+
title: 'Components/AlertGroup',
|
|
8
|
+
component: VvAlertGroup,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default meta
|
|
15
|
+
|
|
16
|
+
export type Story = StoryObj<typeof VvAlertGroup>
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
args: defaultArgs,
|
|
20
|
+
play: defaultTest,
|
|
21
|
+
render: (args) => ({
|
|
22
|
+
components: { VvAlertGroup },
|
|
23
|
+
setup() {
|
|
24
|
+
return { args }
|
|
25
|
+
},
|
|
26
|
+
template: /* html */ `
|
|
27
|
+
<vv-alert-group v-bind="args" data-testId="element">
|
|
28
|
+
<template #before v-if="args.before"><div v-html="args.before"></div></template>
|
|
29
|
+
<template #after v-if="args.after"><div v-html="args.after"></div></template>
|
|
30
|
+
<template #default v-if="args.default"><div v-html="args.default"></div></template>
|
|
31
|
+
</vv-alert-group>
|
|
32
|
+
`,
|
|
33
|
+
}),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const Stack: Story = {
|
|
37
|
+
...Default,
|
|
38
|
+
args: {
|
|
39
|
+
...defaultArgs,
|
|
40
|
+
stack: true,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const Reverse: Story = {
|
|
45
|
+
...Default,
|
|
46
|
+
args: {
|
|
47
|
+
...defaultArgs,
|
|
48
|
+
reverse: true,
|
|
49
|
+
},
|
|
50
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { PlayAttributes } from '@/test/types'
|
|
2
|
+
import { expect } from '@/test/expect'
|
|
3
|
+
import { within } from '@storybook/testing-library'
|
|
4
|
+
|
|
5
|
+
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
6
|
+
const element = (await within(canvasElement).findByTestId(
|
|
7
|
+
'element',
|
|
8
|
+
)) as HTMLElement
|
|
9
|
+
|
|
10
|
+
expect(element).toHaveClass('vv-alert-group')
|
|
11
|
+
|
|
12
|
+
// check alert group list
|
|
13
|
+
const alertGroupList = element.getElementsByClassName(
|
|
14
|
+
'vv-alert-group__list',
|
|
15
|
+
)?.[0]
|
|
16
|
+
expect(alertGroupList).toBeTruthy()
|
|
17
|
+
|
|
18
|
+
const modifiers =
|
|
19
|
+
!args.modifiers || Array.isArray(args.modifiers)
|
|
20
|
+
? args.modifiers
|
|
21
|
+
: args.modifiers.split(' ')
|
|
22
|
+
|
|
23
|
+
// modifiers
|
|
24
|
+
if (modifiers) {
|
|
25
|
+
for (const modifier of modifiers) {
|
|
26
|
+
expect(element).toHaveClass(`vv-alert-group--${modifier}`)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// stack
|
|
31
|
+
if (args.stack) {
|
|
32
|
+
expect(element).toHaveClass('vv-alert-group--stack')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// reverse
|
|
36
|
+
if (args.reverse) {
|
|
37
|
+
expect(element).toHaveClass('vv-alert-group--reverse')
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// position
|
|
41
|
+
if (args.position) {
|
|
42
|
+
expect(element).toHaveClass(`vv-alert-group--${args.position}`)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (args.inline && args.block) {
|
|
46
|
+
expect(element).toHaveClass(
|
|
47
|
+
`vv-alert-group--${args.block}-${args.inline}`,
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// slot default
|
|
52
|
+
if (args.default) {
|
|
53
|
+
const div = document.createElement('div')
|
|
54
|
+
div.innerHTML = args.default
|
|
55
|
+
expect(alertGroupList.firstElementChild?.innerHTML).toEqual(
|
|
56
|
+
div.innerHTML,
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// slot before
|
|
61
|
+
if (args.before) {
|
|
62
|
+
const div = document.createElement('div')
|
|
63
|
+
div.innerHTML = args.before
|
|
64
|
+
expect(element.firstElementChild?.innerHTML).toEqual(div.innerHTML)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// slot after
|
|
68
|
+
if (args.after) {
|
|
69
|
+
const div = document.createElement('div')
|
|
70
|
+
div.innerHTML = args.after
|
|
71
|
+
expect(element.lastElementChild?.innerHTML).toEqual(div.innerHTML)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// check accessibility
|
|
75
|
+
await expect(element).toHaveNoViolations()
|
|
76
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3'
|
|
2
|
+
import VvAlertGroup from '@/components/VvAlertGroup/VvAlertGroup.vue'
|
|
3
|
+
import { defaultArgs, argTypes } from './AlertGroup.settings'
|
|
4
|
+
import { Default, type Story } from './AlertGroup.stories'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvAlertGroup> = {
|
|
7
|
+
title: 'Components/AlertGroup/Position',
|
|
8
|
+
component: VvAlertGroup,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
export const TopStart: Story = {
|
|
16
|
+
...Default,
|
|
17
|
+
args: {
|
|
18
|
+
...defaultArgs,
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
block: 'top',
|
|
21
|
+
inline: 'start',
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const TopMiddle: Story = {
|
|
26
|
+
...Default,
|
|
27
|
+
args: {
|
|
28
|
+
...defaultArgs,
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
block: 'top',
|
|
31
|
+
inline: 'middle',
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const TopEnd: Story = {
|
|
36
|
+
...Default,
|
|
37
|
+
args: {
|
|
38
|
+
...defaultArgs,
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
block: 'top',
|
|
41
|
+
inline: 'end',
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const CenterStart: Story = {
|
|
46
|
+
...Default,
|
|
47
|
+
args: {
|
|
48
|
+
...defaultArgs,
|
|
49
|
+
position: 'absolute',
|
|
50
|
+
block: 'center',
|
|
51
|
+
inline: 'start',
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const CenterMiddle: Story = {
|
|
56
|
+
...Default,
|
|
57
|
+
args: {
|
|
58
|
+
...defaultArgs,
|
|
59
|
+
position: 'absolute',
|
|
60
|
+
block: 'center',
|
|
61
|
+
inline: 'middle',
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const CenterEnd: Story = {
|
|
66
|
+
...Default,
|
|
67
|
+
args: {
|
|
68
|
+
...defaultArgs,
|
|
69
|
+
position: 'absolute',
|
|
70
|
+
block: 'center',
|
|
71
|
+
inline: 'end',
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const BottomStart: Story = {
|
|
76
|
+
...Default,
|
|
77
|
+
args: {
|
|
78
|
+
...defaultArgs,
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
block: 'bottom',
|
|
81
|
+
inline: 'start',
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const BottomMiddle: Story = {
|
|
86
|
+
...Default,
|
|
87
|
+
args: {
|
|
88
|
+
...defaultArgs,
|
|
89
|
+
position: 'absolute',
|
|
90
|
+
block: 'bottom',
|
|
91
|
+
inline: 'middle',
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const BottomEnd: Story = {
|
|
96
|
+
...Default,
|
|
97
|
+
args: {
|
|
98
|
+
...defaultArgs,
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
block: 'bottom',
|
|
101
|
+
inline: 'end',
|
|
102
|
+
},
|
|
103
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue3'
|
|
2
|
+
import VvAlert from '@/components/VvAlert/VvAlert.vue'
|
|
3
|
+
import { defaultArgs, argTypes } from './AlertGroup.settings'
|
|
4
|
+
import { Default as DefaultStory, type Story } from './AlertGroup.stories'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvAlert> = {
|
|
7
|
+
title: 'Components/AlertGroup/Slots',
|
|
8
|
+
component: VvAlert,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {
|
|
16
|
+
...DefaultStory,
|
|
17
|
+
args: {
|
|
18
|
+
...defaultArgs,
|
|
19
|
+
modifiers: ['notification'],
|
|
20
|
+
default: /* html */ `
|
|
21
|
+
<div class="vv-alert vv-alert--success" role="alert" aria-labelledby="Els38gSOH_Op3SFpzekW--title" style="--alert-duration:0ms;">
|
|
22
|
+
<div class="vv-alert__header">
|
|
23
|
+
<strong id="Els38gSOH_Op3SFpzekW--title" class="vv-alert__title">Success!</strong>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="vv-alert__content">This is an success message.</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="vv-alert vv-alert--accent mt-xs" role="alert" aria-labelledby="nkas44ZTfhbt5OEJYL06N-title" style="--alert-duration:0ms;">
|
|
28
|
+
<div class="vv-alert__header">
|
|
29
|
+
<strong id="nkas44ZTfhbt5OEJYL06N-title" class="vv-alert__title">Accent!</strong>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="vv-alert__content">This is an accent message.</div>
|
|
32
|
+
</div>
|
|
33
|
+
`,
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Before: Story = {
|
|
38
|
+
...DefaultStory,
|
|
39
|
+
args: {
|
|
40
|
+
...defaultArgs,
|
|
41
|
+
modifiers: ['notification'],
|
|
42
|
+
before: /* html */ `
|
|
43
|
+
<div class="flex justify-center">
|
|
44
|
+
<button type="button" class="vv-button vv-button--action-quiet" id="y_Cl2wtJ8JJpDo-t6za2i">
|
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="vv-icon vv-button__icon iconify iconify--normal iconify--vv" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M6 18 18 6M6 6l12 12"></path></svg>
|
|
46
|
+
<span class="vv-button__label">Clear All</span>
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
`,
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const After: Story = {
|
|
54
|
+
...DefaultStory,
|
|
55
|
+
args: {
|
|
56
|
+
...defaultArgs,
|
|
57
|
+
modifiers: ['notification'],
|
|
58
|
+
after: /* html */ `
|
|
59
|
+
<div class="flex justify-center">
|
|
60
|
+
<button type="button" class="vv-button vv-button--action-quiet" id="y_Cl2wtJ8JJpDo-t6za2i">
|
|
61
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="vv-icon vv-button__icon iconify iconify--normal iconify--vv" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M6 18 18 6M6 6l12 12"></path></svg>
|
|
62
|
+
<span class="vv-button__label">Clear All</span>
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
65
|
+
`,
|
|
66
|
+
},
|
|
67
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VvAvatarProps } from '@/components/VvAvatar'
|
|
2
|
+
import { DefaultSlotArgTypes } from '@/stories/argTypes'
|
|
3
|
+
import type { ArgTypes } from '@storybook/types'
|
|
4
|
+
|
|
5
|
+
export const defaultArgs = {
|
|
6
|
+
...propsToObject(VvAvatarProps),
|
|
7
|
+
imgSrc: 'https://i.pravatar.cc/300',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const argTypes: ArgTypes = {
|
|
11
|
+
...DefaultSlotArgTypes,
|
|
12
|
+
default: {
|
|
13
|
+
description: 'Content slot',
|
|
14
|
+
control: {
|
|
15
|
+
type: 'text',
|
|
16
|
+
},
|
|
17
|
+
table: {
|
|
18
|
+
category: 'Slots',
|
|
19
|
+
type: {
|
|
20
|
+
summary: 'html',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
modifiers: {
|
|
25
|
+
description: 'Component BEM modifiers',
|
|
26
|
+
control: {
|
|
27
|
+
type: 'check',
|
|
28
|
+
},
|
|
29
|
+
options: ['rounded', 'square', 'bordered', 'ring', 'lg', 'md'],
|
|
30
|
+
},
|
|
31
|
+
imgSrc: {
|
|
32
|
+
control: {
|
|
33
|
+
type: 'text',
|
|
34
|
+
},
|
|
35
|
+
description: 'The image url',
|
|
36
|
+
},
|
|
37
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvAvatar from '@/components/VvAvatar/VvAvatar.vue'
|
|
3
|
+
import { defaultArgs, argTypes } from './Avatar.settings'
|
|
4
|
+
import { defaultTest } from '../Avatar/Avatar.test'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvAvatar> = {
|
|
7
|
+
title: 'Components/Avatar',
|
|
8
|
+
component: VvAvatar,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default meta
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof VvAvatar>
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
...defaultArgs,
|
|
21
|
+
default: 'MR',
|
|
22
|
+
},
|
|
23
|
+
render: (args) => ({
|
|
24
|
+
components: { VvAvatar },
|
|
25
|
+
setup() {
|
|
26
|
+
return { args }
|
|
27
|
+
},
|
|
28
|
+
template: /* html */ `
|
|
29
|
+
<vv-avatar v-bind="args" data-testId="element">
|
|
30
|
+
<template v-if="args.default"> {{ args.default }} </template>
|
|
31
|
+
</vv-avatar>
|
|
32
|
+
`,
|
|
33
|
+
}),
|
|
34
|
+
play: defaultTest,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Image: Story = {
|
|
38
|
+
...Default,
|
|
39
|
+
args: {
|
|
40
|
+
...defaultArgs,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PlayAttributes } from '@/test/types'
|
|
2
|
+
import { expect } from '@/test/expect'
|
|
3
|
+
import { within } from '@storybook/testing-library'
|
|
4
|
+
|
|
5
|
+
export async function defaultTest({ canvasElement, args }: PlayAttributes) {
|
|
6
|
+
const element = (await within(canvasElement).findByTestId(
|
|
7
|
+
'element',
|
|
8
|
+
)) as HTMLElement
|
|
9
|
+
|
|
10
|
+
// slot default
|
|
11
|
+
if (!args.default && !args.imgSrc) {
|
|
12
|
+
throw new Error('Default slot or imgSrc is required!')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const modifiers =
|
|
16
|
+
!args.modifiers || Array.isArray(args.modifiers)
|
|
17
|
+
? args.modifiers
|
|
18
|
+
: args.modifiers.split(' ')
|
|
19
|
+
|
|
20
|
+
// modifiers
|
|
21
|
+
if (modifiers) {
|
|
22
|
+
for (const modifier of modifiers) {
|
|
23
|
+
expect(element).toHaveClass(`vv-avatar--${modifier}`)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// check img tag exist
|
|
28
|
+
if (args.imgSrc && !args.default) {
|
|
29
|
+
expect(element).toHaveImgChild('img')
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// check accessibility
|
|
33
|
+
await expect(element).toHaveNoViolations()
|
|
34
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Replace vue3 with vue if you are using Storybook for Vue 2
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
3
|
+
import VvAvatar from '@/components/VvAvatar/VvAvatar.vue'
|
|
4
|
+
import VvBadge from '@/components/VvBadge/VvBadge.vue'
|
|
5
|
+
import { defaultArgs, argTypes } from './Avatar.settings'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof VvAvatar> = {
|
|
8
|
+
title: 'Components/Avatar/Badge',
|
|
9
|
+
component: VvAvatar,
|
|
10
|
+
args: defaultArgs,
|
|
11
|
+
argTypes,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default meta
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof VvAvatar>
|
|
17
|
+
|
|
18
|
+
export const Badge: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
modifiers: 'lg',
|
|
21
|
+
},
|
|
22
|
+
render: (args) => ({
|
|
23
|
+
components: { VvAvatar, VvBadge },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args }
|
|
26
|
+
},
|
|
27
|
+
template: /* html */ `
|
|
28
|
+
<vv-avatar v-bind="args" data-testId="element">
|
|
29
|
+
MR
|
|
30
|
+
<sup>
|
|
31
|
+
<vv-badge modifiers="danger rounded">99+</vv-badge>
|
|
32
|
+
</sup>
|
|
33
|
+
</vv-avatar>
|
|
34
|
+
`,
|
|
35
|
+
}),
|
|
36
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvAvatar from '@/components/VvAvatar/VvAvatar.vue'
|
|
3
|
+
import { defaultArgs, argTypes } from './Avatar.settings'
|
|
4
|
+
import { defaultTest } from '../Avatar/Avatar.test'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvAvatar> = {
|
|
7
|
+
title: 'Components/Avatar/Modifiers',
|
|
8
|
+
component: VvAvatar,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof VvAvatar>
|
|
16
|
+
|
|
17
|
+
const VvAvatarTemplate: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
default: 'MR',
|
|
20
|
+
modifiers: '',
|
|
21
|
+
},
|
|
22
|
+
render: (args) => ({
|
|
23
|
+
components: { VvAvatar },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args }
|
|
26
|
+
},
|
|
27
|
+
template: /* html */ `
|
|
28
|
+
<vv-avatar v-bind="args" data-testId="element">
|
|
29
|
+
{{ args.default }}
|
|
30
|
+
</vv-avatar>`,
|
|
31
|
+
}),
|
|
32
|
+
play: defaultTest,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const Small: Story = {
|
|
36
|
+
...VvAvatarTemplate,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Medium: Story = {
|
|
40
|
+
...VvAvatarTemplate,
|
|
41
|
+
args: {
|
|
42
|
+
...VvAvatarTemplate.args,
|
|
43
|
+
modifiers: 'md',
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const Large: Story = {
|
|
48
|
+
...VvAvatarTemplate,
|
|
49
|
+
args: {
|
|
50
|
+
...VvAvatarTemplate.args,
|
|
51
|
+
modifiers: 'lg',
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const Rounded: Story = {
|
|
56
|
+
...VvAvatarTemplate,
|
|
57
|
+
args: {
|
|
58
|
+
...VvAvatarTemplate.args,
|
|
59
|
+
modifiers: 'rounded md',
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const Square: Story = {
|
|
64
|
+
...VvAvatarTemplate,
|
|
65
|
+
args: {
|
|
66
|
+
...VvAvatarTemplate.args,
|
|
67
|
+
modifiers: 'square md',
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const Bordered: Story = {
|
|
72
|
+
...VvAvatarTemplate,
|
|
73
|
+
args: {
|
|
74
|
+
...VvAvatarTemplate.args,
|
|
75
|
+
modifiers: 'bordered md',
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const Ring: Story = {
|
|
80
|
+
...VvAvatarTemplate,
|
|
81
|
+
args: {
|
|
82
|
+
...VvAvatarTemplate.args,
|
|
83
|
+
modifiers: 'ring md',
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const CustomColor: Story = {
|
|
88
|
+
...VvAvatarTemplate,
|
|
89
|
+
args: {
|
|
90
|
+
...VvAvatarTemplate.args,
|
|
91
|
+
modifiers: 'accent md',
|
|
92
|
+
},
|
|
93
|
+
argTypes: {
|
|
94
|
+
...argTypes,
|
|
95
|
+
modifiers: {
|
|
96
|
+
...argTypes.modifiers,
|
|
97
|
+
options: [...argTypes.modifiers.options, 'accent'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvAvatar from '@/components/VvAvatar/VvAvatar.vue'
|
|
3
|
+
import { defaultArgs, argTypes } from './Avatar.settings'
|
|
4
|
+
import { defaultTest } from '../Avatar/Avatar.test'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvAvatar> = {
|
|
7
|
+
title: 'Components/Avatar/Slots',
|
|
8
|
+
component: VvAvatar,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof VvAvatar>
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
...defaultArgs,
|
|
20
|
+
default: 'MR',
|
|
21
|
+
},
|
|
22
|
+
render: (args) => ({
|
|
23
|
+
components: { VvAvatar },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args }
|
|
26
|
+
},
|
|
27
|
+
template: /* html */ `
|
|
28
|
+
<vv-avatar v-bind="args" data-testId="element">
|
|
29
|
+
<template v-if="args.default"> {{ args.default }} </template>
|
|
30
|
+
</vv-avatar>
|
|
31
|
+
`,
|
|
32
|
+
}),
|
|
33
|
+
play: defaultTest,
|
|
34
|
+
}
|