@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,79 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
/**
|
|
3
|
-
* TODO:: Emit if there's enough space for the dropdown content. If not, reposition it automatically like the
|
|
4
|
-
* browsers select dropdown content does.
|
|
5
|
-
* TODO:: Known issue: open dropdown, click between button and dropdown. Dropdown will not click.
|
|
6
|
-
* The v-on-click-outside does not trigger, because it think it's the dropdown itself.
|
|
7
|
-
* Solution is using margin only (calc(50% + 0.625rem)) and not padding.
|
|
8
|
-
*/
|
|
9
|
-
import {computed, onMounted} from 'vue';
|
|
10
|
-
import {handleEnumValidation} from '../handler';
|
|
11
|
-
import {Position} from '../enums';
|
|
12
|
-
import {classesToObjectSyntax} from '../utils';
|
|
13
|
-
import {vOnClickOutside} from '@vueuse/components';
|
|
14
|
-
import {onKeyStroke} from '@vueuse/core';
|
|
15
|
-
|
|
16
|
-
const props = withDefaults(defineProps<{
|
|
17
|
-
showDropdown: boolean,
|
|
18
|
-
position?: Position,
|
|
19
|
-
dropdownClasses?: string | Record<string, boolean>,
|
|
20
|
-
contentPadding?: boolean
|
|
21
|
-
}>(), {
|
|
22
|
-
showDropdown: false,
|
|
23
|
-
contentPadding: true,
|
|
24
|
-
position: Position.bottom,
|
|
25
|
-
dropdownClasses: '',
|
|
26
|
-
});
|
|
27
|
-
const emit = defineEmits(['update:showDropdown']);
|
|
28
|
-
|
|
29
|
-
const _dropdownClasses = computed(() => ({
|
|
30
|
-
'absolute min-w-[10rem]': true,
|
|
31
|
-
'bottom-0 left-0 mb-[50%] pb-2.5': props.position === Position.top,
|
|
32
|
-
'top-0 left-0 mt-[50%] pt-2.5': props.position === Position.bottom,
|
|
33
|
-
'right-0 top-0 mr-[100%] pr-2.5': props.position === Position.left,
|
|
34
|
-
'left-0 top-0 ml-[100%] pl-2.5': props.position === Position.right,
|
|
35
|
-
...classesToObjectSyntax(props.dropdownClasses)
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
onMounted(() => {
|
|
39
|
-
handleEnumValidation(props.position, Position, 'Position');
|
|
40
|
-
});
|
|
41
|
-
onKeyStroke('Escape', (e: KeyboardEvent) => {
|
|
42
|
-
if (props.showDropdown) {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
emit('update:showDropdown', false);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
function onClickOutside() {
|
|
49
|
-
emit('update:showDropdown', false);
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<template>
|
|
54
|
-
<div
|
|
55
|
-
v-on-click-outside="onClickOutside"
|
|
56
|
-
class="relative inline-flex justify-center items-end z-40"
|
|
57
|
-
data-e2e="dropdown"
|
|
58
|
-
>
|
|
59
|
-
<slot />
|
|
60
|
-
|
|
61
|
-
<Transition name="bounce">
|
|
62
|
-
<div
|
|
63
|
-
v-if="showDropdown"
|
|
64
|
-
:class="_dropdownClasses"
|
|
65
|
-
>
|
|
66
|
-
<div
|
|
67
|
-
class="shadow-lg border border-neutral-300 rounded-md text-sm relative inline-flex flex-col relative bg-white text-for-white-bg-font w-full"
|
|
68
|
-
:class="{'p-2': contentPadding}"
|
|
69
|
-
>
|
|
70
|
-
<slot name="content" />
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</Transition>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
76
|
-
|
|
77
|
-
<style scoped>
|
|
78
|
-
.bounce-enter-active{animation:bounce-in .4s}.bounce-leave-active{animation:bounce-in .4s reverse}@keyframes bounce-in{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.05)}to{opacity:1;transform:scale(1)}}
|
|
79
|
-
</style>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted} from 'vue';
|
|
3
|
-
import {handleEnumValidation} from '../handler';
|
|
4
|
-
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
-
import {IconSize} from './__types/AntIcon.types';
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<{
|
|
8
|
-
icon: IconDefinition;
|
|
9
|
-
size?: IconSize;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A css text-* class
|
|
13
|
-
*/
|
|
14
|
-
color?: string;
|
|
15
|
-
}>(), {
|
|
16
|
-
size: IconSize.sm,
|
|
17
|
-
color: 'text-for-white-bg-font'
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const containerClasses = computed(() => ({
|
|
21
|
-
'inline-flex items-center justify-center': true,
|
|
22
|
-
'w-3 h-3': props.size === IconSize.xs2,
|
|
23
|
-
'w-4 h-4': props.size === IconSize.xs,
|
|
24
|
-
'w-5 h-5': props.size === IconSize.sm,
|
|
25
|
-
'w-6 h-6': props.size === IconSize.md,
|
|
26
|
-
'w-7 h-7': props.size === IconSize.lg,
|
|
27
|
-
'w-9 h-9': props.size === IconSize.xl3,
|
|
28
|
-
[props.color]: true,
|
|
29
|
-
}));
|
|
30
|
-
|
|
31
|
-
const iconClasses = computed(() => ({
|
|
32
|
-
'transition-colors': true,
|
|
33
|
-
'text-2xs': props.size === IconSize.xs2,
|
|
34
|
-
'text-xs': props.size === IconSize.xs,
|
|
35
|
-
'text-sm': props.size === IconSize.sm,
|
|
36
|
-
'text-md': props.size === IconSize.md,
|
|
37
|
-
'text-lg': props.size === IconSize.lg,
|
|
38
|
-
'text-3xl': props.size === IconSize.xl3,
|
|
39
|
-
}));
|
|
40
|
-
|
|
41
|
-
onMounted(() => {
|
|
42
|
-
handleEnumValidation(props.size, IconSize, 'size');
|
|
43
|
-
});
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<span
|
|
48
|
-
v-if="icon"
|
|
49
|
-
:class="containerClasses"
|
|
50
|
-
>
|
|
51
|
-
<FaIcon
|
|
52
|
-
:icon="icon"
|
|
53
|
-
:class="iconClasses"
|
|
54
|
-
/>
|
|
55
|
-
</span>
|
|
56
|
-
</template>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
// TODO:: Fix typo KeyCap with upperchar C
|
|
3
|
-
import AntIcon from './AntIcon.vue';
|
|
4
|
-
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
5
|
-
import {IconSize} from './__types';
|
|
6
|
-
import {AntKeycapSize} from './__types/AntKeycap.types';
|
|
7
|
-
import {computed} from 'vue';
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(defineProps<{
|
|
10
|
-
icon?: IconDefinition
|
|
11
|
-
size: AntKeycapSize
|
|
12
|
-
|
|
13
|
-
}>(),{
|
|
14
|
-
size: AntKeycapSize.sm
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const classes = computed(() => {
|
|
18
|
-
return {
|
|
19
|
-
'text-sm px-px min-w-5': props.size === AntKeycapSize.sm,
|
|
20
|
-
'text-2xs px-px py-0.5 min-w-[18px]': props.size === AntKeycapSize.xs,
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
const iconClasses = computed(() => {
|
|
24
|
-
if(props.size === AntKeycapSize.sm) {
|
|
25
|
-
return IconSize.sm;
|
|
26
|
-
} else {
|
|
27
|
-
return IconSize.xs2;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<span
|
|
34
|
-
class="inline-block bg-neutral-300 rounded-md text-center text-neutral-500-font font-medium"
|
|
35
|
-
:class="classes"
|
|
36
|
-
>
|
|
37
|
-
<AntIcon
|
|
38
|
-
v-if="icon"
|
|
39
|
-
:icon="icon"
|
|
40
|
-
:size="iconClasses"
|
|
41
|
-
/>
|
|
42
|
-
|
|
43
|
-
<slot v-else />
|
|
44
|
-
</span>
|
|
45
|
-
</template>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import AntSkeleton from './AntSkeleton.vue';
|
|
3
|
-
|
|
4
|
-
withDefaults(
|
|
5
|
-
defineProps<{
|
|
6
|
-
skeleton?: boolean
|
|
7
|
-
}>(), {
|
|
8
|
-
skeleton: false
|
|
9
|
-
}
|
|
10
|
-
)
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<template>
|
|
14
|
-
<div class="relative">
|
|
15
|
-
<AntSkeleton v-if="skeleton" absolute rounded/>
|
|
16
|
-
|
|
17
|
-
<div
|
|
18
|
-
class="flex flex-col rounded-md bg-neutral-300 gap-px relative border border-neutral-300 overflow-hidden"
|
|
19
|
-
:class="{'invisible': skeleton}"
|
|
20
|
-
>
|
|
21
|
-
<slot/>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted} from 'vue';
|
|
3
|
-
import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import {ListGroupItemState} from './__types/AntListGroupItem.types';
|
|
5
|
-
import {handleEnumValidation} from '../handler';
|
|
6
|
-
import {type RouteLocationRaw} from 'vue-router';
|
|
7
|
-
import AntIcon from './AntIcon.vue';
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(defineProps<{
|
|
10
|
-
to?: RouteLocationRaw | string;
|
|
11
|
-
state?: ListGroupItemState;
|
|
12
|
-
iconLeft?: IconDefinition;
|
|
13
|
-
iconRight?: IconDefinition;
|
|
14
|
-
}>(), {
|
|
15
|
-
state: ListGroupItemState.base,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const classes = computed(() => {
|
|
19
|
-
const variants: Record<ListGroupItemState, string> = {
|
|
20
|
-
[ListGroupItemState.danger]: 'bg-danger-500 text-danger-500-font hover:bg-danger-700',
|
|
21
|
-
[ListGroupItemState.info]: 'bg-info-500 text-info-500-font hover:bg-info-700',
|
|
22
|
-
[ListGroupItemState.base]: 'bg-white text-for-white-bg-font hover:bg-neutral-200',
|
|
23
|
-
[ListGroupItemState.primary]: 'bg-primary-500 text-primary-500-font hover:bg-primary-700',
|
|
24
|
-
[ListGroupItemState.secondary]: 'bg-secondary-500 text-secondary-500-font hover:bg-secondary-700',
|
|
25
|
-
[ListGroupItemState.success]: 'bg-success-500 text-success-500-font hover:bg-success-700',
|
|
26
|
-
[ListGroupItemState.warning]: 'bg-warning-500 text-warning-500-font hover:bg-warning-700',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
'text-sm transition-colors inline-block w-full': true,
|
|
31
|
-
[variants[props.state]]: true,
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const contentWrapperClasses = computed(() => {
|
|
35
|
-
const variants: Record<ListGroupItemState, string> = {
|
|
36
|
-
[ListGroupItemState.danger]: 'text-danger-500-font',
|
|
37
|
-
[ListGroupItemState.info]: 'text-info-500-font',
|
|
38
|
-
[ListGroupItemState.base]: 'text-for-white-bg-font',
|
|
39
|
-
[ListGroupItemState.primary]: 'text-primary-500-font',
|
|
40
|
-
[ListGroupItemState.secondary]: 'text-secondary-500-font',
|
|
41
|
-
[ListGroupItemState.success]: 'text-success-500-font',
|
|
42
|
-
[ListGroupItemState.warning]: 'text-warning-500-font',
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
'w-full p-2 flex gap-2 items-center justify-between': true,
|
|
47
|
-
'cursor-pointer transition-colors': props.to !== undefined,
|
|
48
|
-
[variants[props.state]]: props.to !== undefined
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
onMounted(() => {
|
|
53
|
-
handleEnumValidation(props.state, ListGroupItemState, 'state');
|
|
54
|
-
});
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<template>
|
|
58
|
-
<component
|
|
59
|
-
:is="to !== undefined ? 'router-link' : 'div'"
|
|
60
|
-
:to="to"
|
|
61
|
-
:class="classes"
|
|
62
|
-
>
|
|
63
|
-
<div :class="contentWrapperClasses">
|
|
64
|
-
<div class="flex items-center gap-2.5">
|
|
65
|
-
<slot
|
|
66
|
-
v-if="iconLeft"
|
|
67
|
-
name="icon-left"
|
|
68
|
-
>
|
|
69
|
-
<AntIcon :icon="iconLeft" />
|
|
70
|
-
</slot>
|
|
71
|
-
|
|
72
|
-
<slot />
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<slot
|
|
76
|
-
v-if="iconRight"
|
|
77
|
-
name="icon-right"
|
|
78
|
-
>
|
|
79
|
-
<AntIcon :icon="iconRight" />
|
|
80
|
-
</slot>
|
|
81
|
-
</div>
|
|
82
|
-
</component>
|
|
83
|
-
</template>
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {ref, useSlots, watch} from 'vue';
|
|
3
|
-
import {faXmark} from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import AntButton from './buttons/AntButton.vue';
|
|
5
|
-
|
|
6
|
-
const emit = defineEmits(['update:open', 'close']);
|
|
7
|
-
const props = withDefaults(defineProps<{
|
|
8
|
-
title: string,
|
|
9
|
-
open: boolean,
|
|
10
|
-
fullscreen?: boolean
|
|
11
|
-
}>(), {
|
|
12
|
-
fullscreen: false
|
|
13
|
-
});
|
|
14
|
-
const openModal = ref(props.open);
|
|
15
|
-
const openBackground = ref(props.open);
|
|
16
|
-
|
|
17
|
-
watch(() => props.open, (val) => {
|
|
18
|
-
function onKeydown(e: KeyboardEvent) {
|
|
19
|
-
if (e.key === 'Escape') {
|
|
20
|
-
emit('update:open', false);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (val) {
|
|
25
|
-
openBackground.value = true;
|
|
26
|
-
setTimeout(() => openModal.value = true, props.fullscreen ? 0 : 100);
|
|
27
|
-
document.addEventListener('keydown', onKeydown);
|
|
28
|
-
} else {
|
|
29
|
-
openModal.value = false;
|
|
30
|
-
setTimeout(() => openBackground.value = false, props.fullscreen ? 0 : 100);
|
|
31
|
-
document.removeEventListener('keydown', onKeydown);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
function closeModal() {
|
|
36
|
-
emit('update:open', false);
|
|
37
|
-
emit('close');
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<template>
|
|
42
|
-
<Transition name="fade">
|
|
43
|
-
<div
|
|
44
|
-
v-if="openBackground"
|
|
45
|
-
class="absolute inset-0 flex items-center justify-center z-50 cursor-pointer overflow-hidden"
|
|
46
|
-
:class="{'bg-black/50 backdrop-blur-sm': !fullscreen}"
|
|
47
|
-
@click.self="closeModal"
|
|
48
|
-
>
|
|
49
|
-
<Transition :name="!fullscreen ? 'bounce' : 'bounce-slow'">
|
|
50
|
-
<div
|
|
51
|
-
v-if="openModal"
|
|
52
|
-
class="flex flex-col gap-px bg-neutral-300 overflow-hidden cursor-auto"
|
|
53
|
-
:class="{'w-full h-full': fullscreen, 'border border-neutral-300 rounded-md shadow-md': !fullscreen}"
|
|
54
|
-
>
|
|
55
|
-
<div
|
|
56
|
-
class="bg-white p-2 flex items-center justify-between text-for-white-bg-font text-lg font-medium"
|
|
57
|
-
>
|
|
58
|
-
<slot name="title">
|
|
59
|
-
{{ title }}
|
|
60
|
-
</slot>
|
|
61
|
-
|
|
62
|
-
<AntButton
|
|
63
|
-
:icon-left="faXmark"
|
|
64
|
-
:outlined="false"
|
|
65
|
-
filled
|
|
66
|
-
@click="closeModal"
|
|
67
|
-
/>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<div class="bg-white p-2 text-for-white-bg-font grow overflow-y-auto">
|
|
71
|
-
<slot />
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div
|
|
75
|
-
v-if="useSlots()['footer'] || false"
|
|
76
|
-
class="bg-white p-2 text-for-white-bg-font"
|
|
77
|
-
>
|
|
78
|
-
<slot name="footer" />
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</Transition>
|
|
82
|
-
</div>
|
|
83
|
-
</Transition>
|
|
84
|
-
</template>
|
|
85
|
-
|
|
86
|
-
<style scoped>
|
|
87
|
-
.fade-leave-active{transition:opacity .5s ease}.fade-enter-active{transition:opacity .3s ease}.fade-enter-from,.fade-leave-to{opacity:0}.bounce-enter-active{animation:bounce-in .4s}.bounce-leave-active{animation:bounce-in .4s reverse}.bounce-slow-enter-active{animation:bounce-in .6s}.bounce-slow-leave-active{animation:bounce-in .4s reverse}@keyframes bounce-in{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.05)}to{opacity:1;transform:scale(1)}}
|
|
88
|
-
</style>
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
/**
|
|
4
|
-
* TODO:: test me in storybook through vue router
|
|
5
|
-
* TODO:: Fix ts errors
|
|
6
|
-
*/
|
|
7
|
-
import {useRouter, useRoute} from 'vue-router';
|
|
8
|
-
import {computed} from 'vue';
|
|
9
|
-
import AntButton from './buttons/AntButton.vue';
|
|
10
|
-
import {faChevronRight, faChevronLeft} from '@fortawesome/free-solid-svg-icons';
|
|
11
|
-
import {Grouped} from '../enums/Grouped.enum';
|
|
12
|
-
import AntSkeleton from './AntSkeleton.vue';
|
|
13
|
-
import {State} from '../enums';
|
|
14
|
-
|
|
15
|
-
const emit = defineEmits(['update:skeleton', 'input']);
|
|
16
|
-
const props = withDefaults(
|
|
17
|
-
defineProps<{
|
|
18
|
-
pages: number,
|
|
19
|
-
pageQuery?: string,
|
|
20
|
-
skeleton?: boolean,
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Light version does not show the very previous and next page button.
|
|
24
|
-
* This makes the pagination smaller in space.
|
|
25
|
-
*/
|
|
26
|
-
lightVersion?: boolean
|
|
27
|
-
}>(),
|
|
28
|
-
{
|
|
29
|
-
pageQuery: 'p',
|
|
30
|
-
skeleton: false,
|
|
31
|
-
lightVersion: false
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
const router = useRouter();
|
|
35
|
-
const route = useRoute();
|
|
36
|
-
const page = computed({
|
|
37
|
-
get() {
|
|
38
|
-
const _page = route.query[props.pageQuery] >= 1 ? Number.parseInt(route.query[props.pageQuery]) : 1;
|
|
39
|
-
|
|
40
|
-
if (_page <= 0 || _page > props.pages) {
|
|
41
|
-
return 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return _page;
|
|
45
|
-
},
|
|
46
|
-
set(val) {
|
|
47
|
-
const query = {...route.query};
|
|
48
|
-
query[props.pageQuery] = val;
|
|
49
|
-
|
|
50
|
-
(async () => {
|
|
51
|
-
await router.push({
|
|
52
|
-
...route,
|
|
53
|
-
query
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
emit('input', val);
|
|
57
|
-
})();
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Build following constellations:
|
|
63
|
-
* [1] 2 3 ... 10
|
|
64
|
-
* 1 [2] 3 4 ... 10
|
|
65
|
-
* 1 2 [3] 4 ... 10
|
|
66
|
-
* 1 ... 3 [4] 5 ... 10
|
|
67
|
-
* 1 ... 4 [5] 6 ... 10
|
|
68
|
-
* 1 ... 7 [8] 9 10
|
|
69
|
-
* 1 ... 8 [9] 10
|
|
70
|
-
* 1 ... 8 9 [10]
|
|
71
|
-
*/
|
|
72
|
-
const defaultPagination = computed(() => {
|
|
73
|
-
const pagination = [];
|
|
74
|
-
|
|
75
|
-
if (page.value > 2 && props.pages > 3) {
|
|
76
|
-
pagination.push(1);
|
|
77
|
-
|
|
78
|
-
if (page.value > 3) {
|
|
79
|
-
pagination.push('...');
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (page.value === 1) {
|
|
84
|
-
pagination.push(1);
|
|
85
|
-
|
|
86
|
-
if (props.pages >= 2) {
|
|
87
|
-
pagination.push(2);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (props.pages >= 3) {
|
|
91
|
-
pagination.push(3);
|
|
92
|
-
}
|
|
93
|
-
} else if (page.value === props.pages) {
|
|
94
|
-
if (props.pages - 2 >= 1) {
|
|
95
|
-
pagination.push(props.pages - 2);
|
|
96
|
-
}
|
|
97
|
-
if (props.pages - 1 >= 1) {
|
|
98
|
-
pagination.push(props.pages - 1);
|
|
99
|
-
}
|
|
100
|
-
pagination.push(props.pages);
|
|
101
|
-
} else {
|
|
102
|
-
pagination.push(page.value - 1);
|
|
103
|
-
pagination.push(page.value);
|
|
104
|
-
pagination.push(page.value + 1);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (page.value < props.pages - 1 && props.pages > 3) {
|
|
108
|
-
if (page.value < props.pages - 2) {
|
|
109
|
-
pagination.push('...');
|
|
110
|
-
}
|
|
111
|
-
pagination.push(props.pages);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return pagination;
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Build following constellations:
|
|
119
|
-
* [1] ... 10
|
|
120
|
-
* 1 [2] ... 10
|
|
121
|
-
* 1 ... [3] ... 10
|
|
122
|
-
* 1 ... [5] ... 10
|
|
123
|
-
* 1 ... [8] ... 10
|
|
124
|
-
* 1 ... [9] 10
|
|
125
|
-
* 1 ... [10]
|
|
126
|
-
*/
|
|
127
|
-
const lightPagination = computed(() => {
|
|
128
|
-
const pagination = [];
|
|
129
|
-
|
|
130
|
-
pagination.push(1);
|
|
131
|
-
|
|
132
|
-
if (page.value > 2) {
|
|
133
|
-
pagination.push('...');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (page.value > 1) {
|
|
137
|
-
pagination.push(page.value);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (page.value < props.pages - 1) {
|
|
141
|
-
pagination.push('...');
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
if (page.value < props.pages) {
|
|
145
|
-
pagination.push(props.pages);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return pagination;
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
const pagination = computed(() => {
|
|
152
|
-
if (props.lightVersion) {
|
|
153
|
-
return lightPagination.value;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return defaultPagination.value;
|
|
157
|
-
});
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<template>
|
|
161
|
-
<div
|
|
162
|
-
class="inline-flex relative"
|
|
163
|
-
data-e2e="pagination"
|
|
164
|
-
>
|
|
165
|
-
<AntSkeleton
|
|
166
|
-
v-if="skeleton"
|
|
167
|
-
rounded
|
|
168
|
-
absolute
|
|
169
|
-
/>
|
|
170
|
-
|
|
171
|
-
<div
|
|
172
|
-
class="inline-flex gap-px"
|
|
173
|
-
:class="{'invisible': skeleton}"
|
|
174
|
-
>
|
|
175
|
-
<AntButton
|
|
176
|
-
:disabled="page === 1"
|
|
177
|
-
:icon-left="faChevronLeft"
|
|
178
|
-
:grouped="Grouped.left"
|
|
179
|
-
:filled="false"
|
|
180
|
-
@click="() => page = page - 1"
|
|
181
|
-
/>
|
|
182
|
-
|
|
183
|
-
<AntButton
|
|
184
|
-
v-for="(pageObj) in pagination"
|
|
185
|
-
:key="`pagination-button-${pageObj}`"
|
|
186
|
-
:state="pageObj === page ? State.primary : State.base"
|
|
187
|
-
:class="{'text-primary-500 z-10': pageObj === page}"
|
|
188
|
-
:disabled="pageObj === '...'"
|
|
189
|
-
:grouped="Grouped.center"
|
|
190
|
-
:filled="false"
|
|
191
|
-
:readonly="pageObj === page"
|
|
192
|
-
@click="() => page = pageObj"
|
|
193
|
-
>
|
|
194
|
-
{{ pageObj }}
|
|
195
|
-
</AntButton>
|
|
196
|
-
|
|
197
|
-
<AntButton
|
|
198
|
-
:icon-left="faChevronRight"
|
|
199
|
-
:grouped="Grouped.right"
|
|
200
|
-
:disabled="page === pages"
|
|
201
|
-
:filled="false"
|
|
202
|
-
@click="() => page = page + 1"
|
|
203
|
-
/>
|
|
204
|
-
</div>
|
|
205
|
-
</div>
|
|
206
|
-
</template>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted} from 'vue';
|
|
3
|
-
import {handleEnumValidation} from '../handler';
|
|
4
|
-
import {Position} from '../enums/Position.enum';
|
|
5
|
-
import {classesToObjectSyntax} from '../utils';
|
|
6
|
-
|
|
7
|
-
const props = withDefaults(defineProps<{
|
|
8
|
-
showPopover: boolean,
|
|
9
|
-
title?: string,
|
|
10
|
-
position?: Position,
|
|
11
|
-
popoverClasses?: string | Record<string, boolean>
|
|
12
|
-
}>(), {
|
|
13
|
-
showPopover: false,
|
|
14
|
-
position: Position.left,
|
|
15
|
-
popoverClasses: ''
|
|
16
|
-
});
|
|
17
|
-
const _popoverClasses = computed(() => ({
|
|
18
|
-
'absolute min-w-[10rem]': true,
|
|
19
|
-
'bottom-0 mb-[50%] pb-3.5': props.position === Position.top,
|
|
20
|
-
'top-0 mt-[50%] pt-3.5': props.position === Position.bottom,
|
|
21
|
-
'right-0 mr-[100%] pr-3.5': props.position === Position.left,
|
|
22
|
-
'left-0 ml-[100%] pl-3.5': props.position === Position.right,
|
|
23
|
-
...classesToObjectSyntax(props.popoverClasses)
|
|
24
|
-
}));
|
|
25
|
-
const classes = computed(() => ({
|
|
26
|
-
'z-10 absolute flex': true,
|
|
27
|
-
'top-0 left-0 right-0 -m-[2.5px] justify-center': props.position === Position.bottom,
|
|
28
|
-
'bottom-0 left-0 right-0 -m-[2.5px] justify-center': props.position === Position.top,
|
|
29
|
-
'top-0 left-0 bottom-0 -ml-[2.5px] items-end pb-1': props.position === Position.right,
|
|
30
|
-
'top-0 right-0 bottom-0 -mr-[2.5px] items-end pb-1': props.position === Position.left,
|
|
31
|
-
}));
|
|
32
|
-
const itemContainerClasses = computed(() => ({
|
|
33
|
-
'relative flex items-center': true,
|
|
34
|
-
'justify-center': props.position === Position.bottom,
|
|
35
|
-
'justify-center rotate-180': props.position === Position.top,
|
|
36
|
-
'justify-start -rotate-90': props.position === Position.right,
|
|
37
|
-
'justify-end rotate-90': props.position === Position.left,
|
|
38
|
-
}));
|
|
39
|
-
|
|
40
|
-
onMounted(() => {
|
|
41
|
-
handleEnumValidation(props.position, Position, 'Position');
|
|
42
|
-
});
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<div class="relative inline-flex justify-center items-end">
|
|
47
|
-
<slot />
|
|
48
|
-
|
|
49
|
-
<Transition name="bounce">
|
|
50
|
-
<template v-if="showPopover">
|
|
51
|
-
<div :class="_popoverClasses">
|
|
52
|
-
<div class="shadow-lg border-neutral-300 rounded-md text-sm relative inline-flex flex-col relative">
|
|
53
|
-
<div
|
|
54
|
-
:class="classes"
|
|
55
|
-
>
|
|
56
|
-
<div
|
|
57
|
-
:class="itemContainerClasses"
|
|
58
|
-
>
|
|
59
|
-
<svg
|
|
60
|
-
class="absolute mt-[.5px]"
|
|
61
|
-
width="35"
|
|
62
|
-
height="8"
|
|
63
|
-
viewBox="0 0 35 8"
|
|
64
|
-
fill="none"
|
|
65
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
-
>
|
|
67
|
-
<path
|
|
68
|
-
d="M20.3284 1.82843L23.1569 4.65685C24.6571 6.15715 26.692 7 28.8137 7L6.18629 7C8.30802 7 10.3429 6.15715 11.8431 4.65686L14.6716 1.82843C16.2337 0.266331 18.7663 0.266328 20.3284 1.82843Z"
|
|
69
|
-
:class="{'fill-neutral-100': position === Position.bottom, 'fill-white': position === Position.top || position === Position.right || position === Position.left}"
|
|
70
|
-
/>
|
|
71
|
-
|
|
72
|
-
<path
|
|
73
|
-
d="M34.5 7L28.8137 7C26.692 7 24.6571 6.15715 23.1569 4.65685L20.3284 1.82843C18.7663 0.266328 16.2337 0.266331 14.6716 1.82843L11.8431 4.65686C10.3429 6.15715 8.30802 7 6.18629 7L0.5 7L34.5 7Z"
|
|
74
|
-
:class="{'stroke-neutral-100': position === Position.bottom, 'stroke-white': position === Position.top || position === Position.right || position === Position.left}"
|
|
75
|
-
/>
|
|
76
|
-
</svg>
|
|
77
|
-
|
|
78
|
-
<svg
|
|
79
|
-
class="absolute"
|
|
80
|
-
width="35"
|
|
81
|
-
height="8"
|
|
82
|
-
viewBox="0 0 35 8"
|
|
83
|
-
fill="none"
|
|
84
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
85
|
-
>
|
|
86
|
-
<path
|
|
87
|
-
d="M34.5 7L28.8137 7C26.692 7 24.6571 6.15715 23.1569 4.65685L20.3284 1.82843C18.7663 0.266328 16.2337 0.266331 14.6716 1.82843L11.8431 4.65686C10.3429 6.15715 8.30802 7 6.18629 7L0.5 7"
|
|
88
|
-
class="stroke-neutral-300"
|
|
89
|
-
/>
|
|
90
|
-
</svg>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<div
|
|
95
|
-
class="border-neutral-300 border-b p-2 bg-neutral-100 rounded-t-md border-t border-l border-r text-neutral-100-font font-semibold"
|
|
96
|
-
>
|
|
97
|
-
{{ title }}
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div
|
|
101
|
-
class="p-2 rounded-b-md text-for-white-bg-font border-neutral-300 border-l border-b border-r bg-white"
|
|
102
|
-
>
|
|
103
|
-
<slot name="content" />
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</template>
|
|
108
|
-
</Transition>
|
|
109
|
-
</div>
|
|
110
|
-
</template>
|
|
111
|
-
|
|
112
|
-
<style scoped>
|
|
113
|
-
.bounce-enter-active{animation:bounce-in .4s}.bounce-leave-active{animation:bounce-in .4s reverse}@keyframes bounce-in{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.05)}to{opacity:1;transform:scale(1)}}
|
|
114
|
-
</style>
|