@antify/ui 1.0.0
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 +14 -0
- package/dist/components/AntAccordion.vue +64 -0
- package/dist/components/AntAccordionItem.vue +119 -0
- package/dist/components/AntAlert.vue +146 -0
- package/dist/components/AntCard.vue +34 -0
- package/dist/components/AntContent.vue +16 -0
- package/dist/components/AntDropdown.vue +100 -0
- package/dist/components/AntIcon.vue +56 -0
- package/dist/components/AntKeycap.vue +45 -0
- package/dist/components/AntListGroup.vue +24 -0
- package/dist/components/AntListGroupItem.vue +83 -0
- package/dist/components/AntModal.vue +130 -0
- package/dist/components/AntPagination.vue +205 -0
- package/dist/components/AntPopover.vue +135 -0
- package/dist/components/AntSkeleton.vue +38 -0
- package/dist/components/AntSpinner.vue +101 -0
- package/dist/components/AntTag.vue +114 -0
- package/dist/components/AntToast.vue +119 -0
- package/dist/components/AntToaster.vue +71 -0
- package/dist/components/AntTooltip.vue +189 -0
- package/dist/components/Main.stories.d.ts +7 -0
- package/dist/components/Main.stories.js +15 -0
- package/dist/components/Main.stories.mjs +8 -0
- package/dist/components/__stories/AntAccordion.stories.d.ts +9 -0
- package/dist/components/__stories/AntAccordion.stories.js +120 -0
- package/dist/components/__stories/AntAccordion.stories.mjs +101 -0
- package/dist/components/__stories/AntAlert.stories.d.ts +11 -0
- package/dist/components/__stories/AntAlert.stories.js +99 -0
- package/dist/components/__stories/AntAlert.stories.mjs +81 -0
- package/dist/components/__stories/AntCard.stories.d.ts +7 -0
- package/dist/components/__stories/AntCard.stories.js +118 -0
- package/dist/components/__stories/AntCard.stories.mjs +87 -0
- package/dist/components/__stories/AntContent.stories.d.ts +6 -0
- package/dist/components/__stories/AntContent.stories.js +43 -0
- package/dist/components/__stories/AntContent.stories.mjs +26 -0
- package/dist/components/__stories/AntDropdown.stories.d.ts +6 -0
- package/dist/components/__stories/AntDropdown.stories.js +71 -0
- package/dist/components/__stories/AntDropdown.stories.mjs +52 -0
- package/dist/components/__stories/AntIcon.stories.d.ts +8 -0
- package/dist/components/__stories/AntIcon.stories.js +122 -0
- package/dist/components/__stories/AntIcon.stories.mjs +93 -0
- package/dist/components/__stories/AntKeycap.stories.d.ts +9 -0
- package/dist/components/__stories/AntKeycap.stories.js +98 -0
- package/dist/components/__stories/AntKeycap.stories.mjs +69 -0
- package/dist/components/__stories/AntListGroup.stories.d.ts +7 -0
- package/dist/components/__stories/AntListGroup.stories.js +56 -0
- package/dist/components/__stories/AntListGroup.stories.mjs +36 -0
- package/dist/components/__stories/AntListGroupItem.stories.d.ts +10 -0
- package/dist/components/__stories/AntListGroupItem.stories.js +83 -0
- package/dist/components/__stories/AntListGroupItem.stories.mjs +62 -0
- package/dist/components/__stories/AntModal.stories.d.ts +7 -0
- package/dist/components/__stories/AntModal.stories.js +96 -0
- package/dist/components/__stories/AntModal.stories.mjs +78 -0
- package/dist/components/__stories/AntPagination.stories.d.ts +8 -0
- package/dist/components/__stories/AntPagination.stories.js +57 -0
- package/dist/components/__stories/AntPagination.stories.mjs +41 -0
- package/dist/components/__stories/AntPopover.stories.d.ts +6 -0
- package/dist/components/__stories/AntPopover.stories.js +67 -0
- package/dist/components/__stories/AntPopover.stories.mjs +47 -0
- package/dist/components/__stories/AntSkeleton.stories.d.ts +8 -0
- package/dist/components/__stories/AntSkeleton.stories.js +60 -0
- package/dist/components/__stories/AntSkeleton.stories.mjs +43 -0
- package/dist/components/__stories/AntSpinner.stories.d.ts +6 -0
- package/dist/components/__stories/AntSpinner.stories.js +61 -0
- package/dist/components/__stories/AntSpinner.stories.mjs +34 -0
- package/dist/components/__stories/AntTag.stories.d.ts +7 -0
- package/dist/components/__stories/AntTag.stories.js +65 -0
- package/dist/components/__stories/AntTag.stories.mjs +43 -0
- package/dist/components/__stories/AntToast.stories.d.ts +8 -0
- package/dist/components/__stories/AntToast.stories.js +85 -0
- package/dist/components/__stories/AntToast.stories.mjs +66 -0
- package/dist/components/__stories/AntToaster.stories.d.ts +42 -0
- package/dist/components/__stories/AntToaster.stories.js +128 -0
- package/dist/components/__stories/AntToaster.stories.mjs +110 -0
- package/dist/components/__stories/AntTooltip.stories.d.ts +16 -0
- package/dist/components/__stories/AntTooltip.stories.js +283 -0
- package/dist/components/__stories/AntTooltip.stories.mjs +241 -0
- package/dist/components/__types/AntAccordion.types.d.ts +4 -0
- package/dist/components/__types/AntAccordion.types.js +11 -0
- package/dist/components/__types/AntAccordion.types.mjs +5 -0
- package/dist/components/__types/AntIcon.types.d.ts +8 -0
- package/dist/components/__types/AntIcon.types.js +15 -0
- package/dist/components/__types/AntIcon.types.mjs +9 -0
- package/dist/components/__types/AntKeycap.types.d.ts +4 -0
- package/dist/components/__types/AntKeycap.types.js +11 -0
- package/dist/components/__types/AntKeycap.types.mjs +5 -0
- package/dist/components/__types/AntListGroupItem.types.d.ts +9 -0
- package/dist/components/__types/AntListGroupItem.types.js +16 -0
- package/dist/components/__types/AntListGroupItem.types.mjs +10 -0
- package/dist/components/__types/AntSpinner.types.d.ts +10 -0
- package/dist/components/__types/AntSpinner.types.js +17 -0
- package/dist/components/__types/AntSpinner.types.mjs +11 -0
- package/dist/components/__types/AntTag.types.d.ts +17 -0
- package/dist/components/__types/AntTag.types.js +25 -0
- package/dist/components/__types/AntTag.types.mjs +19 -0
- package/dist/components/__types/AntToaster.types.d.ts +8 -0
- package/dist/components/__types/AntToaster.types.js +1 -0
- package/dist/components/__types/AntToaster.types.mjs +0 -0
- package/dist/components/__types/index.d.ts +7 -0
- package/dist/components/__types/index.js +82 -0
- package/dist/components/__types/index.mjs +7 -0
- package/dist/components/buttons/AntActionButton.vue +74 -0
- package/dist/components/buttons/AntButton.vue +257 -0
- package/dist/components/buttons/AntCreateButton.vue +54 -0
- package/dist/components/buttons/AntDeleteButton.vue +54 -0
- package/dist/components/buttons/AntDuplicateButton.vue +54 -0
- package/dist/components/buttons/AntEditButton.vue +54 -0
- package/dist/components/buttons/AntSaveAndNewButton.vue +56 -0
- package/dist/components/buttons/AntSaveButton.vue +55 -0
- package/dist/components/buttons/__stories/AntActionButton.stories.d.ts +11 -0
- package/dist/components/buttons/__stories/AntActionButton.stories.js +111 -0
- package/dist/components/buttons/__stories/AntActionButton.stories.mjs +86 -0
- package/dist/components/buttons/__stories/AntButton.stories.d.ts +16 -0
- package/dist/components/buttons/__stories/AntButton.stories.js +361 -0
- package/dist/components/buttons/__stories/AntButton.stories.mjs +313 -0
- package/dist/components/buttons/__stories/AntCreateButton.stories.d.ts +12 -0
- package/dist/components/buttons/__stories/AntCreateButton.stories.js +97 -0
- package/dist/components/buttons/__stories/AntCreateButton.stories.mjs +76 -0
- package/dist/components/buttons/__stories/AntDeleteButton.stories.d.ts +12 -0
- package/dist/components/buttons/__stories/AntDeleteButton.stories.js +97 -0
- package/dist/components/buttons/__stories/AntDeleteButton.stories.mjs +76 -0
- package/dist/components/buttons/__stories/AntDuplicateButton.stories.d.ts +12 -0
- package/dist/components/buttons/__stories/AntDuplicateButton.stories.js +97 -0
- package/dist/components/buttons/__stories/AntDuplicateButton.stories.mjs +76 -0
- package/dist/components/buttons/__stories/AntEditButton.stories.d.ts +12 -0
- package/dist/components/buttons/__stories/AntEditButton.stories.js +97 -0
- package/dist/components/buttons/__stories/AntEditButton.stories.mjs +76 -0
- package/dist/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +12 -0
- package/dist/components/buttons/__stories/AntSaveAndNewButton.stories.js +97 -0
- package/dist/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +76 -0
- package/dist/components/buttons/__stories/AntSaveButton.stories.d.ts +12 -0
- package/dist/components/buttons/__stories/AntSaveButton.stories.js +97 -0
- package/dist/components/buttons/__stories/AntSaveButton.stories.mjs +76 -0
- package/dist/components/buttons/__types/AntButton.types.d.ts +4 -0
- package/dist/components/buttons/__types/AntButton.types.js +11 -0
- package/dist/components/buttons/__types/AntButton.types.mjs +5 -0
- package/dist/components/buttons/__types/index.d.ts +1 -0
- package/dist/components/buttons/__types/index.js +16 -0
- package/dist/components/buttons/__types/index.mjs +1 -0
- package/dist/components/crud/AntCrud.vue +75 -0
- package/dist/components/crud/AntCrudDetail.vue +11 -0
- package/dist/components/crud/AntCrudDetailActions.vue +58 -0
- package/dist/components/crud/AntCrudDetailNav.vue +64 -0
- package/dist/components/crud/AntCrudTableFilter.vue +122 -0
- package/dist/components/crud/AntCrudTableNav.vue +149 -0
- package/dist/components/crud/__stories/AntCrud.stories.d.ts +6 -0
- package/dist/components/crud/__stories/AntCrud.stories.js +131 -0
- package/dist/components/crud/__stories/AntCrud.stories.mjs +130 -0
- package/dist/components/crud/__stories/AntCrudDetail.stories.d.ts +7 -0
- package/dist/components/crud/__stories/AntCrudDetail.stories.js +90 -0
- package/dist/components/crud/__stories/AntCrudDetail.stories.mjs +84 -0
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.d.ts +6 -0
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.js +38 -0
- package/dist/components/crud/__stories/AntCrudDetailActions.stories.mjs +25 -0
- package/dist/components/crud/__stories/AntCrudDetailNav.stories.d.ts +6 -0
- package/dist/components/crud/__stories/AntCrudDetailNav.stories.js +51 -0
- package/dist/components/crud/__stories/AntCrudDetailNav.stories.mjs +45 -0
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.d.ts +6 -0
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.js +42 -0
- package/dist/components/crud/__stories/AntCrudTableFilter.stories.mjs +27 -0
- package/dist/components/crud/__stories/AntCrudTableNav.stories.d.ts +8 -0
- package/dist/components/crud/__stories/AntCrudTableNav.stories.js +77 -0
- package/dist/components/crud/__stories/AntCrudTableNav.stories.mjs +58 -0
- package/dist/components/dialogs/AntDeleteDialog.vue +29 -0
- package/dist/components/dialogs/AntDialog.vue +182 -0
- package/dist/components/dialogs/__stories/AndDeleteDialog.stories.d.ts +6 -0
- package/dist/components/dialogs/__stories/AndDeleteDialog.stories.js +48 -0
- package/dist/components/dialogs/__stories/AndDeleteDialog.stories.mjs +32 -0
- package/dist/components/dialogs/__stories/AntDialog.stories.d.ts +6 -0
- package/dist/components/dialogs/__stories/AntDialog.stories.js +84 -0
- package/dist/components/dialogs/__stories/AntDialog.stories.mjs +60 -0
- package/dist/components/forms/AntField.vue +123 -0
- package/dist/components/forms/AntFormGroup.vue +36 -0
- package/dist/components/forms/AntFormGroupLabel.vue +5 -0
- package/dist/components/forms/__stories/AntField.stories.d.ts +6 -0
- package/dist/components/forms/__stories/AntField.stories.js +110 -0
- package/dist/components/forms/__stories/AntField.stories.mjs +80 -0
- package/dist/components/forms/__stories/AntFormGroup.stories.d.ts +6 -0
- package/dist/components/forms/__stories/AntFormGroup.stories.js +53 -0
- package/dist/components/forms/__stories/AntFormGroup.stories.mjs +33 -0
- package/dist/components/forms/__stories/AntFormGroupLabel.stories.d.ts +6 -0
- package/dist/components/forms/__stories/AntFormGroupLabel.stories.js +35 -0
- package/dist/components/forms/__stories/AntFormGroupLabel.stories.mjs +20 -0
- package/dist/components/index.d.ts +62 -0
- package/dist/components/index.js +433 -0
- package/dist/components/index.mjs +124 -0
- package/dist/components/inputs/AntCheckbox.vue +201 -0
- package/dist/components/inputs/AntCheckboxGroup.vue +117 -0
- package/dist/components/inputs/AntDateInput.vue +104 -0
- package/dist/components/inputs/AntNumberInput.vue +157 -0
- package/dist/components/inputs/AntPasswordInput.vue +107 -0
- package/dist/components/inputs/AntRadio.vue +214 -0
- package/dist/components/inputs/AntRadioGroup.vue +127 -0
- package/dist/components/inputs/AntRangeSlider.vue +121 -0
- package/dist/components/inputs/AntRichTextEditor.vue +237 -0
- package/dist/components/inputs/AntSearch.vue +75 -0
- package/dist/components/inputs/AntSelect.vue +319 -0
- package/dist/components/inputs/AntSwitch.vue +192 -0
- package/dist/components/inputs/AntSwitcher.vue +196 -0
- package/dist/components/inputs/AntTagInput.vue +339 -0
- package/dist/components/inputs/AntTextInput.vue +75 -0
- package/dist/components/inputs/AntTextarea.vue +191 -0
- package/dist/components/inputs/AntUnitInput.vue +96 -0
- package/dist/components/inputs/Elements/AntBaseInput.vue +319 -0
- package/dist/components/inputs/Elements/AntDropDown.vue +189 -0
- package/dist/components/inputs/Elements/AntInputDescription.vue +58 -0
- package/dist/components/inputs/Elements/AntInputLabel.vue +62 -0
- package/dist/components/inputs/Elements/AntInputLimiter.vue +58 -0
- package/dist/components/inputs/Elements/__stories/AntBaseInput.stories.d.ts +11 -0
- package/dist/components/inputs/Elements/__stories/AntBaseInput.stories.js +311 -0
- package/dist/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +234 -0
- package/dist/components/inputs/Elements/__stories/AntInputDescription.stories.d.ts +6 -0
- package/dist/components/inputs/Elements/__stories/AntInputDescription.stories.js +61 -0
- package/dist/components/inputs/Elements/__stories/AntInputDescription.stories.mjs +34 -0
- package/dist/components/inputs/Elements/__stories/AntInputLabel.stories.d.ts +7 -0
- package/dist/components/inputs/Elements/__stories/AntInputLabel.stories.js +76 -0
- package/dist/components/inputs/Elements/__stories/AntInputLabel.stories.mjs +46 -0
- package/dist/components/inputs/Elements/__stories/AntInputLimiter.stories.d.ts +6 -0
- package/dist/components/inputs/Elements/__stories/AntInputLimiter.stories.js +64 -0
- package/dist/components/inputs/Elements/__stories/AntInputLimiter.stories.mjs +37 -0
- package/dist/components/inputs/Elements/__types/AntBaseInput.types.d.ts +17 -0
- package/dist/components/inputs/Elements/__types/AntBaseInput.types.js +24 -0
- package/dist/components/inputs/Elements/__types/AntBaseInput.types.mjs +18 -0
- package/dist/components/inputs/Elements/__types/index.d.ts +1 -0
- package/dist/components/inputs/Elements/__types/index.js +16 -0
- package/dist/components/inputs/Elements/__types/index.mjs +1 -0
- package/dist/components/inputs/Elements/index.d.ts +6 -0
- package/dist/components/inputs/Elements/index.js +41 -0
- package/dist/components/inputs/Elements/index.mjs +12 -0
- package/dist/components/inputs/__stories/AntCheckbox.stories.d.ts +8 -0
- package/dist/components/inputs/__stories/AntCheckbox.stories.js +415 -0
- package/dist/components/inputs/__stories/AntCheckbox.stories.mjs +382 -0
- package/dist/components/inputs/__stories/AntCheckboxGroup.stories.d.ts +7 -0
- package/dist/components/inputs/__stories/AntCheckboxGroup.stories.js +107 -0
- package/dist/components/inputs/__stories/AntCheckboxGroup.stories.mjs +84 -0
- package/dist/components/inputs/__stories/AntDateInput.stories.d.ts +8 -0
- package/dist/components/inputs/__stories/AntDateInput.stories.js +233 -0
- package/dist/components/inputs/__stories/AntDateInput.stories.mjs +193 -0
- package/dist/components/inputs/__stories/AntNumberInput.stories.d.ts +10 -0
- package/dist/components/inputs/__stories/AntNumberInput.stories.js +301 -0
- package/dist/components/inputs/__stories/AntNumberInput.stories.mjs +246 -0
- package/dist/components/inputs/__stories/AntPasswordInput.stories.d.ts +8 -0
- package/dist/components/inputs/__stories/AntPasswordInput.stories.js +206 -0
- package/dist/components/inputs/__stories/AntPasswordInput.stories.mjs +156 -0
- package/dist/components/inputs/__stories/AntRadioGroup.stories.d.ts +8 -0
- package/dist/components/inputs/__stories/AntRadioGroup.stories.js +279 -0
- package/dist/components/inputs/__stories/AntRadioGroup.stories.mjs +251 -0
- package/dist/components/inputs/__stories/AntRangeSlider.stories.d.ts +7 -0
- package/dist/components/inputs/__stories/AntRangeSlider.stories.js +86 -0
- package/dist/components/inputs/__stories/AntRangeSlider.stories.mjs +67 -0
- package/dist/components/inputs/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
- package/dist/components/inputs/__stories/AntRichTextEditor.stories-old.js +1 -0
- package/dist/components/inputs/__stories/AntRichTextEditor.stories-old.mjs +0 -0
- package/dist/components/inputs/__stories/AntSearch.stories.d.ts +7 -0
- package/dist/components/inputs/__stories/AntSearch.stories.js +137 -0
- package/dist/components/inputs/__stories/AntSearch.stories.mjs +103 -0
- package/dist/components/inputs/__stories/AntSelect.stories.d.ts +13 -0
- package/dist/components/inputs/__stories/AntSelect.stories.js +287 -0
- package/dist/components/inputs/__stories/AntSelect.stories.mjs +255 -0
- package/dist/components/inputs/__stories/AntSwitch.stories.d.ts +8 -0
- package/dist/components/inputs/__stories/AntSwitch.stories.js +376 -0
- package/dist/components/inputs/__stories/AntSwitch.stories.mjs +344 -0
- package/dist/components/inputs/__stories/AntSwitcher.stories.d.ts +8 -0
- package/dist/components/inputs/__stories/AntSwitcher.stories.js +252 -0
- package/dist/components/inputs/__stories/AntSwitcher.stories.mjs +235 -0
- package/dist/components/inputs/__stories/AntTagInput.stories.d.ts +9 -0
- package/dist/components/inputs/__stories/AntTagInput.stories.js +256 -0
- package/dist/components/inputs/__stories/AntTagInput.stories.mjs +228 -0
- package/dist/components/inputs/__stories/AntTextInput.stories.d.ts +9 -0
- package/dist/components/inputs/__stories/AntTextInput.stories.js +271 -0
- package/dist/components/inputs/__stories/AntTextInput.stories.mjs +225 -0
- package/dist/components/inputs/__stories/AntTextarea.stories.d.ts +9 -0
- package/dist/components/inputs/__stories/AntTextarea.stories.js +189 -0
- package/dist/components/inputs/__stories/AntTextarea.stories.mjs +144 -0
- package/dist/components/inputs/__stories/AntUnitInput.stories.d.ts +9 -0
- package/dist/components/inputs/__stories/AntUnitInput.stories.js +158 -0
- package/dist/components/inputs/__stories/AntUnitInput.stories.mjs +116 -0
- package/dist/components/inputs/__types/AntCheckbox.types.d.ts +6 -0
- package/dist/components/inputs/__types/AntCheckbox.types.js +1 -0
- package/dist/components/inputs/__types/AntCheckbox.types.mjs +0 -0
- package/dist/components/inputs/__types/AntDateInput.types.d.ts +7 -0
- package/dist/components/inputs/__types/AntDateInput.types.js +14 -0
- package/dist/components/inputs/__types/AntDateInput.types.mjs +8 -0
- package/dist/components/inputs/__types/AntRadio.types.d.ts +9 -0
- package/dist/components/inputs/__types/AntRadio.types.js +1 -0
- package/dist/components/inputs/__types/AntRadio.types.mjs +0 -0
- package/dist/components/inputs/__types/AntSelect.types.d.ts +4 -0
- package/dist/components/inputs/__types/AntSelect.types.js +1 -0
- package/dist/components/inputs/__types/AntSelect.types.mjs +0 -0
- package/dist/components/inputs/__types/AntSwitcher.types.d.ts +4 -0
- package/dist/components/inputs/__types/AntSwitcher.types.js +1 -0
- package/dist/components/inputs/__types/AntSwitcher.types.mjs +0 -0
- package/dist/components/inputs/__types/AntTagInput.types.d.ts +5 -0
- package/dist/components/inputs/__types/AntTagInput.types.js +12 -0
- package/dist/components/inputs/__types/AntTagInput.types.mjs +6 -0
- package/dist/components/inputs/__types/AntTextInput.types.d.ts +6 -0
- package/dist/components/inputs/__types/AntTextInput.types.js +13 -0
- package/dist/components/inputs/__types/AntTextInput.types.mjs +7 -0
- package/dist/components/inputs/__types/index.d.ts +7 -0
- package/dist/components/inputs/__types/index.js +82 -0
- package/dist/components/inputs/__types/index.mjs +7 -0
- package/dist/components/layouts/AntNavLeftLayout.vue +36 -0
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.d.ts +7 -0
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.js +77 -0
- package/dist/components/layouts/__stories/AntNavLeftLayout.stories.mjs +68 -0
- package/dist/components/navbar/AntNavbar.vue +25 -0
- package/dist/components/navbar/AntNavbarItem.vue +78 -0
- package/dist/components/navbar/__stories/AntNavbar.stories.d.ts +6 -0
- package/dist/components/navbar/__stories/AntNavbar.stories.js +73 -0
- package/dist/components/navbar/__stories/AntNavbar.stories.mjs +64 -0
- package/dist/components/navbar/__types/NavbarItem.types.d.ts +10 -0
- package/dist/components/navbar/__types/NavbarItem.types.js +1 -0
- package/dist/components/navbar/__types/NavbarItem.types.mjs +0 -0
- package/dist/components/navbar/__types/index.d.ts +1 -0
- package/dist/components/navbar/__types/index.js +16 -0
- package/dist/components/navbar/__types/index.mjs +1 -0
- package/dist/components/table/AntTable.vue +218 -0
- package/dist/components/table/AntTableSortButton.vue +48 -0
- package/dist/components/table/AntTd.vue +81 -0
- package/dist/components/table/AntTh.vue +78 -0
- package/dist/components/table/__stories/AntTable.stories.d.ts +9 -0
- package/dist/components/table/__stories/AntTable.stories.js +308 -0
- package/dist/components/table/__stories/AntTable.stories.mjs +273 -0
- package/dist/components/table/__types/TableHeader.types.d.ts +36 -0
- package/dist/components/table/__types/TableHeader.types.js +31 -0
- package/dist/components/table/__types/TableHeader.types.mjs +25 -0
- package/dist/components/table/__types/index.d.ts +1 -0
- package/dist/components/table/__types/index.js +16 -0
- package/dist/components/table/__types/index.mjs +1 -0
- package/dist/components/tabs/AntTabItem.vue +118 -0
- package/dist/components/tabs/AntTabs.vue +47 -0
- package/dist/components/tabs/__stories/AntTabItem.stories.d.ts +6 -0
- package/dist/components/tabs/__stories/AntTabItem.stories.js +52 -0
- package/dist/components/tabs/__stories/AntTabItem.stories.mjs +36 -0
- package/dist/components/tabs/__stories/AntTabs.stories.d.ts +9 -0
- package/dist/components/tabs/__stories/AntTabs.stories.js +183 -0
- package/dist/components/tabs/__stories/AntTabs.stories.mjs +179 -0
- package/dist/components/tabs/__types/AntTabItem.types.d.ts +17 -0
- package/dist/components/tabs/__types/AntTabItem.types.js +12 -0
- package/dist/components/tabs/__types/AntTabItem.types.mjs +6 -0
- package/dist/components/tabs/__types/index.d.ts +1 -0
- package/dist/components/tabs/__types/index.js +16 -0
- package/dist/components/tabs/__types/index.mjs +1 -0
- package/dist/components/transitions/AntTransitionCollapseHeight.vue +96 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.js +16 -0
- package/dist/composables/index.mjs +1 -0
- package/dist/composables/useToaster.d.ts +21 -0
- package/dist/composables/useToaster.js +72 -0
- package/dist/composables/useToaster.mjs +53 -0
- package/dist/enums/Direction.enum.d.ts +4 -0
- package/dist/enums/Direction.enum.js +11 -0
- package/dist/enums/Direction.enum.mjs +5 -0
- package/dist/enums/Grouped.enum.d.ts +6 -0
- package/dist/enums/Grouped.enum.js +13 -0
- package/dist/enums/Grouped.enum.mjs +7 -0
- package/dist/enums/Position.enum.d.ts +12 -0
- package/dist/enums/Position.enum.js +20 -0
- package/dist/enums/Position.enum.mjs +14 -0
- package/dist/enums/Size.enum.d.ts +7 -0
- package/dist/enums/Size.enum.js +14 -0
- package/dist/enums/Size.enum.mjs +8 -0
- package/dist/enums/State.enum.d.ts +16 -0
- package/dist/enums/State.enum.js +24 -0
- package/dist/enums/State.enum.mjs +18 -0
- package/dist/enums/index.d.ts +5 -0
- package/dist/enums/index.js +60 -0
- package/dist/enums/index.mjs +5 -0
- package/dist/handler.d.ts +1 -0
- package/dist/handler.js +11 -0
- package/dist/handler.mjs +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +60 -0
- package/dist/index.mjs +5 -0
- package/dist/install.d.ts +3 -0
- package/dist/install.js +17 -0
- package/dist/install.mjs +9 -0
- package/dist/tailwind.config.d.ts +2 -0
- package/dist/tailwind.config.js +198 -0
- package/dist/tailwind.config.mjs +189 -0
- package/dist/types.d.ts +8 -0
- package/dist/types.js +93 -0
- package/dist/types.mjs +8 -0
- package/dist/utils.d.ts +20 -0
- package/dist/utils.js +49 -0
- package/dist/utils.mjs +41 -0
- package/package.json +100 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var AntSpinnerSize = /* @__PURE__ */ ((AntSpinnerSize2) => {
|
|
2
|
+
AntSpinnerSize2["xl4"] = "4xl";
|
|
3
|
+
AntSpinnerSize2["xl3"] = "3xl";
|
|
4
|
+
AntSpinnerSize2["xl2"] = "2xl";
|
|
5
|
+
AntSpinnerSize2["lg"] = "lg";
|
|
6
|
+
AntSpinnerSize2["md"] = "md";
|
|
7
|
+
AntSpinnerSize2["sm"] = "sm";
|
|
8
|
+
AntSpinnerSize2["xs"] = "xs";
|
|
9
|
+
AntSpinnerSize2["xs2"] = "2xs";
|
|
10
|
+
return AntSpinnerSize2;
|
|
11
|
+
})(AntSpinnerSize || {});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum TagState {
|
|
2
|
+
base = "base",
|
|
3
|
+
primary = "primary",
|
|
4
|
+
secondary = "secondary",
|
|
5
|
+
info = "info",
|
|
6
|
+
success = "success",
|
|
7
|
+
warning = "warning",
|
|
8
|
+
danger = "danger"
|
|
9
|
+
}
|
|
10
|
+
export declare enum AntTagSize {
|
|
11
|
+
lg = "lg",
|
|
12
|
+
md = "md",
|
|
13
|
+
sm = "sm",
|
|
14
|
+
xs = "xs",
|
|
15
|
+
xs2 = "2xs",
|
|
16
|
+
xs3 = "3xs"
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TagState = exports.AntTagSize = void 0;
|
|
7
|
+
var TagState = exports.TagState = /* @__PURE__ */(TagState2 => {
|
|
8
|
+
TagState2["base"] = "base";
|
|
9
|
+
TagState2["primary"] = "primary";
|
|
10
|
+
TagState2["secondary"] = "secondary";
|
|
11
|
+
TagState2["info"] = "info";
|
|
12
|
+
TagState2["success"] = "success";
|
|
13
|
+
TagState2["warning"] = "warning";
|
|
14
|
+
TagState2["danger"] = "danger";
|
|
15
|
+
return TagState2;
|
|
16
|
+
})(TagState || {});
|
|
17
|
+
var AntTagSize = exports.AntTagSize = /* @__PURE__ */(AntTagSize2 => {
|
|
18
|
+
AntTagSize2["lg"] = "lg";
|
|
19
|
+
AntTagSize2["md"] = "md";
|
|
20
|
+
AntTagSize2["sm"] = "sm";
|
|
21
|
+
AntTagSize2["xs"] = "xs";
|
|
22
|
+
AntTagSize2["xs2"] = "2xs";
|
|
23
|
+
AntTagSize2["xs3"] = "3xs";
|
|
24
|
+
return AntTagSize2;
|
|
25
|
+
})(AntTagSize || {});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var TagState = /* @__PURE__ */ ((TagState2) => {
|
|
2
|
+
TagState2["base"] = "base";
|
|
3
|
+
TagState2["primary"] = "primary";
|
|
4
|
+
TagState2["secondary"] = "secondary";
|
|
5
|
+
TagState2["info"] = "info";
|
|
6
|
+
TagState2["success"] = "success";
|
|
7
|
+
TagState2["warning"] = "warning";
|
|
8
|
+
TagState2["danger"] = "danger";
|
|
9
|
+
return TagState2;
|
|
10
|
+
})(TagState || {});
|
|
11
|
+
export var AntTagSize = /* @__PURE__ */ ((AntTagSize2) => {
|
|
12
|
+
AntTagSize2["lg"] = "lg";
|
|
13
|
+
AntTagSize2["md"] = "md";
|
|
14
|
+
AntTagSize2["sm"] = "sm";
|
|
15
|
+
AntTagSize2["xs"] = "xs";
|
|
16
|
+
AntTagSize2["xs2"] = "2xs";
|
|
17
|
+
AntTagSize2["xs3"] = "3xs";
|
|
18
|
+
return AntTagSize2;
|
|
19
|
+
})(AntTagSize || {});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _AntAccordion = require("./AntAccordion.types");
|
|
7
|
+
Object.keys(_AntAccordion).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _AntAccordion[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _AntAccordion[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _AntIcon = require("./AntIcon.types");
|
|
18
|
+
Object.keys(_AntIcon).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _AntIcon[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _AntIcon[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _AntKeycap = require("./AntKeycap.types");
|
|
29
|
+
Object.keys(_AntKeycap).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _AntKeycap[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _AntKeycap[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _AntListGroupItem = require("./AntListGroupItem.types");
|
|
40
|
+
Object.keys(_AntListGroupItem).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _AntListGroupItem[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _AntListGroupItem[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _AntSpinner = require("./AntSpinner.types");
|
|
51
|
+
Object.keys(_AntSpinner).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _AntSpinner[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _AntSpinner[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _AntTag = require("./AntTag.types");
|
|
62
|
+
Object.keys(_AntTag).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _AntTag[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _AntTag[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _AntToaster = require("./AntToaster.types");
|
|
73
|
+
Object.keys(_AntToaster).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _AntToaster[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _AntToaster[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./AntAccordion.types.mjs";
|
|
2
|
+
export * from "./AntIcon.types.mjs";
|
|
3
|
+
export * from "./AntKeycap.types.mjs";
|
|
4
|
+
export * from "./AntListGroupItem.types.mjs";
|
|
5
|
+
export * from "./AntSpinner.types.mjs";
|
|
6
|
+
export * from "./AntTag.types.mjs";
|
|
7
|
+
export * from "./AntToaster.types.mjs";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
/**
|
|
3
|
+
* This button is used for everything what is the primary
|
|
4
|
+
* action like save, confirm, create, etc.
|
|
5
|
+
*/
|
|
6
|
+
import {Position, State, InputState, Size, Grouped} from '../../enums';
|
|
7
|
+
import AntButton from './AntButton.vue';
|
|
8
|
+
import type {IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
9
|
+
import {computed, useSlots} from 'vue';
|
|
10
|
+
import {hasSlotContent} from '../../utils';
|
|
11
|
+
|
|
12
|
+
defineEmits(['click', 'blur']);
|
|
13
|
+
const props = withDefaults(
|
|
14
|
+
defineProps<{
|
|
15
|
+
iconLeft?: IconDefinition;
|
|
16
|
+
iconRight?: IconDefinition;
|
|
17
|
+
size?: Size;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
grouped?: Grouped;
|
|
20
|
+
state?: State;
|
|
21
|
+
skeleton?: boolean;
|
|
22
|
+
expanded?: boolean;
|
|
23
|
+
filled?: boolean;
|
|
24
|
+
hasPermission?: boolean;
|
|
25
|
+
tooltipPosition?: Position;
|
|
26
|
+
tooltipState?: InputState;
|
|
27
|
+
tooltipDelay?: number;
|
|
28
|
+
submit?: boolean;
|
|
29
|
+
}>(), {
|
|
30
|
+
state: State.primary,
|
|
31
|
+
hasPermission: true,
|
|
32
|
+
filled: true,
|
|
33
|
+
submit: false
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
const slots = useSlots();
|
|
37
|
+
const hasTooltip = computed(() => !props.skeleton && !props.disabled && props.hasPermission && hasSlotContent(slots['tooltipContent']));
|
|
38
|
+
const hasPermissionTooltip = computed(() => !props.skeleton && !props.disabled && !props.hasPermission && hasSlotContent(slots['invalidPermissionTooltipContent']));
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<AntButton
|
|
43
|
+
:icon-left="iconLeft"
|
|
44
|
+
:icon-right="iconRight"
|
|
45
|
+
:size="size"
|
|
46
|
+
:disabled="disabled || !hasPermission"
|
|
47
|
+
:grouped="grouped"
|
|
48
|
+
:skeleton="skeleton"
|
|
49
|
+
:expanded="expanded"
|
|
50
|
+
:state="state"
|
|
51
|
+
:filled="filled"
|
|
52
|
+
:tooltip-position="tooltipPosition"
|
|
53
|
+
:tooltip-state="hasPermissionTooltip ? InputState.info : tooltipState"
|
|
54
|
+
:tooltip-delay="hasPermissionTooltip ? 300 : tooltipDelay"
|
|
55
|
+
:submit="submit"
|
|
56
|
+
data-e2e="action-button"
|
|
57
|
+
@click="$emit('click')"
|
|
58
|
+
@blur="$emit('blur')"
|
|
59
|
+
>
|
|
60
|
+
<slot/>
|
|
61
|
+
|
|
62
|
+
<template #tooltip-content>
|
|
63
|
+
<slot
|
|
64
|
+
v-if="hasTooltip"
|
|
65
|
+
name="tooltipContent"
|
|
66
|
+
/>
|
|
67
|
+
|
|
68
|
+
<slot
|
|
69
|
+
v-if="hasPermissionTooltip"
|
|
70
|
+
name="invalidPermissionTooltipContent"
|
|
71
|
+
/>
|
|
72
|
+
</template>
|
|
73
|
+
</AntButton>
|
|
74
|
+
</template>
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import {computed, onMounted} from 'vue';
|
|
4
|
+
import {type RouteLocationRaw} from 'vue-router';
|
|
5
|
+
import AntSkeleton from '../AntSkeleton.vue';
|
|
6
|
+
import AntSpinner from '../AntSpinner.vue';
|
|
7
|
+
import {Grouped} from '../../enums/Grouped.enum';
|
|
8
|
+
import {Size} from '../../enums/Size.enum';
|
|
9
|
+
import {handleEnumValidation} from '../../handler';
|
|
10
|
+
import {State, InputState, Position} from '../../enums';
|
|
11
|
+
import {ButtonType} from './__types';
|
|
12
|
+
import AntIcon from '../AntIcon.vue';
|
|
13
|
+
import AntTooltip from '../AntTooltip.vue';
|
|
14
|
+
import {IconSize} from '../__types/AntIcon.types';
|
|
15
|
+
|
|
16
|
+
defineEmits(['click', 'blur']);
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<{
|
|
19
|
+
filled?: boolean;
|
|
20
|
+
size?: Size;
|
|
21
|
+
state?: State;
|
|
22
|
+
iconLeft?: IconDefinition;
|
|
23
|
+
iconRight?: IconDefinition;
|
|
24
|
+
to?: RouteLocationRaw;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
grouped?: Grouped;
|
|
27
|
+
skeleton?: boolean;
|
|
28
|
+
spinner?: boolean;
|
|
29
|
+
readonly?: boolean;
|
|
30
|
+
expanded?: boolean;
|
|
31
|
+
submit?: boolean;
|
|
32
|
+
outlined?: boolean;
|
|
33
|
+
noFocus?: boolean;
|
|
34
|
+
tooltipPosition?: Position;
|
|
35
|
+
tooltipState?: InputState;
|
|
36
|
+
tooltipDelay?: number;
|
|
37
|
+
}>(), {
|
|
38
|
+
state: State.base,
|
|
39
|
+
disabled: false,
|
|
40
|
+
filled: false,
|
|
41
|
+
skeleton: false,
|
|
42
|
+
spinner: false,
|
|
43
|
+
size: Size.md,
|
|
44
|
+
grouped: Grouped.none,
|
|
45
|
+
readonly: false,
|
|
46
|
+
expanded: false,
|
|
47
|
+
submit: false,
|
|
48
|
+
outlined: true,
|
|
49
|
+
noFocus: false,
|
|
50
|
+
tooltipPosition: Position.bottom,
|
|
51
|
+
tooltipState: InputState.base,
|
|
52
|
+
tooltipDelay: 800
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const hasInputState = computed(() => props.skeleton || props.readonly || props.disabled);
|
|
56
|
+
const groupedClassList = computed(() => ({
|
|
57
|
+
'rounded-tl-md rounded-bl-md rounded-tr-none rounded-br-none -mr-px': props.grouped === Grouped.left,
|
|
58
|
+
'rounded-none -mx-px': props.grouped === Grouped.center,
|
|
59
|
+
'rounded-tl-none rounded-bl-none rounded-tr-md rounded-br-md -ml-px': props.grouped === Grouped.right,
|
|
60
|
+
'rounded-md': props.grouped === Grouped.none,
|
|
61
|
+
}));
|
|
62
|
+
const classes = computed(() => {
|
|
63
|
+
const variants = {
|
|
64
|
+
[State.base]: 'ring-primary-200 outline-neutral-300',
|
|
65
|
+
[State.danger]: 'ring-danger-200 outline-danger-500',
|
|
66
|
+
[State.info]: 'ring-info-200 outline-info-500',
|
|
67
|
+
[State.primary]: 'ring-primary-200 outline-primary-500',
|
|
68
|
+
[State.secondary]: 'ring-secondary-200 outline-secondary-500',
|
|
69
|
+
[State.success]: 'ring-success-200 outline-success-500',
|
|
70
|
+
[State.warning]: 'ring-warning-200 outline-warning-500',
|
|
71
|
+
};
|
|
72
|
+
const notFilledVariants = {
|
|
73
|
+
[State.base]: 'bg-white text-for-white-bg-font',
|
|
74
|
+
[State.danger]: 'bg-white text-danger-500',
|
|
75
|
+
[State.info]: 'bg-white text-info-500',
|
|
76
|
+
[State.primary]: 'bg-white text-primary-500',
|
|
77
|
+
[State.secondary]: 'bg-white text-secondary-500',
|
|
78
|
+
[State.success]: 'bg-white text-success-500',
|
|
79
|
+
[State.warning]: 'bg-white text-warning-500',
|
|
80
|
+
};
|
|
81
|
+
const notFilledHoverVariants = {
|
|
82
|
+
[State.base]: 'hover:bg-neutral-100',
|
|
83
|
+
[State.danger]: 'hover:bg-danger-100',
|
|
84
|
+
[State.info]: 'hover:bg-info-100',
|
|
85
|
+
[State.primary]: 'hover:bg-primary-100',
|
|
86
|
+
[State.secondary]: 'hover:bg-secondary-100',
|
|
87
|
+
[State.success]: 'hover:bg-success-100',
|
|
88
|
+
[State.warning]: 'hover:bg-warning-100',
|
|
89
|
+
};
|
|
90
|
+
const filledVariants = {
|
|
91
|
+
[State.base]: 'bg-neutral-50 text-neutral-50-font',
|
|
92
|
+
[State.danger]: 'bg-danger-500 text-danger-500-font',
|
|
93
|
+
[State.info]: 'bg-info-500 text-info-500-font',
|
|
94
|
+
[State.primary]: 'bg-primary-500 text-primary-500-font',
|
|
95
|
+
[State.secondary]: 'bg-secondary-500 text-secondary-500-font',
|
|
96
|
+
[State.success]: 'bg-success-500 text-success-500-font',
|
|
97
|
+
[State.warning]: 'bg-warning-500 text-warning-500-font',
|
|
98
|
+
};
|
|
99
|
+
const filledHoverVariants = {
|
|
100
|
+
[State.base]: 'hover:bg-neutral-200',
|
|
101
|
+
[State.danger]: 'hover:bg-danger-600',
|
|
102
|
+
[State.info]: 'hover:bg-info-600',
|
|
103
|
+
[State.primary]: 'hover:bg-primary-600',
|
|
104
|
+
[State.secondary]: 'hover:bg-secondary-600',
|
|
105
|
+
[State.success]: 'hover:bg-success-600',
|
|
106
|
+
[State.warning]: 'hover:bg-warning-600',
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
'transition-all inline-flex items-center justify-center relative font-medium': true,
|
|
111
|
+
'focus:z-10': true,
|
|
112
|
+
'active:shadow-[inset_0_4px_4px_rgba(0,0,0,0.25)]': !hasInputState.value,
|
|
113
|
+
'p-1 text-xs gap-1': props.size === Size.xs2,
|
|
114
|
+
'p-1.5 text-xs gap-1.5': props.size === Size.xs,
|
|
115
|
+
'p-1.5 text-sm gap-1.5': props.size === Size.sm,
|
|
116
|
+
'p-2 text-sm gap-2': props.size === Size.md,
|
|
117
|
+
'p-2.5 text-sm gap-2.5': props.size === Size.lg,
|
|
118
|
+
'disabled:opacity-50 disabled:cursor-not-allowed': true,
|
|
119
|
+
'cursor-default': props.readonly,
|
|
120
|
+
'focus:ring-2': !props.readonly && props.size === Size.sm || props.size === Size.xs || props.size === Size.xs2,
|
|
121
|
+
'focus:ring-4': !props.readonly && props.size === Size.md || props.size === Size.lg,
|
|
122
|
+
'w-full': props.expanded,
|
|
123
|
+
'invisible': props.skeleton,
|
|
124
|
+
'outline outline-1 outline-offset-[-1px]': props.outlined,
|
|
125
|
+
...groupedClassList.value,
|
|
126
|
+
[variants[props.state]]: true,
|
|
127
|
+
[notFilledVariants[props.state]]: !props.filled,
|
|
128
|
+
[notFilledHoverVariants[props.state]]: !props.filled && !hasInputState.value,
|
|
129
|
+
[filledVariants[props.state]]: props.filled,
|
|
130
|
+
[filledHoverVariants[props.state]]: props.filled && !hasInputState.value,
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
const iconColor = computed(() => {
|
|
134
|
+
const notFilledVariants = {
|
|
135
|
+
[State.base]: 'text-for-white-bg-font',
|
|
136
|
+
[State.danger]: 'text-danger-500',
|
|
137
|
+
[State.info]: 'text-info-500',
|
|
138
|
+
[State.primary]: 'text-primary-500',
|
|
139
|
+
[State.secondary]: 'text-secondary-500',
|
|
140
|
+
[State.success]: 'text-success-500',
|
|
141
|
+
[State.warning]: 'text-warning-500',
|
|
142
|
+
};
|
|
143
|
+
const filledVariants = {
|
|
144
|
+
[State.base]: 'text-for-white-bg-font',
|
|
145
|
+
[State.danger]: 'text-danger-500-font',
|
|
146
|
+
[State.info]: 'text-info-500-font',
|
|
147
|
+
[State.primary]: 'text-primary-500-font',
|
|
148
|
+
[State.secondary]: 'text-secondary-500-font',
|
|
149
|
+
[State.success]: 'text-success-500-font',
|
|
150
|
+
[State.warning]: 'text-warning-500-font',
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return props.filled ? filledVariants[props.state] : notFilledVariants[props.state];
|
|
154
|
+
});
|
|
155
|
+
const type = computed(() => {
|
|
156
|
+
if (props.to !== undefined) {
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return props.submit ? ButtonType.submit : ButtonType.button;
|
|
161
|
+
});
|
|
162
|
+
const is = computed(() => {
|
|
163
|
+
if (props.readonly) {
|
|
164
|
+
return 'div';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return props.to !== undefined ? 'router-link' : 'button';
|
|
168
|
+
});
|
|
169
|
+
const getIconSize = computed(() => {
|
|
170
|
+
if (props.size === Size.xs || props.size === Size.xs2) {
|
|
171
|
+
return IconSize.xs;
|
|
172
|
+
} else {
|
|
173
|
+
return IconSize.sm;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
onMounted(() => {
|
|
178
|
+
handleEnumValidation(props.size, Size, 'size');
|
|
179
|
+
handleEnumValidation(props.state, State, 'state');
|
|
180
|
+
handleEnumValidation(props.grouped, Grouped, 'grouped');
|
|
181
|
+
});
|
|
182
|
+
</script>
|
|
183
|
+
|
|
184
|
+
<template>
|
|
185
|
+
<div
|
|
186
|
+
class="relative inline-flex h-fit"
|
|
187
|
+
:class="{'w-full': props.expanded}"
|
|
188
|
+
data-e2e="button"
|
|
189
|
+
:data-e2e-state="props.state"
|
|
190
|
+
>
|
|
191
|
+
<AntSkeleton
|
|
192
|
+
v-if="skeleton"
|
|
193
|
+
:grouped="grouped"
|
|
194
|
+
rounded
|
|
195
|
+
absolute
|
|
196
|
+
/>
|
|
197
|
+
|
|
198
|
+
<AntTooltip
|
|
199
|
+
:expanded="expanded"
|
|
200
|
+
:position="tooltipPosition"
|
|
201
|
+
:state="tooltipState"
|
|
202
|
+
:delay="tooltipDelay"
|
|
203
|
+
>
|
|
204
|
+
<template #default>
|
|
205
|
+
<component
|
|
206
|
+
:is="is"
|
|
207
|
+
:class="classes"
|
|
208
|
+
:type="type"
|
|
209
|
+
:to="to"
|
|
210
|
+
:disabled="disabled || undefined"
|
|
211
|
+
:tabindex="noFocus || hasInputState ? '-1' : '0'"
|
|
212
|
+
@click="() => !props.readonly ? $emit('click') : null"
|
|
213
|
+
@blur="() => !props.readonly ? $emit('blur') : null"
|
|
214
|
+
>
|
|
215
|
+
<AntSpinner
|
|
216
|
+
v-if="spinner"
|
|
217
|
+
:size="size"
|
|
218
|
+
:state="state"
|
|
219
|
+
:inverted="!filled"
|
|
220
|
+
/>
|
|
221
|
+
|
|
222
|
+
<slot
|
|
223
|
+
v-if="!spinner"
|
|
224
|
+
name="icon-left"
|
|
225
|
+
>
|
|
226
|
+
<AntIcon
|
|
227
|
+
v-if="iconLeft"
|
|
228
|
+
:icon="iconLeft"
|
|
229
|
+
:size="getIconSize"
|
|
230
|
+
:color="iconColor"
|
|
231
|
+
/>
|
|
232
|
+
</slot>
|
|
233
|
+
|
|
234
|
+
<slot
|
|
235
|
+
v-if="!spinner"
|
|
236
|
+
/>
|
|
237
|
+
|
|
238
|
+
<slot
|
|
239
|
+
v-if="!spinner"
|
|
240
|
+
name="icon-right"
|
|
241
|
+
>
|
|
242
|
+
<AntIcon
|
|
243
|
+
v-if="iconRight"
|
|
244
|
+
:icon="iconRight"
|
|
245
|
+
:size="getIconSize"
|
|
246
|
+
:color="iconColor"
|
|
247
|
+
/>
|
|
248
|
+
</slot>
|
|
249
|
+
</component>
|
|
250
|
+
</template>
|
|
251
|
+
|
|
252
|
+
<template #content>
|
|
253
|
+
<slot name="tooltip-content"/>
|
|
254
|
+
</template>
|
|
255
|
+
</AntTooltip>
|
|
256
|
+
</div>
|
|
257
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntActionButton from './AntActionButton.vue';
|
|
3
|
+
import {Position, Size, Grouped, State} from '../../enums';
|
|
4
|
+
import {faPlus} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
defineEmits(['click', 'blur']);
|
|
7
|
+
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
9
|
+
size?: Size;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
grouped?: Grouped;
|
|
12
|
+
skeleton?: boolean;
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
canCreate?: boolean;
|
|
15
|
+
tooltipPosition?: Position;
|
|
16
|
+
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
18
|
+
canCreate: true
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AntActionButton
|
|
24
|
+
:filled="false"
|
|
25
|
+
:state="State.primary"
|
|
26
|
+
:size="size"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faPlus : undefined"
|
|
29
|
+
:grouped="grouped"
|
|
30
|
+
:skeleton="skeleton"
|
|
31
|
+
:expanded="expanded"
|
|
32
|
+
:has-permission="canCreate"
|
|
33
|
+
:tooltip-position="tooltipPosition"
|
|
34
|
+
data-e2e="create-button"
|
|
35
|
+
@click="$emit('click')"
|
|
36
|
+
@blur="$emit('blur')"
|
|
37
|
+
>
|
|
38
|
+
<template
|
|
39
|
+
v-if="!iconVariant"
|
|
40
|
+
#default
|
|
41
|
+
>
|
|
42
|
+
Create
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #invalidPermissionTooltipContent>
|
|
46
|
+
You have no permission to create new entries.<br>
|
|
47
|
+
Please contact your administrator.
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #tooltipContent>
|
|
51
|
+
Create new entry
|
|
52
|
+
</template>
|
|
53
|
+
</AntActionButton>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntActionButton from './AntActionButton.vue';
|
|
3
|
+
import {Position, Size, Grouped, State} from '../../enums';
|
|
4
|
+
import {faTrash} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
defineEmits(['click', 'blur']);
|
|
7
|
+
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
9
|
+
size?: Size;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
grouped?: Grouped;
|
|
12
|
+
skeleton?: boolean;
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
canDelete?: boolean;
|
|
15
|
+
tooltipPosition?: Position;
|
|
16
|
+
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
18
|
+
canDelete: true
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AntActionButton
|
|
24
|
+
:filled="false"
|
|
25
|
+
:state="State.danger"
|
|
26
|
+
:size="size"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faTrash : undefined"
|
|
29
|
+
:grouped="grouped"
|
|
30
|
+
:skeleton="skeleton"
|
|
31
|
+
:expanded="expanded"
|
|
32
|
+
:has-permission="canDelete"
|
|
33
|
+
:tooltip-position="tooltipPosition"
|
|
34
|
+
data-e2e="delete-button"
|
|
35
|
+
@click="$emit('click')"
|
|
36
|
+
@blur="$emit('blur')"
|
|
37
|
+
>
|
|
38
|
+
<template
|
|
39
|
+
v-if="!iconVariant"
|
|
40
|
+
#default
|
|
41
|
+
>
|
|
42
|
+
Delete
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #invalidPermissionTooltipContent>
|
|
46
|
+
You have no permission to delete entries.<br>
|
|
47
|
+
Please contact your administrator.
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #tooltipContent>
|
|
51
|
+
Delete entry
|
|
52
|
+
</template>
|
|
53
|
+
</AntActionButton>
|
|
54
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import AntActionButton from './AntActionButton.vue';
|
|
3
|
+
import {Position, Size, Grouped, State} from '../../enums';
|
|
4
|
+
import {faCopy} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
defineEmits(['click', 'blur']);
|
|
7
|
+
withDefaults(defineProps<{
|
|
8
|
+
iconVariant?: boolean;
|
|
9
|
+
size?: Size;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
grouped?: Grouped;
|
|
12
|
+
skeleton?: boolean;
|
|
13
|
+
expanded?: boolean;
|
|
14
|
+
canDuplicate?: boolean;
|
|
15
|
+
tooltipPosition?: Position;
|
|
16
|
+
}>(), {
|
|
17
|
+
iconVariant: false,
|
|
18
|
+
canDuplicate: true
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<AntActionButton
|
|
24
|
+
:filled="false"
|
|
25
|
+
:state="State.base"
|
|
26
|
+
:size="size"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:icon-left="iconVariant ? faCopy : undefined"
|
|
29
|
+
:grouped="grouped"
|
|
30
|
+
:skeleton="skeleton"
|
|
31
|
+
:expanded="expanded"
|
|
32
|
+
:has-permission="canDuplicate"
|
|
33
|
+
:tooltip-position="tooltipPosition"
|
|
34
|
+
data-e2e="duplicate-button"
|
|
35
|
+
@click="$emit('click')"
|
|
36
|
+
@blur="$emit('blur')"
|
|
37
|
+
>
|
|
38
|
+
<template
|
|
39
|
+
v-if="!iconVariant"
|
|
40
|
+
#default
|
|
41
|
+
>
|
|
42
|
+
Duplicate
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #invalidPermissionTooltipContent>
|
|
46
|
+
You have no permission to duplicate entries.<br>
|
|
47
|
+
Please contact your administrator.
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #tooltipContent>
|
|
51
|
+
Duplicate entry
|
|
52
|
+
</template>
|
|
53
|
+
</AntActionButton>
|
|
54
|
+
</template>
|