@versini/sassysaint 8.120.2 → 8.121.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 (84) hide show
  1. package/dist/chunks/{AboutChangelog.DoiRugZu.js → AboutChangelog.CueW7QKj.js} +2 -2
  2. package/dist/chunks/{AboutEntry.2lb6aCPw.js → AboutEntry.dQ_4JNsz.js} +7 -7
  3. package/dist/chunks/{App.LXYuxuaD.js → App.6iDkXSOb.js} +16 -16
  4. package/dist/chunks/{BubbleActions.BSynTDf9.js → BubbleActions.DB_SDTs9.js} +3 -3
  5. package/dist/chunks/ButtonIconDelete.B3hYKTP6.js +668 -0
  6. package/dist/chunks/{Chart.D4ePChIu.js → Chart.m2plpxTN.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.C1YCh4fN.js → ChatBubbleAssistant.DhP5KHH7.js} +5 -5
  8. package/dist/chunks/{ChatBubbleUser.D7rYXigx.js → ChatBubbleUser.DythvYOo.js} +4 -4
  9. package/dist/chunks/HistoryEntry._G88vZeP.js +721 -0
  10. package/dist/chunks/{LoginEntry.DXYZbzqN.js → LoginEntry.BBF4_rEV.js} +4 -4
  11. package/dist/chunks/{LogoEntry.DfnJLwfC.js → LogoEntry.BtwLANob.js} +82 -116
  12. package/dist/chunks/{MemoriesEntry.CWLD3Ziw.js → MemoriesEntry.r2Wtd8nu.js} +34 -35
  13. package/dist/chunks/{ProfileEntry.CF04C2No.js → ProfileEntry.DwGmWxH2.js} +4 -4
  14. package/dist/chunks/{SettingsEntry.CyITTF2y.js → SettingsEntry.D7b4vTwv.js} +5 -5
  15. package/dist/chunks/{UsageEntry.CYDJzsdG.js → UsageEntry.BB5KalRi.js} +5 -5
  16. package/dist/chunks/{_baseUniq.CSGd2q_x.js → _baseUniq.22z3R--R.js} +1 -1
  17. package/dist/chunks/{arc.BJiHJp13.js → arc.Cg0BJN6o.js} +1 -1
  18. package/dist/chunks/{architecture-U656AL7Q.DsDjCJCZ.js → architecture-U656AL7Q.D7Nmp0uq.js} +1 -1
  19. package/dist/chunks/{architectureDiagram-VXUJARFQ.BY-J8uT9.js → architectureDiagram-VXUJARFQ.D58LaEiy.js} +4 -4
  20. package/dist/chunks/{blockDiagram-VD42YOAC.DK7lHaHz.js → blockDiagram-VD42YOAC.BS_n-q2N.js} +5 -5
  21. package/dist/chunks/{browser.BsROFTmt.js → browser.YA6spcA7.js} +1 -1
  22. package/dist/chunks/{c4Diagram-YG6GDRKO.Qe2wImGt.js → c4Diagram-YG6GDRKO.lVOg2-ZH.js} +2 -2
  23. package/dist/chunks/{channel.DePjU_zU.js → channel.DqxR-oS7.js} +1 -1
  24. package/dist/chunks/{chunk-4BX2VUAB.CpiHY6xd.js → chunk-4BX2VUAB.D5lbe9g-.js} +1 -1
  25. package/dist/chunks/{chunk-55IACEB6.D9v7O2f8.js → chunk-55IACEB6.BlgGY9Q6.js} +1 -1
  26. package/dist/chunks/{chunk-B4BG7PRW.CZiUAwII.js → chunk-B4BG7PRW.Bn-86p3H.js} +4 -4
  27. package/dist/chunks/{chunk-DI55MBZ5.CsrXEMzK.js → chunk-DI55MBZ5.C2fqe7wu.js} +3 -3
  28. package/dist/chunks/{chunk-FMBD7UC4.kvQChVDk.js → chunk-FMBD7UC4.8IJZbT_o.js} +1 -1
  29. package/dist/chunks/{chunk-QN33PNHL.C52xMkBM.js → chunk-QN33PNHL.DOV2bTYS.js} +1 -1
  30. package/dist/chunks/{chunk-QZHKN3VN.DoS3CMXU.js → chunk-QZHKN3VN.CM1K8z3e.js} +1 -1
  31. package/dist/chunks/{chunk-TZMSLE5B.DSg6yj4E.js → chunk-TZMSLE5B.CH_b17FM.js} +1 -1
  32. package/dist/chunks/{classDiagram-2ON5EDUG.sF4InxFe.js → classDiagram-2ON5EDUG.DeWSBBaZ.js} +2 -2
  33. package/dist/chunks/{classDiagram-v2-WZHVMYZB.sF4InxFe.js → classDiagram-v2-WZHVMYZB.DeWSBBaZ.js} +2 -2
  34. package/dist/chunks/{clone.CVPkDcM5.js → clone.B0TtmQHA.js} +1 -1
  35. package/dist/chunks/{cose-bilkent-S5V4N54A.BfP6Pw4_.js → cose-bilkent-S5V4N54A.IzOlhIoo.js} +2 -2
  36. package/dist/chunks/{dagre-6UL2VRFP.CDSC4KTt.js → dagre-6UL2VRFP.COZ3hsXn.js} +5 -5
  37. package/dist/chunks/{diagram-PSM6KHXK.BKu8xN5f.js → diagram-PSM6KHXK.JEnBJXhp.js} +4 -4
  38. package/dist/chunks/{diagram-QEK2KX5R.CV6FCkl1.js → diagram-QEK2KX5R.Bb3EEO2D.js} +3 -3
  39. package/dist/chunks/{diagram-S2PKOQOG.CE2fqmGK.js → diagram-S2PKOQOG.B_aUDr5F.js} +3 -3
  40. package/dist/chunks/{erDiagram-Q2GNP2WA.DvPF0zmB.js → erDiagram-Q2GNP2WA.CYpL6V9w.js} +4 -4
  41. package/dist/chunks/{flowDiagram-NV44I4VS.DuwDLdNV.js → flowDiagram-NV44I4VS.CF9-8TaP.js} +5 -5
  42. package/dist/chunks/{ganttDiagram-JELNMOA3.COhtg4Ox.js → ganttDiagram-JELNMOA3.CdE8GB2s.js} +2 -2
  43. package/dist/chunks/{gitGraph-F6HP7TQM.DlTeaeqU.js → gitGraph-F6HP7TQM.BWmUmcZV.js} +1 -1
  44. package/dist/chunks/{gitGraphDiagram-NY62KEGX.D9HKSUvx.js → gitGraphDiagram-NY62KEGX.Cn0Cu7Ww.js} +4 -4
  45. package/dist/chunks/{graph.CVvFC68c.js → graph.B0nity3n.js} +2 -2
  46. package/dist/chunks/{index.BDAcSpU5.js → index.Biab5cek.js} +1 -1
  47. package/dist/chunks/{index.Bk1zpyWs.js → index.BkSC8d7B.js} +3 -3
  48. package/dist/chunks/{index.DGQNdcmV.js → index.C2WmpF2e.js} +1 -1
  49. package/dist/chunks/{index.B8Hpndux.js → index.CAuXCAe5.js} +1 -1
  50. package/dist/chunks/{index.B0rqfWlE.js → index.CJxTPes-.js} +1 -1
  51. package/dist/chunks/{index.D53DWjsz.js → index.Ci5e_98Z.js} +3 -3
  52. package/dist/chunks/{index.I0YKXWDW.js → index.D3dY6con.js} +1 -1
  53. package/dist/chunks/{index.CPrdgeh7.js → index.D_0HoqM8.js} +1 -1
  54. package/dist/chunks/{index.MdqXJbz5.js → index.Ds4-4dzy.js} +316 -344
  55. package/dist/chunks/{info-NVLQJR56.D3stHz25.js → info-NVLQJR56.DfoQxnaP.js} +1 -1
  56. package/dist/chunks/{infoDiagram-WHAUD3N6.BIvDCJy6.js → infoDiagram-WHAUD3N6.CbDQCj4t.js} +2 -2
  57. package/dist/chunks/{journeyDiagram-XKPGCS4Q.BdAmj6HJ.js → journeyDiagram-XKPGCS4Q.BGwMjBf9.js} +4 -4
  58. package/dist/chunks/{kanban-definition-3W4ZIXB7.CqK6qeLd.js → kanban-definition-3W4ZIXB7.CS-TV1ji.js} +2 -2
  59. package/dist/chunks/{layout.BdufB78T.js → layout.DKjnDekM.js} +4 -4
  60. package/dist/chunks/{mermaid-parser.core.VCpWUlic.js → mermaid-parser.core.CBflstHb.js} +10 -10
  61. package/dist/chunks/{min.DgG7zTox.js → min.eDGqv0vt.js} +2 -2
  62. package/dist/chunks/{mindmap-definition-VGOIOE7T.BW-PNhZD.js → mindmap-definition-VGOIOE7T.GckYx6Fd.js} +3 -3
  63. package/dist/chunks/{packet-BFZMPI3H.BUoS4gNB.js → packet-BFZMPI3H.DzGbdOiU.js} +1 -1
  64. package/dist/chunks/{pie-7BOR55EZ.BlIbPo6j.js → pie-7BOR55EZ.CRxLvxJh.js} +1 -1
  65. package/dist/chunks/{pieDiagram-ADFJNKIX.NE-fVH6e.js → pieDiagram-ADFJNKIX.BuekQ8o8.js} +4 -4
  66. package/dist/chunks/{quadrantDiagram-AYHSOK5B.hstKbyhk.js → quadrantDiagram-AYHSOK5B.Cz1W80fL.js} +1 -1
  67. package/dist/chunks/{radar-NHE76QYJ.BWSNlMTC.js → radar-NHE76QYJ.D_eJ0pAQ.js} +1 -1
  68. package/dist/chunks/{rehype-mermaid.CysVWi5J.js → rehype-mermaid.C6vWaLbm.js} +33 -33
  69. package/dist/chunks/{requirementDiagram-UZGBJVZJ.Chaf_g91.js → requirementDiagram-UZGBJVZJ.D29ENfNv.js} +3 -3
  70. package/dist/chunks/{sankeyDiagram-TZEHDZUN.CK88CAhG.js → sankeyDiagram-TZEHDZUN.BkA8zy0e.js} +1 -1
  71. package/dist/chunks/{sequenceDiagram-WL72ISMW.DaHa-qh1.js → sequenceDiagram-WL72ISMW.CohhptW1.js} +3 -3
  72. package/dist/chunks/{stateDiagram-FKZM4ZOC.CkNLPjIg.js → stateDiagram-FKZM4ZOC.DXcdl9T3.js} +4 -4
  73. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.Dzi34EM6.js → stateDiagram-v2-4FDKWEC3.CyTSxcZ6.js} +2 -2
  74. package/dist/chunks/{timeline-definition-IT6M3QCI.BsHG309-.js → timeline-definition-IT6M3QCI.BvhsFWgy.js} +2 -2
  75. package/dist/chunks/{treemap-KMMF4GRG.CiCns-I1.js → treemap-KMMF4GRG.DdhwEUUj.js} +1 -1
  76. package/dist/chunks/{useMarkdown.CYWo-hGo.js → useMarkdown.CdWXCETb.js} +8 -8
  77. package/dist/chunks/{xychartDiagram-PRI3JC2R.xfQd6NZ0.js → xychartDiagram-PRI3JC2R.vlO9NN_Y.js} +1 -1
  78. package/dist/components/SassySaint/SassySaint.js +1 -1
  79. package/dist/index.js +3 -3
  80. package/package.json +3 -3
  81. package/dist/chunks/ButtonIconDelete.wI-EXJFx.js +0 -550
  82. package/dist/chunks/HistoryDataGrid.B7G6X-Tv.js +0 -467
  83. package/dist/chunks/HistoryEntry.DJE028Vp.js +0 -305
  84. package/dist/chunks/InlineFilter.CdKFyOpD.js +0 -123
@@ -1,550 +0,0 @@
1
- import me, { createContext as ve, useContext as ye, useRef as Z, useLayoutEffect as ee, useState as B, useCallback as F, useMemo as K, useId as Ce, useEffect as J } from "react";
2
- import d from "clsx";
3
- import { jsx as i, jsxs as D, Fragment as ke } from "react/jsx-runtime";
4
- import { CellWrapper as R, BlurEffects as E, IconSortUp as xe, IconSortDown as He, IconSort as we, ButtonIcon as Se, IconDelete as Te } from "./LogoEntry.DfnJLwfC.js";
5
- import { ResponsiveTooltip as Ne } from "./App.LXYuxuaD.js";
6
- const T = ve({
7
- mode: "system"
8
- });
9
- function Ye(e) {
10
- return d("contents", e);
11
- }
12
- function Ke(e, s) {
13
- const r = ye(T), o = Z([]);
14
- ee(() => {
15
- const t = e.current, a = r.columns && (r.stickyHeader || r.stickyFooter);
16
- if (!t || !a || !r.setMeasuredColumnWidths)
17
- return;
18
- const n = t.querySelector('[role="row"]');
19
- if (!n)
20
- return;
21
- const c = n.querySelectorAll('[role="cell"], [role="columnheader"], [role="gridcell"]');
22
- if (c.length === 0)
23
- return;
24
- const g = () => {
25
- const u = Array.from(c).map((b) => b.getBoundingClientRect().width), f = o.current;
26
- (u.length !== f.length || u.some((b, k) => b !== f[k])) && (o.current = u, r.setMeasuredColumnWidths?.(u));
27
- };
28
- g();
29
- const l = new ResizeObserver(() => {
30
- g();
31
- });
32
- l.observe(t);
33
- for (const u of c)
34
- l.observe(u);
35
- return () => l.disconnect();
36
- }, [
37
- r.columns,
38
- r.stickyHeader,
39
- r.stickyFooter,
40
- r.setMeasuredColumnWidths,
41
- s
42
- ]);
43
- }
44
- const w = (e) => e === "dark", S = (e) => e === "light", h = (e) => e === "system", v = (e) => e === "alt-system", te = (e) => w(e) || h(e), re = (e) => S(e) || v(e), Ie = (e) => !!(e && e !== E.NONE), j = (e) => e === R.HEADER, se = (e) => e === R.FOOTER, oe = "text-copy-light", _ = "text-copy-dark", L = "text-copy-light dark:text-copy-dark", ae = "text-copy-dark dark:text-copy-light", Q = ({ mode: e }) => d({
45
- [oe]: w(e),
46
- [_]: S(e),
47
- [L]: h(e),
48
- [ae]: v(e)
49
- }), U = ({ mode: e, hasBlur: s }) => d({
50
- [_]: w(e) && !s || S(e),
51
- [L]: h(e) && s,
52
- "text-copy-dark dark:text-copy-dark": (h(e) || v(e)) && !s
53
- }), Be = ({ mode: e }) => d({
54
- "bg-surface-darker": te(e),
55
- "bg-surface-light": re(e),
56
- "dark:bg-surface-light": h(e),
57
- "dark:bg-surface-darker": v(e)
58
- }), G = ({ hasBlur: e, sticky: s }) => d({
59
- "bg-surface-medium/50 dark:bg-surface-medium/50": e && s,
60
- "bg-surface-medium-light dark:bg-surface-medium-light": !e
61
- }), Ee = ({ mode: e }) => d({
62
- "border-table-dark": te(e),
63
- "border-table-light": re(e),
64
- "dark:border-table-light": h(e),
65
- "dark:border-table-dark": v(e)
66
- }), Fe = ({ blurEffect: e }) => d({
67
- "backdrop-blur-sm": e === E.SMALL,
68
- "backdrop-blur-md": e === E.MEDIUM,
69
- "backdrop-blur-lg": e === E.LARGE
70
- }), De = ({ mode: e }) => d("text-lg font-medium", {
71
- [_]: S(e),
72
- [oe]: w(e),
73
- [ae]: v(e),
74
- [L]: h(e)
75
- }), Re = ({ mode: e }) => ({
76
- inner: "relative",
77
- overlay: d("absolute inset-0 z-20 cursor-not-allowed rounded-lg", "backdrop-blur-xs bg-white/30 dark:bg-black/30"),
78
- loadingWrapper: d("absolute z-30 top-0 left-0 right-0 h-[min(100%,100vh)]", "flex items-center justify-center", "pointer-events-none"),
79
- loadingText: De({
80
- mode: e
81
- })
82
- }), ze = ({ mode: e, className: s, wrapperClassName: r, stickyHeader: o, stickyFooter: t, loading: a }) => {
83
- const n = a ? Re({
84
- mode: e
85
- }) : null, c = o || t;
86
- return {
87
- overlay: n?.overlay ?? "",
88
- inner: n?.inner ?? "",
89
- loadingWrapper: n?.loadingWrapper ?? "",
90
- loadingText: n?.loadingText ?? "",
91
- wrapper: d("not-prose relative w-full rounded-lg shadow-md", {
92
- "overflow-x-auto": !c && !a,
93
- "overflow-hidden flex flex-col": c || a
94
- }, Be({
95
- mode: e
96
- }), Q({
97
- mode: e
98
- }), r),
99
- scrollableContent: d("overflow-y-auto overflow-x-hidden rounded-[inherit] flex-1 min-h-0"),
100
- grid: d("my-0 w-full text-left text-sm grid", s, Q({
101
- mode: e
102
- }))
103
- };
104
- }, Ae = ({ className: e, stickyHeader: s, mode: r, blurEffect: o }) => {
105
- const t = Ie(o), a = U({
106
- mode: r,
107
- hasBlur: t
108
- });
109
- return s ? d("flex flex-col border-b border-table-medium shadow-md", "absolute left-0 right-0 z-20 top-0 rounded-t-lg", G({
110
- hasBlur: t,
111
- sticky: !0
112
- }), a, Fe({
113
- blurEffect: o
114
- }), e) : d("contents", G({
115
- hasBlur: t,
116
- sticky: !1
117
- }), a, e);
118
- }, je = ({ captionClassName: e, mode: s, hasBlur: r, stickyHeader: o }) => d("py-2 text-sm text-center font-bold col-span-full", U({
119
- mode: s,
120
- hasBlur: r
121
- }), !o && G({
122
- hasBlur: r,
123
- sticky: !1
124
- }), e), O = "group grid items-center", Ge = ({ mode: e, className: s, cellWrapper: r, isLastRow: o, stickyHeader: t, stickyFooter: a }) => {
125
- if (j(r) || se(r)) {
126
- const c = j(r);
127
- return (c ? !t : !a) ? d(O, G({
128
- hasBlur: !1,
129
- sticky: !1
130
- }), c ? "border-b border-table-medium shadow-md" : "border-t border-table-medium", s) : d(O, s);
131
- }
132
- return d(O, o !== void 0 ? o ? "border-b border-b-transparent dark:border-b-transparent" : "border-b" : "border-b last:border-0", "hover:bg-surface-medium hover:text-copy-light", Ee({
133
- mode: e
134
- }), s);
135
- }, ne = ({ cellWrapper: e, className: s, compact: r, align: o, mode: t, borderLeft: a, borderRight: n }) => d({
136
- "px-2 py-1": r,
137
- "px-4 py-3": !r
138
- }, {
139
- "text-left justify-start": o === "left" || !o,
140
- "text-center justify-center": o === "center",
141
- "text-right justify-end": o === "right"
142
- }, {
143
- "font-bold": j(e) || se(e)
144
- }, "first:group-data-active:relative", "first:group-data-active:before:absolute first:group-data-active:before:left-0 first:group-data-active:before:top-0 first:group-data-active:before:bottom-0 first:group-data-active:before:w-1", "first:group-data-active:self-stretch first:group-data-active:flex first:group-data-active:items-center", {
145
- "first:group-data-active:before:bg-table-active-dark": w(t),
146
- "first:group-data-active:before:bg-table-active-light": S(t),
147
- "first:group-data-active:before:bg-table-active-dark dark:first:group-data-active:before:bg-table-active-light": h(t),
148
- "first:group-data-active:before:bg-table-active-light dark:first:group-data-active:before:bg-table-active-dark": v(t)
149
- }, {
150
- "self-stretch flex items-center": a || n,
151
- "border-l border-l-table-dark": a && w(t),
152
- "border-l border-l-table-light": a && S(t),
153
- "border-l border-l-table-dark dark:border-l-table-light": a && h(t),
154
- "border-l border-l-table-light dark:border-l-table-dark": a && v(t),
155
- "border-r border-r-table-dark": n && w(t),
156
- "border-r border-r-table-light": n && S(t),
157
- "border-r border-r-table-dark dark:border-r-table-light": n && h(t),
158
- "border-r border-r-table-light dark:border-r-table-dark": n && v(t)
159
- }, s), Me = (e) => j(e) ? "columnheader" : "gridcell";
160
- const Oe = ({ className: e, wrapperClassName: s, children: r, mode: o = "system", compact: t = !1, stickyHeader: a = !1, stickyFooter: n = !1, blurEffect: c = E.NONE, maxHeight: g, loading: l = !1, columns: u, ...f }) => {
161
- const [y, b] = B(0), [k, C] = B(0), [p, z] = B(0), [x, M] = B(0), [A, ie] = B([]), W = F(() => b((m) => m + 1), []), $ = F(() => b((m) => m - 1), []), X = F(() => C((m) => m + 1), []), V = F(() => C((m) => m - 1), []), le = y > 0, ce = k > 0, N = a && le, I = n && ce, [de, ue] = B(void 0), q = F((m) => {
162
- ue(m);
163
- }, []), H = K(() => ze({
164
- mode: o,
165
- className: e,
166
- wrapperClassName: s,
167
- stickyHeader: N,
168
- stickyFooter: I,
169
- loading: !!l
170
- }), [
171
- o,
172
- e,
173
- s,
174
- N,
175
- I,
176
- l
177
- ]), fe = K(() => ({
178
- mode: o,
179
- compact: t,
180
- stickyHeader: N,
181
- stickyFooter: I,
182
- blurEffect: c,
183
- columns: u,
184
- measuredColumnWidths: A,
185
- setCaptionId: q,
186
- registerHeader: W,
187
- unregisterHeader: $,
188
- registerFooter: X,
189
- unregisterFooter: V,
190
- setHeaderHeight: z,
191
- setFooterHeight: M,
192
- setMeasuredColumnWidths: ie
193
- }), [
194
- o,
195
- t,
196
- N,
197
- I,
198
- c,
199
- u,
200
- A,
201
- q,
202
- W,
203
- $,
204
- X,
205
- V
206
- ]), P = g ? {
207
- maxHeight: typeof g == "number" ? `${g}px` : g
208
- } : void 0, ge = {
209
- ...P,
210
- paddingTop: N ? p : void 0,
211
- paddingBottom: I ? x : void 0
212
- }, be = N || I, he = u ? {
213
- gridTemplateColumns: u.join(" ")
214
- } : void 0, Y = /* @__PURE__ */ i("div", {
215
- role: "grid",
216
- "aria-labelledby": de,
217
- className: H.grid,
218
- style: he,
219
- ...f,
220
- children: r
221
- }), pe = typeof l == "string" ? l : l ? "Loading..." : null;
222
- return /* @__PURE__ */ i(T.Provider, {
223
- value: fe,
224
- children: /* @__PURE__ */ D("div", {
225
- className: H.inner,
226
- children: [
227
- l && /* @__PURE__ */ D(ke, {
228
- children: [
229
- /* @__PURE__ */ i("div", {
230
- className: H.overlay,
231
- "aria-hidden": "true"
232
- }),
233
- /* @__PURE__ */ i("div", {
234
- className: H.loadingWrapper,
235
- children: /* @__PURE__ */ i("span", {
236
- className: H.loadingText,
237
- role: "status",
238
- children: pe
239
- })
240
- })
241
- ]
242
- }),
243
- /* @__PURE__ */ i("div", {
244
- className: H.wrapper,
245
- style: P,
246
- children: be ? /* @__PURE__ */ i("div", {
247
- className: H.scrollableContent,
248
- style: ge,
249
- children: Y
250
- }) : Y
251
- })
252
- ]
253
- })
254
- });
255
- }, Je = (e) => /* @__PURE__ */ i(
256
- Oe,
257
- {
258
- stickyHeader: !0,
259
- stickyFooter: !0,
260
- compact: !0,
261
- mode: "alt-system",
262
- blurEffect: "medium",
263
- wrapperClassName: d(
264
- "ring-2 ring-surface-light",
265
- "dark:ring-surface-medium",
266
- "max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]",
267
- "sm:max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]"
268
- ),
269
- ...e
270
- }
271
- );
272
- const Qe = ({ className: e, children: s, align: r, borderLeft: o, borderRight: t, colSpan: a, style: n, ...c }) => /* @__PURE__ */ i(T.Consumer, {
273
- children: ({ mode: g, compact: l, cellWrapper: u }) => {
274
- const f = ne({
275
- cellWrapper: u,
276
- className: e,
277
- mode: g,
278
- compact: l,
279
- align: r,
280
- borderLeft: o,
281
- borderRight: t
282
- }), y = Me(u), b = a && a > 1 ? {
283
- ...n,
284
- gridColumn: `span ${a}`
285
- } : n;
286
- return /* @__PURE__ */ i("div", {
287
- role: y,
288
- className: f,
289
- style: b,
290
- ...c,
291
- children: s
292
- });
293
- }
294
- });
295
- const _e = (e) => e ? d(
296
- "relative",
297
- "focus-within:static",
298
- "focus-within:after:border-transparent",
299
- "after:absolute",
300
- "after:content-['']",
301
- "after:border-b-2",
302
- "after:-bottom-1",
303
- "after:left-0",
304
- "after:right-0",
305
- // the small border at the bottom of the button when it is active (sorted)
306
- "after:border-table-light"
307
- ) : "", Le = ({ active: e = !1, className: s, onClick: r, labelRight: o, children: t, blurEffect: a, mode: n }) => {
308
- const c = !!(a && a !== E.NONE), g = d(
309
- // Base styles
310
- "flex items-center cursor-pointer",
311
- // Size - small
312
- "h-6 px-1 sm:px-2",
313
- // Font
314
- "text-sm font-bold",
315
- // Radius - small
316
- "rounded-xs",
317
- // Text color
318
- U({
319
- mode: n,
320
- hasBlur: c
321
- }),
322
- // Focus styles
323
- "focus:outline",
324
- "focus:outline-2",
325
- "focus:outline-offset-2",
326
- "focus:outline-focus-medium",
327
- // Hover styles
328
- "hover:text-copy-light-hover",
329
- "hover:bg-action-darker-hover",
330
- // Active styles
331
- "active:text-copy-medium-active",
332
- "active:bg-action-dark-active",
333
- // Custom className
334
- s
335
- ), l = _e(e);
336
- return /* @__PURE__ */ i("div", {
337
- className: l,
338
- children: /* @__PURE__ */ D("button", {
339
- className: g,
340
- type: "button",
341
- onClick: r,
342
- children: [
343
- /* @__PURE__ */ i("span", {
344
- className: "text-copy-light",
345
- children: t
346
- }),
347
- o && /* @__PURE__ */ i("span", {
348
- className: "pl-2",
349
- children: o
350
- })
351
- ]
352
- })
353
- });
354
- }, Ze = ({ className: e, children: s, cellId: r, onSort: o, sortDirection: t, sortedCell: a, slotLeft: n, slotRight: c, buttonClassName: g, align: l, ...u }) => {
355
- const f = a === r, y = () => {
356
- o && o(r, f && t ? t : void 0);
357
- }, b = () => f && t === "asc" ? /* @__PURE__ */ i(xe, {
358
- size: "size-4",
359
- monotone: !0
360
- }) : f && t === "desc" ? /* @__PURE__ */ i(He, {
361
- size: "size-4",
362
- monotone: !0
363
- }) : /* @__PURE__ */ i(we, {
364
- size: "size-4",
365
- monotone: !0
366
- }), k = () => f && t === "asc" ? "ascending" : f && t === "desc" ? "descending" : "other";
367
- return /* @__PURE__ */ i(T.Consumer, {
368
- children: ({ mode: C, compact: p, cellWrapper: z, blurEffect: x }) => {
369
- const M = ne({
370
- cellWrapper: z,
371
- className: e,
372
- mode: C,
373
- compact: p,
374
- align: l
375
- }), A = d("flex", {
376
- "justify-start": l === "left" || !l,
377
- "justify-center": l === "center",
378
- "justify-end": l === "right"
379
- });
380
- return /* @__PURE__ */ i("div", {
381
- className: M,
382
- role: "columnheader",
383
- "aria-sort": k(),
384
- ...u,
385
- children: /* @__PURE__ */ D("div", {
386
- className: A,
387
- children: [
388
- n,
389
- /* @__PURE__ */ i(Le, {
390
- mode: C,
391
- blurEffect: x,
392
- active: f,
393
- className: g,
394
- onClick: y,
395
- labelRight: s,
396
- children: b()
397
- }),
398
- c
399
- ]
400
- })
401
- });
402
- }
403
- });
404
- };
405
- const Ue = ({ caption: e, captionClassName: s, className: r, children: o, ...t }) => {
406
- const a = Ce();
407
- return /* @__PURE__ */ i(T.Consumer, {
408
- children: (n) => /* @__PURE__ */ i(We, {
409
- caption: e,
410
- captionClassName: s,
411
- captionId: a,
412
- className: r,
413
- ctx: n,
414
- ...t,
415
- children: o
416
- })
417
- });
418
- };
419
- Ue.displayName = "DataGridHeader";
420
- const We = ({ caption: e, captionClassName: s, captionId: r, className: o, ctx: t, children: a, ...n }) => {
421
- const c = Z(null);
422
- return J(() => (t.registerHeader?.(), () => {
423
- t.unregisterHeader?.();
424
- }), [
425
- t.registerHeader,
426
- t.unregisterHeader
427
- ]), J(() => (e && t.setCaptionId && t.setCaptionId(r), () => {
428
- t.setCaptionId && t.setCaptionId(void 0);
429
- }), [
430
- e,
431
- r,
432
- t.setCaptionId
433
- ]), ee(() => {
434
- const g = c.current;
435
- if (!g || !t.stickyHeader || !t.setHeaderHeight)
436
- return;
437
- const l = new ResizeObserver((u) => {
438
- const f = u[0]?.borderBoxSize?.[0]?.blockSize;
439
- f !== void 0 && t.setHeaderHeight?.(f);
440
- });
441
- return l.observe(g), () => l.disconnect();
442
- }, [
443
- t.stickyHeader,
444
- t.setHeaderHeight
445
- ]), /* @__PURE__ */ i(T.Provider, {
446
- value: {
447
- ...t,
448
- cellWrapper: R.HEADER
449
- },
450
- children: /* @__PURE__ */ D("div", {
451
- ref: c,
452
- role: "rowgroup",
453
- className: Ae({
454
- className: o,
455
- stickyHeader: t.stickyHeader,
456
- mode: t.mode,
457
- blurEffect: t.blurEffect
458
- }),
459
- ...n,
460
- children: [
461
- e && /* @__PURE__ */ i("div", {
462
- id: r,
463
- className: je({
464
- captionClassName: s,
465
- mode: t.mode,
466
- hasBlur: !!(t.blurEffect && t.blurEffect !== "none"),
467
- stickyHeader: !!t.stickyHeader
468
- }),
469
- children: e
470
- }),
471
- a
472
- ]
473
- })
474
- });
475
- };
476
- const et = ({ className: e, children: s, active: r, style: o, ...t }) => {
477
- const a = me.Children.count(s);
478
- return /* @__PURE__ */ i(T.Consumer, {
479
- children: ({ mode: n, cellWrapper: c, stickyHeader: g, stickyFooter: l, columns: u, measuredColumnWidths: f, isLastRow: y }) => {
480
- const b = c === R.HEADER && g, k = c === R.FOOTER && l, C = b || k;
481
- let p;
482
- return u ? C ? f && f.length === u.length && f.some((x) => x > 0) ? p = {
483
- gridTemplateColumns: f.map((x) => `${x}px`).join(" ")
484
- } : p = {
485
- gridTemplateColumns: u.join(" ")
486
- } : p = {
487
- gridColumn: "1 / -1",
488
- gridTemplateColumns: "subgrid"
489
- } : p = {
490
- gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))`
491
- }, /* @__PURE__ */ i("div", {
492
- role: "row",
493
- className: Ge({
494
- mode: n,
495
- className: e,
496
- cellWrapper: c,
497
- isLastRow: y,
498
- stickyHeader: g,
499
- stickyFooter: l
500
- }),
501
- style: {
502
- ...p,
503
- ...o
504
- },
505
- "data-active": r || void 0,
506
- ...t,
507
- children: s
508
- });
509
- }
510
- });
511
- }, tt = ({
512
- label: e,
513
- disabled: s,
514
- onClick: r
515
- }) => /* @__PURE__ */ i(
516
- Ne,
517
- {
518
- label: e,
519
- placement: "top",
520
- trigger: /* @__PURE__ */ i(
521
- Se,
522
- {
523
- noBorder: !0,
524
- variant: "primary",
525
- label: e,
526
- disabled: s,
527
- onClick: r,
528
- children: /* @__PURE__ */ i(
529
- Te,
530
- {
531
- size: "size-3",
532
- monotone: !0,
533
- className: "text-copy-error-dark dark:text-copy-error-light"
534
- }
535
- )
536
- }
537
- )
538
- }
539
- );
540
- export {
541
- tt as ButtonIconDelete,
542
- Je as DataGrid,
543
- Qe as DataGridCell,
544
- Ze as DataGridCellSort,
545
- T as DataGridContext,
546
- Ue as DataGridHeader,
547
- et as DataGridRow,
548
- Ye as getBodyClass,
549
- Ke as useColumnMeasurement
550
- };