@justanarthur/modo-ui 0.1.0 → 0.2.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/dist/blocks/sidebar-app/index.d.ts +1 -1
- package/dist/blocks/sidebar-app/index.js +28 -31
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js +12 -14
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +10 -12
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +38 -40
- package/dist/components/inputs/checkbox-group/index.d.ts +1 -1
- package/dist/components/inputs/checkbox-group/index.js +17 -19
- package/dist/components/inputs/color-picker/index.d.ts +1 -1
- package/dist/components/inputs/color-picker/index.js +31 -33
- package/dist/components/inputs/combobox/index.d.ts +1 -1
- package/dist/components/inputs/combobox/index.js +31 -34
- package/dist/components/inputs/date-time/calendar/index.d.ts +1 -1
- package/dist/components/inputs/date-time/calendar/index.js +14 -16
- package/dist/components/inputs/date-time/date-picker/index.d.ts +1 -1
- package/dist/components/inputs/date-time/date-picker/index.js +28 -30
- package/dist/components/inputs/date-time/date-range-picker/index.d.ts +1 -1
- package/dist/components/inputs/date-time/date-range-picker/index.js +27 -29
- package/dist/components/inputs/date-time/duration-picker/index.d.ts +1 -1
- package/dist/components/inputs/date-time/duration-picker/index.js +27 -29
- package/dist/components/inputs/date-time/month-picker/index.d.ts +1 -1
- package/dist/components/inputs/date-time/month-picker/index.js +26 -28
- package/dist/components/inputs/date-time/time-picker/index.d.ts +1 -1
- package/dist/components/inputs/date-time/time-picker/index.js +27 -29
- package/dist/components/inputs/input/index.d.ts +1 -1
- package/dist/components/inputs/input/index.js +15 -16
- package/dist/components/inputs/input-copy/index.d.ts +1 -1
- package/dist/components/inputs/input-copy/index.js +12 -14
- package/dist/components/inputs/input-message/index.d.ts +1 -1
- package/dist/components/inputs/input-message/index.js +21 -23
- package/dist/components/inputs/radio-group/index.d.ts +1 -1
- package/dist/components/inputs/radio-group/index.js +16 -18
- package/dist/components/inputs/search/index.d.ts +1 -1
- package/dist/components/inputs/search/index.js +21 -24
- package/dist/components/inputs/select/index.d.ts +1 -1
- package/dist/components/inputs/select/index.js +30 -33
- package/dist/components/inputs/slider/index.d.ts +1 -1
- package/dist/components/inputs/slider/index.js +10 -12
- package/dist/components/inputs/switch/index.d.ts +1 -1
- package/dist/components/inputs/switch/index.js +10 -12
- package/dist/components/navigation/accordion/index.d.ts +1 -1
- package/dist/components/navigation/accordion/index.js +24 -26
- package/dist/components/navigation/sidebar/index.d.ts +3 -3
- package/dist/components/navigation/sidebar/index.js +95 -97
- package/dist/components/navigation/tabs/index.d.ts +1 -1
- package/dist/components/navigation/tabs/index.js +19 -21
- package/dist/components/navigation/tabs-subtle/index.d.ts +1 -1
- package/dist/components/navigation/tabs-subtle/index.js +17 -19
- package/dist/components/overlays/alert-dialog/index.d.ts +2 -2
- package/dist/components/overlays/alert-dialog/index.js +18 -20
- package/dist/components/overlays/command/index.d.ts +1 -1
- package/dist/components/overlays/command/index.js +32 -35
- package/dist/components/overlays/context-menu/index.d.ts +1 -1
- package/dist/components/overlays/context-menu/index.js +25 -28
- package/dist/components/overlays/dialog/index.d.ts +1 -1
- package/dist/components/overlays/dialog/index.js +33 -35
- package/dist/components/overlays/dropdown/index.d.ts +1 -1
- package/dist/components/overlays/dropdown/index.js +40 -43
- package/dist/components/overlays/popover/index.d.ts +1 -1
- package/dist/components/overlays/popover/index.js +22 -24
- package/dist/components/overlays/preview-card/index.d.ts +1 -1
- package/dist/components/overlays/preview-card/index.js +15 -17
- package/dist/components/overlays/sheet/index.d.ts +1 -1
- package/dist/components/overlays/sheet/index.js +20 -22
- package/dist/components/overlays/toast/index.d.ts +1 -1
- package/dist/components/overlays/toast/index.js +17 -19
- package/dist/components/overlays/tooltip/index.d.ts +1 -1
- package/dist/components/overlays/tooltip/index.js +13 -15
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +22 -24
- package/dist/components/thinking-indicator/index.d.ts +1 -1
- package/dist/components/thinking-indicator/index.js +9 -11
- package/dist/index.d.ts +51 -51
- package/dist/index.js +506 -508
- package/dist/preset.d.ts +1 -1
- package/dist/preset.js +5 -5
- package/dist/primitives/code/index.d.ts +1 -1
- package/dist/primitives/code/index.js +8 -9
- package/dist/primitives/craft/index.d.ts +1 -1
- package/dist/primitives/craft/index.js +6 -8
- package/dist/primitives/fluid-hover/index.d.ts +1 -1
- package/dist/primitives/fluid-hover/index.js +18 -20
- package/dist/primitives/morph/index.d.ts +1 -1
- package/dist/primitives/morph/index.js +15 -17
- package/dist/primitives/motion/index.d.ts +1 -1
- package/dist/primitives/motion/index.js +15 -16
- package/dist/primitives/scroll-area/index.d.ts +1 -1
- package/dist/primitives/scroll-area/index.js +8 -9
- package/dist/primitives/sizes/index.d.ts +1 -1
- package/dist/primitives/sizes/index.js +17 -18
- package/dist/primitives/surface/index.d.ts +1 -1
- package/dist/primitives/surface/index.js +11 -12
- package/dist/shared/components-0ke6xada.js +123 -0
- package/dist/shared/{components-jxgznftn.js → components-0q0sqfh4.js} +16 -16
- package/dist/shared/{components-x3rz4cyn.js → components-0sn7ypjw.js} +14 -14
- package/dist/shared/{components-p2vmyfe1.js → components-1j9791sn.js} +42 -42
- package/dist/shared/{components-6phwsry6.js → components-1rfwbyyc.js} +25 -25
- package/dist/shared/{components-vc1k7yv2.js → components-1v7rxytx.js} +3 -3
- package/dist/shared/{components-tm88ghva.js → components-1xekx2hx.js} +58 -58
- package/dist/shared/{components-6t6nr33r.js → components-39jq9va1.js} +26 -26
- package/dist/shared/{components-j65qt1mq.js → components-3gae8nta.js} +101 -101
- package/dist/shared/{components-r2gke5p6.js → components-3k8xpnpq.js} +125 -125
- package/dist/shared/{components-6y1th6k4.js → components-3mkepka5.js} +31 -31
- package/dist/shared/{components-vktws5r6.js → components-3wk0w46f.js} +72 -72
- package/dist/shared/{components-zx2hr57f.js → components-4cnjmgex.js} +15 -15
- package/dist/shared/{components-e46kf6cp.js → components-59efxjd9.js} +8 -8
- package/dist/shared/{components-rc63qsy6.js → components-5xc2j8jz.js} +10 -10
- package/dist/shared/{components-7gv95yfy.js → components-62ybc7t2.js} +83 -83
- package/dist/shared/{components-brnzrp2t.js → components-66mv71kx.js} +41 -41
- package/dist/shared/{components-taxmgbnh.js → components-7ans7ce5.js} +17 -17
- package/dist/shared/{components-hzfp4tjb.js → components-7btqt08d.js} +42 -42
- package/dist/shared/{components-9p8s8n5q.js → components-7r3etddy.js} +22 -22
- package/dist/shared/{components-5zry9te1.js → components-7x9kawxv.js} +26 -26
- package/dist/shared/{components-4hh0gm0v.js → components-8fpr3s4p.js} +61 -61
- package/dist/shared/{components-x2xyckd5.js → components-9jvzzvt1.js} +20 -20
- package/dist/shared/{components-bf2d9k02.js → components-apdwtweq.js} +94 -94
- package/dist/shared/{components-hjkrv00c.js → components-asr5pg50.js} +18 -18
- package/dist/shared/{components-5pkcfprd.js → components-b2wyq2cq.js} +22 -22
- package/dist/shared/{components-nn6xezy2.js → components-ca2c898n.js} +226 -226
- package/dist/shared/{components-xszag63d.js → components-cbxjn9p8.js} +12 -12
- package/dist/shared/{components-kf2ehztc.js → components-chacnk61.js} +16 -16
- package/dist/shared/{components-7zp99w5d.js → components-cv16mryv.js} +2 -2
- package/dist/shared/{components-4xxtggzp.js → components-ez65vtbq.js} +18 -18
- package/dist/shared/{components-0f0as45n.js → components-ezxhrmer.js} +2 -2
- package/dist/shared/{components-s3yfvfkr.js → components-gc5vtq2f.js} +42 -42
- package/dist/shared/components-gf5s6ap9.js +42 -0
- package/dist/shared/{components-7cqq1sqy.js → components-gvr9w41t.js} +40 -40
- package/dist/shared/{components-ess3ch6w.js → components-h2dpcwgc.js} +23 -23
- package/dist/shared/{components-ed7cmssr.js → components-hawvy2qz.js} +18 -18
- package/dist/shared/{components-7nww01w4.js → components-hqeq3w9q.js} +34 -34
- package/dist/shared/{components-vb033rns.js → components-jjw69c4c.js} +6 -6
- package/dist/shared/{components-tad5h7ta.js → components-jwst3vtj.js} +48 -48
- package/dist/shared/{components-r22vtgqc.js → components-kvr7f9hy.js} +11 -11
- package/dist/shared/{components-gndm6am4.js → components-ng72k97e.js} +17 -17
- package/dist/shared/{components-40j34hdb.js → components-nh8tma1n.js} +116 -116
- package/dist/shared/{components-s5pkbjx1.js → components-njzgqdwy.js} +56 -56
- package/dist/shared/{components-54nf2x99.js → components-ny774h8p.js} +42 -42
- package/dist/shared/{components-r4jt6hgd.js → components-q4daerx0.js} +6 -6
- package/dist/shared/{components-peg09pzs.js → components-q5xj5c16.js} +11 -11
- package/dist/shared/{components-r43mqnd6.js → components-rr7a6ja9.js} +46 -46
- package/dist/shared/{components-bkvb6nem.js → components-s2bz1xpk.js} +11 -11
- package/dist/shared/{components-zvb11ker.js → components-tqvarbfv.js} +47 -47
- package/dist/shared/{components-aaq3yk4f.js → components-v6xp325t.js} +43 -43
- package/dist/shared/{components-v7es8aan.js → components-v7wtz8hk.js} +15 -15
- package/dist/shared/components-vc7vq5nz.js +32 -0
- package/dist/shared/{components-6hzwfmfd.js → components-vfbhxf5r.js} +8 -8
- package/dist/shared/{components-8hk9ve3r.js → components-wvp1m52g.js} +57 -57
- package/dist/shared/{components-gjfrycb5.js → components-yh3kwdhr.js} +63 -66
- package/dist/shared/{components-y3cqdrgy.js → components-ytb2tefr.js} +43 -43
- package/dist/shared/{components-61ckf42z.js → components-zfnmn5d4.js} +64 -64
- package/dist/shared/{components-m5br529r.js → components-zrkzcayz.js} +2 -2
- package/dist/shared/{components-csxz9f52.js → components-zx6b6yby.js} +4 -4
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/shared/components-74c20v2f.js +0 -32
- package/dist/shared/components-8hzbsfbd.js +0 -123
- package/dist/shared/components-dphg9gjr.js +0 -42
- package/dist/shared/components-kpbcms10.js +0 -9
- /package/dist/shared/{components-5vxtcp88.js → components-3ky44908.js} +0 -0
- /package/dist/shared/{components-4xxddc44.js → components-c6s6b43g.js} +0 -0
- /package/dist/shared/{components-nnnd2xef.js → components-men63rwj.js} +0 -0
- /package/dist/shared/{components-de8xsm9y.js → components-mhd39z7x.js} +0 -0
- /package/dist/shared/{components-dg0w8g5p.js → components-n7mjr357.js} +0 -0
- /package/dist/shared/{components-jw16snbn.js → components-vynjtrk6.js} +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SURFACE_BG,
|
|
3
|
-
SURFACE_SHADOW,
|
|
4
|
-
SurfaceProvider,
|
|
5
|
-
useSurface
|
|
6
|
-
} from "./components-csxz9f52.js";
|
|
7
1
|
import {
|
|
8
2
|
MorphSurface
|
|
9
|
-
} from "./components-
|
|
3
|
+
} from "./components-0q0sqfh4.js";
|
|
10
4
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
opensInPlace,
|
|
6
|
+
inPlaceOffset,
|
|
7
|
+
useMorphOrigin,
|
|
8
|
+
useMorph
|
|
9
|
+
} from "./components-hqeq3w9q.js";
|
|
13
10
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./components-
|
|
11
|
+
cn2
|
|
12
|
+
} from "./components-ezxhrmer.js";
|
|
16
13
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
useMorph,
|
|
20
|
-
useMorphOrigin
|
|
21
|
-
} from "./components-7nww01w4.js";
|
|
14
|
+
useShape
|
|
15
|
+
} from "./components-cv16mryv.js";
|
|
22
16
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
SURFACE_BG,
|
|
18
|
+
SURFACE_SHADOW,
|
|
19
|
+
useSurface2,
|
|
20
|
+
SurfaceProvider2
|
|
21
|
+
} from "./components-zx6b6yby.js";
|
|
22
|
+
import {
|
|
23
|
+
useControllableState
|
|
24
|
+
} from "./components-n7mjr357.js";
|
|
25
25
|
|
|
26
26
|
// components/overlays/preview-card/index.tsx
|
|
27
27
|
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
} from "react";
|
|
35
35
|
import { jsx } from "react/jsx-runtime";
|
|
36
36
|
var PreviewCardContext = createContext({ open: false, origin: { current: {} } });
|
|
37
|
-
var
|
|
37
|
+
var PreviewCardTrigger2 = forwardRef(({ render, className, ...props }, ref) => /* @__PURE__ */ jsx(PreviewCardPrimitive.Trigger, {
|
|
38
38
|
ref,
|
|
39
39
|
render,
|
|
40
|
-
className:
|
|
40
|
+
className: cn2(!render && "weight-medium text-foreground underline decoration-border underline-offset-4 transition-colors duration-fast hover:decoration-foreground", className),
|
|
41
41
|
...props
|
|
42
42
|
}));
|
|
43
|
-
|
|
44
|
-
var
|
|
43
|
+
PreviewCardTrigger2.displayName = "PreviewCardTrigger";
|
|
44
|
+
var PreviewCardContent2 = forwardRef(({
|
|
45
45
|
side = "bottom",
|
|
46
46
|
align,
|
|
47
47
|
sideOffset = 12,
|
|
@@ -59,7 +59,7 @@ var PreviewCardContent = forwardRef(({
|
|
|
59
59
|
const inPlace = opensInPlace({ effect, hideSource });
|
|
60
60
|
useImperativeHandle(ref, () => morph.popup, [morph.popup]);
|
|
61
61
|
const shape = useShape();
|
|
62
|
-
const level = Math.min(
|
|
62
|
+
const level = Math.min(useSurface2() + 2, 8);
|
|
63
63
|
return /* @__PURE__ */ jsx(PreviewCardPrimitive.Portal, {
|
|
64
64
|
container: container ?? undefined,
|
|
65
65
|
children: /* @__PURE__ */ jsx(PreviewCardPrimitive.Positioner, {
|
|
@@ -71,14 +71,14 @@ var PreviewCardContent = forwardRef(({
|
|
|
71
71
|
ref: morph.popupRef,
|
|
72
72
|
className: "relative outline-none",
|
|
73
73
|
...props,
|
|
74
|
-
children: /* @__PURE__ */ jsx(
|
|
74
|
+
children: /* @__PURE__ */ jsx(SurfaceProvider2, {
|
|
75
75
|
value: level,
|
|
76
76
|
children: /* @__PURE__ */ jsx(MorphSurface, {
|
|
77
77
|
morph,
|
|
78
78
|
bg: SURFACE_BG[level],
|
|
79
79
|
shadow: SURFACE_SHADOW[3],
|
|
80
80
|
radius: shape.container,
|
|
81
|
-
className:
|
|
81
|
+
className: cn2("flex w-max max-w-[min(92vw,20rem)] flex-col gap-3 p-4", className),
|
|
82
82
|
children
|
|
83
83
|
})
|
|
84
84
|
})
|
|
@@ -86,8 +86,8 @@ var PreviewCardContent = forwardRef(({
|
|
|
86
86
|
})
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
-
|
|
90
|
-
function
|
|
89
|
+
PreviewCardContent2.displayName = "PreviewCardContent";
|
|
90
|
+
function PreviewCard2({ open, defaultOpen = false, onOpenChange, children }) {
|
|
91
91
|
const [current, setCurrent] = useControllableState(open, defaultOpen, onOpenChange);
|
|
92
92
|
const { origin, capture } = useMorphOrigin();
|
|
93
93
|
const ctx = useMemo(() => ({ open: current, origin }), [current, origin]);
|
|
@@ -104,8 +104,8 @@ function PreviewCard({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
104
104
|
})
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var preview_card_default =
|
|
107
|
+
PreviewCard2.Trigger = PreviewCardTrigger2;
|
|
108
|
+
PreviewCard2.Content = PreviewCardContent2;
|
|
109
|
+
var preview_card_default = PreviewCard2;
|
|
110
110
|
|
|
111
|
-
export {
|
|
111
|
+
export { PreviewCardTrigger2, PreviewCardContent2, PreviewCard2, preview_card_default };
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./components-
|
|
2
|
+
useReduceMotion
|
|
3
|
+
} from "./components-men63rwj.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./components-
|
|
5
|
+
GOO_BLUR_RATIO
|
|
6
|
+
} from "./components-hqeq3w9q.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./components-
|
|
8
|
+
cn2
|
|
9
|
+
} from "./components-ezxhrmer.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./components-
|
|
11
|
+
FluidHoverHighlight2
|
|
12
|
+
} from "./components-kvr7f9hy.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./components-e46kf6cp.js";
|
|
14
|
+
useIcon
|
|
15
|
+
} from "./components-zrkzcayz.js";
|
|
17
16
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./components-
|
|
17
|
+
GooFilter
|
|
18
|
+
} from "./components-0q0sqfh4.js";
|
|
20
19
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./components-
|
|
20
|
+
useShape
|
|
21
|
+
} from "./components-cv16mryv.js";
|
|
23
22
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./components-
|
|
23
|
+
useSize2
|
|
24
|
+
} from "./components-0sn7ypjw.js";
|
|
26
25
|
import {
|
|
27
|
-
|
|
28
|
-
} from "./components-
|
|
26
|
+
useControllableState
|
|
27
|
+
} from "./components-n7mjr357.js";
|
|
29
28
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
useFluidHover2,
|
|
30
|
+
useRegisterFluidHoverItem2
|
|
31
|
+
} from "./components-59efxjd9.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./components-
|
|
33
|
+
SizeProvider2
|
|
34
|
+
} from "./components-jjw69c4c.js";
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./components-
|
|
36
|
+
spring2
|
|
37
|
+
} from "./components-1v7rxytx.js";
|
|
38
38
|
|
|
39
39
|
// components/navigation/accordion/index.tsx
|
|
40
40
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
@@ -65,13 +65,13 @@ function useAccordionItemContext() {
|
|
|
65
65
|
throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");
|
|
66
66
|
return ctx;
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var AccordionGroup2 = forwardRef((props, ref) => {
|
|
69
69
|
const { children, highlight = "item", type = "single", size, className, ...rest } = props;
|
|
70
70
|
const containerRef = useRef(null);
|
|
71
71
|
const fullItemElementsRef = useRef(new Map);
|
|
72
72
|
const [openItemRects, setOpenItemRects] = useState(new Map);
|
|
73
73
|
const openItemRectsRef = useRef(openItemRects);
|
|
74
|
-
const hover =
|
|
74
|
+
const hover = useFluidHover2(containerRef);
|
|
75
75
|
const { activeIndex, setActiveIndex, itemRects, handlers, registerItem, measureItems } = hover;
|
|
76
76
|
const registerFullItem = useCallback((index, element) => {
|
|
77
77
|
if (element) {
|
|
@@ -229,7 +229,7 @@ var AccordionGroup = forwardRef((props, ref) => {
|
|
|
229
229
|
setFocusedIndex(null);
|
|
230
230
|
setActiveIndex(null);
|
|
231
231
|
},
|
|
232
|
-
className:
|
|
232
|
+
className: cn2("relative flex flex-col w-72 max-w-full", className),
|
|
233
233
|
...htmlProps,
|
|
234
234
|
children: [
|
|
235
235
|
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
@@ -249,19 +249,19 @@ var AccordionGroup = forwardRef((props, ref) => {
|
|
|
249
249
|
height: rect.height,
|
|
250
250
|
opacity: isHoveringNonOpen ? 0.7 : 1
|
|
251
251
|
},
|
|
252
|
-
exit: { opacity: 0, transition:
|
|
252
|
+
exit: { opacity: 0, transition: spring2.moderate.exit },
|
|
253
253
|
transition: {
|
|
254
254
|
top: { duration: 0 },
|
|
255
255
|
left: { duration: 0 },
|
|
256
256
|
width: { duration: 0 },
|
|
257
257
|
height: { duration: 0 },
|
|
258
|
-
opacity: { duration:
|
|
258
|
+
opacity: { duration: spring2.moderate.exit.duration }
|
|
259
259
|
}
|
|
260
260
|
}, `expanded-${idx}`))
|
|
261
261
|
}),
|
|
262
|
-
/* @__PURE__ */ jsx(
|
|
262
|
+
/* @__PURE__ */ jsx(FluidHoverHighlight2, {
|
|
263
263
|
hover,
|
|
264
|
-
className:
|
|
264
|
+
className: cn2(shape.bg, "z-1"),
|
|
265
265
|
transition: reflowing ? false : undefined
|
|
266
266
|
}),
|
|
267
267
|
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
@@ -274,10 +274,10 @@ var AccordionGroup = forwardRef((props, ref) => {
|
|
|
274
274
|
width: focusRect.width + 4,
|
|
275
275
|
height: focusRect.height + 4
|
|
276
276
|
},
|
|
277
|
-
exit: { opacity: 0, transition:
|
|
277
|
+
exit: { opacity: 0, transition: spring2.fast.exit },
|
|
278
278
|
transition: {
|
|
279
|
-
...reflowing ? { duration: 0 } :
|
|
280
|
-
opacity: { duration:
|
|
279
|
+
...reflowing ? { duration: 0 } : spring2.fast,
|
|
280
|
+
opacity: { duration: spring2.fast.duration }
|
|
281
281
|
}
|
|
282
282
|
})
|
|
283
283
|
}),
|
|
@@ -287,13 +287,13 @@ var AccordionGroup = forwardRef((props, ref) => {
|
|
|
287
287
|
}
|
|
288
288
|
})
|
|
289
289
|
});
|
|
290
|
-
return size ? /* @__PURE__ */ jsx(
|
|
290
|
+
return size ? /* @__PURE__ */ jsx(SizeProvider2, {
|
|
291
291
|
size,
|
|
292
292
|
children: group
|
|
293
293
|
}) : group;
|
|
294
294
|
});
|
|
295
|
-
|
|
296
|
-
var
|
|
295
|
+
AccordionGroup2.displayName = "AccordionGroup";
|
|
296
|
+
var Accordion2 = forwardRef(({
|
|
297
297
|
children,
|
|
298
298
|
type = "single",
|
|
299
299
|
collapsible = true,
|
|
@@ -324,7 +324,7 @@ var Accordion = forwardRef(({
|
|
|
324
324
|
return /* @__PURE__ */ jsx("div", {
|
|
325
325
|
...restRoot,
|
|
326
326
|
ref,
|
|
327
|
-
className:
|
|
327
|
+
className: cn2("w-72 max-w-full flex flex-col", className),
|
|
328
328
|
...props,
|
|
329
329
|
children: /* @__PURE__ */ jsx(StandaloneOpenContext.Provider, {
|
|
330
330
|
value: openValues,
|
|
@@ -336,15 +336,15 @@ var Accordion = forwardRef(({
|
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
338
|
});
|
|
339
|
-
return size ? /* @__PURE__ */ jsx(
|
|
339
|
+
return size ? /* @__PURE__ */ jsx(SizeProvider2, {
|
|
340
340
|
size,
|
|
341
341
|
children: root
|
|
342
342
|
}) : root;
|
|
343
343
|
});
|
|
344
|
-
|
|
344
|
+
Accordion2.displayName = "Accordion";
|
|
345
345
|
var StandaloneOpenContext = createContext(new Set);
|
|
346
346
|
var StandaloneHighlightContext = createContext(undefined);
|
|
347
|
-
var
|
|
347
|
+
var AccordionItem2 = forwardRef(({ value, index, disabled, highlight: highlightProp, children, className, ...props }, ref) => {
|
|
348
348
|
const internalRef = useRef(null);
|
|
349
349
|
const groupCtx = useAccordionGroup();
|
|
350
350
|
const standaloneOpen = useContext(StandaloneOpenContext);
|
|
@@ -353,7 +353,7 @@ var AccordionItem = forwardRef(({ value, index, disabled, highlight: highlightPr
|
|
|
353
353
|
const isOpen = groupCtx?.grouped ? groupCtx.openValues.has(value) : standaloneOpen.has(value);
|
|
354
354
|
const triggerRef = useRef(null);
|
|
355
355
|
const press = useRef(null);
|
|
356
|
-
|
|
356
|
+
useRegisterFluidHoverItem2(groupCtx?.grouped ? groupCtx.registerItem : undefined, index, triggerRef);
|
|
357
357
|
useEffect(() => {
|
|
358
358
|
if (groupCtx?.grouped && index !== undefined) {
|
|
359
359
|
if (isOpen) {
|
|
@@ -381,7 +381,7 @@ var AccordionItem = forwardRef(({ value, index, disabled, highlight: highlightPr
|
|
|
381
381
|
return /* @__PURE__ */ jsx("div", {
|
|
382
382
|
...restItem,
|
|
383
383
|
"data-fluid-hover-index": index,
|
|
384
|
-
className:
|
|
384
|
+
className: cn2("relative", className),
|
|
385
385
|
...props,
|
|
386
386
|
children
|
|
387
387
|
});
|
|
@@ -389,13 +389,13 @@ var AccordionItem = forwardRef(({ value, index, disabled, highlight: highlightPr
|
|
|
389
389
|
})
|
|
390
390
|
});
|
|
391
391
|
});
|
|
392
|
-
|
|
393
|
-
var
|
|
392
|
+
AccordionItem2.displayName = "AccordionItem";
|
|
393
|
+
var AccordionTrigger2 = forwardRef(({ children, className, ...props }, ref) => {
|
|
394
394
|
const ChevronRight = useIcon("chevron-right");
|
|
395
395
|
const groupCtx = useAccordionGroup();
|
|
396
396
|
const { index, isOpen, triggerRef, highlight, press } = useAccordionItemContext();
|
|
397
397
|
const shape = useShape();
|
|
398
|
-
const sizeClasses =
|
|
398
|
+
const sizeClasses = useSize2();
|
|
399
399
|
const [isHovered, setIsHovered] = useState(false);
|
|
400
400
|
const isActive = groupCtx?.grouped ? groupCtx.activeIndex === index : isHovered;
|
|
401
401
|
const capture = (event) => {
|
|
@@ -407,11 +407,11 @@ var AccordionTrigger = forwardRef(({ children, className, ...props }, ref) => {
|
|
|
407
407
|
render: /* @__PURE__ */ jsx("div", {}),
|
|
408
408
|
children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
|
|
409
409
|
ref,
|
|
410
|
-
className:
|
|
410
|
+
className: cn2(`relative z-10 flex items-center ${sizeClasses.gap} ${shape.item} ${sizeClasses.px} ${sizeClasses.variant === "compact" ? "py-1" : "py-2"} w-full cursor-pointer outline-none select-none`, !groupCtx?.grouped && "focus-visible:ring-1 focus-visible:ring-focus-ring focus-visible:ring-offset-0", className),
|
|
411
411
|
...props,
|
|
412
412
|
children: [
|
|
413
413
|
/* @__PURE__ */ jsxs("span", {
|
|
414
|
-
className:
|
|
414
|
+
className: cn2("inline-grid flex-1 text-left", sizeClasses.text),
|
|
415
415
|
children: [
|
|
416
416
|
/* @__PURE__ */ jsx("span", {
|
|
417
417
|
className: "col-start-1 row-start-1 invisible weight-semibold",
|
|
@@ -419,7 +419,7 @@ var AccordionTrigger = forwardRef(({ children, className, ...props }, ref) => {
|
|
|
419
419
|
children
|
|
420
420
|
}),
|
|
421
421
|
/* @__PURE__ */ jsx("span", {
|
|
422
|
-
className:
|
|
422
|
+
className: cn2("col-start-1 row-start-1 transition-[color,font-variation-settings] duration-fast", isOpen || isActive ? "text-foreground" : "text-muted-foreground", isOpen ? "weight-semibold" : "weight-normal"),
|
|
423
423
|
children
|
|
424
424
|
})
|
|
425
425
|
]
|
|
@@ -427,11 +427,11 @@ var AccordionTrigger = forwardRef(({ children, className, ...props }, ref) => {
|
|
|
427
427
|
/* @__PURE__ */ jsx(motion.span, {
|
|
428
428
|
className: "shrink-0 inline-flex items-center justify-center",
|
|
429
429
|
animate: { rotate: isOpen ? 90 : 0 },
|
|
430
|
-
transition:
|
|
430
|
+
transition: spring2.fast,
|
|
431
431
|
children: /* @__PURE__ */ jsx(ChevronRight, {
|
|
432
432
|
size: sizeClasses.icon,
|
|
433
433
|
strokeWidth: isOpen || isActive ? 2 : 1.5,
|
|
434
|
-
className:
|
|
434
|
+
className: cn2("transition-[color,stroke-width] duration-fast", isOpen || isActive ? "text-foreground" : "text-muted-foreground")
|
|
435
435
|
})
|
|
436
436
|
})
|
|
437
437
|
]
|
|
@@ -455,8 +455,8 @@ var AccordionTrigger = forwardRef(({ children, className, ...props }, ref) => {
|
|
|
455
455
|
className: `absolute inset-0 ${shape.bg} bg-accent/20 dark:bg-accent/12 pointer-events-none`,
|
|
456
456
|
initial: { opacity: 0 },
|
|
457
457
|
animate: { opacity: 1 },
|
|
458
|
-
exit: { opacity: 0, transition:
|
|
459
|
-
transition: { duration:
|
|
458
|
+
exit: { opacity: 0, transition: spring2.moderate.exit },
|
|
459
|
+
transition: { duration: spring2.moderate.exit.duration }
|
|
460
460
|
})
|
|
461
461
|
}),
|
|
462
462
|
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
@@ -464,15 +464,15 @@ var AccordionTrigger = forwardRef(({ children, className, ...props }, ref) => {
|
|
|
464
464
|
className: `absolute inset-0 z-1 ${shape.bg} bg-hover pointer-events-none`,
|
|
465
465
|
initial: { opacity: 0 },
|
|
466
466
|
animate: { opacity: 1 },
|
|
467
|
-
exit: { opacity: 0, transition:
|
|
468
|
-
transition: { duration:
|
|
467
|
+
exit: { opacity: 0, transition: spring2.fast.exit },
|
|
468
|
+
transition: { duration: spring2.fast.duration }
|
|
469
469
|
})
|
|
470
470
|
}),
|
|
471
471
|
triggerContent
|
|
472
472
|
]
|
|
473
473
|
});
|
|
474
474
|
});
|
|
475
|
-
|
|
475
|
+
AccordionTrigger2.displayName = "AccordionTrigger";
|
|
476
476
|
function grow(a, b, t) {
|
|
477
477
|
const p = Math.min(1, t);
|
|
478
478
|
const at = (from, to) => from + (to - from) * p;
|
|
@@ -489,11 +489,11 @@ function place(el, { x, y, w, h, r }) {
|
|
|
489
489
|
el.style.height = `${h}px`;
|
|
490
490
|
el.style.borderRadius = `${r}px`;
|
|
491
491
|
}
|
|
492
|
-
var
|
|
492
|
+
var AccordionContent2 = forwardRef(({ children, className, effect = "goo", tier = "slow", ...props }, ref) => {
|
|
493
493
|
const groupCtx = useAccordionGroup();
|
|
494
494
|
const { isOpen, highlight, press } = useAccordionItemContext();
|
|
495
495
|
const shape = useShape();
|
|
496
|
-
const sizeClasses =
|
|
496
|
+
const sizeClasses = useSize2();
|
|
497
497
|
const reduceMotion = useReduceMotion();
|
|
498
498
|
const gooId = `accordion-goo-${useId().replace(/:/g, "")}`;
|
|
499
499
|
const progress = useMotionValue(isOpen ? 1 : 0);
|
|
@@ -569,7 +569,7 @@ var AccordionContent = forwardRef(({ children, className, effect = "goo", tier =
|
|
|
569
569
|
if (row.current)
|
|
570
570
|
row.current.style.height = `${g.row}px`;
|
|
571
571
|
render(progress.get());
|
|
572
|
-
const { exit, ...enter } =
|
|
572
|
+
const { exit, ...enter } = spring2[tier];
|
|
573
573
|
const controls = animate(progress, isOpen ? 1 : 0, {
|
|
574
574
|
...isOpen ? enter : exit,
|
|
575
575
|
onUpdate: render,
|
|
@@ -610,7 +610,7 @@ var AccordionContent = forwardRef(({ children, className, effect = "goo", tier =
|
|
|
610
610
|
className: "pointer-events-none absolute inset-0",
|
|
611
611
|
initial: false,
|
|
612
612
|
animate: { opacity: groupCtx?.dimOpen ? 0.7 : 1 },
|
|
613
|
-
transition: { duration:
|
|
613
|
+
transition: { duration: spring2.moderate.exit.duration },
|
|
614
614
|
children: /* @__PURE__ */ jsx(motion.div, {
|
|
615
615
|
className: "absolute inset-0",
|
|
616
616
|
style: { opacity: tint },
|
|
@@ -619,7 +619,7 @@ var AccordionContent = forwardRef(({ children, className, effect = "goo", tier =
|
|
|
619
619
|
children: [
|
|
620
620
|
/* @__PURE__ */ jsx("div", {
|
|
621
621
|
ref: refs.rest,
|
|
622
|
-
className:
|
|
622
|
+
className: cn2("absolute inset-0 bg-accent", shape.bg)
|
|
623
623
|
}),
|
|
624
624
|
effect === "goo" && /* @__PURE__ */ jsx(GooFilter, {
|
|
625
625
|
id: gooId,
|
|
@@ -632,7 +632,7 @@ var AccordionContent = forwardRef(({ children, className, effect = "goo", tier =
|
|
|
632
632
|
children: [
|
|
633
633
|
/* @__PURE__ */ jsx("div", {
|
|
634
634
|
ref: refs.row,
|
|
635
|
-
className:
|
|
635
|
+
className: cn2("absolute inset-x-0 top-0 bg-accent", shape.bg)
|
|
636
636
|
}),
|
|
637
637
|
/* @__PURE__ */ jsx("div", {
|
|
638
638
|
ref: refs.shape,
|
|
@@ -646,7 +646,7 @@ var AccordionContent = forwardRef(({ children, className, effect = "goo", tier =
|
|
|
646
646
|
}),
|
|
647
647
|
/* @__PURE__ */ jsx("div", {
|
|
648
648
|
ref: refs.content,
|
|
649
|
-
className:
|
|
649
|
+
className: cn2("relative pt-1 text-muted-foreground", sizeClasses.px, sizeClasses.text, sizeClasses.variant === "compact" ? "pb-2.5" : "pb-3"),
|
|
650
650
|
children
|
|
651
651
|
})
|
|
652
652
|
]
|
|
@@ -655,13 +655,13 @@ var AccordionContent = forwardRef(({ children, className, effect = "goo", tier =
|
|
|
655
655
|
}
|
|
656
656
|
});
|
|
657
657
|
});
|
|
658
|
-
|
|
659
|
-
Object.assign(
|
|
660
|
-
Group:
|
|
661
|
-
Item:
|
|
662
|
-
Trigger:
|
|
663
|
-
Content:
|
|
658
|
+
AccordionContent2.displayName = "AccordionContent";
|
|
659
|
+
Object.assign(Accordion2, {
|
|
660
|
+
Group: AccordionGroup2,
|
|
661
|
+
Item: AccordionItem2,
|
|
662
|
+
Trigger: AccordionTrigger2,
|
|
663
|
+
Content: AccordionContent2
|
|
664
664
|
});
|
|
665
|
-
var accordion_default =
|
|
665
|
+
var accordion_default = Accordion2;
|
|
666
666
|
|
|
667
|
-
export {
|
|
667
|
+
export { AccordionGroup2, Accordion2, AccordionItem2, AccordionTrigger2, AccordionContent2, accordion_default };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
-
PickerInput,
|
|
3
|
-
PickerShell
|
|
4
|
-
} from "./components-hzfp4tjb.js";
|
|
5
|
-
import {
|
|
6
|
-
ScrollColumn,
|
|
7
2
|
defaultLocale,
|
|
8
|
-
|
|
3
|
+
parseMonthText,
|
|
9
4
|
fieldLabel,
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
dividedColumns,
|
|
6
|
+
ScrollColumn
|
|
7
|
+
} from "./components-9jvzzvt1.js";
|
|
8
|
+
import {
|
|
9
|
+
cn2
|
|
10
|
+
} from "./components-ezxhrmer.js";
|
|
12
11
|
import {
|
|
13
12
|
useControllableState
|
|
14
|
-
} from "./components-
|
|
13
|
+
} from "./components-n7mjr357.js";
|
|
15
14
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
PickerShell,
|
|
16
|
+
PickerInput
|
|
17
|
+
} from "./components-7btqt08d.js";
|
|
18
18
|
|
|
19
19
|
// components/inputs/date-time/month-picker/index.tsx
|
|
20
20
|
import { addYears, endOfYear, format, startOfMonth, startOfYear } from "date-fns";
|
|
21
21
|
import { useMemo, useRef } from "react";
|
|
22
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
-
function
|
|
23
|
+
function MonthPicker2({
|
|
24
24
|
value: valueProp,
|
|
25
25
|
defaultValue = null,
|
|
26
26
|
onValueChange,
|
|
@@ -97,7 +97,7 @@ function MonthPicker({
|
|
|
97
97
|
tier,
|
|
98
98
|
className,
|
|
99
99
|
children: /* @__PURE__ */ jsxs("div", {
|
|
100
|
-
className:
|
|
100
|
+
className: cn2(dividedColumns, "h-56"),
|
|
101
101
|
children: [
|
|
102
102
|
/* @__PURE__ */ jsx(ScrollColumn, {
|
|
103
103
|
label: fieldLabel(locale, "month"),
|
|
@@ -119,6 +119,6 @@ function MonthPicker({
|
|
|
119
119
|
})
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
var month_picker_default =
|
|
122
|
+
var month_picker_default = MonthPicker2;
|
|
123
123
|
|
|
124
|
-
export {
|
|
124
|
+
export { MonthPicker2, month_picker_default };
|
|
@@ -34,9 +34,9 @@ function pickNearest({
|
|
|
34
34
|
if (point.x >= left && point.x <= left + width && point.y >= top && point.y <= top + height) {
|
|
35
35
|
containingIndex = index;
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
closestDistance =
|
|
37
|
+
const distance = Math.hypot(point.x - (left + width / 2), point.y - (top + height / 2));
|
|
38
|
+
if (distance < closestDistance) {
|
|
39
|
+
closestDistance = distance;
|
|
40
40
|
closestIndex = index;
|
|
41
41
|
}
|
|
42
42
|
continue;
|
|
@@ -67,7 +67,7 @@ function resolveActivator(element) {
|
|
|
67
67
|
return element.querySelector(ACTIVATOR_SELECTOR) ?? element;
|
|
68
68
|
}
|
|
69
69
|
var measurementAttempts = 3;
|
|
70
|
-
function
|
|
70
|
+
function useFluidHover2(containerRef, options = {}) {
|
|
71
71
|
const { axis = "y", isItemDisabled, gapClick = true } = options;
|
|
72
72
|
const gapClickMaxDistance = typeof gapClick === "object" ? gapClick.maxDistance ?? Infinity : Infinity;
|
|
73
73
|
const itemsRef = useRef(new Map);
|
|
@@ -223,8 +223,8 @@ function useFluidHover(containerRef, options = {}) {
|
|
|
223
223
|
const target = e.target;
|
|
224
224
|
if (!target)
|
|
225
225
|
return;
|
|
226
|
-
for (const
|
|
227
|
-
if (
|
|
226
|
+
for (const element of itemsRef.current.values()) {
|
|
227
|
+
if (element.contains(target))
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
if (!target.isConnected)
|
|
@@ -286,7 +286,7 @@ function useFluidHover(containerRef, options = {}) {
|
|
|
286
286
|
measureItems
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function useRegisterFluidHoverItem2(registerItem, index, ref) {
|
|
290
290
|
useEffect(() => {
|
|
291
291
|
if (!registerItem || index === undefined)
|
|
292
292
|
return;
|
|
@@ -295,4 +295,4 @@ function useRegisterFluidHoverItem(registerItem, index, ref) {
|
|
|
295
295
|
}, [index, registerItem, ref]);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
export {
|
|
298
|
+
export { useFluidHover2, useRegisterFluidHoverItem2 };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./components-kf2ehztc.js";
|
|
2
|
+
useReduceMotion
|
|
3
|
+
} from "./components-men63rwj.js";
|
|
5
4
|
import {
|
|
6
5
|
GOO_BLUR_RATIO
|
|
7
|
-
} from "./components-
|
|
6
|
+
} from "./components-hqeq3w9q.js";
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
union,
|
|
9
|
+
GooLayer
|
|
10
|
+
} from "./components-chacnk61.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./components-
|
|
12
|
+
spring2
|
|
13
|
+
} from "./components-1v7rxytx.js";
|
|
14
14
|
|
|
15
15
|
// lib/use-merge-split.tsx
|
|
16
16
|
import { AnimatePresence, motion } from "motion/react";
|
|
17
17
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
19
|
-
var mergeSpring =
|
|
19
|
+
var mergeSpring = spring2.moderate;
|
|
20
20
|
var settleMs = mergeSpring.duration * 1000 + 80;
|
|
21
21
|
var SEED = 0.5;
|
|
22
22
|
function useSelectionRuns(checkedIndices) {
|
|
@@ -150,7 +150,7 @@ function SelectionBackgrounds({ blocks }) {
|
|
|
150
150
|
initial: mode === "snap" ? false : "enter",
|
|
151
151
|
animate: "rest",
|
|
152
152
|
exit: "leave",
|
|
153
|
-
transition: mode === "snap" ? { duration: 0 } : { ...mergeSpring, opacity: { duration:
|
|
153
|
+
transition: mode === "snap" ? { duration: 0 } : { ...mergeSpring, opacity: { duration: spring2.fast.duration } }
|
|
154
154
|
}, b.key))
|
|
155
155
|
})
|
|
156
156
|
});
|