@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.
- package/mcp/manifests/components.html +191 -36
- package/mcp/manifests/components.json +1 -1
- package/package.json +8 -3
- package/src/accordion/accordion.d.ts +46 -0
- package/src/accordion/accordion.js +54 -0
- package/src/accordion/icons.d.ts +10 -0
- package/src/accordion/icons.js +16 -0
- package/src/accordion/index.d.ts +2 -0
- package/src/accordion/index.js +2 -0
- package/src/alert/alert.js +30 -30
- package/src/avatar/avatar.js +24 -24
- package/src/button/button.js +11 -11
- package/src/data-table/data-table.js +40 -40
- package/src/data-table/table.js +33 -33
- package/theme/base.css +18 -0
package/src/data-table/table.js
CHANGED
|
@@ -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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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 =
|
|
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 =
|
|
30
|
-
let e =
|
|
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 =
|
|
34
|
-
let { size: r, sticky:
|
|
35
|
-
return /* @__PURE__ */
|
|
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(
|
|
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: !
|
|
43
|
-
stickyFooter: p(
|
|
42
|
+
divider: !o,
|
|
43
|
+
stickyFooter: p(a)
|
|
44
44
|
})
|
|
45
45
|
},
|
|
46
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ i("div", {
|
|
47
47
|
"data-slot": "table-root",
|
|
48
48
|
className: s.root(),
|
|
49
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
64
|
+
var h = ({ children: e, ...t }) => /* @__PURE__ */ i(d, {
|
|
65
65
|
value: "head",
|
|
66
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
73
|
+
var g = ({ children: e, ...t }) => /* @__PURE__ */ i(d, {
|
|
74
74
|
value: "body",
|
|
75
|
-
children: /* @__PURE__ */
|
|
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 _ =
|
|
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__ */
|
|
104
|
+
return /* @__PURE__ */ i("tr", {
|
|
105
105
|
"data-slot": "table-row",
|
|
106
|
-
className: e(
|
|
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 =
|
|
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__ */
|
|
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 =
|
|
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__ */
|
|
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 =
|
|
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(),
|
|
147
|
-
"data-state":
|
|
146
|
+
className: e(C(), o),
|
|
147
|
+
"data-state": a ? "open" : "default",
|
|
148
148
|
"data-slot": "table-expand-button",
|
|
149
149
|
...s,
|
|
150
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ i(n, {})
|
|
151
151
|
});
|
|
152
152
|
w.displayName = "Table.ExpandButton";
|
|
153
|
-
var T = ({ className: t, ...n }) => /* @__PURE__ */
|
|
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 =
|
|
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__ */
|
|
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);
|