@dcs-tech/ui 0.8.0 → 0.10.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 (102) hide show
  1. package/CHANGELOG.md +496 -0
  2. package/README.md +56 -5
  3. package/dist/{ChartImageMenu-AsfvmdTH.js → ChartImageMenu-3OfqNFyt.js} +557 -546
  4. package/dist/{ChartView-CW3m4Z_1.js → ChartView-n4G5_2ro.js} +35 -31
  5. package/dist/{SummaryChart-CxRjK_HU.js → SummaryChart-i6fOdrDM.js} +2 -2
  6. package/dist/{SummaryImage-DeYs2Jgj.js → SummaryImage-CCt5ozD9.js} +2 -2
  7. package/dist/{SummarySeeAll-CrmROhBv.js → SummarySeeAll-BY8knsRe.js} +5 -5
  8. package/dist/assets/fileTask.worker--Q3rI3Bn.js +1 -0
  9. package/dist/{columnValue-DwUqueZ6.js → columnValue-74XDBcVF.js} +219 -192
  10. package/dist/{exportContext-BKFnNQ0q.js → exportContext-C52ZuHd8.js} +2 -2
  11. package/dist/{exportEngine-CZ22cX7a.js → exportEngine-BmDly7iw.js} +3 -3
  12. package/dist/file-worker.js +1 -1
  13. package/dist/{fileActions-COf5Q4Eg.js → fileActions-CFNO14Aj.js} +1 -1
  14. package/dist/{geometry-yZmKN662.js → geometry-DG134nYI.js} +379 -273
  15. package/dist/index.js +12808 -9621
  16. package/dist/{labels-CnqqTrne.js → labels-BPItSeRU.js} +2 -0
  17. package/dist/{runFileTask--4YjQH7Y.js → runFileTask-BIZTFnZP.js} +55 -39
  18. package/dist/scrollArea-D84Cwm4o.js +310 -0
  19. package/dist/style.css +1 -1
  20. package/dist/{summaryChartData-CARqGRUl.js → summaryChartData-BiQYJbYZ.js} +8 -2
  21. package/dist/types/components/Alert/Alert.d.ts +16 -0
  22. package/dist/types/components/Alert/index.d.ts +2 -0
  23. package/dist/types/components/Card/Card.d.ts +4 -3
  24. package/dist/types/components/Card/index.d.ts +1 -1
  25. package/dist/types/components/Charts/Funnel.d.ts +2 -1
  26. package/dist/types/components/Charts/chartImage.d.ts +1 -0
  27. package/dist/types/components/ChipInput/ChipTags.d.ts +3 -0
  28. package/dist/types/components/CommandPalette/CommandPaletteTrigger.d.ts +9 -0
  29. package/dist/types/components/CommandPalette/index.d.ts +2 -0
  30. package/dist/types/components/DataTable/TablePagination.d.ts +1 -1
  31. package/dist/types/components/DataTable/TableToolbar.d.ts +2 -1
  32. package/dist/types/components/DataTable/TableView.d.ts +1 -0
  33. package/dist/types/components/DataTable/cards/cardFields.d.ts +1 -0
  34. package/dist/types/components/DataTable/defaults.d.ts +4 -0
  35. package/dist/types/components/DataTable/index.d.ts +1 -1
  36. package/dist/types/components/DataTable/labels.d.ts +2 -0
  37. package/dist/types/components/DataTable/types.d.ts +19 -2
  38. package/dist/types/components/DataTable/ui-local/TableReorderList.d.ts +13 -0
  39. package/dist/types/components/DataTable/ui.d.ts +2 -1
  40. package/dist/types/components/DataTable/useTable.d.ts +1 -0
  41. package/dist/types/components/DatePicker/PeriodGrid.d.ts +13 -0
  42. package/dist/types/components/DatePicker/PeriodPicker.d.ts +19 -0
  43. package/dist/types/components/DatePicker/index.d.ts +1 -1
  44. package/dist/types/components/Dialog/dialogSlots.d.ts +9 -0
  45. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +8 -0
  46. package/dist/types/components/FieldWrapper/index.d.ts +1 -1
  47. package/dist/types/components/Fields/index.d.ts +1 -1
  48. package/dist/types/components/Image/ImageEditor.d.ts +21 -0
  49. package/dist/types/components/Image/ImagePicker.d.ts +10 -1
  50. package/dist/types/components/Image/imageRender.d.ts +33 -0
  51. package/dist/types/components/Image/index.d.ts +3 -1
  52. package/dist/types/components/Image/prepareImage.d.ts +4 -3
  53. package/dist/types/components/Link/Link.d.ts +22 -0
  54. package/dist/types/components/Link/index.d.ts +2 -0
  55. package/dist/types/components/NavList/NavList.d.ts +13 -0
  56. package/dist/types/components/NavList/index.d.ts +2 -0
  57. package/dist/types/components/PageProgress/PageProgress.d.ts +10 -0
  58. package/dist/types/components/PageProgress/index.d.ts +2 -0
  59. package/dist/types/components/Pagination/Pagination.d.ts +19 -0
  60. package/dist/types/components/Pagination/index.d.ts +2 -0
  61. package/dist/types/components/Popover/Popover.d.ts +1 -1
  62. package/dist/types/components/Popover/floatingPosition.d.ts +4 -0
  63. package/dist/types/components/ReorderList/ReorderGroup.d.ts +16 -0
  64. package/dist/types/components/ReorderList/ReorderList.d.ts +55 -0
  65. package/dist/types/components/ReorderList/crossListDrag.d.ts +61 -0
  66. package/dist/types/components/ReorderList/index.d.ts +5 -0
  67. package/dist/types/components/ReorderList/useReorderDrag.d.ts +28 -0
  68. package/dist/types/components/Tooltip/useTooltip.d.ts +4 -0
  69. package/dist/types/components/UIProvider/UILabelsContext.d.ts +86 -0
  70. package/dist/types/core/hooks/index.d.ts +1 -0
  71. package/dist/types/core/hooks/useMeasuredState.d.ts +1 -0
  72. package/dist/types/core/logic/alert.logic.d.ts +3 -0
  73. package/dist/types/core/logic/commandPalette.logic.d.ts +2 -0
  74. package/dist/types/core/logic/datePicker.logic.d.ts +12 -0
  75. package/dist/types/core/logic/fieldWrapper.logic.d.ts +6 -1
  76. package/dist/types/core/logic/imageEditor.logic.d.ts +132 -0
  77. package/dist/types/core/logic/imageTransform.logic.d.ts +57 -0
  78. package/dist/types/core/logic/index.d.ts +9 -0
  79. package/dist/types/core/logic/inertProps.d.ts +3 -0
  80. package/dist/types/core/logic/pageProgress.logic.d.ts +3 -0
  81. package/dist/types/core/logic/pagination.logic.d.ts +7 -0
  82. package/dist/types/core/logic/periodPicker.logic.d.ts +86 -0
  83. package/dist/types/core/logic/reorder.logic.d.ts +49 -0
  84. package/dist/types/core/types/chipinput.types.d.ts +3 -1
  85. package/dist/types/core/types/collapsible.types.d.ts +3 -0
  86. package/dist/types/core/types/datePicker.types.d.ts +7 -0
  87. package/dist/types/core/types/field.types.d.ts +6 -3
  88. package/dist/types/core/types/fieldWrapper.types.d.ts +2 -0
  89. package/dist/types/core/types/fields.types.d.ts +6 -1
  90. package/dist/types/core/types/form.types.d.ts +1 -0
  91. package/dist/types/core/types/format.types.d.ts +2 -0
  92. package/dist/types/core/types/input.types.d.ts +2 -0
  93. package/dist/types/core/types/navigation.types.d.ts +1 -0
  94. package/dist/types/core/types/select.types.d.ts +2 -6
  95. package/dist/types/core/types/suggest.types.d.ts +2 -0
  96. package/dist/types/index.d.ts +25 -7
  97. package/package.json +3 -2
  98. package/dist/assets/fileTask.worker-BHT1olUk.js +0 -1
  99. package/dist/scrollArea-Dd2dNMV4.js +0 -236
  100. package/dist/types/components/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -4
  101. package/dist/types/components/DataTable/ui-local/DragAndDropList/index.d.ts +0 -3
  102. package/dist/types/components/DataTable/ui-local/DragAndDropList/types.d.ts +0 -70
@@ -94,6 +94,7 @@ var e = {
94
94
  yes: "Yes",
95
95
  no: "No",
96
96
  empty: "No data found",
97
+ noResults: "No results for this search or filter",
97
98
  loading: "Loading...",
98
99
  loadError: "Could not load the rows.",
99
100
  rowsHidden: "Only the summary is shown — you may not see the rows of this list.",
@@ -597,6 +598,7 @@ var e = {
597
598
  listAllInList: "Every field is in the list",
598
599
  fieldsDropHere: "Drop a field here",
599
600
  fieldsRemove: (e) => `Remove ${e}`,
601
+ fieldsMove: (e) => `Move ${e}`,
600
602
  fieldsAdd: "Add field",
601
603
  fieldsLivePreview: "Live preview",
602
604
  cardPreviewCard: "Card",
@@ -11,8 +11,8 @@ var e = Object.defineProperty, t = (t, n) => {
11
11
  async function i(e, t) {
12
12
  if (t.signal?.aborted) throw r();
13
13
  switch (e.kind) {
14
- case "xlsx": return f(e.workbook, t);
15
- case "pdf": return g(e, t);
14
+ case "xlsx": return m(e.workbook, t);
15
+ case "pdf": return v(e, t);
16
16
  default: throw Error(`Unknown file task: ${e.kind}`);
17
17
  }
18
18
  }
@@ -27,7 +27,13 @@ async function o() {
27
27
  if (!t) throw Error("ExcelJS did not load");
28
28
  return t;
29
29
  }
30
- async function s() {
30
+ var s = null;
31
+ function c() {
32
+ return s ||= l().catch((e) => {
33
+ throw s = null, e;
34
+ }), s;
35
+ }
36
+ async function l() {
31
37
  let e = await import("pdfmake/build/pdfmake.js"), t = [
32
38
  e.default?.default,
33
39
  e.default,
@@ -35,38 +41,48 @@ async function s() {
35
41
  a.pdfMake
36
42
  ].find((e) => e && typeof e.createPdf == "function");
37
43
  if (!t) throw Error("pdfmake did not load");
38
- let n = await import("pdfmake/build/vfs_fonts.js");
44
+ let n, r = "pdfMake" in a, i = r ? a.pdfMake : a.pdfMake = {}, o = i?.addVirtualFileSystem;
45
+ i && (i.addVirtualFileSystem = (e) => {
46
+ n = e, o?.call(i, e);
47
+ });
48
+ let s;
49
+ try {
50
+ s = await import("pdfmake/build/vfs_fonts.js");
51
+ } finally {
52
+ r ? i && (o ? i.addVirtualFileSystem = o : delete i.addVirtualFileSystem) : delete a.pdfMake;
53
+ }
39
54
  return {
40
55
  pdfMake: t,
41
56
  vfs: [
42
- n?.default,
57
+ s?.default,
58
+ s,
59
+ s?.pdfMake?.vfs,
60
+ s?.default?.pdfMake?.vfs,
43
61
  n,
44
- n?.pdfMake?.vfs,
45
- n?.default?.pdfMake?.vfs,
46
62
  t.vfs,
47
63
  a.pdfMake?.vfs
48
64
  ].find((e) => e && e["Roboto-Regular.ttf"])
49
65
  };
50
66
  }
51
- var c = (e) => ArrayBuffer.isView(e) ? e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength) : e, l = (e) => "FF" + e.replace("#", "").toUpperCase();
52
- function u(e, t) {
67
+ var u = (e) => ArrayBuffer.isView(e) ? e.buffer.slice(e.byteOffset, e.byteOffset + e.byteLength) : e, d = (e) => "FF" + e.replace("#", "").toUpperCase();
68
+ function f(e, t) {
53
69
  if (t && ((t.bold !== void 0 || t.italic !== void 0 || t.size || t.color) && (e.font = {
54
70
  ...e.font ?? {},
55
71
  ...t.bold === void 0 ? {} : { bold: t.bold },
56
72
  ...t.italic === void 0 ? {} : { italic: t.italic },
57
73
  ...t.size ? { size: t.size } : {},
58
- ...t.color ? { color: { argb: l(t.color) } } : {}
74
+ ...t.color ? { color: { argb: d(t.color) } } : {}
59
75
  }), t.fill && (e.fill = {
60
76
  type: "pattern",
61
77
  pattern: "solid",
62
- fgColor: { argb: l(t.fill) }
78
+ fgColor: { argb: d(t.fill) }
63
79
  }), t.align && (e.alignment = {
64
80
  horizontal: t.align,
65
81
  vertical: "middle"
66
82
  }), t.numFmt && (typeof e.value == "number" || e.value instanceof Date) && (e.numFmt = t.numFmt), t.borderTop || t.borderBottom)) {
67
83
  let n = (e) => ({
68
84
  style: e.style,
69
- ...e.color ? { color: { argb: l(e.color) } } : {}
85
+ ...e.color ? { color: { argb: d(e.color) } } : {}
70
86
  });
71
87
  e.border = {
72
88
  ...t.borderTop ? { top: n(t.borderTop) } : {},
@@ -74,16 +90,16 @@ function u(e, t) {
74
90
  };
75
91
  }
76
92
  }
77
- function d(e, t, n) {
93
+ function p(e, t, n) {
78
94
  let r = e.addRow(t.values);
79
95
  t.style?.bold && (r.font = { bold: !0 }), t.merge && n > 1 && e.mergeCells(r.number, 1, r.number, n);
80
96
  let i = t.merge ? 1 : Math.max(t.values.length, 0);
81
97
  for (let e = 0; e < i; e++) {
82
98
  let n = r.getCell(e + 1);
83
- u(n, t.style), u(n, t.cells?.[e]);
99
+ f(n, t.style), f(n, t.cells?.[e]);
84
100
  }
85
101
  }
86
- async function f(e, t) {
102
+ async function m(e, t) {
87
103
  let n = new (await (o())).Workbook(), i = Math.max(1, e.sheets.reduce((e, t) => e + t.rows.length, 0)), a = Math.max(1, Math.floor(i / 50)), s = 0;
88
104
  for (let o of e.sheets) {
89
105
  let e = n.addWorksheet(o.name), c = o.columns.length;
@@ -91,61 +107,61 @@ async function f(e, t) {
91
107
  key: String(t),
92
108
  width: e.width
93
109
  }));
94
- for (let t of o.before ?? []) d(e, t, c);
95
- let f = e.addRow(o.columns.map((e) => e.header));
96
- f.font = { bold: o.headerStyle?.bold ?? !0 }, f.eachCell((e, t) => {
110
+ for (let t of o.before ?? []) p(e, t, c);
111
+ let l = e.addRow(o.columns.map((e) => e.header));
112
+ l.font = { bold: o.headerStyle?.bold ?? !0 }, l.eachCell((e, t) => {
97
113
  let n = o.columns[t - 1]?.align;
98
114
  n && (e.alignment = {
99
115
  horizontal: n,
100
116
  vertical: "middle"
101
- }), u(e, o.headerStyle);
117
+ }), f(e, o.headerStyle);
102
118
  });
103
- let p = f.number;
119
+ let u = l.number;
104
120
  o.freeze ? e.views = [{
105
121
  state: "frozen",
106
122
  ySplit: o.freeze.rows ?? 0,
107
123
  xSplit: o.freeze.cols ?? 0
108
124
  }] : o.freezeHeader !== !1 && (e.views = [{
109
125
  state: "frozen",
110
- ySplit: p
126
+ ySplit: u
111
127
  }]), o.rows.forEach((n, c) => {
112
- let d = e.addRow(n), f = o.cellStyles?.[c], p = o.stripe && c % 2 == 1;
128
+ let l = e.addRow(n), u = o.cellStyles?.[c], p = o.stripe && c % 2 == 1;
113
129
  if (o.columns.forEach((e, t) => {
114
- let n = d.getCell(t + 1);
130
+ let n = l.getCell(t + 1);
115
131
  e.numFmt && (typeof n.value == "number" || n.value instanceof Date) && (n.numFmt = e.numFmt), e.align && (n.alignment = {
116
132
  horizontal: e.align,
117
133
  vertical: "middle"
118
134
  }), p && (n.fill = {
119
135
  type: "pattern",
120
136
  pattern: "solid",
121
- fgColor: { argb: l(o.stripe) }
122
- }), u(n, e.style), u(n, f?.[t]);
137
+ fgColor: { argb: d(o.stripe) }
138
+ }), f(n, e.style), f(n, u?.[t]);
123
139
  }), ++s % a === 0) {
124
140
  if (t.signal?.aborted) throw r();
125
141
  t.progress(s / i * .9);
126
142
  }
127
143
  }), o.autoFilter && o.rows.length > 0 && (e.autoFilter = {
128
144
  from: {
129
- row: p,
145
+ row: u,
130
146
  column: 1
131
147
  },
132
148
  to: {
133
- row: p,
149
+ row: u,
134
150
  column: c
135
151
  }
136
152
  });
137
- for (let t of o.after ?? []) d(e, t, c);
153
+ for (let t of o.after ?? []) p(e, t, c);
138
154
  }
139
- let f = await n.xlsx.writeBuffer();
140
- return t.progress(1), c(f);
155
+ let c = await n.xlsx.writeBuffer();
156
+ return t.progress(1), u(c);
141
157
  }
142
- var p = { Roboto: {
158
+ var h = { Roboto: {
143
159
  normal: "Roboto-Regular.ttf",
144
160
  bold: "Roboto-Medium.ttf",
145
161
  italics: "Roboto-Italic.ttf",
146
162
  bolditalics: "Roboto-MediumItalic.ttf"
147
163
  } };
148
- function m(e) {
164
+ function g(e) {
149
165
  let t = e.hLineWidth ?? 1, n = e.edgeLineWidth ?? t;
150
166
  return {
151
167
  hLineWidth: (e, r) => e === 0 || e === (r.table.headerRows ?? 0) || e === r.table.body.length ? n : t,
@@ -162,7 +178,7 @@ function m(e) {
162
178
  }
163
179
  };
164
180
  }
165
- function h(e) {
181
+ function _(e) {
166
182
  return (t, n) => ({
167
183
  text: e.text.replace(/\{page\}/g, String(t)).replace(/\{pages\}/g, String(n)),
168
184
  ...e.font ? { font: e.font } : {},
@@ -172,7 +188,7 @@ function h(e) {
172
188
  ...e.margin ? { margin: e.margin } : {}
173
189
  });
174
190
  }
175
- async function g(e, t) {
191
+ async function v(e, t) {
176
192
  let n = t.pdfFonts ? {
177
193
  fonts: {
178
194
  ...t.pdfFonts.fonts,
@@ -184,16 +200,16 @@ async function g(e, t) {
184
200
  } : void 0
185
201
  } : e.fonts, i = e.footer ? {
186
202
  ...e.document,
187
- footer: h(e.footer)
188
- } : e.document, a = e.tableLayouts ? Object.fromEntries(Object.entries(e.tableLayouts).map(([e, t]) => [e, m(t)])) : void 0, { pdfMake: o, vfs: c } = await s();
203
+ footer: _(e.footer)
204
+ } : e.document, a = e.tableLayouts ? Object.fromEntries(Object.entries(e.tableLayouts).map(([e, t]) => [e, g(t)])) : void 0, { pdfMake: o, vfs: s } = await c();
189
205
  if (t.progress(.1), t.signal?.aborted) throw r();
190
206
  let l = {
191
- ...p,
207
+ ...h,
192
208
  ...n?.fonts ?? {}
193
209
  }, u = n?.vfs ? {
194
- ...c ?? {},
210
+ ...s ?? {},
195
211
  ...n.vfs
196
- } : c, d = await new Promise((e, t) => {
212
+ } : s, d = await new Promise((e, t) => {
197
213
  try {
198
214
  let n = o.createPdf(i, a, l, u).getStream(), r = [];
199
215
  n.on("data", (e) => r.push(e)), n.on("error", t), n.on("end", () => {
@@ -0,0 +1,310 @@
1
+ "use client";
2
+ import { Nn as e, wn as t } from "./geometry-DG134nYI.js";
3
+ import { n, t as r } from "./labels-BPItSeRU.js";
4
+ import { createContext as i, useCallback as a, useContext as o, useEffect as s, useId as ee, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
5
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
6
+ import { createPortal as te } from "react-dom";
7
+ // src/components/Dialog/dialogOpen.tsx
8
+ var m = i(null), h = i(0), g = ({ children: e }) => {
9
+ let [t, n] = d(0), r = l(() => () => {
10
+ n((e) => e + 1);
11
+ let e = !1;
12
+ return () => {
13
+ e || (e = !0, n((e) => e - 1));
14
+ };
15
+ }, []);
16
+ return /* @__PURE__ */ f(m.Provider, {
17
+ value: r,
18
+ children: /* @__PURE__ */ f(h.Provider, {
19
+ value: t,
20
+ children: e
21
+ })
22
+ });
23
+ };
24
+ function ne(e) {
25
+ let t = o(m);
26
+ s(() => e && t ? t() : void 0, [e, t]);
27
+ }
28
+ var _ = () => o(h), v = () => o(h) > 0, y = i(null), b = () => o(y), x = typeof document > "u" ? s : c;
29
+ function S(e, t, n) {
30
+ let r = e?.claim;
31
+ x(() => r && n ? r(t) : void 0, [
32
+ r,
33
+ t,
34
+ n
35
+ ]);
36
+ }
37
+ var C = {
38
+ root: "_root_6qxml_7",
39
+ nonModal: "_nonModal_6qxml_30",
40
+ panel: "_panel_6qxml_3",
41
+ center: "_center_6qxml_41",
42
+ right: "_right_6qxml_42",
43
+ left: "_left_6qxml_43",
44
+ top: "_top_6qxml_44",
45
+ bottom: "_bottom_6qxml_45",
46
+ sm: "_sm_6qxml_86",
47
+ md: "_md_6qxml_87",
48
+ lg: "_lg_6qxml_88",
49
+ xl: "_xl_6qxml_89",
50
+ full: "_full_6qxml_90",
51
+ header: "_header_6qxml_96",
52
+ headText: "_headText_6qxml_106",
53
+ title: "_title_6qxml_108",
54
+ subtitle: "_subtitle_6qxml_114",
55
+ body: "_body_6qxml_120",
56
+ flush: "_flush_6qxml_128",
57
+ footer: "_footer_6qxml_130",
58
+ slot: "_slot_6qxml_141",
59
+ close: "_close_6qxml_144",
60
+ dialogPop: "_dialogPop_6qxml_1",
61
+ slideFromRight: "_slideFromRight_6qxml_1",
62
+ slideFromLeft: "_slideFromLeft_6qxml_1",
63
+ slideFromTop: "_slideFromTop_6qxml_1",
64
+ slideFromBottom: "_slideFromBottom_6qxml_1",
65
+ backdropIn: "_backdropIn_6qxml_1",
66
+ closing: "_closing_6qxml_171"
67
+ }, w = 0, T = null, re = (e) => {
68
+ if (typeof document < "u") {
69
+ if (w === 0) {
70
+ let t = document.body;
71
+ T = {
72
+ overflow: t.style.overflow,
73
+ paddingRight: t.style.paddingRight
74
+ };
75
+ let n = window.innerWidth - document.documentElement.clientWidth;
76
+ if (e && n > 0) {
77
+ let e = parseFloat(window.getComputedStyle(t).paddingRight) || 0;
78
+ t.style.paddingRight = `${e + n}px`;
79
+ }
80
+ t.style.overflow = "hidden";
81
+ }
82
+ w += 1;
83
+ }
84
+ }, ie = () => {
85
+ typeof document < "u" && (w = Math.max(0, w - 1), w === 0 && T && (document.body.style.overflow = T.overflow, document.body.style.paddingRight = T.paddingRight, T = null));
86
+ }, ae = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, oe = /* @__PURE__ */ p("svg", {
87
+ width: "16",
88
+ height: "16",
89
+ viewBox: "0 0 24 24",
90
+ fill: "none",
91
+ stroke: "currentColor",
92
+ strokeWidth: "2",
93
+ strokeLinecap: "round",
94
+ "aria-hidden": "true",
95
+ children: [/* @__PURE__ */ f("line", {
96
+ x1: "18",
97
+ y1: "6",
98
+ x2: "6",
99
+ y2: "18"
100
+ }), /* @__PURE__ */ f("line", {
101
+ x1: "6",
102
+ y1: "6",
103
+ x2: "18",
104
+ y2: "18"
105
+ })]
106
+ }), se = 0, E = "button:not([disabled]),a[href],input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"]),[contenteditable=\"true\"]", D = ({ open: n, onClose: r, onBeforeClose: i, onEscKeyDown: o, onOverlayClick: m, onAnimationEnd: h, children: g, title: _, subtitle: v, footer: b, modal: x = !0, placement: S = "center", size: w = "md", closeOnBackdrop: T = !0, closeOnEscape: D = !0, showCloseButton: O = !0, closeIcon: ce, closeIconId: le, blockScroll: k = !0, reserveScrollBarGap: A = !0, initialFocusRef: j, container: ue, animationDuration: de = 200, padded: fe = !0, classNames: M = {}, styleSlots: N = {}, className: pe = "", style: me, role: he = "dialog", id: ge, "aria-label": P, "aria-labelledby": _e, "aria-describedby": ve }) => {
107
+ let ye = e(), F = u(null), [be, xe] = d(null), I = ee(), [L, R] = d({
108
+ header: 0,
109
+ footer: 0
110
+ }), [z, Se] = d(null), [B, Ce] = d(null), V = a((e) => (R((t) => ({
111
+ ...t,
112
+ [e]: t[e] + 1
113
+ })), () => R((t) => ({
114
+ ...t,
115
+ [e]: t[e] - 1
116
+ }))), []), we = l(() => ({
117
+ headerEl: z,
118
+ footerEl: B,
119
+ claim: V
120
+ }), [
121
+ z,
122
+ B,
123
+ V
124
+ ]), [H, U] = d(n), [Te, W] = d(!1), [G, K] = d(!1), q = u(null), J = u(n);
125
+ J.current = n;
126
+ let Y = u(null), Ee = ae() ? 0 : de;
127
+ ne(H), s(() => {
128
+ n ? (Y.current &&= (clearTimeout(Y.current), null), W(!1), U(!0)) : H && (W(!0), Y.current = setTimeout(() => {
129
+ F.current?.close(), U(!1), K(!1), W(!1), h?.();
130
+ }, Ee));
131
+ }, [n]), s(() => () => {
132
+ Y.current && clearTimeout(Y.current);
133
+ }, []);
134
+ let X = a(() => {
135
+ i && i() === !1 || r?.();
136
+ }, [i, r]);
137
+ c(() => {
138
+ let e = F.current;
139
+ if (e && H) {
140
+ if (!e.open) {
141
+ let t = document.activeElement;
142
+ q.current = t instanceof HTMLElement && t !== document.body ? t : null, x && (e.dataset.modalOrder = String(++se)), x ? e.showModal() : e.show();
143
+ }
144
+ K(!0);
145
+ }
146
+ }, [H, x]), c(() => {
147
+ let e = F.current;
148
+ if (!e || !G) return;
149
+ if (j?.current) {
150
+ j.current.focus({ focusVisible: !0 });
151
+ return;
152
+ }
153
+ let t = document.activeElement;
154
+ t && t !== e && e.contains(t) || e.querySelector(E)?.focus();
155
+ }, [G]), c(() => () => {
156
+ let e = F.current, t = q.current;
157
+ if (!e?.open || !t) return;
158
+ let n = document.activeElement;
159
+ (!n || n === document.body || e.contains(n)) && queueMicrotask(() => {
160
+ let e = document.activeElement;
161
+ t.isConnected && (!e || e === document.body) && t.focus({ preventScroll: !0 });
162
+ });
163
+ }, []), s(() => {
164
+ if (H && k && x) return re(A), () => ie();
165
+ }, [
166
+ H,
167
+ x,
168
+ k,
169
+ A
170
+ ]), s(() => {
171
+ let e = F.current;
172
+ if (!e || !H) return;
173
+ let t = (t) => {
174
+ t.key !== "Escape" || t.defaultPrevented || t.isComposing || t.target instanceof Node && e.contains(t.target) && (t.preventDefault(), o?.(t), D && X());
175
+ }, n = (e) => {
176
+ e.preventDefault(), o?.(e), D && X();
177
+ }, r = () => {
178
+ J.current && !e.open && e.isConnected && (x ? e.showModal() : e.show(), e.querySelector(E)?.focus());
179
+ }, i = e.ownerDocument.defaultView ?? window;
180
+ return i.addEventListener("keydown", t), e.addEventListener("cancel", n), e.addEventListener("close", r), () => {
181
+ i.removeEventListener("keydown", t), e.removeEventListener("cancel", n), e.removeEventListener("close", r);
182
+ };
183
+ }, [
184
+ H,
185
+ x,
186
+ D,
187
+ X,
188
+ o
189
+ ]);
190
+ let Z = u(!1), De = (e) => {
191
+ Z.current = e.target === F.current;
192
+ }, Oe = (e) => {
193
+ let t = Z.current && e.target === F.current;
194
+ Z.current = !1, t && (m?.(e), T && X());
195
+ };
196
+ if (!H) return null;
197
+ let Q = L.header > 0, ke = L.footer > 0, Ae = _ !== void 0 || v !== void 0, je = Ae || O || Q, Me = _e ?? ((_ !== void 0 || Q) && !P ? I : void 0), Ne = /* @__PURE__ */ f("dialog", {
198
+ ref: (e) => {
199
+ F.current = e, xe(e);
200
+ },
201
+ id: ge,
202
+ "data-modal": x ? "" : void 0,
203
+ className: [
204
+ C.root,
205
+ C[S],
206
+ C[w],
207
+ x ? "" : C.nonModal,
208
+ Te ? C.closing : "",
209
+ M.root,
210
+ pe
211
+ ].filter(Boolean).join(" "),
212
+ style: {
213
+ "--dialog-anim": `${Ee}ms`,
214
+ ...N.root,
215
+ ...me
216
+ },
217
+ role: he,
218
+ "aria-label": P,
219
+ "aria-labelledby": Me,
220
+ "aria-describedby": ve,
221
+ "aria-modal": x || void 0,
222
+ onPointerDown: De,
223
+ onPointerUp: Oe,
224
+ children: /* @__PURE__ */ f(t.Provider, {
225
+ value: be,
226
+ children: /* @__PURE__ */ f(y.Provider, {
227
+ value: we,
228
+ children: G && /* @__PURE__ */ p("div", {
229
+ className: [C.panel, M.panel].filter(Boolean).join(" "),
230
+ style: N.panel,
231
+ children: [
232
+ je && /* @__PURE__ */ p("div", {
233
+ className: [C.header, M.header].filter(Boolean).join(" "),
234
+ style: N.header,
235
+ children: [
236
+ (Ae || !Q) && /* @__PURE__ */ p("span", {
237
+ className: C.headText,
238
+ children: [_ !== void 0 && /* @__PURE__ */ f("span", {
239
+ className: C.title,
240
+ id: I,
241
+ children: _
242
+ }), v !== void 0 && /* @__PURE__ */ f("span", {
243
+ className: C.subtitle,
244
+ children: v
245
+ })]
246
+ }),
247
+ Q && /* @__PURE__ */ f("div", {
248
+ ref: Se,
249
+ className: C.slot,
250
+ id: _ === void 0 ? I : void 0
251
+ }),
252
+ O && /* @__PURE__ */ f("button", {
253
+ type: "button",
254
+ id: le,
255
+ className: [C.close, M.closeButton].filter(Boolean).join(" "),
256
+ style: N.closeButton,
257
+ onClick: X,
258
+ "aria-label": ye.dialog.close,
259
+ children: ce ?? oe
260
+ })
261
+ ]
262
+ }),
263
+ g !== void 0 && /* @__PURE__ */ f("div", {
264
+ className: [
265
+ C.body,
266
+ fe ? "scroll-fade-y scroll-gutter" : `${C.flush} scroll-fade-y`,
267
+ M.body
268
+ ].filter(Boolean).join(" "),
269
+ style: N.body,
270
+ children: g
271
+ }),
272
+ (b !== void 0 || ke) && /* @__PURE__ */ p("div", {
273
+ className: [C.footer, M.footer].filter(Boolean).join(" "),
274
+ style: N.footer,
275
+ children: [b, ke && /* @__PURE__ */ f("div", {
276
+ ref: Ce,
277
+ className: C.slot
278
+ })]
279
+ })
280
+ ]
281
+ })
282
+ })
283
+ })
284
+ }), $ = ue ?? (typeof document > "u" ? null : document.body);
285
+ return $ ? te(Ne, $) : null;
286
+ };
287
+ D.displayName = "Dialog";
288
+ var O = i({
289
+ authorize: () => !0,
290
+ exportOptions: {},
291
+ serverMode: !1,
292
+ labels: r,
293
+ format: n(),
294
+ text: {
295
+ yes: r.yes,
296
+ no: r.no
297
+ }
298
+ });
299
+ function ce() {
300
+ return o(O);
301
+ }
302
+ function le() {
303
+ return o(O).labels;
304
+ }
305
+ function k(e, t, n) {
306
+ return !e || e(t, n) !== !1;
307
+ }
308
+ // src/components/DataTable/layout/scrollArea.ts
309
+ var A = "dt-scroll-area scroll-fade-y scroll-gutter", j = "dt-scroll-area scroll-fade-x scroll-fade-y scroll-gutter";
310
+ export { le as a, S as c, v as d, _ as f, k as i, b as l, A as n, ce as o, O as r, D as s, j as t, g as u };