@antify/ui-module 1.1.3
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/LICENSE +21 -0
- package/README.md +74 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +131 -0
- package/dist/module.d.ts +131 -0
- package/dist/module.json +5 -0
- package/dist/module.mjs +339 -0
- package/dist/runtime/assets/tailwind.css +1 -0
- package/dist/runtime/components/AntAccordion.vue +59 -0
- package/dist/runtime/components/AntAccordionItem.vue +66 -0
- package/dist/runtime/components/AntAlert.vue +137 -0
- package/dist/runtime/components/AntDropdown.vue +79 -0
- package/dist/runtime/components/AntIcon.vue +51 -0
- package/dist/runtime/components/AntKeycap.vue +24 -0
- package/dist/runtime/components/AntListGroup.vue +24 -0
- package/dist/runtime/components/AntListGroupItem.vue +81 -0
- package/dist/runtime/components/AntModal.vue +87 -0
- package/dist/runtime/components/AntPagination.vue +201 -0
- package/dist/runtime/components/AntPopover.vue +112 -0
- package/dist/runtime/components/AntSkeleton.vue +38 -0
- package/dist/runtime/components/AntSpinner.vue +95 -0
- package/dist/runtime/components/AntTag.vue +79 -0
- package/dist/runtime/components/AntToast.vue +109 -0
- package/dist/runtime/components/AntToaster.vue +46 -0
- package/dist/runtime/components/AntTooltip.vue +165 -0
- package/dist/runtime/components/Main.stories.mdx +10 -0
- package/dist/runtime/components/__stories/AntAccordion.stories.d.ts +9 -0
- package/dist/runtime/components/__stories/AntAccordion.stories.mjs +97 -0
- package/dist/runtime/components/__stories/AntAlert.stories.d.ts +10 -0
- package/dist/runtime/components/__stories/AntAlert.stories.mjs +75 -0
- package/dist/runtime/components/__stories/AntDropdown.stories.d.ts +6 -0
- package/dist/runtime/components/__stories/AntDropdown.stories.mjs +52 -0
- package/dist/runtime/components/__stories/AntIcon.stories.d.ts +8 -0
- package/dist/runtime/components/__stories/AntIcon.stories.mjs +90 -0
- package/dist/runtime/components/__stories/AntKeycap.stories.d.ts +9 -0
- package/dist/runtime/components/__stories/AntKeycap.stories.mjs +59 -0
- package/dist/runtime/components/__stories/AntListGroup.stories.d.ts +7 -0
- package/dist/runtime/components/__stories/AntListGroup.stories.mjs +36 -0
- package/dist/runtime/components/__stories/AntListGroupItem.stories.d.ts +10 -0
- package/dist/runtime/components/__stories/AntListGroupItem.stories.mjs +62 -0
- package/dist/runtime/components/__stories/AntModal.stories.d.ts +7 -0
- package/dist/runtime/components/__stories/AntModal.stories.mjs +78 -0
- package/dist/runtime/components/__stories/AntPagination.stories.d.ts +8 -0
- package/dist/runtime/components/__stories/AntPagination.stories.mjs +39 -0
- package/dist/runtime/components/__stories/AntPopover.stories.d.ts +6 -0
- package/dist/runtime/components/__stories/AntPopover.stories.mjs +47 -0
- package/dist/runtime/components/__stories/AntSkeleton.stories.d.ts +8 -0
- package/dist/runtime/components/__stories/AntSkeleton.stories.mjs +43 -0
- package/dist/runtime/components/__stories/AntSpinner.stories.d.ts +6 -0
- package/dist/runtime/components/__stories/AntSpinner.stories.mjs +34 -0
- package/dist/runtime/components/__stories/AntTag.stories.d.ts +7 -0
- package/dist/runtime/components/__stories/AntTag.stories.mjs +44 -0
- package/dist/runtime/components/__stories/AntToast.stories.d.ts +8 -0
- package/dist/runtime/components/__stories/AntToast.stories.mjs +66 -0
- package/dist/runtime/components/__stories/AntToaster.stories.d.ts +34 -0
- package/dist/runtime/components/__stories/AntToaster.stories.mjs +42 -0
- package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +6 -0
- package/dist/runtime/components/__stories/AntTooltip.stories.mjs +43 -0
- package/dist/runtime/components/__types/Accordion.types.d.ts +4 -0
- package/dist/runtime/components/__types/Accordion.types.mjs +5 -0
- package/dist/runtime/components/__types/AntIcon.types.d.ts +5 -0
- package/dist/runtime/components/__types/AntIcon.types.mjs +6 -0
- package/dist/runtime/components/__types/AntToaster.types.d.ts +8 -0
- package/dist/runtime/components/__types/AntToaster.types.mjs +0 -0
- package/dist/runtime/components/__types/index.d.ts +2 -0
- package/dist/runtime/components/__types/index.mjs +2 -0
- package/dist/runtime/components/buttons/AntButton.vue +227 -0
- package/dist/runtime/components/buttons/AntCreateButton.vue +32 -0
- package/dist/runtime/components/buttons/AntDeleteButton.vue +32 -0
- package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +32 -0
- package/dist/runtime/components/buttons/AntSaveButton.vue +31 -0
- package/dist/runtime/components/buttons/__stories/AntButton.stories.d.ts +15 -0
- package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +272 -0
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +10 -0
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +57 -0
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +10 -0
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +57 -0
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +10 -0
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +57 -0
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +10 -0
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +57 -0
- package/dist/runtime/components/buttons/__types/AntButton.type.d.ts +4 -0
- package/dist/runtime/components/buttons/__types/AntButton.type.mjs +5 -0
- package/dist/runtime/components/buttons/__types/index.d.ts +1 -0
- package/dist/runtime/components/buttons/__types/index.mjs +1 -0
- package/dist/runtime/components/crud/AntCrud.vue +42 -0
- package/dist/runtime/components/crud/AntCrudDetail.vue +11 -0
- package/dist/runtime/components/crud/AntCrudDetailActions.vue +51 -0
- package/dist/runtime/components/crud/AntCrudDetailNav.vue +51 -0
- package/dist/runtime/components/crud/AntCrudTableFilter.vue +120 -0
- package/dist/runtime/components/crud/AntCrudTableNav.vue +129 -0
- package/dist/runtime/components/crud/__stories/AntCrud.stories.d.ts +6 -0
- package/dist/runtime/components/crud/__stories/AntCrud.stories.mjs +126 -0
- package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.d.ts +7 -0
- package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.mjs +80 -0
- package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.d.ts +6 -0
- package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.mjs +25 -0
- package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.d.ts +6 -0
- package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.mjs +41 -0
- package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.d.ts +6 -0
- package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.mjs +25 -0
- package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.d.ts +8 -0
- package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.mjs +56 -0
- package/dist/runtime/components/dialogs/AntDeleteDialog.vue +29 -0
- package/dist/runtime/components/dialogs/AntDialog.vue +147 -0
- package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.d.ts +6 -0
- package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.mjs +30 -0
- package/dist/runtime/components/dialogs/__stories/AntDialog.stories.d.ts +6 -0
- package/dist/runtime/components/dialogs/__stories/AntDialog.stories.mjs +60 -0
- package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +145 -0
- package/dist/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +91 -0
- package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckbox.stories.d.ts +8 -0
- package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckbox.stories.mjs +286 -0
- package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckboxGroup.stories.d.ts +7 -0
- package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckboxGroup.stories.mjs +96 -0
- package/dist/runtime/components/form/AntCheckboxWidget/__types/AntCheckbox.d.ts +6 -0
- package/dist/runtime/components/form/AntCheckboxWidget/__types/AntCheckbox.mjs +0 -0
- package/dist/runtime/components/form/AntFormGroup.vue +21 -0
- package/dist/runtime/components/form/AntFormGroupLabel.vue +5 -0
- package/dist/runtime/components/form/AntNumberInput.vue +170 -0
- package/dist/runtime/components/form/AntRadioWidget/AntRadio.vue +139 -0
- package/dist/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +80 -0
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.d.ts +8 -0
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.mjs +79 -0
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadioGroup.stories.d.ts +8 -0
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadioGroup.stories.mjs +125 -0
- package/dist/runtime/components/form/AntRadioWidget/__types/AntRadio.type.d.ts +9 -0
- package/dist/runtime/components/form/AntRadioWidget/__types/AntRadio.type.mjs +0 -0
- package/dist/runtime/components/form/AntRangeSlider.vue +81 -0
- package/dist/runtime/components/form/AntRichTextEditor.vue +237 -0
- package/dist/runtime/components/form/AntSearch.vue +76 -0
- package/dist/runtime/components/form/AntSelect.vue +346 -0
- package/dist/runtime/components/form/AntSwitch.vue +145 -0
- package/dist/runtime/components/form/AntSwitcher.vue +184 -0
- package/dist/runtime/components/form/AntTextInput.vue +73 -0
- package/dist/runtime/components/form/AntTextarea.vue +170 -0
- package/dist/runtime/components/form/AntUnitInput.vue +99 -0
- package/dist/runtime/components/form/Elements/AntBaseInput.vue +216 -0
- package/dist/runtime/components/form/Elements/AntDropDown.vue +160 -0
- package/dist/runtime/components/form/Elements/AntField.vue +102 -0
- package/dist/runtime/components/form/Elements/AntInputDescription.vue +55 -0
- package/dist/runtime/components/form/Elements/AntInputLabel.vue +55 -0
- package/dist/runtime/components/form/Elements/AntInputLimiter.vue +55 -0
- package/dist/runtime/components/form/Elements/__stories/AntBaseInput.stories.d.ts +9 -0
- package/dist/runtime/components/form/Elements/__stories/AntBaseInput.stories.mjs +168 -0
- package/dist/runtime/components/form/Elements/__stories/AntField.stories.d.ts +6 -0
- package/dist/runtime/components/form/Elements/__stories/AntField.stories.mjs +80 -0
- package/dist/runtime/components/form/Elements/__stories/AntInputDescription.stories.d.ts +6 -0
- package/dist/runtime/components/form/Elements/__stories/AntInputDescription.stories.mjs +34 -0
- package/dist/runtime/components/form/Elements/__stories/AntInputLabel.stories.d.ts +7 -0
- package/dist/runtime/components/form/Elements/__stories/AntInputLabel.stories.mjs +46 -0
- package/dist/runtime/components/form/Elements/__stories/AntInputLimiter.stories.d.ts +6 -0
- package/dist/runtime/components/form/Elements/__stories/AntInputLimiter.stories.mjs +37 -0
- package/dist/runtime/components/form/Elements/__types/AntBaseInput.type.d.ts +16 -0
- package/dist/runtime/components/form/Elements/__types/AntBaseInput.type.mjs +17 -0
- package/dist/runtime/components/form/Elements/__types/index.d.ts +1 -0
- package/dist/runtime/components/form/Elements/__types/index.mjs +1 -0
- package/dist/runtime/components/form/Elements/index.d.ts +6 -0
- package/dist/runtime/components/form/Elements/index.mjs +12 -0
- package/dist/runtime/components/form/__stories/AntFormGroup.stories.d.ts +6 -0
- package/dist/runtime/components/form/__stories/AntFormGroup.stories.mjs +33 -0
- package/dist/runtime/components/form/__stories/AntFormGroupLabel.stories.d.ts +6 -0
- package/dist/runtime/components/form/__stories/AntFormGroupLabel.stories.mjs +20 -0
- package/dist/runtime/components/form/__stories/AntNumberInput.stories.d.ts +7 -0
- package/dist/runtime/components/form/__stories/AntNumberInput.stories.mjs +67 -0
- package/dist/runtime/components/form/__stories/AntRangeSlider.stories.d.ts +6 -0
- package/dist/runtime/components/form/__stories/AntRangeSlider.stories.mjs +40 -0
- package/dist/runtime/components/form/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
- package/dist/runtime/components/form/__stories/AntRichTextEditor.stories-old.mjs +0 -0
- package/dist/runtime/components/form/__stories/AntSearch.stories.d.ts +6 -0
- package/dist/runtime/components/form/__stories/AntSearch.stories.mjs +43 -0
- package/dist/runtime/components/form/__stories/AntSelect.stories.d.ts +13 -0
- package/dist/runtime/components/form/__stories/AntSelect.stories.mjs +220 -0
- package/dist/runtime/components/form/__stories/AntSwitch.stories.d.ts +8 -0
- package/dist/runtime/components/form/__stories/AntSwitch.stories.mjs +215 -0
- package/dist/runtime/components/form/__stories/AntSwitcher.stories.d.ts +8 -0
- package/dist/runtime/components/form/__stories/AntSwitcher.stories.mjs +225 -0
- package/dist/runtime/components/form/__stories/AntTextInput.stories.d.ts +7 -0
- package/dist/runtime/components/form/__stories/AntTextInput.stories.mjs +68 -0
- package/dist/runtime/components/form/__stories/AntTextarea.stories.d.ts +8 -0
- package/dist/runtime/components/form/__stories/AntTextarea.stories.mjs +128 -0
- package/dist/runtime/components/form/__stories/AntUnitInput.stories.d.ts +8 -0
- package/dist/runtime/components/form/__stories/AntUnitInput.stories.mjs +84 -0
- package/dist/runtime/components/form/__types/AntSelect.type.d.ts +4 -0
- package/dist/runtime/components/form/__types/AntSelect.type.mjs +0 -0
- package/dist/runtime/components/form/__types/AntSwitcher.type.d.ts +4 -0
- package/dist/runtime/components/form/__types/AntSwitcher.type.mjs +0 -0
- package/dist/runtime/components/form/__types/AntTextInput.type.d.ts +7 -0
- package/dist/runtime/components/form/__types/AntTextInput.type.mjs +8 -0
- package/dist/runtime/components/form/__types/index.d.ts +3 -0
- package/dist/runtime/components/form/__types/index.mjs +3 -0
- package/dist/runtime/components/form/index.d.ts +11 -0
- package/dist/runtime/components/form/index.mjs +22 -0
- package/dist/runtime/components/index.d.ts +22 -0
- package/dist/runtime/components/index.mjs +41 -0
- package/dist/runtime/components/layouts/AntNavLeftLayout.vue +36 -0
- package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.d.ts +7 -0
- package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.mjs +68 -0
- package/dist/runtime/components/navbar/AntNavbar.vue +25 -0
- package/dist/runtime/components/navbar/AntNavbarItem.vue +78 -0
- package/dist/runtime/components/navbar/__stories/AntNavbar.stories.d.ts +6 -0
- package/dist/runtime/components/navbar/__stories/AntNavbar.stories.mjs +66 -0
- package/dist/runtime/components/navbar/__types/NavbarItem.d.ts +10 -0
- package/dist/runtime/components/navbar/__types/NavbarItem.mjs +0 -0
- package/dist/runtime/components/table/AntTable.vue +192 -0
- package/dist/runtime/components/table/AntTableSortButton.vue +26 -0
- package/dist/runtime/components/table/AntTd.vue +70 -0
- package/dist/runtime/components/table/AntTh.vue +67 -0
- package/dist/runtime/components/table/__stories/AntTable.stories.d.ts +9 -0
- package/dist/runtime/components/table/__stories/AntTable.stories.mjs +274 -0
- package/dist/runtime/components/table/__types/TableHeader.type.d.ts +31 -0
- package/dist/runtime/components/table/__types/TableHeader.type.mjs +19 -0
- package/dist/runtime/components/tabs/AntTabItem.vue +115 -0
- package/dist/runtime/components/tabs/AntTabs.vue +47 -0
- package/dist/runtime/components/tabs/__stories/AntTabItem.stories.d.ts +6 -0
- package/dist/runtime/components/tabs/__stories/AntTabItem.stories.mjs +32 -0
- package/dist/runtime/components/tabs/__stories/AntTabs.stories.d.ts +9 -0
- package/dist/runtime/components/tabs/__stories/AntTabs.stories.mjs +173 -0
- package/dist/runtime/components/tabs/__types/AntTabItem.types.d.ts +17 -0
- package/dist/runtime/components/tabs/__types/AntTabItem.types.mjs +6 -0
- package/dist/runtime/components/transitions/AntTransitionCollapseHeight.vue +92 -0
- package/dist/runtime/composables/useUi.d.ts +20 -0
- package/dist/runtime/composables/useUi.mjs +31 -0
- package/dist/runtime/composables/useUiClient.d.ts +34 -0
- package/dist/runtime/composables/useUiClient.mjs +61 -0
- package/dist/runtime/composables/useValidator.d.ts +1 -0
- package/dist/runtime/composables/useValidator.mjs +1 -0
- package/dist/runtime/enums/ColorType.enum.d.ts +16 -0
- package/dist/runtime/enums/ColorType.enum.mjs +18 -0
- package/dist/runtime/enums/Direction.enum.d.ts +4 -0
- package/dist/runtime/enums/Direction.enum.mjs +5 -0
- package/dist/runtime/enums/Grouped.enum.d.ts +6 -0
- package/dist/runtime/enums/Grouped.enum.mjs +7 -0
- package/dist/runtime/enums/Position.enum.d.ts +12 -0
- package/dist/runtime/enums/Position.enum.mjs +14 -0
- package/dist/runtime/enums/Size.enum.d.ts +4 -0
- package/dist/runtime/enums/Size.enum.mjs +5 -0
- package/dist/runtime/enums/index.d.ts +4 -0
- package/dist/runtime/enums/index.mjs +4 -0
- package/dist/runtime/env.d.ts +8 -0
- package/dist/runtime/handler.d.ts +1 -0
- package/dist/runtime/handler.mjs +5 -0
- package/dist/runtime/plugins/toaster.d.ts +22 -0
- package/dist/runtime/plugins/toaster.mjs +53 -0
- package/dist/runtime/plugins/ui-module.d.ts +2 -0
- package/dist/runtime/plugins/ui-module.mjs +13 -0
- package/dist/runtime/shims/vue.d.ts +5 -0
- package/dist/runtime/tailwind.config.d.ts +182 -0
- package/dist/runtime/tailwind.config.mjs +196 -0
- package/dist/runtime/types/AntListGroupItem.type.d.ts +11 -0
- package/dist/runtime/types/AntListGroupItem.type.mjs +12 -0
- package/dist/runtime/types/AntTag.type.d.ts +8 -0
- package/dist/runtime/types/AntTag.type.mjs +9 -0
- package/dist/runtime/types/Checkbox.type.d.ts +8 -0
- package/dist/runtime/types/Checkbox.type.mjs +0 -0
- package/dist/runtime/types/NavItem.type.d.ts +9 -0
- package/dist/runtime/types/NavItem.type.mjs +0 -0
- package/dist/runtime/types/RadioButton.type.d.ts +5 -0
- package/dist/runtime/types/RadioButton.type.mjs +0 -0
- package/dist/runtime/types/Tabs.type.d.ts +6 -0
- package/dist/runtime/types/Tabs.type.mjs +0 -0
- package/dist/runtime/types/Toaster.type.d.ts +6 -0
- package/dist/runtime/types/Toaster.type.mjs +0 -0
- package/dist/runtime/types/index.d.ts +7 -0
- package/dist/runtime/types/index.mjs +7 -0
- package/dist/runtime/types.d.ts +7 -0
- package/dist/runtime/types.mjs +7 -0
- package/dist/runtime/utils/helper.d.ts +4 -0
- package/dist/runtime/utils/helper.mjs +12 -0
- package/dist/runtime/utils.d.ts +14 -0
- package/dist/runtime/utils.mjs +20 -0
- package/dist/types.d.mts +8 -0
- package/dist/types.d.ts +8 -0
- package/package.json +81 -0
- package/src/runtime/components/AntAccordion.vue +59 -0
- package/src/runtime/components/AntAccordionItem.vue +104 -0
- package/src/runtime/components/AntAlert.vue +137 -0
- package/src/runtime/components/AntDropdown.vue +100 -0
- package/src/runtime/components/AntIcon.vue +51 -0
- package/src/runtime/components/AntKeycap.vue +24 -0
- package/src/runtime/components/AntListGroup.vue +24 -0
- package/src/runtime/components/AntListGroupItem.vue +81 -0
- package/src/runtime/components/AntModal.vue +129 -0
- package/src/runtime/components/AntPagination.vue +201 -0
- package/src/runtime/components/AntPopover.vue +133 -0
- package/src/runtime/components/AntSkeleton.vue +38 -0
- package/src/runtime/components/AntSpinner.vue +95 -0
- package/src/runtime/components/AntTag.vue +79 -0
- package/src/runtime/components/AntToast.vue +109 -0
- package/src/runtime/components/AntToaster.vue +71 -0
- package/src/runtime/components/AntTooltip.vue +165 -0
- package/src/runtime/components/buttons/AntButton.vue +227 -0
- package/src/runtime/components/buttons/AntCreateButton.vue +32 -0
- package/src/runtime/components/buttons/AntDeleteButton.vue +32 -0
- package/src/runtime/components/buttons/AntSaveAndNewButton.vue +32 -0
- package/src/runtime/components/buttons/AntSaveButton.vue +31 -0
- package/src/runtime/components/crud/AntCrud.vue +66 -0
- package/src/runtime/components/crud/AntCrudDetail.vue +11 -0
- package/src/runtime/components/crud/AntCrudDetailActions.vue +51 -0
- package/src/runtime/components/crud/AntCrudDetailNav.vue +51 -0
- package/src/runtime/components/crud/AntCrudTableFilter.vue +120 -0
- package/src/runtime/components/crud/AntCrudTableNav.vue +129 -0
- package/src/runtime/components/dialogs/AntDeleteDialog.vue +29 -0
- package/src/runtime/components/dialogs/AntDialog.vue +181 -0
- package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +167 -0
- package/src/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +91 -0
- package/src/runtime/components/form/AntFormGroup.vue +21 -0
- package/src/runtime/components/form/AntFormGroupLabel.vue +5 -0
- package/src/runtime/components/form/AntNumberInput.vue +170 -0
- package/src/runtime/components/form/AntRadioWidget/AntRadio.vue +164 -0
- package/src/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +80 -0
- package/src/runtime/components/form/AntRangeSlider.vue +101 -0
- package/src/runtime/components/form/AntRichTextEditor.vue +237 -0
- package/src/runtime/components/form/AntSearch.vue +76 -0
- package/src/runtime/components/form/AntSelect.vue +346 -0
- package/src/runtime/components/form/AntSwitch.vue +145 -0
- package/src/runtime/components/form/AntSwitcher.vue +200 -0
- package/src/runtime/components/form/AntTextInput.vue +73 -0
- package/src/runtime/components/form/AntTextarea.vue +170 -0
- package/src/runtime/components/form/AntUnitInput.vue +99 -0
- package/src/runtime/components/form/Elements/AntBaseInput.vue +247 -0
- package/src/runtime/components/form/Elements/AntDropDown.vue +160 -0
- package/src/runtime/components/form/Elements/AntField.vue +102 -0
- package/src/runtime/components/form/Elements/AntInputDescription.vue +55 -0
- package/src/runtime/components/form/Elements/AntInputLabel.vue +55 -0
- package/src/runtime/components/form/Elements/AntInputLimiter.vue +55 -0
- package/src/runtime/components/layouts/AntNavLeftLayout.vue +36 -0
- package/src/runtime/components/navbar/AntNavbar.vue +25 -0
- package/src/runtime/components/navbar/AntNavbarItem.vue +78 -0
- package/src/runtime/components/table/AntTable.vue +192 -0
- package/src/runtime/components/table/AntTableSortButton.vue +26 -0
- package/src/runtime/components/table/AntTd.vue +70 -0
- package/src/runtime/components/table/AntTh.vue +67 -0
- package/src/runtime/components/tabs/AntTabItem.vue +115 -0
- package/src/runtime/components/tabs/AntTabs.vue +47 -0
- package/src/runtime/components/transitions/AntTransitionCollapseHeight.vue +96 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { computed, ref } from "vue";
|
|
2
|
+
import { Size } from "../../../enums/index.mjs";
|
|
3
|
+
import { useFieldValidator } from "@antify/validate";
|
|
4
|
+
import { InputColorType } from "../../../enums/index.mjs";
|
|
5
|
+
import { AntSwitcher } from "../index.mjs";
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Components/Forms/Switcher",
|
|
8
|
+
component: AntSwitcher,
|
|
9
|
+
argTypes: {
|
|
10
|
+
modelValue: {
|
|
11
|
+
control: "text"
|
|
12
|
+
},
|
|
13
|
+
options: {
|
|
14
|
+
table: {
|
|
15
|
+
type: {
|
|
16
|
+
summary: "string | SwitcherOption[]",
|
|
17
|
+
detail: `
|
|
18
|
+
type SwitcherOption = {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string | number;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
`
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
colorType: {
|
|
28
|
+
control: { type: "select" },
|
|
29
|
+
options: Object.values(InputColorType)
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
control: { type: "select" },
|
|
33
|
+
options: Object.values(Size)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
export const Docs = {
|
|
39
|
+
render: (args) => ({
|
|
40
|
+
components: { AntSwitcher },
|
|
41
|
+
setup() {
|
|
42
|
+
const modelValue = computed({
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
get: () => args.modelValue,
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
set: (val) => args.modelValue = val
|
|
47
|
+
});
|
|
48
|
+
return { args, modelValue };
|
|
49
|
+
},
|
|
50
|
+
template: `
|
|
51
|
+
<AntSwitcher v-bind="args" v-model="modelValue"/>
|
|
52
|
+
`
|
|
53
|
+
}),
|
|
54
|
+
args: {
|
|
55
|
+
options: [
|
|
56
|
+
{
|
|
57
|
+
label: "Entry 1",
|
|
58
|
+
value: "entry-1"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: "Entry 2",
|
|
62
|
+
value: "entry-2"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: "Entry 3",
|
|
66
|
+
value: "entry-3"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Entry 4",
|
|
70
|
+
value: "entry-4"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
modelValue: "entry-1"
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export const withValidator = {
|
|
77
|
+
render: Docs.render,
|
|
78
|
+
args: {
|
|
79
|
+
...Docs.args,
|
|
80
|
+
validator: useFieldValidator([
|
|
81
|
+
(val) => {
|
|
82
|
+
return val.value !== "entry-1" || "Select something else";
|
|
83
|
+
}
|
|
84
|
+
])
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export const Summary = {
|
|
88
|
+
render: (args) => ({
|
|
89
|
+
components: { AntSwitcher },
|
|
90
|
+
setup() {
|
|
91
|
+
const modelValue = computed({
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
get: () => args.modelValue,
|
|
94
|
+
// @ts-ignore
|
|
95
|
+
set: (val) => args.modelValue = val
|
|
96
|
+
});
|
|
97
|
+
const skeleton = ref(true);
|
|
98
|
+
return { args, modelValue, InputColorType, skeleton };
|
|
99
|
+
},
|
|
100
|
+
template: `
|
|
101
|
+
<div class="flex flex-col gap-5 ">
|
|
102
|
+
<div class="flex gap-2.5">
|
|
103
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :color-type="InputColorType.base"/>
|
|
104
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :color-type="InputColorType.info"/>
|
|
105
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :color-type="InputColorType.success"/>
|
|
106
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :color-type="InputColorType.warning"/>
|
|
107
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :color-type="InputColorType.danger"/>
|
|
108
|
+
</div>
|
|
109
|
+
<div class="flex gap-2.5">
|
|
110
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label" :color-type="InputColorType.base"/>
|
|
111
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label" :color-type="InputColorType.info"/>
|
|
112
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label" :color-type="InputColorType.success"/>
|
|
113
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label" :color-type="InputColorType.warning"/>
|
|
114
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label" :color-type="InputColorType.danger"/>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="flex gap-2.5">
|
|
117
|
+
<AntSwitcher v-bind="args" v-model="modelValue"
|
|
118
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
119
|
+
:color-type="InputColorType.base"/>
|
|
120
|
+
<AntSwitcher v-bind="args" v-model="modelValue"
|
|
121
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
122
|
+
:color-type="InputColorType.info"/>
|
|
123
|
+
<AntSwitcher v-bind="args" v-model="modelValue"
|
|
124
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
125
|
+
:color-type="InputColorType.success"/>
|
|
126
|
+
<AntSwitcher v-bind="args" v-model="modelValue"
|
|
127
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
128
|
+
:color-type="InputColorType.warning"/>
|
|
129
|
+
<AntSwitcher v-bind="args" v-model="modelValue"
|
|
130
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
131
|
+
:color-type="InputColorType.danger"/>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="flex gap-2.5">
|
|
134
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label"
|
|
135
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
136
|
+
:color-type="InputColorType.base"/>
|
|
137
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label"
|
|
138
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
139
|
+
:color-type="InputColorType.info"/>
|
|
140
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label"
|
|
141
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
142
|
+
:color-type="InputColorType.success"/>
|
|
143
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label"
|
|
144
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
145
|
+
:color-type="InputColorType.warning"/>
|
|
146
|
+
<AntSwitcher v-bind="args" v-model="modelValue" label="Label"
|
|
147
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
148
|
+
:color-type="InputColorType.danger"/>
|
|
149
|
+
</div>
|
|
150
|
+
<div class="flex gap-2.5">
|
|
151
|
+
<AntSwitcher v-bind="args" v-model="modelValue" readonly label="Label"
|
|
152
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
153
|
+
:color-type="InputColorType.base"/>
|
|
154
|
+
<AntSwitcher v-bind="args" v-model="modelValue" readonly label="Label"
|
|
155
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
156
|
+
:color-type="InputColorType.info"/>
|
|
157
|
+
<AntSwitcher v-bind="args" v-model="modelValue" readonly label="Label"
|
|
158
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
159
|
+
:color-type="InputColorType.success"/>
|
|
160
|
+
<AntSwitcher v-bind="args" v-model="modelValue" readonly label="Label"
|
|
161
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
162
|
+
:color-type="InputColorType.warning"/>
|
|
163
|
+
<AntSwitcher v-bind="args" v-model="modelValue" readonly label="Label"
|
|
164
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
165
|
+
:color-type="InputColorType.danger"/>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="flex gap-2.5">
|
|
168
|
+
<AntSwitcher v-bind="args" v-model="modelValue" disabled label="Label"
|
|
169
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
170
|
+
:color-type="InputColorType.base"/>
|
|
171
|
+
<AntSwitcher v-bind="args" v-model="modelValue" disabled label="Label"
|
|
172
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
173
|
+
:color-type="InputColorType.info"/>
|
|
174
|
+
<AntSwitcher v-bind="args" v-model="modelValue" disabled label="Label"
|
|
175
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
176
|
+
:color-type="InputColorType.success"/>
|
|
177
|
+
<AntSwitcher v-bind="args" v-model="modelValue" disabled label="Label"
|
|
178
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
179
|
+
:color-type="InputColorType.warning"/>
|
|
180
|
+
<AntSwitcher v-bind="args" v-model="modelValue" disabled label="Label"
|
|
181
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
182
|
+
:color-type="InputColorType.danger"/>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="flex gap-2.5">
|
|
185
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
186
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
187
|
+
:color-type="InputColorType.base"/>
|
|
188
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
189
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
190
|
+
:color-type="InputColorType.info"/>
|
|
191
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
192
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
193
|
+
:color-type="InputColorType.success"/>
|
|
194
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
195
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
196
|
+
:color-type="InputColorType.warning"/>
|
|
197
|
+
<AntSwitcher v-bind="args" v-model="modelValue" :skeleton="true" label="Label"
|
|
198
|
+
description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
199
|
+
:color-type="InputColorType.danger"/>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
`
|
|
203
|
+
}),
|
|
204
|
+
args: {
|
|
205
|
+
options: [
|
|
206
|
+
{
|
|
207
|
+
label: "Entry 1",
|
|
208
|
+
value: "entry-1"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
label: "Entry 2",
|
|
212
|
+
value: "entry-2"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: "Entry 3",
|
|
216
|
+
value: "entry-3"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
label: "Entry 4",
|
|
220
|
+
value: "entry-4"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
modelValue: "entry-1"
|
|
224
|
+
}
|
|
225
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntTextInput from '../AntTextInput.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntTextInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntTextInput>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const limited: Story;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Size } from "../../../enums/Size.enum.mjs";
|
|
2
|
+
import AntTextInput from "../AntTextInput.vue";
|
|
3
|
+
import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validate";
|
|
4
|
+
import { TextInputType } from "../__types/AntTextInput.type.mjs";
|
|
5
|
+
import { InputColorType } from "../../../enums/index.mjs";
|
|
6
|
+
import { reactive } from "vue";
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Components/Forms/Text Input",
|
|
9
|
+
component: AntTextInput,
|
|
10
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
11
|
+
argTypes: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
control: "text",
|
|
14
|
+
table: { type: { summary: "string|null" } }
|
|
15
|
+
},
|
|
16
|
+
colorType: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.values(InputColorType)
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
control: { type: "radio" },
|
|
22
|
+
options: Object.values(Size),
|
|
23
|
+
table: { defaultValue: { summary: Size.md } }
|
|
24
|
+
},
|
|
25
|
+
placeholder: {
|
|
26
|
+
table: { defaultValue: { summary: "this.label" } }
|
|
27
|
+
},
|
|
28
|
+
type: {
|
|
29
|
+
control: { type: "select" },
|
|
30
|
+
options: Object.values(TextInputType),
|
|
31
|
+
table: { defaultValue: { summary: TextInputType.text } }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
export const Docs = {
|
|
37
|
+
render: (args) => ({
|
|
38
|
+
components: { AntTextInput },
|
|
39
|
+
setup() {
|
|
40
|
+
const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
|
|
41
|
+
return { args, validator };
|
|
42
|
+
},
|
|
43
|
+
template: `
|
|
44
|
+
<AntTextInput
|
|
45
|
+
v-bind="args"
|
|
46
|
+
v-model="args.modelValue"
|
|
47
|
+
:errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
|
|
48
|
+
@validate="(val) => validator.validate(val)"
|
|
49
|
+
/>`
|
|
50
|
+
}),
|
|
51
|
+
args: {
|
|
52
|
+
modelValue: null,
|
|
53
|
+
label: "Label",
|
|
54
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
export const limited = {
|
|
58
|
+
render: Docs.render,
|
|
59
|
+
args: {
|
|
60
|
+
...Docs.args,
|
|
61
|
+
modelValue: "A to long value",
|
|
62
|
+
max: 10,
|
|
63
|
+
limiter: true,
|
|
64
|
+
validator: useFieldValidator([
|
|
65
|
+
(val) => val.length <= 10 || "Max. 10 characters allowed"
|
|
66
|
+
])
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntTextarea from '../AntTextarea.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntTextarea>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntTextarea>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const limited: Story;
|
|
8
|
+
export declare const summary: Story;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validate";
|
|
2
|
+
import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
|
|
3
|
+
import { Size } from "../../../enums/Size.enum.mjs";
|
|
4
|
+
import AntTextarea from "../AntTextarea.vue";
|
|
5
|
+
import { InputColorType } from "../../../enums/index.mjs";
|
|
6
|
+
import { reactive } from "vue";
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Components/Forms/Textarea",
|
|
9
|
+
component: AntTextarea,
|
|
10
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
11
|
+
argTypes: {
|
|
12
|
+
colorType: {
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
options: Object.values(InputColorType)
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
control: { type: "radio" },
|
|
18
|
+
options: Object.values(Size)
|
|
19
|
+
},
|
|
20
|
+
placeholder: {
|
|
21
|
+
table: { defaultValue: { summary: "this.label" } }
|
|
22
|
+
},
|
|
23
|
+
grouped: {
|
|
24
|
+
control: { type: "select" },
|
|
25
|
+
options: Object.values(_Grouped),
|
|
26
|
+
description: "Where is this fields position in a group"
|
|
27
|
+
},
|
|
28
|
+
wrapperClass: {
|
|
29
|
+
control: "text",
|
|
30
|
+
description: 'Class for the first element because the attribute "class" would affect the input element.',
|
|
31
|
+
table: { type: { summary: "string|object" } }
|
|
32
|
+
},
|
|
33
|
+
showIcon: {
|
|
34
|
+
control: "boolean",
|
|
35
|
+
description: "Some InputColorTypes can has an icon. Control with this property if it get shown or not.",
|
|
36
|
+
table: { type: { summary: "Type" } }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
41
|
+
export const Docs = {
|
|
42
|
+
render: (args) => ({
|
|
43
|
+
components: { AntTextarea },
|
|
44
|
+
setup: () => {
|
|
45
|
+
const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
|
|
46
|
+
return { args, validator };
|
|
47
|
+
},
|
|
48
|
+
template: `
|
|
49
|
+
<AntTextarea
|
|
50
|
+
v-bind="args"
|
|
51
|
+
v-model="args.modelValue"
|
|
52
|
+
:errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
|
|
53
|
+
@validate="val => validator.validate(val)"
|
|
54
|
+
/>
|
|
55
|
+
`
|
|
56
|
+
}),
|
|
57
|
+
args: {
|
|
58
|
+
modelValue: null,
|
|
59
|
+
label: "Label",
|
|
60
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export const limited = {
|
|
64
|
+
render: (args) => ({
|
|
65
|
+
components: { AntTextarea },
|
|
66
|
+
setup: () => {
|
|
67
|
+
const validator = reactive(useFieldValidator(
|
|
68
|
+
(val) => val?.length <= 10 || "Max. 10 characters allowed"
|
|
69
|
+
));
|
|
70
|
+
return { args, validator };
|
|
71
|
+
},
|
|
72
|
+
template: `
|
|
73
|
+
<AntTextarea
|
|
74
|
+
v-bind="args"
|
|
75
|
+
v-model="args.modelValue"
|
|
76
|
+
:errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
|
|
77
|
+
@validate="(val) => validator.validate(val)"
|
|
78
|
+
/>
|
|
79
|
+
`
|
|
80
|
+
}),
|
|
81
|
+
args: {
|
|
82
|
+
...Docs.args,
|
|
83
|
+
modelValue: "A to long value",
|
|
84
|
+
limiter: true,
|
|
85
|
+
max: 10
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
export const summary = {
|
|
89
|
+
render: (args, ctx) => ({
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
components: Docs.render(args, ctx).components,
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
setup: Docs.render(args, ctx).setup,
|
|
94
|
+
template: `
|
|
95
|
+
<div class="pb-10 flex flex-col gap-2">
|
|
96
|
+
<div class="flex gap-2">
|
|
97
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" color-type="base"/>
|
|
98
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" color-type="info"/>
|
|
99
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" color-type="success"/>
|
|
100
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" color-type="warning"/>
|
|
101
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" color-type="danger"/>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div class="flex gap-2">
|
|
105
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="base"/>
|
|
106
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="info"/>
|
|
107
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="success"/>
|
|
108
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="warning"/>
|
|
109
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="danger"/>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div class="flex gap-2">
|
|
113
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="base"/>
|
|
114
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="info"/>
|
|
115
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="success"/>
|
|
116
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="warning"/>
|
|
117
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="danger"/>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div class="flex gap-[-2px]">
|
|
121
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" grouped="left"/>
|
|
122
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" grouped="center" color-type="danger"/>
|
|
123
|
+
<AntTextarea v-bind="args" v-model:value="modelValue" grouped="right" color-type="info"/>
|
|
124
|
+
</div>
|
|
125
|
+
</div>`
|
|
126
|
+
}),
|
|
127
|
+
args: Docs.args
|
|
128
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntUnitInput from '../AntUnitInput.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntUnitInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntUnitInput>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const Limited: Story;
|
|
8
|
+
export declare const UnitAsIcon: Story;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Size } from "../../../enums/Size.enum.mjs";
|
|
2
|
+
import AntUnitInput from "../AntUnitInput.vue";
|
|
3
|
+
import { faEuroSign } from "@fortawesome/free-solid-svg-icons";
|
|
4
|
+
import { InputColorType } from "../../../enums/index.mjs";
|
|
5
|
+
import { isRequiredRule, useFieldValidator } from "@antify/validate";
|
|
6
|
+
import { reactive } from "vue";
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Components/Forms/Unit Input",
|
|
9
|
+
component: AntUnitInput,
|
|
10
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
11
|
+
argTypes: {
|
|
12
|
+
modelValue: {
|
|
13
|
+
table: { type: { summary: "number|null" } }
|
|
14
|
+
},
|
|
15
|
+
unit: {
|
|
16
|
+
control: "text",
|
|
17
|
+
description: "Will be displayed right to the input.<br>Use text or Font-awesome Icons.",
|
|
18
|
+
table: { type: { summary: "string|IconDefinition" } }
|
|
19
|
+
},
|
|
20
|
+
colorType: {
|
|
21
|
+
control: { type: "select" },
|
|
22
|
+
options: Object.values(InputColorType)
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
control: { type: "radio" },
|
|
26
|
+
options: Object.values(Size)
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
table: { defaultValue: { summary: "this.label" } }
|
|
30
|
+
},
|
|
31
|
+
wrapperClass: {
|
|
32
|
+
control: "text",
|
|
33
|
+
description: 'Class for the first element because the attribute "class" would affect the input element.',
|
|
34
|
+
table: { type: { summary: "string|object" } }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
export const Docs = {
|
|
40
|
+
render: (args) => ({
|
|
41
|
+
components: { AntUnitInput },
|
|
42
|
+
setup() {
|
|
43
|
+
const validator = reactive(useFieldValidator([
|
|
44
|
+
isRequiredRule,
|
|
45
|
+
(val) => typeof val !== "number" || val <= 8 || "Value should not be bigger than 8"
|
|
46
|
+
]));
|
|
47
|
+
return { args, validator };
|
|
48
|
+
},
|
|
49
|
+
template: `
|
|
50
|
+
<AntUnitInput
|
|
51
|
+
v-bind="args"
|
|
52
|
+
v-model="args.modelValue"
|
|
53
|
+
:unit="args.unit"
|
|
54
|
+
:errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
|
|
55
|
+
@validate="(val) => validator.validate(val)"
|
|
56
|
+
/>`
|
|
57
|
+
}),
|
|
58
|
+
args: {
|
|
59
|
+
modelValue: null,
|
|
60
|
+
unit: "\u20AC",
|
|
61
|
+
label: "Label",
|
|
62
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
export const Limited = {
|
|
66
|
+
render: Docs.render,
|
|
67
|
+
args: {
|
|
68
|
+
...Docs.args,
|
|
69
|
+
modelValue: 50,
|
|
70
|
+
limiter: true,
|
|
71
|
+
max: 10,
|
|
72
|
+
validator: useFieldValidator([
|
|
73
|
+
(val) => val <= 10 || "Value should not be bigger than 10",
|
|
74
|
+
(val) => val <= 11 || "It should be really not bigger than 10!!!!"
|
|
75
|
+
])
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
export const UnitAsIcon = {
|
|
79
|
+
render: Docs.render,
|
|
80
|
+
args: {
|
|
81
|
+
...Docs.args,
|
|
82
|
+
unit: faEuroSign
|
|
83
|
+
}
|
|
84
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var TextInputType = /* @__PURE__ */ ((TextInputType2) => {
|
|
2
|
+
TextInputType2["email"] = "email";
|
|
3
|
+
TextInputType2["password"] = "password";
|
|
4
|
+
TextInputType2["tel"] = "tel";
|
|
5
|
+
TextInputType2["text"] = "text";
|
|
6
|
+
TextInputType2["url"] = "url";
|
|
7
|
+
return TextInputType2;
|
|
8
|
+
})(TextInputType || {});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import AntButton from '../buttons/AntButton.vue';
|
|
2
|
+
import AntNumberInput from './AntNumberInput.vue';
|
|
3
|
+
import AntRangeSlider from './AntRangeSlider.vue';
|
|
4
|
+
import AntSwitcher from './AntSwitcher.vue';
|
|
5
|
+
import AntSearch from './AntSearch.vue';
|
|
6
|
+
import AntSelect from './AntSelect.vue';
|
|
7
|
+
import AntSwitch from './AntSwitch.vue';
|
|
8
|
+
import AntTextarea from './AntTextarea.vue';
|
|
9
|
+
import AntTextInput from './AntTextInput.vue';
|
|
10
|
+
import AntUnitInput from './AntUnitInput.vue';
|
|
11
|
+
export { AntButton, AntNumberInput, AntRangeSlider, AntSwitcher, AntSearch, AntSelect, AntSwitch, AntTextarea, AntTextInput, AntUnitInput, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import AntButton from "../buttons/AntButton.vue";
|
|
2
|
+
import AntNumberInput from "./AntNumberInput.vue";
|
|
3
|
+
import AntRangeSlider from "./AntRangeSlider.vue";
|
|
4
|
+
import AntSwitcher from "./AntSwitcher.vue";
|
|
5
|
+
import AntSearch from "./AntSearch.vue";
|
|
6
|
+
import AntSelect from "./AntSelect.vue";
|
|
7
|
+
import AntSwitch from "./AntSwitch.vue";
|
|
8
|
+
import AntTextarea from "./AntTextarea.vue";
|
|
9
|
+
import AntTextInput from "./AntTextInput.vue";
|
|
10
|
+
import AntUnitInput from "./AntUnitInput.vue";
|
|
11
|
+
export {
|
|
12
|
+
AntButton,
|
|
13
|
+
AntNumberInput,
|
|
14
|
+
AntRangeSlider,
|
|
15
|
+
AntSwitcher,
|
|
16
|
+
AntSearch,
|
|
17
|
+
AntSelect,
|
|
18
|
+
AntSwitch,
|
|
19
|
+
AntTextarea,
|
|
20
|
+
AntTextInput,
|
|
21
|
+
AntUnitInput
|
|
22
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import AntAccordion from './AntAccordion.vue';
|
|
2
|
+
import AntAccordionItem from './AntAccordionItem.vue';
|
|
3
|
+
import AntAlert from './AntAlert.vue';
|
|
4
|
+
import AntDropdown from './AntDropdown.vue';
|
|
5
|
+
import AntIcon from './AntIcon.vue';
|
|
6
|
+
import AntKeycap from './AntKeycap.vue';
|
|
7
|
+
import AntListGroup from './AntListGroup.vue';
|
|
8
|
+
import AntListGroupItem from './AntListGroupItem.vue';
|
|
9
|
+
import AntModal from './AntModal.vue';
|
|
10
|
+
import AntPagination from './AntPagination.vue';
|
|
11
|
+
import AntPopover from './AntPopover.vue';
|
|
12
|
+
import AntCrudTableFilter from './crud/AntCrudTableFilter.vue';
|
|
13
|
+
import AntSkeleton from './AntSkeleton.vue';
|
|
14
|
+
import AntSpinner from './AntSpinner.vue';
|
|
15
|
+
import AntTableNav from './crud/AntCrudTableNav.vue';
|
|
16
|
+
import AntTag from './AntTag.vue';
|
|
17
|
+
import AntToast from './AntToast.vue';
|
|
18
|
+
import AntTooltip from './AntTooltip.vue';
|
|
19
|
+
export * from './deprecated/elements';
|
|
20
|
+
export * from './form';
|
|
21
|
+
export * from './form/Elements';
|
|
22
|
+
export { AntAccordion, AntAccordionItem, AntAlert, AntDropdown, AntIcon, AntKeycap, AntListGroup, AntListGroupItem, AntModal, AntPagination, AntPopover, AntCrudTableFilter, AntSkeleton, AntSpinner, AntTableNav, AntTag, AntToast, AntTooltip };
|