@groupteknology/vuno 1.0.0 → 2.0.0
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 +53 -27
- package/dist/module.d.mts +14 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +80 -13
- package/dist/runtime/app/assets/css/dialog.css +1 -0
- package/dist/runtime/app/assets/css/main.css +1 -0
- package/dist/runtime/app/assets/css/stylesheet.css +1 -0
- package/dist/runtime/app/assets/css/theme.css +1 -0
- package/dist/runtime/app/assets/css/tokens.css +1 -0
- package/dist/runtime/app/components/Alert/Alert.d.vue.ts +20 -0
- package/dist/runtime/app/components/Alert/Alert.theme.d.ts +13 -0
- package/dist/runtime/app/components/Alert/Alert.theme.js +13 -0
- package/dist/runtime/app/components/Alert/Alert.vue +59 -0
- package/dist/runtime/app/components/Alert/Alert.vue.d.ts +20 -0
- package/dist/runtime/app/components/App/App.d.vue.ts +52 -0
- package/dist/runtime/app/components/App/App.vue +150 -0
- package/dist/runtime/app/components/App/App.vue.d.ts +52 -0
- package/dist/runtime/app/components/App/internal/Overlay/Overlay.d.vue.ts +7 -0
- package/dist/runtime/app/components/App/internal/Overlay/Overlay.vue +39 -0
- package/dist/runtime/app/components/App/internal/Overlay/Overlay.vue.d.ts +7 -0
- package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.d.vue.ts +8 -0
- package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue +19 -0
- package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue.d.ts +8 -0
- package/dist/runtime/app/components/App/internal/Toast/Toast.d.vue.ts +11 -0
- package/dist/runtime/app/components/App/internal/Toast/Toast.theme.d.ts +13 -0
- package/dist/runtime/app/components/App/internal/Toast/Toast.theme.js +18 -0
- package/dist/runtime/app/components/App/internal/Toast/Toast.vue +64 -0
- package/dist/runtime/app/components/App/internal/Toast/Toast.vue.d.ts +11 -0
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.d.vue.ts +11 -0
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.d.ts +15 -0
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.js +16 -0
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.vue +100 -0
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.vue.d.ts +11 -0
- package/dist/runtime/app/components/Avatar/Avatar.d.vue.ts +27 -0
- package/dist/runtime/app/components/Avatar/Avatar.theme.d.ts +30 -0
- package/dist/runtime/app/components/Avatar/Avatar.theme.js +22 -0
- package/dist/runtime/app/components/Avatar/Avatar.vue +51 -0
- package/dist/runtime/app/components/Avatar/Avatar.vue.d.ts +27 -0
- package/dist/runtime/app/components/Badge/Badge.d.vue.ts +40 -0
- package/dist/runtime/app/components/Badge/Badge.theme.d.ts +40 -0
- package/dist/runtime/app/components/Badge/Badge.theme.js +22 -0
- package/dist/runtime/app/components/Badge/Badge.vue +28 -0
- package/dist/runtime/app/components/Badge/Badge.vue.d.ts +40 -0
- package/dist/runtime/app/components/Button/Button.d.vue.ts +49 -0
- package/dist/runtime/app/components/Button/Button.theme.d.ts +88 -0
- package/dist/runtime/app/components/Button/Button.theme.js +59 -0
- package/dist/runtime/app/components/Button/Button.vue +78 -0
- package/dist/runtime/app/components/Button/Button.vue.d.ts +49 -0
- package/dist/runtime/app/components/Card/Card.d.vue.ts +94 -0
- package/dist/runtime/app/components/Card/Card.theme.d.ts +57 -0
- package/dist/runtime/app/components/Card/Card.theme.js +62 -0
- package/dist/runtime/app/components/Card/Card.vue +45 -0
- package/dist/runtime/app/components/Card/Card.vue.d.ts +94 -0
- package/dist/runtime/app/components/Code/Code.d.vue.ts +19 -0
- package/dist/runtime/app/components/Code/Code.theme.d.ts +11 -0
- package/dist/runtime/app/components/Code/Code.theme.js +12 -0
- package/dist/runtime/app/components/Code/Code.vue +109 -0
- package/dist/runtime/app/components/Code/Code.vue.d.ts +19 -0
- package/dist/runtime/app/components/Confirm/Confirm.d.vue.ts +35 -0
- package/dist/runtime/app/components/Confirm/Confirm.theme.d.ts +12 -0
- package/dist/runtime/app/components/Confirm/Confirm.theme.js +13 -0
- package/dist/runtime/app/components/Confirm/Confirm.vue +83 -0
- package/dist/runtime/app/components/Confirm/Confirm.vue.d.ts +35 -0
- package/dist/runtime/app/components/Container/Container.d.vue.ts +42 -0
- package/dist/runtime/app/components/Container/Container.theme.d.ts +53 -0
- package/dist/runtime/app/components/Container/Container.theme.js +31 -0
- package/dist/runtime/app/components/Container/Container.vue +20 -0
- package/dist/runtime/app/components/Container/Container.vue.d.ts +42 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.d.vue.ts +26 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.theme.d.ts +16 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.theme.js +13 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.vue +26 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.vue.d.ts +26 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.theme.d.ts +12 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.theme.js +13 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.vue +173 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.theme.js +2 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue +39 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.d.vue.ts +40 -0
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.theme.d.ts +30 -0
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.theme.js +10 -0
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.vue +40 -0
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.vue.d.ts +40 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.theme.d.ts +27 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.theme.js +18 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.vue +88 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.theme.js +2 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue +51 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.d.vue.ts +26 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.theme.js +2 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.vue +99 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.vue.d.ts +26 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.d.vue.ts +66 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.d.ts +88 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.js +55 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue +187 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue.d.ts +66 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.d.vue.ts +24 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.theme.js +2 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.vue +61 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.vue.d.ts +24 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.theme.js +2 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.vue +47 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.theme.js +2 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.vue +62 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.theme.js +2 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.vue +41 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.d.vue.ts +32 -0
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.theme.d.ts +54 -0
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.theme.js +31 -0
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue +80 -0
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue.d.ts +32 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.d.vue.ts +17 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.theme.d.ts +6 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.theme.js +7 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.vue +74 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.vue.d.ts +17 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.theme.js +2 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.vue +45 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.d.vue.ts +97 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.theme.d.ts +36 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.theme.js +49 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue +196 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue.d.ts +97 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/option.d.ts +25 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/option.js +6 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/useVunoSelectState.d.ts +30 -0
- package/dist/runtime/app/components/FieldSelect/internal/Select/useVunoSelectState.js +142 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.theme.js +2 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.vue +113 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.theme.js +2 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue +37 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.d.vue.ts +26 -0
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.theme.d.ts +39 -0
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.theme.js +20 -0
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.vue +46 -0
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.vue.d.ts +26 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.d.vue.ts +13 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.theme.js +2 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.vue +41 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.vue.d.ts +13 -0
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.d.vue.ts +26 -0
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.theme.d.ts +34 -0
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.theme.js +20 -0
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue +97 -0
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue.d.ts +26 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.d.vue.ts +26 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.theme.d.ts +5 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.theme.js +2 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue +45 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue.d.ts +26 -0
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.d.vue.ts +34 -0
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.theme.d.ts +36 -0
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.theme.js +37 -0
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue +43 -0
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue.d.ts +34 -0
- package/dist/runtime/app/components/Form/Form.d.vue.ts +52 -0
- package/dist/runtime/app/components/Form/Form.theme.d.ts +9 -0
- package/dist/runtime/app/components/Form/Form.theme.js +10 -0
- package/dist/runtime/app/components/Form/Form.vue +129 -0
- package/dist/runtime/app/components/Form/Form.vue.d.ts +52 -0
- package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.d.vue.ts +7 -0
- package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue +67 -0
- package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue.d.ts +7 -0
- package/dist/runtime/app/components/Form/internal/grid.d.ts +9 -0
- package/dist/runtime/app/components/Form/internal/grid.js +91 -0
- package/dist/runtime/app/components/Form/internal/standard-schema.d.ts +29 -0
- package/dist/runtime/app/components/Form/internal/standard-schema.js +15 -0
- package/dist/runtime/app/components/Form/internal/useVunoFormState.d.ts +43 -0
- package/dist/runtime/app/components/Form/internal/useVunoFormState.js +81 -0
- package/dist/runtime/app/components/FormField/FormField.d.vue.ts +35 -0
- package/dist/runtime/app/components/FormField/FormField.theme.d.ts +62 -0
- package/dist/runtime/app/components/FormField/FormField.theme.js +28 -0
- package/dist/runtime/app/components/FormField/FormField.vue +124 -0
- package/dist/runtime/app/components/FormField/FormField.vue.d.ts +35 -0
- package/dist/runtime/app/components/FormModal/FormModal.d.vue.ts +63 -0
- package/dist/runtime/app/components/FormModal/FormModal.theme.d.ts +8 -0
- package/dist/runtime/app/components/FormModal/FormModal.theme.js +9 -0
- package/dist/runtime/app/components/FormModal/FormModal.vue +95 -0
- package/dist/runtime/app/components/FormModal/FormModal.vue.d.ts +63 -0
- package/dist/runtime/app/components/FormSection/FormSection.d.vue.ts +15 -0
- package/dist/runtime/app/components/FormSection/FormSection.theme.d.ts +12 -0
- package/dist/runtime/app/components/FormSection/FormSection.theme.js +14 -0
- package/dist/runtime/app/components/FormSection/FormSection.vue +45 -0
- package/dist/runtime/app/components/FormSection/FormSection.vue.d.ts +15 -0
- package/dist/runtime/app/components/Icon/Icon.d.vue.ts +6 -0
- package/dist/runtime/app/components/Icon/Icon.vue +32 -0
- package/dist/runtime/app/components/Icon/Icon.vue.d.ts +6 -0
- package/dist/runtime/app/components/Menu/Menu.d.vue.ts +36 -0
- package/dist/runtime/app/components/Menu/Menu.theme.d.ts +17 -0
- package/dist/runtime/app/components/Menu/Menu.theme.js +20 -0
- package/dist/runtime/app/components/Menu/Menu.vue +182 -0
- package/dist/runtime/app/components/Menu/Menu.vue.d.ts +36 -0
- package/dist/runtime/app/components/Modal/Modal.d.vue.ts +43 -0
- package/dist/runtime/app/components/Modal/Modal.theme.d.ts +59 -0
- package/dist/runtime/app/components/Modal/Modal.theme.js +47 -0
- package/dist/runtime/app/components/Modal/Modal.vue +215 -0
- package/dist/runtime/app/components/Modal/Modal.vue.d.ts +43 -0
- package/dist/runtime/app/components/Navbar/Navbar.d.vue.ts +45 -0
- package/dist/runtime/app/components/Navbar/Navbar.theme.d.ts +31 -0
- package/dist/runtime/app/components/Navbar/Navbar.theme.js +32 -0
- package/dist/runtime/app/components/Navbar/Navbar.vue +47 -0
- package/dist/runtime/app/components/Navbar/Navbar.vue.d.ts +45 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.d.vue.ts +38 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.theme.d.ts +32 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.theme.js +35 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.vue +187 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.vue.d.ts +38 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.d.vue.ts +31 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.theme.d.ts +26 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.theme.js +27 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue +236 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue.d.ts +31 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.d.vue.ts +14 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.theme.d.ts +9 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.theme.js +10 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.vue +81 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.vue.d.ts +14 -0
- package/dist/runtime/app/components/Page/Page.d.vue.ts +40 -0
- package/dist/runtime/app/components/Page/Page.theme.d.ts +32 -0
- package/dist/runtime/app/components/Page/Page.theme.js +31 -0
- package/dist/runtime/app/components/Page/Page.vue +132 -0
- package/dist/runtime/app/components/Page/Page.vue.d.ts +40 -0
- package/dist/runtime/app/components/Pagination/Pagination.d.vue.ts +33 -0
- package/dist/runtime/app/components/Pagination/Pagination.theme.d.ts +13 -0
- package/dist/runtime/app/components/Pagination/Pagination.theme.js +14 -0
- package/dist/runtime/app/components/Pagination/Pagination.vue +129 -0
- package/dist/runtime/app/components/Pagination/Pagination.vue.d.ts +33 -0
- package/dist/runtime/app/components/Slideover/Slideover.d.vue.ts +43 -0
- package/dist/runtime/app/components/Slideover/Slideover.theme.d.ts +35 -0
- package/dist/runtime/app/components/Slideover/Slideover.theme.js +24 -0
- package/dist/runtime/app/components/Slideover/Slideover.vue +58 -0
- package/dist/runtime/app/components/Slideover/Slideover.vue.d.ts +43 -0
- package/dist/runtime/app/components/State/State.d.vue.ts +14 -0
- package/dist/runtime/app/components/State/State.theme.d.ts +19 -0
- package/dist/runtime/app/components/State/State.theme.js +26 -0
- package/dist/runtime/app/components/State/State.vue +66 -0
- package/dist/runtime/app/components/State/State.vue.d.ts +14 -0
- package/dist/runtime/app/components/Table/Table.d.vue.ts +80 -0
- package/dist/runtime/app/components/Table/Table.theme.d.ts +50 -0
- package/dist/runtime/app/components/Table/Table.theme.js +64 -0
- package/dist/runtime/app/components/Table/Table.vue +483 -0
- package/dist/runtime/app/components/Table/Table.vue.d.ts +80 -0
- package/dist/runtime/app/components/Table/internal/CellBadge/CellBadge.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellBadge/CellBadge.vue +26 -0
- package/dist/runtime/app/components/Table/internal/CellBadge/CellBadge.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.theme.d.ts +21 -0
- package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.theme.js +11 -0
- package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue +32 -0
- package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.theme.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.theme.js +4 -0
- package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.vue +16 -0
- package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellDate/CellDate.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellDate/CellDate.theme.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellDate/CellDate.theme.js +4 -0
- package/dist/runtime/app/components/Table/internal/CellDate/CellDate.vue +21 -0
- package/dist/runtime/app/components/Table/internal/CellDate/CellDate.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellImage/CellImage.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellImage/CellImage.vue +24 -0
- package/dist/runtime/app/components/Table/internal/CellImage/CellImage.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.theme.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.theme.js +4 -0
- package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.vue +17 -0
- package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellText/CellText.d.vue.ts +5 -0
- package/dist/runtime/app/components/Table/internal/CellText/CellText.theme.d.ts +13 -0
- package/dist/runtime/app/components/Table/internal/CellText/CellText.theme.js +11 -0
- package/dist/runtime/app/components/Table/internal/CellText/CellText.vue +16 -0
- package/dist/runtime/app/components/Table/internal/CellText/CellText.vue.d.ts +5 -0
- package/dist/runtime/app/components/Table/internal/TableCell/TableCell.d.vue.ts +22 -0
- package/dist/runtime/app/components/Table/internal/TableCell/TableCell.vue +48 -0
- package/dist/runtime/app/components/Table/internal/TableCell/TableCell.vue.d.ts +22 -0
- package/dist/runtime/app/components/Table/internal/column.d.ts +9 -0
- package/dist/runtime/app/components/Table/internal/column.js +5 -0
- package/dist/runtime/app/components/Table/internal/query.d.ts +18 -0
- package/dist/runtime/app/components/Table/internal/query.js +8 -0
- package/dist/runtime/app/components/Table/internal/selection.d.ts +29 -0
- package/dist/runtime/app/components/Table/internal/selection.js +10 -0
- package/dist/runtime/app/components/Table/internal/useVunoTable.d.ts +93 -0
- package/dist/runtime/app/components/Table/internal/useVunoTable.js +153 -0
- package/dist/runtime/app/components/Table/internal/useVunoTableSelection.d.ts +21 -0
- package/dist/runtime/app/components/Table/internal/useVunoTableSelection.js +29 -0
- package/dist/runtime/app/components/Tabs/Tabs.d.vue.ts +49 -0
- package/dist/runtime/app/components/Tabs/Tabs.theme.d.ts +32 -0
- package/dist/runtime/app/components/Tabs/Tabs.theme.js +23 -0
- package/dist/runtime/app/components/Tabs/Tabs.vue +119 -0
- package/dist/runtime/app/components/Tabs/Tabs.vue.d.ts +49 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.d.vue.ts +40 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.theme.d.ts +12 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.theme.js +13 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.vue +139 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.vue.d.ts +40 -0
- package/dist/runtime/app/components/internal/ControlShell/ControlShell.d.vue.ts +41 -0
- package/dist/runtime/app/components/internal/ControlShell/ControlShell.theme.d.ts +50 -0
- package/dist/runtime/app/components/internal/ControlShell/ControlShell.theme.js +38 -0
- package/dist/runtime/app/components/internal/ControlShell/ControlShell.vue +33 -0
- package/dist/runtime/app/components/internal/ControlShell/ControlShell.vue.d.ts +41 -0
- package/dist/runtime/app/components/internal/FieldShell/FieldShell.d.vue.ts +23 -0
- package/dist/runtime/app/components/internal/FieldShell/FieldShell.vue +63 -0
- package/dist/runtime/app/components/internal/FieldShell/FieldShell.vue.d.ts +23 -0
- package/dist/runtime/app/components/internal/Input/Input.d.vue.ts +52 -0
- package/dist/runtime/app/components/internal/Input/Input.theme.d.ts +30 -0
- package/dist/runtime/app/components/internal/Input/Input.theme.js +21 -0
- package/dist/runtime/app/components/internal/Input/Input.vue +66 -0
- package/dist/runtime/app/components/internal/Input/Input.vue.d.ts +52 -0
- package/dist/runtime/app/components/internal/NumberInput/NumberInput.d.vue.ts +36 -0
- package/dist/runtime/app/components/internal/NumberInput/NumberInput.theme.d.ts +31 -0
- package/dist/runtime/app/components/internal/NumberInput/NumberInput.theme.js +26 -0
- package/dist/runtime/app/components/internal/NumberInput/NumberInput.vue +221 -0
- package/dist/runtime/app/components/internal/NumberInput/NumberInput.vue.d.ts +36 -0
- package/dist/runtime/app/components/internal/NumberInput/number.d.ts +42 -0
- package/dist/runtime/app/components/internal/NumberInput/number.js +64 -0
- package/dist/runtime/app/composables/defineShortcuts.d.ts +19 -0
- package/dist/runtime/app/composables/defineShortcuts.js +68 -0
- package/dist/runtime/app/composables/internal/useVunoAnchor.d.ts +45 -0
- package/dist/runtime/app/composables/internal/useVunoAnchor.js +35 -0
- package/dist/runtime/app/composables/internal/useVunoControlGroup.d.ts +17 -0
- package/dist/runtime/app/composables/internal/useVunoControlGroup.js +18 -0
- package/dist/runtime/app/composables/internal/useVunoPortal.d.ts +18 -0
- package/dist/runtime/app/composables/internal/useVunoPortal.js +12 -0
- package/dist/runtime/app/composables/useConfirm.d.ts +15 -0
- package/dist/runtime/app/composables/useConfirm.js +5 -0
- package/dist/runtime/app/composables/useContext.d.ts +11 -0
- package/dist/runtime/app/composables/useContext.js +9 -0
- package/dist/runtime/app/composables/useCrud.d.ts +23 -0
- package/dist/runtime/app/composables/useCrud.js +153 -0
- package/dist/runtime/app/composables/useField.d.ts +10 -0
- package/dist/runtime/app/composables/useField.js +42 -0
- package/dist/runtime/app/composables/useForm.d.ts +5 -0
- package/dist/runtime/app/composables/useForm.js +9 -0
- package/dist/runtime/app/composables/useModal.d.ts +21 -0
- package/dist/runtime/app/composables/useModal.js +24 -0
- package/dist/runtime/app/composables/useOverlay.d.ts +22 -0
- package/dist/runtime/app/composables/useOverlay.js +10 -0
- package/dist/runtime/app/composables/useTableQuery.d.ts +10 -0
- package/dist/runtime/app/composables/useTableQuery.js +126 -0
- package/dist/runtime/app/composables/useTheme.d.ts +31 -0
- package/dist/runtime/app/composables/useTheme.js +29 -0
- package/dist/runtime/app/composables/useToast.d.ts +28 -0
- package/dist/runtime/app/composables/useToast.js +13 -0
- package/dist/runtime/app/internal/keys.d.ts +43 -0
- package/dist/runtime/app/internal/keys.js +8 -0
- package/dist/runtime/app/internal/slots.d.ts +22 -0
- package/dist/runtime/app/internal/slots.js +24 -0
- package/dist/runtime/app/plugins/vue-query.d.ts +8 -0
- package/dist/runtime/app/plugins/vue-query.js +13 -0
- package/dist/runtime/app/theme/icons.d.ts +2 -0
- package/dist/runtime/app/theme/icons.js +43 -0
- package/dist/runtime/app/theme/index.d.ts +1168 -0
- package/dist/runtime/app/theme/index.js +120 -0
- package/dist/runtime/app/theme/messages.d.ts +2 -0
- package/dist/runtime/app/theme/messages.js +70 -0
- package/dist/runtime/app/theme/shared.d.ts +42 -0
- package/dist/runtime/app/theme/shared.js +24 -0
- package/dist/runtime/app/types/alert.d.ts +13 -0
- package/dist/runtime/app/types/alert.js +0 -0
- package/dist/runtime/app/types/app-config.d.ts +8 -0
- package/dist/runtime/app/types/app-config.js +1 -0
- package/dist/runtime/app/types/app.d.ts +83 -0
- package/dist/runtime/app/types/app.js +0 -0
- package/dist/runtime/app/types/base.d.ts +78 -0
- package/dist/runtime/app/types/base.js +0 -0
- package/dist/runtime/app/types/confirm.d.ts +19 -0
- package/dist/runtime/app/types/confirm.js +0 -0
- package/dist/runtime/app/types/crud.d.ts +108 -0
- package/dist/runtime/app/types/crud.js +0 -0
- package/dist/runtime/app/types/field-type.d.ts +4 -0
- package/dist/runtime/app/types/field-type.js +0 -0
- package/dist/runtime/app/types/field.d.ts +233 -0
- package/dist/runtime/app/types/field.js +0 -0
- package/dist/runtime/app/types/form.d.ts +67 -0
- package/dist/runtime/app/types/form.js +0 -0
- package/dist/runtime/app/types/index.d.ts +16 -0
- package/dist/runtime/app/types/index.js +1 -0
- package/dist/runtime/app/types/page.d.ts +61 -0
- package/dist/runtime/app/types/page.js +0 -0
- package/dist/runtime/app/types/responsive.d.ts +8 -0
- package/dist/runtime/app/types/responsive.js +0 -0
- package/dist/runtime/app/types/shortcuts.d.ts +44 -0
- package/dist/runtime/app/types/shortcuts.js +0 -0
- package/dist/runtime/app/types/slots.d.ts +30 -0
- package/dist/runtime/app/types/slots.js +0 -0
- package/dist/runtime/app/types/state.d.ts +35 -0
- package/dist/runtime/app/types/state.js +0 -0
- package/dist/runtime/app/types/table.d.ts +287 -0
- package/dist/runtime/app/types/table.js +0 -0
- package/dist/runtime/app/types/theme.d.ts +251 -0
- package/dist/runtime/app/types/theme.js +0 -0
- package/dist/runtime/app/utils/format.d.ts +18 -0
- package/dist/runtime/app/utils/format.js +36 -0
- package/dist/runtime/app/utils/pagination.d.ts +41 -0
- package/dist/runtime/app/utils/pagination.js +32 -0
- package/dist/runtime/app/utils/path.d.ts +16 -0
- package/dist/runtime/app/utils/path.js +76 -0
- package/dist/runtime/app/utils/query-key.d.ts +20 -0
- package/dist/runtime/app/utils/query-key.js +7 -0
- package/dist/runtime/app/utils/theme.d.ts +44 -0
- package/dist/runtime/app/utils/theme.js +43 -0
- package/dist/types.d.mts +3 -11
- package/package.json +18 -3
- package/dist/module.d.cts +0 -2
package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VunoField } from '#vuno/types/field';
|
|
2
|
+
type Props = {
|
|
3
|
+
field: VunoField;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VunoFieldColumns } from '#vuno/types/field';
|
|
2
|
+
/**
|
|
3
|
+
* `min-w-0` acompaña siempre al `col-span`: un grid item nace con
|
|
4
|
+
* `min-width: auto`, que le impide encoger por debajo de su contenido mínimo
|
|
5
|
+
* y hace que se salga de la pista en contenedores estrechos (un modal, por
|
|
6
|
+
* ejemplo). Sin esto el ancho lo acabaría decidiendo el contenido y no el
|
|
7
|
+
* grid, que es justo lo contrario de lo que persigue el sistema de columnas.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getColumnSpanClass(columns?: VunoFieldColumns): string[];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const spanClasses = {
|
|
2
|
+
xs: {
|
|
3
|
+
1: "col-span-1",
|
|
4
|
+
2: "col-span-2",
|
|
5
|
+
3: "col-span-3",
|
|
6
|
+
4: "col-span-4",
|
|
7
|
+
5: "col-span-5",
|
|
8
|
+
6: "col-span-6",
|
|
9
|
+
7: "col-span-7",
|
|
10
|
+
8: "col-span-8",
|
|
11
|
+
9: "col-span-9",
|
|
12
|
+
10: "col-span-10",
|
|
13
|
+
11: "col-span-11",
|
|
14
|
+
12: "col-span-12"
|
|
15
|
+
},
|
|
16
|
+
sm: {
|
|
17
|
+
1: "@sm:col-span-1",
|
|
18
|
+
2: "@sm:col-span-2",
|
|
19
|
+
3: "@sm:col-span-3",
|
|
20
|
+
4: "@sm:col-span-4",
|
|
21
|
+
5: "@sm:col-span-5",
|
|
22
|
+
6: "@sm:col-span-6",
|
|
23
|
+
7: "@sm:col-span-7",
|
|
24
|
+
8: "@sm:col-span-8",
|
|
25
|
+
9: "@sm:col-span-9",
|
|
26
|
+
10: "@sm:col-span-10",
|
|
27
|
+
11: "@sm:col-span-11",
|
|
28
|
+
12: "@sm:col-span-12"
|
|
29
|
+
},
|
|
30
|
+
md: {
|
|
31
|
+
1: "@md:col-span-1",
|
|
32
|
+
2: "@md:col-span-2",
|
|
33
|
+
3: "@md:col-span-3",
|
|
34
|
+
4: "@md:col-span-4",
|
|
35
|
+
5: "@md:col-span-5",
|
|
36
|
+
6: "@md:col-span-6",
|
|
37
|
+
7: "@md:col-span-7",
|
|
38
|
+
8: "@md:col-span-8",
|
|
39
|
+
9: "@md:col-span-9",
|
|
40
|
+
10: "@md:col-span-10",
|
|
41
|
+
11: "@md:col-span-11",
|
|
42
|
+
12: "@md:col-span-12"
|
|
43
|
+
},
|
|
44
|
+
lg: {
|
|
45
|
+
1: "@lg:col-span-1",
|
|
46
|
+
2: "@lg:col-span-2",
|
|
47
|
+
3: "@lg:col-span-3",
|
|
48
|
+
4: "@lg:col-span-4",
|
|
49
|
+
5: "@lg:col-span-5",
|
|
50
|
+
6: "@lg:col-span-6",
|
|
51
|
+
7: "@lg:col-span-7",
|
|
52
|
+
8: "@lg:col-span-8",
|
|
53
|
+
9: "@lg:col-span-9",
|
|
54
|
+
10: "@lg:col-span-10",
|
|
55
|
+
11: "@lg:col-span-11",
|
|
56
|
+
12: "@lg:col-span-12"
|
|
57
|
+
},
|
|
58
|
+
xl: {
|
|
59
|
+
1: "@xl:col-span-1",
|
|
60
|
+
2: "@xl:col-span-2",
|
|
61
|
+
3: "@xl:col-span-3",
|
|
62
|
+
4: "@xl:col-span-4",
|
|
63
|
+
5: "@xl:col-span-5",
|
|
64
|
+
6: "@xl:col-span-6",
|
|
65
|
+
7: "@xl:col-span-7",
|
|
66
|
+
8: "@xl:col-span-8",
|
|
67
|
+
9: "@xl:col-span-9",
|
|
68
|
+
10: "@xl:col-span-10",
|
|
69
|
+
11: "@xl:col-span-11",
|
|
70
|
+
12: "@xl:col-span-12"
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export function getColumnSpanClass(columns) {
|
|
74
|
+
if (!columns) return ["min-w-0", "col-span-12"];
|
|
75
|
+
if (typeof columns === "number") return ["min-w-0", "col-span-12", spanClasses.md[columns]];
|
|
76
|
+
const classes = ["min-w-0"];
|
|
77
|
+
classes.push(spanClasses.xs[columns.xs ?? 12]);
|
|
78
|
+
if (columns.sm) {
|
|
79
|
+
classes.push(spanClasses.sm[columns.sm]);
|
|
80
|
+
}
|
|
81
|
+
if (columns.md) {
|
|
82
|
+
classes.push(spanClasses.md[columns.md]);
|
|
83
|
+
}
|
|
84
|
+
if (columns.lg) {
|
|
85
|
+
classes.push(spanClasses.lg[columns.lg]);
|
|
86
|
+
}
|
|
87
|
+
if (columns.xl) {
|
|
88
|
+
classes.push(spanClasses.xl[columns.xl]);
|
|
89
|
+
}
|
|
90
|
+
return classes;
|
|
91
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adaptador de [Standard Schema](https://standardschema.dev).
|
|
3
|
+
*
|
|
4
|
+
* El contrato público que implementan zod, valibot y arktype vive en
|
|
5
|
+
* `types/form.ts`; aquí quedan solo la detección y la traducción de errores que
|
|
6
|
+
* usa el motor del formulario.
|
|
7
|
+
*/
|
|
8
|
+
import type { VunoSchema, VunoSchemaIssue } from '#vuno/types/form';
|
|
9
|
+
/** Errores por ruta: `{ 'variants.0.sku': 'El SKU es requerido' }`. */
|
|
10
|
+
export type VunoFormErrors = Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Convierte la ruta de un problema en la que usan los campos.
|
|
13
|
+
*
|
|
14
|
+
* Los índices llegan como números y el contrato admite además objetos `{ key }`,
|
|
15
|
+
* así que se normalizan los tres casos. El resultado tiene que coincidir con el
|
|
16
|
+
* `name` del campo —`variants.0.sku`— o el error no se pintaría en ninguna
|
|
17
|
+
* parte: se vería un formulario que no envía y no dice por qué.
|
|
18
|
+
*/
|
|
19
|
+
export declare function toErrorPath(path: VunoSchemaIssue['path']): string;
|
|
20
|
+
/**
|
|
21
|
+
* Agrupa los problemas por ruta, quedándose con el primero de cada una.
|
|
22
|
+
*
|
|
23
|
+
* Un campo puede incumplir varias reglas a la vez —vacío y además demasiado
|
|
24
|
+
* corto— y enseñarlas todas es ruido: la primera es la que hay que arreglar
|
|
25
|
+
* para avanzar.
|
|
26
|
+
*/
|
|
27
|
+
export declare function toErrorMap(issues: readonly VunoSchemaIssue[] | undefined): VunoFormErrors;
|
|
28
|
+
/** Detecta si algo implementa el contrato, para no llamar a `validate` a ciegas. */
|
|
29
|
+
export declare function isStandardSchema<TValue = unknown>(schema: unknown): schema is VunoSchema<TValue>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function toErrorPath(path) {
|
|
2
|
+
if (!path || path.length === 0) return "";
|
|
3
|
+
return path.map((segment) => String(typeof segment === "object" ? segment.key : segment)).join(".");
|
|
4
|
+
}
|
|
5
|
+
export function toErrorMap(issues) {
|
|
6
|
+
const errors = {};
|
|
7
|
+
for (const issue of issues ?? []) {
|
|
8
|
+
const path = toErrorPath(issue.path);
|
|
9
|
+
errors[path] ??= issue.message;
|
|
10
|
+
}
|
|
11
|
+
return errors;
|
|
12
|
+
}
|
|
13
|
+
export function isStandardSchema(schema) {
|
|
14
|
+
return typeof schema === "object" && schema !== null && "~standard" in schema;
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import type { VunoSchema } from '#vuno/types/form';
|
|
3
|
+
import { type VunoFormErrors } from './standard-schema.js';
|
|
4
|
+
type VunoFormStateOptions<TState extends object> = {
|
|
5
|
+
/** Estado del formulario. Lo posee quien llama, no el motor. */
|
|
6
|
+
state: Ref<TState>;
|
|
7
|
+
/** Cualquier esquema que implemente Standard Schema: zod, valibot, arktype. */
|
|
8
|
+
schema?: () => undefined | VunoSchema;
|
|
9
|
+
};
|
|
10
|
+
type VunoFormEngine<TState extends object> = {
|
|
11
|
+
dirty: ComputedRef<boolean>;
|
|
12
|
+
errors: VunoFormErrors;
|
|
13
|
+
/** Si ya se intentó enviar. Cambia cuándo se valida. */
|
|
14
|
+
submitted: Ref<boolean>;
|
|
15
|
+
submitting: Ref<boolean>;
|
|
16
|
+
touched: Record<string, boolean>;
|
|
17
|
+
/** Marca un campo como visitado; se llama al salir de él. */
|
|
18
|
+
blur: (name: string) => void;
|
|
19
|
+
/** El error de un campo, solo cuando toca enseñarlo. */
|
|
20
|
+
errorFor: (name: string) => string | undefined;
|
|
21
|
+
getValue: <TValue = unknown>(name: string) => TValue | undefined;
|
|
22
|
+
isDirty: (name?: string) => boolean;
|
|
23
|
+
reset: (next?: TState) => void;
|
|
24
|
+
/** Devuelve un campo a su valor de partida, sin tocar el resto. */
|
|
25
|
+
resetField: (name: string) => void;
|
|
26
|
+
setValue: (name: string, value: unknown) => void;
|
|
27
|
+
/** Valida y, si está bien, ejecuta. No ejecuta nada si hay errores. */
|
|
28
|
+
submit: (onValid: (state: TState) => unknown) => Promise<boolean>;
|
|
29
|
+
/** Valida todo. Devuelve si el estado es válido. */
|
|
30
|
+
validate: () => Promise<boolean>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* El motor de un formulario: estado, errores, tocado, sucio y envío.
|
|
34
|
+
*
|
|
35
|
+
* No pinta nada ni conoce ningún componente. Valida contra Standard Schema, que
|
|
36
|
+
* es el contrato que implementan zod, valibot y arktype, así que no ata el
|
|
37
|
+
* módulo a ninguna biblioteca de validación ni la añade como dependencia.
|
|
38
|
+
*
|
|
39
|
+
* Todavía no se auto-importa —vive en `internal/`—: publicarlo congela su forma
|
|
40
|
+
* y antes conviene que lo use algo real.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useVunoFormState<TState extends object>(options: VunoFormStateOptions<TState>): VunoFormEngine<TState>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { computed, reactive, ref, shallowRef } from "vue";
|
|
2
|
+
import { cloneValue, getPath, isEqual, setPath } from "#vuno/utils/path";
|
|
3
|
+
import { isStandardSchema, toErrorMap } from "./standard-schema.js";
|
|
4
|
+
export function useVunoFormState(options) {
|
|
5
|
+
const { state } = options;
|
|
6
|
+
const errors = reactive({});
|
|
7
|
+
const touched = reactive({});
|
|
8
|
+
const submitted = ref(false);
|
|
9
|
+
const submitting = ref(false);
|
|
10
|
+
const initial = shallowRef(cloneValue(state.value));
|
|
11
|
+
const dirty = computed(() => !isEqual(state.value, initial.value));
|
|
12
|
+
const isDirty = (name) => name === void 0 ? dirty.value : !isEqual(getPath(state.value, name), getPath(initial.value, name));
|
|
13
|
+
const getValue = (name) => getPath(state.value, name);
|
|
14
|
+
let lastRun = 0;
|
|
15
|
+
async function runSchema() {
|
|
16
|
+
const schema = options.schema?.();
|
|
17
|
+
if (!isStandardSchema(schema)) return {};
|
|
18
|
+
const run = ++lastRun;
|
|
19
|
+
const result = await schema["~standard"].validate(state.value);
|
|
20
|
+
if (run !== lastRun) return null;
|
|
21
|
+
return toErrorMap(result.issues);
|
|
22
|
+
}
|
|
23
|
+
function replaceErrors(next) {
|
|
24
|
+
for (const key of Object.keys(errors)) delete errors[key];
|
|
25
|
+
Object.assign(errors, next);
|
|
26
|
+
}
|
|
27
|
+
async function validate() {
|
|
28
|
+
let next = await runSchema();
|
|
29
|
+
while (next === null) next = await runSchema();
|
|
30
|
+
replaceErrors(next);
|
|
31
|
+
return Object.keys(errors).length === 0;
|
|
32
|
+
}
|
|
33
|
+
const isRevealed = (name) => submitted.value || touched[name] === true;
|
|
34
|
+
function applyRevealed(next) {
|
|
35
|
+
for (const name of Object.keys(errors)) {
|
|
36
|
+
if (next[name] === void 0 || !isRevealed(name)) delete errors[name];
|
|
37
|
+
}
|
|
38
|
+
for (const [name, message] of Object.entries(next)) {
|
|
39
|
+
if (isRevealed(name)) errors[name] = message;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async function revalidate() {
|
|
43
|
+
if (!submitted.value && Object.keys(touched).length === 0) return;
|
|
44
|
+
const next = await runSchema();
|
|
45
|
+
if (!next) return;
|
|
46
|
+
applyRevealed(next);
|
|
47
|
+
}
|
|
48
|
+
function setValue(name, value) {
|
|
49
|
+
setPath(state.value, name, value);
|
|
50
|
+
void revalidate();
|
|
51
|
+
}
|
|
52
|
+
function blur(name) {
|
|
53
|
+
touched[name] = true;
|
|
54
|
+
void revalidate();
|
|
55
|
+
}
|
|
56
|
+
const errorFor = (name) => isRevealed(name) ? errors[name] : void 0;
|
|
57
|
+
async function submit(onValid) {
|
|
58
|
+
submitted.value = true;
|
|
59
|
+
submitting.value = true;
|
|
60
|
+
try {
|
|
61
|
+
if (!await validate()) return false;
|
|
62
|
+
await onValid(state.value);
|
|
63
|
+
return true;
|
|
64
|
+
} finally {
|
|
65
|
+
submitting.value = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function resetField(name) {
|
|
69
|
+
setPath(state.value, name, cloneValue(getPath(initial.value, name)));
|
|
70
|
+
delete touched[name];
|
|
71
|
+
delete errors[name];
|
|
72
|
+
}
|
|
73
|
+
function reset(next) {
|
|
74
|
+
if (next) state.value = next;
|
|
75
|
+
initial.value = cloneValue(state.value);
|
|
76
|
+
replaceErrors({});
|
|
77
|
+
for (const key of Object.keys(touched)) delete touched[key];
|
|
78
|
+
submitted.value = false;
|
|
79
|
+
}
|
|
80
|
+
return { blur, dirty, errorFor, errors, getValue, isDirty, reset, resetField, setValue, submit, submitted, submitting, touched, validate };
|
|
81
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { VunoSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoFieldOrientation } from '#vuno/types/field';
|
|
3
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
4
|
+
type Props = {
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
help?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
orientation?: VunoFieldOrientation;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
size?: VunoSize;
|
|
14
|
+
ui?: VunoUi<'formField'>;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string | undefined;
|
|
19
|
+
'aria-describedby': string | undefined;
|
|
20
|
+
'aria-invalid': boolean | undefined;
|
|
21
|
+
'aria-required': boolean | undefined;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
default?: (props: typeof __VLS_1) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export declare const formFieldTheme: Record<"formField", {
|
|
2
|
+
readonly slots: {
|
|
3
|
+
readonly content: "flex min-w-0 flex-col gap-1";
|
|
4
|
+
readonly control: "flex min-w-0 flex-col gap-1";
|
|
5
|
+
readonly description: "text-vuno-muted";
|
|
6
|
+
readonly error: "text-vuno-error";
|
|
7
|
+
readonly help: "text-vuno-muted";
|
|
8
|
+
readonly hint: "text-vuno-muted";
|
|
9
|
+
readonly label: "font-medium text-vuno-strong";
|
|
10
|
+
readonly labelRow: "flex items-center justify-between gap-2";
|
|
11
|
+
readonly required: "text-vuno-error";
|
|
12
|
+
readonly root: "grid w-full min-w-0 gap-1";
|
|
13
|
+
};
|
|
14
|
+
readonly variants: {
|
|
15
|
+
readonly orientation: {
|
|
16
|
+
readonly horizontal: {
|
|
17
|
+
readonly content: "pt-2";
|
|
18
|
+
readonly root: "grid-cols-[minmax(8rem,1fr)_minmax(0,2fr)] items-start gap-x-4";
|
|
19
|
+
};
|
|
20
|
+
readonly vertical: {
|
|
21
|
+
readonly root: "grid-cols-1";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
readonly size: {
|
|
25
|
+
readonly xs: {
|
|
26
|
+
readonly description: "text-xs";
|
|
27
|
+
readonly error: "text-xs";
|
|
28
|
+
readonly help: "text-xs";
|
|
29
|
+
readonly hint: "text-xs";
|
|
30
|
+
readonly label: "text-xs";
|
|
31
|
+
};
|
|
32
|
+
readonly sm: {
|
|
33
|
+
readonly description: "text-xs";
|
|
34
|
+
readonly error: "text-xs";
|
|
35
|
+
readonly help: "text-xs";
|
|
36
|
+
readonly hint: "text-xs";
|
|
37
|
+
readonly label: "text-xs";
|
|
38
|
+
};
|
|
39
|
+
readonly md: {
|
|
40
|
+
readonly description: "text-xs";
|
|
41
|
+
readonly error: "text-xs";
|
|
42
|
+
readonly help: "text-xs";
|
|
43
|
+
readonly hint: "text-xs";
|
|
44
|
+
readonly label: "text-sm";
|
|
45
|
+
};
|
|
46
|
+
readonly lg: {
|
|
47
|
+
readonly description: "text-sm";
|
|
48
|
+
readonly error: "text-sm";
|
|
49
|
+
readonly help: "text-sm";
|
|
50
|
+
readonly hint: "text-sm";
|
|
51
|
+
readonly label: "text-sm";
|
|
52
|
+
};
|
|
53
|
+
readonly xl: {
|
|
54
|
+
readonly description: "text-sm";
|
|
55
|
+
readonly error: "text-sm";
|
|
56
|
+
readonly help: "text-sm";
|
|
57
|
+
readonly hint: "text-sm";
|
|
58
|
+
readonly label: "text-base";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineTheme } from "#vuno/utils/theme";
|
|
2
|
+
export const formFieldTheme = defineTheme("formField", {
|
|
3
|
+
slots: {
|
|
4
|
+
content: "flex min-w-0 flex-col gap-1",
|
|
5
|
+
control: "flex min-w-0 flex-col gap-1",
|
|
6
|
+
description: "text-vuno-muted",
|
|
7
|
+
error: "text-vuno-error",
|
|
8
|
+
help: "text-vuno-muted",
|
|
9
|
+
hint: "text-vuno-muted",
|
|
10
|
+
label: "font-medium text-vuno-strong",
|
|
11
|
+
labelRow: "flex items-center justify-between gap-2",
|
|
12
|
+
required: "text-vuno-error",
|
|
13
|
+
root: "grid w-full min-w-0 gap-1"
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
orientation: {
|
|
17
|
+
horizontal: { content: "pt-2", root: "grid-cols-[minmax(8rem,1fr)_minmax(0,2fr)] items-start gap-x-4" },
|
|
18
|
+
vertical: { root: "grid-cols-1" }
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
xs: { description: "text-xs", error: "text-xs", help: "text-xs", hint: "text-xs", label: "text-xs" },
|
|
22
|
+
sm: { description: "text-xs", error: "text-xs", help: "text-xs", hint: "text-xs", label: "text-xs" },
|
|
23
|
+
md: { description: "text-xs", error: "text-xs", help: "text-xs", hint: "text-xs", label: "text-sm" },
|
|
24
|
+
lg: { description: "text-sm", error: "text-sm", help: "text-sm", hint: "text-sm", label: "text-sm" },
|
|
25
|
+
xl: { description: "text-sm", error: "text-sm", help: "text-sm", hint: "text-sm", label: "text-base" }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useId } from "vue";
|
|
3
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
4
|
+
defineOptions({ name: "VunoFormField" });
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
name: { type: String, required: false },
|
|
7
|
+
description: { type: String, required: false },
|
|
8
|
+
error: { type: String, required: false },
|
|
9
|
+
help: { type: String, required: false },
|
|
10
|
+
hint: { type: String, required: false },
|
|
11
|
+
label: { type: String, required: false },
|
|
12
|
+
orientation: { type: String, required: false },
|
|
13
|
+
required: { type: Boolean, required: false },
|
|
14
|
+
size: { type: String, required: false },
|
|
15
|
+
ui: { type: Object, required: false }
|
|
16
|
+
});
|
|
17
|
+
const uid = useId();
|
|
18
|
+
const size = computed(() => props.size ?? "md");
|
|
19
|
+
const orientation = computed(() => props.orientation ?? "vertical");
|
|
20
|
+
const controlId = computed(() => `${uid}-control`);
|
|
21
|
+
const descriptionId = computed(() => `${uid}-description`);
|
|
22
|
+
const errorId = computed(() => `${uid}-error`);
|
|
23
|
+
const helpId = computed(() => `${uid}-help`);
|
|
24
|
+
const hintId = computed(() => `${uid}-hint`);
|
|
25
|
+
const describedBy = computed(() => {
|
|
26
|
+
const ids = [props.error && errorId.value, props.hint && hintId.value, props.description && descriptionId.value, !props.error && props.help && helpId.value].filter(Boolean);
|
|
27
|
+
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
28
|
+
});
|
|
29
|
+
const control = computed(() => ({
|
|
30
|
+
id: controlId.value,
|
|
31
|
+
name: props.name,
|
|
32
|
+
"aria-describedby": describedBy.value,
|
|
33
|
+
"aria-invalid": props.error ? true : void 0,
|
|
34
|
+
"aria-required": props.required ? true : void 0,
|
|
35
|
+
required: props.required
|
|
36
|
+
}));
|
|
37
|
+
const classes = useTheme(
|
|
38
|
+
"formField",
|
|
39
|
+
() => props.ui,
|
|
40
|
+
() => ({ orientation: orientation.value, size: size.value })
|
|
41
|
+
);
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div :class="classes.root">
|
|
46
|
+
<div :class="classes.content">
|
|
47
|
+
<div
|
|
48
|
+
v-if="props.label || props.hint"
|
|
49
|
+
:class="classes.labelRow"
|
|
50
|
+
>
|
|
51
|
+
<!--
|
|
52
|
+
La etiqueta apunta al control por `for`/`id` y no lo envuelve:
|
|
53
|
+
envolver también funciona con un `<input>`, pero no con un
|
|
54
|
+
control compuesto, y aquí dentro puede haber cualquiera.
|
|
55
|
+
-->
|
|
56
|
+
<label
|
|
57
|
+
v-if="props.label"
|
|
58
|
+
:class="classes.label"
|
|
59
|
+
:for="controlId"
|
|
60
|
+
>
|
|
61
|
+
{{ props.label }}
|
|
62
|
+
<!--
|
|
63
|
+
El asterisco es decoración y se oculta al lector: quien no
|
|
64
|
+
ve la pantalla se entera de que el campo es obligatorio por
|
|
65
|
+
`required` en el control, que es lo que el navegador y el
|
|
66
|
+
lector entienden. Anunciar «asterisco» no informa de nada.
|
|
67
|
+
-->
|
|
68
|
+
<span
|
|
69
|
+
v-if="props.required"
|
|
70
|
+
aria-hidden="true"
|
|
71
|
+
:class="classes.required"
|
|
72
|
+
>*</span
|
|
73
|
+
>
|
|
74
|
+
</label>
|
|
75
|
+
|
|
76
|
+
<span
|
|
77
|
+
v-if="props.hint"
|
|
78
|
+
:id="hintId"
|
|
79
|
+
:class="classes.hint"
|
|
80
|
+
>{{ props.hint }}</span
|
|
81
|
+
>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<p
|
|
85
|
+
v-if="props.description"
|
|
86
|
+
:id="descriptionId"
|
|
87
|
+
:class="classes.description"
|
|
88
|
+
>
|
|
89
|
+
{{ props.description }}
|
|
90
|
+
</p>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div :class="classes.control">
|
|
94
|
+
<slot v-bind="control" />
|
|
95
|
+
|
|
96
|
+
<!--
|
|
97
|
+
El error se pinta siempre, aunque esté vacío, porque una región en
|
|
98
|
+
vivo solo anuncia lo que aparece **dentro** de ella: si el elemento
|
|
99
|
+
nace con el texto ya puesto, el lector no lee nada. Vacío se va a
|
|
100
|
+
`sr-only`, que al ser absoluto no ocupa ni cuenta como item del
|
|
101
|
+
grid, así que no deja hueco.
|
|
102
|
+
|
|
103
|
+
`polite` y no `alert`: los errores llegan al salir del campo o al
|
|
104
|
+
enviar, y un aviso que interrumpe a mitad de frase cada vez que se
|
|
105
|
+
tabula molesta más de lo que ayuda.
|
|
106
|
+
-->
|
|
107
|
+
<p
|
|
108
|
+
:id="errorId"
|
|
109
|
+
aria-live="polite"
|
|
110
|
+
:class="[classes.error, !props.error && 'sr-only']"
|
|
111
|
+
>
|
|
112
|
+
{{ props.error }}
|
|
113
|
+
</p>
|
|
114
|
+
|
|
115
|
+
<p
|
|
116
|
+
v-if="props.help && !props.error"
|
|
117
|
+
:id="helpId"
|
|
118
|
+
:class="classes.help"
|
|
119
|
+
>
|
|
120
|
+
{{ props.help }}
|
|
121
|
+
</p>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { VunoSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoFieldOrientation } from '#vuno/types/field';
|
|
3
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
4
|
+
type Props = {
|
|
5
|
+
name?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
help?: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
orientation?: VunoFieldOrientation;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
size?: VunoSize;
|
|
14
|
+
ui?: VunoUi<'formField'>;
|
|
15
|
+
};
|
|
16
|
+
declare var __VLS_1: {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string | undefined;
|
|
19
|
+
'aria-describedby': string | undefined;
|
|
20
|
+
'aria-invalid': boolean | undefined;
|
|
21
|
+
'aria-required': boolean | undefined;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
default?: (props: typeof __VLS_1) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { VunoModalSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoFormDefinition, VunoFormState, VunoSchema } from '#vuno/types/form';
|
|
3
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
4
|
+
declare const __VLS_export: <TState extends VunoFormState>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
6
|
+
/**
|
|
7
|
+
* Cierra el modal nada más enviar. Déjalo apagado si guardas contra una
|
|
8
|
+
* API: querrás cerrar tú al confirmar, y mientras tanto usar `loading`.
|
|
9
|
+
*/
|
|
10
|
+
closeOnSubmit?: boolean;
|
|
11
|
+
definition: VunoFormDefinition;
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Slots del formulario que va dentro. */
|
|
14
|
+
formUi?: VunoUi<"form">;
|
|
15
|
+
/** Marca el botón de guardar como ocupado y bloquea el cierre. */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Opcional, igual que en `VForm`: cualquier esquema Standard Schema. */
|
|
18
|
+
schema?: VunoSchema;
|
|
19
|
+
/** Ancho del diálogo; el formulario usa `3xl` de forma predeterminada. */
|
|
20
|
+
size?: VunoModalSize;
|
|
21
|
+
title?: string;
|
|
22
|
+
/** Slots del modal (`content`, `body`, ...). */
|
|
23
|
+
ui?: VunoUi<"formModal">;
|
|
24
|
+
} & {
|
|
25
|
+
open?: boolean;
|
|
26
|
+
state: TState;
|
|
27
|
+
}) & {
|
|
28
|
+
onClose?: (() => any) | undefined;
|
|
29
|
+
onSubmit?: ((state: TState) => any) | undefined;
|
|
30
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
"onUpdate:state"?: ((value: TState) => any) | undefined;
|
|
32
|
+
}> & (typeof globalThis extends {
|
|
33
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
34
|
+
} ? P : {});
|
|
35
|
+
expose: (exposed: {}) => void;
|
|
36
|
+
attrs: any;
|
|
37
|
+
slots: {
|
|
38
|
+
/**
|
|
39
|
+
* `formId` es imprescindible, no un extra: el pie del modal vive fuera
|
|
40
|
+
* del `<form>`, así que un botón propio solo puede enviarlo con
|
|
41
|
+
* `:form="formId"`. Sin exponerlo, cualquier pie a medida queda mudo.
|
|
42
|
+
*/
|
|
43
|
+
footer?: (props: {
|
|
44
|
+
dirty: boolean;
|
|
45
|
+
formId: string;
|
|
46
|
+
loading: boolean;
|
|
47
|
+
close: () => void;
|
|
48
|
+
reset: () => void;
|
|
49
|
+
}) => unknown;
|
|
50
|
+
/** Elemento que abre el modal, si prefieres eso a controlar `open`. */
|
|
51
|
+
trigger?: () => unknown;
|
|
52
|
+
};
|
|
53
|
+
emit: (((evt: "close") => void) & ((evt: "submit", state: TState) => void)) & (((event: "update:open", value: boolean) => void) & ((event: "update:state", value: TState) => void));
|
|
54
|
+
}>) => import("vue").VNode & {
|
|
55
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
56
|
+
};
|
|
57
|
+
declare const _default: typeof __VLS_export;
|
|
58
|
+
export default _default;
|
|
59
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
60
|
+
[K in keyof T]: T[K];
|
|
61
|
+
} : {
|
|
62
|
+
[K in keyof T as K]: T[K];
|
|
63
|
+
}) & {};
|