@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,58 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import AntButton from '../buttons/AntButton.vue';
|
|
3
|
-
import {faAngleLeft} from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import AntSaveAndNewButton from '../buttons/AntSaveAndNewButton.vue';
|
|
5
|
-
import AntSaveButton from '../buttons/AntSaveButton.vue';
|
|
6
|
-
|
|
7
|
-
defineEmits(['back', 'save', 'save-and-new']);
|
|
8
|
-
withDefaults(defineProps<{
|
|
9
|
-
disabled?: boolean
|
|
10
|
-
skeleton?: boolean
|
|
11
|
-
canSave?: boolean
|
|
12
|
-
}>(), {
|
|
13
|
-
disabled: false,
|
|
14
|
-
skeleton: false,
|
|
15
|
-
canSave: true
|
|
16
|
-
});
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<template>
|
|
20
|
-
<div
|
|
21
|
-
class="flex justify-between p-2 gap-2 bg-white"
|
|
22
|
-
data-e2e="crud-detail-actions"
|
|
23
|
-
>
|
|
24
|
-
<div class="flex gap-2.5">
|
|
25
|
-
<slot name="buttons-left">
|
|
26
|
-
<AntButton
|
|
27
|
-
:outlined="false"
|
|
28
|
-
:filled="false"
|
|
29
|
-
:icon-left="faAngleLeft"
|
|
30
|
-
:disabled="disabled"
|
|
31
|
-
@click="$emit('back')"
|
|
32
|
-
>
|
|
33
|
-
Back
|
|
34
|
-
</AntButton>
|
|
35
|
-
</slot>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<div class="flex gap-2.5">
|
|
39
|
-
<slot name="before-buttons-right" />
|
|
40
|
-
<slot name="buttons-right">
|
|
41
|
-
<AntSaveAndNewButton
|
|
42
|
-
:skeleton="skeleton"
|
|
43
|
-
:disabled="disabled"
|
|
44
|
-
:can-save="canSave"
|
|
45
|
-
@click="$emit('save-and-new')"
|
|
46
|
-
/>
|
|
47
|
-
|
|
48
|
-
<AntSaveButton
|
|
49
|
-
:skeleton="skeleton"
|
|
50
|
-
:disabled="disabled"
|
|
51
|
-
:can-save="canSave"
|
|
52
|
-
@click="$emit('save')"
|
|
53
|
-
/>
|
|
54
|
-
</slot>
|
|
55
|
-
<slot name="after-buttons-right" />
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// TODO:: fix why tabs are not full height in story
|
|
3
|
-
import type {TabItem} from '../tabs/__types/AntTabItem.types';
|
|
4
|
-
import AntTabs from '../tabs/AntTabs.vue';
|
|
5
|
-
import AntDeleteButton from '../buttons/AntDeleteButton.vue';
|
|
6
|
-
import AntDeleteDialog from '../dialogs/AntDeleteDialog.vue';
|
|
7
|
-
import {ref} from 'vue';
|
|
8
|
-
import {Position} from '../../enums';
|
|
9
|
-
|
|
10
|
-
defineEmits(['delete']);
|
|
11
|
-
withDefaults(defineProps<{
|
|
12
|
-
tabItems?: TabItem[]
|
|
13
|
-
deleteButtonDisabled?: boolean
|
|
14
|
-
getEntityName: () => string
|
|
15
|
-
canDelete?: boolean
|
|
16
|
-
showDeleteButton?: boolean
|
|
17
|
-
skeleton?: boolean
|
|
18
|
-
}>(), {
|
|
19
|
-
tabItems: () => [],
|
|
20
|
-
deleteButtonDisabled: false,
|
|
21
|
-
canDelete: true,
|
|
22
|
-
showDeleteButton: true,
|
|
23
|
-
skeleton: false
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const dialogOpen = ref(false);
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<div
|
|
31
|
-
class="flex justify-between items-stretch gap-2 bg-white h-[52px]"
|
|
32
|
-
data-e2e="crud-detail-nav"
|
|
33
|
-
>
|
|
34
|
-
<slot name="tabs">
|
|
35
|
-
<AntTabs
|
|
36
|
-
:tab-items="tabItems"
|
|
37
|
-
/>
|
|
38
|
-
</slot>
|
|
39
|
-
|
|
40
|
-
<div class="flex gap-2 pr-2 py-2">
|
|
41
|
-
<slot name="buttons">
|
|
42
|
-
<slot name="before-delete-button" />
|
|
43
|
-
|
|
44
|
-
<AntDeleteButton
|
|
45
|
-
v-if="showDeleteButton"
|
|
46
|
-
:disabled="deleteButtonDisabled || !canDelete"
|
|
47
|
-
:skeleton="skeleton"
|
|
48
|
-
filled
|
|
49
|
-
:can-delete="canDelete"
|
|
50
|
-
:invalid-permission-tooltip-position="Position.left"
|
|
51
|
-
@click="() => dialogOpen = true"
|
|
52
|
-
/>
|
|
53
|
-
|
|
54
|
-
<slot name="after-delete-button" />
|
|
55
|
-
</slot>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<AntDeleteDialog
|
|
59
|
-
v-model:open="dialogOpen"
|
|
60
|
-
:entity="getEntityName()"
|
|
61
|
-
@confirm="$emit('delete')"
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
// TODO:: This component works only with vue-router. Make it work in storybook.
|
|
3
|
-
import AntSearch from '../inputs/AntSearch.vue';
|
|
4
|
-
import AntCreateButton from '../buttons/AntCreateButton.vue';
|
|
5
|
-
import AntDropdown from '../AntDropdown.vue';
|
|
6
|
-
import {computed, ref, watch} from 'vue';
|
|
7
|
-
import AntButton from '../buttons/AntButton.vue';
|
|
8
|
-
import {faFilter, faMultiply} from '@fortawesome/free-solid-svg-icons';
|
|
9
|
-
import {State, Grouped, Position} from '../../enums';
|
|
10
|
-
import {useRoute, useRouter} from 'vue-router';
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(defineProps<{
|
|
13
|
-
fullWidth?: boolean,
|
|
14
|
-
showFilter?: boolean,
|
|
15
|
-
searchQuery?: string,
|
|
16
|
-
hasFilter?: boolean,
|
|
17
|
-
canCreate?: boolean,
|
|
18
|
-
skeleton?: boolean,
|
|
19
|
-
}>(), {
|
|
20
|
-
fullWidth: true,
|
|
21
|
-
showFilter: true,
|
|
22
|
-
searchQuery: 'search',
|
|
23
|
-
hasFilter: false,
|
|
24
|
-
canCreate: true,
|
|
25
|
-
skeleton: false,
|
|
26
|
-
});
|
|
27
|
-
const emit = defineEmits(['search', 'create', 'removeFilter']);
|
|
28
|
-
const router = useRouter();
|
|
29
|
-
const route = useRoute();
|
|
30
|
-
|
|
31
|
-
const showDropdown = ref(false);
|
|
32
|
-
const _fullWidth = ref(props.fullWidth);
|
|
33
|
-
const search = computed({
|
|
34
|
-
get: () => route.query[props.searchQuery] as string || '',
|
|
35
|
-
set: (value) => {
|
|
36
|
-
const query = {
|
|
37
|
-
...route.query,
|
|
38
|
-
[props.searchQuery]: value
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
if (!value) {
|
|
42
|
-
delete query[props.searchQuery];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
(async () => {
|
|
46
|
-
await router.replace({
|
|
47
|
-
...route,
|
|
48
|
-
query
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
emit('search', value);
|
|
52
|
-
})();
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
watch(() => props.fullWidth, (val) => {
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
_fullWidth.value = val;
|
|
59
|
-
}, val ? 250 : 300);
|
|
60
|
-
});
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<template>
|
|
64
|
-
<div
|
|
65
|
-
class="flex h-full items-center p-2 gap-2 bg-white"
|
|
66
|
-
data-e2e="crud-table-filter"
|
|
67
|
-
>
|
|
68
|
-
<div
|
|
69
|
-
class="flex gap-2.5 flex-grow"
|
|
70
|
-
:class="{'flex-grow': !_fullWidth}"
|
|
71
|
-
>
|
|
72
|
-
<div :class="{'w-80': _fullWidth, 'w-full': !_fullWidth}">
|
|
73
|
-
<AntSearch
|
|
74
|
-
v-model="search"
|
|
75
|
-
:skeleton="skeleton"
|
|
76
|
-
/>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<AntDropdown
|
|
80
|
-
v-if="showFilter"
|
|
81
|
-
v-model:show-dropdown="showDropdown"
|
|
82
|
-
:position="Position.left"
|
|
83
|
-
>
|
|
84
|
-
<div class="flex">
|
|
85
|
-
<AntButton
|
|
86
|
-
:state="hasFilter ? State.info : State.base"
|
|
87
|
-
:grouped="hasFilter ? Grouped.left : Grouped.none"
|
|
88
|
-
:skeleton="skeleton"
|
|
89
|
-
:icon-left="faFilter"
|
|
90
|
-
@click="() => showDropdown = !showDropdown"
|
|
91
|
-
/>
|
|
92
|
-
|
|
93
|
-
<AntButton
|
|
94
|
-
v-if="hasFilter"
|
|
95
|
-
:state="State.info"
|
|
96
|
-
:grouped="Grouped.right"
|
|
97
|
-
:skeleton="skeleton"
|
|
98
|
-
:icon-left="faMultiply"
|
|
99
|
-
filled
|
|
100
|
-
@click="$emit('removeFilter')"
|
|
101
|
-
/>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<template #content>
|
|
105
|
-
<slot name="dropdownContent" />
|
|
106
|
-
</template>
|
|
107
|
-
</AntDropdown>
|
|
108
|
-
</div>
|
|
109
|
-
|
|
110
|
-
<div v-if="_fullWidth">
|
|
111
|
-
<slot name="buttons">
|
|
112
|
-
<AntCreateButton
|
|
113
|
-
filled
|
|
114
|
-
:skeleton="skeleton"
|
|
115
|
-
:can-create="canCreate"
|
|
116
|
-
:invalid-permission-tooltip-position="Position.left"
|
|
117
|
-
@click="() => emit('create')"
|
|
118
|
-
/>
|
|
119
|
-
</slot>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</template>
|
|
@@ -1,149 +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 AntPagination from '../AntPagination.vue';
|
|
9
|
-
import {computed, ref, watch} from 'vue';
|
|
10
|
-
import AntSelect from '../inputs/AntSelect.vue';
|
|
11
|
-
import AntSkeleton from '../AntSkeleton.vue';
|
|
12
|
-
import {type SelectOption} from '../inputs/__types';
|
|
13
|
-
|
|
14
|
-
const emit = defineEmits(['changeItemsPerPage', 'changePage']);
|
|
15
|
-
const props = withDefaults(
|
|
16
|
-
defineProps<{
|
|
17
|
-
count: number | null,
|
|
18
|
-
pageQuery?: string,
|
|
19
|
-
itemsPerPageQuery?: string,
|
|
20
|
-
fullWidth?: boolean,
|
|
21
|
-
validItemsPerPage?: number[],
|
|
22
|
-
skeleton?: boolean
|
|
23
|
-
}>(),
|
|
24
|
-
{
|
|
25
|
-
pageQuery: 'p',
|
|
26
|
-
itemsPerPageQuery: 'ipp',
|
|
27
|
-
fullWidth: true,
|
|
28
|
-
validItemsPerPage: () => [20, 50, 100, 200],
|
|
29
|
-
skeleton: false
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const route = useRoute();
|
|
34
|
-
const router = useRouter();
|
|
35
|
-
const itemsPerPageOptions = computed(() =>
|
|
36
|
-
props.validItemsPerPage.map(item => ({
|
|
37
|
-
label: `${item}`,
|
|
38
|
-
value: item
|
|
39
|
-
}) as SelectOption)
|
|
40
|
-
);
|
|
41
|
-
const page = computed(() => {
|
|
42
|
-
const _page = route.query[props.pageQuery] >= 1 ? Number.parseInt(route.query[props.pageQuery]) : 1;
|
|
43
|
-
|
|
44
|
-
if (_page <= 0 || _page > pages.value) {
|
|
45
|
-
return 1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return _page;
|
|
49
|
-
});
|
|
50
|
-
const itemsPerPage = computed({
|
|
51
|
-
get() {
|
|
52
|
-
return route.query[props.itemsPerPageQuery] ?
|
|
53
|
-
Number.parseInt(route.query[props.itemsPerPageQuery]) :
|
|
54
|
-
props.validItemsPerPage[0];
|
|
55
|
-
},
|
|
56
|
-
set(val) {
|
|
57
|
-
const query = {...route.query};
|
|
58
|
-
query[props.itemsPerPageQuery] = `${val}`;
|
|
59
|
-
delete query[props.pageQuery];
|
|
60
|
-
|
|
61
|
-
(async () => {
|
|
62
|
-
await router.push({
|
|
63
|
-
...route,
|
|
64
|
-
query
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
emit('changeItemsPerPage', val);
|
|
68
|
-
})();
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const fromItems = computed(() => (itemsPerPage.value * (page.value - 1)) + 1);
|
|
72
|
-
const toItems = computed(() => {
|
|
73
|
-
const items = itemsPerPage.value * page.value;
|
|
74
|
-
|
|
75
|
-
if (page.value === pages.value && items > props.count) {
|
|
76
|
-
return props.count;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return itemsPerPage.value * page.value;
|
|
80
|
-
});
|
|
81
|
-
const pages = computed(() => Math.ceil(props.count / itemsPerPage.value));
|
|
82
|
-
const _fullWidth = ref(props.fullWidth);
|
|
83
|
-
|
|
84
|
-
watch(() => props.fullWidth, (val) => {
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
_fullWidth.value = val;
|
|
87
|
-
}, val ? 300 : 200);
|
|
88
|
-
});
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<template>
|
|
92
|
-
<div
|
|
93
|
-
class="w-full"
|
|
94
|
-
data-e2e="crud-table-nav"
|
|
95
|
-
>
|
|
96
|
-
<div
|
|
97
|
-
class="flex w-full items-center p-2"
|
|
98
|
-
:class="{'justify-end': !_fullWidth, 'justify-between': _fullWidth}"
|
|
99
|
-
>
|
|
100
|
-
<div
|
|
101
|
-
v-if="_fullWidth"
|
|
102
|
-
class="flex gap-2 items-center text-for-white-bg-font text-sm"
|
|
103
|
-
data-e2e="items-per-page"
|
|
104
|
-
>
|
|
105
|
-
<span class="relative">
|
|
106
|
-
<AntSkeleton
|
|
107
|
-
v-if="skeleton"
|
|
108
|
-
rounded
|
|
109
|
-
absolute
|
|
110
|
-
/>
|
|
111
|
-
Items per page
|
|
112
|
-
</span>
|
|
113
|
-
|
|
114
|
-
<AntSelect
|
|
115
|
-
v-model="itemsPerPage"
|
|
116
|
-
:options="itemsPerPageOptions"
|
|
117
|
-
:skeleton="skeleton"
|
|
118
|
-
:expanded="false"
|
|
119
|
-
/>
|
|
120
|
-
|
|
121
|
-
<div
|
|
122
|
-
v-if="count !== null"
|
|
123
|
-
class="flex gap-1 relative"
|
|
124
|
-
>
|
|
125
|
-
<AntSkeleton
|
|
126
|
-
v-if="skeleton"
|
|
127
|
-
rounded
|
|
128
|
-
absolute
|
|
129
|
-
/>
|
|
130
|
-
|
|
131
|
-
<span class="font-medium">{{ fromItems }} - {{ toItems }}</span>
|
|
132
|
-
<span>of</span>
|
|
133
|
-
<span
|
|
134
|
-
class="font-medium"
|
|
135
|
-
data-e2e="total-items"
|
|
136
|
-
>{{ count }}</span>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
<AntPagination
|
|
141
|
-
:pages="pages"
|
|
142
|
-
:page-query="pageQuery"
|
|
143
|
-
:skeleton="skeleton"
|
|
144
|
-
:light-version="!_fullWidth"
|
|
145
|
-
@input="(val) => emit('changePage', val)"
|
|
146
|
-
/>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</template>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {InputState} from '../../enums';
|
|
3
|
-
import AntDialog from './AntDialog.vue';
|
|
4
|
-
import {useVModel} from '@vueuse/core';
|
|
5
|
-
|
|
6
|
-
const emit = defineEmits(['update:open', 'close', 'confirm']);
|
|
7
|
-
const props = defineProps<{
|
|
8
|
-
open: boolean,
|
|
9
|
-
entity: string
|
|
10
|
-
}>();
|
|
11
|
-
|
|
12
|
-
const _open = useVModel(props, 'open', emit);
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<AntDialog
|
|
17
|
-
v-model:open="_open"
|
|
18
|
-
:state="InputState.danger"
|
|
19
|
-
title="Delete"
|
|
20
|
-
confirm-text="Delete"
|
|
21
|
-
data-e2e="delete-dialog"
|
|
22
|
-
@confirm="() => $emit('confirm')"
|
|
23
|
-
@close="() => $emit('close')"
|
|
24
|
-
>
|
|
25
|
-
<div>
|
|
26
|
-
Do you really want to delete <span class="font-semibold">{{ entity }}</span>?
|
|
27
|
-
</div>
|
|
28
|
-
</AntDialog>
|
|
29
|
-
</template>
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
// TODO:: remove ts ignore
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
import {computed, ref, watch} from 'vue';
|
|
5
|
-
import AntButton from '../buttons/AntButton.vue';
|
|
6
|
-
import AntIcon from '../AntIcon.vue';
|
|
7
|
-
import {
|
|
8
|
-
faCheckCircle,
|
|
9
|
-
faExclamationCircle,
|
|
10
|
-
faExclamationTriangle,
|
|
11
|
-
faInfoCircle,
|
|
12
|
-
type IconDefinition,
|
|
13
|
-
} from '@fortawesome/free-solid-svg-icons';
|
|
14
|
-
import {State, InputState} from '../../enums';
|
|
15
|
-
import {IconSize} from '../__types';
|
|
16
|
-
|
|
17
|
-
const emit = defineEmits(['update:open', 'close', 'confirm']);
|
|
18
|
-
const props = withDefaults(defineProps<{
|
|
19
|
-
title?: string,
|
|
20
|
-
open: boolean,
|
|
21
|
-
confirmText?: string,
|
|
22
|
-
cancelText?: string,
|
|
23
|
-
showCancel?: boolean,
|
|
24
|
-
state?: InputState
|
|
25
|
-
}>(), {
|
|
26
|
-
state: InputState.base,
|
|
27
|
-
confirmText: 'Confirm',
|
|
28
|
-
cancelText: 'Cancel',
|
|
29
|
-
showCancel: true,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const openDialog = ref(props.open);
|
|
33
|
-
const openBackground = ref(props.open);
|
|
34
|
-
const icons = {
|
|
35
|
-
[InputState.base]: null,
|
|
36
|
-
[InputState.info]: faInfoCircle,
|
|
37
|
-
[InputState.danger]: faExclamationCircle,
|
|
38
|
-
[InputState.warning]: faExclamationTriangle,
|
|
39
|
-
[InputState.success]: faCheckCircle,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const iconColor = computed(() => {
|
|
43
|
-
const variants = {
|
|
44
|
-
[InputState.base]: 'text-neutral-100-font',
|
|
45
|
-
[InputState.danger]: 'text-danger-500',
|
|
46
|
-
[InputState.info]: 'text-info-500',
|
|
47
|
-
[InputState.success]: 'text-success-500',
|
|
48
|
-
[InputState.warning]: 'text-warning-500',
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return variants[props.state];
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
watch(() => props.open, (val) => {
|
|
55
|
-
function onKeydown(e: KeyboardEvent) {
|
|
56
|
-
if (e.key === 'Escape') {
|
|
57
|
-
emit('update:open', false);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (val) {
|
|
62
|
-
openBackground.value = true;
|
|
63
|
-
setTimeout(() => openDialog.value = true, 100);
|
|
64
|
-
document.addEventListener('keydown', onKeydown);
|
|
65
|
-
} else {
|
|
66
|
-
openDialog.value = false;
|
|
67
|
-
setTimeout(() => openBackground.value = false, 100);
|
|
68
|
-
document.removeEventListener('keydown', onKeydown);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
function closeDialog() {
|
|
73
|
-
emit('update:open', false);
|
|
74
|
-
emit('close');
|
|
75
|
-
}
|
|
76
|
-
function confirmDialog() {
|
|
77
|
-
emit('update:open', false);
|
|
78
|
-
emit('confirm');
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<template>
|
|
83
|
-
<Transition name="fade">
|
|
84
|
-
<div
|
|
85
|
-
v-if="openBackground"
|
|
86
|
-
class="absolute inset-0 flex items-center justify-center z-50 cursor-pointer overflow-hidden bg-black/50 backdrop-blur-sm"
|
|
87
|
-
data-e2e="dialog"
|
|
88
|
-
@click.self="closeDialog"
|
|
89
|
-
>
|
|
90
|
-
<Transition :name="'bounce'">
|
|
91
|
-
<div
|
|
92
|
-
v-if="openDialog"
|
|
93
|
-
class="flex flex-col gap-px bg-neutral-300 overflow-hidden cursor-auto w-96 border border-neutral-300 rounded-md shadow-md"
|
|
94
|
-
>
|
|
95
|
-
<div
|
|
96
|
-
v-if="title || $slots['title']"
|
|
97
|
-
class="bg-neutral-100 p-2 flex items-center justify-between text-neutral-100-font text-sm font-semibold"
|
|
98
|
-
>
|
|
99
|
-
<slot name="title">
|
|
100
|
-
{{ title }}
|
|
101
|
-
</slot>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<div class="bg-white p-2 grow flex items-start gap-2 text-sm text-for-white-bg-font">
|
|
105
|
-
<slot name="icon">
|
|
106
|
-
<AntIcon
|
|
107
|
-
v-if="icons[state]"
|
|
108
|
-
:size="IconSize.xl3"
|
|
109
|
-
:icon="icons[state] as unknown as IconDefinition"
|
|
110
|
-
:color="iconColor"
|
|
111
|
-
class="px-2.5 w-8 h-8"
|
|
112
|
-
/>
|
|
113
|
-
</slot>
|
|
114
|
-
|
|
115
|
-
<slot />
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
<div
|
|
119
|
-
class="bg-neutral-100 p-2 gap-2 text-for-white-bg-font flex w-full justify-end"
|
|
120
|
-
>
|
|
121
|
-
<slot name="footer">
|
|
122
|
-
<AntButton
|
|
123
|
-
v-if="showCancel"
|
|
124
|
-
:state="State.base"
|
|
125
|
-
@click="closeDialog()"
|
|
126
|
-
>
|
|
127
|
-
{{ cancelText }}
|
|
128
|
-
</AntButton>
|
|
129
|
-
|
|
130
|
-
<AntButton
|
|
131
|
-
:state="state === State.base ? State.primary : state as unknown as State"
|
|
132
|
-
filled
|
|
133
|
-
@click="confirmDialog()"
|
|
134
|
-
>
|
|
135
|
-
{{ confirmText }}
|
|
136
|
-
</AntButton>
|
|
137
|
-
</slot>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</Transition>
|
|
141
|
-
</div>
|
|
142
|
-
</Transition>
|
|
143
|
-
</template>
|
|
144
|
-
|
|
145
|
-
<style scoped>
|
|
146
|
-
.fade-leave-active {
|
|
147
|
-
transition: opacity .5s ease;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.fade-enter-active {
|
|
151
|
-
transition: opacity 0.3s ease;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.fade-enter-from,
|
|
155
|
-
.fade-leave-to {
|
|
156
|
-
opacity: 0;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.bounce-enter-active {
|
|
160
|
-
animation: bounce-in .4s;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.bounce-leave-active {
|
|
164
|
-
animation: bounce-in .4s reverse;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@keyframes bounce-in {
|
|
168
|
-
0% {
|
|
169
|
-
transform: scale(0);
|
|
170
|
-
opacity: 0;
|
|
171
|
-
}
|
|
172
|
-
50% {
|
|
173
|
-
transform: scale(1.05);
|
|
174
|
-
opacity: 1;
|
|
175
|
-
}
|
|
176
|
-
100% {
|
|
177
|
-
transform: scale(1);
|
|
178
|
-
opacity: 1;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
</style>
|