@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
|
@@ -14,7 +14,6 @@ export const argTypes = {
|
|
|
14
14
|
...InputTextareaArgTypes,
|
|
15
15
|
...HintArgTypes,
|
|
16
16
|
cols: {
|
|
17
|
-
type: 'number',
|
|
18
17
|
description:
|
|
19
18
|
'The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.',
|
|
20
19
|
control: {
|
|
@@ -27,7 +26,6 @@ export const argTypes = {
|
|
|
27
26
|
},
|
|
28
27
|
},
|
|
29
28
|
rows: {
|
|
30
|
-
type: 'number',
|
|
31
29
|
description:
|
|
32
30
|
'The number of visible text lines for the control. If it is specified, it must be a positive integer. If it is not specified, the default value is 2.',
|
|
33
31
|
control: {
|
|
@@ -40,9 +38,6 @@ export const argTypes = {
|
|
|
40
38
|
},
|
|
41
39
|
},
|
|
42
40
|
wrap: {
|
|
43
|
-
type: {
|
|
44
|
-
summary: 'string',
|
|
45
|
-
},
|
|
46
41
|
description:
|
|
47
42
|
'Indicates how the control should wrap the value for form submission.',
|
|
48
43
|
options: ['hard', 'soft', 'off'],
|
|
@@ -56,9 +51,6 @@ export const argTypes = {
|
|
|
56
51
|
},
|
|
57
52
|
},
|
|
58
53
|
spellcheck: {
|
|
59
|
-
type: {
|
|
60
|
-
summary: ['string', 'boolean'],
|
|
61
|
-
},
|
|
62
54
|
description:
|
|
63
55
|
'Specifies whether the textarea is subject to spell checking by the underlying browser/OS. ',
|
|
64
56
|
options: [true, false, 'default'],
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvTextarea from '@/components/VvTextarea/VvTextarea.vue'
|
|
3
|
+
import { defaultArgs, argTypes } from './Textarea.settings'
|
|
4
|
+
import { defaultTest } from './Textarea.test'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvTextarea> = {
|
|
7
|
+
title: 'Components/Textarea',
|
|
8
|
+
component: VvTextarea,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default meta
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof VvTextarea>
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
...defaultArgs,
|
|
21
|
+
},
|
|
22
|
+
render: (args) => ({
|
|
23
|
+
components: { VvTextarea },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args }
|
|
26
|
+
},
|
|
27
|
+
data: () => ({ inputValue: undefined }),
|
|
28
|
+
template: /* html */ `
|
|
29
|
+
<vv-textarea v-bind="args" v-model="inputValue" :data-testData="inputValue" data-testId="element">
|
|
30
|
+
<template #before v-if="args.before"><div class="flex" v-html="args.before"></div></template>
|
|
31
|
+
<template #after v-if="args.after"><div class="flex" v-html="args.after"></div></template>
|
|
32
|
+
<template #hint v-if="args.hint"><span v-html="args.hint"></span></template>
|
|
33
|
+
</vv-textarea>
|
|
34
|
+
<div>Value: <span data-testId="value">{{inputValue}}</span></div>
|
|
35
|
+
`,
|
|
36
|
+
}),
|
|
37
|
+
play: defaultTest,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Disabled: Story = {
|
|
41
|
+
...Default,
|
|
42
|
+
args: {
|
|
43
|
+
...defaultArgs,
|
|
44
|
+
disabled: true,
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const Readonly: Story = {
|
|
49
|
+
...Default,
|
|
50
|
+
args: {
|
|
51
|
+
...defaultArgs,
|
|
52
|
+
readonly: true,
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const Valid: Story = {
|
|
57
|
+
...Default,
|
|
58
|
+
args: {
|
|
59
|
+
...defaultArgs,
|
|
60
|
+
valid: true,
|
|
61
|
+
validLabel: 'The field is valid.',
|
|
62
|
+
icon: 'check',
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const Invalid: Story = {
|
|
67
|
+
...Default,
|
|
68
|
+
args: {
|
|
69
|
+
...defaultArgs,
|
|
70
|
+
invalid: true,
|
|
71
|
+
invalidLabel: 'The field is required.',
|
|
72
|
+
icon: 'error-2',
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const Hint: Story = {
|
|
77
|
+
...Default,
|
|
78
|
+
args: {
|
|
79
|
+
...Default.args,
|
|
80
|
+
hintLabel: 'Please enter your name.',
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const Loading: Story = {
|
|
85
|
+
...Default,
|
|
86
|
+
args: {
|
|
87
|
+
...Default.args,
|
|
88
|
+
loading: true,
|
|
89
|
+
loadingLabel: 'Loading...',
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const Floating: Story = {
|
|
94
|
+
...Default,
|
|
95
|
+
args: {
|
|
96
|
+
...Default.args,
|
|
97
|
+
floating: true,
|
|
98
|
+
},
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const Resizable: Story = {
|
|
102
|
+
...Default,
|
|
103
|
+
args: {
|
|
104
|
+
...Default.args,
|
|
105
|
+
resizable: true,
|
|
106
|
+
},
|
|
107
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvTextarea from '@/components/VvTextarea/VvTextarea.vue'
|
|
3
|
+
import { Default } from './Textarea.stories'
|
|
4
|
+
import { defaultArgs, argTypes } from './Textarea.settings'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvTextarea> = {
|
|
7
|
+
title: 'Components/Textarea/Length',
|
|
8
|
+
component: VvTextarea,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof VvTextarea>
|
|
16
|
+
|
|
17
|
+
export const Maxlength: Story = {
|
|
18
|
+
...Default,
|
|
19
|
+
args: {
|
|
20
|
+
...Default.args,
|
|
21
|
+
maxlength: 5,
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const Minlength: Story = {
|
|
26
|
+
...Default,
|
|
27
|
+
args: {
|
|
28
|
+
...Default.args,
|
|
29
|
+
minlength: 5,
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const Count: Story = {
|
|
34
|
+
...Default,
|
|
35
|
+
args: {
|
|
36
|
+
...Default.args,
|
|
37
|
+
count: true,
|
|
38
|
+
minLength: 100,
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const Limit: Story = {
|
|
43
|
+
...Default,
|
|
44
|
+
args: {
|
|
45
|
+
...Default.args,
|
|
46
|
+
count: 'limit',
|
|
47
|
+
maxlength: 100,
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const Countdown: Story = {
|
|
52
|
+
...Default,
|
|
53
|
+
args: {
|
|
54
|
+
...Default.args,
|
|
55
|
+
count: 'countdown',
|
|
56
|
+
maxlength: 100,
|
|
57
|
+
},
|
|
58
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvTextarea from '@/components/VvTextarea/VvTextarea.vue'
|
|
3
|
+
import { Default } from './Textarea.stories'
|
|
4
|
+
import { defaultArgs, argTypes } from './Textarea.settings'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvTextarea> = {
|
|
7
|
+
title: 'Components/Textarea/Slots',
|
|
8
|
+
component: VvTextarea,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof VvTextarea>
|
|
16
|
+
|
|
17
|
+
export const Before: Story = {
|
|
18
|
+
...Default,
|
|
19
|
+
args: {
|
|
20
|
+
...Default.args,
|
|
21
|
+
before: '<div class="vv-badge vv-badge--sm uppercase">Before</div>',
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const After: Story = {
|
|
26
|
+
...Default,
|
|
27
|
+
args: {
|
|
28
|
+
...Default.args,
|
|
29
|
+
after: '<div class="vv-badge vv-badge--sm uppercase">After</div>',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const Hint: Story = {
|
|
34
|
+
...Default,
|
|
35
|
+
args: {
|
|
36
|
+
...Default.args,
|
|
37
|
+
hint: 'Hint <em class="italic">slot!</em>',
|
|
38
|
+
},
|
|
39
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvTextarea from '@/components/VvTextarea/VvTextarea.vue'
|
|
3
|
+
import { Default } from './Textarea.stories'
|
|
4
|
+
import { defaultArgs, argTypes } from './Textarea.settings'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof VvTextarea> = {
|
|
7
|
+
title: 'Components/Textarea/Icon',
|
|
8
|
+
component: VvTextarea,
|
|
9
|
+
args: defaultArgs,
|
|
10
|
+
argTypes,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default meta
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof VvTextarea>
|
|
16
|
+
|
|
17
|
+
export const DefaultIconPosition: Story = {
|
|
18
|
+
...Default,
|
|
19
|
+
args: {
|
|
20
|
+
...Default.args,
|
|
21
|
+
icon: 'heart',
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const After: Story = {
|
|
26
|
+
...Default,
|
|
27
|
+
args: {
|
|
28
|
+
...Default.args,
|
|
29
|
+
icon: 'heart',
|
|
30
|
+
iconPosition: 'after',
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const Src: Story = {
|
|
35
|
+
...Default,
|
|
36
|
+
args: {
|
|
37
|
+
...Default.args,
|
|
38
|
+
icon: {
|
|
39
|
+
name: 'engineering',
|
|
40
|
+
src: 'https://raw.githubusercontent.com/google/material-design-icons/master/src/social/engineering/materialicons/24px.svg',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { VvTooltipProps } from '@/components/VvTooltip'
|
|
2
2
|
import { DefaultSlotArgTypes, ModifiersArgTypes } from '@/stories/argTypes'
|
|
3
|
+
import type { ArgTypes } from '@storybook/types'
|
|
3
4
|
|
|
4
5
|
export const defaultArgs = {
|
|
5
6
|
...propsToObject(VvTooltipProps),
|
|
6
7
|
value: "I'm a tooltip",
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
export const argTypes = {
|
|
10
|
+
export const argTypes: ArgTypes = {
|
|
10
11
|
...ModifiersArgTypes,
|
|
11
12
|
...DefaultSlotArgTypes,
|
|
12
13
|
position: {
|
|
13
|
-
type:
|
|
14
|
-
summary: 'string',
|
|
15
|
-
},
|
|
14
|
+
type: 'string',
|
|
16
15
|
control: {
|
|
17
16
|
type: 'select',
|
|
18
17
|
},
|
|
19
18
|
table: {
|
|
19
|
+
type: 'string',
|
|
20
20
|
defaultValue: { summary: 'bottom' },
|
|
21
21
|
},
|
|
22
22
|
description: 'Indicates where to place the tooltip',
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvTooltip from '@/components/VvTooltip/VvTooltip.vue'
|
|
3
|
+
import VvButton from '@/components/VvButton/VvButton.vue'
|
|
4
|
+
import { defaultArgs, argTypes } from './Tooltip.settings'
|
|
5
|
+
import { defaultTest } from './Tooltip.test'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof VvTooltip> = {
|
|
8
|
+
title: 'Components/Tooltip',
|
|
9
|
+
component: VvTooltip,
|
|
10
|
+
args: defaultArgs,
|
|
11
|
+
argTypes,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default meta
|
|
16
|
+
|
|
17
|
+
type Story = StoryObj<typeof VvTooltip>
|
|
18
|
+
|
|
19
|
+
export const Default: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
...defaultArgs,
|
|
22
|
+
},
|
|
23
|
+
render: (args) => ({
|
|
24
|
+
components: { VvButton, VvTooltip },
|
|
25
|
+
setup() {
|
|
26
|
+
return { args }
|
|
27
|
+
},
|
|
28
|
+
template: /* html */ `
|
|
29
|
+
<div class="w-full h-150">
|
|
30
|
+
<vv-button class="absolute left-1/2 top-1/2 -translate-1/2" data-testId="parent">
|
|
31
|
+
Hover me
|
|
32
|
+
<vv-tooltip v-bind="args">
|
|
33
|
+
<template #default v-if="args.default"><div v-html="args.default"></div></template>
|
|
34
|
+
</vv-tooltip>
|
|
35
|
+
</vv-button>
|
|
36
|
+
</div>
|
|
37
|
+
`,
|
|
38
|
+
}),
|
|
39
|
+
play: defaultTest,
|
|
40
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import VvTooltip from '@/components/VvTooltip/VvTooltip.vue'
|
|
3
|
+
import VvButton from '@/components/VvButton/VvButton.vue'
|
|
4
|
+
import { defaultArgs, argTypes } from './Tooltip.settings'
|
|
5
|
+
import { defaultTest } from './Tooltip.test'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof VvTooltip> = {
|
|
8
|
+
title: 'Directives/Tooltip',
|
|
9
|
+
component: VvTooltip,
|
|
10
|
+
args: defaultArgs,
|
|
11
|
+
argTypes,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default meta
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof VvTooltip>
|
|
17
|
+
|
|
18
|
+
export const DefaultDirective: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
...defaultArgs,
|
|
21
|
+
},
|
|
22
|
+
render: (args) => ({
|
|
23
|
+
components: { VvButton, VvTooltip },
|
|
24
|
+
setup() {
|
|
25
|
+
return { args }
|
|
26
|
+
},
|
|
27
|
+
template: /* html */ `
|
|
28
|
+
<div class="w-full h-150">
|
|
29
|
+
<vv-button v-tooltip:[args.position]="args.value" class="absolute left-1/2 top-1/2 -translate-1/2" data-testId="parent">
|
|
30
|
+
HOVER Me
|
|
31
|
+
</vv-button>
|
|
32
|
+
</div>
|
|
33
|
+
`,
|
|
34
|
+
}),
|
|
35
|
+
play: defaultTest,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const Top: Story = {
|
|
39
|
+
...DefaultDirective,
|
|
40
|
+
args: {
|
|
41
|
+
...DefaultDirective.args,
|
|
42
|
+
position: 'top',
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const Bottom: Story = {
|
|
47
|
+
...DefaultDirective,
|
|
48
|
+
args: {
|
|
49
|
+
...DefaultDirective.args,
|
|
50
|
+
position: 'bottom',
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const Right: Story = {
|
|
55
|
+
...DefaultDirective,
|
|
56
|
+
args: {
|
|
57
|
+
...DefaultDirective.args,
|
|
58
|
+
position: 'right',
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const Left: Story = {
|
|
63
|
+
...DefaultDirective,
|
|
64
|
+
args: {
|
|
65
|
+
...DefaultDirective.args,
|
|
66
|
+
position: 'left',
|
|
67
|
+
},
|
|
68
|
+
}
|
package/src/stories/argTypes.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Placement, Position, Side } from '../constants'
|
|
|
3
3
|
|
|
4
4
|
export const ValidArgTypes = {
|
|
5
5
|
valid: {
|
|
6
|
-
type: 'boolean',
|
|
7
6
|
description: 'Valid state',
|
|
8
7
|
table: {
|
|
9
8
|
defaultValue: {
|
|
@@ -12,9 +11,6 @@ export const ValidArgTypes = {
|
|
|
12
11
|
},
|
|
13
12
|
},
|
|
14
13
|
validLabel: {
|
|
15
|
-
type: {
|
|
16
|
-
summary: ['string', 'string[]'],
|
|
17
|
-
},
|
|
18
14
|
description: 'Valid hint label',
|
|
19
15
|
control: {
|
|
20
16
|
type: 'text',
|
|
@@ -24,7 +20,6 @@ export const ValidArgTypes = {
|
|
|
24
20
|
|
|
25
21
|
export const InvalidArgTypes = {
|
|
26
22
|
invalid: {
|
|
27
|
-
type: 'boolean',
|
|
28
23
|
description: 'Invalid state',
|
|
29
24
|
table: {
|
|
30
25
|
defaultValue: {
|
|
@@ -33,9 +28,6 @@ export const InvalidArgTypes = {
|
|
|
33
28
|
},
|
|
34
29
|
},
|
|
35
30
|
invalidLabel: {
|
|
36
|
-
type: {
|
|
37
|
-
summary: ['string', 'string[]'],
|
|
38
|
-
},
|
|
39
31
|
description: 'Invalid hint label',
|
|
40
32
|
control: {
|
|
41
33
|
type: 'text',
|
|
@@ -45,7 +37,6 @@ export const InvalidArgTypes = {
|
|
|
45
37
|
|
|
46
38
|
export const LoadingArgTypes = {
|
|
47
39
|
loading: {
|
|
48
|
-
type: 'boolean',
|
|
49
40
|
description: 'Loading state',
|
|
50
41
|
table: {
|
|
51
42
|
defaultValue: {
|
|
@@ -54,9 +45,6 @@ export const LoadingArgTypes = {
|
|
|
54
45
|
},
|
|
55
46
|
},
|
|
56
47
|
loadingLabel: {
|
|
57
|
-
type: {
|
|
58
|
-
summary: 'string',
|
|
59
|
-
},
|
|
60
48
|
description: 'Loading label',
|
|
61
49
|
control: {
|
|
62
50
|
type: 'text',
|
|
@@ -66,8 +54,8 @@ export const LoadingArgTypes = {
|
|
|
66
54
|
|
|
67
55
|
export const DisabledArgTypes = {
|
|
68
56
|
disabled: {
|
|
69
|
-
|
|
70
|
-
description: 'Whether the
|
|
57
|
+
control: 'boolean',
|
|
58
|
+
description: 'Whether the component is disabled',
|
|
71
59
|
table: {
|
|
72
60
|
defaultValue: {
|
|
73
61
|
summary: false,
|
|
@@ -78,7 +66,6 @@ export const DisabledArgTypes = {
|
|
|
78
66
|
|
|
79
67
|
export const ReadonlyArgTypes = {
|
|
80
68
|
readonly: {
|
|
81
|
-
type: 'boolean',
|
|
82
69
|
description: 'The value is not editable',
|
|
83
70
|
table: {
|
|
84
71
|
defaultValue: {
|
|
@@ -90,9 +77,6 @@ export const ReadonlyArgTypes = {
|
|
|
90
77
|
|
|
91
78
|
export const ModifiersArgTypes = {
|
|
92
79
|
modifiers: {
|
|
93
|
-
type: {
|
|
94
|
-
summary: ['string', 'string[]'],
|
|
95
|
-
},
|
|
96
80
|
description: 'Component BEM modifiers',
|
|
97
81
|
options: [],
|
|
98
82
|
control: {
|
|
@@ -123,18 +107,12 @@ export const IconArgTypes = {
|
|
|
123
107
|
|
|
124
108
|
export const OptionsArgTypes = {
|
|
125
109
|
options: {
|
|
126
|
-
type: {
|
|
127
|
-
summary: ['string[]', 'object[]'],
|
|
128
|
-
},
|
|
129
110
|
description: 'List of options',
|
|
130
111
|
control: {
|
|
131
112
|
type: 'array',
|
|
132
113
|
},
|
|
133
114
|
},
|
|
134
115
|
labelKey: {
|
|
135
|
-
type: {
|
|
136
|
-
summary: ['string', 'function'],
|
|
137
|
-
},
|
|
138
116
|
description: 'Key of label in option object',
|
|
139
117
|
control: {
|
|
140
118
|
type: 'text',
|
|
@@ -146,9 +124,6 @@ export const OptionsArgTypes = {
|
|
|
146
124
|
},
|
|
147
125
|
},
|
|
148
126
|
valueKey: {
|
|
149
|
-
type: {
|
|
150
|
-
summary: ['string', 'function'],
|
|
151
|
-
},
|
|
152
127
|
description: 'Key of value in option object',
|
|
153
128
|
control: {
|
|
154
129
|
type: 'text',
|
|
@@ -160,9 +135,6 @@ export const OptionsArgTypes = {
|
|
|
160
135
|
},
|
|
161
136
|
},
|
|
162
137
|
disabledKey: {
|
|
163
|
-
type: {
|
|
164
|
-
summary: ['string', 'function'],
|
|
165
|
-
},
|
|
166
138
|
description: 'Key of disabled in option object',
|
|
167
139
|
control: {
|
|
168
140
|
type: 'text',
|
|
@@ -196,7 +168,6 @@ export const CountArgTypes = {
|
|
|
196
168
|
|
|
197
169
|
export const DebounceArgTypes = {
|
|
198
170
|
debounce: {
|
|
199
|
-
type: 'number',
|
|
200
171
|
description: 'Debounce milliseconds',
|
|
201
172
|
control: {
|
|
202
173
|
type: 'number',
|
|
@@ -247,7 +218,6 @@ export const HintArgTypes = {
|
|
|
247
218
|
|
|
248
219
|
export const TabindexArgTypes = {
|
|
249
220
|
tabindex: {
|
|
250
|
-
type: 'number',
|
|
251
221
|
description: 'Global attribute tabindex',
|
|
252
222
|
control: {
|
|
253
223
|
type: 'number',
|
|
@@ -262,9 +232,6 @@ export const TabindexArgTypes = {
|
|
|
262
232
|
|
|
263
233
|
export const IdNameArgTypes = {
|
|
264
234
|
id: {
|
|
265
|
-
type: {
|
|
266
|
-
summary: ['string', 'number'],
|
|
267
|
-
},
|
|
268
235
|
description: 'Global attribute id.',
|
|
269
236
|
control: {
|
|
270
237
|
type: 'text',
|
|
@@ -276,9 +243,6 @@ export const IdNameArgTypes = {
|
|
|
276
243
|
},
|
|
277
244
|
},
|
|
278
245
|
name: {
|
|
279
|
-
type: {
|
|
280
|
-
summary: 'string',
|
|
281
|
-
},
|
|
282
246
|
description:
|
|
283
247
|
'Name of the form control. Submitted with the form as part of a name/value pair.',
|
|
284
248
|
control: {
|
|
@@ -401,14 +365,14 @@ export const DropdownArgTypes = {
|
|
|
401
365
|
},
|
|
402
366
|
},
|
|
403
367
|
},
|
|
404
|
-
|
|
405
|
-
description: '
|
|
368
|
+
keepOpen: {
|
|
369
|
+
description: 'Keep open dropdown on click outside',
|
|
406
370
|
control: {
|
|
407
371
|
type: 'boolean',
|
|
408
372
|
},
|
|
409
373
|
table: {
|
|
410
374
|
defaultValue: {
|
|
411
|
-
summary:
|
|
375
|
+
summary: false,
|
|
412
376
|
},
|
|
413
377
|
type: {
|
|
414
378
|
summary: 'boolean',
|
|
@@ -433,7 +397,6 @@ export const DropdownArgTypes = {
|
|
|
433
397
|
|
|
434
398
|
export const UnselectableArgTypes = {
|
|
435
399
|
unselectable: {
|
|
436
|
-
type: 'boolean',
|
|
437
400
|
description: 'If true the field will be unselectable',
|
|
438
401
|
table: {
|
|
439
402
|
defaultValue: {
|
|
@@ -445,7 +408,6 @@ export const UnselectableArgTypes = {
|
|
|
445
408
|
|
|
446
409
|
export const FloatingLabelArgTypes = {
|
|
447
410
|
floating: {
|
|
448
|
-
type: 'boolean',
|
|
449
411
|
description: 'If true the label will be floating',
|
|
450
412
|
table: {
|
|
451
413
|
defaultValue: {
|
|
@@ -457,7 +419,6 @@ export const FloatingLabelArgTypes = {
|
|
|
457
419
|
|
|
458
420
|
export const AutofocusArgTypes = {
|
|
459
421
|
autofocus: {
|
|
460
|
-
type: 'boolean',
|
|
461
422
|
description: 'Global attribute autofocus.',
|
|
462
423
|
table: {
|
|
463
424
|
defaultValue: {
|
|
@@ -469,9 +430,6 @@ export const AutofocusArgTypes = {
|
|
|
469
430
|
|
|
470
431
|
export const AutocompleteArgTypes = {
|
|
471
432
|
autocomplete: {
|
|
472
|
-
type: {
|
|
473
|
-
summary: 'string',
|
|
474
|
-
},
|
|
475
433
|
description: 'Hint for for autofill feature.',
|
|
476
434
|
control: {
|
|
477
435
|
type: 'text',
|
|
@@ -501,7 +459,6 @@ export const InputTextareaArgTypes = {
|
|
|
501
459
|
...IconArgTypes,
|
|
502
460
|
...FloatingLabelArgTypes,
|
|
503
461
|
minlength: {
|
|
504
|
-
type: 'number',
|
|
505
462
|
description:
|
|
506
463
|
'Minimum length (number of characters) of value. Available for input types: text, search, url, tel, email, password.',
|
|
507
464
|
control: {
|
|
@@ -509,7 +466,6 @@ export const InputTextareaArgTypes = {
|
|
|
509
466
|
},
|
|
510
467
|
},
|
|
511
468
|
maxlength: {
|
|
512
|
-
type: 'number',
|
|
513
469
|
description:
|
|
514
470
|
'Maximum length (number of characters) of value. Available for input types: text, search, url, tel, email, password, number.',
|
|
515
471
|
control: {
|
|
@@ -517,7 +473,6 @@ export const InputTextareaArgTypes = {
|
|
|
517
473
|
},
|
|
518
474
|
},
|
|
519
475
|
placeholder: {
|
|
520
|
-
type: 'string',
|
|
521
476
|
description:
|
|
522
477
|
'Text that appears in the form control when it has no value set. Available for input types: text, search, url, tel, email, password, number.',
|
|
523
478
|
control: {
|
|
@@ -525,7 +480,6 @@ export const InputTextareaArgTypes = {
|
|
|
525
480
|
},
|
|
526
481
|
},
|
|
527
482
|
required: {
|
|
528
|
-
type: 'boolean',
|
|
529
483
|
description:
|
|
530
484
|
'A value is required or must be check for the form to be submittable. Available for all input types except color.',
|
|
531
485
|
table: {
|
|
@@ -535,7 +489,6 @@ export const InputTextareaArgTypes = {
|
|
|
535
489
|
},
|
|
536
490
|
},
|
|
537
491
|
label: {
|
|
538
|
-
type: 'string',
|
|
539
492
|
description: 'Input label',
|
|
540
493
|
control: {
|
|
541
494
|
type: 'text',
|
|
@@ -552,14 +505,12 @@ export const CheckboxRadioArgTypes = {
|
|
|
552
505
|
...DisabledArgTypes,
|
|
553
506
|
...ReadonlyArgTypes,
|
|
554
507
|
label: {
|
|
555
|
-
type: 'string',
|
|
556
508
|
description: 'Input label',
|
|
557
509
|
control: {
|
|
558
510
|
type: 'text',
|
|
559
511
|
},
|
|
560
512
|
},
|
|
561
513
|
value: {
|
|
562
|
-
type: ['string', 'number', 'boolean'],
|
|
563
514
|
description: 'Input value',
|
|
564
515
|
control: {
|
|
565
516
|
type: 'text',
|
|
@@ -575,16 +526,12 @@ export const CheckboxRadioGroupArgTypes = {
|
|
|
575
526
|
...DisabledArgTypes,
|
|
576
527
|
...ReadonlyArgTypes,
|
|
577
528
|
label: {
|
|
578
|
-
type: 'string',
|
|
579
529
|
description: 'Input label',
|
|
580
530
|
control: {
|
|
581
531
|
type: 'text',
|
|
582
532
|
},
|
|
583
533
|
},
|
|
584
534
|
name: {
|
|
585
|
-
type: {
|
|
586
|
-
summary: 'string',
|
|
587
|
-
},
|
|
588
535
|
description:
|
|
589
536
|
'Name of the form control. Submitted with the form as part of a name/value pair.',
|
|
590
537
|
control: {
|
|
@@ -592,7 +539,6 @@ export const CheckboxRadioGroupArgTypes = {
|
|
|
592
539
|
},
|
|
593
540
|
},
|
|
594
541
|
vertical: {
|
|
595
|
-
type: 'boolean',
|
|
596
542
|
description:
|
|
597
543
|
'If true the options will be displayed vertically instead of horizontally',
|
|
598
544
|
table: {
|