@vkzstudio/muza-ui 1.0.2 → 1.0.4

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,13 +1,13 @@
1
- import { jsxs as n, jsx as a, Fragment as j } from "react/jsx-runtime";
2
- import { useState as z, useMemo as K, Fragment as M } from "react";
3
- import { cva as A } from "class-variance-authority";
4
- import { useIsMinSm as H, useIsMinMd as L, useIsMinLg as x } from "../../hooks/use-is-breakpoint.js";
5
- import { Table as C, TableHeader as O, TableRow as u, TableHead as V, TableBody as _, TableCell as v } from "./Table.js";
6
- import { Typography as p } from "../Typography/Typography.js";
1
+ import { jsxs as m, jsx as t, Fragment as $ } from "react/jsx-runtime";
2
+ import { useState as j, useMemo as N, Fragment as M } from "react";
3
+ import { cva as z } from "class-variance-authority";
4
+ import { useIsMinSm as A, useIsMinMd as C, useIsMinLg as H } from "../../hooks/use-is-breakpoint.js";
5
+ import { Table as O, TableHeader as _, TableRow as k, TableHead as q, TableBody as G, TableCell as E } from "./Table.js";
6
+ import { Typography as h } from "../Typography/Typography.js";
7
7
  import { Flex as B } from "../Flex/Flex.js";
8
- import { cn as h } from "../../utils/cn.js";
9
- import { AltArrowDownOutline as q } from "@solar-icons/react-perf";
10
- const b = A("", {
8
+ import { cn as v } from "../../utils/cn.js";
9
+ import { AltArrowDownOutline as J } from "@solar-icons/react-perf";
10
+ const F = z("", {
11
11
  variants: {
12
12
  responsive: {
13
13
  xs: "",
@@ -22,89 +22,95 @@ const b = A("", {
22
22
  lg: "lg:hidden"
23
23
  }
24
24
  }
25
- }), S = ({
26
- data: F,
27
- columns: d,
25
+ }), Q = (o, a, s, n) => !o || o === "xs" ? !0 : o === "sm" ? a : o === "md" ? s : o === "lg" ? n : !0, w = ({
26
+ data: o,
27
+ columns: a,
28
28
  expandableRowSections: s
29
29
  }) => {
30
- const [t, P] = z(/* @__PURE__ */ new Set()), y = (e) => {
31
- P((r) => {
32
- const l = new Set(r);
33
- return l.has(e) ? l.delete(e) : l.add(e), l;
30
+ const [n, L] = j(/* @__PURE__ */ new Set()), T = (e) => {
31
+ L((i) => {
32
+ const d = new Set(i);
33
+ return d.has(e) ? d.delete(e) : d.add(e), d;
34
34
  });
35
- }, m = K(() => {
36
- const e = d.filter((r) => r.responsive).map((r) => r.responsive);
35
+ }, p = N(() => {
36
+ const e = a.filter((i) => i.responsive).map((i) => i.responsive);
37
37
  return e.includes("lg") ? "lg" : e.includes("md") ? "md" : e.includes("sm") ? "sm" : e.includes("xs") ? "xs" : null;
38
- }, [d]), N = H(), k = L(), T = x(), E = K(() => m ? m === "lg" ? T : m === "md" ? k : m === "sm" ? N : !1 : !1, [m, N, k, T]), c = !s && !!m && !E;
39
- return /* @__PURE__ */ n(C, { children: [
40
- /* @__PURE__ */ a(O, { children: /* @__PURE__ */ a(u, { className: "after:hidden", children: d.map((e, r) => /* @__PURE__ */ a(
41
- V,
38
+ }, [a]), g = A(), u = C(), b = H(), K = N(() => p ? p === "lg" ? b : p === "md" ? u : p === "sm" ? g : !1 : !1, [p, g, u, b]), { firstVisibleIndex: V, lastVisibleIndex: P } = N(() => {
39
+ let e = -1, i = -1;
40
+ return a.forEach((d, r) => {
41
+ Q(d.responsive, g, u, b) && (e === -1 && (e = r), i = r);
42
+ }), { firstVisibleIndex: e, lastVisibleIndex: i };
43
+ }, [a, g, u, b]), c = !s && !!p && !K;
44
+ return /* @__PURE__ */ m(O, { children: [
45
+ /* @__PURE__ */ t(_, { children: /* @__PURE__ */ t(k, { className: "[&>th]:border-0 [&>th]:bg-transparent", children: a.map((e, i) => /* @__PURE__ */ t(
46
+ q,
42
47
  {
43
- className: h(
48
+ className: v(
44
49
  e.className,
45
- b({ responsive: e.responsive })
50
+ F({ responsive: e.responsive })
46
51
  ),
47
52
  children: e.title
48
53
  },
49
- r
54
+ i
50
55
  )) }) }),
51
- /* @__PURE__ */ a(_, { children: F.map((e, r) => {
52
- var l;
53
- return /* @__PURE__ */ n(M, { children: [
54
- /* @__PURE__ */ n(
55
- u,
56
+ /* @__PURE__ */ t(G, { children: o.map((e, i) => {
57
+ var d;
58
+ return /* @__PURE__ */ m(M, { children: [
59
+ /* @__PURE__ */ m(
60
+ k,
56
61
  {
57
- hideBottomSpacing: t.has(r) || c,
58
- isExpanded: t.has(r) || c,
59
- colNumber: d.length + 1,
60
- expandablePosition: s && t.has(r) || c ? "top" : "none",
61
- className: h("focus-visible-default", {
62
+ hideBottomSpacing: n.has(i) || c,
63
+ isExpanded: n.has(i) || c,
64
+ colNumber: a.length + 1,
65
+ expandablePosition: s && n.has(i) || c ? "top" : "none",
66
+ className: v("group focus-visible-default", {
62
67
  "cursor-pointer": s,
63
- "hover:after:bg-surface-base-primary": !s
68
+ "[&>td]:hover:bg-surface-base-primary": !s
64
69
  }),
65
- onClick: s ? () => y(r) : void 0,
66
- onKeyDown: s ? (i) => {
67
- (i.key === "Enter" || i.key === " ") && (i.preventDefault(), y(r));
70
+ onClick: s ? () => T(i) : void 0,
71
+ onKeyDown: s ? (r) => {
72
+ (r.key === "Enter" || r.key === " ") && (r.preventDefault(), T(i));
68
73
  } : void 0,
69
74
  tabIndex: s ? 0 : void 0,
70
75
  role: s ? "button" : void 0,
71
- "aria-expanded": s ? t.has(r) : void 0,
76
+ "aria-expanded": s ? n.has(i) : void 0,
72
77
  children: [
73
- d.map((i, o) => /* @__PURE__ */ a(
74
- v,
78
+ a.map((r, l) => /* @__PURE__ */ t(
79
+ E,
75
80
  {
76
- expandablePosition: s && t.has(r) ? "top" : "none",
77
- className: h(
78
- i.className,
79
- b({ responsive: i.responsive })
81
+ isFirst: l === V,
82
+ isLast: l === P && !s,
83
+ expandablePosition: s && n.has(i) ? "top" : "none",
84
+ className: v(
85
+ r.className,
86
+ F({ responsive: r.responsive })
80
87
  ),
81
- children: i.render ? i.render(e[i.dataKey], e) : /* @__PURE__ */ a(
82
- p,
88
+ children: r.render ? r.render(e[r.dataKey], e) : /* @__PURE__ */ t(
89
+ h,
83
90
  {
84
91
  variant: "body",
85
92
  size: "base",
86
93
  weight: "medium",
87
94
  component: "span",
88
- children: e[i.dataKey]
95
+ children: e[r.dataKey]
89
96
  }
90
97
  )
91
98
  },
92
- o
99
+ l
93
100
  )),
94
- s && /* @__PURE__ */ a(
95
- v,
101
+ s && /* @__PURE__ */ t(
102
+ E,
96
103
  {
97
104
  className: "w-[68px]",
98
- expandablePosition: t.has(r) ? "top" : "none",
99
- children: /* @__PURE__ */ a(
100
- q,
105
+ isFirst: !1,
106
+ isLast: !0,
107
+ expandablePosition: n.has(i) ? "top" : "none",
108
+ children: /* @__PURE__ */ t(
109
+ J,
101
110
  {
102
- className: h(
103
- "text-text-brand-def transition-transform duration-200",
104
- {
105
- "rotate-180": t.has(r)
106
- }
107
- )
111
+ className: v("text-text-brand-def", {
112
+ "rotate-180": n.has(i)
113
+ })
108
114
  }
109
115
  )
110
116
  }
@@ -112,120 +118,119 @@ const b = A("", {
112
118
  ]
113
119
  }
114
120
  ),
115
- /* @__PURE__ */ a(
116
- u,
121
+ (n.has(i) || c) && /* @__PURE__ */ t(
122
+ k,
117
123
  {
118
- hideBottomSpacing: s && !t.has(r) || !s && !c,
124
+ hideBottomSpacing: s && !n.has(i) || !s && !c,
119
125
  expandablePosition: "bottom",
120
- className: h("hover:after:bg-surface-base-secondary", {
121
- collapse: s && !t.has(r) || !s && !c
122
- }),
123
- children: /* @__PURE__ */ a(
124
- v,
126
+ children: /* @__PURE__ */ t(
127
+ E,
125
128
  {
126
- colSpan: d.length + 1,
129
+ colSpan: a.length + 1,
127
130
  padding: "none",
131
+ isFirst: !0,
132
+ isLast: !0,
128
133
  expandablePosition: "bottom",
129
- children: /* @__PURE__ */ n(
130
- "div",
131
- {
132
- id: "test-id",
133
- className: h(
134
- "grid grid-cols-1 gap-2xl overflow-hidden px-comp-table-p py-2xl md:grid-cols-[auto_1fr]",
135
- t.has(r) ? "animate-expandable-row-down" : "animate-expandable-row-up"
136
- ),
137
- children: [
138
- !E && /* @__PURE__ */ n(j, { children: [
139
- /* @__PURE__ */ a(
134
+ children: /* @__PURE__ */ m("div", { className: "grid grid-cols-1 gap-2xl overflow-hidden px-comp-table-p py-2xl md:grid-cols-[auto_1fr]", children: [
135
+ !K && /* @__PURE__ */ m($, { children: [
136
+ /* @__PURE__ */ t(
137
+ B,
138
+ {
139
+ gap: "md",
140
+ direction: "column",
141
+ className: "col-span-full",
142
+ children: a.map((r, l) => /* @__PURE__ */ m(
140
143
  B,
141
144
  {
142
- gap: "md",
143
- direction: "column",
144
- className: "col-span-full",
145
- children: d.map((i, o) => /* @__PURE__ */ n(
146
- B,
147
- {
148
- align: "center",
149
- justify: "between",
150
- direction: "row",
151
- className: b({
152
- reverse: i.responsive
153
- }),
154
- children: [
155
- /* @__PURE__ */ a(p, { variant: "body", component: "span", children: i.title }),
156
- i.render ? i.render(e[i.dataKey], e) : /* @__PURE__ */ a(
157
- p,
158
- {
159
- variant: "body",
160
- weight: "medium",
161
- size: "base",
162
- component: "span",
163
- children: e[i.dataKey]
164
- }
165
- )
166
- ]
167
- },
168
- o
169
- ))
170
- }
171
- ),
172
- s && /* @__PURE__ */ a("hr", { className: "col-span-full text-stroke-base-secondary md:col-span-2" })
173
- ] }),
174
- (l = typeof s == "function" ? s(e) : s) == null ? void 0 : l.map((i, o) => {
175
- if (!s) return null;
176
- const $ = typeof s == "function" ? s(e).length : s.length;
177
- return /* @__PURE__ */ n(M, { children: [
178
- /* @__PURE__ */ n("div", { className: "col-span-full grid grid-cols-1 gap-y-xl md:col-span-2 md:grid-cols-subgrid", children: [
179
- i.title && /* @__PURE__ */ a(
180
- p,
181
- {
182
- variant: "body",
183
- uppercase: !0,
184
- size: "sm",
185
- weight: "medium",
186
- component: "p",
187
- className: "text-text-brand-def md:col-span-2",
188
- children: i.title
189
- }
190
- ),
191
- /* @__PURE__ */ a("div", { className: "col-span-full grid grid-cols-1 gap-x-3xl md:col-span-2 md:grid-cols-subgrid md:gap-y-md", children: i.cells.flatMap((f, g) => [
192
- /* @__PURE__ */ a(
193
- p,
194
- {
195
- component: "span",
196
- variant: "body",
197
- className: "mb-xs text-text-dark-primary-def md:mb-0",
198
- children: f.title
199
- },
200
- `${g}-label`
201
- ),
202
- f.render ? /* @__PURE__ */ a("div", { children: f.render(e[f.dataKey], e) }, `${g}-value`) : /* @__PURE__ */ a(
203
- p,
145
+ align: "center",
146
+ justify: "between",
147
+ direction: "row",
148
+ className: F({
149
+ reverse: r.responsive
150
+ }),
151
+ children: [
152
+ /* @__PURE__ */ t(h, { variant: "body", component: "span", children: r.title }),
153
+ r.render ? r.render(e[r.dataKey], e) : /* @__PURE__ */ t(
154
+ h,
204
155
  {
205
156
  variant: "body",
206
157
  weight: "medium",
158
+ size: "base",
207
159
  component: "span",
208
- className: "mb-md last-of-type:mb-0 md:mb-0",
209
- children: e[f.dataKey]
210
- },
211
- `${g}-value`
160
+ children: e[r.dataKey]
161
+ }
212
162
  )
213
- ]) })
214
- ] }),
215
- o < $ - 1 && /* @__PURE__ */ a("hr", { className: "col-span-full text-stroke-base-secondary md:col-span-2" })
216
- ] }, o);
217
- })
218
- ]
219
- }
220
- )
163
+ ]
164
+ },
165
+ l
166
+ ))
167
+ }
168
+ ),
169
+ s && /* @__PURE__ */ t("hr", { className: "col-span-full text-stroke-base-secondary md:col-span-2" })
170
+ ] }),
171
+ (d = typeof s == "function" ? s(e) : s) == null ? void 0 : d.map((r, l) => {
172
+ if (!s) return null;
173
+ const x = typeof s == "function" ? s(e).length : s.length;
174
+ return /* @__PURE__ */ m(M, { children: [
175
+ /* @__PURE__ */ m("div", { className: "col-span-full grid grid-cols-1 gap-y-xl md:col-span-2 md:grid-cols-subgrid", children: [
176
+ r.title && /* @__PURE__ */ t(
177
+ h,
178
+ {
179
+ variant: "body",
180
+ uppercase: !0,
181
+ size: "sm",
182
+ weight: "medium",
183
+ component: "p",
184
+ className: "text-text-brand-def md:col-span-2",
185
+ children: r.title
186
+ }
187
+ ),
188
+ /* @__PURE__ */ t("div", { className: "col-span-full grid grid-cols-1 gap-x-3xl md:col-span-2 md:grid-cols-subgrid md:gap-y-md", children: r.cells.flatMap((f, y) => [
189
+ /* @__PURE__ */ t(
190
+ h,
191
+ {
192
+ component: "span",
193
+ variant: "body",
194
+ className: "mb-xs text-text-dark-primary-def md:mb-0",
195
+ children: f.title
196
+ },
197
+ `${y}-label`
198
+ ),
199
+ f.render ? /* @__PURE__ */ t(
200
+ "div",
201
+ {
202
+ className: "mb-md block last-of-type:mb-0 md:mb-0",
203
+ children: f.render(
204
+ e[f.dataKey],
205
+ e
206
+ )
207
+ },
208
+ `${y}-value`
209
+ ) : /* @__PURE__ */ t(
210
+ h,
211
+ {
212
+ variant: "body",
213
+ weight: "medium",
214
+ component: "span",
215
+ className: "mb-md block last-of-type:mb-0 md:mb-0",
216
+ children: e[f.dataKey]
217
+ },
218
+ `${y}-value`
219
+ )
220
+ ]) })
221
+ ] }),
222
+ l < x - 1 && /* @__PURE__ */ t("hr", { className: "col-span-full text-stroke-base-secondary md:col-span-2" })
223
+ ] }, l);
224
+ })
225
+ ] })
221
226
  }
222
227
  )
223
228
  }
224
229
  )
225
- ] }, r);
230
+ ] }, i);
226
231
  }) })
227
232
  ] });
228
233
  };
229
234
  export {
230
- S as ExpandableTable
235
+ w as ExpandableTable
231
236
  };
@@ -13,6 +13,9 @@ declare const TableHead: import('react').ForwardRefExoticComponent<import('react
13
13
  declare const TableCell: import('react').ForwardRefExoticComponent<import('react').TdHTMLAttributes<HTMLTableCellElement> & VariantProps<(props?: ({
14
14
  padding?: "none" | "default" | null | undefined;
15
15
  expandablePosition?: "none" | "bottom" | "top" | null | undefined;
16
- } & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('react').RefAttributes<HTMLTableCellElement>>;
16
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
17
+ isFirst?: boolean;
18
+ isLast?: boolean;
19
+ } & import('react').RefAttributes<HTMLTableCellElement>>;
17
20
  export { Table, TableHeader, TableBody, TableHead, TableRow, TableCell };
18
21
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/Table.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,KAAK,+IAST,CAAA;AAGF,QAAA,MAAM,WAAW,6JAKf,CAAA;AAGF,QAAA,MAAM,SAAS,6JAKb,CAAA;AAoBF,QAAA,MAAM,QAAQ;;;wBAIY,OAAO;gBACf,MAAM;iBACL,OAAO;uDAoCzB,CAAA;AAGD,QAAA,MAAM,SAAS,yJAkBb,CAAA;AAqBF,QAAA,MAAM,SAAS;;;sIAab,CAAA;AAGF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/ExpandableTable/Table.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,KAAK,+IAST,CAAA;AAGF,QAAA,MAAM,WAAW,6JAKf,CAAA;AAGF,QAAA,MAAM,SAAS,6JAKb,CAAA;AAgBF,QAAA,MAAM,QAAQ;;;wBAIY,OAAO;gBACf,MAAM;iBACL,OAAO;uDAkCzB,CAAA;AAGD,QAAA,MAAM,SAAS,yJAkBb,CAAA;AAwBF,QAAA,MAAM,SAAS;;;;cAIC,OAAO;aACR,OAAO;wDA6BrB,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA"}
@@ -1,77 +1,68 @@
1
- import { jsx as t, jsxs as p, Fragment as c } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import { cva as s } from "class-variance-authority";
4
- import { typographyVariants as f } from "../Typography/Typography.js";
5
- import { cn as o } from "../../utils/cn.js";
6
- const m = n(({ className: a, ...r }, e) => /* @__PURE__ */ t(
1
+ import { jsx as o, jsxs as p, Fragment as m } from "react/jsx-runtime";
2
+ import { forwardRef as t } from "react";
3
+ import { cva as c } from "class-variance-authority";
4
+ import { typographyVariants as i } from "../Typography/Typography.js";
5
+ import { cn as d } from "../../utils/cn.js";
6
+ const u = t(({ className: a, ...r }, e) => /* @__PURE__ */ o(
7
7
  "table",
8
8
  {
9
9
  ref: e,
10
- className: o("w-full border-separate border-spacing-0", a),
10
+ className: d("w-full border-separate border-spacing-0", a),
11
11
  ...r
12
12
  }
13
13
  ));
14
- m.displayName = "Table";
15
- const u = n(({ className: a, ...r }, e) => /* @__PURE__ */ t("thead", { ref: e, className: a, ...r }));
16
- u.displayName = "TableHeader";
17
- const x = n(({ className: a, ...r }, e) => /* @__PURE__ */ t("tbody", { ref: e, className: a, ...r }));
18
- x.displayName = "TableBody";
19
- const y = s(
20
- "relative isolate after:pointer-events-none after:absolute after:inset-0 after:z-[-1] after:border-1 after:border-stroke-base-secondary after:bg-surface-base-secondary after:transition-all",
21
- {
22
- variants: {
23
- expandablePosition: {
24
- none: "after:rounded-xl",
25
- top: "after:rounded-tl-xl after:rounded-tr-xl after:rounded-br-none after:rounded-bl-none after:border-b-0",
26
- bottom: "after:rounded-tl-none after:rounded-tr-none after:rounded-br-xl after:rounded-bl-xl after:border-t-0"
27
- }
28
- },
29
- defaultVariants: {
30
- expandablePosition: "none"
14
+ u.displayName = "Table";
15
+ const y = t(({ className: a, ...r }, e) => /* @__PURE__ */ o("thead", { ref: e, className: a, ...r }));
16
+ y.displayName = "TableHeader";
17
+ const f = t(({ className: a, ...r }, e) => /* @__PURE__ */ o("tbody", { ref: e, className: a, ...r }));
18
+ f.displayName = "TableBody";
19
+ const h = c("", {
20
+ variants: {
21
+ expandablePosition: {
22
+ none: "",
23
+ top: "",
24
+ bottom: ""
31
25
  }
26
+ },
27
+ defaultVariants: {
28
+ expandablePosition: "none"
32
29
  }
33
- ), N = n(
30
+ }), x = t(
34
31
  ({
35
32
  className: a,
36
33
  hideBottomSpacing: r,
37
34
  colNumber: e,
38
- expandablePosition: d,
39
- isExpanded: l,
40
- ...b
41
- }, i) => /* @__PURE__ */ p(c, { children: [
42
- /* @__PURE__ */ t(
35
+ expandablePosition: l,
36
+ isExpanded: n,
37
+ ...s
38
+ }, b) => /* @__PURE__ */ p(m, { children: [
39
+ /* @__PURE__ */ o(
43
40
  "tr",
44
41
  {
45
- ref: i,
46
- className: o(y({ expandablePosition: d }), a),
47
- ...b
42
+ ref: b,
43
+ className: d(h({ expandablePosition: l }), a),
44
+ ...s
48
45
  }
49
46
  ),
50
- /* @__PURE__ */ t(
47
+ /* @__PURE__ */ o("tr", { className: d("h-md bg-transparent", { hidden: r }), children: /* @__PURE__ */ o("td", { colSpan: e }) }),
48
+ /* @__PURE__ */ o(
51
49
  "tr",
52
50
  {
53
- className: o("h-md bg-transparent", { collapse: r }),
54
- children: /* @__PURE__ */ t("td", { colSpan: e })
55
- }
56
- ),
57
- /* @__PURE__ */ t(
58
- "tr",
59
- {
60
- className: o("bg-surface-base-secondary", {
61
- collapse: !l
51
+ className: d("bg-surface-base-secondary", {
52
+ collapse: !n
62
53
  }),
63
- children: /* @__PURE__ */ t("td", { colSpan: e, className: "h-0 px-comp-table-p", children: /* @__PURE__ */ t("div", { className: "border-t-1 border-stroke-base-secondary" }) })
54
+ children: /* @__PURE__ */ o("td", { colSpan: e, className: "h-0 px-comp-table-p", children: /* @__PURE__ */ o("div", { className: "border-t-1 border-stroke-base-secondary" }) })
64
55
  }
65
56
  )
66
57
  ] })
67
58
  );
68
- N.displayName = "TableRow";
69
- const h = n(({ className: a, ...r }, e) => /* @__PURE__ */ t(
59
+ x.displayName = "TableRow";
60
+ const N = t(({ className: a, ...r }, e) => /* @__PURE__ */ o(
70
61
  "th",
71
62
  {
72
63
  ref: e,
73
- className: o(
74
- f({
64
+ className: d(
65
+ i({
75
66
  size: "sm",
76
67
  uppercase: !0,
77
68
  variant: "body",
@@ -83,40 +74,53 @@ const h = n(({ className: a, ...r }, e) => /* @__PURE__ */ t(
83
74
  ...r
84
75
  }
85
76
  ));
86
- h.displayName = "TableHead";
87
- const T = s("h-comp-table-h transition-colors", {
88
- variants: {
89
- padding: {
90
- default: "px-comp-table-p",
91
- none: "p-0"
77
+ N.displayName = "TableHead";
78
+ const T = c(
79
+ "h-comp-table-h border-y-1 border-stroke-base-secondary bg-surface-base-secondary transition-colors",
80
+ {
81
+ variants: {
82
+ padding: {
83
+ default: "px-comp-table-p",
84
+ none: "p-0"
85
+ },
86
+ expandablePosition: {
87
+ none: "",
88
+ top: "border-b-0",
89
+ bottom: "border-t-0"
90
+ }
92
91
  },
93
- expandablePosition: {
94
- none: "",
95
- top: "rounded-tl-none rounded-tr-none rounded-br-none rounded-bl-none",
96
- bottom: "rounded-tl-none rounded-tr-none rounded-br-xl rounded-bl-xl"
92
+ defaultVariants: {
93
+ padding: "default",
94
+ expandablePosition: "none"
97
95
  }
98
- },
99
- defaultVariants: {
100
- padding: "default",
101
- expandablePosition: "none"
102
96
  }
103
- }), g = n(({ className: a, padding: r, expandablePosition: e, ...d }, l) => /* @__PURE__ */ t(
104
- "td",
105
- {
106
- ref: l,
107
- className: o(
108
- T({ padding: r, expandablePosition: e }),
109
- a
110
- ),
111
- ...d
112
- }
113
- ));
97
+ ), g = t(
98
+ ({ className: a, padding: r, expandablePosition: e, isFirst: l, isLast: n, ...s }, b) => /* @__PURE__ */ o(
99
+ "td",
100
+ {
101
+ ref: b,
102
+ className: d(
103
+ T({ padding: r, expandablePosition: e }),
104
+ {
105
+ "rounded-l-xl border-l-1": l && e === "none",
106
+ "rounded-tl-xl rounded-bl-none border-l-1": l && e === "top",
107
+ "rounded-tl-none rounded-bl-xl border-l-1": l && e === "bottom",
108
+ "rounded-r-xl border-r-1": n && e === "none",
109
+ "rounded-tr-xl rounded-br-none border-r-1": n && e === "top",
110
+ "rounded-tr-none rounded-br-xl border-r-1": n && e === "bottom"
111
+ },
112
+ a
113
+ ),
114
+ ...s
115
+ }
116
+ )
117
+ );
114
118
  g.displayName = "TableCell";
115
119
  export {
116
- m as Table,
117
- x as TableBody,
120
+ u as Table,
121
+ f as TableBody,
118
122
  g as TableCell,
119
- h as TableHead,
120
- u as TableHeader,
121
- N as TableRow
123
+ N as TableHead,
124
+ y as TableHeader,
125
+ x as TableRow
122
126
  };
@@ -1,5 +1,5 @@
1
- .pswp__button {
2
- &:focus-visible {
3
- outline: 1px solid var(--brand-primary);
4
- }
5
- }
1
+ .pswp__button {
2
+ &:focus-visible {
3
+ outline: 1px solid var(--brand-primary);
4
+ }
5
+ }