@agentero/design-system 0.27.1 → 0.29.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.
Files changed (50) hide show
  1. package/lib/index.d.ts +1 -0
  2. package/lib/index.js +2 -1
  3. package/lib/merge-props.d.ts +42 -0
  4. package/lib/merge-props.js +24 -0
  5. package/mcp/manifests/components.html +1258 -71
  6. package/mcp/manifests/components.json +1033 -9
  7. package/package.json +22 -1
  8. package/src/alert/alert.js +28 -28
  9. package/src/avatar/avatar.js +22 -22
  10. package/src/avatar-group/avatar-group.js +6 -6
  11. package/src/button/button.js +7 -7
  12. package/src/data-table/data-table.js +36 -36
  13. package/src/field/context.d.ts +70 -0
  14. package/src/field/context.js +6 -0
  15. package/src/field/field.d.ts +216 -0
  16. package/src/field/field.js +132 -0
  17. package/src/field/icons.d.ts +9 -0
  18. package/src/field/icons.js +14 -0
  19. package/src/field/index.d.ts +30 -0
  20. package/src/field/index.js +13 -0
  21. package/src/field-text/field-text.d.ts +28 -0
  22. package/src/field-text/field-text.js +26 -0
  23. package/src/field-text/index.d.ts +2 -0
  24. package/src/field-text/index.js +2 -0
  25. package/src/form/form.d.ts +60 -0
  26. package/src/form/form.js +16 -0
  27. package/src/form/index.d.ts +7 -0
  28. package/src/form/index.js +5 -0
  29. package/src/form-text/form-text.d.ts +136 -0
  30. package/src/form-text/form-text.js +40 -0
  31. package/src/form-text/index.d.ts +2 -0
  32. package/src/form-text/index.js +2 -0
  33. package/src/input/context.d.ts +17 -0
  34. package/src/input/context.js +10 -0
  35. package/src/input/index.d.ts +1 -0
  36. package/src/input/index.js +3 -2
  37. package/src/input/input.d.ts +7 -7
  38. package/src/input/input.js +16 -11
  39. package/src/label/context.d.ts +13 -0
  40. package/src/label/context.js +7 -0
  41. package/src/label/index.d.ts +1 -0
  42. package/src/label/index.js +3 -2
  43. package/src/label/label.d.ts +6 -1
  44. package/src/label/label.js +19 -17
  45. package/src/modal/modal.js +23 -23
  46. package/src/progress/progress.js +9 -9
  47. package/src/switch/switch.js +7 -7
  48. package/src/table/table.js +28 -28
  49. package/src/tabs/tabs.js +26 -26
  50. package/src/tag/tag.js +7 -7
@@ -3,8 +3,8 @@ 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
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";
6
+ import { createContext as i, use as a } from "react";
7
+ import { jsx as o } from "react/jsx-runtime";
8
8
  //#region src/table/table.tsx
9
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: {
@@ -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 = a(null), u = () => {
30
- let e = o(l);
29
+ }), l = i(null), u = () => {
30
+ let e = a(l);
31
31
  if (!e) throw Error("Table parts must be used within Table.Root");
32
32
  return e;
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, {
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);
35
+ return /* @__PURE__ */ o(l, {
36
36
  value: {
37
- header: y({ sticky: f(a) }),
37
+ header: y({ sticky: f(i) }),
38
38
  cell: x({ size: r }),
39
39
  headRow: _({ body: !1 }),
40
40
  bodyRow: _({
41
41
  body: !0,
42
- divider: !o,
43
- stickyFooter: p(a)
42
+ divider: !a,
43
+ stickyFooter: p(i)
44
44
  })
45
45
  },
46
- children: /* @__PURE__ */ i("div", {
46
+ children: /* @__PURE__ */ o("div", {
47
47
  "data-slot": "table-root",
48
48
  className: s.root(),
49
- children: /* @__PURE__ */ i("div", {
49
+ children: /* @__PURE__ */ o("div", {
50
50
  "data-slot": "table-scroll",
51
51
  ref: t,
52
52
  tabIndex: 0,
53
53
  className: s.scroll(),
54
- children: /* @__PURE__ */ i("table", {
54
+ children: /* @__PURE__ */ o("table", {
55
55
  "data-slot": "table",
56
56
  className: s.table(),
57
57
  children: e
@@ -61,18 +61,18 @@ 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__ */ i(d, {
64
+ var h = ({ children: e, ...t }) => /* @__PURE__ */ o(d, {
65
65
  value: "head",
66
- children: /* @__PURE__ */ i("thead", {
66
+ children: /* @__PURE__ */ o("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__ */ i(d, {
73
+ var g = ({ children: e, ...t }) => /* @__PURE__ */ o(d, {
74
74
  value: "body",
75
- children: /* @__PURE__ */ i("tbody", {
75
+ children: /* @__PURE__ */ o("tbody", {
76
76
  "data-slot": "table-body",
77
77
  ...t,
78
78
  children: e
@@ -100,10 +100,10 @@ var _ = r({
100
100
  }
101
101
  }
102
102
  }), v = ({ className: t, ...n }) => {
103
- let { headRow: r, bodyRow: a } = u();
104
- return /* @__PURE__ */ i("tr", {
103
+ let { headRow: r, bodyRow: i } = u();
104
+ return /* @__PURE__ */ o("tr", {
105
105
  "data-slot": "table-row",
106
- className: e(o(d) === "body" ? a : r, t),
106
+ className: e(a(d) === "body" ? i : r, t),
107
107
  ...n
108
108
  });
109
109
  };
@@ -116,7 +116,7 @@ var y = r({
116
116
  } }
117
117
  }), b = ({ className: t, ...n }) => {
118
118
  let { header: r } = u();
119
- return /* @__PURE__ */ i("th", {
119
+ return /* @__PURE__ */ o("th", {
120
120
  "data-slot": "table-header",
121
121
  className: e(r, t),
122
122
  ...n
@@ -133,24 +133,24 @@ var x = r({
133
133
  defaultVariants: { size: "md" }
134
134
  }), S = ({ className: t, ...n }) => {
135
135
  let { cell: r } = u();
136
- return /* @__PURE__ */ i("td", {
136
+ return /* @__PURE__ */ o("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 = 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, {
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: i, className: a, ...s }) => /* @__PURE__ */ o(t, {
144
144
  variant: "ghost",
145
145
  onClick: r,
146
- className: e(C(), o),
147
- "data-state": a ? "open" : "default",
146
+ className: e(C(), a),
147
+ "data-state": i ? "open" : "default",
148
148
  "data-slot": "table-expand-button",
149
149
  ...s,
150
- children: /* @__PURE__ */ i(n, {})
150
+ children: /* @__PURE__ */ o(n, {})
151
151
  });
152
152
  w.displayName = "Table.ExpandButton";
153
- var T = ({ className: t, ...n }) => /* @__PURE__ */ i("tr", {
153
+ var T = ({ className: t, ...n }) => /* @__PURE__ */ o("tr", {
154
154
  "data-slot": "table-expanded-row",
155
155
  className: e("border-t border-border-default-base-primary", t),
156
156
  ...n
@@ -162,7 +162,7 @@ var E = r({ base: [
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",
164
164
  "[@media(hover:none)_and_(pointer:coarse)]:[&>*]:opacity-100"
165
- ] }), D = ({ children: e }) => /* @__PURE__ */ i("div", {
165
+ ] }), D = ({ children: e }) => /* @__PURE__ */ o("div", {
166
166
  "data-slot": "table-row-actions",
167
167
  className: E(),
168
168
  children: e
package/src/tabs/tabs.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { tv as t } from "tailwind-variants";
4
- import { jsx as n } from "react/jsx-runtime";
5
- import { createContext as r, use as i } from "react";
4
+ import { createContext as n, use as r } from "react";
5
+ import { jsx as i } from "react/jsx-runtime";
6
6
  import * as a from "@radix-ui/react-tabs";
7
7
  //#region src/tabs/tabs.tsx
8
8
  var o = t({
@@ -57,18 +57,18 @@ var o = t({
57
57
  variant: "line",
58
58
  position: "start"
59
59
  }
60
- }), s = r(null), c = () => {
61
- let e = i(s);
60
+ }), s = n(null), c = () => {
61
+ let e = r(s);
62
62
  if (!e) throw Error("Tabs.List, Tabs.Trigger and Tabs.Content must be used within Tabs.Root");
63
63
  return e;
64
- }, l = ({ className: t, variant: r, position: i, ...c }) => {
64
+ }, l = ({ className: t, variant: n, position: r, ...c }) => {
65
65
  let l = o({
66
- variant: r,
67
- position: i
66
+ variant: n,
67
+ position: r
68
68
  });
69
- return /* @__PURE__ */ n(s, {
69
+ return /* @__PURE__ */ i(s, {
70
70
  value: l,
71
- children: /* @__PURE__ */ n(a.Root, {
71
+ children: /* @__PURE__ */ i(a.Root, {
72
72
  "data-slot": "tabs-root",
73
73
  className: e(l.root(), t),
74
74
  ...c
@@ -76,36 +76,36 @@ var o = t({
76
76
  });
77
77
  };
78
78
  l.displayName = "Tabs.Root";
79
- var u = ({ className: t, ...r }) => {
80
- let i = c();
81
- return /* @__PURE__ */ n(a.List, {
79
+ var u = ({ className: t, ...n }) => {
80
+ let r = c();
81
+ return /* @__PURE__ */ i(a.List, {
82
82
  "data-slot": "tabs-list",
83
- className: e(i.list(), t),
84
- ...r
83
+ className: e(r.list(), t),
84
+ ...n
85
85
  });
86
86
  };
87
87
  u.displayName = "Tabs.List";
88
- var d = ({ className: t, ...r }) => {
89
- let i = c();
90
- return /* @__PURE__ */ n(a.Trigger, {
88
+ var d = ({ className: t, ...n }) => {
89
+ let r = c();
90
+ return /* @__PURE__ */ i(a.Trigger, {
91
91
  "data-slot": "tabs-trigger",
92
- className: e(i.trigger(), t),
93
- ...r
92
+ className: e(r.trigger(), t),
93
+ ...n
94
94
  });
95
95
  };
96
96
  d.displayName = "Tabs.Trigger";
97
- var f = ({ className: t, ...r }) => {
98
- let i = c();
99
- return /* @__PURE__ */ n(a.Content, {
97
+ var f = ({ className: t, ...n }) => {
98
+ let r = c();
99
+ return /* @__PURE__ */ i(a.Content, {
100
100
  "data-slot": "tabs-content",
101
- className: e(i.content(), t),
102
- ...r
101
+ className: e(r.content(), t),
102
+ ...n
103
103
  });
104
104
  };
105
105
  f.displayName = "Tabs.Content";
106
- var p = ({ className: t, variant: r, ...a }) => /* @__PURE__ */ n("span", {
106
+ var p = ({ className: t, variant: n, ...a }) => /* @__PURE__ */ i("span", {
107
107
  "data-slot": "tabs-label",
108
- className: e((i(s) ?? o({ variant: r })).trigger(), "pointer-events-none", t),
108
+ className: e((r(s) ?? o({ variant: n })).trigger(), "pointer-events-none", t),
109
109
  ...a
110
110
  });
111
111
  p.displayName = "Tabs.Label";
package/src/tag/tag.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { cn as e } from "../../lib/utils.js";
2
2
  import { tv as t } from "tailwind-variants";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { Children as r, isValidElement as i } from "react";
3
+ import { Children as n, isValidElement as r } from "react";
4
+ import { jsx as i } from "react/jsx-runtime";
5
5
  import { Slot as a, Slottable as o } from "@radix-ui/react-slot";
6
6
  //#region src/tag/tag.tsx
7
7
  var s = t({
@@ -106,25 +106,25 @@ var s = t({
106
106
  variant: "tertiary",
107
107
  size: "sm"
108
108
  }
109
- }), c = (e) => r.map(e, (e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ n("span", {
109
+ }), c = (e) => n.map(e, (e) => typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ i("span", {
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 = r.toArray(l && i(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 = 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(i)
120
+ hasOnlyIcon: y.length > 0 && y.every(r)
121
121
  }), h), x = m && !l ? c(t) : t;
122
- return /* @__PURE__ */ n(v, {
122
+ return /* @__PURE__ */ i(v, {
123
123
  "data-slot": "tag",
124
124
  ..._,
125
125
  className: b,
126
126
  ref: g,
127
- children: l ? /* @__PURE__ */ n(o, { children: t }) : x
127
+ children: l ? /* @__PURE__ */ i(o, { children: t }) : x
128
128
  });
129
129
  };
130
130
  //#endregion