@overmap-ai/blocks 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -191,7 +191,7 @@
191
191
  const zeroMinWidth = "_zeroMinWidth_curjh_1";
192
192
  const zeroMinHeight = "_zeroMinHeight_curjh_5";
193
193
  const radius = "_radius_curjh_9";
194
- const styles$l = {
194
+ const styles$m = {
195
195
  zeroMinWidth,
196
196
  zeroMinHeight,
197
197
  radius
@@ -203,9 +203,9 @@
203
203
  themes.Flex,
204
204
  {
205
205
  className: classNames(className, {
206
- [styles$l.radius]: radius2,
207
- [styles$l.zeroMinWidth]: zeroMinWidth2,
208
- [styles$l.zeroMinHeight]: zeroMinHeight2
206
+ [styles$m.radius]: radius2,
207
+ [styles$m.zeroMinWidth]: zeroMinWidth2,
208
+ [styles$m.zeroMinHeight]: zeroMinHeight2
209
209
  }),
210
210
  ref,
211
211
  ...rest,
@@ -258,16 +258,16 @@
258
258
  const hoverSpin90Clockwise = "_hoverSpin90Clockwise_r73gr_15";
259
259
  const hoverSpin180Clockwise = "_hoverSpin180Clockwise_r73gr_25";
260
260
  const hoverSpin360Clockwise = "_hoverSpin360Clockwise_r73gr_35";
261
- const styles$k = {
261
+ const styles$l = {
262
262
  fluid: fluid$1,
263
263
  hoverSpin90Clockwise,
264
264
  hoverSpin180Clockwise,
265
265
  hoverSpin360Clockwise
266
266
  };
267
267
  const hoverEffectClassNameMapping = {
268
- spin90Clockwise: styles$k.hoverSpin90Clockwise,
269
- spin180Clockwise: styles$k.hoverSpin180Clockwise,
270
- spin360Clockwise: styles$k.hoverSpin360Clockwise
268
+ spin90Clockwise: styles$l.hoverSpin90Clockwise,
269
+ spin180Clockwise: styles$l.hoverSpin180Clockwise,
270
+ spin360Clockwise: styles$l.hoverSpin360Clockwise
271
271
  };
272
272
  const clickOnEnterOrSpace = (e) => {
273
273
  if (e.key === "Enter" || e.key === " ") {
@@ -288,12 +288,12 @@
288
288
  const useButtonGroupContext = () => React.useContext(ButtonGroupContext);
289
289
  const spinner = "_spinner_isifr_9";
290
290
  const spin = "_spin_isifr_9";
291
- const styles$j = {
291
+ const styles$k = {
292
292
  spinner,
293
293
  spin
294
294
  };
295
295
  const Spinner = React.memo(() => {
296
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$j.spinner });
296
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$k.spinner });
297
297
  });
298
298
  Spinner.displayName = "Spinner";
299
299
  const _Button$1 = React.forwardRef(function Button(props, ref) {
@@ -328,7 +328,7 @@
328
328
  ref,
329
329
  type,
330
330
  className: classNames(className, hoverEffectClasses, {
331
- [styles$k.fluid]: fluid2
331
+ [styles$l.fluid]: fluid2
332
332
  }),
333
333
  color,
334
334
  size: useResponsiveMapping(size, SizeMapping),
@@ -368,7 +368,7 @@
368
368
  themes.IconButton,
369
369
  {
370
370
  className: classNames(className, hoverEffectClasses, {
371
- [styles$k.fluid]: fluid2
371
+ [styles$l.fluid]: fluid2
372
372
  }),
373
373
  ref,
374
374
  color,
@@ -382,7 +382,7 @@
382
382
  });
383
383
  const IconButton = React.memo(_Button);
384
384
  const merged = "_merged_wdgxo_1";
385
- const styles$i = {
385
+ const styles$j = {
386
386
  merged
387
387
  };
388
388
  const GhostVariantSizeToGapMapping = {
@@ -408,7 +408,7 @@
408
408
  themes.Flex,
409
409
  {
410
410
  className: classNames("overmap-button-group", className, {
411
- [styles$i.merged]: merged2
411
+ [styles$j.merged]: merged2
412
412
  }),
413
413
  ref,
414
414
  gap: merged2 ? gap ?? mergedAutoGap : gap ?? "2",
@@ -421,7 +421,7 @@
421
421
  });
422
422
  const ButtonGroup = React.memo(_ButtonGroup);
423
423
  const separators = "_separators_1f7v1_1";
424
- const styles$h = {
424
+ const styles$i = {
425
425
  separators
426
426
  };
427
427
  const ButtonListBorder = React.memo(
@@ -452,7 +452,7 @@
452
452
  size,
453
453
  severity: "info",
454
454
  variant: buttonVariant,
455
- className: classNames(className, styles$h.separators),
455
+ className: classNames(className, styles$i.separators),
456
456
  merged: true,
457
457
  gap: "0",
458
458
  direction: "column",
@@ -629,7 +629,7 @@
629
629
  const DropdownMenuItemWrapper = "_DropdownMenuItemWrapper_hj4sz_8";
630
630
  const DropdownMenuSeparatorWrapper = "_DropdownMenuSeparatorWrapper_hj4sz_13";
631
631
  const DropdownMenuItem$1 = "_DropdownMenuItem_hj4sz_8";
632
- const styles$g = {
632
+ const styles$h = {
633
633
  DropdownMenu: DropdownMenu$1,
634
634
  DropdownMenuItemWrapper,
635
635
  DropdownMenuSeparatorWrapper,
@@ -679,7 +679,7 @@
679
679
  },
680
680
  [closeOnSelect, onSelect]
681
681
  );
682
- return /* @__PURE__ */ jsxRuntime.jsx(themes.DropdownMenu.Item, { className: styles$g.DropdownMenuItem, textValue: "", onSelect: handleSelect, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(themes.Flex, { align: "center", gap: "1", children: content }) });
682
+ return /* @__PURE__ */ jsxRuntime.jsx(themes.DropdownMenu.Item, { className: styles$h.DropdownMenuItem, textValue: "", onSelect: handleSelect, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(themes.Flex, { align: "center", gap: "1", children: content }) });
683
683
  });
684
684
  const DropdownMenu = React.memo(
685
685
  React.forwardRef(
@@ -708,14 +708,14 @@
708
708
  children: /* @__PURE__ */ jsxRuntime.jsxs(
709
709
  themes.Flex,
710
710
  {
711
- className: styles$g.DropdownMenu,
711
+ className: styles$h.DropdownMenu,
712
712
  direction: "column",
713
713
  height: "max-content",
714
714
  width: "max-content",
715
715
  children: [
716
716
  !!label && /* @__PURE__ */ jsxRuntime.jsx(themes.DropdownMenu.Label, { children: label }),
717
717
  items.map(({ closeOnSelect: itemCloseOnSelect, separator, ...rest2 }, index) => /* @__PURE__ */ jsxRuntime.jsxs(themes.Box, { children: [
718
- /* @__PURE__ */ jsxRuntime.jsx(themes.Box, { className: styles$g.DropdownMenuItemWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(
718
+ /* @__PURE__ */ jsxRuntime.jsx(themes.Box, { className: styles$h.DropdownMenuItemWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(
719
719
  DropdownMenuItem,
720
720
  {
721
721
  closeOnSelect: itemCloseOnSelect ?? closeOnSelect,
@@ -723,7 +723,7 @@
723
723
  },
724
724
  index
725
725
  ) }),
726
- !!separator && /* @__PURE__ */ jsxRuntime.jsx(themes.Box, { className: styles$g.DropdownMenuSeparatorWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "4" }) })
726
+ !!separator && /* @__PURE__ */ jsxRuntime.jsx(themes.Box, { className: styles$h.DropdownMenuSeparatorWrapper, children: /* @__PURE__ */ jsxRuntime.jsx(Separator, { size: "4" }) })
727
727
  ] }, index))
728
728
  ]
729
729
  }
@@ -739,7 +739,7 @@
739
739
  const DropdownSelectInputWrapper = "_DropdownSelectInputWrapper_k517z_12";
740
740
  const DropdownSelectInput = "_DropdownSelectInput_k517z_12";
741
741
  const DropdownSelectItem = "_DropdownSelectItem_k517z_27";
742
- const styles$f = {
742
+ const styles$g = {
743
743
  DropdownSelect: DropdownSelect$1,
744
744
  BorderBottom,
745
745
  DropdownSelectInputWrapper,
@@ -790,11 +790,11 @@
790
790
  );
791
791
  return /* @__PURE__ */ jsxRuntime.jsxs(themes.DropdownMenu.Root, { onOpenChange: handleOnOpenChange, children: [
792
792
  /* @__PURE__ */ jsxRuntime.jsx(themes.DropdownMenu.Trigger, { disabled, children: trigger }),
793
- /* @__PURE__ */ jsxRuntime.jsx(themes.DropdownMenu.Content, { ref, variant: "soft", color: infoColor, className: styles$f.Test, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$f.DropdownSelect, direction: "column", children: [
794
- filterValue !== void 0 && !!onFilterValueChange && /* @__PURE__ */ jsxRuntime.jsx(themes.Box, { px: "1", className: classNames({ [styles$f.BorderBottom]: items.length !== 0 }), children: /* @__PURE__ */ jsxRuntime.jsxs(
793
+ /* @__PURE__ */ jsxRuntime.jsx(themes.DropdownMenu.Content, { ref, variant: "soft", color: infoColor, className: styles$g.Test, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$g.DropdownSelect, direction: "column", children: [
794
+ filterValue !== void 0 && !!onFilterValueChange && /* @__PURE__ */ jsxRuntime.jsx(themes.Box, { px: "1", className: classNames({ [styles$g.BorderBottom]: items.length !== 0 }), children: /* @__PURE__ */ jsxRuntime.jsxs(
795
795
  themes.TextField.Root,
796
796
  {
797
- className: styles$f.DropdownSelectInputWrapper,
797
+ className: styles$g.DropdownSelectInputWrapper,
798
798
  size: "2",
799
799
  variant: "soft",
800
800
  children: [
@@ -802,7 +802,7 @@
802
802
  /* @__PURE__ */ jsxRuntime.jsx(
803
803
  themes.TextField.Input,
804
804
  {
805
- className: styles$f.DropdownSelectInput,
805
+ className: styles$g.DropdownSelectInput,
806
806
  value: filterValue,
807
807
  placeholder,
808
808
  onChange: handleOnInputValueChange
@@ -816,7 +816,7 @@
816
816
  return /* @__PURE__ */ jsxRuntime.jsx(
817
817
  themes.DropdownMenu.Item,
818
818
  {
819
- className: styles$f.DropdownSelectItem,
819
+ className: styles$g.DropdownSelectItem,
820
820
  onSelect: handleOnSelect(itemValue),
821
821
  textValue: "",
822
822
  asChild: true,
@@ -857,7 +857,7 @@
857
857
  });
858
858
  });
859
859
  const fluid = "_fluid_7n1wr_1";
860
- const styles$e = {
860
+ const styles$f = {
861
861
  fluid
862
862
  };
863
863
  const _Select = React.forwardRef(function Select2({
@@ -881,7 +881,7 @@
881
881
  themes.Select.Trigger,
882
882
  {
883
883
  className: classNames(className, {
884
- [styles$e.fluid]: fluid2
884
+ [styles$f.fluid]: fluid2
885
885
  }),
886
886
  id,
887
887
  ref,
@@ -893,7 +893,7 @@
893
893
  themes.Select.Content,
894
894
  {
895
895
  side,
896
- className: styles$e.contentDefault,
896
+ className: styles$f.contentDefault,
897
897
  position: "popper",
898
898
  variant: variant !== "surface" ? "soft" : "solid",
899
899
  color: itemSeverityColor,
@@ -1006,7 +1006,7 @@
1006
1006
  );
1007
1007
  })
1008
1008
  );
1009
- const styles$d = {
1009
+ const styles$e = {
1010
1010
  "default": "_default_u936h_1"
1011
1011
  };
1012
1012
  const _Switch = React.forwardRef(function Switch2({ className, severity = "primary", icon, defaultChecked = false, onCheckedChange, ...rest }, ref) {
@@ -1034,7 +1034,7 @@
1034
1034
  /* @__PURE__ */ jsxRuntime.jsx(
1035
1035
  themes.Switch,
1036
1036
  {
1037
- className: classNames("overmap-switch", className, styles$d.default),
1037
+ className: classNames("overmap-switch", className, styles$e.default),
1038
1038
  ref: ref ? ref : fallbackRef,
1039
1039
  color: severityColor,
1040
1040
  radius: "full",
@@ -1052,7 +1052,7 @@
1052
1052
  const resizeHandle$1 = "_resizeHandle_1onyo_10";
1053
1053
  const left$2 = "_left_1onyo_13";
1054
1054
  const overlay = "_overlay_1onyo_33";
1055
- const styles$c = {
1055
+ const styles$d = {
1056
1056
  sidebarContent,
1057
1057
  right: right$2,
1058
1058
  resizeHandle: resizeHandle$1,
@@ -1085,13 +1085,13 @@
1085
1085
  setContainer(tempContainer);
1086
1086
  }, [containerSelector]);
1087
1087
  return /* @__PURE__ */ jsxRuntime.jsx(RadixDialogPrimitive__namespace.Root, { open, modal, children: /* @__PURE__ */ jsxRuntime.jsxs(RadixDialogPrimitive__namespace.Portal, { container, children: [
1088
- overlay2 && /* @__PURE__ */ jsxRuntime.jsx(RadixDialogPrimitive__namespace.Overlay, { className: classNames(styles$c.overlay) }),
1088
+ overlay2 && /* @__PURE__ */ jsxRuntime.jsx(RadixDialogPrimitive__namespace.Overlay, { className: classNames(styles$d.overlay) }),
1089
1089
  /* @__PURE__ */ jsxRuntime.jsx(
1090
1090
  RadixDialogPrimitive__namespace.Content,
1091
1091
  {
1092
- className: classNames("overmap-sidebar", "rt-DialogContent", styles$c.sidebarContent, {
1093
- [styles$c.left]: isLeft,
1094
- [styles$c.right]: isRight
1092
+ className: classNames("overmap-sidebar", "rt-DialogContent", styles$d.sidebarContent, {
1093
+ [styles$d.left]: isLeft,
1094
+ [styles$d.right]: isRight
1095
1095
  }),
1096
1096
  ref,
1097
1097
  asChild: true,
@@ -1103,7 +1103,7 @@
1103
1103
  maxWidth,
1104
1104
  defaultSize: defaultSidebarSize,
1105
1105
  enable: { right: resizable2 && isLeft, left: resizable2 && isRight },
1106
- handleClasses: { left: styles$c.resizeHandle, right: styles$c.resizeHandle },
1106
+ handleClasses: { left: styles$d.resizeHandle, right: styles$d.resizeHandle },
1107
1107
  handleComponent: {
1108
1108
  right: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DragHandleDots2Icon, {}),
1109
1109
  left: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DragHandleDots2Icon, {})
@@ -1125,7 +1125,7 @@
1125
1125
  const exitDone = "_exitDone_1iy9c_32";
1126
1126
  const resizable$1 = "_resizable_1iy9c_41";
1127
1127
  const slideOutOverlay = "_slideOutOverlay_1iy9c_47";
1128
- const styles$b = {
1128
+ const styles$c = {
1129
1129
  outerContent,
1130
1130
  enter,
1131
1131
  right: right$1,
@@ -1169,23 +1169,23 @@
1169
1169
  {
1170
1170
  in: open,
1171
1171
  classNames: {
1172
- enter: styles$b.enter,
1173
- enterActive: styles$b.enterActive,
1174
- exitActive: styles$b.exitActive,
1175
- exitDone: styles$b.exitDone
1172
+ enter: styles$c.enter,
1173
+ enterActive: styles$c.enterActive,
1174
+ exitActive: styles$c.exitActive,
1175
+ exitDone: styles$c.exitDone
1176
1176
  },
1177
1177
  timeout: TRANSITION_DURATION$1,
1178
1178
  nodeRef: contentRef,
1179
1179
  unmountOnExit: true,
1180
1180
  mountOnEnter: true,
1181
1181
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1182
- overlay2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames("overamp-slide-out-overlay", styles$b.slideOutOverlay) }),
1182
+ overlay2 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames("overamp-slide-out-overlay", styles$c.slideOutOverlay) }),
1183
1183
  /* @__PURE__ */ jsxRuntime.jsx(reactDismissableLayer.DismissableLayer, { disableOutsidePointerEvents: modal, asChild: true, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
1184
1184
  themes.Flex,
1185
1185
  {
1186
- className: classNames("overmap-slide-out", className, styles$b.outerContent, {
1187
- [styles$b.left]: isSideLeft,
1188
- [styles$b.right]: isSideRight
1186
+ className: classNames("overmap-slide-out", className, styles$c.outerContent, {
1187
+ [styles$c.left]: isSideLeft,
1188
+ [styles$c.right]: isSideRight
1189
1189
  }),
1190
1190
  style: { "--slide-out-width": `${slideOutWidth}px` },
1191
1191
  height: "100%",
@@ -1199,7 +1199,7 @@
1199
1199
  children: /* @__PURE__ */ jsxRuntime.jsx(
1200
1200
  reResizable.Resizable,
1201
1201
  {
1202
- className: styles$b.resizable,
1202
+ className: styles$c.resizable,
1203
1203
  defaultSize: { width: slideOutWidth, height: "100%" },
1204
1204
  onResize: handleResize,
1205
1205
  enable: { right: resizable2 && isSideLeft, left: resizable2 && isSideRight },
@@ -1221,7 +1221,7 @@
1221
1221
  const noRightIcon = "_noRightIcon_1octa_18";
1222
1222
  const ghost$1 = "_ghost_1octa_22";
1223
1223
  const charCount$1 = "_charCount_1octa_40";
1224
- const styles$a = {
1224
+ const styles$b = {
1225
1225
  accommodateCharCount,
1226
1226
  wrapper: wrapper$2,
1227
1227
  "default": "_default_1octa_10",
@@ -1248,9 +1248,9 @@
1248
1248
  return /* @__PURE__ */ jsxRuntime.jsxs(
1249
1249
  themes.TextField.Root,
1250
1250
  {
1251
- className: classNames(styles$a.wrapper, className, {
1252
- [styles$a.ghost]: variant === "ghost",
1253
- [styles$a.accommodateCharCount]: displayInputLength
1251
+ className: classNames(styles$b.wrapper, className, {
1252
+ [styles$b.ghost]: variant === "ghost",
1253
+ [styles$b.accommodateCharCount]: displayInputLength
1254
1254
  }),
1255
1255
  size: computedSize,
1256
1256
  variant: variant !== "ghost" ? variant : void 0,
@@ -1260,9 +1260,9 @@
1260
1260
  /* @__PURE__ */ jsxRuntime.jsx(
1261
1261
  themes.TextField.Input,
1262
1262
  {
1263
- className: classNames(styles$a.default, {
1264
- [styles$a.noLeftIcon]: !leftSlot,
1265
- [styles$a.noRightIcon]: !rightSlot
1263
+ className: classNames(styles$b.default, {
1264
+ [styles$b.noLeftIcon]: !leftSlot,
1265
+ [styles$b.noRightIcon]: !rightSlot
1266
1266
  }),
1267
1267
  ref,
1268
1268
  value,
@@ -1273,7 +1273,7 @@
1273
1273
  }
1274
1274
  ),
1275
1275
  rightSlot && /* @__PURE__ */ jsxRuntime.jsx(themes.TextField.Slot, { children: rightSlot }),
1276
- displayInputLength && /* @__PURE__ */ jsxRuntime.jsx(themes.Text, { as: "p", className: styles$a.charCount, size: "1", color: "gray", children: rest.maxLength !== void 0 ? `${valueAsString == null ? void 0 : valueAsString.length}/${rest.maxLength}` : `${valueAsString == null ? void 0 : valueAsString.length}` })
1276
+ displayInputLength && /* @__PURE__ */ jsxRuntime.jsx(themes.Text, { as: "p", className: styles$b.charCount, size: "1", color: "gray", children: rest.maxLength !== void 0 ? `${valueAsString == null ? void 0 : valueAsString.length}/${rest.maxLength}` : `${valueAsString == null ? void 0 : valueAsString.length}` })
1277
1277
  ]
1278
1278
  }
1279
1279
  );
@@ -1297,7 +1297,7 @@
1297
1297
  return React.cloneElement(children, { ...childProps });
1298
1298
  });
1299
1299
  const wrapper$1 = "_wrapper_tmtz0_1";
1300
- const styles$9 = {
1300
+ const styles$a = {
1301
1301
  wrapper: wrapper$1
1302
1302
  };
1303
1303
  const _Popover = React.forwardRef(function Popover2({ className, trigger, open, onOpenChange, defaultOpen = false, modal = false, children, ...rest }, ref) {
@@ -1307,7 +1307,7 @@
1307
1307
  themes.Popover.Content,
1308
1308
  {
1309
1309
  ref,
1310
- className: classNames("overmap-popover", className, styles$9.wrapper),
1310
+ className: classNames("overmap-popover", className, styles$a.wrapper),
1311
1311
  ...rest,
1312
1312
  children: children(themes.Popover.Close)
1313
1313
  }
@@ -1322,7 +1322,7 @@
1322
1322
  const resizable = "_resizable_1ssf2_23";
1323
1323
  const resizeHandle = "_resizeHandle_1ssf2_28";
1324
1324
  const panelMainContent = "_panelMainContent_1ssf2_48";
1325
- const styles$8 = {
1325
+ const styles$9 = {
1326
1326
  wrapper,
1327
1327
  panelContent,
1328
1328
  left,
@@ -1508,7 +1508,7 @@
1508
1508
  return /* @__PURE__ */ jsxRuntime.jsxs(
1509
1509
  themes.Flex,
1510
1510
  {
1511
- className: styles$8.wrapper,
1511
+ className: styles$9.wrapper,
1512
1512
  style: { minWidth: `${leftMinWidth + rightMinWidth}px` },
1513
1513
  ref: wrapperRef,
1514
1514
  width: "100%",
@@ -1530,7 +1530,7 @@
1530
1530
  themes.Box,
1531
1531
  {
1532
1532
  ref: leftPanelRef,
1533
- className: classNames(styles$8.panelContent, styles$8.left),
1533
+ className: classNames(styles$9.panelContent, styles$9.left),
1534
1534
  style: leftPanelTransitionStyles[state],
1535
1535
  width: "auto",
1536
1536
  height: "100%",
@@ -1539,7 +1539,7 @@
1539
1539
  children: /* @__PURE__ */ jsxRuntime.jsx(
1540
1540
  reResizable.Resizable,
1541
1541
  {
1542
- className: styles$8.resizable,
1542
+ className: styles$9.resizable,
1543
1543
  size: {
1544
1544
  width: leftPanelWidth,
1545
1545
  height: "100%"
@@ -1548,7 +1548,7 @@
1548
1548
  enable: { right: (resizeable == null ? void 0 : resizeable.left) !== void 0 ? resizeable.left : true },
1549
1549
  minWidth: leftMinWidth,
1550
1550
  maxWidth: leftPanelMaxWidth,
1551
- handleClasses: { right: classNames(styles$8.resizeHandle, styles$8.left) },
1551
+ handleClasses: { right: classNames(styles$9.resizeHandle, styles$9.left) },
1552
1552
  handleComponent: {
1553
1553
  right: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DragHandleDots2Icon, { height: "14px", width: "14px" })
1554
1554
  },
@@ -1559,7 +1559,7 @@
1559
1559
  )
1560
1560
  }
1561
1561
  ),
1562
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$8.panelMainContent, children }),
1562
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$9.panelMainContent, children }),
1563
1563
  /* @__PURE__ */ jsxRuntime.jsx(
1564
1564
  reactTransitionGroup.Transition,
1565
1565
  {
@@ -1573,7 +1573,7 @@
1573
1573
  themes.Box,
1574
1574
  {
1575
1575
  ref: rightPanelRef,
1576
- className: classNames(styles$8.panelContent, styles$8.right),
1576
+ className: classNames(styles$9.panelContent, styles$9.right),
1577
1577
  style: rightPanelTransitionStyles[state],
1578
1578
  width: "auto",
1579
1579
  height: "100%",
@@ -1582,13 +1582,13 @@
1582
1582
  children: /* @__PURE__ */ jsxRuntime.jsx(
1583
1583
  reResizable.Resizable,
1584
1584
  {
1585
- className: styles$8.resizable,
1585
+ className: styles$9.resizable,
1586
1586
  size: { width: rightPanelWidth, height: "100%" },
1587
1587
  onResizeStop: handleResizeRightPanel,
1588
1588
  enable: { left: (resizeable == null ? void 0 : resizeable.right) !== void 0 ? resizeable.right : true },
1589
1589
  minWidth: rightMinWidth,
1590
1590
  maxWidth: rightPanelMaxWidth,
1591
- handleClasses: { left: classNames(styles$8.resizeHandle, styles$8.right) },
1591
+ handleClasses: { left: classNames(styles$9.resizeHandle, styles$9.right) },
1592
1592
  handleComponent: { left: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DragHandleDots2Icon, { height: "14px", width: "14px" }) },
1593
1593
  children: rightPanel
1594
1594
  }
@@ -1606,7 +1606,7 @@
1606
1606
  const buttonContainer = "_buttonContainer_spfw7_17";
1607
1607
  const optionsButtonContainer = "_optionsButtonContainer_spfw7_22";
1608
1608
  const optionsButton = "_optionsButton_spfw7_22";
1609
- const styles$7 = {
1609
+ const styles$8 = {
1610
1610
  multiPagePopover,
1611
1611
  pageTitle,
1612
1612
  buttonContainer,
@@ -1620,7 +1620,7 @@
1620
1620
  const optionButtons = popoverOption.options.map((option, i) => /* @__PURE__ */ jsxRuntime.jsx(
1621
1621
  Button2,
1622
1622
  {
1623
- className: classNames(styles$7.optionsButton, option.buttonClassName),
1623
+ className: classNames(styles$8.optionsButton, option.buttonClassName),
1624
1624
  variant: "ghost",
1625
1625
  radius: "large",
1626
1626
  style: {
@@ -1636,12 +1636,12 @@
1636
1636
  `${option.value}-page-${page}-button-${i}`
1637
1637
  ));
1638
1638
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1639
- popoverOption.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$7.pageTitle, children: popoverOption.title }),
1639
+ popoverOption.title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$8.pageTitle, children: popoverOption.title }),
1640
1640
  popoverOption.content,
1641
1641
  /* @__PURE__ */ jsxRuntime.jsx(
1642
1642
  "div",
1643
1643
  {
1644
- className: classNames(styles$7.optionsButtonContainer, popoverOption.buttonsContainerClassName),
1644
+ className: classNames(styles$8.optionsButtonContainer, popoverOption.buttonsContainerClassName),
1645
1645
  style: {
1646
1646
  flexDirection: direction === "vertical" ? "column" : "row"
1647
1647
  },
@@ -1659,7 +1659,7 @@
1659
1659
  return /* @__PURE__ */ jsxRuntime.jsx(
1660
1660
  Popover,
1661
1661
  {
1662
- className: classNames(styles$7.multiPagePopover, className),
1662
+ className: classNames(styles$8.multiPagePopover, className),
1663
1663
  ref,
1664
1664
  onOpenAutoFocus: resetPopoverContent,
1665
1665
  onCloseAutoFocus: resetPopoverContent,
@@ -1671,7 +1671,7 @@
1671
1671
  const MultiPagePopover = React.memo(_MultiPagePopover);
1672
1672
  const charCount = "_charCount_1lz28_1";
1673
1673
  const ghost = "_ghost_1lz28_5";
1674
- const styles$6 = {
1674
+ const styles$7 = {
1675
1675
  charCount,
1676
1676
  ghost
1677
1677
  };
@@ -1707,7 +1707,7 @@
1707
1707
  themes.TextArea,
1708
1708
  {
1709
1709
  className: classNames("overmap-textarea", className, {
1710
- [styles$6.ghost]: variant === "ghost"
1710
+ [styles$7.ghost]: variant === "ghost"
1711
1711
  }),
1712
1712
  style: { resize },
1713
1713
  variant: variant !== "ghost" ? variant : void 0,
@@ -1717,7 +1717,7 @@
1717
1717
  ...rest
1718
1718
  }
1719
1719
  ),
1720
- displayInputLength && /* @__PURE__ */ jsxRuntime.jsx(themes.Text, { as: "p", className: styles$6.charCount, color: infoColor, align: "right", children: displayInputLengthValue })
1720
+ displayInputLength && /* @__PURE__ */ jsxRuntime.jsx(themes.Text, { as: "p", className: styles$7.charCount, color: infoColor, align: "right", children: displayInputLengthValue })
1721
1721
  ] });
1722
1722
  });
1723
1723
  const TextArea = React.memo(_TextArea);
@@ -1763,7 +1763,7 @@
1763
1763
  );
1764
1764
  });
1765
1765
  const ToggleGroup = React.memo(_ToggleGroup);
1766
- const styles$5 = {
1766
+ const styles$6 = {
1767
1767
  "default": "_default_xqvoc_1"
1768
1768
  };
1769
1769
  const Root = React.memo(
@@ -1771,7 +1771,7 @@
1771
1771
  return /* @__PURE__ */ jsxRuntime.jsx(
1772
1772
  reactToolbar.Root,
1773
1773
  {
1774
- className: classNames(className, "overmap-toolbar", styles$5.default),
1774
+ className: classNames(className, "overmap-toolbar", styles$6.default),
1775
1775
  ref,
1776
1776
  asChild: true,
1777
1777
  ...rest,
@@ -1812,7 +1812,7 @@
1812
1812
  const ToastRoot = "_ToastRoot_1i6bp_24";
1813
1813
  const slideIn = "_slideIn_1i6bp_1";
1814
1814
  const swipeOut = "_swipeOut_1i6bp_1";
1815
- const styles$4 = {
1815
+ const styles$5 = {
1816
1816
  ToastViewport,
1817
1817
  actionButton,
1818
1818
  ToastRoot,
@@ -1830,7 +1830,7 @@
1830
1830
  },
1831
1831
  [onClose]
1832
1832
  );
1833
- return /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Root, { asChild: true, ref, ...rest, open, type: sensitivity, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsx(themes.Callout.Root, { className: styles$4.ToastRoot, variant: "surface", color, size, children: /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { width: "100%", align: "center", gap: "4", justify: "between", children: [
1833
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Root, { asChild: true, ref, ...rest, open, type: sensitivity, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsx(themes.Callout.Root, { className: styles$5.ToastRoot, variant: "surface", color, size, children: /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { width: "100%", align: "center", gap: "4", justify: "between", children: [
1834
1834
  /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { align: "center", gap: "3", children: [
1835
1835
  /* @__PURE__ */ jsxRuntime.jsx(themes.Callout.Icon, { children: icon }),
1836
1836
  /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { direction: "column", gap: "2", children: [
@@ -1838,7 +1838,7 @@
1838
1838
  /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(themes.Callout.Text, { size: "3", weight: "medium", children: title }) }),
1839
1839
  /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(themes.Callout.Text, { children: description }) })
1840
1840
  ] }),
1841
- action && /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Action, { className: styles$4.actionButton, altText: action.altText, asChild: true, children: action.content })
1841
+ action && /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Action, { className: styles$5.actionButton, altText: action.altText, asChild: true, children: action.content })
1842
1842
  ] })
1843
1843
  ] }),
1844
1844
  /* @__PURE__ */ jsxRuntime.jsx(RadixToast__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, { "aria-label": "Close", variant: "ghost", severity, children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.Cross2Icon, {}) }) })
@@ -1914,11 +1914,11 @@
1914
1914
  }, []);
1915
1915
  return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Provider, { value: toastContextValue, children: /* @__PURE__ */ jsxRuntime.jsxs(RadixToast.ToastProvider, { ...rest, children: [
1916
1916
  children,
1917
- /* @__PURE__ */ jsxRuntime.jsx(RadixToast.ToastViewport, { className: classNames(className, styles$4.ToastViewport), hotkey }),
1917
+ /* @__PURE__ */ jsxRuntime.jsx(RadixToast.ToastViewport, { className: classNames(className, styles$5.ToastViewport), hotkey }),
1918
1918
  toasts.map(({ id, onClose, ...toastProps }) => /* @__PURE__ */ jsxRuntime.jsx(Toast, { ...toastProps, onClose: () => handleCloseToast(id, 0, onClose) }, id))
1919
1919
  ] }) });
1920
1920
  });
1921
- const styles$3 = {
1921
+ const styles$4 = {
1922
1922
  "default": "_default_1odpt_1"
1923
1923
  };
1924
1924
  const Tooltip = React.memo(
@@ -1926,7 +1926,7 @@
1926
1926
  return /* @__PURE__ */ jsxRuntime.jsx(
1927
1927
  themes.Tooltip,
1928
1928
  {
1929
- className: classNames("overmap-tooltip", className, styles$3.default),
1929
+ className: classNames("overmap-tooltip", className, styles$4.default),
1930
1930
  ref,
1931
1931
  content: /* @__PURE__ */ jsxRuntime.jsx(themes.Flex, { align: "center", gap: "1", width: "max-content", height: "max-content", justify: "center", children: content }),
1932
1932
  ...rest,
@@ -1936,7 +1936,7 @@
1936
1936
  })
1937
1937
  );
1938
1938
  const noWrap = "_noWrap_1wpa5_1";
1939
- const styles$2 = {
1939
+ const styles$3 = {
1940
1940
  noWrap
1941
1941
  };
1942
1942
  const Text = React.memo(
@@ -1947,7 +1947,7 @@
1947
1947
  {
1948
1948
  ref,
1949
1949
  as,
1950
- className: classNames(className, { [styles$2.noWrap]: noWrap2 }),
1950
+ className: classNames(className, { [styles$3.noWrap]: noWrap2 }),
1951
1951
  color,
1952
1952
  ...props
1953
1953
  }
@@ -2565,7 +2565,7 @@
2565
2565
  const checkboxLabel = "_checkboxLabel_pb9za_38";
2566
2566
  const noTextHighlight = "_noTextHighlight_pb9za_42";
2567
2567
  const checkboxHidden = "_checkboxHidden_pb9za_51";
2568
- const styles$1 = {
2568
+ const styles$2 = {
2569
2569
  checkboxContainer,
2570
2570
  checkbox,
2571
2571
  checkboxIndicator,
@@ -2574,13 +2574,13 @@
2574
2574
  checkboxHidden
2575
2575
  };
2576
2576
  const _Checkbox = React.forwardRef(function Checkbox2({ className, labelClassName, label, checked, onCheckedChange, ...rest }, ref) {
2577
- return /* @__PURE__ */ jsxRuntime.jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles$1.checkboxContainer, ...props, children: [
2577
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles$2.checkboxContainer, ...props, children: [
2578
2578
  /* @__PURE__ */ jsxRuntime.jsx(
2579
2579
  $e698a72e93240346$export$be92b6f5f03c0fe9,
2580
2580
  {
2581
2581
  className: classNames(
2582
- styles$1.checkbox,
2583
- !isHovered && !checked && styles$1.checkboxHidden,
2582
+ styles$2.checkbox,
2583
+ !isHovered && !checked && styles$2.checkboxHidden,
2584
2584
  className
2585
2585
  ),
2586
2586
  checked,
@@ -2591,13 +2591,13 @@
2591
2591
  },
2592
2592
  ref,
2593
2593
  ...rest,
2594
- children: /* @__PURE__ */ jsxRuntime.jsx($e698a72e93240346$export$adb584737d712b70, { className: styles$1.checkboxIndicator, children: checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DividerHorizontalIcon, { width: "13px" }) : /* @__PURE__ */ jsxRuntime.jsx(reactIcons.CheckIcon, {}) })
2594
+ children: /* @__PURE__ */ jsxRuntime.jsx($e698a72e93240346$export$adb584737d712b70, { className: styles$2.checkboxIndicator, children: checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(reactIcons.DividerHorizontalIcon, { width: "13px" }) : /* @__PURE__ */ jsxRuntime.jsx(reactIcons.CheckIcon, {}) })
2595
2595
  }
2596
2596
  ),
2597
2597
  label && /* @__PURE__ */ jsxRuntime.jsx(
2598
2598
  "div",
2599
2599
  {
2600
- className: classNames(styles$1.checkboxLabel, labelClassName, styles$1.noTextHighlight),
2600
+ className: classNames(styles$2.checkboxLabel, labelClassName, styles$2.noTextHighlight),
2601
2601
  onClick: () => {
2602
2602
  if (onCheckedChange) {
2603
2603
  onCheckedChange(!checked);
@@ -2687,7 +2687,7 @@
2687
2687
  const tableBottomContainer = "_tableBottomContainer_go3yk_84";
2688
2688
  const rowsPerPageContainer = "_rowsPerPageContainer_go3yk_88";
2689
2689
  const rowsPerPageText = "_rowsPerPageText_go3yk_98";
2690
- const styles = {
2690
+ const styles$1 = {
2691
2691
  tableContainer,
2692
2692
  headerContainer,
2693
2693
  tableTopContainer,
@@ -2949,7 +2949,7 @@
2949
2949
  return /* @__PURE__ */ jsxRuntime.jsx(
2950
2950
  Component,
2951
2951
  {
2952
- className: classNames(styles.tableHeaderCell, columnClassName, column.className),
2952
+ className: classNames(styles$1.tableHeaderCell, columnClassName, column.className),
2953
2953
  sortKey: column.sort ? column.id.toString().toUpperCase() : "",
2954
2954
  children: column.label
2955
2955
  },
@@ -2989,14 +2989,14 @@
2989
2989
  }
2990
2990
  }
2991
2991
  }, [rowsPerPage, rows.length, numRowsPerPage, pagination$1, showPageNavigation]);
2992
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames({ [styles.tableContainer]: showContainer }), children: [
2993
- (!!title || !!description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerContainer, children: [
2992
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames({ [styles$1.tableContainer]: showContainer }), children: [
2993
+ (!!title || !!description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.headerContainer, children: [
2994
2994
  !!title && /* @__PURE__ */ jsxRuntime.jsx(Text, { weight: "bold", size: "7", children: title }),
2995
2995
  !!description && /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "div", children: description })
2996
2996
  ] }),
2997
- showTopBar && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { justify: "between", className: styles.tableTopContainer, children: [
2997
+ showTopBar && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { justify: "between", className: styles$1.tableTopContainer, children: [
2998
2998
  /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { gap: "2", children: [
2999
- showSearchBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.searchContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
2999
+ showSearchBar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$1.searchContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
3000
3000
  Input,
3001
3001
  {
3002
3002
  value: search,
@@ -3045,7 +3045,7 @@
3045
3045
  /* @__PURE__ */ jsxRuntime.jsx(
3046
3046
  table$1.Table,
3047
3047
  {
3048
- className: classNames(styles.table, className),
3048
+ className: classNames(styles$1.table, className),
3049
3049
  data: tableData,
3050
3050
  theme: theme$1,
3051
3051
  sort: sort$1,
@@ -3055,16 +3055,16 @@
3055
3055
  ref,
3056
3056
  children: (tableList) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3057
3057
  /* @__PURE__ */ jsxRuntime.jsx(table$1.Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(table$1.HeaderRow, { children: [
3058
- showSelect && /* @__PURE__ */ jsxRuntime.jsx(select.HeaderCellSelect, { className: styles.tableHeaderCell }),
3058
+ showSelect && /* @__PURE__ */ jsxRuntime.jsx(select.HeaderCellSelect, { className: styles$1.tableHeaderCell }),
3059
3059
  ...columnCells
3060
3060
  ] }) }),
3061
3061
  /* @__PURE__ */ jsxRuntime.jsxs(table$1.Body, { children: [
3062
- tableList.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(themes.TableRow, { className: styles.noDataTextContainer, children: /* @__PURE__ */ jsxRuntime.jsx(table$1.Cell, { children: emptyMessage }) }),
3062
+ tableList.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(themes.TableRow, { className: styles$1.noDataTextContainer, children: /* @__PURE__ */ jsxRuntime.jsx(table$1.Cell, { children: emptyMessage }) }),
3063
3063
  tableList.map((row) => /* @__PURE__ */ jsxRuntime.jsxs(
3064
3064
  table$1.Row,
3065
3065
  {
3066
3066
  item: row,
3067
- className: classNames(styles.tableRow, rowClassName, row.className),
3067
+ className: classNames(styles$1.tableRow, rowClassName, row.className),
3068
3068
  onClick: row.onClick,
3069
3069
  children: [
3070
3070
  showSelect && /* @__PURE__ */ jsxRuntime.jsx(select.CellSelect, { item: row }, row.id),
@@ -3072,7 +3072,7 @@
3072
3072
  table$1.Cell,
3073
3073
  {
3074
3074
  className: classNames(
3075
- styles.tableCell,
3075
+ styles$1.tableCell,
3076
3076
  cellClassName,
3077
3077
  row[column.id].className
3078
3078
  ),
@@ -3088,9 +3088,9 @@
3088
3088
  ] })
3089
3089
  }
3090
3090
  ),
3091
- showBottomBar && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles.tableBottomContainer, wrap: "wrap", direction: reactDeviceDetect.isMobile ? "column" : "row", children: [
3092
- showRowsPerPage && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles.rowsPerPageContainer, children: [
3093
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.rowsPerPageText, children: "Rows per page:" }),
3091
+ showBottomBar && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles$1.tableBottomContainer, wrap: "wrap", direction: reactDeviceDetect.isMobile ? "column" : "row", children: [
3092
+ showRowsPerPage && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles$1.rowsPerPageContainer, children: [
3093
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$1.rowsPerPageText, children: "Rows per page:" }),
3094
3094
  /* @__PURE__ */ jsxRuntime.jsx(
3095
3095
  Select,
3096
3096
  {
@@ -3106,7 +3106,7 @@
3106
3106
  )
3107
3107
  ] }),
3108
3108
  showPageNumber && /* @__PURE__ */ jsxRuntime.jsx(themes.Flex, { justify: "center", children: totalPages > 0 && `Page ${pagination$1.state.page + 1} of ${totalPages}` }),
3109
- showPageNavigation && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles.rowsPerPageContainer, gap: "2", justify: "end", children: [
3109
+ showPageNavigation && /* @__PURE__ */ jsxRuntime.jsxs(themes.Flex, { className: styles$1.rowsPerPageContainer, gap: "2", justify: "end", children: [
3110
3110
  /* @__PURE__ */ jsxRuntime.jsx(
3111
3111
  IconButton,
3112
3112
  {
@@ -3152,6 +3152,155 @@
3152
3152
  ] });
3153
3153
  });
3154
3154
  const Table = React.memo(_Table);
3155
+ const editableTextContainer = "_editableTextContainer_174g6_1";
3156
+ const editableTextText = "_editableTextText_174g6_5";
3157
+ const editableTextInput = "_editableTextInput_174g6_19";
3158
+ const iconHidden = "_iconHidden_174g6_23";
3159
+ const styles = {
3160
+ editableTextContainer,
3161
+ editableTextText,
3162
+ editableTextInput,
3163
+ iconHidden
3164
+ };
3165
+ const _ConfirmEditInput = React.forwardRef(function ConfirmEditInput2({
3166
+ value,
3167
+ onChange,
3168
+ onEditActivate,
3169
+ onEditConfirm,
3170
+ onEditCancel,
3171
+ textClassName,
3172
+ inputClassName,
3173
+ iconClassName,
3174
+ buttonVariant,
3175
+ variant,
3176
+ severity,
3177
+ size,
3178
+ mode = "buttons",
3179
+ ...rest
3180
+ }, ref) {
3181
+ const [text, setText] = React.useState(value == null ? void 0 : value.toString());
3182
+ const [input, setInput] = React.useState(value == null ? void 0 : value.toString());
3183
+ const [isEditMode, setIsEditMode] = React.useState(false);
3184
+ const isConfirmDisabled = !input || text === input;
3185
+ const onInputChange = React.useCallback(
3186
+ (e) => {
3187
+ var _a;
3188
+ setInput((_a = e.target.value) == null ? void 0 : _a.toString());
3189
+ if (onChange) {
3190
+ onChange(e);
3191
+ }
3192
+ },
3193
+ [onChange]
3194
+ );
3195
+ const onPencilClick = React.useCallback(() => {
3196
+ setIsEditMode(true);
3197
+ if (onEditActivate) {
3198
+ onEditActivate(text);
3199
+ }
3200
+ }, [onEditActivate, text]);
3201
+ const onCheckClick = React.useCallback(() => {
3202
+ setText(input);
3203
+ setIsEditMode(false);
3204
+ if (onEditConfirm) {
3205
+ onEditConfirm(input);
3206
+ }
3207
+ }, [onEditConfirm, input]);
3208
+ const onCancelClick = React.useCallback(() => {
3209
+ setIsEditMode(false);
3210
+ const prevInput = input;
3211
+ setInput(text);
3212
+ if (onEditCancel) {
3213
+ onEditCancel(prevInput);
3214
+ }
3215
+ }, [text, input, onEditCancel]);
3216
+ const handleKeyDown = React.useCallback(
3217
+ (e) => {
3218
+ if (mode !== "keys") {
3219
+ return;
3220
+ }
3221
+ switch (e.key) {
3222
+ case "Enter":
3223
+ if (!isConfirmDisabled)
3224
+ onCheckClick();
3225
+ break;
3226
+ case "Escape":
3227
+ onCancelClick();
3228
+ break;
3229
+ }
3230
+ },
3231
+ [onCheckClick, onCancelClick, isConfirmDisabled, mode]
3232
+ );
3233
+ return /* @__PURE__ */ jsxRuntime.jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles.editableTextContainer, gap: "3", ...props, children: [
3234
+ /* @__PURE__ */ jsxRuntime.jsx(
3235
+ Input,
3236
+ {
3237
+ className: classNames(
3238
+ isEditMode ? styles.editableTextInput : styles.editableTextText,
3239
+ isEditMode ? inputClassName : textClassName
3240
+ ),
3241
+ onClick: () => !isEditMode && mode === "keys" && onPencilClick(),
3242
+ value: isEditMode ? input : text,
3243
+ onChange: onInputChange,
3244
+ ref,
3245
+ onKeyDown: handleKeyDown,
3246
+ autoFocus: true,
3247
+ size,
3248
+ variant,
3249
+ severity,
3250
+ readOnly: !isEditMode,
3251
+ style: isEditMode ? void 0 : {
3252
+ cursor: mode === "keys" ? "text" : "unset"
3253
+ },
3254
+ ...rest
3255
+ }
3256
+ ),
3257
+ mode === "buttons" && (isEditMode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3258
+ /* @__PURE__ */ jsxRuntime.jsx(
3259
+ IconButton,
3260
+ {
3261
+ className: classNames(iconClassName, styles.icon, !isHovered && styles.iconHidden),
3262
+ size,
3263
+ variant: buttonVariant,
3264
+ severity,
3265
+ disabled: isConfirmDisabled,
3266
+ onClick: onCheckClick,
3267
+ "aria-label": "Confirm edit",
3268
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.CheckIcon, {})
3269
+ }
3270
+ ),
3271
+ /* @__PURE__ */ jsxRuntime.jsx(
3272
+ IconButton,
3273
+ {
3274
+ className: classNames(iconClassName, styles.icon, !isHovered && styles.iconHidden),
3275
+ color: "red",
3276
+ size,
3277
+ variant: buttonVariant,
3278
+ severity,
3279
+ onClick: onCancelClick,
3280
+ "aria-label": "Cancel edit",
3281
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.Cross1Icon, {})
3282
+ }
3283
+ )
3284
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
3285
+ IconButton,
3286
+ {
3287
+ className: classNames(
3288
+ iconClassName,
3289
+ styles.editIcon,
3290
+ styles.icon,
3291
+ !isHovered && styles.iconHidden
3292
+ ),
3293
+ size,
3294
+ variant: buttonVariant,
3295
+ severity,
3296
+ onClick: onPencilClick,
3297
+ "aria-label": "Edit text",
3298
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactIcons.Pencil1Icon, {})
3299
+ }
3300
+ ))
3301
+ ] }) });
3302
+ });
3303
+ const ConfirmEditInput = React.memo(_ConfirmEditInput);
3155
3304
  Object.defineProperty(exports2, "AccessibleIcon", {
3156
3305
  enumerable: true,
3157
3306
  get: () => themes.AccessibleIcon
@@ -3285,6 +3434,7 @@
3285
3434
  exports2.ButtonGroup = ButtonGroup;
3286
3435
  exports2.ButtonList = ButtonList;
3287
3436
  exports2.Checkbox = Checkbox;
3437
+ exports2.ConfirmEditInput = ConfirmEditInput;
3288
3438
  exports2.DefaultTheme = DefaultTheme;
3289
3439
  exports2.Dialog = Dialog;
3290
3440
  exports2.DropdownMenu = DropdownMenu;