@pibit.ai/cure-design-system 0.3.0 → 0.3.2

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.
@@ -1,4 +1,4 @@
1
- import { ComponentPropsWithRef, HTMLAttributes, ReactNode, Ref, TdHTMLAttributes, ThHTMLAttributes } from 'react';
1
+ import { default as React, ComponentPropsWithRef, ReactNode, Ref, TdHTMLAttributes, ThHTMLAttributes } from 'react';
2
2
  import { CellProps as AriaCellProps, ColumnProps as AriaColumnProps, RowProps as AriaRowProps, TableHeaderProps as AriaTableHeaderProps, TableProps as AriaTableProps, TableBody as AriaTableBody } from 'react-aria-components';
3
3
  interface TableCardHeaderProps {
4
4
  /** The title of the table card header. */
@@ -61,9 +61,9 @@ declare const TableCell: {
61
61
  displayName: string;
62
62
  };
63
63
  declare const TableCard: {
64
- Root: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
64
+ Root: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
65
65
  size?: "sm" | "md";
66
- } & import('react').RefAttributes<HTMLDivElement>>;
66
+ } & React.RefAttributes<HTMLDivElement>>;
67
67
  Header: {
68
68
  ({ title, badge, description, contentTrailing, className }: TableCardHeaderProps): import("react/jsx-runtime").JSX.Element;
69
69
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/patterns/table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAavH,OAAO,KAAK,EACV,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,QAAQ,IAAI,YAAY,EACxB,gBAAgB,IAAI,oBAAoB,EACxC,UAAU,IAAI,cAAc,EAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAOL,SAAS,IAAI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AAI,CAAC;IACvF,GAAG,CAAC,EAAE,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,SAAS;8DAAiE,cAAc;;CAyC7F,CAAC;AAGF,QAAA,MAAM,SAAS;;eAze4E,IAAI,GAAG,IAAI;;;oEA0ElB,oBAAoB;;;CAkavG,CAAC;AAEF,QAAA,MAAM,KAAK,EAAgB,OAAO,SAAS,GAAG;IAC5C,IAAI,EAAE,OAAO,aAAa,CAAC;IAC3B,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB,MAAM,EAAE,OAAO,WAAW,CAAC;IAC3B,GAAG,EAAE,OAAO,QAAQ,CAAC;CACtB,CAAC;AAOF,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
@@ -1,68 +1,68 @@
1
- import { jsx as o, jsxs as v, Fragment as V } from "react/jsx-runtime";
2
- import { forwardRef as W, useContext as y, createContext as F, useState as N, isValidElement as O, useRef as G, useEffect as L, Children as M, cloneElement as I } from "react";
3
- import { Table as k, useTableOptions as w, Cell as T, TableBody as J, Column as z, Group as Q, TableHeader as X, Collection as A, Row as B } from "react-aria-components";
1
+ import { jsx as o, jsxs as u, Fragment as W } from "react/jsx-runtime";
2
+ import { forwardRef as F, useContext as v, createContext as G, useState as N, isValidElement as O, useRef as L, useEffect as M, Children as q, cloneElement as I } from "react";
3
+ import { Table as k, useTableOptions as x, Cell as T, TableBody as J, Column as z, Group as Q, TableHeader as X, Collection as A, Row as B } from "react-aria-components";
4
4
  import { cn as d } from "../../utils/cn.js";
5
5
  import { Badge as Y } from "../../primitives/badge/badge.js";
6
6
  import { Icon as S } from "../../primitives/icon/icon.js";
7
7
  import { Checkbox as P } from "../../primitives/checkbox/checkbox.js";
8
- const g = F({
8
+ const g = G({
9
9
  size: "md",
10
10
  expandedRows: /* @__PURE__ */ new Set(),
11
11
  toggleRow: () => {
12
12
  }
13
- }), D = W(
14
- ({ children: l, className: s, size: n = "md", ...c }, e) => {
15
- const i = G(null), [a, f] = N(!1), [h, t] = N(/* @__PURE__ */ new Set());
16
- L(() => {
17
- const r = i.current;
13
+ }), D = F(
14
+ ({ children: n, className: l, size: s = "md", ...c }, e) => {
15
+ const a = L(null), [i, f] = N(!1), [h, t] = N(/* @__PURE__ */ new Set());
16
+ M(() => {
17
+ const r = a.current;
18
18
  if (!r) return;
19
19
  const p = () => {
20
20
  const { scrollWidth: R, clientWidth: C } = r;
21
21
  f(R > C);
22
22
  };
23
23
  p();
24
- const u = new ResizeObserver(p);
25
- return u.observe(r), () => {
26
- u.disconnect();
24
+ const b = new ResizeObserver(p);
25
+ return b.observe(r), () => {
26
+ b.disconnect();
27
27
  };
28
28
  }, []);
29
- const b = (r) => {
29
+ const m = (r) => {
30
30
  t((p) => {
31
- const u = new Set(p);
32
- return u.has(r) ? u.delete(r) : u.add(r), u;
31
+ const b = new Set(p);
32
+ return b.has(r) ? b.delete(r) : b.add(r), b;
33
33
  });
34
34
  };
35
- return /* @__PURE__ */ o(g.Provider, { value: { size: n, hasOverflow: a, expandedRows: h, toggleRow: b }, children: /* @__PURE__ */ o(
35
+ return /* @__PURE__ */ o(g.Provider, { value: { size: s, hasOverflow: i, expandedRows: h, toggleRow: m }, children: /* @__PURE__ */ o(
36
36
  "div",
37
37
  {
38
38
  ref: (r) => {
39
- i.current = r, typeof e == "function" ? e(r) : e && (e.current = r);
39
+ a.current = r, typeof e == "function" ? e(r) : e && (e.current = r);
40
40
  },
41
41
  ...c,
42
- className: d("overflow-hidden rounded-lg bg-[var(--color-bg-primary)]", s),
43
- children: l
42
+ className: d("overflow-hidden rounded-lg bg-primary", l),
43
+ children: n
44
44
  }
45
45
  ) });
46
46
  }
47
47
  );
48
48
  D.displayName = "TableCardRoot";
49
- const E = ({ title: l, badge: s, description: n, contentTrailing: c, className: e }) => {
50
- const { size: i } = y(g);
51
- return /* @__PURE__ */ v(
49
+ const E = ({ title: n, badge: l, description: s, contentTrailing: c, className: e }) => {
50
+ const { size: a } = v(g);
51
+ return /* @__PURE__ */ u(
52
52
  "div",
53
53
  {
54
54
  className: d(
55
- "relative flex flex-col items-start gap-4 border-b border-[var(--color-border-secondary)] bg-[var(--color-bg-primary)] px-4 md:flex-row",
56
- i === "sm" ? "py-2 md:px-4" : "py-3 md:px-6",
55
+ "relative flex flex-col items-start gap-4 border-b border-border-secondary bg-primary px-4 md:flex-row",
56
+ a === "sm" ? "py-2 md:px-4" : "py-3 md:px-6",
57
57
  e
58
58
  ),
59
59
  children: [
60
- /* @__PURE__ */ v("div", { className: "flex flex-1 flex-col gap-0.5", children: [
61
- /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
62
- /* @__PURE__ */ o("h2", { className: d("font-semibold text-[var(--color-text-primary)]", i === "sm" ? "text-md" : "text-lg"), children: l }),
63
- s ? O(s) ? s : /* @__PURE__ */ o(Y, { variant: "primary", size: "sm", children: s }) : null
60
+ /* @__PURE__ */ u("div", { className: "flex flex-1 flex-col gap-0.5", children: [
61
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
62
+ /* @__PURE__ */ o("h2", { className: d("font-semibold text-primary", a === "sm" ? "text-md" : "text-lg"), children: n }),
63
+ l ? O(l) ? l : /* @__PURE__ */ o(Y, { variant: "primary", size: "sm", children: l }) : null
64
64
  ] }),
65
- n && /* @__PURE__ */ o("p", { className: "text-sm text-[var(--color-text-tertiary)]", children: n })
65
+ s && /* @__PURE__ */ o("p", { className: "text-sm text-tertiary", children: s })
66
66
  ] }),
67
67
  c
68
68
  ]
@@ -70,10 +70,10 @@ const E = ({ title: l, badge: s, description: n, contentTrailing: c, className:
70
70
  );
71
71
  };
72
72
  E.displayName = "TableCardHeader";
73
- const q = ({ className: l, size: s = "md", isEditable: n = !1, ...c }) => {
74
- const e = y(g), [i, a] = N(/* @__PURE__ */ new Set()), f = (e == null ? void 0 : e.expandedRows) ?? i, h = (e == null ? void 0 : e.toggleRow) ?? ((t) => {
75
- a((b) => {
76
- const r = new Set(b);
73
+ const j = ({ className: n, size: l = "md", isEditable: s = !1, ...c }) => {
74
+ const e = v(g), [a, i] = N(/* @__PURE__ */ new Set()), f = (e == null ? void 0 : e.expandedRows) ?? a, h = (e == null ? void 0 : e.toggleRow) ?? ((t) => {
75
+ i((m) => {
76
+ const r = new Set(m);
77
77
  return r.has(t) ? r.delete(t) : r.add(t), r;
78
78
  });
79
79
  });
@@ -81,12 +81,12 @@ const q = ({ className: l, size: s = "md", isEditable: n = !1, ...c }) => {
81
81
  g.Provider,
82
82
  {
83
83
  value: {
84
- size: (e == null ? void 0 : e.size) ?? s,
84
+ size: (e == null ? void 0 : e.size) ?? l,
85
85
  hasOverflow: e == null ? void 0 : e.hasOverflow,
86
86
  expandedRows: f,
87
87
  toggleRow: h
88
88
  },
89
- children: n ? /* @__PURE__ */ o(
89
+ children: s ? /* @__PURE__ */ o(
90
90
  "div",
91
91
  {
92
92
  onKeyDownCapture: (t) => {
@@ -109,7 +109,7 @@ const q = ({ className: l, size: s = "md", isEditable: n = !1, ...c }) => {
109
109
  children: /* @__PURE__ */ o(
110
110
  k,
111
111
  {
112
- className: (t) => d("w-full overflow-x-hidden", typeof l == "function" ? l(t) : l),
112
+ className: (t) => d("w-full overflow-x-hidden", typeof n == "function" ? n(t) : n),
113
113
  ...c
114
114
  }
115
115
  )
@@ -117,77 +117,77 @@ const q = ({ className: l, size: s = "md", isEditable: n = !1, ...c }) => {
117
117
  ) : /* @__PURE__ */ o(
118
118
  k,
119
119
  {
120
- className: (t) => d("w-full overflow-x-hidden", typeof l == "function" ? l(t) : l),
120
+ className: (t) => d("w-full overflow-x-hidden", typeof n == "function" ? n(t) : n),
121
121
  ...c
122
122
  }
123
123
  )
124
124
  }
125
125
  );
126
126
  };
127
- q.displayName = "Table";
128
- const j = ({
129
- columns: l,
130
- children: s,
131
- bordered: n = !1,
127
+ j.displayName = "Table";
128
+ const K = ({
129
+ columns: n,
130
+ children: l,
131
+ bordered: s = !1,
132
132
  hasExpandableRows: c = !1,
133
133
  className: e,
134
- ...i
134
+ ...a
135
135
  }) => {
136
- const { size: a } = y(g), { selectionBehavior: f, selectionMode: h } = w();
137
- return /* @__PURE__ */ v(
136
+ const { size: i } = v(g), { selectionBehavior: f, selectionMode: h } = x();
137
+ return /* @__PURE__ */ u(
138
138
  X,
139
139
  {
140
- ...i,
140
+ ...a,
141
141
  className: (t) => d(
142
- "sticky top-0 z-30 bg-[var(--color-bg-secondary)] rounded-lg h-11",
142
+ "sticky top-0 z-30 bg-secondary_subtle rounded-lg h-9",
143
143
  // Row border—using an "after" pseudo-element to avoid the border taking up space.
144
- n && "[&>tr>th]:after:pointer-events-none [&>tr>th]:after:absolute [&>tr>th]:after:inset-x-0 [&>tr>th]:after:bottom-0 [&>tr>th]:after:h-px [&>tr>th]:after:bg-border-tertiary [&>tr>th]:focus-visible:after:bg-transparent",
144
+ s && "[&>tr>th]:after:pointer-events-none [&>tr>th]:after:absolute [&>tr>th]:after:inset-x-0 [&>tr>th]:after:bottom-0 [&>tr>th]:after:h-px [&>tr>th]:after:bg-border-tertiary [&>tr>th]:focus-visible:after:bg-transparent",
145
145
  typeof e == "function" ? e(t) : e
146
146
  ),
147
147
  children: [
148
- c && /* @__PURE__ */ o(z, { className: d("relative p-0", a === "sm" ? "w-9" : "w-11") }),
149
- f === "toggle" && /* @__PURE__ */ o(z, { className: d("relative p-0", a === "sm" ? "w-9" : "w-11"), children: h === "multiple" && /* @__PURE__ */ o("div", { className: "flex items-start", children: /* @__PURE__ */ o(P, { slot: "selection" }) }) }),
150
- /* @__PURE__ */ o(A, { items: l, children: s })
148
+ c && /* @__PURE__ */ o(z, { className: d("relative p-0", i === "sm" ? "w-9" : "w-11") }),
149
+ f === "toggle" && /* @__PURE__ */ o(z, { className: d("relative p-0", i === "sm" ? "w-9" : "w-11"), children: h === "multiple" && /* @__PURE__ */ o("div", { className: "flex items-start", children: /* @__PURE__ */ o(P, { slot: "selection" }) }) }),
150
+ /* @__PURE__ */ o(A, { items: n, children: l })
151
151
  ]
152
152
  }
153
153
  );
154
154
  };
155
- j.displayName = "TableHeader";
156
- const K = ({
157
- className: l,
158
- label: s,
159
- children: n,
155
+ K.displayName = "TableHeader";
156
+ const $ = ({
157
+ className: n,
158
+ label: l,
159
+ children: s,
160
160
  sticky: c,
161
161
  stickyOffset: e = 0,
162
- headerCellClass: i,
163
- ...a
162
+ headerCellClass: a,
163
+ ...i
164
164
  }) => {
165
- const { selectionBehavior: f } = w(), { size: h } = y(g);
165
+ const { selectionBehavior: f } = x(), { size: h } = v(g);
166
166
  return /* @__PURE__ */ o(
167
167
  z,
168
168
  {
169
- ...a,
169
+ ...i,
170
170
  style: (t) => {
171
- const b = c ? {
171
+ const m = c ? {
172
172
  position: "sticky",
173
173
  [c]: e,
174
174
  zIndex: 30
175
175
  } : {};
176
- return { ...typeof a.style == "function" ? a.style(t) : a.style || {}, ...b };
176
+ return { ...typeof i.style == "function" ? i.style(t) : i.style || {}, ...m };
177
177
  },
178
178
  className: (t) => d(
179
- "relative p-0 outline-hidden focus-visible:z-1 focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-offset-[var(--color-bg-primary)] focus-visible:ring-inset",
179
+ "relative p-0 outline-hidden focus-visible:z-1 focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-bg-primary focus-visible:ring-inset",
180
180
  h === "sm" && "px-4 py-2",
181
181
  h === "md" && "px-6 py-2",
182
182
  f === "toggle" && "nth-2:pl-3",
183
- c && "bg-[var(--color-bg-secondary)]",
183
+ c && "bg-secondary_subtle",
184
184
  t.allowsSorting && "cursor-pointer",
185
- typeof l == "function" ? l(t) : l
185
+ typeof n == "function" ? n(t) : n
186
186
  ),
187
- children: (t) => /* @__PURE__ */ v(Q, { className: d("flex items-center gap-1", i), children: [
188
- /* @__PURE__ */ v("div", { className: "flex items-center gap-1 overflow-hidden", children: [
189
- s && /* @__PURE__ */ o("span", { className: "text-xs font-semibold whitespace-nowrap overflow-hidden text-ellipsis text-[var(--color-text-quaternary)]", children: s }),
190
- typeof n == "function" ? n(t) : n
187
+ children: (t) => /* @__PURE__ */ u(Q, { className: d("flex items-center gap-1", a), children: [
188
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-1 overflow-hidden", children: [
189
+ l && /* @__PURE__ */ o("span", { className: "text-xs font-semibold whitespace-nowrap overflow-hidden text-ellipsis text-secondary", children: l }),
190
+ typeof s == "function" ? s(t) : s
191
191
  ] }),
192
192
  t.allowsSorting && (t.sortDirection ? /* @__PURE__ */ o(
193
193
  S,
@@ -195,125 +195,125 @@ const K = ({
195
195
  name: "ArrowDown",
196
196
  size: 12,
197
197
  className: d(
198
- "stroke-[3px] text-[var(--color-text-quaternary)]",
198
+ "stroke-[3px] text-secondary",
199
199
  t.sortDirection === "ascending" && "rotate-180"
200
200
  )
201
201
  }
202
- ) : /* @__PURE__ */ o(S, { name: "ChevronSelectorVertical", size: 12, className: "text-[var(--color-text-quaternary)]" }))
202
+ ) : /* @__PURE__ */ o(S, { name: "ChevronSelectorVertical", size: 12, className: "text-secondary" }))
203
203
  ] })
204
204
  }
205
205
  );
206
206
  };
207
- K.displayName = "TableHead";
208
- const $ = ({
209
- columns: l,
210
- children: s,
211
- className: n,
207
+ $.displayName = "TableHead";
208
+ const U = ({
209
+ columns: n,
210
+ children: l,
211
+ className: s,
212
212
  highlightSelectedRow: c = !0,
213
213
  isExpandable: e = !1,
214
- renderExpandedContent: i,
215
- ...a
214
+ renderExpandedContent: a,
215
+ ...i
216
216
  }) => {
217
- const { size: f, expandedRows: h, toggleRow: t } = y(g), { selectionBehavior: b } = w(), r = typeof a.id == "string" ? a.id : String(a.id), p = h.has(r), R = e ? /* @__PURE__ */ o(
217
+ const { size: f, expandedRows: h, toggleRow: t } = v(g), { selectionBehavior: m } = x(), r = typeof i.id == "string" ? i.id : String(i.id), p = h.has(r), R = e ? /* @__PURE__ */ o(
218
218
  "button",
219
219
  {
220
220
  type: "button",
221
- onClick: (m) => {
222
- m.stopPropagation(), t(r);
221
+ onClick: (y) => {
222
+ y.stopPropagation(), t(r);
223
223
  },
224
224
  className: d(
225
- "flex items-center justify-center transition-transform duration-200 ease-in-out cursor-pointer hover:bg-[var(--color-bg-secondary_hover)] rounded p-1 flex-shrink-0 -ml-1 mr-2",
225
+ "flex items-center justify-center transition-transform duration-200 ease-in-out cursor-pointer hover:bg-secondary_hover rounded p-1 flex-shrink-0 -ml-1 mr-2",
226
226
  p && "rotate-90"
227
227
  ),
228
228
  "aria-label": p ? "Collapse row" : "Expand row",
229
- children: /* @__PURE__ */ o(S, { name: "ChevronRight", size: 16, className: "text-[var(--color-text-quaternary)]" })
229
+ children: /* @__PURE__ */ o(S, { name: "ChevronRight", size: 16, className: "text-secondary" })
230
230
  }
231
231
  ) : null, C = e ? (() => {
232
- const m = M.toArray(s);
233
- if (m.length > 0 && O(m[0])) {
234
- const H = m[0], _ = H.props;
232
+ const y = q.toArray(l);
233
+ if (y.length > 0 && O(y[0])) {
234
+ const H = y[0], _ = H.props;
235
235
  return [
236
236
  I(H, {
237
237
  ..._,
238
- children: /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
238
+ children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
239
239
  R,
240
240
  _.children
241
241
  ] })
242
242
  }),
243
- ...m.slice(1)
243
+ ...y.slice(1)
244
244
  ];
245
245
  }
246
- return s;
247
- })() : s;
248
- return /* @__PURE__ */ v(V, { children: [
249
- /* @__PURE__ */ v(
246
+ return l;
247
+ })() : l;
248
+ return /* @__PURE__ */ u(W, { children: [
249
+ /* @__PURE__ */ u(
250
250
  B,
251
251
  {
252
- ...a,
253
- className: (m) => d(
254
- "relative outline-[var(--color-focus-ring)] transition-colors after:pointer-events-none hover:bg-[var(--color-bg-secondary_hover)] focus-visible:outline-2 focus-visible:-outline-offset-2",
252
+ ...i,
253
+ className: (y) => d(
254
+ "relative outline-focus-ring transition-colors after:pointer-events-none hover:bg-secondary_hover focus-visible:outline-2 focus-visible:-outline-offset-2",
255
255
  f === "sm" ? "h-12" : "h-18",
256
- c && "selected:bg-[var(--color-bg-secondary)]",
256
+ c && "selected:bg-secondary",
257
257
  // Row border—using an "after" pseudo-element to avoid the border taking up space.
258
258
  !p && "[&>td]:after:absolute [&>td]:after:inset-x-0 [&>td]:after:bottom-0 [&>td]:after:h-px [&>td]:after:w-full [&>td]:after:bg-border-tertiary last:[&>td]:after:hidden [&>td]:focus-visible:after:opacity-0 focus-visible:[&>td]:after:opacity-0",
259
- typeof n == "function" ? n(m) : n
259
+ typeof s == "function" ? s(y) : s
260
260
  ),
261
261
  children: [
262
- b === "toggle" && /* @__PURE__ */ o(T, { className: d("relative p-0", f === "sm" ? "w-9" : "w-11"), children: /* @__PURE__ */ o("div", { className: "flex items-end", children: /* @__PURE__ */ o(P, { className: "hidden", slot: "selection" }) }) }),
263
- /* @__PURE__ */ o(A, { items: l, children: C })
262
+ m === "toggle" && /* @__PURE__ */ o(T, { className: d("relative p-0", f === "sm" ? "w-9" : "w-11"), children: /* @__PURE__ */ o("div", { className: "flex items-end", children: /* @__PURE__ */ o(P, { className: "hidden", slot: "selection" }) }) }),
263
+ /* @__PURE__ */ o(A, { items: n, children: C })
264
264
  ]
265
265
  }
266
266
  ),
267
- e && p && i && /* @__PURE__ */ o(B, { id: `${r}-expanded`, className: "relative bg-[var(--color-bg-secondary_hover)]", children: /* @__PURE__ */ o(
267
+ e && p && a && /* @__PURE__ */ o(B, { id: `${r}-expanded`, className: "relative bg-secondary_hover", children: /* @__PURE__ */ o(
268
268
  T,
269
269
  {
270
270
  className: "p-0",
271
- colSpan: (l == null ? void 0 : l.length) || 0,
272
- children: /* @__PURE__ */ o("div", { className: d("w-full"), children: i(a.value) })
271
+ colSpan: (n == null ? void 0 : n.length) || 0,
272
+ children: /* @__PURE__ */ o("div", { className: d("w-full"), children: a(i.value) })
273
273
  }
274
274
  ) })
275
275
  ] });
276
276
  };
277
- $.displayName = "TableRow";
278
- const U = ({ className: l, children: s, sticky: n, stickyOffset: c = 0, ...e }) => {
279
- const { size: i } = y(g), { selectionBehavior: a } = w();
277
+ U.displayName = "TableRow";
278
+ const V = ({ className: n, children: l, sticky: s, stickyOffset: c = 0, ...e }) => {
279
+ const { size: a } = v(g), { selectionBehavior: i } = x();
280
280
  return /* @__PURE__ */ o(
281
281
  T,
282
282
  {
283
283
  ...e,
284
284
  style: (f) => {
285
- const h = n ? {
285
+ const h = s ? {
286
286
  position: "sticky",
287
- [n]: c,
287
+ [s]: c,
288
288
  zIndex: 20
289
289
  } : {};
290
290
  return { ...typeof e.style == "function" ? e.style(f) : e.style || {}, ...h };
291
291
  },
292
292
  className: (f) => d(
293
- "relative text-sm text-[var(--color-text-tertiary)] outline-[var(--color-focus-ring)] focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-2",
294
- i === "sm" && "p-0 px-4 py-2",
295
- i === "md" && "p-0 px-6 py-2",
296
- a === "toggle" && "nth-2:pl-3",
297
- n === "left" && "before:absolute before:top-0 before:right-0 before:h-full before:shadow-[4px_0_8px_2px_rgba(0,0,0,0.15)]",
298
- n === "right" && "z-[2000] bg-[var(--color-bg-primary)] hover:bg-inherit before:absolute before:top-0 before:left-0 before:h-full before:shadow-[-4px_0_8px_2px_rgba(0,0,0,0.15)]",
299
- typeof l == "function" ? l(f) : l
293
+ "relative text-sm text-secondary outline-focus-ring focus-visible:z-1 focus-visible:outline-2 focus-visible:-outline-offset-2",
294
+ a === "sm" && "p-0 px-4 py-2",
295
+ a === "md" && "p-0 px-6 py-2",
296
+ i === "toggle" && "nth-2:pl-3",
297
+ s === "left" && "before:absolute before:top-0 before:right-0 before:h-full before:shadow-[4px_0_8px_2px_rgba(0,0,0,0.15)]",
298
+ s === "right" && "z-[2000] bg-primary hover:bg-inherit before:absolute before:top-0 before:left-0 before:h-full before:shadow-[-4px_0_8px_2px_rgba(0,0,0,0.15)]",
299
+ typeof n == "function" ? n(f) : n
300
300
  ),
301
- children: s
301
+ children: l
302
302
  }
303
303
  );
304
304
  };
305
- U.displayName = "TableCell";
306
- const se = {
305
+ V.displayName = "TableCell";
306
+ const le = {
307
307
  Root: D,
308
308
  Header: E
309
- }, x = q;
310
- x.Body = J;
311
- x.Cell = U;
312
- x.Head = K;
313
- x.Header = j;
314
- x.Row = $;
309
+ }, w = j;
310
+ w.Body = J;
311
+ w.Cell = V;
312
+ w.Head = $;
313
+ w.Header = K;
314
+ w.Row = U;
315
315
  export {
316
- x as Table,
317
- se as TableCard,
318
- U as TableCell
316
+ w as Table,
317
+ le as TableCard,
318
+ V as TableCell
319
319
  };
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/primitives/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1G,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK5E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8HjB,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;IACjC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC;IACnC,wDAAwD;IACxD,WAAW,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAA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