@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
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import defaultColors from 'tailwindcss/colors.js';
|
|
2
|
+
import { defineNuxtModule, createResolver, addPlugin, addImportsDir, addComponentsDir } from '@nuxt/kit';
|
|
3
|
+
|
|
4
|
+
const colors = {
|
|
5
|
+
"white": defaultColors.white,
|
|
6
|
+
"black": defaultColors.black,
|
|
7
|
+
"neutral-50": defaultColors.slate["50"],
|
|
8
|
+
"neutral-100": defaultColors.slate["100"],
|
|
9
|
+
"neutral-200": defaultColors.slate["200"],
|
|
10
|
+
"neutral-300": defaultColors.slate["300"],
|
|
11
|
+
"neutral-400": defaultColors.slate["400"],
|
|
12
|
+
"neutral-500": defaultColors.slate["500"],
|
|
13
|
+
"neutral-600": defaultColors.slate["600"],
|
|
14
|
+
"neutral-700": defaultColors.slate["700"],
|
|
15
|
+
"neutral-800": defaultColors.slate["800"],
|
|
16
|
+
"neutral-900": defaultColors.slate["900"],
|
|
17
|
+
"neutral-950": defaultColors.slate["950"],
|
|
18
|
+
"primary-50": defaultColors.sky["50"],
|
|
19
|
+
"primary-100": defaultColors.sky["100"],
|
|
20
|
+
"primary-200": defaultColors.sky["200"],
|
|
21
|
+
"primary-300": defaultColors.sky["300"],
|
|
22
|
+
"primary-400": defaultColors.sky["400"],
|
|
23
|
+
"primary-500": defaultColors.sky["500"],
|
|
24
|
+
"primary-600": defaultColors.sky["600"],
|
|
25
|
+
"primary-700": defaultColors.sky["700"],
|
|
26
|
+
"primary-800": defaultColors.sky["800"],
|
|
27
|
+
"primary-900": defaultColors.sky["900"],
|
|
28
|
+
"primary-950": defaultColors.sky["950"],
|
|
29
|
+
"secondary-50": defaultColors.lime["50"],
|
|
30
|
+
"secondary-100": defaultColors.lime["100"],
|
|
31
|
+
"secondary-200": defaultColors.lime["200"],
|
|
32
|
+
"secondary-300": defaultColors.lime["300"],
|
|
33
|
+
"secondary-400": defaultColors.lime["400"],
|
|
34
|
+
"secondary-500": defaultColors.lime["500"],
|
|
35
|
+
"secondary-600": defaultColors.lime["600"],
|
|
36
|
+
"secondary-700": defaultColors.lime["700"],
|
|
37
|
+
"secondary-800": defaultColors.lime["800"],
|
|
38
|
+
"secondary-900": defaultColors.lime["900"],
|
|
39
|
+
"secondary-950": defaultColors.lime["950"],
|
|
40
|
+
"info-50": defaultColors.blue["50"],
|
|
41
|
+
"info-100": defaultColors.blue["100"],
|
|
42
|
+
"info-200": defaultColors.blue["200"],
|
|
43
|
+
"info-300": defaultColors.blue["300"],
|
|
44
|
+
"info-400": defaultColors.blue["400"],
|
|
45
|
+
"info-500": defaultColors.blue["500"],
|
|
46
|
+
"info-600": defaultColors.blue["600"],
|
|
47
|
+
"info-700": defaultColors.blue["700"],
|
|
48
|
+
"info-800": defaultColors.blue["800"],
|
|
49
|
+
"info-900": defaultColors.blue["900"],
|
|
50
|
+
"info-950": defaultColors.blue["950"],
|
|
51
|
+
"success-50": defaultColors.green["50"],
|
|
52
|
+
"success-100": defaultColors.green["100"],
|
|
53
|
+
"success-200": defaultColors.green["200"],
|
|
54
|
+
"success-300": defaultColors.green["300"],
|
|
55
|
+
"success-400": defaultColors.green["400"],
|
|
56
|
+
"success-500": defaultColors.green["500"],
|
|
57
|
+
"success-600": defaultColors.green["600"],
|
|
58
|
+
"success-700": defaultColors.green["700"],
|
|
59
|
+
"success-800": defaultColors.green["800"],
|
|
60
|
+
"success-900": defaultColors.green["900"],
|
|
61
|
+
"success-950": defaultColors.green["950"],
|
|
62
|
+
"warning-50": defaultColors.yellow["50"],
|
|
63
|
+
"warning-100": defaultColors.yellow["100"],
|
|
64
|
+
"warning-200": defaultColors.yellow["200"],
|
|
65
|
+
"warning-300": defaultColors.yellow["300"],
|
|
66
|
+
"warning-400": defaultColors.yellow["400"],
|
|
67
|
+
"warning-500": defaultColors.yellow["500"],
|
|
68
|
+
"warning-600": defaultColors.yellow["600"],
|
|
69
|
+
"warning-700": defaultColors.yellow["700"],
|
|
70
|
+
"warning-800": defaultColors.yellow["800"],
|
|
71
|
+
"warning-900": defaultColors.yellow["900"],
|
|
72
|
+
"warning-950": defaultColors.yellow["950"],
|
|
73
|
+
"danger-50": defaultColors.red["50"],
|
|
74
|
+
"danger-100": defaultColors.red["100"],
|
|
75
|
+
"danger-200": defaultColors.red["200"],
|
|
76
|
+
"danger-300": defaultColors.red["300"],
|
|
77
|
+
"danger-400": defaultColors.red["400"],
|
|
78
|
+
"danger-500": defaultColors.red["500"],
|
|
79
|
+
"danger-600": defaultColors.red["600"],
|
|
80
|
+
"danger-700": defaultColors.red["700"],
|
|
81
|
+
"danger-800": defaultColors.red["800"],
|
|
82
|
+
"danger-900": defaultColors.red["900"],
|
|
83
|
+
"danger-950": defaultColors.red["950"]
|
|
84
|
+
};
|
|
85
|
+
const fontColors = {
|
|
86
|
+
"for-white-bg-font": colors["neutral-900"],
|
|
87
|
+
"for-black-bg-font": colors["neutral-100"],
|
|
88
|
+
"neutral-50-font": colors["neutral-600"],
|
|
89
|
+
"neutral-100-font": colors["neutral-600"],
|
|
90
|
+
"neutral-200-font": colors["neutral-600"],
|
|
91
|
+
"neutral-300-font": colors["neutral-600"],
|
|
92
|
+
"neutral-400-font": colors["neutral-600"],
|
|
93
|
+
"neutral-500-font": colors["neutral-100"],
|
|
94
|
+
"neutral-600-font": colors["neutral-100"],
|
|
95
|
+
"neutral-700-font": colors["neutral-100"],
|
|
96
|
+
"neutral-800-font": colors["neutral-100"],
|
|
97
|
+
"neutral-900-font": colors["neutral-100"],
|
|
98
|
+
"neutral-950-font": colors["neutral-100"],
|
|
99
|
+
"primary-50-font": colors["neutral-600"],
|
|
100
|
+
"primary-100-font": colors["neutral-600"],
|
|
101
|
+
"primary-200-font": colors["neutral-600"],
|
|
102
|
+
"primary-300-font": colors["neutral-600"],
|
|
103
|
+
"primary-400-font": colors["neutral-600"],
|
|
104
|
+
"primary-500-font": colors["neutral-100"],
|
|
105
|
+
"primary-600-font": colors["neutral-100"],
|
|
106
|
+
"primary-700-font": colors["neutral-100"],
|
|
107
|
+
"primary-800-font": colors["neutral-100"],
|
|
108
|
+
"primary-900-font": colors["neutral-100"],
|
|
109
|
+
"primary-950-font": colors["neutral-100"],
|
|
110
|
+
"secondary-50-font": colors["neutral-600"],
|
|
111
|
+
"secondary-100-font": colors["neutral-600"],
|
|
112
|
+
"secondary-200-font": colors["neutral-600"],
|
|
113
|
+
"secondary-300-font": colors["neutral-600"],
|
|
114
|
+
"secondary-400-font": colors["neutral-600"],
|
|
115
|
+
"secondary-500-font": colors["neutral-100"],
|
|
116
|
+
"secondary-600-font": colors["neutral-100"],
|
|
117
|
+
"secondary-700-font": colors["neutral-100"],
|
|
118
|
+
"secondary-800-font": colors["neutral-100"],
|
|
119
|
+
"secondary-900-font": colors["neutral-100"],
|
|
120
|
+
"secondary-950-font": colors["neutral-100"],
|
|
121
|
+
"success-50-font": colors["neutral-600"],
|
|
122
|
+
"success-100-font": colors["neutral-600"],
|
|
123
|
+
"success-200-font": colors["neutral-600"],
|
|
124
|
+
"success-300-font": colors["neutral-600"],
|
|
125
|
+
"success-400-font": colors["neutral-600"],
|
|
126
|
+
"success-500-font": colors["neutral-100"],
|
|
127
|
+
"success-600-font": colors["neutral-100"],
|
|
128
|
+
"success-700-font": colors["neutral-100"],
|
|
129
|
+
"success-800-font": colors["neutral-100"],
|
|
130
|
+
"success-900-font": colors["neutral-100"],
|
|
131
|
+
"success-950-font": colors["neutral-100"],
|
|
132
|
+
"info-50-font": colors["neutral-600"],
|
|
133
|
+
"info-100-font": colors["neutral-600"],
|
|
134
|
+
"info-200-font": colors["neutral-600"],
|
|
135
|
+
"info-300-font": colors["neutral-600"],
|
|
136
|
+
"info-400-font": colors["neutral-600"],
|
|
137
|
+
"info-500-font": colors["neutral-100"],
|
|
138
|
+
"info-600-font": colors["neutral-100"],
|
|
139
|
+
"info-700-font": colors["neutral-100"],
|
|
140
|
+
"info-800-font": colors["neutral-100"],
|
|
141
|
+
"info-900-font": colors["neutral-100"],
|
|
142
|
+
"info-950-font": colors["neutral-100"],
|
|
143
|
+
"warning-50-font": colors["neutral-600"],
|
|
144
|
+
"warning-100-font": colors["neutral-600"],
|
|
145
|
+
"warning-200-font": colors["neutral-600"],
|
|
146
|
+
"warning-300-font": colors["neutral-600"],
|
|
147
|
+
"warning-400-font": colors["neutral-600"],
|
|
148
|
+
"warning-500-font": colors["neutral-100"],
|
|
149
|
+
"warning-600-font": colors["neutral-100"],
|
|
150
|
+
"warning-700-font": colors["neutral-100"],
|
|
151
|
+
"warning-800-font": colors["neutral-100"],
|
|
152
|
+
"warning-900-font": colors["neutral-100"],
|
|
153
|
+
"warning-950-font": colors["neutral-100"],
|
|
154
|
+
"danger-50-font": colors["neutral-600"],
|
|
155
|
+
"danger-100-font": colors["neutral-600"],
|
|
156
|
+
"danger-200-font": colors["neutral-600"],
|
|
157
|
+
"danger-300-font": colors["neutral-600"],
|
|
158
|
+
"danger-400-font": colors["neutral-600"],
|
|
159
|
+
"danger-500-font": colors["neutral-100"],
|
|
160
|
+
"danger-600-font": colors["neutral-100"],
|
|
161
|
+
"danger-700-font": colors["neutral-100"],
|
|
162
|
+
"danger-800-font": colors["neutral-100"],
|
|
163
|
+
"danger-900-font": colors["neutral-100"],
|
|
164
|
+
"danger-950-font": colors["neutral-100"]
|
|
165
|
+
};
|
|
166
|
+
const tailwindcss = {
|
|
167
|
+
content: [
|
|
168
|
+
// For module dev
|
|
169
|
+
"./src/runtime/**/*.{vue,js,ts,jsx,tsx}",
|
|
170
|
+
"./src/runtime/**/*.stories.ts",
|
|
171
|
+
"./playground/**/*.{vue,js,ts,jsx,tsx}",
|
|
172
|
+
"../ui-module/src/**/*.{vue,js,ts,jsx,tsx}",
|
|
173
|
+
// For project dev
|
|
174
|
+
"./app.vue",
|
|
175
|
+
"./components.{vue,js,ts,jsx,tsx}",
|
|
176
|
+
"./pages.{vue,js,ts,jsx,tsx}",
|
|
177
|
+
// If this config is used in a project
|
|
178
|
+
"./node_modules/@antify/*/dist/**/*.{js,vue,ts}",
|
|
179
|
+
"./node_modules/@antify/*/src/**/*.{js,vue,ts}"
|
|
180
|
+
],
|
|
181
|
+
theme: {
|
|
182
|
+
colors: {
|
|
183
|
+
...colors,
|
|
184
|
+
...fontColors
|
|
185
|
+
},
|
|
186
|
+
extend: {
|
|
187
|
+
animation: {
|
|
188
|
+
skeleton: "skeleton 2s ease-out infinite"
|
|
189
|
+
},
|
|
190
|
+
keyframes: {
|
|
191
|
+
"skeleton": {
|
|
192
|
+
"0%, 100%": { "background-color": colors["neutral-300"] },
|
|
193
|
+
"50%": { "background-color": colors["neutral-100"] }
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
var ColorType = /* @__PURE__ */ ((ColorType2) => {
|
|
201
|
+
ColorType2["base"] = "base";
|
|
202
|
+
ColorType2["primary"] = "primary";
|
|
203
|
+
ColorType2["secondary"] = "secondary";
|
|
204
|
+
ColorType2["danger"] = "danger";
|
|
205
|
+
ColorType2["info"] = "info";
|
|
206
|
+
ColorType2["success"] = "success";
|
|
207
|
+
ColorType2["warning"] = "warning";
|
|
208
|
+
return ColorType2;
|
|
209
|
+
})(ColorType || {});
|
|
210
|
+
var InputColorType = /* @__PURE__ */ ((InputColorType2) => {
|
|
211
|
+
InputColorType2["base"] = "base";
|
|
212
|
+
InputColorType2["danger"] = "danger";
|
|
213
|
+
InputColorType2["info"] = "info";
|
|
214
|
+
InputColorType2["success"] = "success";
|
|
215
|
+
InputColorType2["warning"] = "warning";
|
|
216
|
+
return InputColorType2;
|
|
217
|
+
})(InputColorType || {});
|
|
218
|
+
|
|
219
|
+
var Grouped = /* @__PURE__ */ ((Grouped2) => {
|
|
220
|
+
Grouped2["none"] = "none";
|
|
221
|
+
Grouped2["left"] = "left";
|
|
222
|
+
Grouped2["center"] = "center";
|
|
223
|
+
Grouped2["right"] = "right";
|
|
224
|
+
return Grouped2;
|
|
225
|
+
})(Grouped || {});
|
|
226
|
+
|
|
227
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
228
|
+
Position2["top"] = "top";
|
|
229
|
+
Position2["right"] = "right";
|
|
230
|
+
Position2["bottom"] = "bottom";
|
|
231
|
+
Position2["left"] = "left";
|
|
232
|
+
return Position2;
|
|
233
|
+
})(Position || {});
|
|
234
|
+
var CornerPosition = /* @__PURE__ */ ((CornerPosition2) => {
|
|
235
|
+
CornerPosition2["topLeft"] = "topLeft";
|
|
236
|
+
CornerPosition2["topRight"] = "topRight";
|
|
237
|
+
CornerPosition2["bottomRight"] = "bottomRight";
|
|
238
|
+
CornerPosition2["bottomLeft"] = "bottomLeft";
|
|
239
|
+
return CornerPosition2;
|
|
240
|
+
})(CornerPosition || {});
|
|
241
|
+
|
|
242
|
+
var Size = /* @__PURE__ */ ((Size2) => {
|
|
243
|
+
Size2["sm"] = "sm";
|
|
244
|
+
Size2["md"] = "md";
|
|
245
|
+
return Size2;
|
|
246
|
+
})(Size || {});
|
|
247
|
+
|
|
248
|
+
var CollapseStrategy = /* @__PURE__ */ ((CollapseStrategy2) => {
|
|
249
|
+
CollapseStrategy2["single"] = "single";
|
|
250
|
+
CollapseStrategy2["multiple"] = "multiple";
|
|
251
|
+
return CollapseStrategy2;
|
|
252
|
+
})(CollapseStrategy || {});
|
|
253
|
+
|
|
254
|
+
var IconSize = /* @__PURE__ */ ((IconSize2) => {
|
|
255
|
+
IconSize2["sm"] = "sm";
|
|
256
|
+
IconSize2["md"] = "md";
|
|
257
|
+
IconSize2["xl3"] = "3xl";
|
|
258
|
+
return IconSize2;
|
|
259
|
+
})(IconSize || {});
|
|
260
|
+
|
|
261
|
+
var AntTableRowTypes = /* @__PURE__ */ ((AntTableRowTypes2) => {
|
|
262
|
+
AntTableRowTypes2["text"] = "text";
|
|
263
|
+
AntTableRowTypes2["html"] = "html";
|
|
264
|
+
AntTableRowTypes2["link"] = "link";
|
|
265
|
+
AntTableRowTypes2["slot"] = "slot";
|
|
266
|
+
return AntTableRowTypes2;
|
|
267
|
+
})(AntTableRowTypes || {});
|
|
268
|
+
var AntTableAlign = /* @__PURE__ */ ((AntTableAlign2) => {
|
|
269
|
+
AntTableAlign2["left"] = "left";
|
|
270
|
+
AntTableAlign2["center"] = "center";
|
|
271
|
+
AntTableAlign2["right"] = "right";
|
|
272
|
+
return AntTableAlign2;
|
|
273
|
+
})(AntTableAlign || {});
|
|
274
|
+
var AntTableSortDirection = /* @__PURE__ */ ((AntTableSortDirection2) => {
|
|
275
|
+
AntTableSortDirection2["asc"] = "asc";
|
|
276
|
+
AntTableSortDirection2["desc"] = "desc";
|
|
277
|
+
AntTableSortDirection2["neutral"] = "neutral";
|
|
278
|
+
return AntTableSortDirection2;
|
|
279
|
+
})(AntTableSortDirection || {});
|
|
280
|
+
|
|
281
|
+
var TextInputType = /* @__PURE__ */ ((TextInputType2) => {
|
|
282
|
+
TextInputType2["email"] = "email";
|
|
283
|
+
TextInputType2["password"] = "password";
|
|
284
|
+
TextInputType2["tel"] = "tel";
|
|
285
|
+
TextInputType2["text"] = "text";
|
|
286
|
+
TextInputType2["url"] = "url";
|
|
287
|
+
return TextInputType2;
|
|
288
|
+
})(TextInputType || {});
|
|
289
|
+
|
|
290
|
+
var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
|
|
291
|
+
ButtonType2["button"] = "button";
|
|
292
|
+
ButtonType2["submit"] = "submit";
|
|
293
|
+
return ButtonType2;
|
|
294
|
+
})(ButtonType || {});
|
|
295
|
+
|
|
296
|
+
var BaseInputType = /* @__PURE__ */ ((BaseInputType2) => {
|
|
297
|
+
BaseInputType2["date"] = "date";
|
|
298
|
+
BaseInputType2["datetime"] = "datetime";
|
|
299
|
+
BaseInputType2["email"] = "email";
|
|
300
|
+
BaseInputType2["hidden"] = "hidden";
|
|
301
|
+
BaseInputType2["month"] = "month";
|
|
302
|
+
BaseInputType2["number"] = "number";
|
|
303
|
+
BaseInputType2["password"] = "password";
|
|
304
|
+
BaseInputType2["search"] = "search";
|
|
305
|
+
BaseInputType2["tel"] = "tel";
|
|
306
|
+
BaseInputType2["text"] = "text";
|
|
307
|
+
BaseInputType2["time"] = "time";
|
|
308
|
+
BaseInputType2["url"] = "url";
|
|
309
|
+
BaseInputType2["week"] = "week";
|
|
310
|
+
BaseInputType2["range"] = "range";
|
|
311
|
+
return BaseInputType2;
|
|
312
|
+
})(BaseInputType || {});
|
|
313
|
+
|
|
314
|
+
const moduleKey = "uiModule";
|
|
315
|
+
const module = defineNuxtModule({
|
|
316
|
+
meta: {
|
|
317
|
+
name: "ui-module",
|
|
318
|
+
configKey: moduleKey
|
|
319
|
+
},
|
|
320
|
+
defaults: {},
|
|
321
|
+
async setup(options, nuxt) {
|
|
322
|
+
const { resolve } = createResolver(import.meta.url);
|
|
323
|
+
const runtimeDir = resolve("./runtime");
|
|
324
|
+
nuxt.options.build.transpile.push(runtimeDir);
|
|
325
|
+
addPlugin(resolve(runtimeDir, "plugins/ui-module"));
|
|
326
|
+
addImportsDir(resolve(runtimeDir, "composables"));
|
|
327
|
+
await addComponentsDir({
|
|
328
|
+
path: resolve(runtimeDir, "components"),
|
|
329
|
+
pattern: "**/*.vue",
|
|
330
|
+
pathPrefix: false,
|
|
331
|
+
global: true
|
|
332
|
+
});
|
|
333
|
+
nuxt.options.postcss.plugins.tailwindcss = tailwindcss;
|
|
334
|
+
nuxt.options.css.push(resolve(runtimeDir, "assets/tailwind.css"));
|
|
335
|
+
nuxt.options.runtimeConfig.public[moduleKey] = options;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
export { AntTableAlign, AntTableRowTypes, AntTableSortDirection, BaseInputType, ButtonType, CollapseStrategy, ColorType, CornerPosition, Grouped, IconSize, InputColorType, Position, Size, TextInputType, module as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@tailwind base;@tailwind components;@tailwind utilities;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntAccordionItem from './AntAccordionItem.vue';
|
|
3
|
+
import {onMounted, ref} from 'vue';
|
|
4
|
+
import {CollapseStrategy} from './__types/Accordion.types';
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(defineProps<{
|
|
7
|
+
items: {
|
|
8
|
+
label?: string;
|
|
9
|
+
content?: string;
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
}[];
|
|
12
|
+
collapseStrategy?: CollapseStrategy;
|
|
13
|
+
}>(), {
|
|
14
|
+
collapseStrategy: CollapseStrategy.single
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const openItems = ref<number[]>([]);
|
|
18
|
+
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
openItems.value = props.items
|
|
21
|
+
.map((item, index) => item.isOpen ? index : -1)
|
|
22
|
+
.filter((index) => index !== -1);
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
function onOpen(index: number) {
|
|
26
|
+
if (props.collapseStrategy === CollapseStrategy.single) {
|
|
27
|
+
openItems.value = [index];
|
|
28
|
+
} else {
|
|
29
|
+
openItems.value = [...openItems.value, index];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function onClose(index: number) {
|
|
34
|
+
if (props.collapseStrategy === CollapseStrategy.single) {
|
|
35
|
+
openItems.value = [];
|
|
36
|
+
} else {
|
|
37
|
+
openItems.value = openItems.value.filter((item) => item !== index);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<div class="w-full h-full flex flex-col bg-neutral-300 gap-px">
|
|
44
|
+
<slot>
|
|
45
|
+
<AntAccordionItem
|
|
46
|
+
v-for="(item, index) in items"
|
|
47
|
+
:label="item.label"
|
|
48
|
+
:is-open="openItems.includes(index)"
|
|
49
|
+
:key="`accordion-item-${index}`"
|
|
50
|
+
@open="() => onOpen(index)"
|
|
51
|
+
@close="() => onClose(index)"
|
|
52
|
+
>
|
|
53
|
+
<slot name="item-content" v-bind="{item, index}">
|
|
54
|
+
<div v-html="item.content"/>
|
|
55
|
+
</slot>
|
|
56
|
+
</AntAccordionItem>
|
|
57
|
+
</slot>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {faAngleDown, faAngleUp} from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import AntIcon from './AntIcon.vue';
|
|
4
|
+
import AntTransitionCollapseHeight from './transitions/AntTransitionCollapseHeight.vue';
|
|
5
|
+
|
|
6
|
+
const props = withDefaults(defineProps<{
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
collapseTransition?: string;
|
|
10
|
+
}>(), {
|
|
11
|
+
collapseTransition: 'slide'
|
|
12
|
+
});
|
|
13
|
+
const emit = defineEmits(['close', 'open']);
|
|
14
|
+
|
|
15
|
+
// TODO:: Stehengeblieben: delays machen
|
|
16
|
+
function onClick() {
|
|
17
|
+
if (props.isOpen) {
|
|
18
|
+
emit('close');
|
|
19
|
+
} else {
|
|
20
|
+
emit('open');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<div
|
|
27
|
+
class="p-2.5 select-none cursor-pointer transition-colors"
|
|
28
|
+
:class="{'bg-primary-500 text-primary-500-font': isOpen, 'bg-neutral-50 text-neutral-50-font': !isOpen}"
|
|
29
|
+
@click="onClick"
|
|
30
|
+
>
|
|
31
|
+
<slot name="label" v-bind="{ isOpen: isOpen }">
|
|
32
|
+
<div
|
|
33
|
+
class="hover:text-gray-800 flex justify-between items-center"
|
|
34
|
+
>
|
|
35
|
+
<span class="text-sm font-semibold">
|
|
36
|
+
{{ label }}
|
|
37
|
+
</span>
|
|
38
|
+
|
|
39
|
+
<AntIcon
|
|
40
|
+
:icon="isOpen ? faAngleUp : faAngleDown"
|
|
41
|
+
:color="isOpen ? 'text-primary-500-font' : undefined"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
</slot>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<AntTransitionCollapseHeight>
|
|
48
|
+
<div
|
|
49
|
+
v-show="isOpen"
|
|
50
|
+
class="bg-white overflow-hidden -mt-px"
|
|
51
|
+
>
|
|
52
|
+
<transition name="bounce">
|
|
53
|
+
<div
|
|
54
|
+
v-show="isOpen"
|
|
55
|
+
class="p-2.5 bg-neutral-50"
|
|
56
|
+
>
|
|
57
|
+
<slot/>
|
|
58
|
+
</div>
|
|
59
|
+
</transition>
|
|
60
|
+
</div>
|
|
61
|
+
</AntTransitionCollapseHeight>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<style scoped>
|
|
65
|
+
.bounce-enter-active{animation:bounce .6s}.bounce-leave-active{animation:bounce .6s reverse}@keyframes bounce{0%{opacity:0;transform:translateY(-100%)}50%{opacity:1;transform:translateY(5%)}to{opacity:1;transform:translateY(0)}}.slide-enter-active{animation:slide 1s}.slide-leave-active{animation:slide 1s reverse}@keyframes slide{0%{//transform:translateY(-100%);max-height:0;opacity:0}to{//transform:translateY(0);max-height:100%;opacity:1}}
|
|
66
|
+
</style>
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {computed, onMounted, useSlots} from 'vue';
|
|
3
|
+
import {handleEnumValidation} from '../handler';
|
|
4
|
+
import {
|
|
5
|
+
faCheckCircle,
|
|
6
|
+
faCircleQuestion,
|
|
7
|
+
faExclamationCircle,
|
|
8
|
+
faExclamationTriangle,
|
|
9
|
+
faInfoCircle,
|
|
10
|
+
faXmark
|
|
11
|
+
} from '@fortawesome/free-solid-svg-icons';
|
|
12
|
+
import AntIcon from './AntIcon.vue';
|
|
13
|
+
import AntTooltip from './AntTooltip.vue';
|
|
14
|
+
import AntSkeleton from './AntSkeleton.vue';
|
|
15
|
+
import {InputColorType, Position} from '../enums';
|
|
16
|
+
import {IconSize} from './__types';
|
|
17
|
+
|
|
18
|
+
defineEmits(['close']);
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(defineProps<{
|
|
21
|
+
title: string,
|
|
22
|
+
colorType?: InputColorType,
|
|
23
|
+
icon?: boolean,
|
|
24
|
+
expanded?: boolean,
|
|
25
|
+
questionMarkText?: string,
|
|
26
|
+
skeleton?: boolean,
|
|
27
|
+
dismissBtn?: boolean,
|
|
28
|
+
}>(), {
|
|
29
|
+
colorType: InputColorType.base,
|
|
30
|
+
icon: true,
|
|
31
|
+
expanded: false,
|
|
32
|
+
skeleton: false,
|
|
33
|
+
dismissBtn: true,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const icons = {
|
|
37
|
+
[InputColorType.base]: faInfoCircle,
|
|
38
|
+
[InputColorType.info]: faInfoCircle,
|
|
39
|
+
[InputColorType.danger]: faExclamationCircle,
|
|
40
|
+
[InputColorType.warning]: faExclamationTriangle,
|
|
41
|
+
[InputColorType.success]: faCheckCircle,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const _icon = computed(() => icons[props.colorType]);
|
|
45
|
+
const classes = computed(() => {
|
|
46
|
+
const variants: Record<InputColorType, string> = {
|
|
47
|
+
[InputColorType.danger]: 'bg-danger-100 text-danger-500',
|
|
48
|
+
[InputColorType.info]: 'bg-info-100 text-info-500',
|
|
49
|
+
[InputColorType.base]: 'bg-neutral-100 text-neutral-500',
|
|
50
|
+
[InputColorType.success]: 'bg-success-100 text-success-500',
|
|
51
|
+
[InputColorType.warning]: 'bg-warning-100 text-warning-500',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
'inline-flex flex-col gap-2.5 rounded-md p-2.5 transition-colors text-sm relative': true,
|
|
56
|
+
'w-full': props.expanded,
|
|
57
|
+
[variants[props.colorType]]: true,
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
const hasDefaultSlot = computed(() => useSlots()['default'] || false);
|
|
61
|
+
const hasQuestionMark = computed(() => (useSlots()['question-mark-text'] || false) || props.questionMarkText);
|
|
62
|
+
const iconColor = computed(() => {
|
|
63
|
+
const variants = {
|
|
64
|
+
[InputColorType.base]: 'text-neutral-100-font',
|
|
65
|
+
[InputColorType.danger]: 'text-danger-500',
|
|
66
|
+
[InputColorType.info]: 'text-info-500',
|
|
67
|
+
[InputColorType.success]: 'text-success-500',
|
|
68
|
+
[InputColorType.warning]: 'text-warning-500',
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return variants[props.colorType];
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
onMounted(() => {
|
|
75
|
+
handleEnumValidation(props.colorType, InputColorType, 'colorType');
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<template>
|
|
80
|
+
<div
|
|
81
|
+
:class="classes"
|
|
82
|
+
data-e2e="alert"
|
|
83
|
+
>
|
|
84
|
+
<AntSkeleton v-if="skeleton" absolute rounded/>
|
|
85
|
+
|
|
86
|
+
<div
|
|
87
|
+
class="inline-flex items-center justify-between w-content gap-2.5"
|
|
88
|
+
:class="{'invisible': skeleton}"
|
|
89
|
+
>
|
|
90
|
+
<div class="inline-flex items-center gap-2.5">
|
|
91
|
+
<AntIcon
|
|
92
|
+
v-if="icon"
|
|
93
|
+
:icon="_icon"
|
|
94
|
+
:color="iconColor"
|
|
95
|
+
:size="IconSize.sm"
|
|
96
|
+
/>
|
|
97
|
+
|
|
98
|
+
<div :class="{'font-semibold': hasDefaultSlot}">
|
|
99
|
+
<slot name="title">
|
|
100
|
+
{{ title }}
|
|
101
|
+
</slot>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div class="flex gap-2.5">
|
|
106
|
+
<div v-if="hasQuestionMark">
|
|
107
|
+
<slot name="questionMarkText">
|
|
108
|
+
<AntTooltip :position="Position.bottom">
|
|
109
|
+
<AntIcon
|
|
110
|
+
:icon="faCircleQuestion"
|
|
111
|
+
:color="iconColor"
|
|
112
|
+
:size="IconSize.sm"
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
<template #content>
|
|
116
|
+
{{ questionMarkText }}
|
|
117
|
+
</template>
|
|
118
|
+
</AntTooltip>
|
|
119
|
+
</slot>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<AntIcon
|
|
123
|
+
v-if="dismissBtn"
|
|
124
|
+
:icon="faXmark"
|
|
125
|
+
class="cursor-pointer"
|
|
126
|
+
:color="iconColor"
|
|
127
|
+
:size="IconSize.sm"
|
|
128
|
+
@click="() => $emit('close')"
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div v-if="hasDefaultSlot">
|
|
134
|
+
<slot/>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</template>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* TODO:: Emit if there's enough space for the dropdown content. If not, reposition it automatically like the
|
|
4
|
+
* browsers select dropdown content does.
|
|
5
|
+
* TODO:: Known issue: open dropdown, click between button and dropdown. Dropdown will not click.
|
|
6
|
+
* The v-on-click-outside does not trigger, because it think it's the dropdown itself.
|
|
7
|
+
* Solution is using margin only (calc(50% + 0.625rem)) and not padding.
|
|
8
|
+
*/
|
|
9
|
+
import {computed, onMounted} from 'vue';
|
|
10
|
+
import {handleEnumValidation} from '../handler';
|
|
11
|
+
import {Position} from '../enums';
|
|
12
|
+
import {classesToObjectSyntax} from '../utils';
|
|
13
|
+
import {vOnClickOutside} from '@vueuse/components';
|
|
14
|
+
import {onKeyStroke} from '@vueuse/core';
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<{
|
|
17
|
+
showDropdown: boolean,
|
|
18
|
+
position?: Position,
|
|
19
|
+
dropdownClasses?: string | Record<string, boolean>,
|
|
20
|
+
contentPadding?: boolean
|
|
21
|
+
}>(), {
|
|
22
|
+
showDropdown: false,
|
|
23
|
+
contentPadding: true,
|
|
24
|
+
position: Position.bottom,
|
|
25
|
+
dropdownClasses: '',
|
|
26
|
+
});
|
|
27
|
+
const emit = defineEmits(['update:showDropdown']);
|
|
28
|
+
|
|
29
|
+
const _dropdownClasses = computed(() => ({
|
|
30
|
+
'absolute min-w-[10rem]': true,
|
|
31
|
+
'bottom-0 left-0 mb-[50%] pb-2.5': props.position === Position.top,
|
|
32
|
+
'top-0 left-0 mt-[50%] pt-2.5': props.position === Position.bottom,
|
|
33
|
+
'right-0 top-0 mr-[100%] pr-2.5': props.position === Position.left,
|
|
34
|
+
'left-0 top-0 ml-[100%] pl-2.5': props.position === Position.right,
|
|
35
|
+
...classesToObjectSyntax(props.dropdownClasses)
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
onMounted(() => {
|
|
39
|
+
handleEnumValidation(props.position, Position, 'Position')
|
|
40
|
+
});
|
|
41
|
+
onKeyStroke('Escape', (e: KeyboardEvent) => {
|
|
42
|
+
if (props.showDropdown) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
emit('update:showDropdown', false);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
function onClickOutside() {
|
|
49
|
+
emit('update:showDropdown', false);
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<div
|
|
55
|
+
class="relative inline-flex justify-center items-end z-40"
|
|
56
|
+
data-e2e="dropdown"
|
|
57
|
+
v-on-click-outside="onClickOutside"
|
|
58
|
+
>
|
|
59
|
+
<slot/>
|
|
60
|
+
|
|
61
|
+
<transition name="bounce">
|
|
62
|
+
<div
|
|
63
|
+
v-if="showDropdown"
|
|
64
|
+
:class="_dropdownClasses"
|
|
65
|
+
>
|
|
66
|
+
<div
|
|
67
|
+
class="shadow-lg border border-neutral-300 rounded-md text-sm relative inline-flex flex-col relative bg-neutral-50 text-neutral-50-font w-full"
|
|
68
|
+
:class="{'p-2.5': contentPadding}"
|
|
69
|
+
>
|
|
70
|
+
<slot name="content"/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</transition>
|
|
74
|
+
</div>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<style scoped>
|
|
78
|
+
.bounce-enter-active{animation:bounce-in .4s}.bounce-leave-active{animation:bounce-in .4s reverse}@keyframes bounce-in{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.05)}to{opacity:1;transform:scale(1)}}
|
|
79
|
+
</style>
|