@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,189 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* This is the custom DropDown for each element (like select / tag-select)
|
|
4
|
-
*
|
|
5
|
-
* TODO:: add screen reader support
|
|
6
|
-
* Fix overflow bug (See Ellipsis Text story)
|
|
7
|
-
* TODO:: if the dropdown is open and the user types something, the element with a matching value should be focused.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
|
11
|
-
import { InputState, Size } from '../../../enums';
|
|
12
|
-
import type { SelectOption } from '../__types';
|
|
13
|
-
import { useVModel } from '@vueuse/core';
|
|
14
|
-
import type { Validator } from '@antify/validate';
|
|
15
|
-
|
|
16
|
-
const emit = defineEmits([ 'update:open', 'update:modelValue', 'update:focused', 'selectElement' ]);
|
|
17
|
-
const props = withDefaults(defineProps<{
|
|
18
|
-
modelValue: string | string[] | number | number[] | null;
|
|
19
|
-
focused: string | number | null;
|
|
20
|
-
open: boolean;
|
|
21
|
-
options: SelectOption[];
|
|
22
|
-
state?: InputState;
|
|
23
|
-
validator?: Validator;
|
|
24
|
-
size?: Size;
|
|
25
|
-
inputRef?: HTMLElement | null;
|
|
26
|
-
closeOnEnter?: boolean;
|
|
27
|
-
autoSelectFirstOnOpen?: boolean;
|
|
28
|
-
}>(), {
|
|
29
|
-
state: InputState.base,
|
|
30
|
-
focusOnOpen: true,
|
|
31
|
-
closeOnEnter: false,
|
|
32
|
-
autoSelectFirstOnOpen: true
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const _modelValue = useVModel(props, 'modelValue', emit);
|
|
36
|
-
const isOpen = useVModel(props, 'open', emit);
|
|
37
|
-
const focusedDropDownItem = useVModel(props, 'focused', emit);
|
|
38
|
-
|
|
39
|
-
const dropdownClasses = computed(() => {
|
|
40
|
-
const variants: Record<InputState, string> = {
|
|
41
|
-
[InputState.base]: 'bg-neutral-300 border-neutral-300',
|
|
42
|
-
[InputState.success]: 'bg-success-500 border-success-500',
|
|
43
|
-
[InputState.info]: 'bg-info-500 border-info-500',
|
|
44
|
-
[InputState.warning]: 'bg-warning-500 border-warning-500',
|
|
45
|
-
[InputState.danger]: 'bg-danger-500 border-danger-500',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
'absolute w-full border flex flex-col gap-px outline-none -mt-px overflow-hidden shadow-md z-40': true,
|
|
50
|
-
'rounded-bl-md rounded-br-md': true,
|
|
51
|
-
[variants[props.state]]: true,
|
|
52
|
-
// Size
|
|
53
|
-
'text-sm': props.size === Size.sm || props.size === Size.md
|
|
54
|
-
};
|
|
55
|
-
});
|
|
56
|
-
const dropDownItemClasses = computed(() => {
|
|
57
|
-
const variants: Record<InputState, string> = {
|
|
58
|
-
[InputState.base]: 'bg-white text-for-white-bg-font',
|
|
59
|
-
[InputState.success]: 'bg-success-100 border-success-100-font',
|
|
60
|
-
[InputState.info]: 'bg-info-100 border-info-100-font',
|
|
61
|
-
[InputState.warning]: 'bg-warning-100 border-warning-100-font',
|
|
62
|
-
[InputState.danger]: 'bg-danger-100 border-danger-100-font',
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
'select-none text-ellipsis overflow-hidden whitespace-nowrap': true,
|
|
67
|
-
[variants[props.state]]: true,
|
|
68
|
-
// Size
|
|
69
|
-
'p-1.5': props.size === Size.sm,
|
|
70
|
-
'p-2': props.size === Size.md,
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
watch(isOpen, () => {
|
|
75
|
-
nextTick(() => {
|
|
76
|
-
if (props.autoSelectFirstOnOpen) {
|
|
77
|
-
focusedDropDownItem.value =
|
|
78
|
-
typeof _modelValue.value === 'string' || typeof _modelValue.value === 'number' ? _modelValue.value :
|
|
79
|
-
Array.isArray(_modelValue.value) ? _modelValue.value[0] :
|
|
80
|
-
props.options[0].value;
|
|
81
|
-
} else {
|
|
82
|
-
focusedDropDownItem.value = null;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
onMounted(() => {
|
|
88
|
-
nextTick(() => {
|
|
89
|
-
props.inputRef?.addEventListener('keydown', onKeyDownDropDown);
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
onUnmounted(() => {
|
|
94
|
-
props.inputRef?.removeEventListener('keydown', onKeyDownDropDown);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
function onKeyDownDropDown(e: KeyboardEvent) {
|
|
98
|
-
if (e.key === 'Enter') {
|
|
99
|
-
if (props.closeOnEnter) {
|
|
100
|
-
isOpen.value = false;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
emit('selectElement', focusedDropDownItem.value);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if (e.key === 'Escape') {
|
|
107
|
-
isOpen.value = false;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {
|
|
111
|
-
isOpen.value = true;
|
|
112
|
-
|
|
113
|
-
const index = props.options.findIndex(option => option.value === focusedDropDownItem.value);
|
|
114
|
-
const option = props.options[index + 1];
|
|
115
|
-
|
|
116
|
-
if (index === -1) {
|
|
117
|
-
focusedDropDownItem.value = props.options[0].value;
|
|
118
|
-
} else if (option !== undefined) {
|
|
119
|
-
focusedDropDownItem.value = option.value;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {
|
|
124
|
-
isOpen.value = true;
|
|
125
|
-
|
|
126
|
-
const index = props.options.findIndex(option => option.value === focusedDropDownItem.value);
|
|
127
|
-
const option = props.options[index - 1];
|
|
128
|
-
|
|
129
|
-
if (option !== undefined) {
|
|
130
|
-
focusedDropDownItem.value = option.value;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (e.key === 'Tab') {
|
|
135
|
-
isOpen.value = false;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function getActiveDropDownItemClasses(option: SelectOption) {
|
|
140
|
-
const variants: Record<InputState, string> = {
|
|
141
|
-
[InputState.base]: 'bg-neutral-50/25',
|
|
142
|
-
[InputState.success]: 'bg-success-100/25',
|
|
143
|
-
[InputState.info]: 'bg-info-100/25',
|
|
144
|
-
[InputState.warning]: 'bg-warning-100/25',
|
|
145
|
-
[InputState.danger]: 'bg-danger-100/25',
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
return option.value === focusedDropDownItem.value ? { [variants[props.state]]: true } : {};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function onClickDropDownItem(e: MouseEvent, value: string | number | null) {
|
|
152
|
-
e.preventDefault();
|
|
153
|
-
props.inputRef?.focus();
|
|
154
|
-
|
|
155
|
-
isOpen.value = false;
|
|
156
|
-
emit('selectElement', value);
|
|
157
|
-
_modelValue.value = value;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
watch(_modelValue, (val) => {
|
|
161
|
-
focusedDropDownItem.value = Array.isArray(val) ? val[0] : val;
|
|
162
|
-
});
|
|
163
|
-
</script>
|
|
164
|
-
|
|
165
|
-
<template>
|
|
166
|
-
<div
|
|
167
|
-
v-if="isOpen"
|
|
168
|
-
:class="dropdownClasses"
|
|
169
|
-
>
|
|
170
|
-
<div
|
|
171
|
-
v-for="(option, index) in options"
|
|
172
|
-
:key="`option-${index}`"
|
|
173
|
-
:class="{...dropDownItemClasses, ...getActiveDropDownItemClasses(option)}"
|
|
174
|
-
@mousedown="(e) => onClickDropDownItem(e, option.value)"
|
|
175
|
-
@mouseover="() => focusedDropDownItem = option.value"
|
|
176
|
-
>
|
|
177
|
-
{{ option.label }}
|
|
178
|
-
</div>
|
|
179
|
-
|
|
180
|
-
<div
|
|
181
|
-
v-if="options.length === 0"
|
|
182
|
-
:class="{...dropDownItemClasses}"
|
|
183
|
-
>
|
|
184
|
-
<slot name="empty">
|
|
185
|
-
No options available
|
|
186
|
-
</slot>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
</template>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted} from 'vue';
|
|
3
|
-
import {Size} from '../../../enums/Size.enum';
|
|
4
|
-
import AntSkeleton from '../../AntSkeleton.vue';
|
|
5
|
-
import {handleEnumValidation} from '../../../handler';
|
|
6
|
-
import {InputState} from '../../../enums';
|
|
7
|
-
|
|
8
|
-
const props = withDefaults(defineProps<{
|
|
9
|
-
state?: InputState,
|
|
10
|
-
size?: Size;
|
|
11
|
-
skeleton?: boolean;
|
|
12
|
-
}>(), {
|
|
13
|
-
skeleton: false,
|
|
14
|
-
size: Size.md,
|
|
15
|
-
state: InputState.base
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const classes = computed(() => {
|
|
19
|
-
const variants: Record<InputState, string> = {
|
|
20
|
-
[InputState.base]: 'text-for-white-bg-font',
|
|
21
|
-
[InputState.danger]: 'text-danger-500',
|
|
22
|
-
[InputState.info]: 'text-info-500',
|
|
23
|
-
[InputState.success]: 'text-success-500',
|
|
24
|
-
[InputState.warning]: 'text-warning-500',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
'relative font-regular inline-block transition-color': true,
|
|
29
|
-
'text-2xs': props.size === Size.xs2,
|
|
30
|
-
'text-xs': props.size === Size.xs,
|
|
31
|
-
'text-sm': props.size === Size.sm,
|
|
32
|
-
'text-md': props.size === Size.md,
|
|
33
|
-
'text-lg': props.size === Size.lg,
|
|
34
|
-
[variants[props.state]]: true
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
onMounted(() => {
|
|
39
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
40
|
-
handleEnumValidation(props.state, InputState, 'state');
|
|
41
|
-
});
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<div
|
|
46
|
-
:class="classes"
|
|
47
|
-
>
|
|
48
|
-
<span :class="{'invisible': skeleton}">
|
|
49
|
-
<slot />
|
|
50
|
-
</span>
|
|
51
|
-
|
|
52
|
-
<AntSkeleton
|
|
53
|
-
v-if="skeleton"
|
|
54
|
-
absolute
|
|
55
|
-
rounded
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted} from 'vue';
|
|
3
|
-
import {Size} from '../../../enums/Size.enum';
|
|
4
|
-
import AntSkeleton from '../../AntSkeleton.vue';
|
|
5
|
-
import {handleEnumValidation} from '../../../handler';
|
|
6
|
-
|
|
7
|
-
defineEmits(['clickContent']);
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(defineProps<{
|
|
10
|
-
label?: string;
|
|
11
|
-
size?: Size;
|
|
12
|
-
skeleton?: boolean;
|
|
13
|
-
}>(), {
|
|
14
|
-
skeleton: false,
|
|
15
|
-
size: Size.md,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
const fontClasses = computed(() => ({
|
|
19
|
-
'relative font-medium w-fit text-for-white-bg-font': true,
|
|
20
|
-
'text-xs': props.size === Size.xs || props.size === Size.xs2,
|
|
21
|
-
'text-sm': props.size === Size.lg || props.size === Size.md || props.size === Size.sm,
|
|
22
|
-
}));
|
|
23
|
-
const gapSize = computed(() => ({
|
|
24
|
-
'gap-2.5': props.size === Size.lg,
|
|
25
|
-
'gap-2': props.size === Size.md,
|
|
26
|
-
'gap-1.5': props.size === Size.sm || props.size === Size.xs,
|
|
27
|
-
'gap-1': props.size === Size.xs2,
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
onMounted(() => {
|
|
31
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
32
|
-
});
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<template>
|
|
36
|
-
<label
|
|
37
|
-
class="flex flex-col w-full"
|
|
38
|
-
:class="gapSize"
|
|
39
|
-
>
|
|
40
|
-
<span
|
|
41
|
-
v-if="label"
|
|
42
|
-
:class="fontClasses"
|
|
43
|
-
>
|
|
44
|
-
<span
|
|
45
|
-
:class="{'invisible': skeleton}"
|
|
46
|
-
@click="$emit('clickContent')"
|
|
47
|
-
>
|
|
48
|
-
<slot name="label">
|
|
49
|
-
{{ label }}
|
|
50
|
-
</slot>
|
|
51
|
-
</span>
|
|
52
|
-
|
|
53
|
-
<AntSkeleton
|
|
54
|
-
v-if="skeleton"
|
|
55
|
-
absolute
|
|
56
|
-
rounded
|
|
57
|
-
/>
|
|
58
|
-
</span>
|
|
59
|
-
|
|
60
|
-
<slot />
|
|
61
|
-
</label>
|
|
62
|
-
</template>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import {computed, onMounted} from 'vue';
|
|
3
|
-
import {Size} from '../../../enums/Size.enum';
|
|
4
|
-
import AntSkeleton from '../../AntSkeleton.vue';
|
|
5
|
-
import {handleEnumValidation} from '../../../handler';
|
|
6
|
-
import {InputState} from '../../../enums';
|
|
7
|
-
|
|
8
|
-
const props = withDefaults(defineProps<{
|
|
9
|
-
value: number;
|
|
10
|
-
maxValue: number;
|
|
11
|
-
state?: InputState;
|
|
12
|
-
size?: Size;
|
|
13
|
-
skeleton?: boolean;
|
|
14
|
-
}>(), {
|
|
15
|
-
skeleton: false,
|
|
16
|
-
size: Size.md,
|
|
17
|
-
state: InputState.base
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const classes = computed(() => {
|
|
21
|
-
const variants: Record<InputState, string> = {
|
|
22
|
-
[InputState.base]: 'text-for-white-bg-font',
|
|
23
|
-
[InputState.danger]: 'text-danger-500',
|
|
24
|
-
[InputState.info]: 'text-info-500',
|
|
25
|
-
[InputState.success]: 'text-success-500',
|
|
26
|
-
[InputState.warning]: 'text-warning-500',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
'relative font-regular inline-block transition-color': true,
|
|
31
|
-
'text-2xs': props.size === Size.xs2,
|
|
32
|
-
'text-xs': props.size === Size.xs,
|
|
33
|
-
'text-sm': props.size === Size.sm,
|
|
34
|
-
'text-md': props.size === Size.md,
|
|
35
|
-
'text-lg': props.size === Size.lg,
|
|
36
|
-
[variants[props.state]]: true,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
onMounted(() => {
|
|
41
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
42
|
-
handleEnumValidation(props.state, InputState, 'state');
|
|
43
|
-
});
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<div :class="classes">
|
|
48
|
-
<span :class="{'invisible': skeleton}">
|
|
49
|
-
{{ value }}/{{ maxValue }}
|
|
50
|
-
</span>
|
|
51
|
-
|
|
52
|
-
<AntSkeleton
|
|
53
|
-
v-if="skeleton"
|
|
54
|
-
absolute
|
|
55
|
-
rounded
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
2
|
-
import AntBaseInput from '../AntBaseInput.vue';
|
|
3
|
-
declare const meta: Meta<typeof AntBaseInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AntBaseInput>;
|
|
6
|
-
export declare const Docs: Story;
|
|
7
|
-
export declare const withValidator: Story;
|
|
8
|
-
export declare const Nullable: Story;
|
|
9
|
-
export declare const IconLeft: Story;
|
|
10
|
-
export declare const IconRight: Story;
|
|
11
|
-
export declare const Summary: Story;
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
2
|
-
import { BaseInputType } from "../__types/AntBaseInput.types.mjs";
|
|
3
|
-
import AntBaseInput from "../AntBaseInput.vue";
|
|
4
|
-
import AntButton from "../../../buttons/AntButton.vue";
|
|
5
|
-
import AntIcon from "../../../AntIcon.vue";
|
|
6
|
-
import { Grouped as _Grouped } from "../../../../enums/Grouped.enum.mjs";
|
|
7
|
-
import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validate";
|
|
8
|
-
import { reactive } from "vue";
|
|
9
|
-
import { faSearch, faEye } from "@fortawesome/free-solid-svg-icons";
|
|
10
|
-
import { InputState } from "../../../../enums/index.mjs";
|
|
11
|
-
import AntFormGroup from "../../../forms/AntFormGroup.vue";
|
|
12
|
-
import AntFormGroupLabel from "../../../forms/AntFormGroupLabel.vue";
|
|
13
|
-
import { Direction } from "../../../../enums/Direction.enum.mjs";
|
|
14
|
-
const meta = {
|
|
15
|
-
computed: {
|
|
16
|
-
Direction() {
|
|
17
|
-
return Direction;
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
components: { AntFormGroup },
|
|
21
|
-
title: "Inputs/Elements/Base Input",
|
|
22
|
-
component: AntBaseInput,
|
|
23
|
-
parameters: { controls: { sort: "requiredFirst" } },
|
|
24
|
-
argTypes: {
|
|
25
|
-
modelValue: {
|
|
26
|
-
control: { type: "text" },
|
|
27
|
-
table: { type: { summary: "string|number|null" } }
|
|
28
|
-
},
|
|
29
|
-
type: {
|
|
30
|
-
control: { type: "select" },
|
|
31
|
-
options: Object.values(BaseInputType),
|
|
32
|
-
table: { defaultValue: { summary: BaseInputType.text } }
|
|
33
|
-
},
|
|
34
|
-
state: {
|
|
35
|
-
control: { type: "select" },
|
|
36
|
-
options: Object.values(InputState)
|
|
37
|
-
},
|
|
38
|
-
size: {
|
|
39
|
-
control: { type: "select" },
|
|
40
|
-
options: Object.values(Size),
|
|
41
|
-
table: { defaultValue: { summary: Size.md } }
|
|
42
|
-
},
|
|
43
|
-
placeholder: {
|
|
44
|
-
control: "text",
|
|
45
|
-
table: { defaultValue: { summary: "this.label" } }
|
|
46
|
-
},
|
|
47
|
-
grouped: {
|
|
48
|
-
control: { type: "select" },
|
|
49
|
-
options: Object.values(_Grouped),
|
|
50
|
-
description: "Where is this fields position in a group",
|
|
51
|
-
table: { defaultValue: { summary: _Grouped.none } }
|
|
52
|
-
},
|
|
53
|
-
wrapperClass: {
|
|
54
|
-
control: "text",
|
|
55
|
-
description: 'Class for the first element because the attribute "class" would affect the input element.',
|
|
56
|
-
table: { type: { summary: "string|object" } }
|
|
57
|
-
},
|
|
58
|
-
showIcon: {
|
|
59
|
-
control: "boolean",
|
|
60
|
-
description: "Some InputStates can have an icon. Control with this property if it gets shown or not."
|
|
61
|
-
},
|
|
62
|
-
iconLeft: {
|
|
63
|
-
control: { type: "none" },
|
|
64
|
-
description: "Will be displayed left to the input text.<br>Use Font-awesome Icons."
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
export default meta;
|
|
69
|
-
export const Docs = {
|
|
70
|
-
render: (args) => ({
|
|
71
|
-
components: { AntBaseInput },
|
|
72
|
-
setup: () => {
|
|
73
|
-
return { args };
|
|
74
|
-
},
|
|
75
|
-
template: `
|
|
76
|
-
<AntBaseInput
|
|
77
|
-
v-model="args.modelValue"
|
|
78
|
-
v-bind="args"
|
|
79
|
-
/>`
|
|
80
|
-
}),
|
|
81
|
-
args: {
|
|
82
|
-
modelValue: null,
|
|
83
|
-
placeholder: "Placeholder"
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
export const withValidator = {
|
|
87
|
-
render: (args) => ({
|
|
88
|
-
components: { AntBaseInput },
|
|
89
|
-
setup: () => {
|
|
90
|
-
const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
|
|
91
|
-
return { args, validator, InputState };
|
|
92
|
-
},
|
|
93
|
-
template: `
|
|
94
|
-
<AntBaseInput
|
|
95
|
-
v-model="args.modelValue"
|
|
96
|
-
v-bind="args"
|
|
97
|
-
:state="args.state ? args.state : (validator.hasErrors() ? InputState.danger : undefined)"
|
|
98
|
-
@validate="(val) => validator.validate(val)"
|
|
99
|
-
/>`
|
|
100
|
-
}),
|
|
101
|
-
args: {
|
|
102
|
-
...Docs.args,
|
|
103
|
-
modelValue: ""
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
export const Nullable = {
|
|
107
|
-
render: Docs.render,
|
|
108
|
-
args: {
|
|
109
|
-
...Docs.args,
|
|
110
|
-
nullable: true
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
export const IconLeft = {
|
|
114
|
-
render: Docs.render,
|
|
115
|
-
args: {
|
|
116
|
-
...Docs.args,
|
|
117
|
-
iconLeft: faSearch
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
export const IconRight = {
|
|
121
|
-
render: (args) => ({
|
|
122
|
-
components: { AntBaseInput, AntIcon },
|
|
123
|
-
setup: () => {
|
|
124
|
-
return { args, faEye };
|
|
125
|
-
},
|
|
126
|
-
template: `
|
|
127
|
-
<AntBaseInput
|
|
128
|
-
v-model="args.modelValue"
|
|
129
|
-
v-bind="args"
|
|
130
|
-
>
|
|
131
|
-
<template #icon-right>
|
|
132
|
-
<AntIcon :icon="faEye"/>
|
|
133
|
-
</template>
|
|
134
|
-
</AntBaseInput>`
|
|
135
|
-
}),
|
|
136
|
-
args: {
|
|
137
|
-
...Docs.args
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
export const Summary = {
|
|
141
|
-
parameters: {
|
|
142
|
-
chromatic: { disableSnapshot: false }
|
|
143
|
-
},
|
|
144
|
-
render: (args) => ({
|
|
145
|
-
components: { AntBaseInput, AntButton, AntFormGroup, AntFormGroupLabel },
|
|
146
|
-
setup: () => {
|
|
147
|
-
return { args, faSearch, Direction, Size };
|
|
148
|
-
},
|
|
149
|
-
template: `
|
|
150
|
-
<AntFormGroup>
|
|
151
|
-
<AntFormGroupLabel>State</AntFormGroupLabel>
|
|
152
|
-
<AntFormGroup :direction="Direction.row">
|
|
153
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="base"/>
|
|
154
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="info"/>
|
|
155
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="success"/>
|
|
156
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="warning"/>
|
|
157
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="danger"/>
|
|
158
|
-
</AntFormGroup>
|
|
159
|
-
|
|
160
|
-
<AntFormGroupLabel>Size</AntFormGroupLabel>
|
|
161
|
-
<AntFormGroup :direction="Direction.row">
|
|
162
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="base" :size="Size.lg"/>
|
|
163
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="info" :size="Size.md"/>
|
|
164
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="success" :size="Size.sm"/>
|
|
165
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="warning" :size="Size.xs"/>
|
|
166
|
-
<AntBaseInput v-bind="args" v-model="modelValue" state="danger" :size="Size.xs2"/>
|
|
167
|
-
</AntFormGroup>
|
|
168
|
-
|
|
169
|
-
<AntFormGroupLabel>Value</AntFormGroupLabel>
|
|
170
|
-
<AntFormGroup :direction="Direction.row">
|
|
171
|
-
<AntBaseInput v-bind="args" value="A value" state="base"/>
|
|
172
|
-
<AntBaseInput v-bind="args" value="A value" state="info"/>
|
|
173
|
-
<AntBaseInput v-bind="args" value="A value" state="success"/>
|
|
174
|
-
<AntBaseInput v-bind="args" value="A value" state="warning"/>
|
|
175
|
-
<AntBaseInput v-bind="args" value="A value" state="danger"/>
|
|
176
|
-
</AntFormGroup>
|
|
177
|
-
|
|
178
|
-
<AntFormGroupLabel>Disabled</AntFormGroupLabel>
|
|
179
|
-
<AntFormGroup :direction="Direction.row">
|
|
180
|
-
<AntBaseInput v-bind="args" value="A value" disabled state="base"/>
|
|
181
|
-
<AntBaseInput v-bind="args" value="A value" disabled state="info"/>
|
|
182
|
-
<AntBaseInput v-bind="args" value="A value" disabled state="success"/>
|
|
183
|
-
<AntBaseInput v-bind="args" value="A value" disabled state="warning"/>
|
|
184
|
-
<AntBaseInput v-bind="args" value="A value" disabled state="danger"/>
|
|
185
|
-
</AntFormGroup>
|
|
186
|
-
|
|
187
|
-
<AntFormGroupLabel>Value & Nullable</AntFormGroupLabel>
|
|
188
|
-
<AntFormGroup :direction="Direction.row">
|
|
189
|
-
<AntBaseInput v-bind="args" value="A value" nullable state="base"/>
|
|
190
|
-
<AntBaseInput v-bind="args" value="A value" nullable state="info"/>
|
|
191
|
-
<AntBaseInput v-bind="args" value="A value" nullable state="success"/>
|
|
192
|
-
<AntBaseInput v-bind="args" value="A value" nullable state="warning"/>
|
|
193
|
-
<AntBaseInput v-bind="args" value="A value" nullable state="danger"/>
|
|
194
|
-
</AntFormGroup>
|
|
195
|
-
|
|
196
|
-
<AntFormGroupLabel>Value & Nullable & Disabled</AntFormGroupLabel>
|
|
197
|
-
<AntFormGroup :direction="Direction.row">
|
|
198
|
-
<AntBaseInput v-bind="args" value="A value" nullable disabled state="base"/>
|
|
199
|
-
<AntBaseInput v-bind="args" value="A value" nullable disabled state="info"/>
|
|
200
|
-
<AntBaseInput v-bind="args" value="A value" nullable disabled state="success"/>
|
|
201
|
-
<AntBaseInput v-bind="args" value="A value" nullable disabled state="warning"/>
|
|
202
|
-
<AntBaseInput v-bind="args" value="A value" nullable disabled state="danger"/>
|
|
203
|
-
</AntFormGroup>
|
|
204
|
-
|
|
205
|
-
<AntFormGroupLabel>Placeholder</AntFormGroupLabel>
|
|
206
|
-
<AntFormGroup :direction="Direction.row">
|
|
207
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :show-icon="false" state="base"/>
|
|
208
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :show-icon="false" state="info"/>
|
|
209
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :show-icon="false" state="success"/>
|
|
210
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :show-icon="false" state="warning"/>
|
|
211
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :show-icon="false" state="danger"/>
|
|
212
|
-
</AntFormGroup>
|
|
213
|
-
|
|
214
|
-
<AntFormGroupLabel>Icon left</AntFormGroupLabel>
|
|
215
|
-
<AntFormGroup :direction="Direction.row">
|
|
216
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :icon-left="faSearch" state="base"/>
|
|
217
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :icon-left="faSearch" state="info"/>
|
|
218
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :icon-left="faSearch" state="success"/>
|
|
219
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :icon-left="faSearch" state="warning"/>
|
|
220
|
-
<AntBaseInput v-bind="args" v-model="modelValue" :icon-left="faSearch" state="danger"/>
|
|
221
|
-
</AntFormGroup>
|
|
222
|
-
|
|
223
|
-
<AntFormGroupLabel>Grouped</AntFormGroupLabel>
|
|
224
|
-
<div class="flex gap-[-2px]">
|
|
225
|
-
<AntBaseInput v-bind="args" v-model="modelValue" grouped="left"/>
|
|
226
|
-
<AntBaseInput v-bind="args" v-model="modelValue" grouped="center" state="danger"/>
|
|
227
|
-
<AntBaseInput v-bind="args" v-model="modelValue" grouped="right" state="info"/>
|
|
228
|
-
</div>
|
|
229
|
-
</AntFormGroup>`
|
|
230
|
-
}),
|
|
231
|
-
args: {
|
|
232
|
-
placeholder: "Placeholder"
|
|
233
|
-
}
|
|
234
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import AntInputDescription from '../AntInputDescription.vue';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
-
declare const meta: Meta<typeof AntInputDescription>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AntInputDescription>;
|
|
6
|
-
export declare const Docs: Story;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import AntInputDescription from "../AntInputDescription.vue";
|
|
2
|
-
import { Size } from "../../../../enums/Size.enum.mjs";
|
|
3
|
-
import { InputState } from "../../../../enums/index.mjs";
|
|
4
|
-
const meta = {
|
|
5
|
-
title: "Inputs/Elements/Ant Input Description",
|
|
6
|
-
component: AntInputDescription,
|
|
7
|
-
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
-
argTypes: {
|
|
9
|
-
size: {
|
|
10
|
-
control: { type: "select" },
|
|
11
|
-
options: Object.values(Size),
|
|
12
|
-
table: { defaultValue: { summary: Size.md } }
|
|
13
|
-
},
|
|
14
|
-
skeleton: {
|
|
15
|
-
control: "boolean",
|
|
16
|
-
table: { defaultValue: { summary: false } }
|
|
17
|
-
},
|
|
18
|
-
state: {
|
|
19
|
-
control: { type: "select" },
|
|
20
|
-
options: Object.values(InputState)
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export default meta;
|
|
25
|
-
export const Docs = {
|
|
26
|
-
render: (args) => ({
|
|
27
|
-
components: { AntInputDescription },
|
|
28
|
-
setup() {
|
|
29
|
-
return { args };
|
|
30
|
-
},
|
|
31
|
-
template: '<div class="p-4"><AntInputDescription v-bind="args">Description</AntInputDescription></div>'
|
|
32
|
-
}),
|
|
33
|
-
args: {}
|
|
34
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import AntInputLabel from '../AntInputLabel.vue';
|
|
2
|
-
import { type Meta, type StoryObj } from '@storybook/vue3';
|
|
3
|
-
declare const meta: Meta<typeof AntInputLabel>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AntInputLabel>;
|
|
6
|
-
export declare const Docs: Story;
|
|
7
|
-
export declare const WithContent: Story;
|