@overmap-ai/blocks 1.0.5 → 1.0.6-do-not-support-commonjs.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.
- package/dist/BaseMenuGroups/BaseItemGroup/BaseItemGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseItemGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseItemGroup/typings.d.ts +11 -0
- package/dist/BaseMenuGroups/BaseMenuComponents.d.ts +11 -0
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/BaseMultiSelectGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseMultiSelectGroup/typings.d.ts +16 -0
- package/dist/BaseMenuGroups/BaseSelectGroup/BaseSelectGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseSelectGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseSelectGroup/typings.d.ts +16 -0
- package/dist/BaseMenuGroups/BaseSubMenuGroup/BaseSubMenuGroup.d.ts +3 -0
- package/dist/BaseMenuGroups/BaseSubMenuGroup/index.d.ts +2 -0
- package/dist/BaseMenuGroups/BaseSubMenuGroup/typings.d.ts +14 -0
- package/dist/BaseMenuGroups/index.d.ts +5 -0
- package/dist/BaseMenuGroups/typings.d.ts +37 -0
- package/dist/BaseMenuGroups/utils.d.ts +5 -0
- package/dist/ConfirmEditInput/ConfirmEditInput.d.ts +3 -0
- package/dist/ConfirmEditInput/index.d.ts +2 -0
- package/dist/ConfirmEditInput/typings.d.ts +14 -0
- package/dist/Dialogs/Dialog/index.d.ts +1 -0
- package/dist/Dialogs/Dialog/utils.d.ts +7 -0
- package/dist/DropdownItemMenu/DropdownItemMenu.d.ts +9 -0
- package/dist/DropdownItemMenu/index.d.ts +2 -0
- package/dist/DropdownMenu/DropdownMenu.d.ts +5 -17
- package/dist/DropdownMenu/DropdownMenuGroups.d.ts +18 -0
- package/dist/DropdownMenu/index.d.ts +2 -0
- package/dist/DropdownMultiSelect/DropdownMultiSelect.d.ts +6 -0
- package/dist/DropdownMultiSelect/index.d.ts +2 -0
- package/dist/DropdownSelect/DropdownSelect.d.ts +5 -57
- package/dist/DropdownSelect/index.d.ts +1 -1
- package/dist/Separator/typings.d.ts +2 -1
- package/dist/blocks.js +711 -290
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +709 -291
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/style.css +67 -43
- package/dist/utils.d.ts +12 -1
- package/package.json +14 -6
package/dist/blocks.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export * from "@radix-ui/colors";
|
|
2
|
-
import { Cross1Icon, CheckIcon, DragHandleDots2Icon, Cross2Icon, DividerHorizontalIcon, CaretSortIcon, ArrowUpIcon, ArrowDownIcon,
|
|
2
|
+
import { Cross1Icon, MagnifyingGlassIcon, CheckIcon, DragHandleDots2Icon, Cross2Icon, DividerHorizontalIcon, CaretSortIcon, ArrowUpIcon, ArrowDownIcon, MixerHorizontalIcon, Pencil1Icon, TrashIcon, DoubleArrowLeftIcon, ChevronLeftIcon, ChevronRightIcon, DoubleArrowRightIcon } from "@radix-ui/react-icons";
|
|
3
3
|
export * from "@radix-ui/react-icons";
|
|
4
|
-
import { useThemeContext, Badge as Badge$1, Flex as Flex$1, Box, Link, Text as Text$
|
|
5
|
-
import { AccessibleIcon, AspectRatio, Avatar, Blockquote, Box as Box2, Callout as Callout2, Card as Card2, Code, Container,
|
|
4
|
+
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, DropdownMenu as DropdownMenu$1, Kbd, 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";
|
|
5
|
+
import { AccessibleIcon, AspectRatio, Avatar, Blockquote, Box as Box2, Callout as Callout2, Card as Card2, Code, Container, Em, Grid, Heading, HoverCard, Inset as Inset2, Kbd as Kbd2, Link as Link2, Portal as Portal2, Quote, RadioGroup, ScrollArea, Section, Slider, Slot, Strong, Tabs, TextField as TextField2, Theme as Theme2, VisuallyHidden, updateThemeAppearanceClass, useThemeContext as useThemeContext2 } from "@radix-ui/themes";
|
|
6
6
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
7
7
|
import React, { useMemo, useState, useLayoutEffect, useCallback, useEffect, Children, isValidElement, forwardRef, memo, createContext, useContext, cloneElement, createElement, useRef, useReducer, Fragment as Fragment$1 } from "react";
|
|
8
8
|
import { useMediaQuery } from "react-responsive";
|
|
9
|
+
import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
9
10
|
import * as RadixDialogPrimitive from "@radix-ui/react-dialog";
|
|
10
11
|
import { Resizable } from "re-resizable";
|
|
11
12
|
import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
|
|
@@ -15,7 +16,7 @@ import { Root as Root$2 } from "@radix-ui/react-toolbar";
|
|
|
15
16
|
import * as RadixToast from "@radix-ui/react-toast";
|
|
16
17
|
import { ToastProvider as ToastProvider$1, ToastViewport as ToastViewport$1 } from "@radix-ui/react-toast";
|
|
17
18
|
import { flushSync } from "react-dom";
|
|
18
|
-
import { HeaderCell, Table as Table$1, Header, HeaderRow, Body, Cell, Row } from "@table-library/react-table-library/table";
|
|
19
|
+
import { HeaderCell, Table as Table$1, Header, HeaderRow, Body, Cell, Row } from "@table-library/react-table-library/table/index.js";
|
|
19
20
|
import { useTheme } from "@table-library/react-table-library/theme";
|
|
20
21
|
import { useSort, HeaderCellSort } from "@table-library/react-table-library/sort";
|
|
21
22
|
import { useRowSelect, SelectTypes, SelectClickTypes, HeaderCellSelect, CellSelect } from "@table-library/react-table-library/select";
|
|
@@ -175,6 +176,19 @@ const childrenToArray = (children) => {
|
|
|
175
176
|
}
|
|
176
177
|
return tempChildrenToArray;
|
|
177
178
|
};
|
|
179
|
+
const useStopEventPropagation = () => {
|
|
180
|
+
return useCallback((event) => {
|
|
181
|
+
event.stopPropagation();
|
|
182
|
+
}, []);
|
|
183
|
+
};
|
|
184
|
+
function useTextFilter(values, filterFunction) {
|
|
185
|
+
const [filteredOptions, setFilteredOptions] = useState([]);
|
|
186
|
+
const [filterValue, setFilterValue] = useState("");
|
|
187
|
+
useEffect(() => {
|
|
188
|
+
setFilteredOptions(values.filter((value) => filterFunction(value, filterValue)));
|
|
189
|
+
}, [filterFunction, filterValue, values]);
|
|
190
|
+
return [filteredOptions, filterValue, setFilterValue];
|
|
191
|
+
}
|
|
178
192
|
const _Badge = forwardRef(function Badge2({ className, severity = "primary", color, children, ...rest }, ref) {
|
|
179
193
|
const severityColor = useSeverityColor(severity);
|
|
180
194
|
return /* @__PURE__ */ jsx(
|
|
@@ -192,7 +206,7 @@ const Badge = memo(_Badge);
|
|
|
192
206
|
const zeroMinWidth = "_zeroMinWidth_curjh_1";
|
|
193
207
|
const zeroMinHeight = "_zeroMinHeight_curjh_5";
|
|
194
208
|
const radius = "_radius_curjh_9";
|
|
195
|
-
const styles$
|
|
209
|
+
const styles$m = {
|
|
196
210
|
zeroMinWidth,
|
|
197
211
|
zeroMinHeight,
|
|
198
212
|
radius
|
|
@@ -204,9 +218,9 @@ const Flex = memo(
|
|
|
204
218
|
Flex$1,
|
|
205
219
|
{
|
|
206
220
|
className: classNames(className, {
|
|
207
|
-
[styles$
|
|
208
|
-
[styles$
|
|
209
|
-
[styles$
|
|
221
|
+
[styles$m.radius]: radius2,
|
|
222
|
+
[styles$m.zeroMinWidth]: zeroMinWidth2,
|
|
223
|
+
[styles$m.zeroMinHeight]: zeroMinHeight2
|
|
210
224
|
}),
|
|
211
225
|
ref,
|
|
212
226
|
...rest,
|
|
@@ -243,7 +257,7 @@ const Group = memo(
|
|
|
243
257
|
children: childrenAsArray.map((child, index) => {
|
|
244
258
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
245
259
|
cloneElement(child, { key: index }),
|
|
246
|
-
childrenAsArray.length - 1 !== index && /* @__PURE__ */ jsx(Text$
|
|
260
|
+
childrenAsArray.length - 1 !== index && /* @__PURE__ */ jsx(Text$2, { color: severityColor, children: /* @__PURE__ */ jsx(Flex, { height: "100%", width: "100%", align: "center", children: separator }) })
|
|
247
261
|
] });
|
|
248
262
|
})
|
|
249
263
|
}
|
|
@@ -259,16 +273,16 @@ const fluid$1 = "_fluid_r73gr_1";
|
|
|
259
273
|
const hoverSpin90Clockwise = "_hoverSpin90Clockwise_r73gr_15";
|
|
260
274
|
const hoverSpin180Clockwise = "_hoverSpin180Clockwise_r73gr_25";
|
|
261
275
|
const hoverSpin360Clockwise = "_hoverSpin360Clockwise_r73gr_35";
|
|
262
|
-
const styles$
|
|
276
|
+
const styles$l = {
|
|
263
277
|
fluid: fluid$1,
|
|
264
278
|
hoverSpin90Clockwise,
|
|
265
279
|
hoverSpin180Clockwise,
|
|
266
280
|
hoverSpin360Clockwise
|
|
267
281
|
};
|
|
268
282
|
const hoverEffectClassNameMapping = {
|
|
269
|
-
spin90Clockwise: styles$
|
|
270
|
-
spin180Clockwise: styles$
|
|
271
|
-
spin360Clockwise: styles$
|
|
283
|
+
spin90Clockwise: styles$l.hoverSpin90Clockwise,
|
|
284
|
+
spin180Clockwise: styles$l.hoverSpin180Clockwise,
|
|
285
|
+
spin360Clockwise: styles$l.hoverSpin360Clockwise
|
|
272
286
|
};
|
|
273
287
|
const clickOnEnterOrSpace = (e) => {
|
|
274
288
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -289,12 +303,12 @@ const ButtonGroupContext = createContext({});
|
|
|
289
303
|
const useButtonGroupContext = () => useContext(ButtonGroupContext);
|
|
290
304
|
const spinner = "_spinner_isifr_9";
|
|
291
305
|
const spin = "_spin_isifr_9";
|
|
292
|
-
const styles$
|
|
306
|
+
const styles$k = {
|
|
293
307
|
spinner,
|
|
294
308
|
spin
|
|
295
309
|
};
|
|
296
310
|
const Spinner = memo(() => {
|
|
297
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
311
|
+
return /* @__PURE__ */ jsx("div", { className: styles$k.spinner });
|
|
298
312
|
});
|
|
299
313
|
Spinner.displayName = "Spinner";
|
|
300
314
|
const _Button$1 = forwardRef(function Button$1(props, ref) {
|
|
@@ -329,7 +343,7 @@ const _Button$1 = forwardRef(function Button$1(props, ref) {
|
|
|
329
343
|
ref,
|
|
330
344
|
type,
|
|
331
345
|
className: classNames(className, hoverEffectClasses, {
|
|
332
|
-
[styles$
|
|
346
|
+
[styles$l.fluid]: fluid2
|
|
333
347
|
}),
|
|
334
348
|
color,
|
|
335
349
|
size: useResponsiveMapping(size, SizeMapping),
|
|
@@ -369,7 +383,7 @@ const _Button = forwardRef(function Button3(props, ref) {
|
|
|
369
383
|
IconButton$1,
|
|
370
384
|
{
|
|
371
385
|
className: classNames(className, hoverEffectClasses, {
|
|
372
|
-
[styles$
|
|
386
|
+
[styles$l.fluid]: fluid2
|
|
373
387
|
}),
|
|
374
388
|
ref,
|
|
375
389
|
color,
|
|
@@ -383,7 +397,7 @@ const _Button = forwardRef(function Button3(props, ref) {
|
|
|
383
397
|
});
|
|
384
398
|
const IconButton = React.memo(_Button);
|
|
385
399
|
const merged = "_merged_wdgxo_1";
|
|
386
|
-
const styles$
|
|
400
|
+
const styles$j = {
|
|
387
401
|
merged
|
|
388
402
|
};
|
|
389
403
|
const GhostVariantSizeToGapMapping = {
|
|
@@ -409,7 +423,7 @@ const _ButtonGroup = forwardRef(function ButtonGroup2({
|
|
|
409
423
|
Flex$1,
|
|
410
424
|
{
|
|
411
425
|
className: classNames("overmap-button-group", className, {
|
|
412
|
-
[styles$
|
|
426
|
+
[styles$j.merged]: merged2
|
|
413
427
|
}),
|
|
414
428
|
ref,
|
|
415
429
|
gap: merged2 ? gap ?? mergedAutoGap : gap ?? "2",
|
|
@@ -422,7 +436,7 @@ const _ButtonGroup = forwardRef(function ButtonGroup2({
|
|
|
422
436
|
});
|
|
423
437
|
const ButtonGroup = memo(_ButtonGroup);
|
|
424
438
|
const separators = "_separators_1f7v1_1";
|
|
425
|
-
const styles$
|
|
439
|
+
const styles$i = {
|
|
426
440
|
separators
|
|
427
441
|
};
|
|
428
442
|
const ButtonListBorder = memo(
|
|
@@ -453,7 +467,7 @@ const ButtonListRoot = memo(
|
|
|
453
467
|
size,
|
|
454
468
|
severity: "info",
|
|
455
469
|
variant: buttonVariant,
|
|
456
|
-
className: classNames(className, styles$
|
|
470
|
+
className: classNames(className, styles$i.separators),
|
|
457
471
|
merged: true,
|
|
458
472
|
gap: "0",
|
|
459
473
|
direction: "column",
|
|
@@ -561,6 +575,15 @@ const Dialog = memo(
|
|
|
561
575
|
] });
|
|
562
576
|
})
|
|
563
577
|
);
|
|
578
|
+
const useWrapCallbackInDialogClose = (callback, closeOptions) => {
|
|
579
|
+
return useCallback(
|
|
580
|
+
(...arg) => (closeDialog) => {
|
|
581
|
+
callback(...arg);
|
|
582
|
+
closeDialog(closeOptions);
|
|
583
|
+
},
|
|
584
|
+
[callback, closeOptions]
|
|
585
|
+
);
|
|
586
|
+
};
|
|
564
587
|
const Title = (props) => /* @__PURE__ */ jsx(AlertDialog$1.Title, { mb: "0", ...props });
|
|
565
588
|
const AlertDialogContent$1 = (props) => {
|
|
566
589
|
const { title, description, actionText = "Confirm", cancelText = "Cancel", onAction, onCancel, severity } = props;
|
|
@@ -626,128 +649,341 @@ const useDiscardAlertDialog = () => {
|
|
|
626
649
|
[openAlertDialog]
|
|
627
650
|
);
|
|
628
651
|
};
|
|
629
|
-
const DropdownMenu
|
|
630
|
-
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
652
|
+
const DropdownMenu = memo(
|
|
653
|
+
forwardRef(({ trigger, disabled, children, ...rest }) => {
|
|
654
|
+
const infoColor = useSeverityColor("info");
|
|
655
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.Root, { children: [
|
|
656
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Trigger, { disabled, children: trigger }),
|
|
657
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Content, { variant: "soft", color: infoColor, ...rest, children })
|
|
658
|
+
] });
|
|
659
|
+
})
|
|
660
|
+
);
|
|
661
|
+
const BaseMenuItem$1 = "_BaseMenuItem_1s610_1";
|
|
662
|
+
const RemoveOutline = "_RemoveOutline_1s610_15";
|
|
663
|
+
const BaseMenuSeparator$1 = "_BaseMenuSeparator_1s610_19";
|
|
664
|
+
const BaseMenuInput$1 = "_BaseMenuInput_1s610_27";
|
|
665
|
+
const styles$h = {
|
|
666
|
+
BaseMenuItem: BaseMenuItem$1,
|
|
667
|
+
RemoveOutline,
|
|
668
|
+
BaseMenuSeparator: BaseMenuSeparator$1,
|
|
669
|
+
BaseMenuInput: BaseMenuInput$1
|
|
638
670
|
};
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
671
|
+
const BaseMenuItem = memo(
|
|
672
|
+
forwardRef(({ children, rightSlot }, ref) => {
|
|
673
|
+
return /* @__PURE__ */ jsx(Box, { className: styles$h.BaseMenuItem, ref, position: "relative", px: "2", height: "6", children: /* @__PURE__ */ jsxs(Flex, { gap: "6", height: "100%", align: "center", children: [
|
|
674
|
+
/* @__PURE__ */ jsx(Flex, { grow: "1", height: "100%", align: "center", gap: "1", children }),
|
|
675
|
+
/* @__PURE__ */ jsx(Flex, { height: "100%", width: "4", align: "center", justify: "end", children: rightSlot })
|
|
676
|
+
] }) });
|
|
677
|
+
})
|
|
678
|
+
);
|
|
679
|
+
const BaseMenuInput = memo(
|
|
680
|
+
forwardRef((props) => {
|
|
681
|
+
return /* @__PURE__ */ jsx(Box, { className: styles$h.BaseMenuInput, px: "2", height: "6", width: "max-content", children: /* @__PURE__ */ jsx(Input, { ...props, variant: "ghost" }) });
|
|
682
|
+
})
|
|
683
|
+
);
|
|
684
|
+
const BaseMenuSeparator = memo(function BaseMenuSeparator2() {
|
|
685
|
+
return /* @__PURE__ */ jsx(Box, { className: styles$h.BaseMenuSeparator, width: "100%", py: "1", children: /* @__PURE__ */ jsx(Box, { height: "0", width: "100%" }) });
|
|
686
|
+
});
|
|
687
|
+
const useCloseOnSelectHandler = (closeOnSelect) => {
|
|
688
|
+
return useCallback(
|
|
689
|
+
(onSelect) => (event) => {
|
|
690
|
+
if (!closeOnSelect) {
|
|
691
|
+
event.preventDefault();
|
|
692
|
+
}
|
|
693
|
+
if (onSelect)
|
|
694
|
+
onSelect(event);
|
|
695
|
+
},
|
|
696
|
+
[closeOnSelect]
|
|
697
|
+
);
|
|
644
698
|
};
|
|
645
|
-
const
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
width: orientation === "horizontal" ? computedSizing : "max-content",
|
|
653
|
-
height: orientation === "vertical" ? computedSizing : "max-content",
|
|
654
|
-
direction: orientation === "vertical" ? "column" : "row",
|
|
655
|
-
align: "center",
|
|
656
|
-
gap,
|
|
657
|
-
children: [
|
|
658
|
-
/* @__PURE__ */ jsx(Separator$1, { size, orientation, color: severityColor, ...rest }),
|
|
659
|
-
text && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
660
|
-
/* @__PURE__ */ jsx(Text$1, { as: "span", size: "1", weight, color: severityColor, children: text }),
|
|
661
|
-
/* @__PURE__ */ jsx(Separator$1, { size, orientation, color: severityColor, ...rest })
|
|
662
|
-
] })
|
|
663
|
-
]
|
|
664
|
-
}
|
|
699
|
+
const useTextFilterChangeHandler = () => {
|
|
700
|
+
return useCallback(
|
|
701
|
+
(onTextFilterChange) => (event) => {
|
|
702
|
+
if (onTextFilterChange)
|
|
703
|
+
onTextFilterChange(event.target.value);
|
|
704
|
+
},
|
|
705
|
+
[]
|
|
665
706
|
);
|
|
666
|
-
}
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
707
|
+
};
|
|
708
|
+
const BaseItemGroup = memo(function BaseItemGroup2({
|
|
709
|
+
items,
|
|
710
|
+
closeOnSelect = true,
|
|
711
|
+
groupElement: GroupElement,
|
|
712
|
+
itemElement: ItemElement,
|
|
713
|
+
filterValue,
|
|
714
|
+
onFilterValueChange,
|
|
715
|
+
placeholder,
|
|
716
|
+
icons,
|
|
717
|
+
separator,
|
|
672
718
|
...rest
|
|
673
719
|
}) {
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
if (
|
|
679
|
-
|
|
720
|
+
const closeOnSelectHandler = useCloseOnSelectHandler(closeOnSelect);
|
|
721
|
+
const textFilterChangeHandler = useTextFilterChangeHandler();
|
|
722
|
+
useEffect(() => {
|
|
723
|
+
return () => {
|
|
724
|
+
if (onFilterValueChange) {
|
|
725
|
+
onFilterValueChange("");
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
}, []);
|
|
729
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
730
|
+
/* @__PURE__ */ jsx(GroupElement, { ...rest, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
731
|
+
filterValue !== void 0 && !!onFilterValueChange && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
732
|
+
/* @__PURE__ */ jsx(
|
|
733
|
+
BaseMenuInput,
|
|
734
|
+
{
|
|
735
|
+
value: filterValue,
|
|
736
|
+
onChange: textFilterChangeHandler(onFilterValueChange),
|
|
737
|
+
placeholder,
|
|
738
|
+
leftSlot: icons == null ? void 0 : icons.left,
|
|
739
|
+
rightSlot: icons == null ? void 0 : icons.right
|
|
740
|
+
}
|
|
741
|
+
),
|
|
742
|
+
items.length !== 0 && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
743
|
+
] }),
|
|
744
|
+
items.map(({ content, shortcut, className, onSelect, ...rest2 }, index) => /* @__PURE__ */ jsx(
|
|
745
|
+
ItemElement,
|
|
746
|
+
{
|
|
747
|
+
className: classNames(className, styles$h.RemoveOutline),
|
|
748
|
+
onSelect: closeOnSelectHandler(onSelect),
|
|
749
|
+
...rest2,
|
|
750
|
+
children: /* @__PURE__ */ jsx(BaseMenuItem, { rightSlot: shortcut == null ? void 0 : shortcut.map((key, index2) => /* @__PURE__ */ jsx(Kbd, { children: key }, index2)), children: content })
|
|
751
|
+
},
|
|
752
|
+
index
|
|
753
|
+
))
|
|
754
|
+
] }) }),
|
|
755
|
+
separator && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
756
|
+
] });
|
|
757
|
+
});
|
|
758
|
+
const BaseSelectGroup = memo(function BaseSelectGroup2({
|
|
759
|
+
items,
|
|
760
|
+
value,
|
|
761
|
+
closeOnSelect = false,
|
|
762
|
+
onValueChange,
|
|
763
|
+
groupElement: GroupElement,
|
|
764
|
+
selectedIndicator,
|
|
765
|
+
itemElement: ItemElement,
|
|
766
|
+
itemIndicatorElement: ItemIndicatorElement,
|
|
767
|
+
filterValue,
|
|
768
|
+
onFilterValueChange,
|
|
769
|
+
placeholder,
|
|
770
|
+
icons,
|
|
771
|
+
separator
|
|
772
|
+
}) {
|
|
773
|
+
const textFilterChangeHandler = useTextFilterChangeHandler();
|
|
774
|
+
const closeOnSelectHandler = useCloseOnSelectHandler(closeOnSelect);
|
|
775
|
+
useEffect(() => {
|
|
776
|
+
return () => {
|
|
777
|
+
if (onFilterValueChange) {
|
|
778
|
+
onFilterValueChange("");
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
}, []);
|
|
782
|
+
const handleCheckedChange = useCallback(
|
|
783
|
+
(value2) => (checked) => {
|
|
784
|
+
onValueChange(checked ? value2 : null);
|
|
680
785
|
},
|
|
681
|
-
[
|
|
786
|
+
[onValueChange]
|
|
682
787
|
);
|
|
683
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
789
|
+
/* @__PURE__ */ jsx(GroupElement, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
790
|
+
filterValue !== void 0 && !!onFilterValueChange && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
791
|
+
/* @__PURE__ */ jsx(
|
|
792
|
+
BaseMenuInput,
|
|
793
|
+
{
|
|
794
|
+
value: filterValue,
|
|
795
|
+
onChange: textFilterChangeHandler(onFilterValueChange),
|
|
796
|
+
placeholder,
|
|
797
|
+
leftSlot: icons == null ? void 0 : icons.left,
|
|
798
|
+
rightSlot: (icons == null ? void 0 : icons.right) || /* @__PURE__ */ jsx(MagnifyingGlassIcon, {})
|
|
799
|
+
}
|
|
800
|
+
),
|
|
801
|
+
items.length !== 0 && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
802
|
+
] }),
|
|
803
|
+
items.map(({ content, value: itemValue, onSelect, ...rest }, index) => /* @__PURE__ */ jsx(
|
|
804
|
+
ItemElement,
|
|
805
|
+
{
|
|
806
|
+
className: styles$h.RemoveOutline,
|
|
807
|
+
checked: itemValue === value,
|
|
808
|
+
onCheckedChange: handleCheckedChange(itemValue),
|
|
809
|
+
onSelect: closeOnSelectHandler(onSelect),
|
|
810
|
+
textValue: "",
|
|
811
|
+
...rest,
|
|
812
|
+
children: /* @__PURE__ */ jsx(
|
|
813
|
+
BaseMenuItem,
|
|
814
|
+
{
|
|
815
|
+
rightSlot: /* @__PURE__ */ jsx(ItemIndicatorElement, { asChild: true, children: selectedIndicator || /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
816
|
+
children: content
|
|
817
|
+
}
|
|
818
|
+
)
|
|
819
|
+
},
|
|
820
|
+
index
|
|
821
|
+
))
|
|
822
|
+
] }) }),
|
|
823
|
+
separator && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
824
|
+
] });
|
|
684
825
|
});
|
|
685
|
-
const
|
|
826
|
+
const BaseMultiSelectGroup = memo(function BaseMultiSelectGroup2({
|
|
827
|
+
items,
|
|
828
|
+
values,
|
|
829
|
+
onValueChange,
|
|
830
|
+
closeOnSelect = false,
|
|
831
|
+
groupElement: GroupElement,
|
|
832
|
+
selectedIndicator,
|
|
833
|
+
itemElement: ItemElement,
|
|
834
|
+
itemIndicatorElement: ItemIndicatorElement,
|
|
835
|
+
filterValue,
|
|
836
|
+
onFilterValueChange,
|
|
837
|
+
placeholder,
|
|
838
|
+
icons,
|
|
839
|
+
separator = false
|
|
840
|
+
}) {
|
|
841
|
+
const closeOnSelectHandler = useCloseOnSelectHandler(closeOnSelect);
|
|
842
|
+
const textFilterChangeHandler = useTextFilterChangeHandler();
|
|
843
|
+
useEffect(() => {
|
|
844
|
+
return () => {
|
|
845
|
+
if (onFilterValueChange) {
|
|
846
|
+
onFilterValueChange("");
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
}, []);
|
|
850
|
+
const handleCheckedChange = useCallback(
|
|
851
|
+
(value) => (checked) => {
|
|
852
|
+
if (checked) {
|
|
853
|
+
onValueChange([...values, value]);
|
|
854
|
+
} else {
|
|
855
|
+
const valueIndex = values.indexOf(value);
|
|
856
|
+
if (valueIndex < 0) {
|
|
857
|
+
throw new Error("unexpected value not found within values array");
|
|
858
|
+
}
|
|
859
|
+
const tempValues = [...values];
|
|
860
|
+
tempValues.splice(valueIndex, 1);
|
|
861
|
+
onValueChange(tempValues);
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
[onValueChange, values]
|
|
865
|
+
);
|
|
866
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
867
|
+
/* @__PURE__ */ jsx(GroupElement, { children: /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
|
|
868
|
+
filterValue !== void 0 && !!onFilterValueChange && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
869
|
+
/* @__PURE__ */ jsx(
|
|
870
|
+
BaseMenuInput,
|
|
871
|
+
{
|
|
872
|
+
value: filterValue,
|
|
873
|
+
onChange: textFilterChangeHandler(onFilterValueChange),
|
|
874
|
+
placeholder,
|
|
875
|
+
leftSlot: icons == null ? void 0 : icons.left,
|
|
876
|
+
rightSlot: icons == null ? void 0 : icons.right
|
|
877
|
+
}
|
|
878
|
+
),
|
|
879
|
+
items.length !== 0 && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
880
|
+
] }),
|
|
881
|
+
items.map(({ value, content, className, onSelect, ...rest }, index) => /* @__PURE__ */ jsx(
|
|
882
|
+
ItemElement,
|
|
883
|
+
{
|
|
884
|
+
className: classNames(className, styles$h.RemoveOutline),
|
|
885
|
+
onSelect: closeOnSelectHandler(onSelect),
|
|
886
|
+
onCheckedChange: handleCheckedChange(value),
|
|
887
|
+
checked: values.includes(value),
|
|
888
|
+
textValue: "",
|
|
889
|
+
...rest,
|
|
890
|
+
children: /* @__PURE__ */ jsx(
|
|
891
|
+
BaseMenuItem,
|
|
892
|
+
{
|
|
893
|
+
rightSlot: /* @__PURE__ */ jsx(ItemIndicatorElement, { asChild: true, children: selectedIndicator || /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
894
|
+
children: content
|
|
895
|
+
}
|
|
896
|
+
)
|
|
897
|
+
},
|
|
898
|
+
index
|
|
899
|
+
))
|
|
900
|
+
] }) }),
|
|
901
|
+
separator && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
902
|
+
] });
|
|
903
|
+
});
|
|
904
|
+
const BaseSubMenuGroup = memo(function BaseSubMenuGroup2({
|
|
905
|
+
subTriggerElement: SubTriggerElement,
|
|
906
|
+
groupElement: GroupElement,
|
|
907
|
+
subContentElement: SubContentElement,
|
|
908
|
+
subElement: SubElement,
|
|
909
|
+
items,
|
|
910
|
+
separator = false,
|
|
911
|
+
...rest
|
|
912
|
+
}) {
|
|
913
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
914
|
+
/* @__PURE__ */ jsx(GroupElement, { ...rest, children: items.map(({ triggerIndicator, content, subContent, className, ...rest2 }, index) => /* @__PURE__ */ jsxs(SubElement, { children: [
|
|
915
|
+
/* @__PURE__ */ jsx(SubTriggerElement, { className: classNames(className, styles$h.RemoveOutline), ...rest2, children: /* @__PURE__ */ jsx(BaseMenuItem, { rightSlot: triggerIndicator, children: content }) }),
|
|
916
|
+
/* @__PURE__ */ jsx(SubContentElement, { sideOffset: 10, children: subContent })
|
|
917
|
+
] }, index)) }),
|
|
918
|
+
separator && /* @__PURE__ */ jsx(BaseMenuSeparator, {})
|
|
919
|
+
] });
|
|
920
|
+
});
|
|
921
|
+
const DropdownMenuItemGroup = memo(function DropdownMenuItemGroup2(props) {
|
|
922
|
+
return /* @__PURE__ */ jsx(BaseItemGroup, { ...props, itemElement: RadixDropdownMenu.Item, groupElement: RadixDropdownMenu.Group });
|
|
923
|
+
});
|
|
924
|
+
const DropdownMenuSelectGroup = memo(function DropdownMenuSelectGroup2(props) {
|
|
925
|
+
return /* @__PURE__ */ jsx(
|
|
926
|
+
BaseSelectGroup,
|
|
927
|
+
{
|
|
928
|
+
...props,
|
|
929
|
+
itemElement: RadixDropdownMenu.CheckboxItem,
|
|
930
|
+
groupElement: RadixDropdownMenu.Group,
|
|
931
|
+
itemIndicatorElement: RadixDropdownMenu.ItemIndicator
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
});
|
|
935
|
+
const DropdownMenuMultiSelectGroup = memo(function DropdownMenuMultiSelectGroup2(props) {
|
|
936
|
+
return /* @__PURE__ */ jsx(
|
|
937
|
+
BaseMultiSelectGroup,
|
|
938
|
+
{
|
|
939
|
+
...props,
|
|
940
|
+
itemElement: RadixDropdownMenu.CheckboxItem,
|
|
941
|
+
groupElement: RadixDropdownMenu.Group,
|
|
942
|
+
itemIndicatorElement: RadixDropdownMenu.ItemIndicator
|
|
943
|
+
}
|
|
944
|
+
);
|
|
945
|
+
});
|
|
946
|
+
const DropdownMenuSubMenuGroup = memo(function DropdownMenuSubMenuGroup2(props) {
|
|
947
|
+
return /* @__PURE__ */ jsx(
|
|
948
|
+
BaseSubMenuGroup,
|
|
949
|
+
{
|
|
950
|
+
...props,
|
|
951
|
+
groupElement: RadixDropdownMenu.Group,
|
|
952
|
+
subElement: DropdownMenu$1.Sub,
|
|
953
|
+
subTriggerElement: RadixDropdownMenu.SubTrigger,
|
|
954
|
+
subContentElement: DropdownMenu$1.SubContent
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
});
|
|
958
|
+
const DropdownItemMenu = memo(
|
|
686
959
|
forwardRef(
|
|
687
960
|
({
|
|
688
|
-
className,
|
|
689
961
|
trigger,
|
|
690
962
|
items,
|
|
691
|
-
label,
|
|
692
963
|
disabled,
|
|
693
|
-
severity = "info",
|
|
694
|
-
modal = false,
|
|
695
964
|
closeOnSelect = true,
|
|
965
|
+
filterValue,
|
|
966
|
+
onFilterValueChange,
|
|
967
|
+
placeholder,
|
|
696
968
|
...rest
|
|
697
|
-
}
|
|
698
|
-
const
|
|
699
|
-
return /* @__PURE__ */ jsxs(DropdownMenu$
|
|
700
|
-
/* @__PURE__ */ jsx(DropdownMenu$
|
|
701
|
-
/* @__PURE__ */ jsx(
|
|
702
|
-
|
|
969
|
+
}) => {
|
|
970
|
+
const infoColor = useSeverityColor("info");
|
|
971
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.Root, { children: [
|
|
972
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Trigger, { disabled, children: trigger }),
|
|
973
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Content, { variant: "soft", ...rest, color: infoColor, children: /* @__PURE__ */ jsx(
|
|
974
|
+
DropdownMenuItemGroup,
|
|
703
975
|
{
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
children: /* @__PURE__ */ jsxs(
|
|
710
|
-
Flex$1,
|
|
711
|
-
{
|
|
712
|
-
className: styles$g.DropdownMenu,
|
|
713
|
-
direction: "column",
|
|
714
|
-
height: "max-content",
|
|
715
|
-
width: "max-content",
|
|
716
|
-
children: [
|
|
717
|
-
!!label && /* @__PURE__ */ jsx(DropdownMenu$2.Label, { children: label }),
|
|
718
|
-
items.map(({ closeOnSelect: itemCloseOnSelect, separator, ...rest2 }, index) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
719
|
-
/* @__PURE__ */ jsx(Box, { className: styles$g.DropdownMenuItemWrapper, children: /* @__PURE__ */ jsx(
|
|
720
|
-
DropdownMenuItem,
|
|
721
|
-
{
|
|
722
|
-
closeOnSelect: itemCloseOnSelect ?? closeOnSelect,
|
|
723
|
-
...rest2
|
|
724
|
-
},
|
|
725
|
-
index
|
|
726
|
-
) }),
|
|
727
|
-
!!separator && /* @__PURE__ */ jsx(Box, { className: styles$g.DropdownMenuSeparatorWrapper, children: /* @__PURE__ */ jsx(Separator, { size: "4" }) })
|
|
728
|
-
] }, index))
|
|
729
|
-
]
|
|
730
|
-
}
|
|
731
|
-
)
|
|
976
|
+
items,
|
|
977
|
+
filterValue,
|
|
978
|
+
onFilterValueChange,
|
|
979
|
+
placeholder,
|
|
980
|
+
closeOnSelect
|
|
732
981
|
}
|
|
733
|
-
)
|
|
982
|
+
) })
|
|
734
983
|
] });
|
|
735
984
|
}
|
|
736
985
|
)
|
|
737
986
|
);
|
|
738
|
-
const DropdownSelect$1 = "_DropdownSelect_k517z_1";
|
|
739
|
-
const BorderBottom = "_BorderBottom_k517z_8";
|
|
740
|
-
const DropdownSelectInputWrapper = "_DropdownSelectInputWrapper_k517z_12";
|
|
741
|
-
const DropdownSelectInput = "_DropdownSelectInput_k517z_12";
|
|
742
|
-
const DropdownSelectItem = "_DropdownSelectItem_k517z_27";
|
|
743
|
-
const styles$f = {
|
|
744
|
-
DropdownSelect: DropdownSelect$1,
|
|
745
|
-
BorderBottom,
|
|
746
|
-
DropdownSelectInputWrapper,
|
|
747
|
-
DropdownSelectInput,
|
|
748
|
-
DropdownSelectItem
|
|
749
|
-
};
|
|
750
|
-
const TIMEOUT = 150;
|
|
751
987
|
const DropdownSelect = memo(
|
|
752
988
|
forwardRef(
|
|
753
989
|
({
|
|
@@ -761,84 +997,59 @@ const DropdownSelect = memo(
|
|
|
761
997
|
onFilterValueChange,
|
|
762
998
|
closeOnSelect = true,
|
|
763
999
|
icons,
|
|
764
|
-
|
|
1000
|
+
side
|
|
765
1001
|
}, ref) => {
|
|
766
|
-
const infoColor = useSeverityColor(
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
[onFilterValueChange]
|
|
781
|
-
);
|
|
782
|
-
const handleOnOpenChange = useCallback(
|
|
783
|
-
(open) => {
|
|
784
|
-
if (!open && onFilterValueChange) {
|
|
785
|
-
setTimeout(() => {
|
|
786
|
-
onFilterValueChange("");
|
|
787
|
-
}, TIMEOUT);
|
|
1002
|
+
const infoColor = useSeverityColor("info");
|
|
1003
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.Root, { children: [
|
|
1004
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Trigger, { disabled, children: trigger }),
|
|
1005
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Content, { ref, variant: "soft", color: infoColor, side, children: /* @__PURE__ */ jsx(
|
|
1006
|
+
DropdownMenuSelectGroup,
|
|
1007
|
+
{
|
|
1008
|
+
value,
|
|
1009
|
+
onValueChange,
|
|
1010
|
+
items,
|
|
1011
|
+
closeOnSelect,
|
|
1012
|
+
filterValue,
|
|
1013
|
+
onFilterValueChange,
|
|
1014
|
+
placeholder,
|
|
1015
|
+
icons
|
|
788
1016
|
}
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
/* @__PURE__ */ jsx(Box, { grow: "1", children: content }),
|
|
826
|
-
/* @__PURE__ */ jsx(
|
|
827
|
-
Flex,
|
|
828
|
-
{
|
|
829
|
-
justify: "center",
|
|
830
|
-
align: "center",
|
|
831
|
-
height: "max-content",
|
|
832
|
-
width: "4",
|
|
833
|
-
children: value === itemValue && (icons && (icons == null ? void 0 : icons.selectedItemIcon) ? icons.selectedItemIcon : /* @__PURE__ */ jsx(CheckIcon, {}))
|
|
834
|
-
}
|
|
835
|
-
)
|
|
836
|
-
] })
|
|
837
|
-
},
|
|
838
|
-
index
|
|
839
|
-
);
|
|
840
|
-
}) }) })
|
|
841
|
-
] }) })
|
|
1017
|
+
) })
|
|
1018
|
+
] });
|
|
1019
|
+
}
|
|
1020
|
+
)
|
|
1021
|
+
);
|
|
1022
|
+
const DropdownMultiSelect = memo(
|
|
1023
|
+
forwardRef(
|
|
1024
|
+
({
|
|
1025
|
+
trigger,
|
|
1026
|
+
items,
|
|
1027
|
+
disabled = false,
|
|
1028
|
+
values,
|
|
1029
|
+
onValueChange,
|
|
1030
|
+
placeholder,
|
|
1031
|
+
filterValue,
|
|
1032
|
+
onFilterValueChange,
|
|
1033
|
+
closeOnSelect = false,
|
|
1034
|
+
icons,
|
|
1035
|
+
side
|
|
1036
|
+
}, ref) => {
|
|
1037
|
+
const infoColor = useSeverityColor("info");
|
|
1038
|
+
return /* @__PURE__ */ jsxs(DropdownMenu$1.Root, { children: [
|
|
1039
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Trigger, { disabled, children: trigger }),
|
|
1040
|
+
/* @__PURE__ */ jsx(DropdownMenu$1.Content, { ref, variant: "soft", color: infoColor, side, children: /* @__PURE__ */ jsx(
|
|
1041
|
+
DropdownMenuMultiSelectGroup,
|
|
1042
|
+
{
|
|
1043
|
+
values,
|
|
1044
|
+
onValueChange,
|
|
1045
|
+
items,
|
|
1046
|
+
closeOnSelect,
|
|
1047
|
+
filterValue,
|
|
1048
|
+
onFilterValueChange,
|
|
1049
|
+
placeholder,
|
|
1050
|
+
icons
|
|
1051
|
+
}
|
|
1052
|
+
) })
|
|
842
1053
|
] });
|
|
843
1054
|
}
|
|
844
1055
|
)
|
|
@@ -858,7 +1069,7 @@ const HoverUtility = memo(function Root({ children }) {
|
|
|
858
1069
|
});
|
|
859
1070
|
});
|
|
860
1071
|
const fluid = "_fluid_7n1wr_1";
|
|
861
|
-
const styles$
|
|
1072
|
+
const styles$g = {
|
|
862
1073
|
fluid
|
|
863
1074
|
};
|
|
864
1075
|
const _Select = forwardRef(function Select2({
|
|
@@ -882,7 +1093,7 @@ const _Select = forwardRef(function Select2({
|
|
|
882
1093
|
Select$1.Trigger,
|
|
883
1094
|
{
|
|
884
1095
|
className: classNames(className, {
|
|
885
|
-
[styles$
|
|
1096
|
+
[styles$g.fluid]: fluid2
|
|
886
1097
|
}),
|
|
887
1098
|
id,
|
|
888
1099
|
ref,
|
|
@@ -894,7 +1105,7 @@ const _Select = forwardRef(function Select2({
|
|
|
894
1105
|
Select$1.Content,
|
|
895
1106
|
{
|
|
896
1107
|
side,
|
|
897
|
-
className: styles$
|
|
1108
|
+
className: styles$g.contentDefault,
|
|
898
1109
|
position: "popper",
|
|
899
1110
|
variant: variant !== "surface" ? "soft" : "solid",
|
|
900
1111
|
color: itemSeverityColor,
|
|
@@ -1007,7 +1218,7 @@ const MultiSelect = memo(
|
|
|
1007
1218
|
);
|
|
1008
1219
|
})
|
|
1009
1220
|
);
|
|
1010
|
-
const styles$
|
|
1221
|
+
const styles$f = {
|
|
1011
1222
|
"default": "_default_u936h_1"
|
|
1012
1223
|
};
|
|
1013
1224
|
const _Switch = forwardRef(function Switch2({ className, severity = "primary", icon, defaultChecked = false, onCheckedChange, ...rest }, ref) {
|
|
@@ -1035,7 +1246,7 @@ const _Switch = forwardRef(function Switch2({ className, severity = "primary", i
|
|
|
1035
1246
|
/* @__PURE__ */ jsx(
|
|
1036
1247
|
Switch$1,
|
|
1037
1248
|
{
|
|
1038
|
-
className: classNames("overmap-switch", className, styles$
|
|
1249
|
+
className: classNames("overmap-switch", className, styles$f.default),
|
|
1039
1250
|
ref: ref ? ref : fallbackRef,
|
|
1040
1251
|
color: severityColor,
|
|
1041
1252
|
radius: "full",
|
|
@@ -1053,7 +1264,7 @@ const right$2 = "_right_1onyo_7";
|
|
|
1053
1264
|
const resizeHandle$1 = "_resizeHandle_1onyo_10";
|
|
1054
1265
|
const left$2 = "_left_1onyo_13";
|
|
1055
1266
|
const overlay = "_overlay_1onyo_33";
|
|
1056
|
-
const styles$
|
|
1267
|
+
const styles$e = {
|
|
1057
1268
|
sidebarContent,
|
|
1058
1269
|
right: right$2,
|
|
1059
1270
|
resizeHandle: resizeHandle$1,
|
|
@@ -1086,13 +1297,13 @@ const _Sidebar = forwardRef(function Sidebar2({
|
|
|
1086
1297
|
setContainer(tempContainer);
|
|
1087
1298
|
}, [containerSelector]);
|
|
1088
1299
|
return /* @__PURE__ */ jsx(RadixDialogPrimitive.Root, { open, modal, children: /* @__PURE__ */ jsxs(RadixDialogPrimitive.Portal, { container, children: [
|
|
1089
|
-
overlay2 && /* @__PURE__ */ jsx(RadixDialogPrimitive.Overlay, { className: classNames(styles$
|
|
1300
|
+
overlay2 && /* @__PURE__ */ jsx(RadixDialogPrimitive.Overlay, { className: classNames(styles$e.overlay) }),
|
|
1090
1301
|
/* @__PURE__ */ jsx(
|
|
1091
1302
|
RadixDialogPrimitive.Content,
|
|
1092
1303
|
{
|
|
1093
|
-
className: classNames("overmap-sidebar", "rt-DialogContent", styles$
|
|
1094
|
-
[styles$
|
|
1095
|
-
[styles$
|
|
1304
|
+
className: classNames("overmap-sidebar", "rt-DialogContent", styles$e.sidebarContent, {
|
|
1305
|
+
[styles$e.left]: isLeft,
|
|
1306
|
+
[styles$e.right]: isRight
|
|
1096
1307
|
}),
|
|
1097
1308
|
ref,
|
|
1098
1309
|
asChild: true,
|
|
@@ -1104,7 +1315,7 @@ const _Sidebar = forwardRef(function Sidebar2({
|
|
|
1104
1315
|
maxWidth,
|
|
1105
1316
|
defaultSize: defaultSidebarSize,
|
|
1106
1317
|
enable: { right: resizable2 && isLeft, left: resizable2 && isRight },
|
|
1107
|
-
handleClasses: { left: styles$
|
|
1318
|
+
handleClasses: { left: styles$e.resizeHandle, right: styles$e.resizeHandle },
|
|
1108
1319
|
handleComponent: {
|
|
1109
1320
|
right: /* @__PURE__ */ jsx(DragHandleDots2Icon, {}),
|
|
1110
1321
|
left: /* @__PURE__ */ jsx(DragHandleDots2Icon, {})
|
|
@@ -1126,7 +1337,7 @@ const exitActive = "_exitActive_1iy9c_22";
|
|
|
1126
1337
|
const exitDone = "_exitDone_1iy9c_32";
|
|
1127
1338
|
const resizable$1 = "_resizable_1iy9c_41";
|
|
1128
1339
|
const slideOutOverlay = "_slideOutOverlay_1iy9c_47";
|
|
1129
|
-
const styles$
|
|
1340
|
+
const styles$d = {
|
|
1130
1341
|
outerContent,
|
|
1131
1342
|
enter,
|
|
1132
1343
|
right: right$1,
|
|
@@ -1170,23 +1381,23 @@ const SlideOut = memo(function SlideOut2({
|
|
|
1170
1381
|
{
|
|
1171
1382
|
in: open,
|
|
1172
1383
|
classNames: {
|
|
1173
|
-
enter: styles$
|
|
1174
|
-
enterActive: styles$
|
|
1175
|
-
exitActive: styles$
|
|
1176
|
-
exitDone: styles$
|
|
1384
|
+
enter: styles$d.enter,
|
|
1385
|
+
enterActive: styles$d.enterActive,
|
|
1386
|
+
exitActive: styles$d.exitActive,
|
|
1387
|
+
exitDone: styles$d.exitDone
|
|
1177
1388
|
},
|
|
1178
1389
|
timeout: TRANSITION_DURATION$1,
|
|
1179
1390
|
nodeRef: contentRef,
|
|
1180
1391
|
unmountOnExit: true,
|
|
1181
1392
|
mountOnEnter: true,
|
|
1182
1393
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1183
|
-
overlay2 && /* @__PURE__ */ jsx("div", { className: classNames("overamp-slide-out-overlay", styles$
|
|
1394
|
+
overlay2 && /* @__PURE__ */ jsx("div", { className: classNames("overamp-slide-out-overlay", styles$d.slideOutOverlay) }),
|
|
1184
1395
|
/* @__PURE__ */ jsx(DismissableLayer, { disableOutsidePointerEvents: modal, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
|
|
1185
1396
|
Flex$1,
|
|
1186
1397
|
{
|
|
1187
|
-
className: classNames("overmap-slide-out", className, styles$
|
|
1188
|
-
[styles$
|
|
1189
|
-
[styles$
|
|
1398
|
+
className: classNames("overmap-slide-out", className, styles$d.outerContent, {
|
|
1399
|
+
[styles$d.left]: isSideLeft,
|
|
1400
|
+
[styles$d.right]: isSideRight
|
|
1190
1401
|
}),
|
|
1191
1402
|
style: { "--slide-out-width": `${slideOutWidth}px` },
|
|
1192
1403
|
height: "100%",
|
|
@@ -1200,7 +1411,7 @@ const SlideOut = memo(function SlideOut2({
|
|
|
1200
1411
|
children: /* @__PURE__ */ jsx(
|
|
1201
1412
|
Resizable,
|
|
1202
1413
|
{
|
|
1203
|
-
className: styles$
|
|
1414
|
+
className: styles$d.resizable,
|
|
1204
1415
|
defaultSize: { width: slideOutWidth, height: "100%" },
|
|
1205
1416
|
onResize: handleResize,
|
|
1206
1417
|
enable: { right: resizable2 && isSideLeft, left: resizable2 && isSideRight },
|
|
@@ -1222,7 +1433,7 @@ const noLeftIcon = "_noLeftIcon_1octa_14";
|
|
|
1222
1433
|
const noRightIcon = "_noRightIcon_1octa_18";
|
|
1223
1434
|
const ghost$1 = "_ghost_1octa_22";
|
|
1224
1435
|
const charCount$1 = "_charCount_1octa_40";
|
|
1225
|
-
const styles$
|
|
1436
|
+
const styles$c = {
|
|
1226
1437
|
accommodateCharCount,
|
|
1227
1438
|
wrapper: wrapper$2,
|
|
1228
1439
|
"default": "_default_1octa_10",
|
|
@@ -1249,9 +1460,9 @@ const _Input = forwardRef(function Input2({
|
|
|
1249
1460
|
return /* @__PURE__ */ jsxs(
|
|
1250
1461
|
TextField.Root,
|
|
1251
1462
|
{
|
|
1252
|
-
className: classNames(styles$
|
|
1253
|
-
[styles$
|
|
1254
|
-
[styles$
|
|
1463
|
+
className: classNames(styles$c.wrapper, className, {
|
|
1464
|
+
[styles$c.ghost]: variant === "ghost",
|
|
1465
|
+
[styles$c.accommodateCharCount]: displayInputLength
|
|
1255
1466
|
}),
|
|
1256
1467
|
size: computedSize,
|
|
1257
1468
|
variant: variant !== "ghost" ? variant : void 0,
|
|
@@ -1261,9 +1472,9 @@ const _Input = forwardRef(function Input2({
|
|
|
1261
1472
|
/* @__PURE__ */ jsx(
|
|
1262
1473
|
TextField.Input,
|
|
1263
1474
|
{
|
|
1264
|
-
className: classNames(styles$
|
|
1265
|
-
[styles$
|
|
1266
|
-
[styles$
|
|
1475
|
+
className: classNames(styles$c.default, {
|
|
1476
|
+
[styles$c.noLeftIcon]: !leftSlot,
|
|
1477
|
+
[styles$c.noRightIcon]: !rightSlot
|
|
1267
1478
|
}),
|
|
1268
1479
|
ref,
|
|
1269
1480
|
value,
|
|
@@ -1274,7 +1485,7 @@ const _Input = forwardRef(function Input2({
|
|
|
1274
1485
|
}
|
|
1275
1486
|
),
|
|
1276
1487
|
rightSlot && /* @__PURE__ */ jsx(TextField.Slot, { children: rightSlot }),
|
|
1277
|
-
displayInputLength && /* @__PURE__ */ jsx(Text$
|
|
1488
|
+
displayInputLength && /* @__PURE__ */ jsx(Text$2, { as: "p", className: styles$c.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
1489
|
]
|
|
1279
1490
|
}
|
|
1280
1491
|
);
|
|
@@ -1290,7 +1501,7 @@ const IconColorUtility = memo(function IconColorUtility2({
|
|
|
1290
1501
|
() => ({
|
|
1291
1502
|
"data-accent-color": severity && severityColor ? severityColor : color ? color : "gray",
|
|
1292
1503
|
style: {
|
|
1293
|
-
color: "var(--accent-
|
|
1504
|
+
color: "var(--accent-a9)"
|
|
1294
1505
|
}
|
|
1295
1506
|
}),
|
|
1296
1507
|
[color, severity, severityColor]
|
|
@@ -1298,7 +1509,7 @@ const IconColorUtility = memo(function IconColorUtility2({
|
|
|
1298
1509
|
return cloneElement(children, { ...childProps });
|
|
1299
1510
|
});
|
|
1300
1511
|
const wrapper$1 = "_wrapper_tmtz0_1";
|
|
1301
|
-
const styles$
|
|
1512
|
+
const styles$b = {
|
|
1302
1513
|
wrapper: wrapper$1
|
|
1303
1514
|
};
|
|
1304
1515
|
const _Popover = forwardRef(function Popover2({ className, trigger, open, onOpenChange, defaultOpen = false, modal = false, children, ...rest }, ref) {
|
|
@@ -1308,7 +1519,7 @@ const _Popover = forwardRef(function Popover2({ className, trigger, open, onOpen
|
|
|
1308
1519
|
Popover$1.Content,
|
|
1309
1520
|
{
|
|
1310
1521
|
ref,
|
|
1311
|
-
className: classNames("overmap-popover", className, styles$
|
|
1522
|
+
className: classNames("overmap-popover", className, styles$b.wrapper),
|
|
1312
1523
|
...rest,
|
|
1313
1524
|
children: children(Popover$1.Close)
|
|
1314
1525
|
}
|
|
@@ -1323,7 +1534,7 @@ const right = "_right_1ssf2_18";
|
|
|
1323
1534
|
const resizable = "_resizable_1ssf2_23";
|
|
1324
1535
|
const resizeHandle = "_resizeHandle_1ssf2_28";
|
|
1325
1536
|
const panelMainContent = "_panelMainContent_1ssf2_48";
|
|
1326
|
-
const styles$
|
|
1537
|
+
const styles$a = {
|
|
1327
1538
|
wrapper,
|
|
1328
1539
|
panelContent,
|
|
1329
1540
|
left,
|
|
@@ -1509,7 +1720,7 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1509
1720
|
return /* @__PURE__ */ jsxs(
|
|
1510
1721
|
Flex$1,
|
|
1511
1722
|
{
|
|
1512
|
-
className: styles$
|
|
1723
|
+
className: styles$a.wrapper,
|
|
1513
1724
|
style: { minWidth: `${leftMinWidth + rightMinWidth}px` },
|
|
1514
1725
|
ref: wrapperRef,
|
|
1515
1726
|
width: "100%",
|
|
@@ -1531,7 +1742,7 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1531
1742
|
Box,
|
|
1532
1743
|
{
|
|
1533
1744
|
ref: leftPanelRef,
|
|
1534
|
-
className: classNames(styles$
|
|
1745
|
+
className: classNames(styles$a.panelContent, styles$a.left),
|
|
1535
1746
|
style: leftPanelTransitionStyles[state],
|
|
1536
1747
|
width: "auto",
|
|
1537
1748
|
height: "100%",
|
|
@@ -1540,7 +1751,7 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1540
1751
|
children: /* @__PURE__ */ jsx(
|
|
1541
1752
|
Resizable,
|
|
1542
1753
|
{
|
|
1543
|
-
className: styles$
|
|
1754
|
+
className: styles$a.resizable,
|
|
1544
1755
|
size: {
|
|
1545
1756
|
width: leftPanelWidth,
|
|
1546
1757
|
height: "100%"
|
|
@@ -1549,7 +1760,7 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1549
1760
|
enable: { right: (resizeable == null ? void 0 : resizeable.left) !== void 0 ? resizeable.left : true },
|
|
1550
1761
|
minWidth: leftMinWidth,
|
|
1551
1762
|
maxWidth: leftPanelMaxWidth,
|
|
1552
|
-
handleClasses: { right: classNames(styles$
|
|
1763
|
+
handleClasses: { right: classNames(styles$a.resizeHandle, styles$a.left) },
|
|
1553
1764
|
handleComponent: {
|
|
1554
1765
|
right: /* @__PURE__ */ jsx(DragHandleDots2Icon, { height: "14px", width: "14px" })
|
|
1555
1766
|
},
|
|
@@ -1560,7 +1771,7 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1560
1771
|
)
|
|
1561
1772
|
}
|
|
1562
1773
|
),
|
|
1563
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
1774
|
+
/* @__PURE__ */ jsx("div", { className: styles$a.panelMainContent, children }),
|
|
1564
1775
|
/* @__PURE__ */ jsx(
|
|
1565
1776
|
Transition,
|
|
1566
1777
|
{
|
|
@@ -1574,7 +1785,7 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1574
1785
|
Box,
|
|
1575
1786
|
{
|
|
1576
1787
|
ref: rightPanelRef,
|
|
1577
|
-
className: classNames(styles$
|
|
1788
|
+
className: classNames(styles$a.panelContent, styles$a.right),
|
|
1578
1789
|
style: rightPanelTransitionStyles[state],
|
|
1579
1790
|
width: "auto",
|
|
1580
1791
|
height: "100%",
|
|
@@ -1583,13 +1794,13 @@ const LeftAndRightPanels = memo(function Panels({
|
|
|
1583
1794
|
children: /* @__PURE__ */ jsx(
|
|
1584
1795
|
Resizable,
|
|
1585
1796
|
{
|
|
1586
|
-
className: styles$
|
|
1797
|
+
className: styles$a.resizable,
|
|
1587
1798
|
size: { width: rightPanelWidth, height: "100%" },
|
|
1588
1799
|
onResizeStop: handleResizeRightPanel,
|
|
1589
1800
|
enable: { left: (resizeable == null ? void 0 : resizeable.right) !== void 0 ? resizeable.right : true },
|
|
1590
1801
|
minWidth: rightMinWidth,
|
|
1591
1802
|
maxWidth: rightPanelMaxWidth,
|
|
1592
|
-
handleClasses: { left: classNames(styles$
|
|
1803
|
+
handleClasses: { left: classNames(styles$a.resizeHandle, styles$a.right) },
|
|
1593
1804
|
handleComponent: { left: /* @__PURE__ */ jsx(DragHandleDots2Icon, { height: "14px", width: "14px" }) },
|
|
1594
1805
|
children: rightPanel
|
|
1595
1806
|
}
|
|
@@ -1607,7 +1818,7 @@ const pageTitle = "_pageTitle_spfw7_12";
|
|
|
1607
1818
|
const buttonContainer = "_buttonContainer_spfw7_17";
|
|
1608
1819
|
const optionsButtonContainer = "_optionsButtonContainer_spfw7_22";
|
|
1609
1820
|
const optionsButton = "_optionsButton_spfw7_22";
|
|
1610
|
-
const styles$
|
|
1821
|
+
const styles$9 = {
|
|
1611
1822
|
multiPagePopover,
|
|
1612
1823
|
pageTitle,
|
|
1613
1824
|
buttonContainer,
|
|
@@ -1621,7 +1832,7 @@ function getMultiPagePopoverContent(popoverOption, setMultiPagePopoverContent, d
|
|
|
1621
1832
|
const optionButtons = popoverOption.options.map((option, i) => /* @__PURE__ */ jsx(
|
|
1622
1833
|
Button2,
|
|
1623
1834
|
{
|
|
1624
|
-
className: classNames(styles$
|
|
1835
|
+
className: classNames(styles$9.optionsButton, option.buttonClassName),
|
|
1625
1836
|
variant: "ghost",
|
|
1626
1837
|
radius: "large",
|
|
1627
1838
|
style: {
|
|
@@ -1637,12 +1848,12 @@ function getMultiPagePopoverContent(popoverOption, setMultiPagePopoverContent, d
|
|
|
1637
1848
|
`${option.value}-page-${page}-button-${i}`
|
|
1638
1849
|
));
|
|
1639
1850
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1640
|
-
popoverOption.title && /* @__PURE__ */ jsx("div", { className: styles$
|
|
1851
|
+
popoverOption.title && /* @__PURE__ */ jsx("div", { className: styles$9.pageTitle, children: popoverOption.title }),
|
|
1641
1852
|
popoverOption.content,
|
|
1642
1853
|
/* @__PURE__ */ jsx(
|
|
1643
1854
|
"div",
|
|
1644
1855
|
{
|
|
1645
|
-
className: classNames(styles$
|
|
1856
|
+
className: classNames(styles$9.optionsButtonContainer, popoverOption.buttonsContainerClassName),
|
|
1646
1857
|
style: {
|
|
1647
1858
|
flexDirection: direction === "vertical" ? "column" : "row"
|
|
1648
1859
|
},
|
|
@@ -1660,7 +1871,7 @@ const _MultiPagePopover = forwardRef(function MultiPagePopover2({ page, classNam
|
|
|
1660
1871
|
return /* @__PURE__ */ jsx(
|
|
1661
1872
|
Popover,
|
|
1662
1873
|
{
|
|
1663
|
-
className: classNames(styles$
|
|
1874
|
+
className: classNames(styles$9.multiPagePopover, className),
|
|
1664
1875
|
ref,
|
|
1665
1876
|
onOpenAutoFocus: resetPopoverContent,
|
|
1666
1877
|
onCloseAutoFocus: resetPopoverContent,
|
|
@@ -1672,7 +1883,7 @@ const _MultiPagePopover = forwardRef(function MultiPagePopover2({ page, classNam
|
|
|
1672
1883
|
const MultiPagePopover = React.memo(_MultiPagePopover);
|
|
1673
1884
|
const charCount = "_charCount_1lz28_1";
|
|
1674
1885
|
const ghost = "_ghost_1lz28_5";
|
|
1675
|
-
const styles$
|
|
1886
|
+
const styles$8 = {
|
|
1676
1887
|
charCount,
|
|
1677
1888
|
ghost
|
|
1678
1889
|
};
|
|
@@ -1708,7 +1919,7 @@ const _TextArea = forwardRef(function TextArea2({
|
|
|
1708
1919
|
TextArea$1,
|
|
1709
1920
|
{
|
|
1710
1921
|
className: classNames("overmap-textarea", className, {
|
|
1711
|
-
[styles$
|
|
1922
|
+
[styles$8.ghost]: variant === "ghost"
|
|
1712
1923
|
}),
|
|
1713
1924
|
style: { resize },
|
|
1714
1925
|
variant: variant !== "ghost" ? variant : void 0,
|
|
@@ -1718,7 +1929,7 @@ const _TextArea = forwardRef(function TextArea2({
|
|
|
1718
1929
|
...rest
|
|
1719
1930
|
}
|
|
1720
1931
|
),
|
|
1721
|
-
displayInputLength && /* @__PURE__ */ jsx(Text$
|
|
1932
|
+
displayInputLength && /* @__PURE__ */ jsx(Text$2, { as: "p", className: styles$8.charCount, color: infoColor, align: "right", children: displayInputLengthValue })
|
|
1722
1933
|
] });
|
|
1723
1934
|
});
|
|
1724
1935
|
const TextArea = memo(_TextArea);
|
|
@@ -1764,7 +1975,7 @@ const _ToggleGroup = forwardRef(function ToggleGroup2({
|
|
|
1764
1975
|
);
|
|
1765
1976
|
});
|
|
1766
1977
|
const ToggleGroup = memo(_ToggleGroup);
|
|
1767
|
-
const styles$
|
|
1978
|
+
const styles$7 = {
|
|
1768
1979
|
"default": "_default_xqvoc_1"
|
|
1769
1980
|
};
|
|
1770
1981
|
const Root2 = memo(
|
|
@@ -1772,7 +1983,7 @@ const Root2 = memo(
|
|
|
1772
1983
|
return /* @__PURE__ */ jsx(
|
|
1773
1984
|
Root$2,
|
|
1774
1985
|
{
|
|
1775
|
-
className: classNames(className, "overmap-toolbar", styles$
|
|
1986
|
+
className: classNames(className, "overmap-toolbar", styles$7.default),
|
|
1776
1987
|
ref,
|
|
1777
1988
|
asChild: true,
|
|
1778
1989
|
...rest,
|
|
@@ -1813,7 +2024,7 @@ const actionButton = "_actionButton_1i6bp_20";
|
|
|
1813
2024
|
const ToastRoot = "_ToastRoot_1i6bp_24";
|
|
1814
2025
|
const slideIn = "_slideIn_1i6bp_1";
|
|
1815
2026
|
const swipeOut = "_swipeOut_1i6bp_1";
|
|
1816
|
-
const styles$
|
|
2027
|
+
const styles$6 = {
|
|
1817
2028
|
ToastViewport,
|
|
1818
2029
|
actionButton,
|
|
1819
2030
|
ToastRoot,
|
|
@@ -1831,7 +2042,7 @@ const _Toast = forwardRef(function Toast2({ title, description, icon, severity =
|
|
|
1831
2042
|
},
|
|
1832
2043
|
[onClose]
|
|
1833
2044
|
);
|
|
1834
|
-
return /* @__PURE__ */ jsx(RadixToast.Root, { asChild: true, ref, ...rest, open, type: sensitivity, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx(Callout.Root, { className: styles$
|
|
2045
|
+
return /* @__PURE__ */ jsx(RadixToast.Root, { asChild: true, ref, ...rest, open, type: sensitivity, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx(Callout.Root, { className: styles$6.ToastRoot, variant: "surface", color, size, children: /* @__PURE__ */ jsxs(Flex$1, { width: "100%", align: "center", gap: "4", justify: "between", children: [
|
|
1835
2046
|
/* @__PURE__ */ jsxs(Flex$1, { align: "center", gap: "3", children: [
|
|
1836
2047
|
/* @__PURE__ */ jsx(Callout.Icon, { children: icon }),
|
|
1837
2048
|
/* @__PURE__ */ jsxs(Flex$1, { direction: "column", gap: "2", children: [
|
|
@@ -1839,7 +2050,7 @@ const _Toast = forwardRef(function Toast2({ title, description, icon, severity =
|
|
|
1839
2050
|
/* @__PURE__ */ jsx(RadixToast.Title, { asChild: true, children: /* @__PURE__ */ jsx(Callout.Text, { size: "3", weight: "medium", children: title }) }),
|
|
1840
2051
|
/* @__PURE__ */ jsx(RadixToast.Description, { asChild: true, children: /* @__PURE__ */ jsx(Callout.Text, { children: description }) })
|
|
1841
2052
|
] }),
|
|
1842
|
-
action && /* @__PURE__ */ jsx(RadixToast.Action, { className: styles$
|
|
2053
|
+
action && /* @__PURE__ */ jsx(RadixToast.Action, { className: styles$6.actionButton, altText: action.altText, asChild: true, children: action.content })
|
|
1843
2054
|
] })
|
|
1844
2055
|
] }),
|
|
1845
2056
|
/* @__PURE__ */ jsx(RadixToast.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { "aria-label": "Close", variant: "ghost", severity, children: /* @__PURE__ */ jsx(Cross2Icon, {}) }) })
|
|
@@ -1915,11 +2126,11 @@ const ToastProvider = memo(function ToastContextProvider({
|
|
|
1915
2126
|
}, []);
|
|
1916
2127
|
return /* @__PURE__ */ jsx(ToastContext.Provider, { value: toastContextValue, children: /* @__PURE__ */ jsxs(ToastProvider$1, { ...rest, children: [
|
|
1917
2128
|
children,
|
|
1918
|
-
/* @__PURE__ */ jsx(ToastViewport$1, { className: classNames(className, styles$
|
|
2129
|
+
/* @__PURE__ */ jsx(ToastViewport$1, { className: classNames(className, styles$6.ToastViewport), hotkey }),
|
|
1919
2130
|
toasts.map(({ id, onClose, ...toastProps }) => /* @__PURE__ */ jsx(Toast, { ...toastProps, onClose: () => handleCloseToast(id, 0, onClose) }, id))
|
|
1920
2131
|
] }) });
|
|
1921
2132
|
});
|
|
1922
|
-
const styles$
|
|
2133
|
+
const styles$5 = {
|
|
1923
2134
|
"default": "_default_1odpt_1"
|
|
1924
2135
|
};
|
|
1925
2136
|
const Tooltip = memo(
|
|
@@ -1927,7 +2138,7 @@ const Tooltip = memo(
|
|
|
1927
2138
|
return /* @__PURE__ */ jsx(
|
|
1928
2139
|
Tooltip$1,
|
|
1929
2140
|
{
|
|
1930
|
-
className: classNames("overmap-tooltip", className, styles$
|
|
2141
|
+
className: classNames("overmap-tooltip", className, styles$5.default),
|
|
1931
2142
|
ref,
|
|
1932
2143
|
content: /* @__PURE__ */ jsx(Flex$1, { align: "center", gap: "1", width: "max-content", height: "max-content", justify: "center", children: content }),
|
|
1933
2144
|
...rest,
|
|
@@ -1937,18 +2148,18 @@ const Tooltip = memo(
|
|
|
1937
2148
|
})
|
|
1938
2149
|
);
|
|
1939
2150
|
const noWrap = "_noWrap_1wpa5_1";
|
|
1940
|
-
const styles$
|
|
2151
|
+
const styles$4 = {
|
|
1941
2152
|
noWrap
|
|
1942
2153
|
};
|
|
1943
|
-
const Text = memo(
|
|
2154
|
+
const Text$1 = memo(
|
|
1944
2155
|
forwardRef(({ className, noWrap: noWrap2, severity, as, ...props }, ref) => {
|
|
1945
2156
|
const color = useSeverityColor(severity);
|
|
1946
2157
|
return /* @__PURE__ */ jsx(
|
|
1947
|
-
Text$
|
|
2158
|
+
Text$2,
|
|
1948
2159
|
{
|
|
1949
2160
|
ref,
|
|
1950
2161
|
as,
|
|
1951
|
-
className: classNames(className, { [styles$
|
|
2162
|
+
className: classNames(className, { [styles$4.noWrap]: noWrap2 }),
|
|
1952
2163
|
color,
|
|
1953
2164
|
...props
|
|
1954
2165
|
}
|
|
@@ -1962,6 +2173,60 @@ const DefaultTheme = memo(
|
|
|
1962
2173
|
return /* @__PURE__ */ jsx(Theme, { panelBackground, radius: radius2, ref, ...rest });
|
|
1963
2174
|
})
|
|
1964
2175
|
);
|
|
2176
|
+
const light = "_light_1u8fs_1";
|
|
2177
|
+
const bold = "_bold_1u8fs_8";
|
|
2178
|
+
const full = "_full_1u8fs_15";
|
|
2179
|
+
const Text = "_Text_1u8fs_22";
|
|
2180
|
+
const styles$3 = {
|
|
2181
|
+
light,
|
|
2182
|
+
bold,
|
|
2183
|
+
full,
|
|
2184
|
+
Text
|
|
2185
|
+
};
|
|
2186
|
+
const SeparatorSizeMapping = {
|
|
2187
|
+
"1": "max-content",
|
|
2188
|
+
"2": "max-content",
|
|
2189
|
+
"3": "max-content",
|
|
2190
|
+
"4": "100%"
|
|
2191
|
+
};
|
|
2192
|
+
const _Separator = forwardRef(function Separator2({
|
|
2193
|
+
className,
|
|
2194
|
+
severity = "info",
|
|
2195
|
+
textWeight = "light",
|
|
2196
|
+
gap = "1",
|
|
2197
|
+
text,
|
|
2198
|
+
orientation = "horizontal",
|
|
2199
|
+
size,
|
|
2200
|
+
weight = "medium",
|
|
2201
|
+
...rest
|
|
2202
|
+
}, ref) {
|
|
2203
|
+
const computedSizing = useResponsiveMapping(size, SeparatorSizeMapping);
|
|
2204
|
+
const severityColor = useSeverityColor(severity);
|
|
2205
|
+
return /* @__PURE__ */ jsxs(
|
|
2206
|
+
Flex$1,
|
|
2207
|
+
{
|
|
2208
|
+
className: classNames("overmap-separator", className, {
|
|
2209
|
+
[styles$3.light]: weight === "light",
|
|
2210
|
+
[styles$3.bold]: weight === "bold",
|
|
2211
|
+
[styles$3.full]: weight === "full"
|
|
2212
|
+
}),
|
|
2213
|
+
ref,
|
|
2214
|
+
width: orientation === "horizontal" ? computedSizing : "max-content",
|
|
2215
|
+
height: orientation === "vertical" ? computedSizing : "max-content",
|
|
2216
|
+
direction: orientation === "vertical" ? "column" : "row",
|
|
2217
|
+
align: "center",
|
|
2218
|
+
gap,
|
|
2219
|
+
children: [
|
|
2220
|
+
/* @__PURE__ */ jsx(Separator$1, { size, orientation, color: severityColor, ...rest }),
|
|
2221
|
+
text && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2222
|
+
/* @__PURE__ */ jsx(Text$2, { className: styles$3.Text, as: "span", size: "1", weight: textWeight, color: severityColor, children: text }),
|
|
2223
|
+
/* @__PURE__ */ jsx(Separator$1, { size, orientation, color: severityColor, ...rest })
|
|
2224
|
+
] })
|
|
2225
|
+
]
|
|
2226
|
+
}
|
|
2227
|
+
);
|
|
2228
|
+
});
|
|
2229
|
+
const Separator = memo(_Separator);
|
|
1965
2230
|
function _extends() {
|
|
1966
2231
|
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
1967
2232
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -2566,7 +2831,7 @@ const checkboxIndicator = "_checkboxIndicator_pb9za_27";
|
|
|
2566
2831
|
const checkboxLabel = "_checkboxLabel_pb9za_38";
|
|
2567
2832
|
const noTextHighlight = "_noTextHighlight_pb9za_42";
|
|
2568
2833
|
const checkboxHidden = "_checkboxHidden_pb9za_51";
|
|
2569
|
-
const styles$
|
|
2834
|
+
const styles$2 = {
|
|
2570
2835
|
checkboxContainer,
|
|
2571
2836
|
checkbox,
|
|
2572
2837
|
checkboxIndicator,
|
|
@@ -2575,13 +2840,13 @@ const styles$1 = {
|
|
|
2575
2840
|
checkboxHidden
|
|
2576
2841
|
};
|
|
2577
2842
|
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$
|
|
2843
|
+
return /* @__PURE__ */ jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxs(Flex$1, { className: styles$2.checkboxContainer, ...props, children: [
|
|
2579
2844
|
/* @__PURE__ */ jsx(
|
|
2580
2845
|
$e698a72e93240346$export$be92b6f5f03c0fe9,
|
|
2581
2846
|
{
|
|
2582
2847
|
className: classNames(
|
|
2583
|
-
styles$
|
|
2584
|
-
!isHovered && !checked && styles$
|
|
2848
|
+
styles$2.checkbox,
|
|
2849
|
+
!isHovered && !checked && styles$2.checkboxHidden,
|
|
2585
2850
|
className
|
|
2586
2851
|
),
|
|
2587
2852
|
checked,
|
|
@@ -2592,13 +2857,13 @@ const _Checkbox = forwardRef(function Checkbox2({ className, labelClassName, lab
|
|
|
2592
2857
|
},
|
|
2593
2858
|
ref,
|
|
2594
2859
|
...rest,
|
|
2595
|
-
children: /* @__PURE__ */ jsx($e698a72e93240346$export$adb584737d712b70, { className: styles$
|
|
2860
|
+
children: /* @__PURE__ */ jsx($e698a72e93240346$export$adb584737d712b70, { className: styles$2.checkboxIndicator, children: checked === "indeterminate" ? /* @__PURE__ */ jsx(DividerHorizontalIcon, { width: "13px" }) : /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
2596
2861
|
}
|
|
2597
2862
|
),
|
|
2598
2863
|
label && /* @__PURE__ */ jsx(
|
|
2599
2864
|
"div",
|
|
2600
2865
|
{
|
|
2601
|
-
className: classNames(styles$
|
|
2866
|
+
className: classNames(styles$2.checkboxLabel, labelClassName, styles$2.noTextHighlight),
|
|
2602
2867
|
onClick: () => {
|
|
2603
2868
|
if (onCheckedChange) {
|
|
2604
2869
|
onCheckedChange(!checked);
|
|
@@ -2688,7 +2953,7 @@ const noDataTextContainer = "_noDataTextContainer_go3yk_78";
|
|
|
2688
2953
|
const tableBottomContainer = "_tableBottomContainer_go3yk_84";
|
|
2689
2954
|
const rowsPerPageContainer = "_rowsPerPageContainer_go3yk_88";
|
|
2690
2955
|
const rowsPerPageText = "_rowsPerPageText_go3yk_98";
|
|
2691
|
-
const styles = {
|
|
2956
|
+
const styles$1 = {
|
|
2692
2957
|
tableContainer,
|
|
2693
2958
|
headerContainer,
|
|
2694
2959
|
tableTopContainer,
|
|
@@ -2840,9 +3105,6 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
2840
3105
|
const tableSelect = useRowSelect(
|
|
2841
3106
|
tableData,
|
|
2842
3107
|
{
|
|
2843
|
-
// Don't know what the type is for these parameters. Not specified in the React Table Library docs
|
|
2844
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2845
|
-
// @ts-ignore
|
|
2846
3108
|
onChange: (_action, state) => {
|
|
2847
3109
|
setSelected(state.ids);
|
|
2848
3110
|
}
|
|
@@ -2950,7 +3212,7 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
2950
3212
|
return /* @__PURE__ */ jsx(
|
|
2951
3213
|
Component,
|
|
2952
3214
|
{
|
|
2953
|
-
className: classNames(styles.tableHeaderCell, columnClassName, column.className),
|
|
3215
|
+
className: classNames(styles$1.tableHeaderCell, columnClassName, column.className),
|
|
2954
3216
|
sortKey: column.sort ? column.id.toString().toUpperCase() : "",
|
|
2955
3217
|
children: column.label
|
|
2956
3218
|
},
|
|
@@ -2990,14 +3252,14 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
2990
3252
|
}
|
|
2991
3253
|
}
|
|
2992
3254
|
}, [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: [
|
|
2995
|
-
!!title && /* @__PURE__ */ jsx(Text, { weight: "bold", size: "7", children: title }),
|
|
2996
|
-
!!description && /* @__PURE__ */ jsx(Text, { as: "div", children: description })
|
|
3255
|
+
return /* @__PURE__ */ jsxs("div", { className: classNames({ [styles$1.tableContainer]: showContainer }), children: [
|
|
3256
|
+
(!!title || !!description) && /* @__PURE__ */ jsxs("div", { className: styles$1.headerContainer, children: [
|
|
3257
|
+
!!title && /* @__PURE__ */ jsx(Text$1, { weight: "bold", size: "7", children: title }),
|
|
3258
|
+
!!description && /* @__PURE__ */ jsx(Text$1, { as: "div", children: description })
|
|
2997
3259
|
] }),
|
|
2998
|
-
showTopBar && /* @__PURE__ */ jsxs(Flex$1, { justify: "between", className: styles.tableTopContainer, children: [
|
|
3260
|
+
showTopBar && /* @__PURE__ */ jsxs(Flex$1, { justify: "between", className: styles$1.tableTopContainer, children: [
|
|
2999
3261
|
/* @__PURE__ */ jsxs(Flex$1, { gap: "2", children: [
|
|
3000
|
-
showSearchBar && /* @__PURE__ */ jsx("div", { className: styles.searchContainer, children: /* @__PURE__ */ jsx(
|
|
3262
|
+
showSearchBar && /* @__PURE__ */ jsx("div", { className: styles$1.searchContainer, children: /* @__PURE__ */ jsx(
|
|
3001
3263
|
Input,
|
|
3002
3264
|
{
|
|
3003
3265
|
value: search,
|
|
@@ -3046,7 +3308,7 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
3046
3308
|
/* @__PURE__ */ jsx(
|
|
3047
3309
|
Table$1,
|
|
3048
3310
|
{
|
|
3049
|
-
className: classNames(styles.table, className),
|
|
3311
|
+
className: classNames(styles$1.table, className),
|
|
3050
3312
|
data: tableData,
|
|
3051
3313
|
theme,
|
|
3052
3314
|
sort,
|
|
@@ -3056,16 +3318,16 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
3056
3318
|
ref,
|
|
3057
3319
|
children: (tableList) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3058
3320
|
/* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
3059
|
-
showSelect && /* @__PURE__ */ jsx(HeaderCellSelect, { className: styles.tableHeaderCell }),
|
|
3321
|
+
showSelect && /* @__PURE__ */ jsx(HeaderCellSelect, { className: styles$1.tableHeaderCell }),
|
|
3060
3322
|
...columnCells
|
|
3061
3323
|
] }) }),
|
|
3062
3324
|
/* @__PURE__ */ jsxs(Body, { children: [
|
|
3063
|
-
tableList.length === 0 && /* @__PURE__ */ jsx(TableRow, { className: styles.noDataTextContainer, children: /* @__PURE__ */ jsx(Cell, { children: emptyMessage }) }),
|
|
3325
|
+
tableList.length === 0 && /* @__PURE__ */ jsx(TableRow, { className: styles$1.noDataTextContainer, children: /* @__PURE__ */ jsx(Cell, { children: emptyMessage }) }),
|
|
3064
3326
|
tableList.map((row) => /* @__PURE__ */ jsxs(
|
|
3065
3327
|
Row,
|
|
3066
3328
|
{
|
|
3067
3329
|
item: row,
|
|
3068
|
-
className: classNames(styles.tableRow, rowClassName, row.className),
|
|
3330
|
+
className: classNames(styles$1.tableRow, rowClassName, row.className),
|
|
3069
3331
|
onClick: row.onClick,
|
|
3070
3332
|
children: [
|
|
3071
3333
|
showSelect && /* @__PURE__ */ jsx(CellSelect, { item: row }, row.id),
|
|
@@ -3073,11 +3335,11 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
3073
3335
|
Cell,
|
|
3074
3336
|
{
|
|
3075
3337
|
className: classNames(
|
|
3076
|
-
styles.tableCell,
|
|
3338
|
+
styles$1.tableCell,
|
|
3077
3339
|
cellClassName,
|
|
3078
3340
|
row[column.id].className
|
|
3079
3341
|
),
|
|
3080
|
-
children: /* @__PURE__ */ jsx(Text, { children: row[column.id].label })
|
|
3342
|
+
children: /* @__PURE__ */ jsx(Text$1, { children: row[column.id].label })
|
|
3081
3343
|
},
|
|
3082
3344
|
i
|
|
3083
3345
|
))
|
|
@@ -3089,9 +3351,9 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
3089
3351
|
] })
|
|
3090
3352
|
}
|
|
3091
3353
|
),
|
|
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:" }),
|
|
3354
|
+
showBottomBar && /* @__PURE__ */ jsxs(Flex$1, { className: styles$1.tableBottomContainer, wrap: "wrap", direction: isMobile ? "column" : "row", children: [
|
|
3355
|
+
showRowsPerPage && /* @__PURE__ */ jsxs(Flex$1, { className: styles$1.rowsPerPageContainer, children: [
|
|
3356
|
+
/* @__PURE__ */ jsx("div", { className: styles$1.rowsPerPageText, children: "Rows per page:" }),
|
|
3095
3357
|
/* @__PURE__ */ jsx(
|
|
3096
3358
|
Select,
|
|
3097
3359
|
{
|
|
@@ -3107,7 +3369,7 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
3107
3369
|
)
|
|
3108
3370
|
] }),
|
|
3109
3371
|
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: [
|
|
3372
|
+
showPageNavigation && /* @__PURE__ */ jsxs(Flex$1, { className: styles$1.rowsPerPageContainer, gap: "2", justify: "end", children: [
|
|
3111
3373
|
/* @__PURE__ */ jsx(
|
|
3112
3374
|
IconButton,
|
|
3113
3375
|
{
|
|
@@ -3153,6 +3415,155 @@ const _Table = forwardRef(function Table2(props, ref) {
|
|
|
3153
3415
|
] });
|
|
3154
3416
|
});
|
|
3155
3417
|
const Table = React.memo(_Table);
|
|
3418
|
+
const editableTextContainer = "_editableTextContainer_174g6_1";
|
|
3419
|
+
const editableTextText = "_editableTextText_174g6_5";
|
|
3420
|
+
const editableTextInput = "_editableTextInput_174g6_19";
|
|
3421
|
+
const iconHidden = "_iconHidden_174g6_23";
|
|
3422
|
+
const styles = {
|
|
3423
|
+
editableTextContainer,
|
|
3424
|
+
editableTextText,
|
|
3425
|
+
editableTextInput,
|
|
3426
|
+
iconHidden
|
|
3427
|
+
};
|
|
3428
|
+
const _ConfirmEditInput = forwardRef(function ConfirmEditInput2({
|
|
3429
|
+
value,
|
|
3430
|
+
onChange,
|
|
3431
|
+
onEditActivate,
|
|
3432
|
+
onEditConfirm,
|
|
3433
|
+
onEditCancel,
|
|
3434
|
+
textClassName,
|
|
3435
|
+
inputClassName,
|
|
3436
|
+
iconClassName,
|
|
3437
|
+
buttonVariant,
|
|
3438
|
+
variant,
|
|
3439
|
+
severity,
|
|
3440
|
+
size,
|
|
3441
|
+
mode = "buttons",
|
|
3442
|
+
...rest
|
|
3443
|
+
}, ref) {
|
|
3444
|
+
const [text, setText] = useState(value == null ? void 0 : value.toString());
|
|
3445
|
+
const [input, setInput] = useState(value == null ? void 0 : value.toString());
|
|
3446
|
+
const [isEditMode, setIsEditMode] = useState(false);
|
|
3447
|
+
const isConfirmDisabled = !input || text === input;
|
|
3448
|
+
const onInputChange = useCallback(
|
|
3449
|
+
(e) => {
|
|
3450
|
+
var _a;
|
|
3451
|
+
setInput((_a = e.target.value) == null ? void 0 : _a.toString());
|
|
3452
|
+
if (onChange) {
|
|
3453
|
+
onChange(e);
|
|
3454
|
+
}
|
|
3455
|
+
},
|
|
3456
|
+
[onChange]
|
|
3457
|
+
);
|
|
3458
|
+
const onPencilClick = useCallback(() => {
|
|
3459
|
+
setIsEditMode(true);
|
|
3460
|
+
if (onEditActivate) {
|
|
3461
|
+
onEditActivate(text);
|
|
3462
|
+
}
|
|
3463
|
+
}, [onEditActivate, text]);
|
|
3464
|
+
const onCheckClick = useCallback(() => {
|
|
3465
|
+
setText(input);
|
|
3466
|
+
setIsEditMode(false);
|
|
3467
|
+
if (onEditConfirm) {
|
|
3468
|
+
onEditConfirm(input);
|
|
3469
|
+
}
|
|
3470
|
+
}, [onEditConfirm, input]);
|
|
3471
|
+
const onCancelClick = useCallback(() => {
|
|
3472
|
+
setIsEditMode(false);
|
|
3473
|
+
const prevInput = input;
|
|
3474
|
+
setInput(text);
|
|
3475
|
+
if (onEditCancel) {
|
|
3476
|
+
onEditCancel(prevInput);
|
|
3477
|
+
}
|
|
3478
|
+
}, [text, input, onEditCancel]);
|
|
3479
|
+
const handleKeyDown = useCallback(
|
|
3480
|
+
(e) => {
|
|
3481
|
+
if (mode !== "keys") {
|
|
3482
|
+
return;
|
|
3483
|
+
}
|
|
3484
|
+
switch (e.key) {
|
|
3485
|
+
case "Enter":
|
|
3486
|
+
if (!isConfirmDisabled)
|
|
3487
|
+
onCheckClick();
|
|
3488
|
+
break;
|
|
3489
|
+
case "Escape":
|
|
3490
|
+
onCancelClick();
|
|
3491
|
+
break;
|
|
3492
|
+
}
|
|
3493
|
+
},
|
|
3494
|
+
[onCheckClick, onCancelClick, isConfirmDisabled, mode]
|
|
3495
|
+
);
|
|
3496
|
+
return /* @__PURE__ */ jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxs(Flex, { className: styles.editableTextContainer, gap: "3", ...props, children: [
|
|
3497
|
+
/* @__PURE__ */ jsx(
|
|
3498
|
+
Input,
|
|
3499
|
+
{
|
|
3500
|
+
className: classNames(
|
|
3501
|
+
isEditMode ? styles.editableTextInput : styles.editableTextText,
|
|
3502
|
+
isEditMode ? inputClassName : textClassName
|
|
3503
|
+
),
|
|
3504
|
+
onClick: () => !isEditMode && mode === "keys" && onPencilClick(),
|
|
3505
|
+
value: isEditMode ? input : text,
|
|
3506
|
+
onChange: onInputChange,
|
|
3507
|
+
ref,
|
|
3508
|
+
onKeyDown: handleKeyDown,
|
|
3509
|
+
autoFocus: true,
|
|
3510
|
+
size,
|
|
3511
|
+
variant,
|
|
3512
|
+
severity,
|
|
3513
|
+
readOnly: !isEditMode,
|
|
3514
|
+
style: isEditMode ? void 0 : {
|
|
3515
|
+
cursor: mode === "keys" ? "text" : "unset"
|
|
3516
|
+
},
|
|
3517
|
+
...rest
|
|
3518
|
+
}
|
|
3519
|
+
),
|
|
3520
|
+
mode === "buttons" && (isEditMode ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3521
|
+
/* @__PURE__ */ jsx(
|
|
3522
|
+
IconButton,
|
|
3523
|
+
{
|
|
3524
|
+
className: classNames(iconClassName, styles.icon, !isHovered && styles.iconHidden),
|
|
3525
|
+
size,
|
|
3526
|
+
variant: buttonVariant,
|
|
3527
|
+
severity,
|
|
3528
|
+
disabled: isConfirmDisabled,
|
|
3529
|
+
onClick: onCheckClick,
|
|
3530
|
+
"aria-label": "Confirm edit",
|
|
3531
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
3532
|
+
}
|
|
3533
|
+
),
|
|
3534
|
+
/* @__PURE__ */ jsx(
|
|
3535
|
+
IconButton,
|
|
3536
|
+
{
|
|
3537
|
+
className: classNames(iconClassName, styles.icon, !isHovered && styles.iconHidden),
|
|
3538
|
+
color: "red",
|
|
3539
|
+
size,
|
|
3540
|
+
variant: buttonVariant,
|
|
3541
|
+
severity,
|
|
3542
|
+
onClick: onCancelClick,
|
|
3543
|
+
"aria-label": "Cancel edit",
|
|
3544
|
+
children: /* @__PURE__ */ jsx(Cross1Icon, {})
|
|
3545
|
+
}
|
|
3546
|
+
)
|
|
3547
|
+
] }) : /* @__PURE__ */ jsx(
|
|
3548
|
+
IconButton,
|
|
3549
|
+
{
|
|
3550
|
+
className: classNames(
|
|
3551
|
+
iconClassName,
|
|
3552
|
+
styles.editIcon,
|
|
3553
|
+
styles.icon,
|
|
3554
|
+
!isHovered && styles.iconHidden
|
|
3555
|
+
),
|
|
3556
|
+
size,
|
|
3557
|
+
variant: buttonVariant,
|
|
3558
|
+
severity,
|
|
3559
|
+
onClick: onPencilClick,
|
|
3560
|
+
"aria-label": "Edit text",
|
|
3561
|
+
children: /* @__PURE__ */ jsx(Pencil1Icon, {})
|
|
3562
|
+
}
|
|
3563
|
+
))
|
|
3564
|
+
] }) });
|
|
3565
|
+
});
|
|
3566
|
+
const ConfirmEditInput = React.memo(_ConfirmEditInput);
|
|
3156
3567
|
export {
|
|
3157
3568
|
AccessibleIcon,
|
|
3158
3569
|
AlertDialog,
|
|
@@ -3171,11 +3582,17 @@ export {
|
|
|
3171
3582
|
Card2 as Card,
|
|
3172
3583
|
Checkbox,
|
|
3173
3584
|
Code,
|
|
3585
|
+
ConfirmEditInput,
|
|
3174
3586
|
Container,
|
|
3175
|
-
ContextMenu,
|
|
3176
3587
|
DefaultTheme,
|
|
3177
3588
|
Dialog,
|
|
3589
|
+
DropdownItemMenu,
|
|
3178
3590
|
DropdownMenu,
|
|
3591
|
+
DropdownMenuItemGroup,
|
|
3592
|
+
DropdownMenuMultiSelectGroup,
|
|
3593
|
+
DropdownMenuSelectGroup,
|
|
3594
|
+
DropdownMenuSubMenuGroup,
|
|
3595
|
+
DropdownMultiSelect,
|
|
3179
3596
|
DropdownSelect,
|
|
3180
3597
|
Em,
|
|
3181
3598
|
Flex,
|
|
@@ -3187,7 +3604,7 @@ export {
|
|
|
3187
3604
|
IconColorUtility,
|
|
3188
3605
|
Input,
|
|
3189
3606
|
Inset2 as Inset,
|
|
3190
|
-
Kbd,
|
|
3607
|
+
Kbd2 as Kbd,
|
|
3191
3608
|
LeftAndRightPanels,
|
|
3192
3609
|
Link2 as Link,
|
|
3193
3610
|
MultiPagePopover,
|
|
@@ -3211,7 +3628,7 @@ export {
|
|
|
3211
3628
|
Switch,
|
|
3212
3629
|
Table,
|
|
3213
3630
|
Tabs,
|
|
3214
|
-
Text,
|
|
3631
|
+
Text$1 as Text,
|
|
3215
3632
|
TextArea,
|
|
3216
3633
|
TextField2 as TextField,
|
|
3217
3634
|
Theme2 as Theme,
|
|
@@ -3227,9 +3644,13 @@ export {
|
|
|
3227
3644
|
updateThemeAppearanceClass,
|
|
3228
3645
|
useAlertDialog,
|
|
3229
3646
|
useDiscardAlertDialog,
|
|
3647
|
+
useKeyboardShortcut,
|
|
3230
3648
|
useSeverityColor,
|
|
3649
|
+
useStopEventPropagation,
|
|
3650
|
+
useTextFilter,
|
|
3231
3651
|
useThemeContext2 as useThemeContext,
|
|
3232
3652
|
useToast,
|
|
3233
|
-
useViewportSize
|
|
3653
|
+
useViewportSize,
|
|
3654
|
+
useWrapCallbackInDialogClose
|
|
3234
3655
|
};
|
|
3235
3656
|
//# sourceMappingURL=blocks.js.map
|