@nxgt/material 3.8.0 → 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.
Files changed (366) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +28 -4
  3. package/dist/background-CAWV_qSk.js +247 -0
  4. package/dist/backgrounds/backgrounds.css +4 -0
  5. package/dist/backgrounds/css-react/celestial.css +200 -0
  6. package/dist/backgrounds/css-react/icons.css +175 -0
  7. package/dist/backgrounds.js +1 -1
  8. package/dist/celestial-scene-DaOsRFF3.js +30 -0
  9. package/dist/components/components.css +2 -5
  10. package/dist/components/ui/feedback/feedback.css +7 -0
  11. package/dist/components/ui/feedback/state-frame/illustration.css +171 -0
  12. package/dist/{components-B9EIfMdd.js → components-DiaPdu-E.js} +41 -32
  13. package/dist/components.js +16 -15
  14. package/dist/editor.js +1 -1
  15. package/dist/empty-state-COAV2d-R.js +98 -0
  16. package/dist/hooks.js +1 -1
  17. package/dist/icon-sprites-CZ3vcD7P.js +17 -0
  18. package/dist/icons-scene-bA7I4wdP.js +24 -0
  19. package/dist/illustration-DfPJtkFY.js +86 -0
  20. package/dist/illustrations-education.js +2 -0
  21. package/dist/illustrations-health.js +2 -0
  22. package/dist/illustrations.js +4 -0
  23. package/dist/lib/backgrounds/background/available.d.ts +8 -3
  24. package/dist/lib/backgrounds/background/background.d.ts +4 -4
  25. package/dist/lib/backgrounds/background/partials/background-layers.d.ts +17 -6
  26. package/dist/lib/backgrounds/background/partials/celestial-scene.d.ts +22 -0
  27. package/dist/lib/backgrounds/background/partials/icons-check.d.ts +8 -0
  28. package/dist/lib/backgrounds/background/partials/icons-keys.d.ts +3 -0
  29. package/dist/lib/backgrounds/background/partials/icons-layer.d.ts +8 -0
  30. package/dist/lib/backgrounds/background/partials/icons-scene.d.ts +19 -0
  31. package/dist/lib/backgrounds/background/partials/scene-options.d.ts +23 -0
  32. package/dist/lib/backgrounds/background/partials/use-icons-scene.d.ts +22 -0
  33. package/dist/lib/backgrounds/background/types.d.ts +28 -2
  34. package/dist/lib/backgrounds/index.d.ts +1 -1
  35. package/dist/lib/components/ui/collections/data-table/empty-types.d.ts +20 -0
  36. package/dist/lib/components/ui/collections/data-table/layout-types.d.ts +12 -0
  37. package/dist/lib/components/ui/collections/data-table/partials/data-table-body.d.ts +3 -1
  38. package/dist/lib/components/ui/collections/data-table/partials/data-table-empty-row.d.ts +5 -2
  39. package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-items-empty.d.ts +2 -2
  40. package/dist/lib/components/ui/collections/data-table/types.d.ts +4 -26
  41. package/dist/lib/components/ui/feedback/empty-state/empty-state.d.ts +8 -3
  42. package/dist/lib/components/ui/feedback/error-state/error-state.d.ts +3 -3
  43. package/dist/lib/components/ui/feedback/state-frame/illustration-defaults.d.ts +46 -0
  44. package/dist/lib/components/ui/feedback/state-frame/scene-registry.d.ts +14 -0
  45. package/dist/lib/components/ui/feedback/state-frame/state-frame.d.ts +10 -2
  46. package/dist/lib/components/ui/feedback/state-frame/state-scene-illustration.d.ts +5 -0
  47. package/dist/lib/components/ui/feedback/state-frame/state-scenes.d.ts +15 -0
  48. package/dist/lib/components/ui/layout/account-menu/account-menu-avatar.d.ts +1 -1
  49. package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +3 -0
  50. package/dist/lib/components/ui/primitives/icon/icon-sprites.d.ts +17 -0
  51. package/dist/lib/components/ui/primitives/icon/index.d.ts +1 -0
  52. package/dist/lib/illustrations/illustration.d.ts +38 -0
  53. package/dist/lib/illustrations/index.d.ts +11 -0
  54. package/dist/lib/illustrations/plated-illustration.d.ts +11 -0
  55. package/dist/lib/illustrations/use-illustration.d.ts +22 -0
  56. package/dist/lib/illustrations-education/index.d.ts +16 -0
  57. package/dist/lib/illustrations-health/index.d.ts +16 -0
  58. package/dist/lib/theme-picker/partials/mini-background.d.ts +3 -0
  59. package/dist/lib/theme-picker/partials/tile-icons.d.ts +9 -0
  60. package/dist/main.js +28 -27
  61. package/dist/material.css +1 -1
  62. package/dist/{nxgt-theme-CgSb9Obl.js → nxgt-theme-ZS945iMP.js} +1 -1
  63. package/dist/pdf-reader.js +1 -1
  64. package/dist/plated-illustration-C3z0hP9U.js +19 -0
  65. package/dist/{public-Ce30uvp0.js → public-DGvtAz7M.js} +1 -1
  66. package/dist/scene-options-CCy3V7XS.js +60 -0
  67. package/dist/scene-svg-DJKa5vsg.js +9 -0
  68. package/dist/state-scenes-Be9w_3an.js +130 -0
  69. package/dist/{theme-context-BagPvRcz.js → theme-context-Cofk6vgs.js} +2 -2
  70. package/dist/theme-picker.js +69 -45
  71. package/dist/{theme-toggle-C8os82b4.js → theme-toggle-oU-fh6WE.js} +2 -2
  72. package/dist/themes.js +2 -2
  73. package/dist/{use-chat-composer-CDrgWGMM.js → use-chat-composer-CkEPJo5I.js} +4236 -4230
  74. package/dist/{use-theme-Cd-aiDJo.js → use-theme-DMcyJ52N.js} +1 -1
  75. package/docs/README.md +2 -0
  76. package/docs/components/README.md +2 -0
  77. package/docs/components/data-table-filter-and-lists.md +1 -0
  78. package/docs/components/feedback-and-status.md +2 -2
  79. package/docs/components/foundations.md +2 -2
  80. package/docs/components/navigation-and-layout.md +1 -1
  81. package/docs/components/primitives.md +14 -1
  82. package/docs/getting-started.md +7 -2
  83. package/docs/guides/app-shell.md +1 -1
  84. package/docs/guides/backgrounds.md +93 -6
  85. package/docs/guides/icon-motifs.md +198 -0
  86. package/docs/guides/illustrations.md +172 -0
  87. package/docs/guides/themes.md +35 -0
  88. package/docs/guides/theming.md +1 -1
  89. package/docs/previews/backgrounds-background-from-theme.webp +0 -0
  90. package/docs/previews/backgrounds-celestial.webp +0 -0
  91. package/docs/previews/backgrounds-geometry-more.webp +0 -0
  92. package/docs/previews/backgrounds-geometry.webp +0 -0
  93. package/docs/previews/backgrounds-icons.webp +0 -0
  94. package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
  95. package/docs/previews/backgrounds-light-more.webp +0 -0
  96. package/docs/previews/backgrounds-light.webp +0 -0
  97. package/docs/previews/backgrounds-material-more.webp +0 -0
  98. package/docs/previews/backgrounds-matrix.webp +0 -0
  99. package/docs/previews/backgrounds-moon.webp +0 -0
  100. package/docs/previews/backgrounds-motif-shapes.webp +0 -0
  101. package/docs/previews/backgrounds-motifs.webp +0 -0
  102. package/docs/previews/backgrounds-sky-overlay.webp +0 -0
  103. package/docs/previews/buttons-actions-actioncard.webp +0 -0
  104. package/docs/previews/buttons-actions-button.webp +0 -0
  105. package/docs/previews/buttons-actions-buttongroup.webp +0 -0
  106. package/docs/previews/buttons-actions-copybutton.webp +0 -0
  107. package/docs/previews/buttons-actions-fab.webp +0 -0
  108. package/docs/previews/buttons-actions-fabmenu.webp +0 -0
  109. package/docs/previews/buttons-actions-highlighttext.webp +0 -0
  110. package/docs/previews/buttons-actions-iconbutton.webp +0 -0
  111. package/docs/previews/buttons-actions-languageswitcher.webp +0 -0
  112. package/docs/previews/buttons-actions-linkbutton.webp +0 -0
  113. package/docs/previews/buttons-actions-loadmorebutton.webp +0 -0
  114. package/docs/previews/buttons-actions-responsivebutton.webp +0 -0
  115. package/docs/previews/buttons-actions-scrolltolatestbutton.webp +0 -0
  116. package/docs/previews/buttons-actions-scrolltotop.webp +0 -0
  117. package/docs/previews/buttons-actions-splitbutton.webp +0 -0
  118. package/docs/previews/buttons-actions-themetoggle.webp +0 -0
  119. package/docs/previews/buttons-actions-toolbar-overflow.webp +0 -0
  120. package/docs/previews/buttons-actions-toolbar.webp +0 -0
  121. package/docs/previews/data-display-accordioncard.webp +0 -0
  122. package/docs/previews/data-display-apiendpoint.webp +0 -0
  123. package/docs/previews/data-display-apioperation.webp +0 -0
  124. package/docs/previews/data-display-avatar.webp +0 -0
  125. package/docs/previews/data-display-avatargroup.webp +0 -0
  126. package/docs/previews/data-display-badge.webp +0 -0
  127. package/docs/previews/data-display-barecode.webp +0 -0
  128. package/docs/previews/data-display-card-presets.webp +0 -0
  129. package/docs/previews/data-display-chip.webp +0 -0
  130. package/docs/previews/data-display-codeblock.webp +0 -0
  131. package/docs/previews/data-display-codegroup.webp +0 -0
  132. package/docs/previews/data-display-countbadge.webp +0 -0
  133. package/docs/previews/data-display-dayseparator.webp +0 -0
  134. package/docs/previews/data-display-description.webp +0 -0
  135. package/docs/previews/data-display-enrolmentsecret.webp +0 -0
  136. package/docs/previews/data-display-entityheader.webp +0 -0
  137. package/docs/previews/data-display-eventchip.webp +0 -0
  138. package/docs/previews/data-display-figure.webp +0 -0
  139. package/docs/previews/data-display-jsonviewer.webp +0 -0
  140. package/docs/previews/data-display-listtile.webp +0 -0
  141. package/docs/previews/data-display-markdown.webp +0 -0
  142. package/docs/previews/data-display-metric-cards.webp +0 -0
  143. package/docs/previews/data-display-paramtable.webp +0 -0
  144. package/docs/previews/data-display-periodcards.webp +0 -0
  145. package/docs/previews/data-display-recoverycodes.webp +0 -0
  146. package/docs/previews/data-display-shape.webp +0 -0
  147. package/docs/previews/data-display-statcard.webp +0 -0
  148. package/docs/previews/data-display-statusindicator.webp +0 -0
  149. package/docs/previews/data-display-summarydata.webp +0 -0
  150. package/docs/previews/data-display-terminal.webp +0 -0
  151. package/docs/previews/data-display-timeline.webp +0 -0
  152. package/docs/previews/data-table-filter-lists-datagrid.webp +0 -0
  153. package/docs/previews/data-table-filter-lists-datatable.webp +0 -0
  154. package/docs/previews/data-table-filter-lists-daygroupedlist.webp +0 -0
  155. package/docs/previews/data-table-filter-lists-drag-and-drop.webp +0 -0
  156. package/docs/previews/data-table-filter-lists-facetgroup.webp +0 -0
  157. package/docs/previews/data-table-filter-lists-filter.webp +0 -0
  158. package/docs/previews/data-table-filter-lists-listempty.webp +0 -0
  159. package/docs/previews/data-table-filter-lists-listpane.webp +0 -0
  160. package/docs/previews/data-table-filter-lists-pagination.webp +0 -0
  161. package/docs/previews/data-table-filter-lists-servertable.webp +0 -0
  162. package/docs/previews/data-table-filter-lists-tree.webp +0 -0
  163. package/docs/previews/date-time-calendar.webp +0 -0
  164. package/docs/previews/date-time-datefield.webp +0 -0
  165. package/docs/previews/date-time-daterangefield.webp +0 -0
  166. package/docs/previews/date-time-durationfield.webp +0 -0
  167. package/docs/previews/date-time-minimonth.webp +0 -0
  168. package/docs/previews/date-time-nowindicator.webp +0 -0
  169. package/docs/previews/date-time-timefield.webp +0 -0
  170. package/docs/previews/date-time-timepicker.webp +0 -0
  171. package/docs/previews/feedback-status-alert.webp +0 -0
  172. package/docs/previews/feedback-status-alertdialog.webp +0 -0
  173. package/docs/previews/feedback-status-banner.webp +0 -0
  174. package/docs/previews/feedback-status-circularprogress.webp +0 -0
  175. package/docs/previews/feedback-status-confirmationdialog.webp +0 -0
  176. package/docs/previews/feedback-status-confirmdialog.webp +0 -0
  177. package/docs/previews/feedback-status-countdowntimer.webp +0 -0
  178. package/docs/previews/feedback-status-customalertdialog.webp +0 -0
  179. package/docs/previews/feedback-status-customdialog.webp +0 -0
  180. package/docs/previews/feedback-status-emptystate.webp +0 -0
  181. package/docs/previews/feedback-status-errorstate.webp +0 -0
  182. package/docs/previews/feedback-status-hydrateloading.webp +0 -0
  183. package/docs/previews/feedback-status-illustration-education.webp +0 -0
  184. package/docs/previews/feedback-status-illustration-health.webp +0 -0
  185. package/docs/previews/feedback-status-illustration.webp +0 -0
  186. package/docs/previews/feedback-status-loadingindicator.webp +0 -0
  187. package/docs/previews/feedback-status-notificationrow.webp +0 -0
  188. package/docs/previews/feedback-status-notifications.webp +0 -0
  189. package/docs/previews/feedback-status-progress.webp +0 -0
  190. package/docs/previews/feedback-status-scrollprogress.webp +0 -0
  191. package/docs/previews/feedback-status-skeleton.webp +0 -0
  192. package/docs/previews/feedback-status-spinner.webp +0 -0
  193. package/docs/previews/feedback-status-stepdots.webp +0 -0
  194. package/docs/previews/feedback-status-toast.webp +0 -0
  195. package/docs/previews/feedback-status-typingindicator.webp +0 -0
  196. package/docs/previews/form-fields-attributes.webp +0 -0
  197. package/docs/previews/form-fields-colorfield.webp +0 -0
  198. package/docs/previews/form-fields-contacts.webp +0 -0
  199. package/docs/previews/form-fields-countryfield.webp +0 -0
  200. package/docs/previews/form-fields-currencyfield.webp +0 -0
  201. package/docs/previews/form-fields-emailfield.webp +0 -0
  202. package/docs/previews/form-fields-field.webp +0 -0
  203. package/docs/previews/form-fields-formsection.webp +0 -0
  204. package/docs/previews/form-fields-inlineedit.webp +0 -0
  205. package/docs/previews/form-fields-inputgroupfield.webp +0 -0
  206. package/docs/previews/form-fields-localizedtextfields.webp +0 -0
  207. package/docs/previews/form-fields-numberfield.webp +0 -0
  208. package/docs/previews/form-fields-openinghours.webp +0 -0
  209. package/docs/previews/form-fields-otpfield.webp +0 -0
  210. package/docs/previews/form-fields-passwordfield.webp +0 -0
  211. package/docs/previews/form-fields-percentfield.webp +0 -0
  212. package/docs/previews/form-fields-phonefield.webp +0 -0
  213. package/docs/previews/form-fields-postaladdress.webp +0 -0
  214. package/docs/previews/form-fields-ratingfield.webp +0 -0
  215. package/docs/previews/form-fields-repeatablegroup.webp +0 -0
  216. package/docs/previews/form-fields-searchfield.webp +0 -0
  217. package/docs/previews/form-fields-slider.webp +0 -0
  218. package/docs/previews/form-fields-switch.webp +0 -0
  219. package/docs/previews/form-fields-textareafield.webp +0 -0
  220. package/docs/previews/form-fields-textfield.webp +0 -0
  221. package/docs/previews/form-fields-timezonefield.webp +0 -0
  222. package/docs/previews/form-fields-urlfield.webp +0 -0
  223. package/docs/previews/foundations-themes-icon-motifs.webp +0 -0
  224. package/docs/previews/foundations-themes-themepicker.webp +0 -0
  225. package/docs/previews/guides-i18n-i18nprovider.webp +0 -0
  226. package/docs/previews/guides-i18n-translated-components.webp +0 -0
  227. package/docs/previews/media-files-audioplayer.webp +0 -0
  228. package/docs/previews/media-files-camera.webp +0 -0
  229. package/docs/previews/media-files-carousel.webp +0 -0
  230. package/docs/previews/media-files-filelist.webp +0 -0
  231. package/docs/previews/media-files-filelistfield.webp +0 -0
  232. package/docs/previews/media-files-filepreview.webp +0 -0
  233. package/docs/previews/media-files-gallery-image-lists.webp +0 -0
  234. package/docs/previews/media-files-gallery-viewer.webp +0 -0
  235. package/docs/previews/media-files-gallery.webp +0 -0
  236. package/docs/previews/media-files-imagecropper.webp +0 -0
  237. package/docs/previews/media-files-imageeditor.webp +0 -0
  238. package/docs/previews/media-files-imagefield.webp +0 -0
  239. package/docs/previews/media-files-lightboxgallery.webp +0 -0
  240. package/docs/previews/media-files-map.webp +0 -0
  241. package/docs/previews/media-files-mediaplayer.webp +0 -0
  242. package/docs/previews/media-files-mediaplayerhost.webp +0 -0
  243. package/docs/previews/media-files-mediaplayerlightbox.webp +0 -0
  244. package/docs/previews/media-files-mediaplayermini.webp +0 -0
  245. package/docs/previews/media-files-minigallery.webp +0 -0
  246. package/docs/previews/media-files-networkuploadfield.webp +0 -0
  247. package/docs/previews/media-files-pdfreader.webp +0 -0
  248. package/docs/previews/media-files-s3uploadfield.webp +0 -0
  249. package/docs/previews/media-files-uploadfield.webp +0 -0
  250. package/docs/previews/navigation-layout-accountmenu.webp +0 -0
  251. package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
  252. package/docs/previews/navigation-layout-appshell.webp +0 -0
  253. package/docs/previews/navigation-layout-authcard.webp +0 -0
  254. package/docs/previews/navigation-layout-background.webp +0 -0
  255. package/docs/previews/navigation-layout-bottomappbar.webp +0 -0
  256. package/docs/previews/navigation-layout-breadcrumb.webp +0 -0
  257. package/docs/previews/navigation-layout-doc-api.webp +0 -0
  258. package/docs/previews/navigation-layout-doc-blocks.webp +0 -0
  259. package/docs/previews/navigation-layout-doc.webp +0 -0
  260. package/docs/previews/navigation-layout-hero.webp +0 -0
  261. package/docs/previews/navigation-layout-listdetailslayout.webp +0 -0
  262. package/docs/previews/navigation-layout-pager.webp +0 -0
  263. package/docs/previews/navigation-layout-panelayout.webp +0 -0
  264. package/docs/previews/navigation-layout-resizable.webp +0 -0
  265. package/docs/previews/navigation-layout-responsivegrid.webp +0 -0
  266. package/docs/previews/navigation-layout-seealso.webp +0 -0
  267. package/docs/previews/navigation-layout-sidebar.webp +0 -0
  268. package/docs/previews/navigation-layout-skiplink.webp +0 -0
  269. package/docs/previews/navigation-layout-stepper.webp +0 -0
  270. package/docs/previews/navigation-layout-steps.webp +0 -0
  271. package/docs/previews/navigation-layout-threadlayout.webp +0 -0
  272. package/docs/previews/navigation-layout-toc.webp +0 -0
  273. package/docs/previews/navigation-layout-topappbar.webp +0 -0
  274. package/docs/previews/overlays-menus-command.webp +0 -0
  275. package/docs/previews/overlays-menus-contextmenu.webp +0 -0
  276. package/docs/previews/overlays-menus-dialog.webp +0 -0
  277. package/docs/previews/overlays-menus-drawer.webp +0 -0
  278. package/docs/previews/overlays-menus-dropdownmenu.webp +0 -0
  279. package/docs/previews/overlays-menus-hovercard.webp +0 -0
  280. package/docs/previews/overlays-menus-menubar.webp +0 -0
  281. package/docs/previews/overlays-menus-popover.webp +0 -0
  282. package/docs/previews/overlays-menus-sheet.webp +0 -0
  283. package/docs/previews/overlays-menus-tooltip.webp +0 -0
  284. package/docs/previews/primitives-accordion.webp +0 -0
  285. package/docs/previews/primitives-anchorheading.webp +0 -0
  286. package/docs/previews/primitives-card.webp +0 -0
  287. package/docs/previews/primitives-collapsible.webp +0 -0
  288. package/docs/previews/primitives-extendedlabel.webp +0 -0
  289. package/docs/previews/primitives-helpertext.webp +0 -0
  290. package/docs/previews/primitives-icon.webp +0 -0
  291. package/docs/previews/primitives-input.webp +0 -0
  292. package/docs/previews/primitives-inputgroup.webp +0 -0
  293. package/docs/previews/primitives-kbd.webp +0 -0
  294. package/docs/previews/primitives-label.webp +0 -0
  295. package/docs/previews/primitives-scrollarea.webp +0 -0
  296. package/docs/previews/primitives-separator.webp +0 -0
  297. package/docs/previews/primitives-table.webp +0 -0
  298. package/docs/previews/primitives-tabs.webp +0 -0
  299. package/docs/previews/primitives-textarea.webp +0 -0
  300. package/docs/previews/primitives-toggle.webp +0 -0
  301. package/docs/previews/primitives-togglegroup.webp +0 -0
  302. package/docs/previews/primitives-typography.webp +0 -0
  303. package/docs/previews/rich-widgets-chat-advanced.webp +0 -0
  304. package/docs/previews/rich-widgets-chat-composer.webp +0 -0
  305. package/docs/previews/rich-widgets-chat-inbox.webp +0 -0
  306. package/docs/previews/rich-widgets-chat-overview.webp +0 -0
  307. package/docs/previews/rich-widgets-chat-thread.webp +0 -0
  308. package/docs/previews/rich-widgets-chat-widget.webp +0 -0
  309. package/docs/previews/rich-widgets-codeeditor-diff.webp +0 -0
  310. package/docs/previews/rich-widgets-codeeditor.webp +0 -0
  311. package/docs/previews/rich-widgets-compacteditor.webp +0 -0
  312. package/docs/previews/rich-widgets-documenteditor.webp +0 -0
  313. package/docs/previews/rich-widgets-drawing.webp +0 -0
  314. package/docs/previews/rich-widgets-emojipicker.webp +0 -0
  315. package/docs/previews/rich-widgets-eventcalendar.webp +0 -0
  316. package/docs/previews/rich-widgets-kanban.webp +0 -0
  317. package/docs/previews/rich-widgets-mentionlist.webp +0 -0
  318. package/docs/previews/rich-widgets-native-charts-areachart.webp +0 -0
  319. package/docs/previews/rich-widgets-native-charts-barchart.webp +0 -0
  320. package/docs/previews/rich-widgets-native-charts-combochart.webp +0 -0
  321. package/docs/previews/rich-widgets-native-charts-donutchart.webp +0 -0
  322. package/docs/previews/rich-widgets-native-charts-funnelchart.webp +0 -0
  323. package/docs/previews/rich-widgets-native-charts-gauge.webp +0 -0
  324. package/docs/previews/rich-widgets-native-charts-heatmapchart.webp +0 -0
  325. package/docs/previews/rich-widgets-native-charts-linechart.webp +0 -0
  326. package/docs/previews/rich-widgets-native-charts-piechart.webp +0 -0
  327. package/docs/previews/rich-widgets-native-charts-radarchart.webp +0 -0
  328. package/docs/previews/rich-widgets-native-charts-radialbarchart.webp +0 -0
  329. package/docs/previews/rich-widgets-native-charts-scatterchart.webp +0 -0
  330. package/docs/previews/rich-widgets-questioncard.webp +0 -0
  331. package/docs/previews/rich-widgets-quiz.webp +0 -0
  332. package/docs/previews/rich-widgets-richchatcomposer.webp +0 -0
  333. package/docs/previews/rich-widgets-richtexteditor.webp +0 -0
  334. package/docs/previews/rich-widgets-richtextviewer.webp +0 -0
  335. package/docs/previews/selection-choice-autocomplete.webp +0 -0
  336. package/docs/previews/selection-choice-checkbox.webp +0 -0
  337. package/docs/previews/selection-choice-checkboxgroup.webp +0 -0
  338. package/docs/previews/selection-choice-checkcardfield.webp +0 -0
  339. package/docs/previews/selection-choice-chipgroupfield.webp +0 -0
  340. package/docs/previews/selection-choice-choicecardgroup.webp +0 -0
  341. package/docs/previews/selection-choice-colorswatches.webp +0 -0
  342. package/docs/previews/selection-choice-combobox.webp +0 -0
  343. package/docs/previews/selection-choice-comboboxfield.webp +0 -0
  344. package/docs/previews/selection-choice-optiontile.webp +0 -0
  345. package/docs/previews/selection-choice-radiogroup.webp +0 -0
  346. package/docs/previews/selection-choice-select.webp +0 -0
  347. package/docs/previews/selection-choice-selectfield.webp +0 -0
  348. package/docs/previews/selection-choice-sortablelist.webp +0 -0
  349. package/docs/previews/selection-choice-switcher.webp +0 -0
  350. package/docs/previews/selection-choice-transferlist.webp +0 -0
  351. package/docs/previews/selection-choice-treeselectfield.webp +0 -0
  352. package/docs/roadmap.md +22 -0
  353. package/docs/troubleshooting.md +69 -4
  354. package/lib/backgrounds/backgrounds.css +4 -0
  355. package/lib/backgrounds/css-react/celestial.css +200 -0
  356. package/lib/backgrounds/css-react/icons.css +175 -0
  357. package/lib/components/components.css +2 -5
  358. package/lib/components/ui/feedback/feedback.css +7 -0
  359. package/lib/components/ui/feedback/state-frame/illustration.css +171 -0
  360. package/lib/theme-picker/theme-picker.css +1 -0
  361. package/lib/theme-picker/theme-tile-icons.css +50 -0
  362. package/lib/theme-picker/theme-tile-textures-night.css +107 -1
  363. package/lib/themes/teal.css +2 -3
  364. package/package.json +28 -4
  365. package/dist/background--Bf_EbFR.js +0 -159
  366. package/dist/empty-state-s2CSjKXJ.js +0 -126
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./use-ssr-media-query-C6M5m8sf.js";
2
2
  import { i as t, n, o as r, r as i, s as a, t as o } from "./theme-store-CSl51uNH.js";
3
- import { a as s } from "./theme-context-BagPvRcz.js";
3
+ import { a as s } from "./theme-context-Cofk6vgs.js";
4
4
  import { useCallback as c, useEffect as l, useState as u, useSyncExternalStore as d } from "react";
5
5
  import { PRESET_SCHEMES as f } from "@nxgt/material-core/theme/boot";
6
6
  //#region lib/hooks/use-is-client.ts
package/docs/README.md CHANGED
@@ -23,6 +23,8 @@ detail: every option, the second example, and the traps.
23
23
  | [Streaming (HLS)](guides/media-streaming.md) | You play `.m3u8` streams in `MediaPlayer` with `@nxgt/material/media-hls` |
24
24
  | [Maps](guides/maps.md) | You render Leaflet maps or a location field with `@nxgt/material/map` |
25
25
  | [Drawing](guides/drawing.md) | You draw diagrams, badges or illustrations from code with `@nxgt/material/draw`: scenes and JSX primitives, roles and tones, a strict CSP, accessibility and events, sketch, animation, PNG, PDF and e-mail |
26
+ | [Illustrations](guides/illustrations.md) | You draw state illustrations from your Font Awesome sprites with `@nxgt/material/illustrations`: the twelve scenes and the health and education sets, `EmptyState` / `ErrorState` / `DataTable` with `illustration`, `IllustrationDefaults` for an app, sizes, motion and CSP |
27
+ | [Icon motifs](guides/icon-motifs.md) | You use icon backgrounds, celestial skies, illustrations or a theme that names a motif: serving your own Font Awesome sprites (the package ships none), `IconSpritesProvider`, `icons` / `iconStyle` / `iconMotif`, `sky`, the health and education sets, Free fallbacks for Pro-only names |
26
28
  | [Backgrounds](guides/backgrounds.md) | You want a gradient or patterned backdrop: tones, intensity, the opt-in `backgrounds.css`, custom colours, motion and CSP |
27
29
  | [SSR](guides/ssr.md) | Your app renders on a server and bundles this package |
28
30
  | [Content Security Policy](guides/csp.md) | Your app sends a strict CSP: the directives to use, the components that still inject a `<style>`, the zod and KaTeX settings, self-hosting a font, the per-request nonce |
@@ -6,6 +6,8 @@ example that compiles and the options that change behaviour. The same twelve
6
6
  categories (after Foundations, which is React only) are the README's catalogue, the Storybook sidebar and
7
7
  `@nxgt/material-vue`'s pages.
8
8
 
9
+ Icons in the previews: Font Awesome Free 7.3.1 by Fonticons, Inc., CC BY 4.0 — https://fontawesome.com/license/free
10
+
9
11
  ## [Foundations](foundations.md)
10
12
 
11
13
  What the stylesheet gives any element, not a component: the animation classes (`animate-fade-in-up`, `animate-duration-300`…), pure CSS for Tailwind 4. React only. 1 entry.
@@ -109,6 +109,7 @@ table enables, for typing your own column defs.
109
109
  | `density` | `'comfortable' \| 'compact'` | `'comfortable'` | `compact` tightens the cell padding, the row and header heights and the gap between rows, the selection column included; it is the table's `data-density` attribute, styled with classes (no inline style). The toolbar band and the empty state keep their size; the print variant is unchanged |
110
110
  | `empty` | `ReactNode \| ({ filtered }) => ReactNode` | a compact `EmptyState`: "No data available", or "No results" when filtered | content of the empty row, spanning every visible column |
111
111
  | `emptyFiltered` | `ReactNode \| ({ filtered }) => ReactNode` | none (falls back to `empty`, then the default) | content of the empty row when the table is filtered (rows exist but the filters hide every one, or `filtered`); wins over `empty` then |
112
+ | `emptyIllustration` | `IllustrationScene \| true` | none | draws the default empty state with an icon illustration from your Font Awesome sprites: a scene id (`'empty'`, `'no-results'`…) for both states, `true` for `empty` (`no-results` when filtered); never replaces your own `empty` or `emptyFiltered` ([Illustrations](../guides/illustrations.md#use-them-in-the-states)) |
112
113
  | `filtered` | `boolean` | what the table sees | whether the rows are filtered, overriding the table's own reading; for `manual` data, which cannot tell: `true` when the page's query has a search or a filter. It picks `emptyFiltered` and the "No results" announcement on an empty page ([an empty server page](#an-empty-server-page)) |
113
114
  | `manual` | `boolean` | `false` | `data` is one server page: no client filtering, sorting or paging; the footer is the server footer ([server-side data](#server-side-data)) |
114
115
  | `sorting` / `onSortingChange` | `SortingState` / `(sorting) => void` | held inside | controlled sorting; the callback gets the new state, not an updater, and is not called for an update that resolves to the current value |
@@ -320,7 +320,7 @@ import { Button, EmptyState } from '@nxgt/material/components';
320
320
  | --- | --- | --- | --- |
321
321
  | `kind` | `'empty' \| 'search' \| 'not-found' \| 'unauthorized'` | `'empty'` | illustration, icon, title and description |
322
322
  | `size` | `'default' \| 'compact' \| 'inline'` | `'default'` | `compact` swaps the illustration for a small icon and tightens the spacing; `inline` lays out one row (the icon in a 32px round well, the text beside it, the action at the end), for a list of options |
323
- | `illustration` | `ReactNode \| false` | the kind's | replaces the illustration; `false` shows no media |
323
+ | `illustration` | `ReactNode \| false \| 'empty' \| 'no-results' \| 'not-found' \| 'error' \| 'offline' \| 'success' \| 'welcome' \| true` | the kind's | replaces the illustration; `false` shows no media; a scene id, or `true` for the kind's scene, draws an icon illustration from your Font Awesome sprites ([Illustrations](../guides/illustrations.md)) |
324
324
  | `icon` | `ReactNode` | the kind's | replaces the icon |
325
325
  | `title` / `description` | `ReactNode` | the kind's (translated) | replace the kind's text; see below |
326
326
  | `headingLevel` | `2`–`6` | — | the title becomes a heading of that level (`h2`…`h6`); without it, it is a plain `div`, as before |
@@ -355,7 +355,7 @@ import { ErrorState } from '@nxgt/material/components';
355
355
  | `kind` | `'generic' \| 'offline' \| 'maintenance'` | `'generic'` | illustration, title and description (`material.error-state.<kind>.*`) |
356
356
  | `size` | `'default' \| 'compact'` | `'default'` | compact swaps the illustration for an icon |
357
357
  | `title` / `description` | `ReactNode` | the kind's (translated) | replace the text; a custom `title` drops the default description |
358
- | `illustration` / `icon` | media | the built-in illustration | replace the media; `illustration={false}` hides it |
358
+ | `illustration` / `icon` | media | the built-in illustration | replace the media; `illustration={false}` hides it; a scene id or `true` draws an icon illustration ([Illustrations](../guides/illustrations.md)) |
359
359
  | `error` | `unknown` | none | the thrown value; its name, message and `cause` chain go in the details |
360
360
  | `showDetails` | `boolean` | `true` when `error` is set | `false` hides the details |
361
361
  | `details` | `ReactNode \| (details: ErrorDetail[]) => ReactNode` | the collapsed details | replaces them (Vue's `#details` slot); `details={null}` removes them; a function gets the described error (name, message, then each cause), or `[]` without an `error` or with `showDetails={false}` |
@@ -165,7 +165,7 @@ The Storybook page *Foundations / Animations* shows every class with controls.
165
165
 
166
166
  A radiogroup of tiles, one per theme. Each tile is a zone of its own theme, so its
167
167
  three swatches (primary, secondary, tertiary) and its mini background (the theme's
168
- tone and preset's texture, drawn by CSS) are that theme's colours in the page's
168
+ tone and preset's texture, drawn by CSS; a theme with an `icons` background adds its first four icons as sprite `<use>`s from your sprite base, and keeps the plain wash when they are not served) are that theme's colours in the page's
169
169
  mode. The light / dark / system control sits beneath. The arrow keys move the
170
170
  choice; the selected tile is tinted, with a start bar and its name in primary text.
171
171
 
@@ -191,7 +191,7 @@ locale; the capitalised name when there is none). The group is named by
191
191
  `material.theme-picker.label` and the mode control by `material.theme-picker.mode`; the mode control is `ThemeToggle`, whose Light, Dark and System names keep their own keys.
192
192
  It writes no inline style, so a strict CSP needs nothing. Its tiles are styled by
193
193
  an opt-in stylesheet, `@import "@nxgt/material/theme-picker.css";` after
194
- `styles.css` (about 3.3 KB gzipped, not part of `styles.css`, so an app without
194
+ `styles.css` (about 3.8 KB gzipped, not part of `styles.css`, so an app without
195
195
  the picker pays nothing); the app also imports each theme's stylesheet
196
196
  (`@nxgt/material/themes/<name>.css`), as for any theme.
197
197
 
@@ -742,7 +742,7 @@ import { Background, Card } from '@nxgt/material/components';
742
742
  It fills the viewport; pass a `className` such as `h-96 w-full` to use it as a band.
743
743
  It is plain CSS from `styles.css`, with no inline `style`, and its colours lift
744
744
  in dark. `ActivityLayout` and `ThreadLayout` sit on it. The superset with `grain`,
745
- `seed`, `fill`, `motif` and the other presets (light, geometry and motif families) is `Background` from `/backgrounds`; see the [backgrounds guide](../guides/backgrounds.md). Light presets there: `mesh`, `aurora`, `spotlight`, `bokeh`, `rays`, `halo`, `plasma`, `glass`, `ripples`, `blobs`, `paper`, `linen`, `concrete`, `marble`, `grain`; geometry: `isometric`, `blueprint`, `dots`, `stripes`, `low-poly`, `topography`, `waves`, `hexagons`, `circuit`, `graph-paper`, `checker`, `diagonal-checker`, `chevrons`; motifs: `shapes`, `confetti-grid`, `constellation`, `halftone`, `truchet`, `floating`, `scatter-icons`, `school`, `night-sky`, `bubbles`, `leaves`, `science`, `music`, `travel`, `sport`, `moon`.
745
+ `seed`, `fill`, `motif` and the other presets (light, geometry and motif families) is `Background` from `/backgrounds`; see the [backgrounds guide](../guides/backgrounds.md). Light presets there: `mesh`, `aurora`, `spotlight`, `bokeh`, `rays`, `halo`, `plasma`, `glass`, `ripples`, `blobs`, `paper`, `linen`, `concrete`, `marble`, `grain`; geometry: `isometric`, `blueprint`, `dots`, `stripes`, `low-poly`, `topography`, `waves`, `hexagons`, `circuit`, `graph-paper`, `checker`, `diagonal-checker`, `chevrons`; motifs: `shapes`, `confetti-grid`, `constellation`, `halftone`, `truchet`, `floating`, `scatter-icons`, `school`, `night-sky`, `bubbles`, `leaves`, `science`, `music`, `travel`, `sport`, `moon`; sky: `eclipse`, `meteor-shower`, `ringed-planet`, `northern-lights`, or the `sky` prop to lay the moon or one of them over any preset.
746
746
 
747
747
  **Storybook:** `Navigation & layout/Background` · **Vue:** `Background`
748
748
 
@@ -428,13 +428,26 @@ import { Icon } from '@nxgt/material/components';
428
428
  | --- | --- | --- | --- |
429
429
  | `name` | `IconName` | — (required) | the Font Awesome icon |
430
430
  | `type` | `IconStyle \| 'semibold'` | `'duotone'` | the sprite sheet: `solid`, `regular`, `light`, `thin`, … |
431
- | `family` | `IconFamily` | `'classic'` | a non-classic family reads `<family>-<type>.svg` |
431
+ | `family` | `IconFamily` | `'classic'` | a non-classic family reads `<family>-<type>.svg` (the duotone family in `solid` reads `duotone.svg`) |
432
432
  | `aria-label` | `string` | `"Icon <name>"` | the accessible name; pass `aria-hidden` for a decorative icon. Inside a named `IconButton`, `InputGroupButton` or `IconLinkButton` the default is dropped and the icon is `aria-hidden`, unless it has its own `aria-label` or `aria-labelledby` |
433
433
 
434
434
  The sprites are **not** shipped: serve them from
435
435
  `/assets/icons/sprites/<style>.svg` on your own origin. A missing sheet renders
436
436
  nothing, with no error — see [Icons in Getting started](../getting-started.md#icons).
437
437
 
438
+ Serve them from another root-relative path with `IconSpritesProvider`; every
439
+ `Icon` below it uses that base (a URL, `//host`, `..` or `:` throws an
440
+ `IconRefError`), and `useSpriteBase()` reads it:
441
+
442
+ ```tsx
443
+ import { Icon, IconSpritesProvider } from '@nxgt/material/components';
444
+
445
+ <IconSpritesProvider base="/static/icons/">
446
+ <Icon name="bell" type="solid" />
447
+ </IconSpritesProvider>;
448
+ // → /static/icons/solid.svg#bell
449
+ ```
450
+
438
451
  **Storybook:** `Primitives/Icon` · **Vue:** `Icon`
439
452
 
440
453
  ---
@@ -101,7 +101,7 @@ import { Icon } from '@nxgt/material/components';
101
101
 
102
102
  export function Atom() {
103
103
  return <Icon name="atom" type="duotone" />;
104
- // → <svg role="img" aria-label="Icon atom"><use xlink:href="/assets/icons/sprites/duotone.svg#atom"/></svg>
104
+ // → <svg role="img" aria-label="Icon atom"><use href="/assets/icons/sprites/duotone.svg#atom"/></svg>
105
105
  }
106
106
  ```
107
107
 
@@ -122,6 +122,11 @@ build cannot leak them into the tarball.
122
122
  A missing sheet renders an empty box: no error, no fallback. Open the sprite
123
123
  URL in the browser when an icon is blank.
124
124
 
125
+ Serve them from another root-relative path with `IconSpritesProvider`:
126
+ `<IconSpritesProvider base="/static/icons/">` around the app (or a part of it)
127
+ makes every `Icon` below it read `/static/icons/<style>.svg`. A URL, `//host`,
128
+ `..` or `:` throws an `IconRefError`. The same base serves the icon backgrounds, illustrations and theme tiles ([icon motifs](guides/icon-motifs.md)).
129
+
125
130
  Many components also use `lucide-react` icons internally; those are bundled
126
131
  and need nothing.
127
132
 
@@ -139,7 +144,7 @@ and need nothing.
139
144
  | `@nxgt/material/editor/viewer` | `RichTextViewer`: shows a saved document (HTML, JSON or Markdown) read-only. **Server-safe**: no editor instance, no `'use client'` ([RichTextViewer](components/rich-widgets.md#richtextviewer)) |
140
145
  | `@nxgt/material/editor/collab` | `collaboration()`: several people editing one `DocumentEditor` through a Yjs document and provider your app supplies. Needs `yjs` and `y-protocols` ([Collaboration](components/rich-widgets.md#collaboration)) |
141
146
  | `@nxgt/material/editor/pm` | The editor's own tiptap and ProseMirror classes (`Extension`, `Node`, `Plugin`, `PluginKey`, `TextSelection`, `ProseMirrorNode`, `Fragment`, `DecorationSet`, …) for a custom feature's extensions, so `instanceof` agrees with the editor. Shares the editor's code; **server-safe** ([A custom feature](components/rich-widgets.md#a-custom-feature)) |
142
- | `@nxgt/material/backgrounds` | Background presets: `Background` (a superset of the `/components` one: `preset` (45 ids, `AVAILABLE_BACKGROUND_PRESETS`), `tone`, `intensity`, `animated`, `grain`, `seed`, `fill` and `motif` (`shapes`, `density`, `size`, `rotate`, `shapeFill`, `opacitySpread`)), and the types and tables re-exported from `@nxgt/material-core/backgrounds`. **Its own entry**, with an opt-in stylesheet ([backgrounds](guides/backgrounds.md)) |
147
+ | `@nxgt/material/backgrounds` | Background presets: `Background` (a superset of the `/components` one: `preset` (50 ids, `AVAILABLE_BACKGROUND_PRESETS`), `tone`, `intensity`, `animated`, `grain`, `seed`, `fill`, `sky`, `motif` (`shapes`, `density`, `size`, `rotate`, `shapeFill`, `opacitySpread`) and, for `preset="icons"`, `icons`, `iconStyle` and `iconMotif`), and the types and tables re-exported from `@nxgt/material-core/backgrounds`. **Its own entry**, with an opt-in stylesheet ([backgrounds](guides/backgrounds.md)) |
143
148
  | `@nxgt/material/media-hls` | `hlsStreaming()`: the HLS adapter for `MediaPlayer`, `hls.js` loaded lazily ([streaming](guides/media-streaming.md)) |
144
149
  | `@nxgt/material/vite` | Build-time helper for consumers: `pdfkitStandardFonts()` ([printing](guides/printing.md#bundling-print-into-an-ssr-server)) |
145
150
  | `@nxgt/material/hooks` | `useTheme`, `useIsClient`, `useIsMobile`, `useLocalizedDate`, … ([helpers](guides/helpers.md#nxgtmaterialhooks)) |
@@ -521,7 +521,7 @@ to know the theme on the server (a cookie, passed to `defaultTheme`).
521
521
  ## Use a background preset behind the shell
522
522
 
523
523
  The shell draws the gradient with three blurred blobs behind its frame. To use
524
- one of the 45 presets of `@nxgt/material/backgrounds` instead, pass it as
524
+ one of the 50 presets of `@nxgt/material/backgrounds` instead, pass it as
525
525
  `backdrop`:
526
526
 
527
527
  ```tsx
@@ -45,18 +45,23 @@ import '@nxgt/material/backgrounds.css';
45
45
 
46
46
  | Prop | Values | Default |
47
47
  | --- | --- | --- |
48
- | `preset` | `gradient`, `grain`, `mesh`, `aurora`, `spotlight`, `bokeh`, `rays`, `halo`, `plasma`, `glass`, `ripples`, `blobs`, `paper`, `linen`, `concrete`, `marble`, `isometric`, `blueprint`, `dots`, `stripes`, `low-poly`, `topography`, `waves`, `hexagons`, `circuit`, `graph-paper`, `checker`, `diagonal-checker`, `chevrons`, `shapes`, `confetti-grid`, `constellation`, `halftone`, `truchet`, `floating`, `scatter-icons`, `school`, `night-sky`, `bubbles`, `leaves`, `science`, `music`, `travel`, `sport`, `moon` (`AVAILABLE_BACKGROUND_PRESETS`, the ids this library draws); any other id draws the gradient and warns outside production | `gradient` |
48
+ | `preset` | `gradient`, `grain`, `mesh`, `aurora`, `spotlight`, `bokeh`, `rays`, `halo`, `plasma`, `glass`, `ripples`, `blobs`, `paper`, `linen`, `concrete`, `marble`, `isometric`, `blueprint`, `dots`, `stripes`, `low-poly`, `topography`, `waves`, `hexagons`, `circuit`, `graph-paper`, `checker`, `diagonal-checker`, `chevrons`, `shapes`, `confetti-grid`, `constellation`, `halftone`, `truchet`, `floating`, `scatter-icons`, `school`, `night-sky`, `bubbles`, `leaves`, `science`, `music`, `travel`, `sport`, `moon`, `eclipse`, `meteor-shower`, `ringed-planet`, `northern-lights`, `icons` (`AVAILABLE_BACKGROUND_PRESETS`, the ids this library draws); any other id draws the gradient and warns outside production | `gradient` |
49
49
  | `tone`, `intensity` | as above | `primary`, `default` |
50
50
  | `animated` | `boolean`: drifts the layers, see Motion | `false` |
51
51
  | `grain` | `boolean`: film noise over the preset; needs `grain.css` | `false` |
52
52
  | `seed` | `number`: moves a seeded preset's geometry and the grain | `0` |
53
53
  | `motif` | a `MotifOptions` object (`shapes`, `density`, `size`, `rotate`, `shapeFill`, `opacitySpread`), see [Motif presets](#motif-presets) | all fields optional |
54
- | `moon` | a `MoonOptions` object for `preset="moon"`: `position` (`{ x, y }`, fractions of the container), `phase`, `halo`; see [Moon](#moon) | `{ position: { x: 0.8, y: 0.2 }, phase: 0.78, halo: 2.6 }` |
54
+ | `moon` | a `MoonOptions` object for `preset="moon"`, the celestial presets and a `sky`: `position` (`{ x, y }`, fractions of the container), `phase`, `halo`; see [Moon](#moon) | `{ position: { x: 0.8, y: 0.2 }, phase: 0.78, halo: 2.6 }` |
55
+ | `sky` | `'moon'`, `'eclipse'`, `'meteor-shower'`, `'ringed-planet'` or `'northern-lights'`: a second scene drawn over any preset, before the grain; see [Celestial presets and the sky overlay](#celestial-presets-and-the-sky-overlay) | none |
56
+ | `icons` | for `preset="icons"`: a pack name (`school`, `health`, `finance`, `travel`, `nature`, `tech`) or up to 48 icon names and `{ name, family?, type? }` references; see [Icons](#icons) | the `school` pack |
57
+ | `iconStyle` | for `preset="icons"`: one style (`{ family?, type? }` or a sprite name such as `'sharp-light'`) or a list of at most 8, one drawn per icon | duotone thin |
58
+ | `iconMotif` | for `preset="icons"`: `layout` (`scatter`, `grid`, `constellation`, `drift`), `sizeRange`, `rotation`, `duotone` (`opacity` or `tones`), `secondaryOpacity` (0.4 or, with `tones`, 0.85 unless set), `calm` | `{ layout: 'scatter', duotone: 'opacity', calm: true }` (`secondaryOpacity` unset: 0.4, or 0.85 with `tones`) |
55
59
  | `fill` | `viewport` (the viewport's size) or `container` (its parent's size: the parent needs a definite height) | `viewport` |
56
60
 
57
- `BACKGROUND_PRESETS` is the table of all 45 presets with their family and
58
- kind; `AVAILABLE_BACKGROUND_PRESETS` lists the ids this library draws (all
59
- 45; `SHIPPED_BACKGROUND_PRESETS` is the common floor every library draws).
61
+
62
+ `BACKGROUND_PRESETS` is the table of all 50 presets with their family and
63
+ kind; `AVAILABLE_BACKGROUND_PRESETS` lists the ids this library draws (all 50;
64
+ `SHIPPED_BACKGROUND_PRESETS` is the common floor every library draws).
60
65
 
61
66
  <img src="../previews/backgrounds-matrix.webp" width="640" alt="The presets, each in a card with its name">
62
67
 
@@ -271,6 +276,87 @@ follows `intensity` (`subtle` is a faint watermark, `vivid` the strongest; the s
271
276
  `scene.css`); one alone works. React only: `@nxgt/material-vue` does not draw it. The moon's `position`, `phase` and
272
277
  `halo` come from the `moon` prop (`<Background preset="moon" moon={{ position: { x: 0.2, y: 0.25 }, phase: 0.6 }} />`).
273
278
 
279
+ ## Celestial presets and the sky overlay
280
+
281
+ Four presets draw a sky of their own, each discreet like `moon`: thin outlines and soft halos in the tone's three
282
+ colours, a few stars and a clear middle for the content.
283
+
284
+ | Preset | Draws | `moon.phase` is | Default `moon.position` |
285
+ | --- | --- | --- | --- |
286
+ | `eclipse` | a dark moon covering a disc, a corona of fine rays and a ring | how much of the disc the moon covers | `0.8, 0.2` |
287
+ | `meteor-shower` | streaks falling down and to the left, among a few stars | the direction of the fall (0.2 steep, 0.9 shallow) | `0.7, 0.18` (the radiant) |
288
+ | `ringed-planet` | a planet with a ring that passes behind it, and a small moon | the ring's tilt | `0.78, 0.22` |
289
+ | `northern-lights` | three soft ribbons across the top | the ribbons' height | `0.5, 0.2` (only `y` applies) |
290
+
291
+ ```tsx
292
+ import '@nxgt/material/backgrounds/celestial.css'; // or backgrounds.css
293
+ import { Background } from '@nxgt/material/backgrounds';
294
+
295
+ <Background preset="ringed-planet" tone="mixed" moon={{ position: { x: 0.2, y: 0.25 }, phase: 0.6 }} />
296
+ ```
297
+
298
+ They read `motif.size` (the body at 0.7, 1 or 1.4 times) and `motif.density` (5, 9 or 15 stars; 4, 6 or 8 meteors),
299
+ and `seed` places the stars. The body is halved (the planet scaled to two thirds) in a container under 640 px
300
+ wide so it stays whole in its corner. In light the scene is multiplied into the page, a faint watermark; in dark
301
+ it adds light and the body is silver. `intensity` fades it (`subtle` is the calmest, and the right pick for
302
+ `northern-lights`, whose ribbons are the strongest of the four).
303
+
304
+ The builders live in `@nxgt/material-core/backgrounds/celestial`, a separate subpath, and `Background` loads it
305
+ on demand: the first paint (and the server's HTML) holds the layers, with the SVG filling in once the chunk has
306
+ loaded, so the scene never causes a hydration mismatch and an app that draws none never downloads it.
307
+
308
+ ### The `sky` prop
309
+
310
+ `sky` draws the moon or a celestial preset over *any* preset, after its layers and before the grain, with its
311
+ own ids (`<id>-sky-…`), so the two never clash. It reads the base's `motif` but not its `moon` options (those stay with the
312
+ preset): the sky's body sits at its own default place, mirrored to the other side when the preset's moon or
313
+ celestial body would land within a fifth of the width, and its stars follow `seed + 1`.
314
+
315
+ ```tsx
316
+ <Background preset="school" tone="mixed" sky="northern-lights" grain />
317
+ ```
318
+
319
+ A theme can name it too (`background: { preset: 'school', sky: 'meteor-shower' }`): a `sky` you pass wins over the
320
+ theme's. With `animated` the stars twinkle (8 s a leg), a meteor glides and fades (10 s) and a ribbon drifts
321
+ (14 s); nothing moves under `prefers-reduced-motion` or while the page is hidden. CSS: `backgrounds/celestial.css`
322
+ (it imports `scene.css`) styles all four presets and the overlay; React only, `@nxgt/material-vue` does not draw
323
+ them. The theme picker draws a small tile for a theme with a celestial preset.
324
+
325
+ ## Icons
326
+
327
+ `preset="icons"` scatters Font Awesome icons over a faint wash. The library ships **no icon artwork**: each icon is a
328
+ `<use>` of a sprite file your app serves (`/assets/icons/sprites/` by default; `IconSpritesProvider base="/static/icons/"`
329
+ moves it, as for `Icon`). Font Awesome Pro is licensed to you, not to this package. The [icon motifs guide](icon-motifs.md) puts icons, skies, illustrations and themes together.
330
+
331
+ ```tsx
332
+ import '@nxgt/material/backgrounds/icons.css'; // or backgrounds.css
333
+ import { Background } from '@nxgt/material/backgrounds';
334
+
335
+ <Background
336
+ preset="icons"
337
+ tone="mixed"
338
+ icons="health" // a pack, or ['rocket', 'star', { name: 'bolt', family: 'sharp', type: 'solid' }]
339
+ iconStyle={['duotone-thin', 'duotone-light']} // one style or up to 8; an icon's own family/type wins
340
+ iconMotif={{ layout: 'constellation', duotone: 'tones' }}
341
+ animated
342
+ />;
343
+ ```
344
+
345
+ - The icons come from a builder in its own chunk, loaded on demand (`@nxgt/material-core/backgrounds/icons`), so the
346
+ preset registry does not grow. A streaming server render has the icons in the first HTML; with `renderToString` the
347
+ scene layer is empty until the chunk has loaded, on the server and on the client alike (no hydration mismatch).
348
+ - Icons that cannot be drawn (an unknown pack, a name that is not an icon, more than 48, an unknown style) draw
349
+ `scatter-icons`, with a warning outside production.
350
+ - Colours: the primary layer takes the tone's colours; the second layer of a duotone icon is the same colour at
351
+ `secondaryOpacity` (no default of its own: 0.4 with `duotone: 'opacity'`, 0.85 with `'tones'`, where the second layer takes the next tone; a value you set, 0.4 included, is used in both). Flat styles (`solid`,
352
+ `regular`) take the tone through `currentColor`. A name missing from the sprite of the style drawn shows
353
+ nothing, so keep a list of styles to ones that share your names. The default style needs `duotone-thin.svg` at the
354
+ sprite base (see the sprite 404 entry in [troubleshooting](../troubleshooting.md)).
355
+ - `animated` drifts each icon a few pixels on `translate` (never under `prefers-reduced-motion`, paused while hidden).
356
+ - In an `ActivityLayout` the keep-inside pass hides an icon that would cross the layer's edge or the header band.
357
+ - A theme can name the preset with `background: { preset: 'icons', icons, iconStyle, iconMotif, sky }`; the props win. The theme picker draws the first four icons in the theme's tile ([themes](themes.md#icon-motifs-in-a-theme)).
358
+ - CSS: `backgrounds/icons.css` (or `backgrounds.css`). React only: `@nxgt/material-vue` does not draw it.
359
+
274
360
  ## Dark mode
275
361
 
276
362
  In dark the drawn colours are lifted to a lightness floor: the dark `--primary` is as dim as the light one, which made the
@@ -311,7 +397,7 @@ The gradient ends on `--nxgt-bg-cp`, not `--nxgt-bg-c2`: to recolour it, set
311
397
  ## Defaults from the theme
312
398
 
313
399
  The `Background` of `@nxgt/material/backgrounds` takes what you leave out
314
- (`preset`, `tone`, `intensity`, `seed`, `motif`, `grain`, `animated`) from the
400
+ (`preset`, `tone`, `intensity`, `seed`, `motif`, `moon`, `sky`, `grain`, `animated`) from the
315
401
  nearest theme (`NxgtThemeProvider` or an `NxgtTheme` zone, see
316
402
  [the provider and zones](./theming.md#the-provider-and-zones)), then from the
317
403
  defaults above. A prop you pass always wins; the others still come from the theme.
@@ -371,6 +457,7 @@ else is opt-in, because CSS cannot be tree-shaken. `animated` on the
371
457
  /* or just the one you use: */
372
458
  @import "@nxgt/material/backgrounds/aurora.css"; /* a preset file, named after the preset (aurora.css, low-poly.css, hexagons.css, scatter-icons.css…) */
373
459
  @import "@nxgt/material/backgrounds/grain.css"; /* the grain overlay, over any preset */
460
+ @import "@nxgt/material/backgrounds/celestial.css"; /* eclipse, meteor-shower, ringed-planet, northern-lights, and the `sky` overlay */
374
461
  @import "@nxgt/material/backgrounds/halftone.css"; /* a motif preset (brings motifs.css) */
375
462
  @import "@nxgt/material/backgrounds/floating.css"; /* brings motifs.css and drift.css */
376
463
  ```
@@ -0,0 +1,198 @@
1
+ # Icon motifs, celestial skies and illustrations
2
+
3
+ Since 3.9 the backgrounds, the state illustrations and the themes can draw
4
+ **Font Awesome icons** and a **sky**. This page ties the pieces together; each
5
+ has its own reference ([backgrounds](backgrounds.md), [illustrations](illustrations.md),
6
+ [themes](themes.md)). All of it is React only: `@nxgt/material-vue` does not
7
+ draw it yet.
8
+
9
+ ## Serve your own sprites first
10
+
11
+ **This package ships no icon artwork.** Every icon is a `<use>` of a sprite
12
+ sheet your app serves from its own origin. Font Awesome Pro is licensed to you,
13
+ not to this library, so it cannot be redistributed inside it: the tarball
14
+ excludes the sheets and a repository check fails if one slips in. Font Awesome
15
+ Free works the same way.
16
+
17
+ | You have | Serve | Use |
18
+ | --- | --- | --- |
19
+ | the Pro 7.3 pack | one sheet per style you draw, in `public/assets/icons/sprites/`: `duotone-thin.svg` (the default look), `duotone.svg`, `solid.svg`, `sharp-solid.svg`… A non-classic family is `<family>-<style>.svg` | the defaults |
20
+ | Font Awesome Free | `solid.svg`, `regular.svg` and `brands.svg` from `@fortawesome/fontawesome-free/sprites/`, copied to the same folder | `iconStyle="solid"` (and `iconStyle="solid"` on an `Illustration`) |
21
+
22
+ The Free icons are CC BY 4.0: credit Font Awesome where you show them (the
23
+ previews below are drawn with the Free `solid` sheet, Font Awesome Free 7.3.1,
24
+ [CC BY 4.0](https://fontawesome.com/license/free)).
25
+
26
+ Serve the sheets from another root-relative path with `IconSpritesProvider`, once,
27
+ at the root. `Icon`, `Background`, `Illustration` and the theme picker all read it:
28
+
29
+ ```tsx
30
+ import { IconSpritesProvider } from '@nxgt/material/components';
31
+
32
+ <IconSpritesProvider base="/static/icons/">
33
+ <App />
34
+ </IconSpritesProvider>
35
+ ```
36
+
37
+ A URL, `//host`, `..` or `:` in `base` throws an `IconRefError` (code `base`):
38
+ sprites load from your own origin only, so a strict CSP needs nothing more than
39
+ `img-src 'self'`. A sheet that is not served draws nothing, with no error: open
40
+ the sprite URL in the browser when icons are blank (see
41
+ [troubleshooting](../troubleshooting.md#a-background-an-illustration-or-a-theme-tile-draws-no-icons)).
42
+
43
+ Names are not the same in every style or family. A name a sheet does not hold
44
+ is blank, and some of the suggested names exist in Pro only (see
45
+ [Free fallbacks](#free-fallbacks-for-pro-only-names)).
46
+
47
+ ## Icons over a background
48
+
49
+ ```tsx
50
+ import '@nxgt/material/backgrounds/icons.css'; // or backgrounds.css
51
+ import { Background } from '@nxgt/material/backgrounds';
52
+
53
+ <Background
54
+ preset="icons"
55
+ tone="mixed"
56
+ icons="health" // a pack, or up to 48 names and { name, family?, type? }
57
+ iconStyle={['duotone-thin', 'duotone-light']} // one style, or a list of up to 8
58
+ iconMotif={{ layout: 'constellation', duotone: 'opacity' }}
59
+ />;
60
+ ```
61
+
62
+ <img src="../previews/backgrounds-icons.webp" width="480" alt="The school pack of icons scattered over a faint wash, around a card">
63
+
64
+ - **`icons`**: a pack name (`school`, `health`, `finance`, `travel`, `nature`,
65
+ `tech`: lists of names, drawn in any style) or your own names and
66
+ `{ name, family?, type? }` references. No `icons` draws the `school` pack.
67
+ - **`iconStyle`**: one style (`'duotone-thin'`, `{ family: 'sharp', type: 'solid' }`)
68
+ or a list of up to 8. Each icon takes one style from the list by the seeded
69
+ pick, so a seed always draws the same picture. An icon's own `family` / `type`
70
+ always wins. Keep a list to styles that share your names.
71
+ - **`iconMotif`**: `layout` (`scatter`, `grid`, `constellation`, `drift`),
72
+ `sizeRange`, `rotation`, `duotone` (`'opacity'`: the second layer is the same
73
+ tone at 0.4; `'tones'`: the next tone) and `secondaryOpacity`.
74
+ - `animated` drifts each icon a little; nothing moves under
75
+ `prefers-reduced-motion`. Icons that cannot be drawn (an unknown pack or style,
76
+ a bad name, more than 48) draw `scatter-icons`, with a console warning outside
77
+ production.
78
+
79
+ The builder is a separate chunk, loaded when the preset is used, so an app with
80
+ no icon background never downloads it.
81
+
82
+ ## A sky
83
+
84
+ Four presets draw a discreet sky (`eclipse`, `meteor-shower`, `ringed-planet`,
85
+ `northern-lights`), and `sky` lays the moon or one of them over **any** preset:
86
+
87
+ ```tsx
88
+ import '@nxgt/material/backgrounds/celestial.css'; // or backgrounds.css
89
+
90
+ <Background preset="ringed-planet" tone="mixed" />
91
+ <Background preset="icons" icons="travel" sky="northern-lights" grain />
92
+ ```
93
+
94
+ <img src="../previews/backgrounds-celestial.webp" width="480" alt="The four celestial presets: an eclipse, a meteor shower, a ringed planet and northern lights">
95
+
96
+ The `sky` keeps clear of the base's own moon or planet (it moves to the other
97
+ side), and sits before the grain. The sky over the school icons:
98
+
99
+ <img src="../previews/backgrounds-sky-overlay.webp" width="480" alt="The four skies laid over the school icons">
100
+
101
+ The presets and `sky` are pure SVG: they need no sprite. Details in
102
+ [backgrounds](backgrounds.md#celestial-presets-and-the-sky-overlay).
103
+
104
+ ## Illustrations for states
105
+
106
+ ```tsx
107
+ import { Illustration, IllustrationDefaults } from '@nxgt/material/illustrations';
108
+ import { HEALTH_SCENES } from '@nxgt/material/illustrations/health';
109
+ import { EDUCATION_SCENES } from '@nxgt/material/illustrations/education';
110
+ import { EmptyState } from '@nxgt/material/components';
111
+
112
+ <IconSpritesProvider base="/static/icons/">
113
+ <IllustrationDefaults icons="suggested" sets={[HEALTH_SCENES, EDUCATION_SCENES]}>
114
+ <Illustration scene="empty" size="lg" title="An empty inbox" />
115
+ <EmptyState illustration="no-patients" title="No patients yet" />
116
+ <EmptyState illustration="no-students" title="No students yet" />
117
+ </IllustrationDefaults>
118
+ </IconSpritesProvider>
119
+ ```
120
+
121
+ An `Illustration` draws a hero icon on a Material 3 Expressive plate, with two
122
+ to four satellites. There are twelve base scenes (`empty`, `no-results`,
123
+ `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`,
124
+ `maintenance`, `invitation`, `sign-in`, `empty-inbox`) and two domain sets of
125
+ ten, **health** and **education**, each its own subpath so an app that does not
126
+ import one does not carry it:
127
+
128
+ <img src="../previews/feedback-status-illustration.webp" width="480" alt="The twelve base illustration scenes">
129
+
130
+ <img src="../previews/feedback-status-illustration-health.webp" width="480" alt="The ten health scenes">
131
+
132
+ <img src="../previews/feedback-status-illustration-education.webp" width="480" alt="The ten education scenes">
133
+
134
+ - `IllustrationDefaults` is opt-in: without it (and without a `hero`) an
135
+ `EmptyState` or `ErrorState` draws the same built-in art as before. An
136
+ `illustration` prop wins over it, `illustration={false}` hides the media, and
137
+ an `icon` keeps its well.
138
+ - Change the icons of a scene with `hero` and `satellites`, the look with
139
+ `iconStyle`, `tone` and `duotone`. Give the picture a `title` to make it an image
140
+ for assistive technology; without one it is decorative.
141
+ - A scene id that no registered set holds draws the built-in art and warns once
142
+ outside production (register the set, or pass `scenes={HEALTH_SCENES}` to the
143
+ one `Illustration`).
144
+
145
+ Full props in [illustrations](illustrations.md).
146
+
147
+ ## A theme that names its motif
148
+
149
+ A theme carries the whole look, so the app needs no prop on its backgrounds:
150
+
151
+ ```ts
152
+ // src/themes/sante.ts
153
+ import { defineTheme, menthe } from '@nxgt/material/themes';
154
+
155
+ export default defineTheme({
156
+ name: 'sante',
157
+ label: 'Santé',
158
+ extends: menthe,
159
+ background: {
160
+ preset: 'icons',
161
+ tone: 'mixed',
162
+ icons: 'health',
163
+ iconStyle: ['duotone-thin', 'duotone-light'],
164
+ iconMotif: { layout: 'constellation' },
165
+ sky: 'meteor-shower', // optional
166
+ },
167
+ });
168
+ ```
169
+
170
+ `defineTheme` checks the pack, the names, the styles and the motif when the
171
+ theme is defined. `ThemePicker` draws the theme's first four icons in its tile;
172
+ a sheet that is not served draws nothing and the tile keeps its wash.
173
+
174
+ <img src="../previews/foundations-themes-icon-motifs.webp" width="480" alt="Three themes in the theme picker, each tile showing its own icons, and a background below each">
175
+
176
+ See [themes](themes.md#icon-motifs-in-a-theme).
177
+
178
+ ## Free fallbacks for Pro-only names
179
+
180
+ Most suggested names exist in Font Awesome Free. These do not, and stand in
181
+ with a Free neighbour when you serve the Free sheets (pass `hero`, `satellites`
182
+ or `icons` with the Free name):
183
+
184
+ | Where | Pro-only name | A Free neighbour |
185
+ | --- | --- | --- |
186
+ | `school` pack | `backpack` | `bag-shopping` |
187
+ | `nature` pack | `flower` | `seedling` |
188
+ | base scenes | `sparkles`, `wifi-slash`, `cloud-slash`, `party-horn`, `hand-wave`, `lock-keyhole`, `traffic-cone` | `star`, `wifi`, `cloud`, `gift`, `hand`, `lock`, `triangle-exclamation` |
189
+ | health scenes | `folder-user`, `clipboard-medical`, `calendar-clock`, `siren-on` | `folder`, `clipboard`, `calendar-check`, `triangle-exclamation` |
190
+ | education scenes | `backpack`, `clipboard-list-check`, `books`, `file-chart-column` | `bag-shopping`, `clipboard-check`, `book`, `file-lines` |
191
+
192
+ ## Where to go next
193
+
194
+ - [Backgrounds](backgrounds.md): every preset and prop, with the sizes.
195
+ - [Illustrations](illustrations.md): the scenes, the sets and the states.
196
+ - [Themes](themes.md#icon-motifs-in-a-theme): naming a motif in a theme.
197
+ - [Troubleshooting](../troubleshooting.md): blank icons, the `scatter-icons`
198
+ warning, an unknown scene.