@local-logic/design-system 0.7.13 → 0.7.15
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/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.stories.d.ts +13 -0
- package/dist/components/Button/index.stories.d.ts.map +1 -0
- package/dist/components/Button/styles.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/{ui/components → components}/Card/index.stories.d.ts +1 -1
- package/dist/components/Card/index.stories.d.ts.map +1 -0
- package/dist/components/Card/styles.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/{ui/components → components}/Modal/index.stories.d.ts +1 -1
- package/dist/components/Modal/index.stories.d.ts.map +1 -0
- package/dist/components/Modal/styles.d.ts.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1606 -0
- package/dist/index.umd.js +110 -0
- package/dist/style.css +1 -0
- package/package.json +25 -38
- package/dist/CaretDown-qK3_eXZo.js +0 -5
- package/dist/CaretUp-BwXusn0Y.js +0 -5
- package/dist/icons/assets/arrows/index.d.ts +0 -3
- package/dist/icons/assets/arrows/index.d.ts.map +0 -1
- package/dist/icons/assets/index.d.ts +0 -2
- package/dist/icons/assets/index.d.ts.map +0 -1
- package/dist/icons/components/Icon/index.d.ts +0 -17
- package/dist/icons/components/Icon/index.d.ts.map +0 -1
- package/dist/icons/components/StorybookIconList/index.d.ts +0 -34
- package/dist/icons/components/StorybookIconList/index.d.ts.map +0 -1
- package/dist/icons/components/StorybookIconList/index.stories.d.ts +0 -11
- package/dist/icons/components/StorybookIconList/index.stories.d.ts.map +0 -1
- package/dist/icons/components/StorybookIconList/lists/arrows.d.ts +0 -3
- package/dist/icons/components/StorybookIconList/lists/arrows.d.ts.map +0 -1
- package/dist/icons/components/StorybookIconList/styles.d.ts +0 -8
- package/dist/icons/components/StorybookIconList/styles.d.ts.map +0 -1
- package/dist/icons/index.d.ts +0 -3
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/index.js +0 -31
- package/dist/icons/utils/lazy.d.ts +0 -2
- package/dist/icons/utils/lazy.d.ts.map +0 -1
- package/dist/ui/components/Button/index.d.ts.map +0 -1
- package/dist/ui/components/Button/index.stories.d.ts +0 -13
- package/dist/ui/components/Button/index.stories.d.ts.map +0 -1
- package/dist/ui/components/Button/styles.d.ts.map +0 -1
- package/dist/ui/components/Card/index.d.ts.map +0 -1
- package/dist/ui/components/Card/index.stories.d.ts.map +0 -1
- package/dist/ui/components/Card/styles.d.ts.map +0 -1
- package/dist/ui/components/Modal/index.d.ts.map +0 -1
- package/dist/ui/components/Modal/index.stories.d.ts.map +0 -1
- package/dist/ui/components/Modal/styles.d.ts.map +0 -1
- package/dist/ui/index.d.ts +0 -2
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js +0 -185
- /package/dist/{ui/components → components}/Button/index.d.ts +0 -0
- /package/dist/{ui/components → components}/Button/styles.d.ts +0 -0
- /package/dist/{ui/components → components}/Card/index.d.ts +0 -0
- /package/dist/{ui/components → components}/Card/styles.d.ts +0 -0
- /package/dist/{ui/components → components}/Modal/index.d.ts +0 -0
- /package/dist/{ui/components → components}/Modal/styles.d.ts +0 -0
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,1606 @@
|
|
|
1
|
+
import { jsxs as T, jsx as g, Fragment as ue } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import p, { createContext as wt, forwardRef as ve, useContext as Ct, useState as St } from "react";
|
|
4
|
+
import * as Pt from "react-dom";
|
|
5
|
+
import Nt from "react-dom";
|
|
6
|
+
const Ot = /* @__PURE__ */ new Map([
|
|
7
|
+
[
|
|
8
|
+
"bold",
|
|
9
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z" }))
|
|
10
|
+
],
|
|
11
|
+
[
|
|
12
|
+
"duotone",
|
|
13
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M176,128,96,208V48Z", opacity: "0.2" }), /* @__PURE__ */ p.createElement("path", { d: "M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z" }))
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
"fill",
|
|
17
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z" }))
|
|
18
|
+
],
|
|
19
|
+
[
|
|
20
|
+
"light",
|
|
21
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z" }))
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"regular",
|
|
25
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" }))
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"thin",
|
|
29
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z" }))
|
|
30
|
+
]
|
|
31
|
+
]), Rt = /* @__PURE__ */ new Map([
|
|
32
|
+
[
|
|
33
|
+
"bold",
|
|
34
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
"duotone",
|
|
38
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement(
|
|
39
|
+
"path",
|
|
40
|
+
{
|
|
41
|
+
d: "M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",
|
|
42
|
+
opacity: "0.2"
|
|
43
|
+
}
|
|
44
|
+
), /* @__PURE__ */ p.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"fill",
|
|
48
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
49
|
+
],
|
|
50
|
+
[
|
|
51
|
+
"light",
|
|
52
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z" }))
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"regular",
|
|
56
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z" }))
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"thin",
|
|
60
|
+
/* @__PURE__ */ p.createElement(p.Fragment, null, /* @__PURE__ */ p.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
61
|
+
]
|
|
62
|
+
]), xt = wt({
|
|
63
|
+
color: "currentColor",
|
|
64
|
+
size: "1em",
|
|
65
|
+
weight: "regular",
|
|
66
|
+
mirrored: !1
|
|
67
|
+
});
|
|
68
|
+
var At = Object.defineProperty, X = Object.getOwnPropertySymbols, Be = Object.prototype.hasOwnProperty, $e = Object.prototype.propertyIsEnumerable, be = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ee = (e, t) => {
|
|
69
|
+
for (var n in t || (t = {}))
|
|
70
|
+
Be.call(t, n) && be(e, n, t[n]);
|
|
71
|
+
if (X)
|
|
72
|
+
for (var n of X(t))
|
|
73
|
+
$e.call(t, n) && be(e, n, t[n]);
|
|
74
|
+
return e;
|
|
75
|
+
}, we = (e, t) => {
|
|
76
|
+
var n = {};
|
|
77
|
+
for (var r in e)
|
|
78
|
+
Be.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
79
|
+
if (e != null && X)
|
|
80
|
+
for (var r of X(e))
|
|
81
|
+
t.indexOf(r) < 0 && $e.call(e, r) && (n[r] = e[r]);
|
|
82
|
+
return n;
|
|
83
|
+
};
|
|
84
|
+
const je = ve((e, t) => {
|
|
85
|
+
const n = e, {
|
|
86
|
+
alt: r,
|
|
87
|
+
color: a,
|
|
88
|
+
size: o,
|
|
89
|
+
weight: s,
|
|
90
|
+
mirrored: c,
|
|
91
|
+
children: d,
|
|
92
|
+
weights: l
|
|
93
|
+
} = n, f = we(n, [
|
|
94
|
+
"alt",
|
|
95
|
+
"color",
|
|
96
|
+
"size",
|
|
97
|
+
"weight",
|
|
98
|
+
"mirrored",
|
|
99
|
+
"children",
|
|
100
|
+
"weights"
|
|
101
|
+
]), v = Ct(xt), {
|
|
102
|
+
color: m = "currentColor",
|
|
103
|
+
size: y,
|
|
104
|
+
weight: E = "regular",
|
|
105
|
+
mirrored: u = !1
|
|
106
|
+
} = v, h = we(v, [
|
|
107
|
+
"color",
|
|
108
|
+
"size",
|
|
109
|
+
"weight",
|
|
110
|
+
"mirrored"
|
|
111
|
+
]);
|
|
112
|
+
return /* @__PURE__ */ p.createElement(
|
|
113
|
+
"svg",
|
|
114
|
+
Ee(Ee({
|
|
115
|
+
ref: t,
|
|
116
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
117
|
+
width: o ?? y,
|
|
118
|
+
height: o ?? y,
|
|
119
|
+
fill: a ?? m,
|
|
120
|
+
viewBox: "0 0 256 256",
|
|
121
|
+
transform: c || u ? "scale(-1, 1)" : void 0
|
|
122
|
+
}, h), f),
|
|
123
|
+
!!r && /* @__PURE__ */ p.createElement("title", null, r),
|
|
124
|
+
d,
|
|
125
|
+
l.get(s ?? E)
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
je.displayName = "IconBase";
|
|
129
|
+
const Ue = je;
|
|
130
|
+
var Dt = Object.defineProperty, Mt = Object.defineProperties, Lt = Object.getOwnPropertyDescriptors, Ce = Object.getOwnPropertySymbols, Tt = Object.prototype.hasOwnProperty, It = Object.prototype.propertyIsEnumerable, Se = (e, t, n) => t in e ? Dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ft = (e, t) => {
|
|
131
|
+
for (var n in t || (t = {}))
|
|
132
|
+
Tt.call(t, n) && Se(e, n, t[n]);
|
|
133
|
+
if (Ce)
|
|
134
|
+
for (var n of Ce(t))
|
|
135
|
+
It.call(t, n) && Se(e, n, t[n]);
|
|
136
|
+
return e;
|
|
137
|
+
}, _t = (e, t) => Mt(e, Lt(t));
|
|
138
|
+
const Ve = ve((e, t) => /* @__PURE__ */ p.createElement(Ue, _t(Ft({ ref: t }, e), { weights: Ot })));
|
|
139
|
+
Ve.displayName = "CaretRight";
|
|
140
|
+
var kt = Object.defineProperty, Wt = Object.defineProperties, Bt = Object.getOwnPropertyDescriptors, Pe = Object.getOwnPropertySymbols, $t = Object.prototype.hasOwnProperty, jt = Object.prototype.propertyIsEnumerable, Ne = (e, t, n) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ut = (e, t) => {
|
|
141
|
+
for (var n in t || (t = {}))
|
|
142
|
+
$t.call(t, n) && Ne(e, n, t[n]);
|
|
143
|
+
if (Pe)
|
|
144
|
+
for (var n of Pe(t))
|
|
145
|
+
jt.call(t, n) && Ne(e, n, t[n]);
|
|
146
|
+
return e;
|
|
147
|
+
}, Vt = (e, t) => Wt(e, Bt(t));
|
|
148
|
+
const Ze = ve((e, t) => /* @__PURE__ */ p.createElement(Ue, Vt(Ut({ ref: t }, e), { weights: Rt })));
|
|
149
|
+
Ze.displayName = "X";
|
|
150
|
+
const Zt = `
|
|
151
|
+
group bg-transparent justify-center
|
|
152
|
+
text-lg font-medium no-underline
|
|
153
|
+
px-5 py-0 rounded-xl h-11
|
|
154
|
+
flex items-center gap-2 cursor-pointer
|
|
155
|
+
transition-all min-w-fit
|
|
156
|
+
|
|
157
|
+
outline-none border-none
|
|
158
|
+
disabled:pointer-events-none
|
|
159
|
+
data-[is-disabled=true]:pointer-events-none
|
|
160
|
+
|
|
161
|
+
data-[size="medium"]:h-12
|
|
162
|
+
data-[size="large"]:h-16
|
|
163
|
+
|
|
164
|
+
data-[variant="primary"]:bg-primary-100
|
|
165
|
+
data-[variant="primary"]:text-white
|
|
166
|
+
data-[variant="primary"]:hover:bg-primary-200
|
|
167
|
+
data-[variant="primary"]:disabled:bg-gray-250
|
|
168
|
+
data-[variant="primary"]:data-[is-disabled=true]:bg-gray-250
|
|
169
|
+
data-[variant="primary"]:data-[inverse=true]:bg-white
|
|
170
|
+
data-[variant="primary"]:data-[inverse=true]:text-primary-100
|
|
171
|
+
data-[variant="primary"]:data-[inverse=true]:hover:bg-white
|
|
172
|
+
data-[variant="primary"]:data-[inverse=true]:hover:text-primary-200
|
|
173
|
+
data-[variant="primary"]:data-[inverse=true]:disabled:bg-gray-200
|
|
174
|
+
data-[variant="primary"]:data-[inverse=true]:disabled:text-white
|
|
175
|
+
data-[variant="primary"]:data-[inverse=true]:data-[is-disabled=true]:bg-gray-200
|
|
176
|
+
data-[variant="primary"]:data-[inverse=true]:data-[is-disabled=true]:text-white
|
|
177
|
+
|
|
178
|
+
data-[variant="secondary"]:border
|
|
179
|
+
data-[variant="secondary"]:border-solid
|
|
180
|
+
data-[variant="secondary"]:border-gray-150
|
|
181
|
+
data-[variant="secondary"]:text-primary-100
|
|
182
|
+
data-[variant="secondary"]:hover:border-primary-50
|
|
183
|
+
data-[variant="secondary"]:hover:text-primary-50
|
|
184
|
+
data-[variant="secondary"]:disabled:text-gray-250
|
|
185
|
+
data-[variant="secondary"]:disabled:border-gray-250
|
|
186
|
+
data-[variant="secondary"]:data-[is-disabled=true]:text-gray-250
|
|
187
|
+
data-[variant="secondary"]:data-[is-disabled=true]:border-gray-250
|
|
188
|
+
data-[variant="secondary"]:data-[inverse=true]:text-white
|
|
189
|
+
data-[variant="secondary"]:data-[inverse=true]:border-white
|
|
190
|
+
|
|
191
|
+
data-[variant="ghost"]:text-primary-100
|
|
192
|
+
data-[variant="ghost"]:hover:text-primary-50
|
|
193
|
+
data-[variant="ghost"]:disabled:text-gray-250
|
|
194
|
+
data-[variant="ghost"]:data-[is-disabled=true]:text-gray-250
|
|
195
|
+
|
|
196
|
+
data-[variant="ghost"]:data-[inverse=true]:text-white
|
|
197
|
+
`, zt = "h-6 w-6", Ht = "h-3 w-3 text-black", Kt = p.forwardRef(
|
|
198
|
+
({
|
|
199
|
+
children: e,
|
|
200
|
+
className: t = "",
|
|
201
|
+
variant: n = "primary",
|
|
202
|
+
size: r = "small",
|
|
203
|
+
Icon: a,
|
|
204
|
+
isDisabled: o = !1,
|
|
205
|
+
inverse: s = !1,
|
|
206
|
+
onClick: c
|
|
207
|
+
}, d) => /* @__PURE__ */ T(
|
|
208
|
+
"button",
|
|
209
|
+
{
|
|
210
|
+
onClick: (f) => {
|
|
211
|
+
c && c(f);
|
|
212
|
+
},
|
|
213
|
+
className: `${Zt} ${t}`,
|
|
214
|
+
disabled: o,
|
|
215
|
+
"data-variant": n,
|
|
216
|
+
"data-size": r,
|
|
217
|
+
"data-inverse": s,
|
|
218
|
+
children: [
|
|
219
|
+
a && /* @__PURE__ */ g(a, { className: zt }),
|
|
220
|
+
e,
|
|
221
|
+
a && n === "ghost" && /* @__PURE__ */ g(Ve, { className: Ht })
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
);
|
|
226
|
+
Kt.displayName = "Button";
|
|
227
|
+
const Gt = `
|
|
228
|
+
font-sans
|
|
229
|
+
rounded-lg p-9 relative
|
|
230
|
+
border border-solid border-gray-150
|
|
231
|
+
transition-all
|
|
232
|
+
|
|
233
|
+
bg-white
|
|
234
|
+
text-gray-400
|
|
235
|
+
`, Xt = `
|
|
236
|
+
bg-cover bg-center
|
|
237
|
+
w-full
|
|
238
|
+
h-60
|
|
239
|
+
`;
|
|
240
|
+
function Yt({ children: e, imageSRC: t }) {
|
|
241
|
+
return /* @__PURE__ */ T("div", { className: Gt, children: [
|
|
242
|
+
t && /* @__PURE__ */ g(
|
|
243
|
+
"div",
|
|
244
|
+
{
|
|
245
|
+
className: Xt,
|
|
246
|
+
style: {
|
|
247
|
+
backgroundImage: `url("${t}")`
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
e
|
|
252
|
+
] });
|
|
253
|
+
}
|
|
254
|
+
function L(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
255
|
+
return function(a) {
|
|
256
|
+
if (e == null || e(a), n === !1 || !a.defaultPrevented)
|
|
257
|
+
return t == null ? void 0 : t(a);
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function Oe(e, t) {
|
|
261
|
+
if (typeof e == "function")
|
|
262
|
+
return e(t);
|
|
263
|
+
e != null && (e.current = t);
|
|
264
|
+
}
|
|
265
|
+
function ze(...e) {
|
|
266
|
+
return (t) => {
|
|
267
|
+
let n = !1;
|
|
268
|
+
const r = e.map((a) => {
|
|
269
|
+
const o = Oe(a, t);
|
|
270
|
+
return !n && typeof o == "function" && (n = !0), o;
|
|
271
|
+
});
|
|
272
|
+
if (n)
|
|
273
|
+
return () => {
|
|
274
|
+
for (let a = 0; a < r.length; a++) {
|
|
275
|
+
const o = r[a];
|
|
276
|
+
typeof o == "function" ? o() : Oe(e[a], null);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function _(...e) {
|
|
282
|
+
return i.useCallback(ze(...e), e);
|
|
283
|
+
}
|
|
284
|
+
function qt(e, t) {
|
|
285
|
+
const n = i.createContext(t), r = (o) => {
|
|
286
|
+
const { children: s, ...c } = o, d = i.useMemo(() => c, Object.values(c));
|
|
287
|
+
return /* @__PURE__ */ g(n.Provider, { value: d, children: s });
|
|
288
|
+
};
|
|
289
|
+
r.displayName = e + "Provider";
|
|
290
|
+
function a(o) {
|
|
291
|
+
const s = i.useContext(n);
|
|
292
|
+
if (s) return s;
|
|
293
|
+
if (t !== void 0) return t;
|
|
294
|
+
throw new Error(`\`${o}\` must be used within \`${e}\``);
|
|
295
|
+
}
|
|
296
|
+
return [r, a];
|
|
297
|
+
}
|
|
298
|
+
function Qt(e, t = []) {
|
|
299
|
+
let n = [];
|
|
300
|
+
function r(o, s) {
|
|
301
|
+
const c = i.createContext(s), d = n.length;
|
|
302
|
+
n = [...n, s];
|
|
303
|
+
const l = (v) => {
|
|
304
|
+
var b;
|
|
305
|
+
const { scope: m, children: y, ...E } = v, u = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[d]) || c, h = i.useMemo(() => E, Object.values(E));
|
|
306
|
+
return /* @__PURE__ */ g(u.Provider, { value: h, children: y });
|
|
307
|
+
};
|
|
308
|
+
l.displayName = o + "Provider";
|
|
309
|
+
function f(v, m) {
|
|
310
|
+
var u;
|
|
311
|
+
const y = ((u = m == null ? void 0 : m[e]) == null ? void 0 : u[d]) || c, E = i.useContext(y);
|
|
312
|
+
if (E) return E;
|
|
313
|
+
if (s !== void 0) return s;
|
|
314
|
+
throw new Error(`\`${v}\` must be used within \`${o}\``);
|
|
315
|
+
}
|
|
316
|
+
return [l, f];
|
|
317
|
+
}
|
|
318
|
+
const a = () => {
|
|
319
|
+
const o = n.map((s) => i.createContext(s));
|
|
320
|
+
return function(c) {
|
|
321
|
+
const d = (c == null ? void 0 : c[e]) || o;
|
|
322
|
+
return i.useMemo(
|
|
323
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: d } }),
|
|
324
|
+
[c, d]
|
|
325
|
+
);
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
return a.scopeName = e, [r, Jt(a, ...t)];
|
|
329
|
+
}
|
|
330
|
+
function Jt(...e) {
|
|
331
|
+
const t = e[0];
|
|
332
|
+
if (e.length === 1) return t;
|
|
333
|
+
const n = () => {
|
|
334
|
+
const r = e.map((a) => ({
|
|
335
|
+
useScope: a(),
|
|
336
|
+
scopeName: a.scopeName
|
|
337
|
+
}));
|
|
338
|
+
return function(o) {
|
|
339
|
+
const s = r.reduce((c, { useScope: d, scopeName: l }) => {
|
|
340
|
+
const v = d(o)[`__scope${l}`];
|
|
341
|
+
return { ...c, ...v };
|
|
342
|
+
}, {});
|
|
343
|
+
return i.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
return n.scopeName = t.scopeName, n;
|
|
347
|
+
}
|
|
348
|
+
var Y = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
|
|
349
|
+
}, en = i.useId || (() => {
|
|
350
|
+
}), tn = 0;
|
|
351
|
+
function te(e) {
|
|
352
|
+
const [t, n] = i.useState(en());
|
|
353
|
+
return Y(() => {
|
|
354
|
+
n((r) => r ?? String(tn++));
|
|
355
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
356
|
+
}
|
|
357
|
+
function I(e) {
|
|
358
|
+
const t = i.useRef(e);
|
|
359
|
+
return i.useEffect(() => {
|
|
360
|
+
t.current = e;
|
|
361
|
+
}), i.useMemo(() => (...n) => {
|
|
362
|
+
var r;
|
|
363
|
+
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
364
|
+
}, []);
|
|
365
|
+
}
|
|
366
|
+
function nn({
|
|
367
|
+
prop: e,
|
|
368
|
+
defaultProp: t,
|
|
369
|
+
onChange: n = () => {
|
|
370
|
+
}
|
|
371
|
+
}) {
|
|
372
|
+
const [r, a] = rn({ defaultProp: t, onChange: n }), o = e !== void 0, s = o ? e : r, c = I(n), d = i.useCallback(
|
|
373
|
+
(l) => {
|
|
374
|
+
if (o) {
|
|
375
|
+
const v = typeof l == "function" ? l(e) : l;
|
|
376
|
+
v !== e && c(v);
|
|
377
|
+
} else
|
|
378
|
+
a(l);
|
|
379
|
+
},
|
|
380
|
+
[o, e, a, c]
|
|
381
|
+
);
|
|
382
|
+
return [s, d];
|
|
383
|
+
}
|
|
384
|
+
function rn({
|
|
385
|
+
defaultProp: e,
|
|
386
|
+
onChange: t
|
|
387
|
+
}) {
|
|
388
|
+
const n = i.useState(e), [r] = n, a = i.useRef(r), o = I(t);
|
|
389
|
+
return i.useEffect(() => {
|
|
390
|
+
a.current !== r && (o(r), a.current = r);
|
|
391
|
+
}, [r, a, o]), n;
|
|
392
|
+
}
|
|
393
|
+
var me = i.forwardRef((e, t) => {
|
|
394
|
+
const { children: n, ...r } = e, a = i.Children.toArray(n), o = a.find(on);
|
|
395
|
+
if (o) {
|
|
396
|
+
const s = o.props.children, c = a.map((d) => d === o ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : d);
|
|
397
|
+
return /* @__PURE__ */ g(le, { ...r, ref: t, children: i.isValidElement(s) ? i.cloneElement(s, void 0, c) : null });
|
|
398
|
+
}
|
|
399
|
+
return /* @__PURE__ */ g(le, { ...r, ref: t, children: n });
|
|
400
|
+
});
|
|
401
|
+
me.displayName = "Slot";
|
|
402
|
+
var le = i.forwardRef((e, t) => {
|
|
403
|
+
const { children: n, ...r } = e;
|
|
404
|
+
if (i.isValidElement(n)) {
|
|
405
|
+
const a = sn(n), o = cn(r, n.props);
|
|
406
|
+
return n.type !== i.Fragment && (o.ref = t ? ze(t, a) : a), i.cloneElement(n, o);
|
|
407
|
+
}
|
|
408
|
+
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
409
|
+
});
|
|
410
|
+
le.displayName = "SlotClone";
|
|
411
|
+
var an = ({ children: e }) => /* @__PURE__ */ g(ue, { children: e });
|
|
412
|
+
function on(e) {
|
|
413
|
+
return i.isValidElement(e) && e.type === an;
|
|
414
|
+
}
|
|
415
|
+
function cn(e, t) {
|
|
416
|
+
const n = { ...t };
|
|
417
|
+
for (const r in t) {
|
|
418
|
+
const a = e[r], o = t[r];
|
|
419
|
+
/^on[A-Z]/.test(r) ? a && o ? n[r] = (...c) => {
|
|
420
|
+
o(...c), a(...c);
|
|
421
|
+
} : a && (n[r] = a) : r === "style" ? n[r] = { ...a, ...o } : r === "className" && (n[r] = [a, o].filter(Boolean).join(" "));
|
|
422
|
+
}
|
|
423
|
+
return { ...e, ...n };
|
|
424
|
+
}
|
|
425
|
+
function sn(e) {
|
|
426
|
+
var r, a;
|
|
427
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
428
|
+
return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
429
|
+
}
|
|
430
|
+
var un = [
|
|
431
|
+
"a",
|
|
432
|
+
"button",
|
|
433
|
+
"div",
|
|
434
|
+
"form",
|
|
435
|
+
"h2",
|
|
436
|
+
"h3",
|
|
437
|
+
"img",
|
|
438
|
+
"input",
|
|
439
|
+
"label",
|
|
440
|
+
"li",
|
|
441
|
+
"nav",
|
|
442
|
+
"ol",
|
|
443
|
+
"p",
|
|
444
|
+
"span",
|
|
445
|
+
"svg",
|
|
446
|
+
"ul"
|
|
447
|
+
], D = un.reduce((e, t) => {
|
|
448
|
+
const n = i.forwardRef((r, a) => {
|
|
449
|
+
const { asChild: o, ...s } = r, c = o ? me : t;
|
|
450
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g(c, { ...s, ref: a });
|
|
451
|
+
});
|
|
452
|
+
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
453
|
+
}, {});
|
|
454
|
+
function ln(e, t) {
|
|
455
|
+
e && Pt.flushSync(() => e.dispatchEvent(t));
|
|
456
|
+
}
|
|
457
|
+
function dn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
458
|
+
const n = I(e);
|
|
459
|
+
i.useEffect(() => {
|
|
460
|
+
const r = (a) => {
|
|
461
|
+
a.key === "Escape" && n(a);
|
|
462
|
+
};
|
|
463
|
+
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
464
|
+
}, [n, t]);
|
|
465
|
+
}
|
|
466
|
+
var fn = "DismissableLayer", de = "dismissableLayer.update", vn = "dismissableLayer.pointerDownOutside", mn = "dismissableLayer.focusOutside", Re, He = i.createContext({
|
|
467
|
+
layers: /* @__PURE__ */ new Set(),
|
|
468
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
469
|
+
branches: /* @__PURE__ */ new Set()
|
|
470
|
+
}), Ke = i.forwardRef(
|
|
471
|
+
(e, t) => {
|
|
472
|
+
const {
|
|
473
|
+
disableOutsidePointerEvents: n = !1,
|
|
474
|
+
onEscapeKeyDown: r,
|
|
475
|
+
onPointerDownOutside: a,
|
|
476
|
+
onFocusOutside: o,
|
|
477
|
+
onInteractOutside: s,
|
|
478
|
+
onDismiss: c,
|
|
479
|
+
...d
|
|
480
|
+
} = e, l = i.useContext(He), [f, v] = i.useState(null), m = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = i.useState({}), E = _(t, (w) => v(w)), u = Array.from(l.layers), [h] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = u.indexOf(h), N = f ? u.indexOf(f) : -1, C = l.layersWithOutsidePointerEventsDisabled.size > 0, S = N >= b, P = gn((w) => {
|
|
481
|
+
const A = w.target, j = [...l.branches].some((ee) => ee.contains(A));
|
|
482
|
+
!S || j || (a == null || a(w), s == null || s(w), w.defaultPrevented || c == null || c());
|
|
483
|
+
}, m), x = yn((w) => {
|
|
484
|
+
const A = w.target;
|
|
485
|
+
[...l.branches].some((ee) => ee.contains(A)) || (o == null || o(w), s == null || s(w), w.defaultPrevented || c == null || c());
|
|
486
|
+
}, m);
|
|
487
|
+
return dn((w) => {
|
|
488
|
+
N === l.layers.size - 1 && (r == null || r(w), !w.defaultPrevented && c && (w.preventDefault(), c()));
|
|
489
|
+
}, m), i.useEffect(() => {
|
|
490
|
+
if (f)
|
|
491
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Re = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), xe(), () => {
|
|
492
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = Re);
|
|
493
|
+
};
|
|
494
|
+
}, [f, m, n, l]), i.useEffect(() => () => {
|
|
495
|
+
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), xe());
|
|
496
|
+
}, [f, l]), i.useEffect(() => {
|
|
497
|
+
const w = () => y({});
|
|
498
|
+
return document.addEventListener(de, w), () => document.removeEventListener(de, w);
|
|
499
|
+
}, []), /* @__PURE__ */ g(
|
|
500
|
+
D.div,
|
|
501
|
+
{
|
|
502
|
+
...d,
|
|
503
|
+
ref: E,
|
|
504
|
+
style: {
|
|
505
|
+
pointerEvents: C ? S ? "auto" : "none" : void 0,
|
|
506
|
+
...e.style
|
|
507
|
+
},
|
|
508
|
+
onFocusCapture: L(e.onFocusCapture, x.onFocusCapture),
|
|
509
|
+
onBlurCapture: L(e.onBlurCapture, x.onBlurCapture),
|
|
510
|
+
onPointerDownCapture: L(
|
|
511
|
+
e.onPointerDownCapture,
|
|
512
|
+
P.onPointerDownCapture
|
|
513
|
+
)
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
Ke.displayName = fn;
|
|
519
|
+
var pn = "DismissableLayerBranch", hn = i.forwardRef((e, t) => {
|
|
520
|
+
const n = i.useContext(He), r = i.useRef(null), a = _(t, r);
|
|
521
|
+
return i.useEffect(() => {
|
|
522
|
+
const o = r.current;
|
|
523
|
+
if (o)
|
|
524
|
+
return n.branches.add(o), () => {
|
|
525
|
+
n.branches.delete(o);
|
|
526
|
+
};
|
|
527
|
+
}, [n.branches]), /* @__PURE__ */ g(D.div, { ...e, ref: a });
|
|
528
|
+
});
|
|
529
|
+
hn.displayName = pn;
|
|
530
|
+
function gn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
531
|
+
const n = I(e), r = i.useRef(!1), a = i.useRef(() => {
|
|
532
|
+
});
|
|
533
|
+
return i.useEffect(() => {
|
|
534
|
+
const o = (c) => {
|
|
535
|
+
if (c.target && !r.current) {
|
|
536
|
+
let d = function() {
|
|
537
|
+
Ge(
|
|
538
|
+
vn,
|
|
539
|
+
n,
|
|
540
|
+
l,
|
|
541
|
+
{ discrete: !0 }
|
|
542
|
+
);
|
|
543
|
+
};
|
|
544
|
+
const l = { originalEvent: c };
|
|
545
|
+
c.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = d, t.addEventListener("click", a.current, { once: !0 })) : d();
|
|
546
|
+
} else
|
|
547
|
+
t.removeEventListener("click", a.current);
|
|
548
|
+
r.current = !1;
|
|
549
|
+
}, s = window.setTimeout(() => {
|
|
550
|
+
t.addEventListener("pointerdown", o);
|
|
551
|
+
}, 0);
|
|
552
|
+
return () => {
|
|
553
|
+
window.clearTimeout(s), t.removeEventListener("pointerdown", o), t.removeEventListener("click", a.current);
|
|
554
|
+
};
|
|
555
|
+
}, [t, n]), {
|
|
556
|
+
// ensures we check React component tree (not just DOM tree)
|
|
557
|
+
onPointerDownCapture: () => r.current = !0
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
function yn(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
561
|
+
const n = I(e), r = i.useRef(!1);
|
|
562
|
+
return i.useEffect(() => {
|
|
563
|
+
const a = (o) => {
|
|
564
|
+
o.target && !r.current && Ge(mn, n, { originalEvent: o }, {
|
|
565
|
+
discrete: !1
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
return t.addEventListener("focusin", a), () => t.removeEventListener("focusin", a);
|
|
569
|
+
}, [t, n]), {
|
|
570
|
+
onFocusCapture: () => r.current = !0,
|
|
571
|
+
onBlurCapture: () => r.current = !1
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
function xe() {
|
|
575
|
+
const e = new CustomEvent(de);
|
|
576
|
+
document.dispatchEvent(e);
|
|
577
|
+
}
|
|
578
|
+
function Ge(e, t, n, { discrete: r }) {
|
|
579
|
+
const a = n.originalEvent.target, o = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
580
|
+
t && a.addEventListener(e, t, { once: !0 }), r ? ln(a, o) : a.dispatchEvent(o);
|
|
581
|
+
}
|
|
582
|
+
var ne = "focusScope.autoFocusOnMount", re = "focusScope.autoFocusOnUnmount", Ae = { bubbles: !1, cancelable: !0 }, bn = "FocusScope", Xe = i.forwardRef((e, t) => {
|
|
583
|
+
const {
|
|
584
|
+
loop: n = !1,
|
|
585
|
+
trapped: r = !1,
|
|
586
|
+
onMountAutoFocus: a,
|
|
587
|
+
onUnmountAutoFocus: o,
|
|
588
|
+
...s
|
|
589
|
+
} = e, [c, d] = i.useState(null), l = I(a), f = I(o), v = i.useRef(null), m = _(t, (u) => d(u)), y = i.useRef({
|
|
590
|
+
paused: !1,
|
|
591
|
+
pause() {
|
|
592
|
+
this.paused = !0;
|
|
593
|
+
},
|
|
594
|
+
resume() {
|
|
595
|
+
this.paused = !1;
|
|
596
|
+
}
|
|
597
|
+
}).current;
|
|
598
|
+
i.useEffect(() => {
|
|
599
|
+
if (r) {
|
|
600
|
+
let u = function(C) {
|
|
601
|
+
if (y.paused || !c) return;
|
|
602
|
+
const S = C.target;
|
|
603
|
+
c.contains(S) ? v.current = S : M(v.current, { select: !0 });
|
|
604
|
+
}, h = function(C) {
|
|
605
|
+
if (y.paused || !c) return;
|
|
606
|
+
const S = C.relatedTarget;
|
|
607
|
+
S !== null && (c.contains(S) || M(v.current, { select: !0 }));
|
|
608
|
+
}, b = function(C) {
|
|
609
|
+
if (document.activeElement === document.body)
|
|
610
|
+
for (const P of C)
|
|
611
|
+
P.removedNodes.length > 0 && M(c);
|
|
612
|
+
};
|
|
613
|
+
document.addEventListener("focusin", u), document.addEventListener("focusout", h);
|
|
614
|
+
const N = new MutationObserver(b);
|
|
615
|
+
return c && N.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
616
|
+
document.removeEventListener("focusin", u), document.removeEventListener("focusout", h), N.disconnect();
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
}, [r, c, y.paused]), i.useEffect(() => {
|
|
620
|
+
if (c) {
|
|
621
|
+
Me.add(y);
|
|
622
|
+
const u = document.activeElement;
|
|
623
|
+
if (!c.contains(u)) {
|
|
624
|
+
const b = new CustomEvent(ne, Ae);
|
|
625
|
+
c.addEventListener(ne, l), c.dispatchEvent(b), b.defaultPrevented || (En(Nn(Ye(c)), { select: !0 }), document.activeElement === u && M(c));
|
|
626
|
+
}
|
|
627
|
+
return () => {
|
|
628
|
+
c.removeEventListener(ne, l), setTimeout(() => {
|
|
629
|
+
const b = new CustomEvent(re, Ae);
|
|
630
|
+
c.addEventListener(re, f), c.dispatchEvent(b), b.defaultPrevented || M(u ?? document.body, { select: !0 }), c.removeEventListener(re, f), Me.remove(y);
|
|
631
|
+
}, 0);
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
}, [c, l, f, y]);
|
|
635
|
+
const E = i.useCallback(
|
|
636
|
+
(u) => {
|
|
637
|
+
if (!n && !r || y.paused) return;
|
|
638
|
+
const h = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, b = document.activeElement;
|
|
639
|
+
if (h && b) {
|
|
640
|
+
const N = u.currentTarget, [C, S] = wn(N);
|
|
641
|
+
C && S ? !u.shiftKey && b === S ? (u.preventDefault(), n && M(C, { select: !0 })) : u.shiftKey && b === C && (u.preventDefault(), n && M(S, { select: !0 })) : b === N && u.preventDefault();
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
[n, r, y.paused]
|
|
645
|
+
);
|
|
646
|
+
return /* @__PURE__ */ g(D.div, { tabIndex: -1, ...s, ref: m, onKeyDown: E });
|
|
647
|
+
});
|
|
648
|
+
Xe.displayName = bn;
|
|
649
|
+
function En(e, { select: t = !1 } = {}) {
|
|
650
|
+
const n = document.activeElement;
|
|
651
|
+
for (const r of e)
|
|
652
|
+
if (M(r, { select: t }), document.activeElement !== n) return;
|
|
653
|
+
}
|
|
654
|
+
function wn(e) {
|
|
655
|
+
const t = Ye(e), n = De(t, e), r = De(t.reverse(), e);
|
|
656
|
+
return [n, r];
|
|
657
|
+
}
|
|
658
|
+
function Ye(e) {
|
|
659
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
660
|
+
acceptNode: (r) => {
|
|
661
|
+
const a = r.tagName === "INPUT" && r.type === "hidden";
|
|
662
|
+
return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
666
|
+
return t;
|
|
667
|
+
}
|
|
668
|
+
function De(e, t) {
|
|
669
|
+
for (const n of e)
|
|
670
|
+
if (!Cn(n, { upTo: t })) return n;
|
|
671
|
+
}
|
|
672
|
+
function Cn(e, { upTo: t }) {
|
|
673
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
674
|
+
for (; e; ) {
|
|
675
|
+
if (t !== void 0 && e === t) return !1;
|
|
676
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
677
|
+
e = e.parentElement;
|
|
678
|
+
}
|
|
679
|
+
return !1;
|
|
680
|
+
}
|
|
681
|
+
function Sn(e) {
|
|
682
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
683
|
+
}
|
|
684
|
+
function M(e, { select: t = !1 } = {}) {
|
|
685
|
+
if (e && e.focus) {
|
|
686
|
+
const n = document.activeElement;
|
|
687
|
+
e.focus({ preventScroll: !0 }), e !== n && Sn(e) && t && e.select();
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
var Me = Pn();
|
|
691
|
+
function Pn() {
|
|
692
|
+
let e = [];
|
|
693
|
+
return {
|
|
694
|
+
add(t) {
|
|
695
|
+
const n = e[0];
|
|
696
|
+
t !== n && (n == null || n.pause()), e = Le(e, t), e.unshift(t);
|
|
697
|
+
},
|
|
698
|
+
remove(t) {
|
|
699
|
+
var n;
|
|
700
|
+
e = Le(e, t), (n = e[0]) == null || n.resume();
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
function Le(e, t) {
|
|
705
|
+
const n = [...e], r = n.indexOf(t);
|
|
706
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
707
|
+
}
|
|
708
|
+
function Nn(e) {
|
|
709
|
+
return e.filter((t) => t.tagName !== "A");
|
|
710
|
+
}
|
|
711
|
+
var On = "Portal", qe = i.forwardRef((e, t) => {
|
|
712
|
+
var c;
|
|
713
|
+
const { container: n, ...r } = e, [a, o] = i.useState(!1);
|
|
714
|
+
Y(() => o(!0), []);
|
|
715
|
+
const s = n || a && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
|
|
716
|
+
return s ? Nt.createPortal(/* @__PURE__ */ g(D.div, { ...r, ref: t }), s) : null;
|
|
717
|
+
});
|
|
718
|
+
qe.displayName = On;
|
|
719
|
+
function Rn(e, t) {
|
|
720
|
+
return i.useReducer((n, r) => t[n][r] ?? n, e);
|
|
721
|
+
}
|
|
722
|
+
var Q = (e) => {
|
|
723
|
+
const { present: t, children: n } = e, r = xn(t), a = typeof n == "function" ? n({ present: r.isPresent }) : i.Children.only(n), o = _(r.ref, An(a));
|
|
724
|
+
return typeof n == "function" || r.isPresent ? i.cloneElement(a, { ref: o }) : null;
|
|
725
|
+
};
|
|
726
|
+
Q.displayName = "Presence";
|
|
727
|
+
function xn(e) {
|
|
728
|
+
const [t, n] = i.useState(), r = i.useRef({}), a = i.useRef(e), o = i.useRef("none"), s = e ? "mounted" : "unmounted", [c, d] = Rn(s, {
|
|
729
|
+
mounted: {
|
|
730
|
+
UNMOUNT: "unmounted",
|
|
731
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
732
|
+
},
|
|
733
|
+
unmountSuspended: {
|
|
734
|
+
MOUNT: "mounted",
|
|
735
|
+
ANIMATION_END: "unmounted"
|
|
736
|
+
},
|
|
737
|
+
unmounted: {
|
|
738
|
+
MOUNT: "mounted"
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
return i.useEffect(() => {
|
|
742
|
+
const l = U(r.current);
|
|
743
|
+
o.current = c === "mounted" ? l : "none";
|
|
744
|
+
}, [c]), Y(() => {
|
|
745
|
+
const l = r.current, f = a.current;
|
|
746
|
+
if (f !== e) {
|
|
747
|
+
const m = o.current, y = U(l);
|
|
748
|
+
e ? d("MOUNT") : y === "none" || (l == null ? void 0 : l.display) === "none" ? d("UNMOUNT") : d(f && m !== y ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
749
|
+
}
|
|
750
|
+
}, [e, d]), Y(() => {
|
|
751
|
+
if (t) {
|
|
752
|
+
let l;
|
|
753
|
+
const f = t.ownerDocument.defaultView ?? window, v = (y) => {
|
|
754
|
+
const u = U(r.current).includes(y.animationName);
|
|
755
|
+
if (y.target === t && u && (d("ANIMATION_END"), !a.current)) {
|
|
756
|
+
const h = t.style.animationFillMode;
|
|
757
|
+
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
758
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = h);
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
}, m = (y) => {
|
|
762
|
+
y.target === t && (o.current = U(r.current));
|
|
763
|
+
};
|
|
764
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
|
|
765
|
+
f.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
|
|
766
|
+
};
|
|
767
|
+
} else
|
|
768
|
+
d("ANIMATION_END");
|
|
769
|
+
}, [t, d]), {
|
|
770
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
771
|
+
ref: i.useCallback((l) => {
|
|
772
|
+
l && (r.current = getComputedStyle(l)), n(l);
|
|
773
|
+
}, [])
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
function U(e) {
|
|
777
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
778
|
+
}
|
|
779
|
+
function An(e) {
|
|
780
|
+
var r, a;
|
|
781
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
782
|
+
return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
783
|
+
}
|
|
784
|
+
var ae = 0;
|
|
785
|
+
function Dn() {
|
|
786
|
+
i.useEffect(() => {
|
|
787
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
788
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Te()), document.body.insertAdjacentElement("beforeend", e[1] ?? Te()), ae++, () => {
|
|
789
|
+
ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ae--;
|
|
790
|
+
};
|
|
791
|
+
}, []);
|
|
792
|
+
}
|
|
793
|
+
function Te() {
|
|
794
|
+
const e = document.createElement("span");
|
|
795
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
796
|
+
}
|
|
797
|
+
var R = function() {
|
|
798
|
+
return R = Object.assign || function(t) {
|
|
799
|
+
for (var n, r = 1, a = arguments.length; r < a; r++) {
|
|
800
|
+
n = arguments[r];
|
|
801
|
+
for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
802
|
+
}
|
|
803
|
+
return t;
|
|
804
|
+
}, R.apply(this, arguments);
|
|
805
|
+
};
|
|
806
|
+
function Qe(e, t) {
|
|
807
|
+
var n = {};
|
|
808
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
809
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
810
|
+
for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
|
|
811
|
+
t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
|
|
812
|
+
return n;
|
|
813
|
+
}
|
|
814
|
+
function Mn(e, t, n) {
|
|
815
|
+
if (n || arguments.length === 2) for (var r = 0, a = t.length, o; r < a; r++)
|
|
816
|
+
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
817
|
+
return e.concat(o || Array.prototype.slice.call(t));
|
|
818
|
+
}
|
|
819
|
+
var K = "right-scroll-bar-position", G = "width-before-scroll-bar", Ln = "with-scroll-bars-hidden", Tn = "--removed-body-scroll-bar-size";
|
|
820
|
+
function oe(e, t) {
|
|
821
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
822
|
+
}
|
|
823
|
+
function In(e, t) {
|
|
824
|
+
var n = St(function() {
|
|
825
|
+
return {
|
|
826
|
+
// value
|
|
827
|
+
value: e,
|
|
828
|
+
// last callback
|
|
829
|
+
callback: t,
|
|
830
|
+
// "memoized" public interface
|
|
831
|
+
facade: {
|
|
832
|
+
get current() {
|
|
833
|
+
return n.value;
|
|
834
|
+
},
|
|
835
|
+
set current(r) {
|
|
836
|
+
var a = n.value;
|
|
837
|
+
a !== r && (n.value = r, n.callback(r, a));
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
})[0];
|
|
842
|
+
return n.callback = t, n.facade;
|
|
843
|
+
}
|
|
844
|
+
var Fn = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Ie = /* @__PURE__ */ new WeakMap();
|
|
845
|
+
function _n(e, t) {
|
|
846
|
+
var n = In(null, function(r) {
|
|
847
|
+
return e.forEach(function(a) {
|
|
848
|
+
return oe(a, r);
|
|
849
|
+
});
|
|
850
|
+
});
|
|
851
|
+
return Fn(function() {
|
|
852
|
+
var r = Ie.get(n);
|
|
853
|
+
if (r) {
|
|
854
|
+
var a = new Set(r), o = new Set(e), s = n.current;
|
|
855
|
+
a.forEach(function(c) {
|
|
856
|
+
o.has(c) || oe(c, null);
|
|
857
|
+
}), o.forEach(function(c) {
|
|
858
|
+
a.has(c) || oe(c, s);
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
Ie.set(n, e);
|
|
862
|
+
}, [e]), n;
|
|
863
|
+
}
|
|
864
|
+
function kn(e) {
|
|
865
|
+
return e;
|
|
866
|
+
}
|
|
867
|
+
function Wn(e, t) {
|
|
868
|
+
t === void 0 && (t = kn);
|
|
869
|
+
var n = [], r = !1, a = {
|
|
870
|
+
read: function() {
|
|
871
|
+
if (r)
|
|
872
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
873
|
+
return n.length ? n[n.length - 1] : e;
|
|
874
|
+
},
|
|
875
|
+
useMedium: function(o) {
|
|
876
|
+
var s = t(o, r);
|
|
877
|
+
return n.push(s), function() {
|
|
878
|
+
n = n.filter(function(c) {
|
|
879
|
+
return c !== s;
|
|
880
|
+
});
|
|
881
|
+
};
|
|
882
|
+
},
|
|
883
|
+
assignSyncMedium: function(o) {
|
|
884
|
+
for (r = !0; n.length; ) {
|
|
885
|
+
var s = n;
|
|
886
|
+
n = [], s.forEach(o);
|
|
887
|
+
}
|
|
888
|
+
n = {
|
|
889
|
+
push: function(c) {
|
|
890
|
+
return o(c);
|
|
891
|
+
},
|
|
892
|
+
filter: function() {
|
|
893
|
+
return n;
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
},
|
|
897
|
+
assignMedium: function(o) {
|
|
898
|
+
r = !0;
|
|
899
|
+
var s = [];
|
|
900
|
+
if (n.length) {
|
|
901
|
+
var c = n;
|
|
902
|
+
n = [], c.forEach(o), s = n;
|
|
903
|
+
}
|
|
904
|
+
var d = function() {
|
|
905
|
+
var f = s;
|
|
906
|
+
s = [], f.forEach(o);
|
|
907
|
+
}, l = function() {
|
|
908
|
+
return Promise.resolve().then(d);
|
|
909
|
+
};
|
|
910
|
+
l(), n = {
|
|
911
|
+
push: function(f) {
|
|
912
|
+
s.push(f), l();
|
|
913
|
+
},
|
|
914
|
+
filter: function(f) {
|
|
915
|
+
return s = s.filter(f), n;
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
return a;
|
|
921
|
+
}
|
|
922
|
+
function Bn(e) {
|
|
923
|
+
e === void 0 && (e = {});
|
|
924
|
+
var t = Wn(null);
|
|
925
|
+
return t.options = R({ async: !0, ssr: !1 }, e), t;
|
|
926
|
+
}
|
|
927
|
+
var Je = function(e) {
|
|
928
|
+
var t = e.sideCar, n = Qe(e, ["sideCar"]);
|
|
929
|
+
if (!t)
|
|
930
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
931
|
+
var r = t.read();
|
|
932
|
+
if (!r)
|
|
933
|
+
throw new Error("Sidecar medium not found");
|
|
934
|
+
return i.createElement(r, R({}, n));
|
|
935
|
+
};
|
|
936
|
+
Je.isSideCarExport = !0;
|
|
937
|
+
function $n(e, t) {
|
|
938
|
+
return e.useMedium(t), Je;
|
|
939
|
+
}
|
|
940
|
+
var et = Bn(), ie = function() {
|
|
941
|
+
}, J = i.forwardRef(function(e, t) {
|
|
942
|
+
var n = i.useRef(null), r = i.useState({
|
|
943
|
+
onScrollCapture: ie,
|
|
944
|
+
onWheelCapture: ie,
|
|
945
|
+
onTouchMoveCapture: ie
|
|
946
|
+
}), a = r[0], o = r[1], s = e.forwardProps, c = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, v = e.shards, m = e.sideCar, y = e.noIsolation, E = e.inert, u = e.allowPinchZoom, h = e.as, b = h === void 0 ? "div" : h, N = e.gapMode, C = Qe(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, P = _n([n, t]), x = R(R({}, C), a);
|
|
947
|
+
return i.createElement(
|
|
948
|
+
i.Fragment,
|
|
949
|
+
null,
|
|
950
|
+
f && i.createElement(S, { sideCar: et, removeScrollBar: l, shards: v, noIsolation: y, inert: E, setCallbacks: o, allowPinchZoom: !!u, lockRef: n, gapMode: N }),
|
|
951
|
+
s ? i.cloneElement(i.Children.only(c), R(R({}, x), { ref: P })) : i.createElement(b, R({}, x, { className: d, ref: P }), c)
|
|
952
|
+
);
|
|
953
|
+
});
|
|
954
|
+
J.defaultProps = {
|
|
955
|
+
enabled: !0,
|
|
956
|
+
removeScrollBar: !0,
|
|
957
|
+
inert: !1
|
|
958
|
+
};
|
|
959
|
+
J.classNames = {
|
|
960
|
+
fullWidth: G,
|
|
961
|
+
zeroRight: K
|
|
962
|
+
};
|
|
963
|
+
var tt = function() {
|
|
964
|
+
if (typeof __webpack_nonce__ < "u")
|
|
965
|
+
return __webpack_nonce__;
|
|
966
|
+
};
|
|
967
|
+
function jn() {
|
|
968
|
+
if (!document)
|
|
969
|
+
return null;
|
|
970
|
+
var e = document.createElement("style");
|
|
971
|
+
e.type = "text/css";
|
|
972
|
+
var t = tt();
|
|
973
|
+
return t && e.setAttribute("nonce", t), e;
|
|
974
|
+
}
|
|
975
|
+
function Un(e, t) {
|
|
976
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
977
|
+
}
|
|
978
|
+
function Vn(e) {
|
|
979
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
980
|
+
t.appendChild(e);
|
|
981
|
+
}
|
|
982
|
+
var Zn = function() {
|
|
983
|
+
var e = 0, t = null;
|
|
984
|
+
return {
|
|
985
|
+
add: function(n) {
|
|
986
|
+
e == 0 && (t = jn()) && (Un(t, n), Vn(t)), e++;
|
|
987
|
+
},
|
|
988
|
+
remove: function() {
|
|
989
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
990
|
+
}
|
|
991
|
+
};
|
|
992
|
+
}, zn = function() {
|
|
993
|
+
var e = Zn();
|
|
994
|
+
return function(t, n) {
|
|
995
|
+
i.useEffect(function() {
|
|
996
|
+
return e.add(t), function() {
|
|
997
|
+
e.remove();
|
|
998
|
+
};
|
|
999
|
+
}, [t && n]);
|
|
1000
|
+
};
|
|
1001
|
+
}, Hn = function() {
|
|
1002
|
+
var e = zn(), t = function(n) {
|
|
1003
|
+
var r = n.styles, a = n.dynamic;
|
|
1004
|
+
return e(r, a), null;
|
|
1005
|
+
};
|
|
1006
|
+
return t;
|
|
1007
|
+
}, Kn = {
|
|
1008
|
+
left: 0,
|
|
1009
|
+
top: 0,
|
|
1010
|
+
right: 0,
|
|
1011
|
+
gap: 0
|
|
1012
|
+
}, ce = function(e) {
|
|
1013
|
+
return parseInt(e || "", 10) || 0;
|
|
1014
|
+
}, Gn = function(e) {
|
|
1015
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1016
|
+
return [ce(n), ce(r), ce(a)];
|
|
1017
|
+
}, Xn = function(e) {
|
|
1018
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1019
|
+
return Kn;
|
|
1020
|
+
var t = Gn(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1021
|
+
return {
|
|
1022
|
+
left: t[0],
|
|
1023
|
+
top: t[1],
|
|
1024
|
+
right: t[2],
|
|
1025
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1026
|
+
};
|
|
1027
|
+
}, Yn = Hn(), $ = "data-scroll-locked", qn = function(e, t, n, r) {
|
|
1028
|
+
var a = e.left, o = e.top, s = e.right, c = e.gap;
|
|
1029
|
+
return n === void 0 && (n = "margin"), `
|
|
1030
|
+
.`.concat(Ln, ` {
|
|
1031
|
+
overflow: hidden `).concat(r, `;
|
|
1032
|
+
padding-right: `).concat(c, "px ").concat(r, `;
|
|
1033
|
+
}
|
|
1034
|
+
body[`).concat($, `] {
|
|
1035
|
+
overflow: hidden `).concat(r, `;
|
|
1036
|
+
overscroll-behavior: contain;
|
|
1037
|
+
`).concat([
|
|
1038
|
+
t && "position: relative ".concat(r, ";"),
|
|
1039
|
+
n === "margin" && `
|
|
1040
|
+
padding-left: `.concat(a, `px;
|
|
1041
|
+
padding-top: `).concat(o, `px;
|
|
1042
|
+
padding-right: `).concat(s, `px;
|
|
1043
|
+
margin-left:0;
|
|
1044
|
+
margin-top:0;
|
|
1045
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
1046
|
+
`),
|
|
1047
|
+
n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
|
|
1048
|
+
].filter(Boolean).join(""), `
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.`).concat(K, ` {
|
|
1052
|
+
right: `).concat(c, "px ").concat(r, `;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
.`).concat(G, ` {
|
|
1056
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.`).concat(K, " .").concat(K, ` {
|
|
1060
|
+
right: 0 `).concat(r, `;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.`).concat(G, " .").concat(G, ` {
|
|
1064
|
+
margin-right: 0 `).concat(r, `;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
body[`).concat($, `] {
|
|
1068
|
+
`).concat(Tn, ": ").concat(c, `px;
|
|
1069
|
+
}
|
|
1070
|
+
`);
|
|
1071
|
+
}, Fe = function() {
|
|
1072
|
+
var e = parseInt(document.body.getAttribute($) || "0", 10);
|
|
1073
|
+
return isFinite(e) ? e : 0;
|
|
1074
|
+
}, Qn = function() {
|
|
1075
|
+
i.useEffect(function() {
|
|
1076
|
+
return document.body.setAttribute($, (Fe() + 1).toString()), function() {
|
|
1077
|
+
var e = Fe() - 1;
|
|
1078
|
+
e <= 0 ? document.body.removeAttribute($) : document.body.setAttribute($, e.toString());
|
|
1079
|
+
};
|
|
1080
|
+
}, []);
|
|
1081
|
+
}, Jn = function(e) {
|
|
1082
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
|
|
1083
|
+
Qn();
|
|
1084
|
+
var o = i.useMemo(function() {
|
|
1085
|
+
return Xn(a);
|
|
1086
|
+
}, [a]);
|
|
1087
|
+
return i.createElement(Yn, { styles: qn(o, !t, a, n ? "" : "!important") });
|
|
1088
|
+
};
|
|
1089
|
+
function er() {
|
|
1090
|
+
if (!document)
|
|
1091
|
+
return null;
|
|
1092
|
+
var e = document.createElement("style");
|
|
1093
|
+
e.type = "text/css";
|
|
1094
|
+
var t = tt();
|
|
1095
|
+
return t && e.setAttribute("nonce", t), e;
|
|
1096
|
+
}
|
|
1097
|
+
function tr(e, t) {
|
|
1098
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1099
|
+
}
|
|
1100
|
+
function nr(e) {
|
|
1101
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1102
|
+
t.appendChild(e);
|
|
1103
|
+
}
|
|
1104
|
+
var rr = function() {
|
|
1105
|
+
var e = 0, t = null;
|
|
1106
|
+
return {
|
|
1107
|
+
add: function(n) {
|
|
1108
|
+
e == 0 && (t = er()) && (tr(t, n), nr(t)), e++;
|
|
1109
|
+
},
|
|
1110
|
+
remove: function() {
|
|
1111
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1112
|
+
}
|
|
1113
|
+
};
|
|
1114
|
+
}, ar = function() {
|
|
1115
|
+
var e = rr();
|
|
1116
|
+
return function(t, n) {
|
|
1117
|
+
i.useEffect(function() {
|
|
1118
|
+
return e.add(t), function() {
|
|
1119
|
+
e.remove();
|
|
1120
|
+
};
|
|
1121
|
+
}, [t && n]);
|
|
1122
|
+
};
|
|
1123
|
+
}, or = function() {
|
|
1124
|
+
var e = ar(), t = function(n) {
|
|
1125
|
+
var r = n.styles, a = n.dynamic;
|
|
1126
|
+
return e(r, a), null;
|
|
1127
|
+
};
|
|
1128
|
+
return t;
|
|
1129
|
+
}, fe = !1;
|
|
1130
|
+
if (typeof window < "u")
|
|
1131
|
+
try {
|
|
1132
|
+
var V = Object.defineProperty({}, "passive", {
|
|
1133
|
+
get: function() {
|
|
1134
|
+
return fe = !0, !0;
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
window.addEventListener("test", V, V), window.removeEventListener("test", V, V);
|
|
1138
|
+
} catch {
|
|
1139
|
+
fe = !1;
|
|
1140
|
+
}
|
|
1141
|
+
var k = fe ? { passive: !1 } : !1, ir = function(e) {
|
|
1142
|
+
return e.tagName === "TEXTAREA";
|
|
1143
|
+
}, nt = function(e, t) {
|
|
1144
|
+
if (!(e instanceof Element))
|
|
1145
|
+
return !1;
|
|
1146
|
+
var n = window.getComputedStyle(e);
|
|
1147
|
+
return (
|
|
1148
|
+
// not-not-scrollable
|
|
1149
|
+
n[t] !== "hidden" && // contains scroll inside self
|
|
1150
|
+
!(n.overflowY === n.overflowX && !ir(e) && n[t] === "visible")
|
|
1151
|
+
);
|
|
1152
|
+
}, cr = function(e) {
|
|
1153
|
+
return nt(e, "overflowY");
|
|
1154
|
+
}, sr = function(e) {
|
|
1155
|
+
return nt(e, "overflowX");
|
|
1156
|
+
}, _e = function(e, t) {
|
|
1157
|
+
var n = t.ownerDocument, r = t;
|
|
1158
|
+
do {
|
|
1159
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
1160
|
+
var a = rt(e, r);
|
|
1161
|
+
if (a) {
|
|
1162
|
+
var o = at(e, r), s = o[1], c = o[2];
|
|
1163
|
+
if (s > c)
|
|
1164
|
+
return !0;
|
|
1165
|
+
}
|
|
1166
|
+
r = r.parentNode;
|
|
1167
|
+
} while (r && r !== n.body);
|
|
1168
|
+
return !1;
|
|
1169
|
+
}, ur = function(e) {
|
|
1170
|
+
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
1171
|
+
return [
|
|
1172
|
+
t,
|
|
1173
|
+
n,
|
|
1174
|
+
r
|
|
1175
|
+
];
|
|
1176
|
+
}, lr = function(e) {
|
|
1177
|
+
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
1178
|
+
return [
|
|
1179
|
+
t,
|
|
1180
|
+
n,
|
|
1181
|
+
r
|
|
1182
|
+
];
|
|
1183
|
+
}, rt = function(e, t) {
|
|
1184
|
+
return e === "v" ? cr(t) : sr(t);
|
|
1185
|
+
}, at = function(e, t) {
|
|
1186
|
+
return e === "v" ? ur(t) : lr(t);
|
|
1187
|
+
}, dr = function(e, t) {
|
|
1188
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1189
|
+
}, fr = function(e, t, n, r, a) {
|
|
1190
|
+
var o = dr(e, window.getComputedStyle(t).direction), s = o * r, c = n.target, d = t.contains(c), l = !1, f = s > 0, v = 0, m = 0;
|
|
1191
|
+
do {
|
|
1192
|
+
var y = at(e, c), E = y[0], u = y[1], h = y[2], b = u - h - o * E;
|
|
1193
|
+
(E || b) && rt(e, c) && (v += b, m += E), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
|
|
1194
|
+
} while (
|
|
1195
|
+
// portaled content
|
|
1196
|
+
!d && c !== document.body || // self content
|
|
1197
|
+
d && (t.contains(c) || t === c)
|
|
1198
|
+
);
|
|
1199
|
+
return (f && Math.abs(v) < 1 || !f && Math.abs(m) < 1) && (l = !0), l;
|
|
1200
|
+
}, Z = function(e) {
|
|
1201
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1202
|
+
}, ke = function(e) {
|
|
1203
|
+
return [e.deltaX, e.deltaY];
|
|
1204
|
+
}, We = function(e) {
|
|
1205
|
+
return e && "current" in e ? e.current : e;
|
|
1206
|
+
}, vr = function(e, t) {
|
|
1207
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
1208
|
+
}, mr = function(e) {
|
|
1209
|
+
return `
|
|
1210
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1211
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1212
|
+
`);
|
|
1213
|
+
}, pr = 0, W = [];
|
|
1214
|
+
function hr(e) {
|
|
1215
|
+
var t = i.useRef([]), n = i.useRef([0, 0]), r = i.useRef(), a = i.useState(pr++)[0], o = i.useState(or)[0], s = i.useRef(e);
|
|
1216
|
+
i.useEffect(function() {
|
|
1217
|
+
s.current = e;
|
|
1218
|
+
}, [e]), i.useEffect(function() {
|
|
1219
|
+
if (e.inert) {
|
|
1220
|
+
document.body.classList.add("block-interactivity-".concat(a));
|
|
1221
|
+
var u = Mn([e.lockRef.current], (e.shards || []).map(We), !0).filter(Boolean);
|
|
1222
|
+
return u.forEach(function(h) {
|
|
1223
|
+
return h.classList.add("allow-interactivity-".concat(a));
|
|
1224
|
+
}), function() {
|
|
1225
|
+
document.body.classList.remove("block-interactivity-".concat(a)), u.forEach(function(h) {
|
|
1226
|
+
return h.classList.remove("allow-interactivity-".concat(a));
|
|
1227
|
+
});
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1231
|
+
var c = i.useCallback(function(u, h) {
|
|
1232
|
+
if ("touches" in u && u.touches.length === 2 || u.type === "wheel" && u.ctrlKey)
|
|
1233
|
+
return !s.current.allowPinchZoom;
|
|
1234
|
+
var b = Z(u), N = n.current, C = "deltaX" in u ? u.deltaX : N[0] - b[0], S = "deltaY" in u ? u.deltaY : N[1] - b[1], P, x = u.target, w = Math.abs(C) > Math.abs(S) ? "h" : "v";
|
|
1235
|
+
if ("touches" in u && w === "h" && x.type === "range")
|
|
1236
|
+
return !1;
|
|
1237
|
+
var A = _e(w, x);
|
|
1238
|
+
if (!A)
|
|
1239
|
+
return !0;
|
|
1240
|
+
if (A ? P = w : (P = w === "v" ? "h" : "v", A = _e(w, x)), !A)
|
|
1241
|
+
return !1;
|
|
1242
|
+
if (!r.current && "changedTouches" in u && (C || S) && (r.current = P), !P)
|
|
1243
|
+
return !0;
|
|
1244
|
+
var j = r.current || P;
|
|
1245
|
+
return fr(j, h, u, j === "h" ? C : S);
|
|
1246
|
+
}, []), d = i.useCallback(function(u) {
|
|
1247
|
+
var h = u;
|
|
1248
|
+
if (!(!W.length || W[W.length - 1] !== o)) {
|
|
1249
|
+
var b = "deltaY" in h ? ke(h) : Z(h), N = t.current.filter(function(P) {
|
|
1250
|
+
return P.name === h.type && (P.target === h.target || h.target === P.shadowParent) && vr(P.delta, b);
|
|
1251
|
+
})[0];
|
|
1252
|
+
if (N && N.should) {
|
|
1253
|
+
h.cancelable && h.preventDefault();
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
if (!N) {
|
|
1257
|
+
var C = (s.current.shards || []).map(We).filter(Boolean).filter(function(P) {
|
|
1258
|
+
return P.contains(h.target);
|
|
1259
|
+
}), S = C.length > 0 ? c(h, C[0]) : !s.current.noIsolation;
|
|
1260
|
+
S && h.cancelable && h.preventDefault();
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}, []), l = i.useCallback(function(u, h, b, N) {
|
|
1264
|
+
var C = { name: u, delta: h, target: b, should: N, shadowParent: gr(b) };
|
|
1265
|
+
t.current.push(C), setTimeout(function() {
|
|
1266
|
+
t.current = t.current.filter(function(S) {
|
|
1267
|
+
return S !== C;
|
|
1268
|
+
});
|
|
1269
|
+
}, 1);
|
|
1270
|
+
}, []), f = i.useCallback(function(u) {
|
|
1271
|
+
n.current = Z(u), r.current = void 0;
|
|
1272
|
+
}, []), v = i.useCallback(function(u) {
|
|
1273
|
+
l(u.type, ke(u), u.target, c(u, e.lockRef.current));
|
|
1274
|
+
}, []), m = i.useCallback(function(u) {
|
|
1275
|
+
l(u.type, Z(u), u.target, c(u, e.lockRef.current));
|
|
1276
|
+
}, []);
|
|
1277
|
+
i.useEffect(function() {
|
|
1278
|
+
return W.push(o), e.setCallbacks({
|
|
1279
|
+
onScrollCapture: v,
|
|
1280
|
+
onWheelCapture: v,
|
|
1281
|
+
onTouchMoveCapture: m
|
|
1282
|
+
}), document.addEventListener("wheel", d, k), document.addEventListener("touchmove", d, k), document.addEventListener("touchstart", f, k), function() {
|
|
1283
|
+
W = W.filter(function(u) {
|
|
1284
|
+
return u !== o;
|
|
1285
|
+
}), document.removeEventListener("wheel", d, k), document.removeEventListener("touchmove", d, k), document.removeEventListener("touchstart", f, k);
|
|
1286
|
+
};
|
|
1287
|
+
}, []);
|
|
1288
|
+
var y = e.removeScrollBar, E = e.inert;
|
|
1289
|
+
return i.createElement(
|
|
1290
|
+
i.Fragment,
|
|
1291
|
+
null,
|
|
1292
|
+
E ? i.createElement(o, { styles: mr(a) }) : null,
|
|
1293
|
+
y ? i.createElement(Jn, { gapMode: e.gapMode }) : null
|
|
1294
|
+
);
|
|
1295
|
+
}
|
|
1296
|
+
function gr(e) {
|
|
1297
|
+
for (var t = null; e !== null; )
|
|
1298
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1299
|
+
return t;
|
|
1300
|
+
}
|
|
1301
|
+
const yr = $n(et, hr);
|
|
1302
|
+
var ot = i.forwardRef(function(e, t) {
|
|
1303
|
+
return i.createElement(J, R({}, e, { ref: t, sideCar: yr }));
|
|
1304
|
+
});
|
|
1305
|
+
ot.classNames = J.classNames;
|
|
1306
|
+
var br = function(e) {
|
|
1307
|
+
if (typeof document > "u")
|
|
1308
|
+
return null;
|
|
1309
|
+
var t = Array.isArray(e) ? e[0] : e;
|
|
1310
|
+
return t.ownerDocument.body;
|
|
1311
|
+
}, B = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), H = {}, se = 0, it = function(e) {
|
|
1312
|
+
return e && (e.host || it(e.parentNode));
|
|
1313
|
+
}, Er = function(e, t) {
|
|
1314
|
+
return t.map(function(n) {
|
|
1315
|
+
if (e.contains(n))
|
|
1316
|
+
return n;
|
|
1317
|
+
var r = it(n);
|
|
1318
|
+
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
1319
|
+
}).filter(function(n) {
|
|
1320
|
+
return !!n;
|
|
1321
|
+
});
|
|
1322
|
+
}, wr = function(e, t, n, r) {
|
|
1323
|
+
var a = Er(t, Array.isArray(e) ? e : [e]);
|
|
1324
|
+
H[n] || (H[n] = /* @__PURE__ */ new WeakMap());
|
|
1325
|
+
var o = H[n], s = [], c = /* @__PURE__ */ new Set(), d = new Set(a), l = function(v) {
|
|
1326
|
+
!v || c.has(v) || (c.add(v), l(v.parentNode));
|
|
1327
|
+
};
|
|
1328
|
+
a.forEach(l);
|
|
1329
|
+
var f = function(v) {
|
|
1330
|
+
!v || d.has(v) || Array.prototype.forEach.call(v.children, function(m) {
|
|
1331
|
+
if (c.has(m))
|
|
1332
|
+
f(m);
|
|
1333
|
+
else
|
|
1334
|
+
try {
|
|
1335
|
+
var y = m.getAttribute(r), E = y !== null && y !== "false", u = (B.get(m) || 0) + 1, h = (o.get(m) || 0) + 1;
|
|
1336
|
+
B.set(m, u), o.set(m, h), s.push(m), u === 1 && E && z.set(m, !0), h === 1 && m.setAttribute(n, "true"), E || m.setAttribute(r, "true");
|
|
1337
|
+
} catch (b) {
|
|
1338
|
+
console.error("aria-hidden: cannot operate on ", m, b);
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
};
|
|
1342
|
+
return f(t), c.clear(), se++, function() {
|
|
1343
|
+
s.forEach(function(v) {
|
|
1344
|
+
var m = B.get(v) - 1, y = o.get(v) - 1;
|
|
1345
|
+
B.set(v, m), o.set(v, y), m || (z.has(v) || v.removeAttribute(r), z.delete(v)), y || v.removeAttribute(n);
|
|
1346
|
+
}), se--, se || (B = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), H = {});
|
|
1347
|
+
};
|
|
1348
|
+
}, Cr = function(e, t, n) {
|
|
1349
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
1350
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), a = br(e);
|
|
1351
|
+
return a ? (r.push.apply(r, Array.from(a.querySelectorAll("[aria-live]"))), wr(r, a, n, "aria-hidden")) : function() {
|
|
1352
|
+
return null;
|
|
1353
|
+
};
|
|
1354
|
+
}, pe = "Dialog", [ct, Xr] = Qt(pe), [Sr, O] = ct(pe), st = (e) => {
|
|
1355
|
+
const {
|
|
1356
|
+
__scopeDialog: t,
|
|
1357
|
+
children: n,
|
|
1358
|
+
open: r,
|
|
1359
|
+
defaultOpen: a,
|
|
1360
|
+
onOpenChange: o,
|
|
1361
|
+
modal: s = !0
|
|
1362
|
+
} = e, c = i.useRef(null), d = i.useRef(null), [l = !1, f] = nn({
|
|
1363
|
+
prop: r,
|
|
1364
|
+
defaultProp: a,
|
|
1365
|
+
onChange: o
|
|
1366
|
+
});
|
|
1367
|
+
return /* @__PURE__ */ g(
|
|
1368
|
+
Sr,
|
|
1369
|
+
{
|
|
1370
|
+
scope: t,
|
|
1371
|
+
triggerRef: c,
|
|
1372
|
+
contentRef: d,
|
|
1373
|
+
contentId: te(),
|
|
1374
|
+
titleId: te(),
|
|
1375
|
+
descriptionId: te(),
|
|
1376
|
+
open: l,
|
|
1377
|
+
onOpenChange: f,
|
|
1378
|
+
onOpenToggle: i.useCallback(() => f((v) => !v), [f]),
|
|
1379
|
+
modal: s,
|
|
1380
|
+
children: n
|
|
1381
|
+
}
|
|
1382
|
+
);
|
|
1383
|
+
};
|
|
1384
|
+
st.displayName = pe;
|
|
1385
|
+
var ut = "DialogTrigger", Pr = i.forwardRef(
|
|
1386
|
+
(e, t) => {
|
|
1387
|
+
const { __scopeDialog: n, ...r } = e, a = O(ut, n), o = _(t, a.triggerRef);
|
|
1388
|
+
return /* @__PURE__ */ g(
|
|
1389
|
+
D.button,
|
|
1390
|
+
{
|
|
1391
|
+
type: "button",
|
|
1392
|
+
"aria-haspopup": "dialog",
|
|
1393
|
+
"aria-expanded": a.open,
|
|
1394
|
+
"aria-controls": a.contentId,
|
|
1395
|
+
"data-state": ye(a.open),
|
|
1396
|
+
...r,
|
|
1397
|
+
ref: o,
|
|
1398
|
+
onClick: L(e.onClick, a.onOpenToggle)
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1403
|
+
Pr.displayName = ut;
|
|
1404
|
+
var he = "DialogPortal", [Nr, lt] = ct(he, {
|
|
1405
|
+
forceMount: void 0
|
|
1406
|
+
}), dt = (e) => {
|
|
1407
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: a } = e, o = O(he, t);
|
|
1408
|
+
return /* @__PURE__ */ g(Nr, { scope: t, forceMount: n, children: i.Children.map(r, (s) => /* @__PURE__ */ g(Q, { present: n || o.open, children: /* @__PURE__ */ g(qe, { asChild: !0, container: a, children: s }) })) });
|
|
1409
|
+
};
|
|
1410
|
+
dt.displayName = he;
|
|
1411
|
+
var q = "DialogOverlay", ft = i.forwardRef(
|
|
1412
|
+
(e, t) => {
|
|
1413
|
+
const n = lt(q, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = O(q, e.__scopeDialog);
|
|
1414
|
+
return o.modal ? /* @__PURE__ */ g(Q, { present: r || o.open, children: /* @__PURE__ */ g(Or, { ...a, ref: t }) }) : null;
|
|
1415
|
+
}
|
|
1416
|
+
);
|
|
1417
|
+
ft.displayName = q;
|
|
1418
|
+
var Or = i.forwardRef(
|
|
1419
|
+
(e, t) => {
|
|
1420
|
+
const { __scopeDialog: n, ...r } = e, a = O(q, n);
|
|
1421
|
+
return (
|
|
1422
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1423
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
1424
|
+
/* @__PURE__ */ g(ot, { as: me, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ g(
|
|
1425
|
+
D.div,
|
|
1426
|
+
{
|
|
1427
|
+
"data-state": ye(a.open),
|
|
1428
|
+
...r,
|
|
1429
|
+
ref: t,
|
|
1430
|
+
style: { pointerEvents: "auto", ...r.style }
|
|
1431
|
+
}
|
|
1432
|
+
) })
|
|
1433
|
+
);
|
|
1434
|
+
}
|
|
1435
|
+
), F = "DialogContent", vt = i.forwardRef(
|
|
1436
|
+
(e, t) => {
|
|
1437
|
+
const n = lt(F, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = O(F, e.__scopeDialog);
|
|
1438
|
+
return /* @__PURE__ */ g(Q, { present: r || o.open, children: o.modal ? /* @__PURE__ */ g(Rr, { ...a, ref: t }) : /* @__PURE__ */ g(xr, { ...a, ref: t }) });
|
|
1439
|
+
}
|
|
1440
|
+
);
|
|
1441
|
+
vt.displayName = F;
|
|
1442
|
+
var Rr = i.forwardRef(
|
|
1443
|
+
(e, t) => {
|
|
1444
|
+
const n = O(F, e.__scopeDialog), r = i.useRef(null), a = _(t, n.contentRef, r);
|
|
1445
|
+
return i.useEffect(() => {
|
|
1446
|
+
const o = r.current;
|
|
1447
|
+
if (o) return Cr(o);
|
|
1448
|
+
}, []), /* @__PURE__ */ g(
|
|
1449
|
+
mt,
|
|
1450
|
+
{
|
|
1451
|
+
...e,
|
|
1452
|
+
ref: a,
|
|
1453
|
+
trapFocus: n.open,
|
|
1454
|
+
disableOutsidePointerEvents: !0,
|
|
1455
|
+
onCloseAutoFocus: L(e.onCloseAutoFocus, (o) => {
|
|
1456
|
+
var s;
|
|
1457
|
+
o.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
|
|
1458
|
+
}),
|
|
1459
|
+
onPointerDownOutside: L(e.onPointerDownOutside, (o) => {
|
|
1460
|
+
const s = o.detail.originalEvent, c = s.button === 0 && s.ctrlKey === !0;
|
|
1461
|
+
(s.button === 2 || c) && o.preventDefault();
|
|
1462
|
+
}),
|
|
1463
|
+
onFocusOutside: L(
|
|
1464
|
+
e.onFocusOutside,
|
|
1465
|
+
(o) => o.preventDefault()
|
|
1466
|
+
)
|
|
1467
|
+
}
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
), xr = i.forwardRef(
|
|
1471
|
+
(e, t) => {
|
|
1472
|
+
const n = O(F, e.__scopeDialog), r = i.useRef(!1), a = i.useRef(!1);
|
|
1473
|
+
return /* @__PURE__ */ g(
|
|
1474
|
+
mt,
|
|
1475
|
+
{
|
|
1476
|
+
...e,
|
|
1477
|
+
ref: t,
|
|
1478
|
+
trapFocus: !1,
|
|
1479
|
+
disableOutsidePointerEvents: !1,
|
|
1480
|
+
onCloseAutoFocus: (o) => {
|
|
1481
|
+
var s, c;
|
|
1482
|
+
(s = e.onCloseAutoFocus) == null || s.call(e, o), o.defaultPrevented || (r.current || (c = n.triggerRef.current) == null || c.focus(), o.preventDefault()), r.current = !1, a.current = !1;
|
|
1483
|
+
},
|
|
1484
|
+
onInteractOutside: (o) => {
|
|
1485
|
+
var d, l;
|
|
1486
|
+
(d = e.onInteractOutside) == null || d.call(e, o), o.defaultPrevented || (r.current = !0, o.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
1487
|
+
const s = o.target;
|
|
1488
|
+
((l = n.triggerRef.current) == null ? void 0 : l.contains(s)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && a.current && o.preventDefault();
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
), mt = i.forwardRef(
|
|
1494
|
+
(e, t) => {
|
|
1495
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = e, c = O(F, n), d = i.useRef(null), l = _(t, d);
|
|
1496
|
+
return Dn(), /* @__PURE__ */ T(ue, { children: [
|
|
1497
|
+
/* @__PURE__ */ g(
|
|
1498
|
+
Xe,
|
|
1499
|
+
{
|
|
1500
|
+
asChild: !0,
|
|
1501
|
+
loop: !0,
|
|
1502
|
+
trapped: r,
|
|
1503
|
+
onMountAutoFocus: a,
|
|
1504
|
+
onUnmountAutoFocus: o,
|
|
1505
|
+
children: /* @__PURE__ */ g(
|
|
1506
|
+
Ke,
|
|
1507
|
+
{
|
|
1508
|
+
role: "dialog",
|
|
1509
|
+
id: c.contentId,
|
|
1510
|
+
"aria-describedby": c.descriptionId,
|
|
1511
|
+
"aria-labelledby": c.titleId,
|
|
1512
|
+
"data-state": ye(c.open),
|
|
1513
|
+
...s,
|
|
1514
|
+
ref: l,
|
|
1515
|
+
onDismiss: () => c.onOpenChange(!1)
|
|
1516
|
+
}
|
|
1517
|
+
)
|
|
1518
|
+
}
|
|
1519
|
+
),
|
|
1520
|
+
/* @__PURE__ */ T(ue, { children: [
|
|
1521
|
+
/* @__PURE__ */ g(Dr, { titleId: c.titleId }),
|
|
1522
|
+
/* @__PURE__ */ g(Lr, { contentRef: d, descriptionId: c.descriptionId })
|
|
1523
|
+
] })
|
|
1524
|
+
] });
|
|
1525
|
+
}
|
|
1526
|
+
), ge = "DialogTitle", pt = i.forwardRef(
|
|
1527
|
+
(e, t) => {
|
|
1528
|
+
const { __scopeDialog: n, ...r } = e, a = O(ge, n);
|
|
1529
|
+
return /* @__PURE__ */ g(D.h2, { id: a.titleId, ...r, ref: t });
|
|
1530
|
+
}
|
|
1531
|
+
);
|
|
1532
|
+
pt.displayName = ge;
|
|
1533
|
+
var ht = "DialogDescription", gt = i.forwardRef(
|
|
1534
|
+
(e, t) => {
|
|
1535
|
+
const { __scopeDialog: n, ...r } = e, a = O(ht, n);
|
|
1536
|
+
return /* @__PURE__ */ g(D.p, { id: a.descriptionId, ...r, ref: t });
|
|
1537
|
+
}
|
|
1538
|
+
);
|
|
1539
|
+
gt.displayName = ht;
|
|
1540
|
+
var yt = "DialogClose", Ar = i.forwardRef(
|
|
1541
|
+
(e, t) => {
|
|
1542
|
+
const { __scopeDialog: n, ...r } = e, a = O(yt, n);
|
|
1543
|
+
return /* @__PURE__ */ g(
|
|
1544
|
+
D.button,
|
|
1545
|
+
{
|
|
1546
|
+
type: "button",
|
|
1547
|
+
...r,
|
|
1548
|
+
ref: t,
|
|
1549
|
+
onClick: L(e.onClick, () => a.onOpenChange(!1))
|
|
1550
|
+
}
|
|
1551
|
+
);
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
Ar.displayName = yt;
|
|
1555
|
+
function ye(e) {
|
|
1556
|
+
return e ? "open" : "closed";
|
|
1557
|
+
}
|
|
1558
|
+
var bt = "DialogTitleWarning", [Yr, Et] = qt(bt, {
|
|
1559
|
+
contentName: F,
|
|
1560
|
+
titleName: ge,
|
|
1561
|
+
docsSlug: "dialog"
|
|
1562
|
+
}), Dr = ({ titleId: e }) => {
|
|
1563
|
+
const t = Et(bt), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1564
|
+
|
|
1565
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1566
|
+
|
|
1567
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
1568
|
+
return i.useEffect(() => {
|
|
1569
|
+
e && (document.getElementById(e) || console.error(n));
|
|
1570
|
+
}, [n, e]), null;
|
|
1571
|
+
}, Mr = "DialogDescriptionWarning", Lr = ({ contentRef: e, descriptionId: t }) => {
|
|
1572
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Et(Mr).contentName}}.`;
|
|
1573
|
+
return i.useEffect(() => {
|
|
1574
|
+
var o;
|
|
1575
|
+
const a = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
1576
|
+
t && a && (document.getElementById(t) || console.warn(r));
|
|
1577
|
+
}, [r, e, t]), null;
|
|
1578
|
+
}, Tr = st, Ir = dt, Fr = ft, _r = vt, kr = pt, Wr = gt;
|
|
1579
|
+
const Br = "fixed inset-0 bg-black/50 data-[state=open]:animate-overlayShow z-10", $r = `
|
|
1580
|
+
fixed left-1/2 top-1/2 z-10
|
|
1581
|
+
-translate-x-1/2 -translate-y-1/2
|
|
1582
|
+
shadow-lg focus:outline-none
|
|
1583
|
+
|
|
1584
|
+
data-[state=open]:animate-contentShow
|
|
1585
|
+
`, jr = "flex flex-col gap-y-6 whitespace-pre-line", Ur = "flex items-center justify-between m-0 text-2xl text-gray-800", Vr = "m-0", Zr = "h-8 w-8 cursor-pointer transition-colors hover:bg-gray-200 rounded-full flex items-center justify-center", zr = "flex justify-end gap-2", qr = ({
|
|
1586
|
+
title: e,
|
|
1587
|
+
description: t,
|
|
1588
|
+
isOpen: n,
|
|
1589
|
+
children: r,
|
|
1590
|
+
onClose: a
|
|
1591
|
+
}) => /* @__PURE__ */ g(Tr, { open: n, children: /* @__PURE__ */ T(Ir, { children: [
|
|
1592
|
+
/* @__PURE__ */ g(Fr, { className: Br }),
|
|
1593
|
+
/* @__PURE__ */ g(_r, { className: $r, children: /* @__PURE__ */ g(Yt, { children: /* @__PURE__ */ T("div", { className: jr, children: [
|
|
1594
|
+
/* @__PURE__ */ T(kr, { className: Ur, children: [
|
|
1595
|
+
/* @__PURE__ */ g("span", { children: e }),
|
|
1596
|
+
/* @__PURE__ */ g(Ze, { size: 32, className: Zr, onClick: a })
|
|
1597
|
+
] }),
|
|
1598
|
+
/* @__PURE__ */ g(Wr, { className: Vr, children: t }),
|
|
1599
|
+
/* @__PURE__ */ g("div", { className: zr, children: r })
|
|
1600
|
+
] }) }) })
|
|
1601
|
+
] }) });
|
|
1602
|
+
export {
|
|
1603
|
+
Kt as Button,
|
|
1604
|
+
Yt as Card,
|
|
1605
|
+
qr as Modal
|
|
1606
|
+
};
|