@nxgt/material 3.6.0 → 3.7.1

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 (97) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +46 -1
  3. package/dist/{button-1Fornjtn.js → button--cF4gY14.js} +1 -1
  4. package/dist/charts.js +1 -1
  5. package/dist/{code-editor-DeZYlIO2.js → code-editor-0CdGwKDg.js} +3 -3
  6. package/dist/code-editor.js +3 -3
  7. package/dist/{code-language-items-Bb7afEj-.js → code-language-items-CGARRbVm.js} +1 -1
  8. package/dist/components/animations/scroll.css +1 -1
  9. package/dist/components/base-content.css +1 -1
  10. package/dist/components/base.css +1 -1
  11. package/dist/components/components.css +2 -0
  12. package/dist/components/editor-field-expressive.css +5 -0
  13. package/dist/components/editor-prose.css +1 -1
  14. package/dist/components/theme-tokens.css +17 -4
  15. package/dist/components/ui/display/period-cards/period-cards.css +2 -2
  16. package/dist/components/ui/media/pdf-viewer/pdf-viewer.css +1 -1
  17. package/dist/components/ui/widgets/drawing/drawing-animate.css +123 -0
  18. package/dist/components/ui/widgets/drawing/drawing.css +459 -0
  19. package/dist/{components-BCYZgeoV.js → components-bYGPzyKd.js} +761 -761
  20. package/dist/components.js +18 -18
  21. package/dist/{dialog-JQT6iETD.js → dialog-DdJ1C4BR.js} +168 -168
  22. package/dist/dnd.js +1 -1
  23. package/dist/draw-animate.js +106 -0
  24. package/dist/draw-png.js +2 -0
  25. package/dist/draw-sketch.js +38 -0
  26. package/dist/draw.js +65 -0
  27. package/dist/drawing-B8VuG7nx.js +390 -0
  28. package/dist/drawing-context-CeKeZE6b.js +10 -0
  29. package/dist/{dropdown-menu-DiZvX4tG.js → dropdown-menu-DWtgUVW7.js} +1 -1
  30. package/dist/editor-viewer.js +1 -1
  31. package/dist/editor.js +120 -120
  32. package/dist/{empty-state-Cpvsmk0R.js → empty-state-CRWLQ1sM.js} +2 -2
  33. package/dist/{icon-badge-C30yKsAM.js → icon-badge-Bb5-73XP.js} +18 -18
  34. package/dist/{icon-button-BXlI3DJ_.js → icon-button-5A6Mrj6w.js} +60 -90
  35. package/dist/lib/components/ui/display/shape/use-shape-morph.d.ts +1 -0
  36. package/dist/lib/components/ui/widgets/drawing/drawing-a11y.d.ts +20 -0
  37. package/dist/lib/components/ui/widgets/drawing/drawing-context.d.ts +23 -0
  38. package/dist/lib/components/ui/widgets/drawing/drawing-types.d.ts +63 -0
  39. package/dist/lib/components/ui/widgets/drawing/drawing.d.ts +17 -0
  40. package/dist/lib/components/ui/widgets/drawing/index.d.ts +5 -0
  41. package/dist/lib/components/ui/widgets/drawing/partials/drawing-root.d.ts +17 -0
  42. package/dist/lib/components/ui/widgets/drawing/partials/interactive-node.d.ts +22 -0
  43. package/dist/lib/components/ui/widgets/drawing/partials/primitives/content.d.ts +20 -0
  44. package/dist/lib/components/ui/widgets/drawing/partials/primitives/path.d.ts +29 -0
  45. package/dist/lib/components/ui/widgets/drawing/partials/primitives/primitive.d.ts +19 -0
  46. package/dist/lib/components/ui/widgets/drawing/partials/primitives/shapes.d.ts +18 -0
  47. package/dist/lib/components/ui/widgets/drawing/partials/react-attrs.d.ts +5 -0
  48. package/dist/lib/components/ui/widgets/drawing/partials/ring.d.ts +9 -0
  49. package/dist/lib/components/ui/widgets/drawing/partials/svg-tree.d.ts +29 -0
  50. package/dist/lib/components/ui/widgets/drawing/use-exact-text.d.ts +16 -0
  51. package/dist/lib/draw/index.d.ts +32 -0
  52. package/dist/lib/draw-animate/index.d.ts +19 -0
  53. package/dist/lib/draw-animate/morph-drawing.d.ts +32 -0
  54. package/dist/lib/draw-animate/reduced-motion.d.ts +2 -0
  55. package/dist/lib/draw-animate/use-drawing-controls.d.ts +27 -0
  56. package/dist/lib/draw-animate/use-scene-morph.d.ts +15 -0
  57. package/dist/lib/draw-png/index.d.ts +11 -0
  58. package/dist/lib/draw-sketch/index.d.ts +17 -0
  59. package/dist/lib/draw-sketch/sketch.d.ts +19 -0
  60. package/dist/lib/print/components/print-drawing.d.ts +16 -0
  61. package/dist/lib/print/index.d.ts +2 -1
  62. package/dist/main.js +23 -23
  63. package/dist/map.js +63 -63
  64. package/dist/material.css +1 -1
  65. package/dist/pdf-reader.js +1 -1
  66. package/dist/print.js +123 -115
  67. package/dist/{public-Cde8_SN8.js → public-SsiazLEv.js} +743 -743
  68. package/dist/{render-json-BwJX1jZ2.js → render-json-DyFYFIkZ.js} +1 -1
  69. package/dist/{rich-code-block-yxMXBuGd.js → rich-code-block-CwNwQs5z.js} +3 -3
  70. package/dist/{rich-text-viewer-Bq-2vTVm.js → rich-text-viewer-LO1IZCWs.js} +1 -1
  71. package/dist/{sortable-provider-DYlpq8lP.js → sortable-provider-BvD98s8Y.js} +19 -19
  72. package/dist/{spinner-D-FE_mTW.js → spinner-CtGCPza-.js} +4 -4
  73. package/dist/styles.css +1 -0
  74. package/dist/{toolbar-items-DnkS3bDY.js → toolbar-items-DsDDD5AY.js} +1 -1
  75. package/dist/{use-chat-composer-BwpSgP_D.js → use-chat-composer-DZ01a16D.js} +923 -922
  76. package/dist/use-shape-morph-BKA_R5P5.js +35 -0
  77. package/docs/README.md +1 -0
  78. package/docs/components/rich-widgets.md +196 -0
  79. package/docs/guides/drawing.md +499 -0
  80. package/docs/guides/printing.md +47 -0
  81. package/docs/guides/theming.md +3 -2
  82. package/docs/previews/rich-widgets-drawing.webp +0 -0
  83. package/docs/roadmap.md +17 -0
  84. package/docs/troubleshooting.md +145 -1
  85. package/lib/components/animations/scroll.css +1 -1
  86. package/lib/components/base-content.css +1 -1
  87. package/lib/components/base.css +1 -1
  88. package/lib/components/components.css +2 -0
  89. package/lib/components/editor-field-expressive.css +5 -0
  90. package/lib/components/editor-prose.css +1 -1
  91. package/lib/components/theme-tokens.css +17 -4
  92. package/lib/components/ui/display/period-cards/period-cards.css +2 -2
  93. package/lib/components/ui/media/pdf-viewer/pdf-viewer.css +1 -1
  94. package/lib/components/ui/widgets/drawing/drawing-animate.css +123 -0
  95. package/lib/components/ui/widgets/drawing/drawing.css +459 -0
  96. package/lib/styles.css +1 -0
  97. package/package.json +22 -2
@@ -1,127 +1,127 @@
1
1
  import { t as e } from "./utils-Bcd2Z3ea.js";
2
- import { n as t } from "./icon-button-BXlI3DJ_.js";
3
- import { A as n, C as r, D as i, E as a, I as o, M as s, O as c, R as l, S as u, T as d, k as f, o as p, x as m } from "./tooltip-tmFoTU_d.js";
4
- import { c as h, i as g, l as ee, o as te, r as _, s as ne, t as re } from "./in-dialog-AiwTD3DK.js";
5
- import { t as ie } from "./use-material-translation-hLQzOjF0.js";
6
- import { r as ae } from "./escape-owner-B8k7DvFa.js";
7
- import { X as oe } from "lucide-react";
8
- import * as v from "react";
9
- import { useCallback as se, useContext as ce, useRef as y } from "react";
10
- import { Fragment as le, jsx as b, jsxs as ue } from "react/jsx-runtime";
11
- import { forwardEscape as de, keepListEscape as fe } from "@nxgt/material-core/escape-forward";
2
+ import { A as t, C as n, D as r, E as i, I as a, M as o, O as s, R as c, S as l, T as u, k as d, o as f, x as p } from "./tooltip-tmFoTU_d.js";
3
+ import { c as m, i as h, l as g, o as ee, r as _, s as te, t as ne } from "./in-dialog-AiwTD3DK.js";
4
+ import { t as v } from "./use-material-translation-hLQzOjF0.js";
5
+ import { n as re } from "./icon-button-5A6Mrj6w.js";
6
+ import { r as ie } from "./escape-owner-B8k7DvFa.js";
7
+ import { X as ae } from "lucide-react";
8
+ import * as y from "react";
9
+ import { useCallback as oe, useContext as se, useRef as b } from "react";
10
+ import { Fragment as ce, jsx as x, jsxs as le } from "react/jsx-runtime";
11
+ import { forwardEscape as ue, keepListEscape as de } from "@nxgt/material-core/escape-forward";
12
12
  //#region ../../node_modules/@radix-ui/react-dialog/dist/index.mjs
13
- var pe = Object.defineProperty, x = (e, t) => pe(e, "name", {
13
+ var fe = Object.defineProperty, S = (e, t) => fe(e, "name", {
14
14
  value: t,
15
15
  configurable: !0
16
- }), S = "Dialog", [C, me] = n(S), [he, w] = C(S), T = /* @__PURE__ */ x((e) => {
17
- let { __scopeDialog: t, children: n, open: r, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = v.useRef(null), l = v.useRef(null), [u, f] = i({
18
- prop: r,
16
+ }), C = "Dialog", [w, pe] = t(C), [me, T] = w(C), E = /* @__PURE__ */ S((e) => {
17
+ let { __scopeDialog: t, children: n, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = y.useRef(null), l = y.useRef(null), [d, f] = r({
18
+ prop: i,
19
19
  defaultProp: a ?? !1,
20
20
  onChange: o,
21
- caller: S
22
- }), [p, m] = v.useState(0), [h, g] = v.useState(0);
23
- return /* @__PURE__ */ b(he, {
21
+ caller: C
22
+ }), [p, m] = y.useState(0), [h, g] = y.useState(0);
23
+ return /* @__PURE__ */ x(me, {
24
24
  scope: t,
25
25
  triggerRef: c,
26
26
  contentRef: l,
27
- contentId: d(),
28
- titleId: d(),
29
- descriptionId: d(),
27
+ contentId: u(),
28
+ titleId: u(),
29
+ descriptionId: u(),
30
30
  titlePresent: p > 0,
31
31
  descriptionPresent: h > 0,
32
32
  setTitleCount: m,
33
33
  setDescriptionCount: g,
34
- open: u,
34
+ open: d,
35
35
  onOpenChange: f,
36
- onOpenToggle: v.useCallback(() => f((e) => !e), [f]),
36
+ onOpenToggle: y.useCallback(() => f((e) => !e), [f]),
37
37
  modal: s,
38
38
  children: n
39
39
  });
40
- }, "Dialog"), ge = "DialogTrigger", E = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
41
- let { __scopeDialog: n, ...r } = e, i = w(ge, n), a = l(t, i.triggerRef);
42
- return /* @__PURE__ */ b(s.button, {
40
+ }, "Dialog"), he = "DialogTrigger", D = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
41
+ let { __scopeDialog: n, ...r } = e, i = T(he, n), a = c(t, i.triggerRef);
42
+ return /* @__PURE__ */ x(o.button, {
43
43
  type: "button",
44
44
  "aria-haspopup": "dialog",
45
45
  "aria-expanded": i.open,
46
46
  "aria-controls": i.open ? i.contentId : void 0,
47
- "data-state": R(i.open),
47
+ "data-state": z(i.open),
48
48
  ...r,
49
49
  ref: a,
50
- onClick: f(e.onClick, i.onOpenToggle)
50
+ onClick: d(e.onClick, i.onOpenToggle)
51
51
  });
52
- }, "DialogTrigger")), D = "DialogPortal", [_e, O] = C(D, { forceMount: void 0 }), k = /* @__PURE__ */ x((e) => {
53
- let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, o = w(D, t);
54
- return /* @__PURE__ */ b(_e, {
52
+ }, "DialogTrigger")), O = "DialogPortal", [ge, k] = w(O, { forceMount: void 0 }), A = /* @__PURE__ */ S((e) => {
53
+ let { __scopeDialog: t, forceMount: n, children: r, container: a } = e, o = T(O, t);
54
+ return /* @__PURE__ */ x(ge, {
55
55
  scope: t,
56
56
  forceMount: n,
57
- children: v.Children.map(r, (e) => /* @__PURE__ */ b(a, {
57
+ children: y.Children.map(r, (e) => /* @__PURE__ */ x(i, {
58
58
  present: n || o.open,
59
- children: /* @__PURE__ */ b(m, {
59
+ children: /* @__PURE__ */ x(p, {
60
60
  asChild: !0,
61
- container: i,
61
+ container: a,
62
62
  children: e
63
63
  })
64
64
  }))
65
65
  });
66
- }, "DialogPortal"), A = "DialogOverlay", j = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
67
- let n = O(A, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, o = w(A, e.__scopeDialog);
68
- return o.modal ? /* @__PURE__ */ b(a, {
66
+ }, "DialogPortal"), j = "DialogOverlay", M = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
67
+ let n = k(j, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = T(j, e.__scopeDialog);
68
+ return o.modal ? /* @__PURE__ */ x(i, {
69
69
  present: r || o.open,
70
- children: /* @__PURE__ */ b(ye, {
71
- ...i,
70
+ children: /* @__PURE__ */ x(ve, {
71
+ ...a,
72
72
  ref: t
73
73
  })
74
74
  }) : null;
75
- }, "DialogOverlay")), ve = o("DialogOverlay.RemoveScroll"), ye = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
76
- let { __scopeDialog: n, ...i } = e, a = w(A, n), o = l(t, r());
77
- return /* @__PURE__ */ b(ne, {
78
- as: ve,
75
+ }, "DialogOverlay")), _e = a("DialogOverlay.RemoveScroll"), ve = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
76
+ let { __scopeDialog: r, ...i } = e, a = T(j, r), s = c(t, n());
77
+ return /* @__PURE__ */ x(te, {
78
+ as: _e,
79
79
  allowPinchZoom: !0,
80
80
  shards: [a.contentRef],
81
- children: /* @__PURE__ */ b(s.div, {
82
- "data-state": R(a.open),
81
+ children: /* @__PURE__ */ x(o.div, {
82
+ "data-state": z(a.open),
83
83
  ...i,
84
- ref: o,
84
+ ref: s,
85
85
  style: {
86
86
  pointerEvents: "auto",
87
87
  ...i.style
88
88
  }
89
89
  })
90
90
  });
91
- }, "DialogOverlayImpl")), M = "DialogContent", N = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
92
- let n = O(M, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, o = w(M, e.__scopeDialog);
93
- return /* @__PURE__ */ b(a, {
91
+ }, "DialogOverlayImpl")), N = "DialogContent", P = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
92
+ let n = k(N, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = T(N, e.__scopeDialog);
93
+ return /* @__PURE__ */ x(i, {
94
94
  present: r || o.open,
95
- children: o.modal ? /* @__PURE__ */ b(be, {
96
- ...i,
95
+ children: o.modal ? /* @__PURE__ */ x(ye, {
96
+ ...a,
97
97
  ref: t
98
- }) : /* @__PURE__ */ b(xe, {
99
- ...i,
98
+ }) : /* @__PURE__ */ x(be, {
99
+ ...a,
100
100
  ref: t
101
101
  })
102
102
  });
103
- }, "DialogContent")), be = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
104
- let n = w(M, e.__scopeDialog), r = v.useRef(null), i = l(t, n.contentRef, r);
105
- return v.useEffect(() => {
103
+ }, "DialogContent")), ye = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
104
+ let n = T(N, e.__scopeDialog), r = y.useRef(null), i = c(t, n.contentRef, r);
105
+ return y.useEffect(() => {
106
106
  let e = r.current;
107
- if (e) return te(e);
108
- }, []), /* @__PURE__ */ b(P, {
107
+ if (e) return ee(e);
108
+ }, []), /* @__PURE__ */ x(F, {
109
109
  ...e,
110
110
  ref: i,
111
111
  trapFocus: n.open,
112
112
  disableOutsidePointerEvents: n.open,
113
- onCloseAutoFocus: f(e.onCloseAutoFocus, (e) => {
113
+ onCloseAutoFocus: d(e.onCloseAutoFocus, (e) => {
114
114
  e.preventDefault(), n.triggerRef.current?.focus();
115
115
  }),
116
- onPointerDownOutside: f(e.onPointerDownOutside, (e) => {
116
+ onPointerDownOutside: d(e.onPointerDownOutside, (e) => {
117
117
  let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
118
118
  (t.button === 2 || n) && e.preventDefault();
119
119
  }),
120
- onFocusOutside: f(e.onFocusOutside, (e) => e.preventDefault())
120
+ onFocusOutside: d(e.onFocusOutside, (e) => e.preventDefault())
121
121
  });
122
- }, "DialogContentModal")), xe = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
123
- let n = w(M, e.__scopeDialog), r = v.useRef(!1), i = v.useRef(!1);
124
- return /* @__PURE__ */ b(P, {
122
+ }, "DialogContentModal")), be = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
123
+ let n = T(N, e.__scopeDialog), r = y.useRef(!1), i = y.useRef(!1);
124
+ return /* @__PURE__ */ x(F, {
125
125
  ...e,
126
126
  ref: t,
127
127
  trapFocus: !1,
@@ -135,69 +135,69 @@ var pe = Object.defineProperty, x = (e, t) => pe(e, "name", {
135
135
  n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
136
136
  }
137
137
  });
138
- }, "DialogContentNonModal")), P = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
139
- let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...o } = e, s = w(M, n);
140
- return h(), /* @__PURE__ */ b(le, { children: /* @__PURE__ */ b(ee, {
138
+ }, "DialogContentNonModal")), F = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
139
+ let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, ...o } = e, s = T(N, n);
140
+ return m(), /* @__PURE__ */ x(ce, { children: /* @__PURE__ */ x(g, {
141
141
  asChild: !0,
142
142
  loop: !0,
143
143
  trapped: r,
144
144
  onMountAutoFocus: i,
145
145
  onUnmountAutoFocus: a,
146
- children: /* @__PURE__ */ b(u, {
146
+ children: /* @__PURE__ */ x(l, {
147
147
  role: "dialog",
148
148
  id: s.contentId,
149
149
  "aria-describedby": s.descriptionPresent ? s.descriptionId : void 0,
150
150
  "aria-labelledby": s.titlePresent ? s.titleId : void 0,
151
- "data-state": R(s.open),
151
+ "data-state": z(s.open),
152
152
  ...o,
153
153
  ref: t,
154
154
  deferPointerDownOutside: !0,
155
155
  onDismiss: () => s.onOpenChange(!1)
156
156
  })
157
157
  }) });
158
- }, "DialogContentImpl")), Se = "DialogTitle", F = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
159
- let { __scopeDialog: n, ...r } = e, i = w(Se, n), { setTitleCount: a } = i;
160
- return c(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ b(s.h2, {
158
+ }, "DialogContentImpl")), xe = "DialogTitle", I = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
159
+ let { __scopeDialog: n, ...r } = e, i = T(xe, n), { setTitleCount: a } = i;
160
+ return s(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ x(o.h2, {
161
161
  id: i.titleId,
162
162
  ...r,
163
163
  ref: t
164
164
  });
165
- }, "DialogTitle")), Ce = "DialogDescription", I = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
166
- let { __scopeDialog: n, ...r } = e, i = w(Ce, n), { setDescriptionCount: a } = i;
167
- return c(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ b(s.p, {
165
+ }, "DialogTitle")), Se = "DialogDescription", L = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
166
+ let { __scopeDialog: n, ...r } = e, i = T(Se, n), { setDescriptionCount: a } = i;
167
+ return s(() => (a((e) => e + 1), () => a((e) => e - 1)), [a]), /* @__PURE__ */ x(o.p, {
168
168
  id: i.descriptionId,
169
169
  ...r,
170
170
  ref: t
171
171
  });
172
- }, "DialogDescription")), we = "DialogClose", L = /* @__PURE__ */ v.forwardRef(/* @__PURE__ */ x(function(e, t) {
173
- let { __scopeDialog: n, ...r } = e, i = w(we, n);
174
- return /* @__PURE__ */ b(s.button, {
172
+ }, "DialogDescription")), Ce = "DialogClose", R = /* @__PURE__ */ y.forwardRef(/* @__PURE__ */ S(function(e, t) {
173
+ let { __scopeDialog: n, ...r } = e, i = T(Ce, n);
174
+ return /* @__PURE__ */ x(o.button, {
175
175
  type: "button",
176
176
  ...r,
177
177
  ref: t,
178
- onClick: f(e.onClick, () => i.onOpenChange(!1))
178
+ onClick: d(e.onClick, () => i.onOpenChange(!1))
179
179
  });
180
180
  }, "DialogClose"));
181
- function R(e) {
181
+ function z(e) {
182
182
  return e ? "open" : "closed";
183
183
  }
184
- x(R, "getState");
184
+ S(z, "getState");
185
185
  //#endregion
186
186
  //#region lib/components/ui/primitives/field-box/field-box.ts
187
- var z = "nxgt-field-box", Te = "nxgt-field-list", B = (e) => e ? "" : void 0;
188
- function Ee(e) {
187
+ var B = "nxgt-field-box", we = "nxgt-field-list", V = (e) => e ? "" : void 0;
188
+ function Te(e) {
189
189
  return {
190
190
  "data-size": e.size,
191
- "data-filled": B(e.filled),
192
- "data-open": B(e.list?.open),
191
+ "data-filled": V(e.filled),
192
+ "data-open": V(e.list?.open),
193
193
  "data-list-side": e.list?.open ? e.list.side : void 0,
194
- "data-focused": B(e.focused),
195
- "data-invalid": B(e.invalid),
196
- "data-disabled": B(e.disabled),
197
- "data-readonly": B(e.readOnly)
194
+ "data-focused": V(e.focused),
195
+ "data-invalid": V(e.invalid),
196
+ "data-disabled": V(e.disabled),
197
+ "data-readonly": V(e.readOnly)
198
198
  };
199
199
  }
200
- var De = /* @__PURE__ */ new Set([
200
+ var Ee = /* @__PURE__ */ new Set([
201
201
  "checkbox",
202
202
  "radio",
203
203
  "file",
@@ -209,48 +209,48 @@ var De = /* @__PURE__ */ new Set([
209
209
  "reset",
210
210
  "image"
211
211
  ]);
212
- function V(e, t = "text") {
213
- return e || (De.has(t) ? void 0 : " ");
212
+ function H(e, t = "text") {
213
+ return e || (Ee.has(t) ? void 0 : " ");
214
214
  }
215
215
  //#endregion
216
216
  //#region lib/components/ui/overlays/dialog/use-escape-forward.ts
217
- function Oe(e, t) {
218
- let n = y(null);
217
+ function De(e, t) {
218
+ let n = b(null);
219
219
  return {
220
- ref: l(n, t),
220
+ ref: c(n, t),
221
221
  onEscapeKeyDown(t) {
222
- fe(t), ae(t, n.current), e?.(t), de(n.current, t);
222
+ de(t), ie(t, n.current), e?.(t), ue(n.current, t);
223
223
  }
224
224
  };
225
225
  }
226
226
  //#endregion
227
227
  //#region lib/components/ui/overlays/dialog/use-overlay-order.ts
228
- function ke(e) {
229
- let t = y(null);
228
+ function Oe(e) {
229
+ let t = b(null);
230
230
  return {
231
- overlayRef: se((e) => {
231
+ overlayRef: oe((e) => {
232
232
  let n = t.current;
233
233
  !e || !n?.isConnected || n.parentNode === e.parentNode && n.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING && n.before(e);
234
234
  }, []),
235
- contentRef: l(t, e)
235
+ contentRef: c(t, e)
236
236
  };
237
237
  }
238
238
  //#endregion
239
239
  //#region lib/components/ui/overlays/dialog/use-modal-content.ts
240
- function H({ ref: e, onEscapeKeyDown: t, ...n }, r) {
241
- let i = ce(_) ?? !0, a = Oe(t, g(r ?? i, e)), o = ke(a.ref);
240
+ function U({ ref: e, onEscapeKeyDown: t, ...n }, r) {
241
+ let i = se(_) ?? !0, a = De(t, h(r ?? i, e)), o = Oe(a.ref);
242
242
  return {
243
243
  ref: o.contentRef,
244
244
  overlayRef: o.overlayRef,
245
245
  onEscapeKeyDown: a.onEscapeKeyDown,
246
246
  outside: {
247
- onPointerDownOutside: U(n.onPointerDownOutside),
248
- onFocusOutside: U(n.onFocusOutside),
249
- onInteractOutside: U(n.onInteractOutside)
247
+ onPointerDownOutside: W(n.onPointerDownOutside),
248
+ onFocusOutside: W(n.onFocusOutside),
249
+ onInteractOutside: W(n.onInteractOutside)
250
250
  }
251
251
  };
252
252
  }
253
- function U(e) {
253
+ function W(e) {
254
254
  return (t) => {
255
255
  e?.(t);
256
256
  let n = t.target;
@@ -259,33 +259,33 @@ function U(e) {
259
259
  }
260
260
  //#endregion
261
261
  //#region lib/components/ui/overlays/dialog/menu-trigger.ts
262
- var W = "[role=\"menu\"]", Ae = 8;
263
- function je(e) {
264
- let t = null, n = e?.closest(W) ?? null;
265
- for (let e = 0; n && e < Ae; e++) {
262
+ var G = "[role=\"menu\"]", ke = 8;
263
+ function Ae(e) {
264
+ let t = null, n = e?.closest(G) ?? null;
265
+ for (let e = 0; n && e < ke; e++) {
266
266
  let e = n.getAttribute("data-return-focus"), r = e ? n.ownerDocument.getElementById(e) : null;
267
267
  if (r) return r;
268
268
  let [i] = (n.getAttribute("aria-labelledby") ?? "").split(/\s+/), a = i ? n.ownerDocument.getElementById(i) : null;
269
269
  if (!a) break;
270
- t = a, n = a.closest(W);
270
+ t = a, n = a.closest(G);
271
271
  }
272
272
  return t;
273
273
  }
274
274
  //#endregion
275
275
  //#region lib/components/ui/overlays/dialog/use-return-focus.ts
276
- var Me = "button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
277
- function Ne(e) {
278
- ([...e.querySelectorAll(Me)].find((e) => e.tabIndex >= 0 && e.getClientRects().length > 0) ?? e).focus({ preventScroll: !0 });
276
+ var je = "button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
277
+ function Me(e) {
278
+ ([...e.querySelectorAll(je)].find((e) => e.tabIndex >= 0 && e.getClientRects().length > 0) ?? e).focus({ preventScroll: !0 });
279
279
  }
280
- function G(e, { focusFallback: t = !1 } = {}) {
281
- let n = y(null), r = y(null);
280
+ function K(e, { focusFallback: t = !1 } = {}) {
281
+ let n = b(null), r = b(null);
282
282
  return {
283
283
  onOpenAutoFocus(i) {
284
284
  let a = document.activeElement;
285
- n.current = a instanceof HTMLElement && a !== document.body ? a : null, r.current = je(n.current), e.onOpenAutoFocus?.(i);
285
+ n.current = a instanceof HTMLElement && a !== document.body ? a : null, r.current = Ae(n.current), e.onOpenAutoFocus?.(i);
286
286
  let o = i.target;
287
287
  !t || i.defaultPrevented || !(o instanceof HTMLElement) || queueMicrotask(() => {
288
- o.isConnected && !o.contains(document.activeElement) && Ne(o);
288
+ o.isConnected && !o.contains(document.activeElement) && Me(o);
289
289
  });
290
290
  },
291
291
  onCloseAutoFocus(t) {
@@ -299,49 +299,49 @@ function G(e, { focusFallback: t = !1 } = {}) {
299
299
  }
300
300
  //#endregion
301
301
  //#region lib/components/ui/primitives/input/input-box.ts
302
- var Pe = "selection:bg-primary selection:text-primary-foreground", K = [
302
+ var Ne = "selection:bg-primary selection:text-primary-foreground", q = [
303
303
  "inline-flex gap-2 items-center h-11 max-h-full w-full min-w-0",
304
304
  "px-2 py-1 text-base md:text-sm outline-none",
305
305
  "placeholder:text-muted-foreground",
306
306
  "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-muted-foreground",
307
307
  "disabled:pointer-events-none"
308
- ], q = [
309
- ...K,
310
- Pe,
311
- z
312
- ], Fe = [...K, z], J = q;
313
- function Ie({ className: t, type: n = "text", ...r }) {
314
- return /* @__PURE__ */ b("input", {
308
+ ], J = [
309
+ ...q,
310
+ Ne,
311
+ B
312
+ ], Pe = [...q, B], Y = J;
313
+ function Fe({ className: t, type: n = "text", ...r }) {
314
+ return /* @__PURE__ */ x("input", {
315
315
  type: n,
316
316
  "data-slot": "input",
317
- className: e(J, t),
317
+ className: e(Y, t),
318
318
  "data-pw": r.name ?? "input",
319
319
  ...r,
320
- placeholder: V(r.placeholder, n)
320
+ placeholder: H(r.placeholder, n)
321
321
  });
322
322
  }
323
323
  //#endregion
324
324
  //#region lib/components/ui/overlays/dialog/dialog-outside.ts
325
- function Le(e) {
325
+ function Ie(e) {
326
326
  let t = e.target;
327
327
  t instanceof Element && t.closest("[data-slot=\"combobox-content\"]") && e.preventDefault();
328
328
  }
329
- function Y(e) {
329
+ function X(e) {
330
330
  return (t) => {
331
- Le(t), e?.(t);
331
+ Ie(t), e?.(t);
332
332
  };
333
333
  }
334
- function X(e) {
334
+ function Z(e) {
335
335
  return {
336
336
  ...e,
337
- onPointerDownOutside: Y(e.onPointerDownOutside),
338
- onFocusOutside: Y(e.onFocusOutside),
339
- onInteractOutside: Y(e.onInteractOutside)
337
+ onPointerDownOutside: X(e.onPointerDownOutside),
338
+ onFocusOutside: X(e.onFocusOutside),
339
+ onInteractOutside: X(e.onInteractOutside)
340
340
  };
341
341
  }
342
342
  //#endregion
343
343
  //#region lib/components/ui/overlays/dialog/dialog-variants.ts
344
- var Re = p("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 p-6 max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto", {
344
+ var Le = f("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 p-6 max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto", {
345
345
  variants: {
346
346
  size: {
347
347
  sm: "sm:max-w-sm",
@@ -363,29 +363,29 @@ var Re = p("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(
363
363
  });
364
364
  //#endregion
365
365
  //#region lib/components/ui/overlays/dialog/dialog-parts.tsx
366
- function ze({ className: t, ...n }) {
367
- return /* @__PURE__ */ b("div", {
366
+ function Re({ className: t, ...n }) {
367
+ return /* @__PURE__ */ x("div", {
368
368
  "data-slot": "dialog-header",
369
369
  className: e("flex flex-col gap-2 text-center sm:text-left", t),
370
370
  ...n
371
371
  });
372
372
  }
373
- function Be({ className: t, ...n }) {
374
- return /* @__PURE__ */ b("div", {
373
+ function ze({ className: t, ...n }) {
374
+ return /* @__PURE__ */ x("div", {
375
375
  "data-slot": "dialog-footer",
376
376
  className: e("flex flex-col-reverse gap-2 pt-2 max-sm:*:w-full sm:flex-row sm:justify-end", t),
377
377
  ...n
378
378
  });
379
379
  }
380
- function Ve({ className: t, ...n }) {
381
- return /* @__PURE__ */ b(F, {
380
+ function Be({ className: t, ...n }) {
381
+ return /* @__PURE__ */ x(I, {
382
382
  "data-slot": "dialog-title",
383
383
  className: e("text-2xl/8 font-medium tracking-tight text-foreground", t),
384
384
  ...n
385
385
  });
386
386
  }
387
- function He({ className: t, ...n }) {
388
- return /* @__PURE__ */ b(I, {
387
+ function Ve({ className: t, ...n }) {
388
+ return /* @__PURE__ */ x(L, {
389
389
  "data-slot": "dialog-description",
390
390
  className: e("text-muted-foreground text-sm/6", t),
391
391
  ...n
@@ -393,45 +393,45 @@ function He({ className: t, ...n }) {
393
393
  }
394
394
  //#endregion
395
395
  //#region lib/components/ui/overlays/dialog/dialog.tsx
396
- function Z({ ...e }) {
397
- return /* @__PURE__ */ b(_, {
396
+ function He({ ...e }) {
397
+ return /* @__PURE__ */ x(_, {
398
398
  value: e.modal ?? !0,
399
- children: /* @__PURE__ */ b(T, {
399
+ children: /* @__PURE__ */ x(E, {
400
400
  "data-slot": "dialog",
401
401
  ...e
402
402
  })
403
403
  });
404
404
  }
405
405
  function Ue({ asChild: e = !0, ...t }) {
406
- return /* @__PURE__ */ b(E, {
406
+ return /* @__PURE__ */ x(D, {
407
407
  "data-slot": "dialog-trigger",
408
408
  ...t,
409
409
  asChild: e
410
410
  });
411
411
  }
412
412
  function Q({ ...e }) {
413
- return /* @__PURE__ */ b(k, {
413
+ return /* @__PURE__ */ x(A, {
414
414
  "data-slot": "dialog-portal",
415
415
  ...e
416
416
  });
417
417
  }
418
- function We({ className: n, color: r, children: i, type: a = "button", variant: o = "ghost", ...s }) {
419
- let { t: c } = ie();
420
- return /* @__PURE__ */ b(L, {
421
- "aria-label": i ? void 0 : c("material.buttons.close", "Close"),
422
- ...s,
423
- type: a,
424
- className: e("absolute top-4 right-4", t({
425
- variant: o,
426
- color: r,
427
- className: n
418
+ function We({ className: t, color: n, children: r, type: i = "button", variant: a = "ghost", ...o }) {
419
+ let { t: s } = v();
420
+ return /* @__PURE__ */ x(R, {
421
+ "aria-label": r ? void 0 : s("material.buttons.close", "Close"),
422
+ ...o,
423
+ type: i,
424
+ className: e("absolute top-4 right-4", re({
425
+ variant: a,
426
+ color: n,
427
+ className: t
428
428
  })),
429
429
  "data-slot": "dialog-close",
430
- children: i || /* @__PURE__ */ b(oe, { className: "size-4" })
430
+ children: r || /* @__PURE__ */ x(ae, { className: "size-4" })
431
431
  });
432
432
  }
433
433
  function $({ className: t, scrim: n = "dim", ...r }) {
434
- return /* @__PURE__ */ b(j, {
434
+ return /* @__PURE__ */ x(M, {
435
435
  "data-slot": "dialog-overlay",
436
436
  "data-scrim": n,
437
437
  className: e("nxgt-scrim fixed inset-0 z-50", t),
@@ -439,29 +439,29 @@ function $({ className: t, scrim: n = "dim", ...r }) {
439
439
  });
440
440
  }
441
441
  function Ge({ className: t, children: n, onInteractOutside: r, onPointerDownOutside: i, onFocusOutside: a, onOpenAutoFocus: o, onCloseAutoFocus: s, onEscapeKeyDown: c, size: l, mobilePresentation: u, scrim: d, container: f, ref: p, ...m }) {
442
- let h = G({
442
+ let h = K({
443
443
  onOpenAutoFocus: o,
444
444
  onCloseAutoFocus: s
445
- }), g = H(X({
445
+ }), g = U(Z({
446
446
  ref: p,
447
447
  onEscapeKeyDown: c,
448
448
  onInteractOutside: r,
449
449
  onPointerDownOutside: i,
450
450
  onFocusOutside: a
451
451
  }));
452
- return /* @__PURE__ */ b(re, {
452
+ return /* @__PURE__ */ x(ne, {
453
453
  value: !0,
454
- children: /* @__PURE__ */ ue(Q, {
454
+ children: /* @__PURE__ */ le(Q, {
455
455
  "data-slot": "dialog-portal",
456
456
  container: f,
457
- children: [/* @__PURE__ */ b($, {
457
+ children: [/* @__PURE__ */ x($, {
458
458
  ref: g.overlayRef,
459
459
  scrim: d
460
- }), /* @__PURE__ */ b(N, {
460
+ }), /* @__PURE__ */ x(P, {
461
461
  ref: g.ref,
462
462
  "data-slot": "dialog-content",
463
463
  "data-presentation": u ?? void 0,
464
- className: e(Re({
464
+ className: e(Le({
465
465
  size: l,
466
466
  mobilePresentation: u
467
467
  }), t),
@@ -476,4 +476,4 @@ function Ge({ className: t, children: n, onInteractOutside: r, onPointerDownOuts
476
476
  });
477
477
  }
478
478
  //#endregion
479
- export { me as A, L as C, k as D, j as E, F as O, T as S, I as T, H as _, Q as a, Te as b, Be as c, X as d, Ie as f, G as g, Fe as h, $ as i, E as k, ze as l, q as m, We as n, Ue as o, J as p, Ge as r, He as s, Z as t, Ve as u, V as v, N as w, Ee as x, z as y };
479
+ export { pe as A, R as C, A as D, M as E, I as O, E as S, L as T, U as _, Q as a, we as b, ze as c, Z as d, Fe as f, K as g, Pe as h, $ as i, D as k, Re as l, J as m, We as n, Ue as o, Y as p, Ge as r, Ve as s, He as t, Be as u, H as v, P as w, Te as x, B as y };
package/dist/dnd.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as e } from "./compose-refs-DZ0iIVF-.js";
2
- import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v } from "./sortable-provider-DYlpq8lP.js";
2
+ import { _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v } from "./sortable-provider-BvD98s8Y.js";
3
3
  export { r as CSS, u as DndOverlay, i as DndProvider, g as DragHandle, p as Draggable, n as DraggableDroppable, l as Droppable, f as Sortable, _ as SortableProvider, o as arrayMove, c as closestCenter, e as composeRefs, m as horizontalListSortingStrategy, h as insertIds, s as pointerWithin, t as rectIntersection, v as useDndActiveId, a as useDndItem, d as verticalListSortingStrategy };