@pautena/react-design-system 0.21.0 → 1.0.1
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 +11 -0
- package/dist/Autocomplete/Autocomplete.d.ts +99 -0
- package/dist/Autocomplete/Autocomplete.mjs +47 -0
- package/dist/Autocomplete/Autocomplete.mjs.map +1 -0
- package/dist/Autocomplete/index.d.ts +2 -0
- package/dist/{board/board.d.ts → Board/Board.d.ts} +8 -4
- package/dist/Board/Board.mjs +60 -0
- package/dist/Board/Board.mjs.map +1 -0
- package/dist/Board/index.d.ts +2 -0
- package/dist/BootstrapDialog/BootstrapDialog.d.ts +31 -0
- package/dist/BootstrapDialog/BootstrapDialog.mjs +128 -0
- package/dist/BootstrapDialog/BootstrapDialog.mjs.map +1 -0
- package/dist/BootstrapDialog/index.d.ts +2 -0
- package/dist/{bullet/bullet.d.ts → Bullet/Bullet.d.ts} +5 -1
- package/dist/Bullet/Bullet.mjs +24 -0
- package/dist/Bullet/Bullet.mjs.map +1 -0
- package/dist/Bullet/index.d.ts +2 -0
- package/dist/{confirm-dialog/confirm-dialog.d.ts → ConfirmDialog/ConfirmDialog.d.ts} +8 -3
- package/dist/ConfirmDialog/ConfirmDialog.mjs +54 -0
- package/dist/ConfirmDialog/ConfirmDialog.mjs.map +1 -0
- package/dist/ConfirmDialog/index.d.ts +2 -0
- package/dist/Content/Content.d.ts +6 -0
- package/dist/Content/Content.mjs +10 -0
- package/dist/Content/Content.mjs.map +1 -0
- package/dist/Content/Content.types.d.ts +18 -0
- package/dist/Content/index.d.ts +3 -0
- package/dist/ContentPlaceholder/ContentPlaceholder.d.ts +22 -0
- package/dist/ContentPlaceholder/ContentPlaceholder.mjs +26 -0
- package/dist/ContentPlaceholder/ContentPlaceholder.mjs.map +1 -0
- package/dist/ContentPlaceholder/index.d.ts +2 -0
- package/dist/{date-range-calendar/date-range-calendar.d.ts → DateRangeCalendar/DateRangeCalendar.d.ts} +2 -2
- package/dist/DateRangeCalendar/DateRangeCalendar.mjs +79 -0
- package/dist/DateRangeCalendar/DateRangeCalendar.mjs.map +1 -0
- package/dist/DateRangeCalendar/index.d.ts +2 -0
- package/dist/{date-range-picker/date-range-picker.d.ts → DateRangePicker/DateRangePicker.d.ts} +2 -2
- package/dist/DateRangePicker/DateRangePicker.mjs +55 -0
- package/dist/DateRangePicker/DateRangePicker.mjs.map +1 -0
- package/dist/DateRangePicker/index.d.ts +2 -0
- package/dist/Dialog/Dialog.types.d.ts +230 -0
- package/dist/Dialog/UseDialog.mjs +9 -0
- package/dist/Dialog/UseDialog.mjs.map +1 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Drawerx/Drawer/Drawer.d.ts +10 -0
- package/dist/Drawerx/Drawer/Drawer.mjs +71 -0
- package/dist/Drawerx/Drawer/Drawer.mjs.map +1 -0
- package/dist/{drawerx/drawer/drawer.mock.d.ts → Drawerx/Drawer/Drawer.mock.d.ts} +1 -1
- package/dist/Drawerx/Drawer/index.d.ts +1 -0
- package/dist/{drawerx/drawer.types.d.ts → Drawerx/Drawer.types.d.ts} +119 -3
- package/dist/Drawerx/Drawer.types.mjs +8 -0
- package/dist/Drawerx/Drawer.types.mjs.map +1 -0
- package/dist/{drawerx/drawer-app-bar/drawer-app-bar.d.ts → Drawerx/DrawerAppBar/DrawerAppBar.d.ts} +1 -1
- package/dist/Drawerx/DrawerAppBar/DrawerAppBar.mjs +93 -0
- package/dist/Drawerx/DrawerAppBar/DrawerAppBar.mjs.map +1 -0
- package/dist/Drawerx/DrawerAppBar/index.d.ts +2 -0
- package/dist/Drawerx/DrawerContent/DrawerContent.d.ts +5 -0
- package/dist/Drawerx/DrawerContent/DrawerContent.mjs +35 -0
- package/dist/Drawerx/DrawerContent/DrawerContent.mjs.map +1 -0
- package/dist/Drawerx/DrawerContent/index.d.ts +1 -0
- package/dist/Drawerx/DrawerContext/Drawer.provider.d.ts +45 -0
- package/dist/Drawerx/DrawerContext/Drawer.provider.mjs +54 -0
- package/dist/Drawerx/DrawerContext/Drawer.provider.mjs.map +1 -0
- package/dist/{drawerx/drawer-context/drawer-context.d.ts → Drawerx/DrawerContext/DrawerContext.d.ts} +1 -1
- package/dist/Drawerx/DrawerContext/DrawerContext.mjs +17 -0
- package/dist/Drawerx/DrawerContext/DrawerContext.mjs.map +1 -0
- package/dist/Drawerx/DrawerContext/DrawerMixins.mjs +27 -0
- package/dist/Drawerx/DrawerContext/DrawerMixins.mjs.map +1 -0
- package/dist/Drawerx/DrawerContext/index.d.ts +2 -0
- package/dist/{drawerx/drawer-item/drawer-item.d.ts → Drawerx/DrawerItem/DrawerItem.d.ts} +2 -2
- package/dist/Drawerx/DrawerItem/DrawerItem.mjs +43 -0
- package/dist/Drawerx/DrawerItem/DrawerItem.mjs.map +1 -0
- package/dist/{drawerx/drawer-item/drawer-item-link.d.ts → Drawerx/DrawerItem/DrawerItemLink.d.ts} +1 -1
- package/dist/Drawerx/DrawerItem/DrawerItemLink.mjs +98 -0
- package/dist/Drawerx/DrawerItem/DrawerItemLink.mjs.map +1 -0
- package/dist/{drawerx/drawer-item/drawer-menu-item.d.ts → Drawerx/DrawerItem/DrawerMenuItem.d.ts} +1 -1
- package/dist/Drawerx/DrawerItem/DrawerMenuItem.mjs +115 -0
- package/dist/Drawerx/DrawerItem/DrawerMenuItem.mjs.map +1 -0
- package/dist/Drawerx/DrawerItem/index.d.ts +4 -0
- package/dist/{drawerx/drawer-layout/drawer-layout.d.ts → Drawerx/DrawerLayout/DrawerLayout.d.ts} +4 -4
- package/dist/Drawerx/DrawerLayout/DrawerLayout.mjs +39 -0
- package/dist/Drawerx/DrawerLayout/DrawerLayout.mjs.map +1 -0
- package/dist/Drawerx/DrawerLayout/index.d.ts +2 -0
- package/dist/Drawerx/DrawerMain/DrawerMain.d.ts +3 -0
- package/dist/Drawerx/DrawerMain/DrawerMain.mjs +28 -0
- package/dist/Drawerx/DrawerMain/DrawerMain.mjs.map +1 -0
- package/dist/Drawerx/DrawerMain/index.d.ts +2 -0
- package/dist/{drawerx/drawer-subheader/drawer-subheader.d.ts → Drawerx/DrawerSubheader/DrawerSubheader.d.ts} +1 -1
- package/dist/Drawerx/DrawerSubheader/DrawerSubheader.mjs +22 -0
- package/dist/Drawerx/DrawerSubheader/DrawerSubheader.mjs.map +1 -0
- package/dist/Drawerx/DrawerSubheader/index.d.ts +2 -0
- package/dist/Drawerx/index.d.ts +10 -0
- package/dist/ExpandableAlert/ExpandableAlert.d.ts +45 -0
- package/dist/ExpandableAlert/ExpandableAlert.mjs +60 -0
- package/dist/ExpandableAlert/ExpandableAlert.mjs.map +1 -0
- package/dist/ExpandableAlert/index.d.ts +2 -0
- package/dist/{form-dialog/form-dialog.d.ts → FormDialog/FormDialog.d.ts} +5 -3
- package/dist/FormDialog/FormDialog.mjs +44 -0
- package/dist/FormDialog/FormDialog.mjs.map +1 -0
- package/dist/FormDialog/index.d.ts +2 -0
- package/dist/{group-value-card/group-value-card.d.ts → GroupValueCard/GroupValueCard.d.ts} +3 -2
- package/dist/GroupValueCard/GroupValueCard.mjs +74 -0
- package/dist/GroupValueCard/GroupValueCard.mjs.map +1 -0
- package/dist/GroupValueCard/GroupValueCard.mock.d.ts +2 -0
- package/dist/GroupValueCard/index.d.ts +2 -0
- package/dist/Header/Header.d.ts +40 -0
- package/dist/{header/header.dummy.d.ts → Header/Header.dummy.d.ts} +1 -1
- package/dist/Header/Header.mjs +179 -0
- package/dist/Header/Header.mjs.map +1 -0
- package/dist/Header/Header.types.d.ts +274 -0
- package/dist/Header/header-title.d.ts +34 -0
- package/dist/Header/header-title.mjs +31 -0
- package/dist/Header/header-title.mjs.map +1 -0
- package/dist/Header/index.d.ts +3 -0
- package/dist/{header-layout/header-layout.d.ts → HeaderLayout/HeaderLayout.d.ts} +12 -7
- package/dist/HeaderLayout/HeaderLayout.mjs +54 -0
- package/dist/HeaderLayout/HeaderLayout.mjs.map +1 -0
- package/dist/HeaderLayout/index.d.ts +2 -0
- package/dist/{label/label.d.ts → Label/Label.d.ts} +5 -1
- package/dist/Label/Label.mjs +61 -0
- package/dist/Label/Label.mjs.map +1 -0
- package/dist/Label/index.d.ts +2 -0
- package/dist/ListPanel/ListPanel.context.mjs +8 -0
- package/dist/ListPanel/ListPanel.context.mjs.map +1 -0
- package/dist/{list-panel/list-panel.d.ts → ListPanel/ListPanel.d.ts} +8 -4
- package/dist/ListPanel/ListPanel.mjs +75 -0
- package/dist/ListPanel/ListPanel.mjs.map +1 -0
- package/dist/{list-panel/list-panel.mocks.d.ts → ListPanel/ListPanel.mocks.d.ts} +1 -1
- package/dist/ListPanel/ListPanelPanel.d.ts +17 -0
- package/dist/ListPanel/index.d.ts +3 -0
- package/dist/Markdown/Markdown.mjs +31 -0
- package/dist/Markdown/Markdown.mjs.map +1 -0
- package/dist/Markdown/index.d.ts +1 -0
- package/dist/NotificationCenter/NotificationCenter.context.mjs +15 -0
- package/dist/NotificationCenter/NotificationCenter.context.mjs.map +1 -0
- package/dist/{notification-center/notification-center.hooks.d.ts → NotificationCenter/NotificationCenter.hooks.d.ts} +1 -1
- package/dist/NotificationCenter/NotificationCenter.hooks.mjs +12 -0
- package/dist/NotificationCenter/NotificationCenter.hooks.mjs.map +1 -0
- package/dist/NotificationCenter/NotificationCenter.provider.d.ts +15 -0
- package/dist/NotificationCenter/NotificationCenter.provider.mjs +56 -0
- package/dist/NotificationCenter/NotificationCenter.provider.mjs.map +1 -0
- package/dist/NotificationCenter/index.d.ts +3 -0
- package/dist/Placeholder/Placeholder.d.ts +73 -0
- package/dist/Placeholder/Placeholder.mjs +53 -0
- package/dist/Placeholder/Placeholder.mjs.map +1 -0
- package/dist/{placeholder/placeholder.mock.d.ts → Placeholder/Placeholder.mock.d.ts} +1 -1
- package/dist/Placeholder/index.d.ts +2 -0
- package/dist/{query-container/query-container.d.ts → QueryContainer/QueryContainer.d.ts} +7 -3
- package/dist/QueryContainer/index.d.ts +2 -0
- package/dist/{remote-data-table/remote-data-table.d.ts → RemoteDataTable/RemoteDataTable.d.ts} +4 -3
- package/dist/RemoteDataTable/RemoteDataTable.mjs +57 -0
- package/dist/RemoteDataTable/RemoteDataTable.mjs.map +1 -0
- package/dist/{remote-data-table/remote-data-table.mocks.d.ts → RemoteDataTable/RemoteDataTable.mocks.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTable.types.d.ts +189 -0
- package/dist/{remote-data-table/remote-data-table-body.d.ts → RemoteDataTable/RemoteDataTableBody.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTableBody.mjs +87 -0
- package/dist/RemoteDataTable/RemoteDataTableBody.mjs.map +1 -0
- package/dist/{remote-data-table/remote-data-table-pagination.d.ts → RemoteDataTable/RemoteDataTablePagination.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTablePagination.mjs +33 -0
- package/dist/RemoteDataTable/RemoteDataTablePagination.mjs.map +1 -0
- package/dist/{remote-data-table/remote-data-table-query-builder.d.ts → RemoteDataTable/RemoteDataTableQueryBuilder.d.ts} +1 -1
- package/dist/RemoteDataTable/RemoteDataTableQueryBuilder.mjs +296 -0
- package/dist/RemoteDataTable/RemoteDataTableQueryBuilder.mjs.map +1 -0
- package/dist/RemoteDataTable/index.d.ts +3 -0
- package/dist/{remote-data-table → RemoteDataTable}/query-spec-utils.d.ts +1 -1
- package/dist/RemoteDataTable/query-spec-utils.mjs +74 -0
- package/dist/RemoteDataTable/query-spec-utils.mjs.map +1 -0
- package/dist/{remote-data-table → RemoteDataTable}/use-remote-data-table.d.ts +1 -1
- package/dist/RemoteDataTable/use-remote-data-table.mjs +40 -0
- package/dist/RemoteDataTable/use-remote-data-table.mjs.map +1 -0
- package/dist/Select/Select.d.ts +147 -0
- package/dist/Select/Select.mjs +103 -0
- package/dist/Select/Select.mjs.map +1 -0
- package/dist/Select/index.d.ts +2 -0
- package/dist/{skeleton-card/skeleton-card.d.ts → SkeletonCard/SkeletonCard.d.ts} +2 -1
- package/dist/SkeletonCard/SkeletonCard.mjs +34 -0
- package/dist/SkeletonCard/SkeletonCard.mjs.map +1 -0
- package/dist/SkeletonCard/index.d.ts +2 -0
- package/dist/{skeleton-grid/skeleton-grid.d.ts → SkeletonGrid/SkeletonGrid.d.ts} +2 -1
- package/dist/SkeletonGrid/SkeletonGrid.mjs +13 -0
- package/dist/SkeletonGrid/SkeletonGrid.mjs.map +1 -0
- package/dist/SkeletonGrid/index.d.ts +2 -0
- package/dist/TabCard/TabCard.context.mjs +7 -0
- package/dist/TabCard/TabCard.context.mjs.map +1 -0
- package/dist/TabCard/TabCard.d.ts +43 -0
- package/dist/{tab-card/tab-card.dummy.d.ts → TabCard/TabCard.dummy.d.ts} +1 -1
- package/dist/TabCard/TabCard.mjs +68 -0
- package/dist/TabCard/TabCard.mjs.map +1 -0
- package/dist/TabCard/TabCardPanel.d.ts +22 -0
- package/dist/TabCard/index.d.ts +3 -0
- package/dist/TabPanel/TabPanel.d.ts +18 -0
- package/dist/TabPanel/TabPanel.mjs +22 -0
- package/dist/TabPanel/TabPanel.mjs.map +1 -0
- package/dist/TabPanel/index.d.ts +1 -0
- package/dist/TabProvider/TabProvider.context.mjs +8 -0
- package/dist/TabProvider/TabProvider.context.mjs.map +1 -0
- package/dist/TabProvider/TabProvider.provider.mjs +14 -0
- package/dist/TabProvider/TabProvider.provider.mjs.map +1 -0
- package/dist/TabProvider/index.d.ts +2 -0
- package/dist/TextField/TextField.d.ts +127 -0
- package/dist/TextField/TextField.mjs +115 -0
- package/dist/TextField/TextField.mjs.map +1 -0
- package/dist/TextField/index.d.ts +2 -0
- package/dist/{value-base/value-displays.types.d.ts → ValueBase/ValueDisplays.types.d.ts} +0 -10
- package/dist/ValueBase/ValueDisplays.types.mjs +5 -0
- package/dist/ValueBase/ValueDisplays.types.mjs.map +1 -0
- package/dist/ValueBase/index.d.ts +1 -0
- package/dist/ValueBoolean/ValueBoolean.d.ts +12 -0
- package/dist/ValueBoolean/ValueBoolean.mjs +34 -0
- package/dist/ValueBoolean/ValueBoolean.mjs.map +1 -0
- package/dist/ValueBoolean/index.d.ts +2 -0
- package/dist/ValueCard/ValueCard.d.ts +14 -0
- package/dist/ValueCard/ValueCard.mjs +10 -0
- package/dist/ValueCard/ValueCard.mjs.map +1 -0
- package/dist/ValueCard/index.d.ts +2 -0
- package/dist/{value-content/value-content.d.ts → ValueContent/ValueContent.d.ts} +5 -5
- package/dist/ValueContent/ValueContent.mjs +35 -0
- package/dist/ValueContent/ValueContent.mjs.map +1 -0
- package/dist/ValueContent/index.d.ts +2 -0
- package/dist/ValueDatetime/ValueDatetime.d.ts +15 -0
- package/dist/ValueDatetime/ValueDatetime.mjs +30 -0
- package/dist/ValueDatetime/ValueDatetime.mjs.map +1 -0
- package/dist/ValueDatetime/index.d.ts +2 -0
- package/dist/ValueImage/ValueImage.d.ts +15 -0
- package/dist/ValueImage/ValueImage.mjs +26 -0
- package/dist/ValueImage/ValueImage.mjs.map +1 -0
- package/dist/ValueImage/index.d.ts +2 -0
- package/dist/ValueItem/ValueItem.d.ts +33 -0
- package/dist/ValueItem/ValueItem.mjs +36 -0
- package/dist/ValueItem/ValueItem.mjs.map +1 -0
- package/dist/ValueItem/index.d.ts +2 -0
- package/dist/ValueLabel/ValueLabel.d.ts +22 -0
- package/dist/ValueLabel/ValueLabel.mjs +35 -0
- package/dist/ValueLabel/ValueLabel.mjs.map +1 -0
- package/dist/ValueLabel/index.d.ts +2 -0
- package/dist/ValueRating/ValueRating.d.ts +18 -0
- package/dist/ValueRating/ValueRating.mjs +26 -0
- package/dist/ValueRating/ValueRating.mjs.map +1 -0
- package/dist/ValueRating/index.d.ts +2 -0
- package/dist/ValueText/ValueText.d.ts +12 -0
- package/dist/ValueText/ValueText.mjs +19 -0
- package/dist/ValueText/ValueText.mjs.map +1 -0
- package/dist/ValueText/index.d.ts +2 -0
- package/dist/index.d.ts +73 -48
- package/dist/index.mjs +139 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tests/actions.d.ts +6 -0
- package/dist/tests/actions.mjs +38 -0
- package/dist/tests/actions.mjs.map +1 -0
- package/dist/tests/assertions.d.ts +24 -0
- package/dist/tests/assertions.mjs +39 -0
- package/dist/tests/assertions.mjs.map +1 -0
- package/dist/tests/file-mock.d.ts +2 -0
- package/dist/tests/index.d.ts +2 -0
- package/dist/tests/index.mjs +23 -0
- package/dist/tests/index.mjs.map +1 -0
- package/dist/tests/mocks/markdown.mock.d.ts +1 -0
- package/dist/tests/mocks.d.ts +3 -0
- package/dist/tests/table-placeholder/TablePlaceholder.d.ts +1 -0
- package/dist/tests/table-placeholder/index.d.ts +1 -0
- package/dist/tests/testing-library.d.ts +106 -0
- package/dist/tests/testing-library.mjs +31 -0
- package/dist/tests/testing-library.mjs.map +1 -0
- package/dist/utils/arrays.mjs +9 -0
- package/dist/utils/arrays.mjs.map +1 -0
- package/dist/utils/breakpoints.mjs +33 -0
- package/dist/utils/breakpoints.mjs.map +1 -0
- package/dist/utils/forms.mjs +10 -0
- package/dist/utils/forms.mjs.map +1 -0
- package/dist/utils/theme.mjs +12 -0
- package/dist/utils/theme.mjs.map +1 -0
- package/package.json +45 -36
- package/dist/action/action-header.d.ts +0 -9
- package/dist/action/action.d.ts +0 -61
- package/dist/action/index.d.ts +0 -2
- package/dist/autocomplete/autocomplete.d.ts +0 -39
- package/dist/autocomplete/index.d.ts +0 -1
- package/dist/board/index.d.ts +0 -1
- package/dist/bootstrap-dialog/bootstrap-dialog.d.ts +0 -5
- package/dist/bootstrap-dialog/index.d.ts +0 -1
- package/dist/bullet/index.d.ts +0 -1
- package/dist/center-container/center-container.d.ts +0 -25
- package/dist/center-container/index.d.ts +0 -1
- package/dist/confirm-dialog/index.d.ts +0 -1
- package/dist/content/content.d.ts +0 -5
- package/dist/content/content.types.d.ts +0 -4
- package/dist/content/index.d.ts +0 -2
- package/dist/content-placeholder/content-placeholder.d.ts +0 -18
- package/dist/content-placeholder/index.d.ts +0 -1
- package/dist/date-range-calendar/index.d.ts +0 -1
- package/dist/date-range-picker/index.d.ts +0 -1
- package/dist/dialog/dialog.types.d.ts +0 -99
- package/dist/dialog/index.d.ts +0 -2
- package/dist/drawerx/drawer/drawer.d.ts +0 -7
- package/dist/drawerx/drawer/index.d.ts +0 -1
- package/dist/drawerx/drawer-app-bar/index.d.ts +0 -1
- package/dist/drawerx/drawer-content/drawer-content.d.ts +0 -5
- package/dist/drawerx/drawer-content/index.d.ts +0 -1
- package/dist/drawerx/drawer-context/drawer.provider.d.ts +0 -17
- package/dist/drawerx/drawer-context/index.d.ts +0 -2
- package/dist/drawerx/drawer-item/index.d.ts +0 -3
- package/dist/drawerx/drawer-layout/index.d.ts +0 -1
- package/dist/drawerx/drawer-main/drawer-main.d.ts +0 -3
- package/dist/drawerx/drawer-main/index.d.ts +0 -1
- package/dist/drawerx/drawer-subheader/index.d.ts +0 -1
- package/dist/drawerx/index.d.ts +0 -7
- package/dist/enhanced-remote-table/enhanced-remote-table.d.ts +0 -46
- package/dist/enhanced-remote-table/enhanced-remote-table.mock.d.ts +0 -11
- package/dist/enhanced-remote-table/index.d.ts +0 -1
- package/dist/enhanced-table/enhanced-table-head.d.ts +0 -16
- package/dist/enhanced-table/enhanced-table.d.ts +0 -47
- package/dist/enhanced-table/enhanced-table.mock.d.ts +0 -16
- package/dist/enhanced-table/index.d.ts +0 -2
- package/dist/expandable-alert/expandable-alert.d.ts +0 -14
- package/dist/expandable-alert/index.d.ts +0 -1
- package/dist/form-dialog/index.d.ts +0 -1
- package/dist/generators/generators.mock.d.ts +0 -30
- package/dist/generators/generators.model.d.ts +0 -92
- package/dist/generators/index.d.ts +0 -1
- package/dist/group-value-card/group-value-card.mock.d.ts +0 -4
- package/dist/group-value-card/index.d.ts +0 -1
- package/dist/header/header-title.d.ts +0 -9
- package/dist/header/header.d.ts +0 -6
- package/dist/header/header.types.d.ts +0 -88
- package/dist/header/index.d.ts +0 -3
- package/dist/header-layout/index.d.ts +0 -1
- package/dist/index.cjs.js +0 -281
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -49140
- package/dist/index.es.js.map +0 -1
- package/dist/label/index.d.ts +0 -1
- package/dist/link-card/index.d.ts +0 -1
- package/dist/link-card/link-card.d.ts +0 -11
- package/dist/list-panel/index.d.ts +0 -2
- package/dist/list-panel/list-panel-panel.d.ts +0 -5
- package/dist/loading-area/index.d.ts +0 -1
- package/dist/loading-area/loading-area.d.ts +0 -4
- package/dist/markdown/index.d.ts +0 -1
- package/dist/model-form/index.d.ts +0 -1
- package/dist/model-form/model-form-field.d.ts +0 -10
- package/dist/model-form/model-form.d.ts +0 -14
- package/dist/notification-center/index.d.ts +0 -3
- package/dist/notification-center/notification-center.provider.d.ts +0 -5
- package/dist/object-details/index.d.ts +0 -1
- package/dist/object-details/object-details.d.ts +0 -11
- package/dist/placeholder/index.d.ts +0 -1
- package/dist/placeholder/placeholder.d.ts +0 -22
- package/dist/query-container/index.d.ts +0 -1
- package/dist/remote-data-table/index.d.ts +0 -2
- package/dist/remote-data-table/remote-data-table.types.d.ts +0 -52
- package/dist/search-input/index.d.ts +0 -1
- package/dist/search-input/search-input.d.ts +0 -60
- package/dist/select/index.d.ts +0 -1
- package/dist/select/select.d.ts +0 -57
- package/dist/skeleton-card/index.d.ts +0 -1
- package/dist/skeleton-grid/index.d.ts +0 -1
- package/dist/tab-card/index.d.ts +0 -2
- package/dist/tab-card/tab-card-panel.d.ts +0 -7
- package/dist/tab-card/tab-card.d.ts +0 -11
- package/dist/tab-panel/index.d.ts +0 -1
- package/dist/tab-panel/tab-panel.d.ts +0 -6
- package/dist/tab-provider/index.d.ts +0 -2
- package/dist/table-list/index.d.ts +0 -1
- package/dist/table-list/table-list.d.ts +0 -21
- package/dist/text-field/index.d.ts +0 -1
- package/dist/text-field/text-field.d.ts +0 -25
- package/dist/value-base/index.d.ts +0 -2
- package/dist/value-base/value-edit.d.ts +0 -23
- package/dist/value-boolean/index.d.ts +0 -1
- package/dist/value-boolean/value-boolean.d.ts +0 -6
- package/dist/value-card/index.d.ts +0 -1
- package/dist/value-card/value-card.d.ts +0 -6
- package/dist/value-content/index.d.ts +0 -1
- package/dist/value-datetime/index.d.ts +0 -1
- package/dist/value-datetime/value-datetime.d.ts +0 -16
- package/dist/value-image/index.d.ts +0 -1
- package/dist/value-image/value-image.d.ts +0 -11
- package/dist/value-item/index.d.ts +0 -1
- package/dist/value-item/value-item.d.ts +0 -16
- package/dist/value-label/index.d.ts +0 -1
- package/dist/value-label/value-label.d.ts +0 -10
- package/dist/value-rating/index.d.ts +0 -1
- package/dist/value-rating/value-rating.d.ts +0 -8
- package/dist/value-text/index.d.ts +0 -1
- package/dist/value-text/value-text.d.ts +0 -6
- /package/dist/{dialog/use-dialog.d.ts → Dialog/UseDialog.d.ts} +0 -0
- /package/dist/{drawerx/drawer-context/drawer-mixins.d.ts → Drawerx/DrawerContext/DrawerMixins.d.ts} +0 -0
- /package/dist/{list-panel/list-panel.context.d.ts → ListPanel/ListPanel.context.d.ts} +0 -0
- /package/dist/{markdown/markdown.d.ts → Markdown/Markdown.d.ts} +0 -0
- /package/dist/{notification-center/notification-center.context.d.ts → NotificationCenter/NotificationCenter.context.d.ts} +0 -0
- /package/dist/{tab-card/tab-card.context.d.ts → TabCard/TabCard.context.d.ts} +0 -0
- /package/dist/{tab-provider/tab-provider.context.d.ts → TabProvider/TabProvider.context.d.ts} +0 -0
- /package/dist/{tab-provider/tab-provider.provider.d.ts → TabProvider/TabProvider.provider.d.ts} +0 -0
|
@@ -1,43 +1,130 @@
|
|
|
1
1
|
import { DrawerProps as MuiDrawerProps } from '@mui/material/Drawer';
|
|
2
2
|
import { Theme } from '@mui/material/styles';
|
|
3
3
|
import { CSSProperties, FunctionComponent, PropsWithChildren, ReactElement } from 'react';
|
|
4
|
-
import { BulletVariant } from '../
|
|
5
|
-
import { LabelVariant } from '../
|
|
6
|
-
import { DrawerAppBarProps } from './
|
|
4
|
+
import { BulletVariant } from '../Bullet';
|
|
5
|
+
import { LabelVariant } from '../Label';
|
|
6
|
+
import { DrawerAppBarProps } from './DrawerAppBar';
|
|
7
|
+
/**
|
|
8
|
+
* Drawer display variants
|
|
9
|
+
*/
|
|
7
10
|
export type DrawerVariant = "temporary" | "mini" | "persistent";
|
|
11
|
+
/**
|
|
12
|
+
* Drawer open/close states
|
|
13
|
+
*/
|
|
8
14
|
export type DrawerState = "open" | "collapse" | "close";
|
|
15
|
+
/**
|
|
16
|
+
* Drawer size variants
|
|
17
|
+
*/
|
|
9
18
|
export type DrawerSize = "small" | "medium";
|
|
19
|
+
/**
|
|
20
|
+
* Avatar configuration for drawer items
|
|
21
|
+
*/
|
|
10
22
|
export interface DrawerItemAvatar {
|
|
23
|
+
/**
|
|
24
|
+
* Avatar image source URL
|
|
25
|
+
*/
|
|
11
26
|
src: string;
|
|
27
|
+
/**
|
|
28
|
+
* Alt text for the avatar image
|
|
29
|
+
*/
|
|
12
30
|
alt: string;
|
|
13
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Label configuration for drawer items
|
|
34
|
+
*/
|
|
14
35
|
export interface DrawerItemLabel {
|
|
36
|
+
/**
|
|
37
|
+
* Label text content
|
|
38
|
+
*/
|
|
15
39
|
text: string;
|
|
40
|
+
/**
|
|
41
|
+
* Label color variant
|
|
42
|
+
*/
|
|
16
43
|
variant: LabelVariant;
|
|
17
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Bullet indicator configuration for drawer items
|
|
47
|
+
*/
|
|
18
48
|
export interface DrawerItemBullet {
|
|
49
|
+
/**
|
|
50
|
+
* Bullet color variant
|
|
51
|
+
*/
|
|
19
52
|
variant: BulletVariant;
|
|
20
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Navigation link item in the drawer
|
|
56
|
+
*/
|
|
21
57
|
export interface DrawerNavigationLink {
|
|
58
|
+
/**
|
|
59
|
+
* Item type discriminator
|
|
60
|
+
*/
|
|
22
61
|
kind: "link";
|
|
62
|
+
/**
|
|
63
|
+
* Unique identifier
|
|
64
|
+
*/
|
|
23
65
|
id: string;
|
|
66
|
+
/**
|
|
67
|
+
* Display text
|
|
68
|
+
*/
|
|
24
69
|
text: string;
|
|
70
|
+
/**
|
|
71
|
+
* Navigation URL
|
|
72
|
+
*/
|
|
25
73
|
href: string;
|
|
74
|
+
/**
|
|
75
|
+
* Optional icon element
|
|
76
|
+
*/
|
|
26
77
|
icon?: ReactElement;
|
|
78
|
+
/**
|
|
79
|
+
* Optional avatar configuration
|
|
80
|
+
*/
|
|
27
81
|
avatar?: DrawerItemAvatar;
|
|
82
|
+
/**
|
|
83
|
+
* Optional label badge
|
|
84
|
+
*/
|
|
28
85
|
label?: DrawerItemLabel;
|
|
86
|
+
/**
|
|
87
|
+
* Optional bullet indicator
|
|
88
|
+
*/
|
|
29
89
|
bullet?: DrawerItemBullet;
|
|
30
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Collapsable navigation group with nested items
|
|
93
|
+
*/
|
|
31
94
|
export type DrawerNavigationCollapsable = Pick<DrawerNavigationLink, "id" | "text" | "icon"> & {
|
|
95
|
+
/**
|
|
96
|
+
* Item type discriminator
|
|
97
|
+
*/
|
|
32
98
|
kind: "collapsable";
|
|
99
|
+
/**
|
|
100
|
+
* Nested navigation items
|
|
101
|
+
*/
|
|
33
102
|
items: DrawerNavigationItem[];
|
|
34
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* Section header in the drawer navigation
|
|
106
|
+
*/
|
|
35
107
|
export interface DrawerNavigationHeader {
|
|
108
|
+
/**
|
|
109
|
+
* Item type discriminator
|
|
110
|
+
*/
|
|
36
111
|
kind: "header";
|
|
112
|
+
/**
|
|
113
|
+
* Unique identifier
|
|
114
|
+
*/
|
|
37
115
|
id: string;
|
|
116
|
+
/**
|
|
117
|
+
* Header text
|
|
118
|
+
*/
|
|
38
119
|
text: string;
|
|
39
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Union of all possible drawer navigation item types
|
|
123
|
+
*/
|
|
40
124
|
export type DrawerNavigationItem = DrawerNavigationLink | DrawerNavigationCollapsable | DrawerNavigationHeader;
|
|
125
|
+
/**
|
|
126
|
+
* Complete navigation structure for the drawer
|
|
127
|
+
*/
|
|
41
128
|
export type DrawerNavigation = DrawerNavigationItem[];
|
|
42
129
|
export interface DrawerContentProps {
|
|
43
130
|
/**
|
|
@@ -45,14 +132,43 @@ export interface DrawerContentProps {
|
|
|
45
132
|
*/
|
|
46
133
|
navigation: DrawerNavigation;
|
|
47
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* DrawerContent component type
|
|
137
|
+
*/
|
|
48
138
|
export type DrawerContentComponent = FunctionComponent<DrawerContentProps>;
|
|
139
|
+
/**
|
|
140
|
+
* DrawerContent element type
|
|
141
|
+
*/
|
|
49
142
|
export type DrawerContentElement = ReactElement<DrawerContentProps, DrawerContentComponent>;
|
|
143
|
+
/**
|
|
144
|
+
* Props for the Drawer component
|
|
145
|
+
*
|
|
146
|
+
* @extends MuiDrawerProps
|
|
147
|
+
*/
|
|
50
148
|
export type DrawerProps = PropsWithChildren<MuiDrawerProps>;
|
|
149
|
+
/**
|
|
150
|
+
* Drawer component type
|
|
151
|
+
*/
|
|
51
152
|
export type DrawerComponent = FunctionComponent<DrawerProps>;
|
|
153
|
+
/**
|
|
154
|
+
* Drawer element type
|
|
155
|
+
*/
|
|
52
156
|
export type DrawerElement = ReactElement<DrawerProps, DrawerComponent>;
|
|
157
|
+
/**
|
|
158
|
+
* Returns color and font weight styles for drawer items based on selection state
|
|
159
|
+
*
|
|
160
|
+
* @param theme - MUI theme object
|
|
161
|
+
* @param selected - Whether the item is selected
|
|
162
|
+
*/
|
|
53
163
|
export declare const getDrawerItemColors: (theme: Theme, selected: boolean | undefined) => {
|
|
54
164
|
color?: string;
|
|
55
165
|
fontWeight: CSSProperties["fontWeight"];
|
|
56
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* DrawerAppBar component type
|
|
169
|
+
*/
|
|
57
170
|
export type DrawerAppBarComponent = FunctionComponent<DrawerAppBarProps>;
|
|
171
|
+
/**
|
|
172
|
+
* DrawerAppBar element type
|
|
173
|
+
*/
|
|
58
174
|
export type DrawerAppBarElement = ReactElement<DrawerAppBarProps, DrawerAppBarComponent>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.types.mjs","sources":["../../src/Drawerx/Drawer.types.ts"],"sourcesContent":["import type { DrawerProps as MuiDrawerProps } from \"@mui/material/Drawer\";\nimport type { Theme } from \"@mui/material/styles\";\nimport type {\n CSSProperties,\n FunctionComponent,\n PropsWithChildren,\n ReactElement,\n} from \"react\";\nimport type { BulletVariant } from \"../Bullet\";\nimport type { LabelVariant } from \"../Label\";\nimport type { DrawerAppBarProps } from \"./DrawerAppBar\";\n\n/**\n * Drawer display variants\n */\nexport type DrawerVariant = \"temporary\" | \"mini\" | \"persistent\";\n\n/**\n * Drawer open/close states\n */\nexport type DrawerState = \"open\" | \"collapse\" | \"close\";\n\n/**\n * Drawer size variants\n */\nexport type DrawerSize = \"small\" | \"medium\";\n\n/**\n * Avatar configuration for drawer items\n */\nexport interface DrawerItemAvatar {\n /**\n * Avatar image source URL\n */\n src: string;\n /**\n * Alt text for the avatar image\n */\n alt: string;\n}\n\n/**\n * Label configuration for drawer items\n */\nexport interface DrawerItemLabel {\n /**\n * Label text content\n */\n text: string;\n /**\n * Label color variant\n */\n variant: LabelVariant;\n}\n\n/**\n * Bullet indicator configuration for drawer items\n */\nexport interface DrawerItemBullet {\n /**\n * Bullet color variant\n */\n variant: BulletVariant;\n}\n\n/**\n * Navigation link item in the drawer\n */\nexport interface DrawerNavigationLink {\n /**\n * Item type discriminator\n */\n kind: \"link\";\n /**\n * Unique identifier\n */\n id: string;\n /**\n * Display text\n */\n text: string;\n /**\n * Navigation URL\n */\n href: string;\n /**\n * Optional icon element\n */\n icon?: ReactElement;\n /**\n * Optional avatar configuration\n */\n avatar?: DrawerItemAvatar;\n /**\n * Optional label badge\n */\n label?: DrawerItemLabel;\n /**\n * Optional bullet indicator\n */\n bullet?: DrawerItemBullet;\n}\n\n/**\n * Collapsable navigation group with nested items\n */\nexport type DrawerNavigationCollapsable = Pick<\n DrawerNavigationLink,\n \"id\" | \"text\" | \"icon\"\n> & {\n /**\n * Item type discriminator\n */\n kind: \"collapsable\";\n /**\n * Nested navigation items\n */\n items: DrawerNavigationItem[];\n};\n\n/**\n * Section header in the drawer navigation\n */\nexport interface DrawerNavigationHeader {\n /**\n * Item type discriminator\n */\n kind: \"header\";\n /**\n * Unique identifier\n */\n id: string;\n /**\n * Header text\n */\n text: string;\n}\n\n/**\n * Union of all possible drawer navigation item types\n */\nexport type DrawerNavigationItem =\n | DrawerNavigationLink\n | DrawerNavigationCollapsable\n | DrawerNavigationHeader;\n\n/**\n * Complete navigation structure for the drawer\n */\nexport type DrawerNavigation = DrawerNavigationItem[];\n\nexport interface DrawerContentProps {\n /**\n * Object with the content that has to be rendered\n */\n navigation: DrawerNavigation;\n}\n\n/**\n * DrawerContent component type\n */\nexport type DrawerContentComponent = FunctionComponent<DrawerContentProps>;\n\n/**\n * DrawerContent element type\n */\nexport type DrawerContentElement = ReactElement<\n DrawerContentProps,\n DrawerContentComponent\n>;\n\n/**\n * Props for the Drawer component\n *\n * @extends MuiDrawerProps\n */\nexport type DrawerProps = PropsWithChildren<MuiDrawerProps>;\n\n/**\n * Drawer component type\n */\nexport type DrawerComponent = FunctionComponent<DrawerProps>;\n\n/**\n * Drawer element type\n */\nexport type DrawerElement = ReactElement<DrawerProps, DrawerComponent>;\n\n/**\n * Returns color and font weight styles for drawer items based on selection state\n *\n * @param theme - MUI theme object\n * @param selected - Whether the item is selected\n */\nexport const getDrawerItemColors = (\n theme: Theme,\n selected: boolean | undefined,\n): {\n color?: string;\n fontWeight: CSSProperties[\"fontWeight\"];\n} => ({\n color: selected ? theme.palette.primary.main : undefined,\n fontWeight: selected\n ? theme.typography.fontWeightBold\n : theme.typography.fontWeightMedium,\n});\n\n/**\n * DrawerAppBar component type\n */\nexport type DrawerAppBarComponent = FunctionComponent<DrawerAppBarProps>;\n\n/**\n * DrawerAppBar element type\n */\nexport type DrawerAppBarElement = ReactElement<\n DrawerAppBarProps,\n DrawerAppBarComponent\n>;\n"],"names":["getDrawerItemColors","theme","selected"],"mappings":"AAkMO,MAAMA,IAAsB,CACjCC,GACAC,OAII;AAAA,EACJ,OAAOA,IAAWD,EAAM,QAAQ,QAAQ,OAAO;AAAA,EAC/C,YAAYC,IACRD,EAAM,WAAW,iBACjBA,EAAM,WAAW;AACvB;"}
|
package/dist/{drawerx/drawer-app-bar/drawer-app-bar.d.ts → Drawerx/DrawerAppBar/DrawerAppBar.d.ts}
RENAMED
|
@@ -8,4 +8,4 @@ export interface DrawerAppBarProps extends MuiAppBarProps {
|
|
|
8
8
|
/**
|
|
9
9
|
* DrawerAppBar component that renders an AppBar adapted to work inside a Drawer context.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export default function DrawerAppBar({ title, sx, children, ...rest }: DrawerAppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import u from "@mui/icons-material/ChevronLeft";
|
|
3
|
+
import f from "@mui/icons-material/Menu";
|
|
4
|
+
import g from "@mui/icons-material/MenuOpen";
|
|
5
|
+
import w from "@mui/material/AppBar";
|
|
6
|
+
import x from "@mui/material/IconButton";
|
|
7
|
+
import { styled as v, useTheme as y } from "@mui/material/styles";
|
|
8
|
+
import I from "@mui/material/Toolbar";
|
|
9
|
+
import b from "@mui/material/Typography";
|
|
10
|
+
import "@mui/material";
|
|
11
|
+
import "react";
|
|
12
|
+
import { useDrawer as B } from "../DrawerContext/DrawerContext.mjs";
|
|
13
|
+
const M = v(w)(({ theme: r }) => ({
|
|
14
|
+
borderWidth: 0,
|
|
15
|
+
borderBottomWidth: 1,
|
|
16
|
+
borderStyle: "solid",
|
|
17
|
+
borderColor: r.palette.divider,
|
|
18
|
+
boxShadow: "none",
|
|
19
|
+
zIndex: r.zIndex.drawer + 1
|
|
20
|
+
})), S = {
|
|
21
|
+
temporary: !1,
|
|
22
|
+
mini: !0,
|
|
23
|
+
persistent: !0
|
|
24
|
+
}, W = {
|
|
25
|
+
temporary: () => !0,
|
|
26
|
+
mini: (r) => r !== "open",
|
|
27
|
+
persistent: () => !0
|
|
28
|
+
};
|
|
29
|
+
function E({
|
|
30
|
+
title: r,
|
|
31
|
+
sx: s,
|
|
32
|
+
children: p,
|
|
33
|
+
...d
|
|
34
|
+
}) {
|
|
35
|
+
const t = y(), { state: i, variant: n, switchState: m, drawerWidth: a, clipped: e } = B(), c = S[n] && !e && {
|
|
36
|
+
transition: t.transitions.create(["width", "margin"], {
|
|
37
|
+
easing: t.transitions.easing.sharp,
|
|
38
|
+
duration: t.transitions.duration.leavingScreen
|
|
39
|
+
}),
|
|
40
|
+
...i === "open" && {
|
|
41
|
+
marginLeft: a,
|
|
42
|
+
width: `calc(100% - ${a}px)`,
|
|
43
|
+
transition: t.transitions.create(["width", "margin"], {
|
|
44
|
+
easing: t.transitions.easing.sharp,
|
|
45
|
+
duration: t.transitions.duration.enteringScreen
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
} || {};
|
|
49
|
+
return /* @__PURE__ */ o(
|
|
50
|
+
M,
|
|
51
|
+
{
|
|
52
|
+
position: e ? "fixed" : void 0,
|
|
53
|
+
...d,
|
|
54
|
+
sx: {
|
|
55
|
+
...s,
|
|
56
|
+
...c,
|
|
57
|
+
zIndex: (h) => h.zIndex.drawer + (e ? 1 : 0)
|
|
58
|
+
},
|
|
59
|
+
children: /* @__PURE__ */ l(I, { children: [
|
|
60
|
+
/* @__PURE__ */ o(
|
|
61
|
+
x,
|
|
62
|
+
{
|
|
63
|
+
color: "inherit",
|
|
64
|
+
"aria-label": "open drawer",
|
|
65
|
+
onClick: m,
|
|
66
|
+
edge: "start",
|
|
67
|
+
sx: {
|
|
68
|
+
marginRight: t.spacing(2),
|
|
69
|
+
display: e || W[n](i) ? void 0 : "none"
|
|
70
|
+
},
|
|
71
|
+
children: i === "open" ? n === "mini" ? /* @__PURE__ */ o(g, {}) : /* @__PURE__ */ o(u, {}) : /* @__PURE__ */ o(f, {})
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
r && /* @__PURE__ */ o(
|
|
75
|
+
b,
|
|
76
|
+
{
|
|
77
|
+
variant: "h6",
|
|
78
|
+
component: "h1",
|
|
79
|
+
role: "heading",
|
|
80
|
+
"aria-level": 1,
|
|
81
|
+
noWrap: !0,
|
|
82
|
+
children: r
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
p
|
|
86
|
+
] })
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
E as default
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=DrawerAppBar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerAppBar.mjs","sources":["../../../src/Drawerx/DrawerAppBar/DrawerAppBar.tsx"],"sourcesContent":["import ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport MenuIcon from \"@mui/icons-material/Menu\";\nimport MenuOpenIcon from \"@mui/icons-material/MenuOpen\";\nimport type { AppBarProps as MuiAppBarProps } from \"@mui/material\";\nimport MuiAppBar from \"@mui/material/AppBar\";\nimport IconButton from \"@mui/material/IconButton\";\nimport { styled, type Theme, useTheme } from \"@mui/material/styles\";\nimport Toolbar from \"@mui/material/Toolbar\";\nimport Typography from \"@mui/material/Typography\";\nimport type { DrawerState, DrawerVariant } from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\n\nconst MyMuiAppBar = styled(MuiAppBar)(({ theme }) => ({\n borderWidth: 0,\n borderBottomWidth: 1,\n borderStyle: \"solid\",\n borderColor: theme.palette.divider,\n boxShadow: \"none\",\n zIndex: theme.zIndex.drawer + 1,\n}));\n\nconst moveWithDrawer: Record<DrawerVariant, boolean> = {\n temporary: false,\n mini: true,\n persistent: true,\n};\n\nconst showMenuButton: Record<DrawerVariant, (state: DrawerState) => boolean> = {\n temporary: () => true,\n mini: (state) => state !== \"open\",\n persistent: () => true,\n};\n\nexport interface DrawerAppBarProps extends MuiAppBarProps {\n /**\n * Title to display in the AppBar.\n */\n title?: string;\n}\n\n/**\n * DrawerAppBar component that renders an AppBar adapted to work inside a Drawer context.\n */\nexport default function DrawerAppBar({\n title,\n sx,\n children,\n ...rest\n}: DrawerAppBarProps) {\n const theme = useTheme();\n const { state, variant, switchState, drawerWidth, clipped } = useDrawer();\n\n const rootSx =\n (moveWithDrawer[variant] &&\n !clipped && {\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n ...(state === \"open\" && {\n marginLeft: drawerWidth,\n width: `calc(100% - ${drawerWidth}px)`,\n transition: theme.transitions.create([\"width\", \"margin\"], {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n }),\n }) ||\n {};\n\n return (\n <MyMuiAppBar\n position={clipped ? \"fixed\" : undefined}\n {...rest}\n sx={{\n ...sx,\n ...rootSx,\n zIndex: (theme: Theme) => theme.zIndex.drawer + (clipped ? 1 : 0),\n }}\n >\n <Toolbar>\n <IconButton\n color=\"inherit\"\n aria-label=\"open drawer\"\n onClick={switchState}\n edge=\"start\"\n sx={{\n marginRight: theme.spacing(2),\n display:\n clipped || showMenuButton[variant](state) ? undefined : \"none\",\n }}\n >\n {state === \"open\" ? (\n variant === \"mini\" ? (\n <MenuOpenIcon />\n ) : (\n <ChevronLeftIcon />\n )\n ) : (\n <MenuIcon />\n )}\n </IconButton>\n {title && (\n <Typography\n variant=\"h6\"\n component=\"h1\"\n role=\"heading\"\n aria-level={1}\n noWrap\n >\n {title}\n </Typography>\n )}\n {children}\n </Toolbar>\n </MyMuiAppBar>\n );\n}\n"],"names":["MyMuiAppBar","styled","MuiAppBar","theme","moveWithDrawer","showMenuButton","state","DrawerAppBar","title","sx","children","rest","useTheme","variant","switchState","drawerWidth","clipped","useDrawer","rootSx","jsx","Toolbar","IconButton","MenuOpenIcon","ChevronLeftIcon","MenuIcon","Typography"],"mappings":";;;;;;;;;;;;AAYA,MAAMA,IAAcC,EAAOC,CAAS,EAAE,CAAC,EAAE,OAAAC,SAAa;AAAA,EACpD,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,aAAa;AAAA,EACb,aAAaA,EAAM,QAAQ;AAAA,EAC3B,WAAW;AAAA,EACX,QAAQA,EAAM,OAAO,SAAS;AAChC,EAAE,GAEIC,IAAiD;AAAA,EACrD,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AACd,GAEMC,IAAyE;AAAA,EAC7E,WAAW,MAAM;AAAA,EACjB,MAAM,CAACC,MAAUA,MAAU;AAAA,EAC3B,YAAY,MAAM;AACpB;AAYA,SAAwBC,EAAa;AAAA,EACnC,OAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAsB;AACpB,QAAMR,IAAQS,EAAA,GACR,EAAE,OAAAN,GAAO,SAAAO,GAAS,aAAAC,GAAa,aAAAC,GAAa,SAAAC,EAAA,IAAYC,EAAA,GAExDC,IACHd,EAAeS,CAAO,KACrB,CAACG,KAAW;AAAA,IACV,YAAYb,EAAM,YAAY,OAAO,CAAC,SAAS,QAAQ,GAAG;AAAA,MACxD,QAAQA,EAAM,YAAY,OAAO;AAAA,MACjC,UAAUA,EAAM,YAAY,SAAS;AAAA,IAAA,CACtC;AAAA,IACD,GAAIG,MAAU,UAAU;AAAA,MACtB,YAAYS;AAAA,MACZ,OAAO,eAAeA,CAAW;AAAA,MACjC,YAAYZ,EAAM,YAAY,OAAO,CAAC,SAAS,QAAQ,GAAG;AAAA,QACxD,QAAQA,EAAM,YAAY,OAAO;AAAA,QACjC,UAAUA,EAAM,YAAY,SAAS;AAAA,MAAA,CACtC;AAAA,IAAA;AAAA,EACH,KAEJ,CAAA;AAEF,SACE,gBAAAgB;AAAA,IAACnB;AAAA,IAAA;AAAA,MACC,UAAUgB,IAAU,UAAU;AAAA,MAC7B,GAAGL;AAAA,MACJ,IAAI;AAAA,QACF,GAAGF;AAAA,QACH,GAAGS;AAAA,QACH,QAAQ,CAACf,MAAiBA,EAAM,OAAO,UAAUa,IAAU,IAAI;AAAA,MAAA;AAAA,MAGjE,4BAACI,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,cAAW;AAAA,YACX,SAASP;AAAA,YACT,MAAK;AAAA,YACL,IAAI;AAAA,cACF,aAAaX,EAAM,QAAQ,CAAC;AAAA,cAC5B,SACEa,KAAWX,EAAeQ,CAAO,EAAEP,CAAK,IAAI,SAAY;AAAA,YAAA;AAAA,YAG3D,UAAAA,MAAU,SACTO,MAAY,SACV,gBAAAM,EAACG,GAAA,CAAA,CAAa,IAEd,gBAAAH,EAACI,GAAA,CAAA,CAAgB,IAGnB,gBAAAJ,EAACK,GAAA,CAAA,CAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAGbhB,KACC,gBAAAW;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,MAAK;AAAA,YACL,cAAY;AAAA,YACZ,QAAM;AAAA,YAEL,UAAAjB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJE;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as p, List as e } from "@mui/material";
|
|
3
|
+
import "react";
|
|
4
|
+
import { useDrawer as s } from "../DrawerContext/DrawerContext.mjs";
|
|
5
|
+
import a from "../DrawerItem/DrawerItem.mjs";
|
|
6
|
+
import "@mui/material/Avatar";
|
|
7
|
+
import "@mui/material/ListItemAvatar";
|
|
8
|
+
import "@mui/material/ListItemButton";
|
|
9
|
+
import "@mui/material/ListItemIcon";
|
|
10
|
+
import "@mui/material/ListItemText";
|
|
11
|
+
import "@mui/material/styles";
|
|
12
|
+
import "@mui/material/Badge";
|
|
13
|
+
import "@mui/material/Box";
|
|
14
|
+
import "@mui/icons-material/ChevronRight";
|
|
15
|
+
import "@mui/icons-material/ExpandMore";
|
|
16
|
+
import "@mui/material/Collapse";
|
|
17
|
+
import "@mui/material/List";
|
|
18
|
+
import "@mui/material/Popover";
|
|
19
|
+
function X({ navigation: m }) {
|
|
20
|
+
const { size: o } = s(), { spacing: r } = p();
|
|
21
|
+
return /* @__PURE__ */ i(
|
|
22
|
+
e,
|
|
23
|
+
{
|
|
24
|
+
sx: {
|
|
25
|
+
paddingTop: o === "small" ? r(0.5) : void 0,
|
|
26
|
+
paddingX: r(o === "small" ? 0.5 : 1)
|
|
27
|
+
},
|
|
28
|
+
children: m.map((t) => /* @__PURE__ */ i(a, { item: t }, t.id))
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
X as default
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=DrawerContent.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerContent.mjs","sources":["../../../src/Drawerx/DrawerContent/DrawerContent.tsx"],"sourcesContent":["import { List, useTheme } from \"@mui/material\";\nimport type { DrawerContentProps } from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\nimport DrawerItem from \"../DrawerItem\";\n\n/**\n * Content to be shown inside a navigation\n */\nexport default function DrawerContent({ navigation }: DrawerContentProps) {\n const { size } = useDrawer();\n const { spacing } = useTheme();\n\n return (\n <List\n sx={{\n paddingTop: size === \"small\" ? spacing(0.5) : undefined,\n paddingX: size === \"small\" ? spacing(0.5) : spacing(1),\n }}\n >\n {navigation.map((item) => (\n <DrawerItem key={item.id} item={item} />\n ))}\n </List>\n );\n}\n"],"names":["DrawerContent","navigation","size","useDrawer","spacing","useTheme","jsx","List","item","DrawerItem"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,SAAwBA,EAAc,EAAE,YAAAC,KAAkC;AACxE,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA,GACX,EAAE,SAAAC,EAAA,IAAYC,EAAA;AAEpB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,YAAYL,MAAS,UAAUE,EAAQ,GAAG,IAAI;AAAA,QAC9C,UAA6BA,EAAnBF,MAAS,UAAkB,MAAe,CAAZ;AAAA,MAAa;AAAA,MAGtD,UAAAD,EAAW,IAAI,CAACO,wBACdC,GAAA,EAAyB,MAAAD,EAAA,GAATA,EAAK,EAAgB,CACvC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, default as DrawerContent } from './DrawerContent';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PropsWithChildren, ElementType } from 'react';
|
|
2
|
+
import { DrawerSize, DrawerState, DrawerVariant } from '../Drawer.types';
|
|
3
|
+
export interface DrawerProviderProps extends PropsWithChildren {
|
|
4
|
+
/**
|
|
5
|
+
* Initial state of the drawer
|
|
6
|
+
*/
|
|
7
|
+
initialState?: DrawerState;
|
|
8
|
+
/**
|
|
9
|
+
* Size of the drawer
|
|
10
|
+
* @default "medium"
|
|
11
|
+
*/
|
|
12
|
+
size?: DrawerSize;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the drawer is clipped under the app bar
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
clipped?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Width of the drawer in pixels
|
|
20
|
+
*/
|
|
21
|
+
drawerWidth?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Variant of the drawer behavior
|
|
24
|
+
* - temporary: slides over content, closes on backdrop click
|
|
25
|
+
* - persistent: pushes content when open
|
|
26
|
+
* - mini: shows icons only when collapsed
|
|
27
|
+
* @default "temporary"
|
|
28
|
+
*/
|
|
29
|
+
variant?: DrawerVariant;
|
|
30
|
+
/**
|
|
31
|
+
* ID of the currently selected navigation item
|
|
32
|
+
*/
|
|
33
|
+
selectedItemId?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The component used to render a link when the `href` prop is provided.
|
|
36
|
+
* @default 'a'
|
|
37
|
+
*/
|
|
38
|
+
LinkComponent?: ElementType;
|
|
39
|
+
/**
|
|
40
|
+
* Callback fired when the drawer state changes
|
|
41
|
+
* @param newState - The new drawer state
|
|
42
|
+
*/
|
|
43
|
+
onStateChange?: (newState: DrawerState) => void;
|
|
44
|
+
}
|
|
45
|
+
export declare const DrawerProvider: ({ children, initialState: initialStateProp, variant, size, drawerWidth: drawerWidthProp, clipped, selectedItemId, LinkComponent, onStateChange, }: DrawerProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { Link as u } from "@mui/material";
|
|
3
|
+
import { useState as S } from "react";
|
|
4
|
+
import { DrawerContext as f } from "./DrawerContext.mjs";
|
|
5
|
+
import { drawerWidth as w } from "./DrawerMixins.mjs";
|
|
6
|
+
const x = {
|
|
7
|
+
temporary: "close",
|
|
8
|
+
mini: "collapse",
|
|
9
|
+
persistent: "close"
|
|
10
|
+
}, y = {
|
|
11
|
+
temporary: ["close", "open"],
|
|
12
|
+
mini: ["collapse", "open"],
|
|
13
|
+
persistent: ["close", "open"]
|
|
14
|
+
}, j = ({
|
|
15
|
+
children: i,
|
|
16
|
+
initialState: a,
|
|
17
|
+
variant: t = "temporary",
|
|
18
|
+
size: p = "medium",
|
|
19
|
+
drawerWidth: l = w,
|
|
20
|
+
clipped: n = !0,
|
|
21
|
+
selectedItemId: m,
|
|
22
|
+
LinkComponent: c = u,
|
|
23
|
+
onStateChange: d = () => null
|
|
24
|
+
}) => {
|
|
25
|
+
const [o, r] = S(
|
|
26
|
+
a || x[t]
|
|
27
|
+
), e = (s) => {
|
|
28
|
+
d(s), r(s);
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ h(
|
|
31
|
+
f.Provider,
|
|
32
|
+
{
|
|
33
|
+
value: {
|
|
34
|
+
state: o,
|
|
35
|
+
size: p,
|
|
36
|
+
variant: t,
|
|
37
|
+
selectedItemId: m,
|
|
38
|
+
clipped: n,
|
|
39
|
+
drawerWidth: l,
|
|
40
|
+
LinkComponent: c,
|
|
41
|
+
switchState: () => e(y[t][o === "open" ? 0 : 1]),
|
|
42
|
+
collapse: () => e("collapse"),
|
|
43
|
+
close: () => e("close"),
|
|
44
|
+
open: () => e("open"),
|
|
45
|
+
setState: r
|
|
46
|
+
},
|
|
47
|
+
children: i
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
j as DrawerProvider
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=Drawer.provider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.provider.mjs","sources":["../../../src/Drawerx/DrawerContext/Drawer.provider.tsx"],"sourcesContent":["import { Link } from \"@mui/material\";\nimport type { PropsWithChildren } from \"react\";\nimport { type ElementType, useState } from \"react\";\nimport type { DrawerSize, DrawerState, DrawerVariant } from \"../Drawer.types\";\nimport { DrawerContext } from \"./DrawerContext\";\nimport { drawerWidth } from \"./DrawerMixins\";\n\nconst initialState: Record<DrawerVariant, DrawerState> = {\n temporary: \"close\",\n mini: \"collapse\",\n persistent: \"close\",\n};\n\nconst targetStates: Record<DrawerVariant, [DrawerState, DrawerState]> = {\n temporary: [\"close\", \"open\"],\n mini: [\"collapse\", \"open\"],\n persistent: [\"close\", \"open\"],\n};\n\nexport interface DrawerProviderProps extends PropsWithChildren {\n /**\n * Initial state of the drawer\n */\n initialState?: DrawerState;\n /**\n * Size of the drawer\n * @default \"medium\"\n */\n size?: DrawerSize;\n /**\n * Whether the drawer is clipped under the app bar\n * @default true\n */\n clipped?: boolean;\n /**\n * Width of the drawer in pixels\n */\n drawerWidth?: number;\n /**\n * Variant of the drawer behavior\n * - temporary: slides over content, closes on backdrop click\n * - persistent: pushes content when open\n * - mini: shows icons only when collapsed\n * @default \"temporary\"\n */\n variant?: DrawerVariant;\n /**\n * ID of the currently selected navigation item\n */\n selectedItemId?: string;\n /**\n * The component used to render a link when the `href` prop is provided.\n * @default 'a'\n */\n LinkComponent?: ElementType;\n /**\n * Callback fired when the drawer state changes\n * @param newState - The new drawer state\n */\n onStateChange?: (newState: DrawerState) => void;\n}\n\nexport const DrawerProvider = ({\n children,\n initialState: initialStateProp,\n variant = \"temporary\",\n size = \"medium\",\n drawerWidth: drawerWidthProp = drawerWidth,\n clipped = true,\n selectedItemId,\n LinkComponent = Link,\n onStateChange = () => null,\n}: DrawerProviderProps) => {\n const [state, setState] = useState<DrawerState>(\n initialStateProp || initialState[variant],\n );\n\n const handleChangeState = (newState: DrawerState) => {\n onStateChange(newState);\n setState(newState);\n };\n\n return (\n <DrawerContext.Provider\n value={{\n state,\n size,\n variant,\n selectedItemId,\n clipped,\n drawerWidth: drawerWidthProp,\n LinkComponent,\n switchState: () =>\n handleChangeState(targetStates[variant][state === \"open\" ? 0 : 1]),\n collapse: () => handleChangeState(\"collapse\"),\n close: () => handleChangeState(\"close\"),\n open: () => handleChangeState(\"open\"),\n setState,\n }}\n >\n {children}\n </DrawerContext.Provider>\n );\n};\n"],"names":["initialState","targetStates","DrawerProvider","children","initialStateProp","variant","size","drawerWidthProp","drawerWidth","clipped","selectedItemId","LinkComponent","Link","onStateChange","state","setState","useState","handleChangeState","newState","jsx","DrawerContext"],"mappings":";;;;;AAOA,MAAMA,IAAmD;AAAA,EACvD,WAAW;AAAA,EACX,MAAM;AAAA,EACN,YAAY;AACd,GAEMC,IAAkE;AAAA,EACtE,WAAW,CAAC,SAAS,MAAM;AAAA,EAC3B,MAAM,CAAC,YAAY,MAAM;AAAA,EACzB,YAAY,CAAC,SAAS,MAAM;AAC9B,GA6CaC,IAAiB,CAAC;AAAA,EAC7B,UAAAC;AAAA,EACA,cAAcC;AAAA,EACd,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,aAAaC,IAAkBC;AAAA,EAC/B,SAAAC,IAAU;AAAA,EACV,gBAAAC;AAAA,EACA,eAAAC,IAAgBC;AAAA,EAChB,eAAAC,IAAgB,MAAM;AACxB,MAA2B;AACzB,QAAM,CAACC,GAAOC,CAAQ,IAAIC;AAAA,IACxBZ,KAAoBJ,EAAaK,CAAO;AAAA,EAAA,GAGpCY,IAAoB,CAACC,MAA0B;AACnD,IAAAL,EAAcK,CAAQ,GACtBH,EAASG,CAAQ;AAAA,EACnB;AAEA,SACE,gBAAAC;AAAA,IAACC,EAAc;AAAA,IAAd;AAAA,MACC,OAAO;AAAA,QACL,OAAAN;AAAA,QACA,MAAAR;AAAA,QACA,SAAAD;AAAA,QACA,gBAAAK;AAAA,QACA,SAAAD;AAAA,QACA,aAAaF;AAAA,QACb,eAAAI;AAAA,QACA,aAAa,MACXM,EAAkBhB,EAAaI,CAAO,EAAES,MAAU,SAAS,IAAI,CAAC,CAAC;AAAA,QACnE,UAAU,MAAMG,EAAkB,UAAU;AAAA,QAC5C,OAAO,MAAMA,EAAkB,OAAO;AAAA,QACtC,MAAM,MAAMA,EAAkB,MAAM;AAAA,QACpC,UAAAF;AAAA,MAAA;AAAA,MAGD,UAAAZ;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createContext as r, useContext as t } from "react";
|
|
2
|
+
const o = r(
|
|
3
|
+
void 0
|
|
4
|
+
), n = new Error(
|
|
5
|
+
"DrawerContext.Provider is required and was undefined"
|
|
6
|
+
), i = () => {
|
|
7
|
+
const e = t(o);
|
|
8
|
+
if (e === void 0)
|
|
9
|
+
throw n;
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
o as DrawerContext,
|
|
14
|
+
n as UndefinedProvider,
|
|
15
|
+
i as useDrawer
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=DrawerContext.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerContext.mjs","sources":["../../../src/Drawerx/DrawerContext/DrawerContext.ts"],"sourcesContent":["import { createContext, type ElementType, useContext } from \"react\";\nimport type { DrawerSize, DrawerState, DrawerVariant } from \"../Drawer.types\";\n\nexport interface DrawerContextProps {\n selectedItemId?: string;\n /**\n * Item size. default to medium\n */\n size: DrawerSize;\n state: DrawerState;\n variant: DrawerVariant;\n drawerWidth: number;\n clipped: boolean;\n /**\n * The component used to render a link when the `href` prop is provided.\n * @default 'a'\n */\n LinkComponent?: ElementType;\n switchState(): void;\n close(): void;\n collapse(): void;\n open(): void;\n setState: (state: DrawerState) => void;\n}\n\nexport const DrawerContext = createContext<DrawerContextProps | undefined>(\n undefined,\n);\nexport const UndefinedProvider = new Error(\n \"DrawerContext.Provider is required and was undefined\",\n);\n\nexport const useDrawer = () => {\n const context = useContext(DrawerContext);\n\n if (context === undefined) {\n throw UndefinedProvider;\n }\n\n return context;\n};\n"],"names":["DrawerContext","createContext","UndefinedProvider","useDrawer","context","useContext"],"mappings":";AAyBO,MAAMA,IAAgBC;AAAA,EAC3B;AACF,GACaC,IAAoB,IAAI;AAAA,EACnC;AACF,GAEaC,IAAY,MAAM;AAC7B,QAAMC,IAAUC,EAAWL,CAAa;AAExC,MAAII,MAAY;AACd,UAAMF;AAGR,SAAOE;AACT;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const n = 240, s = (i) => ({
|
|
2
|
+
width: 240,
|
|
3
|
+
[i.breakpoints.down("sm")]: {
|
|
4
|
+
width: 1
|
|
5
|
+
},
|
|
6
|
+
transition: i.transitions.create("width", {
|
|
7
|
+
easing: i.transitions.easing.sharp,
|
|
8
|
+
duration: i.transitions.duration.enteringScreen
|
|
9
|
+
}),
|
|
10
|
+
overflowX: "hidden"
|
|
11
|
+
}), a = (i) => ({
|
|
12
|
+
transition: i.transitions.create("width", {
|
|
13
|
+
easing: i.transitions.easing.sharp,
|
|
14
|
+
duration: i.transitions.duration.leavingScreen
|
|
15
|
+
}),
|
|
16
|
+
overflowX: "hidden",
|
|
17
|
+
width: `calc(${i.spacing(7)} + 1px)`,
|
|
18
|
+
[i.breakpoints.up("sm")]: {
|
|
19
|
+
width: `calc(${i.spacing(8)} + 1px)`
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
a as closedMixin,
|
|
24
|
+
n as drawerWidth,
|
|
25
|
+
s as openedMixin
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=DrawerMixins.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerMixins.mjs","sources":["../../../src/Drawerx/DrawerContext/DrawerMixins.ts"],"sourcesContent":["import type { CSSObject, Theme } from \"@mui/material/styles\";\n\nexport const drawerWidth = 240;\n\nexport const openedMixin = (theme: Theme): CSSObject => ({\n width: drawerWidth,\n [theme.breakpoints.down(\"sm\")]: {\n width: 1,\n },\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n});\n\nexport const closedMixin = (theme: Theme): CSSObject => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(7)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(8)} + 1px)`,\n },\n});\n"],"names":["drawerWidth","openedMixin","theme","closedMixin"],"mappings":"AAEO,MAAMA,IAAc,KAEdC,IAAc,CAACC,OAA6B;AAAA,EACvD,OAAO;AAAA,EACP,CAACA,EAAM,YAAY,KAAK,IAAI,CAAC,GAAG;AAAA,IAC9B,OAAO;AAAA,EAAA;AAAA,EAET,YAAYA,EAAM,YAAY,OAAO,SAAS;AAAA,IAC5C,QAAQA,EAAM,YAAY,OAAO;AAAA,IACjC,UAAUA,EAAM,YAAY,SAAS;AAAA,EAAA,CACtC;AAAA,EACD,WAAW;AACb,IAEaC,IAAc,CAACD,OAA6B;AAAA,EACvD,YAAYA,EAAM,YAAY,OAAO,SAAS;AAAA,IAC5C,QAAQA,EAAM,YAAY,OAAO;AAAA,IACjC,UAAUA,EAAM,YAAY,SAAS;AAAA,EAAA,CACtC;AAAA,EACD,WAAW;AAAA,EACX,OAAO,QAAQA,EAAM,QAAQ,CAAC,CAAC;AAAA,EAC/B,CAACA,EAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAO,QAAQA,EAAM,QAAQ,CAAC,CAAC;AAAA,EAAA;AAEnC;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DrawerNavigationItem } from '../
|
|
1
|
+
import { DrawerNavigationItem } from '../Drawer.types';
|
|
2
2
|
export interface DrawerItemProps {
|
|
3
3
|
/**
|
|
4
4
|
* Data to be rendered
|
|
@@ -12,4 +12,4 @@ export interface DrawerItemProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* Component representing a drawer item in the navigation drawer.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export default function DrawerItem({ item, level }: DrawerItemProps): false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "@mui/material";
|
|
3
|
+
import "react";
|
|
4
|
+
import { useDrawer as D } from "../DrawerContext/DrawerContext.mjs";
|
|
5
|
+
import I from "../DrawerSubheader/DrawerSubheader.mjs";
|
|
6
|
+
import { DrawerItemLink as b } from "./DrawerItemLink.mjs";
|
|
7
|
+
import { DrawerMenuItem as k } from "./DrawerMenuItem.mjs";
|
|
8
|
+
function y({ item: e, level: o = 0 }) {
|
|
9
|
+
const { selectedItemId: r, state: n } = D();
|
|
10
|
+
if (e.kind === "collapsable") {
|
|
11
|
+
const { id: p, text: u, icon: x, items: i } = e, h = i.some((w) => w.id === r);
|
|
12
|
+
return /* @__PURE__ */ t(
|
|
13
|
+
k,
|
|
14
|
+
{
|
|
15
|
+
selected: p === r || h,
|
|
16
|
+
text: u,
|
|
17
|
+
icon: x,
|
|
18
|
+
items: i,
|
|
19
|
+
level: o
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
if (e.kind === "header")
|
|
24
|
+
return n === "open" && /* @__PURE__ */ t(I, { role: "heading", children: e.text });
|
|
25
|
+
const { id: a, text: d, icon: c, avatar: m, label: s, bullet: l, href: f } = e;
|
|
26
|
+
return /* @__PURE__ */ t(
|
|
27
|
+
b,
|
|
28
|
+
{
|
|
29
|
+
selected: a === r,
|
|
30
|
+
text: d,
|
|
31
|
+
icon: c,
|
|
32
|
+
avatar: m,
|
|
33
|
+
label: s,
|
|
34
|
+
bullet: l,
|
|
35
|
+
href: f,
|
|
36
|
+
level: o
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
y as default
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=DrawerItem.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawerItem.mjs","sources":["../../../src/Drawerx/DrawerItem/DrawerItem.tsx"],"sourcesContent":["import type { DrawerNavigationItem } from \"../Drawer.types\";\nimport { useDrawer } from \"../DrawerContext\";\nimport DrawerSubheader from \"../DrawerSubheader\";\nimport { DrawerItemLink } from \"./DrawerItemLink\";\nimport { DrawerMenuItem } from \"./DrawerMenuItem\";\n\nexport interface DrawerItemProps {\n /**\n * Data to be rendered\n */\n item: DrawerNavigationItem;\n /**\n * Deep level of this item inside the submenus\n */\n level?: number;\n}\n\n/**\n * Component representing a drawer item in the navigation drawer.\n */\nexport default function DrawerItem({ item, level = 0 }: DrawerItemProps) {\n const { selectedItemId, state } = useDrawer();\n if (item.kind === \"collapsable\") {\n const { id, text, icon, items } = item;\n const childrenSelected = items.some((item) => item.id === selectedItemId);\n return (\n <DrawerMenuItem\n selected={id === selectedItemId || childrenSelected}\n text={text}\n icon={icon}\n items={items}\n level={level}\n />\n );\n }\n if (item.kind === \"header\") {\n return (\n state === \"open\" && (\n <DrawerSubheader role=\"heading\">{item.text}</DrawerSubheader>\n )\n );\n }\n const { id, text, icon, avatar, label, bullet, href } = item;\n return (\n <DrawerItemLink\n selected={id === selectedItemId}\n text={text}\n icon={icon}\n avatar={avatar}\n label={label}\n bullet={bullet}\n href={href}\n level={level}\n />\n );\n}\n"],"names":["DrawerItem","item","level","selectedItemId","state","useDrawer","id","text","icon","items","childrenSelected","jsx","DrawerMenuItem","DrawerSubheader","avatar","label","bullet","href","DrawerItemLink"],"mappings":";;;;;;;AAoBA,SAAwBA,EAAW,EAAE,MAAAC,GAAM,OAAAC,IAAQ,KAAsB;AACvE,QAAM,EAAE,gBAAAC,GAAgB,OAAAC,EAAA,IAAUC,EAAA;AAClC,MAAIJ,EAAK,SAAS,eAAe;AAC/B,UAAM,EAAE,IAAAK,GAAI,MAAAC,GAAM,MAAAC,GAAM,OAAAC,MAAUR,GAC5BS,IAAmBD,EAAM,KAAK,CAACR,MAASA,EAAK,OAAOE,CAAc;AACxE,WACE,gBAAAQ;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAUN,MAAOH,KAAkBO;AAAA,QACnC,MAAMH;AAAAA,QACN,MAAMC;AAAAA,QACN,OAAAC;AAAA,QACA,OAAAP;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACA,MAAID,EAAK,SAAS;AAChB,WACEG,MAAU,UACR,gBAAAO,EAACE,KAAgB,MAAK,WAAW,YAAK,MAAK;AAIjD,QAAM,EAAE,IAAAP,GAAI,MAAAC,GAAM,MAAAC,GAAM,QAAAM,GAAQ,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,MAAShB;AACxD,SACE,gBAAAU;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,UAAUZ,MAAOH;AAAA,MACjB,MAAAI;AAAA,MACA,MAAAC;AAAA,MACA,QAAAM;AAAA,MACA,OAAAC;AAAA,MACA,QAAAC;AAAA,MACA,MAAAC;AAAA,MACA,OAAAf;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/{drawerx/drawer-item/drawer-item-link.d.ts → Drawerx/DrawerItem/DrawerItemLink.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
|
-
import { DrawerItemAvatar, DrawerItemBullet, DrawerItemLabel } from '../
|
|
3
|
+
import { DrawerItemAvatar, DrawerItemBullet, DrawerItemLabel } from '../Drawer.types';
|
|
4
4
|
export interface DrawerItemLinkProps {
|
|
5
5
|
/**
|
|
6
6
|
* Text displayed inside the item
|