@agentero/design-system 0.24.1 → 0.24.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentero/design-system",
3
- "version": "0.24.1",
3
+ "version": "0.24.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",
@@ -17,6 +17,7 @@ export declare const modalRecipe: import('tailwind-variants').TVReturnType<{
17
17
  overlay: string[];
18
18
  content: string[];
19
19
  title: string;
20
+ description: string;
20
21
  body: string;
21
22
  footer: string;
22
23
  }, undefined, {
@@ -32,6 +33,7 @@ export declare const modalRecipe: import('tailwind-variants').TVReturnType<{
32
33
  overlay: string[];
33
34
  content: string[];
34
35
  title: string;
36
+ description: string;
35
37
  body: string;
36
38
  footer: string;
37
39
  }, import('tailwind-variants').TVReturnType<{
@@ -47,6 +49,7 @@ export declare const modalRecipe: import('tailwind-variants').TVReturnType<{
47
49
  overlay: string[];
48
50
  content: string[];
49
51
  title: string;
52
+ description: string;
50
53
  body: string;
51
54
  footer: string;
52
55
  }, undefined, unknown, unknown, undefined>>;
@@ -67,6 +70,7 @@ type ContentProps = ComponentProps<typeof DialogPrimitive.Content> & {
67
70
  variant?: ModalVariant;
68
71
  };
69
72
  type TitleProps = ComponentProps<typeof DialogPrimitive.Title>;
73
+ type DescriptionProps = ComponentProps<typeof DialogPrimitive.Description>;
70
74
  type BodyProps = ComponentProps<'div'>;
71
75
  type FooterProps = ComponentProps<'div'>;
72
76
  type CloseProps = ComponentProps<typeof DialogPrimitive.Close>;
@@ -77,9 +81,10 @@ type CloseProps = ComponentProps<typeof DialogPrimitive.Close>;
77
81
  * for free.
78
82
  *
79
83
  * Compose `Root` (open state) with `Content` (surface, `size` md/lg), and
80
- * fill it with `Title` (built-in X button), `Body` (scrollable), and `Footer`
81
- * (right-aligned actions). Open it controlled (`open`/`onOpenChange`) or via
82
- * `Trigger`; close from inside with `Close asChild` around your cancel button.
84
+ * fill it with `Title` (built-in X button), an optional `Description` right
85
+ * below it, `Body` (scrollable), and `Footer` (right-aligned actions). Open
86
+ * it controlled (`open`/`onOpenChange`) or via `Trigger`; close from inside
87
+ * with `Close asChild` around your cancel button.
83
88
  *
84
89
  * For a modal the user has to answer, pass `variant="alert"` to `Content`:
85
90
  * `Escape`, the overlay click and the X button all stop closing it, and it is
@@ -92,7 +97,7 @@ type CloseProps = ComponentProps<typeof DialogPrimitive.Close>;
92
97
  * <Modal.Root open={isOpen} onOpenChange={setIsOpen}>
93
98
  * <Modal.Content size="md">
94
99
  * <Modal.Title>Delete carrier</Modal.Title>
95
- * <Modal.Body>This action cannot be undone.</Modal.Body>
100
+ * <Modal.Description>This action cannot be undone.</Modal.Description>
96
101
  * <Modal.Footer>
97
102
  * <Modal.Close asChild>
98
103
  * <Button variant="ghost">Cancel</Button>
@@ -137,6 +142,10 @@ export declare const Modal: {
137
142
  ({ className, children, ...props }: TitleProps): import("react/jsx-runtime").JSX.Element;
138
143
  displayName: string;
139
144
  };
145
+ Description: {
146
+ ({ className, ...props }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
147
+ displayName: string;
148
+ };
140
149
  Body: {
141
150
  ({ className, ...props }: BodyProps): import("react/jsx-runtime").JSX.Element;
142
151
  displayName: string;
@@ -32,6 +32,7 @@ var d = o("dialog"), f = r({
32
32
  "motion-reduce:animate-none!"
33
33
  ],
34
34
  title: "flex items-center justify-between gap-2 px-10 text-[1.375rem] leading-7 font-semibold text-text-default-base-primary",
35
+ description: "-mt-4 px-10 text-base text-text-default-base-primary",
35
36
  body: "-my-1 max-h-[60vh] overflow-y-auto px-10 py-1",
36
37
  footer: "flex shrink-0 items-center justify-end gap-4 px-10"
37
38
  },
@@ -50,7 +51,6 @@ var d = o("dialog"), f = r({
50
51
  }), /* @__PURE__ */ i(c.Content, {
51
52
  "data-slot": "modal-content",
52
53
  role: m ? "alertdialog" : "dialog",
53
- "aria-describedby": void 0,
54
54
  className: e(p.content(), t),
55
55
  onEscapeKeyDown: (e) => {
56
56
  s?.(e), m && e.preventDefault();
@@ -85,32 +85,39 @@ var h = ({ className: e, children: r, ...o }) => {
85
85
  });
86
86
  };
87
87
  h.displayName = "Modal.Title";
88
- var g = ({ className: e, ...t }) => /* @__PURE__ */ i("div", {
88
+ var g = ({ className: e, ...t }) => /* @__PURE__ */ i(c.Description, {
89
+ "data-slot": "modal-description",
90
+ className: p.description({ className: e }),
91
+ ...t
92
+ });
93
+ g.displayName = "Modal.Description";
94
+ var _ = ({ className: e, ...t }) => /* @__PURE__ */ i("div", {
89
95
  "data-slot": "modal-body",
90
96
  tabIndex: 0,
91
97
  className: p.body({ className: e }),
92
98
  ...t
93
99
  });
94
- g.displayName = "Modal.Body";
95
- var _ = ({ className: e, ...t }) => /* @__PURE__ */ i("div", {
100
+ _.displayName = "Modal.Body";
101
+ var v = ({ className: e, ...t }) => /* @__PURE__ */ i("div", {
96
102
  "data-slot": "modal-footer",
97
103
  className: p.footer({ className: e }),
98
104
  ...t
99
105
  });
100
- _.displayName = "Modal.Footer";
101
- var v = (e) => /* @__PURE__ */ i(c.Close, {
106
+ v.displayName = "Modal.Footer";
107
+ var y = (e) => /* @__PURE__ */ i(c.Close, {
102
108
  "data-slot": "modal-close",
103
109
  ...e
104
110
  });
105
- v.displayName = "Modal.Close";
106
- var y = {
111
+ y.displayName = "Modal.Close";
112
+ var b = {
107
113
  Root: l,
108
114
  Trigger: u,
109
115
  Content: m,
110
116
  Title: h,
111
- Body: g,
112
- Footer: _,
113
- Close: v
117
+ Description: g,
118
+ Body: _,
119
+ Footer: v,
120
+ Close: y
114
121
  };
115
122
  //#endregion
116
- export { y as Modal, f as modalRecipe };
123
+ export { b as Modal, f as modalRecipe };
@@ -1,2 +1,24 @@
1
- export { Tabs, tabsRecipe } from './tabs';
1
+ export { tabsRecipe } from './tabs';
2
2
  export type { TabsRootProps, TabsListProps, TabsTriggerProps, TabsContentProps, TabsLabelProps } from './tabs';
3
+ export declare const Tabs: {
4
+ Root: {
5
+ ({ className, variant, position, ...props }: import('./tabs').TabsRootProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ List: {
9
+ ({ className, ...props }: import('./tabs').TabsListProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ Trigger: {
13
+ ({ className, ...props }: import('./tabs').TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ Content: {
17
+ ({ className, ...props }: import('./tabs').TabsContentProps): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ Label: {
21
+ ({ className, variant, ...props }: import('./tabs').TabsLabelProps): import("react/jsx-runtime").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ };
package/src/tabs/index.js CHANGED
@@ -1,2 +1,11 @@
1
- import { Tabs as e, tabsRecipe as t } from "./tabs.js";
2
- export { e as Tabs, t as tabsRecipe };
1
+ import { Content as e, Label as t, List as n, Root as r, Trigger as i, tabsRecipe as a } from "./tabs.js";
2
+ //#region src/tabs/index.ts
3
+ var o = {
4
+ Root: r,
5
+ List: n,
6
+ Trigger: i,
7
+ Content: e,
8
+ Label: t
9
+ };
10
+ //#endregion
11
+ export { o as Tabs, a as tabsRecipe };
@@ -106,37 +106,72 @@ export declare const tabsRecipe: import('tailwind-variants').TVReturnType<{
106
106
  }, undefined, unknown, unknown, undefined>>;
107
107
  type TabsVariants = VariantProps<typeof tabsRecipe>;
108
108
  export type TabsRootProps = ComponentProps<typeof TabsPrimitive.Root> & TabsVariants;
109
+ /**
110
+ * Root of a set of tabs, built on Radix UI's Tabs so keyboard nav, roving focus
111
+ * and ARIA come for free. Owns the selected tab (controlled via `value`/
112
+ * `onValueChange` or uncontrolled via `defaultValue`) and wraps `List` and
113
+ * `Content`s. `variant` picks the look — `line` (default) underlines the active
114
+ * tab, `enclosed` renders segmented pills, `button` renders button-like tabs.
115
+ *
116
+ * @summary Root provider for a Tabs group
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * import { Tabs } from '@agentero/design-system/tabs';
121
+ *
122
+ * <Tabs.Root defaultValue="overview">
123
+ * <Tabs.List>
124
+ * <Tabs.Trigger value="overview">Overview</Tabs.Trigger>
125
+ * <Tabs.Trigger value="activity">Activity</Tabs.Trigger>
126
+ * </Tabs.List>
127
+ * <Tabs.Content value="overview">…</Tabs.Content>
128
+ * <Tabs.Content value="activity">…</Tabs.Content>
129
+ * </Tabs.Root>
130
+ * ```
131
+ */
132
+ export declare const Root: {
133
+ ({ className, variant, position, ...props }: TabsRootProps): import("react/jsx-runtime").JSX.Element;
134
+ displayName: string;
135
+ };
109
136
  export type TabsListProps = ComponentProps<typeof TabsPrimitive.List>;
137
+ export declare const List: {
138
+ ({ className, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
139
+ displayName: string;
140
+ };
110
141
  export type TabsTriggerProps = ComponentProps<typeof TabsPrimitive.Trigger>;
142
+ export declare const Trigger: {
143
+ ({ className, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
144
+ displayName: string;
145
+ };
111
146
  export type TabsContentProps = ComponentProps<typeof TabsPrimitive.Content>;
147
+ export declare const Content: {
148
+ ({ className, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element;
149
+ displayName: string;
150
+ };
112
151
  export type TabsLabelProps = ComponentProps<'span'> & {
113
152
  variant?: TabsVariants['variant'];
114
153
  };
115
154
  /**
116
- * Tabs built on Radix UI's Tabs (keyboard nav, roving focus and ARIA come for
117
- * free). Compose `Root` with a `List` of `Trigger`s and matching `Content`s,
118
- * pairing each `Trigger`/`Content` by `value`.
155
+ * Non-interactive heading with the exact look of an inactive `Trigger`: it
156
+ * renders the trigger styles without the active data-state, and
157
+ * `pointer-events-none` keeps the hover styles from firing. Use it when a
158
+ * panel keeps the tab row's visual language but has a single, non-selectable
159
+ * title — a lone tab would announce a selectable control that isn't one.
160
+ * Inside a `Root` it picks up the group's variant; standalone, pass `variant`.
161
+ * It renders a plain `span` — wrap it in a heading element when the title
162
+ * needs heading semantics.
163
+ *
164
+ * @summary Text styled as an inactive tab trigger
165
+ *
166
+ * @example
167
+ * ```tsx
168
+ * <h2>
169
+ * <Tabs.Label>Shared coverages</Tabs.Label>
170
+ * </h2>
171
+ * ```
119
172
  */
120
- export declare const Tabs: {
121
- Root: {
122
- ({ className, variant, position, ...props }: TabsRootProps): import("react/jsx-runtime").JSX.Element;
123
- displayName: string;
124
- };
125
- List: {
126
- ({ className, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
127
- displayName: string;
128
- };
129
- Trigger: {
130
- ({ className, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
131
- displayName: string;
132
- };
133
- Content: {
134
- ({ className, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element;
135
- displayName: string;
136
- };
137
- Label: {
138
- ({ className, variant, ...props }: TabsLabelProps): import("react/jsx-runtime").JSX.Element;
139
- displayName: string;
140
- };
173
+ export declare const Label: {
174
+ ({ className, variant, ...props }: TabsLabelProps): import("react/jsx-runtime").JSX.Element;
175
+ displayName: string;
141
176
  };
142
177
  export {};
package/src/tabs/tabs.js CHANGED
@@ -109,12 +109,5 @@ var p = ({ className: t, variant: r, ...a }) => /* @__PURE__ */ n("span", {
109
109
  ...a
110
110
  });
111
111
  p.displayName = "Tabs.Label";
112
- var m = {
113
- Root: l,
114
- List: u,
115
- Trigger: d,
116
- Content: f,
117
- Label: p
118
- };
119
112
  //#endregion
120
- export { m as Tabs, o as tabsRecipe };
113
+ export { f as Content, p as Label, u as List, l as Root, d as Trigger, o as tabsRecipe };