@agentero/design-system 0.24.2 → 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/mcp/manifests/components.html +28 -3
- package/mcp/manifests/components.json +1 -1
- package/package.json +1 -1
- package/src/modal/modal.d.ts +13 -4
- package/src/modal/modal.js +19 -12
package/package.json
CHANGED
package/src/modal/modal.d.ts
CHANGED
|
@@ -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),
|
|
81
|
-
* (right-aligned actions). Open
|
|
82
|
-
* `Trigger`; close from inside
|
|
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.
|
|
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;
|
package/src/modal/modal.js
CHANGED
|
@@ -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(
|
|
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
|
-
|
|
95
|
-
var
|
|
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
|
-
|
|
101
|
-
var
|
|
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
|
-
|
|
106
|
-
var
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
Description: g,
|
|
118
|
+
Body: _,
|
|
119
|
+
Footer: v,
|
|
120
|
+
Close: y
|
|
114
121
|
};
|
|
115
122
|
//#endregion
|
|
116
|
-
export {
|
|
123
|
+
export { b as Modal, f as modalRecipe };
|