@antify/ui-module 1.6.0 → 1.7.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/dist/module.d.mts +182 -51
- package/dist/module.d.ts +182 -51
- package/dist/module.json +1 -1
- package/dist/module.mjs +152 -49
- package/dist/runtime/components/AntAccordion.vue +10 -5
- package/dist/runtime/components/AntAccordionItem.vue +19 -7
- package/dist/runtime/components/AntAlert.vue +27 -27
- package/dist/runtime/components/AntCard.vue +34 -0
- package/dist/runtime/components/AntDropdown.vue +2 -2
- package/dist/runtime/components/AntIcon.vue +21 -16
- package/dist/runtime/components/AntKeycap.vue +26 -5
- package/dist/runtime/components/AntListGroupItem.vue +24 -28
- package/dist/runtime/components/AntModal.vue +5 -5
- package/dist/runtime/components/AntPagination.vue +45 -45
- package/dist/runtime/components/AntPopover.vue +3 -3
- package/dist/runtime/components/AntSpinner.vue +56 -50
- package/dist/runtime/components/AntTag.vue +75 -40
- package/dist/runtime/components/AntToast.vue +40 -31
- package/dist/runtime/components/AntToaster.vue +14 -9
- package/dist/runtime/components/AntTooltip.vue +75 -69
- package/dist/runtime/components/__stories/AntAccordion.stories.mjs +3 -2
- package/dist/runtime/components/__stories/AntAlert.stories.mjs +3 -3
- package/dist/runtime/components/__stories/AntCard.stories.d.ts +7 -0
- package/dist/runtime/components/__stories/AntCard.stories.mjs +87 -0
- package/dist/runtime/components/__stories/AntIcon.stories.mjs +7 -4
- package/dist/runtime/components/__stories/AntKeycap.stories.mjs +8 -1
- package/dist/runtime/components/__stories/AntListGroupItem.stories.mjs +3 -3
- package/dist/runtime/components/__stories/AntModal.stories.mjs +2 -2
- package/dist/runtime/components/__stories/AntSpinner.stories.mjs +7 -7
- package/dist/runtime/components/__stories/AntTag.stories.mjs +5 -6
- package/dist/runtime/components/__stories/AntToast.stories.mjs +3 -3
- package/dist/runtime/components/__stories/AntToaster.stories.d.ts +2 -2
- package/dist/runtime/components/__stories/AntToaster.stories.mjs +4 -4
- package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +5 -0
- package/dist/runtime/components/__stories/AntTooltip.stories.mjs +35 -11
- package/dist/runtime/components/__types/AntIcon.types.d.ts +5 -3
- package/dist/runtime/components/__types/AntIcon.types.mjs +5 -3
- package/dist/runtime/components/__types/AntKeycap.types.d.ts +4 -0
- package/dist/runtime/components/__types/AntKeycap.types.mjs +5 -0
- package/dist/runtime/components/__types/AntListGroupItem.types.d.ts +9 -0
- package/dist/runtime/components/__types/AntListGroupItem.types.mjs +10 -0
- package/dist/runtime/components/__types/AntSpinner.types.d.ts +10 -0
- package/dist/runtime/components/__types/AntSpinner.types.mjs +11 -0
- package/dist/runtime/components/__types/AntTag.types.d.ts +17 -0
- package/dist/runtime/components/__types/AntTag.types.mjs +19 -0
- package/dist/runtime/components/__types/AntToaster.types.d.ts +2 -2
- package/dist/runtime/components/__types/index.d.ts +6 -1
- package/dist/runtime/components/__types/index.mjs +6 -1
- package/dist/runtime/components/buttons/AntActionButton.vue +26 -23
- package/dist/runtime/components/buttons/AntButton.vue +85 -75
- package/dist/runtime/components/buttons/AntCreateButton.vue +2 -2
- package/dist/runtime/components/buttons/AntDeleteButton.vue +2 -2
- package/dist/runtime/components/buttons/AntDuplicateButton.vue +2 -2
- package/dist/runtime/components/buttons/AntEditButton.vue +2 -2
- package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +14 -13
- package/dist/runtime/components/buttons/AntSaveButton.vue +13 -12
- package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +15 -11
- package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +39 -36
- package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +1 -1
- package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +1 -1
- package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +1 -1
- package/dist/runtime/components/buttons/__stories/AntEditButton.stories.mjs +1 -1
- package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +1 -1
- package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +1 -1
- package/dist/runtime/components/buttons/__types/index.d.ts +1 -1
- package/dist/runtime/components/buttons/__types/index.mjs +1 -1
- package/dist/runtime/components/crud/AntCrudDetailActions.vue +2 -2
- package/dist/runtime/components/crud/AntCrudDetailNav.vue +10 -3
- package/dist/runtime/components/crud/AntCrudTableFilter.vue +14 -14
- package/dist/runtime/components/crud/AntCrudTableNav.vue +27 -27
- package/dist/runtime/components/crud/__stories/AntCrud.stories.mjs +1 -1
- package/dist/runtime/components/dialogs/AntDeleteDialog.vue +3 -3
- package/dist/runtime/components/dialogs/AntDialog.vue +23 -23
- package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.mjs +3 -1
- package/dist/runtime/components/dialogs/__stories/AntDialog.stories.mjs +4 -4
- package/dist/runtime/components/forms/AntField.vue +123 -0
- package/dist/runtime/components/forms/AntFormGroupLabel.vue +5 -0
- package/dist/runtime/components/{form/Elements → forms}/__stories/AntField.stories.mjs +15 -15
- package/dist/runtime/components/{form → forms}/__stories/AntFormGroup.stories.mjs +3 -3
- package/dist/runtime/components/{form → forms}/__stories/AntFormGroupLabel.stories.mjs +1 -1
- package/dist/runtime/components/index.d.ts +46 -6
- package/dist/runtime/components/index.mjs +90 -7
- package/dist/runtime/components/inputs/AntCheckbox.vue +183 -0
- package/dist/runtime/components/inputs/AntCheckboxGroup.vue +117 -0
- package/dist/runtime/components/inputs/AntDateInput.vue +97 -0
- package/{src/runtime/components/form → dist/runtime/components/inputs}/AntNumberInput.vue +28 -50
- package/dist/runtime/components/inputs/AntPasswordInput.vue +107 -0
- package/dist/runtime/components/inputs/AntRadio.vue +192 -0
- package/dist/runtime/components/inputs/AntRadioGroup.vue +116 -0
- package/dist/runtime/components/inputs/AntRangeSlider.vue +101 -0
- package/{src/runtime/components/form → dist/runtime/components/inputs}/AntSearch.vue +17 -21
- package/dist/runtime/components/{form → inputs}/AntSelect.vue +68 -60
- package/dist/runtime/components/inputs/AntSwitch.vue +192 -0
- package/dist/runtime/components/inputs/AntSwitcher.vue +196 -0
- package/{src/runtime/components/form → dist/runtime/components/inputs}/AntTagInput.vue +94 -69
- package/dist/runtime/components/inputs/AntTextInput.vue +72 -0
- package/dist/runtime/components/{form → inputs}/AntTextarea.vue +53 -41
- package/dist/runtime/components/{form → inputs}/AntUnitInput.vue +17 -23
- package/dist/runtime/components/inputs/Elements/AntBaseInput.vue +256 -0
- package/dist/runtime/components/{form → inputs}/Elements/AntDropDown.vue +29 -30
- package/dist/runtime/components/{form → inputs}/Elements/AntInputDescription.vue +17 -14
- package/dist/runtime/components/inputs/Elements/AntInputLabel.vue +65 -0
- package/dist/runtime/components/inputs/Elements/AntInputLimiter.vue +58 -0
- package/dist/runtime/components/{form → inputs}/Elements/__stories/AntBaseInput.stories.d.ts +2 -0
- package/dist/runtime/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +234 -0
- package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputDescription.stories.mjs +5 -5
- package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLabel.stories.mjs +3 -3
- package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLimiter.stories.mjs +5 -5
- package/dist/runtime/components/inputs/Elements/__types/index.d.ts +1 -0
- package/dist/runtime/components/inputs/Elements/__types/index.mjs +1 -0
- package/dist/runtime/components/{form → inputs}/Elements/index.d.ts +1 -1
- package/dist/runtime/components/{form → inputs}/Elements/index.mjs +1 -1
- package/dist/runtime/components/inputs/__stories/AntCheckbox.stories.mjs +341 -0
- package/dist/runtime/components/{form/AntCheckboxWidget → inputs}/__stories/AntCheckboxGroup.stories.mjs +23 -34
- package/dist/runtime/components/inputs/__stories/AntDateInput.stories.d.ts +8 -0
- package/dist/runtime/components/inputs/__stories/AntDateInput.stories.mjs +193 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntNumberInput.stories.d.ts +2 -1
- package/dist/runtime/components/inputs/__stories/AntNumberInput.stories.mjs +106 -0
- package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.d.ts +8 -0
- package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.mjs +156 -0
- package/dist/runtime/components/{form/AntRadioWidget → inputs}/__stories/AntRadioGroup.stories.d.ts +1 -1
- package/dist/runtime/components/inputs/__stories/AntRadioGroup.stories.mjs +243 -0
- package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.d.ts +7 -0
- package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.mjs +67 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntSearch.stories.d.ts +1 -0
- package/dist/runtime/components/inputs/__stories/AntSearch.stories.mjs +103 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntSelect.stories.mjs +78 -46
- package/dist/runtime/components/{form → inputs}/__stories/AntSwitch.stories.d.ts +1 -1
- package/dist/runtime/components/inputs/__stories/AntSwitch.stories.mjs +344 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntSwitcher.stories.d.ts +1 -1
- package/dist/runtime/components/inputs/__stories/AntSwitcher.stories.mjs +235 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntTagInput.stories.d.ts +3 -3
- package/dist/runtime/components/inputs/__stories/AntTagInput.stories.mjs +228 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntTextInput.stories.d.ts +2 -0
- package/dist/runtime/components/inputs/__stories/AntTextInput.stories.mjs +225 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntTextarea.stories.d.ts +1 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntTextarea.stories.mjs +44 -31
- package/dist/runtime/components/{form → inputs}/__stories/AntUnitInput.stories.d.ts +1 -0
- package/dist/runtime/components/{form → inputs}/__stories/AntUnitInput.stories.mjs +49 -17
- package/dist/runtime/components/{form/AntCheckboxWidget/__types/AntCheckbox.d.ts → inputs/__types/AntCheckbox.types.d.ts} +4 -0
- package/dist/runtime/components/inputs/__types/AntCheckbox.types.mjs +5 -0
- package/dist/runtime/components/inputs/__types/AntDateInput.types.d.ts +7 -0
- package/dist/runtime/components/inputs/__types/AntDateInput.types.mjs +8 -0
- package/dist/runtime/components/inputs/__types/AntRadio.types.d.ts +13 -0
- package/dist/runtime/components/inputs/__types/AntRadio.types.mjs +5 -0
- package/dist/runtime/components/inputs/__types/AntTagInput.types.d.ts +5 -0
- package/dist/runtime/components/inputs/__types/AntTagInput.types.mjs +6 -0
- package/dist/runtime/components/{form/__types/AntTextInput.type.d.ts → inputs/__types/AntTextInput.types.d.ts} +0 -1
- package/dist/runtime/components/{form/__types/AntTextInput.type.mjs → inputs/__types/AntTextInput.types.mjs} +0 -1
- package/dist/runtime/components/inputs/__types/index.d.ts +7 -0
- package/dist/runtime/components/inputs/__types/index.mjs +7 -0
- package/dist/runtime/components/layouts/AntNavLeftLayout.vue +3 -3
- package/dist/runtime/components/navbar/AntNavbar.vue +10 -10
- package/dist/runtime/components/navbar/AntNavbarItem.vue +5 -5
- package/dist/runtime/components/navbar/__types/{NavbarItem.d.ts → NavbarItem.types.d.ts} +2 -2
- package/dist/runtime/components/navbar/__types/index.d.ts +1 -0
- package/dist/runtime/components/navbar/__types/index.mjs +1 -0
- package/dist/runtime/components/table/AntTable.vue +10 -6
- package/dist/runtime/components/table/AntTableSortButton.vue +37 -27
- package/dist/runtime/components/table/AntTd.vue +21 -10
- package/dist/runtime/components/table/AntTh.vue +21 -14
- package/dist/runtime/components/table/__stories/AntTable.stories.mjs +35 -36
- package/dist/runtime/components/table/__types/{TableHeader.type.d.ts → TableHeader.types.d.ts} +5 -0
- package/dist/runtime/components/table/__types/{TableHeader.type.mjs → TableHeader.types.mjs} +6 -0
- package/dist/runtime/components/table/__types/index.d.ts +1 -0
- package/dist/runtime/components/table/__types/index.mjs +1 -0
- package/dist/runtime/components/tabs/AntTabItem.vue +34 -34
- package/dist/runtime/components/tabs/__stories/AntTabItem.stories.mjs +4 -4
- package/dist/runtime/components/tabs/__stories/AntTabs.stories.mjs +3 -3
- package/dist/runtime/components/tabs/__types/AntTabItem.types.d.ts +2 -2
- package/dist/runtime/components/tabs/__types/AntTabItem.types.mjs +6 -6
- package/dist/runtime/components/tabs/__types/index.d.ts +1 -0
- package/dist/runtime/components/tabs/__types/index.mjs +1 -0
- package/dist/runtime/composables/useUi.d.ts +6 -6
- package/dist/runtime/composables/useUi.mjs +8 -8
- package/dist/runtime/enums/Size.enum.d.ts +4 -1
- package/dist/runtime/enums/Size.enum.mjs +4 -1
- package/dist/runtime/enums/{ColorType.enum.d.ts → State.enum.d.ts} +2 -2
- package/dist/runtime/enums/State.enum.mjs +18 -0
- package/dist/runtime/enums/index.d.ts +2 -1
- package/dist/runtime/enums/index.mjs +2 -1
- package/dist/runtime/plugins/toaster.d.ts +2 -2
- package/dist/runtime/plugins/toaster.mjs +5 -5
- package/dist/runtime/plugins/ui-module.mjs +1 -1
- package/dist/runtime/tailwind.config.d.ts +1 -181
- package/dist/runtime/tailwind.config.mjs +3 -0
- package/dist/runtime/types.d.ts +5 -4
- package/dist/runtime/types.mjs +5 -4
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/runtime/components/AntAccordion.vue +10 -5
- package/src/runtime/components/AntAccordionItem.vue +19 -7
- package/src/runtime/components/AntAlert.vue +27 -27
- package/src/runtime/components/AntCard.vue +34 -0
- package/src/runtime/components/AntDropdown.vue +2 -2
- package/src/runtime/components/AntIcon.vue +21 -16
- package/src/runtime/components/AntKeycap.vue +26 -5
- package/src/runtime/components/AntListGroupItem.vue +24 -28
- package/src/runtime/components/AntModal.vue +5 -5
- package/src/runtime/components/AntPagination.vue +45 -45
- package/src/runtime/components/AntPopover.vue +3 -3
- package/src/runtime/components/AntSpinner.vue +56 -50
- package/src/runtime/components/AntTag.vue +75 -40
- package/src/runtime/components/AntToast.vue +40 -31
- package/src/runtime/components/AntToaster.vue +16 -17
- package/src/runtime/components/AntTooltip.vue +75 -69
- package/src/runtime/components/buttons/AntActionButton.vue +26 -23
- package/src/runtime/components/buttons/AntButton.vue +85 -75
- package/src/runtime/components/buttons/AntCreateButton.vue +2 -2
- package/src/runtime/components/buttons/AntDeleteButton.vue +2 -2
- package/src/runtime/components/buttons/AntDuplicateButton.vue +2 -2
- package/src/runtime/components/buttons/AntEditButton.vue +2 -2
- package/src/runtime/components/buttons/AntSaveAndNewButton.vue +14 -13
- package/src/runtime/components/buttons/AntSaveButton.vue +13 -12
- package/src/runtime/components/crud/AntCrudDetailActions.vue +2 -2
- package/src/runtime/components/crud/AntCrudDetailNav.vue +10 -3
- package/src/runtime/components/crud/AntCrudTableFilter.vue +14 -14
- package/src/runtime/components/crud/AntCrudTableNav.vue +27 -27
- package/src/runtime/components/dialogs/AntDeleteDialog.vue +3 -3
- package/src/runtime/components/dialogs/AntDialog.vue +23 -23
- package/src/runtime/components/forms/AntField.vue +123 -0
- package/src/runtime/components/forms/AntFormGroupLabel.vue +5 -0
- package/src/runtime/components/inputs/AntCheckbox.vue +202 -0
- package/src/runtime/components/inputs/AntCheckboxGroup.vue +117 -0
- package/src/runtime/components/inputs/AntDateInput.vue +97 -0
- package/{dist/runtime/components/form → src/runtime/components/inputs}/AntNumberInput.vue +28 -50
- package/src/runtime/components/inputs/AntPasswordInput.vue +107 -0
- package/src/runtime/components/inputs/AntRadio.vue +200 -0
- package/src/runtime/components/inputs/AntRadioGroup.vue +116 -0
- package/src/runtime/components/inputs/AntRangeSlider.vue +121 -0
- package/{dist/runtime/components/form → src/runtime/components/inputs}/AntSearch.vue +17 -21
- package/src/runtime/components/{form → inputs}/AntSelect.vue +68 -60
- package/src/runtime/components/inputs/AntSwitch.vue +192 -0
- package/src/runtime/components/inputs/AntSwitcher.vue +196 -0
- package/{dist/runtime/components/form → src/runtime/components/inputs}/AntTagInput.vue +94 -69
- package/src/runtime/components/inputs/AntTextInput.vue +72 -0
- package/src/runtime/components/{form → inputs}/AntTextarea.vue +53 -41
- package/src/runtime/components/{form → inputs}/AntUnitInput.vue +17 -23
- package/src/runtime/components/inputs/Elements/AntBaseInput.vue +304 -0
- package/src/runtime/components/{form → inputs}/Elements/AntDropDown.vue +29 -30
- package/src/runtime/components/{form → inputs}/Elements/AntInputDescription.vue +17 -14
- package/src/runtime/components/inputs/Elements/AntInputLabel.vue +65 -0
- package/src/runtime/components/inputs/Elements/AntInputLimiter.vue +58 -0
- package/src/runtime/components/layouts/AntNavLeftLayout.vue +3 -3
- package/src/runtime/components/navbar/AntNavbar.vue +10 -10
- package/src/runtime/components/navbar/AntNavbarItem.vue +5 -5
- package/src/runtime/components/table/AntTable.vue +10 -6
- package/src/runtime/components/table/AntTableSortButton.vue +37 -27
- package/src/runtime/components/table/AntTd.vue +21 -10
- package/src/runtime/components/table/AntTh.vue +21 -14
- package/src/runtime/components/tabs/AntTabItem.vue +34 -34
- package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +0 -144
- package/dist/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +0 -91
- package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckbox.stories.mjs +0 -289
- package/dist/runtime/components/form/AntFormGroupLabel.vue +0 -5
- package/dist/runtime/components/form/AntRadioWidget/AntRadio.vue +0 -139
- package/dist/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +0 -80
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.d.ts +0 -8
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.mjs +0 -79
- package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadioGroup.stories.mjs +0 -125
- package/dist/runtime/components/form/AntRadioWidget/__types/AntRadio.type.d.ts +0 -9
- package/dist/runtime/components/form/AntRangeSlider.vue +0 -81
- package/dist/runtime/components/form/AntSwitch.vue +0 -153
- package/dist/runtime/components/form/AntSwitcher.vue +0 -184
- package/dist/runtime/components/form/AntTextInput.vue +0 -73
- package/dist/runtime/components/form/Elements/AntBaseInput.vue +0 -220
- package/dist/runtime/components/form/Elements/AntField.vue +0 -105
- package/dist/runtime/components/form/Elements/AntInputLabel.vue +0 -55
- package/dist/runtime/components/form/Elements/AntInputLimiter.vue +0 -55
- package/dist/runtime/components/form/Elements/__stories/AntBaseInput.stories.mjs +0 -171
- package/dist/runtime/components/form/Elements/__types/index.d.ts +0 -1
- package/dist/runtime/components/form/Elements/__types/index.mjs +0 -1
- package/dist/runtime/components/form/__stories/AntNumberInput.stories.mjs +0 -74
- package/dist/runtime/components/form/__stories/AntRangeSlider.stories.d.ts +0 -6
- package/dist/runtime/components/form/__stories/AntRangeSlider.stories.mjs +0 -40
- package/dist/runtime/components/form/__stories/AntSearch.stories.mjs +0 -43
- package/dist/runtime/components/form/__stories/AntSwitch.stories.mjs +0 -218
- package/dist/runtime/components/form/__stories/AntSwitcher.stories.mjs +0 -228
- package/dist/runtime/components/form/__stories/AntTagInput.stories.mjs +0 -106
- package/dist/runtime/components/form/__stories/AntTextInput.stories.mjs +0 -68
- package/dist/runtime/components/form/__types/AntSwitcher.type.mjs +0 -0
- package/dist/runtime/components/form/__types/index.d.ts +0 -3
- package/dist/runtime/components/form/__types/index.mjs +0 -3
- package/dist/runtime/components/form/index.d.ts +0 -12
- package/dist/runtime/components/form/index.mjs +0 -24
- package/dist/runtime/components/navbar/__types/NavbarItem.mjs +0 -0
- package/dist/runtime/enums/ColorType.enum.mjs +0 -18
- package/dist/runtime/types/AntListGroupItem.type.d.ts +0 -11
- package/dist/runtime/types/AntListGroupItem.type.mjs +0 -12
- package/dist/runtime/types/AntTag.type.d.ts +0 -7
- package/dist/runtime/types/AntTag.type.mjs +0 -8
- package/dist/runtime/types/Checkbox.type.d.ts +0 -8
- package/dist/runtime/types/Checkbox.type.mjs +0 -0
- package/dist/runtime/types/NavItem.type.d.ts +0 -9
- package/dist/runtime/types/NavItem.type.mjs +0 -0
- package/dist/runtime/types/RadioButton.type.d.ts +0 -5
- package/dist/runtime/types/RadioButton.type.mjs +0 -0
- package/dist/runtime/types/Tabs.type.d.ts +0 -6
- package/dist/runtime/types/Tabs.type.mjs +0 -0
- package/dist/runtime/types/Toaster.type.d.ts +0 -6
- package/dist/runtime/types/Toaster.type.mjs +0 -0
- package/dist/runtime/types/index.d.ts +0 -7
- package/dist/runtime/types/index.mjs +0 -7
- package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +0 -166
- package/src/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +0 -91
- package/src/runtime/components/form/AntFormGroupLabel.vue +0 -5
- package/src/runtime/components/form/AntRadioWidget/AntRadio.vue +0 -164
- package/src/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +0 -80
- package/src/runtime/components/form/AntRangeSlider.vue +0 -101
- package/src/runtime/components/form/AntSwitch.vue +0 -153
- package/src/runtime/components/form/AntSwitcher.vue +0 -200
- package/src/runtime/components/form/AntTextInput.vue +0 -73
- package/src/runtime/components/form/Elements/AntBaseInput.vue +0 -251
- package/src/runtime/components/form/Elements/AntField.vue +0 -105
- package/src/runtime/components/form/Elements/AntInputLabel.vue +0 -55
- package/src/runtime/components/form/Elements/AntInputLimiter.vue +0 -55
- /package/dist/runtime/components/__types/{Accordion.types.d.ts → AntAccordion.types.d.ts} +0 -0
- /package/dist/runtime/components/__types/{Accordion.types.mjs → AntAccordion.types.mjs} +0 -0
- /package/dist/runtime/components/buttons/__types/{AntButton.type.d.ts → AntButton.types.d.ts} +0 -0
- /package/dist/runtime/components/buttons/__types/{AntButton.type.mjs → AntButton.types.mjs} +0 -0
- /package/dist/runtime/components/{form → forms}/AntFormGroup.vue +0 -0
- /package/dist/runtime/components/{form/Elements → forms}/__stories/AntField.stories.d.ts +0 -0
- /package/dist/runtime/components/{form → forms}/__stories/AntFormGroup.stories.d.ts +0 -0
- /package/dist/runtime/components/{form → forms}/__stories/AntFormGroupLabel.stories.d.ts +0 -0
- /package/dist/runtime/components/{form → inputs}/AntRichTextEditor.vue +0 -0
- /package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputDescription.stories.d.ts +0 -0
- /package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLabel.stories.d.ts +0 -0
- /package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLimiter.stories.d.ts +0 -0
- /package/dist/runtime/components/{form/Elements/__types/AntBaseInput.type.d.ts → inputs/Elements/__types/AntBaseInput.types.d.ts} +0 -0
- /package/dist/runtime/components/{form/Elements/__types/AntBaseInput.type.mjs → inputs/Elements/__types/AntBaseInput.types.mjs} +0 -0
- /package/dist/runtime/components/{form/AntCheckboxWidget → inputs}/__stories/AntCheckbox.stories.d.ts +0 -0
- /package/dist/runtime/components/{form/AntCheckboxWidget → inputs}/__stories/AntCheckboxGroup.stories.d.ts +0 -0
- /package/dist/runtime/components/{form → inputs}/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
- /package/dist/runtime/components/{form → inputs}/__stories/AntRichTextEditor.stories-old.mjs +0 -0
- /package/dist/runtime/components/{form → inputs}/__stories/AntSelect.stories.d.ts +0 -0
- /package/dist/runtime/components/{form/__types/AntSelect.type.d.ts → inputs/__types/AntSelect.types.d.ts} +0 -0
- /package/dist/runtime/components/{form/AntCheckboxWidget/__types/AntCheckbox.mjs → inputs/__types/AntSelect.types.mjs} +0 -0
- /package/dist/runtime/components/{form/__types/AntSwitcher.type.d.ts → inputs/__types/AntSwitcher.types.d.ts} +0 -0
- /package/dist/runtime/components/{form/AntRadioWidget/__types/AntRadio.type.mjs → inputs/__types/AntSwitcher.types.mjs} +0 -0
- /package/dist/runtime/components/{form/__types/AntSelect.type.mjs → navbar/__types/NavbarItem.types.mjs} +0 -0
- /package/src/runtime/components/{form → forms}/AntFormGroup.vue +0 -0
- /package/src/runtime/components/{form → inputs}/AntRichTextEditor.vue +0 -0
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import AntCheckbox from "../AntCheckbox.vue";
|
|
2
|
-
import { computed, ref } from "vue";
|
|
3
|
-
import { InputColorType, Size } from "../../../../enums/index.mjs";
|
|
4
|
-
import { useFieldValidator } from "@antify/validate";
|
|
5
|
-
const meta = {
|
|
6
|
-
title: "Components/Forms/Checkbox/Checkbox",
|
|
7
|
-
component: AntCheckbox,
|
|
8
|
-
parameters: { controls: { sort: "requiredFirst" } },
|
|
9
|
-
argTypes: {
|
|
10
|
-
colorType: {
|
|
11
|
-
control: { type: "select" },
|
|
12
|
-
options: Object.values(InputColorType)
|
|
13
|
-
},
|
|
14
|
-
size: {
|
|
15
|
-
control: { type: "select" },
|
|
16
|
-
options: Object.values(Size)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export default meta;
|
|
21
|
-
export const Docs = {
|
|
22
|
-
render: (args) => ({
|
|
23
|
-
components: { AntCheckbox },
|
|
24
|
-
setup() {
|
|
25
|
-
const value = computed({
|
|
26
|
-
get() {
|
|
27
|
-
return args.modelValue;
|
|
28
|
-
},
|
|
29
|
-
set(val) {
|
|
30
|
-
args.modelValue = val;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
return { args, value };
|
|
34
|
-
},
|
|
35
|
-
template: `
|
|
36
|
-
<div class="m-2">
|
|
37
|
-
<AntCheckbox v-bind="args" v-model="value"/>
|
|
38
|
-
<span class="text-sm text-gray-500">Reactive value: {{ value }}</span>
|
|
39
|
-
</div>
|
|
40
|
-
`
|
|
41
|
-
})
|
|
42
|
-
};
|
|
43
|
-
export const WithValidator = {
|
|
44
|
-
render: (args) => ({
|
|
45
|
-
components: { AntCheckbox },
|
|
46
|
-
setup() {
|
|
47
|
-
const value = computed({
|
|
48
|
-
get() {
|
|
49
|
-
return args.modelValue;
|
|
50
|
-
},
|
|
51
|
-
set(val) {
|
|
52
|
-
args.modelValue = val;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
const validator = ref(useFieldValidator((val) => val || "Check this box!"));
|
|
56
|
-
validator.value.validate(value.value);
|
|
57
|
-
return { args, value, validator };
|
|
58
|
-
},
|
|
59
|
-
template: `
|
|
60
|
-
<div class="m-2">
|
|
61
|
-
<AntCheckbox v-bind="args" v-model="value" :validator="validator" value-label="Accept some kind of document before continuing"/>
|
|
62
|
-
<span class="text-sm text-gray-500">Reactive value: {{ value }}</span>
|
|
63
|
-
</div>
|
|
64
|
-
`
|
|
65
|
-
})
|
|
66
|
-
};
|
|
67
|
-
export const Summary = {
|
|
68
|
-
parameters: {
|
|
69
|
-
chromatic: { disableSnapshot: false }
|
|
70
|
-
},
|
|
71
|
-
render: (args) => ({
|
|
72
|
-
components: { AntCheckbox },
|
|
73
|
-
setup() {
|
|
74
|
-
const offValue = ref(false);
|
|
75
|
-
const onValue = ref(true);
|
|
76
|
-
return {
|
|
77
|
-
args,
|
|
78
|
-
offValue,
|
|
79
|
-
onValue,
|
|
80
|
-
InputColorType,
|
|
81
|
-
Size
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
template: `
|
|
85
|
-
<h3>Medium Size</h3>
|
|
86
|
-
<div class="flex flex-col gap-5">
|
|
87
|
-
<div class="flex gap-2.5">
|
|
88
|
-
<AntCheckbox v-model="offValue" :color-type="InputColorType.base" />
|
|
89
|
-
<AntCheckbox v-model="offValue" :color-type="InputColorType.info" />
|
|
90
|
-
<AntCheckbox v-model="offValue" :color-type="InputColorType.success" />
|
|
91
|
-
<AntCheckbox v-model="offValue" :color-type="InputColorType.warning" />
|
|
92
|
-
<AntCheckbox v-model="offValue" :color-type="InputColorType.danger" />
|
|
93
|
-
</div>
|
|
94
|
-
<div class="flex gap-2.5">
|
|
95
|
-
<AntCheckbox v-model="onValue" :color-type="InputColorType.base" />
|
|
96
|
-
<AntCheckbox v-model="onValue" :color-type="InputColorType.info" />
|
|
97
|
-
<AntCheckbox v-model="onValue" :color-type="InputColorType.success" />
|
|
98
|
-
<AntCheckbox v-model="onValue" :color-type="InputColorType.warning" />
|
|
99
|
-
<AntCheckbox v-model="onValue" :color-type="InputColorType.danger" />
|
|
100
|
-
</div>
|
|
101
|
-
<div class="flex gap-2.5">
|
|
102
|
-
<AntCheckbox v-model="offValue" label="Label" :color-type="InputColorType.base" />
|
|
103
|
-
<AntCheckbox v-model="offValue" label="Label" :color-type="InputColorType.info" />
|
|
104
|
-
<AntCheckbox v-model="offValue" label="Label" :color-type="InputColorType.success" />
|
|
105
|
-
<AntCheckbox v-model="offValue" label="Label" :color-type="InputColorType.warning" />
|
|
106
|
-
<AntCheckbox v-model="offValue" label="Label" :color-type="InputColorType.danger" />
|
|
107
|
-
</div>
|
|
108
|
-
<div class="flex gap-2.5">
|
|
109
|
-
<AntCheckbox v-model="onValue" label="Label" :color-type="InputColorType.base" />
|
|
110
|
-
<AntCheckbox v-model="onValue" label="Label" :color-type="InputColorType.info" />
|
|
111
|
-
<AntCheckbox v-model="onValue" label="Label" :color-type="InputColorType.success" />
|
|
112
|
-
<AntCheckbox v-model="onValue" label="Label" :color-type="InputColorType.warning" />
|
|
113
|
-
<AntCheckbox v-model="onValue" label="Label" :color-type="InputColorType.danger" />
|
|
114
|
-
</div>
|
|
115
|
-
<div class="flex gap-2.5">
|
|
116
|
-
<AntCheckbox v-model="offValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
117
|
-
<AntCheckbox v-model="offValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
118
|
-
<AntCheckbox v-model="offValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
119
|
-
<AntCheckbox v-model="offValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
120
|
-
<AntCheckbox v-model="offValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
121
|
-
</div>
|
|
122
|
-
<div class="flex gap-2.5">
|
|
123
|
-
<AntCheckbox v-model="onValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
124
|
-
<AntCheckbox v-model="onValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
125
|
-
<AntCheckbox v-model="onValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
126
|
-
<AntCheckbox v-model="onValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
127
|
-
<AntCheckbox v-model="onValue" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
128
|
-
</div>
|
|
129
|
-
<div class="flex gap-2.5">
|
|
130
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
131
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
132
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
133
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
134
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
135
|
-
</div>
|
|
136
|
-
<div class="flex gap-2.5">
|
|
137
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
138
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
139
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
140
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
141
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
142
|
-
</div>
|
|
143
|
-
<div class="flex gap-2.5">
|
|
144
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" readonly/>
|
|
145
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" readonly/>
|
|
146
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" readonly/>
|
|
147
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" readonly/>
|
|
148
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" readonly/>
|
|
149
|
-
</div>
|
|
150
|
-
<div class="flex gap-2.5">
|
|
151
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" readonly/>
|
|
152
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" readonly/>
|
|
153
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" readonly/>
|
|
154
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" readonly/>
|
|
155
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" readonly/>
|
|
156
|
-
</div>
|
|
157
|
-
<div class="flex gap-2.5">
|
|
158
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" disabled/>
|
|
159
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" disabled/>
|
|
160
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" disabled/>
|
|
161
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" disabled/>
|
|
162
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" disabled/>
|
|
163
|
-
</div>
|
|
164
|
-
<div class="flex gap-2.5">
|
|
165
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" disabled/>
|
|
166
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" disabled/>
|
|
167
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" disabled/>
|
|
168
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" disabled/>
|
|
169
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" disabled/>
|
|
170
|
-
</div>
|
|
171
|
-
<div class="flex gap-2.5">
|
|
172
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" skeleton/>
|
|
173
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" skeleton/>
|
|
174
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" skeleton/>
|
|
175
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" skeleton/>
|
|
176
|
-
<AntCheckbox v-model="offValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" skeleton/>
|
|
177
|
-
</div>
|
|
178
|
-
<div class="flex gap-2.5">
|
|
179
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" skeleton/>
|
|
180
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" skeleton/>
|
|
181
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" skeleton/>
|
|
182
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" skeleton/>
|
|
183
|
-
<AntCheckbox v-model="onValue" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" skeleton/>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
<h3>Small Size</h3>
|
|
187
|
-
<div class="flex flex-col gap-5">
|
|
188
|
-
<div class="flex gap-2.5">
|
|
189
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" :color-type="InputColorType.base" />
|
|
190
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" :color-type="InputColorType.info" />
|
|
191
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" :color-type="InputColorType.success" />
|
|
192
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" :color-type="InputColorType.warning" />
|
|
193
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" :color-type="InputColorType.danger" />
|
|
194
|
-
</div>
|
|
195
|
-
<div class="flex gap-2.5">
|
|
196
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" :color-type="InputColorType.base" />
|
|
197
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" :color-type="InputColorType.info" />
|
|
198
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" :color-type="InputColorType.success" />
|
|
199
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" :color-type="InputColorType.warning" />
|
|
200
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" :color-type="InputColorType.danger" />
|
|
201
|
-
</div>
|
|
202
|
-
<div class="flex gap-2.5">
|
|
203
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" :color-type="InputColorType.base" />
|
|
204
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" :color-type="InputColorType.info" />
|
|
205
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" :color-type="InputColorType.success" />
|
|
206
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" :color-type="InputColorType.warning" />
|
|
207
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" :color-type="InputColorType.danger" />
|
|
208
|
-
</div>
|
|
209
|
-
<div class="flex gap-2.5">
|
|
210
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" :color-type="InputColorType.base" />
|
|
211
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" :color-type="InputColorType.info" />
|
|
212
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" :color-type="InputColorType.success" />
|
|
213
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" :color-type="InputColorType.warning" />
|
|
214
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" :color-type="InputColorType.danger" />
|
|
215
|
-
</div>
|
|
216
|
-
<div class="flex gap-2.5">
|
|
217
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
218
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
219
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
220
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
221
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
222
|
-
</div>
|
|
223
|
-
<div class="flex gap-2.5">
|
|
224
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
225
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
226
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
227
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
228
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
229
|
-
</div>
|
|
230
|
-
<div class="flex gap-2.5">
|
|
231
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
232
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
233
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
234
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
235
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
236
|
-
</div>
|
|
237
|
-
<div class="flex gap-2.5">
|
|
238
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" />
|
|
239
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" />
|
|
240
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" />
|
|
241
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" />
|
|
242
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" />
|
|
243
|
-
</div>
|
|
244
|
-
<div class="flex gap-2.5">
|
|
245
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" readonly/>
|
|
246
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" readonly/>
|
|
247
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" readonly/>
|
|
248
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" readonly/>
|
|
249
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" readonly/>
|
|
250
|
-
</div>
|
|
251
|
-
<div class="flex gap-2.5">
|
|
252
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" readonly/>
|
|
253
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" readonly/>
|
|
254
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" readonly/>
|
|
255
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" readonly/>
|
|
256
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" readonly/>
|
|
257
|
-
</div>
|
|
258
|
-
<div class="flex gap-2.5">
|
|
259
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" disabled/>
|
|
260
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" disabled/>
|
|
261
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" disabled/>
|
|
262
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" disabled/>
|
|
263
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" disabled/>
|
|
264
|
-
</div>
|
|
265
|
-
<div class="flex gap-2.5">
|
|
266
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" disabled/>
|
|
267
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" disabled/>
|
|
268
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" disabled/>
|
|
269
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" disabled/>
|
|
270
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" disabled/>
|
|
271
|
-
</div>
|
|
272
|
-
<div class="flex gap-2.5">
|
|
273
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" skeleton/>
|
|
274
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" skeleton/>
|
|
275
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" skeleton/>
|
|
276
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" skeleton/>
|
|
277
|
-
<AntCheckbox v-model="offValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" skeleton/>
|
|
278
|
-
</div>
|
|
279
|
-
<div class="flex gap-2.5">
|
|
280
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.base" skeleton/>
|
|
281
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.info" skeleton/>
|
|
282
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.success" skeleton/>
|
|
283
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.warning" skeleton/>
|
|
284
|
-
<AntCheckbox v-model="onValue" :size="Size.sm" label="Label" value-label="Value" description="Lorem ipsum dolor sit amet, consetetur sadipscing elitr." :color-type="InputColorType.danger" skeleton/>
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
`
|
|
288
|
-
})
|
|
289
|
-
};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { AntField } from '../Elements';
|
|
3
|
-
import { InputColorType, Size } from '../../../enums';
|
|
4
|
-
import AntSkeleton from '../../AntSkeleton.vue';
|
|
5
|
-
import { computed, onMounted } from 'vue';
|
|
6
|
-
import { type AntRadioType } from './__types/AntRadio.type';
|
|
7
|
-
import { handleEnumValidation } from '../../../handler';
|
|
8
|
-
|
|
9
|
-
defineOptions({ inheritAttrs: false });
|
|
10
|
-
|
|
11
|
-
const emits = defineEmits([ 'update:modelValue', 'update:skeleton' ]);
|
|
12
|
-
const props = withDefaults(
|
|
13
|
-
defineProps<{
|
|
14
|
-
modelValue: string | null;
|
|
15
|
-
value: AntRadioType;
|
|
16
|
-
|
|
17
|
-
description?: string;
|
|
18
|
-
skeleton?: boolean;
|
|
19
|
-
colorType?: InputColorType;
|
|
20
|
-
size?: Size
|
|
21
|
-
readonly?: boolean;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
}>(), {
|
|
24
|
-
colorType: InputColorType.base,
|
|
25
|
-
size: Size.md,
|
|
26
|
-
readonly: false,
|
|
27
|
-
disabled: false,
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const _value = computed({
|
|
32
|
-
get(): string | null | AntRadioType {
|
|
33
|
-
return props.modelValue;
|
|
34
|
-
},
|
|
35
|
-
set(val: string | null | AntRadioType) {
|
|
36
|
-
emits('update:modelValue', val ? typeof val === 'string' ? val : val.value : null);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const hasAction = computed(() => (!props.skeleton && !props.readonly && !props.disabled))
|
|
40
|
-
const isActive = computed(() => {
|
|
41
|
-
return _value.value === props.value.value
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const inputClasses = computed(() => {
|
|
45
|
-
const classes: { [key: string]: boolean } = {
|
|
46
|
-
'relative inline-flex flex-shrink-0': true,
|
|
47
|
-
'focus:ring-offset-0 outline outline-offset-[-1px] outline-1 focus:outline-offset-[-1px] focus:outline-1 rounded-full': true,
|
|
48
|
-
'cursor-pointer': hasAction.value,
|
|
49
|
-
'outline-neutral-300 focus:outline-neutral-300': !isActive.value,
|
|
50
|
-
'rounded-full transition-colors ease-in-out duration-200 disabled:opacity-50 disabled:cursor-not-allowed': true,
|
|
51
|
-
'focus:ring-2': props.size === Size.sm && hasAction.value,
|
|
52
|
-
'focus:ring-4': props.size === Size.md && hasAction.value,
|
|
53
|
-
'h-4 w-4 small': props.size === Size.sm,
|
|
54
|
-
'h-5 w-5': props.size === Size.md,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const focusColorVariant = {
|
|
58
|
-
[InputColorType.base]: 'focus:ring-primary-100',
|
|
59
|
-
[InputColorType.danger]: 'focus:ring-danger-100',
|
|
60
|
-
[InputColorType.info]: 'focus:ring-info-100',
|
|
61
|
-
[InputColorType.success]: 'focus:ring-success-100',
|
|
62
|
-
[InputColorType.warning]: 'focus:ring-warning-100',
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const activeColorVariant = {
|
|
66
|
-
[InputColorType.base]: 'text-primary-500 outline-primary-500 focus:outline-primary-500',
|
|
67
|
-
[InputColorType.danger]: 'text-danger-500 outline-danger-500 focus:outline-danger-500',
|
|
68
|
-
[InputColorType.info]: 'text-info-500 outline-info-500 focus:outline-info-500',
|
|
69
|
-
[InputColorType.success]: 'text-success-500 outline-success-500 focus:outline-success-500',
|
|
70
|
-
[InputColorType.warning]: 'text-warning-500 outline-warning-500 focus:outline-warning-500',
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
classes[focusColorVariant[props.colorType]] = hasAction.value;
|
|
74
|
-
classes[activeColorVariant[props.colorType]] = isActive.value;
|
|
75
|
-
|
|
76
|
-
return classes;
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
const valueClass = computed(() => {
|
|
80
|
-
const classes = {
|
|
81
|
-
'relative w-fit full-height': true,
|
|
82
|
-
'cursor-pointer': hasAction.value,
|
|
83
|
-
'cursor-not-allowed opacity-50': props.disabled
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return classes;
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
onMounted(() => {
|
|
90
|
-
handleEnumValidation(props.size, Size, 'size');
|
|
91
|
-
handleEnumValidation(props.colorType, InputColorType, 'colorType');
|
|
92
|
-
});
|
|
93
|
-
</script>
|
|
94
|
-
|
|
95
|
-
<template>
|
|
96
|
-
<AntField
|
|
97
|
-
:description="description"
|
|
98
|
-
:color-type="colorType"
|
|
99
|
-
class="cursor-pointer"
|
|
100
|
-
:skeleton="skeleton"
|
|
101
|
-
:size="size"
|
|
102
|
-
:expanded="false"
|
|
103
|
-
>
|
|
104
|
-
<div class="flex items-center gap-1.5">
|
|
105
|
-
<div class="relative full-height flex items-center">
|
|
106
|
-
<input
|
|
107
|
-
v-model="_value"
|
|
108
|
-
:value="value.value"
|
|
109
|
-
:class="inputClasses"
|
|
110
|
-
type="radio"
|
|
111
|
-
:aria-checked="isActive"
|
|
112
|
-
:disabled="disabled"
|
|
113
|
-
/>
|
|
114
|
-
|
|
115
|
-
<AntSkeleton
|
|
116
|
-
v-if="skeleton"
|
|
117
|
-
absolute
|
|
118
|
-
rounded-full
|
|
119
|
-
/>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
<div class="relative">
|
|
123
|
-
<span :class="valueClass">
|
|
124
|
-
{{ value.label }}
|
|
125
|
-
</span>
|
|
126
|
-
|
|
127
|
-
<AntSkeleton
|
|
128
|
-
v-if="skeleton"
|
|
129
|
-
absolute
|
|
130
|
-
rounded
|
|
131
|
-
/>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</AntField>
|
|
135
|
-
</template>
|
|
136
|
-
|
|
137
|
-
<style scoped>
|
|
138
|
-
input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:100%;display:flex;justify-content:center}input[type=radio]:before{background:currentColor;border-radius:100%;content:"";height:12px;transform:scale(0);transition:transform .12s;width:12px}input[type=radio].small:before{height:8px;width:8px}input[type=radio]:checked:before{transform:scale(1)}
|
|
139
|
-
</style>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import AntRadio from './AntRadio.vue';
|
|
3
|
-
import { useVModel } from '@vueuse/core';
|
|
4
|
-
import { AntField } from '../Elements';
|
|
5
|
-
import { type AntRadioType } from './__types/AntRadio.type';
|
|
6
|
-
import { InputColorType, Size } from '../../../enums';
|
|
7
|
-
import { FieldValidator } from '@antify/validate';
|
|
8
|
-
import { computed, type Ref, watch } from 'vue';
|
|
9
|
-
import { Direction } from '../../../enums/Direction.enum';
|
|
10
|
-
|
|
11
|
-
defineOptions({ inheritAttrs: false });
|
|
12
|
-
|
|
13
|
-
const emits = defineEmits([ 'update:modelValue', 'update:skeleton' ]);
|
|
14
|
-
const props = withDefaults(
|
|
15
|
-
defineProps<{
|
|
16
|
-
modelValue: string | null;
|
|
17
|
-
radioButtons: AntRadioType[];
|
|
18
|
-
label?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
direction?: Direction;
|
|
21
|
-
colorType?: InputColorType;
|
|
22
|
-
size?: Size;
|
|
23
|
-
skeleton?: boolean;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
readonly?: boolean;
|
|
26
|
-
validator?: FieldValidator;
|
|
27
|
-
}>(), {
|
|
28
|
-
direction: Direction.column,
|
|
29
|
-
colorType: InputColorType.base,
|
|
30
|
-
size: Size.md,
|
|
31
|
-
skeleton: false,
|
|
32
|
-
disabled: false,
|
|
33
|
-
readonly: false
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const _value = useVModel(props, 'modelValue', emits);
|
|
37
|
-
const _colorType: Ref<InputColorType | undefined> = computed(() => props.validator?.hasErrors() ? InputColorType.danger : undefined);
|
|
38
|
-
const containerClasses = computed(() => {
|
|
39
|
-
const classes = {
|
|
40
|
-
'flex gap-2.5 justify-start': true,
|
|
41
|
-
'flex-row': props.direction === Direction.row,
|
|
42
|
-
'flex-col': props.direction === Direction.column,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return classes;
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
watch(_value, () => {
|
|
49
|
-
props.validator?.validate(_value.value);
|
|
50
|
-
}, {
|
|
51
|
-
deep: true
|
|
52
|
-
});
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<template>
|
|
56
|
-
<AntField
|
|
57
|
-
:label="label"
|
|
58
|
-
:description="description"
|
|
59
|
-
:color-type="colorType"
|
|
60
|
-
:skeleton="skeleton"
|
|
61
|
-
:validator="validator"
|
|
62
|
-
:size="size"
|
|
63
|
-
label-for="noop"
|
|
64
|
-
>
|
|
65
|
-
<div
|
|
66
|
-
:class="containerClasses"
|
|
67
|
-
>
|
|
68
|
-
<AntRadio
|
|
69
|
-
v-model="_value"
|
|
70
|
-
v-for="(radio, index) in radioButtons"
|
|
71
|
-
:key="`radio-button-widget_${radio.value}-${index}`"
|
|
72
|
-
:value="radio"
|
|
73
|
-
:skeleton="skeleton"
|
|
74
|
-
:disabled="disabled || radio.disabled"
|
|
75
|
-
:readonly="readonly || radio.readonly"
|
|
76
|
-
:color-type="_colorType || radio.colorType || colorType"
|
|
77
|
-
/>
|
|
78
|
-
</div>
|
|
79
|
-
</AntField>
|
|
80
|
-
</template>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import AntRadio from '../AntRadio.vue';
|
|
2
|
-
import { type Meta, type StoryObj } from "@storybook/vue3";
|
|
3
|
-
declare const meta: Meta<typeof AntRadio>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof AntRadio>;
|
|
6
|
-
export declare const Docs: Story;
|
|
7
|
-
export declare const Disabled: Story;
|
|
8
|
-
export declare const Loading: Story;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import AntRadio from "../AntRadio.vue";
|
|
2
|
-
import { ref } from "vue";
|
|
3
|
-
import { InputColorType, Size } from "../../../../enums/index.mjs";
|
|
4
|
-
const meta = {
|
|
5
|
-
title: "Components/Forms/Radio/Radio",
|
|
6
|
-
component: AntRadio,
|
|
7
|
-
parameters: { controls: { sort: "requiredFirst" } },
|
|
8
|
-
argTypes: {
|
|
9
|
-
modelValue: {
|
|
10
|
-
table: {
|
|
11
|
-
type: {
|
|
12
|
-
summary: "string | null"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
colorType: {
|
|
17
|
-
control: { type: "select" },
|
|
18
|
-
options: Object.values(InputColorType)
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
control: { type: "select" },
|
|
22
|
-
options: Object.values(Size)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
export default meta;
|
|
27
|
-
export const Docs = {
|
|
28
|
-
render: (args) => ({
|
|
29
|
-
components: { AntRadio },
|
|
30
|
-
setup() {
|
|
31
|
-
const groupValue = ref("t3");
|
|
32
|
-
const radioValues = ref([
|
|
33
|
-
{
|
|
34
|
-
value: "t1",
|
|
35
|
-
label: "Test 1"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
value: "t2",
|
|
39
|
-
label: "Test 2"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
value: "t3",
|
|
43
|
-
label: "Test 3"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
value: "t4",
|
|
47
|
-
label: "Test 4"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
value: "t5",
|
|
51
|
-
label: "Test 5"
|
|
52
|
-
}
|
|
53
|
-
]);
|
|
54
|
-
return { args, groupValue, radioValues };
|
|
55
|
-
},
|
|
56
|
-
template: `
|
|
57
|
-
<div class="m-2 flex gap-2">
|
|
58
|
-
<AntRadio v-for="value in radioValues" v-bind="args" :value="value" v-model="groupValue"/>
|
|
59
|
-
</div>
|
|
60
|
-
`
|
|
61
|
-
}),
|
|
62
|
-
args: {
|
|
63
|
-
description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. "
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
export const Disabled = {
|
|
67
|
-
render: Docs.render,
|
|
68
|
-
args: {
|
|
69
|
-
...Docs.args,
|
|
70
|
-
disabled: true
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
export const Loading = {
|
|
74
|
-
render: Docs.render,
|
|
75
|
-
args: {
|
|
76
|
-
...Docs.args,
|
|
77
|
-
skeleton: true
|
|
78
|
-
}
|
|
79
|
-
};
|