@nxgt/material 3.84.0 → 3.85.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 (29) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/{background-Q4Ek3rNy.js → background-DHjdFbNo.js} +86 -86
  3. package/dist/backgrounds.js +1 -1
  4. package/dist/{components-JPnObL9i.js → components-cgUDvVTe.js} +13728 -13652
  5. package/dist/components.js +1 -1
  6. package/dist/lib/components/ui/display/event-chip/event-chip-content.d.ts +12 -3
  7. package/dist/lib/components/ui/display/event-chip/event-chip.d.ts +5 -1
  8. package/dist/lib/components/ui/display/event-chip/index.d.ts +1 -1
  9. package/dist/lib/components/ui/widgets/event-calendar/index.d.ts +1 -1
  10. package/dist/lib/components/ui/widgets/event-calendar/types.d.ts +9 -0
  11. package/dist/main.js +1 -1
  12. package/dist/material.css +1 -1
  13. package/docs/components/data-display.md +2 -1
  14. package/docs/components/rich-widgets.md +31 -0
  15. package/docs/previews/backgrounds-background-from-theme.webp +0 -0
  16. package/docs/previews/backgrounds-celestial.webp +0 -0
  17. package/docs/previews/backgrounds-geometry-more.webp +0 -0
  18. package/docs/previews/backgrounds-geometry.webp +0 -0
  19. package/docs/previews/backgrounds-icons.webp +0 -0
  20. package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
  21. package/docs/previews/backgrounds-light-more.webp +0 -0
  22. package/docs/previews/backgrounds-light.webp +0 -0
  23. package/docs/previews/backgrounds-material-more.webp +0 -0
  24. package/docs/previews/backgrounds-matrix.webp +0 -0
  25. package/docs/previews/backgrounds-moon.webp +0 -0
  26. package/docs/previews/backgrounds-motif-shapes.webp +0 -0
  27. package/docs/previews/backgrounds-motifs.webp +0 -0
  28. package/docs/previews/backgrounds-sky-overlay.webp +0 -0
  29. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.85.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2527](https://github.com/softistx/nxgt-material/pull/2527) [`469c796`](https://github.com/softistx/nxgt-material/commit/469c7962642f93bb9b599cbdb735561cc3f6ddab) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `EventCalendar`: `CalendarEvent` takes an optional `badge: { label, tone? }` (type `CalendarEventBadge`), a small tinted label drawn after the event's title in the day, week, workweek, month and agenda views and in the preview popover, so an app can mark an event (a category, a follow-up) without a prefix in its title or a `renderEvent`. The label is part of the event's accessible name (the chip's text and the event `group`'s name, `Visit, Pregnancy`). It is truncation-safe: it ellipsises inside its chip, and in a box too short or narrow for it (under 20px tall, or under 4.5rem wide) it is hidden visually and still read. `EventChip` takes the same `badge` prop. Additive; nothing to migrate.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#2530](https://github.com/softistx/nxgt-material/pull/2530) [`ebf2ca9`](https://github.com/softistx/nxgt-material/commit/ebf2ca99fba240d5211b1d5b45245548c0a977e5) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `EventCalendar`: the event preview popover is now placed next to the clicked event in every view, template mode included. Its anchor never received its ref, so Radix left the popover at `translate(0, -200%)`, off screen, and its Edit and Delete buttons could not be clicked. Nothing to migrate: an app that set `eventPreview={false}` as a workaround can turn it back on.
12
+
13
+ ## 3.84.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#2523](https://github.com/softistx/nxgt-material/pull/2523) [`ba31843`](https://github.com/softistx/nxgt-material/commit/ba31843912fe8e6e03f51ee0bccf51f5c421f2ec) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `Background` renders no `data-slot="background-content"` layer when it has no children. A backdrop-only `Background` (self-closing, absolute next to `relative` siblings) no longer covers them with an empty `z-index: 5` layer that swallowed their clicks.
18
+
3
19
  ## 3.84.0
4
20
 
5
21
  ### Minor Changes
@@ -6,12 +6,12 @@ import { t as c } from "./compose-refs-G4J4kaUA.js";
6
6
  import { t as l } from "./use-background-activity-KxQgelFF.js";
7
7
  import { t as u } from "./scene-svg-DJKa5vsg.js";
8
8
  import { n as d, r as f, t as p } from "./scene-options-2zNF3ZkQ.js";
9
- import { Suspense as m, lazy as h, memo as g, useId as _, useMemo as v, useRef as y } from "react";
10
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
11
- import { IconRefError as C, resolveIconStyles as w, resolveIcons as T } from "@nxgt/material-core/icons";
12
- import { SCENE_LAYER as E, buildBackgroundScene as D, presetLayers as O, resolveBackgroundPreset as k, svgIdPrefix as A } from "@nxgt/material-core/backgrounds";
9
+ import { Children as m, Suspense as h, lazy as g, memo as _, useId as v, useMemo as y, useRef as b } from "react";
10
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
11
+ import { IconRefError as w, resolveIconStyles as T, resolveIcons as E } from "@nxgt/material-core/icons";
12
+ import { SCENE_LAYER as D, buildBackgroundScene as O, presetLayers as k, resolveBackgroundPreset as A, svgIdPrefix as j } from "@nxgt/material-core/backgrounds";
13
13
  //#region lib/backgrounds/background/available.ts
14
- var j = [
14
+ var M = [
15
15
  "gradient",
16
16
  "grain",
17
17
  "mesh",
@@ -28,7 +28,7 @@ var j = [
28
28
  "linen",
29
29
  "concrete",
30
30
  "marble"
31
- ], M = [
31
+ ], N = [
32
32
  "isometric",
33
33
  "blueprint",
34
34
  "dots",
@@ -42,7 +42,7 @@ var j = [
42
42
  "checker",
43
43
  "diagonal-checker",
44
44
  "chevrons"
45
- ], N = [
45
+ ], P = [
46
46
  "shapes",
47
47
  "confetti-grid",
48
48
  "constellation",
@@ -60,61 +60,61 @@ var j = [
60
60
  "sport",
61
61
  "moon",
62
62
  "icons"
63
- ], P = [
63
+ ], F = [
64
64
  "eclipse",
65
65
  "meteor-shower",
66
66
  "ringed-planet",
67
67
  "northern-lights",
68
68
  "day-sky",
69
69
  "dawn-sky"
70
- ], F = (e) => P.includes(e), I = [
71
- ...j,
70
+ ], I = (e) => F.includes(e), L = [
72
71
  ...M,
73
72
  ...N,
74
- ...P
75
- ], L = h(() => import("./icons-scene-M4HBeN2c.js"));
76
- function R(e) {
77
- return /* @__PURE__ */ x("div", {
73
+ ...P,
74
+ ...F
75
+ ], R = g(() => import("./icons-scene-M4HBeN2c.js"));
76
+ function z(e) {
77
+ return /* @__PURE__ */ S("div", {
78
78
  "data-scene": "",
79
79
  "aria-hidden": "true",
80
- children: /* @__PURE__ */ x(m, {
80
+ children: /* @__PURE__ */ S(h, {
81
81
  fallback: null,
82
- children: /* @__PURE__ */ x(L, { ...e })
82
+ children: /* @__PURE__ */ S(R, { ...e })
83
83
  })
84
84
  });
85
85
  }
86
86
  //#endregion
87
87
  //#region lib/backgrounds/background/partials/background-layers.tsx
88
- var z = h(() => import("./celestial-scene-8Muu6f7O.js")), B = g(function({ preset: e, scene: t, grain: n, sky: r, icons: i, ...a }) {
89
- return /* @__PURE__ */ S(b, { children: [
90
- O(e).map((n) => n === E ? i ? /* @__PURE__ */ x(R, { ...i }, n) : F(e) ? /* @__PURE__ */ x("div", {
88
+ var B = g(() => import("./celestial-scene-8Muu6f7O.js")), V = _(function({ preset: e, scene: t, grain: n, sky: r, icons: i, ...a }) {
89
+ return /* @__PURE__ */ C(x, { children: [
90
+ k(e).map((n) => n === D ? i ? /* @__PURE__ */ S(z, { ...i }, n) : I(e) ? /* @__PURE__ */ S("div", {
91
91
  "data-scene": "",
92
92
  "data-celestial": "",
93
93
  "aria-hidden": "true",
94
- children: /* @__PURE__ */ x(m, {
94
+ children: /* @__PURE__ */ S(h, {
95
95
  fallback: null,
96
- children: /* @__PURE__ */ x(z, {
96
+ children: /* @__PURE__ */ S(B, {
97
97
  name: e,
98
98
  as: "preset",
99
99
  ...a
100
100
  })
101
101
  })
102
- }, n) : t && /* @__PURE__ */ x("div", {
102
+ }, n) : t && /* @__PURE__ */ S("div", {
103
103
  "data-scene": "",
104
104
  "aria-hidden": "true",
105
- children: /* @__PURE__ */ x(u, { node: t })
106
- }, n) : /* @__PURE__ */ x("div", {
105
+ children: /* @__PURE__ */ S(u, { node: t })
106
+ }, n) : /* @__PURE__ */ S("div", {
107
107
  "data-layer": n,
108
108
  "aria-hidden": "true"
109
109
  }, n)),
110
- r && /* @__PURE__ */ x("div", {
110
+ r && /* @__PURE__ */ S("div", {
111
111
  "data-layer": "sky-scene",
112
112
  "data-scene": "",
113
113
  "data-celestial": "",
114
114
  "aria-hidden": "true",
115
- children: /* @__PURE__ */ x(m, {
115
+ children: /* @__PURE__ */ S(h, {
116
116
  fallback: null,
117
- children: /* @__PURE__ */ x(z, {
117
+ children: /* @__PURE__ */ S(B, {
118
118
  name: r,
119
119
  as: "sky",
120
120
  base: e,
@@ -122,28 +122,28 @@ var z = h(() => import("./celestial-scene-8Muu6f7O.js")), B = g(function({ prese
122
122
  })
123
123
  })
124
124
  }),
125
- n && /* @__PURE__ */ x("div", {
125
+ n && /* @__PURE__ */ S("div", {
126
126
  "data-overlay": "grain",
127
127
  "aria-hidden": "true",
128
- children: /* @__PURE__ */ x(u, { node: n })
128
+ children: /* @__PURE__ */ S(u, { node: n })
129
129
  })
130
130
  ] });
131
131
  });
132
132
  //#endregion
133
133
  //#region lib/backgrounds/background/partials/use-background-scenes.ts
134
- function V(e, t, n, r, i, a) {
135
- return e === "grain" ? null : D(e, f(t, n, r, i, a));
134
+ function H(e, t, n, r, i, a) {
135
+ return e === "grain" ? null : O(e, f(t, n, r, i, a));
136
136
  }
137
- function H(e, t) {
138
- return D("grain", {
137
+ function U(e, t) {
138
+ return O("grain", {
139
139
  idPrefix: `${e}-grain`,
140
140
  seed: t
141
141
  });
142
142
  }
143
- function U({ preset: e, hasIcons: t, grain: n, idPrefix: r, seed: i, motif: a, moon: o }) {
143
+ function W({ preset: e, hasIcons: t, grain: n, idPrefix: r, seed: i, motif: a, moon: o }) {
144
144
  let s = n || e === "grain", c = a?.shapes ? [...new Set(a.shapes)].sort().join(",") : void 0, l = JSON.stringify(d(a)), u = JSON.stringify(p(o));
145
145
  return {
146
- scene: v(() => t ? null : V(e, r, i, c, l, u), [
146
+ scene: y(() => t ? null : H(e, r, i, c, l, u), [
147
147
  t,
148
148
  e,
149
149
  r,
@@ -152,7 +152,7 @@ function U({ preset: e, hasIcons: t, grain: n, idPrefix: r, seed: i, motif: a, m
152
152
  l,
153
153
  u
154
154
  ]),
155
- grainScene: v(() => s ? H(r, i) : null, [
155
+ grainScene: y(() => s ? U(r, i) : null, [
156
156
  s,
157
157
  r,
158
158
  i
@@ -165,19 +165,19 @@ function U({ preset: e, hasIcons: t, grain: n, idPrefix: r, seed: i, motif: a, m
165
165
  }
166
166
  //#endregion
167
167
  //#region lib/backgrounds/background/partials/icons-check.ts
168
- function W(e, t) {
168
+ function G(e, t) {
169
169
  try {
170
- e !== void 0 && T(e);
170
+ e !== void 0 && E(e);
171
171
  let n = Array.isArray(t) ? t.map((e) => e && typeof e == "object" && "style" in e ? e.style : e) : t && typeof t == "object" && "style" in t ? t.style : t;
172
- return Array.isArray(n) && n.some((e) => !e) ? "an empty icon style" : (w(n), null);
172
+ return Array.isArray(n) && n.some((e) => !e) ? "an empty icon style" : (T(n), null);
173
173
  } catch (e) {
174
- if (e instanceof C) return e.message;
174
+ if (e instanceof w) return e.message;
175
175
  throw e;
176
176
  }
177
177
  }
178
178
  //#endregion
179
179
  //#region lib/backgrounds/background/partials/icons-keys.ts
180
- var G = Object.keys({
180
+ var K = Object.keys({
181
181
  layout: 1,
182
182
  colors: 1,
183
183
  sizeRange: 1,
@@ -187,48 +187,48 @@ var G = Object.keys({
187
187
  calm: 1,
188
188
  quiet: 1
189
189
  });
190
- function K(e) {
191
- return JSON.stringify(Object.fromEntries(G.flatMap((t) => e?.[t] === void 0 ? [] : [[t, e[t]]])));
190
+ function q(e) {
191
+ return JSON.stringify(Object.fromEntries(K.flatMap((t) => e?.[t] === void 0 ? [] : [[t, e[t]]])));
192
192
  }
193
- var q = .2;
194
- function J(e, t, n) {
193
+ var J = .2;
194
+ function Y(e, t, n) {
195
195
  let { icons: r, iconStyle: i, iconMotif: a, motif: o } = t, s = o?.icons, c = a?.layout, l = e === "shapes" ? !!s : e === "icons" && (c === void 0 || c === "even");
196
196
  return {
197
197
  wants: e === "icons" || e === "shapes" && !!s,
198
198
  iconsKey: JSON.stringify(s?.pack ?? r ?? null),
199
199
  styleKey: JSON.stringify(s?.style ?? i ?? null),
200
- motifKey: K(a),
200
+ motifKey: q(a),
201
201
  mixKey: JSON.stringify(l ? {
202
202
  ...o,
203
- icons: { ratio: s?.ratio ?? q }
203
+ icons: { ratio: s?.ratio ?? J }
204
204
  } : null),
205
205
  servedKey: JSON.stringify(n ?? null)
206
206
  };
207
207
  }
208
208
  //#endregion
209
209
  //#region lib/backgrounds/background/partials/use-icons-scene.ts
210
- function Y(e, { icons: o, iconStyle: s, iconMotif: c, motif: l, idPrefix: u, seed: d, animated: f }) {
211
- let p = t(), m = i(), h = n(), g = r(), { wants: _, iconsKey: y, styleKey: b, motifKey: x, mixKey: S, servedKey: C } = J(e, {
210
+ function X(e, { icons: o, iconStyle: s, iconMotif: c, motif: l, idPrefix: u, seed: d, animated: f }) {
211
+ let p = t(), m = i(), h = n(), g = r(), { wants: _, iconsKey: v, styleKey: b, motifKey: x, mixKey: S, servedKey: C } = Y(e, {
212
212
  icons: o,
213
213
  iconStyle: s,
214
214
  iconMotif: c,
215
215
  motif: l
216
- }, h), w = v(() => {
216
+ }, h), w = y(() => {
217
217
  if (!_) return null;
218
- let t = W(JSON.parse(y) ?? void 0, JSON.parse(b) ?? void 0);
218
+ let t = G(JSON.parse(v) ?? void 0, JSON.parse(b) ?? void 0);
219
219
  return t && !a() && console.warn(`Background: icons cannot be drawn (${t}); drawing "${e === "icons" ? "scatter-icons" : e}" instead.`), t;
220
220
  }, [
221
221
  _,
222
222
  e,
223
- y,
223
+ v,
224
224
  b
225
225
  ]);
226
226
  return {
227
227
  preset: w && e === "icons" ? "scatter-icons" : e,
228
- iconsScene: v(() => _ && !w ? {
228
+ iconsScene: y(() => _ && !w ? {
229
229
  seed: d,
230
230
  idPrefix: u,
231
- iconsKey: y,
231
+ iconsKey: v,
232
232
  styleKey: b,
233
233
  motifKey: x,
234
234
  mixKey: S,
@@ -242,7 +242,7 @@ function Y(e, { icons: o, iconStyle: s, iconMotif: c, motif: l, idPrefix: u, see
242
242
  w,
243
243
  d,
244
244
  u,
245
- y,
245
+ v,
246
246
  b,
247
247
  x,
248
248
  S,
@@ -256,7 +256,7 @@ function Y(e, { icons: o, iconStyle: s, iconMotif: c, motif: l, idPrefix: u, see
256
256
  }
257
257
  //#endregion
258
258
  //#region lib/backgrounds/background/partials/use-themed-background.ts
259
- function X({ preset: e, tone: t, intensity: n, animated: r, grain: i, seed: a, motif: c, moon: l, sky: u, icons: d, iconStyle: f, iconMotif: p, ...m }) {
259
+ function Z({ preset: e, tone: t, intensity: n, animated: r, grain: i, seed: a, motif: c, moon: l, sky: u, icons: d, iconStyle: f, iconMotif: p, ...m }) {
260
260
  let h = o()?.background || s;
261
261
  return {
262
262
  requested: e ?? h.preset,
@@ -278,52 +278,52 @@ function X({ preset: e, tone: t, intensity: n, animated: r, grain: i, seed: a, m
278
278
  }
279
279
  //#endregion
280
280
  //#region lib/backgrounds/background/background.tsx
281
- var Z = /* @__PURE__ */ e({ Background: () => $ }), Q = (e) => console.warn(e);
281
+ var Q = /* @__PURE__ */ e({ Background: () => $ }), ee = (e) => console.warn(e);
282
282
  function $({ children: e, ref: t, fill: n = "viewport", ...r }) {
283
- let { requested: i, tone: o, intensity: s, animated: u, grain: d, seed: f, motif: p, moon: m, sky: h, iconProps: g, props: b } = X(r), C = y(null), w = v(() => c(C, t), [t]), T = l(C, u), E = A(_()), { preset: D, iconsScene: O } = Y(k(i, I, a() ? void 0 : Q), {
284
- ...g,
283
+ let { requested: i, tone: o, intensity: s, animated: u, grain: d, seed: f, motif: p, moon: h, sky: g, iconProps: _, props: x } = Z(r), w = b(null), T = y(() => c(w, t), [t]), E = l(w, u), D = j(v()), { preset: O, iconsScene: k } = X(A(i, L, a() ? void 0 : ee), {
284
+ ..._,
285
285
  motif: p,
286
- idPrefix: E,
286
+ idPrefix: D,
287
287
  seed: f,
288
288
  animated: u
289
- }), { scene: j, grainScene: M, withGrain: N, shapesKey: P, scalarsKey: F, moonKey: L } = U({
290
- preset: D,
291
- hasIcons: O !== void 0,
289
+ }), { scene: M, grainScene: N, withGrain: P, shapesKey: F, scalarsKey: I, moonKey: R } = W({
290
+ preset: O,
291
+ hasIcons: k !== void 0,
292
292
  grain: d,
293
- idPrefix: E,
293
+ idPrefix: D,
294
294
  seed: f,
295
295
  motif: p,
296
- moon: m
296
+ moon: h
297
297
  });
298
- return /* @__PURE__ */ S("div", {
298
+ return /* @__PURE__ */ C("div", {
299
299
  "data-slot": "background",
300
- ...b,
301
- ref: w,
302
- "data-background": D === "grain" ? "gradient" : D,
303
- "data-preset": D,
300
+ ...x,
301
+ ref: T,
302
+ "data-background": O === "grain" ? "gradient" : O,
303
+ "data-preset": O,
304
304
  "data-tone": o,
305
305
  "data-intensity": s,
306
306
  "data-fill": n === "container" ? n : void 0,
307
307
  "data-animated": u ? "" : void 0,
308
- "data-grain": N ? "" : void 0,
309
- "data-sky": h,
310
- "data-paused": u && T ? "" : void 0,
311
- children: [/* @__PURE__ */ x(B, {
312
- preset: D,
313
- scene: j,
314
- grain: M,
315
- sky: h,
316
- idPrefix: E,
308
+ "data-grain": P ? "" : void 0,
309
+ "data-sky": g,
310
+ "data-paused": u && E ? "" : void 0,
311
+ children: [/* @__PURE__ */ S(V, {
312
+ preset: O,
313
+ scene: M,
314
+ grain: N,
315
+ sky: g,
316
+ idPrefix: D,
317
317
  seed: f,
318
- shapesKey: P,
319
- scalarsKey: F,
320
- moonKey: L,
321
- icons: O
322
- }), /* @__PURE__ */ x("div", {
318
+ shapesKey: F,
319
+ scalarsKey: I,
320
+ moonKey: R,
321
+ icons: k
322
+ }), m.toArray(e).length > 0 ? /* @__PURE__ */ S("div", {
323
323
  "data-slot": "background-content",
324
324
  children: e
325
- })]
325
+ }) : null]
326
326
  });
327
327
  }
328
328
  //#endregion
329
- export { Z as n, I as r, $ as t };
329
+ export { Q as n, L as r, $ as t };
@@ -1,3 +1,3 @@
1
- import { r as e, t } from "./background-Q4Ek3rNy.js";
1
+ import { r as e, t } from "./background-DHjdFbNo.js";
2
2
  import { BACKGROUND_INTENSITIES as n, BACKGROUND_PRESETS as r, BACKGROUND_TONES as i, MOTIF_SHAPES as a, MOTIF_SHAPES_ALL as o, SHIPPED_BACKGROUND_PRESETS as s } from "@nxgt/material-core/backgrounds";
3
3
  export { e as AVAILABLE_BACKGROUND_PRESETS, n as BACKGROUND_INTENSITIES, r as BACKGROUND_PRESETS, i as BACKGROUND_TONES, t as Background, a as MOTIF_SHAPES, o as MOTIF_SHAPES_ALL, s as SHIPPED_BACKGROUND_PRESETS };