@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,123 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {onMounted, computed} from 'vue';
|
|
3
|
-
import {Size} from '../../enums/Size.enum';
|
|
4
|
-
import AntInputLabel from '../inputs/Elements/AntInputLabel.vue';
|
|
5
|
-
import AntInputDescription from '../inputs/Elements/AntInputDescription.vue';
|
|
6
|
-
import {handleEnumValidation} from '../../handler';
|
|
7
|
-
import AntInputLimiter from '../inputs/Elements/AntInputLimiter.vue';
|
|
8
|
-
import {InputState} from '../../enums';
|
|
9
|
-
|
|
10
|
-
defineEmits(['clickLabel', 'validate']);
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(defineProps<{
|
|
13
|
-
label?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
messages?: string[];
|
|
16
|
-
size?: Size;
|
|
17
|
-
state?: InputState;
|
|
18
|
-
skeleton?: boolean;
|
|
19
|
-
limiterValue?: number;
|
|
20
|
-
limiterMaxValue?: number;
|
|
21
|
-
labelFor?: string;
|
|
22
|
-
expanded?: boolean;
|
|
23
|
-
}>(), {
|
|
24
|
-
state: InputState.base,
|
|
25
|
-
skeleton: false,
|
|
26
|
-
size: Size.md,
|
|
27
|
-
messages: () => [],
|
|
28
|
-
expanded: true
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
onMounted(() => {
|
|
32
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
33
|
-
handleEnumValidation(props.state, InputState, 'state');
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const _state = computed(() => props.messages.length <= 0 ? InputState.base : props.state);
|
|
37
|
-
const fontSize = computed(() => {
|
|
38
|
-
if (props.size === Size.xs2 || props.size === Size.xs) {
|
|
39
|
-
return Size.xs;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return Size.sm;
|
|
43
|
-
});
|
|
44
|
-
const fieldClasses = computed(() => ({
|
|
45
|
-
'w-full': props.expanded,
|
|
46
|
-
'gap-2.5': props.size === Size.lg,
|
|
47
|
-
'gap-2': props.size === Size.md,
|
|
48
|
-
'gap-1.5': (props.size === Size.sm || props.size === Size.xs),
|
|
49
|
-
'gap-1': props.size === Size.xs2,
|
|
50
|
-
}));
|
|
51
|
-
const descriptionClasses = computed(() => ({
|
|
52
|
-
'gap-2.5': props.size === Size.lg,
|
|
53
|
-
'gap-2': props.size === Size.md,
|
|
54
|
-
'gap-1.5': (props.size === Size.sm || props.size === Size.xs),
|
|
55
|
-
'gap-1': props.size === Size.xs2,
|
|
56
|
-
}));
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<template>
|
|
60
|
-
<div
|
|
61
|
-
class="flex flex-col items-start"
|
|
62
|
-
:class="fieldClasses"
|
|
63
|
-
>
|
|
64
|
-
<AntInputLabel
|
|
65
|
-
:label="label"
|
|
66
|
-
:size="size"
|
|
67
|
-
:skeleton="skeleton"
|
|
68
|
-
:for="labelFor"
|
|
69
|
-
@click-content="$emit('clickLabel')"
|
|
70
|
-
>
|
|
71
|
-
<div class="w-full">
|
|
72
|
-
<slot />
|
|
73
|
-
</div>
|
|
74
|
-
</AntInputLabel>
|
|
75
|
-
|
|
76
|
-
<div
|
|
77
|
-
v-if="description || messages.length > 0 || (limiterMaxValue !== undefined && limiterValue !== undefined)"
|
|
78
|
-
class="flex justify-between w-full"
|
|
79
|
-
:class="descriptionClasses"
|
|
80
|
-
>
|
|
81
|
-
<AntInputDescription
|
|
82
|
-
v-if="description || messages.length > 0"
|
|
83
|
-
:size="fontSize"
|
|
84
|
-
:skeleton="skeleton"
|
|
85
|
-
:state="_state"
|
|
86
|
-
>
|
|
87
|
-
<slot name="description">
|
|
88
|
-
<template v-if="_state !== InputState.base && messages.length === 1">
|
|
89
|
-
{{ messages[0] }}
|
|
90
|
-
</template>
|
|
91
|
-
|
|
92
|
-
<template v-else-if="_state !== InputState.base && messages.length > 1">
|
|
93
|
-
<ul class="list-disc list-outside pl-4">
|
|
94
|
-
<li
|
|
95
|
-
v-for="(message, index) of messages"
|
|
96
|
-
:key="`field-message-${index}`"
|
|
97
|
-
class="marker:m-none marker:p-none"
|
|
98
|
-
>
|
|
99
|
-
{{ message }}
|
|
100
|
-
</li>
|
|
101
|
-
</ul>
|
|
102
|
-
</template>
|
|
103
|
-
|
|
104
|
-
<template v-else>
|
|
105
|
-
{{ description }}
|
|
106
|
-
</template>
|
|
107
|
-
</slot>
|
|
108
|
-
</AntInputDescription>
|
|
109
|
-
|
|
110
|
-
<div
|
|
111
|
-
v-if="limiterMaxValue !== undefined && limiterValue !== undefined"
|
|
112
|
-
class="flex flex-grow justify-end"
|
|
113
|
-
>
|
|
114
|
-
<AntInputLimiter
|
|
115
|
-
:value="limiterValue"
|
|
116
|
-
:max-value="limiterMaxValue"
|
|
117
|
-
:size="fontSize"
|
|
118
|
-
:skeleton="skeleton"
|
|
119
|
-
/>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</template>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {Direction} from '../../enums/Direction.enum';
|
|
3
|
-
import {computed, useAttrs} from 'vue';
|
|
4
|
-
|
|
5
|
-
const attrs = useAttrs();
|
|
6
|
-
const props = withDefaults(defineProps<{
|
|
7
|
-
direction?: Direction;
|
|
8
|
-
}>(), {
|
|
9
|
-
direction: Direction.column,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const classes = computed(() => {
|
|
13
|
-
// Let override gap-x-* and gap-y-* classes from outside
|
|
14
|
-
const attrClasses = typeof attrs.class === 'string' ? attrs.class : ''
|
|
15
|
-
const hasGapX = /gap-x-\d/.test(attrClasses);
|
|
16
|
-
const hasGapY = /gap-y-\d/.test(attrClasses);
|
|
17
|
-
|
|
18
|
-
const classes: Record<string, boolean> = {
|
|
19
|
-
'flex-col': props.direction === Direction.column,
|
|
20
|
-
'gap-y-2.5': !hasGapY && props.direction === Direction.column,
|
|
21
|
-
'flex-row': props.direction === Direction.row,
|
|
22
|
-
'gap-x-2.5': !hasGapX && props.direction === Direction.row,
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return classes;
|
|
26
|
-
});
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<section
|
|
31
|
-
class="flex"
|
|
32
|
-
:class="classes"
|
|
33
|
-
>
|
|
34
|
-
<slot />
|
|
35
|
-
</section>
|
|
36
|
-
</template>
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {useVModel} from '@vueuse/core';
|
|
3
|
-
import {AntField} from './Elements';
|
|
4
|
-
import {InputState, Size} from '../../enums';
|
|
5
|
-
import AntSkeleton from '../AntSkeleton.vue';
|
|
6
|
-
import {computed, onMounted, ref, watch} from 'vue';
|
|
7
|
-
import {handleEnumValidation} from '../../handler';
|
|
8
|
-
import {faCheck} from '@fortawesome/free-solid-svg-icons';
|
|
9
|
-
import AntIcon from '../AntIcon.vue';
|
|
10
|
-
import {IconSize} from '../__types';
|
|
11
|
-
|
|
12
|
-
const emit = defineEmits(['update:modelValue', 'update:skeleton', 'validate', 'blur']);
|
|
13
|
-
const props =
|
|
14
|
-
withDefaults(
|
|
15
|
-
defineProps<{
|
|
16
|
-
modelValue: boolean | null;
|
|
17
|
-
label?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
state?: InputState;
|
|
20
|
-
size?: Size,
|
|
21
|
-
skeleton?: boolean;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
readonly?: boolean;
|
|
24
|
-
messages?: string[];
|
|
25
|
-
}>(), {
|
|
26
|
-
state: InputState.base,
|
|
27
|
-
size: Size.md,
|
|
28
|
-
skeleton: false,
|
|
29
|
-
disabled: false,
|
|
30
|
-
readonly: false,
|
|
31
|
-
messages: () => []
|
|
32
|
-
});
|
|
33
|
-
const _modelValue = useVModel(props, 'modelValue', emit);
|
|
34
|
-
const delayedValue = ref(_modelValue.value);
|
|
35
|
-
const hasInputState = computed(() => props.skeleton || props.readonly || props.disabled);
|
|
36
|
-
const inputClasses = computed(() => {
|
|
37
|
-
const focusColorVariant: Record<InputState, string> = {
|
|
38
|
-
[InputState.base]: 'focus:ring-primary-200',
|
|
39
|
-
[InputState.danger]: 'focus:ring-danger-200',
|
|
40
|
-
[InputState.info]: 'focus:ring-info-200',
|
|
41
|
-
[InputState.success]: 'focus:ring-success-200',
|
|
42
|
-
[InputState.warning]: 'focus:ring-warning-200',
|
|
43
|
-
};
|
|
44
|
-
const activeColorVariant: Record<InputState, string> = {
|
|
45
|
-
[InputState.base]: 'text-primary-500',
|
|
46
|
-
[InputState.danger]: 'text-danger-500',
|
|
47
|
-
[InputState.info]: 'text-info-500',
|
|
48
|
-
[InputState.success]: 'text-success-500',
|
|
49
|
-
[InputState.warning]: 'text-warning-500',
|
|
50
|
-
};
|
|
51
|
-
const inactiveColorVariant: Record<InputState, string> = {
|
|
52
|
-
[InputState.base]: 'outline-neutral-300',
|
|
53
|
-
[InputState.danger]: 'outline-danger-500',
|
|
54
|
-
[InputState.info]: 'outline-info-500',
|
|
55
|
-
[InputState.success]: 'outline-success-500',
|
|
56
|
-
[InputState.warning]: 'outline-warning-500',
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
'relative inline-flex flex-shrink-0 bg-neutral-100 border-0': true,
|
|
61
|
-
'outline outline-1 outline-offset-[-1px] rounded': true,
|
|
62
|
-
'focus:ring-offset-0': true,
|
|
63
|
-
'invisible': props.skeleton,
|
|
64
|
-
'cursor-pointer': !hasInputState.value,
|
|
65
|
-
'focus:ring-2': !hasInputState.value && (props.size === Size.sm || props.size === Size.xs || props.size === Size.xs2),
|
|
66
|
-
'focus:ring-4': !hasInputState.value && (props.size === Size.lg || props.size === Size.md),
|
|
67
|
-
'h-5 w-5': props.size === Size.lg || props.size === Size.md || props.size === Size.sm,
|
|
68
|
-
'h-4 w-4': props.size === Size.xs || props.size === Size.xs2,
|
|
69
|
-
'cursor-not-allowed opacity-50': props.disabled,
|
|
70
|
-
[focusColorVariant[props.state]]: !hasInputState.value,
|
|
71
|
-
[activeColorVariant[props.state]]: delayedValue.value,
|
|
72
|
-
[inactiveColorVariant[props.state]]: !_modelValue.value,
|
|
73
|
-
};
|
|
74
|
-
});
|
|
75
|
-
const contentClasses = computed(() => ({
|
|
76
|
-
'text-for-white-bg-font': true,
|
|
77
|
-
'cursor-pointer': !hasInputState.value,
|
|
78
|
-
'cursor-not-allowed opacity-50': props.disabled,
|
|
79
|
-
'text-sm': props.size === Size.lg || props.size === Size.md || props.size === Size.sm,
|
|
80
|
-
'text-xs': props.size === Size.xs || props.size === Size.xs2,
|
|
81
|
-
}));
|
|
82
|
-
const itemSize = computed(() => {
|
|
83
|
-
if (props.size === Size.xs ||props.size === Size.xs2) {
|
|
84
|
-
return IconSize.xs;
|
|
85
|
-
} else {
|
|
86
|
-
return IconSize.sm;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Delay value to change the checkboxes background color after
|
|
92
|
-
* animation is finished.
|
|
93
|
-
*/
|
|
94
|
-
watch(_modelValue, (val) => {
|
|
95
|
-
if (val === false) {
|
|
96
|
-
setTimeout(() => delayedValue.value = false, 120);
|
|
97
|
-
} else {
|
|
98
|
-
delayedValue.value = true;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
watch(_modelValue, (val) => {
|
|
102
|
-
if ([InputState.danger, InputState.warning, InputState.info].includes(props.state)) {
|
|
103
|
-
emit('validate', val);
|
|
104
|
-
}
|
|
105
|
-
}, {deep: true});
|
|
106
|
-
watch(() => props.skeleton, (val) => {
|
|
107
|
-
if (!val && props.modelValue !== null) {
|
|
108
|
-
emit('validate', props.modelValue);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
function onBlur(e: FocusEvent) {
|
|
113
|
-
emit('validate', props.modelValue);
|
|
114
|
-
emit('blur', e);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
onMounted(() => {
|
|
118
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
119
|
-
handleEnumValidation(props.state, InputState, 'state');
|
|
120
|
-
|
|
121
|
-
if (!props.skeleton && props.modelValue !== null) {
|
|
122
|
-
emit('validate', props.modelValue);
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
</script>
|
|
126
|
-
|
|
127
|
-
<template>
|
|
128
|
-
<AntField
|
|
129
|
-
:label="label"
|
|
130
|
-
:description="description"
|
|
131
|
-
:skeleton="skeleton"
|
|
132
|
-
:state="state"
|
|
133
|
-
:size="size"
|
|
134
|
-
:expanded="false"
|
|
135
|
-
:messages="messages"
|
|
136
|
-
>
|
|
137
|
-
<div class="flex items-center gap-1.5">
|
|
138
|
-
<div class="relative full-height flex items-center">
|
|
139
|
-
<input
|
|
140
|
-
v-model="_modelValue"
|
|
141
|
-
:class="inputClasses"
|
|
142
|
-
type="checkbox"
|
|
143
|
-
:aria-checked="_modelValue"
|
|
144
|
-
:disabled="disabled || readonly"
|
|
145
|
-
@blur="onBlur"
|
|
146
|
-
/>
|
|
147
|
-
|
|
148
|
-
<AntIcon
|
|
149
|
-
v-if="_modelValue"
|
|
150
|
-
:icon="faCheck"
|
|
151
|
-
class="absolute !text-white pointer-events-none"
|
|
152
|
-
:size="itemSize"
|
|
153
|
-
/>
|
|
154
|
-
|
|
155
|
-
<AntSkeleton
|
|
156
|
-
v-if="skeleton"
|
|
157
|
-
absolute
|
|
158
|
-
rounded
|
|
159
|
-
/>
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
<div
|
|
163
|
-
class="relative flex items-center"
|
|
164
|
-
:class="props.size === Size.md ? 'h-5' : 'h-4'"
|
|
165
|
-
>
|
|
166
|
-
<span :class="contentClasses">
|
|
167
|
-
<slot />
|
|
168
|
-
</span>
|
|
169
|
-
|
|
170
|
-
<AntSkeleton
|
|
171
|
-
v-if="skeleton"
|
|
172
|
-
absolute
|
|
173
|
-
rounded
|
|
174
|
-
/>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
</AntField>
|
|
178
|
-
</template>
|
|
179
|
-
|
|
180
|
-
<style scoped>
|
|
181
|
-
input[type="checkbox"] {
|
|
182
|
-
-webkit-appearance: none;
|
|
183
|
-
appearance: none;
|
|
184
|
-
position: relative;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
input[type="checkbox"]::before {
|
|
188
|
-
content: "";
|
|
189
|
-
position: absolute;
|
|
190
|
-
width: 100%;
|
|
191
|
-
height: 100%;
|
|
192
|
-
transform: scale(0);
|
|
193
|
-
transition: 120ms transform;
|
|
194
|
-
background: currentColor;
|
|
195
|
-
border-radius: inherit;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
input[type="checkbox"]:checked::before {
|
|
199
|
-
transform: scale(1);
|
|
200
|
-
}
|
|
201
|
-
</style>
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {type AntCheckboxType} from './__types/AntCheckbox.types';
|
|
3
|
-
import {AntField} from './Elements';
|
|
4
|
-
import {useVModel} from '@vueuse/core';
|
|
5
|
-
import AntCheckbox from './AntCheckbox.vue';
|
|
6
|
-
import {computed, onMounted, ref, watch} from 'vue';
|
|
7
|
-
import {Direction} from '../../enums/Direction.enum';
|
|
8
|
-
import {InputState, Size} from '../../enums';
|
|
9
|
-
|
|
10
|
-
const emit = defineEmits(['update:modelValue', 'validate', 'blur']);
|
|
11
|
-
const props = withDefaults(
|
|
12
|
-
defineProps<{
|
|
13
|
-
modelValue: string[] | null;
|
|
14
|
-
checkboxes?: AntCheckboxType[];
|
|
15
|
-
label?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
direction?: Direction;
|
|
18
|
-
state?: InputState;
|
|
19
|
-
size?: Size,
|
|
20
|
-
skeleton?: boolean;
|
|
21
|
-
readonly?: boolean;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
messages?: string[]
|
|
24
|
-
}>(),
|
|
25
|
-
{
|
|
26
|
-
direction: Direction.column,
|
|
27
|
-
state: InputState.base,
|
|
28
|
-
size: Size.md,
|
|
29
|
-
skeleton: false,
|
|
30
|
-
readonly: false,
|
|
31
|
-
disabled: false,
|
|
32
|
-
messages: () => []
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
const _modelValue = useVModel(props, 'modelValue', emit);
|
|
36
|
-
const containerClasses = computed(() => ({
|
|
37
|
-
'flex gap-2.5': true,
|
|
38
|
-
'flex-row': props.direction === Direction.row,
|
|
39
|
-
'flex-col': props.direction === Direction.column
|
|
40
|
-
}));
|
|
41
|
-
const containerRef = ref<null | HTMLElement>(null);
|
|
42
|
-
|
|
43
|
-
watch(_modelValue, (val) => {
|
|
44
|
-
if ([InputState.danger, InputState.warning, InputState.info].includes(props.state)) {
|
|
45
|
-
emit('validate', val);
|
|
46
|
-
}
|
|
47
|
-
}, {deep: true});
|
|
48
|
-
watch(() => props.skeleton, (val) => {
|
|
49
|
-
if (!val && props.modelValue !== null) {
|
|
50
|
-
emit('validate', props.modelValue);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
function updateValue(value: string) {
|
|
55
|
-
if (_modelValue.value === null) {
|
|
56
|
-
return _modelValue.value = [value];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const index = _modelValue.value.indexOf(value);
|
|
60
|
-
|
|
61
|
-
if (index === -1) {
|
|
62
|
-
_modelValue.value.push(value);
|
|
63
|
-
} else {
|
|
64
|
-
_modelValue.value.splice(index, 1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function hasFocusedCheckbox() {
|
|
69
|
-
return !!containerRef.value?.querySelector('input[type="checkbox"]:focus');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function onBlurCheckbox() {
|
|
73
|
-
setTimeout(() => {
|
|
74
|
-
if (!hasFocusedCheckbox()) {
|
|
75
|
-
emit('validate', _modelValue.value);
|
|
76
|
-
}
|
|
77
|
-
}, 100);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
onMounted(() => {
|
|
81
|
-
if (!props.skeleton && props.modelValue !== null) {
|
|
82
|
-
emit('validate', props.modelValue);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
</script>
|
|
86
|
-
|
|
87
|
-
<template>
|
|
88
|
-
<AntField
|
|
89
|
-
:label="label"
|
|
90
|
-
:description="description"
|
|
91
|
-
:skeleton="skeleton"
|
|
92
|
-
:state="state"
|
|
93
|
-
:size="size"
|
|
94
|
-
:messages="messages"
|
|
95
|
-
label-for="noop"
|
|
96
|
-
>
|
|
97
|
-
<div
|
|
98
|
-
ref="containerRef"
|
|
99
|
-
:class="containerClasses"
|
|
100
|
-
>
|
|
101
|
-
<AntCheckbox
|
|
102
|
-
v-for="(checkbox, index) in checkboxes"
|
|
103
|
-
:key="`checkbox-group-${index}`"
|
|
104
|
-
:model-value="_modelValue !== null ? _modelValue?.indexOf(checkbox.value) !== -1 : null"
|
|
105
|
-
:size="size"
|
|
106
|
-
:state="state"
|
|
107
|
-
:skeleton="skeleton"
|
|
108
|
-
:disabled="disabled || checkbox.disabled"
|
|
109
|
-
:readonly="readonly || checkbox.readonly"
|
|
110
|
-
@update:model-value="updateValue(checkbox.value)"
|
|
111
|
-
@blur="() => onBlurCheckbox()"
|
|
112
|
-
>
|
|
113
|
-
{{ checkbox.label }}
|
|
114
|
-
</AntCheckbox>
|
|
115
|
-
</div>
|
|
116
|
-
</AntField>
|
|
117
|
-
</template>
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted, ref} from 'vue';
|
|
3
|
-
import AntField from '../forms/AntField.vue';
|
|
4
|
-
import AntBaseInput from './Elements/AntBaseInput.vue';
|
|
5
|
-
import AntIcon from '../AntIcon.vue';
|
|
6
|
-
import {Size} from '../../enums/Size.enum';
|
|
7
|
-
import {useVModel} from '@vueuse/core';
|
|
8
|
-
import {InputState} from '../../enums';
|
|
9
|
-
import {BaseInputType} from './Elements/__types';
|
|
10
|
-
import {handleEnumValidation} from '../../handler';
|
|
11
|
-
import {AntDateInputTypes} from './__types/AntDateInput.types';
|
|
12
|
-
import {faCalendar, faClock} from '@fortawesome/free-solid-svg-icons';
|
|
13
|
-
import {IconSize} from '../__types/AntIcon.types';
|
|
14
|
-
|
|
15
|
-
defineOptions({inheritAttrs: false});
|
|
16
|
-
|
|
17
|
-
const props = withDefaults(defineProps<{
|
|
18
|
-
modelValue: string | null;
|
|
19
|
-
label?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
size?: Size;
|
|
22
|
-
type?: AntDateInputTypes;
|
|
23
|
-
state?: InputState;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
readonly?: boolean;
|
|
26
|
-
skeleton?: boolean;
|
|
27
|
-
messages?: string[];
|
|
28
|
-
}>(), {
|
|
29
|
-
state: InputState.base,
|
|
30
|
-
type: AntDateInputTypes.date,
|
|
31
|
-
disabled: false,
|
|
32
|
-
readonly: false,
|
|
33
|
-
skeleton: false,
|
|
34
|
-
size: Size.md,
|
|
35
|
-
messages: () => []
|
|
36
|
-
});
|
|
37
|
-
const emit = defineEmits(['update:modelValue', 'validate']);
|
|
38
|
-
const _modelValue = useVModel(props, 'modelValue', emit);
|
|
39
|
-
const inputRef = ref<null | HTMLInputElement>(null);
|
|
40
|
-
const iconColor = computed(() => {
|
|
41
|
-
switch (props.state) {
|
|
42
|
-
case InputState.info:
|
|
43
|
-
return 'text-info-700';
|
|
44
|
-
case InputState.success:
|
|
45
|
-
return 'text-success-700';
|
|
46
|
-
case InputState.warning:
|
|
47
|
-
return 'text-warning-700';
|
|
48
|
-
case InputState.danger:
|
|
49
|
-
return 'text-danger-700';
|
|
50
|
-
default:
|
|
51
|
-
return 'text-for-white-bg-font';
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
const iconSize = computed(() => props.size === Size.xs || props.size === Size.xs2 ? IconSize.xs : IconSize.sm);
|
|
55
|
-
const _icon = computed(() => props.type === AntDateInputTypes.time ? faClock : faCalendar);
|
|
56
|
-
|
|
57
|
-
onMounted(() => {
|
|
58
|
-
handleEnumValidation(props.state, InputState, 'state');
|
|
59
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
function onClickCalendar() {
|
|
63
|
-
if (!props.disabled && !props.readonly) {
|
|
64
|
-
inputRef.value?.showPicker();
|
|
65
|
-
} else {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<template>
|
|
72
|
-
<AntField
|
|
73
|
-
:label="label"
|
|
74
|
-
:size="size"
|
|
75
|
-
:skeleton="skeleton"
|
|
76
|
-
:description="description"
|
|
77
|
-
:state="state"
|
|
78
|
-
:messages="messages"
|
|
79
|
-
>
|
|
80
|
-
<AntBaseInput
|
|
81
|
-
v-model="_modelValue"
|
|
82
|
-
v-model:input-ref="inputRef"
|
|
83
|
-
:type="type as unknown as BaseInputType"
|
|
84
|
-
:state="state"
|
|
85
|
-
:size="size"
|
|
86
|
-
:skeleton="skeleton"
|
|
87
|
-
:disabled="disabled"
|
|
88
|
-
:readonly="readonly"
|
|
89
|
-
:show-icon="false"
|
|
90
|
-
v-bind="$attrs"
|
|
91
|
-
@validate="val => $emit('validate', val)"
|
|
92
|
-
>
|
|
93
|
-
<template #icon-right>
|
|
94
|
-
<AntIcon
|
|
95
|
-
:icon="_icon"
|
|
96
|
-
:color="iconColor"
|
|
97
|
-
:size="iconSize"
|
|
98
|
-
class="cursor-pointer"
|
|
99
|
-
@click="onClickCalendar"
|
|
100
|
-
/>
|
|
101
|
-
</template>
|
|
102
|
-
</AntBaseInput>
|
|
103
|
-
</AntField>
|
|
104
|
-
</template>
|