@nxgt/material 3.10.2 → 3.11.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 (107) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +4 -4
  3. package/dist/{async-slice-DDjaJY_F.js → async-slice-4qbER86I.js} +1 -1
  4. package/dist/button-BNjw-pnE.js +327 -0
  5. package/dist/button-group-context-CaP0X5p_.js +5 -0
  6. package/dist/{button-tones-BgZJ1tkD.js → button-tones-BwuVvAmd.js} +9 -1
  7. package/dist/{callout-view-DdJPdFrP.js → callout-view-C6voDS00.js} +1 -1
  8. package/dist/charts.js +5 -5
  9. package/dist/{chip-DpySRqCy.js → chip-DLgQTJBZ.js} +4 -4
  10. package/dist/{code-editor-BiA14xua.js → code-editor-BZbaYLvo.js} +8 -8
  11. package/dist/code-editor.js +7 -7
  12. package/dist/{code-language-items-C_dJ6GVs.js → code-language-items-BT5BO5w6.js} +2 -2
  13. package/dist/components/base.css +21 -6
  14. package/dist/components/components.css +5 -2
  15. package/dist/components/type-scale.css +194 -0
  16. package/dist/components/ui/actions/button/button.css +156 -0
  17. package/dist/components/ui/actions/button-group/button-group-standard.css +131 -0
  18. package/dist/components/ui/actions/button-group/button-group.css +4 -1
  19. package/dist/components/ui/actions/icon-button/icon-button.css +115 -0
  20. package/dist/components/ui/actions/morph-fill.css +62 -0
  21. package/dist/{components-BkF9N-Yx.js → components-1GK7YIhY.js} +14685 -14688
  22. package/dist/components.js +23 -23
  23. package/dist/{dialog-CkIYpJXk.js → dialog-BQp5IdFl.js} +147 -147
  24. package/dist/dnd.js +1 -1
  25. package/dist/{dropdown-menu-BC5Tbhb9.js → dropdown-menu-BsH9W_3C.js} +3 -3
  26. package/dist/editor-viewer.js +1 -1
  27. package/dist/editor.js +13 -13
  28. package/dist/{empty-state-SeAg2TOX.js → empty-state-WaU4-T2c.js} +5 -5
  29. package/dist/escape-owner-C4W_sOAU.js +116 -0
  30. package/dist/{field-blur-DPLsMufs.js → field-blur-CJHzVSh9.js} +1 -1
  31. package/dist/{field-blur-context-1ZwJgsHE.js → field-blur-context-Cft9s7Hg.js} +2 -2
  32. package/dist/{hover-card-Cox-tPDz.js → hover-card-C0fw2kLK.js} +72 -71
  33. package/dist/i18n.js +12 -12
  34. package/dist/{icon-badge-q3Ve8gra.js → icon-badge-DUAq9f7H.js} +4 -4
  35. package/dist/icon-button-ifTpXt0A.js +355 -0
  36. package/dist/{illustration-BfHRpVzM.js → illustration-BmQmvW_4.js} +1 -1
  37. package/dist/illustrations.js +2 -2
  38. package/dist/lib/components/ui/actions/button/button-tones.d.ts +16 -0
  39. package/dist/lib/components/ui/actions/button/button.d.ts +13 -0
  40. package/dist/lib/components/ui/actions/button/button.variants.d.ts +4 -3
  41. package/dist/lib/components/ui/actions/button-group/button-group-context.d.ts +16 -0
  42. package/dist/lib/components/ui/actions/button-group/button-group-reset.d.ts +13 -0
  43. package/dist/lib/components/ui/actions/button-group/button-group.d.ts +19 -2
  44. package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +3 -2
  45. package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +18 -4
  46. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +34 -4
  47. package/dist/lib/components/ui/feedback/typing-indicator/typing-indicator.d.ts +1 -1
  48. package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +1 -1
  49. package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +1 -1
  50. package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +1 -1
  51. package/dist/lib/components/ui/primitives/toggle/toggle.d.ts +1 -1
  52. package/dist/lib/components/ui/primitives/typography/typography.d.ts +17 -7
  53. package/dist/lib/components/ui/primitives/typography/typography.variants.d.ts +55 -0
  54. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +2 -2
  55. package/dist/lib/i18n/translator.d.ts +1 -1
  56. package/dist/lib.js +2 -2
  57. package/dist/{line-path-BQeLQZ-P.js → line-path-C5pZGC49.js} +1 -1
  58. package/dist/main.js +29 -29
  59. package/dist/map.js +9 -9
  60. package/dist/material.css +1 -1
  61. package/dist/pdf-reader.js +1 -1
  62. package/dist/print.js +1 -1
  63. package/dist/{public-CtpsxV4I.js → public-B0Nq_yYV.js} +524 -524
  64. package/dist/{render-json-DyFYFIkZ.js → render-json-BOhvPnSv.js} +1 -1
  65. package/dist/{rich-code-block-C2Fp_FDU.js → rich-code-block-v7WmeZp9.js} +5 -5
  66. package/dist/{rich-text-viewer-LO1IZCWs.js → rich-text-viewer-W15XIwah.js} +2 -2
  67. package/dist/{skeleton-Bmp4gWAH.js → skeleton-DSdtr2qc.js} +1 -1
  68. package/dist/{sortable-provider-pVaEZzty.js → sortable-provider-CgDTolQR.js} +3 -3
  69. package/dist/{spinner-CsHcmcpF.js → spinner-BtSIYVrC.js} +3 -3
  70. package/dist/{state-scenes-SGNyZjTz.js → state-scenes-BX03WmSu.js} +1 -1
  71. package/dist/styles.css +2 -0
  72. package/dist/theme-picker.js +3 -3
  73. package/dist/{theme-toggle-oU-fh6WE.js → theme-toggle-B2Pehdhn.js} +2 -2
  74. package/dist/{toggle-group-j8zaxEg1.js → toggle-group-BMJNcFAC.js} +1 -1
  75. package/dist/{toolbar-items-CqHvlTU8.js → toolbar-items-rUHdVqAq.js} +399 -398
  76. package/dist/{tooltip-rhbqNmr3.js → tooltip-CkttDIab.js} +1 -1
  77. package/dist/{translate-material-CGZljjp1.js → translate-material-Bd_KgfB8.js} +1 -1
  78. package/dist/{translator-DCYO4Ij3.js → translator-Dje8HrNz.js} +5 -5
  79. package/dist/{use-chat-composer-nWWfVyrK.js → use-chat-composer-Bt2ULsv6.js} +4172 -4172
  80. package/dist/{use-material-translation-DkxcLbLM.js → use-material-translation-B3V_bz-5.js} +1 -1
  81. package/dist/{utils-Bcd2Z3ea.js → utils-BLfntITJ.js} +14 -1
  82. package/docs/components/buttons-and-actions.md +64 -15
  83. package/docs/components/navigation-and-layout.md +1 -1
  84. package/docs/components/primitives.md +52 -10
  85. package/docs/guides/theming.md +51 -0
  86. package/docs/previews/buttons-actions-button.webp +0 -0
  87. package/docs/previews/buttons-actions-iconbutton.webp +0 -0
  88. package/docs/previews/primitives-typography.webp +0 -0
  89. package/docs/roadmap.md +35 -4
  90. package/docs/troubleshooting.md +58 -2
  91. package/lib/components/base.css +21 -6
  92. package/lib/components/components.css +5 -2
  93. package/lib/components/type-scale.css +194 -0
  94. package/lib/components/ui/actions/button/button.css +156 -0
  95. package/lib/components/ui/actions/button-group/button-group-standard.css +131 -0
  96. package/lib/components/ui/actions/button-group/button-group.css +4 -1
  97. package/lib/components/ui/actions/icon-button/icon-button.css +115 -0
  98. package/lib/components/ui/actions/morph-fill.css +62 -0
  99. package/lib/styles.css +2 -0
  100. package/package.json +1 -1
  101. package/dist/button-DbfdITBB.js +0 -322
  102. package/dist/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
  103. package/dist/components/ui/actions/icon-button/icon-button-morph.css +0 -152
  104. package/dist/escape-owner-CripBce_.js +0 -57
  105. package/dist/icon-button-DJcWpIhu.js +0 -319
  106. package/lib/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
  107. package/lib/components/ui/actions/icon-button/icon-button-morph.css +0 -152
package/dist/editor.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { t as e } from "./ui.utils-CAnKTCw5.js";
2
- import { t } from "./utils-Bcd2Z3ea.js";
3
- import { A as n, B as r, C as i, Cn as a, D as o, Dn as s, E as c, En as l, Er as u, F as d, Fn as f, G as p, H as m, In as h, J as g, K as _, Ln as v, M as y, N as b, O as x, On as S, P as C, Qi as ee, Qn as te, Rn as w, S as T, T as E, Tn as ne, Tr as re, U as D, V as ie, Vn as O, W as ae, X as oe, Xi as se, Y as ce, Yi as le, _n as ue, a as de, an as fe, bn as pe, c as me, d as he, g as ge, hr as _e, i as ve, in as ye, j as be, k as xe, l as Se, m as Ce, mn as we, p as Te, pn as Ee, q as De, rn as Oe, s as ke, t as Ae, vn as je, vr as Me, w as Ne, wn as Pe, x as Fe, xn as Ie, yn as Le, z as Re, zn as ze } from "./use-chat-composer-nWWfVyrK.js";
4
- import { f as Be } from "./dialog-CkIYpJXk.js";
5
- import { c as Ve, i as He, n as Ue, o as We, r as Ge, s as Ke, t as qe, u as k } from "./dropdown-menu-BC5Tbhb9.js";
6
- import { c as Je, o as Ye, s as Xe } from "./toolbar-items-CqHvlTU8.js";
7
- import { t as A } from "./use-material-translation-DkxcLbLM.js";
8
- import { t as j } from "./button-DbfdITBB.js";
9
- import { t as M } from "./icon-button-DJcWpIhu.js";
10
- import { r as Ze, t as Qe } from "./field-blur-DPLsMufs.js";
2
+ import { t } from "./utils-BLfntITJ.js";
3
+ import { A as n, B as r, C as i, Cn as a, D as o, Dn as s, E as c, En as l, Er as u, F as d, Fn as f, G as p, H as m, In as h, J as g, K as _, Ln as v, M as y, N as b, O as x, On as S, P as C, Qi as ee, Qn as te, Rn as w, S as T, T as E, Tn as ne, Tr as re, U as D, V as ie, Vn as O, W as ae, X as oe, Xi as se, Y as ce, Yi as le, _n as ue, a as de, an as fe, bn as pe, c as me, d as he, g as ge, hr as _e, i as ve, in as ye, j as be, k as xe, l as Se, m as Ce, mn as we, p as Te, pn as Ee, q as De, rn as Oe, s as ke, t as Ae, vn as je, vr as Me, w as Ne, wn as Pe, x as Fe, xn as Ie, yn as Le, z as Re, zn as ze } from "./use-chat-composer-Bt2ULsv6.js";
4
+ import { f as Be } from "./dialog-BQp5IdFl.js";
5
+ import { c as Ve, i as He, n as Ue, o as We, r as Ge, s as Ke, t as qe, u as k } from "./dropdown-menu-BsH9W_3C.js";
6
+ import { c as Je, o as Ye, s as Xe } from "./toolbar-items-rUHdVqAq.js";
7
+ import { t as A } from "./use-material-translation-B3V_bz-5.js";
8
+ import { t as j } from "./button-BNjw-pnE.js";
9
+ import { t as M } from "./icon-button-ifTpXt0A.js";
10
+ import { r as Ze, t as Qe } from "./field-blur-CJHzVSh9.js";
11
11
  import { a as $e, s as N } from "./dist-C3GR7kJd.js";
12
- import { n as et, t as tt } from "./toggle-group-j8zaxEg1.js";
13
- import { n as nt } from "./icon-badge-q3Ve8gra.js";
12
+ import { n as et, t as tt } from "./toggle-group-BMJNcFAC.js";
13
+ import { n as nt } from "./icon-badge-DUAq9f7H.js";
14
14
  import { t as rt } from "./use-mobile-BDro060N.js";
15
15
  import { Ft as it, Ht as at, Nt as ot, Ot as st, St as ct, bt as P, ht as F, mt as I, n as L, wt as R, xt as lt, yt as ut } from "./dist-moutbfbd.js";
16
16
  import { t as dt } from "./markdown-Dw_uH7j7.js";
@@ -18,7 +18,7 @@ import { n as ft, r as z, t as pt } from "./create-store-Dqp-PLLn.js";
18
18
  import { Z as mt, w as ht } from "./youtube-node-OWSNlYCc.js";
19
19
  import { a as gt, i as _t, n as vt, r as yt } from "./convert-XAkWyO8-.js";
20
20
  import { d as bt, n as xt, r as St, u as Ct } from "./headless-extensions-CvmdhANJ.js";
21
- import { t as wt } from "./render-json-DyFYFIkZ.js";
21
+ import { t as wt } from "./render-json-BOhvPnSv.js";
22
22
  import { n as Tt, r as Et } from "./collab-colors-CDkjUVoQ.js";
23
23
  import { ArrowDown as Dt, ArrowUp as Ot, AtSign as kt, CaseSensitive as At, Check as jt, ChevronDown as Mt, ChevronLeft as Nt, ChevronRight as Pt, ChevronUp as Ft, Code as It, Copy as Lt, CornerDownLeft as Rt, File as zt, Focus as Bt, GripVertical as Vt, Heading1 as Ht, Heading2 as Ut, Heading3 as Wt, Languages as Gt, List as Kt, ListOrdered as qt, Maximize2 as Jt, MessageSquare as Yt, MessageSquarePlus as Xt, Minimize2 as Zt, PenLine as Qt, Pilcrow as $t, Plus as en, Quote as tn, Replace as nn, RotateCcw as rn, Search as an, Smile as on, Sparkles as sn, SpellCheck as cn, Square as ln, TableOfContents as un, TextCursorInput as dn, TextQuote as fn, Trash2 as pn, WandSparkles as mn, WholeWord as hn, X as gn } from "lucide-react";
24
24
  import { Suspense as _n, lazy as vn, useCallback as B, useEffect as V, useId as yn, useLayoutEffect as bn, useMemo as H, useRef as U, useState as W, useSyncExternalStore as G } from "react";
@@ -4613,7 +4613,7 @@ function Wc({ value: e, onChange: t }) {
4613
4613
  }
4614
4614
  //#endregion
4615
4615
  //#region lib/components/ui/widgets/editor/partials/page-mode-views.tsx
4616
- var Gc = vn(() => import("./rich-text-viewer-LO1IZCWs.js").then((e) => e.n).then((e) => ({ default: e.RichTextViewer })));
4616
+ var Gc = vn(() => import("./rich-text-viewer-W15XIwah.js").then((e) => e.n).then((e) => ({ default: e.RichTextViewer })));
4617
4617
  function Kc() {
4618
4618
  let { handle: e } = O(), { editor: t } = e, n = N({
4619
4619
  editor: t,
@@ -1,7 +1,7 @@
1
- import { t as e } from "./utils-Bcd2Z3ea.js";
2
- import { t } from "./use-material-translation-DkxcLbLM.js";
3
- import { i as n } from "./escape-owner-CripBce_.js";
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-SGNyZjTz.js";
1
+ import { t as e } from "./utils-BLfntITJ.js";
2
+ import { t } from "./use-material-translation-B3V_bz-5.js";
3
+ import { i as n } from "./escape-owner-C4W_sOAU.js";
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
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
6
  import { Suspense as v } from "react";
7
7
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
@@ -36,7 +36,7 @@ function E({ scene: e, size: t }) {
36
36
  });
37
37
  }
38
38
  var D = a("illustration", async () => {
39
- let { Illustration: e } = await import("./illustration-BfHRpVzM.js").then((e) => e.n);
39
+ let { Illustration: e } = await import("./illustration-BmQmvW_4.js").then((e) => e.n);
40
40
  return ({ scene: t, size: n }) => /* @__PURE__ */ y(e, {
41
41
  scene: t,
42
42
  size: n
@@ -0,0 +1,116 @@
1
+ import { t as e } from "./utils-BLfntITJ.js";
2
+ import { t } from "./dist-DVRQkaTK.js";
3
+ import { o as n } from "./tooltip-CkttDIab.js";
4
+ import { t as r } from "./button-group-context-CaP0X5p_.js";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ //#region lib/components/ui/actions/button-group/button-group-reset.tsx
7
+ function a({ children: e }) {
8
+ return /* @__PURE__ */ i(r, {
9
+ value: void 0,
10
+ children: e
11
+ });
12
+ }
13
+ //#endregion
14
+ //#region lib/components/ui/primitives/typography/typography.variants.ts
15
+ var o = [
16
+ "display",
17
+ "headline",
18
+ "title",
19
+ "body",
20
+ "label"
21
+ ], s = [
22
+ "lg",
23
+ "md",
24
+ "sm"
25
+ ], c = o.flatMap((e) => s.map((t) => `${e}-${t}`)), l = {
26
+ normal: "body-md",
27
+ "huge-larger": "display-lg-em",
28
+ "huge-large": "display-lg-em",
29
+ "huge-medium": "display-md-em",
30
+ "huge-small": "display-sm-em",
31
+ "headline-larger": "display-sm-em",
32
+ "headline-large": "headline-lg-em",
33
+ "headline-medium": "headline-md-em",
34
+ "headline-small": "headline-sm-em",
35
+ "title-large": "title-lg-em",
36
+ "title-medium": "title-md-em",
37
+ "title-small": "title-sm-em",
38
+ "body-medium": "body-md",
39
+ "body-small": "body-sm",
40
+ caption: "label-sm"
41
+ }, u = {
42
+ "display-lg": ["text-display-lg", "text-display-lg-em"],
43
+ "display-md": ["text-display-md", "text-display-md-em"],
44
+ "display-sm": ["text-display-sm", "text-display-sm-em"],
45
+ "headline-lg": ["text-headline-lg", "text-headline-lg-em"],
46
+ "headline-md": ["text-headline-md", "text-headline-md-em"],
47
+ "headline-sm": ["text-headline-sm", "text-headline-sm-em"],
48
+ "title-lg": ["text-title-lg", "text-title-lg-em"],
49
+ "title-md": ["text-title-md", "text-title-md-em"],
50
+ "title-sm": ["text-title-sm", "text-title-sm-em"],
51
+ "body-lg": ["text-body-lg", "text-body-lg-em"],
52
+ "body-md": ["text-body-md", "text-body-md-em"],
53
+ "body-sm": ["text-body-sm", "text-body-sm-em"],
54
+ "label-lg": ["text-label-lg", "text-label-lg-em"],
55
+ "label-md": ["text-label-md", "text-label-md-em"],
56
+ "label-sm": ["text-label-sm", "text-label-sm-em"]
57
+ }, d = [...c.map((e) => [e, e]), ...Object.entries(l).map(([e, t]) => [e, t.replace(/-em$/, "")])].flatMap(([e, t]) => {
58
+ let [n, r] = u[t];
59
+ return [{
60
+ variant: e,
61
+ emphasized: !1,
62
+ class: e in l && l[e].endsWith("-em") ? r : n
63
+ }, {
64
+ variant: e,
65
+ emphasized: !0,
66
+ class: r
67
+ }];
68
+ }), f = n("", {
69
+ variants: {
70
+ variant: Object.fromEntries([...c, ...Object.keys(l)].map((e) => [e, ""])),
71
+ emphasized: {
72
+ true: "",
73
+ false: ""
74
+ },
75
+ tone: {
76
+ default: "",
77
+ muted: "text-muted-foreground",
78
+ primary: "text-primary-text",
79
+ error: "text-error-text"
80
+ }
81
+ },
82
+ compoundVariants: [...d, {
83
+ variant: "caption",
84
+ tone: "default",
85
+ class: "text-muted-foreground"
86
+ }],
87
+ defaultVariants: {
88
+ variant: "body-md",
89
+ emphasized: !1,
90
+ tone: "default"
91
+ }
92
+ });
93
+ //#endregion
94
+ //#region lib/components/ui/primitives/typography/typography.tsx
95
+ function p({ className: n, variant: r, emphasized: a, tone: o, as: s = "div", asChild: c = !1, ...l }) {
96
+ return /* @__PURE__ */ i(c ? t : s, {
97
+ "data-test": "typography",
98
+ className: e(f({
99
+ variant: r ?? "body-md",
100
+ emphasized: a ?? !1,
101
+ tone: o ?? "default",
102
+ className: n
103
+ })),
104
+ ...l
105
+ });
106
+ }
107
+ //#endregion
108
+ //#region lib/components/ui/overlays/dialog/escape-owner.ts
109
+ var m = /* @__PURE__ */ new WeakSet(), h = "data-escape-owner";
110
+ function g(e, t) {
111
+ let n = e.target?.closest?.(`[${h}]`);
112
+ !n || n === t || !t?.contains(n) || (m.add(e), e.preventDefault());
113
+ }
114
+ var _ = (e) => m.has(e);
115
+ //#endregion
116
+ export { f as a, p as i, _ as n, a as o, g as r, h as t };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./field-blur-context-1ZwJgsHE.js";
1
+ import { t as e } from "./field-blur-context-Cft9s7Hg.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
- import { t as e } from "./utils-Bcd2Z3ea.js";
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-CripBce_.js";
3
+ import { i as n } from "./escape-owner-C4W_sOAU.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";
@@ -1,96 +1,97 @@
1
- import { t as e } from "./utils-Bcd2Z3ea.js";
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-rhbqNmr3.js";
4
+ import { b as s, c, d as l, f as u, u as d, x as f } from "./tooltip-CkttDIab.js";
5
5
  import { t as p } from "./in-dialog-Vwkyp-M5.js";
6
- import * as m from "react";
7
- import { Activity as h } from "react";
8
- import { jsx as g } from "react/jsx-runtime";
6
+ import { o as m } from "./escape-owner-C4W_sOAU.js";
7
+ import * as h from "react";
8
+ import { Activity as g } from "react";
9
+ import { jsx as _ } from "react/jsx-runtime";
9
10
  //#region ../../node_modules/@radix-ui/react-hover-card/dist/index.mjs
10
- var _ = Object.defineProperty, v = (e, t) => _(e, "name", {
11
+ var v = Object.defineProperty, y = (e, t) => v(e, "name", {
11
12
  value: t,
12
13
  configurable: !0
13
- }), y, b = "HoverCard", [x, S] = r(b, [u]), C = u(), [w, T] = x(b), E = /* @__PURE__ */ v((e) => {
14
- let { __scopeHoverCard: t, children: r, open: i, defaultOpen: a, onOpenChange: o, openDelay: s = 700, closeDelay: c = 300 } = e, u = C(t), d = m.useRef(0), f = m.useRef(0), p = m.useRef(!1), h = m.useRef(!1), [_, v] = n({
14
+ }), b, x = "HoverCard", [S, C] = r(x, [u]), w = u(), [T, E] = S(x), D = /* @__PURE__ */ y((e) => {
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({
15
16
  prop: i,
16
17
  defaultProp: a ?? !1,
17
18
  onChange: o,
18
- caller: b
19
- }), y = m.useCallback(() => {
19
+ caller: x
20
+ }), y = h.useCallback(() => {
20
21
  clearTimeout(f.current), d.current = window.setTimeout(() => v(!0), s);
21
- }, [s, v]), x = m.useCallback(() => {
22
- clearTimeout(d.current), !p.current && !h.current && (f.current = window.setTimeout(() => v(!1), c));
23
- }, [c, v]), S = m.useCallback(() => v(!1), [v]);
24
- return m.useEffect(() => () => {
22
+ }, [s, v]), b = h.useCallback(() => {
23
+ clearTimeout(d.current), !p.current && !m.current && (f.current = window.setTimeout(() => v(!1), c));
24
+ }, [c, v]), S = h.useCallback(() => v(!1), [v]);
25
+ return h.useEffect(() => () => {
25
26
  clearTimeout(d.current), clearTimeout(f.current);
26
- }, []), /* @__PURE__ */ g(w, {
27
+ }, []), /* @__PURE__ */ _(T, {
27
28
  scope: t,
28
- open: _,
29
+ open: g,
29
30
  onOpenChange: v,
30
31
  onOpen: y,
31
- onClose: x,
32
+ onClose: b,
32
33
  onDismiss: S,
33
34
  hasSelectionRef: p,
34
- isPointerDownOnContentRef: h,
35
- children: /* @__PURE__ */ g(l, {
35
+ isPointerDownOnContentRef: m,
36
+ children: /* @__PURE__ */ _(l, {
36
37
  ...u,
37
38
  children: r
38
39
  })
39
40
  });
40
- }, "HoverCard"), D = "HoverCardTrigger", O = /* @__PURE__ */ m.forwardRef(/* @__PURE__ */ v(function(e, t) {
41
- let { __scopeHoverCard: n, ...r } = e, i = T(D, n);
42
- return /* @__PURE__ */ g(c, {
41
+ }, "HoverCard"), O = "HoverCardTrigger", k = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ y(function(e, t) {
42
+ let { __scopeHoverCard: n, ...r } = e, i = E(O, n);
43
+ return /* @__PURE__ */ _(c, {
43
44
  asChild: !0,
44
- ...C(n),
45
- children: /* @__PURE__ */ g(a.a, {
45
+ ...w(n),
46
+ children: /* @__PURE__ */ _(a.a, {
46
47
  "data-state": i.open ? "open" : "closed",
47
48
  ...r,
48
49
  ref: t,
49
- onPointerEnter: o(e.onPointerEnter, I(i.onOpen)),
50
- onPointerLeave: o(e.onPointerLeave, I(i.onClose)),
50
+ onPointerEnter: o(e.onPointerEnter, L(i.onOpen)),
51
+ onPointerLeave: o(e.onPointerLeave, L(i.onClose)),
51
52
  onFocus: o(e.onFocus, i.onOpen),
52
53
  onBlur: o(e.onBlur, i.onClose),
53
54
  onTouchStart: o(e.onTouchStart, (e) => e.preventDefault())
54
55
  })
55
56
  });
56
- }, "HoverCardTrigger")), k = "HoverCardPortal", [A, j] = x(k, { forceMount: void 0 }), M = /* @__PURE__ */ v((e) => {
57
- let { __scopeHoverCard: t, forceMount: n, children: r, container: a } = e, o = T(k, t);
58
- return /* @__PURE__ */ g(A, {
57
+ }, "HoverCardTrigger")), A = "HoverCardPortal", [j, M] = S(A, { forceMount: void 0 }), N = /* @__PURE__ */ y((e) => {
58
+ let { __scopeHoverCard: t, forceMount: n, children: r, container: a } = e, o = E(A, t);
59
+ return /* @__PURE__ */ _(j, {
59
60
  scope: t,
60
61
  forceMount: n,
61
- children: /* @__PURE__ */ g(i, {
62
+ children: /* @__PURE__ */ _(i, {
62
63
  present: n || o.open,
63
- children: /* @__PURE__ */ g(s, {
64
+ children: /* @__PURE__ */ _(s, {
64
65
  asChild: !0,
65
66
  container: a,
66
67
  children: r
67
68
  })
68
69
  })
69
70
  });
70
- }, "HoverCardPortal"), N = "HoverCardContent", P = /* @__PURE__ */ m.forwardRef(/* @__PURE__ */ v(function(e, t) {
71
- let n = j(N, e.__scopeHoverCard), { forceMount: r = n.forceMount, ...a } = e, s = T(N, e.__scopeHoverCard);
72
- return /* @__PURE__ */ g(i, {
71
+ }, "HoverCardPortal"), P = "HoverCardContent", F = /* @__PURE__ */ h.forwardRef(/* @__PURE__ */ y(function(e, t) {
72
+ let n = M(P, e.__scopeHoverCard), { forceMount: r = n.forceMount, ...a } = e, s = E(P, e.__scopeHoverCard);
73
+ return /* @__PURE__ */ _(i, {
73
74
  present: r || s.open,
74
- children: /* @__PURE__ */ g(F, {
75
+ children: /* @__PURE__ */ _(I, {
75
76
  "data-state": s.open ? "open" : "closed",
76
77
  ...a,
77
- onPointerEnter: o(e.onPointerEnter, I(s.onOpen)),
78
- onPointerLeave: o(e.onPointerLeave, I(s.onClose)),
78
+ onPointerEnter: o(e.onPointerEnter, L(s.onOpen)),
79
+ onPointerLeave: o(e.onPointerLeave, L(s.onClose)),
79
80
  ref: t
80
81
  })
81
82
  });
82
- }, "HoverCardContent")), F = /* @__PURE__ */ m.forwardRef(/* @__PURE__ */ v(function(e, n) {
83
- let { __scopeHoverCard: r, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: s, onInteractOutside: c, ...l } = e, u = T(N, r), p = C(r), h = m.useRef(null), _ = t(n, h), [b, x] = m.useState(!1);
84
- return m.useEffect(() => {
85
- if (b) {
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);
85
+ return h.useEffect(() => {
86
+ if (v) {
86
87
  let e = document.body;
87
- return y = e.style.userSelect || e.style.webkitUserSelect, e.style.userSelect = "none", e.style.webkitUserSelect = "none", () => {
88
- e.style.userSelect = y, e.style.webkitUserSelect = y;
88
+ return b = e.style.userSelect || e.style.webkitUserSelect, e.style.userSelect = "none", e.style.webkitUserSelect = "none", () => {
89
+ e.style.userSelect = b, e.style.webkitUserSelect = b;
89
90
  };
90
91
  }
91
- }, [b]), m.useEffect(() => {
92
- if (h.current) {
93
- let e = /* @__PURE__ */ v(() => {
92
+ }, [v]), h.useEffect(() => {
93
+ if (m.current) {
94
+ let e = /* @__PURE__ */ y(() => {
94
95
  x(!1), u.isPointerDownOnContentRef.current = !1, setTimeout(() => {
95
96
  document.getSelection()?.toString() !== "" && (u.hasSelectionRef.current = !0);
96
97
  });
@@ -99,9 +100,9 @@ var _ = Object.defineProperty, v = (e, t) => _(e, "name", {
99
100
  document.removeEventListener("pointerup", e), u.hasSelectionRef.current = !1, u.isPointerDownOnContentRef.current = !1;
100
101
  };
101
102
  }
102
- }, [u.isPointerDownOnContentRef, u.hasSelectionRef]), m.useEffect(() => {
103
- h.current && L(h.current).forEach((e) => e.setAttribute("tabindex", "-1"));
104
- }), /* @__PURE__ */ g(f, {
103
+ }, [u.isPointerDownOnContentRef, u.hasSelectionRef]), h.useEffect(() => {
104
+ m.current && R(m.current).forEach((e) => e.setAttribute("tabindex", "-1"));
105
+ }), /* @__PURE__ */ _(f, {
105
106
  asChild: !0,
106
107
  disableOutsidePointerEvents: !1,
107
108
  onInteractOutside: c,
@@ -111,17 +112,17 @@ var _ = Object.defineProperty, v = (e, t) => _(e, "name", {
111
112
  e.preventDefault();
112
113
  }),
113
114
  onDismiss: u.onDismiss,
114
- children: /* @__PURE__ */ g(d, {
115
+ children: /* @__PURE__ */ _(d, {
115
116
  ...p,
116
117
  ...l,
117
118
  onPointerDown: o(l.onPointerDown, (e) => {
118
119
  e.currentTarget.contains(e.target) && x(!0), u.hasSelectionRef.current = !1, u.isPointerDownOnContentRef.current = !0;
119
120
  }),
120
- ref: _,
121
+ ref: g,
121
122
  style: {
122
123
  ...l.style,
123
- userSelect: b ? "text" : void 0,
124
- WebkitUserSelect: b ? "text" : void 0,
124
+ userSelect: v ? "text" : void 0,
125
+ WebkitUserSelect: v ? "text" : void 0,
125
126
  "--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
126
127
  "--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
127
128
  "--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
@@ -131,45 +132,45 @@ var _ = Object.defineProperty, v = (e, t) => _(e, "name", {
131
132
  })
132
133
  });
133
134
  }, "HoverCardContentImpl"));
134
- function I(e) {
135
+ function L(e) {
135
136
  return (t) => t.pointerType === "touch" ? void 0 : e();
136
137
  }
137
- v(I, "excludeTouch");
138
- function L(e) {
139
- let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ v((e) => e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP, "acceptNode") });
138
+ y(L, "excludeTouch");
139
+ function R(e) {
140
+ let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ y((e) => e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP, "acceptNode") });
140
141
  for (; n.nextNode();) t.push(n.currentNode);
141
142
  return t;
142
143
  }
143
- v(L, "getTabbableNodes");
144
- var R = E, z = O, B = M, V = P;
144
+ y(R, "getTabbableNodes");
145
+ var z = D, B = k, V = N, H = F;
145
146
  //#endregion
146
147
  //#region lib/components/ui/primitives/activity/activity.tsx
147
- function H({ visible: e = !1, ...t }) {
148
- return /* @__PURE__ */ g(h, {
148
+ function U({ visible: e = !1, ...t }) {
149
+ return /* @__PURE__ */ _(g, {
149
150
  ...t,
150
151
  mode: e ? "visible" : "hidden"
151
152
  });
152
153
  }
153
154
  //#endregion
154
155
  //#region lib/components/ui/overlays/hover-card/hover-card.tsx
155
- function U({ ...e }) {
156
- return /* @__PURE__ */ g(R, {
156
+ function W({ ...e }) {
157
+ return /* @__PURE__ */ _(z, {
157
158
  "data-slot": "hover-card",
158
159
  ...e
159
160
  });
160
161
  }
161
- function W({ ...e }) {
162
- return /* @__PURE__ */ g(z, {
162
+ function G({ ...e }) {
163
+ return /* @__PURE__ */ _(B, {
163
164
  "data-slot": "hover-card-trigger",
164
165
  ...e
165
166
  });
166
167
  }
167
- function G({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
168
- return /* @__PURE__ */ g(p, {
168
+ function K({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
169
+ return /* @__PURE__ */ _(m, { children: /* @__PURE__ */ _(p, {
169
170
  value: !1,
170
- children: /* @__PURE__ */ g(B, {
171
+ children: /* @__PURE__ */ _(V, {
171
172
  "data-slot": "hover-card-portal",
172
- children: /* @__PURE__ */ g(V, {
173
+ children: /* @__PURE__ */ _(H, {
173
174
  "data-slot": "hover-card-content",
174
175
  align: n,
175
176
  sideOffset: r,
@@ -177,7 +178,7 @@ function G({ className: t, align: n = "center", sideOffset: r = 4, ...i }) {
177
178
  ...i
178
179
  })
179
180
  })
180
- });
181
+ }) });
181
182
  }
182
183
  //#endregion
183
- export { H as i, G as n, W as r, U as t };
184
+ export { U as i, K as n, G as r, W as t };
package/dist/i18n.js CHANGED
@@ -1,10 +1,10 @@
1
- import { a as e, i as t, n, r } from "./stored-language-BeIKw3-K.js";
2
- import { n as i, r as a, t as o } from "./i18n-provider-C6HhBw34.js";
3
- import { i as s, n as c, o as l, r as u, t as d } from "./translator-DCYO4Ij3.js";
4
- import { t as f } from "./is-production-GLw59WU8.js";
1
+ import { t as e } from "./is-production-GLw59WU8.js";
2
+ import { a as t, i as n, n as r, r as i } from "./stored-language-BeIKw3-K.js";
3
+ import { n as a, r as o, t as s } from "./i18n-provider-C6HhBw34.js";
4
+ import { i as c, n as l, o as u, r as d, t as f } from "./translator-Dje8HrNz.js";
5
5
  import { o as p, t as m } from "./merge-BCZE6HGq.js";
6
- import { t as h } from "./translate-material-CGZljjp1.js";
7
- import { t as g } from "./use-material-translation-DkxcLbLM.js";
6
+ import { t as h } from "./translate-material-Bd_KgfB8.js";
7
+ import { t as g } from "./use-material-translation-B3V_bz-5.js";
8
8
  import { useCallback as _ } from "react";
9
9
  //#region lib/i18n/merge-resources.ts
10
10
  function v(e, t, n = "") {
@@ -16,10 +16,10 @@ function v(e, t, n = "") {
16
16
  }
17
17
  return r;
18
18
  }
19
- function y(e, t, n) {
20
- if (f()) return;
21
- let r = v(t, n);
22
- r.length && console.warn(`[@nxgt/material] i18n resource override for language "${e}": ${r.join(", ")}. App resources take precedence over the base bundle at these keys.`);
19
+ function y(t, n, r) {
20
+ if (e()) return;
21
+ let i = v(n, r);
22
+ i.length && console.warn(`[@nxgt/material] i18n resource override for language "${t}": ${i.join(", ")}. App resources take precedence over the base bundle at these keys.`);
23
23
  }
24
24
  function b(e, t) {
25
25
  let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]), r = {};
@@ -33,7 +33,7 @@ function b(e, t) {
33
33
  //#region lib/i18n/use-typed-translation.ts
34
34
  function x(e) {
35
35
  return function() {
36
- let { language: t, changeLanguage: n } = i();
36
+ let { language: t, changeLanguage: n } = a();
37
37
  return {
38
38
  t: _((n, r) => e(n, r, () => t), [t]),
39
39
  i18n: {
@@ -44,4 +44,4 @@ function x(e) {
44
44
  };
45
45
  }
46
46
  //#endregion
47
- export { n as FALLBACK_LANGUAGE, s as FormatMessageError, o as I18nProvider, r as LANGUAGE_KEY, t as SUPPORTED_LANGUAGES, d as createTranslator, x as createTypedTranslation, l as formatMessage, c as getLanguage, b as mergeResources, e as resources, u as translate, h as translateMaterial, i as useI18nContext, g as useMaterialTranslation, a as useOptionalI18nContext };
47
+ export { r as FALLBACK_LANGUAGE, c as FormatMessageError, s as I18nProvider, i as LANGUAGE_KEY, n as SUPPORTED_LANGUAGES, f as createTranslator, x as createTypedTranslation, u as formatMessage, l as getLanguage, b as mergeResources, t as resources, d as translate, h as translateMaterial, a as useI18nContext, g as useMaterialTranslation, o as useOptionalI18nContext };
@@ -1,7 +1,7 @@
1
- import { t as e } from "./utils-Bcd2Z3ea.js";
2
- import { f as t } from "./dialog-CkIYpJXk.js";
3
- import { a as n, i as r, n as i } from "./field-blur-context-1ZwJgsHE.js";
4
- import { t as a } from "./icon-button-DJcWpIhu.js";
1
+ import { t as e } from "./utils-BLfntITJ.js";
2
+ import { f as t } from "./dialog-BQp5IdFl.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-ifTpXt0A.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";