@overmap-ai/blocks 1.0.26 → 1.0.27-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.
Files changed (65) hide show
  1. package/README.md +3 -3
  2. package/dist/Buttons/typings.d.ts +6 -5
  3. package/dist/DialogMenu/Provider.d.ts +6 -0
  4. package/dist/DialogMenu/components/DialogCommandMenu.d.ts +6 -0
  5. package/dist/DialogMenu/components/DialogMultiSelectMenu.d.ts +6 -0
  6. package/dist/DialogMenu/components/DialogSelectMenu.d.ts +7 -0
  7. package/dist/DialogMenu/components/index.d.ts +3 -0
  8. package/dist/DialogMenu/constants.d.ts +3 -0
  9. package/dist/DialogMenu/content/Content.d.ts +8 -0
  10. package/dist/DialogMenu/content/SubContent.d.ts +5 -0
  11. package/dist/DialogMenu/content/index.d.ts +2 -0
  12. package/dist/DialogMenu/context.d.ts +14 -0
  13. package/dist/DialogMenu/groups/Group.d.ts +3 -0
  14. package/dist/DialogMenu/groups/MultiSelectGroup.d.ts +3 -0
  15. package/dist/DialogMenu/groups/SelectGroup.d.ts +3 -0
  16. package/dist/DialogMenu/groups/index.d.ts +3 -0
  17. package/dist/DialogMenu/index.d.ts +20 -0
  18. package/dist/DialogMenu/items/Item.d.ts +3 -0
  19. package/dist/DialogMenu/items/MultiSelectItem.d.ts +3 -0
  20. package/dist/DialogMenu/items/SelectItem.d.ts +3 -0
  21. package/dist/DialogMenu/items/Separator.d.ts +4 -0
  22. package/dist/DialogMenu/items/SubTrigger.d.ts +3 -0
  23. package/dist/DialogMenu/items/index.d.ts +5 -0
  24. package/dist/DialogMenu/root/Root.d.ts +6 -0
  25. package/dist/DialogMenu/root/index.d.ts +1 -0
  26. package/dist/DialogMenu/typings.d.ts +59 -0
  27. package/dist/Dialogs/BaseDialog/BaseDialog.d.ts +3 -0
  28. package/dist/Dialogs/BaseDialog/index.d.ts +2 -0
  29. package/dist/Dialogs/BaseDialog/typings.d.ts +31 -0
  30. package/dist/Dialogs/Dialog/typings.d.ts +2 -7
  31. package/dist/Dialogs/Dialog/utils.d.ts +1 -1
  32. package/dist/Dialogs/Overlay/Overlay.d.ts +7 -0
  33. package/dist/Dialogs/Overlay/index.d.ts +1 -0
  34. package/dist/Dialogs/index.d.ts +2 -0
  35. package/dist/Dialogs/typings.d.ts +5 -0
  36. package/dist/DownloadButtonUtility/DownloadButtonUtility.d.ts +7 -0
  37. package/dist/DownloadButtonUtility/index.d.ts +1 -0
  38. package/dist/Layout/SlideOutOverlay.d.ts +2 -2
  39. package/dist/Layout/index.d.ts +1 -1
  40. package/dist/OvermapInputItem/OvermapInputItem.d.ts +6 -0
  41. package/dist/OvermapInputItem/index.d.ts +2 -0
  42. package/dist/OvermapInputItem/typings.d.ts +4 -0
  43. package/dist/OvermapItem/OvermapItem.d.ts +5 -0
  44. package/dist/OvermapItem/constants.d.ts +2 -0
  45. package/dist/OvermapItem/index.d.ts +2 -0
  46. package/dist/OvermapItem/typings.d.ts +24 -0
  47. package/dist/OvermapItemGroup/OvermapItemGroup.d.ts +3 -0
  48. package/dist/OvermapItemGroup/context.d.ts +9 -0
  49. package/dist/OvermapItemGroup/index.d.ts +3 -0
  50. package/dist/OvermapItemGroup/typings.d.ts +7 -0
  51. package/dist/SelectContext/Provider.d.ts +14 -0
  52. package/dist/SelectContext/context.d.ts +5 -0
  53. package/dist/SelectContext/index.d.ts +3 -0
  54. package/dist/SelectContext/typings.d.ts +10 -0
  55. package/dist/ToggleButton/ToggleButton.d.ts +8 -0
  56. package/dist/ToggleButton/index.d.ts +1 -0
  57. package/dist/blocks.js +821 -99
  58. package/dist/blocks.js.map +1 -1
  59. package/dist/blocks.umd.cjs +813 -92
  60. package/dist/blocks.umd.cjs.map +1 -1
  61. package/dist/index.d.ts +7 -1
  62. package/dist/style.css +112 -40
  63. package/dist/typings.d.ts +4 -0
  64. package/dist/utils.d.ts +10 -4
  65. package/package.json +107 -104
package/dist/blocks.js CHANGED
@@ -1,22 +1,24 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { useThemeContext, Badge as Badge$1, Flex as Flex$1, Box, Link, Text as Text$2, Button, IconButton as IconButton$1, Card, Inset, Dialog as Dialog$1, AlertDialog as AlertDialog$1, Kbd, ContextMenu as ContextMenu$1, DropdownMenu as DropdownMenu$1, Select as Select$1, Checkbox as Checkbox$1, Switch as Switch$1, Portal, TextField, Popover as Popover$1, TextArea as TextArea$1, Callout, Tooltip as Tooltip$1, Theme, Separator as Separator$1, TableRow } from "@radix-ui/themes";
2
+ import { useThemeContext, Badge as Badge$1, Flex as Flex$1, Box, Link, Text as Text$2, Button, IconButton as IconButton$1, Card, Inset, Dialog as Dialog$1, AlertDialog as AlertDialog$1, Theme, Grid, Separator as Separator$2, ScrollArea, Kbd, ContextMenu as ContextMenu$1, DropdownMenu as DropdownMenu$1, Select as Select$1, Checkbox as Checkbox$1, Switch as Switch$1, Portal, TextField, Popover as Popover$1, TextArea as TextArea$1, Callout, Tooltip as Tooltip$1, TableRow } from "@radix-ui/themes";
3
3
  import { Theme as Theme2, updateThemeAppearanceClass, useThemeContext as useThemeContext2 } from "@radix-ui/themes";
4
- import React, { useMemo, useState, useLayoutEffect, useCallback, useEffect, Children, isValidElement, forwardRef, memo, createContext, useContext, cloneElement, createElement, useRef, useReducer } from "react";
4
+ import React, { useMemo, useState, useLayoutEffect, useCallback, useEffect, Children, isValidElement, forwardRef, memo, createContext, useContext, cloneElement, useRef, createElement, useReducer } from "react";
5
5
  import { useMediaQuery } from "react-responsive";
6
- import { Cross1Icon, MagnifyingGlassIcon, CheckIcon, DragHandleDots2Icon, Cross2Icon, DividerHorizontalIcon, CaretSortIcon, ArrowUpIcon, ArrowDownIcon, MixerHorizontalIcon, Pencil1Icon, TrashIcon, DoubleArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, DoubleArrowRightIcon } from "@radix-ui/react-icons";
6
+ import useResizeObserver from "@react-hook/resize-observer";
7
+ import { Cross1Icon, CheckIcon, MagnifyingGlassIcon, DragHandleDots2Icon, Cross2Icon, DividerHorizontalIcon, CaretSortIcon, ArrowUpIcon, ArrowDownIcon, MixerHorizontalIcon, Pencil1Icon, TrashIcon, DoubleArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, DoubleArrowRightIcon } from "@radix-ui/react-icons";
8
+ import * as RadixDialogPrimitive from "@radix-ui/react-dialog";
7
9
  import * as RadixContextMenu from "@radix-ui/react-context-menu";
8
10
  import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
11
+ import { Slot } from "@radix-ui/react-slot";
9
12
  import { isMobile } from "react-device-detect";
10
- import * as RadixDialogPrimitive from "@radix-ui/react-dialog";
11
13
  import { Resizable } from "re-resizable";
12
14
  import { CSSTransition, Transition } from "react-transition-group";
13
15
  import ReactDOM, { flushSync } from "react-dom";
14
- import { Slot } from "@radix-ui/react-slot";
15
16
  import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
16
- import { Root as Root$3, Item as Item$1 } from "@radix-ui/react-toggle-group";
17
- import { Root as Root$4 } from "@radix-ui/react-toolbar";
17
+ import { Root as Root$4, Item as Item$2 } from "@radix-ui/react-toggle-group";
18
+ import { Root as Root$5 } from "@radix-ui/react-toolbar";
18
19
  import * as RadixToast from "@radix-ui/react-toast";
19
20
  import { ToastProvider as ToastProvider$1, ToastViewport as ToastViewport$1 } from "@radix-ui/react-toast";
21
+ import * as Toggle from "@radix-ui/react-toggle";
20
22
  import { useErrorBoundary, ErrorBoundary } from "react-error-boundary";
21
23
  import FeatherIcon from "feather-icons-react";
22
24
  import { HeaderCell, Table as Table$1, Header, HeaderRow, Body, Cell, Row } from "@table-library/react-table-library/table.js";
@@ -191,12 +193,38 @@ function useTextFilter(values, filterFunction) {
191
193
  }, [filterFunction, filterValue, values]);
192
194
  return [filteredOptions, filterValue, setFilterValue];
193
195
  }
196
+ const useSize = (target) => {
197
+ const [size, setSize] = useState();
198
+ useLayoutEffect(() => {
199
+ var _a;
200
+ setSize((_a = target.current) == null ? void 0 : _a.getBoundingClientRect());
201
+ }, [target]);
202
+ const handleResize = useCallback((entry) => {
203
+ const rect = entry.contentRect;
204
+ setSize(rect);
205
+ }, []);
206
+ useResizeObserver(target, handleResize);
207
+ return size;
208
+ };
194
209
  const splitTextForEllipsisAndExpansion = (text, numChars) => {
195
210
  const indexOfSpace = text.indexOf(" ", numChars);
196
211
  const firstLine = indexOfSpace === -1 ? text : text.substring(0, indexOfSpace);
197
212
  const secondLine = indexOfSpace === -1 ? "" : text.substring(indexOfSpace);
198
213
  return [firstLine, secondLine];
199
214
  };
215
+ function useOvermapResponsiveValue(value) {
216
+ const { size } = useViewportSize();
217
+ if (value === null || value === void 0)
218
+ return value;
219
+ if (typeof value === "object") {
220
+ if (!("initial" in value)) {
221
+ throw new Error("Expected initial property to be set in Responsive object");
222
+ } else {
223
+ return value[size];
224
+ }
225
+ }
226
+ return value;
227
+ }
200
228
  const _Badge = forwardRef(function Badge2({ className, severity = "primary", color, children, ...rest }, ref) {
201
229
  const severityColor = useSeverityColor(severity);
202
230
  return /* @__PURE__ */ jsx(
@@ -214,7 +242,7 @@ const Badge = memo(_Badge);
214
242
  const zeroMinWidth = "_zeroMinWidth_curjh_1";
215
243
  const zeroMinHeight = "_zeroMinHeight_curjh_5";
216
244
  const radius = "_radius_curjh_9";
217
- const styles$n = {
245
+ const styles$t = {
218
246
  zeroMinWidth,
219
247
  zeroMinHeight,
220
248
  radius
@@ -226,9 +254,9 @@ const Flex = memo(
226
254
  Flex$1,
227
255
  {
228
256
  className: classNames(className, {
229
- [styles$n.radius]: radius2,
230
- [styles$n.zeroMinWidth]: zeroMinWidth2,
231
- [styles$n.zeroMinHeight]: zeroMinHeight2
257
+ [styles$t.radius]: radius2,
258
+ [styles$t.zeroMinWidth]: zeroMinWidth2,
259
+ [styles$t.zeroMinHeight]: zeroMinHeight2
232
260
  }),
233
261
  ref,
234
262
  ...rest,
@@ -240,14 +268,14 @@ const Flex = memo(
240
268
  );
241
269
  const BreadcrumbContext = createContext({});
242
270
  const useBreadcrumbContext = () => useContext(BreadcrumbContext);
243
- const Item = memo(
271
+ const Item$1 = memo(
244
272
  forwardRef(({ className, children, ...rest }, ref) => {
245
273
  const { size, severity } = useBreadcrumbContext();
246
274
  const severityColor = useSeverityColor(severity);
247
275
  return /* @__PURE__ */ jsx(Box, { className: classNames("overmap-breadcrumb-item", className), height: "max-content", width: "max-content", children: /* @__PURE__ */ jsx(Link, { ref, size, color: severityColor, ...rest, children: /* @__PURE__ */ jsx(Flex, { height: "100%", width: "100%", align: "center", gap: "1", children }) }) });
248
276
  })
249
277
  );
250
- const Group = memo(
278
+ const Group$1 = memo(
251
279
  forwardRef(
252
280
  ({ className, children, separator, severity = "info", size, gap = "2", ...rest }, ref) => {
253
281
  const severityColor = useSeverityColor(severity);
@@ -274,23 +302,23 @@ const Group = memo(
274
302
  )
275
303
  );
276
304
  const Breadcrumb = {
277
- Group,
278
- Item
305
+ Group: Group$1,
306
+ Item: Item$1
279
307
  };
280
308
  const fluid$1 = "_fluid_r73gr_1";
281
309
  const hoverSpin90Clockwise = "_hoverSpin90Clockwise_r73gr_15";
282
310
  const hoverSpin180Clockwise = "_hoverSpin180Clockwise_r73gr_25";
283
311
  const hoverSpin360Clockwise = "_hoverSpin360Clockwise_r73gr_35";
284
- const styles$m = {
312
+ const styles$s = {
285
313
  fluid: fluid$1,
286
314
  hoverSpin90Clockwise,
287
315
  hoverSpin180Clockwise,
288
316
  hoverSpin360Clockwise
289
317
  };
290
318
  const hoverEffectClassNameMapping = {
291
- spin90Clockwise: styles$m.hoverSpin90Clockwise,
292
- spin180Clockwise: styles$m.hoverSpin180Clockwise,
293
- spin360Clockwise: styles$m.hoverSpin360Clockwise
319
+ spin90Clockwise: styles$s.hoverSpin90Clockwise,
320
+ spin180Clockwise: styles$s.hoverSpin180Clockwise,
321
+ spin360Clockwise: styles$s.hoverSpin360Clockwise
294
322
  };
295
323
  const clickOnEnterOrSpace = (e) => {
296
324
  if (e.key === "Enter" || e.key === " ") {
@@ -309,14 +337,14 @@ const SizeMapping = {
309
337
  };
310
338
  const ButtonGroupContext = createContext({});
311
339
  const useButtonGroupContext = () => useContext(ButtonGroupContext);
312
- const spinner = "_spinner_isifr_9";
313
- const spin = "_spin_isifr_9";
314
- const styles$l = {
340
+ const spinner = "_spinner_1oknc_9";
341
+ const spin = "_spin_1oknc_9";
342
+ const styles$r = {
315
343
  spinner,
316
344
  spin
317
345
  };
318
346
  const Spinner = memo(() => {
319
- return /* @__PURE__ */ jsx("div", { className: styles$l.spinner });
347
+ return /* @__PURE__ */ jsx("div", { className: styles$r.spinner });
320
348
  });
321
349
  Spinner.displayName = "Spinner";
322
350
  const _Button$1 = forwardRef(function Button$1(props, ref) {
@@ -352,7 +380,7 @@ const _Button$1 = forwardRef(function Button$1(props, ref) {
352
380
  ref,
353
381
  type,
354
382
  className: classNames(className, hoverEffectClasses, {
355
- [styles$m.fluid]: fluid2
383
+ [styles$s.fluid]: fluid2
356
384
  }),
357
385
  color,
358
386
  size: useResponsiveMapping(size, SizeMapping),
@@ -394,7 +422,7 @@ const _Button = forwardRef(function Button3(props, ref) {
394
422
  IconButton$1,
395
423
  {
396
424
  className: classNames(className, hoverEffectClasses, {
397
- [styles$m.fluid]: fluid2
425
+ [styles$s.fluid]: fluid2
398
426
  }),
399
427
  ref,
400
428
  color,
@@ -409,7 +437,7 @@ const _Button = forwardRef(function Button3(props, ref) {
409
437
  });
410
438
  const IconButton = React.memo(_Button);
411
439
  const merged = "_merged_wdgxo_1";
412
- const styles$k = {
440
+ const styles$q = {
413
441
  merged
414
442
  };
415
443
  const GhostVariantSizeToGapMapping = {
@@ -436,7 +464,7 @@ const _ButtonGroup = forwardRef(function ButtonGroup2({
436
464
  Flex$1,
437
465
  {
438
466
  className: classNames("overmap-button-group", className, {
439
- [styles$k.merged]: merged2
467
+ [styles$q.merged]: merged2
440
468
  }),
441
469
  ref,
442
470
  gap: merged2 ? gap ?? mergedAutoGap : gap ?? "2",
@@ -449,7 +477,7 @@ const _ButtonGroup = forwardRef(function ButtonGroup2({
449
477
  });
450
478
  const ButtonGroup = memo(_ButtonGroup);
451
479
  const separators = "_separators_1f7v1_1";
452
- const styles$j = {
480
+ const styles$p = {
453
481
  separators
454
482
  };
455
483
  const ButtonListBorder = memo(
@@ -480,7 +508,7 @@ const ButtonListRoot = memo(
480
508
  size,
481
509
  severity: "info",
482
510
  variant: buttonVariant,
483
- className: classNames(className, styles$j.separators),
511
+ className: classNames(className, styles$p.separators),
484
512
  merged: true,
485
513
  gap: "0",
486
514
  direction: "column",
@@ -506,7 +534,7 @@ const ButtonList = {
506
534
  };
507
535
  const DialogContent = memo(function DialogContent2(props) {
508
536
  const { title, description, content, closeDialog } = props;
509
- return /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
537
+ return /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", grow: "1", children: [
510
538
  /* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "1", children: [
511
539
  /* @__PURE__ */ jsxs(Flex$1, { justify: "between", children: [
512
540
  /* @__PURE__ */ jsx(Dialog$1.Title, { mb: "0", children: title }),
@@ -662,6 +690,696 @@ const useDiscardAlertDialog = () => {
662
690
  [openAlertDialog]
663
691
  );
664
692
  };
693
+ const BaseDialog = memo(
694
+ forwardRef((props, ref) => {
695
+ const {
696
+ children,
697
+ defaultOpen = false,
698
+ onInterruptClose,
699
+ content,
700
+ onClose,
701
+ open: controlledOpen,
702
+ onOpenChange: controlledOpenChange,
703
+ className,
704
+ style,
705
+ overlay: overlay2 = false,
706
+ overlayClass,
707
+ overlayStyle
708
+ } = props;
709
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen ?? false);
710
+ const open = useMemo(
711
+ () => controlledOpen !== void 0 ? controlledOpen : uncontrolledOpen,
712
+ [controlledOpen, uncontrolledOpen]
713
+ );
714
+ const handleOpenChange = useCallback(
715
+ (nextOpen) => {
716
+ if (controlledOpenChange) {
717
+ controlledOpenChange(nextOpen);
718
+ } else if (!nextOpen && onInterruptClose) {
719
+ const closeInner = () => {
720
+ setUncontrolledOpen(false);
721
+ if (onClose)
722
+ onClose();
723
+ };
724
+ onInterruptClose(closeInner);
725
+ } else if (!nextOpen) {
726
+ setUncontrolledOpen(false);
727
+ if (onClose)
728
+ onClose();
729
+ } else {
730
+ setUncontrolledOpen(nextOpen);
731
+ }
732
+ },
733
+ [controlledOpenChange, onClose, onInterruptClose]
734
+ );
735
+ const close = useCallback(
736
+ (closeOptions) => {
737
+ if (closeOptions == null ? void 0 : closeOptions.force) {
738
+ setUncontrolledOpen(false);
739
+ } else {
740
+ handleOpenChange(false);
741
+ }
742
+ },
743
+ [handleOpenChange]
744
+ );
745
+ return /* @__PURE__ */ jsxs(RadixDialogPrimitive.Root, { open, onOpenChange: handleOpenChange, modal: overlay2, children: [
746
+ children !== void 0 && /* @__PURE__ */ jsx(RadixDialogPrimitive.Trigger, { children }),
747
+ /* @__PURE__ */ jsx(RadixDialogPrimitive.Portal, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
748
+ overlay2 && /* @__PURE__ */ jsx(Theme, { asChild: true, children: /* @__PURE__ */ jsx(RadixDialogPrimitive.Overlay, { className: overlayClass, style: overlayStyle }) }),
749
+ /* @__PURE__ */ jsx(Theme, { asChild: true, children: /* @__PURE__ */ jsx(RadixDialogPrimitive.Content, { className, style, ref, children: content(close) }) })
750
+ ] }) })
751
+ ] });
752
+ })
753
+ );
754
+ const OverlayContent = "_OverlayContent_1nr9w_1";
755
+ const OverlayOverlay = "_OverlayOverlay_1nr9w_6";
756
+ const styles$o = {
757
+ OverlayContent,
758
+ OverlayOverlay
759
+ };
760
+ const Overlay$2 = memo(
761
+ forwardRef((props, ref) => {
762
+ const { className, overlayClass, ...rest } = props;
763
+ return /* @__PURE__ */ jsx(
764
+ BaseDialog,
765
+ {
766
+ ref,
767
+ overlayClass: classNames("overmap-overlay-overlay", styles$o.OverlayOverlay, overlayClass),
768
+ className: classNames("overmap-overlay-content", styles$o.OverlayContent, className),
769
+ ...rest
770
+ }
771
+ );
772
+ })
773
+ );
774
+ const OvermapItemSizeDependantProps = {
775
+ "1": {
776
+ gap: "1",
777
+ px: "1",
778
+ height: "5",
779
+ fontSize: "var(--font-size-2)"
780
+ },
781
+ "2": {
782
+ gap: "2",
783
+ px: "2",
784
+ height: "6",
785
+ fontSize: "var(--font-size-2)"
786
+ },
787
+ "3": {
788
+ gap: "2",
789
+ px: "3",
790
+ height: "7",
791
+ fontSize: "var(--font-size-3)"
792
+ },
793
+ "4": {
794
+ gap: "2",
795
+ px: "4",
796
+ height: "8",
797
+ fontSize: "var(--font-size-3)"
798
+ },
799
+ "5": {
800
+ gap: "3",
801
+ px: "5",
802
+ height: "9",
803
+ fontSize: "var(--font-size-4)"
804
+ }
805
+ };
806
+ const OvermapItemGroupContext = createContext({});
807
+ const useOvermapItemGroupContext = () => useContext(OvermapItemGroupContext);
808
+ const OvermapItemGroup = memo(
809
+ forwardRef(function(props, ref) {
810
+ const { size, compact = false, children, ...rest } = props;
811
+ return /* @__PURE__ */ jsx(OvermapItemGroupContext.Provider, { value: { size, compact }, children: /* @__PURE__ */ jsx(Grid, { ref, columns: "1", width: "100%", height: "max-content", ...rest, children }) });
812
+ })
813
+ );
814
+ const OvermapItem = memo(
815
+ forwardRef((props, ref) => {
816
+ const overmapItemGroupContext = useOvermapItemGroupContext();
817
+ const {
818
+ leftSlot,
819
+ compact = overmapItemGroupContext.compact,
820
+ rightSlot,
821
+ children,
822
+ size = overmapItemGroupContext.size,
823
+ style,
824
+ ...rest
825
+ } = props;
826
+ const computedSize = useOvermapResponsiveValue(size);
827
+ const { fontSize, ...restSizeProps } = OvermapItemSizeDependantProps[computedSize ?? "2"];
828
+ return /* @__PURE__ */ jsxs(
829
+ Flex$1,
830
+ {
831
+ ref,
832
+ align: "center",
833
+ shrink: "0",
834
+ style: { fontSize, ...style },
835
+ ...restSizeProps,
836
+ ...rest,
837
+ width: compact ? restSizeProps.height : void 0,
838
+ children: [
839
+ !compact && leftSlot && /* @__PURE__ */ jsx(Flex$1, { width: "max-content", height: "max-content", align: "center", children: leftSlot }),
840
+ /* @__PURE__ */ jsx(Flex$1, { height: "max-content", align: "center", grow: "1", justify: compact ? "center" : void 0, children }),
841
+ !compact && rightSlot && /* @__PURE__ */ jsx(Flex$1, { width: "max-content", height: "max-content", align: "center", children: rightSlot })
842
+ ]
843
+ }
844
+ );
845
+ })
846
+ );
847
+ const DialogMenuContext = createContext({});
848
+ const useDialogMenuContext = () => useContext(DialogMenuContext);
849
+ const DialogMenuItem = "_DialogMenuItem_1ojd2_1";
850
+ const styles$n = {
851
+ DialogMenuItem
852
+ };
853
+ const Item = memo(
854
+ forwardRef((props, ref) => {
855
+ const dialogMenuContext = useDialogMenuContext();
856
+ const {
857
+ className,
858
+ children,
859
+ onSelect,
860
+ onClick,
861
+ closeOnSelect = dialogMenuContext.closeOnSelect,
862
+ size = dialogMenuContext.size,
863
+ leftSlot,
864
+ rightSlot,
865
+ ...rest
866
+ } = props;
867
+ const handleClick = useCallback(
868
+ (e) => {
869
+ if (onClick)
870
+ onClick(e);
871
+ if (onSelect)
872
+ onSelect();
873
+ if (closeOnSelect)
874
+ dialogMenuContext.close();
875
+ },
876
+ [closeOnSelect, dialogMenuContext, onClick, onSelect]
877
+ );
878
+ return /* @__PURE__ */ jsx(
879
+ OvermapItem,
880
+ {
881
+ className: classNames(className, styles$n.DialogMenuItem),
882
+ onClick: handleClick,
883
+ ref,
884
+ leftSlot,
885
+ rightSlot,
886
+ size,
887
+ role: "menuitem",
888
+ tabIndex: 0,
889
+ ...rest,
890
+ children
891
+ }
892
+ );
893
+ })
894
+ );
895
+ const SelectContext = createContext({});
896
+ function useSelectContext() {
897
+ return useContext(SelectContext);
898
+ }
899
+ const SelectContextProvider = memo((props) => {
900
+ const { type, children } = props;
901
+ const [controlledValue, setControlledValue] = useState(
902
+ type === "single" ? (props == null ? void 0 : props.defaultValue) ?? null : null
903
+ );
904
+ const [controlledValues, setControlledValues] = useState(
905
+ type === "multi" ? (props == null ? void 0 : props.defaultValues) ?? [] : []
906
+ );
907
+ const onValuesChange = useCallback(
908
+ (values) => {
909
+ setControlledValues(values);
910
+ if (type === "multi" && (props == null ? void 0 : props.onValuesChange))
911
+ props.onValuesChange(values);
912
+ },
913
+ [props, type]
914
+ );
915
+ const onValueChange = useCallback(
916
+ (value2) => {
917
+ setControlledValue(value2);
918
+ if (type === "single" && (props == null ? void 0 : props.onValueChange))
919
+ props.onValueChange(value2);
920
+ },
921
+ [props, type]
922
+ );
923
+ const value = useMemo(
924
+ () => type === "multi" ? {
925
+ type,
926
+ values: (props == null ? void 0 : props.values) ?? controlledValues,
927
+ handleValuesChange: onValuesChange
928
+ } : {
929
+ type,
930
+ value: props.value ?? controlledValue,
931
+ handleValueChange: onValueChange
932
+ },
933
+ [controlledValue, controlledValues, onValueChange, onValuesChange, props, type]
934
+ );
935
+ return /* @__PURE__ */ jsx(SelectContext.Provider, { value, children });
936
+ });
937
+ SelectContextProvider.displayName = "SelectContextProvider";
938
+ const SelectItem = memo(
939
+ forwardRef((props, ref) => {
940
+ const dialogMenuContext = useDialogMenuContext();
941
+ const { value, rightSlot, selectedIndicator = dialogMenuContext.selectedIndicator, onSelect, ...rest } = props;
942
+ const { value: currentValue, handleValueChange } = useSelectContext();
943
+ const handleSelect = useCallback(() => {
944
+ handleValueChange(value !== currentValue ? value : null);
945
+ if (onSelect)
946
+ onSelect();
947
+ }, [currentValue, handleValueChange, onSelect, value]);
948
+ return /* @__PURE__ */ jsx(
949
+ Item,
950
+ {
951
+ ref,
952
+ onSelect: handleSelect,
953
+ role: "menuitemradio",
954
+ rightSlot: /* @__PURE__ */ jsxs(Fragment, { children: [
955
+ currentValue === value && selectedIndicator,
956
+ " ",
957
+ rightSlot
958
+ ] }),
959
+ ...rest
960
+ }
961
+ );
962
+ })
963
+ );
964
+ const MultiSelectItem$1 = memo(
965
+ forwardRef((props, ref) => {
966
+ const dialogMenuContext = useDialogMenuContext();
967
+ const { value, rightSlot, selectedIndicator = dialogMenuContext.selectedIndicator, onSelect, ...rest } = props;
968
+ const { values: currentValues, handleValuesChange } = useSelectContext();
969
+ const handleSelect = useCallback(() => {
970
+ handleValuesChange(
971
+ currentValues.includes(value) ? [...currentValues, value] : (
972
+ // If value currently in selected values, remove it (filter out)
973
+ currentValues.filter((currentValue) => currentValue !== value)
974
+ )
975
+ );
976
+ if (onSelect)
977
+ onSelect();
978
+ }, [currentValues, handleValuesChange, onSelect, value]);
979
+ return /* @__PURE__ */ jsx(
980
+ Item,
981
+ {
982
+ onSelect: handleSelect,
983
+ ref,
984
+ role: "menuitemcheckbox",
985
+ rightSlot: /* @__PURE__ */ jsxs(Fragment, { children: [
986
+ currentValues.includes(value) && selectedIndicator,
987
+ rightSlot
988
+ ] }),
989
+ ...rest
990
+ }
991
+ );
992
+ })
993
+ );
994
+ const SubTrigger = memo(
995
+ forwardRef((props, ref) => {
996
+ const { subContentId, onSelect, ...rest } = props;
997
+ const { setSubContentId } = useDialogMenuContext();
998
+ const handleSelect = useCallback(() => {
999
+ setSubContentId(subContentId);
1000
+ if (onSelect)
1001
+ onSelect();
1002
+ }, [subContentId, onSelect, setSubContentId]);
1003
+ return /* @__PURE__ */ jsx(Item, { onSelect: handleSelect, ref, ...rest });
1004
+ })
1005
+ );
1006
+ const light = "_light_1u8fs_1";
1007
+ const bold = "_bold_1u8fs_8";
1008
+ const full = "_full_1u8fs_15";
1009
+ const Text$1 = "_Text_1u8fs_22";
1010
+ const styles$m = {
1011
+ light,
1012
+ bold,
1013
+ full,
1014
+ Text: Text$1
1015
+ };
1016
+ const SeparatorSizeMapping = {
1017
+ "1": "max-content",
1018
+ "2": "max-content",
1019
+ "3": "max-content",
1020
+ "4": "100%"
1021
+ };
1022
+ const _Separator = forwardRef(function Separator2({
1023
+ className,
1024
+ severity = "info",
1025
+ textWeight = "light",
1026
+ gap = "1",
1027
+ text,
1028
+ orientation = "horizontal",
1029
+ size,
1030
+ weight = "medium",
1031
+ ...rest
1032
+ }, ref) {
1033
+ const computedSizing = useResponsiveMapping(size, SeparatorSizeMapping);
1034
+ const severityColor = useSeverityColor(severity);
1035
+ return /* @__PURE__ */ jsxs(
1036
+ Flex$1,
1037
+ {
1038
+ className: classNames("overmap-separator", className, {
1039
+ [styles$m.light]: weight === "light",
1040
+ [styles$m.bold]: weight === "bold",
1041
+ [styles$m.full]: weight === "full"
1042
+ }),
1043
+ ref,
1044
+ width: orientation === "horizontal" ? computedSizing : "max-content",
1045
+ height: orientation === "vertical" ? computedSizing : "max-content",
1046
+ direction: orientation === "vertical" ? "column" : "row",
1047
+ align: "center",
1048
+ gap,
1049
+ children: [
1050
+ /* @__PURE__ */ jsx(Separator$2, { size, orientation, color: severityColor, ...rest }),
1051
+ text && /* @__PURE__ */ jsxs(Fragment, { children: [
1052
+ /* @__PURE__ */ jsx(Text$2, { className: styles$m.Text, as: "span", size: "1", weight: textWeight, color: severityColor, children: text }),
1053
+ /* @__PURE__ */ jsx(Separator$2, { size, orientation, color: severityColor, ...rest })
1054
+ ] })
1055
+ ]
1056
+ }
1057
+ );
1058
+ });
1059
+ const Separator$1 = memo(_Separator);
1060
+ const Separator = memo(
1061
+ forwardRef((props, ref) => {
1062
+ return /* @__PURE__ */ jsx(Flex$1, { ref, py: "2", children: /* @__PURE__ */ jsx(Separator$1, { size: "4", weight: "light", ...props }) });
1063
+ })
1064
+ );
1065
+ const DEFAULT_DIALOG_MENU_SIZE = "3";
1066
+ const DEFAULT_SELECTED_INDICATOR = /* @__PURE__ */ jsx(CheckIcon, {});
1067
+ const Group = memo(
1068
+ forwardRef((props, ref) => {
1069
+ const dialogMenuContext = useDialogMenuContext();
1070
+ const { size = dialogMenuContext.size, grid = false, children } = props;
1071
+ const computedSize = useOvermapResponsiveValue(size);
1072
+ const computedColumns = useMemo(() => {
1073
+ const { height } = OvermapItemSizeDependantProps[computedSize ?? DEFAULT_DIALOG_MENU_SIZE];
1074
+ return `repeat(auto-fit,var(--space-${height})`;
1075
+ }, [computedSize]);
1076
+ return /* @__PURE__ */ jsx(
1077
+ OvermapItemGroup,
1078
+ {
1079
+ role: "group",
1080
+ compact: grid,
1081
+ size,
1082
+ ref,
1083
+ columns: grid ? computedColumns : void 0,
1084
+ flow: "dense",
1085
+ children
1086
+ }
1087
+ );
1088
+ })
1089
+ );
1090
+ const SelectGroup = memo(
1091
+ forwardRef((props, ref) => {
1092
+ const { value, onValueChange, ...rest } = props;
1093
+ return /* @__PURE__ */ jsx(SelectContextProvider, { type: "single", value, onValueChange, children: /* @__PURE__ */ jsx(Group, { ref, ...rest }) });
1094
+ })
1095
+ );
1096
+ const MultiSelectGroup = memo(
1097
+ forwardRef((props, ref) => {
1098
+ const { values, onValuesChange, ...rest } = props;
1099
+ return /* @__PURE__ */ jsx(SelectContextProvider, { type: "multi", values, onValuesChange, children: /* @__PURE__ */ jsx(Group, { ref, ...rest }) });
1100
+ })
1101
+ );
1102
+ const OvermapInputItem$1 = "_OvermapInputItem_1jgzv_1";
1103
+ const styles$l = {
1104
+ OvermapInputItem: OvermapInputItem$1
1105
+ };
1106
+ const OvermapInputItem = memo(
1107
+ forwardRef((props, ref) => {
1108
+ const { size, className, style, leftSlot, rightSlot, ...rest } = props;
1109
+ return /* @__PURE__ */ jsx(
1110
+ OvermapItem,
1111
+ {
1112
+ className,
1113
+ style,
1114
+ size,
1115
+ leftSlot,
1116
+ rightSlot,
1117
+ compact: false,
1118
+ children: /* @__PURE__ */ jsx("input", { className: styles$l.OvermapInputItem, ref, ...rest })
1119
+ }
1120
+ );
1121
+ })
1122
+ );
1123
+ OvermapInputItem.displayName = "OvermapInputItem";
1124
+ const DialogContentScrollArea = "_DialogContentScrollArea_i3a60_1";
1125
+ const styles$k = {
1126
+ DialogContentScrollArea
1127
+ };
1128
+ const ContentImpl = memo(
1129
+ forwardRef((props, ref) => {
1130
+ const { size } = useDialogMenuContext();
1131
+ const {
1132
+ topSlot,
1133
+ bottomSlot,
1134
+ numberOfItems,
1135
+ filterValue,
1136
+ onFilterValueChange,
1137
+ placeholder,
1138
+ leftFilterSlot,
1139
+ rightFilterSlot,
1140
+ children
1141
+ } = props;
1142
+ const handleChange = useCallback(
1143
+ (e) => {
1144
+ if (onFilterValueChange)
1145
+ onFilterValueChange(e.target.value);
1146
+ },
1147
+ [onFilterValueChange]
1148
+ );
1149
+ return /* @__PURE__ */ jsxs(Flex$1, { direction: "column", width: "100%", ref, py: "2", children: [
1150
+ /* @__PURE__ */ jsxs(Flex$1, { direction: "column", width: "100%", px: "2", children: [
1151
+ topSlot && /* @__PURE__ */ jsx(OvermapItem, { size, children: topSlot }),
1152
+ filterValue !== void 0 && /* @__PURE__ */ jsx(
1153
+ OvermapInputItem,
1154
+ {
1155
+ size,
1156
+ leftSlot: leftFilterSlot,
1157
+ rightSlot: rightFilterSlot,
1158
+ value: filterValue,
1159
+ onChange: handleChange,
1160
+ placeholder
1161
+ }
1162
+ )
1163
+ ] }),
1164
+ (topSlot || filterValue !== void 0) && numberOfItems > 0 && /* @__PURE__ */ jsx(Separator, {}),
1165
+ /* @__PURE__ */ jsx(ScrollArea, { className: styles$k.DialogContentScrollArea, scrollbars: "vertical", type: "hover", children: /* @__PURE__ */ jsx(Flex$1, { px: "2", children }) }),
1166
+ bottomSlot && /* @__PURE__ */ jsx(Separator, {}),
1167
+ /* @__PURE__ */ jsx(Flex$1, { direction: "column", width: "100%", px: "2", children: bottomSlot && /* @__PURE__ */ jsx(OvermapItem, { size, children: bottomSlot }) })
1168
+ ] });
1169
+ })
1170
+ );
1171
+ const Content = memo(
1172
+ forwardRef((props, ref) => {
1173
+ const { subContentId } = useDialogMenuContext();
1174
+ return !subContentId && /* @__PURE__ */ jsx(ContentImpl, { ref, ...props });
1175
+ })
1176
+ );
1177
+ const SubContent = memo(
1178
+ forwardRef((props, ref) => {
1179
+ const { id, ...rest } = props;
1180
+ const { subContentId } = useDialogMenuContext();
1181
+ return subContentId === id && /* @__PURE__ */ jsx(ContentImpl, { ref, ...rest });
1182
+ })
1183
+ );
1184
+ const DialogMenuContextProvider = memo((props) => {
1185
+ const { size, closeOnSelect, close, selectedIndicator, children } = props;
1186
+ const [subContentId, setSubContentId] = useState(null);
1187
+ const value = useMemo(
1188
+ () => ({ size, close, closeOnSelect, subContentId, setSubContentId, selectedIndicator }),
1189
+ [close, closeOnSelect, selectedIndicator, size, subContentId]
1190
+ );
1191
+ return /* @__PURE__ */ jsx(DialogMenuContext.Provider, { value, children });
1192
+ });
1193
+ DialogMenuContextProvider.displayName = "DialogMenuContextProvider";
1194
+ const DialogMenuWrapper = "_DialogMenuWrapper_16hy0_1";
1195
+ const DialogMenu$1 = "_DialogMenu_16hy0_1";
1196
+ const styles$j = {
1197
+ DialogMenuWrapper,
1198
+ DialogMenu: DialogMenu$1
1199
+ };
1200
+ const Root$3 = memo(
1201
+ forwardRef((props, ref) => {
1202
+ const {
1203
+ className,
1204
+ content: contentFromProps,
1205
+ selectedIndicator = DEFAULT_SELECTED_INDICATOR,
1206
+ size = DEFAULT_DIALOG_MENU_SIZE,
1207
+ closeOnSelect = false,
1208
+ ...rest
1209
+ } = props;
1210
+ const content = useCallback(
1211
+ (close) => {
1212
+ return /* @__PURE__ */ jsx(Flex$1, { className: classNames(styles$j.DialogMenu, className), children: /* @__PURE__ */ jsx(
1213
+ DialogMenuContextProvider,
1214
+ {
1215
+ size,
1216
+ close,
1217
+ closeOnSelect,
1218
+ selectedIndicator,
1219
+ children: contentFromProps
1220
+ }
1221
+ ) });
1222
+ },
1223
+ [className, closeOnSelect, contentFromProps, selectedIndicator, size]
1224
+ );
1225
+ return /* @__PURE__ */ jsx(BaseDialog, { className: styles$j.DialogMenuWrapper, ref, content, ...rest });
1226
+ })
1227
+ );
1228
+ const DialogCommandMenu = memo(
1229
+ forwardRef((props, ref) => {
1230
+ const {
1231
+ // Command menu scoped props
1232
+ size,
1233
+ items,
1234
+ closeOnSelect = true,
1235
+ // Content scoped props
1236
+ filterValue,
1237
+ onFilterValueChange,
1238
+ placeholder,
1239
+ leftFilterSlot,
1240
+ rightFilterSlot,
1241
+ topSlot,
1242
+ bottomSlot,
1243
+ ...rest
1244
+ } = props;
1245
+ return /* @__PURE__ */ jsx(
1246
+ Root$3,
1247
+ {
1248
+ ref,
1249
+ size,
1250
+ content: /* @__PURE__ */ jsx(
1251
+ Content,
1252
+ {
1253
+ filterValue,
1254
+ onFilterValueChange,
1255
+ placeholder,
1256
+ leftFilterSlot,
1257
+ rightFilterSlot,
1258
+ numberOfItems: items.length,
1259
+ topSlot,
1260
+ bottomSlot,
1261
+ children: /* @__PURE__ */ jsx(Group, { size, children: items.map((item, index) => /* @__PURE__ */ jsx(Item, { ...item }, index)) })
1262
+ }
1263
+ ),
1264
+ closeOnSelect,
1265
+ ...rest
1266
+ }
1267
+ );
1268
+ })
1269
+ );
1270
+ const DialogSelectMenu = memo(
1271
+ forwardRef((props, ref) => {
1272
+ const {
1273
+ // Select scoped props
1274
+ size,
1275
+ value,
1276
+ onValueChange,
1277
+ items,
1278
+ selectedIndicator,
1279
+ // Content scoped props
1280
+ filterValue,
1281
+ onFilterValueChange,
1282
+ placeholder,
1283
+ leftFilterSlot,
1284
+ rightFilterSlot,
1285
+ topSlot,
1286
+ bottomSlot,
1287
+ ...rest
1288
+ } = props;
1289
+ return /* @__PURE__ */ jsx(
1290
+ Root$3,
1291
+ {
1292
+ ref,
1293
+ size,
1294
+ content: /* @__PURE__ */ jsx(
1295
+ Content,
1296
+ {
1297
+ filterValue,
1298
+ onFilterValueChange,
1299
+ placeholder,
1300
+ leftFilterSlot,
1301
+ rightFilterSlot,
1302
+ numberOfItems: items.length,
1303
+ topSlot,
1304
+ bottomSlot,
1305
+ children: /* @__PURE__ */ jsx(SelectGroup, { size, value, onValueChange, children: items.map((item, index) => /* @__PURE__ */ jsx(
1306
+ SelectItem,
1307
+ {
1308
+ selectedIndicator,
1309
+ ...item
1310
+ },
1311
+ `${item.value}-${index}`
1312
+ )) })
1313
+ }
1314
+ ),
1315
+ ...rest
1316
+ }
1317
+ );
1318
+ })
1319
+ );
1320
+ const DialogMultiSelectMenu = memo(
1321
+ forwardRef((props, ref) => {
1322
+ const {
1323
+ // Multi select scoped props
1324
+ size,
1325
+ selectedIndicator,
1326
+ values,
1327
+ onValuesChange,
1328
+ items,
1329
+ // Content scoped props
1330
+ filterValue,
1331
+ onFilterValueChange,
1332
+ placeholder,
1333
+ leftFilterSlot,
1334
+ rightFilterSlot,
1335
+ topSlot,
1336
+ bottomSlot,
1337
+ ...rest
1338
+ } = props;
1339
+ return /* @__PURE__ */ jsx(
1340
+ Root$3,
1341
+ {
1342
+ ref,
1343
+ size,
1344
+ content: /* @__PURE__ */ jsx(
1345
+ Content,
1346
+ {
1347
+ filterValue,
1348
+ onFilterValueChange,
1349
+ placeholder,
1350
+ leftFilterSlot,
1351
+ rightFilterSlot,
1352
+ numberOfItems: items.length,
1353
+ topSlot,
1354
+ bottomSlot,
1355
+ children: /* @__PURE__ */ jsx(MultiSelectGroup, { size, values, onValuesChange, children: items.map((item, index) => /* @__PURE__ */ jsx(
1356
+ MultiSelectItem$1,
1357
+ {
1358
+ ...item,
1359
+ selectedIndicator
1360
+ },
1361
+ `${item.value}-${index}`
1362
+ )) })
1363
+ }
1364
+ ),
1365
+ ...rest
1366
+ }
1367
+ );
1368
+ })
1369
+ );
1370
+ const DialogMenu = {
1371
+ Root: Root$3,
1372
+ Item,
1373
+ SelectItem,
1374
+ MultiSelectItem: MultiSelectItem$1,
1375
+ Separator,
1376
+ Content,
1377
+ Group,
1378
+ SelectGroup,
1379
+ MultiSelectGroup,
1380
+ SubTrigger,
1381
+ SubContent
1382
+ };
665
1383
  const BaseMenuItem$1 = "_BaseMenuItem_5r3et_1";
666
1384
  const RemoveOutline = "_RemoveOutline_5r3et_15";
667
1385
  const BaseMenuSeparator$1 = "_BaseMenuSeparator_5r3et_19";
@@ -982,11 +1700,20 @@ const SubItemGroup = memo((props) => {
982
1700
  });
983
1701
  SubItemGroup.displayName = "SubItemGroup";
984
1702
  const Root$2 = memo((props) => {
985
- const { disabled: disabled2 = false, children, modal = false, content, ...rest } = props;
1703
+ const { disabled: disabled2 = false, children, modal = false, content, className, ...rest } = props;
986
1704
  const infoColor = useSeverityColor("info");
987
1705
  return /* @__PURE__ */ jsxs(ContextMenu$1.Root, { modal, children: [
988
1706
  /* @__PURE__ */ jsx(ContextMenu$1.Trigger, { disabled: disabled2, children }),
989
- /* @__PURE__ */ jsx(ContextMenu$1.Content, { variant: "soft", color: infoColor, ...rest, children: content })
1707
+ /* @__PURE__ */ jsx(
1708
+ ContextMenu$1.Content,
1709
+ {
1710
+ className: classNames("overmap-context-menu", className),
1711
+ variant: "soft",
1712
+ color: infoColor,
1713
+ ...rest,
1714
+ children: content
1715
+ }
1716
+ )
990
1717
  ] });
991
1718
  });
992
1719
  Root$2.displayName = "ContextMenuRoot";
@@ -1220,6 +1947,20 @@ const DropdownMultiSelect = memo(
1220
1947
  }
1221
1948
  )
1222
1949
  );
1950
+ const DownloadButtonUtility = memo((props) => {
1951
+ const { children, file } = props;
1952
+ const anchorRef = useRef(null);
1953
+ const objectURL = useMemo(() => URL.createObjectURL(file), [file]);
1954
+ const handleClick = useCallback(() => {
1955
+ if (anchorRef.current)
1956
+ anchorRef.current.click();
1957
+ }, []);
1958
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1959
+ /* @__PURE__ */ jsx(Slot, { onClick: handleClick, children }),
1960
+ /* @__PURE__ */ jsx("a", { style: { display: "none" }, href: objectURL, target: "_blank", rel: "noreferrer", ref: anchorRef })
1961
+ ] });
1962
+ });
1963
+ DownloadButtonUtility.displayName = "DownloadButtonUtility";
1223
1964
  const HoverUtility = memo(function Root({ children }) {
1224
1965
  const [isHovered, setIsHovered] = useState(isMobile);
1225
1966
  const handlePointerEnter = useCallback(() => {
@@ -2595,7 +3336,7 @@ const _ToggleGroup = forwardRef(function ToggleGroup2({
2595
3336
  ...rest
2596
3337
  }, ref) {
2597
3338
  return /* @__PURE__ */ jsx(
2598
- Root$3,
3339
+ Root$4,
2599
3340
  {
2600
3341
  type,
2601
3342
  className: classNames("overmap-toggle-group", className),
@@ -2608,7 +3349,7 @@ const _ToggleGroup = forwardRef(function ToggleGroup2({
2608
3349
  rovingFocus,
2609
3350
  defaultValue,
2610
3351
  asChild: true,
2611
- children: /* @__PURE__ */ jsx(ButtonGroup, { direction, ...rest, children: items.map(({ children, ...rest2 }) => /* @__PURE__ */ createElement(Item$1, { asChild: true, ...rest2, key: rest2.value }, /* @__PURE__ */ jsx(
3352
+ children: /* @__PURE__ */ jsx(ButtonGroup, { direction, ...rest, children: items.map(({ children, ...rest2 }) => /* @__PURE__ */ createElement(Item$2, { asChild: true, ...rest2, key: rest2.value }, /* @__PURE__ */ jsx(
2612
3353
  IconButton,
2613
3354
  {
2614
3355
  className: classNames("overmap-toggle-group-button"),
@@ -2627,7 +3368,7 @@ const styles$7 = {
2627
3368
  const Root2 = memo(
2628
3369
  forwardRef(({ className, minContentGap = "2", children, ...rest }, ref) => {
2629
3370
  return /* @__PURE__ */ jsx(
2630
- Root$4,
3371
+ Root$5,
2631
3372
  {
2632
3373
  className: classNames(className, "overmap-toolbar", styles$7.default),
2633
3374
  ref,
@@ -2793,11 +3534,34 @@ const Tooltip = memo(
2793
3534
  );
2794
3535
  })
2795
3536
  );
2796
- const noWrap = "_noWrap_1wpa5_1";
3537
+ const ToggleButton$1 = "_ToggleButton_13aus_1";
2797
3538
  const styles$4 = {
3539
+ ToggleButton: ToggleButton$1
3540
+ };
3541
+ const ToggleButton = memo(
3542
+ forwardRef((props, ref) => {
3543
+ const { children, className, severity, fluid: fluid2, variant = "solid", size, hoverEffects, ...rest } = props;
3544
+ return /* @__PURE__ */ jsx(Toggle.Root, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
3545
+ IconButton,
3546
+ {
3547
+ className: classNames(className, styles$4.ToggleButton),
3548
+ "aria-label": props["aria-label"],
3549
+ severity,
3550
+ fluid: fluid2,
3551
+ variant,
3552
+ hoverEffects,
3553
+ size,
3554
+ "data-variant": variant,
3555
+ children
3556
+ }
3557
+ ) });
3558
+ })
3559
+ );
3560
+ const noWrap = "_noWrap_1wpa5_1";
3561
+ const styles$3 = {
2798
3562
  noWrap
2799
3563
  };
2800
- const Text$1 = memo(
3564
+ const Text = memo(
2801
3565
  forwardRef(({ className, noWrap: noWrap2, severity, as, ...props }, ref) => {
2802
3566
  const color = useSeverityColor(severity);
2803
3567
  return /* @__PURE__ */ jsx(
@@ -2805,7 +3569,7 @@ const Text$1 = memo(
2805
3569
  {
2806
3570
  ref,
2807
3571
  as,
2808
- className: classNames(className, { [styles$4.noWrap]: noWrap2 }),
3572
+ className: classNames(className, { [styles$3.noWrap]: noWrap2 }),
2809
3573
  color,
2810
3574
  ...props
2811
3575
  }
@@ -2819,60 +3583,6 @@ const DefaultTheme = memo(
2819
3583
  return /* @__PURE__ */ jsx(Theme, { panelBackground, radius: radius2, ref, ...rest });
2820
3584
  })
2821
3585
  );
2822
- const light = "_light_1u8fs_1";
2823
- const bold = "_bold_1u8fs_8";
2824
- const full = "_full_1u8fs_15";
2825
- const Text = "_Text_1u8fs_22";
2826
- const styles$3 = {
2827
- light,
2828
- bold,
2829
- full,
2830
- Text
2831
- };
2832
- const SeparatorSizeMapping = {
2833
- "1": "max-content",
2834
- "2": "max-content",
2835
- "3": "max-content",
2836
- "4": "100%"
2837
- };
2838
- const _Separator = forwardRef(function Separator2({
2839
- className,
2840
- severity = "info",
2841
- textWeight = "light",
2842
- gap = "1",
2843
- text,
2844
- orientation = "horizontal",
2845
- size,
2846
- weight = "medium",
2847
- ...rest
2848
- }, ref) {
2849
- const computedSizing = useResponsiveMapping(size, SeparatorSizeMapping);
2850
- const severityColor = useSeverityColor(severity);
2851
- return /* @__PURE__ */ jsxs(
2852
- Flex$1,
2853
- {
2854
- className: classNames("overmap-separator", className, {
2855
- [styles$3.light]: weight === "light",
2856
- [styles$3.bold]: weight === "bold",
2857
- [styles$3.full]: weight === "full"
2858
- }),
2859
- ref,
2860
- width: orientation === "horizontal" ? computedSizing : "max-content",
2861
- height: orientation === "vertical" ? computedSizing : "max-content",
2862
- direction: orientation === "vertical" ? "column" : "row",
2863
- align: "center",
2864
- gap,
2865
- children: [
2866
- /* @__PURE__ */ jsx(Separator$1, { size, orientation, color: severityColor, ...rest }),
2867
- text && /* @__PURE__ */ jsxs(Fragment, { children: [
2868
- /* @__PURE__ */ jsx(Text$2, { className: styles$3.Text, as: "span", size: "1", weight: textWeight, color: severityColor, children: text }),
2869
- /* @__PURE__ */ jsx(Separator$1, { size, orientation, color: severityColor, ...rest })
2870
- ] })
2871
- ]
2872
- }
2873
- );
2874
- });
2875
- const Separator = memo(_Separator);
2876
3586
  const centerStyles = { placeSelf: "center" };
2877
3587
  const ErrorFallback = memo((props) => {
2878
3588
  const { absoluteCentering } = props;
@@ -2882,7 +3592,7 @@ const ErrorFallback = memo((props) => {
2882
3592
  return /* @__PURE__ */ jsxs(Flex, { gap: "2", direction: "row", width: "100%", style: outerFlexStyles, children: [
2883
3593
  /* @__PURE__ */ jsx("div", { style: { flexGrow: 1 } }),
2884
3594
  /* @__PURE__ */ jsx(FeatherIcon, { icon: "alert-triangle", size: height, style: centerStyles }),
2885
- /* @__PURE__ */ jsx(Text$1, { style: { lineHeight: height, ...centerStyles }, children: "Something went wrong" }),
3595
+ /* @__PURE__ */ jsx(Text, { style: { lineHeight: height, ...centerStyles }, children: "Something went wrong" }),
2886
3596
  /* @__PURE__ */ jsx(
2887
3597
  IconButton,
2888
3598
  {
@@ -3917,8 +4627,8 @@ const _Table = forwardRef(function Table2(props, ref) {
3917
4627
  }, [rowsPerPage, rows.length, numRowsPerPage, pagination, showPageNavigation]);
3918
4628
  return /* @__PURE__ */ jsxs(Flex$1, { className: classNames({ [styles$1.outerTableContainer]: showContainer }), direction: "column", height: "100%", children: [
3919
4629
  (!!title || !!description) && /* @__PURE__ */ jsxs("div", { className: styles$1.headerContainer, children: [
3920
- !!title && /* @__PURE__ */ jsx(Text$1, { weight: "bold", size: "5", children: title }),
3921
- !!description && /* @__PURE__ */ jsx(Text$1, { as: "div", children: description })
4630
+ !!title && /* @__PURE__ */ jsx(Text, { weight: "bold", size: "5", children: title }),
4631
+ !!description && /* @__PURE__ */ jsx(Text, { as: "div", children: description })
3922
4632
  ] }),
3923
4633
  showTopBar && /* @__PURE__ */ jsxs(Flex$1, { justify: "between", gap: "2", className: styles$1.tableTopContainer, children: [
3924
4634
  /* @__PURE__ */ jsxs(Flex$1, { gap: "2", children: [
@@ -4033,7 +4743,7 @@ const _Table = forwardRef(function Table2(props, ref) {
4033
4743
  ) }),
4034
4744
  showBottomBar && /* @__PURE__ */ jsxs(Flex$1, { className: styles$1.tableBottomContainer, wrap: "wrap", direction: isMobile ? "column" : "row", children: [
4035
4745
  showRowsPerPage && /* @__PURE__ */ jsxs(Flex$1, { className: styles$1.rowsPerPageContainer, children: [
4036
- /* @__PURE__ */ jsx(Text$1, { className: styles$1.rowsPerPageText, size: "2", children: "Rows per page:" }),
4746
+ /* @__PURE__ */ jsx(Text, { className: styles$1.rowsPerPageText, size: "2", children: "Rows per page:" }),
4037
4747
  /* @__PURE__ */ jsx(
4038
4748
  Select,
4039
4749
  {
@@ -4048,7 +4758,7 @@ const _Table = forwardRef(function Table2(props, ref) {
4048
4758
  }
4049
4759
  )
4050
4760
  ] }),
4051
- showPageNumber && /* @__PURE__ */ jsx(Flex$1, { justify: "center", children: /* @__PURE__ */ jsx(Text$1, { className: styles$1.pageText, size: "2", children: totalPages > 0 && `Page ${pagination.state.page + 1} of ${totalPages}` }) }),
4761
+ showPageNumber && /* @__PURE__ */ jsx(Flex$1, { justify: "center", children: /* @__PURE__ */ jsx(Text, { className: styles$1.pageText, size: "2", children: totalPages > 0 && `Page ${pagination.state.page + 1} of ${totalPages}` }) }),
4052
4762
  showPageNavigation && /* @__PURE__ */ jsxs(Flex$1, { className: styles$1.rowsPerPageContainer, gap: "2", justify: "end", children: [
4053
4763
  /* @__PURE__ */ jsx(
4054
4764
  IconButton,
@@ -4274,6 +4984,11 @@ export {
4274
4984
  ContextSelectMenu,
4275
4985
  DefaultTheme,
4276
4986
  Dialog,
4987
+ DialogCommandMenu,
4988
+ DialogMenu,
4989
+ DialogMultiSelectMenu,
4990
+ DialogSelectMenu,
4991
+ DownloadButtonUtility,
4277
4992
  DropdownItemMenu,
4278
4993
  DropdownMenu,
4279
4994
  DropdownMenuItemGroup,
@@ -4292,23 +5007,28 @@ export {
4292
5007
  LeftAndRightPanels,
4293
5008
  MultiPagePopover,
4294
5009
  MultiSelect,
5010
+ Overlay$2 as Overlay,
4295
5011
  OvermapErrorBoundary,
5012
+ OvermapInputItem,
5013
+ OvermapItem,
5014
+ OvermapItemGroup,
4296
5015
  Popover,
4297
5016
  Select,
4298
5017
  SelectAllCheckbox,
4299
- Separator,
5018
+ Separator$1 as Separator,
4300
5019
  Sidebar,
4301
5020
  SlideOutV2,
4302
5021
  SlideOutV3,
4303
5022
  Spinner,
4304
5023
  Switch,
4305
5024
  Table,
4306
- Text$1 as Text,
5025
+ Text,
4307
5026
  TextArea,
4308
5027
  Theme2 as Theme,
4309
5028
  Toast,
4310
5029
  ToastContext,
4311
5030
  ToastProvider,
5031
+ ToggleButton,
4312
5032
  ToggleGroup,
4313
5033
  Toolbar,
4314
5034
  Tooltip,
@@ -4320,7 +5040,9 @@ export {
4320
5040
  useDiscardAlertDialog,
4321
5041
  useKeyboardShortcut,
4322
5042
  useLayoutContext,
5043
+ useOvermapItemGroupContext,
4323
5044
  useSeverityColor,
5045
+ useSize,
4324
5046
  useStopEventPropagation,
4325
5047
  useTextFilter,
4326
5048
  useThemeContext2 as useThemeContext,