@nxgt/material 3.48.0 → 3.49.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 (83) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +2 -2
  3. package/dist/{button-yaltbQmC.js → button-DJgaQbBD.js} +49 -49
  4. package/dist/charts.js +144 -144
  5. package/dist/{chip-BqWbbr1b.js → chip-DN44R1vW.js} +56 -56
  6. package/dist/{code-editor-C9qBNoYb.js → code-editor-BJ9ewxSC.js} +307 -307
  7. package/dist/code-editor.js +46 -46
  8. package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BJE3VuQg.js} +1 -1
  9. package/dist/components/components.css +1 -0
  10. package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
  11. package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
  12. package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
  13. package/dist/components/ui/actions/action-card/action-card.css +33 -3
  14. package/dist/{components-Ox6FHmpx.js → components-AtBccCir.js} +17842 -17879
  15. package/dist/components.js +23 -23
  16. package/dist/{dialog-CCCcnTIx.js → dialog-ODql4vH7.js} +15 -15
  17. package/dist/{tooltip-CkttDIab.js → dist-B61_o9Mg.js} +69 -66
  18. package/dist/dnd.js +1 -1
  19. package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-DRXYP9ta.js} +274 -274
  20. package/dist/editor.js +1027 -1027
  21. package/dist/{empty-state-DcF4TBzi.js → empty-state-C9QqvBU1.js} +36 -36
  22. package/dist/{escape-owner-C4W_sOAU.js → escape-owner-DCrlERLM.js} +1 -1
  23. package/dist/{field-blur-CJHzVSh9.js → field-blur-DYGyIdfD.js} +1 -1
  24. package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-B-fSpl1H.js} +1 -1
  25. package/dist/hooks.js +2 -2
  26. package/dist/{hover-card-C0fw2kLK.js → hover-card-EO_CckIx.js} +19 -19
  27. package/dist/{icon-badge-aJ22mKGh.js → icon-badge-BQYj_LE6.js} +3 -3
  28. package/dist/{icon-button-CN9r5TNE.js → icon-button-B481L2TP.js} +20 -20
  29. package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
  30. package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
  31. package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
  32. package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
  33. package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
  34. package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
  35. package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
  36. package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
  37. package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
  38. package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
  39. package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
  40. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
  41. package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
  42. package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
  43. package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
  44. package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
  45. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  46. package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
  47. package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
  48. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
  49. package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
  50. package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
  51. package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
  52. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
  53. package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
  54. package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
  55. package/dist/lib/i18n/translator.d.ts +1 -1
  56. package/dist/main.js +30 -30
  57. package/dist/map.js +78 -78
  58. package/dist/material.css +1 -1
  59. package/dist/nxgt-theme-ivgNca3z.js +37 -0
  60. package/dist/pdf-reader.js +1 -1
  61. package/dist/{public-zVb_Nq_D.js → public-CZBz4JVu.js} +70 -70
  62. package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-597e0_Qm.js} +51 -51
  63. package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-CK_xAk2H.js} +217 -217
  64. package/dist/{spinner-C4CgDEYm.js → spinner-BhuZuHK1.js} +1 -1
  65. package/dist/theme-picker.js +45 -45
  66. package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
  67. package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-Dnjn83TJ.js} +15 -15
  68. package/dist/themes.js +17 -17
  69. package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
  70. package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CCwIu7fE.js} +426 -426
  71. package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-Ot5XUbdn.js} +5138 -4908
  72. package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
  73. package/docs/components/buttons-and-actions.md +62 -4
  74. package/docs/components/data-table-filter-and-lists.md +1 -1
  75. package/docs/guides/cards-and-tiles.md +60 -0
  76. package/docs/roadmap.md +11 -0
  77. package/lib/components/components.css +1 -0
  78. package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
  79. package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
  80. package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
  81. package/lib/components/ui/actions/action-card/action-card.css +33 -3
  82. package/package.json +1 -1
  83. package/dist/nxgt-theme-ZS945iMP.js +0 -37
@@ -1,35 +1,35 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { t } from "./use-material-translation-DOkTaWK_.js";
3
- import { i as n } from "./escape-owner-C4W_sOAU.js";
3
+ import { i as n } from "./escape-owner-DCrlERLM.js";
4
4
  import { a as r, c as i, i as a, n as o, o as s, r as c, t as l, u } from "./state-scenes-BX03WmSu.js";
5
- import { AlertCircle as d, Construction as f, FileQuestion as p, PackageOpen as m, Search as h, ShieldAlert as g, WifiOff as _ } from "lucide-react";
6
- import { Suspense as v } from "react";
7
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
5
+ import { Suspense as d } from "react";
6
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import { AlertCircle as m, Construction as h, FileQuestion as g, PackageOpen as _, Search as v, ShieldAlert as y, WifiOff as b } from "lucide-react";
8
8
  import { STATE_ACCENT as x, STATE_ICON as S, stateCopy as C } from "@nxgt/material-core/states";
9
9
  //#region lib/components/ui/feedback/state-frame/state-icon.tsx
10
10
  var w = {
11
- "package-open": m,
12
- search: h,
13
- "file-question": p,
14
- "shield-alert": g,
15
- "alert-circle": d,
16
- "wifi-off": _,
17
- construction: f
11
+ "package-open": _,
12
+ search: v,
13
+ "file-question": g,
14
+ "shield-alert": y,
15
+ "alert-circle": m,
16
+ "wifi-off": b,
17
+ construction: h
18
18
  };
19
19
  function T({ kind: e }) {
20
20
  let t = w[S[e]];
21
- return /* @__PURE__ */ y(t, { "aria-hidden": "true" });
21
+ return /* @__PURE__ */ f(t, { "aria-hidden": "true" });
22
22
  }
23
23
  //#endregion
24
24
  //#region lib/components/ui/feedback/state-frame/state-scene-illustration.tsx
25
25
  function E({ scene: e, size: t }) {
26
- return /* @__PURE__ */ y("div", {
26
+ return /* @__PURE__ */ f("div", {
27
27
  "data-slot": "illustration",
28
28
  "data-scene": e,
29
29
  "data-size": t,
30
30
  "data-fallback": "",
31
31
  "aria-hidden": "true",
32
- children: /* @__PURE__ */ y(r, {
32
+ children: /* @__PURE__ */ f(r, {
33
33
  kind: l[e] ?? "empty",
34
34
  className: "h-full w-full"
35
35
  })
@@ -37,19 +37,19 @@ function E({ scene: e, size: t }) {
37
37
  }
38
38
  var D = a("illustration", async () => {
39
39
  let { Illustration: e } = await import("./illustration-B4_W-OUS.js").then((e) => e.n);
40
- return ({ scene: t, size: n }) => /* @__PURE__ */ y(e, {
40
+ return ({ scene: t, size: n }) => /* @__PURE__ */ f(e, {
41
41
  scene: t,
42
42
  size: n
43
43
  });
44
44
  }, E);
45
45
  function O({ scene: e, size: t }) {
46
- return /* @__PURE__ */ y(v, {
47
- fallback: /* @__PURE__ */ y("div", {
46
+ return /* @__PURE__ */ f(d, {
47
+ fallback: /* @__PURE__ */ f("div", {
48
48
  "data-slot": "illustration",
49
49
  "data-size": t,
50
50
  "aria-hidden": "true"
51
51
  }),
52
- children: /* @__PURE__ */ y(D, {
52
+ children: /* @__PURE__ */ f(D, {
53
53
  scene: e,
54
54
  size: t
55
55
  })
@@ -57,41 +57,41 @@ function O({ scene: e, size: t }) {
57
57
  }
58
58
  //#endregion
59
59
  //#region lib/components/ui/feedback/state-frame/state-frame.tsx
60
- function k({ kind: t, size: a = "default", illustration: l, icon: d, title: f, headingLevel: p, description: m, actions: h, className: g, children: _, ...v }) {
60
+ function k({ kind: t, size: a = "default", illustration: l, icon: d, title: m, headingLevel: h, description: g, actions: _, className: v, children: y, ...b }) {
61
61
  let S = a === "inline", C = a === "compact" || S, w = e("flex shrink-0 items-center justify-center rounded", s[x[t]], S ? "size-8 rounded-full [&_svg]:size-4" : C ? "size-10 [&_svg]:size-5" : "size-16 [&_svg]:size-7"), E = u(), D = l === !0 || c(l, E?.sets) ? c(l, E?.sets) ? l : o[t] : null, k = l == null && d == null && a === "default" ? i(E, o[t]) : void 0, A = S ? null : D ?? (k ? o[t] : null), j = null;
62
- return j = l === !1 ? null : A ? /* @__PURE__ */ y(O, {
62
+ return j = l === !1 ? null : A ? /* @__PURE__ */ f(O, {
63
63
  scene: A,
64
64
  size: C ? "sm" : "md"
65
- }) : l != null && l !== !0 && !c(l, E?.sets) ? l : d == null ? C ? /* @__PURE__ */ y("div", {
65
+ }) : l != null && l !== !0 && !c(l, E?.sets) ? l : d == null ? C ? /* @__PURE__ */ f("div", {
66
66
  className: w,
67
- children: /* @__PURE__ */ y(T, { kind: t })
68
- }) : /* @__PURE__ */ y(r, { kind: t }) : /* @__PURE__ */ y("div", {
67
+ children: /* @__PURE__ */ f(T, { kind: t })
68
+ }) : /* @__PURE__ */ f(r, { kind: t }) : /* @__PURE__ */ f("div", {
69
69
  className: w,
70
70
  children: d
71
- }), /* @__PURE__ */ b("div", {
71
+ }), /* @__PURE__ */ p("div", {
72
72
  "data-kind": t,
73
73
  "data-size": a,
74
- className: e("flex text-foreground", S ? "flex-row items-center gap-3 px-3 py-2.5 text-start" : "flex-col items-center justify-center text-center", !S && (C ? "gap-3 px-4 py-6" : "min-h-[22rem] gap-5 p-8"), g),
75
- ...v,
74
+ className: e("flex text-foreground", S ? "flex-row items-center gap-3 px-3 py-2.5 text-start" : "flex-col items-center justify-center text-center", !S && (C ? "gap-3 px-4 py-6" : "min-h-[22rem] gap-5 p-8"), v),
75
+ ...b,
76
76
  children: [
77
77
  j,
78
- (f != null || m != null) && /* @__PURE__ */ b("div", {
78
+ (m != null || g != null) && /* @__PURE__ */ p("div", {
79
79
  className: e("flex flex-col", S ? "min-w-0 flex-1 gap-0.5" : "max-w-sm gap-2"),
80
- children: [f != null && /* @__PURE__ */ y(n, {
81
- as: p ? `h${p}` : void 0,
80
+ children: [m != null && /* @__PURE__ */ f(n, {
81
+ as: h ? `h${h}` : void 0,
82
82
  variant: S ? "normal" : C ? "title-medium" : "headline-small",
83
83
  className: e("tracking-tight text-balance", S && "font-medium"),
84
- children: f
85
- }), m != null && /* @__PURE__ */ y(n, {
84
+ children: m
85
+ }), g != null && /* @__PURE__ */ f(n, {
86
86
  variant: S ? "body-small" : "body-medium",
87
87
  className: "text-pretty",
88
- children: m
88
+ children: g
89
89
  })]
90
90
  }),
91
- _,
92
- h != null && /* @__PURE__ */ y("div", {
91
+ y,
92
+ _ != null && /* @__PURE__ */ f("div", {
93
93
  className: e("flex flex-wrap items-center gap-2", S ? "shrink-0" : "mt-1 justify-center"),
94
- children: h
94
+ children: _
95
95
  })
96
96
  ]
97
97
  });
@@ -100,7 +100,7 @@ function k({ kind: t, size: a = "default", illustration: l, icon: d, title: f, h
100
100
  //#region lib/components/ui/feedback/empty-state/empty-state.tsx
101
101
  function A({ kind: e = "empty", size: n = "default", illustration: r, icon: i, title: a, description: o, action: s, ...c }) {
102
102
  let l = C(e, "empty-state"), { t: u } = t(), d = o ?? (a == null ? u(l.descriptionKey, l.description) : void 0);
103
- return /* @__PURE__ */ y(k, {
103
+ return /* @__PURE__ */ f(k, {
104
104
  "data-slot": "empty-state",
105
105
  "data-variant": e,
106
106
  kind: e,
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { t } from "./dist-DVRQkaTK.js";
3
- import { o as n } from "./tooltip-CkttDIab.js";
3
+ import { t as n } from "./dist-B61_o9Mg.js";
4
4
  import { t as r } from "./button-group-context-CaP0X5p_.js";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
6
  //#region lib/components/ui/actions/button-group/button-group-reset.tsx
@@ -1,4 +1,4 @@
1
- import { t as e } from "./field-blur-context-Cft9s7Hg.js";
1
+ import { t as e } from "./field-blur-context-B-fSpl1H.js";
2
2
  import { t } from "./useEvent-2fKq-6w8.js";
3
3
  import n, { useCallback as r, useEffect as i, useRef as a } from "react";
4
4
  import { jsx as o } from "react/jsx-runtime";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { l as t } from "./dist-lmHmz_bu.js";
3
- import { i as n } from "./escape-owner-C4W_sOAU.js";
3
+ import { i as n } from "./escape-owner-DCrlERLM.js";
4
4
  import * as r from "react";
5
5
  import { createContext as i, use as a, useMemo as o } from "react";
6
6
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
package/dist/hooks.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "./i18n-provider-C0fB0sEL.js";
2
- import { a as t, i as n, o as r, r as i, s as a } from "./theme-store-CSl51uNH.js";
3
- import { n as o, t as s } from "./use-theme-DMcyJ52N.js";
2
+ import { a as t, i as n, o as r, r as i, s as a } from "./theme-store-BdPp43cV.js";
3
+ import { n as o, t as s } from "./use-theme-BCLireTd.js";
4
4
  import { t as c } from "./number.utils-BG_eEt5g.js";
5
5
  import { a as l, i as u, n as d, o as f, r as p, t as m } from "./use-heading-spy-DjKixjLm.js";
6
6
  import { r as h } from "./use-csp-nonce-ZKs9k-ov.js";
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { o as t } from "./dist-DVRQkaTK.js";
3
3
  import { a as n, c as r, i, l as a, s as o } from "./dist-lmHmz_bu.js";
4
- import { b as s, c, d as l, f as u, u as d, x as f } from "./tooltip-CkttDIab.js";
4
+ import { S as s, d as c, f as l, l as u, p as d, x as f } from "./dist-B61_o9Mg.js";
5
5
  import { t as p } from "./in-dialog-Vwkyp-M5.js";
6
- import { o as m } from "./escape-owner-C4W_sOAU.js";
6
+ import { o as m } from "./escape-owner-DCrlERLM.js";
7
7
  import * as h from "react";
8
8
  import { Activity as g } from "react";
9
9
  import { jsx as _ } from "react/jsx-runtime";
@@ -11,7 +11,7 @@ import { jsx as _ } from "react/jsx-runtime";
11
11
  var v = Object.defineProperty, y = (e, t) => v(e, "name", {
12
12
  value: t,
13
13
  configurable: !0
14
- }), b, x = "HoverCard", [S, C] = r(x, [u]), w = u(), [T, E] = S(x), D = /* @__PURE__ */ y((e) => {
14
+ }), b, x = "HoverCard", [S, C] = r(x, [d]), w = d(), [T, E] = S(x), D = /* @__PURE__ */ y((e) => {
15
15
  let { __scopeHoverCard: t, children: r, open: i, defaultOpen: a, onOpenChange: o, openDelay: s = 700, closeDelay: c = 300 } = e, u = w(t), d = h.useRef(0), f = h.useRef(0), p = h.useRef(!1), m = h.useRef(!1), [g, v] = n({
16
16
  prop: i,
17
17
  defaultProp: a ?? !1,
@@ -40,7 +40,7 @@ var v = Object.defineProperty, y = (e, t) => v(e, "name", {
40
40
  });
41
41
  }, "HoverCard"), O = "HoverCardTrigger", k = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ y(function(e, t) {
42
42
  let { __scopeHoverCard: n, ...r } = e, i = E(O, n);
43
- return /* @__PURE__ */ _(c, {
43
+ return /* @__PURE__ */ _(u, {
44
44
  asChild: !0,
45
45
  ...w(n),
46
46
  children: /* @__PURE__ */ _(a.a, {
@@ -61,7 +61,7 @@ var v = Object.defineProperty, y = (e, t) => v(e, "name", {
61
61
  forceMount: n,
62
62
  children: /* @__PURE__ */ _(i, {
63
63
  present: n || o.open,
64
- children: /* @__PURE__ */ _(s, {
64
+ children: /* @__PURE__ */ _(f, {
65
65
  asChild: !0,
66
66
  container: a,
67
67
  children: r
@@ -81,7 +81,7 @@ var v = Object.defineProperty, y = (e, t) => v(e, "name", {
81
81
  })
82
82
  });
83
83
  }, "HoverCardContent")), I = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ y(function(e, n) {
84
- let { __scopeHoverCard: r, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: s, onInteractOutside: c, ...l } = e, u = E(P, r), p = w(r), m = h.useRef(null), g = t(n, m), [v, x] = h.useState(!1);
84
+ let { __scopeHoverCard: r, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: l, onInteractOutside: u, ...d } = e, f = E(P, r), p = w(r), m = h.useRef(null), g = t(n, m), [v, x] = h.useState(!1);
85
85
  return h.useEffect(() => {
86
86
  if (v) {
87
87
  let e = document.body;
@@ -92,35 +92,35 @@ var v = Object.defineProperty, y = (e, t) => v(e, "name", {
92
92
  }, [v]), h.useEffect(() => {
93
93
  if (m.current) {
94
94
  let e = /* @__PURE__ */ y(() => {
95
- x(!1), u.isPointerDownOnContentRef.current = !1, setTimeout(() => {
96
- document.getSelection()?.toString() !== "" && (u.hasSelectionRef.current = !0);
95
+ x(!1), f.isPointerDownOnContentRef.current = !1, setTimeout(() => {
96
+ document.getSelection()?.toString() !== "" && (f.hasSelectionRef.current = !0);
97
97
  });
98
98
  }, "handlePointerUp");
99
99
  return document.addEventListener("pointerup", e), () => {
100
- document.removeEventListener("pointerup", e), u.hasSelectionRef.current = !1, u.isPointerDownOnContentRef.current = !1;
100
+ document.removeEventListener("pointerup", e), f.hasSelectionRef.current = !1, f.isPointerDownOnContentRef.current = !1;
101
101
  };
102
102
  }
103
- }, [u.isPointerDownOnContentRef, u.hasSelectionRef]), h.useEffect(() => {
103
+ }, [f.isPointerDownOnContentRef, f.hasSelectionRef]), h.useEffect(() => {
104
104
  m.current && R(m.current).forEach((e) => e.setAttribute("tabindex", "-1"));
105
- }), /* @__PURE__ */ _(f, {
105
+ }), /* @__PURE__ */ _(s, {
106
106
  asChild: !0,
107
107
  disableOutsidePointerEvents: !1,
108
- onInteractOutside: c,
108
+ onInteractOutside: u,
109
109
  onEscapeKeyDown: i,
110
110
  onPointerDownOutside: a,
111
- onFocusOutside: o(s, (e) => {
111
+ onFocusOutside: o(l, (e) => {
112
112
  e.preventDefault();
113
113
  }),
114
- onDismiss: u.onDismiss,
115
- children: /* @__PURE__ */ _(d, {
114
+ onDismiss: f.onDismiss,
115
+ children: /* @__PURE__ */ _(c, {
116
116
  ...p,
117
- ...l,
118
- onPointerDown: o(l.onPointerDown, (e) => {
119
- e.currentTarget.contains(e.target) && x(!0), u.hasSelectionRef.current = !1, u.isPointerDownOnContentRef.current = !0;
117
+ ...d,
118
+ onPointerDown: o(d.onPointerDown, (e) => {
119
+ e.currentTarget.contains(e.target) && x(!0), f.hasSelectionRef.current = !1, f.isPointerDownOnContentRef.current = !0;
120
120
  }),
121
121
  ref: g,
122
122
  style: {
123
- ...l.style,
123
+ ...d.style,
124
124
  userSelect: v ? "text" : void 0,
125
125
  WebkitUserSelect: v ? "text" : void 0,
126
126
  "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { f as t } from "./dialog-CCCcnTIx.js";
3
- import { a as n, i as r, n as i } from "./field-blur-context-Cft9s7Hg.js";
4
- import { t as a } from "./icon-button-CN9r5TNE.js";
2
+ import { f as t } from "./dialog-ODql4vH7.js";
3
+ import { a as n, i as r, n as i } from "./field-blur-context-B-fSpl1H.js";
4
+ import { t as a } from "./icon-button-B481L2TP.js";
5
5
  import { isValidElement as o, useId as s } from "react";
6
6
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
7
  import { describedBy as u } from "@nxgt/material-core/described-by";
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { n as t } from "./use-shape-morph-BKA_R5P5.js";
3
- import { n, t as r } from "./dist-DVRQkaTK.js";
4
- import { o as i, t as a } from "./tooltip-CkttDIab.js";
5
- import { t as o } from "./is-production-GLw59WU8.js";
2
+ import { t } from "./is-production-GLw59WU8.js";
3
+ import { n } from "./use-shape-morph-BKA_R5P5.js";
4
+ import { n as r, t as i } from "./dist-DVRQkaTK.js";
5
+ import { n as a, t as o } from "./dist-B61_o9Mg.js";
6
6
  import { a as s, i as c, n as l, r as u, t as d } from "./button-tones-BwuVvAmd.js";
7
7
  import { t as f } from "./button-group-context-CaP0X5p_.js";
8
8
  import { shapeOutline as p, toSvgPath as m } from "@nxgt/material-core/shapes";
@@ -191,7 +191,7 @@ var x = [
191
191
  color: "default",
192
192
  class: `${u.default} ${d.default} ${l.default} underline-offset-4 hover:underline hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
193
193
  }
194
- ], S = i("inline-flex center gap-2 cursor-pointer whitespace-nowrap text-sm font-medium disabled:pointer-events-none [&_svg]:bg-transparent [&_svg]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-(--btn-ic,1rem) shrink-0 [&_svg]:shrink-0", {
194
+ ], S = o("inline-flex center gap-2 cursor-pointer whitespace-nowrap text-sm font-medium disabled:pointer-events-none [&_svg]:bg-transparent [&_svg]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-(--btn-ic,1rem) shrink-0 [&_svg]:shrink-0", {
195
195
  variants: {
196
196
  look: {
197
197
  btn: "nxgt-btn nxgt-morph-fill aria-invalid:[--btn-focus:var(--color-error)] aria-invalid:[--btn-line:var(--color-error)]",
@@ -288,9 +288,9 @@ var w = C("btn"), T = C("shaped"), E = {
288
288
  default: "fill-transparent group-hover/icon-button:fill-accent dark:group-hover/icon-button:fill-accent/50"
289
289
  }
290
290
  };
291
- function D({ shape: n, variant: r, color: i }) {
292
- let a = p(n), o = _(null);
293
- return t(o, a, !0), /* @__PURE__ */ v("svg", {
291
+ function D({ shape: t, variant: r, color: i }) {
292
+ let a = p(t), o = _(null);
293
+ return n(o, a, !0), /* @__PURE__ */ v("svg", {
294
294
  "data-slot": "icon-button-shape",
295
295
  viewBox: "0 0 100 100",
296
296
  "aria-hidden": "true",
@@ -310,10 +310,10 @@ function D({ shape: n, variant: r, color: i }) {
310
310
  function O(e) {
311
311
  return e === void 0 || !Number.isFinite(e) || e < .5 ? null : b(e);
312
312
  }
313
- function k({ variant: t, color: i, size: a, width: c, className: l, asChild: u, type: d = "button", shape: p, morph: m = "pill", badge: _, badgeTone: b = "primary", children: x, ...S }) {
314
- let C = u ? r : "button", E = h(f), k = a ?? E, A = !!(S["aria-label"] || S["aria-labelledby"]), j = !!p && c != null && c !== "default";
313
+ function k({ variant: n, color: a, size: o, width: c, className: l, asChild: u, type: d = "button", shape: p, morph: m = "pill", badge: _, badgeTone: b = "primary", children: x, ...S }) {
314
+ let C = u ? i : "button", E = h(f), k = o ?? E, A = !!(S["aria-label"] || S["aria-labelledby"]), j = !!p && c != null && c !== "default";
315
315
  g(() => {
316
- j && !o() && console.warn("IconButton: `width` is ignored with `shape`; a shaped button is as wide as it is high.");
316
+ j && !t() && console.warn("IconButton: `width` is ignored with `shape`; a shaped button is as wide as it is high.");
317
317
  }, [j]);
318
318
  let M = !p && m !== "none" && S["aria-pressed"] !== void 0, N = O(_), P = S["aria-pressed"] === !0 || S["aria-pressed"] === "true";
319
319
  return /* @__PURE__ */ v(s, {
@@ -321,20 +321,20 @@ function k({ variant: t, color: i, size: a, width: c, className: l, asChild: u,
321
321
  children: /* @__PURE__ */ y(C, {
322
322
  "data-slot": "icon-button",
323
323
  "data-icon-button": "",
324
- "data-variant": t ?? "filled",
325
- "data-color": i,
324
+ "data-variant": n ?? "filled",
325
+ "data-color": a,
326
326
  type: u ? void 0 : d,
327
327
  "data-size": k,
328
328
  "data-shape": p,
329
329
  "data-morph": M ? m : void 0,
330
330
  "data-selected": M && P ? "true" : void 0,
331
331
  className: e(p ? T({
332
- variant: t,
333
- color: i,
332
+ variant: n,
333
+ color: a,
334
334
  size: k
335
335
  }) : w({
336
- variant: t,
337
- color: i,
336
+ variant: n,
337
+ color: a,
338
338
  size: k,
339
339
  width: c
340
340
  }), p && "group/icon-button nxgt-touch-target relative isolate bg-transparent! border-0! shadow-none! ring-0! focus-visible:ring-0! aria-invalid:ring-0! forced-colors:[&_svg]:stroke-[ButtonText] forced-colors:[&_svg]:text-[ButtonText]", l),
@@ -342,10 +342,10 @@ function k({ variant: t, color: i, size: a, width: c, className: l, asChild: u,
342
342
  children: [
343
343
  p ? /* @__PURE__ */ v(D, {
344
344
  shape: p,
345
- variant: t ?? "filled",
346
- color: i ?? (t === "ghost" ? "default" : "primary")
345
+ variant: n ?? "filled",
346
+ color: a ?? (n === "ghost" ? "default" : "primary")
347
347
  }) : null,
348
- /* @__PURE__ */ v(n, { children: x }),
348
+ /* @__PURE__ */ v(r, { children: x }),
349
349
  N === null ? null : /* @__PURE__ */ v("span", {
350
350
  "data-slot": "icon-button-badge",
351
351
  "aria-hidden": "true",
@@ -8,16 +8,33 @@ type Div = ComponentProps<'div'>;
8
8
  * the tag of the title (a button's children are presentational: a heading only
9
9
  * where the card is plain).
10
10
  */
11
- export declare function actionCardSemantics({ active, disabled, hasIcon, role, tabIndex, onClick, onKeyDown, onKeyUp, }: {
11
+ export declare function actionCardSemantics({ hasAction, active, disabled, hasIcon, role, ariaChecked, tabIndex, onClick, onKeyDown, onKeyUp, }: {
12
+ /** The card has an `action`: the title becomes its one button and the root stays plain. */
13
+ hasAction?: boolean;
12
14
  active: boolean | undefined;
13
15
  disabled: boolean;
14
16
  hasIcon: boolean;
17
+ /** The caller's `aria-checked`: it follows a `role` other than `button` onto the title button. */
18
+ ariaChecked?: Div['aria-checked'];
15
19
  } & Pick<Div, 'role' | 'tabIndex' | 'onClick' | 'onKeyDown' | 'onKeyUp'>): {
16
- Title: "span" | "h3";
20
+ Title: "span";
21
+ button: Pick<ComponentProps<"button">, "role" | "aria-checked" | "aria-pressed" | "disabled" | "onClick" | "onKeyDown" | "onKeyUp">;
22
+ attributes: {
23
+ 'data-slot': string;
24
+ 'data-icon': string | undefined;
25
+ 'data-has-action': string;
26
+ 'data-disabled': string | undefined;
27
+ 'data-active': string | undefined;
28
+ 'data-interactive': string;
29
+ };
30
+ } | {
31
+ Title: "h3" | "span";
32
+ button: undefined;
17
33
  attributes: {
18
34
  onClick: (event: import('react').MouseEvent<HTMLDivElement>) => void;
19
35
  onKeyDown: (event: import('react').KeyboardEvent<HTMLDivElement>) => void;
20
36
  onKeyUp: (event: import('react').KeyboardEvent<HTMLDivElement>) => void;
37
+ 'data-has-action': string | undefined;
21
38
  'data-slot': string;
22
39
  'data-icon': string | undefined;
23
40
  role: import('react').AriaRole | undefined;
@@ -29,4 +46,10 @@ export declare function actionCardSemantics({ active, disabled, hasIcon, role, t
29
46
  'data-interactive': string | undefined;
30
47
  };
31
48
  };
49
+ /**
50
+ * The props that stay on the root: with a title button it owns the role, the
51
+ * state and the name, so the caller's `aria-checked` and `aria-label` are not
52
+ * applied to the plain `div`.
53
+ */
54
+ export declare function actionCardRootProps<P extends Div>(props: P, hasButton: boolean): P;
32
55
  export {};
@@ -2,9 +2,25 @@ import { ComponentProps, ReactNode } from 'react';
2
2
  export type ActionCardProps = {
3
3
  active?: boolean;
4
4
  icon?: ReactNode;
5
- variant?: 'sm' | 'md';
5
+ /** `tile` is a compact grid cell: no minimum width, no indicator unless `withIndicator`. */
6
+ variant?: 'sm' | 'md' | 'tile';
6
7
  title?: ReactNode;
7
8
  description?: ReactNode;
9
+ /** A line under the title: a string or number becomes a soft `Badge`, a node is shown as given (pass a toned `Badge`). */
10
+ status?: ReactNode;
11
+ /** A secondary line, one line with an ellipsis; a tooltip shows it whole only while it is clipped. */
12
+ meta?: ReactNode;
13
+ /**
14
+ * A trailing control (a `RowMenu`, an `IconButton`) in its own area, outside
15
+ * the card's press surface. With it, a card that chooses or reacts is a
16
+ * plain `div` whose title is the one button, named after the title, the
17
+ * status and the meta and described by the `description`; the action is its
18
+ * second tab stop. `title` is required then. A `role` (`switch`, `checkbox`,
19
+ * `radio`) and its `aria-checked` move to the button; `aria-label` is not
20
+ * applied. The card's `disabled` does not reach the action: disable its
21
+ * control too. Without it, nothing changes.
22
+ */
23
+ action?: ReactNode;
8
24
  withIndicator?: boolean;
9
25
  /**
10
26
  * Out of reach: `aria-disabled`, off the Tab order, no click and no key.
@@ -12,4 +28,4 @@ export type ActionCardProps = {
12
28
  */
13
29
  disabled?: boolean;
14
30
  } & Omit<ComponentProps<'div'>, 'title'>;
15
- export declare function ActionCard({ icon, active, className, title, description, variant, tabIndex, withIndicator, disabled, role, onClick, onKeyDown, onKeyUp, ...props }: ActionCardProps): import("react").JSX.Element;
31
+ export declare function ActionCard({ icon, active, className, title, description, status, meta, action, variant, tabIndex, withIndicator, disabled, role, onClick, onKeyDown, onKeyUp, ...props }: ActionCardProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** The card's leading icon in a circle that morphs to a filled cookie when chosen. */
3
+ export declare function ActionCardIcon({ active, children, }: {
4
+ active: boolean | undefined;
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The card's secondary line: one line with an ellipsis, the full text always
4
+ * in the DOM. Its tooltip shows the whole text only while the line is clipped
5
+ * and the card's pressable element is `revealed` (hovered or focused), and it
6
+ * takes no tab stop of its own. The pointer crossing the line or leaving the
7
+ * tooltip changes nothing (the card owns hover and focus): only Escape
8
+ * dismisses it.
9
+ */
10
+ export declare function ActionCardMeta({ id, revealed, onDismiss, children, }: {
11
+ id: string;
12
+ revealed: boolean;
13
+ onDismiss: () => void;
14
+ children: ReactNode;
15
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** The line under the title: text becomes a soft badge, a node is shown as given. */
3
+ export declare function ActionCardStatus({ id, children, }: {
4
+ id: string;
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { ComponentProps, ElementType, ReactNode } from 'react';
2
+ import { useActionCardNames } from '../use-action-card-names.js';
3
+ import { useReveal } from '../use-reveal.js';
4
+ import { ActionCardTitleButton } from './action-card-title-button.js';
5
+ /**
6
+ * The card's text block: the title (the card's one button when it has an
7
+ * `action`, else a heading or a span), the description, the status and the
8
+ * meta line. With an `action` the button is always there, named after the
9
+ * status and the meta when there is no title.
10
+ */
11
+ export declare function ActionCardText({ title, description, status, meta, Title, button, names, reveal, }: {
12
+ title: ReactNode;
13
+ description: ReactNode;
14
+ status: ReactNode;
15
+ meta: ReactNode;
16
+ Title: ElementType;
17
+ button: Omit<ComponentProps<typeof ActionCardTitleButton>, 'id' | 'labelledBy' | 'describedBy' | 'children'> | undefined;
18
+ names: ReturnType<typeof useActionCardNames>;
19
+ reveal: ReturnType<typeof useReveal>;
20
+ }): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ /**
3
+ * The title of a card that has an `action`: the card's one button. Its
4
+ * `::after` is stretched over the card (action-card-tile.css), so the whole
5
+ * card presses it, and the action sits above it as a sibling, never inside.
6
+ * Named after the title, the status and the meta line together, and described
7
+ * by the card's description.
8
+ */
9
+ export declare function ActionCardTitleButton({ id, labelledBy, describedBy, children, ...props }: {
10
+ id: string;
11
+ labelledBy: string | undefined;
12
+ describedBy: string | undefined;
13
+ children?: ReactNode;
14
+ } & Omit<ComponentProps<'button'>, 'children' | 'id'>): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** The card's trailing parts: its `action` in its own area, then the indicator. */
3
+ export declare function ActionCardTrail({ action, withIndicator, }: {
4
+ action: ReactNode;
5
+ withIndicator: boolean;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The ids a card's parts carry, and what the button of a card with an
3
+ * `action` is named and described after: the title, then the status, then the
4
+ * meta line for its name (only those the card shows; undefined when none is,
5
+ * as an empty string would give the button no name at all), and the
6
+ * description for its description.
7
+ */
8
+ export declare function useActionCardNames(has: {
9
+ title: boolean;
10
+ description: boolean;
11
+ status: boolean;
12
+ meta: boolean;
13
+ }): {
14
+ ids: {
15
+ title: string;
16
+ description: string;
17
+ status: string;
18
+ meta: string;
19
+ };
20
+ labelledBy: string | undefined;
21
+ describedBy: string | undefined;
22
+ };
@@ -0,0 +1,23 @@
1
+ import { FocusEvent, PointerEvent } from 'react';
2
+ type Own = {
3
+ onPointerEnter?: (event: PointerEvent<never>) => void;
4
+ onPointerLeave?: (event: PointerEvent<never>) => void;
5
+ onFocus?: (event: FocusEvent<never>) => void;
6
+ onBlur?: (event: FocusEvent<never>) => void;
7
+ };
8
+ /**
9
+ * Whether a card's meta line is revealed: its pressable element is hovered by
10
+ * a mouse or a pen (a tap leaves no hover) or has focus. `bind(own)` returns
11
+ * the four handlers, calling the caller's own first. `dismiss` clears both.
12
+ */
13
+ export declare function useReveal(): {
14
+ revealed: boolean;
15
+ dismiss: () => void;
16
+ bind: (own?: Own) => {
17
+ onPointerEnter: (event: PointerEvent<never>) => void;
18
+ onPointerLeave: (event: PointerEvent<never>) => void;
19
+ onFocus: (event: FocusEvent<never>) => void;
20
+ onBlur: (event: FocusEvent<never>) => void;
21
+ };
22
+ };
23
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  declare const buttonVariantsByColor: (props?: ({
3
- variant?: "tonal" | "filled" | "link" | "ghost" | "outlined" | null | undefined;
3
+ variant?: "link" | "tonal" | "filled" | "ghost" | "outlined" | null | undefined;
4
4
  color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | null | undefined;
5
5
  size?: "lg" | "sm" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "xs" | "xl" | "2xl" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -22,7 +22,7 @@ declare const variantsByColor: (props?: ({
22
22
  look?: "btn" | "shaped" | null | undefined;
23
23
  size?: "lg" | "sm" | "default" | "xs" | "xl" | "legacy" | null | undefined;
24
24
  width?: "default" | "narrow" | "wide" | null | undefined;
25
- variant?: "tonal" | "filled" | "link" | "ghost" | "outlined" | null | undefined;
25
+ variant?: "link" | "tonal" | "filled" | "ghost" | "outlined" | null | undefined;
26
26
  color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | null | undefined;
27
27
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
28
28
  type Props = Parameters<typeof variantsByColor>[0];
@@ -33,7 +33,7 @@ export type RowMenuProps = {
33
33
  };
34
34
  /**
35
35
  * A row's actions menu: `RowMenuTrigger` and a `DropdownMenu` aligned to the
36
- * end of it. Its items are 44px high on a coarse pointer, and the destructive
36
+ * end of it. Every item of its menu, `children` too, is 44px high on a coarse pointer, and the destructive
37
37
  * ones come last, after a separator. Focus returns to the trigger when the
38
38
  * menu closes, and when a dialog opened from an item closes.
39
39
  */
@@ -18,10 +18,10 @@ export declare function useDurationBox({ disabled, ...values }: Model): {
18
18
  labels: {
19
19
  hour: string;
20
20
  minute: string;
21
+ period: string;
21
22
  day: string;
22
23
  month: string;
23
24
  year: string;
24
- period: string;
25
25
  };
26
26
  placeholders: Record<import('../../../primitives/segmented-input/segment-defs.js').SegmentKey, string>;
27
27
  periodNames: [string, string];