@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/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@antify/ui-module",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.1.3",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/module.mjs",
|
|
10
|
+
"require": "./dist/module.cjs",
|
|
11
|
+
"types": "./dist/types.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"src/runtime/components/**/*.vue"
|
|
17
|
+
],
|
|
18
|
+
"main": "./dist/module.cjs",
|
|
19
|
+
"types": "./dist/types.d.ts",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@antify/validate": "1.14.0",
|
|
22
|
+
"@fortawesome/free-regular-svg-icons": "^6.5.1",
|
|
23
|
+
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
|
24
|
+
"@fortawesome/vue-fontawesome": "^3.0.5",
|
|
25
|
+
"@nuxt/kit": "^3.9.3",
|
|
26
|
+
"@tailwindcss/forms": "^0.5.7",
|
|
27
|
+
"@tiptap/extension-heading": "^2.1.16",
|
|
28
|
+
"@tiptap/extension-underline": "^2.1.16",
|
|
29
|
+
"@tiptap/pm": "^2.1.16",
|
|
30
|
+
"@tiptap/starter-kit": "^2.1.16",
|
|
31
|
+
"@tiptap/vue-3": "^2.1.16",
|
|
32
|
+
"@vuepic/vue-datepicker": "^6.1.0",
|
|
33
|
+
"@vueuse/components": "^10.7.2",
|
|
34
|
+
"@vueuse/core": "^10.7.2",
|
|
35
|
+
"@vueuse/router": "^10.7.2",
|
|
36
|
+
"autoprefixer": "^10.4.17",
|
|
37
|
+
"postcss": "^8.4.33",
|
|
38
|
+
"tailwindcss": "^3.4.1",
|
|
39
|
+
"vue": "^3.4.15",
|
|
40
|
+
"vue-router": "^4.2.5"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@faker-js/faker": "^8.3.1",
|
|
44
|
+
"@nuxt/eslint-config": "^0.2.0",
|
|
45
|
+
"@nuxt/module-builder": "^0.5.5",
|
|
46
|
+
"@storybook/addon-docs": "^7.6.10",
|
|
47
|
+
"@storybook/addon-essentials": "^7.6.10",
|
|
48
|
+
"@storybook/addon-interactions": "^7.6.10",
|
|
49
|
+
"@storybook/addon-links": "^7.6.10",
|
|
50
|
+
"@storybook/blocks": "^7.6.10",
|
|
51
|
+
"@storybook/test": "^7.6.10",
|
|
52
|
+
"@storybook/vue3": "^7.6.10",
|
|
53
|
+
"@storybook/vue3-vite": "^7.6.10",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^6.19.1",
|
|
55
|
+
"@typescript-eslint/parser": "^6.19.1",
|
|
56
|
+
"autoprefixer": "^10.4.16",
|
|
57
|
+
"eslint": "^8.56.0",
|
|
58
|
+
"eslint-config-prettier": "^9.1.0",
|
|
59
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
60
|
+
"eslint-plugin-vue": "^9.20.1",
|
|
61
|
+
"nuxt": "^3.9.3",
|
|
62
|
+
"ofetch": "^1.3.3",
|
|
63
|
+
"react": "^18.2.0",
|
|
64
|
+
"react-dom": "^18.2.0",
|
|
65
|
+
"standard-version": "latest",
|
|
66
|
+
"storybook": "7.5.3",
|
|
67
|
+
"typescript": "^5.3.3",
|
|
68
|
+
"unbuild": "^2.0.0",
|
|
69
|
+
"vue-cli-plugin-tailwind": "3.0.0"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "nuxt-module-build",
|
|
73
|
+
"dev": "nuxi dev playground",
|
|
74
|
+
"dev:build": "nuxi build playground",
|
|
75
|
+
"dev:prepare": "nuxt-module-build build && nuxi prepare playground",
|
|
76
|
+
"storybook": "storybook dev -p 6006 --no-open",
|
|
77
|
+
"build-storybook": "storybook build",
|
|
78
|
+
"release": "standard-version && git push --follow-tags && pnpm publish --access public",
|
|
79
|
+
"release-minor": "standard-version -- --release-as minor && git push --follow-tags && pnpm publish"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -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,104 @@
|
|
|
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 {
|
|
66
|
+
animation: bounce .6s;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.bounce-leave-active {
|
|
70
|
+
animation: bounce .6s reverse;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@keyframes bounce {
|
|
74
|
+
0% {
|
|
75
|
+
transform: translateY(-100%);
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
50% {
|
|
79
|
+
transform: translateY(5%);
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
100% {
|
|
83
|
+
transform: translateY(0%);
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.slide-enter-active {
|
|
89
|
+
animation: slide 1s;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.slide-leave-active {
|
|
93
|
+
animation: slide 1s reverse;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@keyframes slide {
|
|
97
|
+
0% {
|
|
98
|
+
//transform: translateY(-100%); max-height: 0; opacity: 0;
|
|
99
|
+
}
|
|
100
|
+
100% {
|
|
101
|
+
//transform: translateY(0%); max-height: 100%; opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</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,100 @@
|
|
|
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 {
|
|
79
|
+
animation: bounce-in .4s;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bounce-leave-active {
|
|
83
|
+
animation: bounce-in .4s reverse;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes bounce-in {
|
|
87
|
+
0% {
|
|
88
|
+
transform: scale(0);
|
|
89
|
+
opacity: 0;
|
|
90
|
+
}
|
|
91
|
+
50% {
|
|
92
|
+
transform: scale(1.05);
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
100% {
|
|
96
|
+
transform: scale(1);
|
|
97
|
+
opacity: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {computed, onMounted} from 'vue';
|
|
3
|
+
import {handleEnumValidation} from '../handler';
|
|
4
|
+
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import {IconSize} from './__types/AntIcon.types';
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<{
|
|
8
|
+
icon: IconDefinition;
|
|
9
|
+
size?: IconSize;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A css text-* class
|
|
13
|
+
*/
|
|
14
|
+
color?: string;
|
|
15
|
+
}>(), {
|
|
16
|
+
size: IconSize.md,
|
|
17
|
+
color: 'text-for-white-bg-font'
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const containerClasses = computed(() => ({
|
|
21
|
+
'inline-flex items-center justify-center': true,
|
|
22
|
+
'w-4 h-4': props.size === IconSize.sm,
|
|
23
|
+
'w-5 h-5': props.size === IconSize.md,
|
|
24
|
+
'w-9 h-9': props.size === IconSize.xl3,
|
|
25
|
+
[props.color]: true,
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
// TODO:: replace with/height with font-size
|
|
29
|
+
const iconClasses = computed(() => ({
|
|
30
|
+
'transition-colors': true,
|
|
31
|
+
'h-3 w-3': props.size === IconSize.sm,
|
|
32
|
+
'h-4 w-4': props.size === IconSize.md,
|
|
33
|
+
'text-3xl': props.size === IconSize.xl3,
|
|
34
|
+
}));
|
|
35
|
+
|
|
36
|
+
onMounted(() => {
|
|
37
|
+
handleEnumValidation(props.size, IconSize, 'size');
|
|
38
|
+
});
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<span
|
|
43
|
+
v-if="icon"
|
|
44
|
+
:class="containerClasses"
|
|
45
|
+
>
|
|
46
|
+
<fa-icon
|
|
47
|
+
:icon="icon"
|
|
48
|
+
:class="iconClasses"
|
|
49
|
+
/>
|
|
50
|
+
</span>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
// TODO:: Fix typo KeyCap with upperchar C
|
|
3
|
+
import AntIcon from './AntIcon.vue';
|
|
4
|
+
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
import {IconSize} from './__types';
|
|
6
|
+
|
|
7
|
+
defineProps<{
|
|
8
|
+
icon?: IconDefinition
|
|
9
|
+
}>();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<span
|
|
14
|
+
class="inline-block py-0.5 px-1.5 bg-neutral-300 rounded-md text-sm min-w-[1.5rem] text-center text-neutral-500-font font-medium"
|
|
15
|
+
>
|
|
16
|
+
<AntIcon
|
|
17
|
+
v-if="icon"
|
|
18
|
+
:icon="icon"
|
|
19
|
+
:size="IconSize.sm"
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<slot v-else/>
|
|
23
|
+
</span>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntSkeleton from './AntSkeleton.vue';
|
|
3
|
+
|
|
4
|
+
withDefaults(
|
|
5
|
+
defineProps<{
|
|
6
|
+
skeleton?: boolean
|
|
7
|
+
}>(), {
|
|
8
|
+
skeleton: false
|
|
9
|
+
}
|
|
10
|
+
)
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="relative">
|
|
15
|
+
<AntSkeleton v-if="skeleton" absolute rounded/>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
class="flex flex-col rounded-md bg-neutral-300 gap-px relative border border-neutral-300 overflow-hidden"
|
|
19
|
+
:class="{'invisible': skeleton}"
|
|
20
|
+
>
|
|
21
|
+
<slot/>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {computed, onMounted} from 'vue';
|
|
3
|
+
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
4
|
+
import {ListGroupItemColorType} from '../types/AntListGroupItem.type';
|
|
5
|
+
import {handleEnumValidation} from '../handler';
|
|
6
|
+
import {type RouteLocationRaw} from 'vue-router';
|
|
7
|
+
import AntIcon from './AntIcon.vue';
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<{
|
|
10
|
+
to?: RouteLocationRaw | string;
|
|
11
|
+
colorType?: ListGroupItemColorType;
|
|
12
|
+
iconLeft?: IconDefinition;
|
|
13
|
+
iconRight?: IconDefinition;
|
|
14
|
+
}>(), {
|
|
15
|
+
colorType: ListGroupItemColorType.neutral50,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const classes = computed(() => {
|
|
19
|
+
const variants: Record<ListGroupItemColorType, string> = {
|
|
20
|
+
[ListGroupItemColorType.danger]: 'bg-danger-500 text-danger-500-font',
|
|
21
|
+
[ListGroupItemColorType.info]: 'bg-info-500 text-info-500-font',
|
|
22
|
+
[ListGroupItemColorType.neutral700]: 'bg-neutral-700 text-neutral-700-font',
|
|
23
|
+
[ListGroupItemColorType.neutral300]: 'bg-neutral-300 text-neutral-300-font',
|
|
24
|
+
[ListGroupItemColorType.neutral50]: 'bg-neutral-50 text-neutral-50-font',
|
|
25
|
+
[ListGroupItemColorType.primary]: 'bg-primary-500 text-primary-500-font',
|
|
26
|
+
[ListGroupItemColorType.secondary]: 'bg-secondary-500 text-secondary-500-font',
|
|
27
|
+
[ListGroupItemColorType.success]: 'bg-success-500 text-success-500-font',
|
|
28
|
+
[ListGroupItemColorType.warning]: 'bg-warning-500 text-warning-500-font',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
'text-sm transition-colors inline-block w-full': true,
|
|
33
|
+
[variants[props.colorType]]: true,
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
const contentWrapperClasses = computed(() => {
|
|
37
|
+
const variants: Record<ListGroupItemColorType, string> = {
|
|
38
|
+
[ListGroupItemColorType.danger]: 'text-danger-500-font',
|
|
39
|
+
[ListGroupItemColorType.info]: 'text-info-500-font',
|
|
40
|
+
[ListGroupItemColorType.neutral700]: 'text-neutral-700-font',
|
|
41
|
+
[ListGroupItemColorType.neutral300]: 'text-neutral-300-font',
|
|
42
|
+
[ListGroupItemColorType.neutral50]: 'text-neutral-50-font',
|
|
43
|
+
[ListGroupItemColorType.primary]: 'text-primary-500-font',
|
|
44
|
+
[ListGroupItemColorType.secondary]: 'text-secondary-500-font',
|
|
45
|
+
[ListGroupItemColorType.success]: 'text-success-500-font',
|
|
46
|
+
[ListGroupItemColorType.warning]: 'text-warning-500-font',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
'w-full p-2.5 flex gap-2.5 items-center justify-between': true,
|
|
51
|
+
'hover:bg-neutral-950/25 cursor-pointer transition-colors': props.to !== undefined,
|
|
52
|
+
[variants[props.colorType]]: props.to !== undefined
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
handleEnumValidation(props.colorType, ListGroupItemColorType, 'colorType');
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<component
|
|
63
|
+
:is="to !== undefined ? 'router-link' : 'div'"
|
|
64
|
+
:to="to"
|
|
65
|
+
:class="classes"
|
|
66
|
+
>
|
|
67
|
+
<div :class="contentWrapperClasses">
|
|
68
|
+
<div class="flex items-center gap-2.5">
|
|
69
|
+
<slot v-if="iconLeft" name="icon-left">
|
|
70
|
+
<AntIcon :icon="iconLeft"/>
|
|
71
|
+
</slot>
|
|
72
|
+
|
|
73
|
+
<slot/>
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<slot v-if="iconRight" name="icon-right">
|
|
77
|
+
<AntIcon :icon="iconRight"/>
|
|
78
|
+
</slot>
|
|
79
|
+
</div>
|
|
80
|
+
</component>
|
|
81
|
+
</template>
|