prometeo-design-system 7.4.6 → 7.4.7
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/Badge.es.js +15 -13
- package/dist/DatePicker.es.js +1 -1
- package/dist/DesktopModal.es.js +2 -2
- package/dist/DialogModal.es.js +1 -1
- package/dist/{DrawerMobile-DT6ZkP7f.js → DrawerMobile-4bx8u9GO.js} +106 -105
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/Modal.es.js +45 -41
- package/dist/PLNotificationsList.es.js +5 -5
- package/dist/RecurrentDatePicker.es.js +1 -1
- package/dist/RecurrentDatePickerRRule.es.js +1 -1
- package/dist/TabSwitch.es.js +1 -1
- package/dist/Tabs.es.js +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/prometeo-design-system.es.js +85 -87
- package/dist/styles.css +1 -1
- package/dist/{useModalControl-wMqv8xVn.js → useModalControl-B6NN_Xjx.js} +35 -35
- package/package.json +1 -5
- package/src/styles/base.css +1 -0
- package/dist/Tooltip.d.ts +0 -6
- package/dist/Tooltip.es.js +0 -62
- package/dist/components/Tooltip/Tootip.d.ts +0 -10
- package/dist/exports/Tooltip.d.ts +0 -2
- package/dist/{DatePicker-BlmJnSpU.js → DatePicker-DCOaDxpO.js} +1 -1
package/dist/Badge.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { c
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
2
|
+
import { c } from "./index-BOQuZ0gG.js";
|
|
3
|
+
import { c as u } from "./cn-B6yFEsav.js";
|
|
4
|
+
const d = "brand", m = 99, o = c("radius-full flex items-center justify-center font-medium select-none", {
|
|
5
5
|
variants: {
|
|
6
6
|
size: {
|
|
7
7
|
small: "size-2",
|
|
@@ -10,6 +10,8 @@ const u = "brand", o = 99, d = l("radius-full flex items-center justify-center f
|
|
|
10
10
|
color: {
|
|
11
11
|
neutral: "bg-neutral-tertiary-default text-neutral-default-default icon-neutral-default-default",
|
|
12
12
|
brand: "bg-brand-primary-default text-neutral-default-default icon-brand-primary-default",
|
|
13
|
+
"brand-gradiente": "pyrion-gradient-bg text-neutral-default-default icon-neutral-default-default",
|
|
14
|
+
"brand-overlay": "bg-brand-overlay-pressed text-neutral-default-default icon-neutral-default-default",
|
|
13
15
|
warning: "bg-warning-primary-default text-semantic-warning-primary-default icon-semantic-warning-primary-default",
|
|
14
16
|
success: "bg-success-primary-default text-semantic-success-primary-default icon-semantic-success-primary-default",
|
|
15
17
|
error: "bg-error-primary-default text-semantic-error-primary-default icon-semantic-error-primary-default"
|
|
@@ -21,28 +23,28 @@ const u = "brand", o = 99, d = l("radius-full flex items-center justify-center f
|
|
|
21
23
|
},
|
|
22
24
|
compoundVariants: []
|
|
23
25
|
}), N = (e) => {
|
|
24
|
-
const a = e.color ??
|
|
26
|
+
const a = e.color ?? d;
|
|
25
27
|
if (x(e))
|
|
26
28
|
return /* @__PURE__ */ t.jsx(i, { size: "small", color: a, isTextVariant: !1, className: e.className });
|
|
27
|
-
if (
|
|
29
|
+
if (g(e)) {
|
|
28
30
|
const n = e.icon;
|
|
29
31
|
return /* @__PURE__ */ t.jsx(i, { size: "medium", color: a, isTextVariant: !1, className: e.className, children: n && /* @__PURE__ */ t.jsx(n, { size: 14 }) });
|
|
30
32
|
}
|
|
31
|
-
const
|
|
32
|
-
return /* @__PURE__ */ t.jsx(i, { size: "medium", color: a, isTextVariant:
|
|
33
|
+
const r = f(e), s = !l(e);
|
|
34
|
+
return /* @__PURE__ */ t.jsx(i, { size: "medium", color: a, isTextVariant: s, className: e.className, children: /* @__PURE__ */ t.jsx("span", { className: "pyrion-fonts-label-small text-center", children: r }) });
|
|
33
35
|
}, f = (e) => {
|
|
34
|
-
if (
|
|
35
|
-
const a = e.maxCount ??
|
|
36
|
+
if (l(e)) {
|
|
37
|
+
const a = e.maxCount ?? m;
|
|
36
38
|
return e.count > a ? `+${a}` : e.count;
|
|
37
39
|
}
|
|
38
40
|
return e.text;
|
|
39
|
-
}, x = (e) => e.size === "small",
|
|
41
|
+
}, x = (e) => e.size === "small", g = (e) => e.variant === "icon", l = (e) => typeof e.count == "number", i = ({
|
|
40
42
|
size: e,
|
|
41
43
|
color: a,
|
|
42
|
-
isTextVariant:
|
|
43
|
-
children:
|
|
44
|
+
isTextVariant: r,
|
|
45
|
+
children: s,
|
|
44
46
|
className: n
|
|
45
|
-
}) => /* @__PURE__ */ t.jsx("div", { className:
|
|
47
|
+
}) => /* @__PURE__ */ t.jsx("div", { className: u(o({ size: e, color: a, isTextVariant: r }), n), children: s });
|
|
46
48
|
export {
|
|
47
49
|
N as Badge,
|
|
48
50
|
N as default
|
package/dist/DatePicker.es.js
CHANGED
package/dist/DesktopModal.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as o, a as t } from "./useModalControl-
|
|
2
|
-
import { D as u } from "./useModalControl-
|
|
1
|
+
import { u as o, a as t } from "./useModalControl-B6NN_Xjx.js";
|
|
2
|
+
import { D as u } from "./useModalControl-B6NN_Xjx.js";
|
|
3
3
|
const e = o, s = t;
|
|
4
4
|
export {
|
|
5
5
|
u as default,
|
package/dist/DialogModal.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as u } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import qe, { useContext as
|
|
2
|
+
import qe, { useContext as vt, createContext as xt, isValidElement as Me, Fragment as Ke, Children as Ht, useMemo as ne, useRef as f, useState as pe, useCallback as s, useLayoutEffect as oe, useEffect as $, forwardRef as St, useImperativeHandle as Rt } from "react";
|
|
3
3
|
import { createPortal as Dt } from "react-dom";
|
|
4
4
|
import { c as j } from "./cn-B6yFEsav.js";
|
|
5
5
|
import Ct from "./Divider.es.js";
|
|
@@ -9,7 +9,7 @@ const Ue = xt(
|
|
|
9
9
|
null
|
|
10
10
|
);
|
|
11
11
|
function Ut() {
|
|
12
|
-
const o =
|
|
12
|
+
const o = vt(Ue);
|
|
13
13
|
if (!o)
|
|
14
14
|
throw new Error(
|
|
15
15
|
"Drawer slot components must be used inside <DrawerMobile> or <DrawerPanel>"
|
|
@@ -72,8 +72,8 @@ function At(o, n) {
|
|
|
72
72
|
const Qe = "0.5s cubic-bezier(0.32, 0.72, 0, 1)", jt = `transform ${Qe}`, Lt = `height ${Qe}`, Ft = 0, Yt = 0.05, Pt = 5;
|
|
73
73
|
function ze(o, n, y) {
|
|
74
74
|
if (typeof o == "string" && o.endsWith("%")) {
|
|
75
|
-
const
|
|
76
|
-
return
|
|
75
|
+
const C = parseFloat(o);
|
|
76
|
+
return C <= 0 ? y : C > 100 ? n : Math.min(C, 100) / 100 * n;
|
|
77
77
|
}
|
|
78
78
|
return typeof o == "string" && o.endsWith("px") ? parseFloat(o) : typeof o == "number" ? o >= 0 && o <= 1 ? o * n : o : 0;
|
|
79
79
|
}
|
|
@@ -81,56 +81,56 @@ function It({
|
|
|
81
81
|
children: o,
|
|
82
82
|
attachToParent: n = !1,
|
|
83
83
|
className: y,
|
|
84
|
-
classNameContent:
|
|
84
|
+
classNameContent: C,
|
|
85
85
|
classNameFooter: J,
|
|
86
86
|
classNameHeader: Q,
|
|
87
87
|
isOpen: w,
|
|
88
|
-
applySnapRef:
|
|
88
|
+
applySnapRef: G,
|
|
89
89
|
onSnapChange: H,
|
|
90
90
|
snapPoints: se = [0, "auto", 1],
|
|
91
91
|
hideOnClose: Z = !1,
|
|
92
92
|
unmountChildrenOnClose: g = !1,
|
|
93
93
|
header: L,
|
|
94
94
|
headerActions: V,
|
|
95
|
-
modal:
|
|
95
|
+
modal: k = !1,
|
|
96
96
|
closeOnOverlayClick: ee = !1,
|
|
97
|
-
context:
|
|
98
|
-
footer:
|
|
99
|
-
zIndex:
|
|
97
|
+
context: E,
|
|
98
|
+
footer: O,
|
|
99
|
+
zIndex: N = 60,
|
|
100
100
|
chromeHeightGetterRef: F,
|
|
101
101
|
hideCloseButton: ce = !1,
|
|
102
102
|
title: S,
|
|
103
|
-
onRequestClose:
|
|
103
|
+
onRequestClose: W
|
|
104
104
|
}) {
|
|
105
|
-
const R = typeof o == "function" ? o(
|
|
105
|
+
const R = typeof o == "function" ? o(E) : o, b = !!(S || L || O), v = b ? At(R, {
|
|
106
106
|
title: S,
|
|
107
107
|
header: L,
|
|
108
108
|
headerActions: V,
|
|
109
|
-
footer:
|
|
109
|
+
footer: O,
|
|
110
110
|
classNameHeader: Q,
|
|
111
|
-
classNameContent:
|
|
111
|
+
classNameContent: C,
|
|
112
112
|
classNameFooter: J
|
|
113
|
-
}) : null, te =
|
|
114
|
-
() => Mt(
|
|
115
|
-
[
|
|
113
|
+
}) : null, te = v?.title ?? S, l = v?.headerChildren ?? L, D = v?.headerActions ?? V, x = v?.footer ?? O, Ze = j(Q, v?.headerClassName), Ve = j(C, v?.contentClassName), et = j(J, v?.footerClassName), ye = v?.content ?? null, Y = ne(
|
|
114
|
+
() => Mt(b, ye, R),
|
|
115
|
+
[b, ye, R]
|
|
116
116
|
), tt = () => l ? typeof l == "string" ? /* @__PURE__ */ u.jsx(
|
|
117
117
|
"p",
|
|
118
118
|
{
|
|
119
|
-
style: { zIndex:
|
|
119
|
+
style: { zIndex: N + 2 },
|
|
120
120
|
className: "pyrion-fonts-body-small text-neutral-secondary-default w-full text-balance",
|
|
121
121
|
children: l
|
|
122
122
|
}
|
|
123
|
-
) : typeof l == "function" ? l(
|
|
123
|
+
) : typeof l == "function" ? l(E) : qe.isValidElement(l) ? l : typeof l == "object" && "$$typeof" in l ? qe.createElement(
|
|
124
124
|
l,
|
|
125
|
-
{ context:
|
|
126
|
-
) : l : null, rt = () =>
|
|
125
|
+
{ context: E }
|
|
126
|
+
) : l : null, rt = () => D ? typeof D == "function" ? D(E) : D : null, nt = () => x ? typeof x == "function" ? x(E) : x : null, i = f(null), le = f(null), we = f(null), q = f(0), be = f("0%"), je = {
|
|
127
127
|
header: null,
|
|
128
128
|
headerTitle: null,
|
|
129
129
|
headerActions: null,
|
|
130
130
|
headerBody: null,
|
|
131
131
|
content: null,
|
|
132
132
|
footer: null
|
|
133
|
-
}, z = f({ ...je }), [
|
|
133
|
+
}, z = f({ ...je }), [ve, ot] = pe(je), K = ne(() => {
|
|
134
134
|
const e = (r) => (t) => {
|
|
135
135
|
z.current[r] !== t && (z.current[r] = t, ot(
|
|
136
136
|
(c) => c[r] === t ? c : { ...c, [r]: t }
|
|
@@ -145,9 +145,9 @@ function It({
|
|
|
145
145
|
footer: e("footer")
|
|
146
146
|
};
|
|
147
147
|
}, []), st = ne(
|
|
148
|
-
() => ({ regions:
|
|
149
|
-
[
|
|
150
|
-
), ie = s(() => z.current.header, []), m = s(() => z.current.content, []), U = s(() => z.current.footer, []),
|
|
148
|
+
() => ({ regions: ve }),
|
|
149
|
+
[ve]
|
|
150
|
+
), ie = s(() => z.current.header, []), m = s(() => z.current.content, []), U = s(() => z.current.footer, []), P = f(null), ae = f(null), xe = f(0), He = f(!0), Se = f(null), Re = f(null), d = s(() => Z ? 0 : we.current?.offsetHeight ?? 0, [Z]), T = s(() => {
|
|
151
151
|
if (!i.current) return 0;
|
|
152
152
|
const e = getComputedStyle(i.current);
|
|
153
153
|
return parseFloat(e.paddingTop) + parseFloat(e.paddingBottom);
|
|
@@ -166,10 +166,10 @@ function It({
|
|
|
166
166
|
},
|
|
167
167
|
[]
|
|
168
168
|
), De = s(() => {
|
|
169
|
-
const e = T(), r = ie()?.offsetHeight ?? 0, t = U()?.offsetHeight ?? 0, c = ue(r,
|
|
169
|
+
const e = T(), r = ie()?.offsetHeight ?? 0, t = U()?.offsetHeight ?? 0, c = ue(r, Y, t);
|
|
170
170
|
return e + r + t + c;
|
|
171
|
-
}, [ue, T, U, ie,
|
|
172
|
-
const e = T(), r = ie()?.offsetHeight ?? 0, t =
|
|
171
|
+
}, [ue, T, U, ie, Y]), M = s(() => {
|
|
172
|
+
const e = T(), r = ie()?.offsetHeight ?? 0, t = Y ? m()?.scrollHeight ?? 0 : 0, c = U()?.offsetHeight ?? 0, a = ue(r, Y, c);
|
|
173
173
|
return e + r + t + c + a;
|
|
174
174
|
}, [
|
|
175
175
|
ue,
|
|
@@ -177,7 +177,7 @@ function It({
|
|
|
177
177
|
m,
|
|
178
178
|
U,
|
|
179
179
|
ie,
|
|
180
|
-
|
|
180
|
+
Y
|
|
181
181
|
]);
|
|
182
182
|
oe(() => {
|
|
183
183
|
F && (F.current = De);
|
|
@@ -188,8 +188,8 @@ function It({
|
|
|
188
188
|
return se?.map((t) => t === "auto" ? M() : typeof t == "string" && t.endsWith("%") ? parseFloat(t) > 100 ? e : parseFloat(t) / 100 * e : typeof t == "string" && t.endsWith("px") ? parseFloat(t) : typeof t == "number" && t >= 0 && t <= 1 ? t * e : t === 0 ? r : typeof t == "number" ? t : 0) || [];
|
|
189
189
|
}, [se, p, d, M]), fe = s((e, r) => {
|
|
190
190
|
if (!le.current) return;
|
|
191
|
-
const t = Se.current ?? T(), c = Re.current ?? d(), a = Math.max(0, e - t), h = e <= c,
|
|
192
|
-
le.current.style.transition = r ? Lt : "none", le.current.style.height = `${
|
|
191
|
+
const t = Se.current ?? T(), c = Re.current ?? d(), a = Math.max(0, e - t), h = e <= c, B = h ? xe.current : a;
|
|
192
|
+
le.current.style.transition = r ? Lt : "none", le.current.style.height = `${B}px`, h || (xe.current = B);
|
|
193
193
|
}, [T, d]), Fe = s((e) => {
|
|
194
194
|
const r = m();
|
|
195
195
|
r && (r.classList.toggle("drawer-mobile-content--open", e), r.classList.toggle("drawer-mobile-content--closed", !e));
|
|
@@ -203,7 +203,7 @@ function It({
|
|
|
203
203
|
const c = d();
|
|
204
204
|
if (Math.abs(r) > Yt) {
|
|
205
205
|
if (r > 0) {
|
|
206
|
-
const h = t.filter((
|
|
206
|
+
const h = t.filter((B) => B < e);
|
|
207
207
|
return h.length > 0 ? Math.max(...h) : c;
|
|
208
208
|
}
|
|
209
209
|
const a = t.filter((h) => h > e);
|
|
@@ -246,7 +246,7 @@ function It({
|
|
|
246
246
|
if (!i.current) return;
|
|
247
247
|
he();
|
|
248
248
|
const r = e.touches[0], t = X();
|
|
249
|
-
|
|
249
|
+
P.current = {
|
|
250
250
|
isDragging: !1,
|
|
251
251
|
startY: r.clientY,
|
|
252
252
|
startHeight: t,
|
|
@@ -258,7 +258,7 @@ function It({
|
|
|
258
258
|
if (!i.current) return;
|
|
259
259
|
he();
|
|
260
260
|
const r = X();
|
|
261
|
-
|
|
261
|
+
P.current = {
|
|
262
262
|
isDragging: !1,
|
|
263
263
|
startY: e.clientY,
|
|
264
264
|
startHeight: r,
|
|
@@ -267,14 +267,14 @@ function It({
|
|
|
267
267
|
velocity: 0
|
|
268
268
|
};
|
|
269
269
|
}, [X, he]), me = s((e, r) => {
|
|
270
|
-
if (!
|
|
271
|
-
const t =
|
|
270
|
+
if (!P.current || !i.current) return;
|
|
271
|
+
const t = P.current, c = t.startY - e, a = t.isDragging || Math.abs(c) > Pt;
|
|
272
272
|
if (!t.isDragging && a && (t.isDragging = !0, _e()), !a) return;
|
|
273
273
|
r.preventDefault();
|
|
274
|
-
const h = Date.now(),
|
|
275
|
-
if (
|
|
276
|
-
const
|
|
277
|
-
t.velocity = t.velocity * 0.8 +
|
|
274
|
+
const h = Date.now(), B = h - t.lastTime;
|
|
275
|
+
if (B > 0) {
|
|
276
|
+
const bt = (e - t.lastY) / B;
|
|
277
|
+
t.velocity = t.velocity * 0.8 + bt * 0.2;
|
|
278
278
|
}
|
|
279
279
|
t.lastY = e, t.lastTime = h;
|
|
280
280
|
const pt = t.startHeight + c, yt = p(), wt = Math.max(0, Math.min(pt, yt));
|
|
@@ -283,31 +283,31 @@ function It({
|
|
|
283
283
|
me(e.touches[0].clientY, e);
|
|
284
284
|
}, [me]), Ge = s((e) => {
|
|
285
285
|
me(e.clientY, e);
|
|
286
|
-
}, [me]),
|
|
287
|
-
if (
|
|
286
|
+
}, [me]), I = s(() => {
|
|
287
|
+
if (P.current?.isDragging && i.current) {
|
|
288
288
|
Ie();
|
|
289
|
-
const e = X(), r = Ye(e,
|
|
289
|
+
const e = X(), r = Ye(e, P.current.velocity);
|
|
290
290
|
Pe(r);
|
|
291
291
|
}
|
|
292
|
-
|
|
292
|
+
P.current = null, Be();
|
|
293
293
|
}, [Ye, Pe, Ie, X, Be]), Ne = s((e) => {
|
|
294
294
|
$e(e);
|
|
295
295
|
const r = (c) => Ge(c), t = () => {
|
|
296
|
-
document.removeEventListener("mousemove", r, { capture: !0 }), document.removeEventListener("mouseup", t, { capture: !0 }),
|
|
296
|
+
document.removeEventListener("mousemove", r, { capture: !0 }), document.removeEventListener("mouseup", t, { capture: !0 }), I();
|
|
297
297
|
};
|
|
298
298
|
document.addEventListener("mousemove", r, { passive: !1, capture: !0 }), document.addEventListener("mouseup", t, { capture: !0 });
|
|
299
|
-
}, [$e, Ge,
|
|
300
|
-
|
|
299
|
+
}, [$e, Ge, I]);
|
|
300
|
+
$(() => {
|
|
301
301
|
const e = we.current;
|
|
302
302
|
if (e)
|
|
303
|
-
return e.addEventListener("touchstart", Ce, { passive: !1 }), e.addEventListener("touchmove", Ee, { passive: !1 }), e.addEventListener("touchend",
|
|
304
|
-
e.removeEventListener("touchstart", Ce), e.removeEventListener("touchmove", Ee), e.removeEventListener("touchend",
|
|
303
|
+
return e.addEventListener("touchstart", Ce, { passive: !1 }), e.addEventListener("touchmove", Ee, { passive: !1 }), e.addEventListener("touchend", I), e.addEventListener("touchcancel", I), e.addEventListener("mousedown", Ne, { passive: !1 }), () => {
|
|
304
|
+
e.removeEventListener("touchstart", Ce), e.removeEventListener("touchmove", Ee), e.removeEventListener("touchend", I), e.removeEventListener("touchcancel", I), e.removeEventListener("mousedown", Ne);
|
|
305
305
|
};
|
|
306
|
-
}, [Ce, Ee,
|
|
307
|
-
const [
|
|
308
|
-
g && w && !
|
|
306
|
+
}, [Ce, Ee, I, Ne]);
|
|
307
|
+
const [_, ke] = pe(() => g ? w : !0);
|
|
308
|
+
g && w && !_ && ke(!0);
|
|
309
309
|
const re = f(null);
|
|
310
|
-
|
|
310
|
+
$(() => {
|
|
311
311
|
if (!g) return;
|
|
312
312
|
const e = i.current;
|
|
313
313
|
if (!e) return;
|
|
@@ -342,11 +342,11 @@ function It({
|
|
|
342
342
|
U
|
|
343
343
|
]), ge = s((e) => {
|
|
344
344
|
if (!e) return;
|
|
345
|
-
if (
|
|
345
|
+
if (be.current = e, g && !_ && e !== "0%") {
|
|
346
346
|
re.current = e;
|
|
347
347
|
return;
|
|
348
348
|
}
|
|
349
|
-
re.current = null, Fe(e !== "0%"),
|
|
349
|
+
re.current = null, Fe(e !== "0%"), _ && m() && q.current === 0 && (q.current = m()?.scrollHeight ?? 0);
|
|
350
350
|
const r = e !== "0%" && He.current;
|
|
351
351
|
if (Oe(e), e === "auto") {
|
|
352
352
|
We();
|
|
@@ -356,7 +356,7 @@ function It({
|
|
|
356
356
|
A(a, !r);
|
|
357
357
|
}, [
|
|
358
358
|
g,
|
|
359
|
-
|
|
359
|
+
_,
|
|
360
360
|
Oe,
|
|
361
361
|
We,
|
|
362
362
|
A,
|
|
@@ -367,7 +367,7 @@ function It({
|
|
|
367
367
|
]);
|
|
368
368
|
oe(() => {
|
|
369
369
|
if (!w) return;
|
|
370
|
-
const e =
|
|
370
|
+
const e = be.current;
|
|
371
371
|
if (!e || e === "0%") return;
|
|
372
372
|
const r = m();
|
|
373
373
|
if (r) {
|
|
@@ -382,21 +382,21 @@ function It({
|
|
|
382
382
|
if (!e) return;
|
|
383
383
|
let r = 0;
|
|
384
384
|
const t = () => {
|
|
385
|
-
if (
|
|
385
|
+
if (be.current !== "auto") return;
|
|
386
386
|
const a = e.scrollHeight;
|
|
387
387
|
a <= 0 || a === r || (r = a, q.current = a, A(M(), !0));
|
|
388
388
|
};
|
|
389
389
|
t();
|
|
390
390
|
const c = new ResizeObserver(t);
|
|
391
391
|
return c.observe(e), () => c.disconnect();
|
|
392
|
-
}, [w,
|
|
393
|
-
|
|
392
|
+
}, [w, ve.content, A, M]), oe(() => (G.current = ge, () => {
|
|
393
|
+
G.current = null;
|
|
394
394
|
}), [ge]), oe(() => {
|
|
395
|
-
if (
|
|
395
|
+
if (_ && re.current) {
|
|
396
396
|
const e = re.current;
|
|
397
397
|
re.current = null, ge(e);
|
|
398
398
|
}
|
|
399
|
-
}, [
|
|
399
|
+
}, [_, ge]);
|
|
400
400
|
const at = ne(
|
|
401
401
|
() => navigator.userAgent.includes("iPhone") || navigator.userAgent.includes("iPad") || navigator.userAgent.includes("iPod"),
|
|
402
402
|
[]
|
|
@@ -405,17 +405,18 @@ function It({
|
|
|
405
405
|
{
|
|
406
406
|
ref: K.header,
|
|
407
407
|
className: j(
|
|
408
|
-
"pb-4 flex flex-col gap-3 items-start justify-start border-b border-neutral-default-default",
|
|
408
|
+
"pb-4 flex flex-col gap-3 items-start justify-start border-b border-neutral-default-default ",
|
|
409
|
+
!Y && "border-b-0",
|
|
409
410
|
Ze
|
|
410
411
|
),
|
|
411
412
|
children: [
|
|
412
|
-
/* @__PURE__ */ u.jsxs("div", { className: "pl-4 pr-2 gap-1 flex items-
|
|
413
|
+
/* @__PURE__ */ u.jsxs("div", { className: "pl-4 pr-2 gap-1 flex items-start w-full", children: [
|
|
413
414
|
/* @__PURE__ */ u.jsx(
|
|
414
415
|
"div",
|
|
415
416
|
{
|
|
416
417
|
ref: K.headerTitle,
|
|
417
418
|
className: "flex-1 min-w-0 flex items-end",
|
|
418
|
-
children:
|
|
419
|
+
children: b && te ? /* @__PURE__ */ u.jsx("h4", { className: "pyrion-fonts-headline-small text-neutral-primary-default flex-1 truncate", children: te }) : null
|
|
419
420
|
}
|
|
420
421
|
),
|
|
421
422
|
/* @__PURE__ */ u.jsx(
|
|
@@ -423,11 +424,11 @@ function It({
|
|
|
423
424
|
{
|
|
424
425
|
ref: K.headerActions,
|
|
425
426
|
className: "flex shrink-0 pl-4 pr-2 gap-1 items-end",
|
|
426
|
-
children:
|
|
427
|
+
children: b ? rt() : null
|
|
427
428
|
}
|
|
428
429
|
),
|
|
429
430
|
!ce && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
430
|
-
/* @__PURE__ */ u.jsx(Ct, { orientation: "vertical" }),
|
|
431
|
+
D && /* @__PURE__ */ u.jsx(Ct, { orientation: "vertical" }),
|
|
431
432
|
/* @__PURE__ */ u.jsx(
|
|
432
433
|
Et,
|
|
433
434
|
{
|
|
@@ -435,12 +436,12 @@ function It({
|
|
|
435
436
|
variant: "text",
|
|
436
437
|
color: "neutral",
|
|
437
438
|
size: "small",
|
|
438
|
-
onClick:
|
|
439
|
+
onClick: W
|
|
439
440
|
}
|
|
440
441
|
)
|
|
441
442
|
] })
|
|
442
443
|
] }),
|
|
443
|
-
/* @__PURE__ */ u.jsx("div", { ref: K.headerBody, className: "w-full", children:
|
|
444
|
+
/* @__PURE__ */ u.jsx("div", { ref: K.headerBody, className: "w-full", children: b ? tt() : null })
|
|
444
445
|
]
|
|
445
446
|
}
|
|
446
447
|
), ht = /* @__PURE__ */ u.jsx(
|
|
@@ -452,10 +453,10 @@ function It({
|
|
|
452
453
|
w ? "drawer-mobile-content--open" : "drawer-mobile-content--closed",
|
|
453
454
|
"w-full flex-1 min-h-0 overflow-y-auto",
|
|
454
455
|
"flex flex-col gap-6 px-4 items-start justify-start",
|
|
455
|
-
|
|
456
|
+
Y ? "py-6" : "py-0",
|
|
456
457
|
Ve
|
|
457
458
|
),
|
|
458
|
-
children: (!g ||
|
|
459
|
+
children: (!g || _) && (b ? ye : R)
|
|
459
460
|
}
|
|
460
461
|
), mt = /* @__PURE__ */ u.jsx(
|
|
461
462
|
"div",
|
|
@@ -468,23 +469,23 @@ function It({
|
|
|
468
469
|
ut && at && "pb-8",
|
|
469
470
|
et
|
|
470
471
|
),
|
|
471
|
-
children:
|
|
472
|
+
children: b && x ? nt() : null
|
|
472
473
|
}
|
|
473
474
|
), gt = /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
474
475
|
ht,
|
|
475
476
|
mt
|
|
476
477
|
] });
|
|
477
478
|
return /* @__PURE__ */ u.jsx(Ue.Provider, { value: st, children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
478
|
-
(
|
|
479
|
+
(k || ee) && /* @__PURE__ */ u.jsx(
|
|
479
480
|
"div",
|
|
480
481
|
{
|
|
481
|
-
style: { zIndex:
|
|
482
|
+
style: { zIndex: N },
|
|
482
483
|
className: j(
|
|
483
484
|
w ? "fixed inset-0 cursor-default" : "hidden",
|
|
484
|
-
|
|
485
|
+
k && "bg-black/40"
|
|
485
486
|
),
|
|
486
487
|
onClick: (e) => {
|
|
487
|
-
e.preventDefault(), e.stopPropagation(), ee &&
|
|
488
|
+
e.preventDefault(), e.stopPropagation(), ee && W();
|
|
488
489
|
},
|
|
489
490
|
"aria-hidden": "true"
|
|
490
491
|
}
|
|
@@ -493,7 +494,7 @@ function It({
|
|
|
493
494
|
"div",
|
|
494
495
|
{
|
|
495
496
|
ref: i,
|
|
496
|
-
style: { zIndex:
|
|
497
|
+
style: { zIndex: N, transform: "translateY(100%)" },
|
|
497
498
|
className: j(
|
|
498
499
|
"h-full",
|
|
499
500
|
n ? "absolute" : "fixed",
|
|
@@ -509,7 +510,7 @@ function It({
|
|
|
509
510
|
"div",
|
|
510
511
|
{
|
|
511
512
|
ref: we,
|
|
512
|
-
style: { zIndex:
|
|
513
|
+
style: { zIndex: N + 1 },
|
|
513
514
|
className: "w-full absolute top-0 pt-4 pb-2 flex items-end justify-center cursor-grab active:cursor-grabbing bg-inherit!",
|
|
514
515
|
children: /* @__PURE__ */ u.jsx("span", { className: "w-12 h-1 rounded-full bg-neutral-tertiary-default" })
|
|
515
516
|
}
|
|
@@ -533,46 +534,46 @@ function It({
|
|
|
533
534
|
}
|
|
534
535
|
const _t = It, Bt = 300, $t = St(function(n, y) {
|
|
535
536
|
const {
|
|
536
|
-
children:
|
|
537
|
+
children: C,
|
|
537
538
|
defaultOpen: J = !1,
|
|
538
539
|
onClose: Q,
|
|
539
540
|
snapPoints: w = ["auto"],
|
|
540
|
-
setSnap:
|
|
541
|
+
setSnap: G,
|
|
541
542
|
snap: H,
|
|
542
543
|
attachToParent: se = !1,
|
|
543
544
|
classNameHeader: Z
|
|
544
|
-
} = n, g = f(H || "0%"), [L, V] = pe(!1), [
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}, [
|
|
545
|
+
} = n, g = f(H || "0%"), [L, V] = pe(!1), [k, ee] = pe(null), E = f(Q), O = f(G), N = f(k), F = f(/* @__PURE__ */ new Set()), ce = f(() => 0), S = f(null), W = f(null);
|
|
546
|
+
E.current = Q, N.current = k, $(() => {
|
|
547
|
+
O.current = G;
|
|
548
|
+
}, [G]);
|
|
548
549
|
const R = s((l) => {
|
|
549
|
-
const
|
|
550
|
+
const D = g.current !== "0%";
|
|
550
551
|
g.current = l;
|
|
551
552
|
const x = l !== "0%";
|
|
552
|
-
|
|
553
|
+
D !== x && V(x), O.current?.(l), W.current?.(l);
|
|
553
554
|
}, []);
|
|
554
|
-
|
|
555
|
+
$(() => {
|
|
555
556
|
if (H == null || H === g.current) return;
|
|
556
|
-
g.current = H, V(H !== "0%"),
|
|
557
|
-
}, [H]),
|
|
558
|
-
J &&
|
|
557
|
+
g.current = H, V(H !== "0%"), W.current?.(H);
|
|
558
|
+
}, [H]), $(() => {
|
|
559
|
+
J && v();
|
|
559
560
|
}, [J]);
|
|
560
|
-
const
|
|
561
|
-
R("0%"),
|
|
561
|
+
const b = s(() => {
|
|
562
|
+
R("0%"), E.current?.(N.current), S.current && clearTimeout(S.current), S.current = setTimeout(() => {
|
|
562
563
|
ee(null), S.current = null;
|
|
563
564
|
}, Bt);
|
|
564
565
|
}, [R]);
|
|
565
|
-
|
|
566
|
+
$(() => () => {
|
|
566
567
|
S.current && clearTimeout(S.current);
|
|
567
568
|
}, []);
|
|
568
|
-
const
|
|
569
|
-
(l,
|
|
570
|
-
const x =
|
|
569
|
+
const v = s(
|
|
570
|
+
(l, D) => {
|
|
571
|
+
const x = D || w[0] || "60%";
|
|
571
572
|
ee(l ?? null), R(x);
|
|
572
573
|
},
|
|
573
574
|
[w, R]
|
|
574
575
|
);
|
|
575
|
-
|
|
576
|
+
$(() => {
|
|
576
577
|
F.current.forEach((l) => {
|
|
577
578
|
try {
|
|
578
579
|
l(L);
|
|
@@ -582,16 +583,16 @@ const _t = It, Bt = 300, $t = St(function(n, y) {
|
|
|
582
583
|
}, [L]), Rt(
|
|
583
584
|
y,
|
|
584
585
|
() => ({
|
|
585
|
-
open:
|
|
586
|
-
close:
|
|
586
|
+
open: v,
|
|
587
|
+
close: b,
|
|
587
588
|
get isOpen() {
|
|
588
589
|
return g.current !== "0%";
|
|
589
590
|
},
|
|
590
591
|
subscribeOpenChange: (l) => (F.current.add(l), l(g.current !== "0%"), () => F.current.delete(l)),
|
|
591
|
-
getContext: () =>
|
|
592
|
+
getContext: () => N.current,
|
|
592
593
|
getChromeHeight: () => ce.current()
|
|
593
594
|
}),
|
|
594
|
-
[
|
|
595
|
+
[v, b]
|
|
595
596
|
);
|
|
596
597
|
const te = /* @__PURE__ */ u.jsx(
|
|
597
598
|
_t,
|
|
@@ -599,12 +600,12 @@ const _t = It, Bt = 300, $t = St(function(n, y) {
|
|
|
599
600
|
...n,
|
|
600
601
|
classNameHeader: Z,
|
|
601
602
|
isOpen: L,
|
|
602
|
-
applySnapRef:
|
|
603
|
+
applySnapRef: W,
|
|
603
604
|
onSnapChange: R,
|
|
604
|
-
context:
|
|
605
|
+
context: k,
|
|
605
606
|
chromeHeightGetterRef: ce,
|
|
606
|
-
onRequestClose:
|
|
607
|
-
children:
|
|
607
|
+
onRequestClose: b,
|
|
608
|
+
children: C
|
|
608
609
|
}
|
|
609
610
|
);
|
|
610
611
|
return se ? te : Dt(te, document.body);
|
package/dist/DrawerMobile.es.js
CHANGED
package/dist/Menu.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import J from "./CardBackground.es.js";
|
|
|
4
4
|
import { c as w } from "./cn-B6yFEsav.js";
|
|
5
5
|
import { u as Q } from "./useDevice-S7cYqLVh.js";
|
|
6
6
|
import { M as W } from "./MenuFloating-CZ7dqXy2.js";
|
|
7
|
-
import { D as Z } from "./DrawerMobile-
|
|
7
|
+
import { D as Z } from "./DrawerMobile-4bx8u9GO.js";
|
|
8
8
|
const $ = {
|
|
9
9
|
color: "neutral",
|
|
10
10
|
variant: "primary",
|