@overmap-ai/blocks 0.0.1 → 0.0.2-alpha.0

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 CHANGED
@@ -1,371 +1,432 @@
1
1
  import "@radix-ui/themes/styles.css";
2
2
  export * from "@radix-ui/colors";
3
- import { Cross1Icon as he, InfoCircledIcon as pe, Cross2Icon as me } from "@radix-ui/react-icons";
3
+ import { Cross1Icon as me, InfoCircledIcon as fe, Cross2Icon as ge } from "@radix-ui/react-icons";
4
4
  export * from "@radix-ui/react-icons";
5
- import { useThemeContext as fe, Badge as ge, Button as Ce, IconButton as Y, Flex as x, Dialog as N, AlertDialog as R, Select as I, Box as ve, Checkbox as _e, Switch as we, Portal as ye, TextField as V, Text as H, Popover as j, TextArea as Te, Callout as G, Theme as Se } from "@radix-ui/themes";
6
- import { AccessibleIcon as qt, AspectRatio as Kt, Avatar as Ut, Blockquote as Qt, Box as Jt, Callout as Xt, Card as Yt, Checkbox as Zt, Code as eo, Container as to, ContextMenu as oo, DropdownMenu as no, Em as ro, Flex as so, Grid as io, Heading as co, HoverCard as lo, Inset as ao, Kbd as uo, Link as ho, Portal as po, Quote as mo, RadioGroup as fo, ScrollArea as go, Section as Co, Separator as vo, Slider as _o, Slot as wo, Strong as yo, Switch as To, Table as So, Tabs as xo, TextField as ko, Theme as bo, Tooltip as Io, VisuallyHidden as Do, updateThemeAppearanceClass as Ro, useThemeContext as Ao } from "@radix-ui/themes";
7
- import { jsx as o, jsxs as C, Fragment as Z } from "react/jsx-runtime";
8
- import P, { useMemo as z, forwardRef as _, memo as w, createContext as q, useContext as K, useState as D, useCallback as b, createElement as ee, useEffect as te, useRef as xe, useLayoutEffect as ke } from "react";
9
- import { Root as be, Item as Ie } from "@radix-ui/react-toggle-group";
10
- import * as M from "@radix-ui/react-toast";
11
- import { ToastProvider as De, ToastViewport as Re } from "@radix-ui/react-toast";
12
- function Ae(n) {
13
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
5
+ import { useThemeContext as Ce, Badge as ve, Button as _e, IconButton as te, Flex as x, Dialog as E, AlertDialog as $, DropdownMenu as D, Select as k, Box as we, Checkbox as Se, Switch as ye, Portal as Te, TextField as V, Text as q, Popover as j, TextArea as xe, Callout as F, Theme as De, Separator as X } from "@radix-ui/themes";
6
+ import { AccessibleIcon as ro, AspectRatio as co, Avatar as so, Blockquote as io, Box as ao, Callout as lo, Card as uo, Checkbox as ho, Code as po, Container as mo, ContextMenu as fo, Em as go, Flex as Co, Grid as vo, Heading as _o, HoverCard as wo, Inset as So, Kbd as yo, Link as To, Portal as xo, Quote as Do, RadioGroup as bo, ScrollArea as Io, Section as ko, Slider as Ro, Slot as $o, Strong as Ao, Table as No, Tabs as Oo, TextField as Eo, Theme as Bo, Tooltip as zo, VisuallyHidden as Po, updateThemeAppearanceClass as Mo, useThemeContext as Lo } from "@radix-ui/themes";
7
+ import { jsx as o, jsxs as g, Fragment as P } from "react/jsx-runtime";
8
+ import M, { useMemo as L, forwardRef as w, memo as C, createContext as U, useContext as Q, useState as R, useCallback as I, createElement as oe, useEffect as ne, useRef as be, useLayoutEffect as Ie } from "react";
9
+ import { Root as ke, Item as Re } from "@radix-ui/react-toggle-group";
10
+ import * as W from "@radix-ui/react-toast";
11
+ import { ToastProvider as $e, ToastViewport as Ae } from "@radix-ui/react-toast";
12
+ function Ne(c) {
13
+ return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
14
14
  }
15
- var oe = { exports: {} };
15
+ var re = { exports: {} };
16
16
  /*!
17
17
  Copyright (c) 2018 Jed Watson.
18
18
  Licensed under the MIT License (MIT), see
19
19
  http://jedwatson.github.io/classnames
20
20
  */
21
- (function(n) {
21
+ (function(c) {
22
22
  (function() {
23
- var c = {}.hasOwnProperty;
24
- function r() {
25
- for (var t = [], i = 0; i < arguments.length; i++) {
26
- var e = arguments[i];
23
+ var i = {}.hasOwnProperty;
24
+ function n() {
25
+ for (var t = [], r = 0; r < arguments.length; r++) {
26
+ var e = arguments[r];
27
27
  if (e) {
28
- var l = typeof e;
29
- if (l === "string" || l === "number")
28
+ var a = typeof e;
29
+ if (a === "string" || a === "number")
30
30
  t.push(e);
31
31
  else if (Array.isArray(e)) {
32
32
  if (e.length) {
33
- var s = r.apply(null, e);
33
+ var s = n.apply(null, e);
34
34
  s && t.push(s);
35
35
  }
36
- } else if (l === "object") {
36
+ } else if (a === "object") {
37
37
  if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]")) {
38
38
  t.push(e.toString());
39
39
  continue;
40
40
  }
41
- for (var p in e)
42
- c.call(e, p) && e[p] && t.push(p);
41
+ for (var u in e)
42
+ i.call(e, u) && e[u] && t.push(u);
43
43
  }
44
44
  }
45
45
  }
46
46
  return t.join(" ");
47
47
  }
48
- n.exports ? (r.default = r, n.exports = r) : window.classNames = r;
48
+ c.exports ? (n.default = n, c.exports = n) : window.classNames = n;
49
49
  })();
50
- })(oe);
51
- var $e = oe.exports;
52
- const T = /* @__PURE__ */ Ae($e);
53
- function O(n, c) {
54
- return z(() => {
55
- if (n !== void 0)
56
- if (typeof n == "object") {
57
- if (!("initial" in n))
50
+ })(re);
51
+ var Oe = re.exports;
52
+ const T = /* @__PURE__ */ Ne(Oe);
53
+ function A(c, i) {
54
+ return L(() => {
55
+ if (c !== void 0)
56
+ if (typeof c == "object") {
57
+ if (!("initial" in c))
58
58
  throw new Error("Expected initial property to be set in Responsive object");
59
- return Object.fromEntries(Object.entries(n).map(([r, t]) => [r, c[t]]));
59
+ return Object.fromEntries(Object.entries(c).map(([n, t]) => [n, i[t]]));
60
60
  } else
61
- return c[n];
62
- }, [c, n]);
61
+ return i[c];
62
+ }, [i, c]);
63
63
  }
64
- const Ne = {
64
+ const Ee = {
65
65
  success: "green",
66
66
  danger: "red",
67
67
  info: "gray"
68
- }, S = (n) => {
69
- const c = fe();
70
- if (n)
71
- return n === "primary" ? c.accentColor : Ne[n];
72
- }, Oe = _(function({ className: c, severity: r = "primary", color: t, children: i, ...e }, l) {
73
- const s = S(r);
68
+ }, S = (c) => {
69
+ const i = Ce();
70
+ if (c)
71
+ return c === "primary" ? i.accentColor : Ee[c];
72
+ }, Be = w(function({ className: i, severity: n = "primary", color: t, children: r, ...e }, a) {
73
+ const s = S(n);
74
74
  return /* @__PURE__ */ o(
75
- ge,
75
+ ve,
76
76
  {
77
- className: T("overmap-badge", c),
78
- ref: l,
77
+ className: T("overmap-badge", i),
78
+ ref: a,
79
79
  color: t || s,
80
80
  ...e,
81
- children: i
81
+ children: r
82
82
  }
83
83
  );
84
- }), Dt = w(Oe), Ee = "_fluid_r73gr_1", Be = "_hoverSpin90Clockwise_r73gr_15", Pe = "_hoverSpin180Clockwise_r73gr_25", ze = "_hoverSpin360Clockwise_r73gr_35", B = {
85
- fluid: Ee,
86
- hoverSpin90Clockwise: Be,
87
- hoverSpin180Clockwise: Pe,
88
- hoverSpin360Clockwise: ze
89
- }, ne = {
90
- spin90Clockwise: B.hoverSpin90Clockwise,
91
- spin180Clockwise: B.hoverSpin180Clockwise,
92
- spin360Clockwise: B.hoverSpin360Clockwise
93
- }, L = {
84
+ }), Pt = C(Be), ze = "_fluid_r73gr_1", Pe = "_hoverSpin90Clockwise_r73gr_15", Me = "_hoverSpin180Clockwise_r73gr_25", Le = "_hoverSpin360Clockwise_r73gr_35", z = {
85
+ fluid: ze,
86
+ hoverSpin90Clockwise: Pe,
87
+ hoverSpin180Clockwise: Me,
88
+ hoverSpin360Clockwise: Le
89
+ }, ce = {
90
+ spin90Clockwise: z.hoverSpin90Clockwise,
91
+ spin180Clockwise: z.hoverSpin180Clockwise,
92
+ spin360Clockwise: z.hoverSpin360Clockwise
93
+ }, G = {
94
94
  small: "1",
95
95
  medium: "2",
96
96
  large: "3"
97
- }, re = q({}), se = () => K(re), Le = _(function(c, r) {
98
- const t = se(), {
99
- className: i,
97
+ }, se = U({}), ie = () => Q(se), Ge = w(function(i, n) {
98
+ const t = ie(), {
99
+ className: r,
100
100
  type: e = "button",
101
- fluid: l = t.fluid ?? !1,
101
+ fluid: a = t.fluid ?? !1,
102
102
  size: s = t.size ?? "medium",
103
- severity: p = t.severity ?? "primary",
104
- hoverEffects: a = t.hoverEffects ?? [],
103
+ severity: u = t.severity ?? "primary",
104
+ hoverEffects: l = t.hoverEffects ?? [],
105
105
  variant: d = t.variant,
106
- ...h
107
- } = c, m = S(p), f = a.map((u) => ne[u]);
106
+ ...p
107
+ } = i, m = S(u), f = l.map((h) => ce[h]);
108
108
  return /* @__PURE__ */ o(
109
- Ce,
109
+ _e,
110
110
  {
111
- ref: r,
111
+ ref: n,
112
112
  type: e,
113
- className: T(i, f, {
114
- [B.fluid]: l
113
+ className: T(r, f, {
114
+ [z.fluid]: a
115
115
  }),
116
116
  color: m,
117
- size: O(s, L),
117
+ size: A(s, G),
118
118
  variant: d,
119
- ...h
119
+ ...p
120
120
  }
121
121
  );
122
- }), Q = P.memo(Le), Ve = _(function(c, r) {
123
- const t = se(), {
124
- className: i,
122
+ }), Y = M.memo(Ge), Ve = w(function(i, n) {
123
+ const t = ie(), {
124
+ className: r,
125
125
  children: e,
126
- type: l = "button",
126
+ type: a = "button",
127
127
  fluid: s = t.fluid ?? !1,
128
- size: p = t.size ?? "medium",
129
- severity: a = t.severity ?? "primary",
128
+ size: u = t.size ?? "medium",
129
+ severity: l = t.severity ?? "primary",
130
130
  hoverEffects: d = t.hoverEffects ?? [],
131
- variant: h = t.variant,
131
+ variant: p = t.variant,
132
132
  ...m
133
- } = c, f = S(a), u = (d == null ? void 0 : d.map((g) => ne[g])) || [];
133
+ } = i, f = S(l), h = (d == null ? void 0 : d.map((v) => ce[v])) || [];
134
134
  return /* @__PURE__ */ o(
135
- Y,
135
+ te,
136
136
  {
137
- className: T(i, u, {
138
- [B.fluid]: s
137
+ className: T(r, h, {
138
+ [z.fluid]: s
139
139
  }),
140
- ref: r,
140
+ ref: n,
141
141
  color: f,
142
- size: O(p, L),
143
- variant: h,
144
- type: l,
142
+ size: A(u, G),
143
+ variant: p,
144
+ type: a,
145
145
  ...m,
146
146
  children: e
147
147
  }
148
148
  );
149
- }), ie = P.memo(Ve), je = "_merged_f4366_1", Ge = {
149
+ }), ae = M.memo(Ve), je = "_merged_f4366_1", Fe = {
150
150
  merged: je
151
- }, Me = {
151
+ }, We = {
152
152
  row: { small: "4", medium: "4", large: "5" },
153
153
  column: { small: "2", medium: "3", large: "4" }
154
- }, Fe = _(function({
155
- className: c,
156
- merged: r = !1,
154
+ }, He = w(function({
155
+ className: i,
156
+ merged: n = !1,
157
157
  children: t,
158
- gap: i,
158
+ gap: r,
159
159
  direction: e = "row",
160
- severity: l,
160
+ severity: a,
161
161
  size: s = "medium",
162
- variant: p,
163
- hoverEffects: a,
162
+ variant: u,
163
+ hoverEffects: l,
164
164
  fluid: d,
165
- ...h
165
+ ...p
166
166
  }, m) {
167
- const f = O(s, Me[e]), u = p === "ghost" ? f : "0";
167
+ const f = A(s, We[e]), h = u === "ghost" ? f : "0";
168
168
  return /* @__PURE__ */ o(
169
169
  x,
170
170
  {
171
- className: T("overmap-button-group", c, {
172
- [Ge.merged]: r
171
+ className: T("overmap-button-group", i, {
172
+ [Fe.merged]: n
173
173
  }),
174
174
  ref: m,
175
- gap: r ? i ?? u : i ?? "2",
175
+ gap: n ? r ?? h : r ?? "2",
176
176
  direction: e,
177
177
  "data-direction": e,
178
- ...h,
179
- children: /* @__PURE__ */ o(re.Provider, { value: { size: s, severity: l, variant: p, hoverEffects: a, fluid: d }, children: t })
178
+ ...p,
179
+ children: /* @__PURE__ */ o(se.Provider, { value: { size: s, severity: a, variant: u, hoverEffects: l, fluid: d }, children: t })
180
180
  }
181
181
  );
182
- }), We = w(Fe), He = w(function(c) {
183
- const { title: r, description: t, content: i, closeDialog: e } = c;
184
- return /* @__PURE__ */ C(x, { direction: "column", gap: "2", children: [
185
- /* @__PURE__ */ C(x, { direction: "column", gap: "1", children: [
186
- /* @__PURE__ */ C(x, { justify: "between", children: [
187
- /* @__PURE__ */ o(N.Title, { mb: "0", children: r }),
188
- /* @__PURE__ */ o(N.Close, { children: /* @__PURE__ */ o(Y, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ o(he, {}) }) })
182
+ }), qe = C(He), Ke = C(function(i) {
183
+ const { title: n, description: t, content: r, closeDialog: e } = i;
184
+ return /* @__PURE__ */ g(x, { direction: "column", gap: "2", children: [
185
+ /* @__PURE__ */ g(x, { direction: "column", gap: "1", children: [
186
+ /* @__PURE__ */ g(x, { justify: "between", children: [
187
+ /* @__PURE__ */ o(E.Title, { mb: "0", children: n }),
188
+ /* @__PURE__ */ o(E.Close, { children: /* @__PURE__ */ o(te, { color: "gray", variant: "ghost", "aria-label": "Close", children: /* @__PURE__ */ o(me, {}) }) })
189
189
  ] }),
190
- /* @__PURE__ */ o(N.Description, { children: t })
190
+ /* @__PURE__ */ o(E.Description, { children: t })
191
191
  ] }),
192
- i(e)
192
+ r(e)
193
193
  ] });
194
- }), Rt = w(function(c) {
195
- const { children: r, size: t, onOpen: i, onCloseInterrupt: e, ...l } = c, [s, p] = D(!1), a = b(
196
- (h) => {
197
- if (h && i)
198
- i();
199
- else if (!h && e)
200
- return e(() => p(!1));
201
- p(h);
194
+ }), Mt = C(function(i) {
195
+ const { children: n, size: t, onOpen: r, onCloseInterrupt: e, ...a } = i, [s, u] = R(!1), l = I(
196
+ (p) => {
197
+ if (p && r)
198
+ r();
199
+ else if (!p && e)
200
+ return e(() => u(!1));
201
+ u(p);
202
202
  },
203
- [i, e]
204
- ), d = b(
205
- (h) => {
206
- if (h != null && h.force)
207
- return p(!1);
208
- a(!1);
203
+ [r, e]
204
+ ), d = I(
205
+ (p) => {
206
+ if (p != null && p.force)
207
+ return u(!1);
208
+ l(!1);
209
209
  },
210
- [a]
210
+ [l]
211
211
  );
212
- return /* @__PURE__ */ C(N.Root, { open: s, onOpenChange: a, children: [
213
- /* @__PURE__ */ o(N.Content, { size: t, children: /* @__PURE__ */ o(He, { closeDialog: d, ...l }) }),
214
- r(N.Trigger)
212
+ return /* @__PURE__ */ g(E.Root, { open: s, onOpenChange: l, children: [
213
+ /* @__PURE__ */ o(E.Content, { size: t, children: /* @__PURE__ */ o(Ke, { closeDialog: d, ...a }) }),
214
+ n(E.Trigger)
215
215
  ] });
216
- }), ce = (n) => /* @__PURE__ */ o(R.Title, { mb: "0", ...n }), qe = (n) => {
217
- const { title: c, description: r, actionText: t = "Confirm", cancelText: i = "Cancel", onAction: e, onCancel: l, severity: s } = n;
218
- return /* @__PURE__ */ C(x, { direction: "column", gap: "2", children: [
219
- /* @__PURE__ */ C(x, { direction: "column", gap: "1", children: [
220
- /* @__PURE__ */ o(ce, { children: c }),
221
- /* @__PURE__ */ o(R.Description, { children: r })
216
+ }), le = (c) => /* @__PURE__ */ o($.Title, { mb: "0", ...c }), Ue = (c) => {
217
+ const { title: i, description: n, actionText: t = "Confirm", cancelText: r = "Cancel", onAction: e, onCancel: a, severity: s } = c;
218
+ return /* @__PURE__ */ g(x, { direction: "column", gap: "2", children: [
219
+ /* @__PURE__ */ g(x, { direction: "column", gap: "1", children: [
220
+ /* @__PURE__ */ o(le, { children: i }),
221
+ /* @__PURE__ */ o($.Description, { children: n })
222
222
  ] }),
223
- /* @__PURE__ */ C(x, { gap: "3", mt: "4", justify: "end", children: [
224
- /* @__PURE__ */ o(R.Cancel, { children: /* @__PURE__ */ o(Q, { variant: "soft", severity: "info", onClick: l, children: i }) }),
225
- /* @__PURE__ */ o(R.Action, { children: /* @__PURE__ */ o(Q, { variant: "solid", severity: s, onClick: e, children: t }) })
223
+ /* @__PURE__ */ g(x, { gap: "3", mt: "4", justify: "end", children: [
224
+ /* @__PURE__ */ o($.Cancel, { children: /* @__PURE__ */ o(Y, { variant: "soft", severity: "info", onClick: a, children: r }) }),
225
+ /* @__PURE__ */ o($.Action, { children: /* @__PURE__ */ o(Y, { variant: "solid", severity: s, onClick: e, children: t }) })
226
226
  ] })
227
227
  ] });
228
- }, Ke = w(function(c) {
229
- const { open: r, setOpen: t, children: i, ...e } = c, l = z(() => ({
228
+ }, Qe = C(function(i) {
229
+ const { open: n, setOpen: t, children: r, ...e } = i, a = L(() => ({
230
230
  close: () => t(!1),
231
- Title: ce,
232
- Description: R.Description
231
+ Title: le,
232
+ Description: $.Description
233
233
  }), [t]);
234
- return /* @__PURE__ */ C(R.Root, { open: r, onOpenChange: t, children: [
235
- /* @__PURE__ */ o(R.Content, { children: "content" in e ? e.content(l) : /* @__PURE__ */ o(qe, { ...e }) }),
236
- i
234
+ return /* @__PURE__ */ g($.Root, { open: n, onOpenChange: t, children: [
235
+ /* @__PURE__ */ o($.Content, { children: "content" in e ? e.content(a) : /* @__PURE__ */ o(Ue, { ...e }) }),
236
+ r
237
237
  ] });
238
- }), le = q(() => {
238
+ }), ue = U(() => {
239
239
  throw new Error("No AlertDialogProvider found");
240
- }), Ue = {
240
+ }), Je = {
241
241
  content: () => null
242
- }, At = w(function({ children: c }) {
243
- const [r, t] = D(!1), [i, e] = D(Ue), l = b(
242
+ }, Lt = C(function({ children: i }) {
243
+ const [n, t] = R(!1), [r, e] = R(Je), a = I(
244
244
  (s) => {
245
- if (r)
245
+ if (n)
246
246
  throw new Error("AlertDialog is already open");
247
247
  e(s), t(!0);
248
248
  },
249
- [r]
249
+ [n]
250
250
  );
251
- return /* @__PURE__ */ o(Ke, { open: r, setOpen: t, ...i, children: /* @__PURE__ */ o(le.Provider, { value: l, children: c }) });
252
- }), $t = () => K(le), Qe = "_fluid_7n1wr_1", Je = {
253
- fluid: Qe
254
- }, Xe = _(function({
255
- className: c,
256
- fluid: r,
251
+ return /* @__PURE__ */ o(Qe, { open: n, setOpen: t, ...r, children: /* @__PURE__ */ o(ue.Provider, { value: a, children: i }) });
252
+ }), Gt = () => Q(ue), Xe = C(function({
253
+ severity: i,
254
+ itemContent: n,
255
+ closeOnSelect: t = !0,
256
+ onSelect: r,
257
+ ...e
258
+ }) {
259
+ const a = S(i), s = I(
260
+ (u) => {
261
+ t || u.preventDefault(), r && r(u);
262
+ },
263
+ [t, r]
264
+ );
265
+ return /* @__PURE__ */ o(D.Item, { onSelect: s, color: a, ...e, children: n });
266
+ }), Ye = C(function({
267
+ defaultOpen: i,
268
+ open: n,
269
+ onOpenChange: t,
270
+ modal: r,
271
+ trigger: e,
272
+ label: a,
273
+ severity: s = "info",
274
+ children: u,
275
+ ...l
276
+ }) {
277
+ const d = S(s);
278
+ return /* @__PURE__ */ g(D.Root, { defaultOpen: i, open: n, onOpenChange: t, modal: r, children: [
279
+ /* @__PURE__ */ o(D.Trigger, { children: e }),
280
+ /* @__PURE__ */ g(D.Content, { color: d, ...l, children: [
281
+ a && /* @__PURE__ */ o(D.Label, { children: a }),
282
+ u
283
+ ] })
284
+ ] });
285
+ }), Ze = C(function({
286
+ separatorBelow: i = !1,
287
+ separatorAbove: n = !1,
288
+ children: t,
289
+ ...r
290
+ }) {
291
+ return /* @__PURE__ */ g(P, { children: [
292
+ n && /* @__PURE__ */ o(D.Separator, {}),
293
+ /* @__PURE__ */ o(D.Group, { ...r, children: t }),
294
+ i && /* @__PURE__ */ o(D.Separator, {})
295
+ ] });
296
+ }), et = C(function({
297
+ defaultOpen: i,
298
+ open: n,
299
+ onOpenChange: t,
300
+ trigger: r,
301
+ children: e,
302
+ ...a
303
+ }) {
304
+ return /* @__PURE__ */ g(D.Sub, { defaultOpen: i, open: n, onOpenChange: t, children: [
305
+ /* @__PURE__ */ o(D.SubTrigger, { children: r }),
306
+ /* @__PURE__ */ o(D.SubContent, { ...a, children: e })
307
+ ] });
308
+ }), Vt = {
309
+ Root: Ye,
310
+ ItemGroup: Ze,
311
+ Item: Xe,
312
+ SubMenu: et
313
+ }, tt = "_fluid_7n1wr_1", ot = {
314
+ fluid: tt
315
+ }, nt = w(function({
316
+ className: i,
317
+ fluid: n,
257
318
  size: t = "medium",
258
- variant: i = "surface",
319
+ variant: r = "surface",
259
320
  severity: e = "primary",
260
- itemSeverity: l = "info",
321
+ itemSeverity: a = "info",
261
322
  placeholder: s = "Select",
262
- side: p,
263
- items: a = [],
323
+ side: u,
324
+ items: l = [],
264
325
  value: d,
265
- id: h,
326
+ id: p,
266
327
  ...m
267
328
  }, f) {
268
- const u = O(t, L), g = S(e), y = S(l);
269
- return /* @__PURE__ */ ee(I.Root, { size: u, ...m, key: d === void 0 ? 1 : 0, value: d }, /* @__PURE__ */ o(
270
- I.Trigger,
329
+ const h = A(t, G), v = S(e), y = S(a);
330
+ return /* @__PURE__ */ oe(k.Root, { size: h, ...m, key: d === void 0 ? 1 : 0, value: d }, /* @__PURE__ */ o(
331
+ k.Trigger,
271
332
  {
272
- className: T(c, {
273
- [Je.fluid]: r
333
+ className: T(i, {
334
+ [ot.fluid]: n
274
335
  }),
275
- id: h,
336
+ id: p,
276
337
  ref: f,
277
- variant: i,
338
+ variant: r,
278
339
  placeholder: s,
279
- color: g
340
+ color: v
280
341
  }
281
342
  ), /* @__PURE__ */ o(
282
- I.Content,
343
+ k.Content,
283
344
  {
284
- side: p,
345
+ side: u,
285
346
  position: "popper",
286
- variant: i !== "surface" ? "soft" : "solid",
347
+ variant: r !== "surface" ? "soft" : "solid",
287
348
  color: y,
288
- children: a.map(({ itemContent: k, value: A, ...E }) => /* @__PURE__ */ o(I.Item, { className: "overmap-select-item", value: A, ...E, children: k }, A))
349
+ children: l.map(({ itemContent: b, value: N, ...B }) => /* @__PURE__ */ o(k.Item, { className: "overmap-select-item", value: N, ...B, children: b }, N))
289
350
  }
290
351
  ));
291
- }), Nt = P.memo(Xe), J = w(
292
- _((n, c) => {
293
- const { checked: r, label: t, value: i, size: e = "2" } = n;
294
- return /* @__PURE__ */ o(ve, { asChild: !0, px: e, children: /* @__PURE__ */ o(I.Item, { value: i, ref: c, children: /* @__PURE__ */ C(x, { gap: e, align: "center", children: [
295
- /* @__PURE__ */ o(_e, { checked: r }),
352
+ }), jt = M.memo(nt), Z = C(
353
+ w((c, i) => {
354
+ const { checked: n, label: t, value: r, size: e = "2" } = c;
355
+ return /* @__PURE__ */ o(we, { asChild: !0, px: e, children: /* @__PURE__ */ o(k.Item, { value: r, ref: i, children: /* @__PURE__ */ g(x, { gap: e, align: "center", children: [
356
+ /* @__PURE__ */ o(Se, { checked: n }),
296
357
  t
297
358
  ] }) }) });
298
359
  })
299
- ), F = "__select_all__", Ot = w(
300
- _((n, c) => {
301
- const [r, t] = D(!1), { placeholder: i, value: e, onValueChange: l, options: s, disabled: p, id: a, radius: d, variant: h, name: m } = n, f = O(n.size, L), u = S(n.severity), g = z(() => new Map(s.map((v) => [v.value, v.label])), [s]), y = e.length > 4 ? (
360
+ ), H = "__select_all__", Ft = C(
361
+ w((c, i) => {
362
+ const [n, t] = R(!1), { placeholder: r, value: e, onValueChange: a, options: s, disabled: u, id: l, radius: d, variant: p, name: m } = c, f = A(c.size, G), h = S(c.severity), v = L(() => new Map(s.map((_) => [_.value, _.label])), [s]), y = e.length > 4 ? (
302
363
  // to ensure the width of the select doesn't get too big
303
364
  `${e.length} options selected`
304
365
  ) : (
305
366
  // convert the values to labels
306
- e.map((v) => g.get(v)).join(", ")
307
- ), k = b(() => t(!1), []), A = b((v) => {
308
- v && t(!0);
309
- }, []), E = b(
310
- (v) => {
311
- let W;
312
- v === F ? W = e.length === s.length ? [] : s.map((de) => de.value) : W = e.includes(v) ? e.filter((U) => U !== v) : [...e, v], l(W);
367
+ e.map((_) => v.get(_)).join(", ")
368
+ ), b = I(() => t(!1), []), N = I((_) => {
369
+ _ && t(!0);
370
+ }, []), B = I(
371
+ (_) => {
372
+ let K;
373
+ _ === H ? K = e.length === s.length ? [] : s.map((pe) => pe.value) : K = e.includes(_) ? e.filter((J) => J !== _) : [...e, _], a(K);
313
374
  },
314
- [l, s, e]
375
+ [a, s, e]
315
376
  );
316
- return te(() => {
317
- if (s.some(({ value: v }) => v === F))
318
- throw new Error(`Cannot have an option with the value "${F}"`);
319
- }, [s]), /* @__PURE__ */ C(
320
- I.Root,
377
+ return ne(() => {
378
+ if (s.some(({ value: _ }) => _ === H))
379
+ throw new Error(`Cannot have an option with the value "${H}"`);
380
+ }, [s]), /* @__PURE__ */ g(
381
+ k.Root,
321
382
  {
322
- open: r,
383
+ open: n,
323
384
  value: "",
324
- onOpenChange: A,
325
- onValueChange: E,
326
- disabled: p,
385
+ onOpenChange: N,
386
+ onValueChange: B,
387
+ disabled: u,
327
388
  size: f,
328
389
  name: m,
329
390
  autoComplete: "off",
330
391
  children: [
331
392
  /* @__PURE__ */ o(
332
- I.Trigger,
393
+ k.Trigger,
333
394
  {
334
- ref: c,
335
- id: a,
395
+ ref: i,
396
+ id: l,
336
397
  radius: d,
337
- variant: h,
338
- color: u,
339
- placeholder: e.length > 0 ? y : i,
398
+ variant: p,
399
+ color: h,
400
+ placeholder: e.length > 0 ? y : r,
340
401
  "data-placeholder": e.length > 0 ? void 0 : !0
341
402
  }
342
403
  ),
343
- /* @__PURE__ */ C(
344
- I.Content,
404
+ /* @__PURE__ */ g(
405
+ k.Content,
345
406
  {
346
407
  color: "gray",
347
408
  variant: "soft",
348
409
  position: "popper",
349
- onEscapeKeyDown: k,
350
- onPointerDownOutside: k,
410
+ onEscapeKeyDown: b,
411
+ onPointerDownOutside: b,
351
412
  children: [
352
413
  /* @__PURE__ */ o(
353
- J,
414
+ Z,
354
415
  {
355
- value: F,
416
+ value: H,
356
417
  label: "Select all",
357
418
  checked: e.length === s.length,
358
419
  size: f
359
420
  }
360
421
  ),
361
- s.map((v) => /* @__PURE__ */ o(
362
- J,
422
+ s.map((_) => /* @__PURE__ */ o(
423
+ Z,
363
424
  {
364
- ...v,
365
- checked: e.includes(v.value),
425
+ ..._,
426
+ checked: e.includes(_.value),
366
427
  size: f
367
428
  },
368
- v.value
429
+ _.value
369
430
  ))
370
431
  ]
371
432
  }
@@ -374,307 +435,340 @@ const Ne = {
374
435
  }
375
436
  );
376
437
  })
377
- ), Ye = {
438
+ ), rt = {
378
439
  default: "_default_u936h_1"
379
- }, Ze = _(function({ className: c, severity: r = "primary", icon: t, defaultChecked: i = !1, onCheckedChange: e, ...l }, s) {
380
- const p = xe(null), [a, d] = D(l.checked ? l.checked : i), [h, m] = D(), f = S(r);
381
- ke(() => {
382
- var k;
383
- const y = s || p;
384
- "current" in y && y.current && m((k = y.current) == null ? void 0 : k.querySelector("span.rt-SwitchThumb"));
440
+ }, ct = w(function({ className: i, severity: n = "primary", icon: t, defaultChecked: r = !1, onCheckedChange: e, ...a }, s) {
441
+ const u = be(null), [l, d] = R(a.checked ? a.checked : r), [p, m] = R(), f = S(n);
442
+ Ie(() => {
443
+ var b;
444
+ const y = s || u;
445
+ "current" in y && y.current && m((b = y.current) == null ? void 0 : b.querySelector("span.rt-SwitchThumb"));
385
446
  }, [s]);
386
- const u = b(
447
+ const h = I(
387
448
  (y) => {
388
449
  d(y), e && e(y);
389
450
  },
390
451
  [e]
391
- ), g = l.checked ? l.checked : a;
392
- return /* @__PURE__ */ C(Z, { children: [
452
+ ), v = a.checked ? a.checked : l;
453
+ return /* @__PURE__ */ g(P, { children: [
393
454
  /* @__PURE__ */ o(
394
- we,
455
+ ye,
395
456
  {
396
- className: T("overmap-switch", c, Ye.default),
397
- ref: s || p,
457
+ className: T("overmap-switch", i, rt.default),
458
+ ref: s || u,
398
459
  color: f,
399
460
  radius: "full",
400
- defaultChecked: i,
401
- onCheckedChange: u,
402
- ...l
461
+ defaultChecked: r,
462
+ onCheckedChange: h,
463
+ ...a
403
464
  }
404
465
  ),
405
- /* @__PURE__ */ o(ye, { container: h, asChild: !0, children: t && "checked" in t ? g ? t.checked : t.unchecked : t })
466
+ /* @__PURE__ */ o(Te, { container: p, asChild: !0, children: t && "checked" in t ? v ? t.checked : t.unchecked : t })
406
467
  ] });
407
- });
408
- w(Ze);
409
- const et = "_accommodateCharCount_sr18k_1", tt = "_wrapper_sr18k_5", ot = "_noLeftIcon_sr18k_13", nt = "_noRightIcon_sr18k_17", rt = "_charCount_sr18k_21", $ = {
410
- accommodateCharCount: et,
411
- wrapper: tt,
468
+ }), Wt = C(ct), st = "_accommodateCharCount_sr18k_1", it = "_wrapper_sr18k_5", at = "_noLeftIcon_sr18k_13", lt = "_noRightIcon_sr18k_17", ut = "_charCount_sr18k_21", O = {
469
+ accommodateCharCount: st,
470
+ wrapper: it,
412
471
  default: "_default_sr18k_9",
413
- noLeftIcon: ot,
414
- noRightIcon: nt,
415
- charCount: rt
416
- }, st = _(function({
417
- className: c,
418
- leftSlot: r,
472
+ noLeftIcon: at,
473
+ noRightIcon: lt,
474
+ charCount: ut
475
+ }, dt = w(function({
476
+ className: i,
477
+ leftSlot: n,
419
478
  rightSlot: t,
420
- size: i = "medium",
479
+ size: r = "medium",
421
480
  showInputLength: e,
422
- value: l,
481
+ value: a,
423
482
  variant: s,
424
- severity: p = "primary",
425
- ...a
483
+ severity: u = "primary",
484
+ ...l
426
485
  }, d) {
427
- const h = O(i, L), m = S(p), f = e || e === void 0 && a.maxLength !== void 0, u = l !== void 0 ? l.toString() : void 0;
428
- return /* @__PURE__ */ C(
486
+ const p = A(r, G), m = S(u), f = e || e === void 0 && l.maxLength !== void 0, h = a !== void 0 ? a.toString() : void 0;
487
+ return /* @__PURE__ */ g(
429
488
  V.Root,
430
489
  {
431
- className: T($.wrapper, {
432
- [$.accommodateCharCount]: f
490
+ className: T(O.wrapper, {
491
+ [O.accommodateCharCount]: f
433
492
  }),
434
- size: h,
493
+ size: p,
435
494
  variant: s,
436
495
  color: m,
437
496
  children: [
438
- r && /* @__PURE__ */ o(V.Slot, { children: r }),
497
+ n && /* @__PURE__ */ o(V.Slot, { children: n }),
439
498
  /* @__PURE__ */ o(
440
499
  V.Input,
441
500
  {
442
- className: T($.default, c, {
443
- [$.noLeftIcon]: !r,
444
- [$.noRightIcon]: !t
501
+ className: T(O.default, i, {
502
+ [O.noLeftIcon]: !n,
503
+ [O.noRightIcon]: !t
445
504
  }),
446
505
  ref: d,
447
- size: h,
506
+ size: p,
448
507
  variant: s,
449
508
  color: m,
450
- ...a
509
+ ...l
451
510
  }
452
511
  ),
453
512
  t && /* @__PURE__ */ o(V.Slot, { children: t }),
454
- f && /* @__PURE__ */ o(H, { as: "p", className: $.charCount, size: "1", color: "gray", children: a.maxLength !== void 0 ? `${u == null ? void 0 : u.length}/${a.maxLength}` : `${u == null ? void 0 : u.length}` })
513
+ f && /* @__PURE__ */ o(q, { as: "p", className: O.charCount, size: "1", color: "gray", children: l.maxLength !== void 0 ? `${h == null ? void 0 : h.length}/${l.maxLength}` : `${h == null ? void 0 : h.length}` })
455
514
  ]
456
515
  }
457
516
  );
458
- }), Et = P.memo(st), it = _(function({ defaultOpen: c = !1, modal: r = !1, content: t, children: i, ...e }, l) {
459
- return /* @__PURE__ */ C(j.Root, { defaultOpen: c, modal: r, children: [
460
- /* @__PURE__ */ o(j.Trigger, { children: i }),
461
- /* @__PURE__ */ o(j.Content, { ref: l, ...e, children: t(j.Close) })
517
+ }), Ht = M.memo(dt), ht = w(function({ defaultOpen: i = !1, modal: n = !1, content: t, children: r, ...e }, a) {
518
+ return /* @__PURE__ */ g(j.Root, { defaultOpen: i, modal: n, children: [
519
+ /* @__PURE__ */ o(j.Trigger, { children: r }),
520
+ /* @__PURE__ */ o(j.Content, { ref: a, ...e, children: t(j.Close) })
462
521
  ] });
463
- }), Bt = P.memo(it), ct = "_charCount_17uut_1", lt = {
464
- charCount: ct
465
- }, at = _(function({ className: c, showInputLength: r, inputLengthTemplate: t, value: i, severity: e = "primary", resize: l, ...s }, p) {
466
- const a = S(e), d = S("info"), h = r || r === void 0 && (s.maxLength !== void 0 || s.minLength !== void 0), m = i !== void 0 ? i.toString() : "", f = z(() => {
522
+ }), qt = M.memo(ht), pt = "_charCount_17uut_1", mt = {
523
+ charCount: pt
524
+ }, ft = w(function({ className: i, showInputLength: n, inputLengthTemplate: t, value: r, severity: e = "primary", resize: a, ...s }, u) {
525
+ const l = S(e), d = S("info"), p = n || n === void 0 && (s.maxLength !== void 0 || s.minLength !== void 0), m = r !== void 0 ? r.toString() : "", f = L(() => {
467
526
  if (t) {
468
- let u = t.replace("{current}", m.length.toString());
469
- return s.minLength !== void 0 && (u = u.replace("{min}", s.minLength.toString())), s.maxLength !== void 0 && (u = u.replace("{max}", s.maxLength.toString())), u;
527
+ let h = t.replace("{current}", m.length.toString());
528
+ return s.minLength !== void 0 && (h = h.replace("{min}", s.minLength.toString())), s.maxLength !== void 0 && (h = h.replace("{max}", s.maxLength.toString())), h;
470
529
  }
471
530
  return m.length;
472
531
  }, [t, s.maxLength, s.minLength, m.length]);
473
- return /* @__PURE__ */ C(Z, { children: [
532
+ return /* @__PURE__ */ g(P, { children: [
474
533
  /* @__PURE__ */ o(
475
- Te,
534
+ xe,
476
535
  {
477
- className: T("overmap-textarea", c),
478
- style: { resize: l },
479
- ref: p,
480
- value: i,
481
- color: a,
536
+ className: T("overmap-textarea", i),
537
+ style: { resize: a },
538
+ ref: u,
539
+ value: r,
540
+ color: l,
482
541
  ...s
483
542
  }
484
543
  ),
485
- h && /* @__PURE__ */ o(H, { as: "p", className: lt.charCount, color: d, align: "right", children: f })
544
+ p && /* @__PURE__ */ o(q, { as: "p", className: mt.charCount, color: d, align: "right", children: f })
486
545
  ] });
487
- }), Pt = w(at), ut = _(function({
546
+ }), Kt = C(ft), gt = w(function({
488
547
  // ToggleGroup Primitive Props
489
- loop: c,
490
- type: r,
548
+ loop: i,
549
+ type: n,
491
550
  rovingFocus: t,
492
- value: i,
551
+ value: r,
493
552
  onValueChange: e,
494
- defaultValue: l,
553
+ defaultValue: a,
495
554
  disabled: s,
496
- items: p,
555
+ items: u,
497
556
  // ButtonGroup Props
498
- className: a,
557
+ className: l,
499
558
  direction: d = "row",
500
- ...h
559
+ ...p
501
560
  }, m) {
502
561
  return /* @__PURE__ */ o(
503
- be,
562
+ ke,
504
563
  {
505
- type: r,
506
- className: T("overmap-toggle-group", a),
564
+ type: n,
565
+ className: T("overmap-toggle-group", l),
507
566
  ref: m,
508
- value: i,
567
+ value: r,
509
568
  onValueChange: e,
510
569
  disabled: s,
511
570
  orientation: d === "column" ? "vertical" : "horizontal",
512
- loop: c,
571
+ loop: i,
513
572
  rovingFocus: t,
514
- defaultValue: l,
573
+ defaultValue: a,
515
574
  asChild: !0,
516
- children: /* @__PURE__ */ o(We, { direction: d, ...h, children: p.map(({ children: f, ...u }) => /* @__PURE__ */ ee(Ie, { asChild: !0, ...u, key: u.value }, /* @__PURE__ */ o(
517
- ie,
575
+ children: /* @__PURE__ */ o(qe, { direction: d, ...p, children: u.map(({ children: f, ...h }) => /* @__PURE__ */ oe(Re, { asChild: !0, ...h, key: h.value }, /* @__PURE__ */ o(
576
+ ae,
518
577
  {
519
578
  className: T("overmap-toggle-group-button"),
520
- "aria-label": u.value,
521
- variant: u.value === i ? "solid" : "soft",
579
+ "aria-label": h.value,
580
+ variant: h.value === r ? "solid" : "soft",
522
581
  children: f
523
582
  }
524
583
  ))) })
525
584
  }
526
585
  );
527
- }), zt = w(ut), dt = "_ToastViewport_t8tlv_1", ht = "_ToastRoot_t8tlv_20", pt = "_slideIn_t8tlv_1", mt = "_swipeOut_t8tlv_1", ae = {
528
- ToastViewport: dt,
529
- ToastRoot: ht,
530
- slideIn: pt,
531
- swipeOut: mt
532
- }, ft = _(function({ title: c, description: r, icon: t, severity: i = "primary", size: e, onClose: l, sensitivity: s, ...p }, a) {
533
- const [d, h] = D(!0), m = S(i), f = b(
534
- (u) => {
535
- !u && l && l(), h(u);
586
+ }), Ut = C(gt), Ct = "_ToastViewport_t8tlv_1", vt = "_ToastRoot_t8tlv_20", _t = "_slideIn_t8tlv_1", wt = "_swipeOut_t8tlv_1", de = {
587
+ ToastViewport: Ct,
588
+ ToastRoot: vt,
589
+ slideIn: _t,
590
+ swipeOut: wt
591
+ }, St = w(function({ title: i, description: n, icon: t, severity: r = "primary", size: e, onClose: a, sensitivity: s, ...u }, l) {
592
+ const [d, p] = R(!0), m = S(r), f = I(
593
+ (h) => {
594
+ !h && a && a(), p(h);
536
595
  },
537
- [l]
596
+ [a]
538
597
  );
539
- return /* @__PURE__ */ o(M.Root, { asChild: !0, ref: a, ...p, open: d, type: s, onOpenChange: f, children: /* @__PURE__ */ o(G.Root, { className: ae.ToastRoot, variant: "surface", color: m, size: e, children: /* @__PURE__ */ C(x, { width: "100%", align: "center", gap: "4", justify: "between", children: [
540
- /* @__PURE__ */ C(x, { align: "center", gap: "4", children: [
541
- /* @__PURE__ */ o(G.Icon, { children: t || /* @__PURE__ */ o(pe, {}) }),
542
- /* @__PURE__ */ C(x, { direction: "column", gap: "0", children: [
543
- /* @__PURE__ */ o(M.Title, { asChild: !0, children: /* @__PURE__ */ o(G.Text, { weight: "medium", children: c }) }),
544
- /* @__PURE__ */ o(M.Description, { asChild: !0, children: /* @__PURE__ */ o(G.Text, { weight: "light", children: r }) })
598
+ return /* @__PURE__ */ o(W.Root, { asChild: !0, ref: l, ...u, open: d, type: s, onOpenChange: f, children: /* @__PURE__ */ o(F.Root, { className: de.ToastRoot, variant: "surface", color: m, size: e, children: /* @__PURE__ */ g(x, { width: "100%", align: "center", gap: "4", justify: "between", children: [
599
+ /* @__PURE__ */ g(x, { align: "center", gap: "4", children: [
600
+ /* @__PURE__ */ o(F.Icon, { children: t || /* @__PURE__ */ o(fe, {}) }),
601
+ /* @__PURE__ */ g(x, { direction: "column", gap: "0", children: [
602
+ /* @__PURE__ */ o(W.Title, { asChild: !0, children: /* @__PURE__ */ o(F.Text, { weight: "medium", children: i }) }),
603
+ /* @__PURE__ */ o(W.Description, { asChild: !0, children: /* @__PURE__ */ o(F.Text, { weight: "light", children: n }) })
545
604
  ] })
546
605
  ] }),
547
- /* @__PURE__ */ o(M.Close, { asChild: !0, children: /* @__PURE__ */ o(ie, { "aria-label": "Close", variant: "ghost", size: "small", severity: i, children: /* @__PURE__ */ o(me, {}) }) })
606
+ /* @__PURE__ */ o(W.Close, { asChild: !0, children: /* @__PURE__ */ o(ae, { "aria-label": "Close", variant: "ghost", size: "small", severity: r, children: /* @__PURE__ */ o(ge, {}) }) })
548
607
  ] }) }) });
549
- }), gt = w(ft), ue = q({}), Lt = () => {
550
- const n = K(ue);
551
- if (!n)
608
+ }), yt = C(St), he = U({}), Qt = () => {
609
+ const c = Q(he);
610
+ if (!c)
552
611
  throw new Error("useToast must be used within a ToastProvider");
553
- return n;
554
- }, Ct = 240 / 60, X = 5e3, vt = (n) => {
555
- if (n.duration && n.duration >= X)
556
- return n.duration;
557
- const c = n.severity === "danger" ? 1.5 : 1, r = n.description.split(" ").length + n.title.split(" ").length;
558
- return (X + r / Ct) * c;
559
- }, Vt = w(function({
560
- children: c,
612
+ return c;
613
+ }, Tt = 240 / 60, ee = 5e3, xt = (c) => {
614
+ if (c.duration && c.duration >= ee)
615
+ return c.duration;
616
+ const i = c.severity === "danger" ? 1.5 : 1, n = c.description.split(" ").length + c.title.split(" ").length;
617
+ return (ee + n / Tt) * i;
618
+ };
619
+ let Dt;
620
+ const Jt = C(function({
621
+ children: i,
561
622
  // Use this class to change where the viewport for the toasts should be
562
- className: r,
623
+ className: n,
563
624
  hotkey: t,
564
- ...i
625
+ ...r
565
626
  }) {
566
- const [e, l] = D([]), s = b((a, d, h) => {
567
- l((m) => {
568
- const f = m.find((u) => u.id === a);
569
- return f && d === 0 && clearTimeout(f.timeout), m.filter((u) => u.id !== a);
570
- }), h && h();
571
- }, []), p = z(() => {
572
- let a = 0;
573
- const d = (g) => {
574
- const y = vt(g), k = a.toString();
575
- a += 1;
576
- const A = setTimeout(() => s(k, 1, g.onClose), y);
577
- l((E) => [...E, { ...g, timeout: A, duration: y, id: k }]);
578
- };
579
- return {
627
+ const [e, a] = R([]), s = I((l, d, p) => {
628
+ a((m) => {
629
+ const f = m.find((h) => h.id === l);
630
+ return f && d === 0 && clearTimeout(f.timeout), m.filter((h) => h.id !== l);
631
+ }), p && p();
632
+ }, []), u = L(() => {
633
+ let l = 0;
634
+ const d = (v) => {
635
+ const y = xt(v), b = l.toString();
636
+ l += 1;
637
+ const N = setTimeout(() => s(b, 1, v.onClose), y);
638
+ a((B) => [...B, { ...v, timeout: N, duration: y, id: b }]);
639
+ }, p = (v) => d({ ...v, severity: "primary" }), m = (v) => d({ ...v, severity: "success" }), f = (v) => d({ ...v, severity: "danger" }), h = (v) => d({ ...v, severity: "info" });
640
+ return Dt = d, {
580
641
  showToast: d,
581
- showPrimary: (g) => d({ ...g, severity: "primary" }),
582
- showSuccess: (g) => d({ ...g, severity: "success" }),
583
- showError: (g) => d({ ...g, severity: "danger" }),
584
- showInfo: (g) => d({ ...g, severity: "info" })
642
+ showPrimary: p,
643
+ showSuccess: m,
644
+ showError: f,
645
+ showInfo: h
585
646
  };
586
647
  }, [s]);
587
- return te(() => () => {
588
- for (const { timeout: a } of e)
589
- clearTimeout(a);
590
- }, []), /* @__PURE__ */ o(ue.Provider, { value: p, children: /* @__PURE__ */ C(De, { ...i, children: [
591
- c,
592
- /* @__PURE__ */ o(Re, { className: T(r, ae.ToastViewport), hotkey: t }),
593
- e.map(({ id: a, onClose: d, ...h }) => /* @__PURE__ */ o(gt, { ...h, onClose: () => s(a, 0, d) }, a))
648
+ return ne(() => () => {
649
+ for (const { timeout: l } of e)
650
+ clearTimeout(l);
651
+ }, []), /* @__PURE__ */ o(he.Provider, { value: u, children: /* @__PURE__ */ g($e, { ...r, children: [
652
+ i,
653
+ /* @__PURE__ */ o(Ae, { className: T(n, de.ToastViewport), hotkey: t }),
654
+ e.map(({ id: l, onClose: d, ...p }) => /* @__PURE__ */ o(yt, { ...p, onClose: () => s(l, 0, d) }, l))
594
655
  ] }) });
595
- }), _t = "_noWrap_1wpa5_1", wt = {
596
- noWrap: _t
597
- }, jt = w(
598
- _(({ className: n, noWrap: c, severity: r, as: t, ...i }, e) => {
599
- const l = S(r);
656
+ }), bt = "_noWrap_1wpa5_1", It = {
657
+ noWrap: bt
658
+ }, Xt = C(
659
+ w(({ className: c, noWrap: i, severity: n, as: t, ...r }, e) => {
660
+ const a = S(n);
600
661
  return /* @__PURE__ */ o(
601
- H,
662
+ q,
602
663
  {
603
664
  ref: e,
604
665
  as: t,
605
- className: T(n, { [wt.noWrap]: c }),
606
- color: l,
607
- ...i
666
+ className: T(c, { [It.noWrap]: i }),
667
+ color: a,
668
+ ...r
608
669
  }
609
670
  );
610
671
  })
611
672
  );
612
- const Gt = w(
613
- _((n, c) => {
614
- const { panelBackground: r = "solid", radius: t = "full", ...i } = n;
615
- return /* @__PURE__ */ o(Se, { panelBackground: r, radius: t, ref: c, ...i });
673
+ const Yt = C(
674
+ w((c, i) => {
675
+ const { panelBackground: n = "solid", radius: t = "full", ...r } = c;
676
+ return /* @__PURE__ */ o(De, { panelBackground: n, radius: t, ref: i, ...r });
616
677
  })
617
- );
678
+ ), kt = {
679
+ 1: "max-content",
680
+ 2: "max-content",
681
+ 3: "max-content",
682
+ 4: "100%"
683
+ }, Rt = w(function({
684
+ severity: i = "info",
685
+ weight: n = "light",
686
+ gap: t = "1",
687
+ text: r,
688
+ orientation: e = "horizontal",
689
+ size: a,
690
+ ...s
691
+ }) {
692
+ const u = A(a, kt), l = S(i);
693
+ return /* @__PURE__ */ o(P, { children: /* @__PURE__ */ g(
694
+ x,
695
+ {
696
+ width: e === "horizontal" ? u : "max-content",
697
+ height: e === "vertical" ? u : "max-content",
698
+ direction: e === "vertical" ? "column" : "row",
699
+ align: "center",
700
+ gap: t,
701
+ children: [
702
+ /* @__PURE__ */ o(X, { size: a, orientation: e, color: l, ...s }),
703
+ r && /* @__PURE__ */ g(P, { children: [
704
+ /* @__PURE__ */ o(q, { as: "span", size: "1", weight: n, color: l, children: r }),
705
+ /* @__PURE__ */ o(X, { size: a, orientation: e, color: l, ...s })
706
+ ] })
707
+ ]
708
+ }
709
+ ) });
710
+ }), Zt = C(Rt);
618
711
  export {
619
- qt as AccessibleIcon,
620
- Ke as AlertDialog,
621
- le as AlertDialogContent,
622
- At as AlertDialogProvider,
623
- Kt as AspectRatio,
624
- Ut as Avatar,
625
- Dt as Badge,
626
- Qt as Blockquote,
627
- Jt as Box,
628
- Q as Button,
629
- We as ButtonGroup,
630
- Xt as Callout,
631
- Yt as Card,
632
- Zt as Checkbox,
633
- eo as Code,
634
- to as Container,
635
- oo as ContextMenu,
636
- Gt as DefaultTheme,
637
- Rt as Dialog,
638
- no as DropdownMenu,
639
- ro as Em,
640
- so as Flex,
641
- io as Grid,
642
- co as Heading,
643
- lo as HoverCard,
644
- ie as IconButton,
645
- Et as Input,
646
- ao as Inset,
647
- uo as Kbd,
648
- ho as Link,
649
- Ot as MultiSelect,
650
- Bt as Popover,
651
- po as Portal,
652
- mo as Quote,
653
- fo as RadioGroup,
654
- go as ScrollArea,
655
- Co as Section,
656
- Nt as Select,
657
- vo as Separator,
658
- _o as Slider,
659
- wo as Slot,
660
- yo as Strong,
661
- To as Switch,
662
- So as Table,
663
- xo as Tabs,
664
- jt as Text,
665
- Pt as TextArea,
666
- ko as TextField,
667
- bo as Theme,
668
- gt as Toast,
669
- ue as ToastContext,
670
- Vt as ToastProvider,
671
- zt as ToggleGroup,
672
- Io as Tooltip,
673
- Do as VisuallyHidden,
674
- Ro as updateThemeAppearanceClass,
675
- $t as useAlertDialog,
712
+ ro as AccessibleIcon,
713
+ Qe as AlertDialog,
714
+ ue as AlertDialogContent,
715
+ Lt as AlertDialogProvider,
716
+ co as AspectRatio,
717
+ so as Avatar,
718
+ Pt as Badge,
719
+ io as Blockquote,
720
+ ao as Box,
721
+ Y as Button,
722
+ qe as ButtonGroup,
723
+ lo as Callout,
724
+ uo as Card,
725
+ ho as Checkbox,
726
+ po as Code,
727
+ mo as Container,
728
+ fo as ContextMenu,
729
+ Yt as DefaultTheme,
730
+ Mt as Dialog,
731
+ Vt as DropdownMenu,
732
+ go as Em,
733
+ Co as Flex,
734
+ vo as Grid,
735
+ _o as Heading,
736
+ wo as HoverCard,
737
+ ae as IconButton,
738
+ Ht as Input,
739
+ So as Inset,
740
+ yo as Kbd,
741
+ To as Link,
742
+ Ft as MultiSelect,
743
+ qt as Popover,
744
+ xo as Portal,
745
+ Do as Quote,
746
+ bo as RadioGroup,
747
+ Io as ScrollArea,
748
+ ko as Section,
749
+ jt as Select,
750
+ Zt as Separator,
751
+ Ro as Slider,
752
+ $o as Slot,
753
+ Ao as Strong,
754
+ Wt as Switch,
755
+ No as Table,
756
+ Oo as Tabs,
757
+ Xt as Text,
758
+ Kt as TextArea,
759
+ Eo as TextField,
760
+ Bo as Theme,
761
+ yt as Toast,
762
+ he as ToastContext,
763
+ Jt as ToastProvider,
764
+ Ut as ToggleGroup,
765
+ zo as Tooltip,
766
+ Po as VisuallyHidden,
767
+ Dt as unsafeShowToast,
768
+ Mo as updateThemeAppearanceClass,
769
+ Gt as useAlertDialog,
676
770
  S as useSeverityColor,
677
- Ao as useThemeContext,
678
- Lt as useToast
771
+ Lo as useThemeContext,
772
+ Qt as useToast
679
773
  };
680
774
  //# sourceMappingURL=blocks.js.map