@bug-on/md3-react 3.0.1 → 3.0.2
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/.turbo/turbo-build.log +41 -42
- package/CHANGELOG.md +10 -0
- package/dist/index.d.mts +54 -3
- package/dist/index.d.ts +54 -3
- package/dist/index.js +764 -473
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +710 -421
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/ui/navigation-bar.test.tsx +111 -0
- package/src/ui/navigation-bar.tsx +448 -0
- package/src/ui/navigation-rail.test.tsx +5 -4
- package/src/ui/navigation-rail.tsx +20 -21
- package/src/ui/scroll-area.tsx +4 -0
- package/src/ui/shared/constants.ts +1 -1
- package/test_output.txt +0 -164
- package/test_output_v2.txt +0 -5
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
2
|
+
import * as React39 from 'react';
|
|
3
3
|
import { createContext, forwardRef, useMemo, useRef, useEffect, useState, useCallback, useContext, useId, cloneElement, useLayoutEffect, createElement } from 'react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { argbFromHex, themeFromSourceColor, hexFromArgb } from '@material/material-color-utilities';
|
|
@@ -219,7 +219,7 @@ function applyTheme(sourceColorHex, mode = "light", root = document.documentElem
|
|
|
219
219
|
const resolved = resolveMode(mode);
|
|
220
220
|
const colors = generateM3Theme(sourceColorHex, resolved);
|
|
221
221
|
for (const [key, value] of Object.entries(colors)) {
|
|
222
|
-
const kebabKey = key.replace(/[A-Z]/g, (
|
|
222
|
+
const kebabKey = key.replace(/[A-Z]/g, (m48) => `-${m48.toLowerCase()}`);
|
|
223
223
|
root.style.setProperty(`--md-sys-color-${kebabKey}`, value);
|
|
224
224
|
root.style.setProperty(`--color-m3-${kebabKey}`, value);
|
|
225
225
|
}
|
|
@@ -480,7 +480,7 @@ var SUBMENU_CONTAINER_VARIANTS = {
|
|
|
480
480
|
transition: FAST_EFFECTS_TRANSITION
|
|
481
481
|
}
|
|
482
482
|
};
|
|
483
|
-
var MenuContext =
|
|
483
|
+
var MenuContext = React39.createContext({
|
|
484
484
|
variant: "baseline",
|
|
485
485
|
colorVariant: "standard",
|
|
486
486
|
menuPrimitive: "dropdown",
|
|
@@ -496,15 +496,15 @@ function MenuProvider({
|
|
|
496
496
|
onOpenChange,
|
|
497
497
|
children
|
|
498
498
|
}) {
|
|
499
|
-
const value =
|
|
499
|
+
const value = React39.useMemo(
|
|
500
500
|
() => ({ variant, colorVariant, menuPrimitive, open, onOpenChange }),
|
|
501
501
|
[variant, colorVariant, menuPrimitive, open, onOpenChange]
|
|
502
502
|
);
|
|
503
503
|
return /* @__PURE__ */ jsx(MenuContext.Provider, { value, children });
|
|
504
504
|
}
|
|
505
505
|
function useMenuContext() {
|
|
506
|
-
const ctx =
|
|
507
|
-
return
|
|
506
|
+
const ctx = React39.useContext(MenuContext);
|
|
507
|
+
return React39.useMemo(
|
|
508
508
|
() => __spreadProps(__spreadValues({}, ctx), {
|
|
509
509
|
isStatic: ctx.menuPrimitive === "static",
|
|
510
510
|
menuVariant: ctx.variant
|
|
@@ -621,7 +621,7 @@ function ContextMenu({
|
|
|
621
621
|
variant = "baseline",
|
|
622
622
|
colorVariant = "standard"
|
|
623
623
|
}) {
|
|
624
|
-
const [open, setOpen] =
|
|
624
|
+
const [open, setOpen] = React39.useState(false);
|
|
625
625
|
return /* @__PURE__ */ jsx(
|
|
626
626
|
MenuProvider,
|
|
627
627
|
{
|
|
@@ -635,12 +635,12 @@ function ContextMenu({
|
|
|
635
635
|
);
|
|
636
636
|
}
|
|
637
637
|
ContextMenu.displayName = "ContextMenu";
|
|
638
|
-
var ContextMenuTrigger =
|
|
638
|
+
var ContextMenuTrigger = React39.forwardRef((_a, ref) => {
|
|
639
639
|
var _b = _a, { children, asChild = true } = _b, props = __objRest(_b, ["children", "asChild"]);
|
|
640
640
|
return /* @__PURE__ */ jsx(RxContextMenu.Trigger, __spreadProps(__spreadValues({ ref, asChild }, props), { children }));
|
|
641
641
|
});
|
|
642
642
|
ContextMenuTrigger.displayName = "ContextMenuTrigger";
|
|
643
|
-
var ContextMenuContent =
|
|
643
|
+
var ContextMenuContent = React39.forwardRef(
|
|
644
644
|
(_a, ref) => {
|
|
645
645
|
var _b = _a, {
|
|
646
646
|
children,
|
|
@@ -688,10 +688,10 @@ var ContextMenuContent = React38.forwardRef(
|
|
|
688
688
|
className
|
|
689
689
|
);
|
|
690
690
|
const flattenChildren = (nodes) => {
|
|
691
|
-
return
|
|
691
|
+
return React39.Children.toArray(nodes).reduce(
|
|
692
692
|
(acc, child) => {
|
|
693
|
-
if (
|
|
694
|
-
if (child.type ===
|
|
693
|
+
if (React39.isValidElement(child)) {
|
|
694
|
+
if (child.type === React39.Fragment) {
|
|
695
695
|
return acc.concat(
|
|
696
696
|
flattenChildren(
|
|
697
697
|
child.props.children
|
|
@@ -710,7 +710,7 @@ var ContextMenuContent = React38.forwardRef(
|
|
|
710
710
|
const validChildren = flattenChildren(children);
|
|
711
711
|
const groupCount = validChildren.length;
|
|
712
712
|
const enhancedChildren = validChildren.map(
|
|
713
|
-
(child, i) =>
|
|
713
|
+
(child, i) => React39.cloneElement(
|
|
714
714
|
child,
|
|
715
715
|
{
|
|
716
716
|
index: i,
|
|
@@ -774,12 +774,12 @@ function Menu(_a) {
|
|
|
774
774
|
]);
|
|
775
775
|
var _a2;
|
|
776
776
|
const resolvedVariant = (_a2 = variant != null ? variant : menuVariant) != null ? _a2 : "baseline";
|
|
777
|
-
const [internalOpen, setInternalOpen] =
|
|
777
|
+
const [internalOpen, setInternalOpen] = React39.useState(
|
|
778
778
|
() => defaultOpen != null ? defaultOpen : false
|
|
779
779
|
);
|
|
780
780
|
const isControlled = controlledOpen !== void 0;
|
|
781
781
|
const open = isControlled ? controlledOpen : internalOpen;
|
|
782
|
-
const handleOpenChange =
|
|
782
|
+
const handleOpenChange = React39.useCallback(
|
|
783
783
|
(next) => {
|
|
784
784
|
if (!isControlled) setInternalOpen(next);
|
|
785
785
|
controlledOnOpenChange == null ? void 0 : controlledOnOpenChange(next);
|
|
@@ -806,12 +806,12 @@ function Menu(_a) {
|
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
808
|
Menu.displayName = "Menu";
|
|
809
|
-
var MenuTrigger =
|
|
809
|
+
var MenuTrigger = React39.forwardRef((_a, ref) => {
|
|
810
810
|
var _b = _a, { children, asChild = true } = _b, props = __objRest(_b, ["children", "asChild"]);
|
|
811
811
|
return /* @__PURE__ */ jsx(DropdownMenu.Trigger, __spreadProps(__spreadValues({ ref, asChild }, props), { children }));
|
|
812
812
|
});
|
|
813
813
|
MenuTrigger.displayName = "MenuTrigger";
|
|
814
|
-
var MenuContent =
|
|
814
|
+
var MenuContent = React39.forwardRef(
|
|
815
815
|
(_a, ref) => {
|
|
816
816
|
var _b = _a, {
|
|
817
817
|
children,
|
|
@@ -865,10 +865,10 @@ var MenuContent = React38.forwardRef(
|
|
|
865
865
|
className
|
|
866
866
|
);
|
|
867
867
|
const flattenChildren = (nodes) => {
|
|
868
|
-
return
|
|
868
|
+
return React39.Children.toArray(nodes).reduce(
|
|
869
869
|
(acc, child) => {
|
|
870
|
-
if (
|
|
871
|
-
if (child.type ===
|
|
870
|
+
if (React39.isValidElement(child)) {
|
|
871
|
+
if (child.type === React39.Fragment) {
|
|
872
872
|
return acc.concat(
|
|
873
873
|
flattenChildren(
|
|
874
874
|
child.props.children
|
|
@@ -887,7 +887,7 @@ var MenuContent = React38.forwardRef(
|
|
|
887
887
|
const validChildren = flattenChildren(children);
|
|
888
888
|
const groupCount = validChildren.length;
|
|
889
889
|
const enhancedChildren = validChildren.map(
|
|
890
|
-
(child, i) =>
|
|
890
|
+
(child, i) => React39.cloneElement(child, {
|
|
891
891
|
index: i,
|
|
892
892
|
count: groupCount,
|
|
893
893
|
isGapVariant: isExpressiveGap
|
|
@@ -942,7 +942,7 @@ var MenuContent = React38.forwardRef(
|
|
|
942
942
|
}
|
|
943
943
|
);
|
|
944
944
|
MenuContent.displayName = "MenuContent";
|
|
945
|
-
var MenuDivider =
|
|
945
|
+
var MenuDivider = React39.forwardRef(
|
|
946
946
|
(_a, ref) => {
|
|
947
947
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
948
948
|
const { menuVariant } = useMenuContext();
|
|
@@ -973,7 +973,7 @@ function getGroupPosition(index, count) {
|
|
|
973
973
|
function getGroupActiveShape(position) {
|
|
974
974
|
return GROUP_SHAPES[`${position}Active`];
|
|
975
975
|
}
|
|
976
|
-
var MenuGroup =
|
|
976
|
+
var MenuGroup = React39.forwardRef(
|
|
977
977
|
(_a, ref) => {
|
|
978
978
|
var _b = _a, {
|
|
979
979
|
children,
|
|
@@ -1003,15 +1003,15 @@ var MenuGroup = React38.forwardRef(
|
|
|
1003
1003
|
const colors = menuVariant === "baseline" ? BASELINE_COLORS : colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
1004
1004
|
const position = getGroupPosition(index, count);
|
|
1005
1005
|
const activeShape = getGroupActiveShape(position);
|
|
1006
|
-
const [isHovered, setIsHovered] =
|
|
1006
|
+
const [isHovered, setIsHovered] = React39.useState(false);
|
|
1007
1007
|
const currentShape = isStatic || isHovered ? activeShape : GROUP_SHAPES.inactive;
|
|
1008
|
-
const handlePointerEnter =
|
|
1009
|
-
const handlePointerLeave =
|
|
1008
|
+
const handlePointerEnter = React39.useCallback(() => setIsHovered(true), []);
|
|
1009
|
+
const handlePointerLeave = React39.useCallback(() => setIsHovered(false), []);
|
|
1010
1010
|
const flattenChildren = (children2) => {
|
|
1011
|
-
return
|
|
1011
|
+
return React39.Children.toArray(children2).reduce(
|
|
1012
1012
|
(acc, child) => {
|
|
1013
|
-
if (
|
|
1014
|
-
if (child.type ===
|
|
1013
|
+
if (React39.isValidElement(child)) {
|
|
1014
|
+
if (child.type === React39.Fragment) {
|
|
1015
1015
|
return acc.concat(
|
|
1016
1016
|
flattenChildren(
|
|
1017
1017
|
child.props.children
|
|
@@ -1029,7 +1029,7 @@ var MenuGroup = React38.forwardRef(
|
|
|
1029
1029
|
const itemCount = validChildren.length;
|
|
1030
1030
|
const enhancedChildren = validChildren.map((child, i) => {
|
|
1031
1031
|
const itemPosition2 = itemCount === 1 ? "standalone" : i === 0 ? "leading" : i === itemCount - 1 ? "trailing" : "middle";
|
|
1032
|
-
return
|
|
1032
|
+
return React39.cloneElement(child, {
|
|
1033
1033
|
itemPosition: itemPosition2,
|
|
1034
1034
|
colorVariant
|
|
1035
1035
|
});
|
|
@@ -1094,7 +1094,7 @@ var SPRING_TRANSITION = {
|
|
|
1094
1094
|
};
|
|
1095
1095
|
var SPRING_TRANSITION_EXPRESSIVE = {
|
|
1096
1096
|
type: "spring",
|
|
1097
|
-
bounce: 0.
|
|
1097
|
+
bounce: 0.45,
|
|
1098
1098
|
duration: 0.4
|
|
1099
1099
|
};
|
|
1100
1100
|
var ICON_SPAN_VARIANTS = {
|
|
@@ -1117,7 +1117,7 @@ var VARIANT_FONT = {
|
|
|
1117
1117
|
rounded: "'Material Symbols Rounded'",
|
|
1118
1118
|
sharp: "'Material Symbols Sharp'"
|
|
1119
1119
|
};
|
|
1120
|
-
var IconComponent =
|
|
1120
|
+
var IconComponent = React39.forwardRef(
|
|
1121
1121
|
(_a, ref) => {
|
|
1122
1122
|
var _b = _a, {
|
|
1123
1123
|
name,
|
|
@@ -1183,14 +1183,14 @@ var IconComponent = React38.forwardRef(
|
|
|
1183
1183
|
}
|
|
1184
1184
|
);
|
|
1185
1185
|
IconComponent.displayName = "Icon";
|
|
1186
|
-
var Icon =
|
|
1186
|
+
var Icon = React39.memo(IconComponent);
|
|
1187
1187
|
function getItemShapeClass(position, selected, isStatic = false, menuVariant = "expressive") {
|
|
1188
1188
|
if (menuVariant === "baseline") return BASELINE_ITEM_SHAPE;
|
|
1189
1189
|
if (selected) return ITEM_SHAPE_CLASSES.selected;
|
|
1190
1190
|
if (isStatic && position === "standalone") return "rounded-[12px]";
|
|
1191
1191
|
return ITEM_SHAPE_CLASSES[position];
|
|
1192
1192
|
}
|
|
1193
|
-
var MenuItem =
|
|
1193
|
+
var MenuItem = React39.forwardRef(
|
|
1194
1194
|
(_a, ref) => {
|
|
1195
1195
|
var _b = _a, {
|
|
1196
1196
|
children,
|
|
@@ -1392,31 +1392,31 @@ function SubMenu({
|
|
|
1392
1392
|
}) {
|
|
1393
1393
|
const { colorVariant: contextColorVariant, menuPrimitive } = useMenuContext();
|
|
1394
1394
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
1395
|
-
const [open, setOpen] =
|
|
1396
|
-
const openTimerRef =
|
|
1397
|
-
const closeTimerRef =
|
|
1395
|
+
const [open, setOpen] = React39.useState(false);
|
|
1396
|
+
const openTimerRef = React39.useRef(null);
|
|
1397
|
+
const closeTimerRef = React39.useRef(
|
|
1398
1398
|
null
|
|
1399
1399
|
);
|
|
1400
|
-
const clearTimers =
|
|
1400
|
+
const clearTimers = React39.useCallback(() => {
|
|
1401
1401
|
if (openTimerRef.current) clearTimeout(openTimerRef.current);
|
|
1402
1402
|
if (closeTimerRef.current) clearTimeout(closeTimerRef.current);
|
|
1403
1403
|
}, []);
|
|
1404
|
-
const handleTriggerPointerEnter =
|
|
1404
|
+
const handleTriggerPointerEnter = React39.useCallback(() => {
|
|
1405
1405
|
clearTimers();
|
|
1406
1406
|
openTimerRef.current = setTimeout(() => setOpen(true), hoverOpenDelay);
|
|
1407
1407
|
}, [hoverOpenDelay, clearTimers]);
|
|
1408
|
-
const handleTriggerPointerLeave =
|
|
1408
|
+
const handleTriggerPointerLeave = React39.useCallback(() => {
|
|
1409
1409
|
clearTimers();
|
|
1410
1410
|
closeTimerRef.current = setTimeout(() => setOpen(false), hoverCloseDelay);
|
|
1411
1411
|
}, [hoverCloseDelay, clearTimers]);
|
|
1412
|
-
const handleContentPointerEnter =
|
|
1412
|
+
const handleContentPointerEnter = React39.useCallback(() => {
|
|
1413
1413
|
clearTimers();
|
|
1414
1414
|
}, [clearTimers]);
|
|
1415
|
-
const handleContentPointerLeave =
|
|
1415
|
+
const handleContentPointerLeave = React39.useCallback(() => {
|
|
1416
1416
|
clearTimers();
|
|
1417
1417
|
closeTimerRef.current = setTimeout(() => setOpen(false), hoverCloseDelay);
|
|
1418
1418
|
}, [hoverCloseDelay, clearTimers]);
|
|
1419
|
-
|
|
1419
|
+
React39.useEffect(() => () => clearTimers(), [clearTimers]);
|
|
1420
1420
|
const Sub3 = menuPrimitive === "context" ? RxContextMenu.Sub : DropdownMenu.Sub;
|
|
1421
1421
|
const SubTrigger3 = menuPrimitive === "context" ? RxContextMenu.SubTrigger : DropdownMenu.SubTrigger;
|
|
1422
1422
|
const SubContent3 = menuPrimitive === "context" ? RxContextMenu.SubContent : DropdownMenu.SubContent;
|
|
@@ -1428,7 +1428,7 @@ function SubMenu({
|
|
|
1428
1428
|
className: "w-full outline-none",
|
|
1429
1429
|
onPointerEnter: handleTriggerPointerEnter,
|
|
1430
1430
|
onPointerLeave: handleTriggerPointerLeave,
|
|
1431
|
-
children:
|
|
1431
|
+
children: React39.isValidElement(trigger) ? React39.cloneElement(trigger, {
|
|
1432
1432
|
isSubTrigger: true,
|
|
1433
1433
|
// Auto-add chevron if missing
|
|
1434
1434
|
trailingIcon: trigger.props.trailingIcon || /* @__PURE__ */ jsx(Icon, { name: "chevron_right", size: 20 })
|
|
@@ -1505,7 +1505,7 @@ function SubMenuContent({
|
|
|
1505
1505
|
);
|
|
1506
1506
|
}
|
|
1507
1507
|
SubMenuContent.displayName = "SubMenuContent";
|
|
1508
|
-
var VerticalMenuDivider =
|
|
1508
|
+
var VerticalMenuDivider = React39.forwardRef((_a, ref) => {
|
|
1509
1509
|
var _b = _a, { className, index, count, isGapVariant } = _b, props = __objRest(_b, ["className", "index", "count", "isGapVariant"]);
|
|
1510
1510
|
return /* @__PURE__ */ jsx(
|
|
1511
1511
|
"hr",
|
|
@@ -1525,7 +1525,7 @@ var VerticalMenuDivider = React38.forwardRef((_a, ref) => {
|
|
|
1525
1525
|
});
|
|
1526
1526
|
VerticalMenuDivider.displayName = "VerticalMenuDivider";
|
|
1527
1527
|
var VerticalMenuGroup = MenuGroup;
|
|
1528
|
-
var VerticalMenuContent =
|
|
1528
|
+
var VerticalMenuContent = React39.forwardRef(
|
|
1529
1529
|
(_a, ref) => {
|
|
1530
1530
|
var _b = _a, {
|
|
1531
1531
|
children,
|
|
@@ -1542,10 +1542,10 @@ var VerticalMenuContent = React38.forwardRef(
|
|
|
1542
1542
|
const colorVariant = propColorVariant != null ? propColorVariant : contextColorVariant;
|
|
1543
1543
|
const colors = colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
1544
1544
|
const flattenChildren = (children2) => {
|
|
1545
|
-
return
|
|
1545
|
+
return React39.Children.toArray(children2).reduce(
|
|
1546
1546
|
(acc, child) => {
|
|
1547
|
-
if (
|
|
1548
|
-
if (child.type ===
|
|
1547
|
+
if (React39.isValidElement(child)) {
|
|
1548
|
+
if (child.type === React39.Fragment) {
|
|
1549
1549
|
return acc.concat(
|
|
1550
1550
|
flattenChildren(
|
|
1551
1551
|
child.props.children
|
|
@@ -1562,7 +1562,7 @@ var VerticalMenuContent = React38.forwardRef(
|
|
|
1562
1562
|
const validChildren = flattenChildren(children);
|
|
1563
1563
|
const groupCount = validChildren.length;
|
|
1564
1564
|
const enhancedChildren = validChildren.map(
|
|
1565
|
-
(child, i) =>
|
|
1565
|
+
(child, i) => React39.cloneElement(child, {
|
|
1566
1566
|
index: i,
|
|
1567
1567
|
count: groupCount,
|
|
1568
1568
|
isGapVariant: separatorStyle === "gap"
|
|
@@ -1599,13 +1599,13 @@ var VerticalMenuContent = React38.forwardRef(
|
|
|
1599
1599
|
}
|
|
1600
1600
|
);
|
|
1601
1601
|
VerticalMenuContent.displayName = "VerticalMenuContent";
|
|
1602
|
-
var VerticalMenu =
|
|
1602
|
+
var VerticalMenu = React39.forwardRef((_a, ref) => {
|
|
1603
1603
|
var _b = _a, { children, colorVariant = "standard", className } = _b, props = __objRest(_b, ["children", "colorVariant", "className"]);
|
|
1604
|
-
const noop =
|
|
1604
|
+
const noop = React39.useCallback(() => {
|
|
1605
1605
|
}, []);
|
|
1606
1606
|
const colors = colorVariant === "vibrant" ? VIBRANT_COLORS : STANDARD_COLORS;
|
|
1607
|
-
const containerRef =
|
|
1608
|
-
const mergedRef =
|
|
1607
|
+
const containerRef = React39.useRef(null);
|
|
1608
|
+
const mergedRef = React39.useCallback(
|
|
1609
1609
|
(node) => {
|
|
1610
1610
|
containerRef.current = node;
|
|
1611
1611
|
if (typeof ref === "function") ref(node);
|
|
@@ -1614,7 +1614,7 @@ var VerticalMenu = React38.forwardRef((_a, ref) => {
|
|
|
1614
1614
|
},
|
|
1615
1615
|
[ref]
|
|
1616
1616
|
);
|
|
1617
|
-
const handleKeyDown =
|
|
1617
|
+
const handleKeyDown = React39.useCallback(
|
|
1618
1618
|
(e) => {
|
|
1619
1619
|
var _a2;
|
|
1620
1620
|
if (!containerRef.current) return;
|
|
@@ -1697,7 +1697,7 @@ var VerticalMenu = React38.forwardRef((_a, ref) => {
|
|
|
1697
1697
|
});
|
|
1698
1698
|
VerticalMenu.displayName = "VerticalMenu";
|
|
1699
1699
|
function detectSeparatorStyle(children) {
|
|
1700
|
-
const child =
|
|
1700
|
+
const child = React39.Children.toArray(children).find(React39.isValidElement);
|
|
1701
1701
|
if (child) {
|
|
1702
1702
|
const style = child.props.separatorStyle;
|
|
1703
1703
|
if (style) return style;
|
|
@@ -1778,11 +1778,11 @@ function AppBarColumn({
|
|
|
1778
1778
|
maxItemCount,
|
|
1779
1779
|
className
|
|
1780
1780
|
}) {
|
|
1781
|
-
const containerRef =
|
|
1782
|
-
const [visibleCount, setVisibleCount] =
|
|
1781
|
+
const containerRef = React39.useRef(null);
|
|
1782
|
+
const [visibleCount, setVisibleCount] = React39.useState(
|
|
1783
1783
|
maxItemCount != null ? maxItemCount : items.length
|
|
1784
1784
|
);
|
|
1785
|
-
|
|
1785
|
+
React39.useEffect(() => {
|
|
1786
1786
|
if (maxItemCount !== void 0) {
|
|
1787
1787
|
setVisibleCount(Math.min(maxItemCount, items.length));
|
|
1788
1788
|
return;
|
|
@@ -1830,11 +1830,11 @@ function AppBarColumn({
|
|
|
1830
1830
|
);
|
|
1831
1831
|
}
|
|
1832
1832
|
function AppBarRow({ items, maxItemCount, className }) {
|
|
1833
|
-
const containerRef =
|
|
1834
|
-
const [visibleCount, setVisibleCount] =
|
|
1833
|
+
const containerRef = React39.useRef(null);
|
|
1834
|
+
const [visibleCount, setVisibleCount] = React39.useState(
|
|
1835
1835
|
maxItemCount != null ? maxItemCount : items.length
|
|
1836
1836
|
);
|
|
1837
|
-
|
|
1837
|
+
React39.useEffect(() => {
|
|
1838
1838
|
if (maxItemCount !== void 0) {
|
|
1839
1839
|
setVisibleCount(Math.min(maxItemCount, items.length));
|
|
1840
1840
|
return;
|
|
@@ -1888,12 +1888,12 @@ function useAppBarScroll({
|
|
|
1888
1888
|
collapsedHeight = 64,
|
|
1889
1889
|
expandedHeight = 112
|
|
1890
1890
|
} = {}) {
|
|
1891
|
-
const [isScrolled, setIsScrolled] =
|
|
1892
|
-
const [collapsedFraction, setCollapsedFraction] =
|
|
1893
|
-
const [isHidden, setIsHidden] =
|
|
1894
|
-
const prevScrollYRef =
|
|
1891
|
+
const [isScrolled, setIsScrolled] = React39.useState(false);
|
|
1892
|
+
const [collapsedFraction, setCollapsedFraction] = React39.useState(0);
|
|
1893
|
+
const [isHidden, setIsHidden] = React39.useState(false);
|
|
1894
|
+
const prevScrollYRef = React39.useRef(0);
|
|
1895
1895
|
const hideThreshold = 64;
|
|
1896
|
-
|
|
1896
|
+
React39.useEffect(() => {
|
|
1897
1897
|
var _a;
|
|
1898
1898
|
const scrollDistance = expandedHeight - collapsedHeight;
|
|
1899
1899
|
const getScrollY = () => {
|
|
@@ -2014,7 +2014,7 @@ function useFlexibleAppBar({
|
|
|
2014
2014
|
expandedHeight
|
|
2015
2015
|
});
|
|
2016
2016
|
const scrollProgress = useMotionValue(0);
|
|
2017
|
-
|
|
2017
|
+
React39.useEffect(() => {
|
|
2018
2018
|
scrollProgress.set(
|
|
2019
2019
|
shouldReduceMotion ? collapsedFraction > 0.5 ? 1 : 0 : collapsedFraction
|
|
2020
2020
|
);
|
|
@@ -2355,7 +2355,7 @@ function SearchAppBar({
|
|
|
2355
2355
|
}) {
|
|
2356
2356
|
var _a, _b;
|
|
2357
2357
|
const shouldReduceMotion = useReducedMotion();
|
|
2358
|
-
const [isSearchOpen, setIsSearchOpen] =
|
|
2358
|
+
const [isSearchOpen, setIsSearchOpen] = React39.useState(false);
|
|
2359
2359
|
const { isScrolled } = useAppBarScroll({
|
|
2360
2360
|
scrollElement,
|
|
2361
2361
|
behavior: scrollBehavior === "exitUntilCollapsed" ? "pinned" : scrollBehavior
|
|
@@ -2469,8 +2469,8 @@ function SearchView({
|
|
|
2469
2469
|
className
|
|
2470
2470
|
}) {
|
|
2471
2471
|
const shouldReduceMotion = useReducedMotion();
|
|
2472
|
-
const inputRef =
|
|
2473
|
-
|
|
2472
|
+
const inputRef = React39.useRef(null);
|
|
2473
|
+
React39.useEffect(() => {
|
|
2474
2474
|
const timer = window.setTimeout(() => {
|
|
2475
2475
|
var _a;
|
|
2476
2476
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
@@ -2740,9 +2740,9 @@ function formatBadgeLabel(children, max) {
|
|
|
2740
2740
|
return "";
|
|
2741
2741
|
}
|
|
2742
2742
|
function detectBadgeHasContent(badge) {
|
|
2743
|
-
return
|
|
2743
|
+
return React39.isValidElement(badge) && badge.props.children != null;
|
|
2744
2744
|
}
|
|
2745
|
-
var BadgeImpl =
|
|
2745
|
+
var BadgeImpl = React39.forwardRef(
|
|
2746
2746
|
(_a, ref) => {
|
|
2747
2747
|
var _b = _a, {
|
|
2748
2748
|
children,
|
|
@@ -2796,7 +2796,7 @@ var BadgeImpl = React38.forwardRef(
|
|
|
2796
2796
|
}
|
|
2797
2797
|
);
|
|
2798
2798
|
BadgeImpl.displayName = "Badge";
|
|
2799
|
-
var Badge =
|
|
2799
|
+
var Badge = React39.memo(BadgeImpl);
|
|
2800
2800
|
function BadgedBox({
|
|
2801
2801
|
badge,
|
|
2802
2802
|
children,
|
|
@@ -2862,11 +2862,11 @@ var ROTATE_KEY_SPLINES = [
|
|
|
2862
2862
|
var ROTATE_VALUES = "0 24 24; 154 24 24; 309 24 24; 463 24 24; 617 24 24; 771 24 24; 926 24 24; 1080 24 24";
|
|
2863
2863
|
var DETERMINATE_CIRCLE = "M24 7 C34.49 7 41 13.51 41 24 C41 34.49 34.49 41 24 41 C13.51 41 7 34.49 7 24 C7 13.51 13.51 7 24 7 Z";
|
|
2864
2864
|
var DETERMINATE_SOFT_BURST = "M20.9 10.4 21.4 9.5 21.9 8.7 22.5 7.8 23.2 7.2 24.2 7 25.1 7.4 25.7 8.1 26.2 9 26.8 9.8 27.3 10.6 28.1 11.2 29 11.3 30 11 30.9 10.6 31.8 10.3 32.8 9.9 33.7 10 34.5 10.6 34.9 11.5 34.8 12.5 34.8 13.5 34.7 14.5 34.7 15.5 35.2 16.3 36 16.8 37 17.1 37.9 17.3 38.9 17.5 39.8 17.9 40.4 18.7 40.5 19.7 40 20.5 39.4 21.3 38.7 22 38.1 22.8 37.6 23.7 37.7 24.6 38.3 25.5 38.9 26.2 39.6 27 40.2 27.7 40.5 28.7 40.3 29.6 39.5 30.3 38.6 30.6 37.6 30.8 36.7 31 35.7 31.3 35 31.9 34.6 32.8 34.7 33.8 34.8 34.8 34.9 35.8 34.8 36.8 34.3 37.6 33.4 38.1 32.4 38 31.5 37.6 30.6 37.2 29.7 36.9 28.7 36.6 27.8 36.9 27.1 37.6 26.6 38.5 26.1 39.3 25.5 40.2 24.8 40.8 23.8 41 22.9 40.6 22.3 39.9 21.8 39 21.2 38.2 20.7 37.4 19.9 36.8 19 36.7 18 37 17.1 37.4 16.2 37.7 15.2 38.1 14.3 38 13.5 37.4 13.1 36.5 13.2 35.5 13.2 34.5 13.3 33.5 13.3 32.5 12.8 31.7 12 31.2 11 31 10.1 30.7 9.1 30.5 8.2 30.1 7.6 29.3 7.5 28.3 8 27.5 8.7 26.7 9.3 26 9.9 25.2 10.4 24.3 10.3 23.4 9.7 22.5 9.1 21.8 8.4 21 7.8 20.3 7.5 19.3 7.7 18.4 8.5 17.7 9.4 17.4 10.4 17.2 11.3 17 12.3 16.7 13 16.1 13.4 15.2 13.3 14.2 13.2 13.2 13.1 12.2 13.2 11.2 13.7 10.4 14.6 9.9 15.6 10 16.5 10.4 17.4 10.8 18.3 11.1 19.3 11.4 20.2 11.1Z";
|
|
2865
|
-
var IndeterminateSvg =
|
|
2865
|
+
var IndeterminateSvg = React39.memo(function IndeterminateSvg2({
|
|
2866
2866
|
size
|
|
2867
2867
|
}) {
|
|
2868
|
-
const [ready, setReady] =
|
|
2869
|
-
|
|
2868
|
+
const [ready, setReady] = React39.useState(false);
|
|
2869
|
+
React39.useEffect(() => {
|
|
2870
2870
|
const raf = requestAnimationFrame(() => setReady(true));
|
|
2871
2871
|
return () => cancelAnimationFrame(raf);
|
|
2872
2872
|
}, []);
|
|
@@ -2911,7 +2911,7 @@ var IndeterminateSvg = React38.memo(function IndeterminateSvg2({
|
|
|
2911
2911
|
}
|
|
2912
2912
|
);
|
|
2913
2913
|
});
|
|
2914
|
-
var DeterminateSvg =
|
|
2914
|
+
var DeterminateSvg = React39.memo(function DeterminateSvg2({
|
|
2915
2915
|
size,
|
|
2916
2916
|
progress
|
|
2917
2917
|
}) {
|
|
@@ -2936,7 +2936,7 @@ var DeterminateSvg = React38.memo(function DeterminateSvg2({
|
|
|
2936
2936
|
}
|
|
2937
2937
|
);
|
|
2938
2938
|
});
|
|
2939
|
-
var LoadingIndicator =
|
|
2939
|
+
var LoadingIndicator = React39.forwardRef(
|
|
2940
2940
|
(_a, ref) => {
|
|
2941
2941
|
var _b = _a, {
|
|
2942
2942
|
variant = "uncontained",
|
|
@@ -3051,7 +3051,7 @@ function getSinePath(startX, endX, phase, wl, amp) {
|
|
|
3051
3051
|
d += ` L ${endX.toFixed(2)} ${yEnd.toFixed(2)}`;
|
|
3052
3052
|
return d;
|
|
3053
3053
|
}
|
|
3054
|
-
var CircularProgress =
|
|
3054
|
+
var CircularProgress = React39.forwardRef(
|
|
3055
3055
|
(_a, ref) => {
|
|
3056
3056
|
var _b = _a, {
|
|
3057
3057
|
value,
|
|
@@ -3089,15 +3089,15 @@ var CircularProgress = React38.forwardRef(
|
|
|
3089
3089
|
const isWavy = shape === "wavy";
|
|
3090
3090
|
const BASELINE_SIZE = 48;
|
|
3091
3091
|
const scaleFactor = size / BASELINE_SIZE;
|
|
3092
|
-
const effectiveAmplitude =
|
|
3092
|
+
const effectiveAmplitude = React39.useMemo(
|
|
3093
3093
|
() => amplitude != null ? amplitude : 1.6 * scaleFactor,
|
|
3094
3094
|
[amplitude, scaleFactor]
|
|
3095
3095
|
);
|
|
3096
|
-
const effectiveWavelength =
|
|
3096
|
+
const effectiveWavelength = React39.useMemo(
|
|
3097
3097
|
() => wavelength != null ? wavelength : 15 * scaleFactor,
|
|
3098
3098
|
[wavelength, scaleFactor]
|
|
3099
3099
|
);
|
|
3100
|
-
const wavyActivePath =
|
|
3100
|
+
const wavyActivePath = React39.useMemo(
|
|
3101
3101
|
() => isWavy ? generateWavyCircularPath(
|
|
3102
3102
|
center,
|
|
3103
3103
|
radius,
|
|
@@ -3106,8 +3106,8 @@ var CircularProgress = React38.forwardRef(
|
|
|
3106
3106
|
) : null,
|
|
3107
3107
|
[isWavy, center, radius, effectiveAmplitude, effectiveWavelength]
|
|
3108
3108
|
);
|
|
3109
|
-
const circumference =
|
|
3110
|
-
const gapForTrack =
|
|
3109
|
+
const circumference = React39.useMemo(() => 2 * Math.PI * radius, [radius]);
|
|
3110
|
+
const gapForTrack = React39.useMemo(
|
|
3111
3111
|
() => (gapSize + trackHeight) / circumference,
|
|
3112
3112
|
[gapSize, trackHeight, circumference]
|
|
3113
3113
|
);
|
|
@@ -3296,9 +3296,9 @@ var CircularProgress = React38.forwardRef(
|
|
|
3296
3296
|
);
|
|
3297
3297
|
CircularProgress.displayName = "CircularProgress";
|
|
3298
3298
|
function useContainerWidth() {
|
|
3299
|
-
const [width, setWidth] =
|
|
3300
|
-
const observerRef =
|
|
3301
|
-
const ref =
|
|
3299
|
+
const [width, setWidth] = React39.useState(0);
|
|
3300
|
+
const observerRef = React39.useRef(null);
|
|
3301
|
+
const ref = React39.useCallback((node) => {
|
|
3302
3302
|
if (observerRef.current) {
|
|
3303
3303
|
observerRef.current.disconnect();
|
|
3304
3304
|
observerRef.current = null;
|
|
@@ -3312,7 +3312,7 @@ function useContainerWidth() {
|
|
|
3312
3312
|
observerRef.current = obs;
|
|
3313
3313
|
}
|
|
3314
3314
|
}, []);
|
|
3315
|
-
|
|
3315
|
+
React39.useEffect(() => {
|
|
3316
3316
|
return () => {
|
|
3317
3317
|
if (observerRef.current) {
|
|
3318
3318
|
observerRef.current.disconnect();
|
|
@@ -3322,7 +3322,7 @@ function useContainerWidth() {
|
|
|
3322
3322
|
return [ref, width];
|
|
3323
3323
|
}
|
|
3324
3324
|
function useMergedRef(...refs) {
|
|
3325
|
-
return
|
|
3325
|
+
return React39.useCallback(
|
|
3326
3326
|
(node) => {
|
|
3327
3327
|
for (const ref of refs) {
|
|
3328
3328
|
if (typeof ref === "function") {
|
|
@@ -3336,7 +3336,7 @@ function useMergedRef(...refs) {
|
|
|
3336
3336
|
[refs]
|
|
3337
3337
|
);
|
|
3338
3338
|
}
|
|
3339
|
-
var FlatLinearTrack =
|
|
3339
|
+
var FlatLinearTrack = React39.memo(function FlatLinearTrack2({
|
|
3340
3340
|
trackHeight,
|
|
3341
3341
|
activeColor,
|
|
3342
3342
|
trackColor,
|
|
@@ -3412,7 +3412,7 @@ var FlatLinearTrack = React38.memo(function FlatLinearTrack2({
|
|
|
3412
3412
|
}
|
|
3413
3413
|
);
|
|
3414
3414
|
});
|
|
3415
|
-
var WavyLinearTrack =
|
|
3415
|
+
var WavyLinearTrack = React39.memo(function WavyLinearTrack2({
|
|
3416
3416
|
trackHeight,
|
|
3417
3417
|
svgHeight,
|
|
3418
3418
|
amplitude,
|
|
@@ -3431,13 +3431,13 @@ var WavyLinearTrack = React38.memo(function WavyLinearTrack2({
|
|
|
3431
3431
|
}) {
|
|
3432
3432
|
const isDeterminate = typeof value === "number";
|
|
3433
3433
|
const clampedValue = isDeterminate ? Math.max(0, Math.min(100, value)) : 100;
|
|
3434
|
-
const titleId =
|
|
3434
|
+
const titleId = React39.useId();
|
|
3435
3435
|
const [containerRef, width] = useContainerWidth();
|
|
3436
|
-
const activePathRef =
|
|
3437
|
-
const trackPathRef =
|
|
3436
|
+
const activePathRef = React39.useRef(null);
|
|
3437
|
+
const trackPathRef = React39.useRef(null);
|
|
3438
3438
|
const amplitudeMV = useMotionValue(amplitude);
|
|
3439
3439
|
const fractionMV = useMotionValue(isDeterminate ? clampedValue / 100 : 1);
|
|
3440
|
-
|
|
3440
|
+
React39.useEffect(() => {
|
|
3441
3441
|
if (isDeterminate) {
|
|
3442
3442
|
const fraction = clampedValue / 100;
|
|
3443
3443
|
let targetAmp = amplitude;
|
|
@@ -3608,7 +3608,7 @@ var WavyLinearTrack = React38.memo(function WavyLinearTrack2({
|
|
|
3608
3608
|
}
|
|
3609
3609
|
);
|
|
3610
3610
|
});
|
|
3611
|
-
var LinearProgress =
|
|
3611
|
+
var LinearProgress = React39.forwardRef(
|
|
3612
3612
|
(_a, ref) => {
|
|
3613
3613
|
var _b = _a, {
|
|
3614
3614
|
value,
|
|
@@ -3649,10 +3649,10 @@ var LinearProgress = React38.forwardRef(
|
|
|
3649
3649
|
]);
|
|
3650
3650
|
const isDeterminate = value !== void 0;
|
|
3651
3651
|
const clampedValue = isDeterminate ? Math.min(100, Math.max(0, value)) : 0;
|
|
3652
|
-
const containerRef =
|
|
3652
|
+
const containerRef = React39.useRef(null);
|
|
3653
3653
|
const mergedRef = useMergedRef(ref, containerRef);
|
|
3654
|
-
const [isRtl, setIsRtl] =
|
|
3655
|
-
|
|
3654
|
+
const [isRtl, setIsRtl] = React39.useState(false);
|
|
3655
|
+
React39.useEffect(() => {
|
|
3656
3656
|
if (containerRef.current) {
|
|
3657
3657
|
const dir = getComputedStyle(containerRef.current).direction;
|
|
3658
3658
|
setIsRtl(dir === "rtl");
|
|
@@ -3660,16 +3660,16 @@ var LinearProgress = React38.forwardRef(
|
|
|
3660
3660
|
}, []);
|
|
3661
3661
|
const isWavy = shape === "wavy";
|
|
3662
3662
|
const resolvedTrackShape = trackShape != null ? trackShape : shape;
|
|
3663
|
-
const effectiveAmplitude =
|
|
3664
|
-
const svgHeight =
|
|
3663
|
+
const effectiveAmplitude = React39.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
|
|
3664
|
+
const svgHeight = React39.useMemo(
|
|
3665
3665
|
() => isWavy ? trackHeight + effectiveAmplitude * 2 : trackHeight,
|
|
3666
3666
|
[isWavy, trackHeight, effectiveAmplitude]
|
|
3667
3667
|
);
|
|
3668
|
-
const shouldShowStop =
|
|
3668
|
+
const shouldShowStop = React39.useMemo(
|
|
3669
3669
|
() => isDeterminate && resolvedTrackShape === "flat" && (showStopIndicator === true || showStopIndicator === "auto" && isDeterminate),
|
|
3670
3670
|
[isDeterminate, resolvedTrackShape, showStopIndicator]
|
|
3671
3671
|
);
|
|
3672
|
-
const stopSize =
|
|
3672
|
+
const stopSize = React39.useMemo(
|
|
3673
3673
|
() => Math.max(2, trackHeight > 4 ? 4 : trackHeight / 2),
|
|
3674
3674
|
[trackHeight]
|
|
3675
3675
|
);
|
|
@@ -3742,14 +3742,14 @@ var LinearProgress = React38.forwardRef(
|
|
|
3742
3742
|
}
|
|
3743
3743
|
);
|
|
3744
3744
|
LinearProgress.displayName = "LinearProgress";
|
|
3745
|
-
var ProgressIndicator =
|
|
3745
|
+
var ProgressIndicator = React39.forwardRef((props, ref) => {
|
|
3746
3746
|
if (props.variant === "circular") {
|
|
3747
3747
|
return /* @__PURE__ */ jsx(CircularProgress, __spreadValues({ ref }, props));
|
|
3748
3748
|
}
|
|
3749
3749
|
return /* @__PURE__ */ jsx(LinearProgress, __spreadValues({ ref }, props));
|
|
3750
3750
|
});
|
|
3751
3751
|
ProgressIndicator.displayName = "ProgressIndicator";
|
|
3752
|
-
var RippleItem =
|
|
3752
|
+
var RippleItem = React39.memo(function RippleItem2({
|
|
3753
3753
|
ripple,
|
|
3754
3754
|
onDone
|
|
3755
3755
|
}) {
|
|
@@ -3793,8 +3793,8 @@ function Ripple({
|
|
|
3793
3793
|
}
|
|
3794
3794
|
function useRippleState(options = {}) {
|
|
3795
3795
|
const { disabled = false } = options;
|
|
3796
|
-
const [ripples, setRipples] =
|
|
3797
|
-
const onPointerDown =
|
|
3796
|
+
const [ripples, setRipples] = React39.useState([]);
|
|
3797
|
+
const onPointerDown = React39.useCallback(
|
|
3798
3798
|
(e) => {
|
|
3799
3799
|
if (disabled) return;
|
|
3800
3800
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -3808,7 +3808,7 @@ function useRippleState(options = {}) {
|
|
|
3808
3808
|
},
|
|
3809
3809
|
[disabled]
|
|
3810
3810
|
);
|
|
3811
|
-
const removeRipple =
|
|
3811
|
+
const removeRipple = React39.useCallback((id) => {
|
|
3812
3812
|
setRipples((prev) => prev.filter((r) => r.id !== id));
|
|
3813
3813
|
}, []);
|
|
3814
3814
|
return { ripples, onPointerDown, removeRipple };
|
|
@@ -3939,7 +3939,7 @@ var buttonColorVariants = cva(
|
|
|
3939
3939
|
);
|
|
3940
3940
|
function resolveLabel(children, asChild) {
|
|
3941
3941
|
if (asChild) {
|
|
3942
|
-
const child =
|
|
3942
|
+
const child = React39.Children.only(children);
|
|
3943
3943
|
return child.props.children;
|
|
3944
3944
|
}
|
|
3945
3945
|
return children;
|
|
@@ -4011,7 +4011,7 @@ function AnimatedIconSlot({
|
|
|
4011
4011
|
}
|
|
4012
4012
|
);
|
|
4013
4013
|
}
|
|
4014
|
-
var ButtonComponent =
|
|
4014
|
+
var ButtonComponent = React39.forwardRef(
|
|
4015
4015
|
(_a, ref) => {
|
|
4016
4016
|
var _b = _a, {
|
|
4017
4017
|
className,
|
|
@@ -4060,15 +4060,15 @@ var ButtonComponent = React38.forwardRef(
|
|
|
4060
4060
|
const { pressed: pressedRadius } = (_b2 = radiusMap[size]) != null ? _b2 : radiusMap.sm;
|
|
4061
4061
|
const iconClass = (_c = SIZE_ICON_CLASS[size]) != null ? _c : "size-5";
|
|
4062
4062
|
const mergedStyle = __spreadValues(__spreadValues({}, SIZE_STYLES[size]), style);
|
|
4063
|
-
const labelText =
|
|
4063
|
+
const labelText = React39.useMemo(
|
|
4064
4064
|
() => resolveLabel(children, asChild),
|
|
4065
4065
|
[children, asChild]
|
|
4066
4066
|
);
|
|
4067
4067
|
const computedAriaLabel = ariaLabelProp || (typeof children === "string" ? children : void 0);
|
|
4068
4068
|
const needsTouchTarget = size === "xs" || size === "sm";
|
|
4069
4069
|
const motionRadius = useMotionValue(animateRadius);
|
|
4070
|
-
const asChildRef =
|
|
4071
|
-
const mergedRef =
|
|
4070
|
+
const asChildRef = React39.useRef(null);
|
|
4071
|
+
const mergedRef = React39.useCallback(
|
|
4072
4072
|
(node) => {
|
|
4073
4073
|
asChildRef.current = node;
|
|
4074
4074
|
if (typeof ref === "function") ref(node);
|
|
@@ -4077,27 +4077,27 @@ var ButtonComponent = React38.forwardRef(
|
|
|
4077
4077
|
},
|
|
4078
4078
|
[ref]
|
|
4079
4079
|
);
|
|
4080
|
-
|
|
4080
|
+
React39.useEffect(
|
|
4081
4081
|
() => motionRadius.on("change", (v) => {
|
|
4082
4082
|
if (asChildRef.current)
|
|
4083
4083
|
asChildRef.current.style.borderRadius = `${v}px`;
|
|
4084
4084
|
}),
|
|
4085
4085
|
[motionRadius]
|
|
4086
4086
|
);
|
|
4087
|
-
|
|
4087
|
+
React39.useEffect(() => {
|
|
4088
4088
|
springAnimate(motionRadius, animateRadius);
|
|
4089
4089
|
}, [animateRadius, motionRadius]);
|
|
4090
4090
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
4091
4091
|
disabled: loading
|
|
4092
4092
|
});
|
|
4093
|
-
const handleClick =
|
|
4093
|
+
const handleClick = React39.useCallback(
|
|
4094
4094
|
(e) => {
|
|
4095
4095
|
if (loading) return e.preventDefault();
|
|
4096
4096
|
onClick == null ? void 0 : onClick(e);
|
|
4097
4097
|
},
|
|
4098
4098
|
[loading, onClick]
|
|
4099
4099
|
);
|
|
4100
|
-
const handleKeyDown =
|
|
4100
|
+
const handleKeyDown = React39.useCallback(
|
|
4101
4101
|
(e) => {
|
|
4102
4102
|
if (loading) return;
|
|
4103
4103
|
if (onClick && (e.key === "Enter" || e.key === " ")) {
|
|
@@ -4140,7 +4140,7 @@ var ButtonComponent = React38.forwardRef(
|
|
|
4140
4140
|
] });
|
|
4141
4141
|
if (asChild) {
|
|
4142
4142
|
const htmlProps = stripMotionProps(restProps);
|
|
4143
|
-
const child =
|
|
4143
|
+
const child = React39.Children.only(children);
|
|
4144
4144
|
const handleAsChildPointerDown = (e) => {
|
|
4145
4145
|
springAnimate(motionRadius, pressedRadius);
|
|
4146
4146
|
onPointerDown == null ? void 0 : onPointerDown(e);
|
|
@@ -4164,7 +4164,7 @@ var ButtonComponent = React38.forwardRef(
|
|
|
4164
4164
|
}),
|
|
4165
4165
|
className: buttonClassName
|
|
4166
4166
|
}, htmlProps), {
|
|
4167
|
-
children:
|
|
4167
|
+
children: React39.cloneElement(child, { children: innerContent })
|
|
4168
4168
|
})
|
|
4169
4169
|
) });
|
|
4170
4170
|
}
|
|
@@ -4192,7 +4192,7 @@ var ButtonComponent = React38.forwardRef(
|
|
|
4192
4192
|
}
|
|
4193
4193
|
);
|
|
4194
4194
|
ButtonComponent.displayName = "Button";
|
|
4195
|
-
var Button =
|
|
4195
|
+
var Button = React39.memo(ButtonComponent);
|
|
4196
4196
|
var SIZE_PADDING_MAP = {
|
|
4197
4197
|
xs: "0.75rem",
|
|
4198
4198
|
sm: "1rem",
|
|
@@ -4221,7 +4221,7 @@ var PRESSED_RADIUS_MAP = {
|
|
|
4221
4221
|
lg: 28,
|
|
4222
4222
|
xl: 40
|
|
4223
4223
|
};
|
|
4224
|
-
var ButtonGroupComponent =
|
|
4224
|
+
var ButtonGroupComponent = React39.forwardRef(
|
|
4225
4225
|
(_a, ref) => {
|
|
4226
4226
|
var _b = _a, {
|
|
4227
4227
|
className,
|
|
@@ -4242,13 +4242,13 @@ var ButtonGroupComponent = React38.forwardRef(
|
|
|
4242
4242
|
"showCheck",
|
|
4243
4243
|
"children"
|
|
4244
4244
|
]);
|
|
4245
|
-
const [pressedIndex, setPressedIndex] =
|
|
4246
|
-
const childrenArray =
|
|
4247
|
-
() =>
|
|
4245
|
+
const [pressedIndex, setPressedIndex] = React39.useState(null);
|
|
4246
|
+
const childrenArray = React39.useMemo(
|
|
4247
|
+
() => React39.Children.toArray(children).filter(React39.isValidElement),
|
|
4248
4248
|
[children]
|
|
4249
4249
|
);
|
|
4250
4250
|
const count = childrenArray.length;
|
|
4251
|
-
const handlePointerLeaveAndUp =
|
|
4251
|
+
const handlePointerLeaveAndUp = React39.useCallback(() => {
|
|
4252
4252
|
setPressedIndex(null);
|
|
4253
4253
|
}, []);
|
|
4254
4254
|
return /* @__PURE__ */ jsx(
|
|
@@ -4387,7 +4387,7 @@ var ButtonGroupComponent = React38.forwardRef(
|
|
|
4387
4387
|
duration: 0.2
|
|
4388
4388
|
};
|
|
4389
4389
|
}
|
|
4390
|
-
return
|
|
4390
|
+
return React39.cloneElement(element, __spreadValues(__spreadProps(__spreadValues({
|
|
4391
4391
|
key: (_a2 = element.key) != null ? _a2 : index,
|
|
4392
4392
|
tabIndex: isFirst ? 0 : -1,
|
|
4393
4393
|
size: size || element.props.size,
|
|
@@ -4416,7 +4416,7 @@ var ButtonGroupComponent = React38.forwardRef(
|
|
|
4416
4416
|
}
|
|
4417
4417
|
);
|
|
4418
4418
|
ButtonGroupComponent.displayName = "ButtonGroup";
|
|
4419
|
-
var ButtonGroup =
|
|
4419
|
+
var ButtonGroup = React39.memo(ButtonGroupComponent);
|
|
4420
4420
|
var SHADOW = {
|
|
4421
4421
|
level0: "none",
|
|
4422
4422
|
level1: "0px 1px 2px 0px rgba(0,0,0,.3), 0px 1px 3px 1px rgba(0,0,0,.15)",
|
|
@@ -4475,7 +4475,7 @@ function useCardElevation(variant, disabled) {
|
|
|
4475
4475
|
}
|
|
4476
4476
|
};
|
|
4477
4477
|
}
|
|
4478
|
-
var CardImpl =
|
|
4478
|
+
var CardImpl = React39.forwardRef(
|
|
4479
4479
|
(_a, ref) => {
|
|
4480
4480
|
var _b = _a, {
|
|
4481
4481
|
className,
|
|
@@ -4573,7 +4573,7 @@ var CardImpl = React38.forwardRef(
|
|
|
4573
4573
|
}
|
|
4574
4574
|
);
|
|
4575
4575
|
CardImpl.displayName = "Card";
|
|
4576
|
-
var Card =
|
|
4576
|
+
var Card = React39.memo(CardImpl);
|
|
4577
4577
|
var MD3_STANDARD = [0.2, 0, 0, 1];
|
|
4578
4578
|
var MD3_FAST_EFFECTS = [0.3, 0, 1, 1];
|
|
4579
4579
|
var CHECKMARK_PATH = "M 4.5 9.5 L 7.5 12.5 L 13.5 5.5";
|
|
@@ -4587,7 +4587,7 @@ var NEXT_STATE = {
|
|
|
4587
4587
|
checked: "indeterminate",
|
|
4588
4588
|
indeterminate: "unchecked"
|
|
4589
4589
|
};
|
|
4590
|
-
var CheckboxVisual =
|
|
4590
|
+
var CheckboxVisual = React39.memo(function CheckboxVisual2({
|
|
4591
4591
|
isSelected,
|
|
4592
4592
|
isIndeterminate,
|
|
4593
4593
|
containerBg,
|
|
@@ -4658,7 +4658,7 @@ var CheckboxVisual = React38.memo(function CheckboxVisual2({
|
|
|
4658
4658
|
);
|
|
4659
4659
|
});
|
|
4660
4660
|
function useMergedRef2(externalRef, internalRef) {
|
|
4661
|
-
return
|
|
4661
|
+
return React39.useCallback(
|
|
4662
4662
|
(node) => {
|
|
4663
4663
|
internalRef.current = node;
|
|
4664
4664
|
if (!externalRef) return;
|
|
@@ -4671,7 +4671,7 @@ function useMergedRef2(externalRef, internalRef) {
|
|
|
4671
4671
|
[externalRef, internalRef]
|
|
4672
4672
|
);
|
|
4673
4673
|
}
|
|
4674
|
-
var CheckboxComponent =
|
|
4674
|
+
var CheckboxComponent = React39.forwardRef(
|
|
4675
4675
|
({
|
|
4676
4676
|
checked,
|
|
4677
4677
|
defaultChecked = false,
|
|
@@ -4693,20 +4693,20 @@ var CheckboxComponent = React38.forwardRef(
|
|
|
4693
4693
|
}, ref) => {
|
|
4694
4694
|
var _a;
|
|
4695
4695
|
const prefersReduced = (_a = useReducedMotion()) != null ? _a : false;
|
|
4696
|
-
const generatedId =
|
|
4696
|
+
const generatedId = React39.useId();
|
|
4697
4697
|
const inputId = idProp != null ? idProp : label ? `checkbox-${generatedId}` : void 0;
|
|
4698
|
-
const [internalState, setInternalState] =
|
|
4698
|
+
const [internalState, setInternalState] = React39.useState(
|
|
4699
4699
|
() => defaultChecked ? "checked" : "unchecked"
|
|
4700
4700
|
);
|
|
4701
4701
|
const isControlled = stateProp !== void 0 || checked !== void 0;
|
|
4702
4702
|
const baseState = isControlled ? resolveState(checked, false, stateProp) : internalState;
|
|
4703
4703
|
const effectiveState = indeterminate ? "indeterminate" : baseState;
|
|
4704
|
-
const [ripples, setRipples] =
|
|
4705
|
-
const removeRipple =
|
|
4704
|
+
const [ripples, setRipples] = React39.useState([]);
|
|
4705
|
+
const removeRipple = React39.useCallback(
|
|
4706
4706
|
(id) => setRipples((prev) => prev.filter((r) => r.id !== id)),
|
|
4707
4707
|
[]
|
|
4708
4708
|
);
|
|
4709
|
-
const onPointerDown =
|
|
4709
|
+
const onPointerDown = React39.useCallback(
|
|
4710
4710
|
(e) => {
|
|
4711
4711
|
if (disabled) return;
|
|
4712
4712
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -4720,7 +4720,7 @@ var CheckboxComponent = React38.forwardRef(
|
|
|
4720
4720
|
},
|
|
4721
4721
|
[disabled]
|
|
4722
4722
|
);
|
|
4723
|
-
const handleChange =
|
|
4723
|
+
const handleChange = React39.useCallback(
|
|
4724
4724
|
(e) => {
|
|
4725
4725
|
if (disabled) return;
|
|
4726
4726
|
if (stateProp !== void 0) {
|
|
@@ -4746,9 +4746,9 @@ var CheckboxComponent = React38.forwardRef(
|
|
|
4746
4746
|
onCheckedChange
|
|
4747
4747
|
]
|
|
4748
4748
|
);
|
|
4749
|
-
const inputRef =
|
|
4749
|
+
const inputRef = React39.useRef(null);
|
|
4750
4750
|
const mergedRef = useMergedRef2(ref, inputRef);
|
|
4751
|
-
|
|
4751
|
+
React39.useEffect(() => {
|
|
4752
4752
|
if (inputRef.current) {
|
|
4753
4753
|
inputRef.current.indeterminate = effectiveState === "indeterminate";
|
|
4754
4754
|
}
|
|
@@ -4873,13 +4873,13 @@ var CheckboxComponent = React38.forwardRef(
|
|
|
4873
4873
|
}
|
|
4874
4874
|
);
|
|
4875
4875
|
CheckboxComponent.displayName = "Checkbox";
|
|
4876
|
-
var Checkbox =
|
|
4877
|
-
var TriStateCheckboxComponent =
|
|
4876
|
+
var Checkbox = React39.memo(CheckboxComponent);
|
|
4877
|
+
var TriStateCheckboxComponent = React39.forwardRef((_a, ref) => {
|
|
4878
4878
|
var _b = _a, { state, onStateChange } = _b, rest = __objRest(_b, ["state", "onStateChange"]);
|
|
4879
4879
|
return /* @__PURE__ */ jsx(Checkbox, __spreadValues({ ref, state, onStateChange }, rest));
|
|
4880
4880
|
});
|
|
4881
4881
|
TriStateCheckboxComponent.displayName = "TriStateCheckbox";
|
|
4882
|
-
var TriStateCheckbox =
|
|
4882
|
+
var TriStateCheckbox = React39.memo(TriStateCheckboxComponent);
|
|
4883
4883
|
function CheckIcon({ className }) {
|
|
4884
4884
|
return /* @__PURE__ */ jsx(
|
|
4885
4885
|
"svg",
|
|
@@ -4973,7 +4973,7 @@ var chipVariants = cva(
|
|
|
4973
4973
|
defaultVariants: { variant: "assist" }
|
|
4974
4974
|
}
|
|
4975
4975
|
);
|
|
4976
|
-
var ChipImpl =
|
|
4976
|
+
var ChipImpl = React39.forwardRef(
|
|
4977
4977
|
(_a, ref) => {
|
|
4978
4978
|
var _b = _a, {
|
|
4979
4979
|
variant = "assist",
|
|
@@ -5009,7 +5009,7 @@ var ChipImpl = React38.forwardRef(
|
|
|
5009
5009
|
const showCheckmark = isFilter && selected;
|
|
5010
5010
|
const hasTrailingContent = !!trailingIcon || !!onRemove;
|
|
5011
5011
|
const hasLeadingContent = isFilter || !!resolvedLeadingIcon;
|
|
5012
|
-
const paddingClass =
|
|
5012
|
+
const paddingClass = React39.useMemo(
|
|
5013
5013
|
() => cn(
|
|
5014
5014
|
!isInput && !hasLeadingContent && !hasTrailingContent && "px-4",
|
|
5015
5015
|
!isInput && hasLeadingContent && !hasTrailingContent && "pl-2 pr-4",
|
|
@@ -5022,7 +5022,7 @@ var ChipImpl = React38.forwardRef(
|
|
|
5022
5022
|
),
|
|
5023
5023
|
[isInput, hasLeadingContent, hasTrailingContent]
|
|
5024
5024
|
);
|
|
5025
|
-
const stateClass =
|
|
5025
|
+
const stateClass = React39.useMemo(
|
|
5026
5026
|
() => cn(
|
|
5027
5027
|
(isFilter || isInput) && selected && "bg-m3-secondary-container text-m3-on-secondary-container border-none before:bg-m3-on-secondary-container",
|
|
5028
5028
|
elevated && !selected && "bg-m3-surface-container-low border-none elevation-1",
|
|
@@ -5033,7 +5033,7 @@ var ChipImpl = React38.forwardRef(
|
|
|
5033
5033
|
),
|
|
5034
5034
|
[isFilter, isInput, selected, elevated, disabled]
|
|
5035
5035
|
);
|
|
5036
|
-
const leadingIconColorClass =
|
|
5036
|
+
const leadingIconColorClass = React39.useMemo(
|
|
5037
5037
|
() => cn(
|
|
5038
5038
|
(variant === "assist" || variant === "suggestion") && "text-m3-primary",
|
|
5039
5039
|
isFilter && !selected && "text-m3-primary",
|
|
@@ -5205,8 +5205,8 @@ var ChipImpl = React38.forwardRef(
|
|
|
5205
5205
|
}
|
|
5206
5206
|
);
|
|
5207
5207
|
ChipImpl.displayName = "Chip";
|
|
5208
|
-
var Chip =
|
|
5209
|
-
var ScrollArea =
|
|
5208
|
+
var Chip = React39.memo(ChipImpl);
|
|
5209
|
+
var ScrollArea = React39.forwardRef(
|
|
5210
5210
|
(_a, ref) => {
|
|
5211
5211
|
var _b = _a, {
|
|
5212
5212
|
className,
|
|
@@ -5214,14 +5214,16 @@ var ScrollArea = React38.forwardRef(
|
|
|
5214
5214
|
children,
|
|
5215
5215
|
type = "hover",
|
|
5216
5216
|
orientation = "vertical",
|
|
5217
|
-
scrollHideDelay = 600
|
|
5217
|
+
scrollHideDelay = 600,
|
|
5218
|
+
viewportRef
|
|
5218
5219
|
} = _b, props = __objRest(_b, [
|
|
5219
5220
|
"className",
|
|
5220
5221
|
"viewportClassName",
|
|
5221
5222
|
"children",
|
|
5222
5223
|
"type",
|
|
5223
5224
|
"orientation",
|
|
5224
|
-
"scrollHideDelay"
|
|
5225
|
+
"scrollHideDelay",
|
|
5226
|
+
"viewportRef"
|
|
5225
5227
|
]);
|
|
5226
5228
|
const radixType = type === "none" ? "always" : type;
|
|
5227
5229
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5236,6 +5238,7 @@ var ScrollArea = React38.forwardRef(
|
|
|
5236
5238
|
/* @__PURE__ */ jsx(
|
|
5237
5239
|
RadixScrollArea.Viewport,
|
|
5238
5240
|
{
|
|
5241
|
+
ref: viewportRef,
|
|
5239
5242
|
className: cn(
|
|
5240
5243
|
"h-full w-full flex-1 min-h-0 min-w-0 rounded-[inherit]",
|
|
5241
5244
|
"outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-1",
|
|
@@ -5265,7 +5268,7 @@ var ScrollArea = React38.forwardRef(
|
|
|
5265
5268
|
}
|
|
5266
5269
|
);
|
|
5267
5270
|
ScrollArea.displayName = "ScrollArea";
|
|
5268
|
-
var ScrollAreaScrollbar =
|
|
5271
|
+
var ScrollAreaScrollbar = React39.forwardRef((_a, ref) => {
|
|
5269
5272
|
var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
5270
5273
|
return /* @__PURE__ */ jsx(
|
|
5271
5274
|
RadixScrollArea.Scrollbar,
|
|
@@ -5295,7 +5298,7 @@ var ScrollAreaScrollbar = React38.forwardRef((_a, ref) => {
|
|
|
5295
5298
|
);
|
|
5296
5299
|
});
|
|
5297
5300
|
ScrollAreaScrollbar.displayName = RadixScrollArea.Scrollbar.displayName;
|
|
5298
|
-
var ScrollAreaCorner =
|
|
5301
|
+
var ScrollAreaCorner = React39.forwardRef((_a, ref) => {
|
|
5299
5302
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5300
5303
|
return /* @__PURE__ */ jsx(
|
|
5301
5304
|
RadixScrollArea.Corner,
|
|
@@ -5572,7 +5575,7 @@ function resolveDisabledBgClass(colorStyle) {
|
|
|
5572
5575
|
}
|
|
5573
5576
|
return "disabled:text-m3-on-surface/[0.38]";
|
|
5574
5577
|
}
|
|
5575
|
-
var IconButtonComponent =
|
|
5578
|
+
var IconButtonComponent = React39.forwardRef(
|
|
5576
5579
|
(_a, ref) => {
|
|
5577
5580
|
var _b = _a, {
|
|
5578
5581
|
className,
|
|
@@ -5606,18 +5609,18 @@ var IconButtonComponent = React38.forwardRef(
|
|
|
5606
5609
|
var _a2, _b2;
|
|
5607
5610
|
const isToggle = variant === "toggle";
|
|
5608
5611
|
const isSelected = isToggle && !!selected;
|
|
5609
|
-
const resolvedColorClass =
|
|
5612
|
+
const resolvedColorClass = React39.useMemo(
|
|
5610
5613
|
() => isSelected ? colorStyles[colorStyle].selected : colorStyles[colorStyle].default,
|
|
5611
5614
|
[isSelected, colorStyle]
|
|
5612
5615
|
);
|
|
5613
|
-
const outlineWidthClass =
|
|
5616
|
+
const outlineWidthClass = React39.useMemo(
|
|
5614
5617
|
() => {
|
|
5615
5618
|
var _a3;
|
|
5616
5619
|
return colorStyle === "outlined" && !isSelected ? (_a3 = SIZE_OUTLINE_WIDTH[size]) != null ? _a3 : "border" : "";
|
|
5617
5620
|
},
|
|
5618
5621
|
[colorStyle, isSelected, size]
|
|
5619
5622
|
);
|
|
5620
|
-
const disabledBgClass =
|
|
5623
|
+
const disabledBgClass = React39.useMemo(
|
|
5621
5624
|
() => resolveDisabledBgClass(colorStyle),
|
|
5622
5625
|
[colorStyle]
|
|
5623
5626
|
);
|
|
@@ -5636,7 +5639,7 @@ var IconButtonComponent = React38.forwardRef(
|
|
|
5636
5639
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
5637
5640
|
disabled: loading
|
|
5638
5641
|
});
|
|
5639
|
-
const handleClick =
|
|
5642
|
+
const handleClick = React39.useCallback(
|
|
5640
5643
|
(e) => {
|
|
5641
5644
|
if (loading) {
|
|
5642
5645
|
e.preventDefault();
|
|
@@ -5646,7 +5649,7 @@ var IconButtonComponent = React38.forwardRef(
|
|
|
5646
5649
|
},
|
|
5647
5650
|
[loading, onClick]
|
|
5648
5651
|
);
|
|
5649
|
-
const handleKeyDown =
|
|
5652
|
+
const handleKeyDown = React39.useCallback(
|
|
5650
5653
|
(e) => {
|
|
5651
5654
|
if (loading) return;
|
|
5652
5655
|
if ((e.key === "Enter" || e.key === " ") && onClick) {
|
|
@@ -5734,7 +5737,7 @@ var IconButtonComponent = React38.forwardRef(
|
|
|
5734
5737
|
}
|
|
5735
5738
|
);
|
|
5736
5739
|
IconButtonComponent.displayName = "IconButton";
|
|
5737
|
-
var IconButton =
|
|
5740
|
+
var IconButton = React39.memo(IconButtonComponent);
|
|
5738
5741
|
var MD3_SPRING = {
|
|
5739
5742
|
type: "spring",
|
|
5740
5743
|
stiffness: 400,
|
|
@@ -5771,9 +5774,9 @@ DialogTrigger.displayName = "DialogTrigger";
|
|
|
5771
5774
|
var DialogPortal = ({
|
|
5772
5775
|
open,
|
|
5773
5776
|
children
|
|
5774
|
-
}) => /* @__PURE__ */ jsx(RadixDialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open ?
|
|
5777
|
+
}) => /* @__PURE__ */ jsx(RadixDialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open ? React39.Children.toArray(children) : null }) });
|
|
5775
5778
|
DialogPortal.displayName = "DialogPortal";
|
|
5776
|
-
var DialogOverlay =
|
|
5779
|
+
var DialogOverlay = React39.forwardRef((_a, ref) => {
|
|
5777
5780
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5778
5781
|
return /* @__PURE__ */ jsx(RadixDialog.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsx(
|
|
5779
5782
|
m.div,
|
|
@@ -5784,7 +5787,7 @@ var DialogOverlay = React38.forwardRef((_a, ref) => {
|
|
|
5784
5787
|
) }));
|
|
5785
5788
|
});
|
|
5786
5789
|
DialogOverlay.displayName = "DialogOverlay";
|
|
5787
|
-
var DialogContent =
|
|
5790
|
+
var DialogContent = React39.forwardRef((_a, ref) => {
|
|
5788
5791
|
var _b = _a, { className, children, hideCloseButton = false } = _b, props = __objRest(_b, ["className", "children", "hideCloseButton"]);
|
|
5789
5792
|
return /* @__PURE__ */ jsx(
|
|
5790
5793
|
RadixDialog.Content,
|
|
@@ -5824,7 +5827,7 @@ var DialogContent = React38.forwardRef((_a, ref) => {
|
|
|
5824
5827
|
);
|
|
5825
5828
|
});
|
|
5826
5829
|
DialogContent.displayName = "DialogContent";
|
|
5827
|
-
var DialogIcon =
|
|
5830
|
+
var DialogIcon = React39.forwardRef((_a, ref) => {
|
|
5828
5831
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
5829
5832
|
return /* @__PURE__ */ jsx(
|
|
5830
5833
|
"div",
|
|
@@ -5847,7 +5850,7 @@ var DialogHeader = (_a) => {
|
|
|
5847
5850
|
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mb-4", className) }, props));
|
|
5848
5851
|
};
|
|
5849
5852
|
DialogHeader.displayName = "DialogHeader";
|
|
5850
|
-
var DialogTitle =
|
|
5853
|
+
var DialogTitle = React39.forwardRef((_a, ref) => {
|
|
5851
5854
|
var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
|
|
5852
5855
|
return /* @__PURE__ */ jsx(
|
|
5853
5856
|
RadixDialog.Title,
|
|
@@ -5862,7 +5865,7 @@ var DialogTitle = React38.forwardRef((_a, ref) => {
|
|
|
5862
5865
|
);
|
|
5863
5866
|
});
|
|
5864
5867
|
DialogTitle.displayName = "DialogTitle";
|
|
5865
|
-
var DialogDescription =
|
|
5868
|
+
var DialogDescription = React39.forwardRef((_a, ref) => {
|
|
5866
5869
|
var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
|
|
5867
5870
|
return /* @__PURE__ */ jsx(
|
|
5868
5871
|
RadixDialog.Description,
|
|
@@ -5874,7 +5877,7 @@ var DialogDescription = React38.forwardRef((_a, ref) => {
|
|
|
5874
5877
|
);
|
|
5875
5878
|
});
|
|
5876
5879
|
DialogDescription.displayName = "DialogDescription";
|
|
5877
|
-
var DialogBody =
|
|
5880
|
+
var DialogBody = React39.forwardRef((_a, ref) => {
|
|
5878
5881
|
var _b = _a, { className, children, dir } = _b, props = __objRest(_b, ["className", "children", "dir"]);
|
|
5879
5882
|
return /* @__PURE__ */ jsx(
|
|
5880
5883
|
ScrollArea,
|
|
@@ -5905,7 +5908,7 @@ var DialogFooter = (_a) => {
|
|
|
5905
5908
|
};
|
|
5906
5909
|
DialogFooter.displayName = "DialogFooter";
|
|
5907
5910
|
var DialogClose = RadixDialog.Close;
|
|
5908
|
-
var DialogFullScreenContent =
|
|
5911
|
+
var DialogFullScreenContent = React39.forwardRef(
|
|
5909
5912
|
(_a, ref) => {
|
|
5910
5913
|
var _b = _a, {
|
|
5911
5914
|
className,
|
|
@@ -5988,7 +5991,7 @@ function buildWavePath(startX, endX, amplitude = 2, wavelength = 32, yCenter = 4
|
|
|
5988
5991
|
}
|
|
5989
5992
|
return d;
|
|
5990
5993
|
}
|
|
5991
|
-
var DividerImpl =
|
|
5994
|
+
var DividerImpl = React39.forwardRef(
|
|
5992
5995
|
(_a, ref) => {
|
|
5993
5996
|
var _b = _a, {
|
|
5994
5997
|
variant = "full-bleed",
|
|
@@ -6108,7 +6111,7 @@ var DividerImpl = React38.forwardRef(
|
|
|
6108
6111
|
}
|
|
6109
6112
|
);
|
|
6110
6113
|
DividerImpl.displayName = "Divider";
|
|
6111
|
-
var Divider =
|
|
6114
|
+
var Divider = React39.memo(DividerImpl);
|
|
6112
6115
|
var MD3_DRAWER_SPRING = {
|
|
6113
6116
|
type: "spring",
|
|
6114
6117
|
stiffness: 350,
|
|
@@ -6145,7 +6148,7 @@ var DrawerPortal = ({
|
|
|
6145
6148
|
open,
|
|
6146
6149
|
children
|
|
6147
6150
|
}) => /* @__PURE__ */ jsx(RadixDialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: open && children }) });
|
|
6148
|
-
var DrawerOverlay =
|
|
6151
|
+
var DrawerOverlay = React39.forwardRef((_a, ref) => {
|
|
6149
6152
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6150
6153
|
return /* @__PURE__ */ jsx(RadixDialog.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsx(
|
|
6151
6154
|
m.div,
|
|
@@ -6156,7 +6159,7 @@ var DrawerOverlay = React38.forwardRef((_a, ref) => {
|
|
|
6156
6159
|
) }));
|
|
6157
6160
|
});
|
|
6158
6161
|
DrawerOverlay.displayName = "DrawerOverlay";
|
|
6159
|
-
var DrawerContent =
|
|
6162
|
+
var DrawerContent = React39.forwardRef(
|
|
6160
6163
|
(_a, ref) => {
|
|
6161
6164
|
var _b = _a, {
|
|
6162
6165
|
className,
|
|
@@ -6235,7 +6238,7 @@ var DrawerFooter = (_a) => {
|
|
|
6235
6238
|
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mt-4", className) }, props));
|
|
6236
6239
|
};
|
|
6237
6240
|
DrawerFooter.displayName = "DrawerFooter";
|
|
6238
|
-
var DrawerTitle =
|
|
6241
|
+
var DrawerTitle = React39.forwardRef((_a, ref) => {
|
|
6239
6242
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6240
6243
|
return /* @__PURE__ */ jsx(
|
|
6241
6244
|
RadixDialog.Title,
|
|
@@ -6249,7 +6252,7 @@ var DrawerTitle = React38.forwardRef((_a, ref) => {
|
|
|
6249
6252
|
);
|
|
6250
6253
|
});
|
|
6251
6254
|
DrawerTitle.displayName = "DrawerTitle";
|
|
6252
|
-
var DrawerDescription =
|
|
6255
|
+
var DrawerDescription = React39.forwardRef((_a, ref) => {
|
|
6253
6256
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6254
6257
|
return /* @__PURE__ */ jsx(
|
|
6255
6258
|
RadixDialog.Description,
|
|
@@ -6330,7 +6333,7 @@ function FABPosition({
|
|
|
6330
6333
|
}
|
|
6331
6334
|
);
|
|
6332
6335
|
}
|
|
6333
|
-
var FABComponent =
|
|
6336
|
+
var FABComponent = React39.forwardRef(
|
|
6334
6337
|
(_a, ref) => {
|
|
6335
6338
|
var _b = _a, {
|
|
6336
6339
|
className,
|
|
@@ -6375,7 +6378,7 @@ var FABComponent = React38.forwardRef(
|
|
|
6375
6378
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
6376
6379
|
disabled: loading
|
|
6377
6380
|
});
|
|
6378
|
-
const handleClick =
|
|
6381
|
+
const handleClick = React39.useCallback(
|
|
6379
6382
|
(e) => {
|
|
6380
6383
|
if (loading) {
|
|
6381
6384
|
e.preventDefault();
|
|
@@ -6385,7 +6388,7 @@ var FABComponent = React38.forwardRef(
|
|
|
6385
6388
|
},
|
|
6386
6389
|
[loading, onClick]
|
|
6387
6390
|
);
|
|
6388
|
-
const handleKeyDown =
|
|
6391
|
+
const handleKeyDown = React39.useCallback(
|
|
6389
6392
|
(e) => {
|
|
6390
6393
|
if (loading) return;
|
|
6391
6394
|
if ((e.key === "Enter" || e.key === " ") && onClick) {
|
|
@@ -6494,7 +6497,7 @@ var FABComponent = React38.forwardRef(
|
|
|
6494
6497
|
}
|
|
6495
6498
|
);
|
|
6496
6499
|
FABComponent.displayName = "FAB";
|
|
6497
|
-
var FAB =
|
|
6500
|
+
var FAB = React39.memo(FABComponent);
|
|
6498
6501
|
var SPRING_NORMAL = { stiffness: 700, damping: 40 };
|
|
6499
6502
|
var SPRING_REDUCED = { stiffness: 1e4, damping: 100 };
|
|
6500
6503
|
var FOCUS_DELAY_MS = 50;
|
|
@@ -6602,7 +6605,7 @@ function CloseIcon3() {
|
|
|
6602
6605
|
function defaultFabIcon(progress) {
|
|
6603
6606
|
return progress > 0.5 ? /* @__PURE__ */ jsx(CloseIcon3, {}) : /* @__PURE__ */ jsx(AddIcon, {});
|
|
6604
6607
|
}
|
|
6605
|
-
var ToggleFABComponent =
|
|
6608
|
+
var ToggleFABComponent = React39.forwardRef(
|
|
6606
6609
|
({
|
|
6607
6610
|
expanded,
|
|
6608
6611
|
onToggle,
|
|
@@ -6620,7 +6623,7 @@ var ToggleFABComponent = React38.forwardRef(
|
|
|
6620
6623
|
const sizeTokens = (_b = TOGGLE_FAB_SIZES[fabSize]) != null ? _b : TOGGLE_FAB_SIZES.baseline;
|
|
6621
6624
|
const springConfig = prefersReduced ? SPRING_REDUCED : SPRING_NORMAL;
|
|
6622
6625
|
const checkedProgress = useSpring(expanded ? 1 : 0, springConfig);
|
|
6623
|
-
|
|
6626
|
+
React39.useEffect(() => {
|
|
6624
6627
|
checkedProgress.set(expanded ? 1 : 0);
|
|
6625
6628
|
}, [expanded, checkedProgress]);
|
|
6626
6629
|
const borderRadius = useTransform(
|
|
@@ -6628,12 +6631,12 @@ var ToggleFABComponent = React38.forwardRef(
|
|
|
6628
6631
|
[0, 1],
|
|
6629
6632
|
[`${sizeTokens.initialRadius}px`, `${sizeTokens.finalRadius}px`]
|
|
6630
6633
|
);
|
|
6631
|
-
const [iconProgress, setIconProgress] =
|
|
6632
|
-
|
|
6634
|
+
const [iconProgress, setIconProgress] = React39.useState(expanded ? 1 : 0);
|
|
6635
|
+
React39.useEffect(() => {
|
|
6633
6636
|
return checkedProgress.on("change", setIconProgress);
|
|
6634
6637
|
}, [checkedProgress]);
|
|
6635
6638
|
const { ripples, onPointerDown, removeRipple } = useRippleState();
|
|
6636
|
-
const handleClick =
|
|
6639
|
+
const handleClick = React39.useCallback(() => {
|
|
6637
6640
|
onToggle(!expanded);
|
|
6638
6641
|
}, [expanded, onToggle]);
|
|
6639
6642
|
return /* @__PURE__ */ jsxs(
|
|
@@ -6682,7 +6685,7 @@ var ToggleFABComponent = React38.forwardRef(
|
|
|
6682
6685
|
}
|
|
6683
6686
|
);
|
|
6684
6687
|
ToggleFABComponent.displayName = "ToggleFAB";
|
|
6685
|
-
var ToggleFAB =
|
|
6688
|
+
var ToggleFAB = React39.memo(ToggleFABComponent);
|
|
6686
6689
|
function FABMenuItem({
|
|
6687
6690
|
icon,
|
|
6688
6691
|
label,
|
|
@@ -6695,7 +6698,7 @@ function FABMenuItem({
|
|
|
6695
6698
|
var _a;
|
|
6696
6699
|
const colors = (_a = MENU_ITEM_COLORS[colorVariant]) != null ? _a : MENU_ITEM_COLORS.primary;
|
|
6697
6700
|
const { ripples, onPointerDown, removeRipple } = useRippleState({ disabled });
|
|
6698
|
-
const handleClick =
|
|
6701
|
+
const handleClick = React39.useCallback(
|
|
6699
6702
|
(e) => {
|
|
6700
6703
|
if (disabled) {
|
|
6701
6704
|
e.preventDefault();
|
|
@@ -6705,7 +6708,7 @@ function FABMenuItem({
|
|
|
6705
6708
|
},
|
|
6706
6709
|
[disabled, onClick]
|
|
6707
6710
|
);
|
|
6708
|
-
const handleKeyDown =
|
|
6711
|
+
const handleKeyDown = React39.useCallback(
|
|
6709
6712
|
(e) => {
|
|
6710
6713
|
if (disabled) return;
|
|
6711
6714
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -6772,13 +6775,13 @@ function FABMenu({
|
|
|
6772
6775
|
focusLast = true,
|
|
6773
6776
|
"aria-label": ariaLabel
|
|
6774
6777
|
}) {
|
|
6775
|
-
const fabId =
|
|
6776
|
-
const menuId =
|
|
6777
|
-
const toggleRef =
|
|
6778
|
-
const itemRefs =
|
|
6779
|
-
const [focusedIndex, setFocusedIndex] =
|
|
6780
|
-
const reversedItems =
|
|
6781
|
-
const focusItem =
|
|
6778
|
+
const fabId = React39.useId();
|
|
6779
|
+
const menuId = React39.useId();
|
|
6780
|
+
const toggleRef = React39.useRef(null);
|
|
6781
|
+
const itemRefs = React39.useRef([]);
|
|
6782
|
+
const [focusedIndex, setFocusedIndex] = React39.useState(-1);
|
|
6783
|
+
const reversedItems = React39.useMemo(() => [...items].reverse(), [items]);
|
|
6784
|
+
const focusItem = React39.useCallback((index) => {
|
|
6782
6785
|
var _a;
|
|
6783
6786
|
const clampedIndex = Math.max(
|
|
6784
6787
|
0,
|
|
@@ -6787,8 +6790,8 @@ function FABMenu({
|
|
|
6787
6790
|
setFocusedIndex(clampedIndex);
|
|
6788
6791
|
(_a = itemRefs.current[clampedIndex]) == null ? void 0 : _a.focus();
|
|
6789
6792
|
}, []);
|
|
6790
|
-
const wasExpandedRef =
|
|
6791
|
-
|
|
6793
|
+
const wasExpandedRef = React39.useRef(false);
|
|
6794
|
+
React39.useEffect(() => {
|
|
6792
6795
|
var _a;
|
|
6793
6796
|
if (expanded) {
|
|
6794
6797
|
wasExpandedRef.current = true;
|
|
@@ -6803,7 +6806,7 @@ function FABMenu({
|
|
|
6803
6806
|
wasExpandedRef.current = false;
|
|
6804
6807
|
setFocusedIndex(-1);
|
|
6805
6808
|
}, [expanded, focusLast, items.length, focusItem]);
|
|
6806
|
-
const handleMenuKeyDown =
|
|
6809
|
+
const handleMenuKeyDown = React39.useCallback(
|
|
6807
6810
|
(e) => {
|
|
6808
6811
|
if (!expanded) return;
|
|
6809
6812
|
const lastIndex = items.length - 1;
|
|
@@ -6927,7 +6930,296 @@ function FABMenu({
|
|
|
6927
6930
|
)
|
|
6928
6931
|
] });
|
|
6929
6932
|
}
|
|
6930
|
-
var
|
|
6933
|
+
var NavigationBarContext = React39.createContext({ variant: "flexible" });
|
|
6934
|
+
function cloneIconWithFill(icon, selected) {
|
|
6935
|
+
if (!React39.isValidElement(icon)) return icon;
|
|
6936
|
+
if (icon.type === Icon) {
|
|
6937
|
+
return React39.cloneElement(
|
|
6938
|
+
icon,
|
|
6939
|
+
{ fill: selected ? 1 : 0, animateFill: true }
|
|
6940
|
+
);
|
|
6941
|
+
}
|
|
6942
|
+
return icon;
|
|
6943
|
+
}
|
|
6944
|
+
function ActivePill() {
|
|
6945
|
+
const { activeIndicatorTransition } = React39.useContext(NavigationBarContext);
|
|
6946
|
+
return /* @__PURE__ */ jsx(
|
|
6947
|
+
m.div,
|
|
6948
|
+
{
|
|
6949
|
+
className: "absolute inset-0 bg-m3-secondary-container pointer-events-none",
|
|
6950
|
+
style: {
|
|
6951
|
+
borderRadius: 9999,
|
|
6952
|
+
zIndex: 0
|
|
6953
|
+
},
|
|
6954
|
+
initial: { opacity: 0, scale: 0.5 },
|
|
6955
|
+
animate: { opacity: 1, scale: 1 },
|
|
6956
|
+
exit: { opacity: 0, scale: 0.5 },
|
|
6957
|
+
transition: activeIndicatorTransition || SPRING_TRANSITION_EXPRESSIVE
|
|
6958
|
+
}
|
|
6959
|
+
);
|
|
6960
|
+
}
|
|
6961
|
+
function HoverStateLayer() {
|
|
6962
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full bg-m3-on-surface opacity-0 group-hover:opacity-[0.08] group-focus-visible:opacity-[0.10] active:opacity-[0.10] transition-opacity duration-200 pointer-events-none z-0" });
|
|
6963
|
+
}
|
|
6964
|
+
function RippleLayer({ ripples, onRippleDone }) {
|
|
6965
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full overflow-hidden pointer-events-none z-0", children: /* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone }) });
|
|
6966
|
+
}
|
|
6967
|
+
function IconContainer({ selected, badge, children }) {
|
|
6968
|
+
return /* @__PURE__ */ jsxs(
|
|
6969
|
+
"div",
|
|
6970
|
+
{
|
|
6971
|
+
"aria-hidden": "true",
|
|
6972
|
+
className: cn(
|
|
6973
|
+
"relative flex items-center justify-center size-6 transition-colors duration-200 shrink-0",
|
|
6974
|
+
selected ? "text-m3-on-secondary-container" : "text-m3-on-surface-variant"
|
|
6975
|
+
),
|
|
6976
|
+
children: [
|
|
6977
|
+
children,
|
|
6978
|
+
badge && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 flex min-w-3 h-3 items-center justify-center rounded-full bg-m3-error px-1 text-[10px] font-medium leading-none tracking-normal text-m3-on-error ring-[1.5px] ring-m3-surface", children: badge })
|
|
6979
|
+
]
|
|
6980
|
+
}
|
|
6981
|
+
);
|
|
6982
|
+
}
|
|
6983
|
+
var NavigationBarItemComponent = React39.forwardRef(
|
|
6984
|
+
({
|
|
6985
|
+
selected,
|
|
6986
|
+
icon,
|
|
6987
|
+
label,
|
|
6988
|
+
onClick,
|
|
6989
|
+
disabled = false,
|
|
6990
|
+
badge,
|
|
6991
|
+
className,
|
|
6992
|
+
"aria-label": ariaLabelProp
|
|
6993
|
+
}, ref) => {
|
|
6994
|
+
const { variant, itemLayout } = React39.useContext(NavigationBarContext);
|
|
6995
|
+
const isForcedHorizontal = itemLayout === "horizontal";
|
|
6996
|
+
const isResponsiveHorizontal = (variant === "flexible" || variant === "xr") && itemLayout === void 0;
|
|
6997
|
+
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
6998
|
+
disabled
|
|
6999
|
+
});
|
|
7000
|
+
const handleClick = React39.useCallback(
|
|
7001
|
+
(e) => {
|
|
7002
|
+
if (disabled) {
|
|
7003
|
+
e.preventDefault();
|
|
7004
|
+
return;
|
|
7005
|
+
}
|
|
7006
|
+
if (selected) {
|
|
7007
|
+
if (typeof window !== "undefined" && window.scrollY > 0) {
|
|
7008
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
7009
|
+
}
|
|
7010
|
+
return;
|
|
7011
|
+
}
|
|
7012
|
+
onClick == null ? void 0 : onClick();
|
|
7013
|
+
},
|
|
7014
|
+
[disabled, selected, onClick]
|
|
7015
|
+
);
|
|
7016
|
+
const filledIcon = cloneIconWithFill(icon, selected);
|
|
7017
|
+
return /* @__PURE__ */ jsxs(
|
|
7018
|
+
m.button,
|
|
7019
|
+
{
|
|
7020
|
+
ref,
|
|
7021
|
+
type: "button",
|
|
7022
|
+
role: "menuitem",
|
|
7023
|
+
"aria-current": selected ? "page" : void 0,
|
|
7024
|
+
"aria-disabled": disabled ? true : void 0,
|
|
7025
|
+
"aria-label": ariaLabelProp || (typeof label === "string" ? label : void 0),
|
|
7026
|
+
onClick: handleClick,
|
|
7027
|
+
onPointerDown,
|
|
7028
|
+
className: cn(
|
|
7029
|
+
"group relative flex flex-1 cursor-pointer transition-colors duration-200 outline-none select-none h-full",
|
|
7030
|
+
variant === "xr" ? "items-center justify-center max-[599px]:min-w-28 max-[599px]:max-w-28 max-[599px]:items-start max-[599px]:pt-3 max-[599px]:pb-4" : "items-center justify-center",
|
|
7031
|
+
disabled && "pointer-events-none opacity-[0.38]",
|
|
7032
|
+
className
|
|
7033
|
+
),
|
|
7034
|
+
children: [
|
|
7035
|
+
/* @__PURE__ */ jsxs(
|
|
7036
|
+
"div",
|
|
7037
|
+
{
|
|
7038
|
+
className: cn(
|
|
7039
|
+
"relative flex items-center justify-center flex-col gap-y-1 w-full",
|
|
7040
|
+
isResponsiveHorizontal && "min-[600px]:flex-row min-[600px]:gap-y-0 min-[600px]:gap-x-1 min-[600px]:h-10 min-[600px]:px-4 min-[600px]:rounded-full min-[600px]:w-auto min-[600px]:max-w-42",
|
|
7041
|
+
isForcedHorizontal && "flex-row gap-y-0 gap-x-1 h-10 px-4 rounded-full w-auto max-w-42"
|
|
7042
|
+
),
|
|
7043
|
+
children: [
|
|
7044
|
+
/* @__PURE__ */ jsxs(
|
|
7045
|
+
"div",
|
|
7046
|
+
{
|
|
7047
|
+
className: cn(
|
|
7048
|
+
"absolute inset-0 z-0 hidden",
|
|
7049
|
+
isResponsiveHorizontal && "min-[600px]:block",
|
|
7050
|
+
isForcedHorizontal && "block!"
|
|
7051
|
+
),
|
|
7052
|
+
children: [
|
|
7053
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsx(ActivePill, {}) }),
|
|
7054
|
+
/* @__PURE__ */ jsx(HoverStateLayer, {}),
|
|
7055
|
+
/* @__PURE__ */ jsx(RippleLayer, { ripples, onRippleDone: removeRipple })
|
|
7056
|
+
]
|
|
7057
|
+
}
|
|
7058
|
+
),
|
|
7059
|
+
/* @__PURE__ */ jsxs(
|
|
7060
|
+
"div",
|
|
7061
|
+
{
|
|
7062
|
+
className: cn(
|
|
7063
|
+
"relative flex items-center justify-center shrink-0 z-10",
|
|
7064
|
+
"h-8 w-16 mx-auto rounded-full",
|
|
7065
|
+
isResponsiveHorizontal && "min-[600px]:size-6 min-[600px]:w-auto min-[600px]:h-auto",
|
|
7066
|
+
isForcedHorizontal && "size-6 w-auto h-auto"
|
|
7067
|
+
),
|
|
7068
|
+
children: [
|
|
7069
|
+
/* @__PURE__ */ jsxs(
|
|
7070
|
+
"div",
|
|
7071
|
+
{
|
|
7072
|
+
className: cn(
|
|
7073
|
+
"absolute inset-0 z-0",
|
|
7074
|
+
isResponsiveHorizontal && "min-[600px]:hidden",
|
|
7075
|
+
isForcedHorizontal && "hidden"
|
|
7076
|
+
),
|
|
7077
|
+
children: [
|
|
7078
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsx(ActivePill, {}) }),
|
|
7079
|
+
/* @__PURE__ */ jsx(HoverStateLayer, {}),
|
|
7080
|
+
/* @__PURE__ */ jsx(RippleLayer, { ripples, onRippleDone: removeRipple })
|
|
7081
|
+
]
|
|
7082
|
+
}
|
|
7083
|
+
),
|
|
7084
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex size-6 items-center justify-center text-current", children: /* @__PURE__ */ jsx(IconContainer, { selected, badge, children: filledIcon }) })
|
|
7085
|
+
]
|
|
7086
|
+
}
|
|
7087
|
+
),
|
|
7088
|
+
/* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: /* @__PURE__ */ jsx(
|
|
7089
|
+
"span",
|
|
7090
|
+
{
|
|
7091
|
+
className: cn(
|
|
7092
|
+
"z-10 transition-all duration-200 truncate px-1",
|
|
7093
|
+
selected ? "text-m3-on-surface" : "text-m3-on-surface-variant",
|
|
7094
|
+
"font-medium text-[12px] leading-4 tracking-[0.5px]"
|
|
7095
|
+
),
|
|
7096
|
+
children: label
|
|
7097
|
+
},
|
|
7098
|
+
"nav-label"
|
|
7099
|
+
) })
|
|
7100
|
+
]
|
|
7101
|
+
}
|
|
7102
|
+
),
|
|
7103
|
+
/* @__PURE__ */ jsx(TouchTarget, {})
|
|
7104
|
+
]
|
|
7105
|
+
}
|
|
7106
|
+
);
|
|
7107
|
+
}
|
|
7108
|
+
);
|
|
7109
|
+
NavigationBarItemComponent.displayName = "NavigationBarItem";
|
|
7110
|
+
var NavigationBarItem = React39.memo(NavigationBarItemComponent);
|
|
7111
|
+
var navContainerVariants = cva(
|
|
7112
|
+
"flex items-center justify-center select-none transition-transform duration-300 z-50",
|
|
7113
|
+
{
|
|
7114
|
+
variants: {
|
|
7115
|
+
variant: {
|
|
7116
|
+
flexible: "bottom-0 left-0 right-0 w-full h-16 pb-safe",
|
|
7117
|
+
baseline: "bottom-0 left-0 right-0 w-full h-20 pb-safe",
|
|
7118
|
+
xr: "bottom-6 left-1/2 -translate-x-1/2 w-auto max-w-fit h-20 min-[600px]:h-16 rounded-[48px] px-2"
|
|
7119
|
+
},
|
|
7120
|
+
position: {
|
|
7121
|
+
fixed: "fixed",
|
|
7122
|
+
absolute: "absolute"
|
|
7123
|
+
},
|
|
7124
|
+
elevated: {
|
|
7125
|
+
true: "shadow-[0_-1px_3px_rgba(0,0,0,0.1)]",
|
|
7126
|
+
false: "shadow-none"
|
|
7127
|
+
}
|
|
7128
|
+
},
|
|
7129
|
+
defaultVariants: {
|
|
7130
|
+
variant: "flexible",
|
|
7131
|
+
position: "fixed",
|
|
7132
|
+
elevated: false
|
|
7133
|
+
}
|
|
7134
|
+
}
|
|
7135
|
+
);
|
|
7136
|
+
var NavigationBarComponent = React39.forwardRef(
|
|
7137
|
+
({
|
|
7138
|
+
variant = "flexible",
|
|
7139
|
+
itemLayout,
|
|
7140
|
+
hideOnScroll = false,
|
|
7141
|
+
elevated = false,
|
|
7142
|
+
fixed = true,
|
|
7143
|
+
scrollContainerRef,
|
|
7144
|
+
activeIndicatorTransition,
|
|
7145
|
+
children,
|
|
7146
|
+
className,
|
|
7147
|
+
style
|
|
7148
|
+
}, ref) => {
|
|
7149
|
+
const [isVisible, setIsVisible] = React39.useState(true);
|
|
7150
|
+
const lastScrollY = React39.useRef(
|
|
7151
|
+
typeof window !== "undefined" ? window.scrollY : 0
|
|
7152
|
+
);
|
|
7153
|
+
React39.useEffect(() => {
|
|
7154
|
+
if (typeof window === "undefined" || !hideOnScroll) {
|
|
7155
|
+
setIsVisible(true);
|
|
7156
|
+
return;
|
|
7157
|
+
}
|
|
7158
|
+
const prefersReducedMotion = window.matchMedia(
|
|
7159
|
+
"(prefers-reduced-motion: reduce)"
|
|
7160
|
+
).matches;
|
|
7161
|
+
if (prefersReducedMotion) {
|
|
7162
|
+
setIsVisible(true);
|
|
7163
|
+
return;
|
|
7164
|
+
}
|
|
7165
|
+
let ticking = false;
|
|
7166
|
+
const handleScroll = () => {
|
|
7167
|
+
if (ticking) return;
|
|
7168
|
+
ticking = true;
|
|
7169
|
+
window.requestAnimationFrame(() => {
|
|
7170
|
+
const currentScrollY = (scrollContainerRef == null ? void 0 : scrollContainerRef.current) ? scrollContainerRef.current.scrollTop : window.scrollY;
|
|
7171
|
+
if (currentScrollY <= 0 || currentScrollY < lastScrollY.current) {
|
|
7172
|
+
setIsVisible(true);
|
|
7173
|
+
} else if (currentScrollY > lastScrollY.current) {
|
|
7174
|
+
setIsVisible(false);
|
|
7175
|
+
}
|
|
7176
|
+
lastScrollY.current = currentScrollY;
|
|
7177
|
+
ticking = false;
|
|
7178
|
+
});
|
|
7179
|
+
};
|
|
7180
|
+
const target = (scrollContainerRef == null ? void 0 : scrollContainerRef.current) || window;
|
|
7181
|
+
target.addEventListener("scroll", handleScroll, { passive: true });
|
|
7182
|
+
return () => target.removeEventListener("scroll", handleScroll);
|
|
7183
|
+
}, [hideOnScroll, scrollContainerRef]);
|
|
7184
|
+
const navBaseClasses = cn(
|
|
7185
|
+
navContainerVariants({
|
|
7186
|
+
variant,
|
|
7187
|
+
elevated,
|
|
7188
|
+
position: fixed ? "fixed" : "absolute"
|
|
7189
|
+
}),
|
|
7190
|
+
variant === "xr" ? "bg-m3-surface border border-white/5 shadow-xl" : "bg-m3-surface-container",
|
|
7191
|
+
className
|
|
7192
|
+
);
|
|
7193
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(NavigationBarContext.Provider, { value: { variant, itemLayout, activeIndicatorTransition }, children: /* @__PURE__ */ jsx(
|
|
7194
|
+
m.nav,
|
|
7195
|
+
{
|
|
7196
|
+
ref,
|
|
7197
|
+
role: "navigation",
|
|
7198
|
+
"aria-label": "Main navigation",
|
|
7199
|
+
className: navBaseClasses,
|
|
7200
|
+
style,
|
|
7201
|
+
initial: false,
|
|
7202
|
+
animate: { y: isVisible ? "0%" : "100%" },
|
|
7203
|
+
transition: { type: "tween", duration: 0.3, ease: "easeInOut" },
|
|
7204
|
+
children: /* @__PURE__ */ jsx(
|
|
7205
|
+
"div",
|
|
7206
|
+
{
|
|
7207
|
+
role: "menubar",
|
|
7208
|
+
"aria-orientation": "horizontal",
|
|
7209
|
+
className: cn(
|
|
7210
|
+
"flex w-full h-full mx-auto",
|
|
7211
|
+
variant === "xr" ? "gap-0 min-[600px]:gap-1.5" : "max-w-7xl gap-1.5"
|
|
7212
|
+
),
|
|
7213
|
+
children
|
|
7214
|
+
}
|
|
7215
|
+
)
|
|
7216
|
+
}
|
|
7217
|
+
) }) });
|
|
7218
|
+
}
|
|
7219
|
+
);
|
|
7220
|
+
NavigationBarComponent.displayName = "NavigationBar";
|
|
7221
|
+
var NavigationBar = React39.memo(NavigationBarComponent);
|
|
7222
|
+
var NavigationRailContext = React39.createContext({ variant: "collapsed", labelVisibility: "labeled" });
|
|
6931
7223
|
var MD3_MODAL_TRANSITION = {
|
|
6932
7224
|
type: "tween",
|
|
6933
7225
|
ease: [0.05, 0.7, 0.1, 1],
|
|
@@ -6938,17 +7230,14 @@ var railContainerVariants = cva(
|
|
|
6938
7230
|
{
|
|
6939
7231
|
variants: {
|
|
6940
7232
|
variant: {
|
|
6941
|
-
collapsed: "items-center",
|
|
6942
|
-
expanded: "items-start",
|
|
6943
|
-
modal: "bg-m3-surface shadow-lg rounded-r-[var(--m3-shape-corner-large)]"
|
|
7233
|
+
collapsed: "items-center h-full pt-11 pb-4 shadow-none bg-m3-surface rounded-none",
|
|
7234
|
+
expanded: "items-start h-full pt-11 pb-4 shadow-none bg-m3-surface rounded-none",
|
|
7235
|
+
modal: "bg-m3-surface shadow-lg rounded-r-[var(--m3-shape-corner-large)] h-full pt-11 pb-4",
|
|
7236
|
+
xr: "h-fit py-5 rounded-[48px] shadow-xl bg-m3-surface border border-white/5"
|
|
6944
7237
|
},
|
|
6945
7238
|
narrow: {
|
|
6946
7239
|
true: "w-20",
|
|
6947
7240
|
false: "w-24"
|
|
6948
|
-
},
|
|
6949
|
-
xr: {
|
|
6950
|
-
true: "h-fit py-5 rounded-[48px] shadow-xl bg-m3-surface border border-white/5",
|
|
6951
|
-
false: "h-full pt-11 pb-4 shadow-none bg-m3-surface rounded-none"
|
|
6952
7241
|
}
|
|
6953
7242
|
},
|
|
6954
7243
|
compoundVariants: [
|
|
@@ -6957,15 +7246,14 @@ var railContainerVariants = cva(
|
|
|
6957
7246
|
],
|
|
6958
7247
|
defaultVariants: {
|
|
6959
7248
|
variant: "collapsed",
|
|
6960
|
-
narrow: false
|
|
6961
|
-
xr: false
|
|
7249
|
+
narrow: false
|
|
6962
7250
|
}
|
|
6963
7251
|
}
|
|
6964
7252
|
);
|
|
6965
|
-
function
|
|
6966
|
-
if (!
|
|
7253
|
+
function cloneIconWithFill2(icon, selected) {
|
|
7254
|
+
if (!React39.isValidElement(icon)) return icon;
|
|
6967
7255
|
if (icon.type === Icon) {
|
|
6968
|
-
return
|
|
7256
|
+
return React39.cloneElement(
|
|
6969
7257
|
icon,
|
|
6970
7258
|
{ fill: selected ? 1 : 0, animateFill: true }
|
|
6971
7259
|
);
|
|
@@ -6987,7 +7275,8 @@ function setFocusedItem(items, index) {
|
|
|
6987
7275
|
target.focus();
|
|
6988
7276
|
}
|
|
6989
7277
|
}
|
|
6990
|
-
function
|
|
7278
|
+
function ActivePill2({ layoutId, disableInitial = false }) {
|
|
7279
|
+
const { activeIndicatorTransition } = React39.useContext(NavigationRailContext);
|
|
6991
7280
|
return /* @__PURE__ */ jsx(
|
|
6992
7281
|
m.div,
|
|
6993
7282
|
{
|
|
@@ -6997,17 +7286,17 @@ function ActivePill({ layoutId, disableInitial = false }) {
|
|
|
6997
7286
|
initial: disableInitial ? false : { opacity: 0, scale: 0.5 },
|
|
6998
7287
|
animate: { opacity: 1, scale: 1 },
|
|
6999
7288
|
exit: { opacity: 0, scale: 0.5, transition: { duration: 0.15 } },
|
|
7000
|
-
transition: SPRING_TRANSITION_EXPRESSIVE
|
|
7289
|
+
transition: activeIndicatorTransition || SPRING_TRANSITION_EXPRESSIVE
|
|
7001
7290
|
}
|
|
7002
7291
|
);
|
|
7003
7292
|
}
|
|
7004
|
-
function
|
|
7293
|
+
function HoverStateLayer2() {
|
|
7005
7294
|
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full bg-m3-on-surface opacity-0 group-hover:opacity-[0.08] transition-opacity duration-200 pointer-events-none z-0" });
|
|
7006
7295
|
}
|
|
7007
|
-
function
|
|
7296
|
+
function RippleLayer2({ ripples, onRippleDone }) {
|
|
7008
7297
|
return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full overflow-hidden pointer-events-none z-0", children: /* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone }) });
|
|
7009
7298
|
}
|
|
7010
|
-
function
|
|
7299
|
+
function IconContainer2({ selected, badge, children }) {
|
|
7011
7300
|
return /* @__PURE__ */ jsxs(
|
|
7012
7301
|
"div",
|
|
7013
7302
|
{
|
|
@@ -7023,7 +7312,7 @@ function IconContainer({ selected, badge, children }) {
|
|
|
7023
7312
|
}
|
|
7024
7313
|
);
|
|
7025
7314
|
}
|
|
7026
|
-
var NavigationRailItemComponent =
|
|
7315
|
+
var NavigationRailItemComponent = React39.forwardRef(
|
|
7027
7316
|
({
|
|
7028
7317
|
selected,
|
|
7029
7318
|
icon,
|
|
@@ -7034,18 +7323,18 @@ var NavigationRailItemComponent = React38.forwardRef(
|
|
|
7034
7323
|
className,
|
|
7035
7324
|
"aria-label": ariaLabelProp
|
|
7036
7325
|
}, ref) => {
|
|
7037
|
-
const { variant, labelVisibility } =
|
|
7326
|
+
const { variant, labelVisibility } = React39.useContext(
|
|
7038
7327
|
NavigationRailContext
|
|
7039
7328
|
);
|
|
7040
7329
|
const isExpanded = variant === "expanded" || variant === "modal";
|
|
7041
7330
|
const isModal = variant === "modal";
|
|
7042
7331
|
const enableLayout = !isModal;
|
|
7043
|
-
const activePillId = `rail-pill-${
|
|
7332
|
+
const activePillId = `rail-pill-${React39.useId()}`;
|
|
7044
7333
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
7045
7334
|
disabled
|
|
7046
7335
|
});
|
|
7047
7336
|
const showLabel = isExpanded || labelVisibility === "labeled" || labelVisibility === "auto" && selected;
|
|
7048
|
-
const handleClick =
|
|
7337
|
+
const handleClick = React39.useCallback(
|
|
7049
7338
|
(e) => {
|
|
7050
7339
|
if (disabled) {
|
|
7051
7340
|
e.preventDefault();
|
|
@@ -7055,7 +7344,7 @@ var NavigationRailItemComponent = React38.forwardRef(
|
|
|
7055
7344
|
},
|
|
7056
7345
|
[disabled, onClick]
|
|
7057
7346
|
);
|
|
7058
|
-
const filledIcon =
|
|
7347
|
+
const filledIcon = cloneIconWithFill2(icon, selected);
|
|
7059
7348
|
const labelInitial = isModal ? false : { opacity: 0, x: isExpanded ? -12 : 0, y: isExpanded ? 0 : -8 };
|
|
7060
7349
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsxs(
|
|
7061
7350
|
m.button,
|
|
@@ -7088,14 +7377,14 @@ var NavigationRailItemComponent = React38.forwardRef(
|
|
|
7088
7377
|
),
|
|
7089
7378
|
children: [
|
|
7090
7379
|
isExpanded && /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsx(
|
|
7091
|
-
|
|
7380
|
+
ActivePill2,
|
|
7092
7381
|
{
|
|
7093
7382
|
layoutId: activePillId,
|
|
7094
7383
|
disableInitial: isModal
|
|
7095
7384
|
}
|
|
7096
7385
|
) }),
|
|
7097
|
-
isExpanded && /* @__PURE__ */ jsx(
|
|
7098
|
-
isExpanded && /* @__PURE__ */ jsx(
|
|
7386
|
+
isExpanded && /* @__PURE__ */ jsx(HoverStateLayer2, {}),
|
|
7387
|
+
isExpanded && /* @__PURE__ */ jsx(RippleLayer2, { ripples, onRippleDone: removeRipple }),
|
|
7099
7388
|
/* @__PURE__ */ jsxs(
|
|
7100
7389
|
m.div,
|
|
7101
7390
|
{
|
|
@@ -7106,15 +7395,15 @@ var NavigationRailItemComponent = React38.forwardRef(
|
|
|
7106
7395
|
),
|
|
7107
7396
|
style: { borderRadius: 9999 },
|
|
7108
7397
|
children: [
|
|
7109
|
-
!isExpanded && /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsx(
|
|
7110
|
-
!isExpanded && /* @__PURE__ */ jsx(
|
|
7111
|
-
!isExpanded && /* @__PURE__ */ jsx(
|
|
7398
|
+
!isExpanded && /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: selected && /* @__PURE__ */ jsx(ActivePill2, { layoutId: activePillId }) }),
|
|
7399
|
+
!isExpanded && /* @__PURE__ */ jsx(HoverStateLayer2, {}),
|
|
7400
|
+
!isExpanded && /* @__PURE__ */ jsx(RippleLayer2, { ripples, onRippleDone: removeRipple }),
|
|
7112
7401
|
/* @__PURE__ */ jsx(
|
|
7113
7402
|
m.div,
|
|
7114
7403
|
{
|
|
7115
7404
|
layout: enableLayout ? "position" : false,
|
|
7116
7405
|
className: "relative z-10 flex size-6 items-center justify-center text-current",
|
|
7117
|
-
children: /* @__PURE__ */ jsx(
|
|
7406
|
+
children: /* @__PURE__ */ jsx(IconContainer2, { selected, badge, children: filledIcon })
|
|
7118
7407
|
}
|
|
7119
7408
|
)
|
|
7120
7409
|
]
|
|
@@ -7147,9 +7436,9 @@ var NavigationRailItemComponent = React38.forwardRef(
|
|
|
7147
7436
|
}
|
|
7148
7437
|
);
|
|
7149
7438
|
NavigationRailItemComponent.displayName = "NavigationRailItem";
|
|
7150
|
-
var NavigationRailItem =
|
|
7439
|
+
var NavigationRailItem = React39.memo(NavigationRailItemComponent);
|
|
7151
7440
|
function useRoving(navRef) {
|
|
7152
|
-
|
|
7441
|
+
React39.useEffect(() => {
|
|
7153
7442
|
if (!navRef.current) return;
|
|
7154
7443
|
const items = getMenuItems(navRef.current);
|
|
7155
7444
|
const selected = items.find(
|
|
@@ -7159,7 +7448,7 @@ function useRoving(navRef) {
|
|
|
7159
7448
|
const firstFocusable = selected != null ? selected : items[0];
|
|
7160
7449
|
if (firstFocusable) firstFocusable.tabIndex = 0;
|
|
7161
7450
|
}, [navRef]);
|
|
7162
|
-
return
|
|
7451
|
+
return React39.useCallback(
|
|
7163
7452
|
(e) => {
|
|
7164
7453
|
if (!navRef.current) return;
|
|
7165
7454
|
const items = getMenuItems(navRef.current);
|
|
@@ -7187,29 +7476,29 @@ function useRoving(navRef) {
|
|
|
7187
7476
|
[navRef]
|
|
7188
7477
|
);
|
|
7189
7478
|
}
|
|
7190
|
-
var NavigationRailComponent =
|
|
7479
|
+
var NavigationRailComponent = React39.forwardRef(
|
|
7191
7480
|
({
|
|
7192
7481
|
variant = "collapsed",
|
|
7193
7482
|
labelVisibility = "labeled",
|
|
7194
7483
|
header,
|
|
7195
7484
|
fab,
|
|
7485
|
+
fabPlacement = "contained",
|
|
7196
7486
|
footer,
|
|
7197
7487
|
narrow = false,
|
|
7198
7488
|
open = false,
|
|
7199
|
-
xr = false,
|
|
7200
7489
|
onClose,
|
|
7490
|
+
activeIndicatorTransition,
|
|
7201
7491
|
children,
|
|
7202
7492
|
className,
|
|
7203
7493
|
style
|
|
7204
7494
|
}, ref) => {
|
|
7205
7495
|
const isModal = variant === "modal";
|
|
7206
|
-
const isXr =
|
|
7207
|
-
const
|
|
7208
|
-
const isSpatial = isXr && xrMode === "spatialized";
|
|
7496
|
+
const isXr = variant === "xr";
|
|
7497
|
+
const isSpatial = isXr && fabPlacement === "spatialized";
|
|
7209
7498
|
const applyAnimation = !isXr || !isSpatial;
|
|
7210
|
-
const navRef =
|
|
7499
|
+
const navRef = React39.useRef(null);
|
|
7211
7500
|
const handleKeyDown = useRoving(navRef);
|
|
7212
|
-
const setRefs =
|
|
7501
|
+
const setRefs = React39.useCallback(
|
|
7213
7502
|
(node) => {
|
|
7214
7503
|
navRef.current = node;
|
|
7215
7504
|
if (typeof ref === "function") ref(node);
|
|
@@ -7218,12 +7507,12 @@ var NavigationRailComponent = React38.forwardRef(
|
|
|
7218
7507
|
[ref]
|
|
7219
7508
|
);
|
|
7220
7509
|
const navBaseClasses = cn(
|
|
7221
|
-
railContainerVariants({ variant, narrow
|
|
7510
|
+
railContainerVariants({ variant, narrow })
|
|
7222
7511
|
);
|
|
7223
7512
|
const modalPositioning = isModal ? "fixed left-0 top-0 z-[100]" : "";
|
|
7224
7513
|
const navHeaderSpacing = (() => {
|
|
7225
7514
|
if (!isXr) return "mb-6 min-h-10";
|
|
7226
|
-
if (
|
|
7515
|
+
if (fabPlacement === "contained") return fab ? "mb-10" : "mb-5";
|
|
7227
7516
|
return "mb-5";
|
|
7228
7517
|
})();
|
|
7229
7518
|
const navElement = /* @__PURE__ */ jsxs(
|
|
@@ -7302,7 +7591,7 @@ var NavigationRailComponent = React38.forwardRef(
|
|
|
7302
7591
|
children: fab
|
|
7303
7592
|
}
|
|
7304
7593
|
),
|
|
7305
|
-
|
|
7594
|
+
React39.cloneElement(
|
|
7306
7595
|
navElement,
|
|
7307
7596
|
{
|
|
7308
7597
|
className: cn(navBaseClasses, "pointer-events-auto")
|
|
@@ -7313,7 +7602,7 @@ var NavigationRailComponent = React38.forwardRef(
|
|
|
7313
7602
|
"md3-nav-wrapper"
|
|
7314
7603
|
);
|
|
7315
7604
|
const finalNavElement = isSpatial ? spatialWrapper : navElement;
|
|
7316
|
-
const contextValue = { variant, labelVisibility,
|
|
7605
|
+
const contextValue = { variant, labelVisibility, activeIndicatorTransition };
|
|
7317
7606
|
if (isModal) {
|
|
7318
7607
|
if (typeof document === "undefined") return null;
|
|
7319
7608
|
return createPortal(
|
|
@@ -7340,13 +7629,13 @@ var NavigationRailComponent = React38.forwardRef(
|
|
|
7340
7629
|
}
|
|
7341
7630
|
);
|
|
7342
7631
|
NavigationRailComponent.displayName = "NavigationRail";
|
|
7343
|
-
var NavigationRail =
|
|
7632
|
+
var NavigationRail = React39.memo(NavigationRailComponent);
|
|
7344
7633
|
var MD3_FAST_EFFECTS2 = [0.3, 0, 1, 1];
|
|
7345
|
-
var RadioGroupContext =
|
|
7634
|
+
var RadioGroupContext = React39.createContext(
|
|
7346
7635
|
null
|
|
7347
7636
|
);
|
|
7348
7637
|
function useMergedRef3(externalRef, internalRef) {
|
|
7349
|
-
return
|
|
7638
|
+
return React39.useCallback(
|
|
7350
7639
|
(node) => {
|
|
7351
7640
|
internalRef.current = node;
|
|
7352
7641
|
if (!externalRef) return;
|
|
@@ -7359,7 +7648,7 @@ function useMergedRef3(externalRef, internalRef) {
|
|
|
7359
7648
|
[externalRef, internalRef]
|
|
7360
7649
|
);
|
|
7361
7650
|
}
|
|
7362
|
-
var RadioVisual =
|
|
7651
|
+
var RadioVisual = React39.memo(function RadioVisual2({
|
|
7363
7652
|
isSelected,
|
|
7364
7653
|
disabled,
|
|
7365
7654
|
error,
|
|
@@ -7412,7 +7701,7 @@ var RadioVisual = React38.memo(function RadioVisual2({
|
|
|
7412
7701
|
}
|
|
7413
7702
|
);
|
|
7414
7703
|
});
|
|
7415
|
-
var RadioButtonComponent =
|
|
7704
|
+
var RadioButtonComponent = React39.forwardRef(
|
|
7416
7705
|
({
|
|
7417
7706
|
selected,
|
|
7418
7707
|
defaultSelected = false,
|
|
@@ -7431,23 +7720,23 @@ var RadioButtonComponent = React38.forwardRef(
|
|
|
7431
7720
|
required: requiredProp
|
|
7432
7721
|
}, ref) => {
|
|
7433
7722
|
var _a, _b;
|
|
7434
|
-
const group =
|
|
7723
|
+
const group = React39.useContext(RadioGroupContext);
|
|
7435
7724
|
const prefersReduced = (_a = useReducedMotion()) != null ? _a : false;
|
|
7436
|
-
const generatedId =
|
|
7725
|
+
const generatedId = React39.useId();
|
|
7437
7726
|
const inputId = idProp != null ? idProp : label ? `radio-${generatedId}` : void 0;
|
|
7438
7727
|
const name = (_b = group == null ? void 0 : group.name) != null ? _b : nameProp;
|
|
7439
7728
|
const disabled = (group == null ? void 0 : group.disabled) || disabledProp;
|
|
7440
7729
|
const error = (group == null ? void 0 : group.error) || errorProp || color === "error";
|
|
7441
7730
|
const required = (group == null ? void 0 : group.required) || requiredProp;
|
|
7442
|
-
const [internalSelected, setInternalSelected] =
|
|
7731
|
+
const [internalSelected, setInternalSelected] = React39.useState(defaultSelected);
|
|
7443
7732
|
const isControlled = selected !== void 0;
|
|
7444
7733
|
const isSelected = group ? group.selectedValue === value : isControlled ? selected != null ? selected : false : internalSelected;
|
|
7445
|
-
const [ripples, setRipples] =
|
|
7446
|
-
const removeRipple =
|
|
7734
|
+
const [ripples, setRipples] = React39.useState([]);
|
|
7735
|
+
const removeRipple = React39.useCallback(
|
|
7447
7736
|
(id) => setRipples((prev) => prev.filter((r) => r.id !== id)),
|
|
7448
7737
|
[]
|
|
7449
7738
|
);
|
|
7450
|
-
const onPointerDown =
|
|
7739
|
+
const onPointerDown = React39.useCallback(
|
|
7451
7740
|
(e) => {
|
|
7452
7741
|
if (disabled) return;
|
|
7453
7742
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -7461,12 +7750,12 @@ var RadioButtonComponent = React38.forwardRef(
|
|
|
7461
7750
|
},
|
|
7462
7751
|
[disabled]
|
|
7463
7752
|
);
|
|
7464
|
-
const [isHovered, setIsHovered] =
|
|
7465
|
-
const onPointerEnter =
|
|
7753
|
+
const [isHovered, setIsHovered] = React39.useState(false);
|
|
7754
|
+
const onPointerEnter = React39.useCallback(() => {
|
|
7466
7755
|
if (!disabled) setIsHovered(true);
|
|
7467
7756
|
}, [disabled]);
|
|
7468
|
-
const onPointerLeave =
|
|
7469
|
-
const handleChange =
|
|
7757
|
+
const onPointerLeave = React39.useCallback(() => setIsHovered(false), []);
|
|
7758
|
+
const handleChange = React39.useCallback(
|
|
7470
7759
|
(_e) => {
|
|
7471
7760
|
if (disabled || onClick === null) return;
|
|
7472
7761
|
if (group) {
|
|
@@ -7480,7 +7769,7 @@ var RadioButtonComponent = React38.forwardRef(
|
|
|
7480
7769
|
},
|
|
7481
7770
|
[disabled, onClick, group, value, isControlled]
|
|
7482
7771
|
);
|
|
7483
|
-
const inputRef =
|
|
7772
|
+
const inputRef = React39.useRef(null);
|
|
7484
7773
|
const mergedRef = useMergedRef3(ref, inputRef);
|
|
7485
7774
|
const stateLayerBg = error ? "before:bg-m3-error" : "before:bg-m3-primary";
|
|
7486
7775
|
const stateLayerClass = cn(
|
|
@@ -7591,8 +7880,8 @@ var RadioButtonComponent = React38.forwardRef(
|
|
|
7591
7880
|
}
|
|
7592
7881
|
);
|
|
7593
7882
|
RadioButtonComponent.displayName = "RadioButton";
|
|
7594
|
-
var RadioButton =
|
|
7595
|
-
var RadioGroupComponent =
|
|
7883
|
+
var RadioButton = React39.memo(RadioButtonComponent);
|
|
7884
|
+
var RadioGroupComponent = React39.forwardRef(
|
|
7596
7885
|
({
|
|
7597
7886
|
name,
|
|
7598
7887
|
value: valueProp,
|
|
@@ -7607,19 +7896,19 @@ var RadioGroupComponent = React38.forwardRef(
|
|
|
7607
7896
|
children,
|
|
7608
7897
|
className
|
|
7609
7898
|
}, ref) => {
|
|
7610
|
-
const [internalValue, setInternalValue] =
|
|
7899
|
+
const [internalValue, setInternalValue] = React39.useState(defaultValue);
|
|
7611
7900
|
const isControlled = valueProp !== void 0;
|
|
7612
7901
|
const selectedValue = isControlled ? valueProp : internalValue;
|
|
7613
|
-
const handleValueChange =
|
|
7902
|
+
const handleValueChange = React39.useCallback(
|
|
7614
7903
|
(val) => {
|
|
7615
7904
|
if (!isControlled) setInternalValue(val);
|
|
7616
7905
|
onValueChange == null ? void 0 : onValueChange(val);
|
|
7617
7906
|
},
|
|
7618
7907
|
[isControlled, onValueChange]
|
|
7619
7908
|
);
|
|
7620
|
-
const groupRef =
|
|
7909
|
+
const groupRef = React39.useRef(null);
|
|
7621
7910
|
const mergedRef = useMergedRef3(ref, groupRef);
|
|
7622
|
-
const onKeyDown =
|
|
7911
|
+
const onKeyDown = React39.useCallback(
|
|
7623
7912
|
(e) => {
|
|
7624
7913
|
var _a, _b;
|
|
7625
7914
|
if (disabled) return;
|
|
@@ -7643,7 +7932,7 @@ var RadioGroupComponent = React38.forwardRef(
|
|
|
7643
7932
|
},
|
|
7644
7933
|
[disabled, handleValueChange]
|
|
7645
7934
|
);
|
|
7646
|
-
const contextValue =
|
|
7935
|
+
const contextValue = React39.useMemo(
|
|
7647
7936
|
() => ({
|
|
7648
7937
|
name,
|
|
7649
7938
|
selectedValue,
|
|
@@ -7678,7 +7967,7 @@ var RadioGroupComponent = React38.forwardRef(
|
|
|
7678
7967
|
}
|
|
7679
7968
|
);
|
|
7680
7969
|
RadioGroupComponent.displayName = "RadioGroup";
|
|
7681
|
-
var RadioGroup =
|
|
7970
|
+
var RadioGroup = React39.memo(RadioGroupComponent);
|
|
7682
7971
|
function useSearchKeyboard({
|
|
7683
7972
|
active,
|
|
7684
7973
|
onActiveChange,
|
|
@@ -7687,14 +7976,14 @@ function useSearchKeyboard({
|
|
|
7687
7976
|
itemCount,
|
|
7688
7977
|
onSelectSuggestion
|
|
7689
7978
|
}) {
|
|
7690
|
-
const [activeIndex, setActiveIndex] =
|
|
7691
|
-
const resetKeyRef =
|
|
7979
|
+
const [activeIndex, setActiveIndex] = React39.useState(-1);
|
|
7980
|
+
const resetKeyRef = React39.useRef(`${active}:${query}`);
|
|
7692
7981
|
const currentKey = `${active}:${query}`;
|
|
7693
7982
|
if (resetKeyRef.current !== currentKey) {
|
|
7694
7983
|
resetKeyRef.current = currentKey;
|
|
7695
7984
|
setActiveIndex(-1);
|
|
7696
7985
|
}
|
|
7697
|
-
const handleKeyDown =
|
|
7986
|
+
const handleKeyDown = React39.useCallback(
|
|
7698
7987
|
(e) => {
|
|
7699
7988
|
if (!active) return;
|
|
7700
7989
|
switch (e.key) {
|
|
@@ -7734,7 +8023,7 @@ function useSearchKeyboard({
|
|
|
7734
8023
|
query
|
|
7735
8024
|
]
|
|
7736
8025
|
);
|
|
7737
|
-
const resetActiveIndex =
|
|
8026
|
+
const resetActiveIndex = React39.useCallback(() => {
|
|
7738
8027
|
setActiveIndex(-1);
|
|
7739
8028
|
}, []);
|
|
7740
8029
|
return { activeIndex, handleKeyDown, resetActiveIndex };
|
|
@@ -7822,10 +8111,10 @@ function AnimatedPlaceholder({
|
|
|
7822
8111
|
className
|
|
7823
8112
|
}) {
|
|
7824
8113
|
const shouldReduceMotion = useReducedMotion();
|
|
7825
|
-
const containerRef =
|
|
7826
|
-
const spanRef =
|
|
7827
|
-
const [xOffset, setXOffset] =
|
|
7828
|
-
const recalculate =
|
|
8114
|
+
const containerRef = React39.useRef(null);
|
|
8115
|
+
const spanRef = React39.useRef(null);
|
|
8116
|
+
const [xOffset, setXOffset] = React39.useState(0);
|
|
8117
|
+
const recalculate = React39.useCallback(() => {
|
|
7829
8118
|
const container = containerRef.current;
|
|
7830
8119
|
const span = spanRef.current;
|
|
7831
8120
|
if (!container || !span || textAlign === "left") {
|
|
@@ -7840,10 +8129,10 @@ function AnimatedPlaceholder({
|
|
|
7840
8129
|
setXOffset(Math.max(0, containerWidth - textWidth));
|
|
7841
8130
|
}
|
|
7842
8131
|
}, [textAlign]);
|
|
7843
|
-
|
|
8132
|
+
React39.useLayoutEffect(() => {
|
|
7844
8133
|
recalculate();
|
|
7845
8134
|
}, [recalculate]);
|
|
7846
|
-
|
|
8135
|
+
React39.useEffect(() => {
|
|
7847
8136
|
const container = containerRef.current;
|
|
7848
8137
|
if (!container) return;
|
|
7849
8138
|
const observer = new ResizeObserver(recalculate);
|
|
@@ -7912,10 +8201,10 @@ function SearchBar({
|
|
|
7912
8201
|
activeIndex
|
|
7913
8202
|
}) {
|
|
7914
8203
|
const shouldReduceMotion = useReducedMotion();
|
|
7915
|
-
const inputRef =
|
|
7916
|
-
const prevActiveRef =
|
|
7917
|
-
const isRestoringFocusRef =
|
|
7918
|
-
|
|
8204
|
+
const inputRef = React39.useRef(null);
|
|
8205
|
+
const prevActiveRef = React39.useRef(active);
|
|
8206
|
+
const isRestoringFocusRef = React39.useRef(false);
|
|
8207
|
+
React39.useEffect(() => {
|
|
7919
8208
|
var _a;
|
|
7920
8209
|
let rafId;
|
|
7921
8210
|
if (prevActiveRef.current === true && active === false) {
|
|
@@ -8034,7 +8323,7 @@ function SearchBar({
|
|
|
8034
8323
|
) })
|
|
8035
8324
|
);
|
|
8036
8325
|
}
|
|
8037
|
-
var SearchContext =
|
|
8326
|
+
var SearchContext = React39.createContext(null);
|
|
8038
8327
|
function SearchProvider({
|
|
8039
8328
|
children,
|
|
8040
8329
|
value
|
|
@@ -8042,7 +8331,7 @@ function SearchProvider({
|
|
|
8042
8331
|
return /* @__PURE__ */ jsx(SearchContext.Provider, { value, children });
|
|
8043
8332
|
}
|
|
8044
8333
|
function useSearch() {
|
|
8045
|
-
const context =
|
|
8334
|
+
const context = React39.useContext(SearchContext);
|
|
8046
8335
|
if (!context) {
|
|
8047
8336
|
return { listboxId: "", activeIndex: -1 };
|
|
8048
8337
|
}
|
|
@@ -8069,7 +8358,7 @@ function useClickOutside(handler, enabled = true) {
|
|
|
8069
8358
|
return ref;
|
|
8070
8359
|
}
|
|
8071
8360
|
function useSearchViewFocus(inputRef, active) {
|
|
8072
|
-
|
|
8361
|
+
React39.useEffect(() => {
|
|
8073
8362
|
if (!active) return;
|
|
8074
8363
|
let raf2;
|
|
8075
8364
|
const raf1 = requestAnimationFrame(() => {
|
|
@@ -8143,7 +8432,7 @@ function SearchViewDocked({
|
|
|
8143
8432
|
activeIndex
|
|
8144
8433
|
}) {
|
|
8145
8434
|
const shouldReduceMotion = useReducedMotion();
|
|
8146
|
-
const inputRef =
|
|
8435
|
+
const inputRef = React39.useRef(null);
|
|
8147
8436
|
useSearchViewFocus(inputRef, active);
|
|
8148
8437
|
const dropdownRef = useClickOutside(() => {
|
|
8149
8438
|
onActiveChange(false);
|
|
@@ -8289,10 +8578,10 @@ function SearchViewFullScreen({
|
|
|
8289
8578
|
activeIndex
|
|
8290
8579
|
}) {
|
|
8291
8580
|
const shouldReduceMotion = useReducedMotion();
|
|
8292
|
-
const inputRef =
|
|
8581
|
+
const inputRef = React39.useRef(null);
|
|
8293
8582
|
useSearchViewFocus(inputRef, active);
|
|
8294
|
-
const [mounted, setMounted] =
|
|
8295
|
-
|
|
8583
|
+
const [mounted, setMounted] = React39.useState(false);
|
|
8584
|
+
React39.useEffect(() => {
|
|
8296
8585
|
setMounted(true);
|
|
8297
8586
|
}, []);
|
|
8298
8587
|
const handleFormSubmit = (e) => {
|
|
@@ -8450,10 +8739,10 @@ function SearchComponent({
|
|
|
8450
8739
|
className,
|
|
8451
8740
|
viewClassName
|
|
8452
8741
|
}) {
|
|
8453
|
-
const generatedId =
|
|
8742
|
+
const generatedId = React39.useId();
|
|
8454
8743
|
const searchId = id != null ? id : generatedId;
|
|
8455
8744
|
const listboxId = `${searchId}-listbox`;
|
|
8456
|
-
const itemCount =
|
|
8745
|
+
const itemCount = React39.Children.count(children);
|
|
8457
8746
|
const { activeIndex, handleKeyDown } = useSearchKeyboard({
|
|
8458
8747
|
active,
|
|
8459
8748
|
onActiveChange,
|
|
@@ -8689,7 +8978,7 @@ var SLIDER_INDICATOR_TRANSITION = {
|
|
|
8689
8978
|
stiffness: 450,
|
|
8690
8979
|
damping: 32
|
|
8691
8980
|
};
|
|
8692
|
-
var ValueIndicator =
|
|
8981
|
+
var ValueIndicator = React39.memo(function ValueIndicator2({
|
|
8693
8982
|
value,
|
|
8694
8983
|
visible,
|
|
8695
8984
|
orientation,
|
|
@@ -8736,7 +9025,7 @@ var ValueIndicator = React38.memo(function ValueIndicator2({
|
|
|
8736
9025
|
"value-indicator"
|
|
8737
9026
|
) });
|
|
8738
9027
|
});
|
|
8739
|
-
var SliderThumb =
|
|
9028
|
+
var SliderThumb = React39.memo(function SliderThumb2({
|
|
8740
9029
|
value,
|
|
8741
9030
|
percent,
|
|
8742
9031
|
min,
|
|
@@ -8768,11 +9057,11 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8768
9057
|
[posTarget]: `calc(${trackInset}px + ${percent} * (100% - ${trackInset * 2}px))`
|
|
8769
9058
|
};
|
|
8770
9059
|
const prefersReduced = (_a = useReducedMotion()) != null ? _a : false;
|
|
8771
|
-
const [isDragging, setIsDragging] =
|
|
8772
|
-
const [isHovered, setIsHovered] =
|
|
8773
|
-
const [isFocused, setIsFocused] =
|
|
8774
|
-
const pointerIdRef =
|
|
8775
|
-
const thumbRef =
|
|
9060
|
+
const [isDragging, setIsDragging] = React39.useState(false);
|
|
9061
|
+
const [isHovered, setIsHovered] = React39.useState(false);
|
|
9062
|
+
const [isFocused, setIsFocused] = React39.useState(false);
|
|
9063
|
+
const pointerIdRef = React39.useRef(null);
|
|
9064
|
+
const thumbRef = React39.useRef(null);
|
|
8776
9065
|
const showIndicator = showValueIndicator && (isDragging || isHovered || isFocused);
|
|
8777
9066
|
const positionStyle = isHorizontal ? __spreadProps(__spreadValues({
|
|
8778
9067
|
position: "absolute"
|
|
@@ -8787,7 +9076,7 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8787
9076
|
transform: "translate(-50%, 50%)",
|
|
8788
9077
|
zIndex
|
|
8789
9078
|
});
|
|
8790
|
-
const getDeltaFromPointer =
|
|
9079
|
+
const getDeltaFromPointer = React39.useCallback(
|
|
8791
9080
|
(e) => {
|
|
8792
9081
|
const trackEl = trackRef.current;
|
|
8793
9082
|
if (!trackEl) return percent;
|
|
@@ -8814,7 +9103,7 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8814
9103
|
},
|
|
8815
9104
|
[isHorizontal, max, min, percent, step, trackRef, trackSize]
|
|
8816
9105
|
);
|
|
8817
|
-
const handlePointerDown =
|
|
9106
|
+
const handlePointerDown = React39.useCallback(
|
|
8818
9107
|
(e) => {
|
|
8819
9108
|
if (disabled) return;
|
|
8820
9109
|
e.preventDefault();
|
|
@@ -8825,7 +9114,7 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8825
9114
|
},
|
|
8826
9115
|
[disabled]
|
|
8827
9116
|
);
|
|
8828
|
-
const handlePointerMove =
|
|
9117
|
+
const handlePointerMove = React39.useCallback(
|
|
8829
9118
|
(e) => {
|
|
8830
9119
|
if (!isDragging || e.pointerId !== pointerIdRef.current) return;
|
|
8831
9120
|
const newValue = getDeltaFromPointer(e.nativeEvent);
|
|
@@ -8833,7 +9122,7 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8833
9122
|
},
|
|
8834
9123
|
[isDragging, getDeltaFromPointer, onValueChange]
|
|
8835
9124
|
);
|
|
8836
|
-
const handlePointerUp =
|
|
9125
|
+
const handlePointerUp = React39.useCallback(
|
|
8837
9126
|
(e) => {
|
|
8838
9127
|
if (e.pointerId !== pointerIdRef.current) return;
|
|
8839
9128
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
@@ -8843,7 +9132,7 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8843
9132
|
},
|
|
8844
9133
|
[onValueChangeEnd, value]
|
|
8845
9134
|
);
|
|
8846
|
-
const handleKeyDown =
|
|
9135
|
+
const handleKeyDown = React39.useCallback(
|
|
8847
9136
|
(e) => {
|
|
8848
9137
|
if (disabled) return;
|
|
8849
9138
|
if (e.key === "Home") {
|
|
@@ -8947,7 +9236,7 @@ var SliderThumb = React38.memo(function SliderThumb2({
|
|
|
8947
9236
|
}
|
|
8948
9237
|
);
|
|
8949
9238
|
});
|
|
8950
|
-
var RangeTrack =
|
|
9239
|
+
var RangeTrack = React39.memo(function RangeTrack2({
|
|
8951
9240
|
startPercent,
|
|
8952
9241
|
endPercent,
|
|
8953
9242
|
trackSize,
|
|
@@ -9192,7 +9481,7 @@ var RangeTrack = React38.memo(function RangeTrack2({
|
|
|
9192
9481
|
}
|
|
9193
9482
|
);
|
|
9194
9483
|
});
|
|
9195
|
-
var RangeSliderComponent =
|
|
9484
|
+
var RangeSliderComponent = React39.forwardRef(
|
|
9196
9485
|
({
|
|
9197
9486
|
value: controlledValue,
|
|
9198
9487
|
defaultValue,
|
|
@@ -9216,7 +9505,7 @@ var RangeSliderComponent = React38.forwardRef(
|
|
|
9216
9505
|
const isHorizontal = orientation === "horizontal";
|
|
9217
9506
|
const defaultStart = (_a = defaultValue == null ? void 0 : defaultValue[0]) != null ? _a : min;
|
|
9218
9507
|
const defaultEnd = (_b = defaultValue == null ? void 0 : defaultValue[1]) != null ? _b : max;
|
|
9219
|
-
const [internalValue, setInternalValue] =
|
|
9508
|
+
const [internalValue, setInternalValue] = React39.useState([
|
|
9220
9509
|
defaultStart,
|
|
9221
9510
|
defaultEnd
|
|
9222
9511
|
]);
|
|
@@ -9230,10 +9519,10 @@ var RangeSliderComponent = React38.forwardRef(
|
|
|
9230
9519
|
const endValue = snap(coerce(resolvedValue[1]));
|
|
9231
9520
|
const startPercent = toPercent(startValue);
|
|
9232
9521
|
const endPercent = toPercent(endValue);
|
|
9233
|
-
const [topThumb, setTopThumb] =
|
|
9234
|
-
const trackRef =
|
|
9522
|
+
const [topThumb, setTopThumb] = React39.useState("end");
|
|
9523
|
+
const trackRef = React39.useRef(null);
|
|
9235
9524
|
const minGap = step > 0 ? step : (max - min) / 1e3;
|
|
9236
|
-
const handleStartChange =
|
|
9525
|
+
const handleStartChange = React39.useCallback(
|
|
9237
9526
|
(newStart) => {
|
|
9238
9527
|
setTopThumb("start");
|
|
9239
9528
|
const clamped = Math.min(newStart, endValue - minGap);
|
|
@@ -9245,7 +9534,7 @@ var RangeSliderComponent = React38.forwardRef(
|
|
|
9245
9534
|
},
|
|
9246
9535
|
[controlledValue, coerce, endValue, minGap, onValueChange, snap]
|
|
9247
9536
|
);
|
|
9248
|
-
const handleEndChange =
|
|
9537
|
+
const handleEndChange = React39.useCallback(
|
|
9249
9538
|
(newEnd) => {
|
|
9250
9539
|
setTopThumb("end");
|
|
9251
9540
|
const clamped = Math.max(newEnd, startValue + minGap);
|
|
@@ -9257,15 +9546,15 @@ var RangeSliderComponent = React38.forwardRef(
|
|
|
9257
9546
|
},
|
|
9258
9547
|
[controlledValue, coerce, minGap, onValueChange, snap, startValue]
|
|
9259
9548
|
);
|
|
9260
|
-
const handleStartChangeEnd =
|
|
9549
|
+
const handleStartChangeEnd = React39.useCallback(
|
|
9261
9550
|
(v) => onValueChangeEnd == null ? void 0 : onValueChangeEnd([v, endValue]),
|
|
9262
9551
|
[endValue, onValueChangeEnd]
|
|
9263
9552
|
);
|
|
9264
|
-
const handleEndChangeEnd =
|
|
9553
|
+
const handleEndChangeEnd = React39.useCallback(
|
|
9265
9554
|
(v) => onValueChangeEnd == null ? void 0 : onValueChangeEnd([startValue, v]),
|
|
9266
9555
|
[onValueChangeEnd, startValue]
|
|
9267
9556
|
);
|
|
9268
|
-
const handleTrackPointerDown =
|
|
9557
|
+
const handleTrackPointerDown = React39.useCallback(
|
|
9269
9558
|
(e) => {
|
|
9270
9559
|
if (disabled) return;
|
|
9271
9560
|
const trackEl = trackRef.current;
|
|
@@ -9309,7 +9598,7 @@ var RangeSliderComponent = React38.forwardRef(
|
|
|
9309
9598
|
trackSize
|
|
9310
9599
|
]
|
|
9311
9600
|
);
|
|
9312
|
-
const id =
|
|
9601
|
+
const id = React39.useId();
|
|
9313
9602
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsxs(
|
|
9314
9603
|
"div",
|
|
9315
9604
|
{
|
|
@@ -9389,7 +9678,7 @@ var RangeSliderComponent = React38.forwardRef(
|
|
|
9389
9678
|
}
|
|
9390
9679
|
);
|
|
9391
9680
|
RangeSliderComponent.displayName = "RangeSlider";
|
|
9392
|
-
var RangeSlider =
|
|
9681
|
+
var RangeSlider = React39.memo(RangeSliderComponent);
|
|
9393
9682
|
function getHorizontalRadius(isLeading, innerR, outerR) {
|
|
9394
9683
|
if (isLeading) {
|
|
9395
9684
|
return {
|
|
@@ -9428,7 +9717,7 @@ var allInnerRadius = (innerR) => ({
|
|
|
9428
9717
|
borderTopRightRadius: innerR,
|
|
9429
9718
|
borderBottomRightRadius: innerR
|
|
9430
9719
|
});
|
|
9431
|
-
var InsetIcon =
|
|
9720
|
+
var InsetIcon = React39.memo(function InsetIcon2({
|
|
9432
9721
|
icon,
|
|
9433
9722
|
isOnActiveSegment,
|
|
9434
9723
|
position,
|
|
@@ -9522,7 +9811,7 @@ function Ticks({
|
|
|
9522
9811
|
return /* @__PURE__ */ jsx("div", { style, "aria-hidden": "true" }, tick);
|
|
9523
9812
|
}) });
|
|
9524
9813
|
}
|
|
9525
|
-
var SliderTrack =
|
|
9814
|
+
var SliderTrack = React39.memo(function SliderTrack2({
|
|
9526
9815
|
percent,
|
|
9527
9816
|
trackSize,
|
|
9528
9817
|
orientation,
|
|
@@ -9557,8 +9846,8 @@ var SliderTrack = React38.memo(function SliderTrack2({
|
|
|
9557
9846
|
const gapWithThumbStr = `${thumbGap + thumbHalfWidth}px`;
|
|
9558
9847
|
const hasAnyInsetIcon = Boolean(insetIcon || insetIconTrailing);
|
|
9559
9848
|
const prefersReduced = (_a = useReducedMotion()) != null ? _a : false;
|
|
9560
|
-
const [trackWidth, setTrackWidth] =
|
|
9561
|
-
|
|
9849
|
+
const [trackWidth, setTrackWidth] = React39.useState(0);
|
|
9850
|
+
React39.useLayoutEffect(() => {
|
|
9562
9851
|
const el = trackRef.current;
|
|
9563
9852
|
if (!el || !hasAnyInsetIcon) return;
|
|
9564
9853
|
setTrackWidth(isHorizontal ? el.clientWidth : el.clientHeight);
|
|
@@ -9575,8 +9864,8 @@ var SliderTrack = React38.memo(function SliderTrack2({
|
|
|
9575
9864
|
const iconTotalWidth = activeIconSize + SliderTokens.insetIconPadding * 2 + thumbGap + thumbHalfWidth;
|
|
9576
9865
|
const iconThreshold = trackWidth > 0 ? iconTotalWidth / trackWidth : 0.15;
|
|
9577
9866
|
const HYSTERESIS_GAP = 0.04;
|
|
9578
|
-
const trailingActiveRef =
|
|
9579
|
-
const leadingActiveRef =
|
|
9867
|
+
const trailingActiveRef = React39.useRef(1 - percent <= iconThreshold);
|
|
9868
|
+
const leadingActiveRef = React39.useRef(percent > iconThreshold);
|
|
9580
9869
|
const trailingPercent = 1 - percent;
|
|
9581
9870
|
if (trailingActiveRef.current) {
|
|
9582
9871
|
if (trailingPercent > iconThreshold + HYSTERESIS_GAP) {
|
|
@@ -10083,7 +10372,7 @@ var SliderTrack = React38.memo(function SliderTrack2({
|
|
|
10083
10372
|
}
|
|
10084
10373
|
);
|
|
10085
10374
|
});
|
|
10086
|
-
var SliderComponent =
|
|
10375
|
+
var SliderComponent = React39.forwardRef(
|
|
10087
10376
|
({
|
|
10088
10377
|
value: controlledValue,
|
|
10089
10378
|
defaultValue,
|
|
@@ -10112,7 +10401,7 @@ var SliderComponent = React38.forwardRef(
|
|
|
10112
10401
|
const isHorizontal = orientation === "horizontal";
|
|
10113
10402
|
const midpoint = min + (max - min) / 2;
|
|
10114
10403
|
const initialValue = defaultValue != null ? defaultValue : midpoint;
|
|
10115
|
-
const [internalValue, setInternalValue] =
|
|
10404
|
+
const [internalValue, setInternalValue] = React39.useState(initialValue);
|
|
10116
10405
|
const resolvedValue = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
10117
10406
|
const { coerce, snap, toPercent, ticks } = useSliderMath({
|
|
10118
10407
|
min,
|
|
@@ -10121,8 +10410,8 @@ var SliderComponent = React38.forwardRef(
|
|
|
10121
10410
|
});
|
|
10122
10411
|
const safeValue = snap(coerce(resolvedValue));
|
|
10123
10412
|
const percent = toPercent(safeValue);
|
|
10124
|
-
const trackRef =
|
|
10125
|
-
const handleValueChange =
|
|
10413
|
+
const trackRef = React39.useRef(null);
|
|
10414
|
+
const handleValueChange = React39.useCallback(
|
|
10126
10415
|
(newValue) => {
|
|
10127
10416
|
const clamped = snap(coerce(newValue));
|
|
10128
10417
|
if (controlledValue === void 0) {
|
|
@@ -10132,13 +10421,13 @@ var SliderComponent = React38.forwardRef(
|
|
|
10132
10421
|
},
|
|
10133
10422
|
[coerce, controlledValue, onValueChange, snap]
|
|
10134
10423
|
);
|
|
10135
|
-
const handleValueChangeEnd =
|
|
10424
|
+
const handleValueChangeEnd = React39.useCallback(
|
|
10136
10425
|
(newValue) => {
|
|
10137
10426
|
onValueChangeEnd == null ? void 0 : onValueChangeEnd(snap(coerce(newValue)));
|
|
10138
10427
|
},
|
|
10139
10428
|
[coerce, onValueChangeEnd, snap]
|
|
10140
10429
|
);
|
|
10141
|
-
const handleTrackPointerDown =
|
|
10430
|
+
const handleTrackPointerDown = React39.useCallback(
|
|
10142
10431
|
(e) => {
|
|
10143
10432
|
if (disabled) return;
|
|
10144
10433
|
const trackEl = trackRef.current;
|
|
@@ -10173,7 +10462,7 @@ var SliderComponent = React38.forwardRef(
|
|
|
10173
10462
|
trackSize
|
|
10174
10463
|
]
|
|
10175
10464
|
);
|
|
10176
|
-
const id =
|
|
10465
|
+
const id = React39.useId();
|
|
10177
10466
|
const thumbId = `slider-thumb-${id}`;
|
|
10178
10467
|
const supportsInsetIcon = !isCentered && SliderTokens.trackSizes[trackSize] >= 40;
|
|
10179
10468
|
const hasAnyInsetIcon = !!(insetIcon || insetIconTrailing);
|
|
@@ -10245,7 +10534,7 @@ var SliderComponent = React38.forwardRef(
|
|
|
10245
10534
|
}
|
|
10246
10535
|
);
|
|
10247
10536
|
SliderComponent.displayName = "Slider";
|
|
10248
|
-
var Slider =
|
|
10537
|
+
var Slider = React39.memo(SliderComponent);
|
|
10249
10538
|
var DURATION_MAP = {
|
|
10250
10539
|
short: 4e3,
|
|
10251
10540
|
long: 7e3
|
|
@@ -10291,9 +10580,9 @@ function toSnackbarData(item) {
|
|
|
10291
10580
|
return { id: generateId(), visuals: item.visuals, resolve: item.resolve };
|
|
10292
10581
|
}
|
|
10293
10582
|
function useSnackbarState() {
|
|
10294
|
-
const [current, setCurrent] =
|
|
10295
|
-
const queueRef =
|
|
10296
|
-
const showSnackbar =
|
|
10583
|
+
const [current, setCurrent] = React39.useState(null);
|
|
10584
|
+
const queueRef = React39.useRef([]);
|
|
10585
|
+
const showSnackbar = React39.useCallback(
|
|
10297
10586
|
(visuals) => {
|
|
10298
10587
|
return new Promise((resolve) => {
|
|
10299
10588
|
const item = { visuals, resolve };
|
|
@@ -10306,14 +10595,14 @@ function useSnackbarState() {
|
|
|
10306
10595
|
},
|
|
10307
10596
|
[]
|
|
10308
10597
|
);
|
|
10309
|
-
const _dismiss =
|
|
10598
|
+
const _dismiss = React39.useCallback((result) => {
|
|
10310
10599
|
setCurrent((prev) => {
|
|
10311
10600
|
if (prev) prev.resolve(result);
|
|
10312
10601
|
const next = queueRef.current.shift();
|
|
10313
10602
|
return next ? toSnackbarData(next) : null;
|
|
10314
10603
|
});
|
|
10315
10604
|
}, []);
|
|
10316
|
-
|
|
10605
|
+
React39.useEffect(() => {
|
|
10317
10606
|
return () => {
|
|
10318
10607
|
for (const item of queueRef.current) {
|
|
10319
10608
|
item.resolve(RESULT.DISMISSED);
|
|
@@ -10323,7 +10612,7 @@ function useSnackbarState() {
|
|
|
10323
10612
|
}, []);
|
|
10324
10613
|
return { current, showSnackbar, _dismiss };
|
|
10325
10614
|
}
|
|
10326
|
-
var Snackbar =
|
|
10615
|
+
var Snackbar = React39.memo(function Snackbar2({
|
|
10327
10616
|
data,
|
|
10328
10617
|
className
|
|
10329
10618
|
}) {
|
|
@@ -10337,15 +10626,15 @@ var Snackbar = React38.memo(function Snackbar2({
|
|
|
10337
10626
|
} = visuals;
|
|
10338
10627
|
const reducedMotion = useReducedMotion();
|
|
10339
10628
|
const durationMs = resolveDuration(duration);
|
|
10340
|
-
|
|
10629
|
+
React39.useEffect(() => {
|
|
10341
10630
|
const timer = setTimeout(() => resolve(RESULT.DISMISSED), durationMs);
|
|
10342
10631
|
return () => clearTimeout(timer);
|
|
10343
10632
|
}, [resolve, durationMs]);
|
|
10344
|
-
const handleAction =
|
|
10633
|
+
const handleAction = React39.useCallback(
|
|
10345
10634
|
() => resolve(RESULT.ACTION),
|
|
10346
10635
|
[resolve]
|
|
10347
10636
|
);
|
|
10348
|
-
const handleDismiss =
|
|
10637
|
+
const handleDismiss = React39.useCallback(
|
|
10349
10638
|
() => resolve(RESULT.DISMISSED),
|
|
10350
10639
|
[resolve]
|
|
10351
10640
|
);
|
|
@@ -10413,7 +10702,7 @@ var Snackbar = React38.memo(function Snackbar2({
|
|
|
10413
10702
|
Snackbar.displayName = "Snackbar";
|
|
10414
10703
|
function SnackbarHost({ state, className }) {
|
|
10415
10704
|
const { current, _dismiss } = state;
|
|
10416
|
-
const wrappedData =
|
|
10705
|
+
const wrappedData = React39.useMemo(() => {
|
|
10417
10706
|
if (!current) return null;
|
|
10418
10707
|
return __spreadProps(__spreadValues({}, current), { resolve: _dismiss });
|
|
10419
10708
|
}, [current, _dismiss]);
|
|
@@ -10431,12 +10720,12 @@ function SnackbarHost({ state, className }) {
|
|
|
10431
10720
|
) });
|
|
10432
10721
|
}
|
|
10433
10722
|
SnackbarHost.displayName = "SnackbarHost";
|
|
10434
|
-
var SnackbarContext =
|
|
10723
|
+
var SnackbarContext = React39.createContext(
|
|
10435
10724
|
null
|
|
10436
10725
|
);
|
|
10437
10726
|
function SnackbarProvider({ children }) {
|
|
10438
10727
|
const state = useSnackbarState();
|
|
10439
|
-
const contextValue =
|
|
10728
|
+
const contextValue = React39.useMemo(
|
|
10440
10729
|
() => ({ showSnackbar: state.showSnackbar }),
|
|
10441
10730
|
[state.showSnackbar]
|
|
10442
10731
|
);
|
|
@@ -10447,7 +10736,7 @@ function SnackbarProvider({ children }) {
|
|
|
10447
10736
|
}
|
|
10448
10737
|
SnackbarProvider.displayName = "SnackbarProvider";
|
|
10449
10738
|
function useSnackbar() {
|
|
10450
|
-
const ctx =
|
|
10739
|
+
const ctx = React39.useContext(SnackbarContext);
|
|
10451
10740
|
if (!ctx) {
|
|
10452
10741
|
throw new Error("useSnackbar must be used within a <SnackbarProvider>.");
|
|
10453
10742
|
}
|
|
@@ -10551,7 +10840,7 @@ function isIconVisible(thumbContent, icons, showOnlySelectedIcon, checked) {
|
|
|
10551
10840
|
if (icons) return true;
|
|
10552
10841
|
return showOnlySelectedIcon && checked;
|
|
10553
10842
|
}
|
|
10554
|
-
var SwitchVisual =
|
|
10843
|
+
var SwitchVisual = React39.memo(function SwitchVisual2({
|
|
10555
10844
|
checked,
|
|
10556
10845
|
disabled,
|
|
10557
10846
|
isPressed,
|
|
@@ -10671,7 +10960,7 @@ var SwitchVisual = React38.memo(function SwitchVisual2({
|
|
|
10671
10960
|
}
|
|
10672
10961
|
);
|
|
10673
10962
|
});
|
|
10674
|
-
var SwitchComponent =
|
|
10963
|
+
var SwitchComponent = React39.forwardRef(
|
|
10675
10964
|
({
|
|
10676
10965
|
checked,
|
|
10677
10966
|
onCheckedChange,
|
|
@@ -10689,16 +10978,16 @@ var SwitchComponent = React38.forwardRef(
|
|
|
10689
10978
|
}, ref) => {
|
|
10690
10979
|
var _a;
|
|
10691
10980
|
const prefersReduced = (_a = useReducedMotion()) != null ? _a : false;
|
|
10692
|
-
const [isPressed, setIsPressed] =
|
|
10693
|
-
const [isHovered, setIsHovered] =
|
|
10694
|
-
const [isFocused, setIsFocused] =
|
|
10695
|
-
const [ripples, setRipples] =
|
|
10696
|
-
const generatedId =
|
|
10981
|
+
const [isPressed, setIsPressed] = React39.useState(false);
|
|
10982
|
+
const [isHovered, setIsHovered] = React39.useState(false);
|
|
10983
|
+
const [isFocused, setIsFocused] = React39.useState(false);
|
|
10984
|
+
const [ripples, setRipples] = React39.useState([]);
|
|
10985
|
+
const generatedId = React39.useId();
|
|
10697
10986
|
const switchId = label ? `switch-${generatedId}` : void 0;
|
|
10698
|
-
const handleClick =
|
|
10987
|
+
const handleClick = React39.useCallback(() => {
|
|
10699
10988
|
if (!disabled) onCheckedChange(!checked);
|
|
10700
10989
|
}, [disabled, checked, onCheckedChange]);
|
|
10701
|
-
const handleKeyDown =
|
|
10990
|
+
const handleKeyDown = React39.useCallback(
|
|
10702
10991
|
(e) => {
|
|
10703
10992
|
if (disabled) return;
|
|
10704
10993
|
if (e.key === " " || e.key === "Enter") {
|
|
@@ -10708,7 +10997,7 @@ var SwitchComponent = React38.forwardRef(
|
|
|
10708
10997
|
},
|
|
10709
10998
|
[disabled, checked, onCheckedChange]
|
|
10710
10999
|
);
|
|
10711
|
-
const handlePointerDown =
|
|
11000
|
+
const handlePointerDown = React39.useCallback(
|
|
10712
11001
|
(e) => {
|
|
10713
11002
|
if (disabled) return;
|
|
10714
11003
|
setIsPressed(true);
|
|
@@ -10723,19 +11012,19 @@ var SwitchComponent = React38.forwardRef(
|
|
|
10723
11012
|
},
|
|
10724
11013
|
[disabled]
|
|
10725
11014
|
);
|
|
10726
|
-
const handlePointerUp =
|
|
11015
|
+
const handlePointerUp = React39.useCallback(() => {
|
|
10727
11016
|
setIsPressed(false);
|
|
10728
11017
|
}, []);
|
|
10729
|
-
const handlePointerEnter =
|
|
11018
|
+
const handlePointerEnter = React39.useCallback(() => {
|
|
10730
11019
|
if (!disabled) setIsHovered(true);
|
|
10731
11020
|
}, [disabled]);
|
|
10732
|
-
const handlePointerLeave =
|
|
11021
|
+
const handlePointerLeave = React39.useCallback(() => {
|
|
10733
11022
|
setIsHovered(false);
|
|
10734
11023
|
setIsPressed(false);
|
|
10735
11024
|
}, []);
|
|
10736
|
-
const handleFocus =
|
|
10737
|
-
const handleBlur =
|
|
10738
|
-
const removeRipple =
|
|
11025
|
+
const handleFocus = React39.useCallback(() => setIsFocused(true), []);
|
|
11026
|
+
const handleBlur = React39.useCallback(() => setIsFocused(false), []);
|
|
11027
|
+
const removeRipple = React39.useCallback(
|
|
10739
11028
|
(id) => setRipples((prev) => prev.filter((r) => r.id !== id)),
|
|
10740
11029
|
[]
|
|
10741
11030
|
);
|
|
@@ -10820,7 +11109,7 @@ var SwitchComponent = React38.forwardRef(
|
|
|
10820
11109
|
}
|
|
10821
11110
|
);
|
|
10822
11111
|
SwitchComponent.displayName = "Switch";
|
|
10823
|
-
var Switch =
|
|
11112
|
+
var Switch = React39.memo(SwitchComponent);
|
|
10824
11113
|
var typographyVariants = cva("m-0 p-0 text-m3-on-surface", {
|
|
10825
11114
|
variants: {
|
|
10826
11115
|
variant: {
|
|
@@ -10845,10 +11134,10 @@ var typographyVariants = cva("m-0 p-0 text-m3-on-surface", {
|
|
|
10845
11134
|
variant: "body-md"
|
|
10846
11135
|
}
|
|
10847
11136
|
});
|
|
10848
|
-
var Text =
|
|
11137
|
+
var Text = React39.forwardRef(
|
|
10849
11138
|
(_a, ref) => {
|
|
10850
11139
|
var _b = _a, { className, variant, as: Component } = _b, props = __objRest(_b, ["className", "variant", "as"]);
|
|
10851
|
-
const defaultComponent =
|
|
11140
|
+
const defaultComponent = React39.useMemo(() => {
|
|
10852
11141
|
if ((variant == null ? void 0 : variant.startsWith("display")) || (variant == null ? void 0 : variant.startsWith("headline")))
|
|
10853
11142
|
return "h1";
|
|
10854
11143
|
if (variant == null ? void 0 : variant.startsWith("title")) return "h2";
|
|
@@ -10865,9 +11154,9 @@ var Text = React38.forwardRef(
|
|
|
10865
11154
|
}
|
|
10866
11155
|
);
|
|
10867
11156
|
Text.displayName = "Text";
|
|
10868
|
-
var TabsContext =
|
|
11157
|
+
var TabsContext = React39.createContext(null);
|
|
10869
11158
|
function useTabsContext() {
|
|
10870
|
-
const ctx =
|
|
11159
|
+
const ctx = React39.useContext(TabsContext);
|
|
10871
11160
|
if (!ctx) {
|
|
10872
11161
|
throw new Error(
|
|
10873
11162
|
"[MD3 Tabs] Component must be used within a <Tabs> root. Ensure <TabsList>, <Tab>, and <TabsContent> are descendants of <Tabs>."
|
|
@@ -10875,7 +11164,7 @@ function useTabsContext() {
|
|
|
10875
11164
|
}
|
|
10876
11165
|
return ctx;
|
|
10877
11166
|
}
|
|
10878
|
-
var TabsComponent =
|
|
11167
|
+
var TabsComponent = React39.forwardRef(
|
|
10879
11168
|
({
|
|
10880
11169
|
value: controlledValue,
|
|
10881
11170
|
defaultValue = "",
|
|
@@ -10884,35 +11173,35 @@ var TabsComponent = React38.forwardRef(
|
|
|
10884
11173
|
children,
|
|
10885
11174
|
className
|
|
10886
11175
|
}, ref) => {
|
|
10887
|
-
const [internalValue, setInternalValue] =
|
|
11176
|
+
const [internalValue, setInternalValue] = React39.useState(defaultValue);
|
|
10888
11177
|
const isControlled = controlledValue !== void 0;
|
|
10889
11178
|
const value = isControlled ? controlledValue : internalValue;
|
|
10890
|
-
const handleValueChange =
|
|
11179
|
+
const handleValueChange = React39.useCallback(
|
|
10891
11180
|
(newValue) => {
|
|
10892
11181
|
if (!isControlled) setInternalValue(newValue);
|
|
10893
11182
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
10894
11183
|
},
|
|
10895
11184
|
[isControlled, onValueChange]
|
|
10896
11185
|
);
|
|
10897
|
-
const [focusedValue, setFocusedValue] =
|
|
10898
|
-
|
|
11186
|
+
const [focusedValue, setFocusedValue] = React39.useState(value);
|
|
11187
|
+
React39.useEffect(() => {
|
|
10899
11188
|
setFocusedValue(value);
|
|
10900
11189
|
}, [value]);
|
|
10901
|
-
const [tabValues, setTabValues] =
|
|
10902
|
-
const registerTab =
|
|
11190
|
+
const [tabValues, setTabValues] = React39.useState([]);
|
|
11191
|
+
const registerTab = React39.useCallback((tabValue) => {
|
|
10903
11192
|
setTabValues((prev) => {
|
|
10904
11193
|
if (prev.includes(tabValue)) return prev;
|
|
10905
11194
|
return [...prev, tabValue];
|
|
10906
11195
|
});
|
|
10907
11196
|
}, []);
|
|
10908
|
-
const unregisterTab =
|
|
11197
|
+
const unregisterTab = React39.useCallback((tabValue) => {
|
|
10909
11198
|
setTabValues((prev) => prev.filter((v) => v !== tabValue));
|
|
10910
11199
|
}, []);
|
|
10911
|
-
const hasAutoSelected =
|
|
10912
|
-
const [disabledValues, setDisabledValues] =
|
|
11200
|
+
const hasAutoSelected = React39.useRef(false);
|
|
11201
|
+
const [disabledValues, setDisabledValues] = React39.useState(
|
|
10913
11202
|
/* @__PURE__ */ new Set()
|
|
10914
11203
|
);
|
|
10915
|
-
const markTabDisabled =
|
|
11204
|
+
const markTabDisabled = React39.useCallback(
|
|
10916
11205
|
(tabValue, disabled) => {
|
|
10917
11206
|
setDisabledValues((prev) => {
|
|
10918
11207
|
const next = new Set(prev);
|
|
@@ -10926,7 +11215,7 @@ var TabsComponent = React38.forwardRef(
|
|
|
10926
11215
|
},
|
|
10927
11216
|
[]
|
|
10928
11217
|
);
|
|
10929
|
-
|
|
11218
|
+
React39.useEffect(() => {
|
|
10930
11219
|
if (isControlled || hasAutoSelected.current || tabValues.length === 0) {
|
|
10931
11220
|
return;
|
|
10932
11221
|
}
|
|
@@ -10941,9 +11230,9 @@ var TabsComponent = React38.forwardRef(
|
|
|
10941
11230
|
setFocusedValue(firstEnabled);
|
|
10942
11231
|
}
|
|
10943
11232
|
}, [tabValues, disabledValues, isControlled, value]);
|
|
10944
|
-
const id =
|
|
11233
|
+
const id = React39.useId();
|
|
10945
11234
|
const layoutGroupId = `tabs-${id}`;
|
|
10946
|
-
const contextValue =
|
|
11235
|
+
const contextValue = React39.useMemo(
|
|
10947
11236
|
() => ({
|
|
10948
11237
|
value,
|
|
10949
11238
|
onValueChange: handleValueChange,
|
|
@@ -10974,12 +11263,12 @@ var TabsComponent = React38.forwardRef(
|
|
|
10974
11263
|
}
|
|
10975
11264
|
);
|
|
10976
11265
|
TabsComponent.displayName = "Tabs";
|
|
10977
|
-
var Tabs =
|
|
10978
|
-
var TabsListContext =
|
|
11266
|
+
var Tabs = React39.memo(TabsComponent);
|
|
11267
|
+
var TabsListContext = React39.createContext(
|
|
10979
11268
|
null
|
|
10980
11269
|
);
|
|
10981
11270
|
function useTabsListContext() {
|
|
10982
|
-
const ctx =
|
|
11271
|
+
const ctx = React39.useContext(TabsListContext);
|
|
10983
11272
|
return ctx != null ? ctx : { variant: "primary", scrollable: false };
|
|
10984
11273
|
}
|
|
10985
11274
|
|
|
@@ -11063,7 +11352,7 @@ var TABS_CONTENT_TRANSITION = {
|
|
|
11063
11352
|
ease: "easeInOut"
|
|
11064
11353
|
};
|
|
11065
11354
|
var INDICATOR_MIN_WIDTH = 24;
|
|
11066
|
-
var TabComponent =
|
|
11355
|
+
var TabComponent = React39.forwardRef(
|
|
11067
11356
|
({
|
|
11068
11357
|
value,
|
|
11069
11358
|
icon,
|
|
@@ -11093,9 +11382,9 @@ var TabComponent = React38.forwardRef(
|
|
|
11093
11382
|
const isFocused = focusedValue === value;
|
|
11094
11383
|
const hasIcon = icon != null;
|
|
11095
11384
|
const isStackedIcon = hasIcon && !inlineIcon;
|
|
11096
|
-
const buttonRef =
|
|
11097
|
-
const isFirstMount =
|
|
11098
|
-
const mergedRef =
|
|
11385
|
+
const buttonRef = React39.useRef(null);
|
|
11386
|
+
const isFirstMount = React39.useRef(true);
|
|
11387
|
+
const mergedRef = React39.useCallback(
|
|
11099
11388
|
(node) => {
|
|
11100
11389
|
buttonRef.current = node;
|
|
11101
11390
|
if (typeof ref === "function") ref(node);
|
|
@@ -11103,15 +11392,15 @@ var TabComponent = React38.forwardRef(
|
|
|
11103
11392
|
},
|
|
11104
11393
|
[ref]
|
|
11105
11394
|
);
|
|
11106
|
-
|
|
11395
|
+
React39.useEffect(() => {
|
|
11107
11396
|
registerTab(value);
|
|
11108
11397
|
return () => unregisterTab(value);
|
|
11109
11398
|
}, [value, registerTab, unregisterTab]);
|
|
11110
|
-
|
|
11399
|
+
React39.useEffect(() => {
|
|
11111
11400
|
markTabDisabled(value, disabled);
|
|
11112
11401
|
return () => markTabDisabled(value, false);
|
|
11113
11402
|
}, [value, disabled, markTabDisabled]);
|
|
11114
|
-
const handleKeyDown =
|
|
11403
|
+
const handleKeyDown = React39.useCallback(
|
|
11115
11404
|
(e) => {
|
|
11116
11405
|
const isRtl = buttonRef.current ? getComputedStyle(buttonRef.current).direction === "rtl" : false;
|
|
11117
11406
|
const enabledValues = tabValues.filter((v) => !disabledValues.has(v));
|
|
@@ -11165,7 +11454,7 @@ var TabComponent = React38.forwardRef(
|
|
|
11165
11454
|
autoActivate
|
|
11166
11455
|
]
|
|
11167
11456
|
);
|
|
11168
|
-
|
|
11457
|
+
React39.useEffect(() => {
|
|
11169
11458
|
if (isFirstMount.current) {
|
|
11170
11459
|
isFirstMount.current = false;
|
|
11171
11460
|
return;
|
|
@@ -11174,7 +11463,7 @@ var TabComponent = React38.forwardRef(
|
|
|
11174
11463
|
buttonRef.current.focus({ preventScroll: true });
|
|
11175
11464
|
}
|
|
11176
11465
|
}, [isFocused]);
|
|
11177
|
-
|
|
11466
|
+
React39.useEffect(() => {
|
|
11178
11467
|
if (!isActive || !scrollable || !buttonRef.current) return;
|
|
11179
11468
|
const btn = buttonRef.current;
|
|
11180
11469
|
let container = btn.parentElement;
|
|
@@ -11311,8 +11600,8 @@ var TabComponent = React38.forwardRef(
|
|
|
11311
11600
|
}
|
|
11312
11601
|
);
|
|
11313
11602
|
TabComponent.displayName = "Tab";
|
|
11314
|
-
var Tab =
|
|
11315
|
-
var TabsContentComponent =
|
|
11603
|
+
var Tab = React39.memo(TabComponent);
|
|
11604
|
+
var TabsContentComponent = React39.forwardRef(
|
|
11316
11605
|
({ value, className, children }, ref) => {
|
|
11317
11606
|
var _a;
|
|
11318
11607
|
const { value: selectedValue, layoutGroupId } = useTabsContext();
|
|
@@ -11346,8 +11635,8 @@ var TabsContentComponent = React38.forwardRef(
|
|
|
11346
11635
|
}
|
|
11347
11636
|
);
|
|
11348
11637
|
TabsContentComponent.displayName = "TabsContent";
|
|
11349
|
-
var TabsContent =
|
|
11350
|
-
var TabsListComponent =
|
|
11638
|
+
var TabsContent = React39.memo(TabsContentComponent);
|
|
11639
|
+
var TabsListComponent = React39.forwardRef(
|
|
11351
11640
|
({
|
|
11352
11641
|
variant,
|
|
11353
11642
|
scrollable = false,
|
|
@@ -11358,12 +11647,12 @@ var TabsListComponent = React38.forwardRef(
|
|
|
11358
11647
|
}, ref) => {
|
|
11359
11648
|
const { layoutGroupId, value, setFocusedValue } = useTabsContext();
|
|
11360
11649
|
const listLayoutId = `${layoutGroupId}-list`;
|
|
11361
|
-
const listContextValue =
|
|
11650
|
+
const listContextValue = React39.useMemo(
|
|
11362
11651
|
() => ({ variant, scrollable }),
|
|
11363
11652
|
[variant, scrollable]
|
|
11364
11653
|
);
|
|
11365
11654
|
const bgColor = backgroundColor != null ? backgroundColor : "var(--md-sys-color-surface)";
|
|
11366
|
-
const handleBlur =
|
|
11655
|
+
const handleBlur = React39.useCallback(
|
|
11367
11656
|
(e) => {
|
|
11368
11657
|
const listEl = e.currentTarget;
|
|
11369
11658
|
if (listEl.contains(e.relatedTarget)) return;
|
|
@@ -11412,7 +11701,7 @@ var TabsListComponent = React38.forwardRef(
|
|
|
11412
11701
|
}
|
|
11413
11702
|
);
|
|
11414
11703
|
TabsListComponent.displayName = "TabsList";
|
|
11415
|
-
var TabsList =
|
|
11704
|
+
var TabsList = React39.memo(TabsListComponent);
|
|
11416
11705
|
|
|
11417
11706
|
// src/ui/text-field/text-field.tokens.ts
|
|
11418
11707
|
var TF_COLORS = {
|
|
@@ -11451,7 +11740,7 @@ var TF_TYPOGRAPHY = {
|
|
|
11451
11740
|
var TF_CLASSES = {
|
|
11452
11741
|
// Prefix / Suffix
|
|
11453
11742
|
prefixSuffix: "text-base text-[var(--color-m3-on-surface-variant)] select-none shrink-0"};
|
|
11454
|
-
var ActiveIndicator =
|
|
11743
|
+
var ActiveIndicator = React39.memo(function ActiveIndicator2({
|
|
11455
11744
|
isFocused,
|
|
11456
11745
|
isError,
|
|
11457
11746
|
isDisabled,
|
|
@@ -11498,7 +11787,7 @@ function getLabelColor(isFloated, isFocused, isError, isDisabled) {
|
|
|
11498
11787
|
if (isFloated && isFocused) return TF_COLORS.primary;
|
|
11499
11788
|
return TF_COLORS.onSurfaceVariant;
|
|
11500
11789
|
}
|
|
11501
|
-
var FloatingLabel =
|
|
11790
|
+
var FloatingLabel = React39.memo(function FloatingLabel2({
|
|
11502
11791
|
text,
|
|
11503
11792
|
isFloated,
|
|
11504
11793
|
isFocused,
|
|
@@ -11558,7 +11847,7 @@ var FloatingLabel = React38.memo(function FloatingLabel2({
|
|
|
11558
11847
|
);
|
|
11559
11848
|
});
|
|
11560
11849
|
FloatingLabel.displayName = "FloatingLabel";
|
|
11561
|
-
var LeadingIcon =
|
|
11850
|
+
var LeadingIcon = React39.memo(function LeadingIcon2({
|
|
11562
11851
|
children,
|
|
11563
11852
|
isError,
|
|
11564
11853
|
isDisabled
|
|
@@ -11582,7 +11871,7 @@ function getOutlineColor(isFocused, isError, isHovered, isDisabled) {
|
|
|
11582
11871
|
if (isHovered) return TF_COLORS.inputText;
|
|
11583
11872
|
return TF_COLORS.outline;
|
|
11584
11873
|
}
|
|
11585
|
-
var OutlineContainer =
|
|
11874
|
+
var OutlineContainer = React39.memo(function OutlineContainer2({
|
|
11586
11875
|
isFloated,
|
|
11587
11876
|
isFocused,
|
|
11588
11877
|
isError,
|
|
@@ -11680,7 +11969,7 @@ var OutlineContainer = React38.memo(function OutlineContainer2({
|
|
|
11680
11969
|
);
|
|
11681
11970
|
});
|
|
11682
11971
|
OutlineContainer.displayName = "OutlineContainer";
|
|
11683
|
-
var PrefixSuffix =
|
|
11972
|
+
var PrefixSuffix = React39.memo(function PrefixSuffix2({
|
|
11684
11973
|
text,
|
|
11685
11974
|
type,
|
|
11686
11975
|
visible,
|
|
@@ -11722,7 +12011,7 @@ function AnimatedText({
|
|
|
11722
12011
|
motionKey
|
|
11723
12012
|
);
|
|
11724
12013
|
}
|
|
11725
|
-
var SupportingText =
|
|
12014
|
+
var SupportingText = React39.memo(function SupportingText2({
|
|
11726
12015
|
supportingText,
|
|
11727
12016
|
errorText,
|
|
11728
12017
|
isError,
|
|
@@ -11833,7 +12122,7 @@ function ClearIcon() {
|
|
|
11833
12122
|
}
|
|
11834
12123
|
);
|
|
11835
12124
|
}
|
|
11836
|
-
var TrailingIcon =
|
|
12125
|
+
var TrailingIcon = React39.memo(function TrailingIcon2({
|
|
11837
12126
|
mode,
|
|
11838
12127
|
children,
|
|
11839
12128
|
value,
|
|
@@ -11899,7 +12188,7 @@ var TrailingIcon = React38.memo(function TrailingIcon2({
|
|
|
11899
12188
|
});
|
|
11900
12189
|
TrailingIcon.displayName = "TrailingIcon";
|
|
11901
12190
|
var LINE_HEIGHT_PX = 24;
|
|
11902
|
-
var TextFieldComponent =
|
|
12191
|
+
var TextFieldComponent = React39.forwardRef(
|
|
11903
12192
|
({
|
|
11904
12193
|
// Core
|
|
11905
12194
|
variant = "filled",
|
|
@@ -11963,30 +12252,30 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
11963
12252
|
}, ref) => {
|
|
11964
12253
|
var _a;
|
|
11965
12254
|
const prefersReduced = (_a = useReducedMotion()) != null ? _a : false;
|
|
11966
|
-
const generatedId =
|
|
12255
|
+
const generatedId = React39.useId();
|
|
11967
12256
|
const inputId = idProp != null ? idProp : `tf-${generatedId}`;
|
|
11968
12257
|
const supportingId = `${inputId}-supporting`;
|
|
11969
12258
|
const isControlled = valueProp !== void 0;
|
|
11970
|
-
const [internalValue, setInternalValue] =
|
|
12259
|
+
const [internalValue, setInternalValue] = React39.useState(defaultValue);
|
|
11971
12260
|
const currentValue = isControlled ? valueProp : internalValue;
|
|
11972
|
-
const [isFocused, setIsFocused] =
|
|
11973
|
-
const [showPassword, setShowPassword] =
|
|
12261
|
+
const [isFocused, setIsFocused] = React39.useState(false);
|
|
12262
|
+
const [showPassword, setShowPassword] = React39.useState(false);
|
|
11974
12263
|
const resolvedInputType = type === "password" && showPassword ? "text" : type;
|
|
11975
|
-
const [nativeError, setNativeError] =
|
|
11976
|
-
const [labelWidth, setLabelWidth] =
|
|
12264
|
+
const [nativeError, setNativeError] = React39.useState("");
|
|
12265
|
+
const [labelWidth, setLabelWidth] = React39.useState(0);
|
|
11977
12266
|
const hasValue = currentValue.length > 0;
|
|
11978
12267
|
const isFloated = isFocused || hasValue;
|
|
11979
12268
|
const isError = errorProp || !!nativeError || maxLength !== void 0 && currentValue.length > maxLength;
|
|
11980
12269
|
const containerHeight = dense ? TF_SIZE.denseHeight : TF_SIZE.height;
|
|
11981
12270
|
const showAsterisk = required && !noAsterisk;
|
|
11982
|
-
const inputRef =
|
|
11983
|
-
const labelSpanRef =
|
|
11984
|
-
|
|
12271
|
+
const inputRef = React39.useRef(null);
|
|
12272
|
+
const labelSpanRef = React39.useRef(null);
|
|
12273
|
+
React39.useLayoutEffect(() => {
|
|
11985
12274
|
if (labelSpanRef.current) {
|
|
11986
12275
|
setLabelWidth(labelSpanRef.current.offsetWidth);
|
|
11987
12276
|
}
|
|
11988
12277
|
}, []);
|
|
11989
|
-
|
|
12278
|
+
React39.useLayoutEffect(() => {
|
|
11990
12279
|
if (type !== "textarea" || !inputRef.current) return;
|
|
11991
12280
|
const textarea = inputRef.current;
|
|
11992
12281
|
if (autoResize) {
|
|
@@ -11998,7 +12287,7 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
11998
12287
|
}
|
|
11999
12288
|
textarea.style.overflowY = "hidden";
|
|
12000
12289
|
}, [type, autoResize, maxRows, currentValue]);
|
|
12001
|
-
const handleValueChange =
|
|
12290
|
+
const handleValueChange = React39.useCallback(
|
|
12002
12291
|
(newValue) => {
|
|
12003
12292
|
var _a2, _b;
|
|
12004
12293
|
if (!isControlled) setInternalValue(newValue);
|
|
@@ -12007,7 +12296,7 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
12007
12296
|
},
|
|
12008
12297
|
[isControlled]
|
|
12009
12298
|
);
|
|
12010
|
-
const handleChange =
|
|
12299
|
+
const handleChange = React39.useCallback(
|
|
12011
12300
|
(e) => {
|
|
12012
12301
|
const newVal = e.target.value;
|
|
12013
12302
|
handleValueChange(newVal);
|
|
@@ -12015,14 +12304,14 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
12015
12304
|
},
|
|
12016
12305
|
[handleValueChange, onChange]
|
|
12017
12306
|
);
|
|
12018
|
-
const handleFocus =
|
|
12307
|
+
const handleFocus = React39.useCallback(
|
|
12019
12308
|
(e) => {
|
|
12020
12309
|
setIsFocused(true);
|
|
12021
12310
|
onFocus == null ? void 0 : onFocus(e);
|
|
12022
12311
|
},
|
|
12023
12312
|
[onFocus]
|
|
12024
12313
|
);
|
|
12025
|
-
const handleBlur =
|
|
12314
|
+
const handleBlur = React39.useCallback(
|
|
12026
12315
|
(e) => {
|
|
12027
12316
|
setIsFocused(false);
|
|
12028
12317
|
const el = inputRef.current;
|
|
@@ -12035,7 +12324,7 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
12035
12324
|
},
|
|
12036
12325
|
[onBlur]
|
|
12037
12326
|
);
|
|
12038
|
-
const handleClear =
|
|
12327
|
+
const handleClear = React39.useCallback(() => {
|
|
12039
12328
|
var _a2;
|
|
12040
12329
|
handleValueChange("");
|
|
12041
12330
|
onChange == null ? void 0 : onChange("", {
|
|
@@ -12043,12 +12332,12 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
12043
12332
|
});
|
|
12044
12333
|
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
12045
12334
|
}, [handleValueChange, onChange]);
|
|
12046
|
-
const handlePasswordToggle =
|
|
12335
|
+
const handlePasswordToggle = React39.useCallback(() => {
|
|
12047
12336
|
var _a2;
|
|
12048
12337
|
setShowPassword((prev) => !prev);
|
|
12049
12338
|
(_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
12050
12339
|
}, []);
|
|
12051
|
-
|
|
12340
|
+
React39.useImperativeHandle(
|
|
12052
12341
|
ref,
|
|
12053
12342
|
() => ({
|
|
12054
12343
|
focus: () => {
|
|
@@ -12293,7 +12582,7 @@ var TextFieldComponent = React38.forwardRef(
|
|
|
12293
12582
|
}
|
|
12294
12583
|
);
|
|
12295
12584
|
TextFieldComponent.displayName = "TextField";
|
|
12296
|
-
var TextField =
|
|
12585
|
+
var TextField = React39.memo(TextFieldComponent);
|
|
12297
12586
|
|
|
12298
12587
|
// src/ui/typography/typography-key-tokens.ts
|
|
12299
12588
|
var TypographyKeyTokens = /* @__PURE__ */ ((TypographyKeyTokens2) => {
|
|
@@ -13747,7 +14036,7 @@ function TooltipBox({
|
|
|
13747
14036
|
onKeyDown: handleKeyDown,
|
|
13748
14037
|
"aria-label": ariaLabel,
|
|
13749
14038
|
"aria-describedby": state.isVisible ? tooltipId : void 0,
|
|
13750
|
-
children:
|
|
14039
|
+
children: React39.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children })
|
|
13751
14040
|
}
|
|
13752
14041
|
),
|
|
13753
14042
|
mounted && createPortal(
|
|
@@ -13777,6 +14066,6 @@ function TooltipBox({
|
|
|
13777
14066
|
] });
|
|
13778
14067
|
}
|
|
13779
14068
|
|
|
13780
|
-
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, Badge, BadgedBox, BottomAppBar, Button, ButtonGroup, CHECK_ICON_VARIANTS, Card, Checkbox, Chip, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, DIVIDER_COLOR, DIVIDER_PADDING, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogFullScreenContent, DialogHeader, DialogIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DockedToolbar, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, FAB, FABMenu, FABMenuItem, FABPosition, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, GROUP_SHAPES, ITEM_SHAPE_CLASSES, Icon, IconButton, LargeFlexibleAppBar, LoadingIndicator, MD3ThemeProvider, MD3_EXPRESSIVE_FONT_VARIATION, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MaterialSymbolsPreconnect, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, NavigationRail, NavigationRailItem, PlainTooltip, ProgressIndicator, RadioButton, RadioGroup, RangeSlider, RichTooltip, Ripple, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, ScrollArea, ScrollAreaScrollbar, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, Slider, SliderColors, SliderTokens, SmallAppBar, Snackbar, SnackbarHost, SnackbarProvider, SubMenu, Switch, SwitchColors, SwitchTokens, Tab, TableOfContents, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, Text, TextField, ToggleFAB, TooltipBox, TooltipCaretShape, TooltipTokens, TriStateCheckbox, TypeScaleTokens, Typography, TypographyContext, TypographyKeyTokens, TypographyProvider, TypographyTokens, VIBRANT_COLORS, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, appBarTypography, applyTheme, buildWavePath, cn, generateM3Theme, resolveMode, useAppBarScroll, useRipple as useDOMRipple, useMediaQuery, useMenuContext, useRipple2 as useRipple, useRippleState, useSearchKeyboard, useSnackbar, useSnackbarState, useTheme, useThemeMode, useTooltipPosition, useTooltipState, useTypography };
|
|
14069
|
+
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, Badge, BadgedBox, BottomAppBar, Button, ButtonGroup, CHECK_ICON_VARIANTS, Card, Checkbox, Chip, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, DIVIDER_COLOR, DIVIDER_PADDING, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogFullScreenContent, DialogHeader, DialogIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DockedToolbar, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, FAB, FABMenu, FABMenuItem, FABPosition, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, GROUP_SHAPES, ITEM_SHAPE_CLASSES, Icon, IconButton, LargeFlexibleAppBar, LoadingIndicator, MD3ThemeProvider, MD3_EXPRESSIVE_FONT_VARIATION, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MaterialSymbolsPreconnect, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, PlainTooltip, ProgressIndicator, RadioButton, RadioGroup, RangeSlider, RichTooltip, Ripple, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, ScrollArea, ScrollAreaScrollbar, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, Slider, SliderColors, SliderTokens, SmallAppBar, Snackbar, SnackbarHost, SnackbarProvider, SubMenu, Switch, SwitchColors, SwitchTokens, Tab, TableOfContents, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, Text, TextField, ToggleFAB, TooltipBox, TooltipCaretShape, TooltipTokens, TriStateCheckbox, TypeScaleTokens, Typography, TypographyContext, TypographyKeyTokens, TypographyProvider, TypographyTokens, VIBRANT_COLORS, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, appBarTypography, applyTheme, buildWavePath, cn, generateM3Theme, resolveMode, useAppBarScroll, useRipple as useDOMRipple, useMediaQuery, useMenuContext, useRipple2 as useRipple, useRippleState, useSearchKeyboard, useSnackbar, useSnackbarState, useTheme, useThemeMode, useTooltipPosition, useTooltipState, useTypography };
|
|
13781
14070
|
//# sourceMappingURL=index.mjs.map
|
|
13782
14071
|
//# sourceMappingURL=index.mjs.map
|