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