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