@overmap-ai/blocks 0.0.4 → 0.0.6
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/README.md +3 -3
- package/dist/Buttons/constants.d.ts +7 -0
- package/dist/Buttons/index.d.ts +1 -0
- package/dist/Dialogs/AlertDialog/hooks.d.ts +6 -0
- package/dist/MultiSelect/MultiSelect.d.ts +1 -0
- package/dist/Toast/ToastProvider.d.ts +3 -1
- package/dist/blocks.js +650 -636
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +90 -90
package/dist/blocks.js
CHANGED
|
@@ -1,482 +1,498 @@
|
|
|
1
1
|
import "@radix-ui/themes/styles.css";
|
|
2
2
|
export * from "@radix-ui/colors";
|
|
3
|
-
import { Cross1Icon as
|
|
3
|
+
import { Cross1Icon as Fe, DragHandleDots2Icon as ae, InfoCircledIcon as Xe, Cross2Icon as Ue } from "@radix-ui/react-icons";
|
|
4
4
|
export * from "@radix-ui/react-icons";
|
|
5
|
-
import { useThemeContext as
|
|
6
|
-
import { AccessibleIcon as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import
|
|
9
|
-
import * as
|
|
10
|
-
import { Resizable as
|
|
11
|
-
import { Transition as
|
|
12
|
-
import { Root as
|
|
13
|
-
import * as
|
|
14
|
-
import { ToastProvider as
|
|
15
|
-
function
|
|
16
|
-
return
|
|
5
|
+
import { useThemeContext as qe, Badge as Ke, Button as Qe, IconButton as be, Flex as $, Box as M, Card as Ye, Inset as Z, Dialog as H, AlertDialog as W, DropdownMenu as O, Select as E, Checkbox as Je, Switch as Ze, Portal as et, TextField as ee, Text as ce, Popover as te, TextArea as tt, Callout as ne, Theme as nt, Separator as ye } from "@radix-ui/themes";
|
|
6
|
+
import { AccessibleIcon as ao, AspectRatio as co, Avatar as lo, Blockquote as uo, Box as ho, Callout as po, Card as mo, Checkbox as fo, Code as go, Container as Co, ContextMenu as vo, Em as _o, Flex as wo, Grid as yo, Heading as xo, HoverCard as So, Inset as To, Kbd as Po, Link as Ro, Portal as bo, Quote as Do, RadioGroup as $o, ScrollArea as zo, Section as Io, Slider as Oo, Slot as ko, Strong as No, Table as Ao, Tabs as Eo, TextField as Lo, Theme as Bo, Tooltip as Mo, VisuallyHidden as Wo, updateThemeAppearanceClass as Go, useThemeContext as Vo } from "@radix-ui/themes";
|
|
7
|
+
import { jsx as t, jsxs as v, Fragment as le } from "react/jsx-runtime";
|
|
8
|
+
import U, { useMemo as G, forwardRef as S, memo as _, createContext as fe, useContext as ge, useState as D, useCallback as y, createElement as De, useEffect as ue, useRef as se, useLayoutEffect as ot } from "react";
|
|
9
|
+
import * as oe from "@radix-ui/react-dialog";
|
|
10
|
+
import { Resizable as pe } from "re-resizable";
|
|
11
|
+
import { Transition as xe } from "react-transition-group";
|
|
12
|
+
import { Root as rt, Item as it } from "@radix-ui/react-toggle-group";
|
|
13
|
+
import * as re from "@radix-ui/react-toast";
|
|
14
|
+
import { ToastProvider as st, ToastViewport as at } from "@radix-ui/react-toast";
|
|
15
|
+
function ct(r) {
|
|
16
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var $e = { exports: {} };
|
|
19
19
|
/*!
|
|
20
20
|
Copyright (c) 2018 Jed Watson.
|
|
21
21
|
Licensed under the MIT License (MIT), see
|
|
22
22
|
http://jedwatson.github.io/classnames
|
|
23
23
|
*/
|
|
24
|
-
(function(
|
|
24
|
+
(function(r) {
|
|
25
25
|
(function() {
|
|
26
26
|
var a = {}.hasOwnProperty;
|
|
27
27
|
function o() {
|
|
28
|
-
for (var n = [],
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
var c = typeof
|
|
28
|
+
for (var n = [], i = 0; i < arguments.length; i++) {
|
|
29
|
+
var e = arguments[i];
|
|
30
|
+
if (e) {
|
|
31
|
+
var c = typeof e;
|
|
32
32
|
if (c === "string" || c === "number")
|
|
33
|
-
n.push(
|
|
34
|
-
else if (Array.isArray(
|
|
35
|
-
if (
|
|
36
|
-
var
|
|
37
|
-
|
|
33
|
+
n.push(e);
|
|
34
|
+
else if (Array.isArray(e)) {
|
|
35
|
+
if (e.length) {
|
|
36
|
+
var s = o.apply(null, e);
|
|
37
|
+
s && n.push(s);
|
|
38
38
|
}
|
|
39
39
|
} else if (c === "object") {
|
|
40
|
-
if (
|
|
41
|
-
n.push(
|
|
40
|
+
if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]")) {
|
|
41
|
+
n.push(e.toString());
|
|
42
42
|
continue;
|
|
43
43
|
}
|
|
44
|
-
for (var
|
|
45
|
-
a.call(
|
|
44
|
+
for (var d in e)
|
|
45
|
+
a.call(e, d) && e[d] && n.push(d);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return n.join(" ");
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
r.exports ? (o.default = o, r.exports = o) : window.classNames = o;
|
|
52
52
|
})();
|
|
53
|
-
})(
|
|
54
|
-
var
|
|
55
|
-
const
|
|
56
|
-
function
|
|
53
|
+
})($e);
|
|
54
|
+
var lt = $e.exports;
|
|
55
|
+
const x = /* @__PURE__ */ ct(lt);
|
|
56
|
+
function L(r, a) {
|
|
57
57
|
return G(() => {
|
|
58
|
-
if (
|
|
59
|
-
if (typeof
|
|
60
|
-
if (!("initial" in
|
|
58
|
+
if (r !== void 0)
|
|
59
|
+
if (typeof r == "object") {
|
|
60
|
+
if (!("initial" in r))
|
|
61
61
|
throw new Error("Expected initial property to be set in Responsive object");
|
|
62
|
-
return Object.fromEntries(Object.entries(
|
|
62
|
+
return Object.fromEntries(Object.entries(r).map(([o, n]) => [o, a[n]]));
|
|
63
63
|
} else
|
|
64
|
-
return a[
|
|
65
|
-
}, [a,
|
|
64
|
+
return a[r];
|
|
65
|
+
}, [a, r]);
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const ut = {
|
|
68
68
|
success: "green",
|
|
69
69
|
danger: "red",
|
|
70
70
|
info: "gray"
|
|
71
|
-
},
|
|
72
|
-
const a =
|
|
73
|
-
if (
|
|
74
|
-
return
|
|
75
|
-
},
|
|
76
|
-
const
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
|
|
71
|
+
}, R = (r) => {
|
|
72
|
+
const a = qe();
|
|
73
|
+
if (r)
|
|
74
|
+
return r === "primary" ? a.accentColor : ut[r];
|
|
75
|
+
}, dt = S(function({ className: a, severity: o = "primary", color: n, children: i, ...e }, c) {
|
|
76
|
+
const s = R(o);
|
|
77
|
+
return /* @__PURE__ */ t(
|
|
78
|
+
Ke,
|
|
79
79
|
{
|
|
80
|
-
className:
|
|
80
|
+
className: x("overmap-badge", a),
|
|
81
81
|
ref: c,
|
|
82
|
-
color: n ||
|
|
83
|
-
...
|
|
84
|
-
children:
|
|
82
|
+
color: n || s,
|
|
83
|
+
...e,
|
|
84
|
+
children: i
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
|
-
}),
|
|
88
|
-
fluid:
|
|
89
|
-
hoverSpin90Clockwise:
|
|
90
|
-
hoverSpin180Clockwise:
|
|
91
|
-
hoverSpin360Clockwise:
|
|
92
|
-
},
|
|
93
|
-
spin90Clockwise:
|
|
94
|
-
spin180Clockwise:
|
|
95
|
-
spin360Clockwise:
|
|
96
|
-
},
|
|
87
|
+
}), En = _(dt), ht = "_fluid_r73gr_1", pt = "_hoverSpin90Clockwise_r73gr_15", mt = "_hoverSpin180Clockwise_r73gr_25", ft = "_hoverSpin360Clockwise_r73gr_35", X = {
|
|
88
|
+
fluid: ht,
|
|
89
|
+
hoverSpin90Clockwise: pt,
|
|
90
|
+
hoverSpin180Clockwise: mt,
|
|
91
|
+
hoverSpin360Clockwise: ft
|
|
92
|
+
}, ze = {
|
|
93
|
+
spin90Clockwise: X.hoverSpin90Clockwise,
|
|
94
|
+
spin180Clockwise: X.hoverSpin180Clockwise,
|
|
95
|
+
spin360Clockwise: X.hoverSpin360Clockwise
|
|
96
|
+
}, gt = (r) => {
|
|
97
|
+
(r.key === "Enter" || r.key === " ") && r.currentTarget.click();
|
|
98
|
+
}, Ln = {
|
|
99
|
+
role: "button",
|
|
100
|
+
tabIndex: 0,
|
|
101
|
+
onKeyDown: gt
|
|
102
|
+
}, F = {
|
|
97
103
|
small: "1",
|
|
98
104
|
medium: "2",
|
|
99
105
|
large: "3"
|
|
100
|
-
},
|
|
101
|
-
const n =
|
|
102
|
-
className:
|
|
103
|
-
type:
|
|
106
|
+
}, Ie = fe({}), Ce = () => ge(Ie), Ct = S(function(a, o) {
|
|
107
|
+
const n = Ce(), {
|
|
108
|
+
className: i,
|
|
109
|
+
type: e = "button",
|
|
104
110
|
fluid: c = n.fluid ?? !1,
|
|
105
|
-
size:
|
|
106
|
-
severity:
|
|
111
|
+
size: s = n.size ?? "medium",
|
|
112
|
+
severity: d = n.severity ?? "primary",
|
|
107
113
|
hoverEffects: l = n.hoverEffects ?? [],
|
|
108
114
|
variant: h = n.variant,
|
|
109
115
|
...p
|
|
110
|
-
} = a, m =
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
|
|
116
|
+
} = a, m = R(d), f = l.map((u) => ze[u]);
|
|
117
|
+
return /* @__PURE__ */ t(
|
|
118
|
+
Qe,
|
|
113
119
|
{
|
|
114
120
|
ref: o,
|
|
115
|
-
type:
|
|
116
|
-
className:
|
|
117
|
-
[
|
|
121
|
+
type: e,
|
|
122
|
+
className: x(i, f, {
|
|
123
|
+
[X.fluid]: c
|
|
118
124
|
}),
|
|
119
125
|
color: m,
|
|
120
|
-
size:
|
|
126
|
+
size: L(s, F),
|
|
121
127
|
variant: h,
|
|
122
128
|
...p
|
|
123
129
|
}
|
|
124
130
|
);
|
|
125
|
-
}),
|
|
126
|
-
const n =
|
|
127
|
-
className:
|
|
128
|
-
children:
|
|
131
|
+
}), me = U.memo(Ct), vt = S(function(a, o) {
|
|
132
|
+
const n = Ce(), {
|
|
133
|
+
className: i,
|
|
134
|
+
children: e,
|
|
129
135
|
type: c = "button",
|
|
130
|
-
fluid:
|
|
131
|
-
size:
|
|
136
|
+
fluid: s = n.fluid ?? !1,
|
|
137
|
+
size: d = n.size ?? "medium",
|
|
132
138
|
severity: l = n.severity ?? "primary",
|
|
133
139
|
hoverEffects: h = n.hoverEffects ?? [],
|
|
134
140
|
variant: p = n.variant,
|
|
135
141
|
...m
|
|
136
|
-
} = a, f =
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
|
|
142
|
+
} = a, f = R(l), u = (h == null ? void 0 : h.map((C) => ze[C])) || [];
|
|
143
|
+
return /* @__PURE__ */ t(
|
|
144
|
+
be,
|
|
139
145
|
{
|
|
140
|
-
className:
|
|
141
|
-
[
|
|
146
|
+
className: x(i, u, {
|
|
147
|
+
[X.fluid]: s
|
|
142
148
|
}),
|
|
143
149
|
ref: o,
|
|
144
150
|
color: f,
|
|
145
|
-
size:
|
|
151
|
+
size: L(d, F),
|
|
146
152
|
variant: p,
|
|
147
153
|
type: c,
|
|
148
154
|
...m,
|
|
149
|
-
children:
|
|
155
|
+
children: e
|
|
150
156
|
}
|
|
151
157
|
);
|
|
152
|
-
}),
|
|
158
|
+
}), Oe = U.memo(vt), _t = "_merged_wdgxo_1", wt = {
|
|
153
159
|
merged: _t
|
|
154
160
|
}, yt = {
|
|
155
161
|
row: { small: "4", medium: "4", large: "5" },
|
|
156
162
|
column: { small: "2", medium: "3", large: "4" }
|
|
157
|
-
}, xt =
|
|
163
|
+
}, xt = S(function({
|
|
158
164
|
className: a,
|
|
159
165
|
merged: o = !1,
|
|
160
166
|
children: n,
|
|
161
|
-
gap:
|
|
162
|
-
direction:
|
|
167
|
+
gap: i,
|
|
168
|
+
direction: e = "row",
|
|
163
169
|
severity: c,
|
|
164
|
-
size:
|
|
165
|
-
variant:
|
|
170
|
+
size: s = "medium",
|
|
171
|
+
variant: d,
|
|
166
172
|
hoverEffects: l,
|
|
167
173
|
fluid: h,
|
|
168
174
|
...p
|
|
169
175
|
}, m) {
|
|
170
|
-
const f =
|
|
171
|
-
return /* @__PURE__ */
|
|
172
|
-
|
|
176
|
+
const f = L(s, yt[e]), u = d === "ghost" ? f : "0";
|
|
177
|
+
return /* @__PURE__ */ t(
|
|
178
|
+
$,
|
|
173
179
|
{
|
|
174
|
-
className:
|
|
180
|
+
className: x("overmap-button-group", a, {
|
|
175
181
|
[wt.merged]: o
|
|
176
182
|
}),
|
|
177
183
|
ref: m,
|
|
178
|
-
gap: o ?
|
|
179
|
-
direction:
|
|
180
|
-
"data-direction":
|
|
184
|
+
gap: o ? i ?? u : i ?? "2",
|
|
185
|
+
direction: e,
|
|
186
|
+
"data-direction": e,
|
|
181
187
|
...p,
|
|
182
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ t(Ie.Provider, { value: { size: s, severity: c, variant: d, hoverEffects: l, fluid: h }, children: n })
|
|
183
189
|
}
|
|
184
190
|
);
|
|
185
|
-
}),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
}), ke = _(xt), St = "_separators_1f7v1_1", Tt = {
|
|
192
|
+
separators: St
|
|
193
|
+
}, Pt = _(
|
|
194
|
+
S((r, a) => {
|
|
195
|
+
const { children: o, border: n, before: i, after: e, size: c } = r, s = n ? "surface" : "ghost", d = L(c, F), h = /* @__PURE__ */ v(Ye, { ref: a, size: d, variant: s, children: [
|
|
196
|
+
i,
|
|
197
|
+
i && e ? /* @__PURE__ */ t(Z, { side: "x", pt: "current", pb: "current", children: o }) : i ? /* @__PURE__ */ t(Z, { side: "bottom", pt: "current", children: o }) : e ? /* @__PURE__ */ t(Z, { side: "top", pb: "current", children: o }) : /* @__PURE__ */ t(Z, { children: o }),
|
|
198
|
+
e
|
|
191
199
|
] });
|
|
192
|
-
return
|
|
200
|
+
return s === "ghost" ? /* @__PURE__ */ t(M, { p: "3", children: h }) : h;
|
|
193
201
|
})
|
|
194
|
-
),
|
|
195
|
-
|
|
196
|
-
const { children: o, variant: n = "outline", size:
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
202
|
+
), Rt = _(
|
|
203
|
+
S((r, a) => {
|
|
204
|
+
const { children: o, variant: n = "outline", size: i, className: e, ...c } = r;
|
|
205
|
+
return /* @__PURE__ */ t(Pt, { ...c, border: n === "outline" || n === "surface", size: i, children: /* @__PURE__ */ t(
|
|
206
|
+
ke,
|
|
199
207
|
{
|
|
200
|
-
size:
|
|
208
|
+
size: i,
|
|
201
209
|
severity: "info",
|
|
202
210
|
variant: n === "outline" ? "ghost" : n === "surface" ? "soft" : n,
|
|
203
|
-
className:
|
|
211
|
+
className: x(e, Tt.separators),
|
|
204
212
|
merged: !0,
|
|
205
213
|
gap: "0",
|
|
206
214
|
direction: "column",
|
|
207
215
|
ref: a,
|
|
208
|
-
children:
|
|
209
|
-
h,
|
|
210
|
-
p < i - 1 && /* @__PURE__ */ e(Sn, { size: "4" })
|
|
211
|
-
] }, p))
|
|
216
|
+
children: o
|
|
212
217
|
}
|
|
213
218
|
) });
|
|
214
219
|
})
|
|
215
|
-
),
|
|
216
|
-
|
|
217
|
-
const { variant: o } =
|
|
218
|
-
return o === "ghost" ? /* @__PURE__ */
|
|
220
|
+
), bt = _(
|
|
221
|
+
S((r, a) => {
|
|
222
|
+
const { variant: o } = Ce(), n = /* @__PURE__ */ t(me, { ref: a, ...r, radius: "large", variant: o });
|
|
223
|
+
return o === "ghost" ? /* @__PURE__ */ t(M, { asChild: !0, my: "1", mx: "2", children: n }) : n;
|
|
219
224
|
})
|
|
220
|
-
),
|
|
221
|
-
Root:
|
|
222
|
-
Item:
|
|
223
|
-
},
|
|
224
|
-
const { title: o, description: n, content:
|
|
225
|
-
return /* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
225
|
+
), Bn = {
|
|
226
|
+
Root: Rt,
|
|
227
|
+
Item: bt
|
|
228
|
+
}, Dt = _(function(a) {
|
|
229
|
+
const { title: o, description: n, content: i, closeDialog: e } = a;
|
|
230
|
+
return /* @__PURE__ */ v($, { direction: "column", gap: "2", children: [
|
|
231
|
+
/* @__PURE__ */ v($, { direction: "column", gap: "1", children: [
|
|
232
|
+
/* @__PURE__ */ v($, { justify: "between", children: [
|
|
233
|
+
/* @__PURE__ */ t(H.Title, { mb: "0", children: o }),
|
|
234
|
+
/* @__PURE__ */ t(H.Close, { children: /* @__PURE__ */ t(be, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ t(Fe, {}) }) })
|
|
230
235
|
] }),
|
|
231
|
-
n && /* @__PURE__ */
|
|
236
|
+
n && /* @__PURE__ */ t(H.Description, { children: n })
|
|
232
237
|
] }),
|
|
233
|
-
|
|
238
|
+
i(e)
|
|
234
239
|
] });
|
|
235
|
-
}),
|
|
236
|
-
|
|
237
|
-
const { children: o, content: n, title:
|
|
238
|
-
(
|
|
239
|
-
if (
|
|
240
|
+
}), Mn = _(
|
|
241
|
+
S((r, a) => {
|
|
242
|
+
const { children: o, content: n, title: i, description: e, onOpen: c, defaultOpen: s, onCloseInterrupt: d, ...l } = r, [h, p] = D(s ?? !1), m = y(
|
|
243
|
+
(u) => {
|
|
244
|
+
if (u && c)
|
|
240
245
|
c();
|
|
241
|
-
else if (!
|
|
242
|
-
return
|
|
243
|
-
p(
|
|
246
|
+
else if (!u && d)
|
|
247
|
+
return d(() => p(!1));
|
|
248
|
+
p(u);
|
|
244
249
|
},
|
|
245
|
-
[c,
|
|
246
|
-
), f =
|
|
247
|
-
(
|
|
248
|
-
if (
|
|
250
|
+
[c, d]
|
|
251
|
+
), f = y(
|
|
252
|
+
(u) => {
|
|
253
|
+
if (u != null && u.force)
|
|
249
254
|
return p(!1);
|
|
250
255
|
m(!1);
|
|
251
256
|
},
|
|
252
257
|
[m]
|
|
253
258
|
);
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
|
|
259
|
+
return /* @__PURE__ */ v(H.Root, { open: h, onOpenChange: m, children: [
|
|
260
|
+
/* @__PURE__ */ t(H.Trigger, { children: o }),
|
|
261
|
+
/* @__PURE__ */ t(H.Content, { ref: a, ...l, children: /* @__PURE__ */ t(
|
|
262
|
+
Dt,
|
|
258
263
|
{
|
|
259
264
|
closeDialog: f,
|
|
260
265
|
content: n,
|
|
261
|
-
title:
|
|
262
|
-
description:
|
|
266
|
+
title: i,
|
|
267
|
+
description: e
|
|
263
268
|
}
|
|
264
269
|
) })
|
|
265
270
|
] });
|
|
266
271
|
})
|
|
267
|
-
),
|
|
268
|
-
const { title: a, description: o, actionText: n = "Confirm", cancelText:
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
272
|
+
), Ne = (r) => /* @__PURE__ */ t(W.Title, { mb: "0", ...r }), $t = (r) => {
|
|
273
|
+
const { title: a, description: o, actionText: n = "Confirm", cancelText: i = "Cancel", onAction: e, onCancel: c, severity: s } = r;
|
|
274
|
+
return /* @__PURE__ */ v($, { direction: "column", gap: "2", children: [
|
|
275
|
+
/* @__PURE__ */ v($, { direction: "column", gap: "1", children: [
|
|
276
|
+
/* @__PURE__ */ t(Ne, { children: a }),
|
|
277
|
+
/* @__PURE__ */ t(W.Description, { children: o })
|
|
273
278
|
] }),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ v($, { gap: "3", mt: "4", justify: "end", children: [
|
|
280
|
+
/* @__PURE__ */ t(W.Cancel, { children: /* @__PURE__ */ t(me, { variant: "soft", severity: "info", onClick: c, children: i }) }),
|
|
281
|
+
/* @__PURE__ */ t(W.Action, { children: /* @__PURE__ */ t(me, { variant: "solid", severity: s, onClick: e, children: n }) })
|
|
277
282
|
] })
|
|
278
283
|
] });
|
|
279
284
|
}, zt = _(function(a) {
|
|
280
|
-
const { open: o, setOpen: n, children:
|
|
285
|
+
const { open: o, setOpen: n, children: i, ...e } = a, c = G(() => ({
|
|
281
286
|
close: () => n(!1),
|
|
282
|
-
Title:
|
|
287
|
+
Title: Ne,
|
|
283
288
|
Description: W.Description
|
|
284
289
|
}), [n]);
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
|
|
290
|
+
return /* @__PURE__ */ v(W.Root, { open: o, onOpenChange: n, children: [
|
|
291
|
+
/* @__PURE__ */ t(W.Content, { children: "content" in e ? e.content(c) : /* @__PURE__ */ t($t, { ...e }) }),
|
|
292
|
+
i
|
|
288
293
|
] });
|
|
289
|
-
}),
|
|
294
|
+
}), Ae = fe(() => {
|
|
290
295
|
throw new Error("No AlertDialogProvider found");
|
|
291
|
-
}),
|
|
296
|
+
}), It = {
|
|
292
297
|
content: () => null
|
|
293
|
-
},
|
|
294
|
-
const [o, n] =
|
|
295
|
-
(
|
|
298
|
+
}, Wn = _(function({ children: a }) {
|
|
299
|
+
const [o, n] = D(!1), [i, e] = D(It), c = y(
|
|
300
|
+
(s) => {
|
|
296
301
|
if (o)
|
|
297
302
|
throw new Error("AlertDialog is already open");
|
|
298
|
-
|
|
303
|
+
e(s), n(!0);
|
|
299
304
|
},
|
|
300
305
|
[o]
|
|
301
306
|
);
|
|
302
|
-
return /* @__PURE__ */
|
|
303
|
-
}),
|
|
307
|
+
return /* @__PURE__ */ t(zt, { open: o, setOpen: n, ...i, children: /* @__PURE__ */ t(Ae.Provider, { value: c, children: a }) });
|
|
308
|
+
}), Ot = () => ge(Ae), Gn = () => {
|
|
309
|
+
const r = Ot();
|
|
310
|
+
return y(
|
|
311
|
+
(a) => r({
|
|
312
|
+
title: "Discard changes?",
|
|
313
|
+
description: "You have unsaved changes. Are you sure you want to discard them?",
|
|
314
|
+
actionText: "Discard",
|
|
315
|
+
severity: "danger",
|
|
316
|
+
onAction: a.onDiscard,
|
|
317
|
+
onCancel: a.onCancel
|
|
318
|
+
}),
|
|
319
|
+
[r]
|
|
320
|
+
);
|
|
321
|
+
}, kt = _(function({
|
|
304
322
|
severity: a,
|
|
305
323
|
itemContent: o,
|
|
306
324
|
closeOnSelect: n = !0,
|
|
307
|
-
onSelect:
|
|
308
|
-
...
|
|
325
|
+
onSelect: i,
|
|
326
|
+
...e
|
|
309
327
|
}) {
|
|
310
|
-
const c =
|
|
311
|
-
(
|
|
312
|
-
n ||
|
|
328
|
+
const c = R(a), s = y(
|
|
329
|
+
(d) => {
|
|
330
|
+
n || d.preventDefault(), i && i(d);
|
|
313
331
|
},
|
|
314
|
-
[n,
|
|
332
|
+
[n, i]
|
|
315
333
|
);
|
|
316
|
-
return /* @__PURE__ */
|
|
317
|
-
}),
|
|
334
|
+
return /* @__PURE__ */ t(O.Item, { onSelect: s, color: c, ...e, children: o });
|
|
335
|
+
}), Nt = _(function({
|
|
318
336
|
defaultOpen: a,
|
|
319
337
|
open: o,
|
|
320
338
|
onOpenChange: n,
|
|
321
|
-
modal:
|
|
322
|
-
trigger:
|
|
339
|
+
modal: i,
|
|
340
|
+
trigger: e,
|
|
323
341
|
label: c,
|
|
324
|
-
severity:
|
|
325
|
-
children:
|
|
342
|
+
severity: s = "info",
|
|
343
|
+
children: d,
|
|
326
344
|
...l
|
|
327
345
|
}) {
|
|
328
|
-
const h =
|
|
329
|
-
return /* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
c && /* @__PURE__ */
|
|
333
|
-
|
|
346
|
+
const h = R(s);
|
|
347
|
+
return /* @__PURE__ */ v(O.Root, { defaultOpen: a, open: o, onOpenChange: n, modal: i, children: [
|
|
348
|
+
/* @__PURE__ */ t(O.Trigger, { children: e }),
|
|
349
|
+
/* @__PURE__ */ v(O.Content, { color: h, ...l, children: [
|
|
350
|
+
c && /* @__PURE__ */ t(O.Label, { children: c }),
|
|
351
|
+
d
|
|
334
352
|
] })
|
|
335
353
|
] });
|
|
336
|
-
}),
|
|
354
|
+
}), At = _(function({
|
|
337
355
|
separatorBelow: a = !1,
|
|
338
356
|
separatorAbove: o = !1,
|
|
339
357
|
children: n,
|
|
340
|
-
...
|
|
358
|
+
...i
|
|
341
359
|
}) {
|
|
342
|
-
return /* @__PURE__ */
|
|
343
|
-
o && /* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
a && /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ v(le, { children: [
|
|
361
|
+
o && /* @__PURE__ */ t(O.Separator, {}),
|
|
362
|
+
/* @__PURE__ */ t(O.Group, { ...i, children: n }),
|
|
363
|
+
a && /* @__PURE__ */ t(O.Separator, {})
|
|
346
364
|
] });
|
|
347
|
-
}),
|
|
365
|
+
}), Et = _(function({
|
|
348
366
|
defaultOpen: a,
|
|
349
367
|
open: o,
|
|
350
368
|
onOpenChange: n,
|
|
351
|
-
trigger:
|
|
352
|
-
children:
|
|
369
|
+
trigger: i,
|
|
370
|
+
children: e,
|
|
353
371
|
...c
|
|
354
372
|
}) {
|
|
355
|
-
return /* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
373
|
+
return /* @__PURE__ */ v(O.Sub, { defaultOpen: a, open: o, onOpenChange: n, children: [
|
|
374
|
+
/* @__PURE__ */ t(O.SubTrigger, { children: i }),
|
|
375
|
+
/* @__PURE__ */ t(O.SubContent, { ...c, children: e })
|
|
358
376
|
] });
|
|
359
|
-
}),
|
|
360
|
-
Root:
|
|
361
|
-
ItemGroup:
|
|
362
|
-
Item:
|
|
363
|
-
SubMenu:
|
|
364
|
-
},
|
|
365
|
-
fluid:
|
|
366
|
-
},
|
|
377
|
+
}), Vn = {
|
|
378
|
+
Root: Nt,
|
|
379
|
+
ItemGroup: At,
|
|
380
|
+
Item: kt,
|
|
381
|
+
SubMenu: Et
|
|
382
|
+
}, Lt = "_fluid_7n1wr_1", Se = {
|
|
383
|
+
fluid: Lt
|
|
384
|
+
}, Bt = S(function({
|
|
367
385
|
className: a,
|
|
368
386
|
fluid: o,
|
|
369
387
|
size: n = "medium",
|
|
370
|
-
variant:
|
|
371
|
-
severity:
|
|
388
|
+
variant: i = "surface",
|
|
389
|
+
severity: e = "primary",
|
|
372
390
|
itemSeverity: c = "info",
|
|
373
|
-
placeholder:
|
|
374
|
-
side:
|
|
391
|
+
placeholder: s = "Select",
|
|
392
|
+
side: d,
|
|
375
393
|
items: l = [],
|
|
376
394
|
value: h,
|
|
377
395
|
id: p,
|
|
378
396
|
...m
|
|
379
397
|
}, f) {
|
|
380
|
-
const
|
|
381
|
-
return /* @__PURE__ */ De(
|
|
382
|
-
|
|
398
|
+
const u = L(n, F), C = R(e), g = R(c);
|
|
399
|
+
return /* @__PURE__ */ De(E.Root, { size: u, ...m, key: h === void 0 ? 1 : 0, value: h }, /* @__PURE__ */ t(
|
|
400
|
+
E.Trigger,
|
|
383
401
|
{
|
|
384
|
-
className:
|
|
385
|
-
[
|
|
402
|
+
className: x(a, {
|
|
403
|
+
[Se.fluid]: o
|
|
386
404
|
}),
|
|
387
405
|
id: p,
|
|
388
406
|
ref: f,
|
|
389
|
-
variant:
|
|
390
|
-
placeholder:
|
|
391
|
-
color:
|
|
407
|
+
variant: i,
|
|
408
|
+
placeholder: s,
|
|
409
|
+
color: C
|
|
392
410
|
}
|
|
393
|
-
), /* @__PURE__ */
|
|
394
|
-
|
|
411
|
+
), /* @__PURE__ */ t(
|
|
412
|
+
E.Content,
|
|
395
413
|
{
|
|
396
|
-
side:
|
|
397
|
-
className:
|
|
414
|
+
side: d,
|
|
415
|
+
className: Se.contentDefault,
|
|
398
416
|
position: "popper",
|
|
399
|
-
variant:
|
|
417
|
+
variant: i !== "surface" ? "soft" : "solid",
|
|
400
418
|
color: g,
|
|
401
|
-
children: l.map(({ itemContent: P, value:
|
|
419
|
+
children: l.map(({ itemContent: P, value: w, ...b }) => /* @__PURE__ */ t(E.Item, { className: "overmap-select-item", value: w, ...b, children: P }, w))
|
|
402
420
|
}
|
|
403
421
|
));
|
|
404
|
-
}),
|
|
405
|
-
|
|
406
|
-
const { checked: o, label: n, value:
|
|
407
|
-
return /* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
422
|
+
}), jn = U.memo(Bt), Te = _(
|
|
423
|
+
S((r, a) => {
|
|
424
|
+
const { checked: o, label: n, value: i, size: e = "2" } = r;
|
|
425
|
+
return /* @__PURE__ */ t(M, { asChild: !0, px: e, children: /* @__PURE__ */ t(E.Item, { value: i, ref: a, children: /* @__PURE__ */ v($, { gap: e, align: "center", children: [
|
|
426
|
+
/* @__PURE__ */ t(Je, { checked: o }),
|
|
409
427
|
n
|
|
410
428
|
] }) }) });
|
|
411
429
|
})
|
|
412
|
-
),
|
|
413
|
-
|
|
414
|
-
const [o, n] =
|
|
430
|
+
), ie = "__select_all__", Hn = _(
|
|
431
|
+
S((r, a) => {
|
|
432
|
+
const [o, n] = D(!1), { placeholder: i, value: e, onValueChange: c, options: s, disabled: d, name: l, ...h } = r, p = L(r.size, F), m = R(r.severity), f = G(() => new Map(s.map((w) => [w.value, w.label])), [s]), u = e.length > 4 ? (
|
|
415
433
|
// to ensure the width of the select doesn't get too big
|
|
416
|
-
`${
|
|
434
|
+
`${e.length} options selected`
|
|
417
435
|
) : (
|
|
418
436
|
// convert the values to labels
|
|
419
|
-
t.
|
|
420
|
-
),
|
|
437
|
+
/* @__PURE__ */ t("span", { children: e.flatMap((w) => [f.get(w), ", "]).slice(0, -1) })
|
|
438
|
+
), C = y(() => n(!1), []), g = y((w) => {
|
|
421
439
|
w && n(!0);
|
|
422
|
-
}, []),
|
|
440
|
+
}, []), P = y(
|
|
423
441
|
(w) => {
|
|
424
|
-
let
|
|
425
|
-
w ===
|
|
442
|
+
let b;
|
|
443
|
+
w === ie ? b = e.length === s.length ? [] : s.map((de) => de.value) : b = e.includes(w) ? e.filter((B) => B !== w) : [...e, w], c(b);
|
|
426
444
|
},
|
|
427
|
-
[c,
|
|
445
|
+
[c, s, e]
|
|
428
446
|
);
|
|
429
|
-
return
|
|
430
|
-
if (
|
|
431
|
-
throw new Error(`Cannot have an option with the value "${
|
|
432
|
-
}, [
|
|
433
|
-
|
|
447
|
+
return ue(() => {
|
|
448
|
+
if (s.some(({ value: w }) => w === ie))
|
|
449
|
+
throw new Error(`Cannot have an option with the value "${ie}"`);
|
|
450
|
+
}, [s]), /* @__PURE__ */ v(
|
|
451
|
+
E.Root,
|
|
434
452
|
{
|
|
435
453
|
open: o,
|
|
436
454
|
value: "",
|
|
437
|
-
onOpenChange:
|
|
438
|
-
onValueChange:
|
|
439
|
-
disabled:
|
|
440
|
-
size:
|
|
441
|
-
name:
|
|
455
|
+
onOpenChange: g,
|
|
456
|
+
onValueChange: P,
|
|
457
|
+
disabled: d,
|
|
458
|
+
size: p,
|
|
459
|
+
name: l,
|
|
442
460
|
autoComplete: "off",
|
|
443
461
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
|
|
462
|
+
/* @__PURE__ */ t(
|
|
463
|
+
E.Trigger,
|
|
446
464
|
{
|
|
447
465
|
ref: a,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
placeholder: t.length > 0 ? g : r,
|
|
453
|
-
"data-placeholder": t.length > 0 ? void 0 : !0
|
|
466
|
+
color: m,
|
|
467
|
+
placeholder: e.length > 0 ? u : i,
|
|
468
|
+
"data-placeholder": e.length > 0 ? void 0 : !0,
|
|
469
|
+
...h
|
|
454
470
|
}
|
|
455
471
|
),
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
|
|
472
|
+
/* @__PURE__ */ v(
|
|
473
|
+
E.Content,
|
|
458
474
|
{
|
|
459
475
|
color: "gray",
|
|
460
476
|
variant: "soft",
|
|
461
477
|
position: "popper",
|
|
462
|
-
onEscapeKeyDown:
|
|
463
|
-
onPointerDownOutside:
|
|
478
|
+
onEscapeKeyDown: C,
|
|
479
|
+
onPointerDownOutside: C,
|
|
464
480
|
children: [
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
|
|
481
|
+
/* @__PURE__ */ t(
|
|
482
|
+
Te,
|
|
467
483
|
{
|
|
468
|
-
value:
|
|
484
|
+
value: ie,
|
|
469
485
|
label: "Select all",
|
|
470
|
-
checked:
|
|
471
|
-
size:
|
|
486
|
+
checked: e.length === s.length,
|
|
487
|
+
size: p
|
|
472
488
|
}
|
|
473
489
|
),
|
|
474
|
-
|
|
475
|
-
|
|
490
|
+
s.map((w) => /* @__PURE__ */ t(
|
|
491
|
+
Te,
|
|
476
492
|
{
|
|
477
493
|
...w,
|
|
478
|
-
checked:
|
|
479
|
-
size:
|
|
494
|
+
checked: e.includes(w.value),
|
|
495
|
+
size: p
|
|
480
496
|
},
|
|
481
497
|
w.value
|
|
482
498
|
))
|
|
@@ -487,84 +503,84 @@ const dt = {
|
|
|
487
503
|
}
|
|
488
504
|
);
|
|
489
505
|
})
|
|
490
|
-
),
|
|
506
|
+
), Mt = {
|
|
491
507
|
default: "_default_u936h_1"
|
|
492
|
-
},
|
|
493
|
-
const
|
|
494
|
-
|
|
508
|
+
}, Wt = S(function({ className: a, severity: o = "primary", icon: n, defaultChecked: i = !1, onCheckedChange: e, ...c }, s) {
|
|
509
|
+
const d = se(null), [l, h] = D(c.checked ? c.checked : i), [p, m] = D(), f = R(o);
|
|
510
|
+
ot(() => {
|
|
495
511
|
var P;
|
|
496
|
-
const g =
|
|
512
|
+
const g = s || d;
|
|
497
513
|
"current" in g && g.current && m((P = g.current) == null ? void 0 : P.querySelector("span.rt-SwitchThumb"));
|
|
498
|
-
}, [
|
|
499
|
-
const
|
|
514
|
+
}, [s]);
|
|
515
|
+
const u = y(
|
|
500
516
|
(g) => {
|
|
501
|
-
h(g),
|
|
517
|
+
h(g), e && e(g);
|
|
502
518
|
},
|
|
503
|
-
[
|
|
504
|
-
),
|
|
505
|
-
return /* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
|
|
519
|
+
[e]
|
|
520
|
+
), C = c.checked ? c.checked : l;
|
|
521
|
+
return /* @__PURE__ */ v(le, { children: [
|
|
522
|
+
/* @__PURE__ */ t(
|
|
523
|
+
Ze,
|
|
508
524
|
{
|
|
509
|
-
className:
|
|
510
|
-
ref:
|
|
525
|
+
className: x("overmap-switch", a, Mt.default),
|
|
526
|
+
ref: s || d,
|
|
511
527
|
color: f,
|
|
512
528
|
radius: "full",
|
|
513
|
-
defaultChecked:
|
|
514
|
-
onCheckedChange:
|
|
529
|
+
defaultChecked: i,
|
|
530
|
+
onCheckedChange: u,
|
|
515
531
|
...c
|
|
516
532
|
}
|
|
517
533
|
),
|
|
518
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ t(et, { container: p, asChild: !0, children: n && "checked" in n ? C ? n.checked : n.unchecked : n })
|
|
519
535
|
] });
|
|
520
|
-
}),
|
|
521
|
-
sidebarContent:
|
|
522
|
-
right:
|
|
523
|
-
resizeHandle:
|
|
524
|
-
left:
|
|
525
|
-
overlay:
|
|
526
|
-
},
|
|
536
|
+
}), Fn = _(Wt), Gt = "_sidebarContent_1onyo_1", Vt = "_right_1onyo_7", jt = "_resizeHandle_1onyo_10", Ht = "_left_1onyo_13", Ft = "_overlay_1onyo_33", V = {
|
|
537
|
+
sidebarContent: Gt,
|
|
538
|
+
right: Vt,
|
|
539
|
+
resizeHandle: jt,
|
|
540
|
+
left: Ht,
|
|
541
|
+
overlay: Ft
|
|
542
|
+
}, Xt = S(function({
|
|
527
543
|
side: a = "left",
|
|
528
544
|
modal: o = !0,
|
|
529
545
|
children: n,
|
|
530
|
-
open:
|
|
531
|
-
containerSelector:
|
|
546
|
+
open: i,
|
|
547
|
+
containerSelector: e,
|
|
532
548
|
overlay: c = !0,
|
|
533
|
-
resizable:
|
|
549
|
+
resizable: s = !0,
|
|
534
550
|
// Props related to Resizable
|
|
535
|
-
minWidth:
|
|
551
|
+
minWidth: d = "300px",
|
|
536
552
|
maxWidth: l = "500px",
|
|
537
553
|
...h
|
|
538
554
|
}, p) {
|
|
539
|
-
const m = a === "right", f = a === "left", [
|
|
540
|
-
return
|
|
541
|
-
const g =
|
|
555
|
+
const m = a === "right", f = a === "left", [u, C] = D();
|
|
556
|
+
return ue(() => {
|
|
557
|
+
const g = e ?? '[data-is-root-theme="true"]', P = document.querySelector(g);
|
|
542
558
|
if (P === void 0)
|
|
543
559
|
throw new Error(`Could not find a container element using the following selector ${g}`);
|
|
544
|
-
|
|
545
|
-
}, [
|
|
546
|
-
c && /* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
|
|
560
|
+
C(P);
|
|
561
|
+
}, [e]), /* @__PURE__ */ t(oe.Root, { open: i, modal: o, children: /* @__PURE__ */ v(oe.Portal, { container: u, children: [
|
|
562
|
+
c && /* @__PURE__ */ t(oe.Overlay, { className: x(V.overlay) }),
|
|
563
|
+
/* @__PURE__ */ t(
|
|
564
|
+
oe.Content,
|
|
549
565
|
{
|
|
550
|
-
className:
|
|
551
|
-
[
|
|
552
|
-
[
|
|
566
|
+
className: x("overmap-sidebar", "rt-DialogContent", V.sidebarContent, {
|
|
567
|
+
[V.left]: f,
|
|
568
|
+
[V.right]: m
|
|
553
569
|
}),
|
|
554
570
|
ref: p,
|
|
555
571
|
asChild: !0,
|
|
556
572
|
...h,
|
|
557
|
-
children: /* @__PURE__ */
|
|
558
|
-
|
|
573
|
+
children: /* @__PURE__ */ t(M, { width: "auto", children: /* @__PURE__ */ t(
|
|
574
|
+
pe,
|
|
559
575
|
{
|
|
560
|
-
minWidth:
|
|
576
|
+
minWidth: d,
|
|
561
577
|
maxWidth: l,
|
|
562
578
|
defaultSize: { width: "300px", height: "100%" },
|
|
563
|
-
enable: { right:
|
|
564
|
-
handleClasses: { left:
|
|
579
|
+
enable: { right: s && f, left: s && m },
|
|
580
|
+
handleClasses: { left: V.resizeHandle, right: V.resizeHandle },
|
|
565
581
|
handleComponent: {
|
|
566
|
-
right: /* @__PURE__ */
|
|
567
|
-
left: /* @__PURE__ */
|
|
582
|
+
right: /* @__PURE__ */ t(ae, {}),
|
|
583
|
+
left: /* @__PURE__ */ t(ae, {})
|
|
568
584
|
},
|
|
569
585
|
children: n
|
|
570
586
|
}
|
|
@@ -572,161 +588,161 @@ const dt = {
|
|
|
572
588
|
}
|
|
573
589
|
)
|
|
574
590
|
] }) });
|
|
575
|
-
}),
|
|
576
|
-
accommodateCharCount:
|
|
577
|
-
wrapper:
|
|
591
|
+
}), Xn = _(Xt), Ut = "_accommodateCharCount_sr18k_1", qt = "_wrapper_sr18k_5", Kt = "_noLeftIcon_sr18k_13", Qt = "_noRightIcon_sr18k_17", Yt = "_charCount_sr18k_21", j = {
|
|
592
|
+
accommodateCharCount: Ut,
|
|
593
|
+
wrapper: qt,
|
|
578
594
|
default: "_default_sr18k_9",
|
|
579
|
-
noLeftIcon:
|
|
580
|
-
noRightIcon:
|
|
581
|
-
charCount:
|
|
582
|
-
},
|
|
595
|
+
noLeftIcon: Kt,
|
|
596
|
+
noRightIcon: Qt,
|
|
597
|
+
charCount: Yt
|
|
598
|
+
}, Jt = S(function({
|
|
583
599
|
className: a,
|
|
584
600
|
leftSlot: o,
|
|
585
601
|
rightSlot: n,
|
|
586
|
-
size:
|
|
587
|
-
showInputLength:
|
|
602
|
+
size: i = "medium",
|
|
603
|
+
showInputLength: e,
|
|
588
604
|
value: c,
|
|
589
|
-
variant:
|
|
590
|
-
severity:
|
|
605
|
+
variant: s,
|
|
606
|
+
severity: d = "primary",
|
|
591
607
|
...l
|
|
592
608
|
}, h) {
|
|
593
|
-
const p =
|
|
594
|
-
return /* @__PURE__ */
|
|
595
|
-
|
|
609
|
+
const p = L(i, F), m = R(d), f = e || e === void 0 && l.maxLength !== void 0, u = c !== void 0 ? c.toString() : void 0;
|
|
610
|
+
return /* @__PURE__ */ v(
|
|
611
|
+
ee.Root,
|
|
596
612
|
{
|
|
597
|
-
className:
|
|
598
|
-
[
|
|
613
|
+
className: x(j.wrapper, {
|
|
614
|
+
[j.accommodateCharCount]: f
|
|
599
615
|
}),
|
|
600
616
|
size: p,
|
|
601
|
-
variant:
|
|
617
|
+
variant: s,
|
|
602
618
|
color: m,
|
|
603
619
|
children: [
|
|
604
|
-
o && /* @__PURE__ */
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
|
|
620
|
+
o && /* @__PURE__ */ t(ee.Slot, { children: o }),
|
|
621
|
+
/* @__PURE__ */ t(
|
|
622
|
+
ee.Input,
|
|
607
623
|
{
|
|
608
|
-
className:
|
|
609
|
-
[
|
|
610
|
-
[
|
|
624
|
+
className: x(j.default, a, {
|
|
625
|
+
[j.noLeftIcon]: !o,
|
|
626
|
+
[j.noRightIcon]: !n
|
|
611
627
|
}),
|
|
612
628
|
ref: h,
|
|
613
629
|
size: p,
|
|
614
|
-
variant:
|
|
630
|
+
variant: s,
|
|
615
631
|
color: m,
|
|
616
632
|
...l
|
|
617
633
|
}
|
|
618
634
|
),
|
|
619
|
-
n && /* @__PURE__ */
|
|
620
|
-
f && /* @__PURE__ */
|
|
635
|
+
n && /* @__PURE__ */ t(ee.Slot, { children: n }),
|
|
636
|
+
f && /* @__PURE__ */ t(ce, { as: "p", className: j.charCount, size: "1", color: "gray", children: l.maxLength !== void 0 ? `${u == null ? void 0 : u.length}/${l.maxLength}` : `${u == null ? void 0 : u.length}` })
|
|
621
637
|
]
|
|
622
638
|
}
|
|
623
639
|
);
|
|
624
|
-
}),
|
|
625
|
-
wrapper:
|
|
626
|
-
},
|
|
627
|
-
return /* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
/* @__PURE__ */
|
|
630
|
-
|
|
640
|
+
}), Un = U.memo(Jt), Zt = "_wrapper_tmtz0_1", en = {
|
|
641
|
+
wrapper: Zt
|
|
642
|
+
}, tn = S(function({ className: a, defaultOpen: o = !1, modal: n = !1, content: i, children: e, ...c }, s) {
|
|
643
|
+
return /* @__PURE__ */ v(te.Root, { defaultOpen: o, modal: n, children: [
|
|
644
|
+
/* @__PURE__ */ t(te.Trigger, { children: e }),
|
|
645
|
+
/* @__PURE__ */ t(
|
|
646
|
+
te.Content,
|
|
631
647
|
{
|
|
632
|
-
ref:
|
|
633
|
-
className:
|
|
648
|
+
ref: s,
|
|
649
|
+
className: x("overmap-popover", a, en.wrapper),
|
|
634
650
|
...c,
|
|
635
|
-
children:
|
|
651
|
+
children: i(te.Close)
|
|
636
652
|
}
|
|
637
653
|
)
|
|
638
654
|
] });
|
|
639
|
-
}),
|
|
640
|
-
wrapper:
|
|
641
|
-
panelContent:
|
|
642
|
-
left:
|
|
643
|
-
right:
|
|
644
|
-
resizable:
|
|
645
|
-
resizeHandle:
|
|
646
|
-
panelMainContent:
|
|
647
|
-
},
|
|
655
|
+
}), qn = U.memo(tn), nn = "_wrapper_1mz2e_1", on = "_panelContent_1mz2e_6", rn = "_left_1mz2e_14", sn = "_right_1mz2e_18", an = "_resizable_1mz2e_23", cn = "_resizeHandle_1mz2e_28", ln = "_panelMainContent_1mz2e_48", I = {
|
|
656
|
+
wrapper: nn,
|
|
657
|
+
panelContent: on,
|
|
658
|
+
left: rn,
|
|
659
|
+
right: sn,
|
|
660
|
+
resizable: an,
|
|
661
|
+
resizeHandle: cn,
|
|
662
|
+
panelMainContent: ln
|
|
663
|
+
}, Pe = 200, A = 150, Kn = _(function({
|
|
648
664
|
children: a,
|
|
649
665
|
showLeft: o,
|
|
650
666
|
leftPanel: n,
|
|
651
|
-
leftMinWidth:
|
|
652
|
-
showRight:
|
|
667
|
+
leftMinWidth: i = Pe,
|
|
668
|
+
showRight: e,
|
|
653
669
|
rightPanel: c,
|
|
654
|
-
rightMinWidth:
|
|
655
|
-
resizeable:
|
|
670
|
+
rightMinWidth: s = Pe,
|
|
671
|
+
resizeable: d
|
|
656
672
|
}) {
|
|
657
|
-
const l =
|
|
658
|
-
(T,
|
|
673
|
+
const l = se(null), h = se(null), [p, m] = D(0), [f, u] = D(), C = se(null), [g, P] = D(0), [w, b] = D(), B = y(
|
|
674
|
+
(T, z, k) => (N, _e, we, he) => {
|
|
659
675
|
if (!l.current)
|
|
660
676
|
return;
|
|
661
|
-
const
|
|
662
|
-
|
|
677
|
+
const Q = T + he.width;
|
|
678
|
+
k(l.current.clientWidth - Q), z(() => Q);
|
|
663
679
|
},
|
|
664
680
|
[]
|
|
665
|
-
),
|
|
666
|
-
(T,
|
|
667
|
-
[
|
|
668
|
-
),
|
|
669
|
-
(T,
|
|
670
|
-
[
|
|
671
|
-
),
|
|
672
|
-
(T,
|
|
681
|
+
), de = y(
|
|
682
|
+
(T, z, k, N) => B(p, m, b)(T, z, k, N),
|
|
683
|
+
[B, p]
|
|
684
|
+
), Be = y(
|
|
685
|
+
(T, z, k, N) => B(g, P, u)(T, z, k, N),
|
|
686
|
+
[B, g]
|
|
687
|
+
), q = y(
|
|
688
|
+
(T, z, k, N, _e, we, he, Q) => {
|
|
673
689
|
if (!l.current)
|
|
674
690
|
return;
|
|
675
|
-
let
|
|
676
|
-
if (
|
|
677
|
-
const
|
|
678
|
-
|
|
691
|
+
let Y = T;
|
|
692
|
+
if (Y === 0 && (Y = z, k(Y)), we) {
|
|
693
|
+
const J = l.current.clientWidth - Y;
|
|
694
|
+
Q(J), _e > J && (he(J), N(l.current.clientWidth - J));
|
|
679
695
|
}
|
|
680
696
|
},
|
|
681
697
|
[]
|
|
682
|
-
),
|
|
683
|
-
() =>
|
|
698
|
+
), Me = y(
|
|
699
|
+
() => q(
|
|
684
700
|
g,
|
|
685
|
-
|
|
701
|
+
s,
|
|
686
702
|
P,
|
|
687
|
-
|
|
703
|
+
b,
|
|
688
704
|
p,
|
|
689
705
|
o,
|
|
690
706
|
m,
|
|
691
|
-
|
|
707
|
+
u
|
|
692
708
|
),
|
|
693
|
-
[
|
|
694
|
-
),
|
|
695
|
-
() =>
|
|
709
|
+
[q, p, s, g, o]
|
|
710
|
+
), We = y(
|
|
711
|
+
() => q(
|
|
696
712
|
p,
|
|
697
|
-
|
|
713
|
+
i,
|
|
698
714
|
m,
|
|
699
|
-
|
|
715
|
+
u,
|
|
700
716
|
g,
|
|
701
|
-
|
|
717
|
+
e,
|
|
702
718
|
P,
|
|
703
|
-
|
|
719
|
+
b
|
|
704
720
|
),
|
|
705
|
-
[
|
|
706
|
-
),
|
|
707
|
-
(T,
|
|
708
|
-
l.current && T &&
|
|
721
|
+
[q, i, p, g, e]
|
|
722
|
+
), K = y(
|
|
723
|
+
(T, z) => {
|
|
724
|
+
l.current && T && z(l.current.clientWidth);
|
|
709
725
|
},
|
|
710
726
|
[]
|
|
711
|
-
),
|
|
712
|
-
() =>
|
|
713
|
-
[
|
|
714
|
-
),
|
|
715
|
-
() =>
|
|
716
|
-
[
|
|
717
|
-
),
|
|
718
|
-
var T,
|
|
719
|
-
l.current && (
|
|
727
|
+
), Ge = y(
|
|
728
|
+
() => K(o, u),
|
|
729
|
+
[K, o]
|
|
730
|
+
), Ve = y(
|
|
731
|
+
() => K(e, b),
|
|
732
|
+
[K, e]
|
|
733
|
+
), ve = y(() => {
|
|
734
|
+
var T, z, k, N;
|
|
735
|
+
l.current && (u(l.current.clientWidth - (((T = C.current) == null ? void 0 : T.clientWidth) || 0)), b(l.current.clientWidth - (((z = h.current) == null ? void 0 : z.clientWidth) || 0)), m(((k = h.current) == null ? void 0 : k.clientWidth) || 0), P(((N = C.current) == null ? void 0 : N.clientWidth) || 0));
|
|
720
736
|
}, []);
|
|
721
|
-
|
|
737
|
+
ue(() => {
|
|
722
738
|
if (!l.current)
|
|
723
739
|
return;
|
|
724
|
-
const T = new ResizeObserver(
|
|
740
|
+
const T = new ResizeObserver(ve);
|
|
725
741
|
return T.observe(l.current), () => {
|
|
726
742
|
T.disconnect();
|
|
727
743
|
};
|
|
728
|
-
}, [
|
|
729
|
-
const
|
|
744
|
+
}, [ve]);
|
|
745
|
+
const je = G(() => ({
|
|
730
746
|
entering: {
|
|
731
747
|
transform: `translateX(-${p}px)`,
|
|
732
748
|
marginRight: `-${p}px`,
|
|
@@ -750,7 +766,7 @@ const dt = {
|
|
|
750
766
|
},
|
|
751
767
|
exited: {},
|
|
752
768
|
unmounted: {}
|
|
753
|
-
}), [p]),
|
|
769
|
+
}), [p]), He = G(() => ({
|
|
754
770
|
entering: {
|
|
755
771
|
transform: `translateX(${g}px)`,
|
|
756
772
|
marginLeft: `${-g}px`,
|
|
@@ -775,11 +791,11 @@ const dt = {
|
|
|
775
791
|
exited: {},
|
|
776
792
|
unmounted: {}
|
|
777
793
|
}), [g]);
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
|
|
794
|
+
return /* @__PURE__ */ v(
|
|
795
|
+
$,
|
|
780
796
|
{
|
|
781
|
-
className:
|
|
782
|
-
style: { minWidth: `${
|
|
797
|
+
className: I.wrapper,
|
|
798
|
+
style: { minWidth: `${i + s}px` },
|
|
783
799
|
ref: l,
|
|
784
800
|
width: "100%",
|
|
785
801
|
height: "100%",
|
|
@@ -787,40 +803,40 @@ const dt = {
|
|
|
787
803
|
m: "0",
|
|
788
804
|
p: "0",
|
|
789
805
|
children: [
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
|
|
806
|
+
/* @__PURE__ */ t(
|
|
807
|
+
xe,
|
|
792
808
|
{
|
|
793
809
|
nodeRef: h,
|
|
794
810
|
timeout: o ? 0 : A,
|
|
795
811
|
in: o,
|
|
796
812
|
unmountOnExit: !0,
|
|
797
|
-
onEntering:
|
|
798
|
-
onExited:
|
|
799
|
-
children: (T) => /* @__PURE__ */
|
|
813
|
+
onEntering: We,
|
|
814
|
+
onExited: Ve,
|
|
815
|
+
children: (T) => /* @__PURE__ */ t(
|
|
800
816
|
M,
|
|
801
817
|
{
|
|
802
818
|
ref: h,
|
|
803
|
-
className:
|
|
804
|
-
style:
|
|
819
|
+
className: x(I.panelContent, I.left),
|
|
820
|
+
style: je[T],
|
|
805
821
|
width: "auto",
|
|
806
822
|
height: "100%",
|
|
807
823
|
m: "0",
|
|
808
824
|
p: "0",
|
|
809
|
-
children: /* @__PURE__ */
|
|
810
|
-
|
|
825
|
+
children: /* @__PURE__ */ t(
|
|
826
|
+
pe,
|
|
811
827
|
{
|
|
812
|
-
className:
|
|
828
|
+
className: I.resizable,
|
|
813
829
|
size: {
|
|
814
830
|
width: p,
|
|
815
831
|
height: "100%"
|
|
816
832
|
},
|
|
817
|
-
onResizeStop:
|
|
818
|
-
enable: { right: (
|
|
819
|
-
minWidth:
|
|
833
|
+
onResizeStop: de,
|
|
834
|
+
enable: { right: (d == null ? void 0 : d.left) !== void 0 ? d.left : !0 },
|
|
835
|
+
minWidth: i,
|
|
820
836
|
maxWidth: f,
|
|
821
|
-
handleClasses: { right:
|
|
837
|
+
handleClasses: { right: x(I.resizeHandle, I.left) },
|
|
822
838
|
handleComponent: {
|
|
823
|
-
right: /* @__PURE__ */
|
|
839
|
+
right: /* @__PURE__ */ t(ae, { height: "14px", width: "14px" })
|
|
824
840
|
},
|
|
825
841
|
children: n
|
|
826
842
|
}
|
|
@@ -829,37 +845,37 @@ const dt = {
|
|
|
829
845
|
)
|
|
830
846
|
}
|
|
831
847
|
),
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
|
|
848
|
+
/* @__PURE__ */ t(M, { className: I.panelMainContent, width: "max-content", children: a }),
|
|
849
|
+
/* @__PURE__ */ t(
|
|
850
|
+
xe,
|
|
835
851
|
{
|
|
836
|
-
nodeRef:
|
|
837
|
-
timeout:
|
|
838
|
-
in:
|
|
852
|
+
nodeRef: C,
|
|
853
|
+
timeout: e ? 0 : A,
|
|
854
|
+
in: e,
|
|
839
855
|
unmountOnExit: !0,
|
|
840
|
-
onEntering:
|
|
841
|
-
onExited:
|
|
842
|
-
children: (T) => /* @__PURE__ */
|
|
856
|
+
onEntering: Me,
|
|
857
|
+
onExited: Ge,
|
|
858
|
+
children: (T) => /* @__PURE__ */ t(
|
|
843
859
|
M,
|
|
844
860
|
{
|
|
845
|
-
ref:
|
|
846
|
-
className:
|
|
847
|
-
style:
|
|
861
|
+
ref: C,
|
|
862
|
+
className: x(I.panelContent, I.right),
|
|
863
|
+
style: He[T],
|
|
848
864
|
width: "auto",
|
|
849
865
|
height: "100%",
|
|
850
866
|
m: "0",
|
|
851
867
|
p: "0",
|
|
852
|
-
children: /* @__PURE__ */
|
|
853
|
-
|
|
868
|
+
children: /* @__PURE__ */ t(
|
|
869
|
+
pe,
|
|
854
870
|
{
|
|
855
|
-
className:
|
|
871
|
+
className: I.resizable,
|
|
856
872
|
size: { width: g, height: "100%" },
|
|
857
|
-
onResizeStop:
|
|
858
|
-
enable: { left: (
|
|
859
|
-
minWidth:
|
|
860
|
-
maxWidth:
|
|
861
|
-
handleClasses: { left:
|
|
862
|
-
handleComponent: { left: /* @__PURE__ */
|
|
873
|
+
onResizeStop: Be,
|
|
874
|
+
enable: { left: (d == null ? void 0 : d.right) !== void 0 ? d.right : !0 },
|
|
875
|
+
minWidth: s,
|
|
876
|
+
maxWidth: w,
|
|
877
|
+
handleClasses: { left: x(I.resizeHandle, I.right) },
|
|
878
|
+
handleComponent: { left: /* @__PURE__ */ t(ae, { height: "14px", width: "14px" }) },
|
|
863
879
|
children: c
|
|
864
880
|
}
|
|
865
881
|
)
|
|
@@ -870,256 +886,254 @@ const dt = {
|
|
|
870
886
|
]
|
|
871
887
|
}
|
|
872
888
|
);
|
|
873
|
-
}),
|
|
874
|
-
charCount:
|
|
875
|
-
},
|
|
876
|
-
const l =
|
|
889
|
+
}), un = "_charCount_17uut_1", dn = {
|
|
890
|
+
charCount: un
|
|
891
|
+
}, hn = S(function({ className: a, showInputLength: o, inputLengthTemplate: n, value: i, severity: e = "primary", resize: c, ...s }, d) {
|
|
892
|
+
const l = R(e), h = R("info"), p = o || o === void 0 && (s.maxLength !== void 0 || s.minLength !== void 0), m = i !== void 0 ? i.toString() : "", f = G(() => {
|
|
877
893
|
if (n) {
|
|
878
|
-
let
|
|
879
|
-
return
|
|
894
|
+
let u = n.replace("{current}", m.length.toString());
|
|
895
|
+
return s.minLength !== void 0 && (u = u.replace("{min}", s.minLength.toString())), s.maxLength !== void 0 && (u = u.replace("{max}", s.maxLength.toString())), u;
|
|
880
896
|
}
|
|
881
897
|
return m.length;
|
|
882
|
-
}, [n,
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
/* @__PURE__ */
|
|
885
|
-
|
|
898
|
+
}, [n, s.maxLength, s.minLength, m.length]);
|
|
899
|
+
return /* @__PURE__ */ v(le, { children: [
|
|
900
|
+
/* @__PURE__ */ t(
|
|
901
|
+
tt,
|
|
886
902
|
{
|
|
887
|
-
className:
|
|
903
|
+
className: x("overmap-textarea", a),
|
|
888
904
|
style: { resize: c },
|
|
889
|
-
ref:
|
|
890
|
-
value:
|
|
905
|
+
ref: d,
|
|
906
|
+
value: i,
|
|
891
907
|
color: l,
|
|
892
|
-
...
|
|
908
|
+
...s
|
|
893
909
|
}
|
|
894
910
|
),
|
|
895
|
-
p && /* @__PURE__ */
|
|
911
|
+
p && /* @__PURE__ */ t(ce, { as: "p", className: dn.charCount, color: h, align: "right", children: f })
|
|
896
912
|
] });
|
|
897
|
-
}),
|
|
913
|
+
}), Qn = _(hn), pn = S(function({
|
|
898
914
|
// ToggleGroup Primitive Props
|
|
899
915
|
loop: a,
|
|
900
916
|
type: o,
|
|
901
917
|
rovingFocus: n,
|
|
902
|
-
value:
|
|
903
|
-
onValueChange:
|
|
918
|
+
value: i,
|
|
919
|
+
onValueChange: e,
|
|
904
920
|
defaultValue: c,
|
|
905
|
-
disabled:
|
|
906
|
-
items:
|
|
921
|
+
disabled: s,
|
|
922
|
+
items: d,
|
|
907
923
|
// ButtonGroup Props
|
|
908
924
|
className: l,
|
|
909
925
|
direction: h = "row",
|
|
910
926
|
...p
|
|
911
927
|
}, m) {
|
|
912
|
-
return /* @__PURE__ */
|
|
913
|
-
|
|
928
|
+
return /* @__PURE__ */ t(
|
|
929
|
+
rt,
|
|
914
930
|
{
|
|
915
931
|
type: o,
|
|
916
|
-
className:
|
|
932
|
+
className: x("overmap-toggle-group", l),
|
|
917
933
|
ref: m,
|
|
918
|
-
value:
|
|
919
|
-
onValueChange:
|
|
920
|
-
disabled:
|
|
934
|
+
value: i,
|
|
935
|
+
onValueChange: e,
|
|
936
|
+
disabled: s,
|
|
921
937
|
orientation: h === "column" ? "vertical" : "horizontal",
|
|
922
938
|
loop: a,
|
|
923
939
|
rovingFocus: n,
|
|
924
940
|
defaultValue: c,
|
|
925
941
|
asChild: !0,
|
|
926
|
-
children: /* @__PURE__ */
|
|
927
|
-
|
|
942
|
+
children: /* @__PURE__ */ t(ke, { direction: h, ...p, children: d.map(({ children: f, ...u }) => /* @__PURE__ */ De(it, { asChild: !0, ...u, key: u.value }, /* @__PURE__ */ t(
|
|
943
|
+
Oe,
|
|
928
944
|
{
|
|
929
|
-
className:
|
|
930
|
-
"aria-label":
|
|
931
|
-
variant:
|
|
945
|
+
className: x("overmap-toggle-group-button"),
|
|
946
|
+
"aria-label": u.value,
|
|
947
|
+
variant: u.value === i ? "solid" : "soft",
|
|
932
948
|
children: f
|
|
933
949
|
}
|
|
934
950
|
))) })
|
|
935
951
|
}
|
|
936
952
|
);
|
|
937
|
-
}),
|
|
938
|
-
ToastViewport:
|
|
939
|
-
ToastRoot:
|
|
940
|
-
slideIn:
|
|
941
|
-
swipeOut:
|
|
942
|
-
},
|
|
943
|
-
const [h, p] =
|
|
944
|
-
(
|
|
945
|
-
!
|
|
953
|
+
}), Yn = _(pn), mn = "_ToastViewport_t8tlv_1", fn = "_ToastRoot_t8tlv_20", gn = "_slideIn_t8tlv_1", Cn = "_swipeOut_t8tlv_1", Ee = {
|
|
954
|
+
ToastViewport: mn,
|
|
955
|
+
ToastRoot: fn,
|
|
956
|
+
slideIn: gn,
|
|
957
|
+
swipeOut: Cn
|
|
958
|
+
}, vn = S(function({ title: a, description: o, icon: n, severity: i = "primary", size: e, onClose: c, sensitivity: s, ...d }, l) {
|
|
959
|
+
const [h, p] = D(!0), m = R(i), f = y(
|
|
960
|
+
(u) => {
|
|
961
|
+
!u && c && c(), p(u);
|
|
946
962
|
},
|
|
947
963
|
[c]
|
|
948
964
|
);
|
|
949
|
-
return /* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
-
/* @__PURE__ */
|
|
965
|
+
return /* @__PURE__ */ t(re.Root, { asChild: !0, ref: l, ...d, open: h, type: s, onOpenChange: f, children: /* @__PURE__ */ t(ne.Root, { className: Ee.ToastRoot, variant: "surface", color: m, size: e, children: /* @__PURE__ */ v($, { width: "100%", align: "center", gap: "4", justify: "between", children: [
|
|
966
|
+
/* @__PURE__ */ v($, { align: "center", gap: "4", children: [
|
|
967
|
+
/* @__PURE__ */ t(ne.Icon, { children: n || /* @__PURE__ */ t(Xe, {}) }),
|
|
968
|
+
/* @__PURE__ */ v($, { direction: "column", gap: "0", children: [
|
|
969
|
+
/* @__PURE__ */ t(re.Title, { asChild: !0, children: /* @__PURE__ */ t(ne.Text, { weight: "medium", children: a }) }),
|
|
970
|
+
/* @__PURE__ */ t(re.Description, { asChild: !0, children: /* @__PURE__ */ t(ne.Text, { weight: "light", children: o }) })
|
|
955
971
|
] })
|
|
956
972
|
] }),
|
|
957
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ t(re.Close, { asChild: !0, children: /* @__PURE__ */ t(Oe, { "aria-label": "Close", variant: "ghost", size: "small", severity: i, children: /* @__PURE__ */ t(Ue, {}) }) })
|
|
958
974
|
] }) }) });
|
|
959
|
-
}),
|
|
960
|
-
const
|
|
961
|
-
if (!
|
|
975
|
+
}), _n = _(vn), Le = fe({}), Jn = () => {
|
|
976
|
+
const r = ge(Le);
|
|
977
|
+
if (!r)
|
|
962
978
|
throw new Error("useToast must be used within a ToastProvider");
|
|
963
|
-
return
|
|
964
|
-
},
|
|
965
|
-
if (
|
|
966
|
-
return
|
|
967
|
-
const a =
|
|
968
|
-
return (
|
|
969
|
-
}
|
|
979
|
+
return r;
|
|
980
|
+
}, wn = 240 / 60, Re = 5e3, yn = (r) => {
|
|
981
|
+
if (r.duration && r.duration >= Re)
|
|
982
|
+
return r.duration;
|
|
983
|
+
const a = r.severity === "danger" ? 1.5 : 1, o = r.description.split(" ").length + r.title.split(" ").length;
|
|
984
|
+
return (Re + o / wn) * a;
|
|
985
|
+
};
|
|
986
|
+
let xn;
|
|
987
|
+
const Zn = _(function({
|
|
970
988
|
children: a,
|
|
971
989
|
// Use this class to change where the viewport for the toasts should be
|
|
972
990
|
className: o,
|
|
973
991
|
hotkey: n,
|
|
974
|
-
...
|
|
992
|
+
...i
|
|
975
993
|
}) {
|
|
976
|
-
const [
|
|
994
|
+
const [e, c] = D([]), s = y((l, h, p) => {
|
|
977
995
|
c((m) => {
|
|
978
|
-
const f = m.find((
|
|
979
|
-
return f && h === 0 && clearTimeout(f.timeout), m.filter((
|
|
996
|
+
const f = m.find((u) => u.id === l);
|
|
997
|
+
return f && h === 0 && clearTimeout(f.timeout), m.filter((u) => u.id !== l);
|
|
980
998
|
}), p && p();
|
|
981
|
-
}, []),
|
|
999
|
+
}, []), d = G(() => {
|
|
982
1000
|
let l = 0;
|
|
983
|
-
const h = (
|
|
984
|
-
const g =
|
|
1001
|
+
const h = (C) => {
|
|
1002
|
+
const g = yn(C), P = l.toString();
|
|
985
1003
|
l += 1;
|
|
986
|
-
const
|
|
987
|
-
c((
|
|
988
|
-
};
|
|
989
|
-
return {
|
|
1004
|
+
const w = setTimeout(() => s(P, 1, C.onClose), g);
|
|
1005
|
+
c((b) => [...b, { ...C, timeout: w, duration: g, id: P }]);
|
|
1006
|
+
}, p = (C) => h({ ...C, severity: "primary" }), m = (C) => h({ ...C, severity: "success" }), f = (C) => h({ ...C, severity: "danger" }), u = (C) => h({ ...C, severity: "info" });
|
|
1007
|
+
return xn = h, {
|
|
990
1008
|
showToast: h,
|
|
991
|
-
showPrimary:
|
|
992
|
-
showSuccess:
|
|
993
|
-
showError:
|
|
994
|
-
showInfo:
|
|
1009
|
+
showPrimary: p,
|
|
1010
|
+
showSuccess: m,
|
|
1011
|
+
showError: f,
|
|
1012
|
+
showInfo: u
|
|
995
1013
|
};
|
|
996
|
-
}, [
|
|
997
|
-
return
|
|
998
|
-
for (const { timeout: l } of
|
|
1014
|
+
}, [s]);
|
|
1015
|
+
return ue(() => () => {
|
|
1016
|
+
for (const { timeout: l } of e)
|
|
999
1017
|
clearTimeout(l);
|
|
1000
|
-
}, []), /* @__PURE__ */
|
|
1018
|
+
}, []), /* @__PURE__ */ t(Le.Provider, { value: d, children: /* @__PURE__ */ v(st, { ...i, children: [
|
|
1001
1019
|
a,
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
|
|
1020
|
+
/* @__PURE__ */ t(at, { className: x(o, Ee.ToastViewport), hotkey: n }),
|
|
1021
|
+
e.map(({ id: l, onClose: h, ...p }) => /* @__PURE__ */ t(_n, { ...p, onClose: () => s(l, 0, h) }, l))
|
|
1004
1022
|
] }) });
|
|
1005
|
-
}),
|
|
1006
|
-
noWrap:
|
|
1007
|
-
},
|
|
1008
|
-
|
|
1009
|
-
const c =
|
|
1010
|
-
return /* @__PURE__ */
|
|
1011
|
-
|
|
1023
|
+
}), Sn = "_noWrap_1wpa5_1", Tn = {
|
|
1024
|
+
noWrap: Sn
|
|
1025
|
+
}, eo = _(
|
|
1026
|
+
S(({ className: r, noWrap: a, severity: o, as: n, ...i }, e) => {
|
|
1027
|
+
const c = R(o);
|
|
1028
|
+
return /* @__PURE__ */ t(
|
|
1029
|
+
ce,
|
|
1012
1030
|
{
|
|
1013
|
-
ref:
|
|
1031
|
+
ref: e,
|
|
1014
1032
|
as: n,
|
|
1015
|
-
className:
|
|
1033
|
+
className: x(r, { [Tn.noWrap]: a }),
|
|
1016
1034
|
color: c,
|
|
1017
|
-
...
|
|
1035
|
+
...i
|
|
1018
1036
|
}
|
|
1019
1037
|
);
|
|
1020
1038
|
})
|
|
1021
1039
|
);
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
const { panelBackground: o = "solid", radius: n = "full", ...
|
|
1025
|
-
return /* @__PURE__ */
|
|
1040
|
+
const to = _(
|
|
1041
|
+
S((r, a) => {
|
|
1042
|
+
const { panelBackground: o = "solid", radius: n = "full", ...i } = r;
|
|
1043
|
+
return /* @__PURE__ */ t(nt, { panelBackground: o, radius: n, ref: a, ...i });
|
|
1026
1044
|
})
|
|
1027
|
-
),
|
|
1045
|
+
), Pn = {
|
|
1028
1046
|
1: "max-content",
|
|
1029
1047
|
2: "max-content",
|
|
1030
1048
|
3: "max-content",
|
|
1031
1049
|
4: "100%"
|
|
1032
|
-
},
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
text: r,
|
|
1037
|
-
orientation: t = "horizontal",
|
|
1038
|
-
size: c,
|
|
1039
|
-
...i
|
|
1040
|
-
}) {
|
|
1041
|
-
const u = B(c, yn), l = b(a);
|
|
1042
|
-
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ C(
|
|
1043
|
-
R,
|
|
1050
|
+
}, Rn = S(function({ severity: a = "info", weight: o = "light", gap: n = "1", text: i, orientation: e = "horizontal", size: c, ...s }, d) {
|
|
1051
|
+
const l = L(c, Pn), h = R(a);
|
|
1052
|
+
return /* @__PURE__ */ v(
|
|
1053
|
+
$,
|
|
1044
1054
|
{
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1055
|
+
ref: d,
|
|
1056
|
+
width: e === "horizontal" ? l : "max-content",
|
|
1057
|
+
height: e === "vertical" ? l : "max-content",
|
|
1058
|
+
direction: e === "vertical" ? "column" : "row",
|
|
1048
1059
|
align: "center",
|
|
1049
1060
|
gap: n,
|
|
1050
1061
|
children: [
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
|
|
1053
|
-
/* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ t(ye, { size: c, orientation: e, color: h, ...s }),
|
|
1063
|
+
i && /* @__PURE__ */ v(le, { children: [
|
|
1064
|
+
/* @__PURE__ */ t(ce, { as: "span", size: "1", weight: o, color: h, children: i }),
|
|
1065
|
+
/* @__PURE__ */ t(ye, { size: c, orientation: e, color: h, ...s })
|
|
1055
1066
|
] })
|
|
1056
1067
|
]
|
|
1057
1068
|
}
|
|
1058
|
-
)
|
|
1059
|
-
}),
|
|
1069
|
+
);
|
|
1070
|
+
}), no = _(Rn);
|
|
1060
1071
|
export {
|
|
1061
|
-
|
|
1072
|
+
ao as AccessibleIcon,
|
|
1062
1073
|
zt as AlertDialog,
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1074
|
+
Ae as AlertDialogContent,
|
|
1075
|
+
Wn as AlertDialogProvider,
|
|
1076
|
+
co as AspectRatio,
|
|
1077
|
+
lo as Avatar,
|
|
1078
|
+
En as Badge,
|
|
1079
|
+
uo as Blockquote,
|
|
1080
|
+
ho as Box,
|
|
1081
|
+
me as Button,
|
|
1082
|
+
ke as ButtonGroup,
|
|
1083
|
+
Bn as ButtonList,
|
|
1084
|
+
po as Callout,
|
|
1085
|
+
mo as Card,
|
|
1086
|
+
fo as Checkbox,
|
|
1087
|
+
go as Code,
|
|
1088
|
+
Co as Container,
|
|
1089
|
+
vo as ContextMenu,
|
|
1090
|
+
to as DefaultTheme,
|
|
1091
|
+
Mn as Dialog,
|
|
1092
|
+
Vn as DropdownMenu,
|
|
1093
|
+
_o as Em,
|
|
1094
|
+
wo as Flex,
|
|
1095
|
+
yo as Grid,
|
|
1096
|
+
xo as Heading,
|
|
1097
|
+
So as HoverCard,
|
|
1098
|
+
Oe as IconButton,
|
|
1099
|
+
Un as Input,
|
|
1100
|
+
To as Inset,
|
|
1101
|
+
Po as Kbd,
|
|
1102
|
+
Kn as LeftAndRightPanels,
|
|
1103
|
+
Ro as Link,
|
|
1104
|
+
Hn as MultiSelect,
|
|
1105
|
+
qn as Popover,
|
|
1106
|
+
bo as Portal,
|
|
1107
|
+
Do as Quote,
|
|
1108
|
+
$o as RadioGroup,
|
|
1109
|
+
zo as ScrollArea,
|
|
1110
|
+
Io as Section,
|
|
1111
|
+
jn as Select,
|
|
1112
|
+
no as Separator,
|
|
1113
|
+
Xn as Sidebar,
|
|
1114
|
+
Oo as Slider,
|
|
1115
|
+
ko as Slot,
|
|
1116
|
+
No as Strong,
|
|
1117
|
+
Fn as Switch,
|
|
1118
|
+
Ao as Table,
|
|
1119
|
+
Eo as Tabs,
|
|
1120
|
+
eo as Text,
|
|
1121
|
+
Qn as TextArea,
|
|
1122
|
+
Lo as TextField,
|
|
1123
|
+
Bo as Theme,
|
|
1124
|
+
_n as Toast,
|
|
1125
|
+
Le as ToastContext,
|
|
1126
|
+
Zn as ToastProvider,
|
|
1127
|
+
Yn as ToggleGroup,
|
|
1128
|
+
Mo as Tooltip,
|
|
1129
|
+
Wo as VisuallyHidden,
|
|
1130
|
+
Ln as divButtonProps,
|
|
1131
|
+
xn as unsafeShowToast,
|
|
1132
|
+
Go as updateThemeAppearanceClass,
|
|
1133
|
+
Ot as useAlertDialog,
|
|
1134
|
+
Gn as useDiscardAlertDialog,
|
|
1135
|
+
R as useSeverityColor,
|
|
1136
|
+
Vo as useThemeContext,
|
|
1137
|
+
Jn as useToast
|
|
1124
1138
|
};
|
|
1125
1139
|
//# sourceMappingURL=blocks.js.map
|