@agentero/design-system 0.25.1 → 0.25.3

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.
@@ -588,13 +588,13 @@
588
588
  <header>
589
589
  <div class="wrap">
590
590
  <h1>Manifest Debugger</h1>
591
- <div class="summary"><a class="filter-pill all" data-k="all" href="#filter-all">All</a><span class="filter-pill ok" aria-disabled="true">25 components ok</span><span class="filter-pill ok" aria-disabled="true">193 stories ok</span></div>
591
+ <div class="summary"><a class="filter-pill all" data-k="all" href="#filter-all">All</a><span class="filter-pill ok" aria-disabled="true">25 components ok</span><span class="filter-pill ok" aria-disabled="true">194 stories ok</span></div>
592
592
  </div>
593
593
  </header>
594
594
  <main>
595
595
  <div class="wrap">
596
596
  <div class="note ok" style="margin-bottom: 16px;">
597
- Using <code>react-component-meta</code>. Generation took <strong>4.2s</strong>.
597
+ Using <code>react-component-meta</code>. Generation took <strong>3.7s</strong>.
598
598
  </div>
599
599
  <h2 class="section-title">Components</h2>
600
600
  <div class="grid" role="list">
@@ -6371,7 +6371,7 @@ tablist role is announced.</div>
6371
6371
  <div class="badges">
6372
6372
  <label for="c-21-components-tag-props" class="badge ok as-toggle">8 prop types</label>
6373
6373
 
6374
- <label for="c-21-components-tag-stories" class="badge ok as-toggle">11 stories</label>
6374
+ <label for="c-21-components-tag-stories" class="badge ok as-toggle">12 stories</label>
6375
6375
 
6376
6376
 
6377
6377
  </div>
@@ -6675,6 +6675,24 @@ icon with a long label clips the label and leaves the icon at full size.</div>
6675
6675
  &lt;/Tag&gt;
6676
6676
  &lt;/div&gt;
6677
6677
  &lt;/Stack&gt;
6678
+ );</code></pre>
6679
+ </div>
6680
+ <div class="note ok">
6681
+ <div class="row">
6682
+ <span class="ex-name">Overflows Without Wrapping</span>
6683
+ <span class="badge ok">story ok</span>
6684
+ </div>
6685
+ <div>A too-narrow container overflows a single-line Tag; the label never wraps</div>
6686
+ <div class="hint">Without `truncate`, a Tag never wraps its label onto multiple lines — a
6687
+ container narrower than the label just gets overflowed by a single-line
6688
+ Tag that keeps its intrinsic width, instead of breaking the label across
6689
+ lines and spilling out of the fixed-height box.</div>
6690
+ <pre><code>const OverflowsWithoutWrapping = () =&gt; (
6691
+ &lt;div style={{ width: &#39;9rem&#39;, border: &#39;1px dashed gray&#39; }}&gt;
6692
+ &lt;Tag title=&quot;Travel insurance limited lines producer&quot;&gt;
6693
+ Travel insurance limited lines producer
6694
+ &lt;/Tag&gt;
6695
+ &lt;/div&gt;
6678
6696
  );</code></pre>
6679
6697
  </div>
6680
6698
  <div class="note ok">
@@ -6192,6 +6192,13 @@
6192
6192
  "description": "`truncate` caps the Tag at its container's width and ellipsizes the label.\nThe ellipsis sits on a wrapper around each text run, so a Tag that mixes an\nicon with a long label clips the label and leaves the icon at full size.",
6193
6193
  "summary": "Long labels capped at the container width with an ellipsis"
6194
6194
  },
6195
+ {
6196
+ "id": "components-tag--overflows-without-wrapping",
6197
+ "name": "Overflows Without Wrapping",
6198
+ "snippet": "const OverflowsWithoutWrapping = () => (\n <div style={{ width: '9rem', border: '1px dashed gray' }}>\n <Tag title=\"Travel insurance limited lines producer\">\n Travel insurance limited lines producer\n </Tag>\n </div>\n);",
6199
+ "description": "Without `truncate`, a Tag never wraps its label onto multiple lines — a\ncontainer narrower than the label just gets overflowed by a single-line\nTag that keeps its intrinsic width, instead of breaking the label across\nlines and spilling out of the fixed-height box.",
6200
+ "summary": "A too-narrow container overflows a single-line Tag; the label never wraps"
6201
+ },
6195
6202
  {
6196
6203
  "id": "components-tag--colors",
6197
6204
  "name": "Colors",
@@ -6987,6 +6994,6 @@
6987
6994
  },
6988
6995
  "meta": {
6989
6996
  "docgen": "react-component-meta",
6990
- "durationMs": 4234
6997
+ "durationMs": 3698
6991
6998
  }
6992
6999
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.25.1",
3
+ "version": "0.25.3",
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",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import { Table as t } from "../table/index.js";
4
- import { Pagination as n } from "../pagination/pagination.js";
3
+ import { Pagination as t } from "../pagination/pagination.js";
4
+ import { Table as n } from "../table/index.js";
5
5
  import { IconArrowUpward as r, IconSwapVert as i } from "./icons.js";
6
6
  import { tv as a } from "tailwind-variants";
7
7
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -57,24 +57,24 @@ var b = a({
57
57
  left: "justify-start"
58
58
  }
59
59
  }
60
- }), S = (e) => !!e.closest("a, button, [role=\"menu\"]"), C = ({ children: n = /* @__PURE__ */ s(w, {}), size: a = "md", sticky: u = "header", embed: d = !0, enclosed: f = !1 }) => {
60
+ }), S = (e) => !!e.closest("a, button, [role=\"menu\"]"), C = ({ children: t = /* @__PURE__ */ s(w, {}), size: a = "md", sticky: u = "header", embed: d = !0, enclosed: f = !1 }) => {
61
61
  let { table: m, isLoading: h, scrollRef: g, onRowClick: v, rowHref: y, linkComponent: C } = _(), T = m.getAllColumns().length;
62
62
  return /* @__PURE__ */ s("div", {
63
63
  "data-slot": "data-table-loading-overlay",
64
64
  className: e("flex min-h-0 flex-1 flex-col transition-opacity duration-150", h && "opacity-50"),
65
- children: /* @__PURE__ */ c(t.Root, {
65
+ children: /* @__PURE__ */ c(n.Root, {
66
66
  size: a,
67
67
  sticky: u,
68
68
  embed: d,
69
69
  enclosed: f,
70
70
  ref: g,
71
- children: [/* @__PURE__ */ s(t.Head, { children: m.getHeaderGroups().map((e) => /* @__PURE__ */ s(t.Row, { children: e.headers.map((e) => {
72
- let n = e.column.columnDef.meta, a = e.column.getCanSort(), l = e.column.getIsSorted(), u = n?.style?.textAlign === "right" || n?.className?.includes("text-right") ? "right" : "left", d = e.isPlaceholder ? null : /* @__PURE__ */ c(o, { children: [p(e.column.columnDef.header, e.getContext()), a && /* @__PURE__ */ s("span", {
71
+ children: [/* @__PURE__ */ s(n.Head, { children: m.getHeaderGroups().map((e) => /* @__PURE__ */ s(n.Row, { children: e.headers.map((e) => {
72
+ let t = e.column.columnDef.meta, a = e.column.getCanSort(), l = e.column.getIsSorted(), u = t?.style?.textAlign === "right" || t?.className?.includes("text-right") ? "right" : "left", d = e.isPlaceholder ? null : /* @__PURE__ */ c(o, { children: [p(e.column.columnDef.header, e.getContext()), a && /* @__PURE__ */ s("span", {
73
73
  className: "size-4",
74
74
  children: l ? /* @__PURE__ */ s(r, { className: b({ direction: l }) }) : /* @__PURE__ */ s(i, { className: "size-4" })
75
75
  })] });
76
- return /* @__PURE__ */ s(t.Header, {
77
- ...n,
76
+ return /* @__PURE__ */ s(n.Header, {
77
+ ...t,
78
78
  "aria-sort": a ? l === "asc" ? "ascending" : l === "desc" ? "descending" : "none" : void 0,
79
79
  children: a ? /* @__PURE__ */ s("button", {
80
80
  type: "button",
@@ -93,18 +93,18 @@ var b = a({
93
93
  children: d
94
94
  })
95
95
  }, e.id);
96
- }) }, e.id)) }), /* @__PURE__ */ s(t.Body, { children: m.getRowModel().rows.length ? m.getRowModel().rows.map((n) => {
97
- let r = y?.(n.original), i = !!v || !!r;
98
- return /* @__PURE__ */ s(l, { children: /* @__PURE__ */ s(t.Row, {
96
+ }) }, e.id)) }), /* @__PURE__ */ s(n.Body, { children: m.getRowModel().rows.length ? m.getRowModel().rows.map((t) => {
97
+ let r = y?.(t.original), i = !!v || !!r;
98
+ return /* @__PURE__ */ s(l, { children: /* @__PURE__ */ s(n.Row, {
99
99
  className: e("has-aria-expanded:bg-bg-default-base-secondary", i && "cursor-pointer"),
100
100
  onClick: i ? (e) => {
101
- S(e.target) || !e.currentTarget.contains(e.target) || (v ? v(n.original) : r && e.currentTarget.querySelector("[data-row-link]")?.click());
101
+ S(e.target) || !e.currentTarget.contains(e.target) || (v ? v(t.original) : r && e.currentTarget.querySelector("[data-row-link]")?.click());
102
102
  } : void 0,
103
- children: n.getVisibleCells().map((e, n) => {
103
+ children: t.getVisibleCells().map((e, t) => {
104
104
  let i = e.column.columnDef.meta;
105
- return /* @__PURE__ */ c(t.Cell, {
105
+ return /* @__PURE__ */ c(n.Cell, {
106
106
  ...i,
107
- children: [n === 0 && r && /* @__PURE__ */ s(C, {
107
+ children: [t === 0 && r && /* @__PURE__ */ s(C, {
108
108
  href: r,
109
109
  "data-row-link": !0,
110
110
  className: "hidden",
@@ -113,13 +113,13 @@ var b = a({
113
113
  }), p(e.column.columnDef.cell, e.getContext())]
114
114
  }, e.id);
115
115
  })
116
- }) }, n.id);
117
- }) : h ? null : /* @__PURE__ */ s(t.Row, { children: /* @__PURE__ */ s(t.Cell, {
116
+ }) }, t.id);
117
+ }) : h ? null : /* @__PURE__ */ s(n.Row, { children: /* @__PURE__ */ s(n.Cell, {
118
118
  colSpan: T,
119
119
  children: /* @__PURE__ */ s("div", {
120
120
  "data-slot": "table-empty-state",
121
121
  className: "whitespace-normal",
122
- children: n
122
+ children: t
123
123
  })
124
124
  }) }) })]
125
125
  })
@@ -139,11 +139,11 @@ var w = () => /* @__PURE__ */ s("div", {
139
139
  });
140
140
  T.displayName = "DataTable.Footer";
141
141
  var E = (e) => {
142
- let { scrollRef: t } = _();
143
- return /* @__PURE__ */ s(n, {
142
+ let { scrollRef: n } = _();
143
+ return /* @__PURE__ */ s(t, {
144
144
  ...e,
145
- onPageChange: (n) => {
146
- t.current?.scrollTo({ top: 0 }), e.onPageChange(n);
145
+ onPageChange: (t) => {
146
+ n.current?.scrollTo({ top: 0 }), e.onPageChange(t);
147
147
  }
148
148
  });
149
149
  };
@@ -1,144 +1,5 @@
1
1
  export { useDataTable } from './data-table';
2
2
  export type { DataTableColumnMeta, PaginationState } from './data-table';
3
- /**
4
- * @deprecated Import from `@agentero/design-system/table` instead — that entry
5
- * point carries no `@tanstack/react-table` dependency.
6
- */
7
- export declare const Table: {
8
- Root: {
9
- ({ children, ref, ...variants }: import('react').PropsWithChildren<import('.').TableRootProps>): import("react/jsx-runtime").JSX.Element;
10
- displayName: string;
11
- };
12
- Head: {
13
- ({ children, ...props }: import('react').PropsWithChildren<import('react').HTMLAttributes<HTMLTableSectionElement>>): import("react/jsx-runtime").JSX.Element;
14
- displayName: string;
15
- };
16
- Body: {
17
- ({ children, ...props }: import('react').PropsWithChildren<import('react').HTMLAttributes<HTMLTableSectionElement>>): import("react/jsx-runtime").JSX.Element;
18
- displayName: string;
19
- };
20
- Row: {
21
- ({ className, ...props }: import('react').ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
22
- displayName: string;
23
- };
24
- Header: {
25
- ({ className, ...props }: import('react').PropsWithChildren<import('react').HTMLAttributes<HTMLTableCellElement>>): import("react/jsx-runtime").JSX.Element;
26
- displayName: string;
27
- };
28
- Cell: {
29
- ({ className, ...props }: import('react').PropsWithChildren<import('react').TdHTMLAttributes<HTMLTableCellElement>>): import("react/jsx-runtime").JSX.Element;
30
- displayName: string;
31
- };
32
- ExpandButton: {
33
- ({ toggleExpanded, isExpanded, className, ...props }: {
34
- toggleExpanded: () => void;
35
- isExpanded: boolean;
36
- } & {
37
- children?: import('react').ReactNode;
38
- variant?: import('../button').ButtonVariantType;
39
- size?: import('../button').ButtonSizeType;
40
- status?: "danger";
41
- loading?: boolean;
42
- disabled?: boolean;
43
- iconOnly?: boolean;
44
- rounded?: boolean;
45
- align?: "center" | "start" | "end" | "justify";
46
- fitContent?: boolean;
47
- ref?: import('react').Ref<HTMLButtonElement | HTMLAnchorElement>;
48
- } & import('react').ButtonHTMLAttributes<HTMLButtonElement> & {
49
- asChild?: boolean;
50
- }): import("react/jsx-runtime").JSX.Element;
51
- displayName: string;
52
- };
53
- ExpandedRow: {
54
- ({ className, ...props }: import('react').PropsWithChildren<import('react').HTMLAttributes<HTMLTableRowElement>>): import("react/jsx-runtime").JSX.Element;
55
- displayName: string;
56
- };
57
- RowActions: {
58
- ({ children }: import('react').PropsWithChildren): import("react/jsx-runtime").JSX.Element;
59
- displayName: string;
60
- };
61
- };
62
- /**
63
- * @deprecated Import from `@agentero/design-system/table` instead.
64
- */
65
- export declare const tableRecipe: import('tailwind-variants').TVReturnType<{
66
- size: {
67
- sm: {};
68
- md: {};
69
- lg: {};
70
- };
71
- embed: {
72
- true: {
73
- root: string;
74
- };
75
- };
76
- enclosed: {
77
- true: {
78
- root: string;
79
- };
80
- };
81
- sticky: {
82
- header: {};
83
- headerAndFooter: {};
84
- };
85
- }, {
86
- root: string[];
87
- scroll: string;
88
- table: string;
89
- }, undefined, {
90
- size: {
91
- sm: {};
92
- md: {};
93
- lg: {};
94
- };
95
- embed: {
96
- true: {
97
- root: string;
98
- };
99
- };
100
- enclosed: {
101
- true: {
102
- root: string;
103
- };
104
- };
105
- sticky: {
106
- header: {};
107
- headerAndFooter: {};
108
- };
109
- }, {
110
- root: string[];
111
- scroll: string;
112
- table: string;
113
- }, import('tailwind-variants').TVReturnType<{
114
- size: {
115
- sm: {};
116
- md: {};
117
- lg: {};
118
- };
119
- embed: {
120
- true: {
121
- root: string;
122
- };
123
- };
124
- enclosed: {
125
- true: {
126
- root: string;
127
- };
128
- };
129
- sticky: {
130
- header: {};
131
- headerAndFooter: {};
132
- };
133
- }, {
134
- root: string[];
135
- scroll: string;
136
- table: string;
137
- }, undefined, unknown, unknown, undefined>>;
138
- /**
139
- * @deprecated Import from `@agentero/design-system/table` instead.
140
- */
141
- export type { TableRootProps } from '../table';
142
3
  export declare const DataTable: {
143
4
  Root: {
144
5
  <TData extends import('@tanstack/table-core').RowData>({ children, isLoading, onRowClick, rowHref, linkComponent, ...tableOptions }: import('react').PropsWithChildren<{
@@ -239,10 +100,10 @@ export declare const DataTable: {
239
100
  };
240
101
  Table: {
241
102
  ({ children, size, sticky, embed, enclosed }: {
242
- size?: import('.').TableRootProps["size"];
243
- sticky?: import('.').TableRootProps["sticky"];
244
- embed?: import('.').TableRootProps["embed"];
245
- enclosed?: import('.').TableRootProps["enclosed"];
103
+ size?: import('../table').TableRootProps["size"];
104
+ sticky?: import('../table').TableRootProps["sticky"];
105
+ embed?: import('../table').TableRootProps["embed"];
106
+ enclosed?: import('../table').TableRootProps["enclosed"];
246
107
  } & {
247
108
  children?: import('react').ReactNode | undefined;
248
109
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,11 @@
1
- import { tableRecipe as e } from "../table/table.js";
2
- import { Table as t } from "../table/index.js";
3
- import { DataTablePagination as n, DataTableTable as r, Footer as i, Root as a, ToolBar as o, useDataTable as s } from "./data-table.js";
1
+ import { DataTablePagination as e, DataTableTable as t, Footer as n, Root as r, ToolBar as i, useDataTable as a } from "./data-table.js";
4
2
  //#region src/data-table/index.ts
5
- var c = t, l = e, u = {
6
- Root: a,
7
- ToolBar: o,
8
- Table: r,
9
- Footer: i,
10
- Pagination: n
3
+ var o = {
4
+ Root: r,
5
+ ToolBar: i,
6
+ Table: t,
7
+ Footer: n,
8
+ Pagination: e
11
9
  };
12
10
  //#endregion
13
- export { u as DataTable, c as Table, l as tableRecipe, s as useDataTable };
11
+ export { o as DataTable, a as useDataTable };
package/src/tag/tag.js CHANGED
@@ -8,7 +8,7 @@ var s = t({
8
8
  base: [
9
9
  "inline-flex w-fit min-w-fit items-center gap-1",
10
10
  "rounded-md border border-solid border-transparent px-2",
11
- "font-normal leading-normal no-underline",
11
+ "font-normal leading-normal whitespace-nowrap no-underline",
12
12
  "transition-[background-color,opacity] duration-200",
13
13
  "[&_svg]:size-3.5 [&_svg]:shrink-0"
14
14
  ],
@@ -35,7 +35,7 @@ var s = t({
35
35
  md: "h-8 text-sm"
36
36
  },
37
37
  pill: { true: "rounded-full" },
38
- truncate: { true: "max-w-full min-w-0 overflow-hidden whitespace-nowrap" },
38
+ truncate: { true: "max-w-full min-w-0 overflow-hidden" },
39
39
  interactive: { true: "cursor-pointer" },
40
40
  hasOnlyIcon: { true: "justify-center px-0" }
41
41
  },