@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { VunoTextProps } from './Text.types.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?: () => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoTextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoTextProps> & Readonly<{}>, {
|
|
6
|
+
variant: import("../../types/text.js").VunoTextVariant;
|
|
7
|
+
tag: import("../../types/text.js").VunoTextTag;
|
|
8
|
+
truncate: number;
|
|
9
|
+
tone: import("../../types/text.js").VunoTextTone;
|
|
10
|
+
ui: import("../../types/slots.js").VunoUi<"text">;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const textTheme: Record<"text", {
|
|
2
|
+
readonly slots: {
|
|
3
|
+
readonly root: "";
|
|
4
|
+
};
|
|
5
|
+
readonly variants: {
|
|
6
|
+
readonly tone: {
|
|
7
|
+
readonly body: {
|
|
8
|
+
readonly root: "text-vuno-body";
|
|
9
|
+
};
|
|
10
|
+
readonly inherit: {};
|
|
11
|
+
readonly inverse: {
|
|
12
|
+
readonly root: "text-vuno-inverse";
|
|
13
|
+
};
|
|
14
|
+
readonly muted: {
|
|
15
|
+
readonly root: "text-vuno-muted";
|
|
16
|
+
};
|
|
17
|
+
readonly strong: {
|
|
18
|
+
readonly root: "text-vuno-strong";
|
|
19
|
+
};
|
|
20
|
+
readonly subtle: {
|
|
21
|
+
readonly root: "text-vuno-subtle";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
readonly truncate: {
|
|
25
|
+
readonly false: {};
|
|
26
|
+
readonly true: {
|
|
27
|
+
readonly root: "line-clamp-(--vuno-text-lines)";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly variant: {
|
|
31
|
+
readonly body: {
|
|
32
|
+
readonly root: "font-sans text-sm/5 font-normal";
|
|
33
|
+
};
|
|
34
|
+
readonly caption: {
|
|
35
|
+
readonly root: "font-sans text-xs/4 font-normal";
|
|
36
|
+
};
|
|
37
|
+
readonly code: {
|
|
38
|
+
readonly root: "font-mono text-sm/5 font-normal";
|
|
39
|
+
};
|
|
40
|
+
readonly display: {
|
|
41
|
+
readonly root: "font-sans text-3xl/9 font-semibold tracking-[-0.03em]";
|
|
42
|
+
};
|
|
43
|
+
readonly heading: {
|
|
44
|
+
readonly root: "font-sans text-xl/7 font-semibold tracking-[-0.02em]";
|
|
45
|
+
};
|
|
46
|
+
readonly inherit: {};
|
|
47
|
+
readonly label: {
|
|
48
|
+
readonly root: "font-sans text-xs/4 font-medium";
|
|
49
|
+
};
|
|
50
|
+
readonly title: {
|
|
51
|
+
readonly root: "font-sans text-base/6 font-semibold";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineTheme } from "#vuno/utils/theme";
|
|
2
|
+
export const textTheme = defineTheme("text", {
|
|
3
|
+
slots: { root: "" },
|
|
4
|
+
variants: {
|
|
5
|
+
tone: {
|
|
6
|
+
body: { root: "text-vuno-body" },
|
|
7
|
+
inherit: {},
|
|
8
|
+
inverse: { root: "text-vuno-inverse" },
|
|
9
|
+
muted: { root: "text-vuno-muted" },
|
|
10
|
+
strong: { root: "text-vuno-strong" },
|
|
11
|
+
subtle: { root: "text-vuno-subtle" }
|
|
12
|
+
},
|
|
13
|
+
truncate: {
|
|
14
|
+
false: {},
|
|
15
|
+
true: { root: "line-clamp-(--vuno-text-lines)" }
|
|
16
|
+
},
|
|
17
|
+
variant: {
|
|
18
|
+
body: { root: "font-sans text-sm/5 font-normal" },
|
|
19
|
+
caption: { root: "font-sans text-xs/4 font-normal" },
|
|
20
|
+
code: { root: "font-mono text-sm/5 font-normal" },
|
|
21
|
+
display: { root: "font-sans text-3xl/9 font-semibold tracking-[-0.03em]" },
|
|
22
|
+
heading: { root: "font-sans text-xl/7 font-semibold tracking-[-0.02em]" },
|
|
23
|
+
inherit: {},
|
|
24
|
+
label: { root: "font-sans text-xs/4 font-medium" },
|
|
25
|
+
title: { root: "font-sans text-base/6 font-semibold" }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
2
|
+
import type { VunoTextTag, VunoTextTone, VunoTextVariant } from '#vuno/types/text';
|
|
3
|
+
export type VunoTextProps = {
|
|
4
|
+
tag?: VunoTextTag;
|
|
5
|
+
tone?: VunoTextTone;
|
|
6
|
+
truncate?: number;
|
|
7
|
+
ui?: VunoUi<'text'>;
|
|
8
|
+
variant?: VunoTextVariant;
|
|
9
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
4
|
+
defineOptions({ name: "VunoText" });
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
tag: { type: String, required: false, default: "span" },
|
|
7
|
+
tone: { type: String, required: false, default: "body" },
|
|
8
|
+
truncate: { type: Number, required: false, default: void 0 },
|
|
9
|
+
ui: { type: Object, required: false, default: void 0 },
|
|
10
|
+
variant: { type: String, required: false, default: "body" }
|
|
11
|
+
});
|
|
12
|
+
defineSlots();
|
|
13
|
+
const clampLines = computed(() => {
|
|
14
|
+
if (props.truncate === void 0 || !Number.isFinite(props.truncate) || props.truncate < 1) return void 0;
|
|
15
|
+
return Math.trunc(props.truncate);
|
|
16
|
+
});
|
|
17
|
+
const clampStyle = computed(() => clampLines.value ? { "--vuno-text-lines": String(clampLines.value) } : void 0);
|
|
18
|
+
const ui = useTheme(
|
|
19
|
+
"text",
|
|
20
|
+
() => props.ui,
|
|
21
|
+
() => ({
|
|
22
|
+
tone: props.tone,
|
|
23
|
+
truncate: clampLines.value ? "true" : "false",
|
|
24
|
+
variant: props.variant
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<component
|
|
31
|
+
:is="props.tag"
|
|
32
|
+
:class="ui.root"
|
|
33
|
+
:style="clampStyle"
|
|
34
|
+
>
|
|
35
|
+
<slot />
|
|
36
|
+
</component>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { VunoTextProps } from './Text.types.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?: () => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoTextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoTextProps> & Readonly<{}>, {
|
|
6
|
+
variant: import("../../types/text.js").VunoTextVariant;
|
|
7
|
+
tag: import("../../types/text.js").VunoTextTag;
|
|
8
|
+
truncate: number;
|
|
9
|
+
tone: import("../../types/text.js").VunoTextTone;
|
|
10
|
+
ui: import("../../types/slots.js").VunoUi<"text">;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { VunoToolbarProps } from './Toolbar.types.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?: () => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoToolbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoToolbarProps> & Readonly<{}>, {
|
|
6
|
+
size: import("./Toolbar.types.js").VunoToolbarSize;
|
|
7
|
+
orientation: import("../../types/field.js").VunoControlOrientation;
|
|
8
|
+
ui: import("../../types/slots.js").VunoUi<"toolbar">;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VunoSize } from '#vuno/types/base';
|
|
2
|
+
import type { VunoControlOrientation } from '#vuno/types/field';
|
|
3
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
4
|
+
export type VunoToolbarSize = Extract<VunoSize, 'lg' | 'md' | 'sm' | 'xl' | 'xs'>;
|
|
5
|
+
export type VunoToolbarProps = {
|
|
6
|
+
orientation?: VunoControlOrientation;
|
|
7
|
+
size?: VunoToolbarSize;
|
|
8
|
+
ui?: VunoUi<'toolbar'>;
|
|
9
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVunoDirection } from "#vuno/composables/internal/useVunoDirection";
|
|
3
|
+
import { useTheme } from "#vuno/composables/useTheme";
|
|
4
|
+
import ControlGroup from "#vuno/components/ControlGroup/ControlGroup.vue";
|
|
5
|
+
defineOptions({ name: "VunoToolbar", inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
orientation: { type: String, required: false, default: "horizontal" },
|
|
8
|
+
size: { type: String, required: false, default: "md" },
|
|
9
|
+
ui: { type: Object, required: false, default: void 0 }
|
|
10
|
+
});
|
|
11
|
+
defineSlots();
|
|
12
|
+
const ui = useTheme("toolbar", () => props.ui);
|
|
13
|
+
const direction = useVunoDirection();
|
|
14
|
+
const focusableSelector = [
|
|
15
|
+
"a[href]",
|
|
16
|
+
"button:not([disabled])",
|
|
17
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
18
|
+
"select:not([disabled])",
|
|
19
|
+
"textarea:not([disabled])",
|
|
20
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
21
|
+
].join(",");
|
|
22
|
+
function isAvailable(element) {
|
|
23
|
+
return element.tabIndex >= 0 && !element.closest('[aria-hidden="true"], [hidden], [inert]');
|
|
24
|
+
}
|
|
25
|
+
function toolbarItems(root) {
|
|
26
|
+
return Array.from(root.children).flatMap((child) => {
|
|
27
|
+
if (child instanceof HTMLElement && child.matches(focusableSelector)) return isAvailable(child) ? [child] : [];
|
|
28
|
+
const control = child.querySelector(focusableSelector);
|
|
29
|
+
return control && isAvailable(control) ? [control] : [];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function isEditable(element) {
|
|
33
|
+
return element instanceof HTMLTextAreaElement || element instanceof HTMLInputElement && !["button", "checkbox", "color", "file", "radio", "range", "reset", "submit"].includes(element.type);
|
|
34
|
+
}
|
|
35
|
+
function canLeaveEditable(element, step) {
|
|
36
|
+
const { selectionEnd, selectionStart, value } = element;
|
|
37
|
+
if (selectionStart === null || selectionEnd === null || selectionStart !== selectionEnd) return false;
|
|
38
|
+
return step < 0 ? selectionStart === 0 : selectionEnd === value.length;
|
|
39
|
+
}
|
|
40
|
+
function onKeydown(event) {
|
|
41
|
+
const root = event.currentTarget;
|
|
42
|
+
const target = event.target;
|
|
43
|
+
if (!(root instanceof HTMLElement) || !(target instanceof HTMLElement)) return;
|
|
44
|
+
if (target.closest('[aria-expanded="true"]')) return;
|
|
45
|
+
const horizontal = props.orientation === "horizontal";
|
|
46
|
+
const forward = horizontal && direction() === "rtl" ? -1 : 1;
|
|
47
|
+
const steps = horizontal ? { ArrowLeft: -forward, ArrowRight: forward } : { ArrowDown: 1, ArrowUp: -1 };
|
|
48
|
+
let step = steps[event.key];
|
|
49
|
+
if (step === void 0 && event.key !== "Home" && event.key !== "End") return;
|
|
50
|
+
if (isEditable(target) && (event.key === "Home" || event.key === "End")) return;
|
|
51
|
+
if (step !== void 0 && isEditable(target) && !canLeaveEditable(target, step)) return;
|
|
52
|
+
const items = toolbarItems(root);
|
|
53
|
+
const current = items.findIndex((item) => item === target || item.contains(target));
|
|
54
|
+
if (current < 0 || items.length === 0) return;
|
|
55
|
+
if (event.key === "Home") step = -current;
|
|
56
|
+
if (event.key === "End") step = items.length - 1 - current;
|
|
57
|
+
const next = items[(current + step + items.length) % items.length];
|
|
58
|
+
if (!next || next === target) return;
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
next.focus();
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<ControlGroup
|
|
66
|
+
v-bind="$attrs"
|
|
67
|
+
:aria-orientation="props.orientation"
|
|
68
|
+
:orientation="props.orientation"
|
|
69
|
+
role="toolbar"
|
|
70
|
+
:size="props.size"
|
|
71
|
+
:ui="{ root: ui.root }"
|
|
72
|
+
@keydown="onKeydown"
|
|
73
|
+
>
|
|
74
|
+
<slot />
|
|
75
|
+
</ControlGroup>
|
|
76
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { VunoToolbarProps } from './Toolbar.types.js';
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
default?: () => unknown;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoToolbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoToolbarProps> & Readonly<{}>, {
|
|
6
|
+
size: import("./Toolbar.types.js").VunoToolbarSize;
|
|
7
|
+
orientation: import("../../types/field.js").VunoControlOrientation;
|
|
8
|
+
ui: import("../../types/slots.js").VunoUi<"toolbar">;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { VunoUi } from '#vuno/types/slots';
|
|
3
|
-
/**
|
|
4
|
-
* El aviso que aparece al posar el ratón o al llegar con el teclado.
|
|
5
|
-
*
|
|
6
|
-
* Las cuatro cosas fáciles de dejarse y difíciles de notar que faltan son
|
|
7
|
-
* el retardo al abrir, cerrarlo con Escape, **abrirlo también al enfocar**
|
|
8
|
-
* —si solo abre al posar el ratón, para quien navega con el teclado no
|
|
9
|
-
* existe— y describir el disparador con `aria-describedby`, que es lo que
|
|
10
|
-
* hace que un lector de pantalla lo lea en vez de dejarlo suelto en la
|
|
11
|
-
* página. Las cuatro están abajo, cada una con su prueba.
|
|
12
|
-
*/
|
|
13
|
-
type Props = {
|
|
14
|
-
/** Milisegundos antes de abrirse al posar el ratón. */
|
|
15
|
-
delay?: number;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
/** Dónde montar el aviso. Por defecto, lo que provea el modal que envuelva. */
|
|
18
|
-
portal?: VunoPortalTarget;
|
|
19
|
-
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
20
|
-
text?: string;
|
|
21
|
-
ui?: VunoUi<'tooltip'>;
|
|
22
|
-
};
|
|
1
|
+
import type { VunoTooltipProps } from './Tooltip.types.js';
|
|
23
2
|
type __VLS_Slots = {
|
|
24
3
|
default?: () => unknown;
|
|
25
4
|
};
|
|
26
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoTooltipProps> & Readonly<{}>, {
|
|
27
6
|
text: string;
|
|
28
|
-
ui: VunoUi<"tooltip">;
|
|
7
|
+
ui: import("../../types/slots.js").VunoUi<"tooltip">;
|
|
29
8
|
delay: number;
|
|
30
|
-
portal: VunoPortalTarget;
|
|
31
|
-
side: "
|
|
9
|
+
portal: import("../../types/base.js").VunoPortalTarget;
|
|
10
|
+
side: import("./Tooltip.types.js").VunoTooltipSide;
|
|
32
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
13
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { VunoPlacement, VunoPortalTarget } from '#vuno/types/base';
|
|
2
|
+
import type { VunoUi } from '#vuno/types/slots';
|
|
3
|
+
export type VunoTooltipSide = Extract<VunoPlacement, 'bottom' | 'left' | 'right' | 'top'>;
|
|
4
|
+
export type VunoTooltipProps = {
|
|
5
|
+
delay?: number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
portal?: VunoPortalTarget;
|
|
8
|
+
side?: VunoTooltipSide;
|
|
9
|
+
text?: string;
|
|
10
|
+
ui?: VunoUi<'tooltip'>;
|
|
11
|
+
};
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import { cloneVNode, computed, nextTick, onBeforeUnmount, ref, useId } from "vue
|
|
|
3
3
|
import { useVunoAnchor } from "#vuno/composables/internal/useVunoAnchor";
|
|
4
4
|
import { useVunoPortal } from "#vuno/composables/internal/useVunoPortal";
|
|
5
5
|
import { useTheme } from "#vuno/composables/useTheme";
|
|
6
|
-
import { firstElement } from "#vuno/
|
|
6
|
+
import { firstElement } from "#vuno/utils/slots";
|
|
7
7
|
defineOptions({ name: "VunoTooltip" });
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
delay: { type: Number, required: false, default: 300 },
|
|
@@ -1,34 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { VunoUi } from '#vuno/types/slots';
|
|
3
|
-
/**
|
|
4
|
-
* El aviso que aparece al posar el ratón o al llegar con el teclado.
|
|
5
|
-
*
|
|
6
|
-
* Las cuatro cosas fáciles de dejarse y difíciles de notar que faltan son
|
|
7
|
-
* el retardo al abrir, cerrarlo con Escape, **abrirlo también al enfocar**
|
|
8
|
-
* —si solo abre al posar el ratón, para quien navega con el teclado no
|
|
9
|
-
* existe— y describir el disparador con `aria-describedby`, que es lo que
|
|
10
|
-
* hace que un lector de pantalla lo lea en vez de dejarlo suelto en la
|
|
11
|
-
* página. Las cuatro están abajo, cada una con su prueba.
|
|
12
|
-
*/
|
|
13
|
-
type Props = {
|
|
14
|
-
/** Milisegundos antes de abrirse al posar el ratón. */
|
|
15
|
-
delay?: number;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
/** Dónde montar el aviso. Por defecto, lo que provea el modal que envuelva. */
|
|
18
|
-
portal?: VunoPortalTarget;
|
|
19
|
-
side?: 'bottom' | 'left' | 'right' | 'top';
|
|
20
|
-
text?: string;
|
|
21
|
-
ui?: VunoUi<'tooltip'>;
|
|
22
|
-
};
|
|
1
|
+
import type { VunoTooltipProps } from './Tooltip.types.js';
|
|
23
2
|
type __VLS_Slots = {
|
|
24
3
|
default?: () => unknown;
|
|
25
4
|
};
|
|
26
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<VunoTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VunoTooltipProps> & Readonly<{}>, {
|
|
27
6
|
text: string;
|
|
28
|
-
ui: VunoUi<"tooltip">;
|
|
7
|
+
ui: import("../../types/slots.js").VunoUi<"tooltip">;
|
|
29
8
|
delay: number;
|
|
30
|
-
portal: VunoPortalTarget;
|
|
31
|
-
side: "
|
|
9
|
+
portal: import("../../types/base.js").VunoPortalTarget;
|
|
10
|
+
side: import("./Tooltip.types.js").VunoTooltipSide;
|
|
32
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
13
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { VunoContext } from '#vuno/types/app';
|
|
3
|
+
export declare const vunoContextInjectionKey: InjectionKey<VunoContext>;
|
|
4
|
+
export declare function provideVunoContext(context: VunoContext): void;
|
|
5
|
+
export declare function useVunoContext(): null | VunoContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
export const vunoContextInjectionKey = Symbol("vuno-context");
|
|
3
|
+
export function provideVunoContext(context) {
|
|
4
|
+
provide(vunoContextInjectionKey, context);
|
|
5
|
+
}
|
|
6
|
+
export function useVunoContext() {
|
|
7
|
+
return inject(vunoContextInjectionKey, null);
|
|
8
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
import type { VunoControlOrientation } from '#vuno/types/field';
|
|
2
|
+
import type { VunoControlOrientation, VunoFieldSize } from '#vuno/types/field';
|
|
4
3
|
type VunoControlGroupContext = {
|
|
5
4
|
orientation?: VunoControlOrientation;
|
|
6
|
-
size?:
|
|
5
|
+
size?: VunoFieldSize;
|
|
7
6
|
};
|
|
8
7
|
/** Provee el contexto sin exponer la clave de inyección a sus consumidores. */
|
|
9
8
|
export declare function provideVunoControlGroup(context: MaybeRefOrGetter<VunoControlGroupContext>): void;
|
|
10
9
|
/** Contexto visual del grupo más cercano; no añade semántica al control. */
|
|
11
10
|
export declare function useVunoControlGroup(): {
|
|
12
11
|
orientation: ComputedRef<VunoControlOrientation | undefined>;
|
|
13
|
-
size: ComputedRef<
|
|
12
|
+
size: ComputedRef<VunoFieldSize | undefined>;
|
|
14
13
|
};
|
|
15
14
|
/** Impide que las acciones internas de un control se comporten como hijos del grupo exterior. */
|
|
16
15
|
export declare function resetControlGroup(): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
const vunoDirectionInjectionKey = Symbol("vuno-direction");
|
|
3
|
+
export function provideVunoDirection(direction) {
|
|
4
|
+
provide(vunoDirectionInjectionKey, direction);
|
|
5
|
+
}
|
|
6
|
+
export function useVunoDirection() {
|
|
7
|
+
return inject(vunoDirectionInjectionKey, () => "ltr");
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { VunoFormContext, VunoFormState } from '#vuno/types/form';
|
|
3
|
+
export declare const vunoFormInjectionKey: InjectionKey<VunoFormContext>;
|
|
4
|
+
export declare function provideVunoFormContext<TState extends VunoFormState>(context: VunoFormContext<TState>): void;
|
|
5
|
+
export declare function useVunoFormContext<TState extends VunoFormState>(): null | VunoFormContext<TState>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
export const vunoFormInjectionKey = Symbol("vuno-form");
|
|
3
|
+
export function provideVunoFormContext(context) {
|
|
4
|
+
provide(vunoFormInjectionKey, context);
|
|
5
|
+
}
|
|
6
|
+
export function useVunoFormContext() {
|
|
7
|
+
return inject(vunoFormInjectionKey, null);
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
type VunoOverlayBehindProvider = () => boolean;
|
|
3
|
+
export declare const vunoOverlayBehindInjectionKey: InjectionKey<VunoOverlayBehindProvider>;
|
|
4
|
+
export declare function provideVunoOverlayBehind(behind: VunoOverlayBehindProvider): void;
|
|
5
|
+
export declare function useVunoOverlayBehind(): VunoOverlayBehindProvider;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
export const vunoOverlayBehindInjectionKey = Symbol("vuno-overlay-behind");
|
|
3
|
+
export function provideVunoOverlayBehind(behind) {
|
|
4
|
+
provide(vunoOverlayBehindInjectionKey, behind);
|
|
5
|
+
}
|
|
6
|
+
export function useVunoOverlayBehind() {
|
|
7
|
+
return inject(vunoOverlayBehindInjectionKey, () => false);
|
|
8
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { vunoContextInjectionKey } from "#vuno/internal/keys";
|
|
1
|
+
import { useVunoContext } from "#vuno/composables/internal/useVunoContext";
|
|
3
2
|
export function useContext() {
|
|
4
|
-
const context =
|
|
3
|
+
const context = useVunoContext();
|
|
5
4
|
if (!context) {
|
|
6
5
|
throw new Error("[Vuno] useContext() debe utilizarse dentro de <VApp>.");
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { vunoFormInjectionKey } from "#vuno/internal/keys";
|
|
1
|
+
import { useVunoFormContext } from "#vuno/composables/internal/useVunoFormContext";
|
|
3
2
|
export function useForm(options) {
|
|
4
|
-
const form =
|
|
3
|
+
const form = useVunoFormContext();
|
|
5
4
|
if (!form && !options?.optional) {
|
|
6
5
|
throw new Error("[Vuno] useForm() debe utilizarse dentro de <VForm>.");
|
|
7
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import type { VunoTableQuery, VunoTableQueryOptions } from '#vuno/types/table';
|
|
3
3
|
/**
|
|
4
|
-
* Estado de consulta para `<
|
|
4
|
+
* Estado de consulta para `<VDataTable v-model:query>`.
|
|
5
5
|
*
|
|
6
6
|
* Sin `url` es un `ref` normal. Con `url: true` se sincroniza en los dos
|
|
7
7
|
* sentidos con la query string, de modo que navegar atrás o pegar el enlace
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { computed, toValue } from "vue";
|
|
2
2
|
import { useAppConfig } from "#imports";
|
|
3
3
|
import { defaultIcons, defaultMessages, defaultTheme } from "#vuno/theme";
|
|
4
|
-
import { mergeSlots,
|
|
4
|
+
import { mergeSlots, resolveTheme } from "#vuno/utils/theme";
|
|
5
5
|
export function useTheme(key, ui, variants) {
|
|
6
6
|
const vuno = useVunoAppConfig();
|
|
7
7
|
const entry = (source) => source[key];
|
|
8
8
|
return computed(() => {
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const requested = toValue(variants);
|
|
10
|
+
const active = { ...requested, radius: requested?.radius ?? vuno.value.theme?.radius };
|
|
11
|
+
const component = entry(vuno.value.components ?? {});
|
|
12
|
+
const base = entry(defaultTheme);
|
|
13
|
+
const merged = mergeSlots(resolveTheme(base, active), resolveTheme(component, active, Object.keys(base?.slots ?? {})), toValue(ui));
|
|
11
14
|
return merged;
|
|
12
15
|
});
|
|
13
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { VunoRadius
|
|
1
|
+
import type { VunoRadius } from '#vuno/types/base';
|
|
2
|
+
import type { VunoFieldSize } from '#vuno/types/field';
|
|
2
3
|
import type { VunoUi } from '#vuno/types/slots';
|
|
3
4
|
/**
|
|
4
5
|
* La caja de un control: borde, fondo, foco, inválido y deshabilitado.
|
|
@@ -15,7 +16,7 @@ import type { VunoUi } from '#vuno/types/slots';
|
|
|
15
16
|
type Props = {
|
|
16
17
|
/** La curvatura. Sin valor, la que traiga el tema. */
|
|
17
18
|
radius?: VunoRadius;
|
|
18
|
-
size?:
|
|
19
|
+
size?: VunoFieldSize;
|
|
19
20
|
ui?: VunoUi<'control'>;
|
|
20
21
|
};
|
|
21
22
|
type __VLS_Slots = {
|
|
@@ -28,7 +29,7 @@ type __VLS_Slots = {
|
|
|
28
29
|
};
|
|
29
30
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
30
31
|
radius: VunoRadius;
|
|
31
|
-
size:
|
|
32
|
+
size: VunoFieldSize;
|
|
32
33
|
ui: VunoUi<"control">;
|
|
33
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -28,7 +28,7 @@ export declare const controlTheme: Record<"control", {
|
|
|
28
28
|
readonly root: "not-last:not-first:rounded-none not-only:first:rounded-b-none not-only:last:rounded-t-none focus-within:z-1";
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
readonly radius: Record<import("
|
|
31
|
+
readonly radius: Record<import("../../types/base.js").VunoRadius, Record<"root", string>>;
|
|
32
32
|
readonly size: {
|
|
33
33
|
readonly xs: {
|
|
34
34
|
readonly root: "min-h-6 ps-2 pe-2 text-xs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { resetControlGroup, useVunoControlGroup } from "#vuno/composables/internal/useVunoControlGroup";
|
|
4
4
|
import { useTheme } from "#vuno/composables/useTheme";
|
|
5
|
-
defineOptions({ name: "
|
|
5
|
+
defineOptions({ name: "VunoPrimitiveControl" });
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
radius: { type: String, required: false, default: void 0 },
|
|
8
8
|
size: { type: String, required: false, default: void 0 },
|