@overmap-ai/blocks 1.0.38 → 1.0.39-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/Content.d.ts +10 -3
- package/dist/AlertDialog/Provider.d.ts +8 -2
- package/dist/AlertDialog/index.d.ts +1 -1
- package/dist/Avatar/Fallback.d.ts +7 -3
- package/dist/Avatar/Image.d.ts +7 -3
- package/dist/Avatar/Root.d.ts +12 -3
- package/dist/Avatar/index.d.ts +3 -3
- package/dist/Badge/Badge.d.ts +13 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts +10 -4
- package/dist/Buttons/Button.d.ts +12 -3
- package/dist/Buttons/IconButton.d.ts +12 -3
- package/dist/Card/Card.d.ts +12 -3
- package/dist/Checkbox/Indicator.d.ts +7 -3
- package/dist/Checkbox/Root.d.ts +12 -3
- package/dist/Checkbox/index.d.ts +2 -2
- package/dist/CheckboxGroup/Item.d.ts +10 -0
- package/dist/CheckboxGroup/Root.d.ts +12 -0
- package/dist/CheckboxGroup/SelectAllItem.d.ts +9 -0
- package/dist/CommandMenu/CheckboxIndicator.d.ts +1 -1
- package/dist/CommandMenu/CheckboxItem.d.ts +1 -1
- package/dist/CommandMenu/Page.d.ts +1 -1
- package/dist/CommandMenu/PageTriggerItem.d.ts +1 -1
- package/dist/CommandMenu/Pages.d.ts +1 -1
- package/dist/CommandMenu/SelectedIndicator.d.ts +1 -1
- package/dist/CommandMenu/index.d.ts +6 -6
- package/dist/DayPicker/DayPicker.d.ts +11 -1
- package/dist/Dialog/Content.d.ts +11 -3
- package/dist/Dialog/Overlay.d.ts +9 -3
- package/dist/Dialog/Root.d.ts +12 -1
- package/dist/Dialog/index.d.ts +3 -3
- package/dist/Heading/Heading.d.ts +14 -3
- package/dist/HoverCard/Arrow.d.ts +3 -3
- package/dist/HoverCard/Content.d.ts +14 -3
- package/dist/HoverCard/index.d.ts +2 -2
- package/dist/Input/Field.d.ts +7 -3
- package/dist/Input/Root.d.ts +12 -3
- package/dist/Input/Slot.d.ts +8 -3
- package/dist/Input/index.d.ts +3 -3
- package/dist/Layout/Container.d.ts +7 -3
- package/dist/Layout/Root.d.ts +9 -7
- package/dist/Layout/SlideOut.d.ts +5 -9
- package/dist/Layout/SlideOutOverlay.d.ts +8 -5
- package/dist/Layout/SlideOutTrigger.d.ts +7 -5
- package/dist/Layout/context.d.ts +3 -7
- package/dist/Layout/index.d.ts +11 -12
- package/dist/Link/Link.d.ts +13 -3
- package/dist/Menu/ClickTrigger/ClickTrigger.d.ts +7 -1
- package/dist/Menu/Content/Content.d.ts +9 -0
- package/dist/Menu/Item/Item.d.ts +9 -0
- package/dist/Menu/index.d.ts +1 -1
- package/dist/Menu/root/Root.d.ts +13 -0
- package/dist/Popover/Arrow.d.ts +3 -3
- package/dist/Popover/Content.d.ts +13 -3
- package/dist/Popover/index.d.ts +2 -2
- package/dist/Progress/Progress.d.ts +11 -0
- package/dist/Provider/Provider.d.ts +8 -1
- package/dist/RadioGroup/Indicator.d.ts +3 -3
- package/dist/RadioGroup/Item.d.ts +10 -3
- package/dist/RadioGroup/Root.d.ts +11 -3
- package/dist/RadioGroup/index.d.ts +3 -3
- package/dist/RiIcon/RiIcon.d.ts +3 -3
- package/dist/SegmentedControl/Item.d.ts +7 -3
- package/dist/SegmentedControl/Root.d.ts +13 -3
- package/dist/SegmentedControl/index.d.ts +2 -2
- package/dist/SegmentedTabs/List.d.ts +3 -3
- package/dist/SegmentedTabs/Root.d.ts +3 -3
- package/dist/SegmentedTabs/Trigger.d.ts +3 -3
- package/dist/SegmentedTabs/index.d.ts +3 -3
- package/dist/Separator/Separator.d.ts +11 -3
- package/dist/SlideOut/SlideOut.d.ts +3 -3
- package/dist/Slider/Slider.d.ts +10 -0
- package/dist/Spinner/Spinner.d.ts +4 -0
- package/dist/Switch/Root.d.ts +11 -3
- package/dist/Switch/Thumb.d.ts +8 -3
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Table/Body.d.ts +7 -3
- package/dist/Table/Cell.d.ts +7 -3
- package/dist/Table/ColumnHeaderCell.d.ts +3 -3
- package/dist/Table/Footer.d.ts +3 -3
- package/dist/Table/Header.d.ts +7 -3
- package/dist/Table/Root.d.ts +12 -3
- package/dist/Table/Row.d.ts +7 -3
- package/dist/Table/RowHeaderCell.d.ts +3 -3
- package/dist/Table/index.d.ts +8 -8
- package/dist/Tabs/List.d.ts +10 -3
- package/dist/Tabs/Root.d.ts +7 -3
- package/dist/Tabs/Trigger.d.ts +7 -3
- package/dist/Tabs/index.d.ts +3 -3
- package/dist/Text/Text.d.ts +13 -3
- package/dist/TextArea/TextArea.d.ts +13 -3
- package/dist/Toast/Toast.d.ts +14 -0
- package/dist/Toast/ToastProvider.d.ts +7 -0
- package/dist/Toast/typings.d.ts +2 -2
- package/dist/ToggleButton/BaseToggleButton.d.ts +1 -1
- package/dist/ToggleButton/IconToggleButton.d.ts +1 -1
- package/dist/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/ToggleButton/typings.d.ts +2 -1
- package/dist/ToggleGroup/Item.d.ts +4 -0
- package/dist/ToggleGroup/Root.d.ts +9 -0
- package/dist/Tooltip/Arrow.d.ts +3 -3
- package/dist/Tooltip/Content.d.ts +13 -3
- package/dist/Tooltip/index.d.ts +2 -2
- package/dist/blocks.js +634 -598
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +634 -598
- package/dist/blocks.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/blocks.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as RadixAlertDialog from "@radix-ui/react-alert-dialog";
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { cva, cx } from "class-variance-authority";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
import React__default, { createContext, useContext,
|
|
5
|
+
import React__default, { createContext, useContext, memo, useMemo, useState, useCallback, useEffect, useLayoutEffect, use, useRef } from "react";
|
|
6
6
|
import * as RadixAvatar from "@radix-ui/react-avatar";
|
|
7
7
|
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
8
8
|
import { useMediaQuery } from "react-responsive";
|
|
@@ -106,7 +106,7 @@ const useProvider = () => {
|
|
|
106
106
|
}
|
|
107
107
|
return context;
|
|
108
108
|
};
|
|
109
|
-
const Provider = (props) => {
|
|
109
|
+
const Provider = memo((props) => {
|
|
110
110
|
const { accentColor, radius = "md", children } = props;
|
|
111
111
|
const contextValue = useMemo(
|
|
112
112
|
() => ({
|
|
@@ -116,7 +116,8 @@ const Provider = (props) => {
|
|
|
116
116
|
[accentColor, radius]
|
|
117
117
|
);
|
|
118
118
|
return /* @__PURE__ */ jsx(ProviderContext.Provider, { value: contextValue, children });
|
|
119
|
-
};
|
|
119
|
+
});
|
|
120
|
+
Provider.displayName = "Provider";
|
|
120
121
|
const dialogOverlay = cva([
|
|
121
122
|
"fixed",
|
|
122
123
|
"inset-0",
|
|
@@ -174,9 +175,9 @@ const dialogContent = cva(
|
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
177
|
);
|
|
177
|
-
const AlertDialogContent =
|
|
178
|
+
const AlertDialogContent = memo((props) => {
|
|
178
179
|
const { radius } = useProvider();
|
|
179
|
-
const { className, size: size2, container, ...rest } = props;
|
|
180
|
+
const { ref, children, className, size: size2, container, ...rest } = props;
|
|
180
181
|
return /* @__PURE__ */ jsxs(RadixAlertDialog.Portal, { container, children: [
|
|
181
182
|
/* @__PURE__ */ jsx(RadixAlertDialog.Overlay, { className: dialogOverlay({}), "data-floating-content": "" }),
|
|
182
183
|
/* @__PURE__ */ jsx(
|
|
@@ -185,7 +186,8 @@ const AlertDialogContent = forwardRef((props, ref) => {
|
|
|
185
186
|
className: cx(dialogContent({ size: size2 }), radiusCva({ radius, maxLarge: true }), className),
|
|
186
187
|
ref,
|
|
187
188
|
"data-floating-content": "",
|
|
188
|
-
...rest
|
|
189
|
+
...rest,
|
|
190
|
+
children
|
|
189
191
|
}
|
|
190
192
|
)
|
|
191
193
|
] });
|
|
@@ -202,7 +204,7 @@ const useAlertDialog = () => {
|
|
|
202
204
|
return alertDialogContext;
|
|
203
205
|
};
|
|
204
206
|
const ButtonGroupContext = createContext({});
|
|
205
|
-
const ButtonGroup = (props) => {
|
|
207
|
+
const ButtonGroup = memo((props) => {
|
|
206
208
|
const providerContext = useProvider();
|
|
207
209
|
const {
|
|
208
210
|
children,
|
|
@@ -222,7 +224,7 @@ const ButtonGroup = (props) => {
|
|
|
222
224
|
[accentColor, radius, size2, variant]
|
|
223
225
|
);
|
|
224
226
|
return /* @__PURE__ */ jsx("div", { ...rest, children: /* @__PURE__ */ jsx(ButtonGroupContext.Provider, { value, children }) });
|
|
225
|
-
};
|
|
227
|
+
});
|
|
226
228
|
ButtonGroup.displayName = "Buttons";
|
|
227
229
|
const useButtonGroup = () => useContext(ButtonGroupContext);
|
|
228
230
|
const buttonCva = cva(
|
|
@@ -378,65 +380,57 @@ const buttonCva = cva(
|
|
|
378
380
|
}
|
|
379
381
|
}
|
|
380
382
|
);
|
|
381
|
-
const Button = memo(
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
"
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
"data-accent-color": accentColor,
|
|
433
|
-
...rest,
|
|
434
|
-
children
|
|
435
|
-
}
|
|
436
|
-
);
|
|
437
|
-
})
|
|
438
|
-
);
|
|
439
|
-
const AlertDialogProvider = (props) => {
|
|
383
|
+
const Button = memo((props) => {
|
|
384
|
+
const providerContext = useProvider();
|
|
385
|
+
const buttonsContext = useButtonGroup();
|
|
386
|
+
const {
|
|
387
|
+
ref,
|
|
388
|
+
children,
|
|
389
|
+
className,
|
|
390
|
+
variant = buttonsContext.variant,
|
|
391
|
+
size: size2 = buttonsContext.size,
|
|
392
|
+
radius = buttonsContext.radius ?? providerContext.radius,
|
|
393
|
+
accentColor = buttonsContext.accentColor ?? providerContext.accentColor,
|
|
394
|
+
...rest
|
|
395
|
+
} = props;
|
|
396
|
+
return /* @__PURE__ */ jsx(
|
|
397
|
+
"button",
|
|
398
|
+
{
|
|
399
|
+
className: cx(buttonCva({ size: size2, icon: false, variant }), radiusCva({ radius, maxLarge: false }), className),
|
|
400
|
+
ref,
|
|
401
|
+
"data-accent-color": accentColor,
|
|
402
|
+
...rest,
|
|
403
|
+
children
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
});
|
|
407
|
+
Button.displayName = "Button";
|
|
408
|
+
const IconButton = memo((props) => {
|
|
409
|
+
const providerContext = useProvider();
|
|
410
|
+
const buttonsContext = useButtonGroup();
|
|
411
|
+
const {
|
|
412
|
+
ref,
|
|
413
|
+
children,
|
|
414
|
+
className,
|
|
415
|
+
variant = buttonsContext.variant,
|
|
416
|
+
size: size2 = buttonsContext.size,
|
|
417
|
+
radius = buttonsContext.radius ?? providerContext.radius,
|
|
418
|
+
accentColor = buttonsContext.accentColor ?? providerContext.accentColor,
|
|
419
|
+
...rest
|
|
420
|
+
} = props;
|
|
421
|
+
return /* @__PURE__ */ jsx(
|
|
422
|
+
"button",
|
|
423
|
+
{
|
|
424
|
+
className: cx(buttonCva({ size: size2, icon: true, variant }), radiusCva({ radius, maxLarge: false }), className),
|
|
425
|
+
ref,
|
|
426
|
+
"data-accent-color": accentColor,
|
|
427
|
+
...rest,
|
|
428
|
+
children
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
});
|
|
432
|
+
IconButton.displayName = "IconButton";
|
|
433
|
+
const AlertDialogProvider = memo((props) => {
|
|
440
434
|
const { children } = props;
|
|
441
435
|
const [open, setOpen] = useState(false);
|
|
442
436
|
const [options, setOptions] = useState(null);
|
|
@@ -475,7 +469,8 @@ const AlertDialogProvider = (props) => {
|
|
|
475
469
|
] })
|
|
476
470
|
] }) }) })
|
|
477
471
|
] });
|
|
478
|
-
};
|
|
472
|
+
});
|
|
473
|
+
AlertDialogProvider.displayName = "AlertDialogProvider";
|
|
479
474
|
const AlertDialog = {
|
|
480
475
|
Content: AlertDialogContent,
|
|
481
476
|
Trigger: RadixAlertDialog.Trigger,
|
|
@@ -513,14 +508,14 @@ const avatarFallback = cva(["flex", "items-center", "justify-center", "size-full
|
|
|
513
508
|
variant: "solid"
|
|
514
509
|
}
|
|
515
510
|
});
|
|
516
|
-
const AvatarFallback =
|
|
517
|
-
const { className, ...rest } = props;
|
|
511
|
+
const AvatarFallback = memo((props) => {
|
|
512
|
+
const { ref, children, className, ...rest } = props;
|
|
518
513
|
const { variant } = useContext(AvatarContext);
|
|
519
|
-
return /* @__PURE__ */ jsx(RadixAvatar.AvatarFallback, { className: cx(avatarFallback({ variant }), className), ref, ...rest });
|
|
514
|
+
return /* @__PURE__ */ jsx(RadixAvatar.AvatarFallback, { className: cx(avatarFallback({ variant }), className), ref, ...rest, children });
|
|
520
515
|
});
|
|
521
516
|
AvatarFallback.displayName = "AvatarFallback";
|
|
522
|
-
const AvatarImage =
|
|
523
|
-
const { className, ...rest } = props;
|
|
517
|
+
const AvatarImage = memo((props) => {
|
|
518
|
+
const { ref, className, ...rest } = props;
|
|
524
519
|
return /* @__PURE__ */ jsx(
|
|
525
520
|
RadixAvatar.Image,
|
|
526
521
|
{
|
|
@@ -531,15 +526,16 @@ const AvatarImage = forwardRef((props, ref) => {
|
|
|
531
526
|
);
|
|
532
527
|
});
|
|
533
528
|
AvatarImage.displayName = "AvatarImage";
|
|
534
|
-
const AvatarRoot =
|
|
529
|
+
const AvatarRoot = memo((props) => {
|
|
535
530
|
const providerContext = useProvider();
|
|
536
531
|
const {
|
|
532
|
+
ref,
|
|
533
|
+
children,
|
|
537
534
|
className,
|
|
538
535
|
size: size2,
|
|
539
536
|
variant = "solid",
|
|
540
537
|
accentColor = providerContext.accentColor,
|
|
541
538
|
radius = providerContext.radius,
|
|
542
|
-
children,
|
|
543
539
|
...rest
|
|
544
540
|
} = props;
|
|
545
541
|
return /* @__PURE__ */ jsx(
|
|
@@ -638,9 +634,10 @@ const badge = cva(["inline-flex", "items-center", "shrink-0", "whitespace-nowrap
|
|
|
638
634
|
icon: false
|
|
639
635
|
}
|
|
640
636
|
});
|
|
641
|
-
const Badge =
|
|
637
|
+
const Badge = memo((props) => {
|
|
642
638
|
const providerContext = useProvider();
|
|
643
639
|
const {
|
|
640
|
+
ref,
|
|
644
641
|
children,
|
|
645
642
|
className,
|
|
646
643
|
accentColor = providerContext.accentColor,
|
|
@@ -682,9 +679,11 @@ const cardCva = cva([], {
|
|
|
682
679
|
variant: "surface"
|
|
683
680
|
}
|
|
684
681
|
});
|
|
685
|
-
const Card =
|
|
682
|
+
const Card = memo((props) => {
|
|
686
683
|
const providerContext = useProvider();
|
|
687
684
|
const {
|
|
685
|
+
ref,
|
|
686
|
+
children,
|
|
688
687
|
className,
|
|
689
688
|
size: size2 = "md",
|
|
690
689
|
variant = "surface",
|
|
@@ -698,19 +697,21 @@ const Card = forwardRef((props, ref) => {
|
|
|
698
697
|
ref,
|
|
699
698
|
className: cx(cardCva({ size: size2, variant }), radiusCva({ radius, maxLarge: true }), className),
|
|
700
699
|
"data-accent-color": accentColor,
|
|
701
|
-
...rest
|
|
700
|
+
...rest,
|
|
701
|
+
children
|
|
702
702
|
}
|
|
703
703
|
);
|
|
704
704
|
});
|
|
705
705
|
Card.displayName = "Card";
|
|
706
|
-
const CheckboxIndicator =
|
|
707
|
-
const { className, ...rest } = props;
|
|
706
|
+
const CheckboxIndicator = memo((props) => {
|
|
707
|
+
const { ref, children, className, ...rest } = props;
|
|
708
708
|
return /* @__PURE__ */ jsx(
|
|
709
709
|
RadixCheckbox.CheckboxIndicator,
|
|
710
710
|
{
|
|
711
711
|
className: cx("flex items-center justify-center", className),
|
|
712
712
|
ref,
|
|
713
|
-
...rest
|
|
713
|
+
...rest,
|
|
714
|
+
children
|
|
714
715
|
}
|
|
715
716
|
);
|
|
716
717
|
});
|
|
@@ -758,9 +759,11 @@ const checkbox = cva(
|
|
|
758
759
|
}
|
|
759
760
|
}
|
|
760
761
|
);
|
|
761
|
-
const CheckboxRoot =
|
|
762
|
+
const CheckboxRoot = memo((props) => {
|
|
762
763
|
const providerContext = useProvider();
|
|
763
764
|
const {
|
|
765
|
+
ref,
|
|
766
|
+
children,
|
|
764
767
|
className,
|
|
765
768
|
variant,
|
|
766
769
|
size: size2,
|
|
@@ -774,7 +777,8 @@ const CheckboxRoot = forwardRef((props, ref) => {
|
|
|
774
777
|
className: cx(checkbox({ variant, size: size2 }), radiusCva({ radius, maxLarge: true }), className),
|
|
775
778
|
ref,
|
|
776
779
|
"data-accent-color": accentColor,
|
|
777
|
-
...rest
|
|
780
|
+
...rest,
|
|
781
|
+
children
|
|
778
782
|
}
|
|
779
783
|
);
|
|
780
784
|
});
|
|
@@ -1268,7 +1272,7 @@ function getCheckedState$1(checked) {
|
|
|
1268
1272
|
function getActiveState(active) {
|
|
1269
1273
|
return active ? "active" : "inactive";
|
|
1270
1274
|
}
|
|
1271
|
-
const CommandMenuCheckboxIndicator = (props) => {
|
|
1275
|
+
const CommandMenuCheckboxIndicator = memo((props) => {
|
|
1272
1276
|
const { ref, className, children, ...rest } = props;
|
|
1273
1277
|
const checkedState = use(CheckboxIndicatorContext);
|
|
1274
1278
|
const computedChildren = useMemo(() => {
|
|
@@ -1290,7 +1294,8 @@ const CommandMenuCheckboxIndicator = (props) => {
|
|
|
1290
1294
|
children: computedChildren
|
|
1291
1295
|
}
|
|
1292
1296
|
);
|
|
1293
|
-
};
|
|
1297
|
+
});
|
|
1298
|
+
CommandMenuCheckboxIndicator.displayName = "CommandMenuCheckboxIndicator";
|
|
1294
1299
|
const commandMenuContentCva = cva(
|
|
1295
1300
|
[
|
|
1296
1301
|
"ring",
|
|
@@ -1521,14 +1526,15 @@ const CommandMenuItem = memo((props) => {
|
|
|
1521
1526
|
);
|
|
1522
1527
|
});
|
|
1523
1528
|
CommandMenuItem.displayName = "CommandMenuItem";
|
|
1524
|
-
const CommandMenuCheckboxItem = (props) => {
|
|
1529
|
+
const CommandMenuCheckboxItem = memo((props) => {
|
|
1525
1530
|
const { children, ref, checked, onCheckedChange, onSelect, ...rest } = props;
|
|
1526
1531
|
const handleSelect = useCallback(() => {
|
|
1527
1532
|
onSelect == null ? void 0 : onSelect();
|
|
1528
1533
|
onCheckedChange(checked !== true);
|
|
1529
1534
|
}, [checked, onCheckedChange, onSelect]);
|
|
1530
1535
|
return /* @__PURE__ */ jsx(CheckboxIndicatorContext, { value: checked, children: /* @__PURE__ */ jsx(CommandMenuItem, { ref, onSelect: handleSelect, "data-state": getCheckedState$1(checked), ...rest, children }) });
|
|
1531
|
-
};
|
|
1536
|
+
});
|
|
1537
|
+
CommandMenuCheckboxItem.displayName = "CommandMenuCheckboxItem";
|
|
1532
1538
|
const CommandMenuContent = memo((props) => {
|
|
1533
1539
|
const providerContext = useProvider();
|
|
1534
1540
|
const {
|
|
@@ -1655,18 +1661,20 @@ const CommandMenuOverlay = memo((props) => {
|
|
|
1655
1661
|
return /* @__PURE__ */ jsx(DialogPortal, { container, children: /* @__PURE__ */ jsx(DialogOverlay$1, { className: cx(commandMenuOverlayCva(), className), "data-floating-content": "", ...rest }) });
|
|
1656
1662
|
});
|
|
1657
1663
|
CommandMenuOverlay.displayName = "CommandMenuOverlay";
|
|
1658
|
-
const CommandMenuPage = (props) => {
|
|
1664
|
+
const CommandMenuPage = memo((props) => {
|
|
1659
1665
|
const { children, ref, page, ...rest } = props;
|
|
1660
1666
|
const { page: activePage } = use(CommandMenuPageContext);
|
|
1661
1667
|
const isActive = useMemo(() => page === activePage, [page, activePage]);
|
|
1662
1668
|
return /* @__PURE__ */ jsx("div", { ref, "data-active": getActiveState(isActive), hidden: !isActive, ...rest, children: isActive ? children : null });
|
|
1663
|
-
};
|
|
1664
|
-
|
|
1669
|
+
});
|
|
1670
|
+
CommandMenuPage.displayName = "CommandMenuPage";
|
|
1671
|
+
const CommandMenuPages = memo((props) => {
|
|
1665
1672
|
const { children, defaultPage = "", page: controlledPage, onPageChange } = props;
|
|
1666
1673
|
const [page, setPage] = useControlledState(defaultPage, controlledPage, onPageChange);
|
|
1667
1674
|
return /* @__PURE__ */ jsx(CommandMenuPageContext, { value: { page, setPage }, children });
|
|
1668
|
-
};
|
|
1669
|
-
|
|
1675
|
+
});
|
|
1676
|
+
CommandMenuPages.displayName = "CommandMenuPages";
|
|
1677
|
+
const CommandMenuPageTriggerItem = memo((props) => {
|
|
1670
1678
|
const { ref, page, onSelect, closeOnSelect = false, ...rest } = props;
|
|
1671
1679
|
const { page: activePage, setPage } = use(CommandMenuPageContext);
|
|
1672
1680
|
const isActive = useMemo(() => page === activePage, [page, activePage]);
|
|
@@ -1684,7 +1692,8 @@ const CommandMenuPageTriggerItem = (props) => {
|
|
|
1684
1692
|
...rest
|
|
1685
1693
|
}
|
|
1686
1694
|
) });
|
|
1687
|
-
};
|
|
1695
|
+
});
|
|
1696
|
+
CommandMenuPageTriggerItem.displayName = "CommandMenuPageTriggerItem";
|
|
1688
1697
|
const CommandMenuRadioGroup = genericMemo(function CommandMenuRadioGroup2(props) {
|
|
1689
1698
|
const { children, ref, required, defaultValue, value, onValueChange, ...rest } = props;
|
|
1690
1699
|
return /* @__PURE__ */ jsx(CommandMenuGroup, { ref, role: "radiogroup", ...rest, children: required ? /* @__PURE__ */ jsx(
|
|
@@ -1747,7 +1756,7 @@ const CommandMenuSelectAllItem = genericMemo(function(props) {
|
|
|
1747
1756
|
}
|
|
1748
1757
|
) });
|
|
1749
1758
|
});
|
|
1750
|
-
const CommandMenuSelectedIndicator = (props) => {
|
|
1759
|
+
const CommandMenuSelectedIndicator = memo((props) => {
|
|
1751
1760
|
const { ref, className, children, ...rest } = props;
|
|
1752
1761
|
const isSelected = use(SelectedIndicatorContext$1);
|
|
1753
1762
|
const computedChildren = useMemo(() => {
|
|
@@ -1769,7 +1778,8 @@ const CommandMenuSelectedIndicator = (props) => {
|
|
|
1769
1778
|
children: computedChildren
|
|
1770
1779
|
}
|
|
1771
1780
|
);
|
|
1772
|
-
};
|
|
1781
|
+
});
|
|
1782
|
+
CommandMenuSelectedIndicator.displayName = "CommandMenuSelectedIndicator";
|
|
1773
1783
|
const CommandMenuSeparator = memo((props) => {
|
|
1774
1784
|
const { className, ref, spacing = false, ...rest } = props;
|
|
1775
1785
|
const { size: size2 } = use(CommandMenuContext);
|
|
@@ -1958,7 +1968,7 @@ const monthCaptionCva = cva(["font-medium", "w-full", "flex", "justify-center",
|
|
|
1958
1968
|
}
|
|
1959
1969
|
}
|
|
1960
1970
|
});
|
|
1961
|
-
const DayPicker = (props) => {
|
|
1971
|
+
const DayPicker = memo((props) => {
|
|
1962
1972
|
const providerContext = useProvider();
|
|
1963
1973
|
const {
|
|
1964
1974
|
components,
|
|
@@ -2016,7 +2026,8 @@ const DayPicker = (props) => {
|
|
|
2016
2026
|
...rest
|
|
2017
2027
|
}
|
|
2018
2028
|
);
|
|
2019
|
-
};
|
|
2029
|
+
});
|
|
2030
|
+
DayPicker.displayName = "DayPicker";
|
|
2020
2031
|
const CloseDialogContext = createContext({});
|
|
2021
2032
|
const useCloseDialog = () => {
|
|
2022
2033
|
const dialogContext = useContext(CloseDialogContext);
|
|
@@ -2025,10 +2036,10 @@ const useCloseDialog = () => {
|
|
|
2025
2036
|
}
|
|
2026
2037
|
return dialogContext;
|
|
2027
2038
|
};
|
|
2028
|
-
const DialogContent =
|
|
2039
|
+
const DialogContent = memo((props) => {
|
|
2029
2040
|
const { radius } = useProvider();
|
|
2030
2041
|
const close = useCloseDialog();
|
|
2031
|
-
const { children, container, className, size: size2, ...rest } = props;
|
|
2042
|
+
const { ref, children, container, className, size: size2, ...rest } = props;
|
|
2032
2043
|
const computedChildren = useMemo(() => {
|
|
2033
2044
|
return typeof children === "function" ? children(close) : children;
|
|
2034
2045
|
}, [children, close]);
|
|
@@ -2044,20 +2055,21 @@ const DialogContent = forwardRef((props, ref) => {
|
|
|
2044
2055
|
) });
|
|
2045
2056
|
});
|
|
2046
2057
|
DialogContent.displayName = "DialogContent";
|
|
2047
|
-
const DialogOverlay =
|
|
2048
|
-
const { className, container, ...rest } = props;
|
|
2058
|
+
const DialogOverlay = memo((props) => {
|
|
2059
|
+
const { ref, children, className, container, ...rest } = props;
|
|
2049
2060
|
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container, children: /* @__PURE__ */ jsx(
|
|
2050
2061
|
RadixDialog.Overlay,
|
|
2051
2062
|
{
|
|
2052
2063
|
ref,
|
|
2053
2064
|
className: cx(dialogOverlay({}), className),
|
|
2054
2065
|
"data-floating-content": "",
|
|
2055
|
-
...rest
|
|
2066
|
+
...rest,
|
|
2067
|
+
children
|
|
2056
2068
|
}
|
|
2057
2069
|
) });
|
|
2058
2070
|
});
|
|
2059
2071
|
DialogOverlay.displayName = "DialogOverlay";
|
|
2060
|
-
const DialogRoot = (props) => {
|
|
2072
|
+
const DialogRoot = memo((props) => {
|
|
2061
2073
|
const {
|
|
2062
2074
|
children,
|
|
2063
2075
|
onOpen,
|
|
@@ -2097,7 +2109,8 @@ const DialogRoot = (props) => {
|
|
|
2097
2109
|
[handleOpenChange]
|
|
2098
2110
|
);
|
|
2099
2111
|
return /* @__PURE__ */ jsx(RadixDialog.Root, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsx(CloseDialogContext.Provider, { value: closeDialog, children }) });
|
|
2100
|
-
};
|
|
2112
|
+
});
|
|
2113
|
+
DialogRoot.displayName = "DialogRoot";
|
|
2101
2114
|
const Dialog = {
|
|
2102
2115
|
Root: DialogRoot,
|
|
2103
2116
|
Content: DialogContent,
|
|
@@ -2145,8 +2158,19 @@ const headingCva = cva([], {
|
|
|
2145
2158
|
}
|
|
2146
2159
|
}
|
|
2147
2160
|
});
|
|
2148
|
-
const Heading =
|
|
2149
|
-
const {
|
|
2161
|
+
const Heading = memo((props) => {
|
|
2162
|
+
const {
|
|
2163
|
+
ref,
|
|
2164
|
+
children,
|
|
2165
|
+
className,
|
|
2166
|
+
level = "1",
|
|
2167
|
+
size: size2,
|
|
2168
|
+
weight,
|
|
2169
|
+
align,
|
|
2170
|
+
highContrast = false,
|
|
2171
|
+
accentColor,
|
|
2172
|
+
...rest
|
|
2173
|
+
} = props;
|
|
2150
2174
|
const Tag = headingLevelTagMapping[level];
|
|
2151
2175
|
return /* @__PURE__ */ jsx(
|
|
2152
2176
|
Tag,
|
|
@@ -2161,14 +2185,15 @@ const Heading = forwardRef((props, ref) => {
|
|
|
2161
2185
|
className
|
|
2162
2186
|
),
|
|
2163
2187
|
"data-accent-color": accentColor,
|
|
2164
|
-
...rest
|
|
2188
|
+
...rest,
|
|
2189
|
+
children
|
|
2165
2190
|
}
|
|
2166
2191
|
);
|
|
2167
2192
|
});
|
|
2168
2193
|
Heading.displayName = "Heading";
|
|
2169
|
-
const HoverCardArrow =
|
|
2170
|
-
const { className, ...rest } = props;
|
|
2171
|
-
return /* @__PURE__ */ jsx(RadixHoverCard.Arrow, { className: cx("fill-(--base-6)", className), ref, ...rest });
|
|
2194
|
+
const HoverCardArrow = memo((props) => {
|
|
2195
|
+
const { ref, children, className, ...rest } = props;
|
|
2196
|
+
return /* @__PURE__ */ jsx(RadixHoverCard.Arrow, { className: cx("fill-(--base-6)", className), ref, ...rest, children });
|
|
2172
2197
|
});
|
|
2173
2198
|
HoverCardArrow.displayName = "HoverCardArrow";
|
|
2174
2199
|
const hoverCardContent = cva(["bg-(--color-background)", "dark:bg-(--base-2)", "ring-1", "ring-(--base-6)"], {
|
|
@@ -2185,9 +2210,11 @@ const hoverCardContent = cva(["bg-(--color-background)", "dark:bg-(--base-2)", "
|
|
|
2185
2210
|
size: "md"
|
|
2186
2211
|
}
|
|
2187
2212
|
});
|
|
2188
|
-
const HoverCardContent =
|
|
2213
|
+
const HoverCardContent = memo((props) => {
|
|
2189
2214
|
const providerContext = useProvider();
|
|
2190
2215
|
const {
|
|
2216
|
+
ref,
|
|
2217
|
+
children,
|
|
2191
2218
|
className,
|
|
2192
2219
|
size: size2,
|
|
2193
2220
|
side,
|
|
@@ -2211,7 +2238,8 @@ const HoverCardContent = forwardRef((props, ref) => {
|
|
|
2211
2238
|
"data-accent-color": accentColor,
|
|
2212
2239
|
sideOffset,
|
|
2213
2240
|
"data-floating-content": "",
|
|
2214
|
-
...rest
|
|
2241
|
+
...rest,
|
|
2242
|
+
children
|
|
2215
2243
|
}
|
|
2216
2244
|
) });
|
|
2217
2245
|
});
|
|
@@ -2311,22 +2339,25 @@ const inputSlot = cva(["peer/slot", "slot"], {
|
|
|
2311
2339
|
size: "md"
|
|
2312
2340
|
}
|
|
2313
2341
|
});
|
|
2314
|
-
const InputField =
|
|
2315
|
-
const { className, ...rest } = props;
|
|
2342
|
+
const InputField = memo((props) => {
|
|
2343
|
+
const { ref, children, className, ...rest } = props;
|
|
2316
2344
|
const { size: size2, variant } = useContext(InputContext);
|
|
2317
2345
|
return /* @__PURE__ */ jsx(
|
|
2318
2346
|
"input",
|
|
2319
2347
|
{
|
|
2320
2348
|
className: cx(inputField({ size: size2, variant }), "grow bg-transparent outline-0", className),
|
|
2321
2349
|
ref,
|
|
2322
|
-
...rest
|
|
2350
|
+
...rest,
|
|
2351
|
+
children
|
|
2323
2352
|
}
|
|
2324
2353
|
);
|
|
2325
2354
|
});
|
|
2326
2355
|
InputField.displayName = "InputField";
|
|
2327
|
-
const InputRoot =
|
|
2356
|
+
const InputRoot = memo((props) => {
|
|
2328
2357
|
const providerContext = useProvider();
|
|
2329
2358
|
const {
|
|
2359
|
+
ref,
|
|
2360
|
+
children,
|
|
2330
2361
|
className,
|
|
2331
2362
|
variant = "surface",
|
|
2332
2363
|
size: size2 = "md",
|
|
@@ -2340,15 +2371,16 @@ const InputRoot = forwardRef((props, ref) => {
|
|
|
2340
2371
|
className: cx(inputRoot$1({ variant, size: size2 }), radiusCva({ radius, maxLarge: false }), className),
|
|
2341
2372
|
ref,
|
|
2342
2373
|
"data-accent-color": accentColor,
|
|
2343
|
-
...rest
|
|
2374
|
+
...rest,
|
|
2375
|
+
children
|
|
2344
2376
|
}
|
|
2345
2377
|
) });
|
|
2346
2378
|
});
|
|
2347
2379
|
InputRoot.displayName = "InputRoot";
|
|
2348
|
-
const InputSlot =
|
|
2349
|
-
const { className, ...rest } = props;
|
|
2380
|
+
const InputSlot = memo((props) => {
|
|
2381
|
+
const { ref, children, className, ...rest } = props;
|
|
2350
2382
|
const { size: size2, variant } = useContext(InputContext);
|
|
2351
|
-
return /* @__PURE__ */ jsx("div", { className: cx(inputSlot({ size: size2, variant }), "flex items-center", className), ref, ...rest });
|
|
2383
|
+
return /* @__PURE__ */ jsx("div", { className: cx(inputSlot({ size: size2, variant }), "flex items-center", className), ref, ...rest, children });
|
|
2352
2384
|
});
|
|
2353
2385
|
InputSlot.displayName = "InputSlot";
|
|
2354
2386
|
const Input = {
|
|
@@ -2358,31 +2390,36 @@ const Input = {
|
|
|
2358
2390
|
};
|
|
2359
2391
|
const LayoutContext = createContext({});
|
|
2360
2392
|
const useLayoutContext = () => useContext(LayoutContext);
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
)
|
|
2368
|
-
const Root2 = memo((props) => {
|
|
2393
|
+
const LayoutContainer = memo((props) => {
|
|
2394
|
+
const { ref, children, className, ...rest } = props;
|
|
2395
|
+
const { hideLayout = false } = useLayoutContext();
|
|
2396
|
+
return !hideLayout && /* @__PURE__ */ jsx("div", { className: cx("flex h-full grow", className), ref, ...rest, children });
|
|
2397
|
+
});
|
|
2398
|
+
LayoutContainer.displayName = "LayoutContainer";
|
|
2399
|
+
const LayoutRoot = memo((props) => {
|
|
2369
2400
|
const { children, small = false, hideLayout = false } = props;
|
|
2370
|
-
const [
|
|
2371
|
-
const
|
|
2401
|
+
const [openMapping, setOpenMapping] = useState({});
|
|
2402
|
+
const isOpen = useCallback(
|
|
2403
|
+
(id) => {
|
|
2404
|
+
return openMapping[id] ?? false;
|
|
2405
|
+
},
|
|
2406
|
+
[openMapping]
|
|
2407
|
+
);
|
|
2408
|
+
const setOpen = useCallback((id, open) => {
|
|
2409
|
+
setOpenMapping((prev) => ({ ...prev, [id]: open }));
|
|
2410
|
+
}, []);
|
|
2372
2411
|
const contextValue = useMemo(
|
|
2373
2412
|
() => ({
|
|
2374
2413
|
small,
|
|
2375
2414
|
hideLayout,
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
showRightSlideOut,
|
|
2379
|
-
setShowRightSlideOut
|
|
2415
|
+
isOpen,
|
|
2416
|
+
setOpen
|
|
2380
2417
|
}),
|
|
2381
|
-
[hideLayout,
|
|
2418
|
+
[hideLayout, isOpen, setOpen, small]
|
|
2382
2419
|
);
|
|
2383
2420
|
return /* @__PURE__ */ jsx(LayoutContext.Provider, { value: contextValue, children });
|
|
2384
2421
|
});
|
|
2385
|
-
|
|
2422
|
+
LayoutRoot.displayName = "LayoutRoot";
|
|
2386
2423
|
function usePointerDownOutside(onPointerDownOutside, ownerElement = globalThis == null ? void 0 : globalThis.document.body) {
|
|
2387
2424
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
2388
2425
|
const isPointerInsideReactTreeRef = useRef(false);
|
|
@@ -2445,293 +2482,266 @@ function useCallbackRef(callback) {
|
|
|
2445
2482
|
}, []);
|
|
2446
2483
|
}
|
|
2447
2484
|
const TIMEOUT_DURATION = 200;
|
|
2448
|
-
const SlideOut = memo(
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2485
|
+
const SlideOut = memo((props) => {
|
|
2486
|
+
const {
|
|
2487
|
+
ref,
|
|
2488
|
+
children,
|
|
2489
|
+
className,
|
|
2490
|
+
style,
|
|
2491
|
+
open,
|
|
2492
|
+
hide: hide2 = false,
|
|
2493
|
+
modal = false,
|
|
2494
|
+
overlayComponent,
|
|
2495
|
+
resizeable = true,
|
|
2496
|
+
side,
|
|
2497
|
+
position = "relative",
|
|
2498
|
+
initialWidth,
|
|
2499
|
+
minWidth,
|
|
2500
|
+
maxWidth,
|
|
2501
|
+
onDismiss,
|
|
2502
|
+
onOpening,
|
|
2503
|
+
onClosed,
|
|
2504
|
+
content,
|
|
2505
|
+
...otherProps
|
|
2506
|
+
} = props;
|
|
2507
|
+
const isLeft = side === "left";
|
|
2508
|
+
const [parentContainer, setParentContainer] = useState(document.body);
|
|
2509
|
+
const childrenContainerRef = useRef(null);
|
|
2510
|
+
const localRef = useRef(null);
|
|
2511
|
+
const nodeRef = useRef(null);
|
|
2512
|
+
const mergedRefs = mergeRefs([ref, localRef, nodeRef]);
|
|
2513
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
2514
|
+
const [computedWidth, setComputedWidth] = useState(null);
|
|
2515
|
+
const prevClientX = useRef(null);
|
|
2516
|
+
const handleDismiss = useCallback(() => {
|
|
2517
|
+
if (modal && onDismiss) {
|
|
2518
|
+
onDismiss();
|
|
2519
|
+
}
|
|
2520
|
+
}, [modal, onDismiss]);
|
|
2521
|
+
const handleAssignParentContainer = useCallback((element) => {
|
|
2522
|
+
if (element) {
|
|
2523
|
+
setParentContainer(element);
|
|
2524
|
+
}
|
|
2525
|
+
}, []);
|
|
2526
|
+
useEffect(() => {
|
|
2527
|
+
if (!childrenContainerRef.current) return;
|
|
2528
|
+
const originalParentPointerEvents = childrenContainerRef.current.style.pointerEvents;
|
|
2529
|
+
if (open && modal) {
|
|
2530
|
+
childrenContainerRef.current.style.pointerEvents = "none";
|
|
2531
|
+
}
|
|
2532
|
+
return () => {
|
|
2533
|
+
if (childrenContainerRef.current) {
|
|
2534
|
+
childrenContainerRef.current.style.pointerEvents = originalParentPointerEvents;
|
|
2493
2535
|
}
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
()
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
);
|
|
2511
|
-
|
|
2536
|
+
};
|
|
2537
|
+
}, [modal, open, parentContainer.style]);
|
|
2538
|
+
const { onPointerDownCapture: handlePointerDownCapture } = usePointerDownOutside(handleDismiss, parentContainer);
|
|
2539
|
+
const CSSTransitionClassNames = useMemo(
|
|
2540
|
+
() => ({
|
|
2541
|
+
enter: isLeft ? "-ml-(--slide-out-width)" : "-mr-(--slide-out-width)",
|
|
2542
|
+
enterActive: isLeft ? "ease-linear duration-200 transition-[margin-left] ml-0" : "ease-linear duration-200 transition-[margin-right] mr-0",
|
|
2543
|
+
enterDone: isLeft ? "ml-0" : "mr-0",
|
|
2544
|
+
exitActive: isLeft ? "ease-linear duration-200 transition-[margin-left] -ml-(--slide-out-width)" : "ease-linear duration-200 transition-[margin-right] -mr-(--slide-out-width)",
|
|
2545
|
+
exitDone: isLeft ? "-ml-(--slide-out-width)" : "-mr-(--slide-out-width)"
|
|
2546
|
+
}),
|
|
2547
|
+
[isLeft]
|
|
2548
|
+
);
|
|
2549
|
+
const handleMouseDown = useCallback((e) => {
|
|
2550
|
+
const { clientX } = e;
|
|
2551
|
+
prevClientX.current = clientX;
|
|
2552
|
+
setIsResizing(true);
|
|
2553
|
+
}, []);
|
|
2554
|
+
const handleMouseMove = useCallback(
|
|
2555
|
+
(e) => {
|
|
2556
|
+
if (!isResizing) return;
|
|
2512
2557
|
const { clientX } = e;
|
|
2558
|
+
const deltaX = (clientX - prevClientX.current) * (isLeft ? 1 : -1);
|
|
2513
2559
|
prevClientX.current = clientX;
|
|
2514
|
-
|
|
2515
|
-
},
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
);
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2560
|
+
setComputedWidth((prevWidth) => prevWidth + deltaX);
|
|
2561
|
+
},
|
|
2562
|
+
[isLeft, isResizing]
|
|
2563
|
+
);
|
|
2564
|
+
const handleMouseUp = useCallback(() => {
|
|
2565
|
+
if (!isResizing) return;
|
|
2566
|
+
prevClientX.current = null;
|
|
2567
|
+
setIsResizing(false);
|
|
2568
|
+
}, [isResizing]);
|
|
2569
|
+
useEffect(() => {
|
|
2570
|
+
window.addEventListener("mousemove", handleMouseMove);
|
|
2571
|
+
window.addEventListener("mouseup", handleMouseUp);
|
|
2572
|
+
return () => {
|
|
2573
|
+
window.removeEventListener("mousemove", handleMouseMove);
|
|
2574
|
+
window.removeEventListener("mouseup", handleMouseUp);
|
|
2575
|
+
};
|
|
2576
|
+
}, [handleMouseMove, handleMouseUp]);
|
|
2577
|
+
useLayoutEffect(() => {
|
|
2578
|
+
if (!open) return;
|
|
2579
|
+
setComputedWidth(localRef.current.offsetWidth);
|
|
2580
|
+
}, [open]);
|
|
2581
|
+
const resizableStyle = useMemo(
|
|
2582
|
+
() => ({
|
|
2583
|
+
...style,
|
|
2584
|
+
width: computedWidth ?? initialWidth,
|
|
2585
|
+
maxWidth,
|
|
2586
|
+
minWidth,
|
|
2587
|
+
position,
|
|
2588
|
+
"--slide-out-width": `${computedWidth}${typeof computedWidth === "number" ? "px" : ""}`
|
|
2589
|
+
}),
|
|
2590
|
+
[computedWidth, initialWidth, maxWidth, minWidth, position, style]
|
|
2591
|
+
);
|
|
2592
|
+
const resizableEnable = useMemo(
|
|
2593
|
+
() => ({ left: resizeable && !isLeft, right: resizeable && isLeft }),
|
|
2594
|
+
[isLeft, resizeable]
|
|
2595
|
+
);
|
|
2596
|
+
const SlideOut2 = useMemo(
|
|
2597
|
+
() => (
|
|
2598
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2599
|
+
// @ts-ignore
|
|
2600
|
+
/* @__PURE__ */ jsx(
|
|
2601
|
+
CSSTransition,
|
|
2602
|
+
{
|
|
2603
|
+
classNames: CSSTransitionClassNames,
|
|
2604
|
+
in: open,
|
|
2605
|
+
timeout: TIMEOUT_DURATION,
|
|
2606
|
+
unmountOnExit: true,
|
|
2607
|
+
mountOnEnter: true,
|
|
2608
|
+
onEntering: onOpening,
|
|
2609
|
+
onExited: onClosed,
|
|
2610
|
+
nodeRef,
|
|
2611
|
+
children: /* @__PURE__ */ jsxs(
|
|
2612
|
+
"div",
|
|
2613
|
+
{
|
|
2614
|
+
className: cx(
|
|
2615
|
+
"top-0",
|
|
2616
|
+
"bottom-0",
|
|
2617
|
+
{
|
|
2618
|
+
"left-0": isLeft,
|
|
2619
|
+
"right-0": !isLeft,
|
|
2620
|
+
absolute: position === "absolute",
|
|
2621
|
+
relative: position === "relative"
|
|
2622
|
+
},
|
|
2623
|
+
className
|
|
2624
|
+
),
|
|
2625
|
+
ref: mergedRefs,
|
|
2626
|
+
onPointerDownCapture: handlePointerDownCapture,
|
|
2627
|
+
"data-side": side,
|
|
2628
|
+
style: resizableStyle,
|
|
2629
|
+
children: [
|
|
2630
|
+
/* @__PURE__ */ jsx(
|
|
2631
|
+
"div",
|
|
2579
2632
|
{
|
|
2580
|
-
"
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2633
|
+
className: cx("absolute top-0 bottom-0 w-[3px]", {
|
|
2634
|
+
"right-0": isLeft,
|
|
2635
|
+
"left-0": !isLeft,
|
|
2636
|
+
"pointer-events-none": !resizableEnable
|
|
2637
|
+
}),
|
|
2638
|
+
onMouseDown: handleMouseDown,
|
|
2639
|
+
"data-resizing": isResizing ? "" : void 0
|
|
2640
|
+
}
|
|
2586
2641
|
),
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2642
|
+
content
|
|
2643
|
+
]
|
|
2644
|
+
}
|
|
2645
|
+
)
|
|
2646
|
+
}
|
|
2647
|
+
)
|
|
2648
|
+
),
|
|
2649
|
+
[
|
|
2650
|
+
CSSTransitionClassNames,
|
|
2651
|
+
open,
|
|
2652
|
+
onOpening,
|
|
2653
|
+
onClosed,
|
|
2654
|
+
className,
|
|
2655
|
+
isLeft,
|
|
2656
|
+
position,
|
|
2657
|
+
mergedRefs,
|
|
2658
|
+
handlePointerDownCapture,
|
|
2659
|
+
side,
|
|
2660
|
+
resizableStyle,
|
|
2661
|
+
handleMouseDown,
|
|
2662
|
+
isResizing,
|
|
2663
|
+
resizableEnable,
|
|
2664
|
+
content
|
|
2665
|
+
]
|
|
2666
|
+
);
|
|
2667
|
+
return /* @__PURE__ */ jsxs(
|
|
2668
|
+
"div",
|
|
2669
|
+
{
|
|
2670
|
+
className: "relative flex h-full max-h-full w-full max-w-full overflow-hidden",
|
|
2671
|
+
ref: handleAssignParentContainer,
|
|
2672
|
+
...otherProps,
|
|
2673
|
+
children: [
|
|
2674
|
+
side === "left" && !hide2 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2675
|
+
open && overlayComponent,
|
|
2676
|
+
" ",
|
|
2677
|
+
content && SlideOut2
|
|
2678
|
+
] }),
|
|
2679
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full max-w-full grow overflow-hidden", ref: childrenContainerRef, children }),
|
|
2680
|
+
side === "right" && !hide2 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2681
|
+
open && overlayComponent,
|
|
2682
|
+
" ",
|
|
2683
|
+
content && SlideOut2
|
|
2684
|
+
] })
|
|
2627
2685
|
]
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
className: "relative flex h-full max-h-full w-full max-w-full overflow-hidden",
|
|
2633
|
-
ref: handleAssignParentContainer,
|
|
2634
|
-
children: [
|
|
2635
|
-
side === "left" && !hide2 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2636
|
-
open && overlayComponent,
|
|
2637
|
-
" ",
|
|
2638
|
-
content && SlideOut2
|
|
2639
|
-
] }),
|
|
2640
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-full max-w-full grow overflow-hidden", ref: childrenContainerRef, children }),
|
|
2641
|
-
side === "right" && !hide2 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2642
|
-
open && overlayComponent,
|
|
2643
|
-
" ",
|
|
2644
|
-
content && SlideOut2
|
|
2645
|
-
] })
|
|
2646
|
-
]
|
|
2647
|
-
}
|
|
2648
|
-
);
|
|
2649
|
-
})
|
|
2650
|
-
);
|
|
2686
|
+
}
|
|
2687
|
+
);
|
|
2688
|
+
});
|
|
2689
|
+
SlideOut.displayName = "SlideOut";
|
|
2651
2690
|
const DEFAULT_INITIAL_WIDTH = "30%";
|
|
2652
|
-
const
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
);
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
);
|
|
2707
|
-
const RightSlideOut = memo(
|
|
2708
|
-
forwardRef((props, ref) => {
|
|
2709
|
-
const { showRightSlideOut, setShowRightSlideOut } = useLayoutContext();
|
|
2710
|
-
return /* @__PURE__ */ jsx(
|
|
2711
|
-
SlideOutImpl,
|
|
2712
|
-
{
|
|
2713
|
-
side: "right",
|
|
2714
|
-
showSlideOut: showRightSlideOut,
|
|
2715
|
-
setShowSlideOut: setShowRightSlideOut,
|
|
2716
|
-
ref,
|
|
2717
|
-
...props
|
|
2718
|
-
}
|
|
2719
|
-
);
|
|
2720
|
-
})
|
|
2721
|
-
);
|
|
2722
|
-
const SlideOutOverlay = memo(
|
|
2723
|
-
forwardRef((props, ref) => {
|
|
2724
|
-
const { className, active, side, smallModeOnly = false, ...rest } = props;
|
|
2725
|
-
const { small, hideLayout, showLeftSlideOut, showRightSlideOut } = useLayoutContext();
|
|
2726
|
-
const showOverlay = useMemo(() => {
|
|
2727
|
-
if (active !== void 0) return active;
|
|
2728
|
-
if (hideLayout) return false;
|
|
2729
|
-
if (smallModeOnly && !small) return false;
|
|
2730
|
-
return side === "left" ? showLeftSlideOut : showRightSlideOut;
|
|
2731
|
-
}, [active, hideLayout, showLeftSlideOut, showRightSlideOut, side, small, smallModeOnly]);
|
|
2732
|
-
return showOverlay && /* @__PURE__ */ jsx("div", { className: cx("overmap-layout-overlay", "fixed inset-0", className), ref, ...rest });
|
|
2733
|
-
})
|
|
2734
|
-
);
|
|
2691
|
+
const LayoutSlideOut = memo((props) => {
|
|
2692
|
+
const { small, hideLayout, isOpen, setOpen } = useLayoutContext();
|
|
2693
|
+
const {
|
|
2694
|
+
ref,
|
|
2695
|
+
id,
|
|
2696
|
+
children,
|
|
2697
|
+
className,
|
|
2698
|
+
defaultOpen,
|
|
2699
|
+
side,
|
|
2700
|
+
initialWidth = DEFAULT_INITIAL_WIDTH,
|
|
2701
|
+
onDismiss,
|
|
2702
|
+
...rest
|
|
2703
|
+
} = props;
|
|
2704
|
+
const open = isOpen(id);
|
|
2705
|
+
useEffect(() => {
|
|
2706
|
+
if (small && (defaultOpen == null ? void 0 : defaultOpen.small) !== void 0) {
|
|
2707
|
+
setOpen(id, defaultOpen == null ? void 0 : defaultOpen.small);
|
|
2708
|
+
} else if (!small && (defaultOpen == null ? void 0 : defaultOpen.large) !== void 0) {
|
|
2709
|
+
setOpen(id, defaultOpen == null ? void 0 : defaultOpen.large);
|
|
2710
|
+
}
|
|
2711
|
+
}, [defaultOpen, id, setOpen, small]);
|
|
2712
|
+
const handleDismiss = useCallback(() => {
|
|
2713
|
+
setOpen(id, false);
|
|
2714
|
+
onDismiss == null ? void 0 : onDismiss();
|
|
2715
|
+
}, [id, onDismiss, setOpen]);
|
|
2716
|
+
return !hideLayout && /* @__PURE__ */ jsx(
|
|
2717
|
+
SlideOut,
|
|
2718
|
+
{
|
|
2719
|
+
className: cx(`overmap-layout-slideOut-${side}`, className),
|
|
2720
|
+
side,
|
|
2721
|
+
ref,
|
|
2722
|
+
open,
|
|
2723
|
+
initialWidth,
|
|
2724
|
+
modal: small,
|
|
2725
|
+
onDismiss: handleDismiss,
|
|
2726
|
+
position: small ? "absolute" : "relative",
|
|
2727
|
+
...rest,
|
|
2728
|
+
children
|
|
2729
|
+
}
|
|
2730
|
+
);
|
|
2731
|
+
});
|
|
2732
|
+
LayoutSlideOut.displayName = "LayoutSlideOut";
|
|
2733
|
+
const LayoutSlideOutOverlay = memo((props) => {
|
|
2734
|
+
const { ref, children, className, active, slideOutId, smallModeOnly = false, ...rest } = props;
|
|
2735
|
+
const { small, hideLayout, isOpen } = useLayoutContext();
|
|
2736
|
+
const showOverlay = useMemo(() => {
|
|
2737
|
+
if (active !== void 0) return active;
|
|
2738
|
+
if (hideLayout) return false;
|
|
2739
|
+
if (smallModeOnly && !small) return false;
|
|
2740
|
+
return isOpen(slideOutId);
|
|
2741
|
+
}, [active, hideLayout, isOpen, slideOutId, small, smallModeOnly]);
|
|
2742
|
+
return showOverlay && /* @__PURE__ */ jsx("div", { className: cx("overmap-layout-overlay", "fixed inset-0", className), ref, ...rest, children });
|
|
2743
|
+
});
|
|
2744
|
+
LayoutSlideOutOverlay.displayName = "SlideOutOverlay";
|
|
2735
2745
|
const MENU_OVERFLOW_PADDING = 20;
|
|
2736
2746
|
const MENU_CONTENT_PADDING = 8;
|
|
2737
2747
|
const MENU_MINIMUM_MAX_HEIGHT = 250;
|
|
@@ -2766,35 +2776,32 @@ function getBooleanState(value) {
|
|
|
2766
2776
|
function getOpenState(open) {
|
|
2767
2777
|
return open ? "open" : "closed";
|
|
2768
2778
|
}
|
|
2769
|
-
function nextStateBasedOnType(
|
|
2779
|
+
function nextStateBasedOnType(open, type) {
|
|
2770
2780
|
switch (type) {
|
|
2771
2781
|
case "toggle":
|
|
2772
|
-
return !
|
|
2782
|
+
return !open;
|
|
2773
2783
|
case "open":
|
|
2774
2784
|
return true;
|
|
2775
2785
|
case "close":
|
|
2776
2786
|
return false;
|
|
2777
2787
|
}
|
|
2778
2788
|
}
|
|
2779
|
-
const
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
})
|
|
2790
|
-
);
|
|
2789
|
+
const LayoutSlideOutTrigger = memo((props) => {
|
|
2790
|
+
const { ref, slideOutId, type = "toggle", children, ...rest } = props;
|
|
2791
|
+
const { isOpen, setOpen } = useLayoutContext();
|
|
2792
|
+
const open = isOpen(slideOutId);
|
|
2793
|
+
const handleClick = useCallback(() => {
|
|
2794
|
+
setOpen(slideOutId, nextStateBasedOnType(open, type));
|
|
2795
|
+
}, [open, setOpen, slideOutId, type]);
|
|
2796
|
+
return /* @__PURE__ */ jsx(Slot, { "data-state": getOpenState(open), ref, onClick: handleClick, ...rest, children });
|
|
2797
|
+
});
|
|
2798
|
+
LayoutSlideOutTrigger.displayName = "SlideOutTrigger";
|
|
2791
2799
|
const Layout = {
|
|
2792
|
-
Root:
|
|
2793
|
-
Container,
|
|
2794
|
-
SlideOutOverlay,
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
SlideOutTrigger
|
|
2800
|
+
Root: LayoutRoot,
|
|
2801
|
+
Container: LayoutContainer,
|
|
2802
|
+
SlideOutOverlay: LayoutSlideOutOverlay,
|
|
2803
|
+
SlideOut: LayoutSlideOut,
|
|
2804
|
+
SlideOutTrigger: LayoutSlideOutTrigger
|
|
2798
2805
|
};
|
|
2799
2806
|
const linkCva = cva(["cursor-pointer"], {
|
|
2800
2807
|
variants: {
|
|
@@ -2832,9 +2839,11 @@ const linkCva = cva(["cursor-pointer"], {
|
|
|
2832
2839
|
align: "left"
|
|
2833
2840
|
}
|
|
2834
2841
|
});
|
|
2835
|
-
const Link =
|
|
2842
|
+
const Link = memo((props) => {
|
|
2836
2843
|
const providerContext = useProvider();
|
|
2837
2844
|
const {
|
|
2845
|
+
ref,
|
|
2846
|
+
children,
|
|
2838
2847
|
className,
|
|
2839
2848
|
size: size2,
|
|
2840
2849
|
weight = "regular",
|
|
@@ -2856,7 +2865,8 @@ const Link = forwardRef((props, ref) => {
|
|
|
2856
2865
|
className
|
|
2857
2866
|
),
|
|
2858
2867
|
"data-accent-color": accentColor,
|
|
2859
|
-
...rest
|
|
2868
|
+
...rest,
|
|
2869
|
+
children
|
|
2860
2870
|
}
|
|
2861
2871
|
);
|
|
2862
2872
|
});
|
|
@@ -3406,27 +3416,26 @@ const MenuCheckboxItemIndicator = memo((props) => {
|
|
|
3406
3416
|
return /* @__PURE__ */ jsx(CheckedIndicator, { ref, ...rest, children });
|
|
3407
3417
|
});
|
|
3408
3418
|
MenuCheckboxItemIndicator.displayName = "MenuCheckboxItemIndicator";
|
|
3409
|
-
const MenuClickTrigger = memo(
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
);
|
|
3419
|
+
const MenuClickTrigger = memo((props) => {
|
|
3420
|
+
const { ref: forwardedRef, children, disabled = false } = props;
|
|
3421
|
+
const { getReferenceProps, refs, setTriggerType, open } = useMenuContext();
|
|
3422
|
+
const mergedRefs = useMergeRefs([refs.setReference, forwardedRef]);
|
|
3423
|
+
useEffect(() => {
|
|
3424
|
+
setTriggerType("click");
|
|
3425
|
+
}, [setTriggerType]);
|
|
3426
|
+
return /* @__PURE__ */ jsx(
|
|
3427
|
+
Slot,
|
|
3428
|
+
{
|
|
3429
|
+
ref: mergedRefs,
|
|
3430
|
+
"aria-disabled": disabled,
|
|
3431
|
+
"data-disabled": getBooleanState(disabled),
|
|
3432
|
+
"data-state": getOpenState(open),
|
|
3433
|
+
...getReferenceProps({ disabled }),
|
|
3434
|
+
children
|
|
3435
|
+
}
|
|
3436
|
+
);
|
|
3437
|
+
});
|
|
3438
|
+
MenuClickTrigger.displayName = "MenuClickTrigger";
|
|
3430
3439
|
const MenuContextTrigger = memo((props) => {
|
|
3431
3440
|
const { ref: forwardedRef, children, disabled = false } = props;
|
|
3432
3441
|
const ref = useRef(null);
|
|
@@ -3839,28 +3848,26 @@ const Menu = {
|
|
|
3839
3848
|
Separator: MenuSeparator,
|
|
3840
3849
|
Scroll: MenuScroll
|
|
3841
3850
|
};
|
|
3842
|
-
const RiIcon = memo(
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
})
|
|
3863
|
-
);
|
|
3851
|
+
const RiIcon = memo((props) => {
|
|
3852
|
+
const { ref, icon, size: size2, title, color, className, ...rest } = props;
|
|
3853
|
+
const Icon = RiIcons[icon];
|
|
3854
|
+
if (!Icon) console.error(`Icon ${icon} not found`);
|
|
3855
|
+
return Icon ? (
|
|
3856
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3857
|
+
// @ts-ignore
|
|
3858
|
+
/* @__PURE__ */ jsx(Icon, { className: cx("shrink-0", className), ref, title, size: size2, color, ...rest })
|
|
3859
|
+
) : /* @__PURE__ */ jsx(
|
|
3860
|
+
RiQuestionMark,
|
|
3861
|
+
{
|
|
3862
|
+
className: cx("shrink-0", className),
|
|
3863
|
+
ref,
|
|
3864
|
+
title,
|
|
3865
|
+
size: size2,
|
|
3866
|
+
color,
|
|
3867
|
+
...rest
|
|
3868
|
+
}
|
|
3869
|
+
);
|
|
3870
|
+
});
|
|
3864
3871
|
RiIcon.displayName = "RiIcon";
|
|
3865
3872
|
const centerStyles = { placeSelf: "center" };
|
|
3866
3873
|
const ErrorFallback = memo((props) => {
|
|
@@ -3902,9 +3909,9 @@ const OvermapErrorBoundary = memo((props) => {
|
|
|
3902
3909
|
);
|
|
3903
3910
|
});
|
|
3904
3911
|
OvermapErrorBoundary.displayName = "OvermapErrorBoundary";
|
|
3905
|
-
const PopoverArrow =
|
|
3906
|
-
const { className, ...rest } = props;
|
|
3907
|
-
return /* @__PURE__ */ jsx(RadixPopover.Arrow, { className: cx("fill-(--base-6)", className), ref, ...rest });
|
|
3912
|
+
const PopoverArrow = memo((props) => {
|
|
3913
|
+
const { ref, children, className, ...rest } = props;
|
|
3914
|
+
return /* @__PURE__ */ jsx(RadixPopover.Arrow, { className: cx("fill-(--base-6)", className), ref, ...rest, children });
|
|
3908
3915
|
});
|
|
3909
3916
|
PopoverArrow.displayName = "PopoverArrow";
|
|
3910
3917
|
const popoverContent = cva(["bg-(--color-background)", "dark:bg-(--base-2)", "ring-1", "ring-(--base-6)"], {
|
|
@@ -3921,9 +3928,11 @@ const popoverContent = cva(["bg-(--color-background)", "dark:bg-(--base-2)", "ri
|
|
|
3921
3928
|
size: "md"
|
|
3922
3929
|
}
|
|
3923
3930
|
});
|
|
3924
|
-
const PopoverContent =
|
|
3931
|
+
const PopoverContent = memo((props) => {
|
|
3925
3932
|
const providerContext = useProvider();
|
|
3926
3933
|
const {
|
|
3934
|
+
ref,
|
|
3935
|
+
children,
|
|
3927
3936
|
className,
|
|
3928
3937
|
radius = providerContext.radius,
|
|
3929
3938
|
accentColor = providerContext.accentColor,
|
|
@@ -3945,7 +3954,8 @@ const PopoverContent = forwardRef((props, ref) => {
|
|
|
3945
3954
|
sideOffset,
|
|
3946
3955
|
"data-accent-color": accentColor,
|
|
3947
3956
|
"data-floating-content": "",
|
|
3948
|
-
...rest
|
|
3957
|
+
...rest,
|
|
3958
|
+
children
|
|
3949
3959
|
}
|
|
3950
3960
|
) });
|
|
3951
3961
|
});
|
|
@@ -4133,14 +4143,15 @@ const RadioCards = {
|
|
|
4133
4143
|
Root: RadioCardsRoot,
|
|
4134
4144
|
Item: RadioCardsItem
|
|
4135
4145
|
};
|
|
4136
|
-
const RadioGroupIndicator =
|
|
4137
|
-
const { className, ...rest } = props;
|
|
4146
|
+
const RadioGroupIndicator = memo((props) => {
|
|
4147
|
+
const { ref, children, className, ...rest } = props;
|
|
4138
4148
|
return /* @__PURE__ */ jsx(
|
|
4139
4149
|
RadixRadioGroup.Indicator,
|
|
4140
4150
|
{
|
|
4141
4151
|
className: cx("inline-flex items-center justify-center", className),
|
|
4142
4152
|
ref,
|
|
4143
|
-
...rest
|
|
4153
|
+
...rest,
|
|
4154
|
+
children
|
|
4144
4155
|
}
|
|
4145
4156
|
);
|
|
4146
4157
|
});
|
|
@@ -4189,27 +4200,33 @@ const radioGroupItem = cva(
|
|
|
4189
4200
|
}
|
|
4190
4201
|
}
|
|
4191
4202
|
);
|
|
4192
|
-
const RadioGroupItem = memo(
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4203
|
+
const RadioGroupItem = memo((props) => {
|
|
4204
|
+
const radioGroupContext = useContext(RadioGroupContext);
|
|
4205
|
+
const {
|
|
4206
|
+
ref,
|
|
4207
|
+
children,
|
|
4208
|
+
className,
|
|
4209
|
+
size: size2 = radioGroupContext.size,
|
|
4210
|
+
variant = radioGroupContext.variant,
|
|
4211
|
+
...rest
|
|
4212
|
+
} = props;
|
|
4213
|
+
return /* @__PURE__ */ jsx(RadixRadioGroup.Item, { className: cx(radioGroupItem({ size: size2, variant }), className), ref, ...rest, children });
|
|
4214
|
+
});
|
|
4215
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
4216
|
+
const RadioGroupRoot = memo((props) => {
|
|
4217
|
+
const providerContext = useProvider();
|
|
4218
|
+
const {
|
|
4219
|
+
ref,
|
|
4220
|
+
className,
|
|
4221
|
+
accentColor = providerContext.accentColor,
|
|
4222
|
+
variant = "surface",
|
|
4223
|
+
size: size2 = "md",
|
|
4224
|
+
children,
|
|
4225
|
+
...rest
|
|
4226
|
+
} = props;
|
|
4227
|
+
return /* @__PURE__ */ jsx(RadixRadioGroup.Root, { className: cx(className), ref, "data-accent-color": accentColor, ...rest, children: /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: { variant, size: size2 }, children }) });
|
|
4228
|
+
});
|
|
4229
|
+
RadioGroupRoot.displayName = "RadioGroupRoot";
|
|
4213
4230
|
const RadioGroup = {
|
|
4214
4231
|
Indicator: RadioGroupIndicator,
|
|
4215
4232
|
Item: RadioGroupItem,
|
|
@@ -4366,8 +4383,8 @@ const useSegmentedControl = () => {
|
|
|
4366
4383
|
}
|
|
4367
4384
|
return segmentedControlContext;
|
|
4368
4385
|
};
|
|
4369
|
-
const SegmentedControlItem =
|
|
4370
|
-
const { className, ...rest } = props;
|
|
4386
|
+
const SegmentedControlItem = memo((props) => {
|
|
4387
|
+
const { ref, className, ...rest } = props;
|
|
4371
4388
|
const { size: size2, radius, variant, icon } = useSegmentedControl();
|
|
4372
4389
|
return /* @__PURE__ */ jsx(
|
|
4373
4390
|
RadixToggleGroup.Item,
|
|
@@ -4379,11 +4396,12 @@ const SegmentedControlItem = forwardRef((props, ref) => {
|
|
|
4379
4396
|
);
|
|
4380
4397
|
});
|
|
4381
4398
|
SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
4382
|
-
const SegmentedControlRoot =
|
|
4399
|
+
const SegmentedControlRoot = memo((props) => {
|
|
4383
4400
|
const providerContext = useProvider();
|
|
4384
4401
|
const {
|
|
4385
|
-
|
|
4402
|
+
ref,
|
|
4386
4403
|
children,
|
|
4404
|
+
className,
|
|
4387
4405
|
size: size2 = "md",
|
|
4388
4406
|
variant = "surface",
|
|
4389
4407
|
icon = false,
|
|
@@ -4560,9 +4578,10 @@ const segmentedTabsTriggerCva = cva(
|
|
|
4560
4578
|
}
|
|
4561
4579
|
}
|
|
4562
4580
|
);
|
|
4563
|
-
const SegmentedTabsList =
|
|
4581
|
+
const SegmentedTabsList = memo((props) => {
|
|
4564
4582
|
const providerContext = useProvider();
|
|
4565
4583
|
const {
|
|
4584
|
+
ref,
|
|
4566
4585
|
children,
|
|
4567
4586
|
className,
|
|
4568
4587
|
size: size2 = "md",
|
|
@@ -4591,13 +4610,13 @@ const SegmentedTabsList = forwardRef((props, ref) => {
|
|
|
4591
4610
|
);
|
|
4592
4611
|
});
|
|
4593
4612
|
SegmentedTabsList.displayName = "TabsList";
|
|
4594
|
-
const SegmentedTabsRoot =
|
|
4595
|
-
const { className, ...rest } = props;
|
|
4613
|
+
const SegmentedTabsRoot = memo((props) => {
|
|
4614
|
+
const { ref, className, ...rest } = props;
|
|
4596
4615
|
return /* @__PURE__ */ jsx(RadixTabs.Root, { ref, className: cx("flex flex-col", className), ...rest });
|
|
4597
4616
|
});
|
|
4598
4617
|
SegmentedTabsRoot.displayName = "TabsRoot";
|
|
4599
|
-
const SegmentedTabsTrigger =
|
|
4600
|
-
const {
|
|
4618
|
+
const SegmentedTabsTrigger = memo((props) => {
|
|
4619
|
+
const { ref, children, className, ...rest } = props;
|
|
4601
4620
|
const { size: size2, radius, variant } = use(SegmentedTabsListContext);
|
|
4602
4621
|
return /* @__PURE__ */ jsx(
|
|
4603
4622
|
RadixTabs.Trigger,
|
|
@@ -4698,8 +4717,8 @@ const separator = cva(["shrink-0", "bg-(--accent-6)"], {
|
|
|
4698
4717
|
orientation: "horizontal"
|
|
4699
4718
|
}
|
|
4700
4719
|
});
|
|
4701
|
-
const Separator =
|
|
4702
|
-
const { className, accentColor = "base", orientation, size: size2, ...rest } = props;
|
|
4720
|
+
const Separator = memo((props) => {
|
|
4721
|
+
const { ref, className, accentColor = "base", orientation, size: size2, ...rest } = props;
|
|
4703
4722
|
return /* @__PURE__ */ jsx(
|
|
4704
4723
|
RadixSeparator.Root,
|
|
4705
4724
|
{
|
|
@@ -5022,49 +5041,48 @@ const switchThumb = cva(
|
|
|
5022
5041
|
}
|
|
5023
5042
|
}
|
|
5024
5043
|
);
|
|
5025
|
-
const SwitchRoot = memo(
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5044
|
+
const SwitchRoot = memo((props) => {
|
|
5045
|
+
const providerContext = useProvider();
|
|
5046
|
+
const {
|
|
5047
|
+
ref,
|
|
5048
|
+
children,
|
|
5049
|
+
className,
|
|
5050
|
+
size: size2 = "md",
|
|
5051
|
+
radius = providerContext.radius,
|
|
5052
|
+
accentColor = providerContext.accentColor,
|
|
5053
|
+
...rest
|
|
5054
|
+
} = props;
|
|
5055
|
+
return /* @__PURE__ */ jsx(
|
|
5056
|
+
RadixSwitch.Root,
|
|
5057
|
+
{
|
|
5058
|
+
className: cx(switchRoot({ size: size2 }), radiusCva({ radius, maxLarge: false }), className),
|
|
5059
|
+
ref,
|
|
5060
|
+
"data-accent-color": accentColor,
|
|
5061
|
+
...rest,
|
|
5062
|
+
children: /* @__PURE__ */ jsx(SwitchContext.Provider, { value: { size: size2, radius }, children })
|
|
5063
|
+
}
|
|
5064
|
+
);
|
|
5065
|
+
});
|
|
5066
|
+
SwitchRoot.displayName = "SwitchRoot";
|
|
5067
|
+
const SwitchThumb = memo((props) => {
|
|
5068
|
+
const { ref, className, ...rest } = props;
|
|
5069
|
+
const { size: size2, radius } = useContext(SwitchContext);
|
|
5070
|
+
return /* @__PURE__ */ jsx(
|
|
5071
|
+
RadixSwitch.Thumb,
|
|
5072
|
+
{
|
|
5073
|
+
className: cx(switchThumb({ size: size2 }), radiusCva({ radius, maxLarge: false }), className),
|
|
5074
|
+
ref,
|
|
5034
5075
|
...rest
|
|
5035
|
-
}
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
className: cx(switchRoot({ size: size2 }), radiusCva({ radius, maxLarge: false }), className),
|
|
5040
|
-
ref,
|
|
5041
|
-
"data-accent-color": accentColor,
|
|
5042
|
-
...rest,
|
|
5043
|
-
children: /* @__PURE__ */ jsx(SwitchContext.Provider, { value: { size: size2, radius }, children })
|
|
5044
|
-
}
|
|
5045
|
-
);
|
|
5046
|
-
})
|
|
5047
|
-
);
|
|
5048
|
-
const SwitchThumb = memo(
|
|
5049
|
-
forwardRef((props, ref) => {
|
|
5050
|
-
const { className, ...rest } = props;
|
|
5051
|
-
const { size: size2, radius } = useContext(SwitchContext);
|
|
5052
|
-
return /* @__PURE__ */ jsx(
|
|
5053
|
-
RadixSwitch.Thumb,
|
|
5054
|
-
{
|
|
5055
|
-
className: cx(switchThumb({ size: size2 }), radiusCva({ radius, maxLarge: false }), className),
|
|
5056
|
-
ref,
|
|
5057
|
-
...rest
|
|
5058
|
-
}
|
|
5059
|
-
);
|
|
5060
|
-
})
|
|
5061
|
-
);
|
|
5076
|
+
}
|
|
5077
|
+
);
|
|
5078
|
+
});
|
|
5079
|
+
SwitchThumb.displayName = "SwitchThumb";
|
|
5062
5080
|
const Switch = {
|
|
5063
5081
|
Root: SwitchRoot,
|
|
5064
5082
|
Thumb: SwitchThumb
|
|
5065
5083
|
};
|
|
5066
|
-
const TableBody =
|
|
5067
|
-
const { className, ...rest } = props;
|
|
5084
|
+
const TableBody = memo((props) => {
|
|
5085
|
+
const { ref, className, ...rest } = props;
|
|
5068
5086
|
return /* @__PURE__ */ jsx("tbody", { ref, className: cx(className), ...rest });
|
|
5069
5087
|
});
|
|
5070
5088
|
TableBody.displayName = "TableBody";
|
|
@@ -5109,33 +5127,40 @@ const tableCellCva = cva([], {
|
|
|
5109
5127
|
}
|
|
5110
5128
|
}
|
|
5111
5129
|
});
|
|
5112
|
-
const TableCell =
|
|
5113
|
-
const { className, ...rest } = props;
|
|
5130
|
+
const TableCell = memo((props) => {
|
|
5131
|
+
const { ref, className, ...rest } = props;
|
|
5114
5132
|
const { size: size2, border, variant } = useContext(TableContext);
|
|
5115
5133
|
return /* @__PURE__ */ jsx("td", { ref, className: cx(tableCellCva({ size: size2, border, cell: true, variant }), className), ...rest });
|
|
5116
5134
|
});
|
|
5117
5135
|
TableCell.displayName = "TableCell";
|
|
5118
|
-
const TableColumnHeaderCell =
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
}
|
|
5124
|
-
);
|
|
5136
|
+
const TableColumnHeaderCell = memo((props) => {
|
|
5137
|
+
const { ref, className, ...rest } = props;
|
|
5138
|
+
const { size: size2, border, variant } = useContext(TableContext);
|
|
5139
|
+
return /* @__PURE__ */ jsx("th", { ref, className: cx(tableCellCva({ size: size2, border, cell: false, variant }), className), ...rest });
|
|
5140
|
+
});
|
|
5125
5141
|
TableColumnHeaderCell.displayName = "TableColumnHeaderCell";
|
|
5126
|
-
const TableFooter =
|
|
5127
|
-
const { className, ...rest } = props;
|
|
5142
|
+
const TableFooter = memo((props) => {
|
|
5143
|
+
const { ref, className, ...rest } = props;
|
|
5128
5144
|
return /* @__PURE__ */ jsx("tfoot", { ref, className: cx(className), ...rest });
|
|
5129
5145
|
});
|
|
5130
5146
|
TableFooter.displayName = "TableFooter";
|
|
5131
|
-
const TableHeader =
|
|
5132
|
-
const { className, ...rest } = props;
|
|
5147
|
+
const TableHeader = memo((props) => {
|
|
5148
|
+
const { ref, className, ...rest } = props;
|
|
5133
5149
|
return /* @__PURE__ */ jsx("thead", { ref, className: cx(className), ...rest });
|
|
5134
5150
|
});
|
|
5135
5151
|
TableHeader.displayName = "TableHeader";
|
|
5136
|
-
const TableRoot =
|
|
5152
|
+
const TableRoot = memo((props) => {
|
|
5137
5153
|
const providerContext = useProvider();
|
|
5138
|
-
const {
|
|
5154
|
+
const {
|
|
5155
|
+
ref,
|
|
5156
|
+
children,
|
|
5157
|
+
className,
|
|
5158
|
+
size: size2 = "md",
|
|
5159
|
+
border = "row",
|
|
5160
|
+
accentColor = "base",
|
|
5161
|
+
variant = "ghost",
|
|
5162
|
+
...rest
|
|
5163
|
+
} = props;
|
|
5139
5164
|
return /* @__PURE__ */ jsx(
|
|
5140
5165
|
"table",
|
|
5141
5166
|
{
|
|
@@ -5152,13 +5177,13 @@ const TableRoot = forwardRef((props, ref) => {
|
|
|
5152
5177
|
);
|
|
5153
5178
|
});
|
|
5154
5179
|
TableRoot.displayName = "TableRoot";
|
|
5155
|
-
const TableRow =
|
|
5156
|
-
const { className, ...rest } = props;
|
|
5180
|
+
const TableRow = memo((props) => {
|
|
5181
|
+
const { ref, className, ...rest } = props;
|
|
5157
5182
|
return /* @__PURE__ */ jsx("tr", { ref, className: cx(className), ...rest });
|
|
5158
5183
|
});
|
|
5159
5184
|
TableRow.displayName = "TableRow";
|
|
5160
|
-
const TableRowHeaderCell =
|
|
5161
|
-
const { className, ...rest } = props;
|
|
5185
|
+
const TableRowHeaderCell = memo((props) => {
|
|
5186
|
+
const { ref, className, ...rest } = props;
|
|
5162
5187
|
const { size: size2, border, variant } = useContext(TableContext);
|
|
5163
5188
|
return /* @__PURE__ */ jsx("th", { ref, className: cx(tableCellCva({ size: size2, border, cell: true, variant }), className), ...rest });
|
|
5164
5189
|
});
|
|
@@ -5223,9 +5248,9 @@ const tabsTriggerCva = cva(
|
|
|
5223
5248
|
}
|
|
5224
5249
|
}
|
|
5225
5250
|
);
|
|
5226
|
-
const TabsList =
|
|
5251
|
+
const TabsList = memo((props) => {
|
|
5227
5252
|
const providerContext = useProvider();
|
|
5228
|
-
const { children, className, size: size2 = "md", accentColor = providerContext.accentColor, ...rest } = props;
|
|
5253
|
+
const { ref, children, className, size: size2 = "md", accentColor = providerContext.accentColor, ...rest } = props;
|
|
5229
5254
|
return /* @__PURE__ */ jsx(
|
|
5230
5255
|
RadixTabs.List,
|
|
5231
5256
|
{
|
|
@@ -5238,8 +5263,8 @@ const TabsList = forwardRef((props, ref) => {
|
|
|
5238
5263
|
);
|
|
5239
5264
|
});
|
|
5240
5265
|
TabsList.displayName = "TabsList";
|
|
5241
|
-
const TabsRoot =
|
|
5242
|
-
const { className, ...rest } = props;
|
|
5266
|
+
const TabsRoot = memo((props) => {
|
|
5267
|
+
const { ref, className, ...rest } = props;
|
|
5243
5268
|
return /* @__PURE__ */ jsx(RadixTabs.Root, { ref, className: cx("flex flex-col", className), ...rest });
|
|
5244
5269
|
});
|
|
5245
5270
|
TabsRoot.displayName = "TabsRoot";
|
|
@@ -5250,8 +5275,8 @@ const useTabsList = () => {
|
|
|
5250
5275
|
}
|
|
5251
5276
|
return tabsListContext;
|
|
5252
5277
|
};
|
|
5253
|
-
const TabsTrigger =
|
|
5254
|
-
const {
|
|
5278
|
+
const TabsTrigger = memo((props) => {
|
|
5279
|
+
const { ref, children, className, ...rest } = props;
|
|
5255
5280
|
const { size: size2 } = useTabsList();
|
|
5256
5281
|
return /* @__PURE__ */ jsx(RadixTabs.Trigger, { ref, className: cx(tabsTriggerCva({ size: size2 }), className), ...rest, children });
|
|
5257
5282
|
});
|
|
@@ -5292,8 +5317,8 @@ const textCva = cva([], {
|
|
|
5292
5317
|
}
|
|
5293
5318
|
}
|
|
5294
5319
|
});
|
|
5295
|
-
const Text =
|
|
5296
|
-
const { className, size: size2, weight, align, accentColor, highContrast = false, ...rest } = props;
|
|
5320
|
+
const Text = memo((props) => {
|
|
5321
|
+
const { ref, className, size: size2, weight, align, accentColor, highContrast = false, ...rest } = props;
|
|
5297
5322
|
return /* @__PURE__ */ jsx(
|
|
5298
5323
|
"span",
|
|
5299
5324
|
{
|
|
@@ -5373,9 +5398,10 @@ const textAreaCva = cva(
|
|
|
5373
5398
|
}
|
|
5374
5399
|
}
|
|
5375
5400
|
);
|
|
5376
|
-
const TextArea =
|
|
5401
|
+
const TextArea = memo((props) => {
|
|
5377
5402
|
const providerContext = useProvider();
|
|
5378
5403
|
const {
|
|
5404
|
+
ref,
|
|
5379
5405
|
className,
|
|
5380
5406
|
size: size2,
|
|
5381
5407
|
variant,
|
|
@@ -5425,9 +5451,10 @@ const toastCva = cva(
|
|
|
5425
5451
|
}
|
|
5426
5452
|
}
|
|
5427
5453
|
);
|
|
5428
|
-
const _Toast =
|
|
5454
|
+
const _Toast = function Toast2(props) {
|
|
5429
5455
|
const { radius, ...restProviderContext } = useProvider();
|
|
5430
5456
|
const {
|
|
5457
|
+
ref,
|
|
5431
5458
|
title,
|
|
5432
5459
|
description,
|
|
5433
5460
|
icon,
|
|
@@ -5477,8 +5504,9 @@ const _Toast = forwardRef(function Toast2(props, ref) {
|
|
|
5477
5504
|
]
|
|
5478
5505
|
}
|
|
5479
5506
|
);
|
|
5480
|
-
}
|
|
5507
|
+
};
|
|
5481
5508
|
const Toast = memo(_Toast);
|
|
5509
|
+
Toast.displayName = "Toast";
|
|
5482
5510
|
const ToastContext = createContext({});
|
|
5483
5511
|
const useToast = () => {
|
|
5484
5512
|
const context = useContext(ToastContext);
|
|
@@ -5555,6 +5583,7 @@ const ToastProvider = memo(function ToastContextProvider({
|
|
|
5555
5583
|
toasts.map(({ id, onClose, ...toastProps }) => /* @__PURE__ */ jsx(Toast, { ...toastProps, onClose: () => handleCloseToast(id, 0, onClose) }, id))
|
|
5556
5584
|
] }) });
|
|
5557
5585
|
});
|
|
5586
|
+
ToastProvider.displayName = "ToastProvider";
|
|
5558
5587
|
const toggleButtonCva = cva(
|
|
5559
5588
|
[
|
|
5560
5589
|
"flex",
|
|
@@ -5675,9 +5704,10 @@ const toggleButtonCva = cva(
|
|
|
5675
5704
|
}
|
|
5676
5705
|
}
|
|
5677
5706
|
);
|
|
5678
|
-
const BaseToggleButton =
|
|
5707
|
+
const BaseToggleButton = memo((props) => {
|
|
5679
5708
|
const providerContext = useProvider();
|
|
5680
5709
|
const {
|
|
5710
|
+
ref,
|
|
5681
5711
|
className,
|
|
5682
5712
|
size: size2,
|
|
5683
5713
|
icon,
|
|
@@ -5697,12 +5727,12 @@ const BaseToggleButton = forwardRef((props, ref) => {
|
|
|
5697
5727
|
);
|
|
5698
5728
|
});
|
|
5699
5729
|
BaseToggleButton.displayName = "BaseToggleButton";
|
|
5700
|
-
const IconToggleButton =
|
|
5701
|
-
return /* @__PURE__ */ jsx(BaseToggleButton, {
|
|
5730
|
+
const IconToggleButton = memo((props) => {
|
|
5731
|
+
return /* @__PURE__ */ jsx(BaseToggleButton, { icon: true, ...props });
|
|
5702
5732
|
});
|
|
5703
5733
|
IconToggleButton.displayName = "IconToggleButton";
|
|
5704
|
-
const ToggleButton =
|
|
5705
|
-
return /* @__PURE__ */ jsx(BaseToggleButton, {
|
|
5734
|
+
const ToggleButton = memo((props) => {
|
|
5735
|
+
return /* @__PURE__ */ jsx(BaseToggleButton, { icon: false, ...props });
|
|
5706
5736
|
});
|
|
5707
5737
|
ToggleButton.displayName = "ToggleButton";
|
|
5708
5738
|
const ToggleGroupContext = createContext({});
|
|
@@ -5884,8 +5914,8 @@ const ToggleGroup = {
|
|
|
5884
5914
|
Item: ToggleGroupItem,
|
|
5885
5915
|
IconItem: ToggleGroupIconItem
|
|
5886
5916
|
};
|
|
5887
|
-
const TooltipArrow =
|
|
5888
|
-
const { className, ...rest } = props;
|
|
5917
|
+
const TooltipArrow = memo((props) => {
|
|
5918
|
+
const { ref, className, ...rest } = props;
|
|
5889
5919
|
return /* @__PURE__ */ jsx(RadixTooltip.Arrow, { className: cx("fill-(--base-6)", className), ref, ...rest });
|
|
5890
5920
|
});
|
|
5891
5921
|
TooltipArrow.displayName = "TooltipArrow";
|
|
@@ -5926,14 +5956,15 @@ const tooltipContent = cva(
|
|
|
5926
5956
|
}
|
|
5927
5957
|
}
|
|
5928
5958
|
);
|
|
5929
|
-
const TooltipContent =
|
|
5959
|
+
const TooltipContent = memo((props) => {
|
|
5930
5960
|
const providerContext = useProvider();
|
|
5931
5961
|
const {
|
|
5962
|
+
ref,
|
|
5963
|
+
children,
|
|
5932
5964
|
className,
|
|
5933
5965
|
side = "top",
|
|
5934
5966
|
size: size2,
|
|
5935
5967
|
radius = providerContext.radius,
|
|
5936
|
-
children,
|
|
5937
5968
|
sideOffset = 2,
|
|
5938
5969
|
container,
|
|
5939
5970
|
...rest
|
|
@@ -6018,7 +6049,12 @@ export {
|
|
|
6018
6049
|
InputRoot,
|
|
6019
6050
|
InputSlot,
|
|
6020
6051
|
Layout,
|
|
6052
|
+
LayoutContainer,
|
|
6021
6053
|
LayoutContext,
|
|
6054
|
+
LayoutRoot,
|
|
6055
|
+
LayoutSlideOut,
|
|
6056
|
+
LayoutSlideOutOverlay,
|
|
6057
|
+
LayoutSlideOutTrigger,
|
|
6022
6058
|
Link,
|
|
6023
6059
|
Menu,
|
|
6024
6060
|
MenuCheckboxItem,
|