@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,51 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import AntButton from '../buttons/AntButton.vue';
|
|
3
|
+
import {faAngleLeft} from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import AntSaveAndNewButton from '../buttons/AntSaveAndNewButton.vue';
|
|
5
|
+
import AntSaveButton from '../buttons/AntSaveButton.vue';
|
|
6
|
+
|
|
7
|
+
defineEmits(['back', 'save', 'save-and-new']);
|
|
8
|
+
withDefaults(defineProps<{
|
|
9
|
+
disabled?: boolean
|
|
10
|
+
skeleton?: boolean
|
|
11
|
+
}>(), {
|
|
12
|
+
disabled: false,
|
|
13
|
+
skeleton: false,
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div class="flex justify-between p-2.5 gap-2.5 bg-neutral-50" data-e2e="crud-detail-actions">
|
|
19
|
+
<div class="flex gap-2.5">
|
|
20
|
+
<slot name="buttons-left">
|
|
21
|
+
<AntButton
|
|
22
|
+
:outlined="false"
|
|
23
|
+
:filled="true"
|
|
24
|
+
:icon-left="faAngleLeft"
|
|
25
|
+
:disabled="disabled"
|
|
26
|
+
@click="$emit('back')"
|
|
27
|
+
>
|
|
28
|
+
Back
|
|
29
|
+
</AntButton>
|
|
30
|
+
</slot>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="flex gap-2.5">
|
|
34
|
+
<slot name="before-buttons-right"/>
|
|
35
|
+
<slot name="buttons-right">
|
|
36
|
+
<AntSaveAndNewButton
|
|
37
|
+
:skeleton="skeleton"
|
|
38
|
+
:disabled="disabled"
|
|
39
|
+
@click="$emit('save-and-new')"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<AntSaveButton
|
|
43
|
+
:skeleton="skeleton"
|
|
44
|
+
:disabled="disabled"
|
|
45
|
+
@click="$emit('save')"
|
|
46
|
+
/>
|
|
47
|
+
</slot>
|
|
48
|
+
<slot name="after-buttons-right"/>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// TODO:: fix why tabs are not full height in story
|
|
3
|
+
import type {TabItem} from '../tabs/__types/AntTabItem.types';
|
|
4
|
+
import AntTabs from '../tabs/AntTabs.vue';
|
|
5
|
+
import AntDeleteButton from '../buttons/AntDeleteButton.vue';
|
|
6
|
+
import AntDeleteDialog from '../dialogs/AntDeleteDialog.vue';
|
|
7
|
+
import {ref} from 'vue';
|
|
8
|
+
|
|
9
|
+
defineEmits(['delete']);
|
|
10
|
+
withDefaults(defineProps<{
|
|
11
|
+
tabItems?: TabItem[]
|
|
12
|
+
disabled?: boolean
|
|
13
|
+
getEntityName: () => string
|
|
14
|
+
}>(), {
|
|
15
|
+
disabled: false,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const dialogOpen = ref(false);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div class="flex justify-between items-stretch gap-2.5 bg-neutral-50" data-e2e="crud-detail-nav">
|
|
23
|
+
<slot name="tabs">
|
|
24
|
+
<AntTabs
|
|
25
|
+
:tabItems="tabItems"
|
|
26
|
+
/>
|
|
27
|
+
</slot>
|
|
28
|
+
|
|
29
|
+
<div class="flex gap-2.5 pr-2.5 py-2.5">
|
|
30
|
+
<slot name="buttons">
|
|
31
|
+
<slot name="before-delete-button"/>
|
|
32
|
+
|
|
33
|
+
<slot name="delete-button">
|
|
34
|
+
<AntDeleteButton
|
|
35
|
+
:disabled="disabled"
|
|
36
|
+
filled
|
|
37
|
+
@click="() => dialogOpen = true"
|
|
38
|
+
/>
|
|
39
|
+
</slot>
|
|
40
|
+
|
|
41
|
+
<slot name="after-delete-button"/>
|
|
42
|
+
</slot>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<AntDeleteDialog
|
|
46
|
+
v-model:open="dialogOpen"
|
|
47
|
+
:entity="getEntityName()"
|
|
48
|
+
@confirm="$emit('delete')"
|
|
49
|
+
/>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
// TODO:: This component works only with vue-router. Make it work in storybook.
|
|
3
|
+
// TODO:: add skeleton
|
|
4
|
+
import AntSearch from '../form/AntSearch.vue';
|
|
5
|
+
import AntCreateButton from '../buttons/AntCreateButton.vue';
|
|
6
|
+
import AntDropdown from '../AntDropdown.vue';
|
|
7
|
+
import AntIcon from '../AntIcon.vue';
|
|
8
|
+
import {computed, ref, watch} from 'vue';
|
|
9
|
+
import AntButton from '../buttons/AntButton.vue';
|
|
10
|
+
import {faFilter, faMultiply} from '@fortawesome/free-solid-svg-icons';
|
|
11
|
+
import {ColorType, Grouped, Position} from '../../enums';
|
|
12
|
+
import {useRoute, useRouter} from 'vue-router';
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<{
|
|
15
|
+
fullWidth?: boolean,
|
|
16
|
+
showFilter?: boolean,
|
|
17
|
+
searchQuery?: string,
|
|
18
|
+
hasFilter?: boolean,
|
|
19
|
+
skeleton?: boolean,
|
|
20
|
+
}>(), {
|
|
21
|
+
fullWidth: true,
|
|
22
|
+
showFilter: true,
|
|
23
|
+
searchQuery: 'search',
|
|
24
|
+
hasFilter: false,
|
|
25
|
+
skeleton: false,
|
|
26
|
+
});
|
|
27
|
+
const emit = defineEmits(['search', 'create', 'removeFilter']);
|
|
28
|
+
const router = useRouter();
|
|
29
|
+
const route = useRoute();
|
|
30
|
+
|
|
31
|
+
const showDropdown = ref(false);
|
|
32
|
+
const _fullWidth = ref(props.fullWidth)
|
|
33
|
+
const search = computed({
|
|
34
|
+
get: () => route.query[props.searchQuery] as string || '',
|
|
35
|
+
set: (value) => {
|
|
36
|
+
const query = {
|
|
37
|
+
...route.query,
|
|
38
|
+
[props.searchQuery]: value
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!value) {
|
|
42
|
+
delete query[props.searchQuery];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
(async () => {
|
|
46
|
+
await router.replace({
|
|
47
|
+
...route,
|
|
48
|
+
query
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
emit('search', value)
|
|
52
|
+
})()
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
watch(() => props.fullWidth, (val) => {
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
_fullWidth.value = val
|
|
59
|
+
}, val ? 250 : 300)
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<div
|
|
65
|
+
class="flex h-full items-center p-2.5 gap-2.5 bg-neutral-50"
|
|
66
|
+
data-e2e="crud-table-filter"
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
class="flex gap-2.5 flex-grow"
|
|
70
|
+
:class="{'flex-grow': !_fullWidth}"
|
|
71
|
+
>
|
|
72
|
+
<div :class="{'w-80': _fullWidth, 'w-full': !_fullWidth}">
|
|
73
|
+
<AntSearch
|
|
74
|
+
v-model="search"
|
|
75
|
+
:skeleton="skeleton"
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<AntDropdown
|
|
80
|
+
v-if="showFilter"
|
|
81
|
+
v-model:show-dropdown="showDropdown"
|
|
82
|
+
:position="Position.left"
|
|
83
|
+
>
|
|
84
|
+
<div class="flex">
|
|
85
|
+
<AntButton
|
|
86
|
+
:color-type="hasFilter ? ColorType.info : ColorType.base"
|
|
87
|
+
:grouped="hasFilter ? Grouped.left : Grouped.none"
|
|
88
|
+
:skeleton="skeleton"
|
|
89
|
+
:icon-left="faFilter"
|
|
90
|
+
@click="() => showDropdown = !showDropdown"
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
<AntButton
|
|
94
|
+
v-if="hasFilter"
|
|
95
|
+
:color-type="ColorType.info"
|
|
96
|
+
:grouped="Grouped.right"
|
|
97
|
+
:skeleton="skeleton"
|
|
98
|
+
:icon-left="faMultiply"
|
|
99
|
+
filled
|
|
100
|
+
@click="$emit('removeFilter')"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<template #content>
|
|
105
|
+
<slot name="dropdownContent"/>
|
|
106
|
+
</template>
|
|
107
|
+
</AntDropdown>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<div v-if="_fullWidth">
|
|
111
|
+
<slot name="buttons">
|
|
112
|
+
<AntCreateButton
|
|
113
|
+
filled
|
|
114
|
+
:skeleton="skeleton"
|
|
115
|
+
@click="() => emit('create')"
|
|
116
|
+
/>
|
|
117
|
+
</slot>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</template>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/**
|
|
4
|
+
* TODO:: test me in storybook through vue router
|
|
5
|
+
* TODO:: fix ts errors
|
|
6
|
+
*/
|
|
7
|
+
import {useRouter, useRoute} from 'vue-router'
|
|
8
|
+
import AntPagination from '../AntPagination.vue';
|
|
9
|
+
import {computed, ref, watch} from 'vue';
|
|
10
|
+
import AntSelect from '../form/AntSelect.vue';
|
|
11
|
+
import AntSkeleton from '../AntSkeleton.vue';
|
|
12
|
+
import {type SelectOption} from '../form/__types';
|
|
13
|
+
|
|
14
|
+
const emit = defineEmits(['changeItemsPerPage', 'changePage'])
|
|
15
|
+
const props = withDefaults(
|
|
16
|
+
defineProps<{
|
|
17
|
+
count: number | null,
|
|
18
|
+
pageQuery?: string,
|
|
19
|
+
itemsPerPageQuery?: string,
|
|
20
|
+
fullWidth?: boolean,
|
|
21
|
+
validItemsPerPage?: number[],
|
|
22
|
+
skeleton?: boolean
|
|
23
|
+
}>(),
|
|
24
|
+
{
|
|
25
|
+
pageQuery: 'p',
|
|
26
|
+
itemsPerPageQuery: 'ipp',
|
|
27
|
+
fullWidth: true,
|
|
28
|
+
validItemsPerPage: () => [20, 50, 100, 200],
|
|
29
|
+
skeleton: false
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
const route = useRoute()
|
|
34
|
+
const router = useRouter()
|
|
35
|
+
const itemsPerPageOptions = computed(() =>
|
|
36
|
+
props.validItemsPerPage.map(item => ({
|
|
37
|
+
label: `${item}`,
|
|
38
|
+
value: item
|
|
39
|
+
}) as SelectOption)
|
|
40
|
+
)
|
|
41
|
+
const page = computed(() => {
|
|
42
|
+
const _page = route.query[props.pageQuery] >= 1 ? Number.parseInt(route.query[props.pageQuery]) : 1
|
|
43
|
+
|
|
44
|
+
if (_page <= 0 || _page > pages.value) {
|
|
45
|
+
return 1
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return _page
|
|
49
|
+
})
|
|
50
|
+
const itemsPerPage = computed({
|
|
51
|
+
get() {
|
|
52
|
+
return route.query[props.itemsPerPageQuery] ?
|
|
53
|
+
Number.parseInt(route.query[props.itemsPerPageQuery]) :
|
|
54
|
+
props.validItemsPerPage[0]
|
|
55
|
+
},
|
|
56
|
+
set(val) {
|
|
57
|
+
const query = {...route.query}
|
|
58
|
+
query[props.itemsPerPageQuery] = `${val}`
|
|
59
|
+
delete query[props.pageQuery];
|
|
60
|
+
|
|
61
|
+
(async () => {
|
|
62
|
+
await router.push({
|
|
63
|
+
...route,
|
|
64
|
+
query
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
emit('changeItemsPerPage', val)
|
|
68
|
+
})()
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
const fromItems = computed(() => (itemsPerPage.value * (page.value - 1)))
|
|
72
|
+
const pages = computed(() => Math.ceil(props.count / itemsPerPage.value))
|
|
73
|
+
const _fullWidth = ref(props.fullWidth)
|
|
74
|
+
|
|
75
|
+
watch(() => props.fullWidth, (val) => {
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
_fullWidth.value = val
|
|
78
|
+
}, val ? 300 : 200)
|
|
79
|
+
})
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<div
|
|
84
|
+
class="w-full"
|
|
85
|
+
data-e2e="crud-table-nav"
|
|
86
|
+
>
|
|
87
|
+
<div
|
|
88
|
+
class="flex w-full items-center p-2.5"
|
|
89
|
+
:class="{'justify-end': !_fullWidth, 'justify-between': _fullWidth}"
|
|
90
|
+
>
|
|
91
|
+
<div
|
|
92
|
+
v-if="_fullWidth"
|
|
93
|
+
class="flex gap-2 items-center text-neutral-50-font text-sm"
|
|
94
|
+
data-e2e="items-per-page"
|
|
95
|
+
>
|
|
96
|
+
<span class="relative">
|
|
97
|
+
<AntSkeleton v-if="skeleton" rounded absolute/>
|
|
98
|
+
Items per page
|
|
99
|
+
</span>
|
|
100
|
+
|
|
101
|
+
<AntSelect
|
|
102
|
+
v-model="itemsPerPage"
|
|
103
|
+
:options="itemsPerPageOptions"
|
|
104
|
+
:skeleton="skeleton"
|
|
105
|
+
:expanded="false"
|
|
106
|
+
/>
|
|
107
|
+
|
|
108
|
+
<div v-if="count !== null" class="flex gap-1 relative">
|
|
109
|
+
<AntSkeleton v-if="skeleton" rounded absolute/>
|
|
110
|
+
|
|
111
|
+
<span class="font-medium">{{ fromItems }} - {{ itemsPerPage * page }}</span>
|
|
112
|
+
<span>of</span>
|
|
113
|
+
<span
|
|
114
|
+
class="font-medium"
|
|
115
|
+
data-e2e="total-items"
|
|
116
|
+
>{{ count }}</span>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<AntPagination
|
|
121
|
+
:pages="pages"
|
|
122
|
+
:page-query="pageQuery"
|
|
123
|
+
:skeleton="skeleton"
|
|
124
|
+
:light-version="!_fullWidth"
|
|
125
|
+
@input="(val) => emit('changePage', val)"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { computed, ref, watch } from "vue";
|
|
2
|
+
import AntTabs from "../../tabs/AntTabs.vue";
|
|
3
|
+
import AntCrud from "../AntCrud.vue";
|
|
4
|
+
import AntCrudTableNav from "../AntCrudTableNav.vue";
|
|
5
|
+
import AntTable from "../../table/AntTable.vue";
|
|
6
|
+
import AntCrudTableFilter from "../AntCrudTableFilter.vue";
|
|
7
|
+
import AntCrudDetail from "../AntCrudDetail.vue";
|
|
8
|
+
import { AntTableRowTypes } from "../../table/__types/TableHeader.type.mjs";
|
|
9
|
+
const meta = {
|
|
10
|
+
title: "Crud/Crud",
|
|
11
|
+
component: AntCrud,
|
|
12
|
+
parameters: {
|
|
13
|
+
controls: { sort: "requiredFirst" },
|
|
14
|
+
fullscreen: true
|
|
15
|
+
},
|
|
16
|
+
decorators: [() => ({ template: '<div class="h-screen"><story/></div>' })],
|
|
17
|
+
argTypes: {}
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
function generateTableData(amount) {
|
|
21
|
+
const tableData = [];
|
|
22
|
+
for (let i = 0; i < amount; i++) {
|
|
23
|
+
tableData.push({
|
|
24
|
+
name: "Lindsay Walton",
|
|
25
|
+
title: "Front-end Developer",
|
|
26
|
+
email: "lindsay.walton@gmail.com",
|
|
27
|
+
streetAddress: "3670 New Road",
|
|
28
|
+
city: "Birmingham",
|
|
29
|
+
country: "United Kingdom"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return tableData;
|
|
33
|
+
}
|
|
34
|
+
export const Docs = {
|
|
35
|
+
render: (args) => ({
|
|
36
|
+
components: {
|
|
37
|
+
AntTabs,
|
|
38
|
+
AntTable,
|
|
39
|
+
AntCrudTableNav,
|
|
40
|
+
AntCrud,
|
|
41
|
+
AntCrudTableFilter,
|
|
42
|
+
AntCrudDetail
|
|
43
|
+
},
|
|
44
|
+
setup() {
|
|
45
|
+
const selectedDataItem = ref(null);
|
|
46
|
+
const fullWidth = computed(() => selectedDataItem.value === null && args.showDetail === false);
|
|
47
|
+
watch(() => args.showDetail, (showDetail) => {
|
|
48
|
+
if (showDetail === false) {
|
|
49
|
+
selectedDataItem.value = null;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
args,
|
|
54
|
+
fullWidth,
|
|
55
|
+
tableData: generateTableData(50),
|
|
56
|
+
tableHeaders: [
|
|
57
|
+
{
|
|
58
|
+
title: "Name",
|
|
59
|
+
identifier: "name",
|
|
60
|
+
type: AntTableRowTypes.text,
|
|
61
|
+
lightVersion: true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: "Title",
|
|
65
|
+
identifier: "title",
|
|
66
|
+
type: AntTableRowTypes.text,
|
|
67
|
+
lightVersion: true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "E-Mail",
|
|
71
|
+
identifier: "email",
|
|
72
|
+
type: AntTableRowTypes.text
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
title: "Street Address",
|
|
76
|
+
identifier: "streetAddress",
|
|
77
|
+
type: AntTableRowTypes.text
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: "City",
|
|
81
|
+
identifier: "city",
|
|
82
|
+
type: AntTableRowTypes.text
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: "Country",
|
|
86
|
+
identifier: "country",
|
|
87
|
+
type: AntTableRowTypes.text
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
template: `
|
|
93
|
+
<AntCrud v-bind="args" :show-detail="!fullWidth">
|
|
94
|
+
<template #search-section>
|
|
95
|
+
<AntCrudTableFilter
|
|
96
|
+
:full-width="fullWidth"
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<template #table-section>
|
|
101
|
+
<AntTable
|
|
102
|
+
:data="tableData"
|
|
103
|
+
:headers="tableHeaders"
|
|
104
|
+
:show-light-version="!fullWidth"
|
|
105
|
+
selectable-rows
|
|
106
|
+
/>
|
|
107
|
+
</template>
|
|
108
|
+
|
|
109
|
+
<template #table-nav-section>
|
|
110
|
+
<AntCrudTableNav
|
|
111
|
+
:pages="(1000000 * 20)"
|
|
112
|
+
:count="1000000"
|
|
113
|
+
:full-width="fullWidth"
|
|
114
|
+
/>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<AntCrudDetail>
|
|
118
|
+
<div class="m-2.5 slot">
|
|
119
|
+
SLOT
|
|
120
|
+
</div>
|
|
121
|
+
</AntCrudDetail>
|
|
122
|
+
</AntCrud>
|
|
123
|
+
`
|
|
124
|
+
}),
|
|
125
|
+
args: {}
|
|
126
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntCrudDetail from '../AntCrudDetail.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntCrudDetail>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntCrudDetail>;
|
|
6
|
+
export declare const Docs: Story;
|
|
7
|
+
export declare const overflownContent: Story;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import AntCrudDetail from "../AntCrudDetail.vue";
|
|
2
|
+
import AntCrudDetailNav from "../AntCrudDetailNav.vue";
|
|
3
|
+
import AntCrudDetailActions from "../AntCrudDetailActions.vue";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Crud/Crud Detail",
|
|
6
|
+
component: AntCrudDetail,
|
|
7
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
+
decorators: [() => ({ template: '<div class="border border-dashed border-neutral-300 h-80"><story/></div>' })],
|
|
9
|
+
argTypes: {}
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Docs = {
|
|
13
|
+
render: (args) => ({
|
|
14
|
+
components: {
|
|
15
|
+
AntCrudDetail,
|
|
16
|
+
AntCrudDetailNav,
|
|
17
|
+
AntCrudDetailActions
|
|
18
|
+
},
|
|
19
|
+
setup() {
|
|
20
|
+
return {
|
|
21
|
+
args,
|
|
22
|
+
overflowContent: false,
|
|
23
|
+
tabItems: [
|
|
24
|
+
{
|
|
25
|
+
id: "1",
|
|
26
|
+
label: "Tab"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "2",
|
|
30
|
+
label: "Tab"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "3",
|
|
34
|
+
label: "Tab"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
template: `
|
|
40
|
+
<AntCrudDetail v-bind="args">
|
|
41
|
+
<template #header>
|
|
42
|
+
<AntCrudDetailNav
|
|
43
|
+
:tab-items="tabItems"
|
|
44
|
+
:get-entity-name="() => 'Lorem ipsum'"
|
|
45
|
+
/>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<div
|
|
49
|
+
class="m-2.5 slot"
|
|
50
|
+
:class="{'h-96': overflowContent}"
|
|
51
|
+
>
|
|
52
|
+
SLOT
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<template #footer>
|
|
56
|
+
<AntCrudDetailActions/>
|
|
57
|
+
</template>
|
|
58
|
+
</AntCrudDetail>
|
|
59
|
+
`
|
|
60
|
+
}),
|
|
61
|
+
args: {}
|
|
62
|
+
};
|
|
63
|
+
export const overflownContent = {
|
|
64
|
+
render: (args, ctx) => ({
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
components: Docs.render(args, ctx).components,
|
|
67
|
+
setup() {
|
|
68
|
+
return {
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
...Docs.render(args, ctx).setup(),
|
|
71
|
+
overflowContent: true
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
template: Docs.render(args, ctx).template
|
|
76
|
+
}),
|
|
77
|
+
args: {
|
|
78
|
+
...Docs.args
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntCrudDetailActions from '../AntCrudDetailActions.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntCrudDetailActions>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntCrudDetailActions>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import AntTabs from "../../tabs/AntTabs.vue";
|
|
2
|
+
import AntCrudDetailActions from "../AntCrudDetailActions.vue";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Crud/Crud Detail Actions",
|
|
5
|
+
component: AntCrudDetailActions,
|
|
6
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
7
|
+
decorators: [() => ({ template: '<div class="border border-dashed border-neutral-300"><story/></div>' })],
|
|
8
|
+
argTypes: {}
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Docs = {
|
|
12
|
+
render: (args) => ({
|
|
13
|
+
components: {
|
|
14
|
+
AntTabs,
|
|
15
|
+
AntCrudDetailActions
|
|
16
|
+
},
|
|
17
|
+
setup() {
|
|
18
|
+
return {
|
|
19
|
+
args
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
template: '<AntCrudDetailActions v-bind="args"/>'
|
|
23
|
+
}),
|
|
24
|
+
args: {}
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
+
import AntCrudDetailNav from '../AntCrudDetailNav.vue';
|
|
3
|
+
declare const meta: Meta<typeof AntCrudDetailNav>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntCrudDetailNav>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import AntTabs from "../../tabs/AntTabs.vue";
|
|
2
|
+
import AntCrudDetailNav from "../AntCrudDetailNav.vue";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Crud/Crud Detail Nav",
|
|
5
|
+
component: AntCrudDetailNav,
|
|
6
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
7
|
+
decorators: [() => ({ template: '<div class="border border-dashed border-neutral-300"><story/></div>' })],
|
|
8
|
+
argTypes: {}
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Docs = {
|
|
12
|
+
render: (args) => ({
|
|
13
|
+
components: {
|
|
14
|
+
AntTabs,
|
|
15
|
+
AntCrudDetailNav
|
|
16
|
+
},
|
|
17
|
+
setup() {
|
|
18
|
+
return {
|
|
19
|
+
args
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
template: '<AntCrudDetailNav v-bind="args"/>'
|
|
23
|
+
}),
|
|
24
|
+
args: {
|
|
25
|
+
getEntityName: () => "Lorem ipsum",
|
|
26
|
+
tabItems: [
|
|
27
|
+
{
|
|
28
|
+
id: "1",
|
|
29
|
+
label: "Main data"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "2",
|
|
33
|
+
label: "Related data"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "3",
|
|
37
|
+
label: "Related data"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import AntCrudTableFilter from '../AntCrudTableFilter.vue';
|
|
2
|
+
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
+
declare const meta: Meta<typeof AntCrudTableFilter>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AntCrudTableFilter>;
|
|
6
|
+
export declare const Docs: Story;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import AntCrudTableFilter from "../AntCrudTableFilter.vue";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Crud/Crud Table Filter",
|
|
4
|
+
component: AntCrudTableFilter,
|
|
5
|
+
parameters: { controls: { sort: "requiredFirst" } },
|
|
6
|
+
argTypes: {}
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const Docs = {
|
|
10
|
+
render: (args) => ({
|
|
11
|
+
components: { AntCrudTableFilter },
|
|
12
|
+
setup() {
|
|
13
|
+
return { args };
|
|
14
|
+
},
|
|
15
|
+
template: `
|
|
16
|
+
<div class="border border-neutral-300 border-dashed">
|
|
17
|
+
<AntCrudTableFilter
|
|
18
|
+
v-model:search="args.search"
|
|
19
|
+
v-bind="args"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
`
|
|
23
|
+
}),
|
|
24
|
+
args: {}
|
|
25
|
+
};
|