@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const badgeTheme: Record<"badge", {
|
|
2
|
+
readonly slots: {
|
|
3
|
+
readonly base: "inline-flex shrink-0 items-center rounded-sm font-medium";
|
|
4
|
+
};
|
|
5
|
+
readonly variants: {
|
|
6
|
+
readonly color: Record<import("../../types/base.js").VunoColor, Record<"base", string>>;
|
|
7
|
+
readonly radius: Record<import("../../types/base.js").VunoRadius, Record<"base", string>>;
|
|
8
|
+
readonly size: {
|
|
9
|
+
readonly xs: {
|
|
10
|
+
readonly base: "gap-0.5 px-1.5 py-0.5 text-xs";
|
|
11
|
+
};
|
|
12
|
+
readonly sm: {
|
|
13
|
+
readonly base: "gap-1 px-1.5 py-0.5 text-xs";
|
|
14
|
+
};
|
|
15
|
+
readonly md: {
|
|
16
|
+
readonly base: "gap-1 px-2 py-0.5 text-xs";
|
|
17
|
+
};
|
|
18
|
+
readonly lg: {
|
|
19
|
+
readonly base: "gap-1.5 px-2 py-1 text-sm";
|
|
20
|
+
};
|
|
21
|
+
readonly xl: {
|
|
22
|
+
readonly base: "gap-1.5 px-2.5 py-1 text-sm";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly variant: {
|
|
26
|
+
readonly outline: {
|
|
27
|
+
readonly base: "border border-(--vuno-accent) text-(--vuno-accent)";
|
|
28
|
+
};
|
|
29
|
+
readonly soft: {
|
|
30
|
+
readonly base: "bg-(--vuno-accent)/10 text-(--vuno-accent)";
|
|
31
|
+
};
|
|
32
|
+
readonly solid: {
|
|
33
|
+
readonly base: "bg-(--vuno-accent) text-(--vuno-accent-contrast)";
|
|
34
|
+
};
|
|
35
|
+
readonly subtle: {
|
|
36
|
+
readonly base: "bg-(--vuno-accent)/10 text-(--vuno-accent) ring-1 ring-(--vuno-accent)/25 ring-inset";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { accentByColor, radiusByStep } from "#vuno/theme/shared";
|
|
2
|
+
import { defineTheme } from "#vuno/utils/theme";
|
|
3
|
+
export const badgeTheme = defineTheme("badge", {
|
|
4
|
+
slots: { base: "inline-flex shrink-0 items-center rounded-sm font-medium" },
|
|
5
|
+
variants: {
|
|
6
|
+
color: accentByColor("base"),
|
|
7
|
+
radius: radiusByStep("base"),
|
|
8
|
+
size: {
|
|
9
|
+
xs: { base: "gap-0.5 px-1.5 py-0.5 text-xs" },
|
|
10
|
+
sm: { base: "gap-1 px-1.5 py-0.5 text-xs" },
|
|
11
|
+
md: { base: "gap-1 px-2 py-0.5 text-xs" },
|
|
12
|
+
lg: { base: "gap-1.5 px-2 py-1 text-sm" },
|
|
13
|
+
xl: { base: "gap-1.5 px-2.5 py-1 text-sm" }
|
|
14
|
+
},
|
|
15
|
+
variant: {
|
|
16
|
+
outline: { base: "border border-(--vuno-accent) text-(--vuno-accent)" },
|
|
17
|
+
soft: { base: "bg-(--vuno-accent)/10 text-(--vuno-accent)" },
|
|
18
|
+
solid: { base: "bg-(--vuno-accent) text-(--vuno-accent-contrast)" },
|
|
19
|
+
subtle: { base: "bg-(--vuno-accent)/10 text-(--vuno-accent) ring-1 ring-(--vuno-accent)/25 ring-inset" }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
3
|
+
defineOptions({ name: "VunoBadge" });
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
color: { type: String, required: false, default: "primary" },
|
|
6
|
+
label: { type: String, required: false, default: void 0 },
|
|
7
|
+
radius: { type: String, required: false, default: void 0 },
|
|
8
|
+
size: { type: String, required: false, default: "md" },
|
|
9
|
+
ui: { type: Object, required: false, default: void 0 },
|
|
10
|
+
variant: { type: String, required: false, default: "solid" }
|
|
11
|
+
});
|
|
12
|
+
const ui = useTheme(
|
|
13
|
+
"badge",
|
|
14
|
+
() => props.ui,
|
|
15
|
+
() => ({
|
|
16
|
+
color: props.color,
|
|
17
|
+
radius: props.radius,
|
|
18
|
+
size: props.size,
|
|
19
|
+
variant: props.variant
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<span :class="ui.base">
|
|
26
|
+
<slot>{{ props.label }}</slot>
|
|
27
|
+
</span>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { VunoColor, VunoRadius, VunoSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
3
|
+
/**
|
|
4
|
+
* Una etiqueta de estado: el estado de una fila, el contador de filtros
|
|
5
|
+
* activos, el resumen de un filtro puesto.
|
|
6
|
+
*
|
|
7
|
+
* No es un botón ni lleva acción propia. Cuando algo dentro sí la lleva
|
|
8
|
+
* —la cruz que quita un filtro— va en el slot, para que el elemento que se
|
|
9
|
+
* pulsa sea ese y no la etiqueta entera.
|
|
10
|
+
*/
|
|
11
|
+
type VunoBadgeVariant = 'outline' | 'soft' | 'solid' | 'subtle';
|
|
12
|
+
type Props = {
|
|
13
|
+
color?: VunoColor;
|
|
14
|
+
label?: string;
|
|
15
|
+
/** La curvatura. Sin valor, la que traiga el tema. */
|
|
16
|
+
radius?: VunoRadius;
|
|
17
|
+
size?: VunoSize;
|
|
18
|
+
ui?: VunoUi<'badge'>;
|
|
19
|
+
variant?: VunoBadgeVariant;
|
|
20
|
+
};
|
|
21
|
+
declare var __VLS_1: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_1) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
26
|
+
color: VunoColor;
|
|
27
|
+
radius: VunoRadius;
|
|
28
|
+
size: VunoSize;
|
|
29
|
+
variant: VunoBadgeVariant;
|
|
30
|
+
label: string;
|
|
31
|
+
ui: VunoUi<"badge">;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { VunoColor, VunoRadius, VunoSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
3
|
+
type VunoButtonVariant = 'ghost' | 'link' | 'outline' | 'soft' | 'solid';
|
|
4
|
+
type Props = {
|
|
5
|
+
color?: VunoColor;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Nombre Iconify, como los de `useIcons`. */
|
|
8
|
+
icon?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Bloquea el botón y sustituye el icono por un giro. */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
/** La curvatura. Sin valor, la que traiga el tema. */
|
|
13
|
+
radius?: VunoRadius;
|
|
14
|
+
size?: VunoSize;
|
|
15
|
+
/** El icono va detrás de la etiqueta en vez de delante. */
|
|
16
|
+
trailing?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `button` a propósito, y no `submit`: un botón dentro de un
|
|
19
|
+
* formulario que no diga lo que es lo envía al pulsarlo, y eso
|
|
20
|
+
* convierte cualquier acción secundaria en un envío accidental.
|
|
21
|
+
*/
|
|
22
|
+
type?: 'button' | 'reset' | 'submit';
|
|
23
|
+
ui?: VunoUi<'button'>;
|
|
24
|
+
variant?: VunoButtonVariant;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {
|
|
27
|
+
/** Contenido en lugar de la etiqueta. */
|
|
28
|
+
default?: () => unknown;
|
|
29
|
+
/** Va después de todo lo demás; la tabla mete ahí su contador. */
|
|
30
|
+
trailing?: () => unknown;
|
|
31
|
+
};
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
33
|
+
color: VunoColor;
|
|
34
|
+
icon: string;
|
|
35
|
+
radius: VunoRadius;
|
|
36
|
+
size: VunoSize;
|
|
37
|
+
variant: VunoButtonVariant;
|
|
38
|
+
label: string;
|
|
39
|
+
type: "button" | "reset" | "submit";
|
|
40
|
+
ui: VunoUi<"button">;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const buttonTheme: Record<"button", {
|
|
2
|
+
/**
|
|
3
|
+
* El botón, y el primer componente propio del que todo lo demás cuelga.
|
|
4
|
+
*
|
|
5
|
+
* Las combinaciones no se escriben: la dimensión `color` solo asigna las
|
|
6
|
+
* variables de acento y la dimensión `variant` las consume, así que siete
|
|
7
|
+
* colores y cinco variantes son doce entradas en vez de treinta y cinco.
|
|
8
|
+
* `shape` no depende del tamaño porque un `aspect-square` ya cuadra la
|
|
9
|
+
* altura que haya puesto `size`.
|
|
10
|
+
*/
|
|
11
|
+
readonly slots: {
|
|
12
|
+
readonly base: "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--vuno-accent) disabled:pointer-events-none disabled:opacity-50";
|
|
13
|
+
readonly icon: "shrink-0";
|
|
14
|
+
/**
|
|
15
|
+
* Caja y no texto suelto: el contenido del slot puede ser cualquier
|
|
16
|
+
* cosa —la muestra de color del campo es un `span` con `size-4`— y
|
|
17
|
+
* dentro de un envoltorio en línea el ancho y el alto no se aplican.
|
|
18
|
+
* Con una muestra de 16 px dio 2, que era solo su borde.
|
|
19
|
+
*/
|
|
20
|
+
readonly label: "inline-flex items-center";
|
|
21
|
+
/** El giro se dibuja con un borde: un icono más sería otra descarga. */
|
|
22
|
+
readonly spinner: "shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent";
|
|
23
|
+
};
|
|
24
|
+
readonly variants: {
|
|
25
|
+
readonly color: Record<import("../../types/base.js").VunoColor, Record<"base", string>>;
|
|
26
|
+
readonly groupOrientation: {
|
|
27
|
+
readonly horizontal: {
|
|
28
|
+
readonly base: "not-last:not-first:rounded-none not-only:first:rounded-e-none not-only:last:rounded-s-none focus-visible:z-1";
|
|
29
|
+
};
|
|
30
|
+
readonly vertical: {
|
|
31
|
+
readonly base: "not-last:not-first:rounded-none not-only:first:rounded-b-none not-only:last:rounded-t-none focus-visible:z-1";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly radius: Record<import("../../types/base.js").VunoRadius, Record<"base", string>>;
|
|
35
|
+
/**
|
|
36
|
+
* Sin etiqueta el botón es cuadrado, y eso sí combina con el
|
|
37
|
+
* tamaño: por eso `size` publica su altura en una variable y aquí
|
|
38
|
+
* se consume como ancho. Escribirlo con `aspect-square` parecía
|
|
39
|
+
* bastar y no basta —un `inline-flex` de ancho automático lo
|
|
40
|
+
* ensancha el relleno lateral—, y fijar el ancho por valor
|
|
41
|
+
* devolvería las cinco combinaciones.
|
|
42
|
+
*/
|
|
43
|
+
readonly shape: {
|
|
44
|
+
readonly square: {
|
|
45
|
+
readonly base: "w-(--vuno-button-size) px-0";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
readonly size: {
|
|
49
|
+
readonly xs: {
|
|
50
|
+
readonly base: "h-(--vuno-button-size) gap-1 px-2 text-xs [--vuno-button-size:1.5rem]";
|
|
51
|
+
readonly icon: "size-3.5";
|
|
52
|
+
};
|
|
53
|
+
readonly sm: {
|
|
54
|
+
readonly base: "h-(--vuno-button-size) gap-1.5 px-2.5 text-sm [--vuno-button-size:1.75rem]";
|
|
55
|
+
readonly icon: "size-4";
|
|
56
|
+
};
|
|
57
|
+
readonly md: {
|
|
58
|
+
readonly base: "h-(--vuno-button-size) gap-1.5 px-3 text-sm [--vuno-button-size:2rem]";
|
|
59
|
+
readonly icon: "size-4";
|
|
60
|
+
};
|
|
61
|
+
readonly lg: {
|
|
62
|
+
readonly base: "h-(--vuno-button-size) gap-2 px-3.5 text-base [--vuno-button-size:2.25rem]";
|
|
63
|
+
readonly icon: "size-5";
|
|
64
|
+
};
|
|
65
|
+
readonly xl: {
|
|
66
|
+
readonly base: "h-(--vuno-button-size) gap-2 px-4 text-base [--vuno-button-size:2.5rem]";
|
|
67
|
+
readonly icon: "size-5";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly variant: {
|
|
71
|
+
readonly ghost: {
|
|
72
|
+
readonly base: "text-(--vuno-accent) hover:bg-(--vuno-accent)/10";
|
|
73
|
+
};
|
|
74
|
+
readonly link: {
|
|
75
|
+
readonly base: "text-(--vuno-accent) hover:underline";
|
|
76
|
+
};
|
|
77
|
+
readonly outline: {
|
|
78
|
+
readonly base: "border border-(--vuno-accent) text-(--vuno-accent) hover:bg-(--vuno-accent)/10";
|
|
79
|
+
};
|
|
80
|
+
readonly soft: {
|
|
81
|
+
readonly base: "bg-(--vuno-accent)/10 text-(--vuno-accent) hover:bg-(--vuno-accent)/20";
|
|
82
|
+
};
|
|
83
|
+
readonly solid: {
|
|
84
|
+
readonly base: "bg-(--vuno-accent) text-(--vuno-accent-contrast) hover:bg-(--vuno-accent)/90";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { accentByColor, radiusByStep } from "#vuno/theme/shared";
|
|
2
|
+
import { defineTheme } from "#vuno/utils/theme";
|
|
3
|
+
export const buttonTheme = defineTheme("button", {
|
|
4
|
+
/**
|
|
5
|
+
* El botón, y el primer componente propio del que todo lo demás cuelga.
|
|
6
|
+
*
|
|
7
|
+
* Las combinaciones no se escriben: la dimensión `color` solo asigna las
|
|
8
|
+
* variables de acento y la dimensión `variant` las consume, así que siete
|
|
9
|
+
* colores y cinco variantes son doce entradas en vez de treinta y cinco.
|
|
10
|
+
* `shape` no depende del tamaño porque un `aspect-square` ya cuadra la
|
|
11
|
+
* altura que haya puesto `size`.
|
|
12
|
+
*/
|
|
13
|
+
slots: {
|
|
14
|
+
base: "inline-flex shrink-0 cursor-pointer items-center justify-center rounded-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--vuno-accent) disabled:pointer-events-none disabled:opacity-50",
|
|
15
|
+
icon: "shrink-0",
|
|
16
|
+
/**
|
|
17
|
+
* Caja y no texto suelto: el contenido del slot puede ser cualquier
|
|
18
|
+
* cosa —la muestra de color del campo es un `span` con `size-4`— y
|
|
19
|
+
* dentro de un envoltorio en línea el ancho y el alto no se aplican.
|
|
20
|
+
* Con una muestra de 16 px dio 2, que era solo su borde.
|
|
21
|
+
*/
|
|
22
|
+
label: "inline-flex items-center",
|
|
23
|
+
/** El giro se dibuja con un borde: un icono más sería otra descarga. */
|
|
24
|
+
spinner: "shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
color: accentByColor("base"),
|
|
28
|
+
groupOrientation: {
|
|
29
|
+
horizontal: { base: "not-last:not-first:rounded-none not-only:first:rounded-e-none not-only:last:rounded-s-none focus-visible:z-1" },
|
|
30
|
+
vertical: { base: "not-last:not-first:rounded-none not-only:first:rounded-b-none not-only:last:rounded-t-none focus-visible:z-1" }
|
|
31
|
+
},
|
|
32
|
+
radius: radiusByStep("base"),
|
|
33
|
+
/**
|
|
34
|
+
* Sin etiqueta el botón es cuadrado, y eso sí combina con el
|
|
35
|
+
* tamaño: por eso `size` publica su altura en una variable y aquí
|
|
36
|
+
* se consume como ancho. Escribirlo con `aspect-square` parecía
|
|
37
|
+
* bastar y no basta —un `inline-flex` de ancho automático lo
|
|
38
|
+
* ensancha el relleno lateral—, y fijar el ancho por valor
|
|
39
|
+
* devolvería las cinco combinaciones.
|
|
40
|
+
*/
|
|
41
|
+
shape: {
|
|
42
|
+
square: { base: "w-(--vuno-button-size) px-0" }
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
xs: { base: "h-(--vuno-button-size) gap-1 px-2 text-xs [--vuno-button-size:1.5rem]", icon: "size-3.5" },
|
|
46
|
+
sm: { base: "h-(--vuno-button-size) gap-1.5 px-2.5 text-sm [--vuno-button-size:1.75rem]", icon: "size-4" },
|
|
47
|
+
md: { base: "h-(--vuno-button-size) gap-1.5 px-3 text-sm [--vuno-button-size:2rem]", icon: "size-4" },
|
|
48
|
+
lg: { base: "h-(--vuno-button-size) gap-2 px-3.5 text-base [--vuno-button-size:2.25rem]", icon: "size-5" },
|
|
49
|
+
xl: { base: "h-(--vuno-button-size) gap-2 px-4 text-base [--vuno-button-size:2.5rem]", icon: "size-5" }
|
|
50
|
+
},
|
|
51
|
+
variant: {
|
|
52
|
+
ghost: { base: "text-(--vuno-accent) hover:bg-(--vuno-accent)/10" },
|
|
53
|
+
link: { base: "text-(--vuno-accent) hover:underline" },
|
|
54
|
+
outline: { base: "border border-(--vuno-accent) text-(--vuno-accent) hover:bg-(--vuno-accent)/10" },
|
|
55
|
+
soft: { base: "bg-(--vuno-accent)/10 text-(--vuno-accent) hover:bg-(--vuno-accent)/20" },
|
|
56
|
+
solid: { base: "bg-(--vuno-accent) text-(--vuno-accent-contrast) hover:bg-(--vuno-accent)/90" }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useVunoControlGroup } from "#vuno/composables/internal/useVunoControlGroup";
|
|
4
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
5
|
+
import Icon from "#vuno/components/Icon/Icon.vue";
|
|
6
|
+
defineOptions({ name: "VunoButton" });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
color: { type: String, required: false, default: "primary" },
|
|
9
|
+
disabled: { type: Boolean, required: false },
|
|
10
|
+
icon: { type: String, required: false, default: void 0 },
|
|
11
|
+
label: { type: String, required: false, default: void 0 },
|
|
12
|
+
loading: { type: Boolean, required: false },
|
|
13
|
+
radius: { type: String, required: false, default: void 0 },
|
|
14
|
+
size: { type: String, required: false, default: void 0 },
|
|
15
|
+
trailing: { type: Boolean, required: false },
|
|
16
|
+
type: { type: String, required: false, default: "button" },
|
|
17
|
+
ui: { type: Object, required: false, default: void 0 },
|
|
18
|
+
variant: { type: String, required: false, default: "solid" }
|
|
19
|
+
});
|
|
20
|
+
const slots = defineSlots();
|
|
21
|
+
const hasContent = computed(() => Boolean(props.label) || Boolean(slots.default));
|
|
22
|
+
const controlGroup = useVunoControlGroup();
|
|
23
|
+
const size = computed(() => props.size ?? controlGroup.size.value ?? "md");
|
|
24
|
+
const isDisabled = computed(() => Boolean(props.disabled) || Boolean(props.loading));
|
|
25
|
+
const ui = useTheme(
|
|
26
|
+
"button",
|
|
27
|
+
() => props.ui,
|
|
28
|
+
() => ({
|
|
29
|
+
color: props.color,
|
|
30
|
+
groupOrientation: controlGroup.orientation.value,
|
|
31
|
+
radius: props.radius,
|
|
32
|
+
shape: hasContent.value ? void 0 : "square",
|
|
33
|
+
size: size.value,
|
|
34
|
+
variant: props.variant
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<button
|
|
41
|
+
:aria-busy="props.loading ? 'true' : void 0"
|
|
42
|
+
:class="ui.base"
|
|
43
|
+
:disabled="isDisabled"
|
|
44
|
+
:type="props.type"
|
|
45
|
+
>
|
|
46
|
+
<!--
|
|
47
|
+
El giro ocupa el sitio del icono en vez de añadirse: si se sumara, el
|
|
48
|
+
botón cambiaría de ancho al pulsarlo y el puntero acabaría sobre otra
|
|
49
|
+
cosa.
|
|
50
|
+
-->
|
|
51
|
+
<span
|
|
52
|
+
v-if="props.loading"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
:class="[ui.icon, ui.spinner]"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<Icon
|
|
58
|
+
v-else-if="props.icon && !props.trailing"
|
|
59
|
+
:class="ui.icon"
|
|
60
|
+
:name="props.icon"
|
|
61
|
+
/>
|
|
62
|
+
|
|
63
|
+
<span
|
|
64
|
+
v-if="hasContent"
|
|
65
|
+
:class="ui.label"
|
|
66
|
+
>
|
|
67
|
+
<slot>{{ props.label }}</slot>
|
|
68
|
+
</span>
|
|
69
|
+
|
|
70
|
+
<Icon
|
|
71
|
+
v-if="props.icon && props.trailing && !props.loading"
|
|
72
|
+
:class="ui.icon"
|
|
73
|
+
:name="props.icon"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<slot name="trailing" />
|
|
77
|
+
</button>
|
|
78
|
+
</template>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { VunoColor, VunoRadius, VunoSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
3
|
+
type VunoButtonVariant = 'ghost' | 'link' | 'outline' | 'soft' | 'solid';
|
|
4
|
+
type Props = {
|
|
5
|
+
color?: VunoColor;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Nombre Iconify, como los de `useIcons`. */
|
|
8
|
+
icon?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Bloquea el botón y sustituye el icono por un giro. */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
/** La curvatura. Sin valor, la que traiga el tema. */
|
|
13
|
+
radius?: VunoRadius;
|
|
14
|
+
size?: VunoSize;
|
|
15
|
+
/** El icono va detrás de la etiqueta en vez de delante. */
|
|
16
|
+
trailing?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `button` a propósito, y no `submit`: un botón dentro de un
|
|
19
|
+
* formulario que no diga lo que es lo envía al pulsarlo, y eso
|
|
20
|
+
* convierte cualquier acción secundaria en un envío accidental.
|
|
21
|
+
*/
|
|
22
|
+
type?: 'button' | 'reset' | 'submit';
|
|
23
|
+
ui?: VunoUi<'button'>;
|
|
24
|
+
variant?: VunoButtonVariant;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {
|
|
27
|
+
/** Contenido en lugar de la etiqueta. */
|
|
28
|
+
default?: () => unknown;
|
|
29
|
+
/** Va después de todo lo demás; la tabla mete ahí su contador. */
|
|
30
|
+
trailing?: () => unknown;
|
|
31
|
+
};
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
33
|
+
color: VunoColor;
|
|
34
|
+
icon: string;
|
|
35
|
+
radius: VunoRadius;
|
|
36
|
+
size: VunoSize;
|
|
37
|
+
variant: VunoButtonVariant;
|
|
38
|
+
label: string;
|
|
39
|
+
type: "button" | "reset" | "submit";
|
|
40
|
+
ui: VunoUi<"button">;
|
|
41
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { VunoRadius } from '#vuno/types/base';
|
|
3
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
4
|
+
/**
|
|
5
|
+
* Una caja que agrupa contenido, con cabecera y pie opcionales.
|
|
6
|
+
*
|
|
7
|
+
* No estaba y se decidió a propósito que no estuviera: el playground se
|
|
8
|
+
* escribió la suya a mano y el argumento fue que «si algún día vuno ofrece
|
|
9
|
+
* una tarjeta, que sea porque alguien la pida, no porque el banco de pruebas
|
|
10
|
+
* la necesitara». Entra ahora porque la han pedido, y con la forma que el
|
|
11
|
+
* caso real ya tenía: tres regiones apiladas y separadas por una línea.
|
|
12
|
+
*
|
|
13
|
+
* **No es pulsable, y eso es deliberado.** Una tarjeta que se pulsa entera es
|
|
14
|
+
* un botón o un enlace, y disfrazarla deja de serlo para el teclado y para el
|
|
15
|
+
* lector de pantalla. Si hace falta navegar, se envuelve en un `NuxtLink` o
|
|
16
|
+
* se pone un botón dentro, que es lo que hace el playground.
|
|
17
|
+
*/
|
|
18
|
+
type Props = {
|
|
19
|
+
/** La curvatura. Sin valor, la que traiga el tema. */
|
|
20
|
+
radius?: VunoRadius;
|
|
21
|
+
/**
|
|
22
|
+
* El elemento que pinta. `div` de serie; `form` para una tarjeta que
|
|
23
|
+
* se envía, `NuxtLink` para una que navega, `article` o `section`
|
|
24
|
+
* cuando el contenido lo pida.
|
|
25
|
+
*
|
|
26
|
+
* Es la forma correcta de una tarjeta pulsable, y por eso existe.
|
|
27
|
+
* Antes esto decía que una tarjeta que se pulsa entera «es un botón o
|
|
28
|
+
* un enlace, y disfrazarla deja de serlo para el teclado y para el
|
|
29
|
+
* lector de pantalla», con la salida de envolverla en un `NuxtLink`.
|
|
30
|
+
* El aviso sigue siendo cierto sobre el disfraz —un `div` con
|
|
31
|
+
* `@click` no lo arregla ningún `role`—, pero envolver no era la
|
|
32
|
+
* mejor salida: **siéndolo** no hay elemento de más, el foco cae
|
|
33
|
+
* donde debe y el navegador da gratis abrir en otra pestaña, copiar
|
|
34
|
+
* el enlace y anunciarlo como lo que es.
|
|
35
|
+
*
|
|
36
|
+
* Los atributos caen en él: `to` para un enlace, `action` y `method`
|
|
37
|
+
* para un formulario, sin declararlos aquí.
|
|
38
|
+
*
|
|
39
|
+
* **La cadena solo vale para etiquetas nativas.** Para un componente
|
|
40
|
+
* hay que pasar el componente, no su nombre: `:tag="NuxtLink"` con
|
|
41
|
+
* `import { NuxtLink } from '#components'`, nunca `tag="NuxtLink"`.
|
|
42
|
+
* Los componentes de Nuxt se auto-importan en **tiempo de
|
|
43
|
+
* compilación**, así que al resolver una cadena no hay nada
|
|
44
|
+
* registrado que encontrar — y lo que no resuelve se pinta como
|
|
45
|
+
* etiqueta nativa: sale un `<nuxtlink to="…">` literal en el DOM,
|
|
46
|
+
* con todas las clases puestas, sin `href`, sin navegación, sin
|
|
47
|
+
* foco y **sin un solo aviso**. Se ve exactamente igual que una
|
|
48
|
+
* tarjeta enlazada.
|
|
49
|
+
*/
|
|
50
|
+
tag?: Component | string;
|
|
51
|
+
ui?: VunoUi<'card'>;
|
|
52
|
+
/**
|
|
53
|
+
* `outline` para una tarjeta sobre la página: borde y un escalón de
|
|
54
|
+
* elevación. `soft` para una que ya está dentro de algo levantado —un
|
|
55
|
+
* diálogo, un panel—, donde otro borde sobra y lo que distingue es
|
|
56
|
+
* subir otro escalón.
|
|
57
|
+
*
|
|
58
|
+
* `plain` no pinta contenedor: ni fondo ni borde, solo las tres
|
|
59
|
+
* regiones y la línea que las separa. Es para cuando el marco ya lo
|
|
60
|
+
* pone otro —un `<dialog>` con su anillo y su sombra— y repetirlo
|
|
61
|
+
* dentro dibujaría una caja dentro de otra.
|
|
62
|
+
*/
|
|
63
|
+
variant?: 'outline' | 'plain' | 'soft';
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Las tres regiones se pintan solo si se rellenan.
|
|
67
|
+
*
|
|
68
|
+
* Sin esto, una tarjeta con solo cuerpo arrastraría una cabecera vacía con su
|
|
69
|
+
* relleno y su línea divisoria: un hueco y una raya que no separan nada. Se
|
|
70
|
+
* ve raro y no falla, que es el peor modo de fallar.
|
|
71
|
+
*
|
|
72
|
+
* «Rellenada» es que produzca algo y no que esté declarada; lo decide
|
|
73
|
+
* `filled`, que vive en `internal/` porque los layouts necesitan la misma
|
|
74
|
+
* regla y dos copias de una regla divergen.
|
|
75
|
+
*/
|
|
76
|
+
type __VLS_Slots = {
|
|
77
|
+
default?: () => unknown;
|
|
78
|
+
footer?: () => unknown;
|
|
79
|
+
header?: () => unknown;
|
|
80
|
+
};
|
|
81
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
82
|
+
radius: VunoRadius;
|
|
83
|
+
variant: "outline" | "plain" | "soft";
|
|
84
|
+
tag: Component | string;
|
|
85
|
+
ui: VunoUi<"card">;
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
87
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
88
|
+
declare const _default: typeof __VLS_export;
|
|
89
|
+
export default _default;
|
|
90
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
91
|
+
new (): {
|
|
92
|
+
$slots: S;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const cardTheme: Record<"card", {
|
|
2
|
+
/**
|
|
3
|
+
* La tarjeta. Tres regiones apiladas y separadas por una línea, que es la
|
|
4
|
+
* forma que tenía el caso real escrito a mano antes de que existiera.
|
|
5
|
+
*
|
|
6
|
+
* El relleno va en cada región y no en la raíz: con él en la raíz, la línea
|
|
7
|
+
* divisoria no llegaría a los bordes y quedaría flotando en medio.
|
|
8
|
+
*
|
|
9
|
+
* **La raíz lleva anillo de foco desde que existe `tag`.** Con `tag` la
|
|
10
|
+
* tarjeta puede **ser** un enlace o un botón, y entonces recibe el foco.
|
|
11
|
+
*
|
|
12
|
+
* Y aquí hay que decir qué pasaba de verdad, porque lo primero que se
|
|
13
|
+
* escribió en este mismo comentario era falso y lo desmintió la medición.
|
|
14
|
+
* **No se quedaba sin contorno**: quitando las tres clases con el elemento
|
|
15
|
+
* enfocado, el contorno calculado sigue siendo `1px auto` —el del navegador,
|
|
16
|
+
* que el preflight de Tailwind no neutraliza— y con las clases pasa a `2px
|
|
17
|
+
* solid` del acento, con 2px de separación. O sea que el defecto no era una
|
|
18
|
+
* tarjeta invisible al tabular, sino **la única superficie enfocable de vuno
|
|
19
|
+
* que no llevaba el anillo del sistema**: grosor, color y separación
|
|
20
|
+
* distintos de los del botón, el campo y el enlace de la miga, y a merced de
|
|
21
|
+
* lo que pinte cada navegador. Que ya lo era se ve en que el ejemplo de la
|
|
22
|
+
* ficha llevaba el anillo escrito a mano sobre el enlace que la envolvía.
|
|
23
|
+
*
|
|
24
|
+
* Va **siempre puesto y sin variante que lo encienda**, que es lo contrario
|
|
25
|
+
* de lo que pide el reflejo. El motivo es que la condición ya la impone
|
|
26
|
+
* `:focus-visible`: un elemento que no puede recibir el foco no la cumple
|
|
27
|
+
* nunca, así que sobre un `div` las tres clases no pintan nada —medido: con
|
|
28
|
+
* `tag` por defecto la tarjeta ni siquiera es parada del tabulador—. Una
|
|
29
|
+
* variante sería una segunda copia, más débil, de una condición que el CSS
|
|
30
|
+
* ya garantiza, y además tendría que **adivinar** si un `tag` cualquiera es
|
|
31
|
+
* enfocable; se equivocaría justo en el caso peligroso, el de un `div` con
|
|
32
|
+
* un `tabindex` llegado por atributos, dejando sin anillo algo que sí toma
|
|
33
|
+
* el foco.
|
|
34
|
+
*
|
|
35
|
+
* El acento se declara aquí, como en `breadcrumbLink` y en la pestaña: la
|
|
36
|
+
* tarjeta no tiene variantes de color de las que sacarlo, y sin declararlo
|
|
37
|
+
* `outline-(--vuno-accent)` se quedaría con lo que hubiera heredado.
|
|
38
|
+
*/
|
|
39
|
+
readonly slots: {
|
|
40
|
+
readonly body: "p-4 text-vuno-body";
|
|
41
|
+
readonly footer: "p-4";
|
|
42
|
+
readonly header: "p-4 font-semibold text-vuno-strong";
|
|
43
|
+
readonly root: "flex w-full flex-col divide-y divide-vuno-border rounded-sm [--vuno-accent:var(--color-vuno-primary)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--vuno-accent)";
|
|
44
|
+
};
|
|
45
|
+
readonly variants: {
|
|
46
|
+
readonly radius: Record<import("../../types/base.js").VunoRadius, Record<"root", string>>;
|
|
47
|
+
readonly variant: {
|
|
48
|
+
readonly outline: {
|
|
49
|
+
readonly root: "border border-vuno-border bg-vuno-surface-1";
|
|
50
|
+
};
|
|
51
|
+
readonly plain: {};
|
|
52
|
+
readonly soft: {
|
|
53
|
+
readonly root: "bg-vuno-surface-2";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}>;
|