@groupteknology/vuno 2.0.0 → 3.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 +193 -175
- package/dist/module.json +1 -1
- package/dist/module.mjs +7 -1
- package/dist/runtime/app/assets/css/dialog.css +1 -1
- package/dist/runtime/app/assets/css/main.css +1 -1
- package/dist/runtime/app/assets/css/theme.css +1 -1
- package/dist/runtime/app/assets/css/tokens.css +1 -1
- package/dist/runtime/app/components/Alert/Alert.d.vue.ts +2 -2
- package/dist/runtime/app/components/Alert/Alert.theme.d.ts +7 -6
- package/dist/runtime/app/components/Alert/Alert.theme.js +7 -6
- package/dist/runtime/app/components/Alert/Alert.types.d.ts +10 -0
- package/dist/runtime/app/components/Alert/Alert.vue +17 -8
- package/dist/runtime/app/components/Alert/Alert.vue.d.ts +2 -2
- package/dist/runtime/app/components/App/App.d.vue.ts +3 -19
- package/dist/runtime/app/components/App/App.types.d.ts +4 -0
- package/dist/runtime/app/components/App/App.vue +48 -29
- package/dist/runtime/app/components/App/App.vue.d.ts +3 -19
- package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue +2 -3
- package/dist/runtime/app/components/App/internal/Toast/Toast.theme.d.ts +5 -5
- package/dist/runtime/app/components/App/internal/Toast/Toast.theme.js +7 -9
- package/dist/runtime/app/components/App/internal/Toast/Toast.vue +27 -36
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.d.ts +3 -3
- package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.js +3 -3
- package/dist/runtime/app/components/Avatar/Avatar.d.vue.ts +5 -22
- package/dist/runtime/app/components/Avatar/Avatar.types.d.ts +10 -0
- package/dist/runtime/app/components/Avatar/Avatar.types.js +0 -0
- package/dist/runtime/app/components/Avatar/Avatar.vue.d.ts +5 -22
- package/dist/runtime/app/components/Badge/Badge.d.vue.ts +7 -26
- package/dist/runtime/app/components/Badge/Badge.types.d.ts +12 -0
- package/dist/runtime/app/components/Badge/Badge.types.js +0 -0
- package/dist/runtime/app/components/Badge/Badge.vue.d.ts +7 -26
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.d.vue.ts +7 -0
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.theme.d.ts +15 -0
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.theme.js +16 -0
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.types.d.ts +7 -0
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.types.js +0 -0
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.vue +109 -0
- package/dist/runtime/app/components/Breadcrumb/Breadcrumb.vue.d.ts +7 -0
- package/dist/runtime/app/components/Button/Button.d.vue.ts +11 -31
- package/dist/runtime/app/components/Button/Button.theme.d.ts +36 -22
- package/dist/runtime/app/components/Button/Button.theme.js +28 -20
- package/dist/runtime/app/components/Button/Button.types.d.ts +24 -0
- package/dist/runtime/app/components/Button/Button.types.js +0 -0
- package/dist/runtime/app/components/Button/Button.vue +84 -33
- package/dist/runtime/app/components/Button/Button.vue.d.ts +11 -31
- package/dist/runtime/app/components/Card/Card.d.vue.ts +7 -69
- package/dist/runtime/app/components/Card/Card.theme.d.ts +56 -13
- package/dist/runtime/app/components/Card/Card.theme.js +39 -19
- package/dist/runtime/app/components/Card/Card.types.d.ts +12 -0
- package/dist/runtime/app/components/Card/Card.types.js +0 -0
- package/dist/runtime/app/components/Card/Card.vue +17 -11
- package/dist/runtime/app/components/Card/Card.vue.d.ts +7 -69
- package/dist/runtime/app/components/Code/Code.d.vue.ts +3 -13
- package/dist/runtime/app/components/Code/Code.theme.d.ts +1 -1
- package/dist/runtime/app/components/Code/Code.theme.js +1 -1
- package/dist/runtime/app/components/Code/Code.types.d.ts +8 -0
- package/dist/runtime/app/components/Code/Code.types.js +0 -0
- package/dist/runtime/app/components/Code/Code.vue +12 -5
- package/dist/runtime/app/components/Code/Code.vue.d.ts +3 -13
- package/dist/runtime/app/components/Collapsible/Collapsible.d.vue.ts +31 -0
- package/dist/runtime/app/components/Collapsible/Collapsible.theme.d.ts +6 -0
- package/dist/runtime/app/components/Collapsible/Collapsible.theme.js +7 -0
- package/dist/runtime/app/components/Collapsible/Collapsible.types.d.ts +4 -0
- package/dist/runtime/app/components/Collapsible/Collapsible.types.js +0 -0
- package/dist/runtime/app/components/Collapsible/Collapsible.vue +72 -0
- package/dist/runtime/app/components/Collapsible/Collapsible.vue.d.ts +31 -0
- package/dist/runtime/app/components/ColorModeButton/ColorModeButton.d.vue.ts +12 -0
- package/dist/runtime/app/components/ColorModeButton/ColorModeButton.types.d.ts +13 -0
- package/dist/runtime/app/components/ColorModeButton/ColorModeButton.types.js +0 -0
- package/dist/runtime/app/components/ColorModeButton/ColorModeButton.vue +55 -0
- package/dist/runtime/app/components/ColorModeButton/ColorModeButton.vue.d.ts +12 -0
- package/dist/runtime/app/components/Confirm/Confirm.d.vue.ts +2 -6
- package/dist/runtime/app/components/Confirm/Confirm.types.d.ts +6 -0
- package/dist/runtime/app/components/Confirm/Confirm.types.js +0 -0
- package/dist/runtime/app/components/Confirm/Confirm.vue.d.ts +2 -6
- package/dist/runtime/app/components/Container/Container.d.vue.ts +4 -28
- package/dist/runtime/app/components/Container/Container.types.d.ts +9 -0
- package/dist/runtime/app/components/Container/Container.types.js +0 -0
- package/dist/runtime/app/components/Container/Container.vue +1 -1
- package/dist/runtime/app/components/Container/Container.vue.d.ts +4 -28
- package/dist/runtime/app/components/ControlGroup/ControlGroup.d.vue.ts +5 -14
- package/dist/runtime/app/components/ControlGroup/ControlGroup.types.d.ts +9 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.types.js +0 -0
- package/dist/runtime/app/components/ControlGroup/ControlGroup.vue.d.ts +5 -14
- package/dist/runtime/app/components/DataTable/DataTable.d.vue.ts +64 -0
- package/dist/runtime/app/components/DataTable/DataTable.theme.d.ts +17 -0
- package/dist/runtime/app/components/DataTable/DataTable.theme.js +19 -0
- package/dist/runtime/app/components/DataTable/DataTable.types.d.ts +13 -0
- package/dist/runtime/app/components/DataTable/DataTable.types.js +0 -0
- package/dist/runtime/app/components/DataTable/DataTable.vue +356 -0
- package/dist/runtime/app/components/DataTable/DataTable.vue.d.ts +64 -0
- package/dist/runtime/app/components/{Table/internal/useVunoTable.d.ts → DataTable/internal/useVunoDataTable.d.ts} +6 -29
- package/dist/runtime/app/components/{Table/internal/useVunoTable.js → DataTable/internal/useVunoDataTable.js} +2 -29
- package/dist/runtime/app/components/FieldArray/FieldArray.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldArray/FieldArray.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.types.js +0 -0
- package/dist/runtime/app/components/FieldArray/FieldArray.vue +12 -5
- package/dist/runtime/app/components/FieldArray/FieldArray.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.types.js +0 -0
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue +1 -1
- package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.d.vue.ts +4 -3
- package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.vue.d.ts +4 -3
- package/dist/runtime/app/components/FieldColor/FieldColor.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldColor/FieldColor.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.types.js +0 -0
- package/dist/runtime/app/components/FieldColor/FieldColor.vue +3 -3
- package/dist/runtime/app/components/FieldColor/FieldColor.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.types.js +0 -0
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue +3 -3
- package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldFile/FieldFile.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldFile/FieldFile.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.types.js +0 -0
- package/dist/runtime/app/components/FieldFile/FieldFile.vue +1 -1
- package/dist/runtime/app/components/FieldFile/FieldFile.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.d.vue.ts +4 -3
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.d.ts +1 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.js +1 -0
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue +26 -5
- package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue.d.ts +4 -3
- package/dist/runtime/app/components/FieldInput/FieldInput.d.vue.ts +4 -4
- package/dist/runtime/app/components/FieldInput/FieldInput.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.types.js +0 -0
- package/dist/runtime/app/components/FieldInput/FieldInput.vue +3 -3
- package/dist/runtime/app/components/FieldInput/FieldInput.vue.d.ts +4 -4
- package/dist/runtime/app/components/FieldNumber/FieldNumber.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldNumber/FieldNumber.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.types.js +0 -0
- package/dist/runtime/app/components/FieldNumber/FieldNumber.vue +3 -3
- package/dist/runtime/app/components/FieldNumber/FieldNumber.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldPassword/FieldPassword.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldPassword/FieldPassword.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.types.js +0 -0
- package/dist/runtime/app/components/FieldPassword/FieldPassword.vue +4 -4
- package/dist/runtime/app/components/FieldPassword/FieldPassword.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldRadio/FieldRadio.d.vue.ts +3 -2
- package/dist/runtime/app/components/FieldRadio/FieldRadio.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.types.js +0 -0
- package/dist/runtime/app/components/FieldRadio/FieldRadio.vue +1 -1
- package/dist/runtime/app/components/FieldRadio/FieldRadio.vue.d.ts +3 -2
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.d.vue.ts +4 -4
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue +6 -2
- package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue.d.ts +4 -4
- package/dist/runtime/app/components/FieldSearch/FieldSearch.d.vue.ts +3 -3
- package/dist/runtime/app/components/FieldSearch/FieldSearch.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.types.js +0 -0
- package/dist/runtime/app/components/FieldSearch/FieldSearch.vue +4 -4
- package/dist/runtime/app/components/FieldSearch/FieldSearch.vue.d.ts +3 -3
- package/dist/runtime/app/components/FieldSelect/FieldSelect.d.vue.ts +3 -2
- package/dist/runtime/app/components/FieldSelect/FieldSelect.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.types.js +0 -0
- package/dist/runtime/app/components/FieldSelect/FieldSelect.vue +1 -1
- package/dist/runtime/app/components/FieldSelect/FieldSelect.vue.d.ts +3 -2
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.d.vue.ts +7 -7
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue +16 -6
- package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue.d.ts +7 -7
- package/dist/runtime/app/components/FieldSlug/FieldSlug.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldSlug/FieldSlug.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.types.js +0 -0
- package/dist/runtime/app/components/FieldSlug/FieldSlug.vue +4 -4
- package/dist/runtime/app/components/FieldSlug/FieldSlug.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.types.js +0 -0
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue +1 -1
- package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.d.vue.ts +4 -3
- package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.vue.d.ts +4 -3
- package/dist/runtime/app/components/FieldTags/FieldTags.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldTags/FieldTags.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.types.js +0 -0
- package/dist/runtime/app/components/FieldTags/FieldTags.vue +1 -1
- package/dist/runtime/app/components/FieldTags/FieldTags.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.d.vue.ts +4 -4
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue +16 -6
- package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue.d.ts +4 -4
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.d.vue.ts +2 -2
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.types.d.ts +2 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.types.js +0 -0
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue +1 -1
- package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue.d.ts +2 -2
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.d.vue.ts +4 -3
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue +4 -4
- package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue.d.ts +4 -3
- package/dist/runtime/app/components/Form/Form.d.vue.ts +3 -19
- package/dist/runtime/app/components/Form/Form.types.d.ts +8 -0
- package/dist/runtime/app/components/Form/Form.types.js +0 -0
- package/dist/runtime/app/components/Form/Form.vue +3 -3
- package/dist/runtime/app/components/Form/Form.vue.d.ts +3 -19
- package/dist/runtime/app/components/FormField/FormField.d.vue.ts +4 -18
- package/dist/runtime/app/components/FormField/FormField.types.d.ts +14 -0
- package/dist/runtime/app/components/FormField/FormField.types.js +0 -0
- package/dist/runtime/app/components/FormField/FormField.vue +26 -10
- package/dist/runtime/app/components/FormField/FormField.vue.d.ts +4 -18
- package/dist/runtime/app/components/{internal → FormField/internal}/FieldShell/FieldShell.d.vue.ts +2 -3
- package/dist/runtime/app/components/{internal → FormField/internal}/FieldShell/FieldShell.vue.d.ts +2 -3
- package/dist/runtime/app/components/FormModal/FormModal.d.vue.ts +6 -25
- package/dist/runtime/app/components/FormModal/FormModal.types.d.ts +14 -0
- package/dist/runtime/app/components/FormModal/FormModal.types.js +0 -0
- package/dist/runtime/app/components/FormModal/FormModal.vue +12 -2
- package/dist/runtime/app/components/FormModal/FormModal.vue.d.ts +6 -25
- package/dist/runtime/app/components/FormSection/FormSection.d.vue.ts +2 -13
- package/dist/runtime/app/components/FormSection/FormSection.types.d.ts +7 -0
- package/dist/runtime/app/components/FormSection/FormSection.types.js +0 -0
- package/dist/runtime/app/components/FormSection/FormSection.vue +11 -4
- package/dist/runtime/app/components/FormSection/FormSection.vue.d.ts +2 -13
- package/dist/runtime/app/components/Icon/Icon.d.vue.ts +2 -4
- package/dist/runtime/app/components/Icon/Icon.types.d.ts +3 -0
- package/dist/runtime/app/components/Icon/Icon.types.js +0 -0
- package/dist/runtime/app/components/Icon/Icon.vue.d.ts +2 -4
- package/dist/runtime/app/components/Menu/Menu.d.vue.ts +4 -21
- package/dist/runtime/app/components/Menu/Menu.types.d.ts +7 -0
- package/dist/runtime/app/components/Menu/Menu.types.js +0 -0
- package/dist/runtime/app/components/Menu/Menu.vue +18 -110
- package/dist/runtime/app/components/Menu/Menu.vue.d.ts +4 -21
- package/dist/runtime/app/components/Menu/internal/MenuLevel/MenuLevel.d.vue.ts +26 -0
- package/dist/runtime/app/components/Menu/internal/MenuLevel/MenuLevel.vue +167 -0
- package/dist/runtime/app/components/Menu/internal/MenuLevel/MenuLevel.vue.d.ts +26 -0
- package/dist/runtime/app/components/Modal/Modal.d.vue.ts +6 -18
- package/dist/runtime/app/components/Modal/Modal.theme.d.ts +18 -14
- package/dist/runtime/app/components/Modal/Modal.theme.js +17 -21
- package/dist/runtime/app/components/Modal/Modal.types.d.ts +12 -0
- package/dist/runtime/app/components/Modal/Modal.types.js +0 -0
- package/dist/runtime/app/components/Modal/Modal.vue +99 -65
- package/dist/runtime/app/components/Modal/Modal.vue.d.ts +6 -18
- package/dist/runtime/app/components/Navbar/Navbar.d.vue.ts +3 -28
- package/dist/runtime/app/components/Navbar/Navbar.theme.d.ts +2 -3
- package/dist/runtime/app/components/Navbar/Navbar.theme.js +2 -3
- package/dist/runtime/app/components/Navbar/Navbar.types.d.ts +4 -0
- package/dist/runtime/app/components/Navbar/Navbar.types.js +0 -0
- package/dist/runtime/app/components/Navbar/Navbar.vue.d.ts +3 -28
- package/dist/runtime/app/components/NavigationList/NavigationList.d.vue.ts +4 -33
- package/dist/runtime/app/components/NavigationList/NavigationList.keys.d.ts +3 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.keys.js +1 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.types.d.ts +9 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.types.js +0 -0
- package/dist/runtime/app/components/NavigationList/NavigationList.vue +65 -19
- package/dist/runtime/app/components/NavigationList/NavigationList.vue.d.ts +4 -33
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.d.vue.ts +3 -24
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.keys.d.ts +7 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.keys.js +3 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.types.d.ts +10 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.types.js +0 -0
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue +45 -13
- package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue.d.ts +3 -24
- package/dist/runtime/app/components/NavigationToc/NavigationToc.d.vue.ts +3 -10
- package/dist/runtime/app/components/NavigationToc/NavigationToc.types.d.ts +7 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.types.js +0 -0
- package/dist/runtime/app/components/NavigationToc/NavigationToc.vue +8 -1
- package/dist/runtime/app/components/NavigationToc/NavigationToc.vue.d.ts +3 -10
- package/dist/runtime/app/components/Pagination/Pagination.d.vue.ts +5 -23
- package/dist/runtime/app/components/Pagination/Pagination.types.d.ts +11 -0
- package/dist/runtime/app/components/Pagination/Pagination.types.js +0 -0
- package/dist/runtime/app/components/Pagination/Pagination.vue +6 -2
- package/dist/runtime/app/components/Pagination/Pagination.vue.d.ts +5 -23
- package/dist/runtime/app/components/Slideover/Slideover.d.vue.ts +4 -13
- package/dist/runtime/app/components/Slideover/Slideover.types.d.ts +12 -0
- package/dist/runtime/app/components/Slideover/Slideover.types.js +0 -0
- package/dist/runtime/app/components/Slideover/Slideover.vue.d.ts +4 -13
- package/dist/runtime/app/components/State/State.d.vue.ts +2 -2
- package/dist/runtime/app/components/State/State.types.d.ts +15 -0
- package/dist/runtime/app/components/State/State.types.js +0 -0
- package/dist/runtime/app/components/State/State.vue +13 -3
- package/dist/runtime/app/components/State/State.vue.d.ts +2 -2
- package/dist/runtime/app/components/Table/Table.d.vue.ts +8 -55
- package/dist/runtime/app/components/Table/Table.theme.d.ts +17 -35
- package/dist/runtime/app/components/Table/Table.theme.js +15 -48
- package/dist/runtime/app/components/Table/Table.types.d.ts +9 -0
- package/dist/runtime/app/components/Table/Table.types.js +0 -0
- package/dist/runtime/app/components/Table/Table.vue +143 -415
- package/dist/runtime/app/components/Table/Table.vue.d.ts +8 -55
- package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue +13 -3
- package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.vue +8 -1
- package/dist/runtime/app/components/Table/internal/CellDate/CellDate.vue +8 -1
- package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.vue +8 -1
- package/dist/runtime/app/components/Table/internal/CellText/CellText.vue +8 -1
- package/dist/runtime/app/components/Table/internal/TableCell/TableCell.d.vue.ts +2 -2
- package/dist/runtime/app/components/Table/internal/TableCell/TableCell.vue.d.ts +2 -2
- package/dist/runtime/app/components/Table/internal/column.d.ts +9 -0
- package/dist/runtime/app/components/Table/internal/column.js +15 -0
- package/dist/runtime/app/components/Table/internal/useVunoTableSelection.d.ts +1 -1
- package/dist/runtime/app/components/Tabs/Tabs.d.vue.ts +5 -24
- package/dist/runtime/app/components/Tabs/Tabs.theme.d.ts +15 -6
- package/dist/runtime/app/components/Tabs/Tabs.theme.js +15 -6
- package/dist/runtime/app/components/Tabs/Tabs.types.d.ts +10 -0
- package/dist/runtime/app/components/Tabs/Tabs.types.js +0 -0
- package/dist/runtime/app/components/Tabs/Tabs.vue +91 -17
- package/dist/runtime/app/components/Tabs/Tabs.vue.d.ts +5 -24
- package/dist/runtime/app/components/Text/Text.d.vue.ts +19 -0
- package/dist/runtime/app/components/Text/Text.theme.d.ts +55 -0
- package/dist/runtime/app/components/Text/Text.theme.js +28 -0
- package/dist/runtime/app/components/Text/Text.types.d.ts +9 -0
- package/dist/runtime/app/components/Text/Text.types.js +0 -0
- package/dist/runtime/app/components/Text/Text.vue +37 -0
- package/dist/runtime/app/components/Text/Text.vue.d.ts +19 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.d.vue.ts +17 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.theme.d.ts +5 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.theme.js +6 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.types.d.ts +9 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.types.js +0 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.vue +76 -0
- package/dist/runtime/app/components/Toolbar/Toolbar.vue.d.ts +17 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.d.vue.ts +5 -26
- package/dist/runtime/app/components/Tooltip/Tooltip.types.d.ts +11 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.types.js +0 -0
- package/dist/runtime/app/components/Tooltip/Tooltip.vue +1 -1
- package/dist/runtime/app/components/Tooltip/Tooltip.vue.d.ts +5 -26
- package/dist/runtime/app/composables/internal/useVunoContext.d.ts +5 -0
- package/dist/runtime/app/composables/internal/useVunoContext.js +8 -0
- package/dist/runtime/app/composables/internal/useVunoControlGroup.d.ts +3 -4
- package/dist/runtime/app/composables/internal/useVunoDirection.d.ts +5 -0
- package/dist/runtime/app/composables/internal/useVunoDirection.js +8 -0
- package/dist/runtime/app/composables/internal/useVunoFormContext.d.ts +5 -0
- package/dist/runtime/app/composables/internal/useVunoFormContext.js +8 -0
- package/dist/runtime/app/composables/internal/useVunoOverlayBehind.d.ts +6 -0
- package/dist/runtime/app/composables/internal/useVunoOverlayBehind.js +8 -0
- package/dist/runtime/app/composables/useContext.js +2 -3
- package/dist/runtime/app/composables/useForm.js +2 -3
- package/dist/runtime/app/composables/useTableQuery.d.ts +1 -1
- package/dist/runtime/app/composables/useTheme.js +6 -3
- package/dist/runtime/app/{components/internal/ControlShell/ControlShell.vue.d.ts → primitives/PrimitiveControl/PrimitiveControl.d.vue.ts} +4 -3
- package/dist/runtime/app/{components/internal/ControlShell/ControlShell.theme.d.ts → primitives/PrimitiveControl/PrimitiveControl.theme.d.ts} +1 -1
- package/dist/runtime/app/{components/internal/ControlShell/ControlShell.vue → primitives/PrimitiveControl/PrimitiveControl.vue} +1 -1
- package/dist/runtime/app/{components/internal/ControlShell/ControlShell.d.vue.ts → primitives/PrimitiveControl/PrimitiveControl.vue.d.ts} +4 -3
- package/dist/runtime/app/{components/internal/Input/Input.d.vue.ts → primitives/PrimitiveInput/PrimitiveInput.d.vue.ts} +4 -3
- package/dist/runtime/app/{components/internal/Input/Input.vue → primitives/PrimitiveInput/PrimitiveInput.vue} +4 -4
- package/dist/runtime/app/{components/internal/Input/Input.vue.d.ts → primitives/PrimitiveInput/PrimitiveInput.vue.d.ts} +4 -3
- package/dist/runtime/app/{components/internal/NumberInput/NumberInput.d.vue.ts → primitives/PrimitiveNumberInput/PrimitiveNumberInput.d.vue.ts} +3 -4
- package/dist/runtime/app/{components/internal/NumberInput/NumberInput.theme.d.ts → primitives/PrimitiveNumberInput/PrimitiveNumberInput.theme.d.ts} +3 -0
- package/dist/runtime/app/{components/internal/NumberInput/NumberInput.theme.js → primitives/PrimitiveNumberInput/PrimitiveNumberInput.theme.js} +4 -1
- package/dist/runtime/app/{components/internal/NumberInput/NumberInput.vue → primitives/PrimitiveNumberInput/PrimitiveNumberInput.vue} +7 -5
- package/dist/runtime/app/{components/internal/NumberInput/NumberInput.vue.d.ts → primitives/PrimitiveNumberInput/PrimitiveNumberInput.vue.d.ts} +3 -4
- package/dist/runtime/app/theme/index.d.ts +254 -96
- package/dist/runtime/app/theme/index.js +13 -5
- package/dist/runtime/app/theme/messages.js +1 -0
- package/dist/runtime/app/theme/shared.d.ts +3 -2
- package/dist/runtime/app/theme/shared.js +2 -1
- package/dist/runtime/app/types/app.d.ts +4 -2
- package/dist/runtime/app/types/base.d.ts +5 -23
- package/dist/runtime/app/types/field.d.ts +3 -1
- package/dist/runtime/app/types/form.d.ts +3 -4
- package/dist/runtime/app/types/index.d.ts +55 -7
- package/dist/runtime/app/types/menu.d.ts +22 -0
- package/dist/runtime/app/types/menu.js +0 -0
- package/dist/runtime/app/types/page.d.ts +6 -10
- package/dist/runtime/app/types/slots.d.ts +8 -4
- package/dist/runtime/app/types/table.d.ts +28 -28
- package/dist/runtime/app/types/text.d.ts +6 -0
- package/dist/runtime/app/types/text.js +0 -0
- package/dist/runtime/app/types/theme.d.ts +15 -6
- package/dist/runtime/app/utils/format.js +3 -2
- package/dist/runtime/app/utils/path.js +1 -1
- package/dist/runtime/app/{internal → utils}/slots.d.ts +2 -2
- package/dist/runtime/app/utils/theme.d.ts +8 -41
- package/dist/runtime/app/utils/theme.js +31 -29
- package/package.json +9 -9
- package/dist/runtime/app/components/Page/Page.d.vue.ts +0 -40
- package/dist/runtime/app/components/Page/Page.theme.d.ts +0 -32
- package/dist/runtime/app/components/Page/Page.theme.js +0 -31
- package/dist/runtime/app/components/Page/Page.vue +0 -132
- package/dist/runtime/app/components/Page/Page.vue.d.ts +0 -40
- package/dist/runtime/app/internal/keys.d.ts +0 -43
- package/dist/runtime/app/internal/keys.js +0 -8
- package/dist/runtime/app/types/alert.d.ts +0 -13
- package/dist/runtime/app/types/state.d.ts +0 -35
- /package/dist/runtime/app/{types/alert.js → components/Alert/Alert.types.js} +0 -0
- /package/dist/runtime/app/{types/state.js → components/App/App.types.js} +0 -0
- /package/dist/runtime/app/components/{Table → DataTable}/internal/query.d.ts +0 -0
- /package/dist/runtime/app/components/{Table → DataTable}/internal/query.js +0 -0
- /package/dist/runtime/app/components/{internal → FormField/internal}/FieldShell/FieldShell.vue +0 -0
- /package/dist/runtime/app/{components/internal/ControlShell/ControlShell.theme.js → primitives/PrimitiveControl/PrimitiveControl.theme.js} +0 -0
- /package/dist/runtime/app/{components/internal/Input/Input.theme.d.ts → primitives/PrimitiveInput/PrimitiveInput.theme.d.ts} +0 -0
- /package/dist/runtime/app/{components/internal/Input/Input.theme.js → primitives/PrimitiveInput/PrimitiveInput.theme.js} +0 -0
- /package/dist/runtime/app/{components/internal/NumberInput → primitives/PrimitiveNumberInput}/number.d.ts +0 -0
- /package/dist/runtime/app/{components/internal/NumberInput → primitives/PrimitiveNumberInput}/number.js +0 -0
- /package/dist/runtime/app/{internal → utils}/slots.js +0 -0
|
@@ -1,78 +1,129 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed } from "vue";
|
|
2
|
+
import { computed, defineComponent, h, onMounted, ref } from "vue";
|
|
3
3
|
import { useVunoControlGroup } from "#vuno/composables/internal/useVunoControlGroup";
|
|
4
4
|
import { useTheme } from "#vuno/composables/useTheme";
|
|
5
5
|
import Icon from "#vuno/components/Icon/Icon.vue";
|
|
6
6
|
defineOptions({ name: "VunoButton" });
|
|
7
7
|
const props = defineProps({
|
|
8
|
-
color: { type: String, required: false, default:
|
|
8
|
+
color: { type: String, required: false, default: void 0 },
|
|
9
9
|
disabled: { type: Boolean, required: false },
|
|
10
|
+
href: { type: String, required: false, default: void 0 },
|
|
10
11
|
icon: { type: String, required: false, default: void 0 },
|
|
11
12
|
label: { type: String, required: false, default: void 0 },
|
|
12
13
|
loading: { type: Boolean, required: false },
|
|
13
14
|
radius: { type: String, required: false, default: void 0 },
|
|
15
|
+
shape: { type: String, required: false, default: void 0 },
|
|
14
16
|
size: { type: String, required: false, default: void 0 },
|
|
17
|
+
tag: { type: null, required: false, default: void 0 },
|
|
18
|
+
to: { type: null, required: false, default: void 0 },
|
|
15
19
|
trailing: { type: Boolean, required: false },
|
|
16
20
|
type: { type: String, required: false, default: "button" },
|
|
17
21
|
ui: { type: Object, required: false, default: void 0 },
|
|
18
|
-
variant: { type: String, required: false, default: "
|
|
22
|
+
variant: { type: String, required: false, default: "secondary" }
|
|
19
23
|
});
|
|
20
24
|
const slots = defineSlots();
|
|
25
|
+
const NativeButton = defineComponent({
|
|
26
|
+
name: "VunoButtonRoot",
|
|
27
|
+
inheritAttrs: false,
|
|
28
|
+
setup(_, { attrs, slots: nativeSlots }) {
|
|
29
|
+
return () => h("button", attrs, nativeSlots.default?.());
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const root = ref(null);
|
|
21
33
|
const hasContent = computed(() => Boolean(props.label) || Boolean(slots.default));
|
|
22
34
|
const controlGroup = useVunoControlGroup();
|
|
23
35
|
const size = computed(() => props.size ?? controlGroup.size.value ?? "md");
|
|
24
36
|
const isDisabled = computed(() => Boolean(props.disabled) || Boolean(props.loading));
|
|
37
|
+
const isButton = computed(() => !props.tag || props.tag === "button");
|
|
38
|
+
const rootTag = computed(() => isButton.value ? NativeButton : props.tag);
|
|
39
|
+
const isEmphasis = computed(() => props.variant === "solid");
|
|
40
|
+
const variantAccent = computed(() => {
|
|
41
|
+
if (!props.color) return void 0;
|
|
42
|
+
return ["ghost", "outline"].includes(props.variant) ? "on" : void 0;
|
|
43
|
+
});
|
|
25
44
|
const ui = useTheme(
|
|
26
45
|
"button",
|
|
27
46
|
() => props.ui,
|
|
28
47
|
() => ({
|
|
29
|
-
color: props.color,
|
|
48
|
+
color: props.color ?? "primary",
|
|
30
49
|
groupOrientation: controlGroup.orientation.value,
|
|
31
50
|
radius: props.radius,
|
|
32
|
-
shape: hasContent.value ?
|
|
51
|
+
shape: props.shape ?? (hasContent.value ? "base" : "square"),
|
|
33
52
|
size: size.value,
|
|
34
|
-
variant: props.variant
|
|
53
|
+
variant: props.variant,
|
|
54
|
+
variantAccent: variantAccent.value
|
|
35
55
|
})
|
|
36
56
|
);
|
|
57
|
+
function captureRoot(target) {
|
|
58
|
+
const element = target?.$el ?? target;
|
|
59
|
+
root.value = element instanceof HTMLElement ? element : null;
|
|
60
|
+
}
|
|
61
|
+
function blockDisabledLink(event) {
|
|
62
|
+
if (isButton.value || !isDisabled.value) return;
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
event.stopImmediatePropagation();
|
|
65
|
+
}
|
|
66
|
+
onMounted(() => {
|
|
67
|
+
if (!import.meta.env.DEV) return;
|
|
68
|
+
const element = root.value;
|
|
69
|
+
if (!element) return;
|
|
70
|
+
const accessibleName = element?.textContent?.trim() || element?.getAttribute("aria-label") || element?.getAttribute("aria-labelledby") || element?.title;
|
|
71
|
+
if (!accessibleName) console.warn("[VButton] Un bot\xF3n sin texto necesita aria-label o aria-labelledby.");
|
|
72
|
+
});
|
|
37
73
|
</script>
|
|
38
74
|
|
|
39
75
|
<template>
|
|
40
|
-
<
|
|
76
|
+
<component
|
|
77
|
+
:is="rootTag"
|
|
78
|
+
:ref="captureRoot"
|
|
41
79
|
:aria-busy="props.loading ? 'true' : void 0"
|
|
80
|
+
:aria-disabled="!isButton && isDisabled ? 'true' : void 0"
|
|
42
81
|
:class="ui.base"
|
|
43
|
-
:disabled="isDisabled"
|
|
44
|
-
:
|
|
82
|
+
:disabled="isButton ? isDisabled : void 0"
|
|
83
|
+
:href="props.href"
|
|
84
|
+
:tabindex="!isButton && isDisabled ? -1 : void 0"
|
|
85
|
+
:to="props.to"
|
|
86
|
+
:type="isButton ? props.type : void 0"
|
|
87
|
+
@click.capture="blockDisabledLink"
|
|
45
88
|
>
|
|
46
|
-
|
|
89
|
+
<span
|
|
90
|
+
v-if="isEmphasis"
|
|
91
|
+
aria-hidden="true"
|
|
92
|
+
:class="ui.emphasis"
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
<span :class="ui.content">
|
|
96
|
+
<!--
|
|
47
97
|
El giro ocupa el sitio del icono en vez de añadirse: si se sumara, el
|
|
48
98
|
botón cambiaría de ancho al pulsarlo y el puntero acabaría sobre otra
|
|
49
99
|
cosa.
|
|
50
100
|
-->
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
101
|
+
<span
|
|
102
|
+
v-if="props.loading"
|
|
103
|
+
aria-hidden="true"
|
|
104
|
+
:class="[ui.icon, ui.spinner]"
|
|
105
|
+
/>
|
|
56
106
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
107
|
+
<Icon
|
|
108
|
+
v-else-if="props.icon && !props.trailing"
|
|
109
|
+
:class="ui.icon"
|
|
110
|
+
:name="props.icon"
|
|
111
|
+
/>
|
|
62
112
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
113
|
+
<span
|
|
114
|
+
v-if="hasContent"
|
|
115
|
+
:class="ui.label"
|
|
116
|
+
>
|
|
117
|
+
<slot>{{ props.label }}</slot>
|
|
118
|
+
</span>
|
|
69
119
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
120
|
+
<Icon
|
|
121
|
+
v-if="props.icon && props.trailing && !props.loading"
|
|
122
|
+
:class="ui.icon"
|
|
123
|
+
:name="props.icon"
|
|
124
|
+
/>
|
|
75
125
|
|
|
76
|
-
|
|
77
|
-
|
|
126
|
+
<slot name="trailing" />
|
|
127
|
+
</span>
|
|
128
|
+
</component>
|
|
78
129
|
</template>
|
|
@@ -1,43 +1,23 @@
|
|
|
1
|
-
import type {
|
|
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
|
-
};
|
|
1
|
+
import type { VunoButtonProps } from './Button.types.js';
|
|
26
2
|
type __VLS_Slots = {
|
|
27
3
|
/** Contenido en lugar de la etiqueta. */
|
|
28
4
|
default?: () => unknown;
|
|
29
5
|
/** Va después de todo lo demás; la tabla mete ahí su contador. */
|
|
30
6
|
trailing?: () => unknown;
|
|
31
7
|
};
|
|
32
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
33
|
-
color: VunoColor;
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoButtonProps> & Readonly<{}>, {
|
|
9
|
+
color: import("../../types/base.js").VunoColor;
|
|
34
10
|
icon: string;
|
|
35
|
-
radius: VunoRadius;
|
|
36
|
-
size:
|
|
37
|
-
variant: VunoButtonVariant;
|
|
11
|
+
radius: import("../../types/base.js").VunoRadius;
|
|
12
|
+
size: import("./Button.types.js").VunoButtonSize;
|
|
13
|
+
variant: import("./Button.types.js").VunoButtonVariant;
|
|
38
14
|
label: string;
|
|
15
|
+
shape: import("./Button.types.js").VunoButtonShape;
|
|
16
|
+
tag: import("vue").Component | string;
|
|
39
17
|
type: "button" | "reset" | "submit";
|
|
40
|
-
ui: VunoUi<"button">;
|
|
18
|
+
ui: import("../../types/slots.js").VunoUi<"button">;
|
|
19
|
+
href: string;
|
|
20
|
+
to: import("vue-router").RouteLocationRaw;
|
|
41
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
22
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
23
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,67 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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
|
-
};
|
|
1
|
+
import type { VunoCardProps } from './Card.types.js';
|
|
65
2
|
/**
|
|
66
3
|
* Las tres regiones se pintan solo si se rellenan.
|
|
67
4
|
*
|
|
@@ -78,11 +15,12 @@ type __VLS_Slots = {
|
|
|
78
15
|
footer?: () => unknown;
|
|
79
16
|
header?: () => unknown;
|
|
80
17
|
};
|
|
81
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoCardProps> & Readonly<{}>, {
|
|
19
|
+
color: import("../../types/base.js").VunoColor;
|
|
20
|
+
radius: import("./Card.types.js").VunoCardRadius;
|
|
21
|
+
variant: "outline" | "soft";
|
|
22
|
+
tag: import("vue").Component | string;
|
|
23
|
+
ui: import("../../types/slots.js").VunoUi<"card">;
|
|
86
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
87
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
88
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export declare const cardTheme: Record<"card", {
|
|
2
2
|
/**
|
|
3
|
-
* La tarjeta.
|
|
4
|
-
*
|
|
3
|
+
* La tarjeta. La cabecera queda en el plano secundario y cuerpo y pie
|
|
4
|
+
* forman juntos el plano principal. Un espacio corto separa ambos planos,
|
|
5
|
+
* de modo que la jerarquía se lee por superficies sin introducir una sombra
|
|
6
|
+
* ajena al sistema.
|
|
5
7
|
*
|
|
6
|
-
* El
|
|
7
|
-
*
|
|
8
|
+
* El contenedor exterior lleva relleno en las variantes por capas, de modo
|
|
9
|
+
* que tanto la cabecera como el plano principal respiren dentro del marco.
|
|
8
10
|
*
|
|
9
11
|
* **La raíz lleva anillo de foco desde que existe `tag`.** Con `tag` la
|
|
10
12
|
* tarjeta puede **ser** un enlace o un botón, y entonces recibe el foco.
|
|
@@ -32,25 +34,66 @@ export declare const cardTheme: Record<"card", {
|
|
|
32
34
|
* un `tabindex` llegado por atributos, dejando sin anillo algo que sí toma
|
|
33
35
|
* el foco.
|
|
34
36
|
*
|
|
35
|
-
* El
|
|
36
|
-
*
|
|
37
|
-
* `outline-(--vuno-accent)` se quedaría con lo que hubiera heredado.
|
|
37
|
+
* El color solo tiñe la capa exterior. El cuerpo conserva la superficie de
|
|
38
|
+
* lectura y el mismo acento alimenta el título y el anillo de foco.
|
|
38
39
|
*/
|
|
39
40
|
readonly slots: {
|
|
40
41
|
readonly body: "p-4 text-vuno-body";
|
|
41
42
|
readonly footer: "p-4";
|
|
42
|
-
readonly header: "p-4 font-semibold text-vuno-
|
|
43
|
-
readonly
|
|
43
|
+
readonly header: "flex items-center gap-2 p-4 font-semibold text-(--vuno-accent)";
|
|
44
|
+
readonly primary: "relative flex min-h-0 flex-col divide-y divide-vuno-border overflow-hidden rounded-3xl border border-transparent";
|
|
45
|
+
readonly root: "flex w-full flex-col rounded-4xl border border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--vuno-accent)";
|
|
44
46
|
};
|
|
45
47
|
readonly variants: {
|
|
46
|
-
readonly
|
|
48
|
+
readonly color: Record<import("../../types/base.js").VunoColor, Record<"root", string>>;
|
|
49
|
+
readonly radius: {
|
|
50
|
+
xs: {
|
|
51
|
+
primary: string;
|
|
52
|
+
root: string;
|
|
53
|
+
};
|
|
54
|
+
sm: {
|
|
55
|
+
primary: string;
|
|
56
|
+
root: string;
|
|
57
|
+
};
|
|
58
|
+
md: {
|
|
59
|
+
primary: string;
|
|
60
|
+
root: string;
|
|
61
|
+
};
|
|
62
|
+
lg: {
|
|
63
|
+
primary: string;
|
|
64
|
+
root: string;
|
|
65
|
+
};
|
|
66
|
+
xl: {
|
|
67
|
+
primary: string;
|
|
68
|
+
root: string;
|
|
69
|
+
};
|
|
70
|
+
'2xl': {
|
|
71
|
+
primary: string;
|
|
72
|
+
root: string;
|
|
73
|
+
};
|
|
74
|
+
'3xl': {
|
|
75
|
+
primary: string;
|
|
76
|
+
root: string;
|
|
77
|
+
};
|
|
78
|
+
'4xl': {
|
|
79
|
+
primary: string;
|
|
80
|
+
root: string;
|
|
81
|
+
};
|
|
82
|
+
none: {
|
|
83
|
+
primary: string;
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
47
87
|
readonly variant: {
|
|
48
88
|
readonly outline: {
|
|
49
|
-
readonly
|
|
89
|
+
readonly header: "px-4 py-2";
|
|
90
|
+
readonly primary: "border-(--vuno-accent)/20 bg-vuno-surface";
|
|
91
|
+
readonly root: "gap-2 overflow-hidden border-(--vuno-accent)/20 bg-(--vuno-accent)/10 p-2";
|
|
50
92
|
};
|
|
51
|
-
readonly plain: {};
|
|
52
93
|
readonly soft: {
|
|
53
|
-
readonly
|
|
94
|
+
readonly header: "px-4 py-2";
|
|
95
|
+
readonly primary: "bg-vuno-surface-1";
|
|
96
|
+
readonly root: "gap-2 overflow-hidden bg-(--vuno-accent)/10 p-2";
|
|
54
97
|
};
|
|
55
98
|
};
|
|
56
99
|
};
|
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { accentByColor } from "#vuno/theme/shared";
|
|
2
2
|
import { defineTheme } from "#vuno/utils/theme";
|
|
3
|
+
const cardRadius = {
|
|
4
|
+
xs: { primary: "rounded-none", root: "rounded-xs" },
|
|
5
|
+
sm: { primary: "rounded-none", root: "rounded-sm" },
|
|
6
|
+
md: { primary: "rounded-none", root: "rounded-md" },
|
|
7
|
+
lg: { primary: "rounded-none", root: "rounded-lg" },
|
|
8
|
+
xl: { primary: "rounded-sm", root: "rounded-xl" },
|
|
9
|
+
"2xl": { primary: "rounded-lg", root: "rounded-2xl" },
|
|
10
|
+
"3xl": { primary: "rounded-2xl", root: "rounded-3xl" },
|
|
11
|
+
"4xl": { primary: "rounded-3xl", root: "rounded-4xl" },
|
|
12
|
+
none: { primary: "rounded-none", root: "rounded-none" }
|
|
13
|
+
};
|
|
3
14
|
export const cardTheme = defineTheme("card", {
|
|
4
15
|
/**
|
|
5
|
-
* La tarjeta.
|
|
6
|
-
*
|
|
16
|
+
* La tarjeta. La cabecera queda en el plano secundario y cuerpo y pie
|
|
17
|
+
* forman juntos el plano principal. Un espacio corto separa ambos planos,
|
|
18
|
+
* de modo que la jerarquía se lee por superficies sin introducir una sombra
|
|
19
|
+
* ajena al sistema.
|
|
7
20
|
*
|
|
8
|
-
* El
|
|
9
|
-
*
|
|
21
|
+
* El contenedor exterior lleva relleno en las variantes por capas, de modo
|
|
22
|
+
* que tanto la cabecera como el plano principal respiren dentro del marco.
|
|
10
23
|
*
|
|
11
24
|
* **La raíz lleva anillo de foco desde que existe `tag`.** Con `tag` la
|
|
12
25
|
* tarjeta puede **ser** un enlace o un botón, y entonces recibe el foco.
|
|
@@ -34,29 +47,36 @@ export const cardTheme = defineTheme("card", {
|
|
|
34
47
|
* un `tabindex` llegado por atributos, dejando sin anillo algo que sí toma
|
|
35
48
|
* el foco.
|
|
36
49
|
*
|
|
37
|
-
* El
|
|
38
|
-
*
|
|
39
|
-
* `outline-(--vuno-accent)` se quedaría con lo que hubiera heredado.
|
|
50
|
+
* El color solo tiñe la capa exterior. El cuerpo conserva la superficie de
|
|
51
|
+
* lectura y el mismo acento alimenta el título y el anillo de foco.
|
|
40
52
|
*/
|
|
41
53
|
slots: {
|
|
42
54
|
body: "p-4 text-vuno-body",
|
|
43
55
|
footer: "p-4",
|
|
44
|
-
header: "p-4 font-semibold text-vuno-
|
|
45
|
-
|
|
56
|
+
header: "flex items-center gap-2 p-4 font-semibold text-(--vuno-accent)",
|
|
57
|
+
primary: "relative flex min-h-0 flex-col divide-y divide-vuno-border overflow-hidden rounded-3xl border border-transparent",
|
|
58
|
+
root: "flex w-full flex-col rounded-4xl border border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--vuno-accent)"
|
|
46
59
|
},
|
|
47
60
|
variants: {
|
|
48
|
-
|
|
61
|
+
color: accentByColor("root"),
|
|
62
|
+
radius: cardRadius,
|
|
49
63
|
/*
|
|
50
|
-
* `outline`
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
64
|
+
* `outline` usa el papel blanco del sistema y se cierra con un borde:
|
|
65
|
+
* es la composición de tarjeta nítida sobre un fondo casi blanco.
|
|
66
|
+
* `soft` conserva la separación tonal y no lleva borde, porque va dentro
|
|
67
|
+
* de algo ya levantado y ahí otro borde no separa nada.
|
|
54
68
|
*/
|
|
55
69
|
variant: {
|
|
56
|
-
outline: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
outline: {
|
|
71
|
+
header: "px-4 py-2",
|
|
72
|
+
primary: "border-(--vuno-accent)/20 bg-vuno-surface",
|
|
73
|
+
root: "gap-2 overflow-hidden border-(--vuno-accent)/20 bg-(--vuno-accent)/10 p-2"
|
|
74
|
+
},
|
|
75
|
+
soft: {
|
|
76
|
+
header: "px-4 py-2",
|
|
77
|
+
primary: "bg-vuno-surface-1",
|
|
78
|
+
root: "gap-2 overflow-hidden bg-(--vuno-accent)/10 p-2"
|
|
79
|
+
}
|
|
60
80
|
}
|
|
61
81
|
}
|
|
62
82
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { VunoColor, VunoRadius } from '#vuno/types/base';
|
|
3
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
4
|
+
/** Curvatura de una tarjeta: admite esquinas rectas, pero no forma de píldora. */
|
|
5
|
+
export type VunoCardRadius = Exclude<VunoRadius, 'full'>;
|
|
6
|
+
export type VunoCardProps = {
|
|
7
|
+
color?: VunoColor;
|
|
8
|
+
radius?: VunoCardRadius;
|
|
9
|
+
tag?: Component | string;
|
|
10
|
+
ui?: VunoUi<'card'>;
|
|
11
|
+
variant?: 'outline' | 'soft';
|
|
12
|
+
};
|
|
File without changes
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useTheme } from "#vuno/composables/useTheme";
|
|
3
|
-
import { filled } from "#vuno/
|
|
3
|
+
import { filled } from "#vuno/utils/slots";
|
|
4
4
|
defineOptions({ name: "VunoCard" });
|
|
5
5
|
const props = defineProps({
|
|
6
|
+
color: { type: String, required: false, default: "neutral" },
|
|
6
7
|
radius: { type: String, required: false, default: void 0 },
|
|
7
8
|
tag: { type: null, required: false, default: "div" },
|
|
8
9
|
ui: { type: Object, required: false, default: void 0 },
|
|
@@ -12,7 +13,7 @@ const slots = defineSlots();
|
|
|
12
13
|
const ui = useTheme(
|
|
13
14
|
"card",
|
|
14
15
|
() => props.ui,
|
|
15
|
-
() => ({ radius: props.radius, variant: props.variant })
|
|
16
|
+
() => ({ color: props.color, radius: props.radius, variant: props.variant })
|
|
16
17
|
);
|
|
17
18
|
</script>
|
|
18
19
|
|
|
@@ -29,17 +30,22 @@ const ui = useTheme(
|
|
|
29
30
|
</div>
|
|
30
31
|
|
|
31
32
|
<div
|
|
32
|
-
v-if="filled(slots.default)"
|
|
33
|
-
:class="ui.
|
|
33
|
+
v-if="filled(slots.default) || filled(slots.footer)"
|
|
34
|
+
:class="ui.primary"
|
|
34
35
|
>
|
|
35
|
-
<
|
|
36
|
-
|
|
36
|
+
<div
|
|
37
|
+
v-if="filled(slots.default)"
|
|
38
|
+
:class="ui.body"
|
|
39
|
+
>
|
|
40
|
+
<slot />
|
|
41
|
+
</div>
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
<div
|
|
44
|
+
v-if="filled(slots.footer)"
|
|
45
|
+
:class="ui.footer"
|
|
46
|
+
>
|
|
47
|
+
<slot name="footer" />
|
|
48
|
+
</div>
|
|
43
49
|
</div>
|
|
44
50
|
</component>
|
|
45
51
|
</template>
|
|
@@ -1,67 +1,4 @@
|
|
|
1
|
-
import type {
|
|
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
|
-
};
|
|
1
|
+
import type { VunoCardProps } from './Card.types.js';
|
|
65
2
|
/**
|
|
66
3
|
* Las tres regiones se pintan solo si se rellenan.
|
|
67
4
|
*
|
|
@@ -78,11 +15,12 @@ type __VLS_Slots = {
|
|
|
78
15
|
footer?: () => unknown;
|
|
79
16
|
header?: () => unknown;
|
|
80
17
|
};
|
|
81
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoCardProps> & Readonly<{}>, {
|
|
19
|
+
color: import("../../types/base.js").VunoColor;
|
|
20
|
+
radius: import("./Card.types.js").VunoCardRadius;
|
|
21
|
+
variant: "outline" | "soft";
|
|
22
|
+
tag: import("vue").Component | string;
|
|
23
|
+
ui: import("../../types/slots.js").VunoUi<"card">;
|
|
86
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
87
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
88
26
|
declare const _default: typeof __VLS_export;
|