@nxgt/material 3.8.1 → 3.9.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 +32 -0
- package/README.md +28 -4
- package/dist/background-CAWV_qSk.js +247 -0
- package/dist/backgrounds/backgrounds.css +4 -0
- package/dist/backgrounds/css-react/celestial.css +200 -0
- package/dist/backgrounds/css-react/icons.css +175 -0
- package/dist/backgrounds.js +1 -1
- package/dist/celestial-scene-DaOsRFF3.js +30 -0
- package/dist/components/components.css +2 -5
- package/dist/components/ui/feedback/feedback.css +7 -0
- package/dist/components/ui/feedback/state-frame/illustration.css +171 -0
- package/dist/{components-DNUYg8QM.js → components-DiaPdu-E.js} +35 -28
- package/dist/components.js +16 -15
- package/dist/editor.js +1 -1
- package/dist/empty-state-COAV2d-R.js +98 -0
- package/dist/hooks.js +1 -1
- package/dist/icon-sprites-CZ3vcD7P.js +17 -0
- package/dist/icons-scene-bA7I4wdP.js +24 -0
- package/dist/illustration-DfPJtkFY.js +86 -0
- package/dist/illustrations-education.js +2 -0
- package/dist/illustrations-health.js +2 -0
- package/dist/illustrations.js +4 -0
- package/dist/lib/backgrounds/background/available.d.ts +8 -3
- package/dist/lib/backgrounds/background/background.d.ts +4 -4
- package/dist/lib/backgrounds/background/partials/background-layers.d.ts +17 -6
- package/dist/lib/backgrounds/background/partials/celestial-scene.d.ts +22 -0
- package/dist/lib/backgrounds/background/partials/icons-check.d.ts +8 -0
- package/dist/lib/backgrounds/background/partials/icons-keys.d.ts +3 -0
- package/dist/lib/backgrounds/background/partials/icons-layer.d.ts +8 -0
- package/dist/lib/backgrounds/background/partials/icons-scene.d.ts +19 -0
- package/dist/lib/backgrounds/background/partials/scene-options.d.ts +23 -0
- package/dist/lib/backgrounds/background/partials/use-icons-scene.d.ts +22 -0
- package/dist/lib/backgrounds/background/types.d.ts +28 -2
- package/dist/lib/backgrounds/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/data-table/empty-types.d.ts +20 -0
- package/dist/lib/components/ui/collections/data-table/layout-types.d.ts +12 -0
- package/dist/lib/components/ui/collections/data-table/partials/data-table-body.d.ts +3 -1
- package/dist/lib/components/ui/collections/data-table/partials/data-table-empty-row.d.ts +5 -2
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-items-empty.d.ts +2 -2
- package/dist/lib/components/ui/collections/data-table/types.d.ts +4 -26
- package/dist/lib/components/ui/feedback/empty-state/empty-state.d.ts +8 -3
- package/dist/lib/components/ui/feedback/error-state/error-state.d.ts +3 -3
- package/dist/lib/components/ui/feedback/state-frame/illustration-defaults.d.ts +46 -0
- package/dist/lib/components/ui/feedback/state-frame/scene-registry.d.ts +14 -0
- package/dist/lib/components/ui/feedback/state-frame/state-frame.d.ts +10 -2
- package/dist/lib/components/ui/feedback/state-frame/state-scene-illustration.d.ts +5 -0
- package/dist/lib/components/ui/feedback/state-frame/state-scenes.d.ts +15 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +3 -0
- package/dist/lib/components/ui/primitives/icon/icon-sprites.d.ts +17 -0
- package/dist/lib/components/ui/primitives/icon/index.d.ts +1 -0
- package/dist/lib/illustrations/illustration.d.ts +38 -0
- package/dist/lib/illustrations/index.d.ts +11 -0
- package/dist/lib/illustrations/plated-illustration.d.ts +11 -0
- package/dist/lib/illustrations/use-illustration.d.ts +22 -0
- package/dist/lib/illustrations-education/index.d.ts +16 -0
- package/dist/lib/illustrations-health/index.d.ts +16 -0
- package/dist/lib/theme-picker/partials/mini-background.d.ts +3 -0
- package/dist/lib/theme-picker/partials/tile-icons.d.ts +9 -0
- package/dist/main.js +28 -27
- package/dist/material.css +1 -1
- package/dist/{nxgt-theme-CgSb9Obl.js → nxgt-theme-ZS945iMP.js} +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/plated-illustration-C3z0hP9U.js +19 -0
- package/dist/{public-Ce30uvp0.js → public-DGvtAz7M.js} +1 -1
- package/dist/scene-options-CCy3V7XS.js +60 -0
- package/dist/scene-svg-DJKa5vsg.js +9 -0
- package/dist/state-scenes-Be9w_3an.js +130 -0
- package/dist/{theme-context-BagPvRcz.js → theme-context-Cofk6vgs.js} +2 -2
- package/dist/theme-picker.js +69 -45
- package/dist/{theme-toggle-C8os82b4.js → theme-toggle-oU-fh6WE.js} +2 -2
- package/dist/themes.js +2 -2
- package/dist/{use-chat-composer-CDrgWGMM.js → use-chat-composer-CkEPJo5I.js} +4236 -4230
- package/dist/{use-theme-Cd-aiDJo.js → use-theme-DMcyJ52N.js} +1 -1
- package/docs/README.md +2 -0
- package/docs/components/README.md +2 -0
- package/docs/components/data-table-filter-and-lists.md +1 -0
- package/docs/components/feedback-and-status.md +2 -2
- package/docs/components/foundations.md +2 -2
- package/docs/components/navigation-and-layout.md +1 -1
- package/docs/components/primitives.md +14 -1
- package/docs/getting-started.md +7 -2
- package/docs/guides/app-shell.md +1 -1
- package/docs/guides/backgrounds.md +93 -6
- package/docs/guides/icon-motifs.md +198 -0
- package/docs/guides/illustrations.md +172 -0
- package/docs/guides/themes.md +35 -0
- package/docs/guides/theming.md +1 -1
- package/docs/previews/backgrounds-background-from-theme.webp +0 -0
- package/docs/previews/backgrounds-celestial.webp +0 -0
- package/docs/previews/backgrounds-geometry-more.webp +0 -0
- package/docs/previews/backgrounds-geometry.webp +0 -0
- package/docs/previews/backgrounds-icons.webp +0 -0
- package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
- package/docs/previews/backgrounds-light-more.webp +0 -0
- package/docs/previews/backgrounds-light.webp +0 -0
- package/docs/previews/backgrounds-material-more.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/backgrounds-moon.webp +0 -0
- package/docs/previews/backgrounds-motif-shapes.webp +0 -0
- package/docs/previews/backgrounds-motifs.webp +0 -0
- package/docs/previews/backgrounds-sky-overlay.webp +0 -0
- package/docs/previews/buttons-actions-actioncard.webp +0 -0
- package/docs/previews/buttons-actions-button.webp +0 -0
- package/docs/previews/buttons-actions-buttongroup.webp +0 -0
- package/docs/previews/buttons-actions-copybutton.webp +0 -0
- package/docs/previews/buttons-actions-fab.webp +0 -0
- package/docs/previews/buttons-actions-fabmenu.webp +0 -0
- package/docs/previews/buttons-actions-highlighttext.webp +0 -0
- package/docs/previews/buttons-actions-iconbutton.webp +0 -0
- package/docs/previews/buttons-actions-languageswitcher.webp +0 -0
- package/docs/previews/buttons-actions-linkbutton.webp +0 -0
- package/docs/previews/buttons-actions-loadmorebutton.webp +0 -0
- package/docs/previews/buttons-actions-responsivebutton.webp +0 -0
- package/docs/previews/buttons-actions-scrolltolatestbutton.webp +0 -0
- package/docs/previews/buttons-actions-scrolltotop.webp +0 -0
- package/docs/previews/buttons-actions-splitbutton.webp +0 -0
- package/docs/previews/buttons-actions-themetoggle.webp +0 -0
- package/docs/previews/buttons-actions-toolbar-overflow.webp +0 -0
- package/docs/previews/buttons-actions-toolbar.webp +0 -0
- package/docs/previews/data-display-accordioncard.webp +0 -0
- package/docs/previews/data-display-apiendpoint.webp +0 -0
- package/docs/previews/data-display-apioperation.webp +0 -0
- package/docs/previews/data-display-avatar.webp +0 -0
- package/docs/previews/data-display-avatargroup.webp +0 -0
- package/docs/previews/data-display-badge.webp +0 -0
- package/docs/previews/data-display-barecode.webp +0 -0
- package/docs/previews/data-display-card-presets.webp +0 -0
- package/docs/previews/data-display-chip.webp +0 -0
- package/docs/previews/data-display-codeblock.webp +0 -0
- package/docs/previews/data-display-codegroup.webp +0 -0
- package/docs/previews/data-display-countbadge.webp +0 -0
- package/docs/previews/data-display-dayseparator.webp +0 -0
- package/docs/previews/data-display-description.webp +0 -0
- package/docs/previews/data-display-enrolmentsecret.webp +0 -0
- package/docs/previews/data-display-entityheader.webp +0 -0
- package/docs/previews/data-display-eventchip.webp +0 -0
- package/docs/previews/data-display-figure.webp +0 -0
- package/docs/previews/data-display-jsonviewer.webp +0 -0
- package/docs/previews/data-display-listtile.webp +0 -0
- package/docs/previews/data-display-markdown.webp +0 -0
- package/docs/previews/data-display-metric-cards.webp +0 -0
- package/docs/previews/data-display-paramtable.webp +0 -0
- package/docs/previews/data-display-periodcards.webp +0 -0
- package/docs/previews/data-display-recoverycodes.webp +0 -0
- package/docs/previews/data-display-shape.webp +0 -0
- package/docs/previews/data-display-statcard.webp +0 -0
- package/docs/previews/data-display-statusindicator.webp +0 -0
- package/docs/previews/data-display-summarydata.webp +0 -0
- package/docs/previews/data-display-terminal.webp +0 -0
- package/docs/previews/data-display-timeline.webp +0 -0
- package/docs/previews/data-table-filter-lists-datagrid.webp +0 -0
- package/docs/previews/data-table-filter-lists-datatable.webp +0 -0
- package/docs/previews/data-table-filter-lists-daygroupedlist.webp +0 -0
- package/docs/previews/data-table-filter-lists-drag-and-drop.webp +0 -0
- package/docs/previews/data-table-filter-lists-facetgroup.webp +0 -0
- package/docs/previews/data-table-filter-lists-filter.webp +0 -0
- package/docs/previews/data-table-filter-lists-listempty.webp +0 -0
- package/docs/previews/data-table-filter-lists-listpane.webp +0 -0
- package/docs/previews/data-table-filter-lists-pagination.webp +0 -0
- package/docs/previews/data-table-filter-lists-servertable.webp +0 -0
- package/docs/previews/data-table-filter-lists-tree.webp +0 -0
- package/docs/previews/date-time-calendar.webp +0 -0
- package/docs/previews/date-time-datefield.webp +0 -0
- package/docs/previews/date-time-daterangefield.webp +0 -0
- package/docs/previews/date-time-durationfield.webp +0 -0
- package/docs/previews/date-time-minimonth.webp +0 -0
- package/docs/previews/date-time-nowindicator.webp +0 -0
- package/docs/previews/date-time-timefield.webp +0 -0
- package/docs/previews/date-time-timepicker.webp +0 -0
- package/docs/previews/feedback-status-alert.webp +0 -0
- package/docs/previews/feedback-status-alertdialog.webp +0 -0
- package/docs/previews/feedback-status-banner.webp +0 -0
- package/docs/previews/feedback-status-circularprogress.webp +0 -0
- package/docs/previews/feedback-status-confirmationdialog.webp +0 -0
- package/docs/previews/feedback-status-confirmdialog.webp +0 -0
- package/docs/previews/feedback-status-countdowntimer.webp +0 -0
- package/docs/previews/feedback-status-customalertdialog.webp +0 -0
- package/docs/previews/feedback-status-customdialog.webp +0 -0
- package/docs/previews/feedback-status-emptystate.webp +0 -0
- package/docs/previews/feedback-status-errorstate.webp +0 -0
- package/docs/previews/feedback-status-hydrateloading.webp +0 -0
- package/docs/previews/feedback-status-illustration-education.webp +0 -0
- package/docs/previews/feedback-status-illustration-health.webp +0 -0
- package/docs/previews/feedback-status-illustration.webp +0 -0
- package/docs/previews/feedback-status-loadingindicator.webp +0 -0
- package/docs/previews/feedback-status-notificationrow.webp +0 -0
- package/docs/previews/feedback-status-notifications.webp +0 -0
- package/docs/previews/feedback-status-progress.webp +0 -0
- package/docs/previews/feedback-status-scrollprogress.webp +0 -0
- package/docs/previews/feedback-status-skeleton.webp +0 -0
- package/docs/previews/feedback-status-spinner.webp +0 -0
- package/docs/previews/feedback-status-stepdots.webp +0 -0
- package/docs/previews/feedback-status-toast.webp +0 -0
- package/docs/previews/feedback-status-typingindicator.webp +0 -0
- package/docs/previews/form-fields-attributes.webp +0 -0
- package/docs/previews/form-fields-colorfield.webp +0 -0
- package/docs/previews/form-fields-contacts.webp +0 -0
- package/docs/previews/form-fields-countryfield.webp +0 -0
- package/docs/previews/form-fields-currencyfield.webp +0 -0
- package/docs/previews/form-fields-emailfield.webp +0 -0
- package/docs/previews/form-fields-field.webp +0 -0
- package/docs/previews/form-fields-formsection.webp +0 -0
- package/docs/previews/form-fields-inlineedit.webp +0 -0
- package/docs/previews/form-fields-inputgroupfield.webp +0 -0
- package/docs/previews/form-fields-localizedtextfields.webp +0 -0
- package/docs/previews/form-fields-numberfield.webp +0 -0
- package/docs/previews/form-fields-openinghours.webp +0 -0
- package/docs/previews/form-fields-otpfield.webp +0 -0
- package/docs/previews/form-fields-passwordfield.webp +0 -0
- package/docs/previews/form-fields-percentfield.webp +0 -0
- package/docs/previews/form-fields-phonefield.webp +0 -0
- package/docs/previews/form-fields-postaladdress.webp +0 -0
- package/docs/previews/form-fields-ratingfield.webp +0 -0
- package/docs/previews/form-fields-repeatablegroup.webp +0 -0
- package/docs/previews/form-fields-searchfield.webp +0 -0
- package/docs/previews/form-fields-slider.webp +0 -0
- package/docs/previews/form-fields-switch.webp +0 -0
- package/docs/previews/form-fields-textareafield.webp +0 -0
- package/docs/previews/form-fields-textfield.webp +0 -0
- package/docs/previews/form-fields-timezonefield.webp +0 -0
- package/docs/previews/form-fields-urlfield.webp +0 -0
- package/docs/previews/foundations-themes-icon-motifs.webp +0 -0
- package/docs/previews/foundations-themes-themepicker.webp +0 -0
- package/docs/previews/guides-i18n-i18nprovider.webp +0 -0
- package/docs/previews/guides-i18n-translated-components.webp +0 -0
- package/docs/previews/media-files-audioplayer.webp +0 -0
- package/docs/previews/media-files-camera.webp +0 -0
- package/docs/previews/media-files-carousel.webp +0 -0
- package/docs/previews/media-files-filelist.webp +0 -0
- package/docs/previews/media-files-filelistfield.webp +0 -0
- package/docs/previews/media-files-filepreview.webp +0 -0
- package/docs/previews/media-files-gallery-image-lists.webp +0 -0
- package/docs/previews/media-files-gallery-viewer.webp +0 -0
- package/docs/previews/media-files-gallery.webp +0 -0
- package/docs/previews/media-files-imagecropper.webp +0 -0
- package/docs/previews/media-files-imageeditor.webp +0 -0
- package/docs/previews/media-files-imagefield.webp +0 -0
- package/docs/previews/media-files-lightboxgallery.webp +0 -0
- package/docs/previews/media-files-map.webp +0 -0
- package/docs/previews/media-files-mediaplayer.webp +0 -0
- package/docs/previews/media-files-mediaplayerhost.webp +0 -0
- package/docs/previews/media-files-mediaplayerlightbox.webp +0 -0
- package/docs/previews/media-files-mediaplayermini.webp +0 -0
- package/docs/previews/media-files-minigallery.webp +0 -0
- package/docs/previews/media-files-networkuploadfield.webp +0 -0
- package/docs/previews/media-files-pdfreader.webp +0 -0
- package/docs/previews/media-files-s3uploadfield.webp +0 -0
- package/docs/previews/media-files-uploadfield.webp +0 -0
- package/docs/previews/navigation-layout-accountmenu.webp +0 -0
- package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-authcard.webp +0 -0
- package/docs/previews/navigation-layout-background.webp +0 -0
- package/docs/previews/navigation-layout-bottomappbar.webp +0 -0
- package/docs/previews/navigation-layout-breadcrumb.webp +0 -0
- package/docs/previews/navigation-layout-doc-api.webp +0 -0
- package/docs/previews/navigation-layout-doc-blocks.webp +0 -0
- package/docs/previews/navigation-layout-doc.webp +0 -0
- package/docs/previews/navigation-layout-hero.webp +0 -0
- package/docs/previews/navigation-layout-listdetailslayout.webp +0 -0
- package/docs/previews/navigation-layout-pager.webp +0 -0
- package/docs/previews/navigation-layout-panelayout.webp +0 -0
- package/docs/previews/navigation-layout-resizable.webp +0 -0
- package/docs/previews/navigation-layout-responsivegrid.webp +0 -0
- package/docs/previews/navigation-layout-seealso.webp +0 -0
- package/docs/previews/navigation-layout-sidebar.webp +0 -0
- package/docs/previews/navigation-layout-skiplink.webp +0 -0
- package/docs/previews/navigation-layout-stepper.webp +0 -0
- package/docs/previews/navigation-layout-steps.webp +0 -0
- package/docs/previews/navigation-layout-threadlayout.webp +0 -0
- package/docs/previews/navigation-layout-toc.webp +0 -0
- package/docs/previews/navigation-layout-topappbar.webp +0 -0
- package/docs/previews/overlays-menus-command.webp +0 -0
- package/docs/previews/overlays-menus-contextmenu.webp +0 -0
- package/docs/previews/overlays-menus-dialog.webp +0 -0
- package/docs/previews/overlays-menus-drawer.webp +0 -0
- package/docs/previews/overlays-menus-dropdownmenu.webp +0 -0
- package/docs/previews/overlays-menus-hovercard.webp +0 -0
- package/docs/previews/overlays-menus-menubar.webp +0 -0
- package/docs/previews/overlays-menus-popover.webp +0 -0
- package/docs/previews/overlays-menus-sheet.webp +0 -0
- package/docs/previews/overlays-menus-tooltip.webp +0 -0
- package/docs/previews/primitives-accordion.webp +0 -0
- package/docs/previews/primitives-anchorheading.webp +0 -0
- package/docs/previews/primitives-card.webp +0 -0
- package/docs/previews/primitives-collapsible.webp +0 -0
- package/docs/previews/primitives-extendedlabel.webp +0 -0
- package/docs/previews/primitives-helpertext.webp +0 -0
- package/docs/previews/primitives-icon.webp +0 -0
- package/docs/previews/primitives-input.webp +0 -0
- package/docs/previews/primitives-inputgroup.webp +0 -0
- package/docs/previews/primitives-kbd.webp +0 -0
- package/docs/previews/primitives-label.webp +0 -0
- package/docs/previews/primitives-scrollarea.webp +0 -0
- package/docs/previews/primitives-separator.webp +0 -0
- package/docs/previews/primitives-table.webp +0 -0
- package/docs/previews/primitives-tabs.webp +0 -0
- package/docs/previews/primitives-textarea.webp +0 -0
- package/docs/previews/primitives-toggle.webp +0 -0
- package/docs/previews/primitives-togglegroup.webp +0 -0
- package/docs/previews/primitives-typography.webp +0 -0
- package/docs/previews/rich-widgets-chat-advanced.webp +0 -0
- package/docs/previews/rich-widgets-chat-composer.webp +0 -0
- package/docs/previews/rich-widgets-chat-inbox.webp +0 -0
- package/docs/previews/rich-widgets-chat-overview.webp +0 -0
- package/docs/previews/rich-widgets-chat-thread.webp +0 -0
- package/docs/previews/rich-widgets-chat-widget.webp +0 -0
- package/docs/previews/rich-widgets-codeeditor-diff.webp +0 -0
- package/docs/previews/rich-widgets-codeeditor.webp +0 -0
- package/docs/previews/rich-widgets-compacteditor.webp +0 -0
- package/docs/previews/rich-widgets-documenteditor.webp +0 -0
- package/docs/previews/rich-widgets-drawing.webp +0 -0
- package/docs/previews/rich-widgets-emojipicker.webp +0 -0
- package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
- package/docs/previews/rich-widgets-kanban.webp +0 -0
- package/docs/previews/rich-widgets-mentionlist.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-areachart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-barchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-combochart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-donutchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-funnelchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-gauge.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-heatmapchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-linechart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-piechart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-radarchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-radialbarchart.webp +0 -0
- package/docs/previews/rich-widgets-native-charts-scatterchart.webp +0 -0
- package/docs/previews/rich-widgets-questioncard.webp +0 -0
- package/docs/previews/rich-widgets-quiz.webp +0 -0
- package/docs/previews/rich-widgets-richchatcomposer.webp +0 -0
- package/docs/previews/rich-widgets-richtexteditor.webp +0 -0
- package/docs/previews/rich-widgets-richtextviewer.webp +0 -0
- package/docs/previews/selection-choice-autocomplete.webp +0 -0
- package/docs/previews/selection-choice-checkbox.webp +0 -0
- package/docs/previews/selection-choice-checkboxgroup.webp +0 -0
- package/docs/previews/selection-choice-checkcardfield.webp +0 -0
- package/docs/previews/selection-choice-chipgroupfield.webp +0 -0
- package/docs/previews/selection-choice-choicecardgroup.webp +0 -0
- package/docs/previews/selection-choice-colorswatches.webp +0 -0
- package/docs/previews/selection-choice-combobox.webp +0 -0
- package/docs/previews/selection-choice-comboboxfield.webp +0 -0
- package/docs/previews/selection-choice-optiontile.webp +0 -0
- package/docs/previews/selection-choice-radiogroup.webp +0 -0
- package/docs/previews/selection-choice-select.webp +0 -0
- package/docs/previews/selection-choice-selectfield.webp +0 -0
- package/docs/previews/selection-choice-sortablelist.webp +0 -0
- package/docs/previews/selection-choice-switcher.webp +0 -0
- package/docs/previews/selection-choice-transferlist.webp +0 -0
- package/docs/previews/selection-choice-treeselectfield.webp +0 -0
- package/docs/roadmap.md +22 -0
- package/docs/troubleshooting.md +69 -4
- package/lib/backgrounds/backgrounds.css +4 -0
- package/lib/backgrounds/css-react/celestial.css +200 -0
- package/lib/backgrounds/css-react/icons.css +175 -0
- package/lib/components/components.css +2 -5
- package/lib/components/ui/feedback/feedback.css +7 -0
- package/lib/components/ui/feedback/state-frame/illustration.css +171 -0
- package/lib/theme-picker/theme-picker.css +1 -0
- package/lib/theme-picker/theme-tile-icons.css +50 -0
- package/lib/theme-picker/theme-tile-textures-night.css +107 -1
- package/lib/themes/teal.css +2 -3
- package/package.json +28 -4
- package/dist/background--Bf_EbFR.js +0 -159
- package/dist/empty-state-s2CSjKXJ.js +0 -126
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BackgroundPreset, IconMotifOptions, IconStyleInput } from '@nxgt/material-core/backgrounds';
|
|
2
|
+
import { IconsInput } from '@nxgt/material-core/icons';
|
|
3
|
+
import { IconsSceneProps } from './icons-scene.js';
|
|
4
|
+
type IconsSceneInput = {
|
|
5
|
+
icons: IconsInput | undefined;
|
|
6
|
+
iconStyle: IconStyleInput | undefined;
|
|
7
|
+
iconMotif: IconMotifOptions | undefined;
|
|
8
|
+
seed: number;
|
|
9
|
+
animated: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The `icons` preset's props for its lazy scene, and the preset to draw. The
|
|
13
|
+
* `icons` the builder cannot draw (an unknown pack, a name that is not one,
|
|
14
|
+
* more than 48, an unknown style) draw `scatter-icons`, with a warning outside
|
|
15
|
+
* production. Only core's `/icons` references are read here. The props are
|
|
16
|
+
* keyed on strings, so a new object with the same values is the same scene.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useIconsScene(resolved: BackgroundPreset, { icons, iconStyle, iconMotif, seed, animated }: IconsSceneInput): {
|
|
19
|
+
preset: BackgroundPreset;
|
|
20
|
+
iconsScene: IconsSceneProps | undefined;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BackgroundIntensity, BackgroundTone, MoonOptions, MotifOptions } from '@nxgt/material-core/backgrounds';
|
|
1
|
+
import { BackgroundIntensity, BackgroundTone, IconMotifOptions, IconStyleInput, MoonOptions, MotifOptions, SkyPreset } from '@nxgt/material-core/backgrounds';
|
|
2
|
+
import { IconsInput } from '@nxgt/material-core/icons';
|
|
2
3
|
import { ComponentProps } from 'react';
|
|
3
4
|
import { AvailableBackgroundPreset } from './available.js';
|
|
4
5
|
export interface BackgroundProps extends ComponentProps<'div'> {
|
|
@@ -25,12 +26,37 @@ export interface BackgroundProps extends ComponentProps<'div'> {
|
|
|
25
26
|
* `halftone`, `truchet`, `floating` and `scatter-icons`, each the options
|
|
26
27
|
* it uses. A new object with the same values is the same scene. */
|
|
27
28
|
motif?: MotifOptions;
|
|
28
|
-
/** What the `moon` preset
|
|
29
|
+
/** What the `moon` preset, the celestial presets and a `sky` draw beside `motif`'s `size` and `density`:
|
|
29
30
|
* `position` (the moon's centre as fractions of the container, default
|
|
30
31
|
* `{ x: 0.8, y: 0.2 }`), `phase` (the crescent's thickness, 0.3 fat to 0.8
|
|
31
32
|
* thin, default `0.78`) and `halo` (its radius in moons, default `2.6`).
|
|
32
33
|
* A new object with the same values is the same scene. */
|
|
33
34
|
moon?: MoonOptions;
|
|
35
|
+
/** A sky drawn over the preset, before the grain: `'moon'` or `'eclipse'`,
|
|
36
|
+
* `'meteor-shower'`, `'ringed-planet'`, `'northern-lights'`. It reads the same
|
|
37
|
+
* `motif` (`size`, `density`) but not `moon` (those options stay with the
|
|
38
|
+
* preset): its body sits at its own default place, moved to the other side
|
|
39
|
+
* when the preset's moon or celestial body would be within a fifth of the
|
|
40
|
+
* width, and its stars follow `seed + 1`. Its ids are apart from the preset's. Its builder loads on demand, so it fills in after the first
|
|
41
|
+
* paint. Needs `@nxgt/material/backgrounds/celestial.css` (in `backgrounds.css`). */
|
|
42
|
+
sky?: SkyPreset;
|
|
43
|
+
/** The `icons` preset: a pack's name (`'school'`, `'health'`, `'finance'`,
|
|
44
|
+
* `'travel'`, `'nature'`, `'tech'`) or up to 48 icon names and
|
|
45
|
+
* `{ name, family?, type? }` references. Default: the `school` pack. The
|
|
46
|
+
* sprites are files your app serves (see `IconSpritesProvider`). A value the
|
|
47
|
+
* builder cannot draw draws `scatter-icons`, with a warning outside
|
|
48
|
+
* production. */
|
|
49
|
+
icons?: IconsInput;
|
|
50
|
+
/** The `icons` preset: the family and style of the icons that name none, one
|
|
51
|
+
* (`{ family?, type? }` or a sprite file's name such as `'sharp-light'`) or a
|
|
52
|
+
* list of at most 8, each icon taking one with the seed. Default: duotone
|
|
53
|
+
* thin. Keep a list to styles that share the names you use. */
|
|
54
|
+
iconStyle?: IconStyleInput;
|
|
55
|
+
/** The `icons` preset: `layout` (`'scatter'`, `'grid'`, `'constellation'`,
|
|
56
|
+
* `'drift'`), `sizeRange`, `rotation`, `duotone` (`'opacity'` or `'tones'`),
|
|
57
|
+
* `secondaryOpacity` and `calm`. A new object with the same values is the
|
|
58
|
+
* same scene. */
|
|
59
|
+
iconMotif?: IconMotifOptions;
|
|
34
60
|
/** `'viewport'` is the viewport's size (as in `/components`);
|
|
35
61
|
* `'container'` fills its parent, which needs a definite height. A
|
|
36
62
|
* `className` overrides either. */
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
* name (same props, plus every preset's), with the types and the engine's
|
|
10
10
|
* tables re-exported from `@nxgt/material-core/backgrounds` by name.
|
|
11
11
|
*/
|
|
12
|
-
export { BACKGROUND_INTENSITIES, BACKGROUND_PRESETS, BACKGROUND_TONES, type BackgroundIntensity, type BackgroundPreset, type BackgroundTone, MOTIF_SHAPES, MOTIF_SHAPES_ALL, type MoonOptions, type MotifDensity, type MotifOptions, type MotifShape, type MotifSize, type OpacitySpread, type PresetInfo, SHIPPED_BACKGROUND_PRESETS, type ShapeFill, type ShippedBackgroundPreset, } from '@nxgt/material-core/backgrounds';
|
|
12
|
+
export { BACKGROUND_INTENSITIES, BACKGROUND_PRESETS, BACKGROUND_TONES, type BackgroundIntensity, type BackgroundPreset, type BackgroundTone, type CelestialPreset, type IconLayout, type IconMotifOptions, type IconStyleInput, type IconStyleRef, type IconsInput, MOTIF_SHAPES, MOTIF_SHAPES_ALL, type MoonOptions, type MotifDensity, type MotifOptions, type MotifShape, type MotifSize, type OpacitySpread, type PresetInfo, SHIPPED_BACKGROUND_PRESETS, type ShapeFill, type ShippedBackgroundPreset, type SkyPreset, } from '@nxgt/material-core/backgrounds';
|
|
13
13
|
export { Background, type BackgroundProps } from './background/index.js';
|
|
14
14
|
export { AVAILABLE_BACKGROUND_PRESETS, type AvailableBackgroundPreset, } from './background/available.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SceneId } from '../../feedback/state-frame/scene-registry.js';
|
|
2
|
+
import { DataTableEmpty } from './partials/data-table-empty-row.js';
|
|
3
|
+
/** The props of `DataTable` that say what an empty table shows. */
|
|
4
|
+
export interface DataTableEmptyProps {
|
|
5
|
+
/** Shown, spanning every visible column, when the table has no row to show.
|
|
6
|
+
* A function is told whether rows exist but none matches the filters.
|
|
7
|
+
* Without it (or when it renders nothing) the default is a compact
|
|
8
|
+
* `EmptyState`. Precedence: `emptyFiltered` when filtered, else `empty`,
|
|
9
|
+
* else the default. */
|
|
10
|
+
empty?: DataTableEmpty;
|
|
11
|
+
/** Shown instead of `empty` when the table is filtered: rows exist but the
|
|
12
|
+
* filters hide every one of them, or `filtered` says so. A function is
|
|
13
|
+
* told `{ filtered: true }`. Renders nothing: `empty`, then the default. */
|
|
14
|
+
emptyFiltered?: DataTableEmpty;
|
|
15
|
+
/** Draws the default empty state with an icon illustration
|
|
16
|
+
* (`@nxgt/material/illustrations`): a scene id (`'empty'`, `'no-results'`…,
|
|
17
|
+
* for both states) or `true` (`'empty'`, and `'no-results'` when filtered).
|
|
18
|
+
* Not used for your own `empty` or `emptyFiltered`. */
|
|
19
|
+
emptyIllustration?: SceneId | true;
|
|
20
|
+
}
|
|
@@ -32,3 +32,15 @@ export type DataTableItem = {
|
|
|
32
32
|
/** Why it cannot (`rowSelectionDisabledReason`), when it is locked. */
|
|
33
33
|
reason?: string;
|
|
34
34
|
};
|
|
35
|
+
/** `DataTable`'s `virtual`: `true`, or the virtualizer's sizes. */
|
|
36
|
+
export type DataTableVirtual = boolean | {
|
|
37
|
+
/** A row's height before it is measured, in pixels, without the gap between rows. Default 36, a comfortable row. */
|
|
38
|
+
estimateSize?: number;
|
|
39
|
+
/** Rows rendered past each edge of the visible ones. Default 8. */
|
|
40
|
+
overscan?: number;
|
|
41
|
+
/** Rows the server (and the first client render) show, before the
|
|
42
|
+
* table virtualizes. Default 50. */
|
|
43
|
+
ssrRows?: number;
|
|
44
|
+
};
|
|
45
|
+
/** How tight a `DataTable`'s rows are. */
|
|
46
|
+
export type DataTableDensity = 'comfortable' | 'compact';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Table as ReactTable, RowData } from '@tanstack/react-table';
|
|
2
|
+
import { SceneId } from '../../../feedback/state-frame/scene-registry.js';
|
|
2
3
|
import { DataTableFeatures } from '../features.js';
|
|
3
4
|
import { DataTableVirtualOptions } from '../virtual-option.js';
|
|
4
5
|
import { DataTableEmpty } from './data-table-empty-row.js';
|
|
@@ -11,6 +12,7 @@ interface DataTableBodyProps<TData extends RowData> extends Omit<DataTableRowPro
|
|
|
11
12
|
loadingRows?: number;
|
|
12
13
|
empty?: DataTableEmpty;
|
|
13
14
|
emptyFiltered?: DataTableEmpty;
|
|
15
|
+
emptyIllustration?: SceneId | true;
|
|
14
16
|
/** The empty state is "nothing matches" (`emptyFiltered`). */
|
|
15
17
|
filtered: boolean;
|
|
16
18
|
/** The rows virtualized (`DataTable`'s resolved `virtual`). */
|
|
@@ -21,5 +23,5 @@ interface DataTableBodyProps<TData extends RowData> extends Omit<DataTableRowPro
|
|
|
21
23
|
/** `DataTable`'s rows (`DataTableRow`, or `DataTableVirtualRows` with
|
|
22
24
|
* `virtual`); skeleton rows while loading with no row to show; or the empty
|
|
23
25
|
* state. */
|
|
24
|
-
export declare function DataTableBody<TData extends RowData>({ table, renderExpandedRow, getRowHref, onRowClick, linkComponent, loading, loadingRows, empty, emptyFiltered, filtered, virtual, headerRows, }: DataTableBodyProps<TData>): import("react").JSX.Element;
|
|
26
|
+
export declare function DataTableBody<TData extends RowData>({ table, renderExpandedRow, getRowHref, onRowClick, linkComponent, loading, loadingRows, empty, emptyFiltered, emptyIllustration, filtered, virtual, headerRows, }: DataTableBodyProps<TData>): import("react").JSX.Element;
|
|
25
27
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { SceneId } from '../../../feedback/state-frame/scene-registry.js';
|
|
2
3
|
/** What `DataTable`'s `empty` render function is told: `filtered` is `true`
|
|
3
4
|
* when there is data but no row matches the column filters, or when the
|
|
4
5
|
* table's `filtered` prop says so. */
|
|
@@ -12,9 +13,10 @@ export type DataTableEmpty = ReactNode | ((state: DataTableEmptyState) => ReactN
|
|
|
12
13
|
* table's hidden status when filtered). Content that renders nothing falls
|
|
13
14
|
* through to the next. Shared by the table's empty row and the cards' empty
|
|
14
15
|
* block. */
|
|
15
|
-
export declare function DataTableEmptyContent({ empty, emptyFiltered, filtered, }: {
|
|
16
|
+
export declare function DataTableEmptyContent({ empty, emptyFiltered, emptyIllustration, filtered, }: {
|
|
16
17
|
empty?: DataTableEmpty;
|
|
17
18
|
emptyFiltered?: DataTableEmpty;
|
|
19
|
+
emptyIllustration?: SceneId | true;
|
|
18
20
|
filtered: boolean;
|
|
19
21
|
}): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element;
|
|
20
22
|
/** `DataTable`'s "nothing here" row: one `TableEmpty` cell spanning every
|
|
@@ -26,9 +28,10 @@ export declare function DataTableEmptyContent({ empty, emptyFiltered, filtered,
|
|
|
26
28
|
* box takes 4px off each side and sticks 4px in, or a wide empty state would
|
|
27
29
|
* stick out of the region by the container's padding. It carries
|
|
28
30
|
* `data-filtered` when filtered. */
|
|
29
|
-
export declare function DataTableEmptyRow({ columnCount, empty, emptyFiltered, filtered, }: {
|
|
31
|
+
export declare function DataTableEmptyRow({ columnCount, empty, emptyFiltered, emptyIllustration, filtered, }: {
|
|
30
32
|
columnCount: number;
|
|
31
33
|
empty?: DataTableEmpty;
|
|
32
34
|
emptyFiltered?: DataTableEmpty;
|
|
35
|
+
emptyIllustration?: SceneId | true;
|
|
33
36
|
filtered: boolean;
|
|
34
37
|
}): import("react").JSX.Element;
|
package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-items-empty.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { DataTableProps } from '../../types.js';
|
|
|
4
4
|
/** The cards' (and tiles') empty state, in the list's place and outside any
|
|
5
5
|
* `<ul>`: the `empty` / `emptyFiltered` content, which is also the focus
|
|
6
6
|
* target of an empty page (a bulk action that emptied it). */
|
|
7
|
-
export declare function DataTableItemsEmpty<TData extends RowData>({ listRef, focusable, filtered, empty, emptyFiltered, }: {
|
|
7
|
+
export declare function DataTableItemsEmpty<TData extends RowData>({ listRef, focusable, filtered, empty, emptyFiltered, emptyIllustration, }: {
|
|
8
8
|
listRef: Ref<HTMLElement>;
|
|
9
9
|
focusable: boolean;
|
|
10
10
|
filtered: boolean;
|
|
11
|
-
} & Pick<DataTableProps<TData>, 'empty' | 'emptyFiltered'>): import("react").JSX.Element;
|
|
11
|
+
} & Pick<DataTableProps<TData>, 'empty' | 'emptyFiltered' | 'emptyIllustration'>): import("react").JSX.Element;
|
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { ColumnDef, Row, RowData, RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
2
2
|
import { KeyboardEvent, MouseEvent, ReactNode, Ref } from 'react';
|
|
3
|
+
import { DataTableEmptyProps } from './empty-types.js';
|
|
3
4
|
import { DataTableFeatures } from './features.js';
|
|
4
|
-
import { DataTableItem, DataTableLayoutProp } from './layout-types.js';
|
|
5
|
-
import { DataTableEmpty } from './partials/data-table-empty-row.js';
|
|
5
|
+
import { DataTableDensity, DataTableItem, DataTableLayoutProp, DataTableVirtual } from './layout-types.js';
|
|
6
6
|
import { DataTableLinkComponent, DataTableServerPagination } from './server-pagination.js';
|
|
7
7
|
import { DataTableSlot, DataTableTable } from './slots.js';
|
|
8
|
-
export type { DataTableItem, DataTableItemTitleElement, DataTableLayout, DataTableLayoutProp, DataTableResponsiveLayout, } from './layout-types.js';
|
|
8
|
+
export type { DataTableDensity, DataTableItem, DataTableItemTitleElement, DataTableLayout, DataTableLayoutProp, DataTableResponsiveLayout, DataTableVirtual, } from './layout-types.js';
|
|
9
9
|
export type { DataTableLinkComponent, DataTableLinkProps, DataTablePageTarget, DataTableServerPagination, } from './server-pagination.js';
|
|
10
10
|
export type { DataTableControls, DataTableSlot, DataTableTable, } from './slots.js';
|
|
11
11
|
export type DataTableOptions = {
|
|
12
12
|
showPage?: boolean;
|
|
13
13
|
showSelected?: boolean;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export type DataTableVirtual = boolean | {
|
|
17
|
-
/** A row's height before it is measured, in pixels, without the gap between rows. Default 36, a comfortable row. */
|
|
18
|
-
estimateSize?: number;
|
|
19
|
-
/** Rows rendered past each edge of the visible ones. Default 8. */
|
|
20
|
-
overscan?: number;
|
|
21
|
-
/** Rows the server (and the first client render) show, before the
|
|
22
|
-
* table virtualizes. Default 50. */
|
|
23
|
-
ssrRows?: number;
|
|
24
|
-
};
|
|
25
|
-
/** How tight a `DataTable`'s rows are. */
|
|
26
|
-
export type DataTableDensity = 'comfortable' | 'compact';
|
|
27
|
-
export interface DataTableProps<TData extends RowData> {
|
|
15
|
+
export interface DataTableProps<TData extends RowData> extends DataTableEmptyProps {
|
|
28
16
|
columns: ColumnDef<DataTableFeatures, TData, any>[];
|
|
29
17
|
data: TData[];
|
|
30
18
|
className?: string;
|
|
@@ -75,16 +63,6 @@ export interface DataTableProps<TData extends RowData> {
|
|
|
75
63
|
loading?: boolean;
|
|
76
64
|
/** How many skeleton rows `loading` shows. Default: the page size. */
|
|
77
65
|
loadingRows?: number;
|
|
78
|
-
/** Shown, spanning every visible column, when the table has no row to show.
|
|
79
|
-
* A function is told whether rows exist but none matches the filters.
|
|
80
|
-
* Without it (or when it renders nothing) the default is a compact
|
|
81
|
-
* `EmptyState`. Precedence: `emptyFiltered` when filtered, else `empty`,
|
|
82
|
-
* else the default. */
|
|
83
|
-
empty?: DataTableEmpty;
|
|
84
|
-
/** Shown instead of `empty` when the table is filtered: rows exist but the
|
|
85
|
-
* filters hide every one of them, or `filtered` says so. A function is
|
|
86
|
-
* told `{ filtered: true }`. Renders nothing: `empty`, then the default. */
|
|
87
|
-
emptyFiltered?: DataTableEmpty;
|
|
88
66
|
/** Whether the rows are filtered, overriding what the table sees (data,
|
|
89
67
|
* but no row left by the column filters). For server-side data (`manual`),
|
|
90
68
|
* which cannot tell: `true` when the page's query has a search or a
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { EmptyStateKind } from '@nxgt/material-core/states';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import { StateFrameSize, StateHeadingLevel } from '../state-frame/state-frame.js';
|
|
3
|
+
import { StateFrameSize, StateHeadingLevel, StateIllustrationProp } from '../state-frame/state-frame.js';
|
|
4
4
|
export type { EmptyStateKind } from '@nxgt/material-core/states';
|
|
5
5
|
export interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
|
|
6
6
|
/** What is absent: `empty` (nothing yet, the default), `search`, `not-found`, `unauthorized`. The error kinds are `ErrorState`'s. */
|
|
7
7
|
kind?: EmptyStateKind;
|
|
8
8
|
size?: StateFrameSize;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Replaces the built-in illustration or icon; `false` shows no media. A
|
|
11
|
+
* scene id (`'empty'`, `'no-results'`, `'not-found'`, `'error'`, `'offline'`,
|
|
12
|
+
* `'success'`, `'welcome'`) or `true` (the kind's scene) draws an icon
|
|
13
|
+
* illustration, see `@nxgt/material/illustrations`.
|
|
14
|
+
*/
|
|
15
|
+
illustration?: StateIllustrationProp;
|
|
11
16
|
icon?: ReactNode;
|
|
12
17
|
title?: ReactNode;
|
|
13
18
|
/** Makes the title a heading of this level; see `StateFrame`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ErrorDetail, ErrorStateKind } from '@nxgt/material-core/states';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
3
|
import { ContentSlot } from '../../../../lib/ui.utils.js';
|
|
4
|
-
import { StateHeadingLevel } from '../state-frame/state-frame.js';
|
|
4
|
+
import { StateHeadingLevel, StateIllustrationProp } from '../state-frame/state-frame.js';
|
|
5
5
|
export type ErrorStateProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
6
6
|
/** Which failure this is; the default title and description follow it. */
|
|
7
7
|
kind?: ErrorStateKind;
|
|
@@ -10,8 +10,8 @@ export type ErrorStateProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
|
10
10
|
/** Makes the title a heading of this level; see `StateFrame`. */
|
|
11
11
|
headingLevel?: StateHeadingLevel;
|
|
12
12
|
description?: ReactNode;
|
|
13
|
-
/** Replaces the built-in media; `false` shows none. */
|
|
14
|
-
illustration?:
|
|
13
|
+
/** Replaces the built-in media; `false` shows none; a scene id or `true` draws an icon illustration (`@nxgt/material/illustrations`). */
|
|
14
|
+
illustration?: StateIllustrationProp;
|
|
15
15
|
icon?: ReactNode;
|
|
16
16
|
/** The thrown value: its name, message and causes go in the details. */
|
|
17
17
|
error?: unknown;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IconRef, IconStyleInput } from '@nxgt/material-core/icons';
|
|
2
|
+
import { IllustrationScene, SceneTable } from '@nxgt/material-core/illustrations';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
/** The icons a scene is drawn with: the hero, then the satellites (up to four). */
|
|
5
|
+
export type IllustrationIcons = {
|
|
6
|
+
hero?: IconRef | string;
|
|
7
|
+
satellites?: readonly (IconRef | string)[];
|
|
8
|
+
};
|
|
9
|
+
export type IllustrationDefaultsValue = {
|
|
10
|
+
/**
|
|
11
|
+
* `'suggested'`: every state draws its scene with the suggested icons
|
|
12
|
+
* (`SUGGESTED_ICONS`). A table: those scenes are drawn with these icons
|
|
13
|
+
* and the others keep today's art. It may also name the scenes of a domain
|
|
14
|
+
* set (`HEALTH_SCENES`, `EDUCATION_SCENES`) by their ids.
|
|
15
|
+
*/
|
|
16
|
+
icons?: 'suggested' | (Partial<Record<IllustrationScene, IllustrationIcons>> & Readonly<Record<string, IllustrationIcons | undefined>>);
|
|
17
|
+
/** The icon style of every illustration below (`duotone-thin`): `{ family?, type? }`, a sprite file's name, or a list of them. */
|
|
18
|
+
iconStyle?: IconStyleInput;
|
|
19
|
+
/**
|
|
20
|
+
* Scene sets to register, such as `[HEALTH_SCENES]` of
|
|
21
|
+
* `@nxgt/material/illustrations/health` or `[EDUCATION_SCENES]` of
|
|
22
|
+
* `…/education`: their ids then work everywhere a
|
|
23
|
+
* scene id does (`Illustration scene`, a state's `illustration`,
|
|
24
|
+
* `emptyIllustration`). A `scenes` prop on one `Illustration` wins; a base
|
|
25
|
+
* id wins over a set's.
|
|
26
|
+
*/
|
|
27
|
+
sets?: readonly SceneTable[];
|
|
28
|
+
};
|
|
29
|
+
export type IllustrationDefaultsProps = IllustrationDefaultsValue & {
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Opts a subtree into the icon illustrations: `EmptyState` and `ErrorState`
|
|
34
|
+
* of the default size then draw the scene of their kind (when `icons` names
|
|
35
|
+
* it) instead of the built-in art, and every `Illustration` takes the
|
|
36
|
+
* `iconStyle`. Without it nothing changes. The sprites come from
|
|
37
|
+
* `IconSpritesProvider` (or `/assets/icons/sprites/`). This module holds no
|
|
38
|
+
* drawing code: the engine loads only where a scene is drawn.
|
|
39
|
+
*/
|
|
40
|
+
export declare function IllustrationDefaults({ icons, iconStyle, sets, children, }: IllustrationDefaultsProps): import("react").JSX.Element;
|
|
41
|
+
/** The nearest `IllustrationDefaults`, or `null`. */
|
|
42
|
+
export declare function useIllustrationDefaults(): IllustrationDefaultsValue | null;
|
|
43
|
+
/** The icons the provider gives a scene: `{}` for `'suggested'`, `undefined` when it does not name it. */
|
|
44
|
+
export declare function defaultIconsFor(defaults: IllustrationDefaultsValue | null, scene: string): IllustrationIcons | undefined;
|
|
45
|
+
/** The registered set that holds `scene`, or `undefined` (a base id, or an id no set has). */
|
|
46
|
+
export declare function setOf(defaults: IllustrationDefaultsValue | null, scene: string): SceneTable | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IllustrationScene } from '@nxgt/material-core/illustrations';
|
|
2
|
+
/**
|
|
3
|
+
* The ids of the scene sets an app registers (`IllustrationDefaults` `sets`),
|
|
4
|
+
* so they type-check as a scene id. A set's subpath adds its ids by module
|
|
5
|
+
* augmentation when it is imported (`@nxgt/material/illustrations/health`
|
|
6
|
+
* adds the health ids): `{ health: HealthScene }`. Empty until then, so the
|
|
7
|
+
* base ids stay strict.
|
|
8
|
+
*/
|
|
9
|
+
export interface IllustrationSceneRegistry {
|
|
10
|
+
}
|
|
11
|
+
/** The ids of every imported set. */
|
|
12
|
+
export type RegisteredScene = IllustrationSceneRegistry[keyof IllustrationSceneRegistry];
|
|
13
|
+
/** A scene id: a base scene, or one of an imported set (draw it under an `IllustrationDefaults` that has the set in `sets`). */
|
|
14
|
+
export type SceneId = IllustrationScene | RegisteredScene;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StateKind } from '@nxgt/material-core/states';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { SceneId } from './scene-registry.js';
|
|
3
4
|
/**
|
|
4
5
|
* `default`: a page or a panel. `compact`: a card. `inline`: a row in a
|
|
5
6
|
* list of options, the icon well beside the text, the action at the end.
|
|
@@ -8,11 +9,18 @@ export type StateFrameSize = 'default' | 'compact' | 'inline';
|
|
|
8
9
|
/** A title's heading level, as `FacetGroup`'s `headingLevel` (no `h1`: the
|
|
9
10
|
* page's own heading is that). */
|
|
10
11
|
export type StateHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
/**
|
|
13
|
+
* What replaces a state's built-in media: any node, `false` for none, a scene
|
|
14
|
+
* id (`'empty'`, `'no-results'`…) or `true` to draw the kind's scene with the
|
|
15
|
+
* icon illustrations of `@nxgt/material/illustrations`. A scene is drawn at
|
|
16
|
+
* the default and compact sizes; the inline row keeps its icon well.
|
|
17
|
+
*/
|
|
18
|
+
export type StateIllustrationProp = ReactNode | SceneId;
|
|
11
19
|
export type StateFrameProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
12
20
|
kind: StateKind;
|
|
13
21
|
size?: StateFrameSize;
|
|
14
|
-
/** Replaces the built-in media; `false` shows no media at all. */
|
|
15
|
-
illustration?:
|
|
22
|
+
/** Replaces the built-in media; `false` shows no media at all; a scene id or `true` draws an icon illustration. */
|
|
23
|
+
illustration?: StateIllustrationProp;
|
|
16
24
|
/** Shown in the icon well when there is no `illustration`. */
|
|
17
25
|
icon?: ReactNode;
|
|
18
26
|
title?: ReactNode;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IllustrationScene, SceneTable } from '@nxgt/material-core/illustrations';
|
|
2
|
+
import { StateKind } from '@nxgt/material-core/states';
|
|
3
|
+
import { SceneId } from './scene-registry.js';
|
|
4
|
+
/**
|
|
5
|
+
* The scenes of `@nxgt/material-core/illustrations`, as ids: written out so
|
|
6
|
+
* `StateFrame` can tell a scene id from a node without loading the engine
|
|
7
|
+
* (a test holds this list to core's `ILLUSTRATION_SCENES`).
|
|
8
|
+
*/
|
|
9
|
+
export declare const SCENE_IDS: readonly IllustrationScene[];
|
|
10
|
+
/** The scene a state kind is drawn with. */
|
|
11
|
+
export declare const SCENE_OF_KIND: Record<StateKind, IllustrationScene>;
|
|
12
|
+
/** Whether `value` is the id of a scene (a string a `ReactNode` could also be): a base scene, or an id of one of the registered `sets`. */
|
|
13
|
+
export declare function isSceneId(value: unknown, sets?: readonly SceneTable[]): value is SceneId;
|
|
14
|
+
/** The kind whose built-in art stands in for a scene that cannot be drawn (`success` and `welcome` have no kind: the empty art). */
|
|
15
|
+
export declare const KIND_OF_SCENE: Record<IllustrationScene, StateKind>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Box } from './keep-shapes-inside.js';
|
|
2
|
+
/** The band's strips: a sticky one (the app bar) is measured where it rests, above the first strip that scrolls. */
|
|
3
|
+
export declare function bandBoxes(column: Element, layer: Box): Box[];
|
|
1
4
|
/** A callback ref for the theme's `Background`, a child of the backdrop layer (it is loaded lazily, so it mounts after this hook). */
|
|
2
5
|
export declare function useKeepShapesInside(): (el: HTMLElement | null) => void;
|
|
3
6
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type IconSpritesProviderProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Where the sprite files are served from: a root-relative path on your own
|
|
5
|
+
* origin, such as `/static/icons/`. Throws `IconRefError` (`base`) for a URL,
|
|
6
|
+
* a `//host` path, a `..` or a `:`.
|
|
7
|
+
*/
|
|
8
|
+
base: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Tells every `Icon` below it where the sprite files live, when they are not
|
|
13
|
+
* at `/assets/icons/sprites/`. Without it the default base is used.
|
|
14
|
+
*/
|
|
15
|
+
export declare function IconSpritesProvider({ base, children, }: IconSpritesProviderProps): import("react").JSX.Element;
|
|
16
|
+
/** The sprite base of the nearest `IconSpritesProvider`, or `/assets/icons/sprites/`. It does not throw outside a provider: an `Icon` works without one. */
|
|
17
|
+
export declare function useSpriteBase(): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SceneTable } from '@nxgt/material-core/illustrations';
|
|
2
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
3
|
+
import { SceneId } from '../components/ui/feedback/state-frame/scene-registry.js';
|
|
4
|
+
import { IllustrationOverrides } from './use-illustration.js';
|
|
5
|
+
export type IllustrationSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
export type IllustrationProps<T extends SceneTable | undefined = undefined> = Omit<ComponentProps<'div'>, 'title'> & IllustrationOverrides & {
|
|
7
|
+
/** Which scene: one of `ILLUSTRATION_SCENES` (`empty`, `no-results`, `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`, `maintenance`, `invitation`, `sign-in`, `empty-inbox`), or an id of `scenes`, or of a set an `IllustrationDefaults` above registers (`sets`). */
|
|
8
|
+
scene: T extends SceneTable ? keyof T & string : SceneId;
|
|
9
|
+
/** A domain's set of scenes, such as `HEALTH_SCENES` of `@nxgt/material/illustrations/health` or `EDUCATION_SCENES` of `…/education`: `scene` is then one of its ids. */
|
|
10
|
+
scenes?: T;
|
|
11
|
+
/** The width: `sm` 120px, `md` 190px (default), `lg` 280px; the box keeps a 4:3 shape and never wider than its container. */
|
|
12
|
+
size?: IllustrationSize;
|
|
13
|
+
/**
|
|
14
|
+
* What the picture says, as its accessible name (`role="img"` with an
|
|
15
|
+
* `aria-label`, never a `<title>`). Without it the illustration is
|
|
16
|
+
* decorative and hidden from assistive technology.
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
/** The satellites drift and the sparkles twinkle, slowly. Off by default and under reduced motion. */
|
|
20
|
+
animated?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A state illustration: a hero icon on a Material 3 Expressive plate with
|
|
24
|
+
* satellites and sparkles, drawn from the Font Awesome sprites your app serves
|
|
25
|
+
* (`IconSpritesProvider` says where; `/assets/icons/sprites/` otherwise).
|
|
26
|
+
* Colours are the theme's tones, light and dark; the markup holds no `style`
|
|
27
|
+
* attribute. The server and the client render the same markup: the plate is
|
|
28
|
+
* a disc until its shapes have loaded. `hero`, `satellites`, `iconStyle`, `tone` and
|
|
29
|
+
* `duotone` override the scene (and the `IllustrationDefaults` above). An icon
|
|
30
|
+
* name or a style that is not valid does not crash the page: outside
|
|
31
|
+
* production it warns once, and the built-in art of the scene's kind is drawn.
|
|
32
|
+
*/
|
|
33
|
+
export declare function Illustration<T extends SceneTable>(props: IllustrationProps<T> & {
|
|
34
|
+
scenes: T;
|
|
35
|
+
}): ReactElement;
|
|
36
|
+
export declare function Illustration(props: IllustrationProps<undefined> & {
|
|
37
|
+
scenes?: undefined;
|
|
38
|
+
}): ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State illustrations: `@nxgt/material/illustrations`. `Illustration` draws
|
|
3
|
+
* one of twelve scenes (a hero icon on a plate with satellites) from the Font
|
|
4
|
+
* Awesome sprites your app serves; `IllustrationDefaults` opts a subtree's
|
|
5
|
+
* `EmptyState` and `ErrorState` into them. The scenes are
|
|
6
|
+
* `@nxgt/material-core/illustrations`, re-exported by name.
|
|
7
|
+
*/
|
|
8
|
+
export { type IconStyleInput, type IconStyleRef, ILLUSTRATION_SCENES, type IllustrationScene, type IllustrationSpec, type IllustrationTone, type SceneRow, type SceneTable, SUGGESTED_ICONS, } from '@nxgt/material-core/illustrations';
|
|
9
|
+
export { IllustrationDefaults, type IllustrationDefaultsProps, type IllustrationDefaultsValue, type IllustrationIcons, } from '../components/ui/feedback/state-frame/illustration-defaults.js';
|
|
10
|
+
export type { IllustrationSceneRegistry, RegisteredScene, SceneId, } from '../components/ui/feedback/state-frame/scene-registry.js';
|
|
11
|
+
export { Illustration, type IllustrationProps, type IllustrationSize, } from './illustration.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IllustrationSpec } from '@nxgt/material-core/illustrations';
|
|
2
|
+
/**
|
|
3
|
+
* The illustration with its plate drawn. Its own module so the shapes engine
|
|
4
|
+
* (`@nxgt/material-core/illustrations/plates`) loads on demand:
|
|
5
|
+
* `Illustration` shows the disc until this has arrived.
|
|
6
|
+
*/
|
|
7
|
+
export default function PlatedIllustration({ spec, idPrefix, base, }: {
|
|
8
|
+
spec: IllustrationSpec;
|
|
9
|
+
idPrefix: string;
|
|
10
|
+
base: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IconRef } from '@nxgt/material-core/icons';
|
|
2
|
+
import { IllustrationSpec, SceneTable } from '@nxgt/material-core/illustrations';
|
|
3
|
+
export type IllustrationOverrides = {
|
|
4
|
+
hero?: IconRef | string;
|
|
5
|
+
satellites?: readonly (IconRef | string)[];
|
|
6
|
+
iconStyle?: IllustrationSpec['iconStyle'];
|
|
7
|
+
tone?: IllustrationSpec['tone'];
|
|
8
|
+
duotone?: IllustrationSpec['duotone'];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A scene's spec, with the provider's icons and iconStyle under the props', the
|
|
12
|
+
* sprite base and an id prefix that is the same on the server and the client.
|
|
13
|
+
* Built from a stable key, so a re-render with equal props is the same spec.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useIllustration(scene: string, overrides: IllustrationOverrides, given?: SceneTable): {
|
|
16
|
+
built: {
|
|
17
|
+
spec: IllustrationSpec;
|
|
18
|
+
flat: import('@nxgt/material-core/backgrounds').SceneNode;
|
|
19
|
+
} | null;
|
|
20
|
+
idPrefix: string;
|
|
21
|
+
base: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The education illustrations: `@nxgt/material/illustrations/education`. A set
|
|
3
|
+
* of ten scenes (a classroom, homework, exam grades, a timetable, attendance,
|
|
4
|
+
* an enrolment, a library, a graduation, no students, a report card). Register
|
|
5
|
+
* the set once, then every scene id works:
|
|
6
|
+
* `<IllustrationDefaults sets={[EDUCATION_SCENES]}>` and
|
|
7
|
+
* `<Illustration scene="classroom" />` (or `scenes={EDUCATION_SCENES}` on one).
|
|
8
|
+
* Importing this subpath also adds the ids to `SceneId`. Only an app that
|
|
9
|
+
* imports it carries the table.
|
|
10
|
+
*/
|
|
11
|
+
export { EDUCATION_SCENE_IDS, EDUCATION_SCENES, EDUCATION_SUGGESTED_ICONS, type EducationScene, } from '@nxgt/material-core/illustrations/education';
|
|
12
|
+
declare module '../components/ui/feedback/state-frame/scene-registry.js' {
|
|
13
|
+
interface IllustrationSceneRegistry {
|
|
14
|
+
education: import('@nxgt/material-core/illustrations/education').EducationScene;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The health illustrations: `@nxgt/material/illustrations/health`. A set of
|
|
3
|
+
* ten scenes (a patient's record, a consultation, an appointment, a lab
|
|
4
|
+
* sample, a prescription, a vaccination, a hospital stay, an emergency, no
|
|
5
|
+
* patients, lab results). Register the set once, then every scene id works:
|
|
6
|
+
* `<IllustrationDefaults sets={[HEALTH_SCENES]}>` and
|
|
7
|
+
* `<Illustration scene="patient-record" />` (or `scenes={HEALTH_SCENES}` on
|
|
8
|
+
* one). Importing this subpath also adds the ids to `SceneId`. Only an app
|
|
9
|
+
* that imports it carries the table.
|
|
10
|
+
*/
|
|
11
|
+
export { HEALTH_SCENE_IDS, HEALTH_SCENES, HEALTH_SUGGESTED_ICONS, type HealthScene, } from '@nxgt/material-core/illustrations/health';
|
|
12
|
+
declare module '../components/ui/feedback/state-frame/scene-registry.js' {
|
|
13
|
+
interface IllustrationSceneRegistry {
|
|
14
|
+
health: import('@nxgt/material-core/illustrations/health').HealthScene;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -4,6 +4,9 @@ import { ThemeBackground } from '@nxgt/material-core/theme/define';
|
|
|
4
4
|
* texture of its preset (rings, grid, lines, dots). Drawn by CSS from the
|
|
5
5
|
* enclosing zone's tokens, so it is the theme's own colours with no engine
|
|
6
6
|
* and no inline style. `false` is a theme with no background: a plain surface.
|
|
7
|
+
* The `icons` preset adds its first four icons, each a `<use>` of the sprite
|
|
8
|
+
* your app serves (`IconSpritesProvider`): a sprite that is not there draws
|
|
9
|
+
* nothing, and the wash stays.
|
|
7
10
|
*/
|
|
8
11
|
export declare function MiniBackground({ background, }: {
|
|
9
12
|
background: ThemeBackground | false;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ThemeBackground } from '@nxgt/material-core/theme/define';
|
|
2
|
+
/**
|
|
3
|
+
* The `href`s of the first icons an `icons` background names, for the picker's
|
|
4
|
+
* tile. It uses only core's `/icons` references (never the scene builder) and
|
|
5
|
+
* draws none when the names or styles are not valid (as the scene would not
|
|
6
|
+
* draw them either): the tile keeps its plain wash.
|
|
7
|
+
* With a list of styles the icons take them in turn, so the tile shows the mix.
|
|
8
|
+
*/
|
|
9
|
+
export declare function tileIcons(background: ThemeBackground, base: string): string[];
|