@nxgt/material 3.12.0 → 3.13.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 (100) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +24 -15
  3. package/dist/{async-slice-4qbER86I.js → async-slice-ChtlTP8W.js} +2 -2
  4. package/dist/{background-cEqcZQ3v.js → background-Ce7M5V42.js} +2 -1
  5. package/dist/backgrounds/css-react/icons-quiet.css +43 -0
  6. package/dist/backgrounds/css-react/icons.css +2 -0
  7. package/dist/backgrounds.js +1 -1
  8. package/dist/{button-BNjw-pnE.js → button-BrgyWw7T.js} +1 -1
  9. package/dist/charts.js +3 -3
  10. package/dist/{chip-DLgQTJBZ.js → chip-BZu-bvAJ.js} +1 -1
  11. package/dist/{code-editor-BZbaYLvo.js → code-editor-DjY7_8TH.js} +4 -4
  12. package/dist/code-editor.js +4 -4
  13. package/dist/{code-language-items-BT5BO5w6.js → code-language-items-D1lpNQ6J.js} +2 -2
  14. package/dist/components/components.css +2 -0
  15. package/dist/components/ui/display/avatar/avatar.css +17 -0
  16. package/dist/components/ui/feedback/alert/alert.css +16 -0
  17. package/dist/{components-yx1t_5_P.js → components-BQWoJgYR.js} +15131 -14980
  18. package/dist/components.js +26 -26
  19. package/dist/{dialog-BQp5IdFl.js → dialog-rOMjlKJ7.js} +1 -1
  20. package/dist/dnd.js +1 -1
  21. package/dist/draw-animate.js +1 -1
  22. package/dist/draw.js +1 -1
  23. package/dist/{drawing-B8VuG7nx.js → drawing-iP1SDjdL.js} +60 -54
  24. package/dist/{dropdown-menu-BsH9W_3C.js → dropdown-menu-BEyP-A0J.js} +1 -1
  25. package/dist/editor.js +527 -527
  26. package/dist/{empty-state-WaU4-T2c.js → empty-state-ZtqqpX0S.js} +1 -1
  27. package/dist/hooks.js +2 -2
  28. package/dist/{i18n-provider-C6HhBw34.js → i18n-provider-GV4Ukoe2.js} +1 -1
  29. package/dist/i18n.js +5 -5
  30. package/dist/{icon-badge-DUAq9f7H.js → icon-badge-_tY1MwU9.js} +1 -1
  31. package/dist/lib/backgrounds/background/types.d.ts +2 -1
  32. package/dist/lib/backgrounds/index.d.ts +1 -1
  33. package/dist/lib/components/ui/collections/data-table/numeric-class.d.ts +2 -0
  34. package/dist/lib/components/ui/collections/data-table/table-meta.d.ts +8 -3
  35. package/dist/lib/components/ui/display/entity-header/entity-header.d.ts +8 -2
  36. package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +1 -1
  37. package/dist/lib/components/ui/display/entity-header/partials/entity-header-body.d.ts +2 -1
  38. package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +43 -8
  39. package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +4 -1
  40. package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +3 -0
  41. package/dist/lib/components/ui/display/list-tile/partials/list-tile-toggle.d.ts +20 -0
  42. package/dist/lib/components/ui/display/stat-card/index.d.ts +2 -0
  43. package/dist/lib/components/ui/display/stat-card/stat-card-group.d.ts +12 -0
  44. package/dist/lib/components/ui/feedback/alert/alert-tone-icon.d.ts +9 -0
  45. package/dist/lib/components/ui/feedback/alert/alert.d.ts +4 -0
  46. package/dist/lib/components/ui/fields/form-section/form-section-heading-classes.d.ts +4 -0
  47. package/dist/lib/components/ui/fields/form-section/form-section.d.ts +9 -1
  48. package/dist/lib/components/ui/layout/list-details-layout/list-details-layout.d.ts +12 -2
  49. package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-back.d.ts +16 -0
  50. package/dist/lib/components/ui/layout/list-details-layout/partials/list-details-details.d.ts +11 -3
  51. package/dist/lib/components/ui/layout/list-details-layout/partials/pane-opener.d.ts +15 -0
  52. package/dist/lib/components/ui/layout/list-details-layout/partials/use-container-narrow.d.ts +7 -0
  53. package/dist/lib/components/ui/layout/list-details-layout/partials/use-pane-focus.d.ts +13 -0
  54. package/dist/lib/components/ui/widgets/drawing/drawing-types.d.ts +6 -0
  55. package/dist/lib/components/ui/widgets/drawing/partials/drawing-root.d.ts +5 -1
  56. package/dist/lib/draw-animate/morph-drawing.d.ts +2 -8
  57. package/dist/lib/i18n/resources/en/en.d.ts +3 -0
  58. package/dist/lib/i18n/resources/en/material.json.d.ts +3 -0
  59. package/dist/lib/i18n/resources/fr/fr.d.ts +3 -0
  60. package/dist/lib/i18n/resources/fr/material.json.d.ts +3 -0
  61. package/dist/lib/i18n/resources/resources.d.ts +6 -0
  62. package/dist/lib/i18n/translator.d.ts +1 -1
  63. package/dist/lib/print/components/print-document/print-document.d.ts +12 -2
  64. package/dist/lib/print/index.d.ts +2 -1
  65. package/dist/lib.js +1 -1
  66. package/dist/main.js +43 -43
  67. package/dist/map.js +4 -4
  68. package/dist/material.css +1 -1
  69. package/dist/pdf-reader.js +1 -1
  70. package/dist/print.js +101 -98
  71. package/dist/{public-B0Nq_yYV.js → public-D_Gz7wgr.js} +6 -6
  72. package/dist/{rich-code-block-v7WmeZp9.js → rich-code-block-RN-EpeTA.js} +4 -4
  73. package/dist/{sortable-provider-CgDTolQR.js → sortable-provider-Iej7IS4n.js} +1 -1
  74. package/dist/{spinner-BtSIYVrC.js → spinner-BwWDXIbg.js} +1 -1
  75. package/dist/{stored-language-BeIKw3-K.js → stored-language-BAAP7qS3.js} +4 -2
  76. package/dist/theme-picker.js +2 -2
  77. package/dist/{theme-toggle-B2Pehdhn.js → theme-toggle-8zHeXSD1.js} +1 -1
  78. package/dist/{toolbar-items-rUHdVqAq.js → toolbar-items-CVQBYp4K.js} +2 -2
  79. package/dist/{translate-material-Bd_KgfB8.js → translate-material-C0aOnHpZ.js} +2 -2
  80. package/dist/{translator-Dje8HrNz.js → translator-BU07gNva.js} +1 -1
  81. package/dist/{use-chat-composer-B0_STpQN.js → use-chat-composer-P4GxmCHa.js} +14 -14
  82. package/dist/{use-heading-spy-DXo6IOX9.js → use-heading-spy-DETdqnB6.js} +1 -1
  83. package/dist/{use-material-translation-B3V_bz-5.js → use-material-translation-DGeVp-qP.js} +2 -2
  84. package/docs/components/data-display.md +60 -8
  85. package/docs/components/data-table-filter-and-lists.md +1 -1
  86. package/docs/components/feedback-and-status.md +22 -4
  87. package/docs/components/form-fields.md +14 -3
  88. package/docs/components/navigation-and-layout.md +8 -3
  89. package/docs/guides/backgrounds.md +35 -2
  90. package/docs/guides/drawing.md +15 -0
  91. package/docs/guides/printing.md +113 -2
  92. package/docs/previews/feedback-status-alert.webp +0 -0
  93. package/docs/roadmap.md +5 -3
  94. package/docs/troubleshooting.md +45 -0
  95. package/lib/backgrounds/css-react/icons-quiet.css +43 -0
  96. package/lib/backgrounds/css-react/icons.css +2 -0
  97. package/lib/components/components.css +2 -0
  98. package/lib/components/ui/display/avatar/avatar.css +17 -0
  99. package/lib/components/ui/feedback/alert/alert.css +16 -0
  100. package/package.json +6 -2
@@ -0,0 +1,43 @@
1
+ /* `iconMotif.quiet` of the `icons` preset (React only). */
2
+ @layer components {
3
+ /* `quiet`: the icons fade out over a band, so text can sit on the motif. The
4
+ * band is `--background-quiet` wide (42%), then the icons fade back in over
5
+ * 30%. `start` and `end` follow the reading direction. A mask, not a colour:
6
+ * the text underneath keeps the wash's own contrast. */
7
+ [data-background="icons"] > [data-scene] > :is(.ic-q-start, .ic-q-end) {
8
+ --nxgt-quiet-to: to right;
9
+ -webkit-mask-image: linear-gradient(
10
+ var(--nxgt-quiet-to),
11
+ transparent var(--background-quiet, 42%),
12
+ #000 calc(var(--background-quiet, 42%) + 30%)
13
+ );
14
+ mask-image: linear-gradient(
15
+ var(--nxgt-quiet-to),
16
+ transparent var(--background-quiet, 42%),
17
+ #000 calc(var(--background-quiet, 42%) + 30%)
18
+ );
19
+ }
20
+ [data-background="icons"] > [data-scene] > .ic-q-end,
21
+ [data-background="icons"] > [data-scene]:dir(rtl) > .ic-q-start {
22
+ --nxgt-quiet-to: to left;
23
+ }
24
+ [data-background="icons"] > [data-scene]:dir(rtl) > .ic-q-end {
25
+ --nxgt-quiet-to: to right;
26
+ }
27
+ [data-background="icons"] > [data-scene] > .ic-q-center {
28
+ -webkit-mask-image: linear-gradient(
29
+ to right,
30
+ #000 calc(50% - var(--background-quiet, 42%) / 2 - 30%),
31
+ transparent calc(50% - var(--background-quiet, 42%) / 2),
32
+ transparent calc(50% + var(--background-quiet, 42%) / 2),
33
+ #000 calc(50% + var(--background-quiet, 42%) / 2 + 30%)
34
+ );
35
+ mask-image: linear-gradient(
36
+ to right,
37
+ #000 calc(50% - var(--background-quiet, 42%) / 2 - 30%),
38
+ transparent calc(50% - var(--background-quiet, 42%) / 2),
39
+ transparent calc(50% + var(--background-quiet, 42%) / 2),
40
+ #000 calc(50% + var(--background-quiet, 42%) / 2 + 30%)
41
+ );
42
+ }
43
+ }
@@ -16,6 +16,8 @@
16
16
  * its place. React only: nothing in the shared `css/` folder. */
17
17
  @import "../css/motifs.css";
18
18
 
19
+ @import "./icons-quiet.css";
20
+
19
21
  @layer components {
20
22
  [data-background="icons"] > [data-layer="wash"] {
21
23
  position: absolute;
@@ -135,6 +135,8 @@
135
135
  @import "./ui/display/period-cards/period-cards.css";
136
136
  @import "./ui/layout/sidebar/sidebar-tokens.css";
137
137
  @import "./ui/display/avatar/avatar.css";
138
+ /* Alert and Banner span the row in the form grids (#1497). */
139
+ @import "./ui/feedback/alert/alert.css";
138
140
  @import "./ui/display/stat-card/stat-card.css";
139
141
  /* The native charts (@nxgt/material/charts): held series colours, grid, marks;
140
142
  * then the frame, legend keys, tooltip (float and phone bottom card), table. */
@@ -10,3 +10,20 @@
10
10
  --nxgt-tone-ring-share-own: var(--avatar-ring-share);
11
11
  }
12
12
  }
13
+
14
+ /* The initials scale with the avatar (#1492): the avatar is a size container,
15
+ * and its fallback text is 40 % of the diameter (`cqw`), never under 10 px, so
16
+ * two letters keep clear of the edge at 32 px and the text grows with a
17
+ * larger avatar. The share is `--avatar-text-share` (a unitless percentage,
18
+ * 40 by default). The rule reads the avatar's own size, so it only applies to
19
+ * a fallback inside an `avatar` (a bare `AvatarFallback` keeps inheriting).
20
+ * Colours are the tone's, unchanged: the text stays AA on its container. */
21
+ @layer components {
22
+ [data-slot="avatar"] {
23
+ container-type: inline-size;
24
+ }
25
+ [data-slot="avatar"] [data-slot="avatar-fallback"] {
26
+ font-size: max(0.625rem, calc(var(--avatar-text-share, 40) * 1cqw));
27
+ line-height: 1;
28
+ }
29
+ }
@@ -0,0 +1,16 @@
1
+ /* An Alert or a Banner placed in a form's grid takes the whole row (#1497),
2
+ * like a FormSection: no `col-span-full w-full` from the app. Direct children
3
+ * of the form grid's `[data-slot="form-fields"]` (inside `.form-grid-layout`)
4
+ * or of a FormSection's `[data-slot="form-section-fields"]`, so an alert deeper
5
+ * in a field is untouched. In the components layer: a utility class of the
6
+ * app on the alert (`col-span-1`, `w-fit`) still wins. */
7
+ @layer components {
8
+ :is(
9
+ .form-grid-layout [data-slot="form-fields"],
10
+ [data-slot="form-section-fields"]
11
+ )
12
+ > :is([data-slot="alert"], [data-slot="banner"]) {
13
+ grid-column: 1 / -1;
14
+ width: 100%;
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.12.0",
3
+ "version": "3.13.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -320,6 +320,10 @@
320
320
  "style": "./lib/backgrounds/css-react/icons.css",
321
321
  "default": "./lib/backgrounds/css-react/icons.css"
322
322
  },
323
+ "./backgrounds/icons-quiet.css": {
324
+ "style": "./lib/backgrounds/css-react/icons-quiet.css",
325
+ "default": "./lib/backgrounds/css-react/icons-quiet.css"
326
+ },
323
327
  "./backgrounds/illustrated.css": {
324
328
  "style": "./lib/backgrounds/css-react/illustrated.css",
325
329
  "default": "./lib/backgrounds/css-react/illustrated.css"
@@ -353,7 +357,7 @@
353
357
  "docs:previews": "rm -rf node_modules/.cache/nxgt-preview-free/missing && NXGT_PREVIEW_FREE=1 vitest run --project previews && bun .storybook/preview-free-report.ts"
354
358
  },
355
359
  "dependencies": {
356
- "@nxgt/material-core": "^0.29.1",
360
+ "@nxgt/material-core": "^0.30.0",
357
361
  "@base-ui/react": "^1.6.0",
358
362
  "@dnd-kit/core": "^6.3.1",
359
363
  "@dnd-kit/sortable": "^10.0.0",