@overmap-ai/blocks 0.0.1-alpha.36 → 0.0.1-alpha.37
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/Select/typings.d.ts +1 -0
- package/dist/blocks.js +177 -174
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/Select/typings.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface SelectProps extends Omit<ComponentProps<typeof RadixSelect.Root
|
|
|
12
12
|
label?: string;
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
fluid?: boolean;
|
|
15
|
+
id?: string;
|
|
15
16
|
side?: RadixSelectContentProps["side"];
|
|
16
17
|
items?: SelectItemProps[];
|
|
17
18
|
severity?: Exclude<Severity, "success">;
|
package/dist/blocks.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import "@radix-ui/themes/styles.css";
|
|
1
2
|
export * from "@radix-ui/colors";
|
|
2
|
-
import { Cross1Icon as
|
|
3
|
+
import { Cross1Icon as X, InfoCircledIcon as Y, Cross2Icon as Z } from "@radix-ui/react-icons";
|
|
3
4
|
export * from "@radix-ui/react-icons";
|
|
4
|
-
import { useThemeContext as
|
|
5
|
-
import { AccessibleIcon as
|
|
6
|
-
import { jsx as o, jsxs as f, Fragment as
|
|
7
|
-
import B, { forwardRef as
|
|
8
|
-
import { Root as
|
|
5
|
+
import { useThemeContext as ee, Badge as oe, Button as te, IconButton as F, Flex as T, Dialog as k, AlertDialog as b, Select as P, TextField as $, Text as V, Popover as N, TextArea as ne, Callout as O, Theme as re } from "@radix-ui/themes";
|
|
6
|
+
import { AccessibleIcon as Co, AspectRatio as vo, Avatar as _o, Blockquote as wo, Box as yo, Callout as So, Card as To, Checkbox as xo, Code as bo, Container as Do, ContextMenu as ko, DropdownMenu as Io, Em as Ao, Flex as Bo, Grid as Ro, Heading as Po, HoverCard as $o, Inset as No, Kbd as Oo, Link as Lo, Portal as jo, Quote as zo, RadioGroup as Go, ScrollArea as Mo, Section as Eo, Separator as Fo, Slider as Vo, Slot as Ho, Strong as qo, Switch as Ko, Table as Qo, Tabs as Jo, Text as Uo, TextField as Wo, Theme as Xo, Tooltip as Yo, VisuallyHidden as Zo } from "@radix-ui/themes";
|
|
7
|
+
import { jsx as o, jsxs as f, Fragment as ie } from "react/jsx-runtime";
|
|
8
|
+
import B, { forwardRef as _, memo as C, cloneElement as se, useState as L, useCallback as S, useMemo as j, createContext as H, useContext as ce, createElement as q } from "react";
|
|
9
|
+
import { Root as le, Item as ae } from "@radix-ui/react-toggle-group";
|
|
9
10
|
import * as D from "@radix-ui/react-toast";
|
|
10
|
-
function
|
|
11
|
+
function ue(c) {
|
|
11
12
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
12
13
|
}
|
|
13
14
|
var K = { exports: {} };
|
|
@@ -46,8 +47,8 @@ var K = { exports: {} };
|
|
|
46
47
|
c.exports ? (n.default = n, c.exports = n) : window.classNames = n;
|
|
47
48
|
})();
|
|
48
49
|
})(K);
|
|
49
|
-
var
|
|
50
|
-
const
|
|
50
|
+
var de = K.exports;
|
|
51
|
+
const v = /* @__PURE__ */ ue(de);
|
|
51
52
|
function R(c, i) {
|
|
52
53
|
if (typeof c == "object") {
|
|
53
54
|
if (!("initial" in c))
|
|
@@ -56,19 +57,19 @@ function R(c, i) {
|
|
|
56
57
|
} else
|
|
57
58
|
return i[c];
|
|
58
59
|
}
|
|
59
|
-
const
|
|
60
|
+
const pe = {
|
|
60
61
|
success: "green",
|
|
61
62
|
danger: "red",
|
|
62
63
|
info: "gray"
|
|
63
64
|
}, x = (c) => {
|
|
64
|
-
const i =
|
|
65
|
-
return c === "primary" ? i.accentColor :
|
|
66
|
-
},
|
|
65
|
+
const i = ee();
|
|
66
|
+
return c === "primary" ? i.accentColor : pe[c];
|
|
67
|
+
}, me = _(function({ className: i, severity: n = "primary", rounded: t, color: r, children: e, ...l }, s) {
|
|
67
68
|
const a = x(n);
|
|
68
69
|
return /* @__PURE__ */ o(
|
|
69
|
-
|
|
70
|
+
oe,
|
|
70
71
|
{
|
|
71
|
-
className:
|
|
72
|
+
className: v("overmap-badge", i),
|
|
72
73
|
ref: s,
|
|
73
74
|
color: r || a,
|
|
74
75
|
radius: t ? "full" : void 0,
|
|
@@ -76,11 +77,11 @@ const de = {
|
|
|
76
77
|
children: e
|
|
77
78
|
}
|
|
78
79
|
);
|
|
79
|
-
}),
|
|
80
|
-
fluid:
|
|
81
|
-
hoverSpin90Clockwise:
|
|
82
|
-
hoverSpin180Clockwise:
|
|
83
|
-
hoverSpin360Clockwise:
|
|
80
|
+
}), oo = C(me), he = "_fluid_r73gr_1", ge = "_hoverSpin90Clockwise_r73gr_15", fe = "_hoverSpin180Clockwise_r73gr_25", Ce = "_hoverSpin360Clockwise_r73gr_35", A = {
|
|
81
|
+
fluid: he,
|
|
82
|
+
hoverSpin90Clockwise: ge,
|
|
83
|
+
hoverSpin180Clockwise: fe,
|
|
84
|
+
hoverSpin360Clockwise: Ce
|
|
84
85
|
}, Q = {
|
|
85
86
|
spin90Clockwise: A.hoverSpin90Clockwise,
|
|
86
87
|
spin180Clockwise: A.hoverSpin180Clockwise,
|
|
@@ -89,13 +90,13 @@ const de = {
|
|
|
89
90
|
small: "1",
|
|
90
91
|
medium: "2",
|
|
91
92
|
large: "3"
|
|
92
|
-
},
|
|
93
|
+
}, ve = _(function({ className: i, fluid: n, size: t = "medium", severity: r = "primary", hoverEffects: e, type: l = "button", ...s }, a) {
|
|
93
94
|
const d = x(r), m = (e == null ? void 0 : e.map((u) => Q[u])) || [];
|
|
94
95
|
return /* @__PURE__ */ o(
|
|
95
|
-
|
|
96
|
+
te,
|
|
96
97
|
{
|
|
97
98
|
ref: a,
|
|
98
|
-
className:
|
|
99
|
+
className: v(i, m, {
|
|
99
100
|
[A.fluid]: n
|
|
100
101
|
}),
|
|
101
102
|
color: d,
|
|
@@ -104,7 +105,7 @@ const de = {
|
|
|
104
105
|
...s
|
|
105
106
|
}
|
|
106
107
|
);
|
|
107
|
-
}), G = B.memo(
|
|
108
|
+
}), G = B.memo(ve), _e = _(function({
|
|
108
109
|
className: i,
|
|
109
110
|
children: n,
|
|
110
111
|
size: t = "medium",
|
|
@@ -117,7 +118,7 @@ const de = {
|
|
|
117
118
|
return /* @__PURE__ */ o(
|
|
118
119
|
F,
|
|
119
120
|
{
|
|
120
|
-
className:
|
|
121
|
+
className: v(i, m, A.default),
|
|
121
122
|
ref: a,
|
|
122
123
|
color: d,
|
|
123
124
|
size: R(t, z),
|
|
@@ -126,12 +127,12 @@ const de = {
|
|
|
126
127
|
children: n
|
|
127
128
|
}
|
|
128
129
|
);
|
|
129
|
-
}), M = B.memo(
|
|
130
|
-
merged:
|
|
131
|
-
},
|
|
130
|
+
}), M = B.memo(_e), we = "_merged_f4366_1", ye = {
|
|
131
|
+
merged: we
|
|
132
|
+
}, Se = {
|
|
132
133
|
row: { small: "4", medium: "4", large: "5" },
|
|
133
134
|
column: { small: "2", medium: "3", large: "4" }
|
|
134
|
-
},
|
|
135
|
+
}, Te = _(function({
|
|
135
136
|
className: i,
|
|
136
137
|
merged: n = !1,
|
|
137
138
|
children: t,
|
|
@@ -144,33 +145,33 @@ const de = {
|
|
|
144
145
|
...m
|
|
145
146
|
}, u) {
|
|
146
147
|
return /* @__PURE__ */ o(
|
|
147
|
-
|
|
148
|
+
T,
|
|
148
149
|
{
|
|
149
|
-
className:
|
|
150
|
-
[
|
|
150
|
+
className: v("overmap-button-group", i, {
|
|
151
|
+
[ye.merged]: n
|
|
151
152
|
}),
|
|
152
153
|
ref: u,
|
|
153
|
-
gap: n ? a === "ghost" ? R(s,
|
|
154
|
+
gap: n ? a === "ghost" ? R(s, Se[e]) : "0" : r,
|
|
154
155
|
direction: e,
|
|
155
156
|
"data-direction": e,
|
|
156
157
|
...m,
|
|
157
|
-
children: t.map((p,
|
|
158
|
+
children: t.map((p, w) => p.type === G || p.type === M ? se(p, { key: w, size: s, severity: l, variant: a, hoverEffects: d }) : p)
|
|
158
159
|
}
|
|
159
160
|
);
|
|
160
|
-
}),
|
|
161
|
+
}), xe = C(Te), be = C(function(i) {
|
|
161
162
|
const { title: n, description: t, content: r, closeDialog: e } = i;
|
|
162
|
-
return /* @__PURE__ */ f(
|
|
163
|
-
/* @__PURE__ */ f(
|
|
164
|
-
/* @__PURE__ */ f(
|
|
163
|
+
return /* @__PURE__ */ f(T, { direction: "column", gap: "2", children: [
|
|
164
|
+
/* @__PURE__ */ f(T, { direction: "column", gap: "1", children: [
|
|
165
|
+
/* @__PURE__ */ f(T, { justify: "between", children: [
|
|
165
166
|
/* @__PURE__ */ o(k.Title, { mb: "0", children: n }),
|
|
166
|
-
/* @__PURE__ */ o(k.Close, { children: /* @__PURE__ */ o(F, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ o(
|
|
167
|
+
/* @__PURE__ */ o(k.Close, { children: /* @__PURE__ */ o(F, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ o(X, {}) }) })
|
|
167
168
|
] }),
|
|
168
169
|
/* @__PURE__ */ o(k.Description, { children: t })
|
|
169
170
|
] }),
|
|
170
171
|
r(e)
|
|
171
172
|
] });
|
|
172
|
-
}),
|
|
173
|
-
const { children: n, size: t, onOpen: r, onCloseInterrupt: e, ...l } = i, [s, a] = L(!1), d =
|
|
173
|
+
}), to = C(function(i) {
|
|
174
|
+
const { children: n, size: t, onOpen: r, onCloseInterrupt: e, ...l } = i, [s, a] = L(!1), d = S(
|
|
174
175
|
(u) => {
|
|
175
176
|
if (u && r)
|
|
176
177
|
r();
|
|
@@ -179,7 +180,7 @@ const de = {
|
|
|
179
180
|
a(u);
|
|
180
181
|
},
|
|
181
182
|
[r, e]
|
|
182
|
-
), m =
|
|
183
|
+
), m = S(
|
|
183
184
|
(u) => {
|
|
184
185
|
if (u != null && u.force)
|
|
185
186
|
return a(!1);
|
|
@@ -188,37 +189,37 @@ const de = {
|
|
|
188
189
|
[d]
|
|
189
190
|
);
|
|
190
191
|
return /* @__PURE__ */ f(k.Root, { open: s, onOpenChange: d, children: [
|
|
191
|
-
/* @__PURE__ */ o(k.Content, { size: t, children: /* @__PURE__ */ o(
|
|
192
|
+
/* @__PURE__ */ o(k.Content, { size: t, children: /* @__PURE__ */ o(be, { closeDialog: m, ...l }) }),
|
|
192
193
|
n(k.Trigger)
|
|
193
194
|
] });
|
|
194
|
-
}), J = (c) => /* @__PURE__ */ o(b.Title, { mb: "0", ...c }),
|
|
195
|
+
}), J = (c) => /* @__PURE__ */ o(b.Title, { mb: "0", ...c }), De = (c) => {
|
|
195
196
|
const { title: i, description: n, actionText: t = "Confirm", cancelText: r = "Cancel", onAction: e, onCancel: l, severity: s } = c;
|
|
196
|
-
return /* @__PURE__ */ f(
|
|
197
|
-
/* @__PURE__ */ f(
|
|
197
|
+
return /* @__PURE__ */ f(T, { direction: "column", gap: "2", children: [
|
|
198
|
+
/* @__PURE__ */ f(T, { direction: "column", gap: "1", children: [
|
|
198
199
|
/* @__PURE__ */ o(J, { children: i }),
|
|
199
200
|
/* @__PURE__ */ o(b.Description, { children: n })
|
|
200
201
|
] }),
|
|
201
|
-
/* @__PURE__ */ f(
|
|
202
|
+
/* @__PURE__ */ f(T, { gap: "3", mt: "4", justify: "end", children: [
|
|
202
203
|
/* @__PURE__ */ o(b.Cancel, { children: /* @__PURE__ */ o(G, { variant: "soft", severity: "info", onClick: l, children: r }) }),
|
|
203
204
|
/* @__PURE__ */ o(b.Action, { children: /* @__PURE__ */ o(G, { variant: "solid", severity: s, onClick: e, children: t }) })
|
|
204
205
|
] })
|
|
205
206
|
] });
|
|
206
|
-
},
|
|
207
|
+
}, ke = C(function(i) {
|
|
207
208
|
const { open: n, setOpen: t, children: r, ...e } = i, l = j(() => ({
|
|
208
209
|
close: () => t(!1),
|
|
209
210
|
Title: J,
|
|
210
211
|
Description: b.Description
|
|
211
212
|
}), [t]);
|
|
212
213
|
return /* @__PURE__ */ f(b.Root, { open: n, onOpenChange: t, children: [
|
|
213
|
-
/* @__PURE__ */ o(b.Content, { children: "content" in e ? e.content(l) : /* @__PURE__ */ o(
|
|
214
|
+
/* @__PURE__ */ o(b.Content, { children: "content" in e ? e.content(l) : /* @__PURE__ */ o(De, { ...e }) }),
|
|
214
215
|
r
|
|
215
216
|
] });
|
|
216
217
|
}), U = H(() => {
|
|
217
218
|
throw new Error("No AlertDialogProvider found");
|
|
218
|
-
}),
|
|
219
|
+
}), Ie = {
|
|
219
220
|
content: () => null
|
|
220
|
-
},
|
|
221
|
-
const [n, t] = L(!1), [r, e] = L(
|
|
221
|
+
}, no = C(function({ children: i }) {
|
|
222
|
+
const [n, t] = L(!1), [r, e] = L(Ie), l = S(
|
|
222
223
|
(s) => {
|
|
223
224
|
if (n)
|
|
224
225
|
throw new Error("AlertDialog is already open");
|
|
@@ -226,10 +227,10 @@ const de = {
|
|
|
226
227
|
},
|
|
227
228
|
[n]
|
|
228
229
|
);
|
|
229
|
-
return /* @__PURE__ */ o(
|
|
230
|
-
}),
|
|
231
|
-
fluid:
|
|
232
|
-
},
|
|
230
|
+
return /* @__PURE__ */ o(ke, { open: n, setOpen: t, ...r, children: /* @__PURE__ */ o(U.Provider, { value: l, children: i }) });
|
|
231
|
+
}), ro = () => ce(U), Ae = "_fluid_7n1wr_1", Be = {
|
|
232
|
+
fluid: Ae
|
|
233
|
+
}, Re = _(function({
|
|
233
234
|
className: i,
|
|
234
235
|
fluid: n,
|
|
235
236
|
size: t = "medium",
|
|
@@ -239,19 +240,21 @@ const de = {
|
|
|
239
240
|
side: s,
|
|
240
241
|
items: a = [],
|
|
241
242
|
value: d,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
id: m,
|
|
244
|
+
...u
|
|
245
|
+
}, p) {
|
|
246
|
+
const w = j(() => R(t, z), [t]), h = x(e);
|
|
247
|
+
return /* @__PURE__ */ q(P.Root, { size: w, ...u, key: d === void 0 ? 1 : 0, value: d }, /* @__PURE__ */ o(
|
|
246
248
|
P.Trigger,
|
|
247
249
|
{
|
|
248
|
-
className:
|
|
249
|
-
[
|
|
250
|
+
className: v(i, {
|
|
251
|
+
[Be.fluid]: n
|
|
250
252
|
}),
|
|
251
|
-
|
|
253
|
+
id: m,
|
|
254
|
+
ref: p,
|
|
252
255
|
variant: r,
|
|
253
256
|
placeholder: l,
|
|
254
|
-
color:
|
|
257
|
+
color: h
|
|
255
258
|
}
|
|
256
259
|
), /* @__PURE__ */ o(
|
|
257
260
|
P.Content,
|
|
@@ -259,17 +262,17 @@ const de = {
|
|
|
259
262
|
side: s,
|
|
260
263
|
position: "popper",
|
|
261
264
|
variant: r !== "surface" ? "soft" : "solid",
|
|
262
|
-
color:
|
|
263
|
-
children: a.map(({ label:
|
|
265
|
+
color: h,
|
|
266
|
+
children: a.map(({ label: g, value: y, ...W }) => /* @__PURE__ */ o(P.Item, { value: y, ...W, children: g }, y))
|
|
264
267
|
}
|
|
265
268
|
));
|
|
266
|
-
}),
|
|
267
|
-
accommodateCharCount:
|
|
269
|
+
}), io = B.memo(Re), Pe = "_accommodateCharCount_fni4k_1", $e = "_noLeftIcon_fni4k_9", Ne = "_noRightIcon_fni4k_13", Oe = "_charCount_fni4k_17", I = {
|
|
270
|
+
accommodateCharCount: Pe,
|
|
268
271
|
default: "_default_fni4k_5",
|
|
269
|
-
noLeftIcon:
|
|
270
|
-
noRightIcon:
|
|
271
|
-
charCount:
|
|
272
|
-
},
|
|
272
|
+
noLeftIcon: $e,
|
|
273
|
+
noRightIcon: Ne,
|
|
274
|
+
charCount: Oe
|
|
275
|
+
}, Le = _(function({
|
|
273
276
|
className: i,
|
|
274
277
|
leftIcon: n,
|
|
275
278
|
rightIcon: t,
|
|
@@ -280,12 +283,12 @@ const de = {
|
|
|
280
283
|
severity: a = "primary",
|
|
281
284
|
...d
|
|
282
285
|
}, m) {
|
|
283
|
-
const u = j(() => R(r, z), [r]), p = x(a),
|
|
286
|
+
const u = j(() => R(r, z), [r]), p = x(a), w = e || e === void 0 && d.maxLength !== void 0, h = l !== void 0 ? l.toString() : void 0;
|
|
284
287
|
return /* @__PURE__ */ f(
|
|
285
288
|
$.Root,
|
|
286
289
|
{
|
|
287
|
-
className:
|
|
288
|
-
[I.accommodateCharCount]:
|
|
290
|
+
className: v({
|
|
291
|
+
[I.accommodateCharCount]: w
|
|
289
292
|
}),
|
|
290
293
|
size: u,
|
|
291
294
|
variant: s,
|
|
@@ -295,7 +298,7 @@ const de = {
|
|
|
295
298
|
/* @__PURE__ */ o(
|
|
296
299
|
$.Input,
|
|
297
300
|
{
|
|
298
|
-
className:
|
|
301
|
+
className: v(I.default, i, {
|
|
299
302
|
[I.noLeftIcon]: !n,
|
|
300
303
|
[I.noRightIcon]: !t
|
|
301
304
|
}),
|
|
@@ -307,30 +310,30 @@ const de = {
|
|
|
307
310
|
}
|
|
308
311
|
),
|
|
309
312
|
/* @__PURE__ */ o($.Slot, { children: t }),
|
|
310
|
-
|
|
313
|
+
w && /* @__PURE__ */ o(V, { as: "p", className: I.charCount, size: "1", color: "gray", children: d.maxLength !== void 0 ? `${h == null ? void 0 : h.length}/${d.maxLength}` : `${h == null ? void 0 : h.length}` })
|
|
311
314
|
]
|
|
312
315
|
}
|
|
313
316
|
);
|
|
314
|
-
}),
|
|
317
|
+
}), so = B.memo(Le), je = _(function({ defaultOpen: i = !1, modal: n = !1, content: t, children: r, ...e }, l) {
|
|
315
318
|
return /* @__PURE__ */ f(N.Root, { defaultOpen: i, modal: n, children: [
|
|
316
319
|
/* @__PURE__ */ o(N.Trigger, { children: r }),
|
|
317
320
|
/* @__PURE__ */ o(N.Content, { ref: l, ...e, children: t(N.Close) })
|
|
318
321
|
] });
|
|
319
|
-
}),
|
|
320
|
-
charCount:
|
|
321
|
-
},
|
|
322
|
-
const d = x(e), m = x("info"), u = n || n === void 0 && (s.maxLength !== void 0 || s.minLength !== void 0), p = r !== void 0 ? r.toString() : "",
|
|
322
|
+
}), co = B.memo(je), ze = "_charCount_17uut_1", Ge = {
|
|
323
|
+
charCount: ze
|
|
324
|
+
}, Me = _(function({ className: i, showInputLength: n, inputLengthTemplate: t, value: r, severity: e = "primary", resize: l, ...s }, a) {
|
|
325
|
+
const d = x(e), m = x("info"), u = n || n === void 0 && (s.maxLength !== void 0 || s.minLength !== void 0), p = r !== void 0 ? r.toString() : "", w = j(() => {
|
|
323
326
|
if (t) {
|
|
324
327
|
let h = t.replace("{current}", p.length.toString());
|
|
325
328
|
return s.minLength !== void 0 && (h = h.replace("{min}", s.minLength.toString())), s.maxLength !== void 0 && (h = h.replace("{max}", s.maxLength.toString())), h;
|
|
326
329
|
}
|
|
327
330
|
return p.length;
|
|
328
331
|
}, [t, s.maxLength, s.minLength, p.length]);
|
|
329
|
-
return /* @__PURE__ */ f(
|
|
332
|
+
return /* @__PURE__ */ f(ie, { children: [
|
|
330
333
|
/* @__PURE__ */ o(
|
|
331
|
-
|
|
334
|
+
ne,
|
|
332
335
|
{
|
|
333
|
-
className:
|
|
336
|
+
className: v("overmap-textarea", i),
|
|
334
337
|
style: { resize: l },
|
|
335
338
|
ref: a,
|
|
336
339
|
value: r,
|
|
@@ -338,9 +341,9 @@ const de = {
|
|
|
338
341
|
...s
|
|
339
342
|
}
|
|
340
343
|
),
|
|
341
|
-
u && /* @__PURE__ */ o(V, { as: "p", className:
|
|
344
|
+
u && /* @__PURE__ */ o(V, { as: "p", className: Ge.charCount, color: m, align: "right", children: w })
|
|
342
345
|
] });
|
|
343
|
-
}),
|
|
346
|
+
}), lo = C(Me), Ee = _(function({
|
|
344
347
|
className: i,
|
|
345
348
|
items: n,
|
|
346
349
|
orientation: t = "horizontal",
|
|
@@ -352,25 +355,25 @@ const de = {
|
|
|
352
355
|
...d
|
|
353
356
|
}, m) {
|
|
354
357
|
return /* @__PURE__ */ o(
|
|
355
|
-
|
|
358
|
+
le,
|
|
356
359
|
{
|
|
357
|
-
className:
|
|
360
|
+
className: v("overmap-toggle-group", i),
|
|
358
361
|
ref: m,
|
|
359
362
|
value: e,
|
|
360
363
|
orientation: t,
|
|
361
364
|
...d,
|
|
362
365
|
children: /* @__PURE__ */ o(
|
|
363
|
-
|
|
366
|
+
xe,
|
|
364
367
|
{
|
|
365
368
|
width: "min-content",
|
|
366
369
|
height: "min-content",
|
|
367
370
|
merged: r,
|
|
368
371
|
direction: t === "vertical" ? "column" : "row",
|
|
369
372
|
gap: s,
|
|
370
|
-
children: n.map(({ children: u, ...p }) => /* @__PURE__ */ q(
|
|
373
|
+
children: n.map(({ children: u, ...p }) => /* @__PURE__ */ q(ae, { asChild: !0, ...p, key: p.value }, /* @__PURE__ */ o(
|
|
371
374
|
M,
|
|
372
375
|
{
|
|
373
|
-
className:
|
|
376
|
+
className: v("overmap-toggle-group-button"),
|
|
374
377
|
"aria-label": p.value,
|
|
375
378
|
severity: l,
|
|
376
379
|
variant: p.value === e ? "solid" : "soft",
|
|
@@ -382,11 +385,11 @@ const de = {
|
|
|
382
385
|
)
|
|
383
386
|
}
|
|
384
387
|
);
|
|
385
|
-
}),
|
|
386
|
-
wrapper:
|
|
387
|
-
slideRight:
|
|
388
|
-
},
|
|
389
|
-
const d = x(r), m =
|
|
388
|
+
}), ao = C(Ee), Fe = "_wrapper_o13vb_1", Ve = "_slideRight_o13vb_1", E = {
|
|
389
|
+
wrapper: Fe,
|
|
390
|
+
slideRight: Ve
|
|
391
|
+
}, He = _(function({ title: i, description: n, icon: t, severity: r = "primary", size: e, onClose: l, ...s }, a) {
|
|
392
|
+
const d = x(r), m = S(
|
|
390
393
|
(u) => {
|
|
391
394
|
!u && l && l();
|
|
392
395
|
},
|
|
@@ -395,14 +398,14 @@ const de = {
|
|
|
395
398
|
return /* @__PURE__ */ o(D.Root, { asChild: !0, ref: a, ...s, onOpenChange: m, children: /* @__PURE__ */ o(
|
|
396
399
|
O.Root,
|
|
397
400
|
{
|
|
398
|
-
className:
|
|
401
|
+
className: v("overmap-toast", E.wrapper),
|
|
399
402
|
variant: "surface",
|
|
400
403
|
color: d,
|
|
401
404
|
size: e,
|
|
402
|
-
children: /* @__PURE__ */ f(
|
|
403
|
-
/* @__PURE__ */ f(
|
|
404
|
-
/* @__PURE__ */ o(O.Icon, { children: t || /* @__PURE__ */ o(
|
|
405
|
-
/* @__PURE__ */ f(
|
|
405
|
+
children: /* @__PURE__ */ f(T, { width: "100%", align: "center", gap: "4", justify: "between", children: [
|
|
406
|
+
/* @__PURE__ */ f(T, { align: "center", gap: "4", children: [
|
|
407
|
+
/* @__PURE__ */ o(O.Icon, { children: t || /* @__PURE__ */ o(Y, {}) }),
|
|
408
|
+
/* @__PURE__ */ f(T, { direction: "column", gap: "0", children: [
|
|
406
409
|
/* @__PURE__ */ o(D.Title, { asChild: !0, children: /* @__PURE__ */ o(O.Text, { weight: "bold", children: i }) }),
|
|
407
410
|
/* @__PURE__ */ o(D.Description, { asChild: !0, children: /* @__PURE__ */ o(O.Text, { weight: "light", children: n }) })
|
|
408
411
|
] })
|
|
@@ -415,18 +418,18 @@ const de = {
|
|
|
415
418
|
variant: "ghost",
|
|
416
419
|
size: "small",
|
|
417
420
|
severity: r,
|
|
418
|
-
children: /* @__PURE__ */ o(
|
|
421
|
+
children: /* @__PURE__ */ o(Z, {})
|
|
419
422
|
}
|
|
420
423
|
) })
|
|
421
424
|
] })
|
|
422
425
|
}
|
|
423
426
|
) });
|
|
424
|
-
}),
|
|
427
|
+
}), qe = C(function({
|
|
425
428
|
children: i,
|
|
426
429
|
...n
|
|
427
430
|
}) {
|
|
428
431
|
return /* @__PURE__ */ o(D.Provider, { swipeDirection: "right", swipeThreshold: 75, ...n, children: i });
|
|
429
|
-
}),
|
|
432
|
+
}), Ke = C(He), Qe = D.Viewport, Je = H({}), uo = C(function({
|
|
430
433
|
children: i,
|
|
431
434
|
// Use this class to change where the viewport for the toasts should be
|
|
432
435
|
viewportClass: n,
|
|
@@ -435,32 +438,32 @@ const de = {
|
|
|
435
438
|
duration: r = 1e4,
|
|
436
439
|
...e
|
|
437
440
|
}) {
|
|
438
|
-
const [l, s] = L([]), a =
|
|
439
|
-
s((
|
|
440
|
-
}, []), d =
|
|
441
|
+
const [l, s] = L([]), a = S((g) => {
|
|
442
|
+
s((y) => [...y, g]);
|
|
443
|
+
}, []), d = S(
|
|
441
444
|
(g) => {
|
|
442
445
|
a({ severity: "primary", ...g });
|
|
443
446
|
},
|
|
444
447
|
[a]
|
|
445
|
-
), m =
|
|
448
|
+
), m = S(
|
|
446
449
|
(g) => {
|
|
447
450
|
a({ severity: "success", ...g });
|
|
448
451
|
},
|
|
449
452
|
[a]
|
|
450
|
-
), u =
|
|
453
|
+
), u = S(
|
|
451
454
|
(g) => {
|
|
452
455
|
a({ severity: "danger", ...g });
|
|
453
456
|
},
|
|
454
457
|
[a]
|
|
455
|
-
), p =
|
|
458
|
+
), p = S(
|
|
456
459
|
(g) => {
|
|
457
460
|
a({ severity: "info", ...g });
|
|
458
461
|
},
|
|
459
462
|
[a]
|
|
460
|
-
),
|
|
463
|
+
), w = S(
|
|
461
464
|
(g) => {
|
|
462
|
-
const
|
|
463
|
-
|
|
465
|
+
const y = [...l];
|
|
466
|
+
y.splice(g, 1), s(() => y);
|
|
464
467
|
},
|
|
465
468
|
[l]
|
|
466
469
|
), h = {
|
|
@@ -470,75 +473,75 @@ const de = {
|
|
|
470
473
|
showError: u,
|
|
471
474
|
showInfo: p
|
|
472
475
|
};
|
|
473
|
-
return /* @__PURE__ */ o(
|
|
474
|
-
/* @__PURE__ */ o(
|
|
475
|
-
l.map((g,
|
|
476
|
+
return /* @__PURE__ */ o(Je.Provider, { value: h, children: /* @__PURE__ */ f(qe, { duration: r, ...e, children: [
|
|
477
|
+
/* @__PURE__ */ o(Qe, { className: n, hotkey: t }),
|
|
478
|
+
l.map((g, y) => /* @__PURE__ */ o(Ke, { ...g, onClose: () => w(y) }, y)),
|
|
476
479
|
i
|
|
477
480
|
] }) });
|
|
478
481
|
});
|
|
479
|
-
const
|
|
480
|
-
|
|
482
|
+
const po = C(
|
|
483
|
+
_((c, i) => {
|
|
481
484
|
const { panelBackground: n = "solid", ...t } = c;
|
|
482
|
-
return /* @__PURE__ */ o(
|
|
485
|
+
return /* @__PURE__ */ o(re, { panelBackground: n, ref: i, ...t });
|
|
483
486
|
})
|
|
484
487
|
);
|
|
485
488
|
export {
|
|
486
|
-
|
|
487
|
-
|
|
489
|
+
Co as AccessibleIcon,
|
|
490
|
+
ke as AlertDialog,
|
|
488
491
|
U as AlertDialogContent,
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
492
|
+
no as AlertDialogProvider,
|
|
493
|
+
vo as AspectRatio,
|
|
494
|
+
_o as Avatar,
|
|
495
|
+
oo as Badge,
|
|
496
|
+
wo as Blockquote,
|
|
497
|
+
yo as Box,
|
|
495
498
|
G as Button,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
499
|
+
xe as ButtonGroup,
|
|
500
|
+
So as Callout,
|
|
501
|
+
To as Card,
|
|
502
|
+
xo as Checkbox,
|
|
503
|
+
bo as Code,
|
|
504
|
+
Do as Container,
|
|
505
|
+
ko as ContextMenu,
|
|
506
|
+
po as DefaultTheme,
|
|
507
|
+
to as Dialog,
|
|
508
|
+
Io as DropdownMenu,
|
|
509
|
+
Ao as Em,
|
|
510
|
+
Bo as Flex,
|
|
511
|
+
Ro as Grid,
|
|
512
|
+
Po as Heading,
|
|
513
|
+
$o as HoverCard,
|
|
511
514
|
M as IconButton,
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
515
|
+
so as Input,
|
|
516
|
+
No as Inset,
|
|
517
|
+
Oo as Kbd,
|
|
518
|
+
Lo as Link,
|
|
519
|
+
co as Popover,
|
|
520
|
+
jo as Portal,
|
|
521
|
+
zo as Quote,
|
|
522
|
+
Go as RadioGroup,
|
|
523
|
+
Mo as ScrollArea,
|
|
524
|
+
Eo as Section,
|
|
525
|
+
io as Select,
|
|
526
|
+
Fo as Separator,
|
|
527
|
+
Vo as Slider,
|
|
528
|
+
Ho as Slot,
|
|
529
|
+
qo as Strong,
|
|
530
|
+
Ko as Switch,
|
|
531
|
+
Qo as Table,
|
|
532
|
+
Jo as Tabs,
|
|
533
|
+
Uo as Text,
|
|
534
|
+
lo as TextArea,
|
|
535
|
+
Wo as TextField,
|
|
536
|
+
Xo as Theme,
|
|
537
|
+
Ke as Toast,
|
|
538
|
+
Je as ToastContext,
|
|
539
|
+
uo as ToastContextProvider,
|
|
540
|
+
qe as ToastProvider,
|
|
541
|
+
Qe as ToastViewport,
|
|
542
|
+
ao as ToggleGroup,
|
|
543
|
+
Yo as Tooltip,
|
|
544
|
+
Zo as VisuallyHidden,
|
|
545
|
+
ro as useAlertDialog
|
|
543
546
|
};
|
|
544
547
|
//# sourceMappingURL=blocks.js.map
|