@syscore/ui-library 1.15.4 → 1.16.0
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/client/components/icons/UtilityCompare.tsx +37 -35
- package/client/components/icons/UtilityFeedback.tsx +30 -0
- package/client/components/icons/UtilityRevisionsHide.tsx +1 -1
- package/client/components/icons/UtilityRevisionsShow.tsx +40 -0
- package/client/components/ui/mobile-nav.tsx +278 -0
- package/client/global.css +90 -6
- package/client/ui/MobileNav.stories.tsx +317 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.es.js +314 -37
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -180,6 +180,10 @@ import { MenubarSub } from '../client/components/ui/menubar';
|
|
|
180
180
|
import { MenubarSubContent } from '../client/components/ui/menubar';
|
|
181
181
|
import { MenubarSubTrigger } from '../client/components/ui/menubar';
|
|
182
182
|
import { MenubarTrigger } from '../client/components/ui/menubar';
|
|
183
|
+
import { MobileNav } from '../client/components/ui/mobile-nav';
|
|
184
|
+
import { MobileNavBar } from '../client/components/ui/mobile-nav';
|
|
185
|
+
import { MobileNavPanel } from '../client/components/ui/mobile-nav';
|
|
186
|
+
import { MobileNavTrigger } from '../client/components/ui/mobile-nav';
|
|
183
187
|
import { NavAccount } from '../client/components/icons/NavAccount';
|
|
184
188
|
import { NavBullet } from '../client/components/icons/NavBullet';
|
|
185
189
|
import { Navigation } from '../client/components/ui/navigation';
|
|
@@ -340,12 +344,14 @@ import { UtilityClose } from '../client/components/icons/UtilityClose';
|
|
|
340
344
|
import { UtilityCompare } from '../client/components/icons/UtilityCompare';
|
|
341
345
|
import { UtilityDrag } from '../client/components/icons/UtilityDrag';
|
|
342
346
|
import { UtilityEdit } from '../client/components/icons/UtilityEdit';
|
|
347
|
+
import { UtilityFeedback } from '../client/components/icons/UtilityFeedback';
|
|
343
348
|
import { UtilityHome } from '../client/components/icons/UtilityHome';
|
|
344
349
|
import { UtilityMessage } from '../client/components/icons/UtilityMessage';
|
|
345
350
|
import { UtilityOptions } from '../client/components/icons/UtilityOptions';
|
|
346
351
|
import { UtilityPortfolio } from '../client/components/icons/UtilityPortfolio';
|
|
347
352
|
import { UtilityReset } from '../client/components/icons/UtilityReset';
|
|
348
353
|
import { UtilityRevisionsHide } from '../client/components/icons/UtilityRevisionsHide';
|
|
354
|
+
import { UtilityRevisionsShow } from '../client/components/icons/UtilityRevisionsShow';
|
|
349
355
|
import { UtilitySave } from '../client/components/icons/UtilitySave';
|
|
350
356
|
import { UtilityScopeLarge } from '../client/components/icons/UtilityScopeLarge';
|
|
351
357
|
import { UtilityScoring } from '../client/components/icons/UtilityScoring';
|
|
@@ -726,6 +732,14 @@ export { MenubarSubTrigger }
|
|
|
726
732
|
|
|
727
733
|
export { MenubarTrigger }
|
|
728
734
|
|
|
735
|
+
export { MobileNav }
|
|
736
|
+
|
|
737
|
+
export { MobileNavBar }
|
|
738
|
+
|
|
739
|
+
export { MobileNavPanel }
|
|
740
|
+
|
|
741
|
+
export { MobileNavTrigger }
|
|
742
|
+
|
|
729
743
|
export { NavAccount }
|
|
730
744
|
|
|
731
745
|
export { NavBullet }
|
|
@@ -1046,6 +1060,8 @@ export { UtilityDrag }
|
|
|
1046
1060
|
|
|
1047
1061
|
export { UtilityEdit }
|
|
1048
1062
|
|
|
1063
|
+
export { UtilityFeedback }
|
|
1064
|
+
|
|
1049
1065
|
export { UtilityHome }
|
|
1050
1066
|
|
|
1051
1067
|
export { UtilityMessage }
|
|
@@ -1058,6 +1074,8 @@ export { UtilityReset }
|
|
|
1058
1074
|
|
|
1059
1075
|
export { UtilityRevisionsHide }
|
|
1060
1076
|
|
|
1077
|
+
export { UtilityRevisionsShow }
|
|
1078
|
+
|
|
1061
1079
|
export { UtilitySave }
|
|
1062
1080
|
|
|
1063
1081
|
export { UtilityScopeLarge }
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import React__default, { useState, useEffect, useCallback, useRef } from "react";
|
|
4
|
-
import { motion, AnimatePresence } from "motion/react";
|
|
3
|
+
import React__default, { useState, useEffect, useCallback, useRef, createContext, useMemo, useContext } from "react";
|
|
4
|
+
import { motion, AnimatePresence, useMotionValue, animate } from "motion/react";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
@@ -5776,70 +5776,72 @@ const UtilityCompare = ({
|
|
|
5776
5776
|
"svg",
|
|
5777
5777
|
{
|
|
5778
5778
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5779
|
-
width: "
|
|
5780
|
-
height: "
|
|
5781
|
-
viewBox: "0 0
|
|
5779
|
+
width: "31",
|
|
5780
|
+
height: "34",
|
|
5781
|
+
viewBox: "0 0 31 34",
|
|
5782
5782
|
fill: "none",
|
|
5783
|
-
className: cn("
|
|
5783
|
+
className: cn("text-inherit w-full h-full"),
|
|
5784
5784
|
children: [
|
|
5785
5785
|
/* @__PURE__ */ jsx(
|
|
5786
5786
|
"path",
|
|
5787
5787
|
{
|
|
5788
|
-
d: "
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5788
|
+
d: "M10.6002 5.79905C10.6002 8.44949 8.45114 10.5981 5.80011 10.5981C3.14908 10.5981 1 8.44949 1 5.79905C1 3.14861 3.14908 1 5.80011 1C8.45114 1 10.6002 3.14861 10.6002 5.79905Z",
|
|
5789
|
+
fill: "#E0FBF5",
|
|
5790
|
+
stroke: "#282A31",
|
|
5791
|
+
"stroke-width": "2",
|
|
5792
|
+
"stroke-linecap": "round",
|
|
5793
|
+
"stroke-linejoin": "round"
|
|
5793
5794
|
}
|
|
5794
5795
|
),
|
|
5795
5796
|
/* @__PURE__ */ jsx(
|
|
5796
5797
|
"path",
|
|
5797
5798
|
{
|
|
5798
|
-
d: "
|
|
5799
|
-
stroke: "
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5799
|
+
d: "M5.80078 16.998L5.80078 24.9965C5.80078 25.845 6.13793 26.6588 6.73806 27.2587C7.33819 27.8587 8.15214 28.1958 9.00086 28.1958L20.2011 28.1958",
|
|
5800
|
+
stroke: "#282A31",
|
|
5801
|
+
"stroke-width": "2",
|
|
5802
|
+
"stroke-linecap": "round",
|
|
5803
|
+
"stroke-linejoin": "round"
|
|
5803
5804
|
}
|
|
5804
5805
|
),
|
|
5805
5806
|
/* @__PURE__ */ jsx(
|
|
5806
5807
|
"path",
|
|
5807
5808
|
{
|
|
5808
|
-
d: "
|
|
5809
|
-
stroke: "
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5809
|
+
d: "M10.6002 21.7971L5.80011 16.998L1 21.7971",
|
|
5810
|
+
stroke: "#282A31",
|
|
5811
|
+
"stroke-width": "2",
|
|
5812
|
+
"stroke-linecap": "round",
|
|
5813
|
+
"stroke-linejoin": "round"
|
|
5813
5814
|
}
|
|
5814
5815
|
),
|
|
5815
5816
|
/* @__PURE__ */ jsx(
|
|
5816
5817
|
"path",
|
|
5817
5818
|
{
|
|
5818
|
-
d: "
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5819
|
+
d: "M29.8001 28.2014C29.8001 30.8518 27.651 33.0004 24.9999 33.0004C22.3489 33.0004 20.1998 30.8518 20.1998 28.2014C20.1998 25.551 22.3489 23.4023 24.9999 23.4023C27.651 23.4023 29.8001 25.5509 29.8001 28.2014Z",
|
|
5820
|
+
fill: "#EFF5FB",
|
|
5821
|
+
stroke: "#282A31",
|
|
5822
|
+
"stroke-width": "2",
|
|
5823
|
+
"stroke-linecap": "round",
|
|
5824
|
+
"stroke-linejoin": "round"
|
|
5823
5825
|
}
|
|
5824
5826
|
),
|
|
5825
5827
|
/* @__PURE__ */ jsx(
|
|
5826
5828
|
"path",
|
|
5827
5829
|
{
|
|
5828
|
-
d: "
|
|
5829
|
-
stroke: "
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5830
|
+
d: "M25.0002 16.9946V8.99624C25.0002 8.14771 24.663 7.33394 24.0629 6.73395C23.4628 6.13395 22.6488 5.79687 21.8001 5.79687L10.5999 5.79688",
|
|
5831
|
+
stroke: "#282A31",
|
|
5832
|
+
"stroke-width": "2",
|
|
5833
|
+
"stroke-linecap": "round",
|
|
5834
|
+
"stroke-linejoin": "round"
|
|
5833
5835
|
}
|
|
5834
5836
|
),
|
|
5835
5837
|
/* @__PURE__ */ jsx(
|
|
5836
5838
|
"path",
|
|
5837
5839
|
{
|
|
5838
|
-
d: "
|
|
5839
|
-
stroke: "
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5840
|
+
d: "M20.1998 12.2012L24.9999 17.0002L29.8001 12.2012",
|
|
5841
|
+
stroke: "#282A31",
|
|
5842
|
+
"stroke-width": "2",
|
|
5843
|
+
"stroke-linecap": "round",
|
|
5844
|
+
"stroke-linejoin": "round"
|
|
5843
5845
|
}
|
|
5844
5846
|
)
|
|
5845
5847
|
]
|
|
@@ -6715,7 +6717,7 @@ function UtilityRevisionsHide({ className }) {
|
|
|
6715
6717
|
height: "15",
|
|
6716
6718
|
viewBox: "0 0 17 15",
|
|
6717
6719
|
fill: "none",
|
|
6718
|
-
className: cn("
|
|
6720
|
+
className: cn("text-inherit"),
|
|
6719
6721
|
children: [
|
|
6720
6722
|
/* @__PURE__ */ jsx(
|
|
6721
6723
|
"path",
|
|
@@ -6864,6 +6866,90 @@ const UtilityTriangleInfo = ({
|
|
|
6864
6866
|
}
|
|
6865
6867
|
);
|
|
6866
6868
|
};
|
|
6869
|
+
function UtilityFeedback({ className }) {
|
|
6870
|
+
return /* @__PURE__ */ jsx(
|
|
6871
|
+
"div",
|
|
6872
|
+
{
|
|
6873
|
+
className: cn(
|
|
6874
|
+
"size-4 flex items-center justify-center text-gray-500",
|
|
6875
|
+
className
|
|
6876
|
+
),
|
|
6877
|
+
children: /* @__PURE__ */ jsx(
|
|
6878
|
+
"svg",
|
|
6879
|
+
{
|
|
6880
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6881
|
+
width: "30",
|
|
6882
|
+
height: "28",
|
|
6883
|
+
viewBox: "0 0 30 28",
|
|
6884
|
+
fill: "none",
|
|
6885
|
+
className: cn("text-inherit"),
|
|
6886
|
+
children: /* @__PURE__ */ jsx(
|
|
6887
|
+
"path",
|
|
6888
|
+
{
|
|
6889
|
+
d: "M29 20.162C29 20.888 28.705 21.5843 28.1799 22.0977C27.6548 22.611 26.9426 22.8995 26.2 22.8995H7.7592C7.01665 22.8996 6.30458 23.1881 5.7796 23.7015L2.6968 26.7154C2.55779 26.8513 2.38068 26.9438 2.18788 26.9813C1.99508 27.0188 1.79524 26.9996 1.61363 26.926C1.43202 26.8525 1.27678 26.728 1.16756 26.5682C1.05834 26.4084 1.00003 26.2205 1 26.0283V3.73743C1 3.01142 1.295 2.31514 1.8201 1.80178C2.3452 1.28841 3.05739 1 3.8 1H26.2C26.9426 1 27.6548 1.28841 28.1799 1.80178C28.705 2.31514 29 3.01142 29 3.73743V20.162Z",
|
|
6890
|
+
fill: "#D6F4FB",
|
|
6891
|
+
stroke: "#71747D",
|
|
6892
|
+
"stroke-width": "2",
|
|
6893
|
+
"stroke-linecap": "round",
|
|
6894
|
+
"stroke-linejoin": "round"
|
|
6895
|
+
}
|
|
6896
|
+
)
|
|
6897
|
+
}
|
|
6898
|
+
)
|
|
6899
|
+
}
|
|
6900
|
+
);
|
|
6901
|
+
}
|
|
6902
|
+
function UtilityRevisionsShow({ className }) {
|
|
6903
|
+
return /* @__PURE__ */ jsx(
|
|
6904
|
+
"div",
|
|
6905
|
+
{
|
|
6906
|
+
className: cn(
|
|
6907
|
+
"size-4 flex items-center justify-center text-gray-500",
|
|
6908
|
+
className
|
|
6909
|
+
),
|
|
6910
|
+
children: /* @__PURE__ */ jsxs(
|
|
6911
|
+
"svg",
|
|
6912
|
+
{
|
|
6913
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6914
|
+
width: "30",
|
|
6915
|
+
height: "26",
|
|
6916
|
+
viewBox: "0 0 30 26",
|
|
6917
|
+
fill: "none",
|
|
6918
|
+
className: cn("text-inherit"),
|
|
6919
|
+
children: [
|
|
6920
|
+
/* @__PURE__ */ jsx(
|
|
6921
|
+
"path",
|
|
6922
|
+
{
|
|
6923
|
+
d: "M9.84194 11.5L1 20.5006V25.0009H14.2629L18.6839 20.5006",
|
|
6924
|
+
fill: "#F6EFD0"
|
|
6925
|
+
}
|
|
6926
|
+
),
|
|
6927
|
+
/* @__PURE__ */ jsx(
|
|
6928
|
+
"path",
|
|
6929
|
+
{
|
|
6930
|
+
d: "M9.84194 11.5L1 20.5006V25.0009H14.2629L18.6839 20.5006",
|
|
6931
|
+
stroke: "#282A31",
|
|
6932
|
+
"stroke-width": "2",
|
|
6933
|
+
"stroke-linecap": "round",
|
|
6934
|
+
"stroke-linejoin": "round"
|
|
6935
|
+
}
|
|
6936
|
+
),
|
|
6937
|
+
/* @__PURE__ */ jsx(
|
|
6938
|
+
"path",
|
|
6939
|
+
{
|
|
6940
|
+
d: "M28.9999 13.0008L22.2211 19.9013C21.6702 20.451 20.9295 20.7589 20.158 20.7589C19.3865 20.7589 18.6458 20.451 18.0949 19.9013L10.4319 12.1008C9.89184 11.5399 9.58936 10.7859 9.58936 10.0006C9.58936 9.21531 9.89184 8.4613 10.4319 7.90048L17.2107 1",
|
|
6941
|
+
stroke: "#282A31",
|
|
6942
|
+
"stroke-width": "2",
|
|
6943
|
+
"stroke-linecap": "round",
|
|
6944
|
+
"stroke-linejoin": "round"
|
|
6945
|
+
}
|
|
6946
|
+
)
|
|
6947
|
+
]
|
|
6948
|
+
}
|
|
6949
|
+
)
|
|
6950
|
+
}
|
|
6951
|
+
);
|
|
6952
|
+
}
|
|
6867
6953
|
const SealWell = ({ className }) => {
|
|
6868
6954
|
return /* @__PURE__ */ jsxs(
|
|
6869
6955
|
"svg",
|
|
@@ -12275,6 +12361,191 @@ const BadgeImperativeSecondary = ({
|
|
|
12275
12361
|
}
|
|
12276
12362
|
) });
|
|
12277
12363
|
};
|
|
12364
|
+
const SPRING_CONFIG = { stiffness: 300, damping: 30 };
|
|
12365
|
+
const MobileNavContext = createContext(null);
|
|
12366
|
+
const useMobileNav = () => {
|
|
12367
|
+
const ctx = useContext(MobileNavContext);
|
|
12368
|
+
if (!ctx)
|
|
12369
|
+
throw new Error(
|
|
12370
|
+
"MobileNav compound components must be used within <MobileNav>"
|
|
12371
|
+
);
|
|
12372
|
+
return ctx;
|
|
12373
|
+
};
|
|
12374
|
+
const MobileNav = ({ className, children }) => {
|
|
12375
|
+
const [activeKey, setActiveKey] = useState(null);
|
|
12376
|
+
const [open, setOpen] = useState(false);
|
|
12377
|
+
const toggle = useCallback(
|
|
12378
|
+
(key) => {
|
|
12379
|
+
if (activeKey === key && open) {
|
|
12380
|
+
setOpen(false);
|
|
12381
|
+
setActiveKey(null);
|
|
12382
|
+
} else {
|
|
12383
|
+
setActiveKey(key);
|
|
12384
|
+
setOpen(true);
|
|
12385
|
+
}
|
|
12386
|
+
},
|
|
12387
|
+
[activeKey, open]
|
|
12388
|
+
);
|
|
12389
|
+
const close = useCallback(() => {
|
|
12390
|
+
setOpen(false);
|
|
12391
|
+
setActiveKey(null);
|
|
12392
|
+
}, []);
|
|
12393
|
+
const value = useMemo(
|
|
12394
|
+
() => ({ activeKey, open, toggle, close }),
|
|
12395
|
+
[activeKey, open, toggle, close]
|
|
12396
|
+
);
|
|
12397
|
+
return /* @__PURE__ */ jsx(MobileNavContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { className: cn("mobile-nav", className), children }) });
|
|
12398
|
+
};
|
|
12399
|
+
const MobileNavPanel = ({ className, children }) => {
|
|
12400
|
+
const { activeKey, open, close } = useMobileNav();
|
|
12401
|
+
const panelRef = useRef(null);
|
|
12402
|
+
const contentRef = useRef(null);
|
|
12403
|
+
const heightMV = useMotionValue(0);
|
|
12404
|
+
const stopAnimation = useRef(null);
|
|
12405
|
+
const stateRef = useRef("closed");
|
|
12406
|
+
const cachedInitialHeight = useRef(0);
|
|
12407
|
+
const getNavBarHeight = () => {
|
|
12408
|
+
var _a;
|
|
12409
|
+
const nav = (_a = panelRef.current) == null ? void 0 : _a.nextElementSibling;
|
|
12410
|
+
return (nav == null ? void 0 : nav.offsetHeight) ?? 0;
|
|
12411
|
+
};
|
|
12412
|
+
const getAvailableHeight = () => {
|
|
12413
|
+
var _a;
|
|
12414
|
+
const parent = (_a = panelRef.current) == null ? void 0 : _a.parentElement;
|
|
12415
|
+
const container = (parent == null ? void 0 : parent.clientHeight) ?? window.innerHeight;
|
|
12416
|
+
return container - getNavBarHeight();
|
|
12417
|
+
};
|
|
12418
|
+
const measureContentHeight = () => {
|
|
12419
|
+
const content = contentRef.current;
|
|
12420
|
+
if (!content) return 0;
|
|
12421
|
+
const child = content.firstElementChild;
|
|
12422
|
+
const raw = ((child == null ? void 0 : child.offsetHeight) ?? content.scrollHeight) + 40;
|
|
12423
|
+
const max = getAvailableHeight() * 0.7;
|
|
12424
|
+
return Math.min(raw, max);
|
|
12425
|
+
};
|
|
12426
|
+
const springTo = (target) => {
|
|
12427
|
+
var _a;
|
|
12428
|
+
(_a = stopAnimation.current) == null ? void 0 : _a.call(stopAnimation);
|
|
12429
|
+
const controls = animate(heightMV, target, {
|
|
12430
|
+
type: "spring",
|
|
12431
|
+
...SPRING_CONFIG
|
|
12432
|
+
});
|
|
12433
|
+
stopAnimation.current = () => controls.stop();
|
|
12434
|
+
};
|
|
12435
|
+
useEffect(() => {
|
|
12436
|
+
let cancelled = false;
|
|
12437
|
+
if (open) {
|
|
12438
|
+
stateRef.current = "initial";
|
|
12439
|
+
requestAnimationFrame(() => {
|
|
12440
|
+
if (cancelled) return;
|
|
12441
|
+
const h = measureContentHeight();
|
|
12442
|
+
cachedInitialHeight.current = h;
|
|
12443
|
+
springTo(h);
|
|
12444
|
+
});
|
|
12445
|
+
} else {
|
|
12446
|
+
stateRef.current = "closed";
|
|
12447
|
+
cachedInitialHeight.current = 0;
|
|
12448
|
+
springTo(0);
|
|
12449
|
+
}
|
|
12450
|
+
return () => {
|
|
12451
|
+
cancelled = true;
|
|
12452
|
+
};
|
|
12453
|
+
}, [open]);
|
|
12454
|
+
useEffect(() => {
|
|
12455
|
+
if (!open) return;
|
|
12456
|
+
let cancelled = false;
|
|
12457
|
+
requestAnimationFrame(() => {
|
|
12458
|
+
requestAnimationFrame(() => {
|
|
12459
|
+
if (cancelled) return;
|
|
12460
|
+
const h = measureContentHeight();
|
|
12461
|
+
cachedInitialHeight.current = h;
|
|
12462
|
+
if (stateRef.current === "initial" || stateRef.current === "closed") {
|
|
12463
|
+
stateRef.current = "initial";
|
|
12464
|
+
springTo(h);
|
|
12465
|
+
}
|
|
12466
|
+
});
|
|
12467
|
+
});
|
|
12468
|
+
return () => {
|
|
12469
|
+
cancelled = true;
|
|
12470
|
+
};
|
|
12471
|
+
}, [activeKey]);
|
|
12472
|
+
const dragDirection = useRef(null);
|
|
12473
|
+
const handlePanStart = () => {
|
|
12474
|
+
dragDirection.current = null;
|
|
12475
|
+
};
|
|
12476
|
+
const handlePan = (_, info) => {
|
|
12477
|
+
dragDirection.current = info.offset.y < 0 ? "up" : "down";
|
|
12478
|
+
};
|
|
12479
|
+
const handlePanEnd = () => {
|
|
12480
|
+
const dir = dragDirection.current;
|
|
12481
|
+
if (!dir) return;
|
|
12482
|
+
if (dir === "up") {
|
|
12483
|
+
if (stateRef.current === "initial") {
|
|
12484
|
+
stateRef.current = "full";
|
|
12485
|
+
springTo(getAvailableHeight());
|
|
12486
|
+
}
|
|
12487
|
+
} else {
|
|
12488
|
+
if (stateRef.current === "full") {
|
|
12489
|
+
stateRef.current = "initial";
|
|
12490
|
+
springTo(cachedInitialHeight.current);
|
|
12491
|
+
} else if (stateRef.current === "initial") {
|
|
12492
|
+
stateRef.current = "closed";
|
|
12493
|
+
springTo(0);
|
|
12494
|
+
close();
|
|
12495
|
+
}
|
|
12496
|
+
}
|
|
12497
|
+
};
|
|
12498
|
+
return /* @__PURE__ */ jsxs(
|
|
12499
|
+
motion.div,
|
|
12500
|
+
{
|
|
12501
|
+
ref: panelRef,
|
|
12502
|
+
className: cn("mobile-nav-panel", className),
|
|
12503
|
+
"data-closed": !open || void 0,
|
|
12504
|
+
style: { height: heightMV },
|
|
12505
|
+
children: [
|
|
12506
|
+
/* @__PURE__ */ jsx(
|
|
12507
|
+
motion.div,
|
|
12508
|
+
{
|
|
12509
|
+
className: "mobile-nav-handle",
|
|
12510
|
+
onPanStart: handlePanStart,
|
|
12511
|
+
onPan: handlePan,
|
|
12512
|
+
onPanEnd: handlePanEnd,
|
|
12513
|
+
children: /* @__PURE__ */ jsx("div", { className: "mobile-nav-handle-bar" })
|
|
12514
|
+
}
|
|
12515
|
+
),
|
|
12516
|
+
/* @__PURE__ */ jsx("div", { ref: contentRef, className: "mobile-nav-content", children: activeKey ? children(activeKey) : null })
|
|
12517
|
+
]
|
|
12518
|
+
}
|
|
12519
|
+
);
|
|
12520
|
+
};
|
|
12521
|
+
const MobileNavBar = ({ className, children }) => /* @__PURE__ */ jsx("nav", { className: cn("mobile-nav-bar", className), children: /* @__PURE__ */ jsx("div", { className: "mobile-nav-bar-inner", children }) });
|
|
12522
|
+
const MobileNavTrigger = ({
|
|
12523
|
+
value,
|
|
12524
|
+
children,
|
|
12525
|
+
label,
|
|
12526
|
+
onAction,
|
|
12527
|
+
className
|
|
12528
|
+
}) => {
|
|
12529
|
+
const { activeKey, open, toggle, close } = useMobileNav();
|
|
12530
|
+
const handleClick = () => {
|
|
12531
|
+
if (onAction) {
|
|
12532
|
+
if (open) close();
|
|
12533
|
+
onAction();
|
|
12534
|
+
} else {
|
|
12535
|
+
toggle(value);
|
|
12536
|
+
}
|
|
12537
|
+
};
|
|
12538
|
+
return /* @__PURE__ */ jsx(
|
|
12539
|
+
"button",
|
|
12540
|
+
{
|
|
12541
|
+
onClick: handleClick,
|
|
12542
|
+
"data-active": activeKey === value || void 0,
|
|
12543
|
+
className: cn("mobile-nav-trigger group", className),
|
|
12544
|
+
"aria-label": label,
|
|
12545
|
+
children
|
|
12546
|
+
}
|
|
12547
|
+
);
|
|
12548
|
+
};
|
|
12278
12549
|
const X = ({ className = "", color = "#71747D" }) => {
|
|
12279
12550
|
return /* @__PURE__ */ jsxs(
|
|
12280
12551
|
"svg",
|
|
@@ -13069,6 +13340,10 @@ export {
|
|
|
13069
13340
|
MenubarSubContent,
|
|
13070
13341
|
MenubarSubTrigger,
|
|
13071
13342
|
MenubarTrigger,
|
|
13343
|
+
MobileNav,
|
|
13344
|
+
MobileNavBar,
|
|
13345
|
+
MobileNavPanel,
|
|
13346
|
+
MobileNavTrigger,
|
|
13072
13347
|
NavAccount,
|
|
13073
13348
|
NavBullet,
|
|
13074
13349
|
NavLogo,
|
|
@@ -13215,12 +13490,14 @@ export {
|
|
|
13215
13490
|
UtilityCompare,
|
|
13216
13491
|
UtilityDrag,
|
|
13217
13492
|
UtilityEdit,
|
|
13493
|
+
UtilityFeedback,
|
|
13218
13494
|
UtilityHome,
|
|
13219
13495
|
UtilityMessage,
|
|
13220
13496
|
UtilityOptions,
|
|
13221
13497
|
UtilityPortfolio,
|
|
13222
13498
|
UtilityReset,
|
|
13223
13499
|
UtilityRevisionsHide,
|
|
13500
|
+
UtilityRevisionsShow,
|
|
13224
13501
|
UtilitySave,
|
|
13225
13502
|
UtilityScopeLarge,
|
|
13226
13503
|
UtilityScoring,
|