@justanarthur/modo-ui 0.1.0 → 0.3.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/README.md +18 -15
- package/dist/blocks/sidebar-app/index.d.ts +1 -1
- package/dist/blocks/sidebar-app/index.js +28 -31
- package/dist/components/{inputs → AI}/input-message/index.d.ts +1 -1
- package/dist/components/AI/input-message/index.js +25 -0
- package/dist/components/{thinking-indicator → AI/thinking-indicator}/index.d.ts +1 -1
- package/dist/components/AI/thinking-indicator/index.js +13 -0
- package/dist/components/{navigation/accordion → accordion}/index.d.ts +1 -1
- package/dist/components/accordion/index.js +28 -0
- 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/input-copy → copy}/index.d.ts +7 -7
- package/dist/components/copy/index.js +16 -0
- package/dist/components/inputs/checkbox/index.d.ts +62 -0
- package/dist/components/inputs/checkbox/index.js +22 -0
- 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 +2 -2
- 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/{radio-group → radio}/index.d.ts +30 -30
- package/dist/components/inputs/radio/index.js +21 -0
- 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 +27 -6
- package/dist/components/inputs/switch/index.js +17 -12
- 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 +3 -3
- 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/index.d.ts +828 -795
- package/dist/index.js +509 -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 +3 -3
- 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 +3 -3
- 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-jxgznftn.js → components-0q0sqfh4.js} +16 -16
- package/dist/shared/{components-x3rz4cyn.js → components-0sn7ypjw.js} +14 -14
- package/dist/shared/components-1434p1mh.js +123 -0
- package/dist/shared/{components-vc1k7yv2.js → components-1v7rxytx.js} +3 -3
- package/dist/shared/{components-6phwsry6.js → components-1z6tdadk.js} +25 -25
- package/dist/shared/{components-5zry9te1.js → components-27nnvrwe.js} +27 -27
- package/dist/shared/{components-ess3ch6w.js → components-2dxkv6zm.js} +23 -23
- package/dist/shared/{components-s5pkbjx1.js → components-2n3whx7z.js} +56 -56
- package/dist/shared/{components-v7es8aan.js → components-2nhgyh31.js} +15 -15
- package/dist/shared/{components-6t6nr33r.js → components-39jq9va1.js} +26 -26
- package/dist/shared/{components-4hh0gm0v.js → components-39vmfq9s.js} +61 -61
- package/dist/shared/{components-zx2hr57f.js → components-3fbbvq5j.js} +15 -15
- package/dist/shared/{components-6y1th6k4.js → components-3mkepka5.js} +31 -31
- 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-hzfp4tjb.js → components-7btqt08d.js} +42 -42
- package/dist/shared/{components-9p8s8n5q.js → components-7r3etddy.js} +22 -22
- package/dist/shared/{components-j65qt1mq.js → components-8ey44d79.js} +101 -101
- package/dist/shared/{components-hjkrv00c.js → components-8snj490h.js} +120 -23
- package/dist/shared/{components-40j34hdb.js → components-a86dytt0.js} +116 -116
- package/dist/shared/{components-tm88ghva.js → components-ar66gnt0.js} +58 -58
- package/dist/shared/{components-5pkcfprd.js → components-b2wyq2cq.js} +22 -22
- package/dist/shared/{components-vktws5r6.js → components-b3c5et5b.js} +73 -73
- package/dist/shared/{components-4xxtggzp.js → components-bshdmf75.js} +18 -18
- 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-gjfrycb5.js → components-d6xtjht3.js} +66 -69
- package/dist/shared/{components-aaq3yk4f.js → components-dk0gjr5a.js} +43 -43
- package/dist/shared/{components-0f0as45n.js → components-ezxhrmer.js} +2 -2
- package/dist/shared/{components-7gv95yfy.js → components-frw34b65.js} +83 -83
- 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-x2xyckd5.js → components-gz8zf3ec.js} +20 -20
- 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-zvb11ker.js → components-hw9yk32z.js} +47 -47
- package/dist/shared/{components-y3cqdrgy.js → components-hyq23phv.js} +73 -54
- package/dist/shared/{components-bf2d9k02.js → components-jbbmdr74.js} +94 -94
- package/dist/shared/{components-vb033rns.js → components-jjw69c4c.js} +6 -6
- package/dist/shared/{components-r2gke5p6.js → components-jthe1pwb.js} +125 -125
- package/dist/shared/{components-tad5h7ta.js → components-jwst3vtj.js} +48 -48
- package/dist/shared/{components-xszag63d.js → components-k809mbn0.js} +12 -12
- package/dist/shared/{components-r22vtgqc.js → components-kvr7f9hy.js} +11 -11
- package/dist/shared/{components-r4jt6hgd.js → components-mjthm1kf.js} +6 -6
- package/dist/shared/{components-nn6xezy2.js → components-nb87fjy4.js} +226 -226
- package/dist/shared/{components-gndm6am4.js → components-ng72k97e.js} +17 -17
- package/dist/shared/{components-54nf2x99.js → components-pbmqctfa.js} +52 -45
- package/dist/shared/{components-peg09pzs.js → components-q5xj5c16.js} +11 -11
- package/dist/shared/{components-taxmgbnh.js → components-re6rs21k.js} +17 -17
- package/dist/shared/{components-r43mqnd6.js → components-rr7a6ja9.js} +46 -46
- package/dist/shared/{components-p2vmyfe1.js → components-s083f38z.js} +43 -43
- package/dist/shared/{components-bkvb6nem.js → components-s2bz1xpk.js} +11 -11
- package/dist/shared/components-ta7shw28.js +19 -0
- 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-brnzrp2t.js → components-xxvdw7k1.js} +41 -41
- 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/components/inputs/checkbox-group/index.d.ts +0 -50
- package/dist/components/inputs/checkbox-group/index.js +0 -23
- package/dist/components/inputs/input-copy/index.js +0 -18
- package/dist/components/inputs/input-message/index.js +0 -27
- package/dist/components/inputs/radio-group/index.js +0 -22
- package/dist/components/navigation/accordion/index.js +0 -30
- package/dist/components/thinking-indicator/index.js +0 -15
- 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,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphSurface
|
|
3
|
-
} from "./components-
|
|
3
|
+
} from "./components-0q0sqfh4.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
useMorphOrigin,
|
|
6
|
+
useMorph
|
|
7
|
+
} from "./components-hqeq3w9q.js";
|
|
7
8
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./components-7nww01w4.js";
|
|
9
|
+
cn2
|
|
10
|
+
} from "./components-ezxhrmer.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./components-
|
|
12
|
+
useShape
|
|
13
|
+
} from "./components-cv16mryv.js";
|
|
14
14
|
|
|
15
15
|
// components/overlays/tooltip/index.tsx
|
|
16
16
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
@@ -18,7 +18,7 @@ import { motion, useMotionValue } from "motion/react";
|
|
|
18
18
|
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
19
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
var TooltipPortalContainerContext = createContext(null);
|
|
21
|
-
function
|
|
21
|
+
function TooltipPortalContainer2({ value, children }) {
|
|
22
22
|
return /* @__PURE__ */ jsx(TooltipPortalContainerContext.Provider, {
|
|
23
23
|
value,
|
|
24
24
|
children
|
|
@@ -26,7 +26,7 @@ function TooltipPortalContainer({ value, children }) {
|
|
|
26
26
|
}
|
|
27
27
|
var DEFAULT_DELAY = 200;
|
|
28
28
|
var TooltipGroupContext = createContext(false);
|
|
29
|
-
function
|
|
29
|
+
function TooltipProvider2({ children, delayDuration = DEFAULT_DELAY, skipDelayDuration = 300 }) {
|
|
30
30
|
return /* @__PURE__ */ jsx(TooltipGroupContext.Provider, {
|
|
31
31
|
value: true,
|
|
32
32
|
children: /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
@@ -36,7 +36,7 @@ function TooltipProvider({ children, delayDuration = DEFAULT_DELAY, skipDelayDur
|
|
|
36
36
|
})
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Tooltip2({
|
|
40
40
|
content,
|
|
41
41
|
children,
|
|
42
42
|
side = "top",
|
|
@@ -95,7 +95,7 @@ function Tooltip({
|
|
|
95
95
|
children: /* @__PURE__ */ jsx(TooltipPrimitive.Positioner, {
|
|
96
96
|
side,
|
|
97
97
|
sideOffset,
|
|
98
|
-
className:
|
|
98
|
+
className: cn2("z-50", contentClassName),
|
|
99
99
|
children: /* @__PURE__ */ jsx(TooltipPrimitive.Popup, {
|
|
100
100
|
ref: morph.popupRef,
|
|
101
101
|
className: "relative outline-none",
|
|
@@ -106,7 +106,7 @@ function Tooltip({
|
|
|
106
106
|
morph,
|
|
107
107
|
bg: "bg-foreground",
|
|
108
108
|
radius: shape.bg,
|
|
109
|
-
className:
|
|
109
|
+
className: cn2("text-background text-caption px-2 py-1", "[text-box:trim-both_cap_alphabetic] supports-[text-box:trim-both]:py-2", "weight-medium", className),
|
|
110
110
|
children: content
|
|
111
111
|
})
|
|
112
112
|
})
|
|
@@ -121,8 +121,8 @@ function Tooltip({
|
|
|
121
121
|
children: tooltip
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var tooltip_default =
|
|
124
|
+
Tooltip2.Provider = TooltipProvider2;
|
|
125
|
+
Tooltip2.PortalContainer = TooltipPortalContainer2;
|
|
126
|
+
var tooltip_default = Tooltip2;
|
|
127
127
|
|
|
128
|
-
export {
|
|
128
|
+
export { TooltipPortalContainer2, TooltipProvider2, Tooltip2, tooltip_default };
|
|
@@ -1,33 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./components-
|
|
2
|
+
cn2
|
|
3
|
+
} from "./components-ezxhrmer.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./components-
|
|
5
|
+
GooIndicator
|
|
6
|
+
} from "./components-chacnk61.js";
|
|
7
|
+
import {
|
|
8
|
+
FluidHoverHighlight2
|
|
9
|
+
} from "./components-kvr7f9hy.js";
|
|
7
10
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./components-
|
|
11
|
+
IndexedRows,
|
|
12
|
+
useRowIndex
|
|
13
|
+
} from "./components-ta7shw28.js";
|
|
11
14
|
import {
|
|
12
15
|
useShape
|
|
13
|
-
} from "./components-
|
|
16
|
+
} from "./components-cv16mryv.js";
|
|
14
17
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./components-
|
|
18
|
+
useSize2
|
|
19
|
+
} from "./components-0sn7ypjw.js";
|
|
17
20
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./components-
|
|
21
|
+
useControllableState
|
|
22
|
+
} from "./components-n7mjr357.js";
|
|
20
23
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
useFluidHover2,
|
|
25
|
+
useRegisterFluidHoverItem2
|
|
26
|
+
} from "./components-59efxjd9.js";
|
|
23
27
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./components-
|
|
28
|
+
SizeProvider2
|
|
29
|
+
} from "./components-jjw69c4c.js";
|
|
26
30
|
import {
|
|
27
|
-
|
|
28
|
-
} from "./components-
|
|
31
|
+
spring2
|
|
32
|
+
} from "./components-1v7rxytx.js";
|
|
29
33
|
|
|
30
|
-
// components/inputs/radio
|
|
34
|
+
// components/inputs/radio/index.tsx
|
|
31
35
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
32
36
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
33
37
|
import { AnimatePresence, motion } from "motion/react";
|
|
@@ -46,10 +50,10 @@ var RadioGroupContext = createContext(null);
|
|
|
46
50
|
function useRadioGroupContext() {
|
|
47
51
|
const ctx = useContext(RadioGroupContext);
|
|
48
52
|
if (!ctx)
|
|
49
|
-
throw new Error("
|
|
53
|
+
throw new Error("Radio must be used within a Radio.Group");
|
|
50
54
|
return ctx;
|
|
51
55
|
}
|
|
52
|
-
var
|
|
56
|
+
var RadioGroup2 = forwardRef(({
|
|
53
57
|
children,
|
|
54
58
|
selectedIndex: selectedIndexProp,
|
|
55
59
|
defaultSelectedIndex,
|
|
@@ -65,7 +69,7 @@ var RadioGroup = forwardRef(({
|
|
|
65
69
|
const [value, onValueChange] = useControllableState(valueProp, defaultValue, onValueChangeProp);
|
|
66
70
|
const containerRef = useRef(null);
|
|
67
71
|
const childValues = Children.toArray(children).filter(isValidElement).map((child) => child.props.value);
|
|
68
|
-
const hover =
|
|
72
|
+
const hover = useFluidHover2(containerRef);
|
|
69
73
|
const { activeIndex, setActiveIndex, itemRects, handlers, registerItem } = hover;
|
|
70
74
|
const [focusedIndex, setFocusedIndex] = useState(null);
|
|
71
75
|
const resolvedSelectedIndex = value !== undefined ? childValues.findIndex((childValue) => childValue === value) : selectedIndex ?? -1;
|
|
@@ -124,14 +128,14 @@ var RadioGroup = forwardRef(({
|
|
|
124
128
|
}
|
|
125
129
|
},
|
|
126
130
|
role: "radiogroup",
|
|
127
|
-
className:
|
|
131
|
+
className: cn2("relative flex flex-col w-72 max-w-full select-none", className),
|
|
128
132
|
...props,
|
|
129
133
|
children: [
|
|
130
134
|
selectedRect && /* @__PURE__ */ jsx(GooIndicator, {
|
|
131
135
|
rect: selectedRect,
|
|
132
|
-
className:
|
|
136
|
+
className: cn2("bg-active", shape.bg)
|
|
133
137
|
}),
|
|
134
|
-
/* @__PURE__ */ jsx(
|
|
138
|
+
/* @__PURE__ */ jsx(FluidHoverHighlight2, {
|
|
135
139
|
hover,
|
|
136
140
|
className: shape.bg
|
|
137
141
|
}),
|
|
@@ -145,17 +149,19 @@ var RadioGroup = forwardRef(({
|
|
|
145
149
|
width: focusRect.width + 4,
|
|
146
150
|
height: focusRect.height + 4
|
|
147
151
|
},
|
|
148
|
-
exit: { opacity: 0, transition:
|
|
152
|
+
exit: { opacity: 0, transition: spring2.fast.exit },
|
|
149
153
|
transition: {
|
|
150
|
-
...
|
|
151
|
-
opacity: { duration:
|
|
154
|
+
...spring2.fast,
|
|
155
|
+
opacity: { duration: spring2.fast.duration }
|
|
152
156
|
}
|
|
153
157
|
})
|
|
154
158
|
}),
|
|
155
|
-
|
|
159
|
+
/* @__PURE__ */ jsx(IndexedRows, {
|
|
160
|
+
children
|
|
161
|
+
})
|
|
156
162
|
]
|
|
157
163
|
});
|
|
158
|
-
const withSize = (node) => size ? /* @__PURE__ */ jsx(
|
|
164
|
+
const withSize = (node) => size ? /* @__PURE__ */ jsx(SizeProvider2, {
|
|
159
165
|
size,
|
|
160
166
|
children: node
|
|
161
167
|
}) : node;
|
|
@@ -188,19 +194,20 @@ var RadioGroup = forwardRef(({
|
|
|
188
194
|
children: content
|
|
189
195
|
}));
|
|
190
196
|
});
|
|
191
|
-
|
|
192
|
-
var
|
|
197
|
+
RadioGroup2.displayName = "RadioGroup";
|
|
198
|
+
var Radio2 = forwardRef(({ label, index: indexProp, selected, onSelect, value, className, ...props }, ref) => {
|
|
193
199
|
const internalRef = useRef(null);
|
|
194
200
|
const hasMounted = useRef(false);
|
|
195
201
|
const { registerItem, activeIndex, selectedIndex, selectedValue, onValueChange, hasSelection, selectIndex } = useRadioGroupContext();
|
|
196
|
-
|
|
202
|
+
const index = useRowIndex(indexProp);
|
|
203
|
+
useRegisterFluidHoverItem2(registerItem, index, internalRef);
|
|
197
204
|
useEffect(() => {
|
|
198
205
|
hasMounted.current = true;
|
|
199
206
|
}, []);
|
|
200
207
|
const isActive = activeIndex === index;
|
|
201
208
|
const skipAnimation = !hasMounted.current;
|
|
202
209
|
const shape = useShape();
|
|
203
|
-
const sizeClasses =
|
|
210
|
+
const sizeClasses = useSize2();
|
|
204
211
|
const compact = sizeClasses.variant === "compact";
|
|
205
212
|
const isSelected = value !== undefined && selectedValue !== undefined ? selectedValue === value : selected ?? selectedIndex === index;
|
|
206
213
|
const handleSelect = () => {
|
|
@@ -237,14 +244,14 @@ var RadioItem = forwardRef(({ label, index, selected, onSelect, value, className
|
|
|
237
244
|
handleSelect();
|
|
238
245
|
}
|
|
239
246
|
},
|
|
240
|
-
className:
|
|
247
|
+
className: cn2(`relative z-10 flex ${sizeClasses.control} items-center ${sizeClasses.gap} ${shape.item} ${sizeClasses.px} cursor-pointer outline-none`, className),
|
|
241
248
|
...props,
|
|
242
249
|
children: [
|
|
243
250
|
/* @__PURE__ */ jsxs("div", {
|
|
244
|
-
className:
|
|
251
|
+
className: cn2("relative shrink-0", compact ? "w-[14px] h-[14px]" : "w-[16px] h-[16px]"),
|
|
245
252
|
children: [
|
|
246
253
|
/* @__PURE__ */ jsx("div", {
|
|
247
|
-
className:
|
|
254
|
+
className: cn2("absolute inset-0 rounded-full border-solid transition-all duration-fast", isSelected ? "border-[1.5px] border-transparent" : isActive ? "border-[1.5px] border-control" : "border-[1.5px] border-border")
|
|
248
255
|
}),
|
|
249
256
|
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
250
257
|
children: isSelected && /* @__PURE__ */ jsx(motion.div, {
|
|
@@ -255,16 +262,16 @@ var RadioItem = forwardRef(({ label, index, selected, onSelect, value, className
|
|
|
255
262
|
},
|
|
256
263
|
animate: { opacity: 1, scale: 1 },
|
|
257
264
|
exit: { opacity: 0, scale: 0.3, transition: { duration: 0.04 } },
|
|
258
|
-
transition:
|
|
265
|
+
transition: spring2.fast,
|
|
259
266
|
children: /* @__PURE__ */ jsx("div", {
|
|
260
|
-
className:
|
|
267
|
+
className: cn2("rounded-full bg-foreground", compact ? "w-[7px] h-[7px]" : "w-[8px] h-[8px]")
|
|
261
268
|
})
|
|
262
269
|
})
|
|
263
270
|
})
|
|
264
271
|
]
|
|
265
272
|
}),
|
|
266
273
|
/* @__PURE__ */ jsxs("span", {
|
|
267
|
-
className:
|
|
274
|
+
className: cn2("inline-grid", sizeClasses.text),
|
|
268
275
|
children: [
|
|
269
276
|
/* @__PURE__ */ jsx("span", {
|
|
270
277
|
className: "col-start-1 row-start-1 invisible [text-box:trim-both_cap_alphabetic] weight-semibold",
|
|
@@ -272,7 +279,7 @@ var RadioItem = forwardRef(({ label, index, selected, onSelect, value, className
|
|
|
272
279
|
children: label
|
|
273
280
|
}),
|
|
274
281
|
/* @__PURE__ */ jsx("span", {
|
|
275
|
-
className:
|
|
282
|
+
className: cn2("col-start-1 row-start-1 transition-[color,font-variation-settings] duration-fast [text-box:trim-both_cap_alphabetic]", isSelected || isActive ? "text-foreground" : "text-muted-foreground", isSelected ? "weight-semibold" : "weight-normal"),
|
|
276
283
|
children: label
|
|
277
284
|
})
|
|
278
285
|
]
|
|
@@ -286,8 +293,8 @@ var RadioItem = forwardRef(({ label, index, selected, onSelect, value, className
|
|
|
286
293
|
]
|
|
287
294
|
});
|
|
288
295
|
});
|
|
289
|
-
|
|
290
|
-
Object.assign(
|
|
291
|
-
var
|
|
296
|
+
Radio2.displayName = "Radio";
|
|
297
|
+
Object.assign(Radio2, { Group: RadioGroup2 });
|
|
298
|
+
var radio_default = Radio2;
|
|
292
299
|
|
|
293
|
-
export {
|
|
300
|
+
export { RadioGroup2, Radio2, radio_default };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn2
|
|
3
|
+
} from "./components-ezxhrmer.js";
|
|
1
4
|
import {
|
|
2
5
|
button_default
|
|
3
|
-
} from "./components-
|
|
6
|
+
} from "./components-b2wyq2cq.js";
|
|
4
7
|
import {
|
|
5
8
|
useControllableState
|
|
6
|
-
} from "./components-
|
|
7
|
-
import {
|
|
8
|
-
spring
|
|
9
|
-
} from "./components-vc1k7yv2.js";
|
|
9
|
+
} from "./components-n7mjr357.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./components-
|
|
11
|
+
spring2
|
|
12
|
+
} from "./components-1v7rxytx.js";
|
|
13
13
|
|
|
14
14
|
// primitives/motion/index.tsx
|
|
15
15
|
import { MotionConfig, motion } from "motion/react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
function
|
|
17
|
+
function Motion2({
|
|
18
18
|
tier = "moderate",
|
|
19
19
|
show,
|
|
20
20
|
defaultShow = true,
|
|
@@ -25,12 +25,12 @@ function Motion({
|
|
|
25
25
|
children
|
|
26
26
|
}) {
|
|
27
27
|
const [shown, setShown] = useControllableState(show, defaultShow, onShowChange);
|
|
28
|
-
const enter =
|
|
28
|
+
const enter = spring2[tier];
|
|
29
29
|
const leave = sameExit ? enter : enter.exit;
|
|
30
30
|
return /* @__PURE__ */ jsx(MotionConfig, {
|
|
31
31
|
reducedMotion,
|
|
32
32
|
children: /* @__PURE__ */ jsxs("div", {
|
|
33
|
-
className:
|
|
33
|
+
className: cn2("flex flex-col items-center gap-3", className),
|
|
34
34
|
children: [
|
|
35
35
|
/* @__PURE__ */ jsx(motion.div, {
|
|
36
36
|
initial: false,
|
|
@@ -76,4 +76,4 @@ function Motion({
|
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
export {
|
|
79
|
+
export { Motion2 };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
|
-
pad
|
|
3
|
-
} from "./components-r4jt6hgd.js";
|
|
4
|
-
import {
|
|
5
|
-
PickerInput,
|
|
6
|
-
PickerShell
|
|
7
|
-
} from "./components-hzfp4tjb.js";
|
|
8
|
-
import {
|
|
9
|
-
ScrollColumn,
|
|
10
2
|
defaultLocale,
|
|
3
|
+
fieldLabel,
|
|
11
4
|
dividedColumns,
|
|
12
|
-
|
|
13
|
-
} from "./components-
|
|
5
|
+
ScrollColumn
|
|
6
|
+
} from "./components-gz8zf3ec.js";
|
|
7
|
+
import {
|
|
8
|
+
cn2
|
|
9
|
+
} from "./components-ezxhrmer.js";
|
|
14
10
|
import {
|
|
15
11
|
useControllableState
|
|
16
|
-
} from "./components-
|
|
12
|
+
} from "./components-n7mjr357.js";
|
|
13
|
+
import {
|
|
14
|
+
PickerShell,
|
|
15
|
+
PickerInput
|
|
16
|
+
} from "./components-7btqt08d.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./components-
|
|
18
|
+
pad
|
|
19
|
+
} from "./components-mjthm1kf.js";
|
|
20
20
|
|
|
21
21
|
// components/inputs/date-time/duration-picker/index.tsx
|
|
22
22
|
import { formatDuration } from "date-fns";
|
|
23
23
|
import { useMemo, useRef } from "react";
|
|
24
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
25
|
var TYPED = /^\s*(\d{1,3})(?::(\d{1,2}))?\s*$/;
|
|
26
|
-
function
|
|
26
|
+
function DurationPicker2({
|
|
27
27
|
value: valueProp,
|
|
28
28
|
defaultValue = null,
|
|
29
29
|
onValueChange,
|
|
@@ -95,7 +95,7 @@ function DurationPicker({
|
|
|
95
95
|
tier,
|
|
96
96
|
className,
|
|
97
97
|
children: /* @__PURE__ */ jsxs("div", {
|
|
98
|
-
className:
|
|
98
|
+
className: cn2(dividedColumns, "h-56"),
|
|
99
99
|
children: [
|
|
100
100
|
/* @__PURE__ */ jsx(ScrollColumn, {
|
|
101
101
|
label: fieldLabel(locale, "hour"),
|
|
@@ -115,6 +115,6 @@ function DurationPicker({
|
|
|
115
115
|
})
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
var duration_picker_default =
|
|
118
|
+
var duration_picker_default = DurationPicker2;
|
|
119
119
|
|
|
120
|
-
export {
|
|
120
|
+
export { DurationPicker2, duration_picker_default };
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
DialogFooter,
|
|
5
|
-
DialogHeader,
|
|
6
|
-
DialogState,
|
|
7
|
-
DialogTitle,
|
|
8
|
-
DialogTrigger,
|
|
9
|
-
useDialogState
|
|
10
|
-
} from "./components-61ckf42z.js";
|
|
2
|
+
MorphSurface
|
|
3
|
+
} from "./components-0q0sqfh4.js";
|
|
11
4
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
SurfaceProvider,
|
|
15
|
-
useSurface
|
|
16
|
-
} from "./components-csxz9f52.js";
|
|
5
|
+
useMorph
|
|
6
|
+
} from "./components-hqeq3w9q.js";
|
|
17
7
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./components-
|
|
8
|
+
cn2
|
|
9
|
+
} from "./components-ezxhrmer.js";
|
|
20
10
|
import {
|
|
21
11
|
useShape
|
|
22
|
-
} from "./components-
|
|
12
|
+
} from "./components-cv16mryv.js";
|
|
23
13
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
SURFACE_BG,
|
|
15
|
+
SURFACE_SHADOW,
|
|
16
|
+
useSurface2,
|
|
17
|
+
SurfaceProvider2
|
|
18
|
+
} from "./components-zx6b6yby.js";
|
|
26
19
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
useDialogState2,
|
|
21
|
+
DialogTrigger2,
|
|
22
|
+
DialogClose2,
|
|
23
|
+
DialogHeader2,
|
|
24
|
+
DialogFooter2,
|
|
25
|
+
DialogTitle2,
|
|
26
|
+
DialogDescription2,
|
|
27
|
+
DialogState2
|
|
28
|
+
} from "./components-zfnmn5d4.js";
|
|
29
29
|
|
|
30
30
|
// components/overlays/sheet/index.tsx
|
|
31
31
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
@@ -53,9 +53,9 @@ var PLACEMENT = {
|
|
|
53
53
|
};
|
|
54
54
|
var DRAWER_OFFSET = 4;
|
|
55
55
|
var INDENT_RADIUS = { pill: "data-[active]:rounded-3xl", rounded: "data-[active]:rounded-xl" };
|
|
56
|
-
var
|
|
56
|
+
var SheetContent2 = forwardRef(({ from, effect, hideSource, tier, container, className, children, ...props }, ref) => {
|
|
57
57
|
const { side, swiped } = useContext(SheetContext);
|
|
58
|
-
const { open, origin } =
|
|
58
|
+
const { open, origin } = useDialogState2();
|
|
59
59
|
const morph = useMorph(open, origin, {
|
|
60
60
|
from: from ?? side,
|
|
61
61
|
effect,
|
|
@@ -65,7 +65,7 @@ var SheetContent = forwardRef(({ from, effect, hideSource, tier, container, clas
|
|
|
65
65
|
});
|
|
66
66
|
useImperativeHandle(ref, () => morph.popup, [morph.popup]);
|
|
67
67
|
const shape = useShape();
|
|
68
|
-
const level = Math.min(
|
|
68
|
+
const level = Math.min(useSurface2() + DRAWER_OFFSET, 8);
|
|
69
69
|
const edge = side === "top" || side === "bottom";
|
|
70
70
|
return /* @__PURE__ */ jsxs(DrawerPrimitive.Portal, {
|
|
71
71
|
container: container ?? undefined,
|
|
@@ -74,22 +74,22 @@ var SheetContent = forwardRef(({ from, effect, hideSource, tier, container, clas
|
|
|
74
74
|
render: /* @__PURE__ */ jsx(motion.div, {
|
|
75
75
|
style: { opacity: morph.progress }
|
|
76
76
|
}),
|
|
77
|
-
className:
|
|
77
|
+
className: cn2(container ? "absolute" : "fixed", "inset-0 z-50 bg-scrim")
|
|
78
78
|
}),
|
|
79
79
|
/* @__PURE__ */ jsx(DrawerPrimitive.Viewport, {
|
|
80
|
-
className:
|
|
80
|
+
className: cn2(container ? "absolute" : "fixed", "inset-0 z-50"),
|
|
81
81
|
children: /* @__PURE__ */ jsx(DrawerPrimitive.Popup, {
|
|
82
82
|
ref: morph.popupRef,
|
|
83
83
|
...props,
|
|
84
|
-
className:
|
|
85
|
-
children: /* @__PURE__ */ jsx(
|
|
84
|
+
className: cn2("absolute flex flex-col focus:outline-none", PLACEMENT[side], "[transform:translate(var(--drawer-swipe-movement-x),calc(var(--drawer-snap-point-offset)_+_var(--drawer-swipe-movement-y)))]", "transition-[transform] duration-slow"),
|
|
85
|
+
children: /* @__PURE__ */ jsx(SurfaceProvider2, {
|
|
86
86
|
value: level,
|
|
87
87
|
children: /* @__PURE__ */ jsxs(MorphSurface, {
|
|
88
88
|
morph,
|
|
89
89
|
bg: SURFACE_BG[level],
|
|
90
90
|
shadow: SURFACE_SHADOW[level],
|
|
91
91
|
radius: shape.container,
|
|
92
|
-
className:
|
|
92
|
+
className: cn2("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-6", edge && "pt-3", className),
|
|
93
93
|
children: [
|
|
94
94
|
edge && /* @__PURE__ */ jsx("div", {
|
|
95
95
|
"aria-hidden": true,
|
|
@@ -104,17 +104,17 @@ var SheetContent = forwardRef(({ from, effect, hideSource, tier, container, clas
|
|
|
104
104
|
]
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
|
-
|
|
108
|
-
var
|
|
107
|
+
SheetContent2.displayName = "SheetContent";
|
|
108
|
+
var SheetIndent2 = forwardRef(({ className, ...props }, ref) => {
|
|
109
109
|
const shape = useShape();
|
|
110
110
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Indent, {
|
|
111
111
|
ref,
|
|
112
|
-
className:
|
|
112
|
+
className: cn2("origin-top transition-[transform] duration-slow data-[active]:scale-[0.96] data-[active]:overflow-hidden", INDENT_RADIUS[shape.variant], className),
|
|
113
113
|
...props
|
|
114
114
|
});
|
|
115
115
|
});
|
|
116
|
-
|
|
117
|
-
function
|
|
116
|
+
SheetIndent2.displayName = "SheetIndent";
|
|
117
|
+
function Sheet2({
|
|
118
118
|
children,
|
|
119
119
|
open,
|
|
120
120
|
defaultOpen,
|
|
@@ -127,7 +127,7 @@ function Sheet({
|
|
|
127
127
|
const [swiped, setSwiped] = useState(false);
|
|
128
128
|
return /* @__PURE__ */ jsx(SheetContext.Provider, {
|
|
129
129
|
value: { side, swiped },
|
|
130
|
-
children: /* @__PURE__ */ jsx(
|
|
130
|
+
children: /* @__PURE__ */ jsx(DialogState2, {
|
|
131
131
|
open,
|
|
132
132
|
defaultOpen,
|
|
133
133
|
onOpenChange,
|
|
@@ -146,15 +146,15 @@ function Sheet({
|
|
|
146
146
|
})
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
var sheet_default =
|
|
149
|
+
Sheet2.Trigger = DialogTrigger2;
|
|
150
|
+
Sheet2.Content = SheetContent2;
|
|
151
|
+
Sheet2.Header = DialogHeader2;
|
|
152
|
+
Sheet2.Footer = DialogFooter2;
|
|
153
|
+
Sheet2.Title = DialogTitle2;
|
|
154
|
+
Sheet2.Description = DialogDescription2;
|
|
155
|
+
Sheet2.Close = DialogClose2;
|
|
156
|
+
Sheet2.Provider = DrawerPrimitive.Provider;
|
|
157
|
+
Sheet2.Indent = SheetIndent2;
|
|
158
|
+
var sheet_default = Sheet2;
|
|
159
159
|
|
|
160
|
-
export {
|
|
160
|
+
export { SheetContent2, SheetIndent2, Sheet2, sheet_default };
|