@nxgt/material 3.20.0 → 3.22.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 (82) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +6 -4
  3. package/bin/nxgt-backdrop-sprite.js +15 -0
  4. package/dist/background-BtSZsTvY.js +286 -0
  5. package/dist/backgrounds/css-react/icons-quiet.css +5 -5
  6. package/dist/backgrounds/css-react/icons-tint.css +98 -0
  7. package/dist/backgrounds/css-react/icons.css +100 -33
  8. package/dist/backgrounds.js +1 -1
  9. package/dist/{celestial-scene-DaOsRFF3.js → celestial-scene-8Muu6f7O.js} +1 -1
  10. package/dist/components/background-shared.css +5 -0
  11. package/dist/components/components.css +4 -7
  12. package/dist/components/ui/display/chip/chip-parts.css +17 -30
  13. package/dist/components/ui/fields/attributes/attributes.css +3 -0
  14. package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +1 -1
  15. package/dist/components/ui/layout/auth-card/auth-card-backdrop.css +30 -0
  16. package/dist/{components-SJxc3fpp.js → components-B0oezhGe.js} +13966 -13937
  17. package/dist/components.js +16 -16
  18. package/dist/editor.js +1 -1
  19. package/dist/{empty-state-CJh9f2pc.js → empty-state-lj7vjYWG.js} +1 -1
  20. package/dist/icon-sprites-CaYXzOL4.js +46 -0
  21. package/dist/icons-scene-M4HBeN2c.js +54 -0
  22. package/dist/{illustration-BmQmvW_4.js → illustration-B4_W-OUS.js} +2 -2
  23. package/dist/illustrations.js +1 -1
  24. package/dist/lib/backgrounds/background/partials/icons-check.d.ts +2 -2
  25. package/dist/lib/backgrounds/background/partials/icons-keys.d.ts +21 -1
  26. package/dist/lib/backgrounds/background/partials/icons-scene.d.ts +15 -6
  27. package/dist/lib/backgrounds/background/partials/use-icons-scene.d.ts +13 -8
  28. package/dist/lib/backgrounds/background/types.d.ts +26 -12
  29. package/dist/lib/backgrounds/index.d.ts +1 -1
  30. package/dist/lib/components/ui/dates/date-field/use-typed-date.d.ts +2 -2
  31. package/dist/lib/components/ui/dates/picker-trigger/typed-day.d.ts +7 -2
  32. package/dist/lib/components/ui/display/chip/partials/chip-dismiss-button.d.ts +1 -1
  33. package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +7 -2
  34. package/dist/lib/components/ui/layout/app-shell/shapes-clear-content.d.ts +10 -3
  35. package/dist/lib/components/ui/layout/app-shell/theme-backdrop.d.ts +3 -1
  36. package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +3 -3
  37. package/dist/lib/components/ui/layout/app-shell/watch-content.d.ts +28 -8
  38. package/dist/lib/components/ui/layout/auth-card/auth-card-backdrop.d.ts +23 -0
  39. package/dist/lib/components/ui/layout/auth-card/auth-card.d.ts +15 -1
  40. package/dist/lib/components/ui/primitives/icon/icon-sprites.d.ts +40 -1
  41. package/dist/lib/themes/define-theme.d.ts +8 -0
  42. package/dist/lib/themes/index.d.ts +2 -1
  43. package/dist/lib/vite/index.d.ts +1 -1
  44. package/dist/main.js +28 -28
  45. package/dist/material.css +1 -1
  46. package/dist/pdf-reader.js +1 -1
  47. package/dist/{public-DWuBn4t_.js → public-DAF5SCWH.js} +1 -1
  48. package/dist/{scene-options-CCy3V7XS.js → scene-options-2zNF3ZkQ.js} +4 -2
  49. package/dist/theme-picker.js +3 -3
  50. package/dist/themes.js +9 -4
  51. package/dist/{use-chat-composer-BBFuKNqC.js → use-chat-composer-B0ze1cU9.js} +3 -3
  52. package/docs/components/data-display.md +1 -1
  53. package/docs/components/date-and-time.md +8 -4
  54. package/docs/components/navigation-and-layout.md +22 -0
  55. package/docs/components/primitives.md +21 -0
  56. package/docs/guides/app-shell.md +9 -8
  57. package/docs/guides/backgrounds.md +214 -16
  58. package/docs/guides/icon-motifs.md +30 -12
  59. package/docs/guides/themes.md +25 -4
  60. package/docs/guides/theming.md +7 -0
  61. package/docs/guides/vite-plugin.md +26 -0
  62. package/docs/previews/backgrounds-background-from-theme.webp +0 -0
  63. package/docs/previews/backgrounds-icons.webp +0 -0
  64. package/docs/previews/backgrounds-matrix.webp +0 -0
  65. package/docs/previews/date-time-datefield.webp +0 -0
  66. package/docs/previews/date-time-daterangefield.webp +0 -0
  67. package/docs/previews/foundations-themes-icon-motifs.webp +0 -0
  68. package/docs/roadmap.md +6 -0
  69. package/docs/troubleshooting.md +80 -4
  70. package/lib/backgrounds/css-react/icons-quiet.css +5 -5
  71. package/lib/backgrounds/css-react/icons-tint.css +98 -0
  72. package/lib/backgrounds/css-react/icons.css +100 -33
  73. package/lib/components/background-shared.css +5 -0
  74. package/lib/components/components.css +4 -7
  75. package/lib/components/ui/display/chip/chip-parts.css +17 -30
  76. package/lib/components/ui/fields/attributes/attributes.css +3 -0
  77. package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +1 -1
  78. package/lib/components/ui/layout/auth-card/auth-card-backdrop.css +30 -0
  79. package/package.json +8 -3
  80. package/dist/background-Ce7M5V42.js +0 -250
  81. package/dist/icon-sprites-FxHyqyhg.js +0 -30
  82. package/dist/icons-scene-BpIauJ5d.js +0 -27
@@ -4,7 +4,10 @@
4
4
  * its constellation threads and its motion. A scene holds no `style`: an icon
5
5
  * carries a tone class (`k1..k3`, colours in scene.css) and the root carries
6
6
  * `ic-so0..ic-so10` and `ic-so85` (a duotone icon's second layer, in tenths, or 0.85) and, for
7
- * `duotone: 'tones'`, `ic-tones`.
7
+ * `duotone: 'tones'`, `ic-tones`. The rules are keyed on `icons` and `shapes`
8
+ * (the `shapes` preset with `motif.icons` draws the same icons). The
9
+ * tint (`ic-c-one`, `ic-c-palette`) is icons-tint.css; `ic-c-classic` is the
10
+ * tones below at full strength.
8
11
  *
9
12
  * The sprites read `--fa-primary-color`, `--fa-secondary-color` and
10
13
  * `--fa-secondary-opacity`; custom properties inherit into the `<use>` copy.
@@ -17,6 +20,7 @@
17
20
  @import "../css/motifs.css";
18
21
 
19
22
  @import "./icons-quiet.css";
23
+ @import "./icons-tint.css";
20
24
 
21
25
  @layer components {
22
26
  [data-background="icons"] > [data-layer="wash"] {
@@ -35,95 +39,158 @@
35
39
  );
36
40
  }
37
41
 
38
- [data-background="icons"] > [data-scene] {
42
+ :is([data-background="icons"], [data-background="shapes"]) > [data-scene] {
39
43
  overflow: hidden;
40
44
  }
41
45
 
42
46
  /* Primary layer: the icon's tone. Second layer: the same tone, faded. */
43
- [data-background="icons"] > [data-scene] .ic.k1 {
47
+ :is([data-background="icons"], [data-background="shapes"])
48
+ > [data-scene]
49
+ .ic.k1 {
44
50
  --fa-primary-color: var(--nxgt-bg-c1);
45
51
  --fa-secondary-color: var(--nxgt-bg-c1);
46
52
  }
47
- [data-background="icons"] > [data-scene] .ic.k2 {
53
+ :is([data-background="icons"], [data-background="shapes"])
54
+ > [data-scene]
55
+ .ic.k2 {
48
56
  --fa-primary-color: var(--nxgt-bg-c2);
49
57
  --fa-secondary-color: var(--nxgt-bg-c2);
50
58
  }
51
- [data-background="icons"] > [data-scene] .ic.k3 {
59
+ :is([data-background="icons"], [data-background="shapes"])
60
+ > [data-scene]
61
+ .ic.k3 {
52
62
  --fa-primary-color: var(--nxgt-bg-c3);
53
63
  --fa-secondary-color: var(--nxgt-bg-c3);
54
64
  }
55
65
 
56
66
  /* Two tones: the second layer takes the next tone. */
57
- [data-background="icons"] > [data-scene] > .ic-tones .ic.k1 {
67
+ :is([data-background="icons"], [data-background="shapes"])
68
+ > [data-scene]
69
+ > .ic-tones
70
+ .ic.k1 {
58
71
  --fa-secondary-color: var(--nxgt-bg-c2);
59
72
  }
60
- [data-background="icons"] > [data-scene] > .ic-tones .ic.k2 {
73
+ :is([data-background="icons"], [data-background="shapes"])
74
+ > [data-scene]
75
+ > .ic-tones
76
+ .ic.k2 {
61
77
  --fa-secondary-color: var(--nxgt-bg-c3);
62
78
  }
63
- [data-background="icons"] > [data-scene] > .ic-tones .ic.k3 {
79
+ :is([data-background="icons"], [data-background="shapes"])
80
+ > [data-scene]
81
+ > .ic-tones
82
+ .ic.k3 {
64
83
  --fa-secondary-color: var(--nxgt-bg-c1);
65
84
  }
66
85
 
67
86
  /* The second layer's opacity, in tenths (`secondaryOpacity`). */
68
- [data-background="icons"] > [data-scene] > .ic-so0 .ic {
87
+ :is([data-background="icons"], [data-background="shapes"])
88
+ > [data-scene]
89
+ > .ic-so0
90
+ .ic {
69
91
  --fa-secondary-opacity: 0;
70
92
  }
71
- [data-background="icons"] > [data-scene] > .ic-so1 .ic {
93
+ :is([data-background="icons"], [data-background="shapes"])
94
+ > [data-scene]
95
+ > .ic-so1
96
+ .ic {
72
97
  --fa-secondary-opacity: 0.1;
73
98
  }
74
- [data-background="icons"] > [data-scene] > .ic-so2 .ic {
99
+ :is([data-background="icons"], [data-background="shapes"])
100
+ > [data-scene]
101
+ > .ic-so2
102
+ .ic {
75
103
  --fa-secondary-opacity: 0.2;
76
104
  }
77
- [data-background="icons"] > [data-scene] > .ic-so3 .ic {
105
+ :is([data-background="icons"], [data-background="shapes"])
106
+ > [data-scene]
107
+ > .ic-so3
108
+ .ic {
78
109
  --fa-secondary-opacity: 0.3;
79
110
  }
80
- [data-background="icons"] > [data-scene] > .ic-so4 .ic {
111
+ :is([data-background="icons"], [data-background="shapes"])
112
+ > [data-scene]
113
+ > .ic-so4
114
+ .ic {
81
115
  --fa-secondary-opacity: 0.4;
82
116
  }
83
- [data-background="icons"] > [data-scene] > .ic-so5 .ic {
117
+ :is([data-background="icons"], [data-background="shapes"])
118
+ > [data-scene]
119
+ > .ic-so5
120
+ .ic {
84
121
  --fa-secondary-opacity: 0.5;
85
122
  }
86
- [data-background="icons"] > [data-scene] > .ic-so6 .ic {
123
+ :is([data-background="icons"], [data-background="shapes"])
124
+ > [data-scene]
125
+ > .ic-so6
126
+ .ic {
87
127
  --fa-secondary-opacity: 0.6;
88
128
  }
89
- [data-background="icons"] > [data-scene] > .ic-so7 .ic {
129
+ :is([data-background="icons"], [data-background="shapes"])
130
+ > [data-scene]
131
+ > .ic-so7
132
+ .ic {
90
133
  --fa-secondary-opacity: 0.7;
91
134
  }
92
- [data-background="icons"] > [data-scene] > .ic-so8 .ic {
135
+ :is([data-background="icons"], [data-background="shapes"])
136
+ > [data-scene]
137
+ > .ic-so8
138
+ .ic {
93
139
  --fa-secondary-opacity: 0.8;
94
140
  }
95
- [data-background="icons"] > [data-scene] > .ic-so9 .ic {
141
+ :is([data-background="icons"], [data-background="shapes"])
142
+ > [data-scene]
143
+ > .ic-so9
144
+ .ic {
96
145
  --fa-secondary-opacity: 0.9;
97
146
  }
98
- [data-background="icons"] > [data-scene] > .ic-so10 .ic {
147
+ :is([data-background="icons"], [data-background="shapes"])
148
+ > [data-scene]
149
+ > .ic-so10
150
+ .ic {
99
151
  --fa-secondary-opacity: 1;
100
152
  }
101
153
  /* 0.85: the default of two tones, or a `secondaryOpacity` of 0.85. */
102
- [data-background="icons"] > [data-scene] > .ic-so85 .ic {
154
+ :is([data-background="icons"], [data-background="shapes"])
155
+ > [data-scene]
156
+ > .ic-so85
157
+ .ic {
103
158
  --fa-secondary-opacity: 0.85;
104
159
  }
105
160
 
106
161
  /* The constellation's threads and dots. */
107
- [data-background="icons"] > [data-scene] .ic-ln {
162
+ :is([data-background="icons"], [data-background="shapes"])
163
+ > [data-scene]
164
+ .ic-ln {
108
165
  stroke: var(--nxgt-bg-c1);
109
166
  stroke-width: 0.7;
110
167
  stroke-linecap: round;
111
168
  opacity: 0.4;
112
169
  }
113
- [data-background="icons"] > [data-scene] .ic-dt {
170
+ :is([data-background="icons"], [data-background="shapes"])
171
+ > [data-scene]
172
+ .ic-dt {
114
173
  fill: var(--nxgt-bg-c1);
115
174
  opacity: 0.5;
116
175
  }
117
- [data-background="icons"] > [data-scene] .ic-ln.k2 {
176
+ :is([data-background="icons"], [data-background="shapes"])
177
+ > [data-scene]
178
+ .ic-ln.k2 {
118
179
  stroke: var(--nxgt-bg-c2);
119
180
  }
120
- [data-background="icons"] > [data-scene] .ic-ln.k3 {
181
+ :is([data-background="icons"], [data-background="shapes"])
182
+ > [data-scene]
183
+ .ic-ln.k3 {
121
184
  stroke: var(--nxgt-bg-c3);
122
185
  }
123
- [data-background="icons"] > [data-scene] .ic-dt.k2 {
186
+ :is([data-background="icons"], [data-background="shapes"])
187
+ > [data-scene]
188
+ .ic-dt.k2 {
124
189
  fill: var(--nxgt-bg-c2);
125
190
  }
126
- [data-background="icons"] > [data-scene] .ic-dt.k3 {
191
+ :is([data-background="icons"], [data-background="shapes"])
192
+ > [data-scene]
193
+ .ic-dt.k3 {
127
194
  fill: var(--nxgt-bg-c3);
128
195
  }
129
196
  }
@@ -151,26 +218,26 @@
151
218
  }
152
219
 
153
220
  @layer components {
154
- [data-background="icons"][data-animated] > [data-scene] .ia {
221
+ [data-background][data-animated] > [data-scene] .ia {
155
222
  animation: nxgt-bg-ic-1 18s ease-in-out infinite alternate
156
223
  var(--nxgt-bg-play, running);
157
224
  }
158
- [data-background="icons"][data-animated] > [data-scene] .iv2 {
225
+ [data-background][data-animated] > [data-scene] .iv2 {
159
226
  animation-name: nxgt-bg-ic-2;
160
227
  }
161
- [data-background="icons"][data-animated] > [data-scene] .iv3 {
228
+ [data-background][data-animated] > [data-scene] .iv3 {
162
229
  animation-name: nxgt-bg-ic-3;
163
230
  }
164
- [data-background="icons"][data-animated] > [data-scene] .iv4 {
231
+ [data-background][data-animated] > [data-scene] .iv4 {
165
232
  animation-name: nxgt-bg-ic-4;
166
233
  }
167
- [data-background="icons"][data-animated] > [data-scene] .id2 {
234
+ [data-background][data-animated] > [data-scene] .id2 {
168
235
  animation-delay: -4s;
169
236
  }
170
- [data-background="icons"][data-animated] > [data-scene] .id3 {
237
+ [data-background][data-animated] > [data-scene] .id3 {
171
238
  animation-delay: -9s;
172
239
  }
173
- [data-background="icons"][data-animated] > [data-scene] .id4 {
240
+ [data-background][data-animated] > [data-scene] .id4 {
174
241
  animation-delay: -13s;
175
242
  }
176
243
  }
@@ -0,0 +1,5 @@
1
+ /* What the Background in `/components` always needs: the base, the gradient
2
+ * preset and the motion rules. Imported once by components/components.css. */
3
+ @import "../backgrounds/css/base.css";
4
+ @import "../backgrounds/css/gradient.css";
5
+ @import "../backgrounds/css/motion.css";
@@ -56,6 +56,7 @@
56
56
  @import "./ui/layout/app-shell/route-transition.css";
57
57
  @import "./ui/layout/app-shell/activity-backdrop.css";
58
58
  @import "./ui/layout/app-shell/activity-backdrop-shapes.css";
59
+ @import "./ui/layout/auth-card/auth-card-backdrop.css";
59
60
  /* DataTable cards and tiles: the item shell (hairline, tint, start bar, columns by the list's width). */
60
61
  @import "./ui/collections/data-table/data-table-items.css";
61
62
  @import "./ui/collections/data-table/data-table-items-compact.css";
@@ -192,12 +193,8 @@
192
193
  /* Gallery: the View Transition from a tile to its lightbox. */
193
194
  @import "./ui/media/galleries/gallery-transitions.css";
194
195
  @import "./print-only.css";
195
- @import "./ui/fields/attributes/attribute-form/attribute-form.css";
196
- @import "./ui/fields/attributes/attribute-values-form/attribute-values-form.css";
197
- /* Background (from /components): the gradient preset's CSS, plain and shared
198
- * (lib/backgrounds/css). The other presets are opt-in: backgrounds.css. */
199
- @import "../backgrounds/css/base.css";
200
- @import "../backgrounds/css/gradient.css";
201
- @import "../backgrounds/css/motion.css";
196
+ @import "./ui/fields/attributes/attributes.css";
197
+ /* Background: the gradient preset's CSS, shared (lib/backgrounds/css); the other presets are opt-in: backgrounds.css. */
198
+ @import "./background-shared.css";
202
199
  @import "./ui/widgets/drawing/drawing.css"; /* @nxgt/material/draw: role colours, focus ring */
203
200
  @import "./ui/widgets/drawing/drawing-animate.css";
@@ -1,5 +1,5 @@
1
1
  /* Chip: focus, the dismiss button (drawn
2
- * small, a 24x24 target through ::after, its own ring), disabled, the dashed
2
+ * small in a 24x24 box, 44x44 on a coarse pointer, its own ring), disabled, the dashed
3
3
  * "add" chip and the tones. */
4
4
  @layer components {
5
5
  /* Focus: the chip's ring (2px primary-text, 2px away); the ✕ its own. */
@@ -8,54 +8,41 @@
8
8
  outline-color: var(--primary-text);
9
9
  outline-width: 2px;
10
10
  }
11
+ /* The ✕ is drawn small (--chip-x), but its own box is the target (#1584):
12
+ * axe's `target-size` reads the bounding box, never a pseudo-element. The
13
+ * box is 24x24 (44x44 on a coarse pointer, #1067, #1102); the padding with
14
+ * `background-clip: content-box` keeps the hover disc and the focus ring at
15
+ * the drawn size, and the negative margin takes the extra back, so the chip
16
+ * and the glyph are unchanged. */
11
17
  .nxgt-chip > [data-slot="chip-dismiss"] {
18
+ --chip-hit: 24px;
19
+ --chip-pad: calc((var(--chip-hit) - var(--chip-x)) / 2);
12
20
  position: relative;
13
21
  display: inline-grid;
14
22
  place-items: center;
15
23
  flex: none;
16
- width: var(--chip-x);
17
- height: var(--chip-x);
18
- padding: 0;
24
+ box-sizing: border-box;
25
+ width: var(--chip-hit);
26
+ height: var(--chip-hit);
27
+ margin: calc(-1 * var(--chip-pad));
28
+ padding: var(--chip-pad);
19
29
  border: 0;
20
30
  border-radius: 9999px;
21
31
  background: transparent;
32
+ background-clip: content-box;
22
33
  color: color-mix(in oklab, var(--foreground) 62%, transparent);
23
34
  cursor: pointer;
24
35
  /* Width 0 at rest: forced colours would paint a transparent outline. */
25
36
  outline: 0 solid transparent;
26
- outline-offset: 1px;
37
+ outline-offset: calc(1px - var(--chip-pad));
27
38
  transition:
28
39
  background-color 120ms ease-out,
29
40
  color 120ms ease-out,
30
41
  outline-color 120ms ease-out;
31
42
  }
32
- .nxgt-chip > [data-slot="chip-dismiss"]::after {
33
- content: "";
34
- position: absolute;
35
- inset: calc((var(--chip-x) - 24px) / 2);
36
- border-radius: 9999px;
37
- }
38
- /* Touch (#1067, #1102): on a coarse pointer the ✕ is a real 44x44 box,
39
- * not a pseudo-element, which a tap-target check and axe do not measure.
40
- * The negative margin takes the extra back, so the chip is unchanged, and
41
- * the padding with `background-clip: content-box` keeps the hover disc
42
- * and the focus ring at the drawn size (the outline is pulled in by the
43
- * padding). */
44
43
  @media (pointer: coarse) {
45
44
  .nxgt-chip > [data-slot="chip-dismiss"] {
46
- --chip-pad: calc((44px - var(--chip-x)) / 2);
47
- box-sizing: border-box;
48
- width: 44px;
49
- height: 44px;
50
- margin: calc(-1 * var(--chip-pad));
51
- padding: var(--chip-pad);
52
- background-clip: content-box;
53
- outline-offset: calc(1px - var(--chip-pad));
54
- }
55
- /* The box is the target now: the 24px pseudo-element would reach
56
- * past it. */
57
- .nxgt-chip > [data-slot="chip-dismiss"]::after {
58
- inset: 0;
45
+ --chip-hit: 44px;
59
46
  }
60
47
  }
61
48
  .nxgt-chip > [data-slot="chip-dismiss"] > svg {
@@ -0,0 +1,3 @@
1
+ /* The attribute forms' styles, imported once by components/components.css. */
2
+ @import "./attribute-form/attribute-form.css";
3
+ @import "./attribute-values-form/attribute-values-form.css";
@@ -18,7 +18,7 @@
18
18
  visibility: hidden;
19
19
  }
20
20
 
21
- /* A shape over the page's text or controls fades out and comes back once
21
+ /* A shape over the page's text, controls or surfaces (cards, tables, lists) fades out and comes back once
22
22
  * clear (watch-content.ts): it is hidden, never moved. A compound body (the
23
23
  * moon, the planet, the eclipse: `.pt.mg`) is hidden whole, with its halo
24
24
  * (`.pt.mh`). The scene stays invisible until the first check, so nothing
@@ -0,0 +1,30 @@
1
+ /* An AuthCard's backdrop (auth-card-backdrop.tsx) keeps its shapes the way
2
+ * ActivityLayout's does (activity-backdrop-shapes.css): whole inside its layer
3
+ * and clear of the card and the brand row. Plain CSS in `@layer components`. */
4
+ @layer components {
5
+ [data-slot="auth-card-backdrop"] > [data-background] {
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+ /* The scene stays hidden until the first pass; a shape that crosses the
10
+ * layer's edge is hidden, never cut. */
11
+ [data-slot="auth-card-backdrop"] [data-background]:not([data-checked]) .mo,
12
+ [data-slot="auth-card-backdrop"] [data-background] .mo > [data-outside] {
13
+ visibility: hidden;
14
+ }
15
+ /* A shape over the card or the brand row fades out (watch-content.ts). */
16
+ [data-slot="auth-card-backdrop"] [data-background] .mo > *,
17
+ [data-slot="auth-card-backdrop"] [data-background] .pt {
18
+ transition: opacity 150ms ease;
19
+ }
20
+ [data-slot="auth-card-backdrop"] [data-background] .mo > [data-hidden],
21
+ [data-slot="auth-card-backdrop"] [data-background] .pt[data-hidden] {
22
+ opacity: 0 !important;
23
+ }
24
+ @media (prefers-reduced-motion: reduce) {
25
+ [data-slot="auth-card-backdrop"] [data-background] .mo > *,
26
+ [data-slot="auth-card-backdrop"] [data-background] .pt {
27
+ transition: none;
28
+ }
29
+ }
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.20.0",
3
+ "version": "3.22.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"
@@ -12,7 +12,8 @@
12
12
  },
13
13
  "type": "module",
14
14
  "bin": {
15
- "nxgt-theme": "./bin/nxgt-theme.js"
15
+ "nxgt-theme": "./bin/nxgt-theme.js",
16
+ "nxgt-backdrop-sprite": "./bin/nxgt-backdrop-sprite.js"
16
17
  },
17
18
  "files": [
18
19
  "bin",
@@ -324,6 +325,10 @@
324
325
  "style": "./lib/backgrounds/css-react/icons-quiet.css",
325
326
  "default": "./lib/backgrounds/css-react/icons-quiet.css"
326
327
  },
328
+ "./backgrounds/icons-tint.css": {
329
+ "style": "./lib/backgrounds/css-react/icons-tint.css",
330
+ "default": "./lib/backgrounds/css-react/icons-tint.css"
331
+ },
327
332
  "./backgrounds/illustrated.css": {
328
333
  "style": "./lib/backgrounds/css-react/illustrated.css",
329
334
  "default": "./lib/backgrounds/css-react/illustrated.css"
@@ -357,7 +362,7 @@
357
362
  "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"
358
363
  },
359
364
  "dependencies": {
360
- "@nxgt/material-core": "^0.33.0",
365
+ "@nxgt/material-core": "^0.34.0",
361
366
  "@base-ui/react": "^1.6.0",
362
367
  "@dnd-kit/core": "^6.3.1",
363
368
  "@dnd-kit/sortable": "^10.0.0",
@@ -1,250 +0,0 @@
1
- import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
- import { t } from "./is-production-GLw59WU8.js";
3
- import { n, r } from "./icon-sprites-FxHyqyhg.js";
4
- import { a as i, t as a } from "./theme-context-Cofk6vgs.js";
5
- import { t as o } from "./compose-refs-DZ0iIVF-.js";
6
- import { t as s } from "./use-background-activity-KxQgelFF.js";
7
- import { t as c } from "./scene-svg-DJKa5vsg.js";
8
- import { n as l, r as u, t as d } from "./scene-options-CCy3V7XS.js";
9
- import { Suspense as f, lazy as p, memo as m, useId as ee, useMemo as h, useRef as g } from "react";
10
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
11
- import { IconRefError as b, resolveIconStyles as x, resolveIcons as S } from "@nxgt/material-core/icons";
12
- import { SCENE_LAYER as C, buildBackgroundScene as w, presetLayers as T, resolveBackgroundPreset as E, svgIdPrefix as D } from "@nxgt/material-core/backgrounds";
13
- //#region lib/backgrounds/background/available.ts
14
- var O = [
15
- "gradient",
16
- "grain",
17
- "mesh",
18
- "aurora",
19
- "spotlight",
20
- "bokeh",
21
- "rays",
22
- "halo",
23
- "plasma",
24
- "glass",
25
- "ripples",
26
- "blobs",
27
- "paper",
28
- "linen",
29
- "concrete",
30
- "marble"
31
- ], k = [
32
- "isometric",
33
- "blueprint",
34
- "dots",
35
- "stripes",
36
- "low-poly",
37
- "topography",
38
- "waves",
39
- "hexagons",
40
- "circuit",
41
- "graph-paper",
42
- "checker",
43
- "diagonal-checker",
44
- "chevrons"
45
- ], A = [
46
- "shapes",
47
- "confetti-grid",
48
- "constellation",
49
- "halftone",
50
- "truchet",
51
- "floating",
52
- "scatter-icons",
53
- "school",
54
- "night-sky",
55
- "bubbles",
56
- "leaves",
57
- "science",
58
- "music",
59
- "travel",
60
- "sport",
61
- "moon",
62
- "icons"
63
- ], j = [
64
- "eclipse",
65
- "meteor-shower",
66
- "ringed-planet",
67
- "northern-lights"
68
- ], M = (e) => j.includes(e), N = [
69
- ...O,
70
- ...k,
71
- ...A,
72
- ...j
73
- ], P = p(() => import("./icons-scene-BpIauJ5d.js"));
74
- function F(e) {
75
- return /* @__PURE__ */ v("div", {
76
- "data-scene": "",
77
- "aria-hidden": "true",
78
- children: /* @__PURE__ */ v(f, {
79
- fallback: null,
80
- children: /* @__PURE__ */ v(P, { ...e })
81
- })
82
- });
83
- }
84
- //#endregion
85
- //#region lib/backgrounds/background/partials/background-layers.tsx
86
- var I = p(() => import("./celestial-scene-DaOsRFF3.js")), L = m(function({ preset: e, scene: t, grain: n, sky: r, icons: i, ...a }) {
87
- return /* @__PURE__ */ y(_, { children: [
88
- T(e).map((n) => n === C ? i ? /* @__PURE__ */ v(F, { ...i }, n) : M(e) ? /* @__PURE__ */ v("div", {
89
- "data-scene": "",
90
- "data-celestial": "",
91
- "aria-hidden": "true",
92
- children: /* @__PURE__ */ v(f, {
93
- fallback: null,
94
- children: /* @__PURE__ */ v(I, {
95
- name: e,
96
- as: "preset",
97
- ...a
98
- })
99
- })
100
- }, n) : t && /* @__PURE__ */ v("div", {
101
- "data-scene": "",
102
- "aria-hidden": "true",
103
- children: /* @__PURE__ */ v(c, { node: t })
104
- }, n) : /* @__PURE__ */ v("div", {
105
- "data-layer": n,
106
- "aria-hidden": "true"
107
- }, n)),
108
- r && /* @__PURE__ */ v("div", {
109
- "data-layer": "sky-scene",
110
- "data-scene": "",
111
- "data-celestial": "",
112
- "aria-hidden": "true",
113
- children: /* @__PURE__ */ v(f, {
114
- fallback: null,
115
- children: /* @__PURE__ */ v(I, {
116
- name: r,
117
- as: "sky",
118
- base: e,
119
- ...a
120
- })
121
- })
122
- }),
123
- n && /* @__PURE__ */ v("div", {
124
- "data-overlay": "grain",
125
- "aria-hidden": "true",
126
- children: /* @__PURE__ */ v(c, { node: n })
127
- })
128
- ] });
129
- });
130
- //#endregion
131
- //#region lib/backgrounds/background/partials/icons-check.ts
132
- function R(e, t) {
133
- try {
134
- return e !== void 0 && S(e), x(t), null;
135
- } catch (e) {
136
- if (e instanceof b) return e.message;
137
- throw e;
138
- }
139
- }
140
- //#endregion
141
- //#region lib/backgrounds/background/partials/icons-keys.ts
142
- var z = Object.keys({
143
- layout: 1,
144
- sizeRange: 1,
145
- rotation: 1,
146
- duotone: 1,
147
- secondaryOpacity: 1,
148
- calm: 1,
149
- quiet: 1
150
- });
151
- function B(e) {
152
- return JSON.stringify(Object.fromEntries(z.flatMap((t) => e?.[t] === void 0 ? [] : [[t, e[t]]])));
153
- }
154
- //#endregion
155
- //#region lib/backgrounds/background/partials/use-icons-scene.ts
156
- function V(e, { icons: i, iconStyle: a, iconMotif: o, seed: s, animated: c }) {
157
- let l = r(), u = n(), d = JSON.stringify(i ?? null), f = JSON.stringify(a ?? null), p = B(o), m = h(() => {
158
- if (e !== "icons") return null;
159
- let n = R(JSON.parse(d) ?? void 0, JSON.parse(f) ?? void 0);
160
- return n && !t() && console.warn(`Background: icons cannot be drawn (${n}); drawing "scatter-icons" instead.`), n;
161
- }, [
162
- e,
163
- d,
164
- f
165
- ]) ? "scatter-icons" : e;
166
- return {
167
- preset: m,
168
- iconsScene: h(() => m === "icons" ? {
169
- seed: s,
170
- iconsKey: d,
171
- styleKey: f,
172
- motifKey: p,
173
- spriteBase: l,
174
- edition: u,
175
- animated: c
176
- } : void 0, [
177
- m,
178
- s,
179
- d,
180
- f,
181
- p,
182
- l,
183
- u,
184
- c
185
- ])
186
- };
187
- }
188
- //#endregion
189
- //#region lib/backgrounds/background/background.tsx
190
- var H = /* @__PURE__ */ e({ Background: () => K }), U = (e) => console.warn(e);
191
- function W(e, t, n, r, i, a) {
192
- return e === "grain" ? null : w(e, u(t, n, r, i, a));
193
- }
194
- function G(e, t) {
195
- return w("grain", {
196
- idPrefix: `${e}-grain`,
197
- seed: t
198
- });
199
- }
200
- function K({ children: e, ref: n, preset: r, tone: c, intensity: u, animated: f, grain: p, seed: m, motif: _, moon: b, sky: x, icons: S, iconStyle: C, iconMotif: w, fill: T = "viewport", ...O }) {
201
- let k = i()?.background || a, A = r ?? k.preset, j = c ?? k.tone ?? a.tone, M = u ?? k.intensity ?? a.intensity, P = f ?? k.animated ?? !1, F = p ?? k.grain ?? !1, I = m ?? k.seed ?? 0, R = _ ?? k.motif, z = b ?? k.moon, B = x ?? k.sky, H = g(null), K = h(() => o(H, n), [n]), q = s(H, P), J = D(ee()), { preset: Y, iconsScene: te } = V(E(A, N, t() ? void 0 : U), {
202
- icons: S ?? k.icons,
203
- iconStyle: C ?? k.iconStyle,
204
- iconMotif: w ?? k.iconMotif,
205
- seed: I,
206
- animated: P
207
- }), X = F || Y === "grain", Z = R?.shapes ? [...new Set(R.shapes)].sort().join(",") : void 0, Q = JSON.stringify(l(R)), $ = JSON.stringify(d(z)), ne = h(() => W(Y, J, I, Z, Q, $), [
208
- Y,
209
- J,
210
- I,
211
- Z,
212
- Q,
213
- $
214
- ]), re = h(() => X ? G(J, I) : null, [
215
- X,
216
- J,
217
- I
218
- ]);
219
- return /* @__PURE__ */ y("div", {
220
- "data-slot": "background",
221
- ...O,
222
- ref: K,
223
- "data-background": Y === "grain" ? "gradient" : Y,
224
- "data-preset": Y,
225
- "data-tone": j,
226
- "data-intensity": M,
227
- "data-fill": T === "container" ? T : void 0,
228
- "data-animated": P ? "" : void 0,
229
- "data-grain": X ? "" : void 0,
230
- "data-sky": B,
231
- "data-paused": P && q ? "" : void 0,
232
- children: [/* @__PURE__ */ v(L, {
233
- preset: Y,
234
- scene: ne,
235
- grain: re,
236
- sky: B,
237
- idPrefix: J,
238
- seed: I,
239
- shapesKey: Z,
240
- scalarsKey: Q,
241
- moonKey: $,
242
- icons: te
243
- }), /* @__PURE__ */ v("div", {
244
- "data-slot": "background-content",
245
- children: e
246
- })]
247
- });
248
- }
249
- //#endregion
250
- export { H as n, N as r, K as t };