@justanarthur/modo-ui 0.0.0-stage → 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/LICENSE +21 -0
- package/LICENSE.beui +21 -0
- package/LICENSE.fluid-functionalism +21 -0
- package/LICENSE.motion-primitives +21 -0
- package/LICENSE.sileo +21 -0
- package/README.md +608 -2
- package/dist/base.css +994 -0
- package/dist/blocks/sidebar-app/index.d.ts +34 -0
- package/dist/blocks/sidebar-app/index.js +31 -0
- package/dist/components/badge/index.d.ts +59 -0
- package/dist/components/badge/index.js +16 -0
- package/dist/components/button/index.d.ts +59 -0
- package/dist/components/button/index.js +14 -0
- package/dist/components/card/index.d.ts +141 -0
- package/dist/components/card/index.js +42 -0
- package/dist/components/inputs/checkbox-group/index.d.ts +50 -0
- package/dist/components/inputs/checkbox-group/index.js +21 -0
- package/dist/components/inputs/color-picker/index.d.ts +137 -0
- package/dist/components/inputs/color-picker/index.js +35 -0
- package/dist/components/inputs/combobox/index.d.ts +161 -0
- package/dist/components/inputs/combobox/index.js +38 -0
- package/dist/components/inputs/date-time/calendar/index.d.ts +45 -0
- package/dist/components/inputs/date-time/calendar/index.js +18 -0
- package/dist/components/inputs/date-time/date-picker/index.d.ts +82 -0
- package/dist/components/inputs/date-time/date-picker/index.js +32 -0
- package/dist/components/inputs/date-time/date-range-picker/index.d.ts +64 -0
- package/dist/components/inputs/date-time/date-range-picker/index.js +31 -0
- package/dist/components/inputs/date-time/duration-picker/index.d.ts +57 -0
- package/dist/components/inputs/date-time/duration-picker/index.js +31 -0
- package/dist/components/inputs/date-time/month-picker/index.d.ts +57 -0
- package/dist/components/inputs/date-time/month-picker/index.js +30 -0
- package/dist/components/inputs/date-time/time-picker/index.d.ts +59 -0
- package/dist/components/inputs/date-time/time-picker/index.js +31 -0
- package/dist/components/inputs/input/index.d.ts +84 -0
- package/dist/components/inputs/input/index.js +19 -0
- package/dist/components/inputs/input-copy/index.d.ts +44 -0
- package/dist/components/inputs/input-copy/index.js +16 -0
- package/dist/components/inputs/input-message/index.d.ts +125 -0
- package/dist/components/inputs/input-message/index.js +25 -0
- package/dist/components/inputs/radio-group/index.d.ts +58 -0
- package/dist/components/inputs/radio-group/index.js +20 -0
- package/dist/components/inputs/search/index.d.ts +83 -0
- package/dist/components/inputs/search/index.js +25 -0
- package/dist/components/inputs/select/index.d.ts +105 -0
- package/dist/components/inputs/select/index.js +34 -0
- package/dist/components/inputs/slider/index.d.ts +108 -0
- package/dist/components/inputs/slider/index.js +14 -0
- package/dist/components/inputs/switch/index.d.ts +43 -0
- package/dist/components/inputs/switch/index.js +14 -0
- package/dist/components/navigation/accordion/index.d.ts +117 -0
- package/dist/components/navigation/accordion/index.js +28 -0
- package/dist/components/navigation/sidebar/index.d.ts +388 -0
- package/dist/components/navigation/sidebar/index.js +99 -0
- package/dist/components/navigation/tabs/index.d.ts +70 -0
- package/dist/components/navigation/tabs/index.js +23 -0
- package/dist/components/navigation/tabs-subtle/index.d.ts +73 -0
- package/dist/components/navigation/tabs-subtle/index.js +21 -0
- package/dist/components/overlays/alert-dialog/index.d.ts +67 -0
- package/dist/components/overlays/alert-dialog/index.js +22 -0
- package/dist/components/overlays/command/index.d.ts +121 -0
- package/dist/components/overlays/command/index.js +36 -0
- package/dist/components/overlays/context-menu/index.d.ts +97 -0
- package/dist/components/overlays/context-menu/index.js +29 -0
- package/dist/components/overlays/dialog/index.d.ts +130 -0
- package/dist/components/overlays/dialog/index.js +37 -0
- package/dist/components/overlays/dropdown/index.d.ts +222 -0
- package/dist/components/overlays/dropdown/index.js +44 -0
- package/dist/components/overlays/popover/index.d.ts +87 -0
- package/dist/components/overlays/popover/index.js +26 -0
- package/dist/components/overlays/preview-card/index.d.ts +75 -0
- package/dist/components/overlays/preview-card/index.js +19 -0
- package/dist/components/overlays/sheet/index.d.ts +67 -0
- package/dist/components/overlays/sheet/index.js +24 -0
- package/dist/components/overlays/toast/index.d.ts +107 -0
- package/dist/components/overlays/toast/index.js +21 -0
- package/dist/components/overlays/tooltip/index.d.ts +75 -0
- package/dist/components/overlays/tooltip/index.js +17 -0
- package/dist/components/table/index.d.ts +44 -0
- package/dist/components/table/index.js +26 -0
- package/dist/components/thinking-indicator/index.d.ts +32 -0
- package/dist/components/thinking-indicator/index.js +13 -0
- package/dist/index.d.ts +3926 -0
- package/dist/index.js +511 -0
- package/dist/preset.d.ts +104 -0
- package/dist/preset.js +124 -0
- package/dist/primitives/code/index.d.ts +23 -0
- package/dist/primitives/code/index.js +11 -0
- package/dist/primitives/craft/index.d.ts +31 -0
- package/dist/primitives/craft/index.js +11 -0
- package/dist/primitives/fluid-hover/index.d.ts +233 -0
- package/dist/primitives/fluid-hover/index.js +25 -0
- package/dist/primitives/morph/index.d.ts +127 -0
- package/dist/primitives/morph/index.js +19 -0
- package/dist/primitives/motion/index.d.ts +115 -0
- package/dist/primitives/motion/index.js +19 -0
- package/dist/primitives/scroll-area/index.d.ts +41 -0
- package/dist/primitives/scroll-area/index.js +12 -0
- package/dist/primitives/sizes/index.d.ts +128 -0
- package/dist/primitives/sizes/index.js +21 -0
- package/dist/primitives/surface/index.d.ts +69 -0
- package/dist/primitives/surface/index.js +17 -0
- package/dist/shared/components-0ke6xada.js +123 -0
- package/dist/shared/components-0q0sqfh4.js +146 -0
- package/dist/shared/components-0sn7ypjw.js +61 -0
- package/dist/shared/components-1j9791sn.js +345 -0
- package/dist/shared/components-1rfwbyyc.js +361 -0
- package/dist/shared/components-1v7rxytx.js +30 -0
- package/dist/shared/components-1xekx2hx.js +215 -0
- package/dist/shared/components-39jq9va1.js +86 -0
- package/dist/shared/components-3gae8nta.js +719 -0
- package/dist/shared/components-3k8xpnpq.js +1759 -0
- package/dist/shared/components-3ky44908.js +9 -0
- package/dist/shared/components-3mkepka5.js +111 -0
- package/dist/shared/components-3wk0w46f.js +667 -0
- package/dist/shared/components-4cnjmgex.js +124 -0
- package/dist/shared/components-59efxjd9.js +298 -0
- package/dist/shared/components-5xc2j8jz.js +159 -0
- package/dist/shared/components-62ybc7t2.js +496 -0
- package/dist/shared/components-66mv71kx.js +262 -0
- package/dist/shared/components-7ans7ce5.js +120 -0
- package/dist/shared/components-7btqt08d.js +270 -0
- package/dist/shared/components-7r3etddy.js +171 -0
- package/dist/shared/components-7x9kawxv.js +152 -0
- package/dist/shared/components-8fpr3s4p.js +292 -0
- package/dist/shared/components-9jvzzvt1.js +198 -0
- package/dist/shared/components-apdwtweq.js +484 -0
- package/dist/shared/components-asr5pg50.js +191 -0
- package/dist/shared/components-b2wyq2cq.js +232 -0
- package/dist/shared/components-c6s6b43g.js +15 -0
- package/dist/shared/components-ca2c898n.js +1828 -0
- package/dist/shared/components-cbxjn9p8.js +141 -0
- package/dist/shared/components-chacnk61.js +216 -0
- package/dist/shared/components-cv16mryv.js +62 -0
- package/dist/shared/components-ez65vtbq.js +110 -0
- package/dist/shared/components-ezxhrmer.js +17 -0
- package/dist/shared/components-gc5vtq2f.js +149 -0
- package/dist/shared/components-gf5s6ap9.js +42 -0
- package/dist/shared/components-gvr9w41t.js +193 -0
- package/dist/shared/components-h2dpcwgc.js +137 -0
- package/dist/shared/components-hawvy2qz.js +105 -0
- package/dist/shared/components-hqeq3w9q.js +375 -0
- package/dist/shared/components-jjw69c4c.js +28 -0
- package/dist/shared/components-jwst3vtj.js +346 -0
- package/dist/shared/components-kvr7f9hy.js +45 -0
- package/dist/shared/components-men63rwj.js +9 -0
- package/dist/shared/components-mhd39z7x.js +22 -0
- package/dist/shared/components-n7mjr357.js +26 -0
- package/dist/shared/components-ng72k97e.js +128 -0
- package/dist/shared/components-nh8tma1n.js +986 -0
- package/dist/shared/components-njzgqdwy.js +445 -0
- package/dist/shared/components-ny774h8p.js +293 -0
- package/dist/shared/components-q4daerx0.js +58 -0
- package/dist/shared/components-q5xj5c16.js +79 -0
- package/dist/shared/components-rr7a6ja9.js +160 -0
- package/dist/shared/components-s2bz1xpk.js +63 -0
- package/dist/shared/components-tqvarbfv.js +288 -0
- package/dist/shared/components-v6xp325t.js +304 -0
- package/dist/shared/components-v7wtz8hk.js +144 -0
- package/dist/shared/components-vc7vq5nz.js +32 -0
- package/dist/shared/components-vfbhxf5r.js +58 -0
- package/dist/shared/components-vynjtrk6.js +19 -0
- package/dist/shared/components-wvp1m52g.js +1200 -0
- package/dist/shared/components-yh3kwdhr.js +981 -0
- package/dist/shared/components-ytb2tefr.js +291 -0
- package/dist/shared/components-zfnmn5d4.js +220 -0
- package/dist/shared/components-zrkzcayz.js +141 -0
- package/dist/shared/components-zx6b6yby.js +42 -0
- package/dist/styles.css +1949 -0
- package/dist/tailwind.css +219 -0
- package/dist/tokens.css +345 -0
- package/package.json +103 -4
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MorphSurface
|
|
3
|
+
} from "./components-0q0sqfh4.js";
|
|
4
|
+
import {
|
|
5
|
+
opensInPlace,
|
|
6
|
+
inPlaceOffset,
|
|
7
|
+
useMorphOrigin,
|
|
8
|
+
useMorph
|
|
9
|
+
} from "./components-hqeq3w9q.js";
|
|
10
|
+
import {
|
|
11
|
+
cn2
|
|
12
|
+
} from "./components-ezxhrmer.js";
|
|
13
|
+
import {
|
|
14
|
+
useShape
|
|
15
|
+
} from "./components-cv16mryv.js";
|
|
16
|
+
import {
|
|
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
|
+
|
|
26
|
+
// components/overlays/preview-card/index.tsx
|
|
27
|
+
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
28
|
+
import {
|
|
29
|
+
createContext,
|
|
30
|
+
forwardRef,
|
|
31
|
+
useContext,
|
|
32
|
+
useImperativeHandle,
|
|
33
|
+
useMemo
|
|
34
|
+
} from "react";
|
|
35
|
+
import { jsx } from "react/jsx-runtime";
|
|
36
|
+
var PreviewCardContext = createContext({ open: false, origin: { current: {} } });
|
|
37
|
+
var PreviewCardTrigger2 = forwardRef(({ render, className, ...props }, ref) => /* @__PURE__ */ jsx(PreviewCardPrimitive.Trigger, {
|
|
38
|
+
ref,
|
|
39
|
+
render,
|
|
40
|
+
className: cn2(!render && "weight-medium text-foreground underline decoration-border underline-offset-4 transition-colors duration-fast hover:decoration-foreground", className),
|
|
41
|
+
...props
|
|
42
|
+
}));
|
|
43
|
+
PreviewCardTrigger2.displayName = "PreviewCardTrigger";
|
|
44
|
+
var PreviewCardContent2 = forwardRef(({
|
|
45
|
+
side = "bottom",
|
|
46
|
+
align,
|
|
47
|
+
sideOffset = 12,
|
|
48
|
+
from,
|
|
49
|
+
effect,
|
|
50
|
+
hideSource,
|
|
51
|
+
tier,
|
|
52
|
+
container,
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
...props
|
|
56
|
+
}, ref) => {
|
|
57
|
+
const { open, origin } = useContext(PreviewCardContext);
|
|
58
|
+
const morph = useMorph(open, origin, { from, effect, hideSource, tier });
|
|
59
|
+
const inPlace = opensInPlace({ effect, hideSource });
|
|
60
|
+
useImperativeHandle(ref, () => morph.popup, [morph.popup]);
|
|
61
|
+
const shape = useShape();
|
|
62
|
+
const level = Math.min(useSurface2() + 2, 8);
|
|
63
|
+
return /* @__PURE__ */ jsx(PreviewCardPrimitive.Portal, {
|
|
64
|
+
container: container ?? undefined,
|
|
65
|
+
children: /* @__PURE__ */ jsx(PreviewCardPrimitive.Positioner, {
|
|
66
|
+
side,
|
|
67
|
+
align: align ?? (inPlace ? "start" : "center"),
|
|
68
|
+
sideOffset: inPlace ? inPlaceOffset : sideOffset,
|
|
69
|
+
className: "z-50 outline-none",
|
|
70
|
+
children: /* @__PURE__ */ jsx(PreviewCardPrimitive.Popup, {
|
|
71
|
+
ref: morph.popupRef,
|
|
72
|
+
className: "relative outline-none",
|
|
73
|
+
...props,
|
|
74
|
+
children: /* @__PURE__ */ jsx(SurfaceProvider2, {
|
|
75
|
+
value: level,
|
|
76
|
+
children: /* @__PURE__ */ jsx(MorphSurface, {
|
|
77
|
+
morph,
|
|
78
|
+
bg: SURFACE_BG[level],
|
|
79
|
+
shadow: SURFACE_SHADOW[3],
|
|
80
|
+
radius: shape.container,
|
|
81
|
+
className: cn2("flex w-max max-w-[min(92vw,20rem)] flex-col gap-3 p-4", className),
|
|
82
|
+
children
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
PreviewCardContent2.displayName = "PreviewCardContent";
|
|
90
|
+
function PreviewCard2({ open, defaultOpen = false, onOpenChange, children }) {
|
|
91
|
+
const [current, setCurrent] = useControllableState(open, defaultOpen, onOpenChange);
|
|
92
|
+
const { origin, capture } = useMorphOrigin();
|
|
93
|
+
const ctx = useMemo(() => ({ open: current, origin }), [current, origin]);
|
|
94
|
+
return /* @__PURE__ */ jsx(PreviewCardContext.Provider, {
|
|
95
|
+
value: ctx,
|
|
96
|
+
children: /* @__PURE__ */ jsx(PreviewCardPrimitive.Root, {
|
|
97
|
+
open: current,
|
|
98
|
+
onOpenChange: (next, details) => {
|
|
99
|
+
if (next)
|
|
100
|
+
capture(details);
|
|
101
|
+
setCurrent(next);
|
|
102
|
+
},
|
|
103
|
+
children
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
PreviewCard2.Trigger = PreviewCardTrigger2;
|
|
108
|
+
PreviewCard2.Content = PreviewCardContent2;
|
|
109
|
+
var preview_card_default = PreviewCard2;
|
|
110
|
+
|
|
111
|
+
export { PreviewCardTrigger2, PreviewCardContent2, PreviewCard2, preview_card_default };
|