@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,168 @@
|
|
|
1
|
+
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
2
|
+
import { BaseInputType } from "../__types/AntBaseInput.type.mjs";
|
|
3
|
+
import AntBaseInput from "../AntBaseInput.vue";
|
|
4
|
+
import AntButton from "../../../buttons/AntButton.vue";
|
|
5
|
+
import { Grouped as _Grouped } from "../../../../enums/Grouped.enum.mjs";
|
|
6
|
+
import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validate";
|
|
7
|
+
import { computed, reactive } from "vue";
|
|
8
|
+
import { faSearch } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
+
import { InputColorType } from "../../../../enums/index.mjs";
|
|
10
|
+
const meta = {
|
|
11
|
+
title: "Components/Forms/Elements/Base Input",
|
|
12
|
+
component: AntBaseInput,
|
|
13
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
14
|
+
argTypes: {
|
|
15
|
+
value: {
|
|
16
|
+
control: { type: "text" },
|
|
17
|
+
table: { type: { summary: "string|number|null" } }
|
|
18
|
+
},
|
|
19
|
+
type: {
|
|
20
|
+
control: { type: "select" },
|
|
21
|
+
options: Object.values(BaseInputType),
|
|
22
|
+
table: { defaultValue: { summary: BaseInputType.text } }
|
|
23
|
+
},
|
|
24
|
+
colorType: {
|
|
25
|
+
control: { type: "select" },
|
|
26
|
+
options: Object.values(InputColorType)
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
control: { type: "radio" },
|
|
30
|
+
options: Object.values(Size),
|
|
31
|
+
table: { defaultValue: { summary: Size.md } }
|
|
32
|
+
},
|
|
33
|
+
placeholder: {
|
|
34
|
+
control: "text",
|
|
35
|
+
table: { defaultValue: { summary: "this.label" } }
|
|
36
|
+
},
|
|
37
|
+
grouped: {
|
|
38
|
+
control: { type: "select" },
|
|
39
|
+
options: Object.values(_Grouped),
|
|
40
|
+
description: "Where is this fields position in a group",
|
|
41
|
+
table: { defaultValue: { summary: _Grouped.none } }
|
|
42
|
+
},
|
|
43
|
+
wrapperClass: {
|
|
44
|
+
control: "text",
|
|
45
|
+
description: 'Class for the first element because the attribute "class" would affect the input element.',
|
|
46
|
+
table: { type: { summary: "string|object" } }
|
|
47
|
+
},
|
|
48
|
+
showIcon: {
|
|
49
|
+
control: "boolean",
|
|
50
|
+
description: "Some InputColorTypes can have an icon. Control with this property if it gets shown or not."
|
|
51
|
+
},
|
|
52
|
+
iconLeft: {
|
|
53
|
+
control: { type: "none" },
|
|
54
|
+
description: "Will be displayed left to the input text.<br>Use Font-awesome Icons."
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export default meta;
|
|
59
|
+
export const Docs = {
|
|
60
|
+
render: (args) => ({
|
|
61
|
+
components: { AntBaseInput },
|
|
62
|
+
setup: () => {
|
|
63
|
+
const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
|
|
64
|
+
return { args, validator };
|
|
65
|
+
},
|
|
66
|
+
template: `
|
|
67
|
+
<AntBaseInput
|
|
68
|
+
v-bind="args"
|
|
69
|
+
v-model:value="args.value"
|
|
70
|
+
:has-errors="typeof args.hasErrors === 'boolean' ? args.hasErrors : validator.hasErrors()"
|
|
71
|
+
@validate="(val) => validator.validate(val)"
|
|
72
|
+
/>`
|
|
73
|
+
}),
|
|
74
|
+
args: {
|
|
75
|
+
value: null,
|
|
76
|
+
placeholder: "Placeholder"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
export const withValidator = {
|
|
80
|
+
render: (args) => ({
|
|
81
|
+
components: { AntBaseInput },
|
|
82
|
+
setup: () => {
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
args.skeleton = false;
|
|
85
|
+
}, 1e3);
|
|
86
|
+
const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
|
|
87
|
+
return { args, validator };
|
|
88
|
+
},
|
|
89
|
+
template: `
|
|
90
|
+
<AntBaseInput
|
|
91
|
+
v-bind="args"
|
|
92
|
+
v-model:value="args.value"
|
|
93
|
+
:has-errors="typeof args.hasErrors === 'boolean' ? args.hasErrors : validator.hasErrors()"
|
|
94
|
+
@validate="(val) => validator.validate(val)"
|
|
95
|
+
/>`
|
|
96
|
+
}),
|
|
97
|
+
args: {
|
|
98
|
+
...Docs.args,
|
|
99
|
+
value: null,
|
|
100
|
+
skeleton: true,
|
|
101
|
+
description: void 0
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export const IconLeft = {
|
|
105
|
+
render: Docs.render,
|
|
106
|
+
args: {
|
|
107
|
+
...Docs.args,
|
|
108
|
+
iconLeft: faSearch
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
export const Summary = {
|
|
112
|
+
render: (args) => ({
|
|
113
|
+
components: { AntBaseInput, AntButton },
|
|
114
|
+
setup: () => {
|
|
115
|
+
const value = computed({
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
get: () => args.value,
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
set: (val) => args.value = val
|
|
120
|
+
});
|
|
121
|
+
return { args, value, faSearch };
|
|
122
|
+
},
|
|
123
|
+
template: `
|
|
124
|
+
<div class="p-4 pb-10 flex flex-col gap-2">
|
|
125
|
+
<div class="flex gap-2">
|
|
126
|
+
<AntBaseInput v-bind="args" v-model:value="value" color-type="base"/>
|
|
127
|
+
<AntBaseInput v-bind="args" v-model:value="value" color-type="info"/>
|
|
128
|
+
<AntBaseInput v-bind="args" v-model:value="value" color-type="success"/>
|
|
129
|
+
<AntBaseInput v-bind="args" v-model:value="value" color-type="warning"/>
|
|
130
|
+
<AntBaseInput v-bind="args" v-model:value="value" color-type="danger"/>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div class="flex gap-2">
|
|
134
|
+
<AntBaseInput v-bind="args" value="A value" nullable color-type="base"/>
|
|
135
|
+
<AntBaseInput v-bind="args" value="A value" nullable color-type="info"/>
|
|
136
|
+
<AntBaseInput v-bind="args" value="A value" nullable color-type="success"/>
|
|
137
|
+
<AntBaseInput v-bind="args" value="A value" nullable color-type="warning"/>
|
|
138
|
+
<AntBaseInput v-bind="args" value="A value" nullable color-type="danger"/>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div class="flex gap-2">
|
|
142
|
+
<AntBaseInput v-bind="args" v-model:value="value" :show-icon="false" color-type="base"/>
|
|
143
|
+
<AntBaseInput v-bind="args" v-model:value="value" :show-icon="false" color-type="info"/>
|
|
144
|
+
<AntBaseInput v-bind="args" v-model:value="value" :show-icon="false" color-type="success"/>
|
|
145
|
+
<AntBaseInput v-bind="args" v-model:value="value" :show-icon="false" color-type="warning"/>
|
|
146
|
+
<AntBaseInput v-bind="args" v-model:value="value" :show-icon="false" color-type="danger"/>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<div class="flex gap-2">
|
|
150
|
+
<AntBaseInput v-bind="args" v-model:value="value" :icon-left="faSearch" color-type="base"/>
|
|
151
|
+
<AntBaseInput v-bind="args" v-model:value="value" :icon-left="faSearch" color-type="info"/>
|
|
152
|
+
<AntBaseInput v-bind="args" v-model:value="value" :icon-left="faSearch" color-type="success"/>
|
|
153
|
+
<AntBaseInput v-bind="args" v-model:value="value" :icon-left="faSearch" color-type="warning"/>
|
|
154
|
+
<AntBaseInput v-bind="args" v-model:value="value" :icon-left="faSearch" color-type="danger"/>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div class="flex gap-[-2px]">
|
|
158
|
+
<AntBaseInput v-bind="args" v-model:value="value" grouped="left"/>
|
|
159
|
+
<AntBaseInput v-bind="args" v-model:value="value" grouped="center" color-type="danger"/>
|
|
160
|
+
<AntBaseInput v-bind="args" v-model:value="value" grouped="right" color-type="info"/>
|
|
161
|
+
</div>
|
|
162
|
+
</div>`
|
|
163
|
+
}),
|
|
164
|
+
args: {
|
|
165
|
+
value: "",
|
|
166
|
+
placeholder: "Placeholder"
|
|
167
|
+
}
|
|
168
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import AntField from "../AntField.vue";
|
|
2
|
+
import AntBaseInput from "../AntBaseInput.vue";
|
|
3
|
+
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
4
|
+
import { computed, reactive, ref } from "vue";
|
|
5
|
+
import { InputColorType } from "../../../../enums/index.mjs";
|
|
6
|
+
import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validate";
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "Components/Forms/Elements/Field",
|
|
9
|
+
component: AntField,
|
|
10
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
11
|
+
argTypes: {
|
|
12
|
+
size: {
|
|
13
|
+
control: { type: "radio" },
|
|
14
|
+
options: Object.values(Size)
|
|
15
|
+
},
|
|
16
|
+
colorType: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.values(InputColorType)
|
|
19
|
+
},
|
|
20
|
+
skeleton: {
|
|
21
|
+
control: "boolean",
|
|
22
|
+
table: { defaultValue: { summary: false } }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
export const Docs = {
|
|
28
|
+
render: (args) => ({
|
|
29
|
+
components: { AntField, AntBaseInput },
|
|
30
|
+
setup: () => {
|
|
31
|
+
const skeleton = computed({
|
|
32
|
+
get() {
|
|
33
|
+
return args.skeleton;
|
|
34
|
+
},
|
|
35
|
+
set(val) {
|
|
36
|
+
args.skeleton = val;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const size = computed({
|
|
40
|
+
get() {
|
|
41
|
+
return args.size;
|
|
42
|
+
},
|
|
43
|
+
set(val) {
|
|
44
|
+
args.size = val;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const colorType = computed({
|
|
48
|
+
get() {
|
|
49
|
+
return args.colorType;
|
|
50
|
+
},
|
|
51
|
+
set(val) {
|
|
52
|
+
args.colorType = val;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const value = ref(null);
|
|
56
|
+
const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
|
|
57
|
+
return { args, value, validator, skeleton, size, colorType };
|
|
58
|
+
},
|
|
59
|
+
template: `
|
|
60
|
+
<AntField
|
|
61
|
+
v-bind="args"
|
|
62
|
+
:errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
|
|
63
|
+
>
|
|
64
|
+
<AntBaseInput
|
|
65
|
+
v-model:value="value"
|
|
66
|
+
:skeleton="skeleton"
|
|
67
|
+
:size="size"
|
|
68
|
+
:color-type="colorType"
|
|
69
|
+
placeholder="Placeholder"
|
|
70
|
+
:has-errors="Array.isArray(args.errors) ? args.errors.length > 0 : validator.hasErrors()"
|
|
71
|
+
@validate="(val) => validator.validate(val)"
|
|
72
|
+
/>
|
|
73
|
+
</AntField>
|
|
74
|
+
`
|
|
75
|
+
}),
|
|
76
|
+
args: {
|
|
77
|
+
label: "Label",
|
|
78
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import AntInputDescription from '../AntInputDescription.vue';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
+
declare const meta: Meta<typeof AntInputDescription>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntInputDescription>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import AntInputDescription from "../AntInputDescription.vue";
|
|
2
|
+
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
3
|
+
import { InputColorType } from "../../../../enums/index.mjs";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Components/Forms/Elements/Ant Input Description",
|
|
6
|
+
component: AntInputDescription,
|
|
7
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: { type: "radio" },
|
|
11
|
+
options: Object.values(Size),
|
|
12
|
+
table: { defaultValue: { summary: Size.md } }
|
|
13
|
+
},
|
|
14
|
+
skeleton: {
|
|
15
|
+
control: "boolean",
|
|
16
|
+
table: { defaultValue: { summary: false } }
|
|
17
|
+
},
|
|
18
|
+
colorType: {
|
|
19
|
+
control: { type: "select" },
|
|
20
|
+
options: Object.values(InputColorType)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
export const Docs = {
|
|
26
|
+
render: (args) => ({
|
|
27
|
+
components: { AntInputDescription },
|
|
28
|
+
setup() {
|
|
29
|
+
return { args };
|
|
30
|
+
},
|
|
31
|
+
template: '<div class="p-4"><AntInputDescription v-bind="args">Description</AntInputDescription></div>'
|
|
32
|
+
}),
|
|
33
|
+
args: {}
|
|
34
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import AntInputLabel from '../AntInputLabel.vue';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
+
declare const meta: Meta<typeof AntInputLabel>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntInputLabel>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const WithContent: Story;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import AntInputLabel from "../AntInputLabel.vue";
|
|
2
|
+
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
3
|
+
import AntBaseInput from "../AntBaseInput.vue";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Components/Forms/Elements/Ant Input Label",
|
|
6
|
+
component: AntInputLabel,
|
|
7
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: {
|
|
10
|
+
control: "text"
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
control: { type: "radio" },
|
|
14
|
+
options: Object.values(Size),
|
|
15
|
+
table: { defaultValue: { summary: Size.md } }
|
|
16
|
+
},
|
|
17
|
+
skeleton: {
|
|
18
|
+
control: "boolean",
|
|
19
|
+
table: { defaultValue: { summary: false } }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
export const Docs = {
|
|
25
|
+
render: (args) => ({
|
|
26
|
+
components: { AntInputLabel },
|
|
27
|
+
setup: () => ({ args }),
|
|
28
|
+
template: '<div class="p-4"><AntInputLabel v-bind="args"></AntInputLabel></div>'
|
|
29
|
+
}),
|
|
30
|
+
args: {
|
|
31
|
+
label: "Label"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export const WithContent = {
|
|
35
|
+
render: (args) => ({
|
|
36
|
+
components: { AntInputLabel, AntBaseInput },
|
|
37
|
+
setup() {
|
|
38
|
+
return { args };
|
|
39
|
+
},
|
|
40
|
+
template: '<div class="p-4"><AntInputLabel v-bind="args"><AntBaseInput value="Example"></AntBaseInput></AntInputLabel></div>'
|
|
41
|
+
}),
|
|
42
|
+
args: {
|
|
43
|
+
...Docs.args,
|
|
44
|
+
label: "Label"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import AntInputLimiter from '../AntInputLimiter.vue';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
+
declare const meta: Meta<typeof AntInputLimiter>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntInputLimiter>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import AntInputLimiter from "../AntInputLimiter.vue";
|
|
2
|
+
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
3
|
+
import { InputColorType } from "../../../../enums/index.mjs";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Components/Forms/Elements/Ant Input Limiter",
|
|
6
|
+
component: AntInputLimiter,
|
|
7
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: { type: "radio" },
|
|
11
|
+
options: Object.values(Size),
|
|
12
|
+
table: { defaultValue: { summary: Size.md } }
|
|
13
|
+
},
|
|
14
|
+
skeleton: {
|
|
15
|
+
control: "boolean",
|
|
16
|
+
table: { defaultValue: { summary: false } }
|
|
17
|
+
},
|
|
18
|
+
colorType: {
|
|
19
|
+
control: { type: "select" },
|
|
20
|
+
options: Object.values(InputColorType)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
export const Docs = {
|
|
26
|
+
render: (args) => ({
|
|
27
|
+
components: { AntInputLimiter },
|
|
28
|
+
setup() {
|
|
29
|
+
return { args };
|
|
30
|
+
},
|
|
31
|
+
template: '<div class="p-4"><AntInputLimiter v-bind="args">Description</AntInputLimiter></div>'
|
|
32
|
+
}),
|
|
33
|
+
args: {
|
|
34
|
+
value: 0,
|
|
35
|
+
maxValue: 10
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum BaseInputType {
|
|
2
|
+
date = "date",
|
|
3
|
+
datetime = "datetime",
|
|
4
|
+
email = "email",
|
|
5
|
+
hidden = "hidden",
|
|
6
|
+
month = "month",
|
|
7
|
+
number = "number",
|
|
8
|
+
password = "password",
|
|
9
|
+
search = "search",
|
|
10
|
+
tel = "tel",
|
|
11
|
+
text = "text",
|
|
12
|
+
time = "time",
|
|
13
|
+
url = "url",
|
|
14
|
+
week = "week",
|
|
15
|
+
range = "range"
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var BaseInputType = /* @__PURE__ */ ((BaseInputType2) => {
|
|
2
|
+
BaseInputType2["date"] = "date";
|
|
3
|
+
BaseInputType2["datetime"] = "datetime";
|
|
4
|
+
BaseInputType2["email"] = "email";
|
|
5
|
+
BaseInputType2["hidden"] = "hidden";
|
|
6
|
+
BaseInputType2["month"] = "month";
|
|
7
|
+
BaseInputType2["number"] = "number";
|
|
8
|
+
BaseInputType2["password"] = "password";
|
|
9
|
+
BaseInputType2["search"] = "search";
|
|
10
|
+
BaseInputType2["tel"] = "tel";
|
|
11
|
+
BaseInputType2["text"] = "text";
|
|
12
|
+
BaseInputType2["time"] = "time";
|
|
13
|
+
BaseInputType2["url"] = "url";
|
|
14
|
+
BaseInputType2["week"] = "week";
|
|
15
|
+
BaseInputType2["range"] = "range";
|
|
16
|
+
return BaseInputType2;
|
|
17
|
+
})(BaseInputType || {});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AntBaseInput.type';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AntBaseInput.type.mjs";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import AntBaseInput from './AntBaseInput.vue';
|
|
2
|
+
import AntField from './AntField.vue';
|
|
3
|
+
import AntInputDescription from './AntInputDescription.vue';
|
|
4
|
+
import AntInputLabel from './AntInputLabel.vue';
|
|
5
|
+
import AntInputLimiter from './AntInputLimiter.vue';
|
|
6
|
+
export { AntBaseInput, AntField, AntInputDescription, AntInputLabel, AntInputLimiter };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import AntBaseInput from "./AntBaseInput.vue";
|
|
2
|
+
import AntField from "./AntField.vue";
|
|
3
|
+
import AntInputDescription from "./AntInputDescription.vue";
|
|
4
|
+
import AntInputLabel from "./AntInputLabel.vue";
|
|
5
|
+
import AntInputLimiter from "./AntInputLimiter.vue";
|
|
6
|
+
export {
|
|
7
|
+
AntBaseInput,
|
|
8
|
+
AntField,
|
|
9
|
+
AntInputDescription,
|
|
10
|
+
AntInputLabel,
|
|
11
|
+
AntInputLimiter
|
|
12
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import AntFormGroup from "../AntFormGroup.vue";
|
|
2
|
+
import AntFormGroupLabel from "../AntFormGroupLabel.vue";
|
|
3
|
+
import AntTextInput from "../AntTextInput.vue";
|
|
4
|
+
import AntButton from "../../buttons/AntButton.vue";
|
|
5
|
+
import { Direction } from "../../../enums/Direction.enum.mjs";
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Components/Forms/Form Group",
|
|
8
|
+
component: AntFormGroup,
|
|
9
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
10
|
+
argTypes: {
|
|
11
|
+
direction: {
|
|
12
|
+
control: { type: "select" },
|
|
13
|
+
options: Object.values(Direction)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
export const Docs = {
|
|
19
|
+
render: (args) => ({
|
|
20
|
+
components: { AntFormGroup, AntFormGroupLabel, AntTextInput, AntButton },
|
|
21
|
+
setup() {
|
|
22
|
+
return { args };
|
|
23
|
+
},
|
|
24
|
+
template: `
|
|
25
|
+
<AntFormGroup v-bind="args">
|
|
26
|
+
<AntFormGroupLabel>Example label</AntFormGroupLabel>
|
|
27
|
+
<AntTextInput label="Example"/>
|
|
28
|
+
<AntButton color-type="primary">Submit</AntButton>
|
|
29
|
+
</AntFormGroup>
|
|
30
|
+
`
|
|
31
|
+
}),
|
|
32
|
+
args: {}
|
|
33
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntFormGroupLabel from '../AntFormGroupLabel.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntFormGroupLabel>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntFormGroupLabel>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import AntFormGroupLabel from "../AntFormGroupLabel.vue";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Components/Forms/Form Group Label",
|
|
4
|
+
component: AntFormGroupLabel,
|
|
5
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
6
|
+
argTypes: {}
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const Docs = {
|
|
10
|
+
render: (args) => ({
|
|
11
|
+
components: { AntFormGroupLabel },
|
|
12
|
+
setup() {
|
|
13
|
+
return { args };
|
|
14
|
+
},
|
|
15
|
+
template: `
|
|
16
|
+
<AntFormGroupLabel v-bind="args">Example label</AntFormGroupLabel>
|
|
17
|
+
`
|
|
18
|
+
}),
|
|
19
|
+
args: {}
|
|
20
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntNumberInput from '../AntNumberInput.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntNumberInput>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntNumberInput>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const Limited: Story;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Size } from "../../../enums/Size.enum.mjs";
|
|
2
|
+
import AntNumberInput from "../AntNumberInput.vue";
|
|
3
|
+
import { ColorType } from "../../../enums/ColorType.enum.mjs";
|
|
4
|
+
import { isRequiredRule, useFieldValidator } from "@antify/validate";
|
|
5
|
+
import { reactive } from "vue";
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Components/Forms/Number Input",
|
|
8
|
+
component: AntNumberInput,
|
|
9
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
10
|
+
argTypes: {
|
|
11
|
+
modelValue: {
|
|
12
|
+
control: { type: "number" },
|
|
13
|
+
table: { type: { summary: "number|null" } }
|
|
14
|
+
},
|
|
15
|
+
colorType: {
|
|
16
|
+
control: { type: "select" },
|
|
17
|
+
options: Object.values(ColorType)
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
control: { type: "radio" },
|
|
21
|
+
options: Object.values(Size),
|
|
22
|
+
table: { defaultValue: { summary: Size.md } }
|
|
23
|
+
},
|
|
24
|
+
placeholder: {
|
|
25
|
+
table: { defaultValue: { summary: "this.label" } }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
export const Docs = {
|
|
31
|
+
render: (args) => ({
|
|
32
|
+
components: { AntNumberInput },
|
|
33
|
+
setup() {
|
|
34
|
+
const validator = reactive(useFieldValidator([
|
|
35
|
+
isRequiredRule,
|
|
36
|
+
(val) => typeof val !== "number" || val <= 8 || "Value should not be bigger than 8"
|
|
37
|
+
]));
|
|
38
|
+
return { args, validator };
|
|
39
|
+
},
|
|
40
|
+
template: `
|
|
41
|
+
<AntNumberInput
|
|
42
|
+
v-bind="args"
|
|
43
|
+
v-model="args.modelValue"
|
|
44
|
+
:errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
|
|
45
|
+
@validate="(val) => validator.validate(val)"
|
|
46
|
+
/>`
|
|
47
|
+
}),
|
|
48
|
+
args: {
|
|
49
|
+
modelValue: null,
|
|
50
|
+
steps: 1,
|
|
51
|
+
label: "Label",
|
|
52
|
+
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export const Limited = {
|
|
56
|
+
render: Docs.render,
|
|
57
|
+
args: {
|
|
58
|
+
...Docs.args,
|
|
59
|
+
modelValue: 50,
|
|
60
|
+
limiter: true,
|
|
61
|
+
max: 10,
|
|
62
|
+
validator: useFieldValidator([
|
|
63
|
+
(val) => val <= 10 || "Value should not be bigger than 10",
|
|
64
|
+
(val) => val <= 11 || "It should be really not bigger than 10!!!!"
|
|
65
|
+
])
|
|
66
|
+
}
|
|
67
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from "@storybook/vue3";
|
|
2
|
+
import AntRangeSlider from "../AntRangeSlider.vue";
|
|
3
|
+
declare const meta: Meta<typeof AntRangeSlider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntRangeSlider>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import AntRangeSlider from "../AntRangeSlider.vue";
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { InputColorType } from "../../../enums/index.mjs";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Components/Forms/Range Slider",
|
|
6
|
+
component: AntRangeSlider,
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: "WIP: waiting for design to finish"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
controls: {
|
|
14
|
+
sort: "requiredFirst"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
argTypes: {
|
|
18
|
+
modelValue: {
|
|
19
|
+
control: "number",
|
|
20
|
+
description: "Reactive value"
|
|
21
|
+
},
|
|
22
|
+
colorType: {
|
|
23
|
+
control: { type: "select" },
|
|
24
|
+
options: Object.values(InputColorType)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
export const Docs = {
|
|
30
|
+
render: (args) => ({
|
|
31
|
+
components: { AntRangeSlider },
|
|
32
|
+
setup() {
|
|
33
|
+
const value = ref(1);
|
|
34
|
+
return { args, value };
|
|
35
|
+
},
|
|
36
|
+
template: `
|
|
37
|
+
<AntRangeSlider v-bind="args" v-model="value"/>
|
|
38
|
+
`
|
|
39
|
+
})
|
|
40
|
+
};
|
|
File without changes
|
|
File without changes
|