@agentero/design-system 0.3.0 → 0.4.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.
- package/mcp/manifests/components.html +578 -19
- package/mcp/manifests/components.json +1 -1
- package/package.json +5 -1
- package/src/alert/alert.d.ts +248 -0
- package/src/alert/alert.js +311 -0
- package/src/alert/icons.d.ts +39 -0
- package/src/alert/icons.js +53 -0
- package/src/alert/index.d.ts +1 -0
- package/src/alert/index.js +2 -0
- package/src/avatar/avatar.js +18 -18
- package/src/button/button.js +6 -6
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Button as t } from "../button/button.js";
|
|
4
|
+
import { IconCheckCircle as n, IconClose as r, IconErrorOutline as i, IconInfoOutline as a, IconStar as o, IconWarning as s } from "./icons.js";
|
|
5
|
+
import { Children as c, createContext as l, isValidElement as u, use as d, useId as f } from "react";
|
|
6
|
+
import { tv as p } from "tailwind-variants";
|
|
7
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
8
|
+
//#region src/alert/alert.tsx
|
|
9
|
+
var g = p({
|
|
10
|
+
slots: {
|
|
11
|
+
root: [
|
|
12
|
+
"flex items-start rounded-md",
|
|
13
|
+
"[&_[data-slot=alert-title]]:-mt-px",
|
|
14
|
+
"[&_a]:text-current [&_a]:fill-current [&_a]:underline [&_a:hover]:no-underline"
|
|
15
|
+
],
|
|
16
|
+
title: "font-semibold",
|
|
17
|
+
paragraph: "",
|
|
18
|
+
content: "flex flex-col h-full self-start",
|
|
19
|
+
icon: "[&_path]:fill-current"
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
color: {
|
|
23
|
+
neutral: {},
|
|
24
|
+
success: {},
|
|
25
|
+
danger: {},
|
|
26
|
+
warning: {},
|
|
27
|
+
info: {},
|
|
28
|
+
creative: {},
|
|
29
|
+
dynamic: {},
|
|
30
|
+
playful: {}
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
sm: {
|
|
34
|
+
root: "px-4 py-3 gap-2",
|
|
35
|
+
title: "text-sm",
|
|
36
|
+
paragraph: "text-xs",
|
|
37
|
+
content: "gap-1",
|
|
38
|
+
icon: "size-5"
|
|
39
|
+
},
|
|
40
|
+
md: {
|
|
41
|
+
root: "px-8 py-6 gap-4",
|
|
42
|
+
title: "text-lg",
|
|
43
|
+
paragraph: "text-sm",
|
|
44
|
+
content: "gap-2",
|
|
45
|
+
icon: "size-6"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
ghost: {
|
|
49
|
+
true: { root: "bg-transparent p-0" },
|
|
50
|
+
false: {}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
compoundVariants: [
|
|
54
|
+
{
|
|
55
|
+
ghost: !1,
|
|
56
|
+
color: "neutral",
|
|
57
|
+
class: {
|
|
58
|
+
root: "bg-bg-alert-primary-neutral text-text-alert-primary-neutral",
|
|
59
|
+
icon: "text-icon-alert-primary-neutral"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
ghost: !1,
|
|
64
|
+
color: "success",
|
|
65
|
+
class: {
|
|
66
|
+
root: "bg-bg-alert-primary-success text-text-alert-primary-success",
|
|
67
|
+
icon: "text-icon-alert-primary-success"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
ghost: !1,
|
|
72
|
+
color: "danger",
|
|
73
|
+
class: {
|
|
74
|
+
root: "bg-bg-alert-primary-danger text-text-alert-primary-danger",
|
|
75
|
+
icon: "text-icon-alert-primary-danger"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
ghost: !1,
|
|
80
|
+
color: "warning",
|
|
81
|
+
class: {
|
|
82
|
+
root: "bg-bg-alert-primary-warning text-text-alert-primary-warning",
|
|
83
|
+
icon: "text-icon-alert-primary-warning"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
ghost: !1,
|
|
88
|
+
color: "info",
|
|
89
|
+
class: {
|
|
90
|
+
root: "bg-bg-alert-primary-info text-text-alert-primary-info",
|
|
91
|
+
icon: "text-icon-alert-primary-info"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
ghost: !1,
|
|
96
|
+
color: "creative",
|
|
97
|
+
class: {
|
|
98
|
+
root: "bg-bg-alert-primary-creative text-text-alert-primary-creative",
|
|
99
|
+
icon: "text-icon-alert-primary-creative"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
ghost: !1,
|
|
104
|
+
color: "dynamic",
|
|
105
|
+
class: {
|
|
106
|
+
root: "bg-bg-alert-primary-dynamic text-text-alert-primary-dynamic",
|
|
107
|
+
icon: "text-icon-alert-primary-dynamic"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
ghost: !1,
|
|
112
|
+
color: "playful",
|
|
113
|
+
class: {
|
|
114
|
+
root: "bg-bg-alert-primary-playful text-text-alert-primary-playful",
|
|
115
|
+
icon: "text-icon-alert-primary-playful"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
ghost: !0,
|
|
120
|
+
color: "neutral",
|
|
121
|
+
class: {
|
|
122
|
+
root: "text-text-alert-ghost-neutral",
|
|
123
|
+
icon: "text-icon-alert-ghost-neutral"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
ghost: !0,
|
|
128
|
+
color: "success",
|
|
129
|
+
class: {
|
|
130
|
+
root: "text-text-alert-ghost-success",
|
|
131
|
+
icon: "text-icon-alert-ghost-success"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
ghost: !0,
|
|
136
|
+
color: "danger",
|
|
137
|
+
class: {
|
|
138
|
+
root: "text-text-alert-ghost-danger",
|
|
139
|
+
icon: "text-icon-alert-ghost-danger"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
ghost: !0,
|
|
144
|
+
color: "warning",
|
|
145
|
+
class: {
|
|
146
|
+
root: "text-text-alert-ghost-warning",
|
|
147
|
+
icon: "text-icon-alert-ghost-warning"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
ghost: !0,
|
|
152
|
+
color: "info",
|
|
153
|
+
class: {
|
|
154
|
+
root: "text-text-alert-ghost-info",
|
|
155
|
+
icon: "text-icon-alert-ghost-info"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
ghost: !0,
|
|
160
|
+
color: "creative",
|
|
161
|
+
class: {
|
|
162
|
+
root: "text-text-alert-ghost-creative",
|
|
163
|
+
icon: "text-icon-alert-ghost-creative"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
ghost: !0,
|
|
168
|
+
color: "dynamic",
|
|
169
|
+
class: {
|
|
170
|
+
root: "text-text-alert-ghost-dynamic",
|
|
171
|
+
icon: "text-icon-alert-ghost-dynamic"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
ghost: !0,
|
|
176
|
+
color: "playful",
|
|
177
|
+
class: {
|
|
178
|
+
root: "text-text-alert-ghost-playful",
|
|
179
|
+
icon: "text-icon-alert-ghost-playful"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
size: "sm",
|
|
184
|
+
class: { root: "[&:not(:has([data-slot=alert-title]))_[data-slot=alert-paragraph]:first-of-type]:mt-0.5" }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
size: "md",
|
|
188
|
+
class: { root: "[&:not(:has([data-slot=alert-title]))_[data-slot=alert-paragraph]:first-of-type]:mt-px" }
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
defaultVariants: {
|
|
192
|
+
color: "neutral",
|
|
193
|
+
size: "sm",
|
|
194
|
+
ghost: !1
|
|
195
|
+
}
|
|
196
|
+
}), _ = l(null), v = () => {
|
|
197
|
+
let e = d(_);
|
|
198
|
+
if (!e) throw Error("useAlert must be used within an Alert");
|
|
199
|
+
return e;
|
|
200
|
+
}, y = {
|
|
201
|
+
neutral: a,
|
|
202
|
+
success: n,
|
|
203
|
+
danger: i,
|
|
204
|
+
warning: s,
|
|
205
|
+
info: a,
|
|
206
|
+
creative: o,
|
|
207
|
+
dynamic: a,
|
|
208
|
+
playful: a
|
|
209
|
+
}, b = ({ className: t, children: n, ...r }) => {
|
|
210
|
+
let { slotsStyles: i, titleId: a } = v();
|
|
211
|
+
return /* @__PURE__ */ m("h3", {
|
|
212
|
+
id: a,
|
|
213
|
+
"data-slot": "alert-title",
|
|
214
|
+
...r,
|
|
215
|
+
className: e(i.title(), t),
|
|
216
|
+
children: n
|
|
217
|
+
});
|
|
218
|
+
}, x = ({ className: t, children: n, ...r }) => {
|
|
219
|
+
let { slotsStyles: i } = v();
|
|
220
|
+
return /* @__PURE__ */ m("p", {
|
|
221
|
+
"data-slot": "alert-paragraph",
|
|
222
|
+
...r,
|
|
223
|
+
className: e(i.paragraph(), t),
|
|
224
|
+
children: n
|
|
225
|
+
});
|
|
226
|
+
}, S = ({ html: t, className: n, ...r }) => {
|
|
227
|
+
let { slotsStyles: i } = v();
|
|
228
|
+
return /* @__PURE__ */ m("div", {
|
|
229
|
+
"data-slot": "alert-paragraph",
|
|
230
|
+
...r,
|
|
231
|
+
className: e(i.paragraph(), n),
|
|
232
|
+
dangerouslySetInnerHTML: { __html: t }
|
|
233
|
+
});
|
|
234
|
+
}, C = ({ className: t, children: n, ...r }) => {
|
|
235
|
+
let { slotsStyles: i } = v();
|
|
236
|
+
return /* @__PURE__ */ m("div", {
|
|
237
|
+
"data-slot": "alert-content",
|
|
238
|
+
...r,
|
|
239
|
+
className: e(i.content(), t),
|
|
240
|
+
children: n
|
|
241
|
+
});
|
|
242
|
+
}, w = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m("div", {
|
|
243
|
+
"data-slot": "alert-actions",
|
|
244
|
+
...r,
|
|
245
|
+
className: e("ml-auto flex flex-col items-center justify-center gap-2", t),
|
|
246
|
+
children: n
|
|
247
|
+
}), T = ({ className: t, children: n, ...r }) => /* @__PURE__ */ m("div", {
|
|
248
|
+
...r,
|
|
249
|
+
className: e("[&_svg]:h-16! [&_svg]:w-16!", t),
|
|
250
|
+
children: n
|
|
251
|
+
}), E = ({ className: n, ...r }) => /* @__PURE__ */ m(t, {
|
|
252
|
+
variant: "link",
|
|
253
|
+
className: e("text-current", n),
|
|
254
|
+
...r
|
|
255
|
+
}), D = (e, t) => c.toArray(e).some((e) => {
|
|
256
|
+
if (!u(e)) return !1;
|
|
257
|
+
if (e.type === t) return !0;
|
|
258
|
+
let n = e.props.children;
|
|
259
|
+
return n ? D(n, t) : !1;
|
|
260
|
+
}), O = ({ children: n, onDismiss: i, hasIcon: a = !0, icon: o, color: s = "neutral", size: c = "sm", ghost: l = !1, className: u, ...d }) => {
|
|
261
|
+
let p = g({
|
|
262
|
+
color: s,
|
|
263
|
+
size: c,
|
|
264
|
+
ghost: l
|
|
265
|
+
}), v = f(), C = `${v}-title`, w = `${v}-desc`, T = D(n, b), E = D(n, x) || D(n, S), O = o ?? y[s], k = o ? !0 : a;
|
|
266
|
+
return /* @__PURE__ */ m(_, {
|
|
267
|
+
value: {
|
|
268
|
+
size: c,
|
|
269
|
+
slotsStyles: p,
|
|
270
|
+
titleId: C,
|
|
271
|
+
descId: w
|
|
272
|
+
},
|
|
273
|
+
children: /* @__PURE__ */ h("div", {
|
|
274
|
+
role: "alert",
|
|
275
|
+
"aria-labelledby": T ? C : void 0,
|
|
276
|
+
"aria-describedby": E ? w : void 0,
|
|
277
|
+
"data-slot": "alert-root",
|
|
278
|
+
...d,
|
|
279
|
+
className: e(p.root(), u),
|
|
280
|
+
children: [
|
|
281
|
+
i && /* @__PURE__ */ m("div", {
|
|
282
|
+
className: e("order-last ml-auto self-center", {
|
|
283
|
+
"pl-2.5": c === "sm",
|
|
284
|
+
"pl-0.5": c === "md"
|
|
285
|
+
}),
|
|
286
|
+
children: /* @__PURE__ */ m(t, {
|
|
287
|
+
variant: "ghost",
|
|
288
|
+
size: c,
|
|
289
|
+
iconOnly: !0,
|
|
290
|
+
"aria-label": "Dismiss",
|
|
291
|
+
className: "text-current",
|
|
292
|
+
onClick: i,
|
|
293
|
+
children: /* @__PURE__ */ m(r, { className: "[&_path]:fill-current" })
|
|
294
|
+
})
|
|
295
|
+
}),
|
|
296
|
+
k && /* @__PURE__ */ m(O, {
|
|
297
|
+
className: p.icon(),
|
|
298
|
+
"data-slot": "alert-icon"
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ m("div", {
|
|
301
|
+
id: w,
|
|
302
|
+
className: "flex w-full items-center gap-10",
|
|
303
|
+
children: n
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
})
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
O.Title = b, O.Paragraph = x, O.ParagraphHtml = S, O.Content = C, O.Actions = w, O.Button = E, O.Pictograms = T;
|
|
310
|
+
//#endregion
|
|
311
|
+
export { O as Alert };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Filled check-circle icon used for success-color alerts. Inherits color
|
|
4
|
+
* from the surrounding text via `currentColor` when paired with Tailwind's
|
|
5
|
+
* `fill-current` utility on the `<path>`.
|
|
6
|
+
*
|
|
7
|
+
* @summary 24px check-circle icon for success alerts
|
|
8
|
+
*/
|
|
9
|
+
export declare const IconCheckCircle: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Close (X) icon used for the Alert dismiss button.
|
|
12
|
+
*
|
|
13
|
+
* @summary 24px close icon for dismissing alerts
|
|
14
|
+
*/
|
|
15
|
+
export declare const IconClose: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Outlined error icon used for danger-color alerts.
|
|
18
|
+
*
|
|
19
|
+
* @summary 24px error-outline icon for danger alerts
|
|
20
|
+
*/
|
|
21
|
+
export declare const IconErrorOutline: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Outlined info icon used for neutral, info, dynamic, and playful alerts.
|
|
24
|
+
*
|
|
25
|
+
* @summary 24px info-outline icon for neutral and info alerts
|
|
26
|
+
*/
|
|
27
|
+
export declare const IconInfoOutline: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* Filled star icon used for creative-color alerts.
|
|
30
|
+
*
|
|
31
|
+
* @summary 24px star icon for creative alerts
|
|
32
|
+
*/
|
|
33
|
+
export declare const IconStar: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Outlined warning triangle icon used for warning-color alerts.
|
|
36
|
+
*
|
|
37
|
+
* @summary 24px warning icon for warning alerts
|
|
38
|
+
*/
|
|
39
|
+
export declare const IconWarning: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/alert/icons.tsx
|
|
3
|
+
var t = (t) => /* @__PURE__ */ e("svg", {
|
|
4
|
+
width: "24",
|
|
5
|
+
height: "24",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
...t,
|
|
10
|
+
children: /* @__PURE__ */ e("path", { d: "M10.5808 14.1462L8.25765 11.8231C8.1192 11.6846 7.94517 11.6138 7.73555 11.6106C7.52593 11.6074 7.34869 11.6782 7.20382 11.8231C7.05896 11.968 6.98653 12.1436 6.98653 12.35C6.98653 12.5564 7.05896 12.732 7.20382 12.8769L9.94805 15.6211C10.1288 15.8019 10.3397 15.8923 10.5808 15.8923C10.8218 15.8923 11.0327 15.8019 11.2134 15.6211L16.7769 10.0577C16.9153 9.91923 16.9862 9.7452 16.9894 9.53558C16.9926 9.32596 16.9218 9.14872 16.7769 9.00386C16.632 8.85899 16.4564 8.78656 16.25 8.78656C16.0436 8.78656 15.8679 8.85899 15.7231 9.00386L10.5808 14.1462ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5766 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45271 3.248 8.29658C3.74667 7.14043 4.42342 6.13475 5.27825 5.27953C6.1331 4.4243 7.13834 3.74724 8.29398 3.24836C9.44959 2.74947 10.6844 2.50003 11.9983 2.50003C13.3122 2.50003 14.5473 2.74936 15.7034 3.24803C16.8596 3.7467 17.8652 4.42345 18.7205 5.27828C19.5757 6.13313 20.2527 7.13837 20.7516 8.29401C21.2505 9.44962 21.5 10.6844 21.5 11.9983C21.5 13.3123 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5765 17.8653 18.7217 18.7205C17.8669 19.5757 16.8616 20.2528 15.706 20.7517C14.5504 21.2505 13.3156 21.5 12.0016 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.87501 17.675 6.32501C16.125 4.77501 14.2333 4.00001 12 4.00001C9.76664 4.00001 7.87498 4.77501 6.32498 6.32501C4.77498 7.87501 3.99998 9.76667 3.99998 12C3.99998 14.2333 4.77498 16.125 6.32498 17.675C7.87498 19.225 9.76664 20 12 20Z" })
|
|
11
|
+
}), n = (t) => /* @__PURE__ */ e("svg", {
|
|
12
|
+
width: "24",
|
|
13
|
+
height: "24",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
fill: "none",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
...t,
|
|
18
|
+
children: /* @__PURE__ */ e("path", { d: "M12 13.0538L6.92689 18.1269C6.78844 18.2654 6.6144 18.3362 6.40479 18.3394C6.19519 18.3426 6.01795 18.2718 5.87309 18.1269C5.7282 17.982 5.65576 17.8064 5.65576 17.6C5.65576 17.3936 5.7282 17.218 5.87309 17.0731L10.9462 12L5.87309 6.92689C5.73462 6.78844 5.66379 6.6144 5.66059 6.40479C5.65737 6.19519 5.7282 6.01795 5.87309 5.87309C6.01795 5.7282 6.19359 5.65576 6.39999 5.65576C6.60639 5.65576 6.78202 5.7282 6.92689 5.87309L12 10.9462L17.0731 5.87309C17.2115 5.73462 17.3856 5.66379 17.5952 5.66059C17.8048 5.65737 17.982 5.7282 18.1269 5.87309C18.2718 6.01795 18.3442 6.19359 18.3442 6.39999C18.3442 6.60639 18.2718 6.78202 18.1269 6.92689L13.0538 12L18.1269 17.0731C18.2654 17.2115 18.3362 17.3856 18.3394 17.5952C18.3426 17.8048 18.2718 17.982 18.1269 18.1269C17.982 18.2718 17.8064 18.3442 17.6 18.3442C17.3936 18.3442 17.218 18.2718 17.0731 18.1269L12 13.0538Z" })
|
|
19
|
+
}), r = (t) => /* @__PURE__ */ e("svg", {
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
21
|
+
width: "24",
|
|
22
|
+
height: "24",
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
fill: "none",
|
|
25
|
+
...t,
|
|
26
|
+
children: /* @__PURE__ */ e("path", { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" })
|
|
27
|
+
}), i = (t) => /* @__PURE__ */ e("svg", {
|
|
28
|
+
width: "24",
|
|
29
|
+
height: "24",
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
31
|
+
fill: "none",
|
|
32
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
33
|
+
...t,
|
|
34
|
+
children: /* @__PURE__ */ e("path", { d: "M12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5344C12.6782 16.3906 12.75 16.2125 12.75 16V11.75C12.75 11.5375 12.6781 11.3594 12.5343 11.2156C12.3904 11.0719 12.2122 11 11.9997 11C11.7871 11 11.609 11.0719 11.4654 11.2156C11.3218 11.3594 11.25 11.5375 11.25 11.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5344C11.6095 16.6781 11.7877 16.75 12.0003 16.75ZM12 9.28848C12.2288 9.28848 12.4207 9.21108 12.5755 9.05628C12.7303 8.90148 12.8077 8.70966 12.8077 8.48081C12.8077 8.25197 12.7303 8.06015 12.5755 7.90533C12.4207 7.75053 12.2288 7.67313 12 7.67313C11.7711 7.67313 11.5793 7.75053 11.4245 7.90533C11.2697 8.06015 11.1923 8.25197 11.1923 8.48081C11.1923 8.70966 11.2697 8.90148 11.4245 9.05628C11.5793 9.21108 11.7711 9.28848 12 9.28848ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5766 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45271 3.248 8.29658C3.74667 7.14043 4.42342 6.13475 5.27825 5.27953C6.1331 4.4243 7.13834 3.74724 8.29398 3.24836C9.44959 2.74947 10.6844 2.50003 11.9983 2.50003C13.3122 2.50003 14.5473 2.74936 15.7034 3.24803C16.8596 3.7467 17.8652 4.42345 18.7205 5.27828C19.5757 6.13313 20.2527 7.13837 20.7516 8.29401C21.2505 9.44962 21.5 10.6844 21.5 11.9983C21.5 13.3123 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5765 17.8653 18.7217 18.7205C17.8669 19.5757 16.8616 20.2528 15.706 20.7517C14.5504 21.2505 13.3156 21.5 12.0016 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.87501 17.675 6.32501C16.125 4.77501 14.2333 4.00001 12 4.00001C9.76664 4.00001 7.87498 4.77501 6.32498 6.32501C4.77498 7.87501 3.99998 9.76667 3.99998 12C3.99998 14.2333 4.77498 16.125 6.32498 17.675C7.87498 19.225 9.76664 20 12 20Z" })
|
|
35
|
+
}), a = (t) => /* @__PURE__ */ e("svg", {
|
|
36
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37
|
+
width: "24",
|
|
38
|
+
height: "24",
|
|
39
|
+
viewBox: "0 0 24 24",
|
|
40
|
+
fill: "none",
|
|
41
|
+
...t,
|
|
42
|
+
children: /* @__PURE__ */ e("path", { d: "M12 14.7769L14.6211 16.7615C14.8019 16.8884 14.9843 16.8926 15.1682 16.774C15.3522 16.6554 15.4089 16.4891 15.3384 16.275L14.3461 12.9923L16.9065 11.1716C17.0944 11.0316 17.1515 10.8571 17.0778 10.6481C17.0041 10.4391 16.8573 10.3346 16.6374 10.3346H13.5038L12.4365 6.88658C12.36 6.67246 12.2146 6.5654 12.0003 6.5654C11.786 6.5654 11.6404 6.67246 11.5635 6.88658L10.4961 10.3346H7.36255C7.14265 10.3346 6.99584 10.4391 6.92212 10.6481C6.84841 10.8571 6.90551 11.0316 7.09343 11.1716L9.65383 12.9923L8.66153 16.275C8.59101 16.4891 8.64774 16.6554 8.83173 16.774C9.01569 16.8926 9.19806 16.8884 9.37883 16.7615L12 14.7769ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5766 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45271 3.248 8.29658C3.74667 7.14043 4.42342 6.13474 5.27825 5.27953C6.1331 4.42429 7.13834 3.74723 8.29398 3.24835C9.44959 2.74947 10.6844 2.50002 11.9983 2.50002C13.3122 2.50002 14.5473 2.74936 15.7034 3.24803C16.8596 3.74669 17.8652 4.42344 18.7205 5.27828C19.5757 6.13313 20.2527 7.13837 20.7516 8.294C21.2505 9.44962 21.5 10.6844 21.5 11.9983C21.5 13.3123 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5765 17.8653 18.7217 18.7205C17.8669 19.5757 16.8616 20.2528 15.706 20.7517C14.5504 21.2505 13.3156 21.5 12.0016 21.5ZM12 20C14.2166 20 16.1041 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 9.78333 19.2208 7.89583 17.6625 6.3375C16.1041 4.77917 14.2166 4 12 4C9.78331 4 7.89581 4.77917 6.33748 6.3375C4.77914 7.89583 3.99998 9.78333 3.99998 12C3.99998 14.2167 4.77914 16.1042 6.33748 17.6625C7.89581 19.2208 9.78331 20 12 20Z" })
|
|
43
|
+
}), o = (t) => /* @__PURE__ */ e("svg", {
|
|
44
|
+
width: "24",
|
|
45
|
+
height: "24",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "none",
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
...t,
|
|
50
|
+
children: /* @__PURE__ */ e("path", { d: "M3.42555 20.4999C3.25605 20.4999 3.10382 20.4585 2.96887 20.3756C2.83392 20.2928 2.72897 20.1836 2.654 20.048C2.57602 19.9134 2.53312 19.7676 2.52532 19.6105C2.51752 19.4535 2.5599 19.2979 2.65245 19.1439L11.2132 4.35609C11.3057 4.20206 11.4216 4.08819 11.5607 4.01447C11.6998 3.94074 11.8462 3.90387 12.0001 3.90387C12.1539 3.90387 12.3004 3.94074 12.4395 4.01447C12.5786 4.08819 12.6944 4.20206 12.787 4.35609L21.3477 19.1439C21.4403 19.2979 21.4827 19.4535 21.4749 19.6105C21.4671 19.7676 21.4242 19.9134 21.3462 20.048C21.2712 20.1836 21.1663 20.2928 21.0313 20.3756C20.8964 20.4585 20.7441 20.4999 20.5746 20.4999H3.42555ZM4.4501 19H19.5501L12.0001 5.99997L4.4501 19ZM12.0001 17.8076C12.2289 17.8076 12.4208 17.7302 12.5756 17.5754C12.7304 17.4206 12.8078 17.2288 12.8078 17C12.8078 16.7711 12.7304 16.5793 12.5756 16.4245C12.4208 16.2697 12.2289 16.1923 12.0001 16.1923C11.7712 16.1923 11.5794 16.2697 11.4246 16.4245C11.2698 16.5793 11.1924 16.7711 11.1924 17C11.1924 17.2288 11.2698 17.4206 11.4246 17.5754C11.5794 17.7302 11.7712 17.8076 12.0001 17.8076ZM12.0004 15.1923C12.213 15.1923 12.3911 15.1204 12.5347 14.9767C12.6783 14.8329 12.7501 14.6548 12.7501 14.4423V10.9423C12.7501 10.7298 12.6782 10.5517 12.5344 10.4079C12.3906 10.2642 12.2124 10.1923 11.9998 10.1923C11.7872 10.1923 11.6091 10.2642 11.4655 10.4079C11.3219 10.5517 11.2501 10.7298 11.2501 10.9423V14.4423C11.2501 14.6548 11.322 14.8329 11.4658 14.9767C11.6096 15.1204 11.7878 15.1923 12.0004 15.1923Z" })
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
export { t as IconCheckCircle, n as IconClose, r as IconErrorOutline, i as IconInfoOutline, a as IconStar, o as IconWarning };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert } from './alert';
|
package/src/avatar/avatar.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { createContext as t, use as n } from "react";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
4
|
+
import { tv as r } from "tailwind-variants";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import * as o from "@radix-ui/react-avatar";
|
|
7
7
|
//#region src/avatar/avatar.tsx
|
|
8
|
-
var s =
|
|
8
|
+
var s = r({
|
|
9
9
|
slots: {
|
|
10
10
|
root: [
|
|
11
11
|
"flex items-center justify-center align-middle",
|
|
@@ -82,49 +82,49 @@ var s = i({
|
|
|
82
82
|
let e = n(c);
|
|
83
83
|
if (!e) throw Error("useAvatar must be used within an AvatarProvider");
|
|
84
84
|
return e;
|
|
85
|
-
}, u = ({ size: t, variant: n, ...
|
|
86
|
-
let
|
|
85
|
+
}, u = ({ size: t, variant: n, ...r }) => {
|
|
86
|
+
let a = s({
|
|
87
87
|
size: t,
|
|
88
88
|
variant: n
|
|
89
89
|
});
|
|
90
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ i(c, {
|
|
91
91
|
value: {
|
|
92
92
|
size: t,
|
|
93
93
|
variant: n,
|
|
94
|
-
slotsStyles:
|
|
94
|
+
slotsStyles: a
|
|
95
95
|
},
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
...
|
|
98
|
-
className: e(
|
|
96
|
+
children: /* @__PURE__ */ i(o.Root, {
|
|
97
|
+
...r,
|
|
98
|
+
className: e(a.root(), r.className)
|
|
99
99
|
})
|
|
100
100
|
});
|
|
101
101
|
}, d = (t) => {
|
|
102
102
|
let { slotsStyles: n } = l();
|
|
103
|
-
return /* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ i(o.Image, {
|
|
104
104
|
...t,
|
|
105
105
|
className: e(n.image(), t.className)
|
|
106
106
|
});
|
|
107
107
|
}, f = (t) => {
|
|
108
108
|
let { slotsStyles: n } = l();
|
|
109
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ i(o.Fallback, {
|
|
110
110
|
...t,
|
|
111
111
|
className: e(n.fallback(), t.className)
|
|
112
112
|
});
|
|
113
|
-
}, p = ({ alt: e, src: t, fallback: n, colorize: r, size:
|
|
113
|
+
}, p = ({ alt: e, src: t, fallback: n, colorize: r, size: o, variant: s, ref: c, ...l }) => {
|
|
114
114
|
let p = r ? g(r) : void 0;
|
|
115
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ a(u, {
|
|
116
116
|
...l,
|
|
117
117
|
ref: c,
|
|
118
|
-
size:
|
|
118
|
+
size: o,
|
|
119
119
|
variant: s,
|
|
120
120
|
style: {
|
|
121
121
|
...p,
|
|
122
122
|
...l.style
|
|
123
123
|
},
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ i(d, {
|
|
125
125
|
alt: e,
|
|
126
126
|
src: t
|
|
127
|
-
}), /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ i(f, { children: n })]
|
|
128
128
|
});
|
|
129
129
|
}, m = [
|
|
130
130
|
{
|
package/src/button/button.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { Children as t, isValidElement as n } from "react";
|
|
4
4
|
import { tv as r } from "tailwind-variants";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Slot as i, Slottable as a } from "@radix-ui/react-slot";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
//#region src/button/button.tsx
|
|
8
8
|
var c = r({
|
|
9
9
|
base: [
|
|
@@ -242,7 +242,7 @@ var c = r({
|
|
|
242
242
|
size: "sm",
|
|
243
243
|
align: "center"
|
|
244
244
|
}
|
|
245
|
-
}), l = () => /* @__PURE__ */
|
|
245
|
+
}), l = () => /* @__PURE__ */ o("span", {
|
|
246
246
|
"aria-label": "loading",
|
|
247
247
|
role: "status",
|
|
248
248
|
className: e("absolute inset-0 grid place-items-center", "rounded-[inherit] bg-inherit", "before:content-[\"\"] before:block before:size-[1em]", "before:border-2 before:border-solid before:rounded-full", "before:border-current before:border-t-transparent", "before:animate-spin before:[animation-duration:0.5s]")
|
|
@@ -258,17 +258,17 @@ var c = r({
|
|
|
258
258
|
rounded: h,
|
|
259
259
|
align: g,
|
|
260
260
|
fitContent: _
|
|
261
|
-
}), x), E = u ?
|
|
261
|
+
}), x), E = u ? i : "button", D = u ? {
|
|
262
262
|
"aria-disabled": w || void 0,
|
|
263
263
|
"data-disabled": w || void 0
|
|
264
264
|
} : { disabled: w };
|
|
265
|
-
return /* @__PURE__ */
|
|
265
|
+
return /* @__PURE__ */ s(E, {
|
|
266
266
|
"data-slot": "button",
|
|
267
267
|
...D,
|
|
268
268
|
...S,
|
|
269
269
|
className: T,
|
|
270
270
|
ref: b,
|
|
271
|
-
children: [m && /* @__PURE__ */
|
|
271
|
+
children: [m && /* @__PURE__ */ o(l, {}), u ? /* @__PURE__ */ o(a, { children: r }) : r]
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
//#endregion
|