@antify/ui-module 1.7.3 → 1.8.2
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/README.md +43 -52
- package/dist/module.d.mts +1 -251
- package/dist/module.d.ts +1 -251
- package/dist/module.json +1 -1
- package/dist/module.mjs +97 -418
- package/dist/runtime/composables/useUiClient.d.ts +2 -2
- package/dist/runtime/composables/useUiClient.mjs +1 -2
- package/dist/runtime/plugins/ui-module.mjs +3 -2
- package/dist/runtime/tailwind.config.d.ts +2 -3
- package/dist/runtime/tailwind.config.mjs +20 -204
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +10 -41
- package/dist/runtime/components/AntAccordion.vue +0 -64
- package/dist/runtime/components/AntAccordionItem.vue +0 -81
- package/dist/runtime/components/AntAlert.vue +0 -146
- package/dist/runtime/components/AntCard.vue +0 -34
- package/dist/runtime/components/AntContent.vue +0 -16
- package/dist/runtime/components/AntDropdown.vue +0 -79
- package/dist/runtime/components/AntIcon.vue +0 -56
- package/dist/runtime/components/AntKeycap.vue +0 -45
- package/dist/runtime/components/AntListGroup.vue +0 -24
- package/dist/runtime/components/AntListGroupItem.vue +0 -83
- package/dist/runtime/components/AntModal.vue +0 -88
- package/dist/runtime/components/AntPagination.vue +0 -206
- package/dist/runtime/components/AntPopover.vue +0 -114
- package/dist/runtime/components/AntSkeleton.vue +0 -38
- package/dist/runtime/components/AntSpinner.vue +0 -101
- package/dist/runtime/components/AntTag.vue +0 -114
- package/dist/runtime/components/AntToast.vue +0 -119
- package/dist/runtime/components/AntToaster.vue +0 -51
- package/dist/runtime/components/AntTooltip.vue +0 -189
- package/dist/runtime/components/Main.mdx +0 -11
- package/dist/runtime/components/Main.stories.d.ts +0 -7
- package/dist/runtime/components/Main.stories.mjs +0 -8
- package/dist/runtime/components/__stories/AntAccordion.stories.d.ts +0 -9
- package/dist/runtime/components/__stories/AntAccordion.stories.mjs +0 -101
- package/dist/runtime/components/__stories/AntAlert.stories.d.ts +0 -11
- package/dist/runtime/components/__stories/AntAlert.stories.mjs +0 -81
- package/dist/runtime/components/__stories/AntCard.stories.d.ts +0 -7
- package/dist/runtime/components/__stories/AntCard.stories.mjs +0 -87
- package/dist/runtime/components/__stories/AntContent.stories.d.ts +0 -6
- package/dist/runtime/components/__stories/AntContent.stories.mjs +0 -26
- package/dist/runtime/components/__stories/AntDropdown.stories.d.ts +0 -6
- package/dist/runtime/components/__stories/AntDropdown.stories.mjs +0 -52
- package/dist/runtime/components/__stories/AntIcon.stories.d.ts +0 -8
- package/dist/runtime/components/__stories/AntIcon.stories.mjs +0 -93
- package/dist/runtime/components/__stories/AntKeycap.stories.d.ts +0 -9
- package/dist/runtime/components/__stories/AntKeycap.stories.mjs +0 -69
- package/dist/runtime/components/__stories/AntListGroup.stories.d.ts +0 -7
- package/dist/runtime/components/__stories/AntListGroup.stories.mjs +0 -36
- package/dist/runtime/components/__stories/AntListGroupItem.stories.d.ts +0 -10
- package/dist/runtime/components/__stories/AntListGroupItem.stories.mjs +0 -62
- package/dist/runtime/components/__stories/AntModal.stories.d.ts +0 -7
- package/dist/runtime/components/__stories/AntModal.stories.mjs +0 -78
- package/dist/runtime/components/__stories/AntPagination.stories.d.ts +0 -8
- package/dist/runtime/components/__stories/AntPagination.stories.mjs +0 -39
- package/dist/runtime/components/__stories/AntPopover.stories.d.ts +0 -6
- package/dist/runtime/components/__stories/AntPopover.stories.mjs +0 -47
- package/dist/runtime/components/__stories/AntSkeleton.stories.d.ts +0 -8
- package/dist/runtime/components/__stories/AntSkeleton.stories.mjs +0 -43
- package/dist/runtime/components/__stories/AntSpinner.stories.d.ts +0 -6
- package/dist/runtime/components/__stories/AntSpinner.stories.mjs +0 -34
- package/dist/runtime/components/__stories/AntTag.stories.d.ts +0 -7
- package/dist/runtime/components/__stories/AntTag.stories.mjs +0 -43
- package/dist/runtime/components/__stories/AntToast.stories.d.ts +0 -8
- package/dist/runtime/components/__stories/AntToast.stories.mjs +0 -66
- package/dist/runtime/components/__stories/AntToaster.stories.d.ts +0 -34
- package/dist/runtime/components/__stories/AntToaster.stories.mjs +0 -42
- package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +0 -16
- package/dist/runtime/components/__stories/AntTooltip.stories.mjs +0 -241
- package/dist/runtime/components/__types/AntAccordion.types.d.ts +0 -4
- package/dist/runtime/components/__types/AntAccordion.types.mjs +0 -5
- package/dist/runtime/components/__types/AntIcon.types.d.ts +0 -8
- package/dist/runtime/components/__types/AntIcon.types.mjs +0 -9
- package/dist/runtime/components/__types/AntKeycap.types.d.ts +0 -4
- package/dist/runtime/components/__types/AntKeycap.types.mjs +0 -5
- package/dist/runtime/components/__types/AntListGroupItem.types.d.ts +0 -9
- package/dist/runtime/components/__types/AntListGroupItem.types.mjs +0 -10
- package/dist/runtime/components/__types/AntSpinner.types.d.ts +0 -10
- package/dist/runtime/components/__types/AntSpinner.types.mjs +0 -11
- package/dist/runtime/components/__types/AntTag.types.d.ts +0 -17
- package/dist/runtime/components/__types/AntTag.types.mjs +0 -19
- package/dist/runtime/components/__types/AntToaster.types.d.ts +0 -8
- package/dist/runtime/components/__types/AntToaster.types.mjs +0 -0
- package/dist/runtime/components/__types/index.d.ts +0 -7
- package/dist/runtime/components/__types/index.mjs +0 -7
- package/dist/runtime/components/buttons/AntActionButton.vue +0 -74
- package/dist/runtime/components/buttons/AntButton.vue +0 -257
- package/dist/runtime/components/buttons/AntCreateButton.vue +0 -54
- package/dist/runtime/components/buttons/AntDeleteButton.vue +0 -54
- package/dist/runtime/components/buttons/AntDuplicateButton.vue +0 -54
- package/dist/runtime/components/buttons/AntEditButton.vue +0 -54
- package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +0 -56
- package/dist/runtime/components/buttons/AntSaveButton.vue +0 -55
- package/dist/runtime/components/buttons/__stories/AntActionButton.stories.d.ts +0 -11
- package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +0 -86
- package/dist/runtime/components/buttons/__stories/AntButton.stories.d.ts +0 -16
- package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +0 -313
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +0 -12
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +0 -76
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +0 -12
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +0 -76
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.d.ts +0 -12
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +0 -76
- package/dist/runtime/components/buttons/__stories/AntEditButton.stories.d.ts +0 -12
- package/dist/runtime/components/buttons/__stories/AntEditButton.stories.mjs +0 -76
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +0 -12
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +0 -76
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +0 -12
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +0 -76
- package/dist/runtime/components/buttons/__types/AntButton.types.d.ts +0 -4
- package/dist/runtime/components/buttons/__types/AntButton.types.mjs +0 -5
- package/dist/runtime/components/buttons/__types/index.d.ts +0 -1
- package/dist/runtime/components/buttons/__types/index.mjs +0 -1
- package/dist/runtime/components/crud/AntCrud.vue +0 -45
- package/dist/runtime/components/crud/AntCrudDetail.vue +0 -11
- package/dist/runtime/components/crud/AntCrudDetailActions.vue +0 -58
- package/dist/runtime/components/crud/AntCrudDetailNav.vue +0 -64
- package/dist/runtime/components/crud/AntCrudTableFilter.vue +0 -122
- package/dist/runtime/components/crud/AntCrudTableNav.vue +0 -149
- package/dist/runtime/components/crud/__stories/AntCrud.stories.d.ts +0 -6
- package/dist/runtime/components/crud/__stories/AntCrud.stories.mjs +0 -126
- package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.d.ts +0 -7
- package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.mjs +0 -80
- package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.d.ts +0 -6
- package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.mjs +0 -25
- package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.d.ts +0 -6
- package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.mjs +0 -41
- package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.d.ts +0 -6
- package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.mjs +0 -25
- package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.d.ts +0 -8
- package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.mjs +0 -56
- package/dist/runtime/components/dialogs/AntDeleteDialog.vue +0 -29
- package/dist/runtime/components/dialogs/AntDialog.vue +0 -147
- package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.d.ts +0 -6
- package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.mjs +0 -32
- package/dist/runtime/components/dialogs/__stories/AntDialog.stories.d.ts +0 -6
- package/dist/runtime/components/dialogs/__stories/AntDialog.stories.mjs +0 -60
- package/dist/runtime/components/forms/AntField.vue +0 -123
- package/dist/runtime/components/forms/AntFormGroup.vue +0 -36
- package/dist/runtime/components/forms/AntFormGroupLabel.vue +0 -5
- package/dist/runtime/components/forms/__stories/AntField.stories.d.ts +0 -6
- package/dist/runtime/components/forms/__stories/AntField.stories.mjs +0 -80
- package/dist/runtime/components/forms/__stories/AntFormGroup.stories.d.ts +0 -6
- package/dist/runtime/components/forms/__stories/AntFormGroup.stories.mjs +0 -33
- package/dist/runtime/components/forms/__stories/AntFormGroupLabel.stories.d.ts +0 -6
- package/dist/runtime/components/forms/__stories/AntFormGroupLabel.stories.mjs +0 -20
- package/dist/runtime/components/index.d.ts +0 -62
- package/dist/runtime/components/index.mjs +0 -124
- package/dist/runtime/components/inputs/AntCheckbox.vue +0 -182
- package/dist/runtime/components/inputs/AntCheckboxGroup.vue +0 -117
- package/dist/runtime/components/inputs/AntDateInput.vue +0 -104
- package/dist/runtime/components/inputs/AntNumberInput.vue +0 -157
- package/dist/runtime/components/inputs/AntPasswordInput.vue +0 -107
- package/dist/runtime/components/inputs/AntRadio.vue +0 -206
- package/dist/runtime/components/inputs/AntRadioGroup.vue +0 -127
- package/dist/runtime/components/inputs/AntRangeSlider.vue +0 -101
- package/dist/runtime/components/inputs/AntRichTextEditor.vue +0 -237
- package/dist/runtime/components/inputs/AntSearch.vue +0 -75
- package/dist/runtime/components/inputs/AntSelect.vue +0 -319
- package/dist/runtime/components/inputs/AntSwitch.vue +0 -192
- package/dist/runtime/components/inputs/AntSwitcher.vue +0 -196
- package/dist/runtime/components/inputs/AntTagInput.vue +0 -339
- package/dist/runtime/components/inputs/AntTextInput.vue +0 -75
- package/dist/runtime/components/inputs/AntTextarea.vue +0 -191
- package/dist/runtime/components/inputs/AntUnitInput.vue +0 -96
- package/dist/runtime/components/inputs/Elements/AntBaseInput.vue +0 -271
- package/dist/runtime/components/inputs/Elements/AntDropDown.vue +0 -189
- package/dist/runtime/components/inputs/Elements/AntInputDescription.vue +0 -58
- package/dist/runtime/components/inputs/Elements/AntInputLabel.vue +0 -62
- package/dist/runtime/components/inputs/Elements/AntInputLimiter.vue +0 -58
- package/dist/runtime/components/inputs/Elements/__stories/AntBaseInput.stories.d.ts +0 -11
- package/dist/runtime/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +0 -234
- package/dist/runtime/components/inputs/Elements/__stories/AntInputDescription.stories.d.ts +0 -6
- package/dist/runtime/components/inputs/Elements/__stories/AntInputDescription.stories.mjs +0 -34
- package/dist/runtime/components/inputs/Elements/__stories/AntInputLabel.stories.d.ts +0 -7
- package/dist/runtime/components/inputs/Elements/__stories/AntInputLabel.stories.mjs +0 -46
- package/dist/runtime/components/inputs/Elements/__stories/AntInputLimiter.stories.d.ts +0 -6
- package/dist/runtime/components/inputs/Elements/__stories/AntInputLimiter.stories.mjs +0 -37
- package/dist/runtime/components/inputs/Elements/__types/AntBaseInput.types.d.ts +0 -17
- package/dist/runtime/components/inputs/Elements/__types/AntBaseInput.types.mjs +0 -18
- package/dist/runtime/components/inputs/Elements/__types/index.d.ts +0 -1
- package/dist/runtime/components/inputs/Elements/__types/index.mjs +0 -1
- package/dist/runtime/components/inputs/Elements/index.d.ts +0 -6
- package/dist/runtime/components/inputs/Elements/index.mjs +0 -12
- package/dist/runtime/components/inputs/__stories/AntCheckbox.stories.d.ts +0 -8
- package/dist/runtime/components/inputs/__stories/AntCheckbox.stories.mjs +0 -382
- package/dist/runtime/components/inputs/__stories/AntCheckboxGroup.stories.d.ts +0 -7
- package/dist/runtime/components/inputs/__stories/AntCheckboxGroup.stories.mjs +0 -84
- package/dist/runtime/components/inputs/__stories/AntDateInput.stories.d.ts +0 -8
- package/dist/runtime/components/inputs/__stories/AntDateInput.stories.mjs +0 -193
- package/dist/runtime/components/inputs/__stories/AntNumberInput.stories.d.ts +0 -10
- package/dist/runtime/components/inputs/__stories/AntNumberInput.stories.mjs +0 -246
- package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.d.ts +0 -8
- package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.mjs +0 -156
- package/dist/runtime/components/inputs/__stories/AntRadioGroup.stories.d.ts +0 -8
- package/dist/runtime/components/inputs/__stories/AntRadioGroup.stories.mjs +0 -251
- package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.d.ts +0 -7
- package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.mjs +0 -67
- package/dist/runtime/components/inputs/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
- package/dist/runtime/components/inputs/__stories/AntRichTextEditor.stories-old.mjs +0 -0
- package/dist/runtime/components/inputs/__stories/AntSearch.stories.d.ts +0 -7
- package/dist/runtime/components/inputs/__stories/AntSearch.stories.mjs +0 -103
- package/dist/runtime/components/inputs/__stories/AntSelect.stories.d.ts +0 -13
- package/dist/runtime/components/inputs/__stories/AntSelect.stories.mjs +0 -255
- package/dist/runtime/components/inputs/__stories/AntSwitch.stories.d.ts +0 -8
- package/dist/runtime/components/inputs/__stories/AntSwitch.stories.mjs +0 -344
- package/dist/runtime/components/inputs/__stories/AntSwitcher.stories.d.ts +0 -8
- package/dist/runtime/components/inputs/__stories/AntSwitcher.stories.mjs +0 -235
- package/dist/runtime/components/inputs/__stories/AntTagInput.stories.d.ts +0 -9
- package/dist/runtime/components/inputs/__stories/AntTagInput.stories.mjs +0 -228
- package/dist/runtime/components/inputs/__stories/AntTextInput.stories.d.ts +0 -9
- package/dist/runtime/components/inputs/__stories/AntTextInput.stories.mjs +0 -225
- package/dist/runtime/components/inputs/__stories/AntTextarea.stories.d.ts +0 -9
- package/dist/runtime/components/inputs/__stories/AntTextarea.stories.mjs +0 -144
- package/dist/runtime/components/inputs/__stories/AntUnitInput.stories.d.ts +0 -9
- package/dist/runtime/components/inputs/__stories/AntUnitInput.stories.mjs +0 -116
- package/dist/runtime/components/inputs/__types/AntCheckbox.types.d.ts +0 -6
- package/dist/runtime/components/inputs/__types/AntCheckbox.types.mjs +0 -0
- package/dist/runtime/components/inputs/__types/AntDateInput.types.d.ts +0 -7
- package/dist/runtime/components/inputs/__types/AntDateInput.types.mjs +0 -8
- package/dist/runtime/components/inputs/__types/AntRadio.types.d.ts +0 -9
- package/dist/runtime/components/inputs/__types/AntRadio.types.mjs +0 -0
- package/dist/runtime/components/inputs/__types/AntSelect.types.d.ts +0 -4
- package/dist/runtime/components/inputs/__types/AntSelect.types.mjs +0 -0
- package/dist/runtime/components/inputs/__types/AntSwitcher.types.d.ts +0 -4
- package/dist/runtime/components/inputs/__types/AntSwitcher.types.mjs +0 -0
- package/dist/runtime/components/inputs/__types/AntTagInput.types.d.ts +0 -5
- package/dist/runtime/components/inputs/__types/AntTagInput.types.mjs +0 -6
- package/dist/runtime/components/inputs/__types/AntTextInput.types.d.ts +0 -6
- package/dist/runtime/components/inputs/__types/AntTextInput.types.mjs +0 -7
- package/dist/runtime/components/inputs/__types/index.d.ts +0 -7
- package/dist/runtime/components/inputs/__types/index.mjs +0 -7
- package/dist/runtime/components/layouts/AntNavLeftLayout.vue +0 -36
- package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.d.ts +0 -7
- package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.mjs +0 -68
- package/dist/runtime/components/navbar/AntNavbar.vue +0 -25
- package/dist/runtime/components/navbar/AntNavbarItem.vue +0 -78
- package/dist/runtime/components/navbar/__stories/AntNavbar.stories.d.ts +0 -6
- package/dist/runtime/components/navbar/__stories/AntNavbar.stories.mjs +0 -66
- package/dist/runtime/components/navbar/__types/NavbarItem.types.d.ts +0 -10
- package/dist/runtime/components/navbar/__types/NavbarItem.types.mjs +0 -0
- package/dist/runtime/components/navbar/__types/index.d.ts +0 -1
- package/dist/runtime/components/navbar/__types/index.mjs +0 -1
- package/dist/runtime/components/table/AntTable.vue +0 -218
- package/dist/runtime/components/table/AntTableSortButton.vue +0 -48
- package/dist/runtime/components/table/AntTd.vue +0 -81
- package/dist/runtime/components/table/AntTh.vue +0 -78
- package/dist/runtime/components/table/__stories/AntTable.stories.d.ts +0 -9
- package/dist/runtime/components/table/__stories/AntTable.stories.mjs +0 -273
- package/dist/runtime/components/table/__types/TableHeader.types.d.ts +0 -36
- package/dist/runtime/components/table/__types/TableHeader.types.mjs +0 -25
- package/dist/runtime/components/table/__types/index.d.ts +0 -1
- package/dist/runtime/components/table/__types/index.mjs +0 -1
- package/dist/runtime/components/tabs/AntTabItem.vue +0 -118
- package/dist/runtime/components/tabs/AntTabs.vue +0 -47
- package/dist/runtime/components/tabs/__stories/AntTabItem.stories.d.ts +0 -6
- package/dist/runtime/components/tabs/__stories/AntTabItem.stories.mjs +0 -32
- package/dist/runtime/components/tabs/__stories/AntTabs.stories.d.ts +0 -9
- package/dist/runtime/components/tabs/__stories/AntTabs.stories.mjs +0 -173
- package/dist/runtime/components/tabs/__types/AntTabItem.types.d.ts +0 -17
- package/dist/runtime/components/tabs/__types/AntTabItem.types.mjs +0 -6
- package/dist/runtime/components/tabs/__types/index.d.ts +0 -1
- package/dist/runtime/components/tabs/__types/index.mjs +0 -1
- package/dist/runtime/components/transitions/AntTransitionCollapseHeight.vue +0 -92
- package/dist/runtime/composables/useUi.d.ts +0 -20
- package/dist/runtime/composables/useUi.mjs +0 -31
- package/dist/runtime/composables/useValidator.d.ts +0 -1
- package/dist/runtime/composables/useValidator.mjs +0 -1
- package/dist/runtime/enums/Direction.enum.d.ts +0 -4
- package/dist/runtime/enums/Direction.enum.mjs +0 -5
- package/dist/runtime/enums/Grouped.enum.d.ts +0 -6
- package/dist/runtime/enums/Grouped.enum.mjs +0 -7
- package/dist/runtime/enums/Position.enum.d.ts +0 -12
- package/dist/runtime/enums/Position.enum.mjs +0 -14
- package/dist/runtime/enums/Size.enum.d.ts +0 -7
- package/dist/runtime/enums/Size.enum.mjs +0 -8
- package/dist/runtime/enums/State.enum.d.ts +0 -16
- package/dist/runtime/enums/State.enum.mjs +0 -18
- package/dist/runtime/enums/index.d.ts +0 -5
- package/dist/runtime/enums/index.mjs +0 -5
- package/dist/runtime/env.d.ts +0 -8
- package/dist/runtime/handler.d.ts +0 -1
- package/dist/runtime/handler.mjs +0 -5
- package/dist/runtime/plugins/toaster.d.ts +0 -22
- package/dist/runtime/plugins/toaster.mjs +0 -53
- package/dist/runtime/shims/vue.d.ts +0 -5
- package/dist/runtime/types.d.ts +0 -8
- package/dist/runtime/types.mjs +0 -8
- package/dist/runtime/utils/helper.d.ts +0 -4
- package/dist/runtime/utils/helper.mjs +0 -12
- package/dist/runtime/utils.d.ts +0 -20
- package/dist/runtime/utils.mjs +0 -41
- package/src/runtime/components/AntAccordion.vue +0 -64
- package/src/runtime/components/AntAccordionItem.vue +0 -119
- package/src/runtime/components/AntAlert.vue +0 -146
- package/src/runtime/components/AntCard.vue +0 -34
- package/src/runtime/components/AntContent.vue +0 -16
- package/src/runtime/components/AntDropdown.vue +0 -100
- package/src/runtime/components/AntIcon.vue +0 -56
- package/src/runtime/components/AntKeycap.vue +0 -45
- package/src/runtime/components/AntListGroup.vue +0 -24
- package/src/runtime/components/AntListGroupItem.vue +0 -83
- package/src/runtime/components/AntModal.vue +0 -130
- package/src/runtime/components/AntPagination.vue +0 -206
- package/src/runtime/components/AntPopover.vue +0 -135
- package/src/runtime/components/AntSkeleton.vue +0 -38
- package/src/runtime/components/AntSpinner.vue +0 -101
- package/src/runtime/components/AntTag.vue +0 -114
- package/src/runtime/components/AntToast.vue +0 -119
- package/src/runtime/components/AntToaster.vue +0 -70
- package/src/runtime/components/AntTooltip.vue +0 -189
- package/src/runtime/components/buttons/AntActionButton.vue +0 -74
- package/src/runtime/components/buttons/AntButton.vue +0 -257
- package/src/runtime/components/buttons/AntCreateButton.vue +0 -54
- package/src/runtime/components/buttons/AntDeleteButton.vue +0 -54
- package/src/runtime/components/buttons/AntDuplicateButton.vue +0 -54
- package/src/runtime/components/buttons/AntEditButton.vue +0 -54
- package/src/runtime/components/buttons/AntSaveAndNewButton.vue +0 -56
- package/src/runtime/components/buttons/AntSaveButton.vue +0 -55
- package/src/runtime/components/crud/AntCrud.vue +0 -69
- package/src/runtime/components/crud/AntCrudDetail.vue +0 -11
- package/src/runtime/components/crud/AntCrudDetailActions.vue +0 -58
- package/src/runtime/components/crud/AntCrudDetailNav.vue +0 -64
- package/src/runtime/components/crud/AntCrudTableFilter.vue +0 -122
- package/src/runtime/components/crud/AntCrudTableNav.vue +0 -149
- package/src/runtime/components/dialogs/AntDeleteDialog.vue +0 -29
- package/src/runtime/components/dialogs/AntDialog.vue +0 -181
- package/src/runtime/components/forms/AntField.vue +0 -123
- package/src/runtime/components/forms/AntFormGroup.vue +0 -36
- package/src/runtime/components/forms/AntFormGroupLabel.vue +0 -5
- package/src/runtime/components/inputs/AntCheckbox.vue +0 -201
- package/src/runtime/components/inputs/AntCheckboxGroup.vue +0 -117
- package/src/runtime/components/inputs/AntDateInput.vue +0 -104
- package/src/runtime/components/inputs/AntNumberInput.vue +0 -157
- package/src/runtime/components/inputs/AntPasswordInput.vue +0 -107
- package/src/runtime/components/inputs/AntRadio.vue +0 -214
- package/src/runtime/components/inputs/AntRadioGroup.vue +0 -127
- package/src/runtime/components/inputs/AntRangeSlider.vue +0 -121
- package/src/runtime/components/inputs/AntRichTextEditor.vue +0 -237
- package/src/runtime/components/inputs/AntSearch.vue +0 -75
- package/src/runtime/components/inputs/AntSelect.vue +0 -319
- package/src/runtime/components/inputs/AntSwitch.vue +0 -192
- package/src/runtime/components/inputs/AntSwitcher.vue +0 -196
- package/src/runtime/components/inputs/AntTagInput.vue +0 -339
- package/src/runtime/components/inputs/AntTextInput.vue +0 -75
- package/src/runtime/components/inputs/AntTextarea.vue +0 -191
- package/src/runtime/components/inputs/AntUnitInput.vue +0 -96
- package/src/runtime/components/inputs/Elements/AntBaseInput.vue +0 -319
- package/src/runtime/components/inputs/Elements/AntDropDown.vue +0 -189
- package/src/runtime/components/inputs/Elements/AntInputDescription.vue +0 -58
- package/src/runtime/components/inputs/Elements/AntInputLabel.vue +0 -62
- package/src/runtime/components/inputs/Elements/AntInputLimiter.vue +0 -58
- package/src/runtime/components/layouts/AntNavLeftLayout.vue +0 -36
- package/src/runtime/components/navbar/AntNavbar.vue +0 -25
- package/src/runtime/components/navbar/AntNavbarItem.vue +0 -78
- package/src/runtime/components/table/AntTable.vue +0 -218
- package/src/runtime/components/table/AntTableSortButton.vue +0 -48
- package/src/runtime/components/table/AntTd.vue +0 -81
- package/src/runtime/components/table/AntTh.vue +0 -78
- package/src/runtime/components/tabs/AntTabItem.vue +0 -118
- package/src/runtime/components/tabs/AntTabs.vue +0 -47
- package/src/runtime/components/transitions/AntTransitionCollapseHeight.vue +0 -96
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {computed, useSlots} from 'vue';
|
|
3
|
-
import AntNavbar from '../navbar/AntNavbar.vue';
|
|
4
|
-
import type {RouteLocationRaw} from 'vue-router';
|
|
5
|
-
import type {NavbarItemTypes} from '../navbar/__types/NavbarItem.types';
|
|
6
|
-
|
|
7
|
-
defineProps<{
|
|
8
|
-
navbarItems: NavbarItemTypes[];
|
|
9
|
-
logoRoute?: RouteLocationRaw;
|
|
10
|
-
}>();
|
|
11
|
-
|
|
12
|
-
const hasLogoImageSlot = computed(() => useSlots()['logo-image'] || false);
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div class="flex gap-px bg-neutral-300 h-screen min-w-full overflow-y-hidden">
|
|
17
|
-
<div class="flex flex-col gap-px bg-neutral-300 w-52 shrink-0">
|
|
18
|
-
<component
|
|
19
|
-
:is="logoRoute ? 'RouterLink' : 'div'"
|
|
20
|
-
v-if="hasLogoImageSlot"
|
|
21
|
-
:to="logoRoute"
|
|
22
|
-
class="bg-white min-h-[60px] flex justify-center items-center p-2.5"
|
|
23
|
-
>
|
|
24
|
-
<slot name="logo-image" />
|
|
25
|
-
</component>
|
|
26
|
-
|
|
27
|
-
<AntNavbar
|
|
28
|
-
:navbar-items="navbarItems"
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="w-px flex-grow">
|
|
33
|
-
<slot />
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
import { computed } from 'vue';
|
|
4
|
-
import type { NavbarItemTypes } from './__types/NavbarItem.types';
|
|
5
|
-
import AntNavbarItem from './AntNavbarItem.vue';
|
|
6
|
-
|
|
7
|
-
defineProps<{
|
|
8
|
-
navbarItems: NavbarItemTypes[]
|
|
9
|
-
}>();
|
|
10
|
-
|
|
11
|
-
const containerClasses = computed(() => ({
|
|
12
|
-
'w-full h-full bg-white flex flex-col gap-1 p-1.5': true,
|
|
13
|
-
}));
|
|
14
|
-
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<template>
|
|
18
|
-
<div :class="containerClasses">
|
|
19
|
-
<AntNavbarItem
|
|
20
|
-
v-for="(navbarItem, index) in navbarItems"
|
|
21
|
-
:key="`navbar-item-${index}`"
|
|
22
|
-
:navbar-item="navbarItem"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type {NavbarItemTypes} from './__types/NavbarItem.types';
|
|
3
|
-
import {computed, ref} from 'vue';
|
|
4
|
-
import AntIcon from '../AntIcon.vue';
|
|
5
|
-
import {faChevronDown, faChevronUp} from '@fortawesome/free-solid-svg-icons';
|
|
6
|
-
import AntTransitionCollapseHeight from '../transitions/AntTransitionCollapseHeight.vue';
|
|
7
|
-
|
|
8
|
-
const props = defineProps<{
|
|
9
|
-
navbarItem: NavbarItemTypes
|
|
10
|
-
}>();
|
|
11
|
-
|
|
12
|
-
const itemClasses = computed(() => ({
|
|
13
|
-
'w-full text-sm p-1.5 rounded-md cursor-pointer flex items-center flex-nowrap gap-1': true,
|
|
14
|
-
'transition-colors hover:bg-neutral-100': true,
|
|
15
|
-
'text-primary-500': props.navbarItem.active
|
|
16
|
-
}));
|
|
17
|
-
|
|
18
|
-
const open = ref(false);
|
|
19
|
-
|
|
20
|
-
function itemClick(): void {
|
|
21
|
-
if (props.navbarItem.click) {
|
|
22
|
-
props.navbarItem.click();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (props.navbarItem.children && props.navbarItem.children.length > 0) {
|
|
26
|
-
open.value = !open.value;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<component
|
|
33
|
-
:is="navbarItem.to ? 'router-link' : 'div'"
|
|
34
|
-
:to="navbarItem.to"
|
|
35
|
-
v-bind="$attrs"
|
|
36
|
-
:class="itemClasses"
|
|
37
|
-
@click="itemClick"
|
|
38
|
-
>
|
|
39
|
-
<AntIcon
|
|
40
|
-
v-if="navbarItem.icon"
|
|
41
|
-
:icon="navbarItem.icon"
|
|
42
|
-
:color="navbarItem.active ? 'text-primary-500' : 'text-for-white-bg-font'"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<div class="flex-grow select-none">
|
|
46
|
-
{{ navbarItem.label }}
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<div
|
|
50
|
-
v-if="navbarItem.children && navbarItem.children.length > 0"
|
|
51
|
-
>
|
|
52
|
-
<AntIcon
|
|
53
|
-
v-if="!open"
|
|
54
|
-
:icon="faChevronDown"
|
|
55
|
-
:color="navbarItem.active ? 'text-primary-500' : 'text-for-white-bg-font'"
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
<AntIcon
|
|
59
|
-
v-if="open"
|
|
60
|
-
:icon="faChevronUp"
|
|
61
|
-
:color="navbarItem.active ? 'text-primary-500' : 'text-for-white-bg-font'"
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
</component>
|
|
65
|
-
|
|
66
|
-
<AntTransitionCollapseHeight
|
|
67
|
-
v-if="navbarItem.children && navbarItem.children.length > 0"
|
|
68
|
-
>
|
|
69
|
-
<div v-show="open">
|
|
70
|
-
<AntNavbarItem
|
|
71
|
-
v-for="(child, index) in navbarItem.children"
|
|
72
|
-
:key="`navbar-item-child-${index}`"
|
|
73
|
-
:navbar-item="child"
|
|
74
|
-
class="pl-[30px]"
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
</AntTransitionCollapseHeight>
|
|
78
|
-
</template>
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {AntTableSize, AntTableSortDirection, type TableHeader} from './__types/TableHeader.types';
|
|
3
|
-
import {computed, ref, type Ref, watch} from 'vue';
|
|
4
|
-
import {useVModel} from '@vueuse/core';
|
|
5
|
-
import {State} from '../../enums';
|
|
6
|
-
import AntTh from './AntTh.vue';
|
|
7
|
-
import AntTd from './AntTd.vue';
|
|
8
|
-
import AntSpinner from '../AntSpinner.vue';
|
|
9
|
-
import AntSkeleton from '../AntSkeleton.vue';
|
|
10
|
-
|
|
11
|
-
defineOptions({inheritAttrs: false});
|
|
12
|
-
|
|
13
|
-
const emits = defineEmits([
|
|
14
|
-
'update:modelValue',
|
|
15
|
-
'update:skeleton',
|
|
16
|
-
'update:selectedRow',
|
|
17
|
-
'rowClick',
|
|
18
|
-
'updateSort'
|
|
19
|
-
]);
|
|
20
|
-
// TODO:: add pagination prop and pagination to table
|
|
21
|
-
const props = withDefaults(
|
|
22
|
-
defineProps<{
|
|
23
|
-
selectedRow?: Record<string, unknown> | undefined,
|
|
24
|
-
headers: TableHeader[];
|
|
25
|
-
data: Record<string, unknown>[];
|
|
26
|
-
rowKey?: string;
|
|
27
|
-
loading?: boolean;
|
|
28
|
-
selectableRows?: boolean;
|
|
29
|
-
showLightVersion?: boolean;
|
|
30
|
-
size?: AntTableSize
|
|
31
|
-
}>(), {
|
|
32
|
-
rowKey: 'id',
|
|
33
|
-
loading: false,
|
|
34
|
-
selectableRows: false,
|
|
35
|
-
showLightVersion: false,
|
|
36
|
-
size: AntTableSize.md
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const selected: Ref<Record<string, unknown> | undefined> = useVModel(props, 'selectedRow', emits);
|
|
40
|
-
const _loading: Ref<boolean> = useVModel(props, 'loading', emits);
|
|
41
|
-
const _showLightVersion = ref(props.showLightVersion);
|
|
42
|
-
const _headers = computed(() => {
|
|
43
|
-
// if (_showLightVersion.value) {
|
|
44
|
-
// const lightHeaders = props.headers.filter(header => header.lightVersion);
|
|
45
|
-
//
|
|
46
|
-
// return lightHeaders.length > 0 ? lightHeaders : [props.headers[0]];
|
|
47
|
-
// }
|
|
48
|
-
|
|
49
|
-
return props.headers;
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
watch(() => props.showLightVersion, (val) => {
|
|
53
|
-
setTimeout(() => _showLightVersion.value = val, val ? 200 : 400);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
function sortTable(header: TableHeader, newDirection: AntTableSortDirection) {
|
|
57
|
-
// TODO:: Sorting is always done externally, here should only be a emit sort with header and direction.
|
|
58
|
-
// TODO:: Save current sort in some kind of prop (maybe same as pagination?)
|
|
59
|
-
// TODO:: Multi column sort?
|
|
60
|
-
// if (newDirection !== AntTableSortDirection.neutral) {
|
|
61
|
-
// if (header.sort) {
|
|
62
|
-
// const sortFn = header.sort;
|
|
63
|
-
// internalRows.value.sort((a, b) => sortFn(a, b, newDirection));
|
|
64
|
-
// } else {
|
|
65
|
-
// internalRows.value.sort((a: Record<string, unknown>, b: Record<string, unknown>) => {
|
|
66
|
-
// if (newDirection === AntTableSortDirection.asc) {
|
|
67
|
-
// return (a[header.identifier] as string) < (b[header.identifier] as string) ? -1 : 1
|
|
68
|
-
// } else {
|
|
69
|
-
// return (a[header.identifier] as string) > (b[header.identifier] as string) ? -1 : 1
|
|
70
|
-
// }
|
|
71
|
-
// });
|
|
72
|
-
// }
|
|
73
|
-
// } else {
|
|
74
|
-
// // Reset sort to default
|
|
75
|
-
// internalRows.value = [ ...props.data ];
|
|
76
|
-
// }
|
|
77
|
-
|
|
78
|
-
emits('updateSort', header, newDirection);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function rowClick(elem: Record<string, unknown>): void {
|
|
82
|
-
selected.value = elem;
|
|
83
|
-
|
|
84
|
-
emits('rowClick', elem);
|
|
85
|
-
}
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<template>
|
|
89
|
-
<div
|
|
90
|
-
class="relative inline-block min-w-full align-middle h-full"
|
|
91
|
-
data-e2e="table"
|
|
92
|
-
>
|
|
93
|
-
<div class="overflow-hidden h-full overflow-x-auto overflow-y-auto">
|
|
94
|
-
<table
|
|
95
|
-
v-bind="$attrs"
|
|
96
|
-
class="min-w-full max-h-full relative"
|
|
97
|
-
:class="{'h-full': data.length === 0 && !_loading}"
|
|
98
|
-
>
|
|
99
|
-
<thead class="bg-neutral-200 sticky top-0 z-10">
|
|
100
|
-
<tr>
|
|
101
|
-
<slot name="headerFirstCell" />
|
|
102
|
-
|
|
103
|
-
<template v-for="(header, index) in _headers">
|
|
104
|
-
<AntTh
|
|
105
|
-
v-if="!_showLightVersion || (_showLightVersion && header.lightVersion)"
|
|
106
|
-
:key="`table-header-${header.identifier}-${index}`"
|
|
107
|
-
:header="header"
|
|
108
|
-
:size="size"
|
|
109
|
-
@sort="sortTable"
|
|
110
|
-
>
|
|
111
|
-
<template #headerContent>
|
|
112
|
-
<slot
|
|
113
|
-
name="headerContent"
|
|
114
|
-
v-bind="header"
|
|
115
|
-
/>
|
|
116
|
-
</template>
|
|
117
|
-
</AntTh>
|
|
118
|
-
</template>
|
|
119
|
-
|
|
120
|
-
<slot name="headerLastCell"></slot>
|
|
121
|
-
</tr>
|
|
122
|
-
</thead>
|
|
123
|
-
|
|
124
|
-
<tbody class="bg-white relative">
|
|
125
|
-
<!-- TODO:: Add some kind of virtual list for very large tree data (or required pagination??) -->
|
|
126
|
-
<tr
|
|
127
|
-
v-for="(elem, index) in data"
|
|
128
|
-
:id="elem[rowKey] as string"
|
|
129
|
-
:key="`table-row-${elem[rowKey]}-${index}`"
|
|
130
|
-
class="transition-all"
|
|
131
|
-
:class="{
|
|
132
|
-
'bg-primary-200 text-primary-200-font': elem === selected,
|
|
133
|
-
'bg-white text-for-white-bg-font': elem !== selected && index % 2 === 0,
|
|
134
|
-
'bg-neutral-100 text-neutral-100-font': elem !== selected && index % 2 !== 0,
|
|
135
|
-
'cursor-pointer': selectableRows
|
|
136
|
-
}"
|
|
137
|
-
>
|
|
138
|
-
<slot
|
|
139
|
-
name="rowFirstCell"
|
|
140
|
-
v-bind="{ elem }"
|
|
141
|
-
/>
|
|
142
|
-
|
|
143
|
-
<template v-for="(header, index) in _headers">
|
|
144
|
-
<AntTd
|
|
145
|
-
v-if="!_showLightVersion || (_showLightVersion && header.lightVersion)"
|
|
146
|
-
:key="`table-cell-${header.identifier}-${index}`"
|
|
147
|
-
:header="header"
|
|
148
|
-
:element="elem"
|
|
149
|
-
:align="header.align"
|
|
150
|
-
:size="size"
|
|
151
|
-
@click="rowClick(elem)"
|
|
152
|
-
>
|
|
153
|
-
<template #beforeCellContent="props">
|
|
154
|
-
<slot
|
|
155
|
-
name="beforeCellContent"
|
|
156
|
-
v-bind="props"
|
|
157
|
-
/>
|
|
158
|
-
</template>
|
|
159
|
-
|
|
160
|
-
<template #cellContent="props">
|
|
161
|
-
<slot
|
|
162
|
-
name="cellContent"
|
|
163
|
-
v-bind="props"
|
|
164
|
-
/>
|
|
165
|
-
</template>
|
|
166
|
-
|
|
167
|
-
<template #afterCellContent="props">
|
|
168
|
-
<slot
|
|
169
|
-
name="afterCellContent"
|
|
170
|
-
v-bind="props"
|
|
171
|
-
/>
|
|
172
|
-
</template>
|
|
173
|
-
</AntTd>
|
|
174
|
-
</template>
|
|
175
|
-
|
|
176
|
-
<slot
|
|
177
|
-
name="rowLastCell"
|
|
178
|
-
v-bind="{ elem }"
|
|
179
|
-
/>
|
|
180
|
-
</tr>
|
|
181
|
-
|
|
182
|
-
<tr v-if="data.length <= 0 && !_loading">
|
|
183
|
-
<td
|
|
184
|
-
colspan="100"
|
|
185
|
-
class="w-full h-full py-2 text-center text-for-white-bg-font text-lg"
|
|
186
|
-
>
|
|
187
|
-
<slot name="emptyState">
|
|
188
|
-
<div class="flex items-center flex-col">
|
|
189
|
-
<span class="font-semibold">We couldn't find any entry</span>
|
|
190
|
-
</div>
|
|
191
|
-
</slot>
|
|
192
|
-
</td>
|
|
193
|
-
</tr>
|
|
194
|
-
</tbody>
|
|
195
|
-
</table>
|
|
196
|
-
</div>
|
|
197
|
-
|
|
198
|
-
<div
|
|
199
|
-
v-if="data.length > 0 && _loading"
|
|
200
|
-
class="absolute bg-opacity-50 w-full top-0 bottom-0 bg-neutral-300 flex items-center justify-center"
|
|
201
|
-
>
|
|
202
|
-
<AntSpinner
|
|
203
|
-
class="!w-24 !h-24"
|
|
204
|
-
:state="State.primary"
|
|
205
|
-
/>
|
|
206
|
-
</div>
|
|
207
|
-
|
|
208
|
-
<div
|
|
209
|
-
v-if="!data || data.length <= 0 && _loading"
|
|
210
|
-
class="absolute bg-opacity-50 w-full top-[40px] bottom-0 bg-neutral-300 flex items-center justify-center"
|
|
211
|
-
>
|
|
212
|
-
<AntSkeleton
|
|
213
|
-
v-model="_loading"
|
|
214
|
-
absolute
|
|
215
|
-
/>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</template>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
import {faAngleDown, faAngleUp, faMinus} from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import {AntTableSize, AntTableSortDirection} from './__types/TableHeader.types';
|
|
5
|
-
import AntButton from '../buttons/AntButton.vue';
|
|
6
|
-
import {computed} from 'vue';
|
|
7
|
-
import {Size} from '../../enums/Size.enum';
|
|
8
|
-
|
|
9
|
-
defineEmits(['sortClick']);
|
|
10
|
-
const props = withDefaults(
|
|
11
|
-
defineProps<{
|
|
12
|
-
sortDirection?: AntTableSortDirection
|
|
13
|
-
size?: AntTableSize
|
|
14
|
-
}>(), {
|
|
15
|
-
sortDirection: AntTableSortDirection.neutral,
|
|
16
|
-
size: AntTableSize.md
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const buttonSize = computed(() => {
|
|
20
|
-
if (props.size === AntTableSize.lg) {
|
|
21
|
-
return Size.sm;
|
|
22
|
-
} else if (props.size === AntTableSize.md) {
|
|
23
|
-
return Size.xs;
|
|
24
|
-
} else {
|
|
25
|
-
return Size.xs2;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const buttonIcon = computed(() => {
|
|
29
|
-
if (props.sortDirection === AntTableSortDirection.asc) {
|
|
30
|
-
return faAngleDown;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (props.sortDirection === AntTableSortDirection.desc) {
|
|
34
|
-
return faAngleUp;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (props.sortDirection === AntTableSortDirection.neutral) {
|
|
38
|
-
return faMinus;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<template>
|
|
44
|
-
<AntButton
|
|
45
|
-
:size="buttonSize"
|
|
46
|
-
:icon-left="buttonIcon"
|
|
47
|
-
/>
|
|
48
|
-
</template>
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
import {AntTableAlign, AntTableRowTypes, AntTableSize, type TableHeader} from './__types/TableHeader.types';
|
|
4
|
-
import {computed} from 'vue';
|
|
5
|
-
import type {RouteLocationRaw} from 'vue-router';
|
|
6
|
-
|
|
7
|
-
const props =
|
|
8
|
-
withDefaults(
|
|
9
|
-
defineProps<{
|
|
10
|
-
element: Record<string, unknown>;
|
|
11
|
-
header: TableHeader;
|
|
12
|
-
align?: AntTableAlign
|
|
13
|
-
size?: AntTableSize
|
|
14
|
-
}>(), {
|
|
15
|
-
align: AntTableAlign.left,
|
|
16
|
-
size: AntTableSize.md
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const cellClasses = computed(() => ({
|
|
20
|
-
'whitespace-nowrap text-sm font-medium relative': true,
|
|
21
|
-
'text-right': props.align === AntTableAlign.right,
|
|
22
|
-
'text-center': props.align === AntTableAlign.center,
|
|
23
|
-
'px-2.5 py-0 h-10': props.size === AntTableSize.lg,
|
|
24
|
-
'px-2 py-0 h-9': props.size === AntTableSize.md,
|
|
25
|
-
'px-1.5 py-0 h-8': props.size === AntTableSize.sm
|
|
26
|
-
}));
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<td
|
|
31
|
-
:class="cellClasses"
|
|
32
|
-
>
|
|
33
|
-
<slot
|
|
34
|
-
name="beforeCellContent"
|
|
35
|
-
v-bind="{ elem: element, header: header }"
|
|
36
|
-
/>
|
|
37
|
-
|
|
38
|
-
<div
|
|
39
|
-
v-if="header.type === AntTableRowTypes.text"
|
|
40
|
-
:class="header.rowClassList"
|
|
41
|
-
>
|
|
42
|
-
{{ element[header.identifier] }}
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<div
|
|
46
|
-
v-else-if="header.type === AntTableRowTypes.link && header.toProp"
|
|
47
|
-
>
|
|
48
|
-
<RouterLink
|
|
49
|
-
:to="element[header.toProp] as RouteLocationRaw"
|
|
50
|
-
class="absolute inset-0"
|
|
51
|
-
>
|
|
52
|
-
</RouterLink>
|
|
53
|
-
{{ element[header.identifier] }}
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div
|
|
57
|
-
v-else-if="header.type === AntTableRowTypes.html"
|
|
58
|
-
:class="header.rowClassList"
|
|
59
|
-
v-html="element[header.identifier]"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<div
|
|
63
|
-
v-else-if="header.type === AntTableRowTypes.slot"
|
|
64
|
-
:class="header.rowClassList"
|
|
65
|
-
>
|
|
66
|
-
<slot
|
|
67
|
-
name="cellContent"
|
|
68
|
-
v-bind="{ element, header }"
|
|
69
|
-
></slot>
|
|
70
|
-
</div>
|
|
71
|
-
|
|
72
|
-
<slot
|
|
73
|
-
name="afterCellContent"
|
|
74
|
-
v-bind="{ elem: element, header: header }"
|
|
75
|
-
/>
|
|
76
|
-
</td>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<style scoped>
|
|
80
|
-
|
|
81
|
-
</style>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
|
|
3
|
-
import {AntTableAlign, AntTableSize, AntTableSortDirection, type TableHeader} from './__types/TableHeader.types';
|
|
4
|
-
import {computed, ref, type Ref} from 'vue';
|
|
5
|
-
import AntTableSortButton from './AntTableSortButton.vue';
|
|
6
|
-
|
|
7
|
-
defineEmits([ 'sort' ]);
|
|
8
|
-
const props = withDefaults(
|
|
9
|
-
defineProps<{
|
|
10
|
-
header: TableHeader
|
|
11
|
-
size?: AntTableSize
|
|
12
|
-
}>(), {
|
|
13
|
-
size: AntTableSize.md
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
const headerClasses = computed(() => ({
|
|
18
|
-
[props.header.headerClassList || '']: true,
|
|
19
|
-
'text-sm text-neutral-200-font uppercase font-semi-bold': true,
|
|
20
|
-
'text-left': !props.header.align || props.header.align === AntTableAlign.left,
|
|
21
|
-
'text-center': props.header.align === AntTableAlign.center,
|
|
22
|
-
'text-right': props.header.align === AntTableAlign.right,
|
|
23
|
-
'px-2.5 py-0 h-10': props.size === AntTableSize.lg,
|
|
24
|
-
'px-2 py-0 h-9': props.size === AntTableSize.md,
|
|
25
|
-
'px-1.5 py-0 h-8': props.size === AntTableSize.sm
|
|
26
|
-
}));
|
|
27
|
-
|
|
28
|
-
const cellClasses = computed(() => ({
|
|
29
|
-
'flex items-center': true,
|
|
30
|
-
'justify-start': !props.header.align || props.header.align === AntTableAlign.left,
|
|
31
|
-
'justify-center': props.header.align === AntTableAlign.center,
|
|
32
|
-
'justify-end': props.header.align === AntTableAlign.right,
|
|
33
|
-
'gap-2.5': props.size === AntTableSize.lg,
|
|
34
|
-
'gap-2': props.size === AntTableSize.md,
|
|
35
|
-
'gap-1.5': props.size === AntTableSize.sm,
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
// TODO:: Initial sort should be possible with this
|
|
39
|
-
const sortDirection: Ref<AntTableSortDirection> = ref(AntTableSortDirection.neutral);
|
|
40
|
-
|
|
41
|
-
function getNewSortDirection(): AntTableSortDirection {
|
|
42
|
-
if (sortDirection.value === AntTableSortDirection.neutral) {
|
|
43
|
-
sortDirection.value = AntTableSortDirection.asc;
|
|
44
|
-
return AntTableSortDirection.asc;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (sortDirection.value === AntTableSortDirection.asc) {
|
|
48
|
-
sortDirection.value = AntTableSortDirection.desc;
|
|
49
|
-
return AntTableSortDirection.desc;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
sortDirection.value = AntTableSortDirection.neutral;
|
|
53
|
-
return AntTableSortDirection.neutral;
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<template>
|
|
58
|
-
<th
|
|
59
|
-
scope="col"
|
|
60
|
-
:class="headerClasses"
|
|
61
|
-
>
|
|
62
|
-
<div :class="cellClasses">
|
|
63
|
-
<slot
|
|
64
|
-
name="headerContent"
|
|
65
|
-
v-bind="header"
|
|
66
|
-
>
|
|
67
|
-
{{ header.title }}
|
|
68
|
-
</slot>
|
|
69
|
-
|
|
70
|
-
<AntTableSortButton
|
|
71
|
-
v-if="header.sortable"
|
|
72
|
-
:sort-direction="sortDirection"
|
|
73
|
-
:size="size"
|
|
74
|
-
@sort-click="$emit('sort', header, getNewSortDirection())"
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
</th>
|
|
78
|
-
</template>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import AntIcon from '../AntIcon.vue';
|
|
3
|
-
import {
|
|
4
|
-
faExclamationCircle,
|
|
5
|
-
faExclamationTriangle,
|
|
6
|
-
type IconDefinition
|
|
7
|
-
} from '@fortawesome/free-solid-svg-icons';
|
|
8
|
-
import {computed} from 'vue';
|
|
9
|
-
import {type RouteLocationRaw, useRoute} from 'vue-router';
|
|
10
|
-
import {TabItemState} from './__types/AntTabItem.types';
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(defineProps<{
|
|
13
|
-
label: string;
|
|
14
|
-
active: boolean;
|
|
15
|
-
state?: TabItemState
|
|
16
|
-
showIcon?: boolean;
|
|
17
|
-
icon?: IconDefinition;
|
|
18
|
-
to?: RouteLocationRaw;
|
|
19
|
-
expanded?: boolean;
|
|
20
|
-
}>(), {
|
|
21
|
-
state: TabItemState.base,
|
|
22
|
-
showIcon: true,
|
|
23
|
-
});
|
|
24
|
-
const route = useRoute();
|
|
25
|
-
|
|
26
|
-
const icons = {
|
|
27
|
-
[TabItemState.base]: null,
|
|
28
|
-
[TabItemState.danger]: faExclamationCircle,
|
|
29
|
-
[TabItemState.warning]: faExclamationTriangle,
|
|
30
|
-
};
|
|
31
|
-
const iconRight = computed<IconDefinition | null>(() => icons[props.state]);
|
|
32
|
-
const _active = computed<boolean>(() => {
|
|
33
|
-
if (typeof props.to === 'string') {
|
|
34
|
-
return route.path === props.to;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (typeof props.to === 'object' && props.to?.name !== undefined) {
|
|
38
|
-
return route.name === props.to.name;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return props.active;
|
|
42
|
-
});
|
|
43
|
-
const containerClasses = computed(() => {
|
|
44
|
-
const variants: Record<TabItemState, string> = {
|
|
45
|
-
[TabItemState.base]: 'hover:bg-neutral-100',
|
|
46
|
-
[TabItemState.warning]: 'hover:bg-warning-100',
|
|
47
|
-
[TabItemState.danger]: 'hover:bg-danger-100',
|
|
48
|
-
};
|
|
49
|
-
const activeVariants: Record<TabItemState, string> = {
|
|
50
|
-
[TabItemState.base]: 'text-primary-500 border-primary-500',
|
|
51
|
-
[TabItemState.warning]: 'text-warning-500 border-warning-500',
|
|
52
|
-
[TabItemState.danger]: 'text-danger-500 border-danger-500',
|
|
53
|
-
};
|
|
54
|
-
const notActiveVariants: Record<TabItemState, string> = {
|
|
55
|
-
[TabItemState.base]: 'text-for-white-bg-font border-white',
|
|
56
|
-
[TabItemState.warning]: 'text-warning-500',
|
|
57
|
-
[TabItemState.danger]: 'text-danger-500',
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
'p-2 hover:cursor-pointer text-center flex items-center justify-center gap-2 bg-white transition-[background-color] relative text-sm': true,
|
|
62
|
-
'grow': props.expanded,
|
|
63
|
-
[variants[props.state]]: true,
|
|
64
|
-
[activeVariants[props.state]]: _active.value,
|
|
65
|
-
[notActiveVariants[props.state]]: !_active.value,
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
const borderBoxClasses = computed(() => {
|
|
69
|
-
const variants: Record<TabItemState, string> = {
|
|
70
|
-
[TabItemState.base]: 'bg-primary-500',
|
|
71
|
-
[TabItemState.warning]: 'bg-warning-500',
|
|
72
|
-
[TabItemState.danger]: 'bg-danger-500',
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
'h-[2px] w-full bg-danger-500 absolute bottom-0': true,
|
|
77
|
-
[variants[props.state]]: true,
|
|
78
|
-
};
|
|
79
|
-
});
|
|
80
|
-
const iconColor = computed(() => {
|
|
81
|
-
const variants = {
|
|
82
|
-
[TabItemState.base]: 'text-neutral-100-font',
|
|
83
|
-
[TabItemState.warning]: 'text-warning-500',
|
|
84
|
-
[TabItemState.danger]: 'text-danger-500',
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
return variants[props.state];
|
|
88
|
-
});
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<template>
|
|
92
|
-
<component
|
|
93
|
-
:is="to !== undefined ? 'router-link' : 'div'"
|
|
94
|
-
:to="to"
|
|
95
|
-
:class="containerClasses"
|
|
96
|
-
>
|
|
97
|
-
<slot name="iconLeft">
|
|
98
|
-
<AntIcon
|
|
99
|
-
v-if="icon"
|
|
100
|
-
:icon="icon"
|
|
101
|
-
:color="_active ? 'text-primary-500' : 'text-for-white-bg-font'"
|
|
102
|
-
/>
|
|
103
|
-
</slot>
|
|
104
|
-
|
|
105
|
-
<slot>{{ label }}</slot>
|
|
106
|
-
|
|
107
|
-
<AntIcon
|
|
108
|
-
v-if="iconRight && showIcon"
|
|
109
|
-
:icon="iconRight"
|
|
110
|
-
:color="iconColor"
|
|
111
|
-
/>
|
|
112
|
-
|
|
113
|
-
<div
|
|
114
|
-
v-if="_active"
|
|
115
|
-
:class="borderBoxClasses"
|
|
116
|
-
/>
|
|
117
|
-
</component>
|
|
118
|
-
</template>
|