@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.
@@ -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" ? s[t] = r(n, c) : t === "aria-describedby" && typeof n == "string" && typeof c == "string" ? s[t] = a(n, c) : t === "className" && typeof n == "string" ? s[t] = e(n, c) : t === "ref" && n && c ? s[t] = i(n, c) : s[t] = c;
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) => {
@@ -8606,6 +8606,6 @@
8606
8606
  },
8607
8607
  "meta": {
8608
8608
  "docgen": "react-component-meta",
8609
- "durationMs": 4273
8609
+ "durationMs": 4314
8610
8610
  }
8611
8611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "description": "A React component library built with Tailwind CSS v4 and Radix UI primitives",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -308,4 +308,4 @@ var g = c({
308
308
  };
309
309
  O.Title = b, O.Paragraph = x, O.ParagraphHtml = S, O.Content = C, O.Actions = w, O.Button = E, O.Pictograms = T;
310
310
  //#endregion
311
- export { O as Alert };
311
+ export { O as Alert, g as alertRecipe, v as useAlert };
@@ -230,4 +230,4 @@ var s = t({
230
230
  };
231
231
  };
232
232
  //#endregion
233
- export { p as Avatar };
233
+ export { p as Avatar, s as avatarRecipe, l as useAvatar };
@@ -272,4 +272,4 @@ var c = t({
272
272
  });
273
273
  };
274
274
  //#endregion
275
- export { u as Button };
275
+ export { u as Button, c as buttonRecipe };
@@ -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 }) => /* @__PURE__ */ d(g, {
16
- value: {
17
- table: h({
18
- ...a,
19
- getCoreRowModel: m()
20
- }),
21
- isLoading: t,
22
- scrollRef: l(null),
23
- onRowClick: n,
24
- rowHref: r,
25
- linkComponent: i
26
- },
27
- children: /* @__PURE__ */ d("div", {
28
- "data-slot": "data-table-root",
29
- className: "flex min-h-0 flex-1 flex-col",
30
- children: e
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) || !e.currentTarget.contains(e.target) || (v ? v(t.original) : r && e.currentTarget.querySelector("[data-row-link]")?.click());
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;
@@ -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 FieldError, g as Group, y as Label, _ as Root, m as fieldRecipe };
132
+ export { v as Content, b as Description, S as Error, g as Group, y as Label, _ as Root, m as fieldRecipe };
@@ -1,5 +1,5 @@
1
1
  import { FieldContext as e, useFieldContext as t } from "./context.js";
2
- import { Content as n, Description as r, FieldError as i, Group as a, Label as o, Root as s, fieldRecipe as c } from "./field.js";
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: i && {
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, {
@@ -93,4 +93,4 @@ var l = o({
93
93
  });
94
94
  };
95
95
  //#endregion
96
- export { u as Pagination };
96
+ export { u as Pagination, l as paginationRecipe };
@@ -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(a(d) === "body" ? i : r, t),
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 }) => /* @__PURE__ */ i("span", {
107
- "data-slot": "tabs-label",
108
- className: e((r(s) ?? o({ variant: n })).trigger(), "pointer-events-none", t),
109
- ...a
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: y.length > 0 && y.every(r)
121
- }), h), x = m && !l ? c(t) : t;
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: b,
125
+ className: x,
126
126
  ref: g,
127
- children: l ? /* @__PURE__ */ i(o, { children: t }) : x
127
+ children: l ? /* @__PURE__ */ i(o, { children: t }) : S
128
128
  });
129
129
  };
130
130
  //#endregion