@wirecore/wirelayer-react 0.12.0 → 0.12.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 (108) hide show
  1. package/dist/CopyButton-C_LAuCkR.js +47 -0
  2. package/dist/Tree-DLHbcH3-.js +602 -0
  3. package/dist/chart/Chart.d.ts +3 -3
  4. package/dist/chart/Chart.d.ts.map +1 -1
  5. package/dist/chart/PieChart.d.ts +3 -3
  6. package/dist/chart/PieChart.d.ts.map +1 -1
  7. package/dist/chart/SeriesChartView.d.ts +1 -1
  8. package/dist/chart/SeriesChartView.d.ts.map +1 -1
  9. package/dist/chart/Sparkline.d.ts +3 -3
  10. package/dist/chart/Sparkline.d.ts.map +1 -1
  11. package/dist/chart/WaterfallChart.d.ts +3 -3
  12. package/dist/chart/WaterfallChart.d.ts.map +1 -1
  13. package/dist/chart/types.d.ts +2 -2
  14. package/dist/chart/types.d.ts.map +1 -1
  15. package/dist/chart.js +148 -143
  16. package/dist/code.js +1 -1
  17. package/dist/components/AngleSlider/AngleSlider.d.ts +3 -3
  18. package/dist/components/AngleSlider/AngleSlider.d.ts.map +1 -1
  19. package/dist/components/BlockUi/BlockUi.d.ts +3 -3
  20. package/dist/components/BlockUi/BlockUi.d.ts.map +1 -1
  21. package/dist/components/Calendar/Calendar.d.ts +3 -3
  22. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  23. package/dist/components/Carousel/Carousel.d.ts +3 -3
  24. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  25. package/dist/components/CascadeSelect/CascadeSelect.d.ts +4 -3
  26. package/dist/components/CascadeSelect/CascadeSelect.d.ts.map +1 -1
  27. package/dist/components/ColorPicker/ColorPicker.d.ts +4 -4
  28. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  29. package/dist/components/CopyButton/CopyButton.d.ts +3 -3
  30. package/dist/components/CopyButton/CopyButton.d.ts.map +1 -1
  31. package/dist/components/DataView/DataView.d.ts +3 -3
  32. package/dist/components/DataView/DataView.d.ts.map +1 -1
  33. package/dist/components/Fieldset/Fieldset.d.ts +5 -3
  34. package/dist/components/Fieldset/Fieldset.d.ts.map +1 -1
  35. package/dist/components/Gallery/Gallery.d.ts +3 -3
  36. package/dist/components/Gallery/Gallery.d.ts.map +1 -1
  37. package/dist/components/JsonViewer/JsonViewer.d.ts +4 -3
  38. package/dist/components/JsonViewer/JsonViewer.d.ts.map +1 -1
  39. package/dist/components/Knob/Knob.d.ts +4 -3
  40. package/dist/components/Knob/Knob.d.ts.map +1 -1
  41. package/dist/components/Listbox/Listbox.d.ts +4 -4
  42. package/dist/components/Listbox/Listbox.d.ts.map +1 -1
  43. package/dist/components/LogViewer/LogViewer.d.ts +3 -3
  44. package/dist/components/LogViewer/LogViewer.d.ts.map +1 -1
  45. package/dist/components/MeterGroup/MeterGroup.d.ts +3 -3
  46. package/dist/components/MeterGroup/MeterGroup.d.ts.map +1 -1
  47. package/dist/components/NavigationMenu/NavigationMenu.d.ts +3 -3
  48. package/dist/components/NavigationMenu/NavigationMenu.d.ts.map +1 -1
  49. package/dist/components/OrderList/OrderList.d.ts +3 -3
  50. package/dist/components/OrderList/OrderList.d.ts.map +1 -1
  51. package/dist/components/OrgChart/OrgChart.d.ts +3 -3
  52. package/dist/components/OrgChart/OrgChart.d.ts.map +1 -1
  53. package/dist/components/Panel/Panel.d.ts +3 -3
  54. package/dist/components/Panel/Panel.d.ts.map +1 -1
  55. package/dist/components/PickList/PickList.d.ts +3 -3
  56. package/dist/components/PickList/PickList.d.ts.map +1 -1
  57. package/dist/components/PinInput/PinInput.d.ts +4 -4
  58. package/dist/components/PinInput/PinInput.d.ts.map +1 -1
  59. package/dist/components/ProgressCircle/ProgressCircle.d.ts +3 -3
  60. package/dist/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
  61. package/dist/components/Rating/Rating.d.ts +3 -3
  62. package/dist/components/Rating/Rating.d.ts.map +1 -1
  63. package/dist/components/ScrollPanel/ScrollPanel.d.ts +3 -3
  64. package/dist/components/ScrollPanel/ScrollPanel.d.ts.map +1 -1
  65. package/dist/components/ScrollTop/ScrollTop.d.ts +3 -2
  66. package/dist/components/ScrollTop/ScrollTop.d.ts.map +1 -1
  67. package/dist/components/SidebarNav/SidebarNav.d.ts +3 -3
  68. package/dist/components/SidebarNav/SidebarNav.d.ts.map +1 -1
  69. package/dist/components/SignaturePad/SignaturePad.d.ts +3 -3
  70. package/dist/components/SignaturePad/SignaturePad.d.ts.map +1 -1
  71. package/dist/components/Sortable/Sortable.d.ts +4 -3
  72. package/dist/components/Sortable/Sortable.d.ts.map +1 -1
  73. package/dist/components/SpeedDial/SpeedDial.d.ts +3 -3
  74. package/dist/components/SpeedDial/SpeedDial.d.ts.map +1 -1
  75. package/dist/components/SplitButton/SplitButton.d.ts +3 -3
  76. package/dist/components/SplitButton/SplitButton.d.ts.map +1 -1
  77. package/dist/components/Splitter/Splitter.d.ts +3 -3
  78. package/dist/components/Splitter/Splitter.d.ts.map +1 -1
  79. package/dist/components/Spoiler/Spoiler.d.ts +3 -3
  80. package/dist/components/Spoiler/Spoiler.d.ts.map +1 -1
  81. package/dist/components/Stepper/Stepper.d.ts +3 -3
  82. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  83. package/dist/components/TableOfContents/TableOfContents.d.ts +3 -3
  84. package/dist/components/TableOfContents/TableOfContents.d.ts.map +1 -1
  85. package/dist/components/Timeline/Timeline.d.ts +3 -3
  86. package/dist/components/Timeline/Timeline.d.ts.map +1 -1
  87. package/dist/components/Toolbar/Toolbar.d.ts +3 -3
  88. package/dist/components/Toolbar/Toolbar.d.ts.map +1 -1
  89. package/dist/components/Tree/Tree.d.ts +3 -3
  90. package/dist/components/Tree/Tree.d.ts.map +1 -1
  91. package/dist/components/Tree/useTree.d.ts +2 -0
  92. package/dist/components/Tree/useTree.d.ts.map +1 -1
  93. package/dist/components/TreeSelect/TreeSelect.d.ts +4 -4
  94. package/dist/components/TreeSelect/TreeSelect.d.ts.map +1 -1
  95. package/dist/data-table.js +1 -1
  96. package/dist/editor/Editor.d.ts +4 -4
  97. package/dist/editor/Editor.d.ts.map +1 -1
  98. package/dist/editor.js +184 -183
  99. package/dist/index.js +1272 -1216
  100. package/dist/pdf.js +1 -1
  101. package/dist/virtual/VirtualList.d.ts +3 -3
  102. package/dist/virtual/VirtualList.d.ts.map +1 -1
  103. package/dist/virtual/VirtualTree.d.ts.map +1 -1
  104. package/dist/virtual.js +224 -219
  105. package/llms-full.txt +66 -10
  106. package/package.json +1 -1
  107. package/dist/CopyButton-0e1pHR3f.js +0 -45
  108. package/dist/Tree-DVjwp6FG.js +0 -568
package/dist/chart.js CHANGED
@@ -6,88 +6,89 @@ import { useEffect as x, useId as S, useRef as C, useState as w } from "react";
6
6
  import { jsx as T, jsxs as E } from "react/jsx-runtime";
7
7
  import { Chart as D } from "chart.js/auto";
8
8
  //#region src/chart/Chart.tsx
9
- function O({ classes: n, type: a, data: o, options: s, plugins: c, title: u, hideTitle: d = !1, height: f = "18rem", table: p = !0, formatValue: m, className: h, style: g }) {
10
- let y = t("chart", r, n)(), { locale: b, translations: O } = e(), k = S(), A = C(null), j = C({
9
+ function O({ classes: n, type: a, data: o, options: s, plugins: c, title: u, hideTitle: d = !1, height: f = "18rem", table: p = !0, formatValue: m, className: h, style: g, ...y }) {
10
+ let b = t("chart", r, n)(), { locale: O, translations: k } = e(), A = S(), j = C(null), M = C({
11
11
  data: o,
12
12
  options: s
13
- }), M = C(void 0), N = i(o, m ?? ((e) => e.toLocaleString(b)), O.chart), [P, F] = w(c), I = P === c || P?.length === c?.length && !!c?.every((e, t) => e === P[t]);
14
- I || F(c);
15
- let L = I ? P : c;
13
+ }), N = C(void 0), P = i(o, m ?? ((e) => e.toLocaleString(O)), k.chart), [F, I] = w(c), L = F === c || F?.length === c?.length && !!c?.every((e, t) => e === F[t]);
14
+ L || I(c);
15
+ let R = L ? F : c;
16
16
  return x(() => {
17
17
  let e = matchMedia("(prefers-reduced-motion: reduce)"), t = matchMedia("(prefers-color-scheme: dark)"), n = () => {
18
- let t = l(A.current);
18
+ let t = l(j.current);
19
19
  return {
20
- data: _(a, j.current.data, t),
21
- options: v(a, t, j.current.options, e.matches, b)
20
+ data: _(a, M.current.data, t),
21
+ options: v(a, t, M.current.options, e.matches, O)
22
22
  };
23
- }, r = A.current?.getContext("2d"), i = r ? new D(r, {
23
+ }, r = j.current?.getContext("2d"), i = r ? new D(r, {
24
24
  type: a,
25
25
  ...n(),
26
- plugins: L ? [...L] : []
26
+ plugins: R ? [...R] : []
27
27
  }) : void 0, o = () => {
28
28
  i && (Object.assign(i, n()), i.update());
29
29
  };
30
- M.current = o;
30
+ N.current = o;
31
31
  let s = new MutationObserver(o);
32
32
  return s.observe(document.documentElement, { attributes: !0 }), e.addEventListener("change", o), t.addEventListener("change", o), () => {
33
33
  s.disconnect(), e.removeEventListener("change", o), t.removeEventListener("change", o), i?.destroy();
34
34
  };
35
35
  }, [
36
36
  a,
37
- b,
38
- L
37
+ O,
38
+ R
39
39
  ]), x(() => {
40
- j.current = {
40
+ M.current = {
41
41
  data: o,
42
42
  options: s
43
- }, M.current?.();
43
+ }, N.current?.();
44
44
  }, [o, s]), /* @__PURE__ */ E("figure", {
45
- className: y.base({ class: h }),
45
+ ...y,
46
+ className: b.base({ class: h }),
46
47
  style: g,
47
48
  children: [
48
49
  /* @__PURE__ */ T("figcaption", {
49
- id: `${k}title`,
50
- className: d ? y.caption() : y.title(),
50
+ id: `${A}title`,
51
+ className: d ? b.caption() : b.title(),
51
52
  children: u
52
53
  }),
53
54
  /* @__PURE__ */ T("div", {
54
- className: y.canvasBox(),
55
+ className: b.canvasBox(),
55
56
  style: { height: f },
56
57
  children: /* @__PURE__ */ T("canvas", {
57
- ref: A,
58
+ ref: j,
58
59
  role: "img",
59
- "aria-labelledby": `${k}title`
60
+ "aria-labelledby": `${A}title`
60
61
  })
61
62
  }),
62
63
  p && /* @__PURE__ */ E("details", {
63
- className: y.details(),
64
+ className: b.details(),
64
65
  children: [/* @__PURE__ */ T("summary", {
65
- className: y.summary(),
66
- children: O.chart.showTable
66
+ className: b.summary(),
67
+ children: k.chart.showTable
67
68
  }), /* @__PURE__ */ T("div", {
68
- className: y.scroll(),
69
+ className: b.scroll(),
69
70
  children: /* @__PURE__ */ E("table", {
70
- className: y.table(),
71
+ className: b.table(),
71
72
  children: [
72
73
  /* @__PURE__ */ T("caption", {
73
- className: y.caption(),
74
+ className: b.caption(),
74
75
  children: u
75
76
  }),
76
77
  /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
77
78
  scope: "col",
78
- className: y.th(),
79
- children: O.chart.category
80
- }), N.columns.map((e) => /* @__PURE__ */ T("th", {
79
+ className: b.th(),
80
+ children: k.chart.category
81
+ }), P.columns.map((e) => /* @__PURE__ */ T("th", {
81
82
  scope: "col",
82
- className: y.th(),
83
+ className: b.th(),
83
84
  children: e
84
85
  }, e))] }) }),
85
- /* @__PURE__ */ T("tbody", { children: N.rows.map((e) => /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
86
+ /* @__PURE__ */ T("tbody", { children: P.rows.map((e) => /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
86
87
  scope: "row",
87
- className: y.rowHeader(),
88
+ className: b.rowHeader(),
88
89
  children: e.label
89
90
  }), e.values.map((e, t) => /* @__PURE__ */ T("td", {
90
- className: y.td(),
91
+ className: b.td(),
91
92
  children: e
92
93
  }, t))] }, e.label)) })
93
94
  ]
@@ -99,12 +100,12 @@ function O({ classes: n, type: a, data: o, options: s, plugins: c, title: u, hid
99
100
  }
100
101
  //#endregion
101
102
  //#region src/chart/Sparkline.tsx
102
- function k({ classes: n, data: r, label: i, fill: a = !0, width: o = "8rem", height: s = "2rem", formatValue: c, className: u, style: d }) {
103
- let f = t("sparkline", h, n), { locale: p, translations: m } = e(), _ = C(null), y = r.join(",");
103
+ function k({ classes: n, data: r, label: i, fill: a = !0, width: o = "8rem", height: s = "2rem", formatValue: c, className: u, style: d, ...f }) {
104
+ let p = t("sparkline", h, n), { locale: m, translations: _ } = e(), y = C(null), b = r.join(",");
104
105
  return x(() => {
105
- let e = _.current, t = e?.getContext("2d");
106
+ let e = y.current, t = e?.getContext("2d");
106
107
  if (!e || !t) return;
107
- let n = y ? y.split(",").map(Number) : [], r = () => {
108
+ let n = b ? b.split(",").map(Number) : [], r = () => {
108
109
  let t = l(e), r = t.palette[0], i = matchMedia("(prefers-reduced-motion: reduce)").matches;
109
110
  return {
110
111
  data: {
@@ -129,7 +130,7 @@ function k({ classes: n, data: r, label: i, fill: a = !0, width: o = "8rem", hei
129
130
  tooltip: { enabled: !1 }
130
131
  },
131
132
  events: []
132
- }, i, p)
133
+ }, i, m)
133
134
  };
134
135
  }, i = new D(t, {
135
136
  type: "line",
@@ -143,20 +144,21 @@ function k({ classes: n, data: r, label: i, fill: a = !0, width: o = "8rem", hei
143
144
  s.disconnect(), c.removeEventListener("change", o), i.destroy();
144
145
  };
145
146
  }, [
146
- y,
147
+ b,
147
148
  a,
148
- p
149
+ m
149
150
  ]), /* @__PURE__ */ T("span", {
150
- className: f({ class: u }),
151
+ ...f,
152
+ className: p({ class: u }),
151
153
  style: {
152
154
  width: o,
153
155
  height: s,
154
156
  ...d
155
157
  },
156
158
  children: /* @__PURE__ */ T("canvas", {
157
- ref: _,
159
+ ref: y,
158
160
  role: "img",
159
- "aria-label": g(i, r, c ?? ((e) => e.toLocaleString(p)), m.chart)
161
+ "aria-label": g(i, r, c ?? ((e) => e.toLocaleString(m)), _.chart)
160
162
  })
161
163
  });
162
164
  }
@@ -193,37 +195,37 @@ function A({ build: e, labelledby: t }) {
193
195
  }
194
196
  //#endregion
195
197
  //#region src/chart/SeriesChartView.tsx
196
- function j({ kind: i, data: s, categoryKey: c, series: l, title: h, hideTitle: g = !1, height: _ = "18rem", table: v = !0, formatValue: y, references: b, scale: x, legend: C, brush: D, range: O, defaultRange: k, onRangeChange: j, options: M, horizontal: N, stacked: P, curved: F, area: I, className: L, style: R, classes: z }) {
197
- let B = e(), V = B.translations.chart, H = t("chart", r, z)(), U = t("seriesChart", f)(), W = S(), G = y ?? ((e) => e.toLocaleString(B.locale)), [K, q] = w(k), J = D ? a(O ?? K, s.length) : void 0, Y = I ? l.map((e) => ({
198
+ function j({ kind: i, data: s, categoryKey: c, series: l, title: h, hideTitle: g = !1, height: _ = "18rem", table: v = !0, formatValue: y, references: b, scale: x, legend: C, brush: D, range: O, defaultRange: k, onRangeChange: j, options: M, horizontal: N, stacked: P, curved: F, area: I, className: L, style: R, classes: z, ...B }) {
199
+ let V = e(), H = V.translations.chart, U = t("chart", r, z)(), W = t("seriesChart", f)(), G = S(), K = y ?? ((e) => e.toLocaleString(V.locale)), [q, J] = w(k), Y = D ? a(O ?? q, s.length) : void 0, X = I ? l.map((e) => ({
198
200
  ...e,
199
201
  area: e.area ?? !0
200
- })) : l, X = (e, t) => {
202
+ })) : l, Z = (e, t) => {
201
203
  let n = p({
202
204
  kind: i,
203
205
  data: s,
204
206
  categoryKey: c,
205
- series: Y,
207
+ series: X,
206
208
  horizontal: N,
207
209
  stacked: P,
208
210
  scale: x,
209
211
  curved: F,
210
212
  references: b,
211
- range: J,
213
+ range: Y,
212
214
  legend: C
213
- }, e, G, t, B.locale);
215
+ }, e, K, t, V.locale);
214
216
  return {
215
217
  ...n,
216
218
  options: o(n.options, M),
217
219
  plugins: [u]
218
220
  };
219
- }, Z = (e) => {
221
+ }, ee = (e) => {
220
222
  let t = p({
221
223
  kind: "line",
222
224
  data: s,
223
225
  categoryKey: c,
224
- series: Y.slice(0, 1),
226
+ series: X.slice(0, 1),
225
227
  legend: !1
226
- }, e, G, !0, B.locale);
228
+ }, e, K, !0, V.locale);
227
229
  return {
228
230
  ...t,
229
231
  options: o(t.options, {
@@ -236,78 +238,79 @@ function j({ kind: i, data: s, categoryKey: c, series: l, title: h, hideTitle: g
236
238
  events: []
237
239
  })
238
240
  };
239
- }, ee = s.map((e) => String(e[c] ?? "")), Q = m(s, c, Y, G, J), $ = b?.length ? d(b, G) : "";
241
+ }, te = s.map((e) => String(e[c] ?? "")), Q = m(s, c, X, K, Y), $ = b?.length ? d(b, K) : "";
240
242
  return /* @__PURE__ */ E("figure", {
241
- className: H.base({ class: L }),
243
+ ...B,
244
+ className: U.base({ class: L }),
242
245
  style: R,
243
246
  children: [
244
247
  /* @__PURE__ */ T("figcaption", {
245
- id: `${W}title`,
246
- className: g ? H.caption() : H.title(),
248
+ id: `${G}title`,
249
+ className: g ? U.caption() : U.title(),
247
250
  children: h
248
251
  }),
249
252
  /* @__PURE__ */ T("div", {
250
- className: H.canvasBox(),
253
+ className: U.canvasBox(),
251
254
  style: { height: _ },
252
255
  children: /* @__PURE__ */ T(A, {
253
- build: X,
254
- labelledby: `${W}title`
256
+ build: Z,
257
+ labelledby: `${G}title`
255
258
  })
256
259
  }),
257
260
  $ && /* @__PURE__ */ T("p", {
258
- className: U.references(),
259
- children: `${V.references}: ${$}`
261
+ className: W.references(),
262
+ children: `${H.references}: ${$}`
260
263
  }),
261
264
  D && s.length > 1 && /* @__PURE__ */ E("div", {
262
- className: U.brush(),
265
+ className: W.brush(),
263
266
  children: [/* @__PURE__ */ T("div", {
264
- className: U.brushCanvas(),
265
- children: /* @__PURE__ */ T(A, { build: Z })
267
+ className: W.brushCanvas(),
268
+ children: /* @__PURE__ */ T(A, { build: ee })
266
269
  }), /* @__PURE__ */ T(n, {
267
- value: J,
270
+ value: Y,
268
271
  min: 0,
269
272
  max: s.length - 1,
270
273
  step: 1,
271
274
  minRange: 1,
272
- label: V.brush,
273
- thumbLabels: V.brushThumbs,
274
- formatValue: (e) => ee[e] ?? "",
275
+ label: H.brush,
276
+ thumbLabels: H.brushThumbs,
277
+ formatValue: (e) => te[e] ?? "",
275
278
  showValue: !0,
276
279
  onValueChange: (e) => {
277
280
  let t = a([e[0] ?? 0, e[1] ?? 0], s.length);
278
- q(t), j?.(t);
281
+ J(t), j?.(t);
279
282
  }
280
283
  })]
281
284
  }),
282
285
  v && /* @__PURE__ */ E("details", {
283
- className: H.details(),
286
+ className: U.details(),
284
287
  children: [/* @__PURE__ */ T("summary", {
285
- className: H.summary(),
286
- children: V.showTable
288
+ className: U.summary(),
289
+ children: H.showTable
287
290
  }), /* @__PURE__ */ T("div", {
288
- className: H.scroll(),
291
+ className: U.scroll(),
289
292
  children: /* @__PURE__ */ E("table", {
290
- className: H.table(),
293
+ className: U.table(),
291
294
  children: [
292
295
  /* @__PURE__ */ T("caption", {
293
- className: H.caption(),
296
+ className: U.caption(),
294
297
  children: h
295
298
  }),
296
299
  /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
297
300
  scope: "col",
298
- className: H.th(),
299
- children: V.category
301
+ className: U.th(),
302
+ children: H.category
300
303
  }), Q.columns.map((e) => /* @__PURE__ */ T("th", {
301
304
  scope: "col",
302
- className: H.th(),
305
+ className: U.th(),
303
306
  children: e
304
307
  }, e))] }) }),
305
308
  /* @__PURE__ */ T("tbody", { children: Q.rows.map((e, t) => /* @__PURE__ */ E("tr", { children: [/* @__PURE__ */ T("th", {
306
309
  scope: "row",
307
- className: H.rowHeader(),
310
+ className: U.rowHeader(),
308
311
  children: e.label
309
312
  }), e.values.map((e, t) => /* @__PURE__ */ T("td", {
310
- className: H.td(),
313
+ className: U.td(),
311
314
  children: e
312
315
  }, t))] }, t)) })
313
316
  ]
@@ -343,75 +346,76 @@ function P(e) {
343
346
  }
344
347
  //#endregion
345
348
  //#region src/chart/WaterfallChart.tsx
346
- function F({ steps: n, title: i, hideTitle: a = !1, height: s = "18rem", table: c = !0, formatValue: l, tones: u, options: d, className: f, style: p, classes: m }) {
347
- let h = e(), g = h.translations.chart, _ = t("chart", r, m)(), v = S(), x = l ?? ((e) => e.toLocaleString(h.locale)), C = (e, t) => {
348
- let r = b(n, e, x, g, u, t, h.locale);
349
+ function F({ steps: n, title: i, hideTitle: a = !1, height: s = "18rem", table: c = !0, formatValue: l, tones: u, options: d, className: f, style: p, classes: m, ...h }) {
350
+ let g = e(), _ = g.translations.chart, v = t("chart", r, m)(), x = S(), C = l ?? ((e) => e.toLocaleString(g.locale)), w = (e, t) => {
351
+ let r = b(n, e, C, _, u, t, g.locale);
349
352
  return {
350
353
  ...r,
351
354
  options: o(r.options, d)
352
355
  };
353
- }, w = y(n);
356
+ }, D = y(n);
354
357
  return /* @__PURE__ */ E("figure", {
355
- className: _.base({ class: f }),
358
+ ...h,
359
+ className: v.base({ class: f }),
356
360
  style: p,
357
361
  children: [
358
362
  /* @__PURE__ */ T("figcaption", {
359
- id: `${v}title`,
360
- className: a ? _.caption() : _.title(),
363
+ id: `${x}title`,
364
+ className: a ? v.caption() : v.title(),
361
365
  children: i
362
366
  }),
363
367
  /* @__PURE__ */ T("div", {
364
- className: _.canvasBox(),
368
+ className: v.canvasBox(),
365
369
  style: { height: s },
366
370
  children: /* @__PURE__ */ T(A, {
367
- build: C,
368
- labelledby: `${v}title`
371
+ build: w,
372
+ labelledby: `${x}title`
369
373
  })
370
374
  }),
371
375
  c && /* @__PURE__ */ E("details", {
372
- className: _.details(),
376
+ className: v.details(),
373
377
  children: [/* @__PURE__ */ T("summary", {
374
- className: _.summary(),
375
- children: g.showTable
378
+ className: v.summary(),
379
+ children: _.showTable
376
380
  }), /* @__PURE__ */ T("div", {
377
- className: _.scroll(),
381
+ className: v.scroll(),
378
382
  children: /* @__PURE__ */ E("table", {
379
- className: _.table(),
383
+ className: v.table(),
380
384
  children: [
381
385
  /* @__PURE__ */ T("caption", {
382
- className: _.caption(),
386
+ className: v.caption(),
383
387
  children: i
384
388
  }),
385
389
  /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [
386
390
  /* @__PURE__ */ T("th", {
387
391
  scope: "col",
388
- className: _.th(),
389
- children: g.category
392
+ className: v.th(),
393
+ children: _.category
390
394
  }),
391
395
  /* @__PURE__ */ T("th", {
392
396
  scope: "col",
393
- className: _.th(),
394
- children: g.change
397
+ className: v.th(),
398
+ children: _.change
395
399
  }),
396
400
  /* @__PURE__ */ T("th", {
397
401
  scope: "col",
398
- className: _.th(),
399
- children: g.total
402
+ className: v.th(),
403
+ children: _.total
400
404
  })
401
405
  ] }) }),
402
- /* @__PURE__ */ T("tbody", { children: w.map((e, t) => /* @__PURE__ */ E("tr", { children: [
406
+ /* @__PURE__ */ T("tbody", { children: D.map((e, t) => /* @__PURE__ */ E("tr", { children: [
403
407
  /* @__PURE__ */ T("th", {
404
408
  scope: "row",
405
- className: _.rowHeader(),
409
+ className: v.rowHeader(),
406
410
  children: e.label
407
411
  }),
408
412
  /* @__PURE__ */ T("td", {
409
- className: _.td(),
410
- children: e.kind === "total" ? "–" : x(e.change)
413
+ className: v.td(),
414
+ children: e.kind === "total" ? "–" : C(e.change)
411
415
  }),
412
416
  /* @__PURE__ */ T("td", {
413
- className: _.td(),
414
- children: x(e.sum)
417
+ className: v.td(),
418
+ children: C(e.sum)
415
419
  })
416
420
  ] }, t)) })
417
421
  ]
@@ -423,49 +427,50 @@ function F({ steps: n, title: i, hideTitle: a = !1, height: s = "18rem", table:
423
427
  }
424
428
  //#endregion
425
429
  //#region src/chart/PieChart.tsx
426
- function I({ slices: n, title: i, hideTitle: a = !1, donut: l = !1, height: u = "14rem", legend: d = !0, table: p = !0, formatValue: m, options: h, className: g, style: _, classes: v }) {
427
- let y = e(), b = y.translations.chart, x = t("chart", r, v)(), C = t("seriesChart", f), w = C(), D = S(), O = m ?? ((e) => e.toLocaleString(y.locale)), k = (e, t) => {
428
- let r = s(n, l, e, O, i, t, y.locale);
430
+ function I({ slices: n, title: i, hideTitle: a = !1, donut: l = !1, height: u = "14rem", legend: d = !0, table: p = !0, formatValue: m, options: h, className: g, style: _, classes: v, ...y }) {
431
+ let b = e(), x = b.translations.chart, C = t("chart", r, v)(), w = t("seriesChart", f), D = w(), O = S(), k = m ?? ((e) => e.toLocaleString(b.locale)), j = (e, t) => {
432
+ let r = s(n, l, e, k, i, t, b.locale);
429
433
  return {
430
434
  ...r,
431
435
  options: o(r.options, h)
432
436
  };
433
- }, j = c(n, O, y.locale);
437
+ }, M = c(n, k, b.locale);
434
438
  return /* @__PURE__ */ E("figure", {
435
- className: x.base({ class: g }),
439
+ ...y,
440
+ className: C.base({ class: g }),
436
441
  style: _,
437
442
  children: [
438
443
  /* @__PURE__ */ T("figcaption", {
439
- id: `${D}title`,
440
- className: a ? x.caption() : x.title(),
444
+ id: `${O}title`,
445
+ className: a ? C.caption() : C.title(),
441
446
  children: i
442
447
  }),
443
448
  /* @__PURE__ */ E("div", {
444
- className: w.pieLayout(),
449
+ className: D.pieLayout(),
445
450
  children: [/* @__PURE__ */ T("div", {
446
- className: w.pieBox(),
451
+ className: D.pieBox(),
447
452
  style: { height: u },
448
453
  children: /* @__PURE__ */ T(A, {
449
- build: k,
450
- labelledby: `${D}title`
454
+ build: j,
455
+ labelledby: `${O}title`
451
456
  })
452
457
  }), d && /* @__PURE__ */ T("ul", {
453
458
  role: "list",
454
- "aria-label": b.legend,
455
- className: w.legend(),
456
- children: j.map((e) => /* @__PURE__ */ E("li", {
457
- className: w.legendItem(),
459
+ "aria-label": x.legend,
460
+ className: D.legend(),
461
+ children: M.map((e) => /* @__PURE__ */ E("li", {
462
+ className: D.legendItem(),
458
463
  children: [
459
464
  /* @__PURE__ */ T("span", {
460
- className: C({ tone: e.tone }).swatch(),
465
+ className: w({ tone: e.tone }).swatch(),
461
466
  "aria-hidden": "true"
462
467
  }),
463
468
  /* @__PURE__ */ T("span", {
464
- className: w.legendLabel(),
469
+ className: D.legendLabel(),
465
470
  children: e.label
466
471
  }),
467
472
  /* @__PURE__ */ T("span", {
468
- className: w.legendValue(),
473
+ className: D.legendValue(),
469
474
  children: `${e.value} · ${e.share}`
470
475
  })
471
476
  ]
@@ -473,48 +478,48 @@ function I({ slices: n, title: i, hideTitle: a = !1, donut: l = !1, height: u =
473
478
  })]
474
479
  }),
475
480
  p && /* @__PURE__ */ E("details", {
476
- className: x.details(),
481
+ className: C.details(),
477
482
  children: [/* @__PURE__ */ T("summary", {
478
- className: x.summary(),
479
- children: b.showTable
483
+ className: C.summary(),
484
+ children: x.showTable
480
485
  }), /* @__PURE__ */ T("div", {
481
- className: x.scroll(),
486
+ className: C.scroll(),
482
487
  children: /* @__PURE__ */ E("table", {
483
- className: x.table(),
488
+ className: C.table(),
484
489
  children: [
485
490
  /* @__PURE__ */ T("caption", {
486
- className: x.caption(),
491
+ className: C.caption(),
487
492
  children: i
488
493
  }),
489
494
  /* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", { children: [
490
495
  /* @__PURE__ */ T("th", {
491
496
  scope: "col",
492
- className: x.th(),
493
- children: b.category
497
+ className: C.th(),
498
+ children: x.category
494
499
  }),
495
500
  /* @__PURE__ */ T("th", {
496
501
  scope: "col",
497
- className: x.th(),
498
- children: b.value
502
+ className: C.th(),
503
+ children: x.value
499
504
  }),
500
505
  /* @__PURE__ */ T("th", {
501
506
  scope: "col",
502
- className: x.th(),
503
- children: b.share
507
+ className: C.th(),
508
+ children: x.share
504
509
  })
505
510
  ] }) }),
506
- /* @__PURE__ */ T("tbody", { children: j.map((e) => /* @__PURE__ */ E("tr", { children: [
511
+ /* @__PURE__ */ T("tbody", { children: M.map((e) => /* @__PURE__ */ E("tr", { children: [
507
512
  /* @__PURE__ */ T("th", {
508
513
  scope: "row",
509
- className: x.rowHeader(),
514
+ className: C.rowHeader(),
510
515
  children: e.label
511
516
  }),
512
517
  /* @__PURE__ */ T("td", {
513
- className: x.td(),
518
+ className: C.td(),
514
519
  children: e.value
515
520
  }),
516
521
  /* @__PURE__ */ T("td", {
517
- className: x.td(),
522
+ className: C.td(),
518
523
  children: e.share
519
524
  })
520
525
  ] }, e.label)) })
package/dist/code.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { a as e, n as t } from "./RecipesProvider-0idafuGm.js";
3
3
  import { t as n } from "./Button-Cd7lufvJ.js";
4
- import { t as r } from "./CopyButton-0e1pHR3f.js";
4
+ import { t as r } from "./CopyButton-C_LAuCkR.js";
5
5
  import { codeDiffLine as i, codeFileKind as a, codeHighlight as o, codeLanguages as s, codeTabs as c, diffLines as l, inlineCode as u, languageFromFileName as d, resolveCodeLanguage as f, toolbarIndexForKey as p } from "@wirecore/wirelayer-recipes";
6
6
  import { FileBraces as m, FileCode as h, FileCodeCorner as g, FileImage as _, FileSpreadsheet as v, FileTerminal as y, FileText as b, FileType as x, WrapText as S } from "lucide-react";
7
7
  import { useEffect as C, useId as w, useRef as T, useState as E } from "react";
@@ -1,6 +1,6 @@
1
1
  import { angleSlider as angleSliderRecipe, type RecipeClasses } from '@wirecore/wirelayer-recipes';
2
- import { type CSSProperties } from 'react';
3
- export interface AngleSliderProps {
2
+ import { type ComponentProps, type CSSProperties } from 'react';
3
+ export interface AngleSliderProps extends Omit<ComponentProps<'div'>, 'defaultValue' | 'value'> {
4
4
  /** Angle 0–360 (controlled) */
5
5
  value?: number;
6
6
  defaultValue?: number;
@@ -30,5 +30,5 @@ export interface AngleSliderProps {
30
30
  classes?: RecipeClasses<typeof angleSliderRecipe>;
31
31
  }
32
32
  /** Dial for an angle: the needle is the slider (arrow keys, Home/End), drag anywhere on the dial */
33
- export declare function AngleSlider({ classes, value, defaultValue, onValueChange, onValueChangeEnd, step, label, marks, showValue, formatValue, disabled, readOnly, invalid, name, 'aria-label': ariaLabel, id, className, style, }: AngleSliderProps): import("react").JSX.Element;
33
+ export declare function AngleSlider({ classes, value, defaultValue, onValueChange, onValueChangeEnd, step, label, marks, showValue, formatValue, disabled, readOnly, invalid, name, 'aria-label': ariaLabel, id, className, style, ...rest }: AngleSliderProps): import("react").JSX.Element;
34
34
  //# sourceMappingURL=AngleSlider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AngleSlider.d.ts","sourceRoot":"","sources":["../../../src/components/AngleSlider/AngleSlider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,WAAW,IAAI,iBAAiB,EAA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S,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,mFAAmF;IACnF,OAAO,CAAC,EAAE,aAAa,CAAC,OAAO,iBAAiB,CAAC,CAAC;CACrD;AAED,oGAAoG;AACpG,wBAAgB,WAAW,CAAC,EACxB,OAAO,EACP,KAAK,EACL,YAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,IAAQ,EACR,KAAK,EACL,KAAK,EACL,SAAgB,EAChB,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,YAAY,EAAE,SAAS,EACvB,EAAE,EACF,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACV,EAAE,gBAAgB,+BAsDlB"}
@@ -1,6 +1,6 @@
1
1
  import { blockUi as blockUiRecipe, type RecipeClasses } from '@wirecore/wirelayer-recipes';
2
- import type { CSSProperties, ReactNode } from 'react';
3
- export interface BlockUiProps {
2
+ import type { ComponentProps, CSSProperties, ReactNode } from 'react';
3
+ export interface BlockUiProps extends ComponentProps<'div'> {
4
4
  /** Covers the content and makes it inert */
5
5
  blocked?: boolean;
6
6
  label?: string;
@@ -11,5 +11,5 @@ export interface BlockUiProps {
11
11
  classes?: RecipeClasses<typeof blockUiRecipe>;
12
12
  }
13
13
  /** While blocked: the content is inert (no focus, no clicks) and busy; the overlay says why */
14
- export declare function BlockUi({ classes, blocked, label: labelProp, children, className, style }: BlockUiProps): import("react").JSX.Element;
14
+ export declare function BlockUi({ classes, blocked, label: labelProp, children, className, style, ...rest }: BlockUiProps): import("react").JSX.Element;
15
15
  //# sourceMappingURL=BlockUi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockUi.d.ts","sourceRoot":"","sources":["../../../src/components/BlockUi/BlockUi.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,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 +1,7 @@
1
1
  import { datePicker as datePickerRecipe, type DateLike, type DateValueType, type RecipeClasses } from '@wirecore/wirelayer-recipes';
2
- import { type CSSProperties } from 'react';
2
+ import { type ComponentProps, type CSSProperties } from 'react';
3
3
  import { type RenderDay } from '../DatePicker/DatePickerBase.js';
4
- export interface CalendarProps<T extends DateLike[] = string[]> {
4
+ export interface CalendarProps<T extends DateLike[] = string[]> extends Omit<ComponentProps<'div'>, 'defaultValue' | 'value'> {
5
5
  /** One day, several days, or a range (start and end) */
6
6
  selectionMode?: 'single' | 'multiple' | 'range';
7
7
  /** Chosen days as ISO dates; Date objects are accepted too */
@@ -46,5 +46,5 @@ export interface CalendarProps<T extends DateLike[] = string[]> {
46
46
  classes?: RecipeClasses<typeof datePickerRecipe>;
47
47
  }
48
48
  /** Calendar on the page (no field, no popup): a grid with arrow keys, Page Up/Down, Home/End */
49
- export declare function Calendar<T extends DateLike[] = string[]>({ classes, selectionMode, value, defaultValue, onValueChange, valueType, min, max, isDateUnavailable, excludeDates, presets, locale: localeProp, disabled, showButtonBar, showWeekNumbers, numberOfMonths, highlightToday, hideOutsideDays, firstDayOfWeek, weekendDays, allowDeselect, timeZone, renderDay, className, style, }: CalendarProps<T>): import("react").JSX.Element;
49
+ export declare function Calendar<T extends DateLike[] = string[]>({ classes, selectionMode, value, defaultValue, onValueChange, valueType, min, max, isDateUnavailable, excludeDates, presets, locale: localeProp, disabled, showButtonBar, showWeekNumbers, numberOfMonths, highlightToday, hideOutsideDays, firstDayOfWeek, weekendDays, allowDeselect, timeZone, renderDay, className, style, ...rest }: CalendarProps<T>): import("react").JSX.Element;
50
50
  //# sourceMappingURL=Calendar.d.ts.map