prometeo-design-system 7.7.0 → 7.7.2
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/dist/Dialog.es.js +106 -105
- package/dist/IconButton.es.js +22 -25
- package/dist/ListItem.es.js +223 -168
- package/dist/Menu.es.js +1 -1
- package/dist/{MenuFloating-SbwgI4UF.js → MenuFloating-ColYjZe9.js} +23 -23
- package/dist/MenuFloating.css +1 -1
- package/dist/PlainTooltip.es.js +103 -78
- package/dist/Popover.es.js +215 -214
- package/dist/TabSwitch.es.js +1 -2
- package/dist/components/Dialog/useDialogControl.d.ts +1 -0
- package/dist/components/Menu/ListItem.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/MenuFloating.d.ts +2 -2
- package/dist/components/Popover/Popover.d.ts +4 -2
- package/dist/hooks/useFloatingPosition.d.ts +14 -3
- package/dist/styles.css +1 -1
- package/dist/useFloatingPosition-BlFgWaIC.js +339 -0
- package/package.json +1 -1
- package/dist/useFloatingPosition-BZvmzy6v.js +0 -291
package/dist/Dialog.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { useContext as Z, createContext as $, forwardRef as ee, memo as
|
|
2
|
+
import { useContext as Z, createContext as $, forwardRef as ee, memo as F, useRef as h, useState as I, useCallback as p, useEffect as k, useImperativeHandle as ne, useMemo as q } from "react";
|
|
3
3
|
import { createPortal as te } from "react-dom";
|
|
4
|
-
import { c as
|
|
5
|
-
import { M as re } from "./MenuFloating-
|
|
4
|
+
import { c as N } from "./cn-B6yFEsav.js";
|
|
5
|
+
import { M as re } from "./MenuFloating-ColYjZe9.js";
|
|
6
6
|
import oe from "./CardBackground.es.js";
|
|
7
7
|
import se from "./IconButton.es.js";
|
|
8
8
|
import { Close as le } from "./Icons/Close.es.js";
|
|
@@ -15,16 +15,16 @@ function ae() {
|
|
|
15
15
|
);
|
|
16
16
|
return e;
|
|
17
17
|
}
|
|
18
|
-
const M = 100,
|
|
19
|
-
title:
|
|
20
|
-
description:
|
|
18
|
+
const M = 100, w = F(function({
|
|
19
|
+
title: t,
|
|
20
|
+
description: r,
|
|
21
21
|
className: l
|
|
22
22
|
}) {
|
|
23
|
-
const { hideCloseButton:
|
|
24
|
-
return /* @__PURE__ */ n.jsxs("div", { className:
|
|
23
|
+
const { hideCloseButton: o, closeDialog: a } = ae();
|
|
24
|
+
return /* @__PURE__ */ n.jsxs("div", { className: N("flex flex-col gap-4 pt-2 ", l), children: [
|
|
25
25
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-baseline justify-center gap-2 pl-4 pr-2 ", children: [
|
|
26
|
-
|
|
27
|
-
!
|
|
26
|
+
t && /* @__PURE__ */ n.jsx("span", { className: "prometeo-fonts-title-medium text-neutral-default-default", children: t }),
|
|
27
|
+
!o && /* @__PURE__ */ n.jsx("div", { className: "flex-1 flex justify-end", children: /* @__PURE__ */ n.jsx(
|
|
28
28
|
se,
|
|
29
29
|
{
|
|
30
30
|
icon: le,
|
|
@@ -35,62 +35,62 @@ const M = 100, k = O(function({
|
|
|
35
35
|
}
|
|
36
36
|
) })
|
|
37
37
|
] }),
|
|
38
|
-
|
|
38
|
+
r && /* @__PURE__ */ n.jsx("p", { className: "prometeo-fonts-body-small text-neutral-secondary-default px-4", children: r })
|
|
39
39
|
] });
|
|
40
40
|
});
|
|
41
|
-
|
|
42
|
-
const P =
|
|
43
|
-
children:
|
|
44
|
-
className:
|
|
41
|
+
w.displayName = "Dialog.Header";
|
|
42
|
+
const P = F(function({
|
|
43
|
+
children: t,
|
|
44
|
+
className: r
|
|
45
45
|
}) {
|
|
46
|
-
return /* @__PURE__ */ n.jsx("div", { className:
|
|
46
|
+
return /* @__PURE__ */ n.jsx("div", { className: N("px-4 py-0 flex flex-col gap-4 ", r), children: t });
|
|
47
47
|
});
|
|
48
48
|
P.displayName = "Dialog.Content";
|
|
49
|
-
const U =
|
|
50
|
-
children:
|
|
51
|
-
className:
|
|
49
|
+
const U = F(function({
|
|
50
|
+
children: t,
|
|
51
|
+
className: r
|
|
52
52
|
}) {
|
|
53
53
|
return /* @__PURE__ */ n.jsx(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: N(
|
|
57
57
|
"p-4 pt-2 flex flex-row gap-3 items-center",
|
|
58
|
-
|
|
58
|
+
r
|
|
59
59
|
),
|
|
60
|
-
children:
|
|
60
|
+
children: t
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
});
|
|
64
64
|
U.displayName = "Dialog.Footer";
|
|
65
|
-
const X =
|
|
66
|
-
layoutContext:
|
|
67
|
-
shouldRenderChildren:
|
|
65
|
+
const X = F(function({
|
|
66
|
+
layoutContext: t,
|
|
67
|
+
shouldRenderChildren: r,
|
|
68
68
|
hasAutoHeader: l,
|
|
69
|
-
title:
|
|
69
|
+
title: o,
|
|
70
70
|
description: a,
|
|
71
|
-
cardBackground:
|
|
72
|
-
className:
|
|
73
|
-
children:
|
|
71
|
+
cardBackground: i,
|
|
72
|
+
className: s,
|
|
73
|
+
children: c
|
|
74
74
|
}) {
|
|
75
75
|
return /* @__PURE__ */ n.jsxs(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: N(
|
|
79
79
|
"relative flex flex-col radius-medium overflow-hidden dropshadow-400",
|
|
80
80
|
"border border-neutral-default-default",
|
|
81
|
-
|
|
81
|
+
s
|
|
82
82
|
),
|
|
83
83
|
children: [
|
|
84
84
|
/* @__PURE__ */ n.jsx(
|
|
85
85
|
oe,
|
|
86
86
|
{
|
|
87
|
-
...
|
|
88
|
-
className:
|
|
87
|
+
...i ?? {},
|
|
88
|
+
className: N("absolute inset-0 z-0", i?.className)
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */ n.jsx("div", { className: "relative z-10 flex flex-col gap-4 min-h-0 overflow-hidden", children: /* @__PURE__ */ n.jsx(L.Provider, { value:
|
|
92
|
-
l && /* @__PURE__ */ n.jsx(
|
|
93
|
-
|
|
91
|
+
/* @__PURE__ */ n.jsx("div", { className: "relative z-10 flex flex-col gap-4 min-h-0 overflow-hidden", children: /* @__PURE__ */ n.jsx(L.Provider, { value: t, children: r && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
92
|
+
l && /* @__PURE__ */ n.jsx(w, { title: o, description: a }),
|
|
93
|
+
c
|
|
94
94
|
] }) }) })
|
|
95
95
|
]
|
|
96
96
|
}
|
|
@@ -99,21 +99,21 @@ const X = O(function({
|
|
|
99
99
|
X.displayName = "Dialog.Card";
|
|
100
100
|
function ce({
|
|
101
101
|
triggerRef: e,
|
|
102
|
-
anchorRef:
|
|
103
|
-
placement:
|
|
102
|
+
anchorRef: t,
|
|
103
|
+
placement: r,
|
|
104
104
|
offset: l = 4,
|
|
105
|
-
matchTriggerWidth:
|
|
105
|
+
matchTriggerWidth: o,
|
|
106
106
|
attachToParent: a = !1,
|
|
107
|
-
closeOnScroll:
|
|
108
|
-
closeOnClickOutside:
|
|
109
|
-
zIndex:
|
|
107
|
+
closeOnScroll: i = !0,
|
|
108
|
+
closeOnClickOutside: s = !0,
|
|
109
|
+
zIndex: c = 50,
|
|
110
110
|
avoidElements: u,
|
|
111
|
-
cardBackground:
|
|
111
|
+
cardBackground: y,
|
|
112
112
|
title: b,
|
|
113
113
|
description: D,
|
|
114
|
-
hideCloseButton:
|
|
114
|
+
hideCloseButton: j = !1,
|
|
115
115
|
modal: m = !1,
|
|
116
|
-
unmountChildrenOnClose:
|
|
116
|
+
unmountChildrenOnClose: C = !0,
|
|
117
117
|
onClose: T,
|
|
118
118
|
onOpen: A,
|
|
119
119
|
children: _,
|
|
@@ -121,35 +121,35 @@ function ce({
|
|
|
121
121
|
}, J) {
|
|
122
122
|
const f = h(null), H = h(T), S = h(A);
|
|
123
123
|
H.current = T, S.current = A;
|
|
124
|
-
const [
|
|
125
|
-
() => !
|
|
124
|
+
const [R, v] = I("hidden"), [K, E] = I(
|
|
125
|
+
() => !C
|
|
126
126
|
), g = h(null), d = p(() => {
|
|
127
127
|
g.current && (clearTimeout(g.current), g.current = null);
|
|
128
128
|
}, []), z = p(
|
|
129
129
|
(x) => {
|
|
130
|
-
d(), m &&
|
|
130
|
+
d(), m && v("open"), C && E(!0), f.current?.open(x), S.current?.(x);
|
|
131
131
|
},
|
|
132
|
-
[m,
|
|
133
|
-
),
|
|
134
|
-
m && (d(),
|
|
135
|
-
|
|
132
|
+
[m, C, d]
|
|
133
|
+
), O = p(() => {
|
|
134
|
+
m && (d(), v("closing"), g.current = setTimeout(() => {
|
|
135
|
+
v("hidden"), g.current = null;
|
|
136
136
|
}, M)), f.current?.close();
|
|
137
137
|
}, [m, d]), Q = p(() => {
|
|
138
|
-
|
|
139
|
-
}, [
|
|
140
|
-
|
|
138
|
+
C && E(!1), H.current?.(f.current?.getContext() ?? null);
|
|
139
|
+
}, [C]);
|
|
140
|
+
k(() => {
|
|
141
141
|
const x = f.current;
|
|
142
142
|
if (!(!x || !m))
|
|
143
143
|
return x.subscribeOpenChange((Y) => {
|
|
144
|
-
Y ||
|
|
145
|
-
|
|
144
|
+
Y || v((B) => B !== "open" ? B : (d(), g.current = setTimeout(() => {
|
|
145
|
+
v("hidden"), g.current = null;
|
|
146
146
|
}, M), "closing"));
|
|
147
147
|
});
|
|
148
|
-
}, [m, d]),
|
|
148
|
+
}, [m, d]), k(() => d, [d]), ne(
|
|
149
149
|
J,
|
|
150
150
|
() => ({
|
|
151
151
|
open: z,
|
|
152
|
-
close:
|
|
152
|
+
close: O,
|
|
153
153
|
get isOpen() {
|
|
154
154
|
return f.current?.isOpen ?? !1;
|
|
155
155
|
},
|
|
@@ -157,21 +157,21 @@ function ce({
|
|
|
157
157
|
subscribeOpenChange: (x) => f.current?.subscribeOpenChange(x) ?? (() => {
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
|
-
[z,
|
|
160
|
+
[z, O]
|
|
161
161
|
);
|
|
162
162
|
const V = q(
|
|
163
|
-
() => ({ hideCloseButton:
|
|
164
|
-
[
|
|
163
|
+
() => ({ hideCloseButton: j, closeDialog: O }),
|
|
164
|
+
[j, O]
|
|
165
165
|
), W = b != null || D != null;
|
|
166
166
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
167
|
-
m &&
|
|
167
|
+
m && R !== "hidden" && te(
|
|
168
168
|
/* @__PURE__ */ n.jsx(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
className: "prometeo-dialog-backdrop",
|
|
172
|
-
"data-open":
|
|
173
|
-
"data-closing":
|
|
174
|
-
style: { zIndex:
|
|
172
|
+
"data-open": R === "open" ? "true" : void 0,
|
|
173
|
+
"data-closing": R === "closing" ? "true" : void 0,
|
|
174
|
+
style: { zIndex: c - 1 }
|
|
175
175
|
}
|
|
176
176
|
),
|
|
177
177
|
document.body
|
|
@@ -181,14 +181,14 @@ function ce({
|
|
|
181
181
|
{
|
|
182
182
|
ref: f,
|
|
183
183
|
triggerRef: e,
|
|
184
|
-
anchorRef:
|
|
185
|
-
placement:
|
|
184
|
+
anchorRef: t,
|
|
185
|
+
placement: r,
|
|
186
186
|
offset: l,
|
|
187
|
-
matchTriggerWidth:
|
|
187
|
+
matchTriggerWidth: o,
|
|
188
188
|
attachToParent: a,
|
|
189
|
-
closeOnScroll:
|
|
190
|
-
closeOnClickOutside:
|
|
191
|
-
zIndex:
|
|
189
|
+
closeOnScroll: i,
|
|
190
|
+
closeOnClickOutside: s,
|
|
191
|
+
zIndex: c,
|
|
192
192
|
avoidElements: u,
|
|
193
193
|
onClose: Q,
|
|
194
194
|
children: /* @__PURE__ */ n.jsx(
|
|
@@ -199,7 +199,7 @@ function ce({
|
|
|
199
199
|
hasAutoHeader: W,
|
|
200
200
|
title: b,
|
|
201
201
|
description: D,
|
|
202
|
-
cardBackground:
|
|
202
|
+
cardBackground: y,
|
|
203
203
|
className: G,
|
|
204
204
|
children: _
|
|
205
205
|
}
|
|
@@ -209,66 +209,67 @@ function ce({
|
|
|
209
209
|
] });
|
|
210
210
|
}
|
|
211
211
|
const ie = ee(ce), be = Object.assign(ie, {
|
|
212
|
-
Header:
|
|
212
|
+
Header: w,
|
|
213
213
|
Content: P,
|
|
214
214
|
Footer: U
|
|
215
215
|
});
|
|
216
216
|
function De() {
|
|
217
|
-
const e = h(null), r = h(null),
|
|
218
|
-
e.current?.open(
|
|
219
|
-
}, []),
|
|
217
|
+
const e = h(null), t = h(null), r = h(null), l = p((s) => {
|
|
218
|
+
e.current?.open(s);
|
|
219
|
+
}, []), o = p(() => {
|
|
220
220
|
e.current?.close();
|
|
221
|
-
}, []),
|
|
222
|
-
e.current?.isOpen ? e.current.close() : e.current?.open(
|
|
223
|
-
}, []),
|
|
224
|
-
let c = null,
|
|
225
|
-
const
|
|
226
|
-
if (!
|
|
227
|
-
const
|
|
228
|
-
if (!
|
|
229
|
-
|
|
221
|
+
}, []), a = p((s) => {
|
|
222
|
+
e.current?.isOpen ? e.current.close() : e.current?.open(s);
|
|
223
|
+
}, []), i = p((s) => {
|
|
224
|
+
let c = null, u = null, y = !0, b = 0;
|
|
225
|
+
const D = () => {
|
|
226
|
+
if (!y) return;
|
|
227
|
+
const j = e.current;
|
|
228
|
+
if (!j) {
|
|
229
|
+
b < 10 && (b++, c = requestAnimationFrame(D));
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
u = j.subscribeOpenChange(s);
|
|
233
233
|
};
|
|
234
|
-
return
|
|
235
|
-
|
|
234
|
+
return D(), () => {
|
|
235
|
+
y = !1, c !== null && cancelAnimationFrame(c), u?.();
|
|
236
236
|
};
|
|
237
237
|
}, []);
|
|
238
238
|
return q(
|
|
239
239
|
() => ({
|
|
240
240
|
ref: e,
|
|
241
|
-
triggerRef:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
triggerRef: t,
|
|
242
|
+
anchorRef: r,
|
|
243
|
+
open: l,
|
|
244
|
+
close: o,
|
|
245
|
+
toggle: a,
|
|
245
246
|
get isOpen() {
|
|
246
247
|
return e.current?.isOpen ?? !1;
|
|
247
248
|
},
|
|
248
|
-
subscribeOpenChange:
|
|
249
|
+
subscribeOpenChange: i
|
|
249
250
|
}),
|
|
250
|
-
[
|
|
251
|
+
[l, o, a, i]
|
|
251
252
|
);
|
|
252
253
|
}
|
|
253
|
-
function je(e,
|
|
254
|
-
const [
|
|
254
|
+
function je(e, t) {
|
|
255
|
+
const [r, l] = I(
|
|
255
256
|
() => e.current?.isOpen ?? !1
|
|
256
257
|
);
|
|
257
|
-
return
|
|
258
|
-
let
|
|
259
|
-
const
|
|
260
|
-
if (!
|
|
258
|
+
return k(() => {
|
|
259
|
+
let o = null, a = null, i = !0, s = 0;
|
|
260
|
+
const c = () => {
|
|
261
|
+
if (!i) return;
|
|
261
262
|
const u = e.current;
|
|
262
263
|
if (!u) {
|
|
263
|
-
|
|
264
|
+
s < 10 && (s++, o = requestAnimationFrame(c));
|
|
264
265
|
return;
|
|
265
266
|
}
|
|
266
267
|
l(u.isOpen), a = u.subscribeOpenChange(l);
|
|
267
268
|
};
|
|
268
|
-
return
|
|
269
|
-
|
|
269
|
+
return c(), () => {
|
|
270
|
+
i = !1, o !== null && cancelAnimationFrame(o), a?.();
|
|
270
271
|
};
|
|
271
|
-
}, [e,
|
|
272
|
+
}, [e, t]), r;
|
|
272
273
|
}
|
|
273
274
|
export {
|
|
274
275
|
be as Dialog,
|
package/dist/IconButton.es.js
CHANGED
|
@@ -51,26 +51,23 @@ const u = {
|
|
|
51
51
|
},
|
|
52
52
|
outline: {
|
|
53
53
|
brand: {
|
|
54
|
-
container:
|
|
55
|
-
hover:bg-neutral-primary-hover hover:border-brand-onneutral-hover
|
|
56
|
-
active:bg-neutral-primary-pressed active:border-brand-onneutral-pressed
|
|
57
|
-
`,
|
|
54
|
+
container: "bg-neutral-primary-default border-brand-onneutral-default border hover:bg-brand-overlay-hover hover:border-brand-onneutral-hover active:bg-brand-overlay-pressed active:border-brand-onneutral-pressed",
|
|
58
55
|
icon: "icon-brand-onneutral-default group-hover:icon-brand-onneutral-hover group-active:icon-brand-onneutral-pressed"
|
|
59
56
|
},
|
|
60
57
|
neutral: {
|
|
61
|
-
container: "bg-
|
|
58
|
+
container: "bg-neutral-primary-default border-neutral-primary-default border hover:bg-neutral-primary-hover hover:border-neutral-primary-hover active:bg-neutral-primary-pressed active:border-neutral-primary-pressed",
|
|
62
59
|
icon: "icon-neutral-default-default group-hover:icon-neutral-default-hover group-active:icon-neutral-default-pressed"
|
|
63
60
|
},
|
|
64
61
|
success: {
|
|
65
|
-
container: "border border-success-onneutral-default hover:
|
|
62
|
+
container: "bg-transparent border border-success-onneutral-default hover:bg-success-overlay-hover hover:border-success-onneutral-hover active:bg-success-overlay-pressed active:border-success-onneutral-pressed",
|
|
66
63
|
icon: "icon-semantic-success-onneutral-default group-hover:icon-semantic-success-onneutral-hover group-active:icon-semantic-success-onneutral-pressed"
|
|
67
64
|
},
|
|
68
65
|
error: {
|
|
69
|
-
container: "border border-error-onneutral-default hover:
|
|
66
|
+
container: "bg-transparent border border-error-onneutral-default hover:bg-error-overlay-hover hover:border-error-onneutral-hover active:bg-error-overlay-pressed active:border-error-onneutral-pressed",
|
|
70
67
|
icon: "icon-semantic-error-onneutral-default group-hover:icon-semantic-error-onneutral-hover group-active:icon-semantic-error-onneutral-pressed"
|
|
71
68
|
},
|
|
72
69
|
warning: {
|
|
73
|
-
container: "border border-warning-onneutral-default hover:
|
|
70
|
+
container: "bg-transparent border border-warning-onneutral-default hover:bg-warning-overlay-hover hover:border-warning-onneutral-hover active:bg-warning-overlay-pressed active:border-warning-onneutral-pressed",
|
|
74
71
|
icon: "icon-semantic-warning-onneutral-default group-hover:icon-semantic-warning-onneutral-hover group-active:icon-semantic-warning-onneutral-pressed"
|
|
75
72
|
},
|
|
76
73
|
disabled: {
|
|
@@ -80,7 +77,7 @@ const u = {
|
|
|
80
77
|
},
|
|
81
78
|
text: {
|
|
82
79
|
brand: {
|
|
83
|
-
container: "
|
|
80
|
+
container: "bg-transparent border-0 hover:bg-brand-overlay-hover active:bg-brand-overlay-pressed",
|
|
84
81
|
icon: "icon-brand-onneutral-default group-hover:icon-brand-onneutral-hover group-active:icon-brand-onneutral-pressed"
|
|
85
82
|
},
|
|
86
83
|
neutral: {
|
|
@@ -88,15 +85,15 @@ const u = {
|
|
|
88
85
|
icon: "icon-neutral-default-default group-hover:icon-neutral-default-hover group-active:icon-neutral-default-pressed"
|
|
89
86
|
},
|
|
90
87
|
success: {
|
|
91
|
-
container: "
|
|
88
|
+
container: "bg-transparent border-0 hover:bg-success-overlay-hover active:bg-success-overlay-pressed",
|
|
92
89
|
icon: "icon-semantic-success-onneutral-default group-hover:icon-semantic-success-onneutral-hover group-active:icon-semantic-success-onneutral-pressed"
|
|
93
90
|
},
|
|
94
91
|
error: {
|
|
95
|
-
container: "
|
|
92
|
+
container: "bg-transparent border-0 hover:bg-error-overlay-hover active:bg-error-overlay-pressed",
|
|
96
93
|
icon: "icon-semantic-error-onneutral-default group-hover:icon-semantic-error-onneutral-hover group-active:icon-semantic-error-onneutral-pressed"
|
|
97
94
|
},
|
|
98
95
|
warning: {
|
|
99
|
-
container: "
|
|
96
|
+
container: "bg-transparent border-0 hover:bg-warning-overlay-hover active:bg-warning-overlay-pressed",
|
|
100
97
|
icon: "icon-semantic-warning-onneutral-default group-hover:icon-semantic-warning-onneutral-hover group-active:icon-semantic-warning-onneutral-pressed"
|
|
101
98
|
},
|
|
102
99
|
disabled: {
|
|
@@ -201,7 +198,7 @@ const u = {
|
|
|
201
198
|
color: "brand",
|
|
202
199
|
animation: !0
|
|
203
200
|
}
|
|
204
|
-
}),
|
|
201
|
+
}), f = x(w.icon, {
|
|
205
202
|
variants: {
|
|
206
203
|
size: {
|
|
207
204
|
small: u.small.icon,
|
|
@@ -259,10 +256,10 @@ const u = {
|
|
|
259
256
|
}), $ = G(({
|
|
260
257
|
onClick: z,
|
|
261
258
|
icon: b,
|
|
262
|
-
contentClassName:
|
|
259
|
+
contentClassName: m,
|
|
263
260
|
animate: S = !1,
|
|
264
261
|
animateIcon: B = !1,
|
|
265
|
-
isLoading:
|
|
262
|
+
isLoading: p = !1,
|
|
266
263
|
children: r,
|
|
267
264
|
hideSpinner: j = !1,
|
|
268
265
|
spinner: g,
|
|
@@ -275,12 +272,12 @@ const u = {
|
|
|
275
272
|
color: k = "brand",
|
|
276
273
|
...A
|
|
277
274
|
}, C) => {
|
|
278
|
-
const l = !!(i ||
|
|
275
|
+
const l = !!(i || p), d = !!(B && !l), D = !!(S && !l), c = k, T = {
|
|
279
276
|
small: "small",
|
|
280
277
|
medium: "medium",
|
|
281
278
|
large: "medium"
|
|
282
279
|
}, q = H(() => {
|
|
283
|
-
if (
|
|
280
|
+
if (p)
|
|
284
281
|
return /* @__PURE__ */ n.jsx("div", { className: "flex items-center justify-center", children: !j && (g || /* @__PURE__ */ n.jsx(J, { size: T[o], color: "brand" })) });
|
|
285
282
|
let a = null;
|
|
286
283
|
if (r)
|
|
@@ -288,7 +285,7 @@ const u = {
|
|
|
288
285
|
v(r.type) ? a = /* @__PURE__ */ n.jsx(
|
|
289
286
|
"span",
|
|
290
287
|
{
|
|
291
|
-
className:
|
|
288
|
+
className: f({
|
|
292
289
|
size: o,
|
|
293
290
|
variant: s,
|
|
294
291
|
color: c,
|
|
@@ -304,7 +301,7 @@ const u = {
|
|
|
304
301
|
I(t) && (v(t.type) ? a = /* @__PURE__ */ n.jsx(
|
|
305
302
|
"span",
|
|
306
303
|
{
|
|
307
|
-
className:
|
|
304
|
+
className: f({
|
|
308
305
|
size: o,
|
|
309
306
|
variant: s,
|
|
310
307
|
color: c,
|
|
@@ -320,7 +317,7 @@ const u = {
|
|
|
320
317
|
else typeof r == "object" && (v(r) ? a = /* @__PURE__ */ n.jsx(
|
|
321
318
|
"span",
|
|
322
319
|
{
|
|
323
|
-
className:
|
|
320
|
+
className: f({
|
|
324
321
|
size: o,
|
|
325
322
|
variant: s,
|
|
326
323
|
color: c,
|
|
@@ -335,7 +332,7 @@ const u = {
|
|
|
335
332
|
a = /* @__PURE__ */ n.jsx(
|
|
336
333
|
"span",
|
|
337
334
|
{
|
|
338
|
-
className:
|
|
335
|
+
className: f({
|
|
339
336
|
size: o,
|
|
340
337
|
variant: s,
|
|
341
338
|
color: c,
|
|
@@ -346,15 +343,15 @@ const u = {
|
|
|
346
343
|
}
|
|
347
344
|
);
|
|
348
345
|
}
|
|
349
|
-
return a ? /* @__PURE__ */ n.jsx("div", { className: h("flex items-center justify-center select-none",
|
|
346
|
+
return a ? /* @__PURE__ */ n.jsx("div", { className: h("flex items-center justify-center select-none", m), children: a }) : null;
|
|
350
347
|
}, [
|
|
351
|
-
|
|
348
|
+
m,
|
|
352
349
|
r,
|
|
353
350
|
b,
|
|
354
351
|
s,
|
|
355
352
|
o,
|
|
356
353
|
c,
|
|
357
|
-
|
|
354
|
+
p,
|
|
358
355
|
j,
|
|
359
356
|
g,
|
|
360
357
|
d,
|
|
@@ -382,7 +379,7 @@ const u = {
|
|
|
382
379
|
l && "pointer-events-none",
|
|
383
380
|
O({ size: o, variant: s, color: c, animation: D, disabled: l }),
|
|
384
381
|
"w-full h-full grid place-items-center",
|
|
385
|
-
|
|
382
|
+
m
|
|
386
383
|
), children: q })
|
|
387
384
|
}
|
|
388
385
|
);
|