@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,9 +0,0 @@
|
|
|
1
|
-
import AntTable from '../AntTable.vue';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
-
declare const meta: Meta<typeof AntTable>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AntTable>;
|
|
6
|
-
export declare const Docs: Story;
|
|
7
|
-
export declare const Empty: Story;
|
|
8
|
-
export declare const Skeleton: Story;
|
|
9
|
-
export declare const Loading: Story;
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import AntTable from "../AntTable.vue";
|
|
2
|
-
import { AntTableAlign, AntTableRowTypes, AntTableSize } from "../__types/TableHeader.types.mjs";
|
|
3
|
-
import { ref } from "vue";
|
|
4
|
-
import { faker } from "@faker-js/faker";
|
|
5
|
-
import AntSwitch from "../../inputs/AntSwitch.vue";
|
|
6
|
-
const meta = {
|
|
7
|
-
title: "Components/Table",
|
|
8
|
-
component: AntTable,
|
|
9
|
-
parameters: { controls: { sort: "requiredFirst" } },
|
|
10
|
-
argTypes: {
|
|
11
|
-
headers: {
|
|
12
|
-
description: "List of header definitions. <br>If this value get changed from outside, because the table size should change, the change will take 350 ms to have a more smooth transition.",
|
|
13
|
-
table: {
|
|
14
|
-
type: {
|
|
15
|
-
summary: "TableHeader",
|
|
16
|
-
detail: `
|
|
17
|
-
type TableHeader = {
|
|
18
|
-
identifier: string;
|
|
19
|
-
headerClassList?: string;
|
|
20
|
-
rowClassList?: string;
|
|
21
|
-
title: string;
|
|
22
|
-
type: AntTableRowTypes;
|
|
23
|
-
links?: {
|
|
24
|
-
to: string;
|
|
25
|
-
label: string;
|
|
26
|
-
}[];
|
|
27
|
-
}`
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
data: {
|
|
32
|
-
description: "List of rows to be displayed in the table. The properties of the elements need to be equal to the identifier of a table row for it to be displayed<br>They will be updated as they are beeing moved inside the table."
|
|
33
|
-
},
|
|
34
|
-
selectedRow: {
|
|
35
|
-
description: "Reactive value that contains the selected row."
|
|
36
|
-
},
|
|
37
|
-
rowKey: {
|
|
38
|
-
description: "Prop name of a unique identifier in your data structure."
|
|
39
|
-
},
|
|
40
|
-
loading: {
|
|
41
|
-
description: "If true will display skeleton rows instead of an empty table if there is no data provided, otherwise it will display an overlay."
|
|
42
|
-
},
|
|
43
|
-
size: {
|
|
44
|
-
control: { type: "select" },
|
|
45
|
-
options: Object.values(AntTableSize),
|
|
46
|
-
table: { defaultValue: { summary: AntTableSize.md } }
|
|
47
|
-
},
|
|
48
|
-
// Slots
|
|
49
|
-
afterCellContent: {
|
|
50
|
-
description: "Slot to add custom elements to all cells. Gets {elem, header} as property.",
|
|
51
|
-
table: { type: { summary: "HTML" } }
|
|
52
|
-
},
|
|
53
|
-
beforeCellContent: {
|
|
54
|
-
description: "Slot to add custom elements to all cells. Gets {elem, header} as property.",
|
|
55
|
-
table: { type: { summary: "HTML" } }
|
|
56
|
-
},
|
|
57
|
-
emptyState: {
|
|
58
|
-
description: "Place for custom empty states.",
|
|
59
|
-
table: { type: { summary: "HTML" } }
|
|
60
|
-
},
|
|
61
|
-
headerContent: {
|
|
62
|
-
description: "Overwrite for the default header items. Gets header as property.",
|
|
63
|
-
table: { type: { summary: "HTML" } }
|
|
64
|
-
},
|
|
65
|
-
headerFirstCell: {
|
|
66
|
-
description: "Space to add cells to the header.",
|
|
67
|
-
table: { type: { summary: "HTML" } }
|
|
68
|
-
},
|
|
69
|
-
headerLastCell: {
|
|
70
|
-
description: "Space to add cells to the header.",
|
|
71
|
-
table: { type: { summary: "HTML" } }
|
|
72
|
-
},
|
|
73
|
-
rowFirstCell: {
|
|
74
|
-
description: "Space to add cells to the beginning of a row. Be aware that you have to add headerFirstCells as well otherwise the headers will not match up to your cells."
|
|
75
|
-
},
|
|
76
|
-
rowLastCell: {
|
|
77
|
-
description: "Space to add cells to all rows. Gets the current element as property.",
|
|
78
|
-
table: { type: { summary: "HTML" } }
|
|
79
|
-
},
|
|
80
|
-
cellContent: {
|
|
81
|
-
description: 'Is used if the ROW_TYPE = "SLOT". Gets the current element and the header element to identifier witch cell is currently displayed.',
|
|
82
|
-
table: {
|
|
83
|
-
type: { summary: "HTML" }
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
showLightVersion: {
|
|
87
|
-
description: "Switch between the normal version, which contains all columns, and the light version, which only contains all columns with the property `lightVersion` set to `true`."
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
export default meta;
|
|
92
|
-
const testData = [];
|
|
93
|
-
for (let i = 0; i < 100; i++) {
|
|
94
|
-
const randomName = faker.person.firstName() + " " + faker.person.lastName();
|
|
95
|
-
const randomNumber = faker.number.int({ min: 18, max: 60 });
|
|
96
|
-
const randomEmail = faker.internet.email();
|
|
97
|
-
const randomBoolean = faker.datatype.boolean();
|
|
98
|
-
testData.push({
|
|
99
|
-
name: randomName,
|
|
100
|
-
age: randomNumber,
|
|
101
|
-
email: randomEmail,
|
|
102
|
-
employeed: randomBoolean,
|
|
103
|
-
linkLabel: "Link here",
|
|
104
|
-
link: "/"
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
export const Docs = {
|
|
108
|
-
render: (args) => ({
|
|
109
|
-
components: { AntTable, AntSwitch },
|
|
110
|
-
setup() {
|
|
111
|
-
const selected = ref();
|
|
112
|
-
return { args, selected };
|
|
113
|
-
},
|
|
114
|
-
template: `
|
|
115
|
-
<div class="h-96 border border-dashed border-neutral-300">
|
|
116
|
-
<AntTable v-bind="args" v-model="selected">
|
|
117
|
-
<template #cellContent="{element: entry, header}">
|
|
118
|
-
<div v-if="header.identifier === 'employeed'">
|
|
119
|
-
<AntSwitch :model-value="entry.employeed"/>
|
|
120
|
-
</div>
|
|
121
|
-
</template>
|
|
122
|
-
</AntTable>
|
|
123
|
-
</div>
|
|
124
|
-
`
|
|
125
|
-
}),
|
|
126
|
-
args: {
|
|
127
|
-
headers: [
|
|
128
|
-
{
|
|
129
|
-
title: "Name",
|
|
130
|
-
identifier: "name",
|
|
131
|
-
type: AntTableRowTypes.text,
|
|
132
|
-
sortable: true,
|
|
133
|
-
lightVersion: true
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
title: "Age",
|
|
137
|
-
identifier: "age",
|
|
138
|
-
type: AntTableRowTypes.text,
|
|
139
|
-
align: AntTableAlign.right,
|
|
140
|
-
lightVersion: true
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
title: "E-Mail",
|
|
144
|
-
identifier: "email",
|
|
145
|
-
rowClassList: "",
|
|
146
|
-
type: AntTableRowTypes.text
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
title: "Employeed",
|
|
150
|
-
identifier: "employeed",
|
|
151
|
-
rowClassList: "",
|
|
152
|
-
type: AntTableRowTypes.slot
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
title: "Link",
|
|
156
|
-
identifier: "linkLabel",
|
|
157
|
-
toProp: "link",
|
|
158
|
-
type: AntTableRowTypes.link
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
data: testData
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
export const Empty = {
|
|
165
|
-
render: Docs.render,
|
|
166
|
-
args: {
|
|
167
|
-
headers: [
|
|
168
|
-
{
|
|
169
|
-
title: "Name",
|
|
170
|
-
identifier: "name",
|
|
171
|
-
headerClassList: "font-bold",
|
|
172
|
-
rowClassList: "",
|
|
173
|
-
type: AntTableRowTypes.text,
|
|
174
|
-
align: AntTableAlign.center,
|
|
175
|
-
sortable: true
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
title: "Title",
|
|
179
|
-
identifier: "title",
|
|
180
|
-
headerClassList: "",
|
|
181
|
-
rowClassList: "",
|
|
182
|
-
type: AntTableRowTypes.text
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
title: "E-Mail",
|
|
186
|
-
identifier: "email",
|
|
187
|
-
rowClassList: "",
|
|
188
|
-
type: AntTableRowTypes.text
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
title: "Link",
|
|
192
|
-
identifier: "linkLabel",
|
|
193
|
-
toProp: "link",
|
|
194
|
-
type: AntTableRowTypes.link
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
data: []
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
export const Skeleton = {
|
|
201
|
-
render: Docs.render,
|
|
202
|
-
args: {
|
|
203
|
-
loading: true,
|
|
204
|
-
headers: [
|
|
205
|
-
{
|
|
206
|
-
title: "Name",
|
|
207
|
-
identifier: "name",
|
|
208
|
-
headerClassList: "font-bold",
|
|
209
|
-
rowClassList: "",
|
|
210
|
-
type: AntTableRowTypes.text,
|
|
211
|
-
align: AntTableAlign.center,
|
|
212
|
-
sortable: true
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
title: "Title",
|
|
216
|
-
identifier: "title",
|
|
217
|
-
headerClassList: "",
|
|
218
|
-
rowClassList: "",
|
|
219
|
-
type: AntTableRowTypes.text
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
title: "E-Mail",
|
|
223
|
-
identifier: "email",
|
|
224
|
-
rowClassList: "",
|
|
225
|
-
type: AntTableRowTypes.text
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
title: "Link",
|
|
229
|
-
identifier: "linkLabel",
|
|
230
|
-
toProp: "link",
|
|
231
|
-
type: AntTableRowTypes.link
|
|
232
|
-
}
|
|
233
|
-
],
|
|
234
|
-
data: []
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
export const Loading = {
|
|
238
|
-
render: Docs.render,
|
|
239
|
-
args: {
|
|
240
|
-
loading: true,
|
|
241
|
-
headers: [
|
|
242
|
-
{
|
|
243
|
-
title: "Name",
|
|
244
|
-
identifier: "name",
|
|
245
|
-
headerClassList: "font-bold",
|
|
246
|
-
rowClassList: "",
|
|
247
|
-
type: AntTableRowTypes.text,
|
|
248
|
-
align: AntTableAlign.center,
|
|
249
|
-
sortable: true
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
title: "Title",
|
|
253
|
-
identifier: "title",
|
|
254
|
-
headerClassList: "",
|
|
255
|
-
rowClassList: "",
|
|
256
|
-
type: AntTableRowTypes.text
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
title: "E-Mail",
|
|
260
|
-
identifier: "email",
|
|
261
|
-
rowClassList: "",
|
|
262
|
-
type: AntTableRowTypes.text
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
title: "Link",
|
|
266
|
-
identifier: "linkLabel",
|
|
267
|
-
toProp: "link",
|
|
268
|
-
type: AntTableRowTypes.link
|
|
269
|
-
}
|
|
270
|
-
],
|
|
271
|
-
data: testData
|
|
272
|
-
}
|
|
273
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export declare enum AntTableRowTypes {
|
|
2
|
-
text = "text",
|
|
3
|
-
html = "html",
|
|
4
|
-
link = "link",
|
|
5
|
-
slot = "slot"
|
|
6
|
-
}
|
|
7
|
-
export declare enum AntTableAlign {
|
|
8
|
-
left = "left",
|
|
9
|
-
center = "center",
|
|
10
|
-
right = "right"
|
|
11
|
-
}
|
|
12
|
-
export declare enum AntTableSortDirection {
|
|
13
|
-
asc = "asc",
|
|
14
|
-
desc = "desc",
|
|
15
|
-
neutral = "neutral"
|
|
16
|
-
}
|
|
17
|
-
export type TableHeader = {
|
|
18
|
-
identifier: string;
|
|
19
|
-
title?: string;
|
|
20
|
-
type: AntTableRowTypes;
|
|
21
|
-
sortable?: boolean;
|
|
22
|
-
sort?: (a: unknown, b: unknown, direction: AntTableSortDirection) => number;
|
|
23
|
-
headerClassList?: string;
|
|
24
|
-
rowClassList?: string;
|
|
25
|
-
align?: AntTableAlign;
|
|
26
|
-
toProp?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Emit if the column should be shown on light table version.
|
|
29
|
-
*/
|
|
30
|
-
lightVersion?: boolean;
|
|
31
|
-
};
|
|
32
|
-
export declare enum AntTableSize {
|
|
33
|
-
lg = "lg",
|
|
34
|
-
md = "md",
|
|
35
|
-
sm = "sm"
|
|
36
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export var AntTableRowTypes = /* @__PURE__ */ ((AntTableRowTypes2) => {
|
|
2
|
-
AntTableRowTypes2["text"] = "text";
|
|
3
|
-
AntTableRowTypes2["html"] = "html";
|
|
4
|
-
AntTableRowTypes2["link"] = "link";
|
|
5
|
-
AntTableRowTypes2["slot"] = "slot";
|
|
6
|
-
return AntTableRowTypes2;
|
|
7
|
-
})(AntTableRowTypes || {});
|
|
8
|
-
export var AntTableAlign = /* @__PURE__ */ ((AntTableAlign2) => {
|
|
9
|
-
AntTableAlign2["left"] = "left";
|
|
10
|
-
AntTableAlign2["center"] = "center";
|
|
11
|
-
AntTableAlign2["right"] = "right";
|
|
12
|
-
return AntTableAlign2;
|
|
13
|
-
})(AntTableAlign || {});
|
|
14
|
-
export var AntTableSortDirection = /* @__PURE__ */ ((AntTableSortDirection2) => {
|
|
15
|
-
AntTableSortDirection2["asc"] = "asc";
|
|
16
|
-
AntTableSortDirection2["desc"] = "desc";
|
|
17
|
-
AntTableSortDirection2["neutral"] = "neutral";
|
|
18
|
-
return AntTableSortDirection2;
|
|
19
|
-
})(AntTableSortDirection || {});
|
|
20
|
-
export var AntTableSize = /* @__PURE__ */ ((AntTableSize2) => {
|
|
21
|
-
AntTableSize2["lg"] = "lg";
|
|
22
|
-
AntTableSize2["md"] = "md";
|
|
23
|
-
AntTableSize2["sm"] = "sm";
|
|
24
|
-
return AntTableSize2;
|
|
25
|
-
})(AntTableSize || {});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TableHeader.types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./TableHeader.types.mjs";
|
|
@@ -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>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import AntTabItem from './AntTabItem.vue';
|
|
3
|
-
import {type TabItem} from './__types/AntTabItem.types';
|
|
4
|
-
import {useVModel} from '@vueuse/core';
|
|
5
|
-
import {computed} from 'vue';
|
|
6
|
-
|
|
7
|
-
const emits = defineEmits(['update:modelValue']);
|
|
8
|
-
const props = withDefaults(defineProps<{
|
|
9
|
-
modelValue?: string;
|
|
10
|
-
tabItems?: TabItem[];
|
|
11
|
-
expanded?: boolean;
|
|
12
|
-
}>(), {
|
|
13
|
-
expanded: false,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const currentActive = useVModel(props, 'modelValue', emits);
|
|
17
|
-
const containerClasses = computed(() => ({
|
|
18
|
-
'flex items-stretch bg-neutral-300 gap-px transition-all h-full': true,
|
|
19
|
-
'w-fit': !props.expanded,
|
|
20
|
-
'w-full': props.expanded,
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
|
-
function clickTab(tabItem: TabItem) {
|
|
24
|
-
if (tabItem.clickHandler) {
|
|
25
|
-
tabItem.clickHandler();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
currentActive.value = tabItem.id;
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<div :class="containerClasses">
|
|
34
|
-
<slot>
|
|
35
|
-
<AntTabItem
|
|
36
|
-
v-for="(tabItem, index) in tabItems"
|
|
37
|
-
:key="`tab-item-${index}`"
|
|
38
|
-
v-bind="tabItem"
|
|
39
|
-
@click="clickTab(tabItem)"
|
|
40
|
-
:active="currentActive === tabItem.id"
|
|
41
|
-
:expanded="expanded"
|
|
42
|
-
>
|
|
43
|
-
<slot name="content" v-bind="{item: tabItem, isActive: currentActive === tabItem.id}"></slot>
|
|
44
|
-
</AntTabItem>
|
|
45
|
-
</slot>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import AntTabItem from "../AntTabItem.vue";
|
|
2
|
-
import { TabItemState } from "../__types/AntTabItem.types.mjs";
|
|
3
|
-
const meta = {
|
|
4
|
-
title: "Components/Tab Item",
|
|
5
|
-
component: AntTabItem,
|
|
6
|
-
parameters: { controls: { sort: "requiredFirst" } },
|
|
7
|
-
decorators: [() => ({ template: '<div class="border border-neutral-300 border-dashed"><story /></div>' })],
|
|
8
|
-
argTypes: {
|
|
9
|
-
showIcon: {
|
|
10
|
-
control: "boolean",
|
|
11
|
-
description: "Some InputStates can have an icon. Control with this property if it gets shown or not."
|
|
12
|
-
},
|
|
13
|
-
state: {
|
|
14
|
-
control: { type: "select" },
|
|
15
|
-
options: Object.values(TabItemState)
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export default meta;
|
|
20
|
-
export const Docs = {
|
|
21
|
-
render: (args) => ({
|
|
22
|
-
components: { AntTabItem },
|
|
23
|
-
setup() {
|
|
24
|
-
return { args };
|
|
25
|
-
},
|
|
26
|
-
template: '<AntTabItem v-bind="args"/>'
|
|
27
|
-
}),
|
|
28
|
-
args: {
|
|
29
|
-
label: "First tab",
|
|
30
|
-
active: false
|
|
31
|
-
}
|
|
32
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
-
import AntTabs from '../AntTabs.vue';
|
|
3
|
-
declare const meta: Meta<typeof AntTabs>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AntTabs>;
|
|
6
|
-
export declare const Docs: Story;
|
|
7
|
-
export declare const FixedHeight: Story;
|
|
8
|
-
export declare const DifferentStates: Story;
|
|
9
|
-
export declare const Overview: Story;
|