@nxgt/material 3.79.1 → 3.80.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/CHANGELOG.md +48 -0
- package/README.md +45 -6
- package/dist/{alert-dialog-653apk3f.js → alert-dialog-DgHtXZuB.js} +1 -1
- package/dist/{async-slice-CXLbQuOc.js → async-slice-YBQsGtQT.js} +1 -1
- package/dist/{button-3op3rtZh.js → button-_vm-xSBU.js} +1 -1
- package/dist/{calculator-KqIMBXSh.js → calculator-CTd_S23A.js} +10 -10
- package/dist/calculator-field.js +6 -6
- package/dist/{calculator-segment-BlJE1LaS.js → calculator-segment-OI1BT3bA.js} +1 -1
- package/dist/calculator.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-MuKDwtkG.js → chip-DumcVzUO.js} +2 -2
- package/dist/{code-editor-Bp2RrdNx.js → code-editor-CiwgfSOK.js} +4 -4
- package/dist/code-editor.js +4 -4
- package/dist/{code-language-items-B7WR5ua_.js → code-language-items-Dip0xnmc.js} +2 -2
- package/dist/components/components.css +3 -0
- package/dist/components/ui/actions/fab/fab-dock.css +19 -6
- package/dist/components/ui/layout/app-search/app-search.css +62 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +10 -2
- package/dist/components/ui/layout/app-shell/app-header.css +108 -0
- package/dist/components/ui/layout/navigation-toolbar/navigation-toolbar.css +43 -0
- package/dist/{components-CTyNC_zW.js → components-CJFHhkZv.js} +21798 -17784
- package/dist/components.js +37 -37
- package/dist/{conversion-variant-BDFAxqe9.js → conversion-variant-CqrPwPjC.js} +3 -3
- package/dist/{currency-field-DWHB5oms.js → currency-field-CMFvctye.js} +4 -4
- package/dist/{dialog-Bm5LvVlB.js → dialog-B0iU3fmh.js} +3 -3
- package/dist/dnd.js +2 -2
- package/dist/{dropdown-menu-xlZ6NYUA.js → dropdown-menu-CPOgcajv.js} +1 -1
- package/dist/editor.js +7 -7
- package/dist/{empty-state-C0kviQdW.js → empty-state-D3Jggupu.js} +1 -1
- package/dist/{financial-variant-CggTpad2.js → financial-variant-BdyfYhnp.js} +5 -5
- package/dist/{hooks-Dg94jPRq.js → hooks-Z7KKbv4G.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-B1g55Hi6.js → hover-card-CFGIX6kg.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-BcW66bRk.js → icon-badge-kxGWUvcO.js} +1 -1
- package/dist/{icon-button-Cogxy1cy.js → icon-button-BamxMwZs.js} +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-bar/top-app-bar.d.ts +18 -3
- package/dist/lib/components/ui/layout/app-search/app-search-bar.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-search/app-search.types.d.ts +47 -0
- package/dist/lib/components/ui/layout/app-search/index.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-search/partials/on-phone.d.ts +2 -0
- package/dist/lib/components/ui/layout/app-search/partials/phone-search.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-search/partials/pill-search.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-search/pill-form.d.ts +18 -0
- package/dist/lib/components/ui/layout/app-search/search-panel.d.ts +24 -0
- package/dist/lib/components/ui/layout/app-search/search-results.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-search/search-shortcut.d.ts +15 -0
- package/dist/lib/components/ui/layout/app-search/search-view.d.ts +22 -0
- package/dist/lib/components/ui/layout/app-search/use-pill-panel.d.ts +22 -0
- package/dist/lib/components/ui/layout/app-search/use-search-text.d.ts +8 -0
- package/dist/lib/components/ui/layout/app-shell/activity-app-bar.d.ts +35 -0
- package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +26 -3
- package/dist/lib/components/ui/layout/app-shell/activity-column-props.d.ts +22 -0
- package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +10 -2
- package/dist/lib/components/ui/layout/app-shell/activity-layout-navigation.types.d.ts +94 -0
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +8 -1
- package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +2 -1
- package/dist/lib/components/ui/layout/app-shell/activity-rails.d.ts +16 -0
- package/dist/lib/components/ui/layout/app-shell/activity-sidebar-lane.d.ts +22 -0
- package/dist/lib/components/ui/layout/app-shell/activity-top-nav.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/activity-two-level-lane.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/app-back.d.ts +22 -0
- package/dist/lib/components/ui/layout/app-shell/app-header-row.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-shell/app-header.d.ts +33 -1
- package/dist/lib/components/ui/layout/app-shell/app-shell.utils.d.ts +8 -0
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-entries.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-label-item.d.ts +3 -1
- package/dist/lib/components/ui/layout/app-shell/bottom-chrome.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/header-title.d.ts +18 -2
- package/dist/lib/components/ui/layout/app-shell/header.utils.d.ts +37 -0
- package/dist/lib/components/ui/layout/app-shell/index.d.ts +3 -0
- package/dist/lib/components/ui/layout/app-shell/navigation-parts.d.ts +38 -0
- package/dist/lib/components/ui/layout/app-shell/navigation.utils.d.ts +36 -0
- package/dist/lib/components/ui/layout/app-shell/page-title-scope.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/page-title.d.ts +12 -1
- package/dist/lib/components/ui/layout/app-shell/shell-scroll.d.ts +32 -0
- package/dist/lib/components/ui/layout/app-shell/sticky-offset.d.ts +8 -0
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/use-focus-while-hidden.d.ts +9 -0
- package/dist/lib/components/ui/layout/app-shell/use-header-height.d.ts +12 -0
- package/dist/lib/components/ui/layout/app-shell/use-header-scroll.d.ts +19 -0
- package/dist/lib/components/ui/layout/app-shell/use-shell-header.d.ts +20 -0
- package/dist/lib/components/ui/layout/auth-card/auth-card-split.d.ts +14 -0
- package/dist/lib/components/ui/layout/auth-card/auth-card.d.ts +13 -1
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid-context.d.ts +21 -0
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.d.ts +9 -0
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.state.d.ts +30 -0
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.tiles.d.ts +8 -0
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.types.d.ts +50 -0
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.utils.d.ts +70 -0
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-tile.d.ts +7 -0
- package/dist/lib/components/ui/layout/dashboard-grid/index.d.ts +4 -0
- package/dist/lib/components/ui/layout/dashboard-grid/partials/dashboard-announcer.d.ts +6 -0
- package/dist/lib/components/ui/layout/dashboard-grid/partials/dashboard-edit-bar.d.ts +11 -0
- package/dist/lib/components/ui/layout/dashboard-grid/partials/dashboard-move-buttons.d.ts +9 -0
- package/dist/lib/components/ui/layout/dashboard-grid/partials/dashboard-toolbar.d.ts +7 -0
- package/dist/lib/components/ui/layout/dashboard-grid/use-dashboard-grid.d.ts +21 -0
- package/dist/lib/components/ui/layout/dashboard-grid/use-dashboard-moves.d.ts +22 -0
- package/dist/lib/components/ui/layout/doc/doc-context.d.ts +2 -0
- package/dist/lib/components/ui/layout/doc/doc.d.ts +5 -0
- package/dist/lib/components/ui/layout/doc/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/doc/partials/doc-embedded-bar.d.ts +9 -0
- package/dist/lib/components/ui/layout/doc/partials/doc-embedded.d.ts +8 -0
- package/dist/lib/components/ui/layout/doc/use-doc.d.ts +9 -1
- package/dist/lib/components/ui/layout/editor-layout/editor-layout.d.ts +14 -0
- package/dist/lib/components/ui/layout/editor-layout/editor-layout.types.d.ts +31 -0
- package/dist/lib/components/ui/layout/editor-layout/index.d.ts +4 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/editor-layout-body.d.ts +11 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/editor-layout-canvas.d.ts +8 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/editor-layout-context.d.ts +12 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/editor-layout-start.d.ts +8 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/editor-layout-triggers.d.ts +10 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/use-editor-layout-names.d.ts +8 -0
- package/dist/lib/components/ui/layout/editor-layout/partials/use-editor-layout-state.d.ts +21 -0
- package/dist/lib/components/ui/layout/index.d.ts +9 -0
- package/dist/lib/components/ui/layout/landing/index.d.ts +6 -0
- package/dist/lib/components/ui/layout/landing/landing-layout.d.ts +15 -0
- package/dist/lib/components/ui/layout/landing/landing-layout.types.d.ts +27 -0
- package/dist/lib/components/ui/layout/landing/landing-section.d.ts +12 -0
- package/dist/lib/components/ui/layout/landing/landing-section.types.d.ts +32 -0
- package/dist/lib/components/ui/layout/landing/landing.classes.d.ts +20 -0
- package/dist/lib/components/ui/layout/landing/partials/landing-header.d.ts +11 -0
- package/dist/lib/components/ui/layout/landing/partials/landing-section-intro.d.ts +13 -0
- package/dist/lib/components/ui/layout/landing/partials/site-footer-group.d.ts +8 -0
- package/dist/lib/components/ui/layout/landing/site-footer.d.ts +13 -0
- package/dist/lib/components/ui/layout/landing/site-footer.types.d.ts +29 -0
- package/dist/lib/components/ui/layout/list-details-layout/internal.d.ts +2 -0
- package/dist/lib/components/ui/layout/list-details-layout/list-details-layout.d.ts +9 -17
- package/dist/lib/components/ui/layout/list-details-layout/partials/history-mark.d.ts +2 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-context.d.ts +17 -1
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-history.d.ts +8 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-inspector.d.ts +21 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-layout.types.d.ts +47 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-resizer.d.ts +9 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-root.d.ts +3 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-trigger.d.ts +13 -4
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-inspector-focus.d.ts +8 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-list-details-param.d.ts +26 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-list-details-state.d.ts +15 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-list-width.d.ts +16 -0
- package/dist/lib/components/ui/layout/list-details-layout/partials/use-pane-focus.d.ts +6 -4
- package/dist/lib/components/ui/layout/navigation-bar/index.d.ts +3 -0
- package/dist/lib/components/ui/layout/navigation-bar/internal.d.ts +4 -0
- package/dist/lib/components/ui/layout/navigation-bar/navigation-bar.classes.d.ts +14 -0
- package/dist/lib/components/ui/layout/navigation-bar/navigation-bar.d.ts +35 -0
- package/dist/lib/components/ui/layout/navigation-bar/navigation-bar.utils.d.ts +19 -0
- package/dist/lib/components/ui/layout/navigation-bar/partials/bar-badge.d.ts +5 -0
- package/dist/lib/components/ui/layout/navigation-bar/partials/bar-entry.d.ts +12 -0
- package/dist/lib/components/ui/layout/navigation-bar/partials/navigation-bar-item.d.ts +22 -0
- package/dist/lib/components/ui/layout/navigation-bar/partials/navigation-bar-more.d.ts +24 -0
- package/dist/lib/components/ui/layout/navigation-bar/use-nav-bar-inset.d.ts +12 -0
- package/dist/lib/components/ui/layout/navigation-drawer/index.d.ts +5 -0
- package/dist/lib/components/ui/layout/navigation-drawer/navigation-drawer.classes.d.ts +9 -0
- package/dist/lib/components/ui/layout/navigation-drawer/navigation-drawer.d.ts +45 -0
- package/dist/lib/components/ui/layout/navigation-drawer/navigation-drawer.utils.d.ts +14 -0
- package/dist/lib/components/ui/layout/navigation-drawer/partials/navigation-drawer-body.d.ts +3 -0
- package/dist/lib/components/ui/layout/navigation-drawer/partials/navigation-drawer-item.d.ts +20 -0
- package/dist/lib/components/ui/layout/navigation-drawer/partials/navigation-drawer-modal.d.ts +17 -0
- package/dist/lib/components/ui/layout/navigation-drawer/partials/navigation-drawer-section.d.ts +15 -0
- package/dist/lib/components/ui/layout/navigation-rail/index.d.ts +3 -0
- package/dist/lib/components/ui/layout/navigation-rail/navigation-rail-panel.d.ts +26 -0
- package/dist/lib/components/ui/layout/navigation-rail/navigation-rail.classes.d.ts +23 -0
- package/dist/lib/components/ui/layout/navigation-rail/navigation-rail.d.ts +42 -1
- package/dist/lib/components/ui/layout/navigation-rail/navigation-rail.utils.d.ts +4 -0
- package/dist/lib/components/ui/layout/navigation-rail/partials/navigation-rail-body.d.ts +3 -0
- package/dist/lib/components/ui/layout/navigation-rail/partials/navigation-rail-item.d.ts +20 -0
- package/dist/lib/components/ui/layout/navigation-rail/partials/navigation-rail-panel-item.d.ts +7 -0
- package/dist/lib/components/ui/layout/navigation-rail/partials/navigation-rail-toggle.d.ts +7 -0
- package/dist/lib/components/ui/layout/navigation-rail/use-rail-expanded.d.ts +13 -0
- package/dist/lib/components/ui/layout/navigation-toolbar/index.d.ts +2 -0
- package/dist/lib/components/ui/layout/navigation-toolbar/navigation-toolbar.classes.d.ts +20 -0
- package/dist/lib/components/ui/layout/navigation-toolbar/navigation-toolbar.d.ts +51 -0
- package/dist/lib/components/ui/layout/navigation-toolbar/partials/navigation-toolbar-item.d.ts +25 -0
- package/dist/lib/components/ui/layout/navigation-toolbar/partials/navigation-toolbar-more.d.ts +3 -0
- package/dist/lib/components/ui/layout/pane-layout/internal.d.ts +3 -0
- package/dist/lib/components/ui/layout/pane-layout/pane-layout.d.ts +16 -2
- package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-classes.d.ts +7 -0
- package/dist/lib/components/ui/layout/pane-layout/partials/pane-layout-context.d.ts +13 -0
- package/dist/lib/components/ui/layout/pane-layout/partials/use-pane-layout-state.d.ts +16 -0
- package/dist/lib/components/ui/layout/pane-layout/partials/use-pane-narrow.d.ts +6 -0
- package/dist/lib/components/ui/layout/responsive-grid/index.d.ts +4 -1
- package/dist/lib/components/ui/layout/responsive-grid/responsive-grid-item.d.ts +19 -0
- package/dist/lib/components/ui/layout/responsive-grid/responsive-grid-spans.d.ts +19 -0
- package/dist/lib/components/ui/layout/responsive-grid/responsive-grid.d.ts +24 -2
- package/dist/lib/components/ui/layout/responsive-grid/responsive-grid.utils.d.ts +12 -0
- package/dist/lib/components/ui/layout/settings-layout/index.d.ts +2 -0
- package/dist/lib/components/ui/layout/settings-layout/partials/settings-link.d.ts +7 -0
- package/dist/lib/components/ui/layout/settings-layout/partials/settings-list.d.ts +11 -0
- package/dist/lib/components/ui/layout/settings-layout/partials/settings-page.d.ts +5 -0
- package/dist/lib/components/ui/layout/settings-layout/settings-layout.d.ts +10 -0
- package/dist/lib/components/ui/layout/settings-layout/settings-layout.types.d.ts +33 -0
- package/dist/lib/components/ui/layout/settings-layout/settings-layout.utils.d.ts +13 -0
- package/dist/lib/components/ui/layout/thread-layout/thread-layout-classes.d.ts +17 -0
- package/dist/lib/components/ui/layout/thread-layout/thread-layout-parts.d.ts +14 -0
- package/dist/lib/components/ui/layout/thread-layout/thread-layout-stepper.d.ts +11 -0
- package/dist/lib/components/ui/layout/thread-layout/thread-layout.d.ts +30 -3
- package/dist/lib/components/ui/layout/top-nav/index.d.ts +5 -0
- package/dist/lib/components/ui/layout/top-nav/partials/top-nav-item.d.ts +23 -0
- package/dist/lib/components/ui/layout/top-nav/partials/top-nav-menu.d.ts +22 -0
- package/dist/lib/components/ui/layout/top-nav/top-nav.classes.d.ts +10 -0
- package/dist/lib/components/ui/layout/top-nav/top-nav.d.ts +34 -0
- package/dist/lib/components/ui/layout/top-nav/top-nav.utils.d.ts +10 -0
- package/dist/lib/components/ui/widgets/kanban/index.d.ts +1 -1
- package/dist/lib/components/ui/widgets/kanban/kanban-context.d.ts +5 -2
- package/dist/lib/components/ui/widgets/kanban/kanban.d.ts +11 -2
- package/dist/lib/components/ui/widgets/kanban/kanban.slice.d.ts +32 -0
- package/dist/lib/components/ui/widgets/kanban/kanban.utils.d.ts +9 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-card-preview.d.ts +3 -1
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-column.d.ts +6 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-move-to.d.ts +13 -0
- package/dist/lib/components/ui/widgets/kanban/partials/kanban-phone-tabs.d.ts +10 -0
- package/dist/lib/components/ui/widgets/kanban/types.d.ts +7 -0
- package/dist/lib/components/ui/widgets/kanban/use-kanban-board-keys.d.ts +7 -0
- package/dist/lib/components/ui/widgets/kanban/use-kanban-item-actions.d.ts +5 -0
- package/dist/lib/components/ui/widgets/kanban/use-kanban-phone-column.d.ts +18 -0
- package/dist/lib/components/ui/widgets/kanban/use-kanban.d.ts +6 -1
- package/dist/lib/i18n/resources/en/en.d.ts +50 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +52 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +50 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +52 -2
- package/dist/lib/i18n/resources/resources.d.ts +100 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +52 -52
- package/dist/map.js +7 -7
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/{percent-field--WIXV5dX.js → percent-field-C2LNr8NA.js} +1 -1
- package/dist/{picker-surface-CV09H7Nb.js → picker-surface-BUCFMoAZ.js} +4 -4
- package/dist/{popover-Cd7DkND4.js → popover-DFRwQF12.js} +1 -1
- package/dist/{pos-types-DKCkOTYy.js → pos-types-CXnEdjdy.js} +1 -1
- package/dist/{pos-variant-GrUfbTTP.js → pos-variant-DMwn_7is.js} +4 -4
- package/dist/print.js +1 -1
- package/dist/{programmer-variant-eKJNKENL.js → programmer-variant-Bo4eiDFi.js} +2 -2
- package/dist/{public-y6g4ddxd.js → public-CyQPkkSR.js} +9 -9
- package/dist/{rich-code-block-CRQ0iyLb.js → rich-code-block-iK7UcZdc.js} +5 -5
- package/dist/{scientific-variant-2y3UxAAU.js → scientific-variant-B9ScTgfx.js} +2 -2
- package/dist/{sortable-provider-DdiI3Fwk.js → sortable-provider-BZwVjSVU.js} +3 -3
- package/dist/{spinner-C1QIewWv.js → spinner-RITOxvpH.js} +2 -2
- package/dist/{tabs-KGKvve3y.js → tabs-DSo4eCUn.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-C_VeiiCm.js → theme-toggle-3gbzQX0x.js} +1 -1
- package/dist/{toolbar-items-D310xDuM.js → toolbar-items-Bt5RK-Nx.js} +4 -4
- package/dist/{translate-material-BypJJ1l5.js → translate-material-CZTGqgen.js} +1 -1
- package/dist/{translator-DJkf4J7t.js → translator-DTlOlIoq.js} +108 -4
- package/dist/{use-chat-composer-BFhRMHcX.js → use-chat-composer-DBY01IpX.js} +16 -16
- package/dist/{use-heading-spy-DJR8YYm6.js → use-heading-spy-Dt48bBts.js} +4 -4
- package/dist/{use-material-translation-CD6QoVal.js → use-material-translation-BJucC_xe.js} +1 -1
- package/dist/{use-return-focus-Cevw_6yq.js → use-return-focus-BS1JLcnq.js} +1 -1
- package/docs/README.md +1 -0
- package/docs/components/data-display.md +4 -0
- package/docs/components/navigation-and-layout.md +944 -27
- package/docs/components/rich-widgets.md +26 -0
- package/docs/guides/app-shell.md +641 -2
- package/docs/guides/i18n.md +13 -1
- package/docs/guides/layouts.md +215 -0
- package/docs/guides/ssr.md +1 -1
- package/docs/previews/navigation-layout-appshell-page-ground.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-authcard-split.webp +0 -0
- package/docs/previews/navigation-layout-authcard.webp +0 -0
- package/docs/previews/navigation-layout-dashboardgrid.webp +0 -0
- package/docs/previews/navigation-layout-editorlayout.webp +0 -0
- package/docs/previews/navigation-layout-landinglayout.webp +0 -0
- package/docs/previews/navigation-layout-panelayout.webp +0 -0
- package/docs/previews/navigation-layout-settingslayout.webp +0 -0
- package/docs/previews/navigation-layout-threadlayout-pages.webp +0 -0
- package/docs/previews/navigation-layout-threadlayout.webp +0 -0
- package/docs/roadmap.md +10 -2
- package/lib/components/components.css +3 -0
- package/lib/components/ui/actions/fab/fab-dock.css +19 -6
- package/lib/components/ui/layout/app-search/app-search.css +62 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +10 -2
- package/lib/components/ui/layout/app-shell/app-header.css +108 -0
- package/lib/components/ui/layout/navigation-toolbar/navigation-toolbar.css +43 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { AppShellLinkComponent } from '../app-shell/types.js';
|
|
3
|
+
export type SiteFooterLink = {
|
|
4
|
+
/** The visible text, already translated. */
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
href: string;
|
|
7
|
+
/** Opens in a new tab with `rel="noopener noreferrer"`. A link to another site (`http(s):`) or an address (`mailto:`, `tel:`) is external without it. */
|
|
8
|
+
external?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type SiteFooterGroup = {
|
|
11
|
+
/** The group's heading, already translated. */
|
|
12
|
+
title: string;
|
|
13
|
+
links: SiteFooterLink[];
|
|
14
|
+
};
|
|
15
|
+
export type SiteFooterProps = {
|
|
16
|
+
/** The brand block, usually an `AppBrand` or a logo with the name. */
|
|
17
|
+
brand?: ReactNode;
|
|
18
|
+
/** A line under the brand. */
|
|
19
|
+
description?: ReactNode;
|
|
20
|
+
/** Columns of links, each under a heading. */
|
|
21
|
+
groups?: SiteFooterGroup[];
|
|
22
|
+
/** The legal line: copyright, company, terms. */
|
|
23
|
+
legal?: ReactNode;
|
|
24
|
+
/** Beside the legal line: social links, a language switcher, a theme toggle. */
|
|
25
|
+
extra?: ReactNode;
|
|
26
|
+
linkComponent?: AppShellLinkComponent;
|
|
27
|
+
/** The links' landmark name, already translated. @default "Footer" */
|
|
28
|
+
label?: string;
|
|
29
|
+
} & Omit<ComponentProps<'footer'>, 'children'>;
|
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
1
|
import { ListDetailsBack } from './partials/list-details-back.js';
|
|
3
|
-
import { ListPosition, ViewState } from './partials/list-details-context.js';
|
|
4
2
|
import { ListDetailsDetails } from './partials/list-details-details.js';
|
|
3
|
+
import { ListDetailsInspector } from './partials/list-details-inspector.js';
|
|
4
|
+
import { ListDetailsAnyLayoutProps } from './partials/list-details-layout.types.js';
|
|
5
5
|
import { ListDetailsList } from './partials/list-details-list.js';
|
|
6
6
|
import { ListDetailsTrigger } from './partials/list-details-trigger.js';
|
|
7
7
|
export { ListDetailsBack, type ListDetailsBackProps, } from './partials/list-details-back.js';
|
|
8
|
+
export type { ListDetailsView, ViewState, } from './partials/list-details-context.js';
|
|
8
9
|
export { useListDetails } from './partials/list-details-context.js';
|
|
9
10
|
export { ListDetailsDetails, type ListDetailsDetailsProps, } from './partials/list-details-details.js';
|
|
11
|
+
export { ListDetailsInspector, type ListDetailsInspectorProps, } from './partials/list-details-inspector.js';
|
|
12
|
+
export type { ListDetailsAnyLayoutProps, ListDetailsInspectorLayoutProps, ListDetailsLayoutProps, } from './partials/list-details-layout.types.js';
|
|
10
13
|
export { ListDetailsList, type ListDetailsListProps, } from './partials/list-details-list.js';
|
|
11
|
-
export { ListDetailsTrigger, type ListDetailsTriggerProps, } from './partials/list-details-trigger.js';
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
onActiveViewChange?: (view: ViewState) => void;
|
|
15
|
-
defaultActiveView?: ViewState;
|
|
16
|
-
listPosition?: ListPosition;
|
|
17
|
-
/**
|
|
18
|
-
* What the phone layout (one pane at a time) follows: `'viewport'`
|
|
19
|
-
* (default) the window, at 648px or less; `'container'` the layout's own
|
|
20
|
-
* width, at 648px or less, for a layout in a column, a dialog or a split
|
|
21
|
-
* pane of a wide window.
|
|
22
|
-
*/
|
|
23
|
-
breakpoint?: 'viewport' | 'container';
|
|
24
|
-
}
|
|
25
|
-
export declare function ListDetailsLayout({ children, className, activeView: controlledActiveView, onActiveViewChange, defaultActiveView, listPosition, breakpoint, ...props }: ListDetailsLayoutProps): import("react").JSX.Element;
|
|
14
|
+
export { type ListDetailsInspectorTriggerProps, ListDetailsTrigger, type ListDetailsTriggerProps, } from './partials/list-details-trigger.js';
|
|
15
|
+
export { type UseListDetailsParamOptions, useListDetailsParam, } from './partials/use-list-details-param.js';
|
|
16
|
+
export declare function ListDetailsLayout(props: ListDetailsAnyLayoutProps): import("react").JSX.Element;
|
|
26
17
|
export declare namespace ListDetailsLayout {
|
|
27
18
|
var displayName: string;
|
|
28
19
|
var List: typeof ListDetailsList;
|
|
29
20
|
var Details: typeof ListDetailsDetails;
|
|
21
|
+
var Inspector: typeof ListDetailsInspector;
|
|
30
22
|
var Trigger: typeof ListDetailsTrigger;
|
|
31
23
|
var Back: typeof ListDetailsBack;
|
|
32
24
|
}
|
package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-context.d.ts
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type ViewState = 'list' | 'details';
|
|
3
|
+
/**
|
|
4
|
+
* The views of a layout that has an `inspector`: the third pane is one more
|
|
5
|
+
* step after the details on a phone, and open or closed on a wide screen.
|
|
6
|
+
*/
|
|
7
|
+
export type ListDetailsView = ViewState | 'inspector';
|
|
3
8
|
export type ListPosition = 'left' | 'right';
|
|
4
9
|
export interface ListDetailsContextProps {
|
|
10
|
+
/** The pane shown; `'details'` while the inspector is open (see `inspectorOpen`). */
|
|
5
11
|
activeView: ViewState;
|
|
6
|
-
|
|
12
|
+
/** The inspector is open (a layout with the `inspector` prop). */
|
|
13
|
+
inspectorOpen: boolean;
|
|
14
|
+
/** `'inspector'` only means something in a layout with the `inspector` prop. */
|
|
15
|
+
setActiveView: (view: ListDetailsView) => void;
|
|
7
16
|
listPosition: ListPosition;
|
|
17
|
+
/** One pane at a time: a phone. */
|
|
8
18
|
matches: boolean;
|
|
19
|
+
/** The layout follows its own width, not the window (`breakpoint="container"`). */
|
|
20
|
+
container?: boolean;
|
|
21
|
+
/** The list pane's width in px while it is resizable or `listWidth` is set. */
|
|
22
|
+
listWidth?: number;
|
|
23
|
+
/** Set the list pane's width (the separator's keys and drag). */
|
|
24
|
+
setListWidth?: (width: number) => void;
|
|
9
25
|
}
|
|
10
26
|
/** Children, or a function of the layout's state. */
|
|
11
27
|
export type ListDetailsChildren = ReactNode | ((state: ListDetailsContextProps) => ReactNode);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ListDetailsAnyLayoutProps } from './list-details-layout.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* `ListDetailsLayout` with `history`: the view is a search param, so a step
|
|
4
|
+
* forward is a history entry and the browser's Back goes a step back. The
|
|
5
|
+
* layout's own Back (and the inspector's close) take that Back when the
|
|
6
|
+
* entry before is the layout's, instead of piling entries up.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ListDetailsHistory(props: ListDetailsAnyLayoutProps): import("react").JSX.Element;
|
package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-inspector.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { ListDetailsChildren } from './list-details-context.js';
|
|
3
|
+
export type ListDetailsInspectorProps = Omit<ComponentProps<'aside'>, 'children' | 'title'> & {
|
|
4
|
+
children: ListDetailsChildren;
|
|
5
|
+
/**
|
|
6
|
+
* The pane's heading, which also names its landmark. The focus moves to it
|
|
7
|
+
* when the inspector opens.
|
|
8
|
+
*/
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The third pane of a `ListDetailsLayout` with the `inspector` prop, open
|
|
13
|
+
* while `activeView` is `'inspector'`. From 1280px it sits beside the details;
|
|
14
|
+
* from the phone width up to that it overlays them (Escape closes it and the
|
|
15
|
+
* focus goes back to what opened it); on a phone it is one more step after the
|
|
16
|
+
* details, with a way back to them. It renders nothing while closed.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ListDetailsInspector({ children, className, title, onKeyDown, ...props }: ListDetailsInspectorProps): import("react").JSX.Element | null;
|
|
19
|
+
export declare namespace ListDetailsInspector {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-layout.types.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { ListDetailsView, ListPosition, ViewState } from './list-details-context.js';
|
|
3
|
+
interface ListDetailsCommonProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
4
|
+
children?: ComponentProps<'div'>['children'];
|
|
5
|
+
listPosition?: ListPosition;
|
|
6
|
+
/**
|
|
7
|
+
* What the phone layout (one pane at a time) follows: `'viewport'`
|
|
8
|
+
* (default) the window, at 648px or less; `'container'` the layout's own
|
|
9
|
+
* width, at 648px or less, for a layout in a column, a dialog or a split
|
|
10
|
+
* pane of a wide window.
|
|
11
|
+
*/
|
|
12
|
+
breakpoint?: 'viewport' | 'container';
|
|
13
|
+
/**
|
|
14
|
+
* Keep the view in the URL's search params (`?view=details`), through
|
|
15
|
+
* React Router, so the browser's Back button goes from the details to the
|
|
16
|
+
* list on a phone: `'push'` adds an entry per step, `'replace'` rewrites
|
|
17
|
+
* the current one. The layout then owns `activeView`; `onActiveViewChange`
|
|
18
|
+
* is still told. Needs a router above it.
|
|
19
|
+
*/
|
|
20
|
+
history?: 'push' | 'replace';
|
|
21
|
+
/** The search param `history` writes, `'view'` by default. */
|
|
22
|
+
historyParam?: string;
|
|
23
|
+
/** The list pane's width in px (default `w-80`, 320). */
|
|
24
|
+
listWidth?: number;
|
|
25
|
+
/** A separator between the list and the details moves the list's width, 240 to 480px. */
|
|
26
|
+
resizable?: boolean;
|
|
27
|
+
/** Asked for every new list width (the separator's keys and drag). */
|
|
28
|
+
onListWidthChange?: (width: number) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface ListDetailsLayoutProps extends ListDetailsCommonProps {
|
|
31
|
+
/** Without `inspector` the layout has two views, `'list'` and `'details'`. */
|
|
32
|
+
inspector?: false;
|
|
33
|
+
activeView?: ViewState;
|
|
34
|
+
onActiveViewChange?: (view: ViewState) => void;
|
|
35
|
+
defaultActiveView?: ViewState;
|
|
36
|
+
}
|
|
37
|
+
/** The layout with its third pane (`ListDetailsLayout.Inspector`) and the `'inspector'` view. */
|
|
38
|
+
export interface ListDetailsInspectorLayoutProps extends ListDetailsCommonProps {
|
|
39
|
+
/** Enables the third pane and the `'inspector'` view. */
|
|
40
|
+
inspector: true;
|
|
41
|
+
activeView?: ListDetailsView;
|
|
42
|
+
onActiveViewChange?: (view: ListDetailsView) => void;
|
|
43
|
+
defaultActiveView?: ListDetailsView;
|
|
44
|
+
}
|
|
45
|
+
/** What the component takes: the two-pane props, or the inspector ones. */
|
|
46
|
+
export type ListDetailsAnyLayoutProps = ListDetailsLayoutProps | ListDetailsInspectorLayoutProps;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The list pane's separator: a vertical `separator` that takes the focus, with
|
|
3
|
+
* its width as `aria-valuenow`. Arrow keys move it by 16px (Shift: 64px) the
|
|
4
|
+
* way the arrow points, Home and End go to the narrowest and the widest, and a
|
|
5
|
+
* pointer drag resizes it. It shows on a wide screen only.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ListDetailsResizer({ listId }: {
|
|
8
|
+
listId: string;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ListDetailsAnyLayoutProps } from './list-details-layout.types.js';
|
|
2
|
+
/** The layout without the URL: `ListDetailsLayout` picks it or its history twin. */
|
|
3
|
+
export declare function ListDetailsRoot({ children, className, activeView, onActiveViewChange, defaultActiveView, listPosition, breakpoint, inspector, history: _history, historyParam: _historyParam, listWidth, resizable, onListWidthChange, ...props }: ListDetailsAnyLayoutProps): import("react").JSX.Element;
|
package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-trigger.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { ButtonProps } from '../../../actions/button/button.js';
|
|
2
|
-
import { ListDetailsChildren, ListDetailsContextProps, ViewState } from './list-details-context.js';
|
|
3
|
-
|
|
4
|
-
view: ViewState;
|
|
2
|
+
import { ListDetailsChildren, ListDetailsContextProps, ListDetailsView, ViewState } from './list-details-context.js';
|
|
3
|
+
type TriggerBase = Omit<ButtonProps, 'children' | 'className'> & {
|
|
5
4
|
children: ListDetailsChildren;
|
|
6
5
|
className?: string | ((state: ListDetailsContextProps) => string) | null;
|
|
6
|
+
};
|
|
7
|
+
export interface ListDetailsTriggerProps extends TriggerBase {
|
|
8
|
+
view: ViewState;
|
|
9
|
+
inspector?: false;
|
|
10
|
+
}
|
|
11
|
+
/** `view="inspector"` is for a layout with the `inspector` prop, and says so with `inspector`. */
|
|
12
|
+
export interface ListDetailsInspectorTriggerProps extends TriggerBase {
|
|
13
|
+
view: ListDetailsView;
|
|
14
|
+
inspector: true;
|
|
7
15
|
}
|
|
8
|
-
export declare function ListDetailsTrigger({ view, children, onClick, className, ...props }: ListDetailsTriggerProps): import("react").JSX.Element;
|
|
16
|
+
export declare function ListDetailsTrigger({ view, inspector: _inspector, children, onClick, className, ...props }: ListDetailsTriggerProps | ListDetailsInspectorTriggerProps): import("react").JSX.Element;
|
|
9
17
|
export declare namespace ListDetailsTrigger {
|
|
10
18
|
var displayName: string;
|
|
11
19
|
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { ListDetailsView } from './list-details-context.js';
|
|
3
|
+
/**
|
|
4
|
+
* The focus follows the inspector: opening it focuses its heading, and closing
|
|
5
|
+
* it gives the focus back to what had it when it opened (the button or the
|
|
6
|
+
* row), when that is still on the page. Nothing moves on the first render.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useInspectorFocus(root: RefObject<HTMLElement | null>, activeView: ListDetailsView): void;
|
package/dist/lib/components/ui/layout/list-details-layout/partials/use-list-details-param.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ListDetailsView } from './list-details-context.js';
|
|
2
|
+
export interface UseListDetailsParamOptions {
|
|
3
|
+
/** The search param holding the selection, `'item'` by default. */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** The view's search param, the layout's `historyParam`: `'view'` by default. */
|
|
6
|
+
viewName?: string;
|
|
7
|
+
/** `'push'` (default) adds a history entry per selection; `'replace'` rewrites the current one. */
|
|
8
|
+
history?: 'push' | 'replace';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The selected record's id kept in the URL's search params (`?item=ada`), with
|
|
12
|
+
* the other params left alone, through React Router: `select(id)` sets it,
|
|
13
|
+
* `select(null)` clears it, and a reload or a shared link opens the same
|
|
14
|
+
* record. `select(id, { open: 'details' })` also sets the layout's view
|
|
15
|
+
* (`?view=details`) in the same write, so a row click is one history entry and
|
|
16
|
+
* Back on a phone returns to the list. Pair it with
|
|
17
|
+
* `ListDetailsLayout history="push"`, which keeps the view the same way.
|
|
18
|
+
*
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const [id, select] = useListDetailsParam();
|
|
21
|
+
* <button onClick={() => select(person.id, { open: 'details' })} />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function useListDetailsParam({ name, viewName, history, }?: UseListDetailsParamOptions): readonly [string | null, (next: string | null, { open }?: {
|
|
25
|
+
open?: ListDetailsView;
|
|
26
|
+
}) => void];
|
package/dist/lib/components/ui/layout/list-details-layout/partials/use-list-details-state.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { ListDetailsContextProps, ListDetailsView, ListPosition } from './list-details-context.js';
|
|
3
|
+
type Options = {
|
|
4
|
+
activeView?: ListDetailsView;
|
|
5
|
+
onActiveViewChange?: (view: never) => void;
|
|
6
|
+
defaultActiveView: ListDetailsView;
|
|
7
|
+
listPosition: ListPosition;
|
|
8
|
+
breakpoint: 'viewport' | 'container';
|
|
9
|
+
listWidth?: number;
|
|
10
|
+
resizable: boolean;
|
|
11
|
+
onListWidthChange?: (width: number) => void;
|
|
12
|
+
};
|
|
13
|
+
/** The context value of a layout: the view, the breakpoints, the focus moves, the list width. */
|
|
14
|
+
export declare function useListDetailsState(root: RefObject<HTMLElement | null>, o: Options): ListDetailsContextProps;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const LIST_MIN_WIDTH = 240;
|
|
3
|
+
export declare const LIST_MAX_WIDTH = 480;
|
|
4
|
+
export declare const LIST_WIDTH_VAR = "--nxgt-list-width";
|
|
5
|
+
export declare const clampListWidth: (width: number) => number;
|
|
6
|
+
/**
|
|
7
|
+
* The list pane's width in px. `undefined` while neither `listWidth` nor
|
|
8
|
+
* `resizable` is set, so the pane keeps its `w-80`. The width reaches the CSS
|
|
9
|
+
* as a custom property set from script (no `style` attribute, the CSP), so the
|
|
10
|
+
* server renders the default width and a set width applies right after
|
|
11
|
+
* hydrating. A `listWidth` that changes replaces what a drag set.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useListWidth(root: RefObject<HTMLElement | null>, listWidth: number | undefined, resizable: boolean, onChange?: (width: number) => void): {
|
|
14
|
+
listWidth: number | undefined;
|
|
15
|
+
setListWidth: ((next: number) => void) | undefined;
|
|
16
|
+
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ListDetailsView } from './list-details-context.js';
|
|
3
3
|
/**
|
|
4
4
|
* On a phone one pane shows at a time, so the focus must follow the view:
|
|
5
5
|
* opening the details focuses the details pane; coming back focuses the list
|
|
6
|
-
* item that opened them (or the list pane when it is gone).
|
|
7
|
-
* the
|
|
6
|
+
* item that opened them (or the list pane when it is gone). An element marked
|
|
7
|
+
* `data-pane-focus` inside the details takes the focus in place of the pane.
|
|
8
|
+
* Nothing moves on the first render, on a wide screen, or when the view did
|
|
9
|
+
* not change.
|
|
8
10
|
* The opener is the last element focused inside the list pane, tracked with
|
|
9
11
|
* `focusin` or, for a tap that focuses nothing (Safari, iOS), `pointerdown`;
|
|
10
12
|
* the last one wins, so it holds whatever changes the view: the context, a
|
|
11
13
|
* controlled `activeView` driven by a URL, or a link row.
|
|
12
14
|
*/
|
|
13
|
-
export declare function usePaneFocus(root: RefObject<HTMLElement | null>, activeView:
|
|
15
|
+
export declare function usePaneFocus(root: RefObject<HTMLElement | null>, activeView: ListDetailsView, matches: boolean): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { BarBadge } from './partials/bar-badge.js';
|
|
2
|
+
export { BarBadgeLabel, BarGlyph } from './partials/bar-entry.js';
|
|
3
|
+
export { isCurrent } from './partials/navigation-bar-item.js';
|
|
4
|
+
export { BarMoreTrigger, type MoreTriggerProps, NavigationBarMore, } from './partials/navigation-bar-more.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The bar's content height, above the safe-area inset. */
|
|
2
|
+
export declare const NAV_BAR_HEIGHT = "4rem";
|
|
3
|
+
/** What the bar takes at the bottom, the safe-area inset included: `--nxgt-nav-bar` while it shows. */
|
|
4
|
+
export declare const NAV_BAR_ROOM = "calc(4rem + env(safe-area-inset-bottom, 0px))";
|
|
5
|
+
/** The label and the icon pill of an entry, shared by links and « More ». */
|
|
6
|
+
export declare const BAR_ENTRY = "nxgt-plain-link group relative flex h-full min-w-12 flex-1 basis-0 flex-col items-center justify-center gap-1 rounded-none px-1 py-1.5 font-medium text-muted-foreground text-xs outline-none transition-colors data-active:text-foreground data-active:font-semibold focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-ring forced-colors:focus-visible:outline-[Highlight]";
|
|
7
|
+
/** The pill behind the icon: grows from the middle when the entry turns active (Expressive). */
|
|
8
|
+
export declare const BAR_INDICATOR = "absolute inset-0 scale-x-50 rounded-full bg-sidebar-active opacity-0 transition-[opacity,transform] duration-(--nxgt-motion-effects-default-duration) ease-(--nxgt-motion-effects-default) group-data-active:scale-x-100 group-data-active:opacity-100 group-active:scale-x-110 motion-reduce:transition-none forced-colors:border forced-colors:border-[Highlight]";
|
|
9
|
+
/**
|
|
10
|
+
* `--nxgt-nav-bar` for a first paint, before the bar measures itself, at the
|
|
11
|
+
* sizes the bar shows (whole literals, so Tailwind sees them). The keys are
|
|
12
|
+
* `phone tablet desktop` as 1/0, as in navigation.utils.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NAV_BAR_VAR: Record<string, string>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AppShellLinkComponent, MenuItem } from '../app-shell/types.js';
|
|
3
|
+
import { NavigationBarItem } from './partials/navigation-bar-item.js';
|
|
4
|
+
export type NavigationBarProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The menu: the bar shows 3 to 5 destinations (`bar` and `priority` on a
|
|
7
|
+
* {@link MenuItem} choose them) and « More » lists the rest. Or pass
|
|
8
|
+
* {@link NavigationBar.Item}s as `children` to compose it by hand.
|
|
9
|
+
*/
|
|
10
|
+
items?: MenuItem[];
|
|
11
|
+
/** Destinations on the bar, « More » included: 3 to 5. @default 5 */
|
|
12
|
+
max?: number;
|
|
13
|
+
linkComponent?: AppShellLinkComponent;
|
|
14
|
+
/** The landmark's accessible name, already translated. @default "Navigation" */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** Hand-made entries, after those of `items`. */
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The bottom navigation bar of a phone: a `nav` fixed to the bottom edge with
|
|
22
|
+
* 3 to 5 destinations, each an icon in its indicator pill with its label
|
|
23
|
+
* always visible, an optional badge, `aria-current="page"` on the current one
|
|
24
|
+
* and 48px or taller targets. The entries it leaves out open from « More ».
|
|
25
|
+
*
|
|
26
|
+
* It shows at every width: hide it with a breakpoint class (`md:hidden`), as
|
|
27
|
+
* `ActivityLayout`'s `navigation="bar"` does, and `display: none` also takes
|
|
28
|
+
* it out of the tab order and the accessibility tree. While it shows it sets
|
|
29
|
+
* `--nxgt-nav-bar` on the document root, so FabDock, toasts, the mini player
|
|
30
|
+
* and `StickyActionBar` keep clear of it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function NavigationBar({ items, max, linkComponent, label, children, className, }: NavigationBarProps): import("react").JSX.Element;
|
|
33
|
+
export declare namespace NavigationBar {
|
|
34
|
+
var Item: typeof NavigationBarItem;
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MenuItem } from '../app-shell/types.js';
|
|
2
|
+
/** Destinations a bar shows at most, « More » included (Material 3: 3 to 5). */
|
|
3
|
+
export declare const BAR_MAX = 5;
|
|
4
|
+
export type BarSplit = {
|
|
5
|
+
/** The entries the bar shows, in menu order. */
|
|
6
|
+
bar: MenuItem[];
|
|
7
|
+
/** The others, in menu order: the « More » sheet lists them. */
|
|
8
|
+
more: MenuItem[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Which entries the bar keeps and which go under « More ».
|
|
12
|
+
*
|
|
13
|
+
* An entry with `bar: false` never shows on the bar. When some entries say
|
|
14
|
+
* `bar: true`, only those are candidates; otherwise every other entry is. When
|
|
15
|
+
* the candidates all fit and nothing is left over, they are the bar; else the
|
|
16
|
+
* bar keeps `max - 1` of them and « More » takes the room of the last slot.
|
|
17
|
+
* The `priority` (higher stays, unset is 0, ties keep menu order) picks which.
|
|
18
|
+
*/
|
|
19
|
+
export declare function splitBarItems(items: MenuItem[], max?: number): BarSplit;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ResolvedMenuBadge } from '../../sidebar/sidebar-menu-item-badge.js';
|
|
2
|
+
/** The badge on the icon's top-right corner: a dot or a count, hidden from assistive technology (the link's name carries it). */
|
|
3
|
+
export declare function BarBadge({ badge }: {
|
|
4
|
+
badge: ResolvedMenuBadge;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '../../../primitives/icon/icon.js';
|
|
3
|
+
/** The pill, the icon and the badge of an entry. */
|
|
4
|
+
export declare function BarGlyph({ icon, badge, }: {
|
|
5
|
+
icon: IconProps['name'];
|
|
6
|
+
badge?: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
/** What the badge adds to the entry's accessible name: ", 2 new". */
|
|
9
|
+
export declare function BarBadgeLabel({ badge, badgeLabel, }: {
|
|
10
|
+
badge?: ReactNode;
|
|
11
|
+
badgeLabel?: string;
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '../../../primitives/icon/icon.js';
|
|
3
|
+
import { AppShellLinkComponent } from '../../app-shell/types.js';
|
|
4
|
+
export type NavigationBarItemProps = {
|
|
5
|
+
/** Where the destination goes. */
|
|
6
|
+
href: string;
|
|
7
|
+
icon: IconProps['name'];
|
|
8
|
+
/** The visible label, already translated: always shown under the icon. */
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/** Whether this is the current destination. Unset: the location starts with `href`. */
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** `true` a dot, a number a count ("99+" past 99), a node as it is; read in the link's name. */
|
|
13
|
+
badge?: number | boolean | ReactNode;
|
|
14
|
+
/** Replaces the badge's text in the link's name, already translated. */
|
|
15
|
+
badgeLabel?: string;
|
|
16
|
+
linkComponent?: AppShellLinkComponent;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/** Whether `pathname` is `href` or below it (`/` only matches itself). */
|
|
20
|
+
export declare function isCurrent(pathname: string, href: string): boolean;
|
|
21
|
+
/** One destination of the bar: an icon in its indicator pill, the label under it, `aria-current="page"` when active. */
|
|
22
|
+
export declare function NavigationBarItem({ href, icon, children, active, badge, badgeLabel, linkComponent, className, }: NavigationBarItemProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentProps, ComponentType } from 'react';
|
|
2
|
+
import { AppShellLinkComponent, MenuItem } from '../../app-shell/types.js';
|
|
3
|
+
/** What a « More » trigger receives: the props the sheet's trigger needs spread on its button, the label and whether the current page is under it. */
|
|
4
|
+
export type MoreTriggerProps = Omit<ComponentProps<'button'>, 'children'> & {
|
|
5
|
+
active: boolean;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
/** The bar's « More » entry: the ellipsis in its indicator pill, the label under it. */
|
|
9
|
+
export declare function BarMoreTrigger({ active, label, ...props }: MoreTriggerProps): import("react").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* The last slot of the bar: « More » opens a sheet from the bottom with the
|
|
12
|
+
* entries the bar leaves out. It is the navigation sheet's state (closes on a
|
|
13
|
+
* followed link or a new location, focus returns to this button) with the
|
|
14
|
+
* entries listed from the bottom edge.
|
|
15
|
+
*/
|
|
16
|
+
export declare function NavigationBarMore({ items, active, linkComponent, isActive, trigger: Trigger, }: {
|
|
17
|
+
items: MenuItem[];
|
|
18
|
+
/** Whether one of the entries under « More » is the current page. */
|
|
19
|
+
active: boolean;
|
|
20
|
+
linkComponent?: AppShellLinkComponent;
|
|
21
|
+
isActive: (url: string) => boolean;
|
|
22
|
+
/** Draws the trigger: the floating navigation toolbar passes its round icon. @default BarMoreTrigger */
|
|
23
|
+
trigger?: ComponentType<MoreTriggerProps>;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/** Marks `el` shown (taking `room`) or hidden, and publishes the variable. Exported for specs. */
|
|
3
|
+
export declare function setBarVisible(el: HTMLElement, shown: boolean, room?: string): void;
|
|
4
|
+
/**
|
|
5
|
+
* Publishes the bar's room as `--nxgt-nav-bar` on the document root while a
|
|
6
|
+
* bar shows, and removes it once none does (a breakpoint class hides one, an
|
|
7
|
+
* unmount removes it): FabDock, the toaster, the mini player and
|
|
8
|
+
* `StickyActionBar` read it, portals included. `room` is what the bar takes
|
|
9
|
+
* (the floating navigation toolbar's is its own, taller by its gap). CSS variables only, set from
|
|
10
|
+
* script (no `style` attribute).
|
|
11
|
+
*/
|
|
12
|
+
export declare function useNavBarInset(ref: RefObject<HTMLElement | null>, room?: string): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './navigation-drawer.js';
|
|
2
|
+
export type { NavigationDrawerItemProps } from './partials/navigation-drawer-item.js';
|
|
3
|
+
export { NavigationDrawerItem } from './partials/navigation-drawer-item.js';
|
|
4
|
+
export type { NavigationDrawerSectionProps } from './partials/navigation-drawer-section.js';
|
|
5
|
+
export { NavigationDrawerSection } from './partials/navigation-drawer-section.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The standard drawer: 20rem wide, its destinations stacked down the start edge. */
|
|
2
|
+
export declare const DRAWER_ROOT = "flex h-full min-h-0 w-80 max-w-full shrink-0 flex-col gap-1 overflow-y-auto overflow-x-hidden px-3 py-2";
|
|
3
|
+
/** The modal drawer's panel: the same column, in the sheet. */
|
|
4
|
+
export declare const DRAWER_MODAL_BODY = "h-full w-full px-0";
|
|
5
|
+
/** One destination: a row of 56px, the whole row tinted when current (Expressive). */
|
|
6
|
+
export declare const DRAWER_ITEM = "nxgt-plain-link group relative flex h-14 shrink-0 items-center gap-3 rounded-full px-4 font-medium text-muted-foreground text-sm outline-none transition-colors hover:bg-accent/60 data-active:font-semibold data-active:text-foreground focus-visible:outline-2 focus-visible:outline-ring forced-colors:focus-visible:outline-[Highlight]";
|
|
7
|
+
/** The tint behind the row: the bar's indicator, which grows from the middle. */
|
|
8
|
+
export declare const DRAWER_ROW = "absolute inset-0 scale-x-50 rounded-full bg-sidebar-active opacity-0 transition-[opacity,transform] duration-(--nxgt-motion-effects-default-duration) ease-(--nxgt-motion-effects-default) group-data-active:scale-x-100 group-data-active:opacity-100 group-active:scale-x-110 motion-reduce:transition-none forced-colors:border forced-colors:border-[Highlight]";
|
|
9
|
+
export declare const DRAWER_HEADLINE = "px-4 pt-4 pb-2 font-medium text-muted-foreground text-xs tracking-wide";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AppShellLinkComponent, MenuItem } from '../app-shell/types.js';
|
|
3
|
+
import { NavigationDrawerItem } from './partials/navigation-drawer-item.js';
|
|
4
|
+
import { NavigationDrawerModalProps } from './partials/navigation-drawer-modal.js';
|
|
5
|
+
import { NavigationDrawerSection } from './partials/navigation-drawer-section.js';
|
|
6
|
+
export type NavigationDrawerBaseProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The menu. Entries are listed in sections by their `group` (the ones
|
|
9
|
+
* without a group first, no headline); entries with `footer: true` sit at
|
|
10
|
+
* the bottom.
|
|
11
|
+
*/
|
|
12
|
+
items?: MenuItem[];
|
|
13
|
+
/** A block above the destinations: the app's brand, a context line. */
|
|
14
|
+
header?: ReactNode;
|
|
15
|
+
linkComponent?: AppShellLinkComponent;
|
|
16
|
+
/** The landmark's accessible name, already translated. @default "Navigation" */
|
|
17
|
+
label?: string;
|
|
18
|
+
/** Hand-made sections (`NavigationDrawer.Section`), after those of `items`. */
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
export type NavigationDrawerProps = NavigationDrawerBaseProps & (({
|
|
23
|
+
variant?: 'standard';
|
|
24
|
+
} & {
|
|
25
|
+
[K in keyof NavigationDrawerModalProps]?: never;
|
|
26
|
+
}) | ({
|
|
27
|
+
variant: 'modal';
|
|
28
|
+
} & NavigationDrawerModalProps));
|
|
29
|
+
/**
|
|
30
|
+
* The navigation drawer (Material 3 Expressive): a `nav` of destinations in
|
|
31
|
+
* sections, each a 56px row with an icon, a label and an optional badge read
|
|
32
|
+
* in the link's name; `aria-current="page"` marks the current one and the row
|
|
33
|
+
* is tinted.
|
|
34
|
+
*
|
|
35
|
+
* `variant="standard"` (the default) is a permanent column, 20rem wide and as
|
|
36
|
+
* tall as its parent. `variant="modal"` shows the same column in a sheet over
|
|
37
|
+
* the page, opened by `trigger` or controlled with `open`, and closing when a
|
|
38
|
+
* link is followed. Both need a React Router context to read the location.
|
|
39
|
+
* `ActivityLayout`'s `navigation="drawer"` draws the standard one.
|
|
40
|
+
*/
|
|
41
|
+
export declare function NavigationDrawer(props: NavigationDrawerProps): import("react").JSX.Element;
|
|
42
|
+
export declare namespace NavigationDrawer {
|
|
43
|
+
var Section: typeof NavigationDrawerSection;
|
|
44
|
+
var Item: typeof NavigationDrawerItem;
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MenuItem } from '../app-shell/types.js';
|
|
2
|
+
export type DrawerGroup = {
|
|
3
|
+
headline?: string;
|
|
4
|
+
items: MenuItem[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The menu as sections: the entries without a `group` first, then one section
|
|
8
|
+
* per `group` in order of first appearance. Entries with `footer: true` are
|
|
9
|
+
* returned apart, for the drawer's bottom.
|
|
10
|
+
*/
|
|
11
|
+
export declare function groupItems(items: MenuItem[]): {
|
|
12
|
+
groups: DrawerGroup[];
|
|
13
|
+
footer: MenuItem[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NavigationDrawerBaseProps } from '../navigation-drawer.js';
|
|
2
|
+
/** The drawer's column: the header, the sections of `items`, the sections given as children, the footer entries. */
|
|
3
|
+
export declare function NavigationDrawerBody({ items, header, label, linkComponent, children, className, }: NavigationDrawerBaseProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconProps } from '../../../primitives/icon/icon.js';
|
|
3
|
+
import { AppShellLinkComponent } from '../../app-shell/types.js';
|
|
4
|
+
export type NavigationDrawerItemProps = {
|
|
5
|
+
/** Where the destination goes. */
|
|
6
|
+
href: string;
|
|
7
|
+
icon: IconProps['name'];
|
|
8
|
+
/** The visible label, already translated. */
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/** Whether this is the current destination. Unset: the location starts with `href`. */
|
|
11
|
+
active?: boolean;
|
|
12
|
+
/** `true` a dot, a number a count ("99+" past 99), a node as it is; ends the row and is read in the link's name. */
|
|
13
|
+
badge?: number | boolean | ReactNode;
|
|
14
|
+
/** Replaces the badge's text in the link's name, already translated. */
|
|
15
|
+
badgeLabel?: string;
|
|
16
|
+
linkComponent?: AppShellLinkComponent;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/** One destination of the drawer: an icon and a label in a 56px row, `aria-current="page"` when active. */
|
|
20
|
+
export declare function NavigationDrawerItem({ href, icon, children, active, badge, badgeLabel, linkComponent, className, }: NavigationDrawerItemProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NavigationDrawerBaseProps } from '../navigation-drawer.js';
|
|
3
|
+
export type NavigationDrawerModalProps = {
|
|
4
|
+
/** Open while true (controlled). Unset: the drawer manages itself, opened by `trigger`. */
|
|
5
|
+
open?: boolean;
|
|
6
|
+
/** Asked for every change: the trigger, Escape, the scrim, a followed link, a new location. */
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
/** The element that opens the drawer, usually a menu `IconButton`. */
|
|
9
|
+
trigger?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The modal drawer: the standard drawer in a `Sheet` from the start edge. It
|
|
13
|
+
* shares the app shell's menu sheet logic (`useNavigationSheet`): a followed
|
|
14
|
+
* link and a new location close it, and focus goes to the page or back to the
|
|
15
|
+
* trigger.
|
|
16
|
+
*/
|
|
17
|
+
export declare function NavigationDrawerModal({ open, onOpenChange, trigger, ...drawer }: NavigationDrawerBaseProps & NavigationDrawerModalProps): import("react").JSX.Element;
|