@agentero/design-system 0.29.0 → 0.29.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.
- package/lib/merge-props.js +1 -1
- package/mcp/manifests/components.json +1 -1
- package/package.json +1 -1
- package/src/alert/alert.js +1 -1
- package/src/avatar/avatar.js +1 -1
- package/src/button/button.js +1 -1
- package/src/data-table/data-table.js +22 -19
- package/src/field/field.js +13 -13
- package/src/field/index.js +1 -1
- package/src/field-text/field-text.js +9 -9
- package/src/pagination/pagination.js +1 -1
- package/src/table/table.js +13 -13
- package/src/tabs/tabs.js +8 -5
- package/src/tag/tag.js +5 -5
package/lib/merge-props.js
CHANGED
|
@@ -10,7 +10,7 @@ var r = (...e) => (...t) => {
|
|
|
10
10
|
for (let [t, c] of Object.entries(n)) {
|
|
11
11
|
if (c === void 0) continue;
|
|
12
12
|
let n = s[t];
|
|
13
|
-
o(t) && typeof n == "function" && typeof c == "function" ?
|
|
13
|
+
s[t] = o(t) && typeof n == "function" && typeof c == "function" ? r(n, c) : t === "aria-describedby" && typeof n == "string" && typeof c == "string" ? a(n, c) : t === "className" && typeof n == "string" ? e(n, c) : t === "ref" && n && c ? i(n, c) : c;
|
|
14
14
|
}
|
|
15
15
|
return s;
|
|
16
16
|
}, c = (e, n) => {
|
package/package.json
CHANGED
package/src/alert/alert.js
CHANGED
package/src/avatar/avatar.js
CHANGED
package/src/button/button.js
CHANGED
|
@@ -12,24 +12,27 @@ var g = s(null), _ = () => {
|
|
|
12
12
|
let e = c(g);
|
|
13
13
|
if (!e) throw Error("useDataTable must be used within a DataTable.Root");
|
|
14
14
|
return e;
|
|
15
|
-
}, v = ({ children: e, isLoading: t = !1, onRowClick: n, rowHref: r, linkComponent: i = "a", ...a }) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
}, v = ({ children: e, isLoading: t = !1, onRowClick: n, rowHref: r, linkComponent: i = "a", ...a }) => {
|
|
16
|
+
let o = h({
|
|
17
|
+
...a,
|
|
18
|
+
getCoreRowModel: m()
|
|
19
|
+
}), s = l(null);
|
|
20
|
+
return /* @__PURE__ */ d(g, {
|
|
21
|
+
value: {
|
|
22
|
+
table: o,
|
|
23
|
+
isLoading: t,
|
|
24
|
+
scrollRef: s,
|
|
25
|
+
onRowClick: n,
|
|
26
|
+
rowHref: r,
|
|
27
|
+
linkComponent: i
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ d("div", {
|
|
30
|
+
"data-slot": "data-table-root",
|
|
31
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
32
|
+
children: e
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
};
|
|
33
36
|
v.displayName = "DataTable.Root";
|
|
34
37
|
var y = ({ children: e }) => /* @__PURE__ */ d("div", {
|
|
35
38
|
"data-slot": "data-table-toolbar",
|
|
@@ -98,7 +101,7 @@ var b = a({
|
|
|
98
101
|
return /* @__PURE__ */ d(o, { children: /* @__PURE__ */ d(n.Row, {
|
|
99
102
|
className: e("has-aria-expanded:bg-bg-default-base-secondary", i && "cursor-pointer"),
|
|
100
103
|
onClick: i ? (e) => {
|
|
101
|
-
S(e.target)
|
|
104
|
+
!S(e.target) && e.currentTarget.contains(e.target) && (v ? v(t.original) : r && e.currentTarget.querySelector("[data-row-link]")?.click());
|
|
102
105
|
} : void 0,
|
|
103
106
|
children: t.getVisibleCells().map((e, t) => {
|
|
104
107
|
let i = e.column.columnDef.meta;
|
package/src/field/field.js
CHANGED
|
@@ -45,19 +45,19 @@ var m = s({
|
|
|
45
45
|
});
|
|
46
46
|
g.displayName = "Field.Group";
|
|
47
47
|
var _ = ({ className: n, orientation: r = "vertical", invalid: a = !1, disabled: o = !1, readOnly: s = !1, required: u = !1, controlId: p, ...m }) => {
|
|
48
|
-
let g = l(), _ = p ?? `${g}-control`, v = `${g}-description`, y = `${g}-error`, [b, x] = d([]), S = c((e) => (x((t) => t.includes(e) ? t : [...t, e]), () => x((t) => t.filter((t) => t !== e))), [])
|
|
48
|
+
let g = l(), _ = p ?? `${g}-control`, v = `${g}-description`, y = `${g}-error`, [b, x] = d([]), S = c((e) => (x((t) => t.includes(e) ? t : [...t, e]), () => x((t) => t.filter((t) => t !== e))), []), C = {
|
|
49
|
+
controlId: _,
|
|
50
|
+
descriptionId: v,
|
|
51
|
+
errorId: y,
|
|
52
|
+
describedBy: [...[v, y].filter((e) => b.includes(e)), ...b.filter((e) => e !== v && e !== y)].join(" ") || void 0,
|
|
53
|
+
registerMessage: S,
|
|
54
|
+
invalid: a,
|
|
55
|
+
disabled: o,
|
|
56
|
+
readOnly: s,
|
|
57
|
+
required: u
|
|
58
|
+
};
|
|
49
59
|
return /* @__PURE__ */ f(i, {
|
|
50
|
-
value:
|
|
51
|
-
controlId: _,
|
|
52
|
-
descriptionId: v,
|
|
53
|
-
errorId: y,
|
|
54
|
-
describedBy: [...[v, y].filter((e) => b.includes(e)), ...b.filter((e) => e !== v && e !== y)].join(" ") || void 0,
|
|
55
|
-
registerMessage: S,
|
|
56
|
-
invalid: a,
|
|
57
|
-
disabled: o,
|
|
58
|
-
readOnly: s,
|
|
59
|
-
required: u
|
|
60
|
-
},
|
|
60
|
+
value: C,
|
|
61
61
|
children: /* @__PURE__ */ f(t, {
|
|
62
62
|
value: {
|
|
63
63
|
htmlFor: _,
|
|
@@ -129,4 +129,4 @@ var x = (e) => {
|
|
|
129
129
|
};
|
|
130
130
|
S.displayName = "Field.Error";
|
|
131
131
|
//#endregion
|
|
132
|
-
export { v as Content, b as Description, S as
|
|
132
|
+
export { v as Content, b as Description, S as Error, g as Group, y as Label, _ as Root, m as fieldRecipe };
|
package/src/field/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldContext as e, useFieldContext as t } from "./context.js";
|
|
2
|
-
import { Content as n, Description as r,
|
|
2
|
+
import { Content as n, Description as r, Error as i, Group as a, Label as o, Root as s, fieldRecipe as c } from "./field.js";
|
|
3
3
|
//#region src/field/index.ts
|
|
4
4
|
var l = {
|
|
5
5
|
Root: s,
|
|
@@ -5,16 +5,16 @@ import { InputContext as n } from "../input/context.js";
|
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
//#region src/field-text/field-text.tsx
|
|
7
7
|
var i = ({ children: t }) => {
|
|
8
|
-
let i = e()
|
|
8
|
+
let i = e(), a = i && {
|
|
9
|
+
id: i.controlId,
|
|
10
|
+
"aria-describedby": i.describedBy,
|
|
11
|
+
"aria-invalid": i.invalid || void 0,
|
|
12
|
+
required: i.required || void 0,
|
|
13
|
+
disabled: i.disabled || void 0,
|
|
14
|
+
readOnly: i.readOnly || void 0
|
|
15
|
+
};
|
|
9
16
|
return /* @__PURE__ */ r(n, {
|
|
10
|
-
value:
|
|
11
|
-
id: i.controlId,
|
|
12
|
-
"aria-describedby": i.describedBy,
|
|
13
|
-
"aria-invalid": i.invalid || void 0,
|
|
14
|
-
required: i.required || void 0,
|
|
15
|
-
disabled: i.disabled || void 0,
|
|
16
|
-
readOnly: i.readOnly || void 0
|
|
17
|
-
},
|
|
17
|
+
value: a,
|
|
18
18
|
children: t
|
|
19
19
|
});
|
|
20
20
|
}, a = ({ children: e, ...n }) => /* @__PURE__ */ r(t.Root, {
|
package/src/table/table.js
CHANGED
|
@@ -31,18 +31,18 @@ var s = "ps-[var(--table-cell-padding-inline)] pe-[var(--table-cell-padding-inli
|
|
|
31
31
|
if (!e) throw Error("Table parts must be used within Table.Root");
|
|
32
32
|
return e;
|
|
33
33
|
}, d = i("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)
|
|
34
|
+
let { size: r, sticky: i, embed: a } = n, s = c(n), u = {
|
|
35
|
+
header: y({ sticky: f(i) }),
|
|
36
|
+
cell: x({ size: r }),
|
|
37
|
+
headRow: _({ body: !1 }),
|
|
38
|
+
bodyRow: _({
|
|
39
|
+
body: !0,
|
|
40
|
+
divider: !a,
|
|
41
|
+
stickyFooter: p(i)
|
|
42
|
+
})
|
|
43
|
+
};
|
|
35
44
|
return /* @__PURE__ */ o(l, {
|
|
36
|
-
value:
|
|
37
|
-
header: y({ sticky: f(i) }),
|
|
38
|
-
cell: x({ size: r }),
|
|
39
|
-
headRow: _({ body: !1 }),
|
|
40
|
-
bodyRow: _({
|
|
41
|
-
body: !0,
|
|
42
|
-
divider: !a,
|
|
43
|
-
stickyFooter: p(i)
|
|
44
|
-
})
|
|
45
|
-
},
|
|
45
|
+
value: u,
|
|
46
46
|
children: /* @__PURE__ */ o("div", {
|
|
47
47
|
"data-slot": "table-root",
|
|
48
48
|
className: s.root(),
|
|
@@ -100,10 +100,10 @@ var _ = r({
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}), v = ({ className: t, ...n }) => {
|
|
103
|
-
let { headRow: r, bodyRow: i } = u();
|
|
103
|
+
let { headRow: r, bodyRow: i } = u(), s = a(d) === "body";
|
|
104
104
|
return /* @__PURE__ */ o("tr", {
|
|
105
105
|
"data-slot": "table-row",
|
|
106
|
-
className: e(
|
|
106
|
+
className: e(s ? i : r, t),
|
|
107
107
|
...n
|
|
108
108
|
});
|
|
109
109
|
};
|
package/src/tabs/tabs.js
CHANGED
|
@@ -103,11 +103,14 @@ var f = ({ className: t, ...n }) => {
|
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
105
|
f.displayName = "Tabs.Content";
|
|
106
|
-
var p = ({ className: t, variant: n, ...a }) =>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
var p = ({ className: t, variant: n, ...a }) => {
|
|
107
|
+
let c = r(s) ?? o({ variant: n });
|
|
108
|
+
return /* @__PURE__ */ i("span", {
|
|
109
|
+
"data-slot": "tabs-label",
|
|
110
|
+
className: e(c.trigger(), "pointer-events-none", t),
|
|
111
|
+
...a
|
|
112
|
+
});
|
|
113
|
+
};
|
|
111
114
|
p.displayName = "Tabs.Label";
|
|
112
115
|
//#endregion
|
|
113
116
|
export { f as Content, p as Label, u as List, l as Root, d as Trigger, o as tabsRecipe };
|
package/src/tag/tag.js
CHANGED
|
@@ -110,21 +110,21 @@ var s = t({
|
|
|
110
110
|
className: "min-w-0 truncate",
|
|
111
111
|
children: e
|
|
112
112
|
}) : e), l = ({ children: t, asChild: l, color: u, variant: d, size: f, pill: p, truncate: m, className: h, ref: g, ..._ }) => {
|
|
113
|
-
let v = l ? a : "span", y = n.toArray(l && r(t) ? t.props.children : t), b = e(s({
|
|
113
|
+
let v = l ? a : "span", y = n.toArray(l && r(t) ? t.props.children : t), b = y.length > 0 && y.every(r), x = e(s({
|
|
114
114
|
color: u,
|
|
115
115
|
variant: d,
|
|
116
116
|
size: f,
|
|
117
117
|
pill: p,
|
|
118
118
|
truncate: m,
|
|
119
119
|
interactive: l,
|
|
120
|
-
hasOnlyIcon:
|
|
121
|
-
}), h),
|
|
120
|
+
hasOnlyIcon: b
|
|
121
|
+
}), h), S = m && !l ? c(t) : t;
|
|
122
122
|
return /* @__PURE__ */ i(v, {
|
|
123
123
|
"data-slot": "tag",
|
|
124
124
|
..._,
|
|
125
|
-
className:
|
|
125
|
+
className: x,
|
|
126
126
|
ref: g,
|
|
127
|
-
children: l ? /* @__PURE__ */ i(o, { children: t }) :
|
|
127
|
+
children: l ? /* @__PURE__ */ i(o, { children: t }) : S
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
130
|
//#endregion
|