@agentero/design-system 0.9.7 → 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.
@@ -2,11 +2,11 @@
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { Button as t } from "../button/button.js";
4
4
  import { IconKeyboardArrowDown as n } from "./icons.js";
5
- import { createContext as r, use as i } from "react";
6
- import { tv as a } from "tailwind-variants";
7
- import { jsx as o } from "react/jsx-runtime";
5
+ import { tv as r } from "tailwind-variants";
6
+ import { jsx as i } from "react/jsx-runtime";
7
+ import { createContext as a, use as o } from "react";
8
8
  //#region src/data-table/table.tsx
9
- var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inline)] first:ps-[var(--table-cell-padding-inline-ends)] last:pe-[var(--table-cell-padding-inline-ends)] has-[[type=checkbox]]:w-0 has-[[type=checkbox]]:pe-0", c = a({
9
+ var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inline)] first:ps-[var(--table-cell-padding-inline-ends)] last:pe-[var(--table-cell-padding-inline-ends)] has-[[type=checkbox]]:w-0 has-[[type=checkbox]]:pe-0", c = r({
10
10
  slots: {
11
11
  root: ["flex min-h-0 flex-1 flex-col overflow-hidden", "[--table-cell-padding-inline:1.25rem] [--table-cell-padding-inline-ends:1.25rem]"],
12
12
  scroll: "min-h-0 flex-1 overflow-auto focus-visible:outline-none",
@@ -26,32 +26,32 @@ var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inli
26
26
  }
27
27
  },
28
28
  defaultVariants: { size: "md" }
29
- }), l = r(null), u = () => {
30
- let e = i(l);
29
+ }), l = a(null), u = () => {
30
+ let e = o(l);
31
31
  if (!e) throw Error("Table parts must be used within Table.Root");
32
32
  return e;
33
- }, d = r("body"), f = (e) => e === "header" || e === "headerAndFooter", p = (e) => e === "headerAndFooter", m = ({ children: e, ref: t, ...n }) => {
34
- let { size: r, sticky: i, embed: a } = n, s = c(n);
35
- return /* @__PURE__ */ o(l, {
33
+ }, d = a("body"), f = (e) => e === "header" || e === "headerAndFooter", p = (e) => e === "headerAndFooter", m = ({ children: e, ref: t, ...n }) => {
34
+ let { size: r, sticky: a, embed: o } = n, s = c(n);
35
+ return /* @__PURE__ */ i(l, {
36
36
  value: {
37
- header: y({ sticky: f(i) }),
37
+ header: y({ sticky: f(a) }),
38
38
  cell: x({ size: r }),
39
39
  headRow: _({ body: !1 }),
40
40
  bodyRow: _({
41
41
  body: !0,
42
- divider: !a,
43
- stickyFooter: p(i)
42
+ divider: !o,
43
+ stickyFooter: p(a)
44
44
  })
45
45
  },
46
- children: /* @__PURE__ */ o("div", {
46
+ children: /* @__PURE__ */ i("div", {
47
47
  "data-slot": "table-root",
48
48
  className: s.root(),
49
- children: /* @__PURE__ */ o("div", {
49
+ children: /* @__PURE__ */ i("div", {
50
50
  "data-slot": "table-scroll",
51
51
  ref: t,
52
52
  tabIndex: 0,
53
53
  className: s.scroll(),
54
- children: /* @__PURE__ */ o("table", {
54
+ children: /* @__PURE__ */ i("table", {
55
55
  "data-slot": "table",
56
56
  className: s.table(),
57
57
  children: e
@@ -61,25 +61,25 @@ var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inli
61
61
  });
62
62
  };
63
63
  m.displayName = "Table.Root";
64
- var h = ({ children: e, ...t }) => /* @__PURE__ */ o(d, {
64
+ var h = ({ children: e, ...t }) => /* @__PURE__ */ i(d, {
65
65
  value: "head",
66
- children: /* @__PURE__ */ o("thead", {
66
+ children: /* @__PURE__ */ i("thead", {
67
67
  "data-slot": "table-head",
68
68
  ...t,
69
69
  children: e
70
70
  })
71
71
  });
72
72
  h.displayName = "Table.Head";
73
- var g = ({ children: e, ...t }) => /* @__PURE__ */ o(d, {
73
+ var g = ({ children: e, ...t }) => /* @__PURE__ */ i(d, {
74
74
  value: "body",
75
- children: /* @__PURE__ */ o("tbody", {
75
+ children: /* @__PURE__ */ i("tbody", {
76
76
  "data-slot": "table-body",
77
77
  ...t,
78
78
  children: e
79
79
  })
80
80
  });
81
81
  g.displayName = "Table.Body";
82
- var _ = a({
82
+ var _ = r({
83
83
  base: "transition-colors duration-150",
84
84
  variants: {
85
85
  body: {
@@ -101,14 +101,14 @@ var _ = a({
101
101
  }
102
102
  }), v = ({ className: t, ...n }) => {
103
103
  let { headRow: r, bodyRow: a } = u();
104
- return /* @__PURE__ */ o("tr", {
104
+ return /* @__PURE__ */ i("tr", {
105
105
  "data-slot": "table-row",
106
- className: e(i(d) === "body" ? a : r, t),
106
+ className: e(o(d) === "body" ? a : r, t),
107
107
  ...n
108
108
  });
109
109
  };
110
110
  v.displayName = "Table.Row";
111
- var y = a({
111
+ var y = r({
112
112
  base: `h-12 border-b border-border-default-base-primary text-left align-middle text-sm font-light whitespace-nowrap text-text-default-base-tertiary ${s}`,
113
113
  variants: { sticky: {
114
114
  true: "sticky top-0 z-[1] bg-bg-default-base-primary",
@@ -116,14 +116,14 @@ var y = a({
116
116
  } }
117
117
  }), b = ({ className: t, ...n }) => {
118
118
  let { header: r } = u();
119
- return /* @__PURE__ */ o("th", {
119
+ return /* @__PURE__ */ i("th", {
120
120
  "data-slot": "table-header",
121
121
  className: e(r, t),
122
122
  ...n
123
123
  });
124
124
  };
125
125
  b.displayName = "Table.Header";
126
- var x = a({
126
+ var x = r({
127
127
  base: `align-middle text-sm whitespace-nowrap ${s}`,
128
128
  variants: { size: {
129
129
  sm: "h-12",
@@ -133,36 +133,36 @@ var x = a({
133
133
  defaultVariants: { size: "md" }
134
134
  }), S = ({ className: t, ...n }) => {
135
135
  let { cell: r } = u();
136
- return /* @__PURE__ */ o("td", {
136
+ return /* @__PURE__ */ i("td", {
137
137
  "data-slot": "table-cell",
138
138
  className: e(r, t),
139
139
  ...n
140
140
  });
141
141
  };
142
142
  S.displayName = "Table.Cell";
143
- var C = a({ base: "relative z-[1] [&>svg]:shrink-0 [&>svg]:transition-transform [&>svg]:duration-200 data-[state=open]:[&>svg]:rotate-180" }), w = ({ toggleExpanded: r, isExpanded: i, className: a, ...s }) => /* @__PURE__ */ o(t, {
143
+ var C = r({ base: "relative z-[1] [&>svg]:shrink-0 [&>svg]:transition-transform [&>svg]:duration-200 data-[state=open]:[&>svg]:rotate-180" }), w = ({ toggleExpanded: r, isExpanded: a, className: o, ...s }) => /* @__PURE__ */ i(t, {
144
144
  variant: "ghost",
145
145
  onClick: r,
146
- className: e(C(), a),
147
- "data-state": i ? "open" : "default",
146
+ className: e(C(), o),
147
+ "data-state": a ? "open" : "default",
148
148
  "data-slot": "table-expand-button",
149
149
  ...s,
150
- children: /* @__PURE__ */ o(n, {})
150
+ children: /* @__PURE__ */ i(n, {})
151
151
  });
152
152
  w.displayName = "Table.ExpandButton";
153
- var T = ({ className: t, ...n }) => /* @__PURE__ */ o("tr", {
153
+ var T = ({ className: t, ...n }) => /* @__PURE__ */ i("tr", {
154
154
  "data-slot": "table-expanded-row",
155
155
  className: e("border-t border-border-default-base-primary", t),
156
156
  ...n
157
157
  });
158
158
  T.displayName = "Table.ExpandedRow";
159
- var E = a({ base: [
159
+ var E = r({ base: [
160
160
  "relative flex w-fit gap-1",
161
161
  "after:absolute after:inset-y-0 after:right-0 after:left-[calc(var(--table-cell-padding-inline)*-1)] after:opacity-0 after:transition-opacity after:duration-150 after:content-[\"\"]",
162
162
  "after:[background:linear-gradient(to_right,transparent_0,var(--color-bg-default-base-secondary)_var(--table-cell-padding-inline))]",
163
163
  "[&>*]:relative [&>*]:z-[1] [&>*]:opacity-0 [&>*]:transition-opacity [&>*]:duration-150",
164
164
  "[@media(hover:none)_and_(pointer:coarse)]:[&>*]:opacity-100"
165
- ] }), D = ({ children: e }) => /* @__PURE__ */ o("div", {
165
+ ] }), D = ({ children: e }) => /* @__PURE__ */ i("div", {
166
166
  "data-slot": "table-row-actions",
167
167
  className: E(),
168
168
  children: e
package/theme/base.css CHANGED
@@ -944,6 +944,24 @@
944
944
  }
945
945
  }
946
946
 
947
+ @keyframes accordionDown {
948
+ from {
949
+ height: 0;
950
+ }
951
+ to {
952
+ height: var(--radix-accordion-content-height);
953
+ }
954
+ }
955
+
956
+ @keyframes accordionUp {
957
+ from {
958
+ height: var(--radix-accordion-content-height);
959
+ }
960
+ to {
961
+ height: 0;
962
+ }
963
+ }
964
+
947
965
  html {
948
966
  /* body.md textStyle from Panda → text-base */
949
967
  font-size: var(--text-base);