@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,39 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
slotRender
|
|
3
|
-
} from "./components-5vxtcp88.js";
|
|
4
|
-
import {
|
|
5
|
-
Button
|
|
6
|
-
} from "./components-5pkcfprd.js";
|
|
7
1
|
import {
|
|
8
2
|
useIcon
|
|
9
|
-
} from "./components-
|
|
10
|
-
import {
|
|
11
|
-
SURFACE_BG,
|
|
12
|
-
SURFACE_SHADOW,
|
|
13
|
-
SurfaceProvider,
|
|
14
|
-
useSurface
|
|
15
|
-
} from "./components-csxz9f52.js";
|
|
3
|
+
} from "./components-zrkzcayz.js";
|
|
16
4
|
import {
|
|
17
5
|
MorphPartScope,
|
|
18
6
|
MorphSurface
|
|
19
|
-
} from "./components-
|
|
7
|
+
} from "./components-0q0sqfh4.js";
|
|
8
|
+
import {
|
|
9
|
+
useMorphOrigin,
|
|
10
|
+
useMorph
|
|
11
|
+
} from "./components-hqeq3w9q.js";
|
|
12
|
+
import {
|
|
13
|
+
cn2
|
|
14
|
+
} from "./components-ezxhrmer.js";
|
|
20
15
|
import {
|
|
21
16
|
useShape
|
|
22
|
-
} from "./components-
|
|
17
|
+
} from "./components-cv16mryv.js";
|
|
23
18
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
useSizeVariant2,
|
|
20
|
+
useSize2
|
|
21
|
+
} from "./components-0sn7ypjw.js";
|
|
26
22
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from "./components-7nww01w4.js";
|
|
23
|
+
slotRender
|
|
24
|
+
} from "./components-3ky44908.js";
|
|
30
25
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
SURFACE_BG,
|
|
27
|
+
SURFACE_SHADOW,
|
|
28
|
+
useSurface2,
|
|
29
|
+
SurfaceProvider2
|
|
30
|
+
} from "./components-zx6b6yby.js";
|
|
31
|
+
import {
|
|
32
|
+
useControllableState
|
|
33
|
+
} from "./components-n7mjr357.js";
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
} from "./components-
|
|
35
|
+
Button2
|
|
36
|
+
} from "./components-b2wyq2cq.js";
|
|
37
37
|
|
|
38
38
|
// components/overlays/dialog/index.tsx
|
|
39
39
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
@@ -52,8 +52,8 @@ var DialogContext = createContext({
|
|
|
52
52
|
open: false,
|
|
53
53
|
origin: { current: {} }
|
|
54
54
|
});
|
|
55
|
-
var
|
|
56
|
-
var
|
|
55
|
+
var useDialogState2 = () => useContext(DialogContext);
|
|
56
|
+
var DialogTrigger2 = forwardRef(({ render, asChild, children, ...props }, ref) => {
|
|
57
57
|
const el = slotRender(render, asChild, children);
|
|
58
58
|
return el ? /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
|
|
59
59
|
ref,
|
|
@@ -65,8 +65,8 @@ var DialogTrigger = forwardRef(({ render, asChild, children, ...props }, ref) =>
|
|
|
65
65
|
children
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
|
-
|
|
69
|
-
var
|
|
68
|
+
DialogTrigger2.displayName = "DialogTrigger";
|
|
69
|
+
var DialogClose2 = forwardRef(({ render, asChild, children, ...props }, ref) => {
|
|
70
70
|
const el = slotRender(render, asChild, children);
|
|
71
71
|
return el ? /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
72
72
|
ref,
|
|
@@ -78,8 +78,8 @@ var DialogClose = forwardRef(({ render, asChild, children, ...props }, ref) => {
|
|
|
78
78
|
children
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
|
-
|
|
82
|
-
var
|
|
81
|
+
DialogClose2.displayName = "DialogClose";
|
|
82
|
+
var DialogContent2 = forwardRef(({
|
|
83
83
|
className,
|
|
84
84
|
children,
|
|
85
85
|
size = "sm",
|
|
@@ -94,10 +94,10 @@ var DialogContent = forwardRef(({
|
|
|
94
94
|
}, ref) => {
|
|
95
95
|
const XIcon = useIcon("x");
|
|
96
96
|
const shape = useShape();
|
|
97
|
-
const substrate =
|
|
97
|
+
const substrate = useSurface2();
|
|
98
98
|
const dialogLevel = Math.min(substrate + DIALOG_OFFSET, 8);
|
|
99
|
-
const compact =
|
|
100
|
-
const { open, origin } =
|
|
99
|
+
const compact = useSize2().variant === "compact";
|
|
100
|
+
const { open, origin } = useDialogState2();
|
|
101
101
|
const morph = useMorph(open, origin, { from, effect, hideSource, tier });
|
|
102
102
|
useImperativeHandle(ref, () => morph.popup, [morph.popup]);
|
|
103
103
|
return /* @__PURE__ */ jsxs(DialogPrimitive.Portal, {
|
|
@@ -107,24 +107,24 @@ var DialogContent = forwardRef(({
|
|
|
107
107
|
render: /* @__PURE__ */ jsx(motion.div, {
|
|
108
108
|
style: { opacity: morph.progress }
|
|
109
109
|
}),
|
|
110
|
-
className:
|
|
110
|
+
className: cn2(container ? "absolute" : "fixed", "inset-0 z-50 bg-scrim")
|
|
111
111
|
}),
|
|
112
112
|
/* @__PURE__ */ jsx(DialogPrimitive.Popup, {
|
|
113
113
|
ref: morph.popupRef,
|
|
114
114
|
...props,
|
|
115
|
-
className:
|
|
116
|
-
children: /* @__PURE__ */ jsx(
|
|
115
|
+
className: cn2(container ? "absolute" : "fixed", "left-1/2 z-50 w-[calc(100%-2rem)] -translate-x-1/2 focus:outline-none", position === "top" ? "top-[12dvh]" : "top-1/2 -translate-y-1/2", size === "sm" && (compact ? "max-w-[360px]" : "max-w-[400px]"), size === "lg" && (compact ? "max-w-[480px]" : "max-w-[540px]"), size === "xl" && (compact ? "max-w-[800px]" : "max-w-[880px]")),
|
|
116
|
+
children: /* @__PURE__ */ jsx(SurfaceProvider2, {
|
|
117
117
|
value: dialogLevel,
|
|
118
118
|
children: /* @__PURE__ */ jsxs(MorphSurface, {
|
|
119
119
|
morph,
|
|
120
120
|
bg: SURFACE_BG[dialogLevel],
|
|
121
121
|
shadow: SURFACE_SHADOW[dialogLevel],
|
|
122
122
|
radius: shape.container,
|
|
123
|
-
className:
|
|
123
|
+
className: cn2("p-6", className),
|
|
124
124
|
children: [
|
|
125
125
|
children,
|
|
126
126
|
showCloseButton && /* @__PURE__ */ jsx(DialogPrimitive.Close, {
|
|
127
|
-
render: /* @__PURE__ */ jsxs(
|
|
127
|
+
render: /* @__PURE__ */ jsxs(Button2, {
|
|
128
128
|
variant: "ghost",
|
|
129
129
|
size: "icon-sm",
|
|
130
130
|
className: "absolute right-3 top-3",
|
|
@@ -144,38 +144,38 @@ var DialogContent = forwardRef(({
|
|
|
144
144
|
]
|
|
145
145
|
});
|
|
146
146
|
});
|
|
147
|
-
|
|
148
|
-
function
|
|
147
|
+
DialogContent2.displayName = "DialogContent";
|
|
148
|
+
function DialogHeader2({ className, ...props }) {
|
|
149
149
|
return /* @__PURE__ */ jsx("div", {
|
|
150
|
-
className:
|
|
150
|
+
className: cn2("flex flex-col gap-1.5 mb-4", className),
|
|
151
151
|
...props
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function DialogFooter2({ className, ...props }) {
|
|
155
155
|
return /* @__PURE__ */ jsx("div", {
|
|
156
|
-
className:
|
|
156
|
+
className: cn2("flex justify-end gap-2 mt-6", className),
|
|
157
157
|
...props
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
var
|
|
161
|
-
const compact =
|
|
160
|
+
var DialogTitle2 = forwardRef(({ className, ...props }, ref) => {
|
|
161
|
+
const compact = useSizeVariant2() === "compact";
|
|
162
162
|
return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
|
|
163
163
|
ref,
|
|
164
|
-
className:
|
|
164
|
+
className: cn2(compact ? "text-title-compact" : "text-title", "weight-bold text-foreground leading-tight", className),
|
|
165
165
|
...props
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
|
-
|
|
169
|
-
var
|
|
170
|
-
const compact =
|
|
168
|
+
DialogTitle2.displayName = "DialogTitle";
|
|
169
|
+
var DialogDescription2 = forwardRef(({ className, ...props }, ref) => {
|
|
170
|
+
const compact = useSizeVariant2() === "compact";
|
|
171
171
|
return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
|
|
172
172
|
ref,
|
|
173
|
-
className:
|
|
173
|
+
className: cn2(compact ? "text-body-compact" : "text-body", "text-muted-foreground", className),
|
|
174
174
|
...props
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
-
|
|
178
|
-
function
|
|
177
|
+
DialogDescription2.displayName = "DialogDescription";
|
|
178
|
+
function DialogState2({ open, defaultOpen = false, onOpenChange, children }) {
|
|
179
179
|
const [current, setCurrent] = useControllableState(open, defaultOpen, onOpenChange);
|
|
180
180
|
const { origin, capture } = useMorphOrigin();
|
|
181
181
|
const id = useId();
|
|
@@ -196,8 +196,8 @@ function DialogState({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
196
196
|
})
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return /* @__PURE__ */ jsx(
|
|
199
|
+
function Dialog2({ children, open, defaultOpen, onOpenChange, modal }) {
|
|
200
|
+
return /* @__PURE__ */ jsx(DialogState2, {
|
|
201
201
|
open,
|
|
202
202
|
defaultOpen,
|
|
203
203
|
onOpenChange,
|
|
@@ -208,13 +208,13 @@ function Dialog({ children, open, defaultOpen, onOpenChange, modal }) {
|
|
|
208
208
|
})
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
var dialog_default =
|
|
211
|
+
Dialog2.Trigger = DialogTrigger2;
|
|
212
|
+
Dialog2.Content = DialogContent2;
|
|
213
|
+
Dialog2.Header = DialogHeader2;
|
|
214
|
+
Dialog2.Footer = DialogFooter2;
|
|
215
|
+
Dialog2.Title = DialogTitle2;
|
|
216
|
+
Dialog2.Description = DialogDescription2;
|
|
217
|
+
Dialog2.Close = DialogClose2;
|
|
218
|
+
var dialog_default = Dialog2;
|
|
219
219
|
|
|
220
|
-
export {
|
|
220
|
+
export { useDialogState2, DialogTrigger2, DialogClose2, DialogContent2, DialogHeader2, DialogFooter2, DialogTitle2, DialogDescription2, DialogState2, Dialog2, dialog_default };
|
|
@@ -130,7 +130,7 @@ function useIcon(name) {
|
|
|
130
130
|
const icons = useContext(IconContext);
|
|
131
131
|
return (icons ?? defaultIcons)[name];
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function IconProvider2({ children, icons }) {
|
|
134
134
|
const value = useMemo(() => ({ ...defaultIcons, ...icons }), [icons]);
|
|
135
135
|
return /* @__PURE__ */ jsx(IconContext.Provider, {
|
|
136
136
|
value,
|
|
@@ -138,4 +138,4 @@ function IconProvider({ children, icons }) {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
export { useIcon,
|
|
141
|
+
export { useIcon, IconProvider2 };
|
|
@@ -19,7 +19,7 @@ var SURFACE_SHADOW = {
|
|
|
19
19
|
7: "shadow-surface-7",
|
|
20
20
|
8: "shadow-surface-8"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function surfaceClasses2(bgLevel, shadowLevel = bgLevel) {
|
|
23
23
|
const bg = Math.round(Math.max(1, Math.min(8, bgLevel)));
|
|
24
24
|
const shadow = Math.round(Math.max(1, Math.min(8, shadowLevel)));
|
|
25
25
|
return `${SURFACE_BG[bg]} ${SURFACE_SHADOW[shadow]}`;
|
|
@@ -29,14 +29,14 @@ function surfaceClasses(bgLevel, shadowLevel = bgLevel) {
|
|
|
29
29
|
import { createContext, useContext } from "react";
|
|
30
30
|
import { jsx } from "react/jsx-runtime";
|
|
31
31
|
var SurfaceContext = createContext(1);
|
|
32
|
-
function
|
|
32
|
+
function useSurface2() {
|
|
33
33
|
return useContext(SurfaceContext);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function SurfaceProvider2({ value, children }) {
|
|
36
36
|
return /* @__PURE__ */ jsx(SurfaceContext.Provider, {
|
|
37
37
|
value: Math.max(1, Math.min(8, value)),
|
|
38
38
|
children
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export { SURFACE_BG, SURFACE_SHADOW,
|
|
42
|
+
export { SURFACE_BG, SURFACE_SHADOW, surfaceClasses2, useSurface2, SurfaceProvider2 };
|
package/dist/styles.css
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
/* layer: theme */
|
|
61
61
|
@layer theme{
|
|
62
|
-
:root, :host { --
|
|
62
|
+
:root, :host { --default-transition-timingFunction: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --spacing: 0.25rem; --ease-DEFAULT: cubic-bezier(0.4, 0, 0.2, 1); --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif; --radius-md: 0.375rem; --radius-DEFAULT: 0.25rem; --radius-none: 0; --radius-2xl: 1rem; --radius-lg: 0.5rem; --leading-snug: 1.375; --leading-normal: 1.5; --radius-xs: 0.125rem; --tracking-wide: 0.025em; --leading-relaxed: 1.625; --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --ease-out: cubic-bezier(0, 0, 0.2, 1); --radius-3xl: 1.5rem; --radius-xl: 0.75rem; --leading-none: 1; --radius-sm: 0.25rem; --leading-tight: 1.25; --default-font-family: var(--font-sans); --default-monoFont-family: var(--font-mono); }
|
|
63
63
|
}
|
|
64
64
|
/* layer: base */
|
|
65
65
|
@layer base{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justanarthur/modo-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "Fluid Functionalism (Base UI flavor, MIT © 2026 Micka Touillaud) ported to UnoCSS: motion springs, fluid hover, a two-step size ladder and an eight-level elevated surface system. Documented with modo.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"react-dom": ">=18"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
|
-
"@justanarthur/modo": "0.
|
|
94
|
+
"@justanarthur/modo": "0.8.0",
|
|
95
95
|
"@types/react": "^18.3.0",
|
|
96
96
|
"@types/react-dom": "^18.3.0",
|
|
97
97
|
"bunup": "^0.16.0",
|
|
@@ -102,4 +102,4 @@
|
|
|
102
102
|
"unocss": "66.10.5",
|
|
103
103
|
"vite": "^5.4.0"
|
|
104
104
|
}
|
|
105
|
-
}
|
|
105
|
+
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SurfaceProvider,
|
|
3
|
-
surfaceClasses,
|
|
4
|
-
useSurface
|
|
5
|
-
} from "./components-csxz9f52.js";
|
|
6
|
-
import {
|
|
7
|
-
cn
|
|
8
|
-
} from "./components-0f0as45n.js";
|
|
9
|
-
|
|
10
|
-
// primitives/surface/index.tsx
|
|
11
|
-
import {
|
|
12
|
-
forwardRef
|
|
13
|
-
} from "react";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
|
-
var Elevated = forwardRef(({ offset, shadowLevel, className, children, ...props }, ref) => {
|
|
16
|
-
const substrate = useSurface();
|
|
17
|
-
const level = Math.min(substrate + offset, 8);
|
|
18
|
-
return /* @__PURE__ */ jsx(SurfaceProvider, {
|
|
19
|
-
value: level,
|
|
20
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
21
|
-
ref,
|
|
22
|
-
className: cn(surfaceClasses(level, shadowLevel ?? level), className),
|
|
23
|
-
...props,
|
|
24
|
-
children
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
Elevated.displayName = "Elevated";
|
|
29
|
-
Object.assign(Elevated, { Provider: SurfaceProvider });
|
|
30
|
-
var surface_default = Elevated;
|
|
31
|
-
|
|
32
|
-
export { Elevated, surface_default };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SizeProvider
|
|
3
|
-
} from "./components-vb033rns.js";
|
|
4
|
-
import {
|
|
5
|
-
FluidHoverHighlight
|
|
6
|
-
} from "./components-r22vtgqc.js";
|
|
7
|
-
import {
|
|
8
|
-
useFluidHover,
|
|
9
|
-
useRegisterFluidHoverItem
|
|
10
|
-
} from "./components-e46kf6cp.js";
|
|
11
|
-
import {
|
|
12
|
-
useSize
|
|
13
|
-
} from "./components-x3rz4cyn.js";
|
|
14
|
-
import {
|
|
15
|
-
cn
|
|
16
|
-
} from "./components-0f0as45n.js";
|
|
17
|
-
|
|
18
|
-
// components/table/index.tsx
|
|
19
|
-
import {
|
|
20
|
-
createContext,
|
|
21
|
-
forwardRef,
|
|
22
|
-
useContext,
|
|
23
|
-
useMemo,
|
|
24
|
-
useRef
|
|
25
|
-
} from "react";
|
|
26
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
-
var TableContext = createContext(null);
|
|
28
|
-
var Table = forwardRef(({ children, size, className, ...props }, ref) => {
|
|
29
|
-
const containerRef = useRef(null);
|
|
30
|
-
const sizeClasses = useSize(size);
|
|
31
|
-
const hover = useFluidHover(containerRef);
|
|
32
|
-
const { activeIndex, handlers, registerItem } = hover;
|
|
33
|
-
const contextValue = useMemo(() => ({ registerItem, activeIndex }), [registerItem, activeIndex]);
|
|
34
|
-
const table = /* @__PURE__ */ jsx(TableContext.Provider, {
|
|
35
|
-
value: contextValue,
|
|
36
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
37
|
-
ref: containerRef,
|
|
38
|
-
className: "relative",
|
|
39
|
-
onMouseEnter: handlers.onMouseEnter,
|
|
40
|
-
onMouseMove: handlers.onMouseMove,
|
|
41
|
-
onMouseLeave: handlers.onMouseLeave,
|
|
42
|
-
onClick: handlers.onClick,
|
|
43
|
-
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(FluidHoverHighlight, {
|
|
45
|
-
hover
|
|
46
|
-
}),
|
|
47
|
-
/* @__PURE__ */ jsx("table", {
|
|
48
|
-
ref,
|
|
49
|
-
className: cn("w-full border-collapse", sizeClasses.text, className),
|
|
50
|
-
...props,
|
|
51
|
-
children
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
return size ? /* @__PURE__ */ jsx(SizeProvider, {
|
|
57
|
-
size,
|
|
58
|
-
children: table
|
|
59
|
-
}) : table;
|
|
60
|
-
});
|
|
61
|
-
Table.displayName = "Table";
|
|
62
|
-
var TableHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", {
|
|
63
|
-
ref,
|
|
64
|
-
className: cn("", className),
|
|
65
|
-
...props
|
|
66
|
-
}));
|
|
67
|
-
TableHeader.displayName = "TableHeader";
|
|
68
|
-
var TableBody = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", {
|
|
69
|
-
ref,
|
|
70
|
-
className: cn("", className),
|
|
71
|
-
...props
|
|
72
|
-
}));
|
|
73
|
-
TableBody.displayName = "TableBody";
|
|
74
|
-
var TableRow = forwardRef(({ index, className, style, ...props }, ref) => {
|
|
75
|
-
const internalRef = useRef(null);
|
|
76
|
-
const ctx = useContext(TableContext);
|
|
77
|
-
useRegisterFluidHoverItem(ctx?.registerItem, index, internalRef);
|
|
78
|
-
const isBodyRow = index !== undefined;
|
|
79
|
-
const activeIdx = ctx?.activeIndex ?? null;
|
|
80
|
-
const hideBorder = activeIdx !== null && (isBodyRow && (index === activeIdx || index === activeIdx - 1) || !isBodyRow && activeIdx === 0);
|
|
81
|
-
return /* @__PURE__ */ jsx("tr", {
|
|
82
|
-
ref: (node) => {
|
|
83
|
-
internalRef.current = node;
|
|
84
|
-
if (typeof ref === "function")
|
|
85
|
-
ref(node);
|
|
86
|
-
else if (ref)
|
|
87
|
-
ref.current = node;
|
|
88
|
-
},
|
|
89
|
-
"data-fluid-hover-index": index,
|
|
90
|
-
className: cn("group/row relative z-10 border-b transition-[border-color] duration-fast", hideBorder ? "border-transparent" : "border-accent/40", isBodyRow && activeIdx === index && "is-active", isBodyRow ? "weight-normal" : "weight-semibold", className),
|
|
91
|
-
style,
|
|
92
|
-
...props
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
TableRow.displayName = "TableRow";
|
|
96
|
-
var TableHead = forwardRef(({ className, ...props }, ref) => {
|
|
97
|
-
const sizeClasses = useSize();
|
|
98
|
-
return /* @__PURE__ */ jsx("th", {
|
|
99
|
-
ref,
|
|
100
|
-
className: cn("text-left text-foreground", sizeClasses.variant === "compact" ? "px-2.5 py-[5px]" : "px-3 py-2", className),
|
|
101
|
-
...props
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
TableHead.displayName = "TableHead";
|
|
105
|
-
var TableCell = forwardRef(({ className, ...props }, ref) => {
|
|
106
|
-
const sizeClasses = useSize();
|
|
107
|
-
return /* @__PURE__ */ jsx("td", {
|
|
108
|
-
ref,
|
|
109
|
-
className: cn("text-muted-foreground transition-colors duration-fast group-[.is-active]/row:text-foreground", sizeClasses.variant === "compact" ? "px-2.5 py-[5px]" : "px-3 py-2", className),
|
|
110
|
-
...props
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
TableCell.displayName = "TableCell";
|
|
114
|
-
Object.assign(Table, {
|
|
115
|
-
Header: TableHeader,
|
|
116
|
-
Body: TableBody,
|
|
117
|
-
Row: TableRow,
|
|
118
|
-
Head: TableHead,
|
|
119
|
-
Cell: TableCell
|
|
120
|
-
});
|
|
121
|
-
var table_default = Table;
|
|
122
|
-
|
|
123
|
-
export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, table_default };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DialogClose,
|
|
3
|
-
DialogContent,
|
|
4
|
-
DialogDescription,
|
|
5
|
-
DialogFooter,
|
|
6
|
-
DialogHeader,
|
|
7
|
-
DialogState,
|
|
8
|
-
DialogTitle,
|
|
9
|
-
DialogTrigger
|
|
10
|
-
} from "./components-61ckf42z.js";
|
|
11
|
-
|
|
12
|
-
// components/overlays/alert-dialog/index.tsx
|
|
13
|
-
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
14
|
-
import { forwardRef } from "react";
|
|
15
|
-
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
var AlertDialogContent = forwardRef(({ showCloseButton = false, ...props }, ref) => /* @__PURE__ */ jsx(DialogContent, {
|
|
17
|
-
ref,
|
|
18
|
-
showCloseButton,
|
|
19
|
-
...props
|
|
20
|
-
}));
|
|
21
|
-
AlertDialogContent.displayName = "AlertDialogContent";
|
|
22
|
-
function AlertDialog({ children, open, defaultOpen, onOpenChange }) {
|
|
23
|
-
return /* @__PURE__ */ jsx(DialogState, {
|
|
24
|
-
open,
|
|
25
|
-
defaultOpen,
|
|
26
|
-
onOpenChange,
|
|
27
|
-
children: (root) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, {
|
|
28
|
-
...root,
|
|
29
|
-
children
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
AlertDialog.Trigger = DialogTrigger;
|
|
34
|
-
AlertDialog.Content = AlertDialogContent;
|
|
35
|
-
AlertDialog.Header = DialogHeader;
|
|
36
|
-
AlertDialog.Footer = DialogFooter;
|
|
37
|
-
AlertDialog.Title = DialogTitle;
|
|
38
|
-
AlertDialog.Description = DialogDescription;
|
|
39
|
-
AlertDialog.Close = DialogClose;
|
|
40
|
-
var alert_dialog_default = AlertDialog;
|
|
41
|
-
|
|
42
|
-
export { AlertDialogContent, AlertDialog, alert_dialog_default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined")
|
|
5
|
-
return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export { __require };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|