@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,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
calendar_default
|
|
3
|
-
} from "./components-6phwsry6.js";
|
|
4
|
-
import {
|
|
5
|
-
PickerInput,
|
|
6
|
-
PickerShell
|
|
7
|
-
} from "./components-hzfp4tjb.js";
|
|
8
1
|
import {
|
|
9
2
|
defaultLocale,
|
|
10
3
|
parseDateText
|
|
11
|
-
} from "./components-
|
|
4
|
+
} from "./components-9jvzzvt1.js";
|
|
12
5
|
import {
|
|
13
6
|
useControllableState
|
|
14
|
-
} from "./components-
|
|
7
|
+
} from "./components-n7mjr357.js";
|
|
8
|
+
import {
|
|
9
|
+
calendar_default
|
|
10
|
+
} from "./components-1rfwbyyc.js";
|
|
11
|
+
import {
|
|
12
|
+
PickerShell,
|
|
13
|
+
PickerInput
|
|
14
|
+
} from "./components-7btqt08d.js";
|
|
15
15
|
|
|
16
16
|
// components/inputs/date-time/date-range-picker/index.tsx
|
|
17
17
|
import { endOfMonth, format } from "date-fns";
|
|
18
18
|
import { useRef, useState } from "react";
|
|
19
19
|
import { dateMatchModifiers } from "react-day-picker";
|
|
20
20
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
21
|
-
function
|
|
21
|
+
function DateRangePicker2({
|
|
22
22
|
value: valueProp,
|
|
23
23
|
defaultValue = null,
|
|
24
24
|
onValueChange,
|
|
@@ -136,6 +136,6 @@ function DateRangePicker({
|
|
|
136
136
|
})
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
var date_range_picker_default =
|
|
139
|
+
var date_range_picker_default = DateRangePicker2;
|
|
140
140
|
|
|
141
|
-
export {
|
|
141
|
+
export { DateRangePicker2, date_range_picker_default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GOO_BLUR_RATIO,
|
|
3
|
-
GOO_MATRIX
|
|
4
|
-
} from "./components-7nww01w4.js";
|
|
5
1
|
import {
|
|
6
2
|
useReduceMotion
|
|
7
|
-
} from "./components-
|
|
3
|
+
} from "./components-men63rwj.js";
|
|
4
|
+
import {
|
|
5
|
+
GOO_MATRIX,
|
|
6
|
+
GOO_BLUR_RATIO
|
|
7
|
+
} from "./components-hqeq3w9q.js";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./components-
|
|
9
|
+
cn2
|
|
10
|
+
} from "./components-ezxhrmer.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./components-
|
|
12
|
+
spring2
|
|
13
|
+
} from "./components-1v7rxytx.js";
|
|
14
14
|
|
|
15
15
|
// lib/goo-indicator.tsx
|
|
16
16
|
import { animate, motion, useMotionValue } from "motion/react";
|
|
@@ -113,7 +113,7 @@ function GooLayer({ active, blur, box, fill, children }) {
|
|
|
113
113
|
style: { ...layer, filter: active ? `url(#${id})` : undefined },
|
|
114
114
|
children: /* @__PURE__ */ jsx("div", {
|
|
115
115
|
ref: probe,
|
|
116
|
-
className:
|
|
116
|
+
className: cn2(fill, "absolute"),
|
|
117
117
|
style: { left: -layer.left, top: -layer.top },
|
|
118
118
|
children
|
|
119
119
|
})
|
|
@@ -126,7 +126,7 @@ function GooIndicator({
|
|
|
126
126
|
from,
|
|
127
127
|
className,
|
|
128
128
|
shadow,
|
|
129
|
-
transition =
|
|
129
|
+
transition = spring2.moderate,
|
|
130
130
|
opacity = 1
|
|
131
131
|
}) {
|
|
132
132
|
const reduced = useReduceMotion();
|
|
@@ -165,7 +165,7 @@ function GooIndicator({
|
|
|
165
165
|
}, [rect.left, rect.top, rect.width, rect.height]);
|
|
166
166
|
const melting = trails.length > 0;
|
|
167
167
|
const linger = travel ? { ...travel, delay: (travel.duration ?? 0) / 3 } : undefined;
|
|
168
|
-
const shape =
|
|
168
|
+
const shape = cn2("pointer-events-none absolute top-0 left-0", className);
|
|
169
169
|
const box = trails.reduce((all, trail) => union(all, trail.from), union(read(), rect));
|
|
170
170
|
const drop = (trail) => setTrails((list) => list.filter((t) => t.id !== trail.id));
|
|
171
171
|
return /* @__PURE__ */ jsxs(motion.div, {
|
|
@@ -173,18 +173,18 @@ function GooIndicator({
|
|
|
173
173
|
className: "pointer-events-none absolute top-0 left-0",
|
|
174
174
|
initial: false,
|
|
175
175
|
animate: { opacity },
|
|
176
|
-
transition: { duration:
|
|
176
|
+
transition: { duration: spring2.fast.duration },
|
|
177
177
|
children: [
|
|
178
178
|
shadow && /* @__PURE__ */ jsxs(Fragment, {
|
|
179
179
|
children: [
|
|
180
180
|
trails.map((trail) => /* @__PURE__ */ jsx(motion.div, {
|
|
181
|
-
className:
|
|
181
|
+
className: cn2(shape, shadow),
|
|
182
182
|
initial: { ...toTarget(trail.from), opacity: 1 },
|
|
183
183
|
animate: { ...toTarget(trail.to), opacity: 0 },
|
|
184
184
|
transition: linger
|
|
185
185
|
}, trail.id)),
|
|
186
186
|
/* @__PURE__ */ jsx(motion.div, {
|
|
187
|
-
className:
|
|
187
|
+
className: cn2(shape, shadow, !melting && "invisible"),
|
|
188
188
|
style: { x, y, width, height }
|
|
189
189
|
})
|
|
190
190
|
]
|
|
@@ -204,7 +204,7 @@ function GooIndicator({
|
|
|
204
204
|
}, trail.id)),
|
|
205
205
|
/* @__PURE__ */ jsx(motion.div, {
|
|
206
206
|
ref: lead,
|
|
207
|
-
className:
|
|
207
|
+
className: cn2(shape, !melting && shadow),
|
|
208
208
|
style: { x, y, width, height }
|
|
209
209
|
})
|
|
210
210
|
]
|
|
@@ -34,7 +34,7 @@ function useShape() {
|
|
|
34
34
|
return shapeMap.rounded;
|
|
35
35
|
return ctx.classes;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function ShapeProvider2({ children, defaultShape = "rounded" }) {
|
|
38
38
|
const [shape, setShapeState] = useState(defaultShape);
|
|
39
39
|
const transitionTimeoutRef = useRef(null);
|
|
40
40
|
const transitionShape = useCallback((callback) => {
|
|
@@ -59,4 +59,4 @@ function ShapeProvider({ children, defaultShape = "rounded" }) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export { shapeMap, useShape,
|
|
62
|
+
export { shapeMap, useShape, ShapeProvider2 };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TimeColumns,
|
|
3
|
-
pad
|
|
4
|
-
} from "./components-r4jt6hgd.js";
|
|
5
|
-
import {
|
|
6
|
-
PickerInput,
|
|
7
|
-
PickerShell
|
|
8
|
-
} from "./components-hzfp4tjb.js";
|
|
9
1
|
import {
|
|
10
2
|
defaultLocale,
|
|
11
|
-
dividedColumns,
|
|
12
3
|
hourCycleOf,
|
|
13
|
-
parseTimeText
|
|
14
|
-
|
|
4
|
+
parseTimeText,
|
|
5
|
+
dividedColumns
|
|
6
|
+
} from "./components-9jvzzvt1.js";
|
|
7
|
+
import {
|
|
8
|
+
cn2
|
|
9
|
+
} from "./components-ezxhrmer.js";
|
|
15
10
|
import {
|
|
16
11
|
useControllableState
|
|
17
|
-
} from "./components-
|
|
12
|
+
} from "./components-n7mjr357.js";
|
|
13
|
+
import {
|
|
14
|
+
PickerShell,
|
|
15
|
+
PickerInput
|
|
16
|
+
} from "./components-7btqt08d.js";
|
|
18
17
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
pad,
|
|
19
|
+
TimeColumns
|
|
20
|
+
} from "./components-q4daerx0.js";
|
|
21
21
|
|
|
22
22
|
// components/inputs/date-time/time-picker/index.tsx
|
|
23
23
|
import { format, set } from "date-fns";
|
|
@@ -28,7 +28,7 @@ var toTime = (value) => {
|
|
|
28
28
|
return hours === undefined || minutes === undefined ? null : { hours, minutes };
|
|
29
29
|
};
|
|
30
30
|
var toValue = ({ hours, minutes }) => `${pad(hours)}:${pad(minutes)}`;
|
|
31
|
-
function
|
|
31
|
+
function TimePicker2({
|
|
32
32
|
value: valueProp,
|
|
33
33
|
defaultValue = null,
|
|
34
34
|
onValueChange,
|
|
@@ -92,7 +92,7 @@ function TimePicker({
|
|
|
92
92
|
tier,
|
|
93
93
|
className,
|
|
94
94
|
children: /* @__PURE__ */ jsx("div", {
|
|
95
|
-
className:
|
|
95
|
+
className: cn2(dividedColumns, "h-56"),
|
|
96
96
|
children: /* @__PURE__ */ jsx(TimeColumns, {
|
|
97
97
|
value: time,
|
|
98
98
|
onValueChange: (next) => setValue(toValue(next)),
|
|
@@ -105,6 +105,6 @@ function TimePicker({
|
|
|
105
105
|
})
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
var time_picker_default =
|
|
108
|
+
var time_picker_default = TimePicker2;
|
|
109
109
|
|
|
110
|
-
export {
|
|
110
|
+
export { TimePicker2, time_picker_default };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createCn } from "cn/config";
|
|
3
3
|
var TYPE_ROLES = ["display", "title", "subtitle", "body", "caption", "micro"];
|
|
4
4
|
var TIERS = ["fast", "fast-exit", "moderate", "moderate-exit", "slow", "slow-exit"];
|
|
5
|
-
var
|
|
5
|
+
var cn2 = createCn({
|
|
6
6
|
extend: {
|
|
7
7
|
classGroups: {
|
|
8
8
|
"font-size": [{ text: TYPE_ROLES.flatMap((role) => [role, `${role}-compact`]) }],
|
|
@@ -14,4 +14,4 @@ var cn = createCn({
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { cn2 };
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./components-
|
|
2
|
+
MorphSurface
|
|
3
|
+
} from "./components-0q0sqfh4.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from "./components-
|
|
5
|
+
opensInPlace,
|
|
6
|
+
inPlaceOffset,
|
|
7
|
+
useMorphOrigin,
|
|
8
|
+
useMorph
|
|
9
|
+
} from "./components-hqeq3w9q.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./components-
|
|
11
|
+
cn2
|
|
12
|
+
} from "./components-ezxhrmer.js";
|
|
13
13
|
import {
|
|
14
14
|
useShape
|
|
15
|
-
} from "./components-
|
|
15
|
+
} from "./components-cv16mryv.js";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
} from "./components-
|
|
17
|
+
slotRender
|
|
18
|
+
} from "./components-3ky44908.js";
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from "./components-
|
|
20
|
+
SURFACE_BG,
|
|
21
|
+
SURFACE_SHADOW,
|
|
22
|
+
useSurface2,
|
|
23
|
+
SurfaceProvider2
|
|
24
|
+
} from "./components-zx6b6yby.js";
|
|
25
25
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./components-
|
|
26
|
+
useControllableState
|
|
27
|
+
} from "./components-n7mjr357.js";
|
|
28
28
|
|
|
29
29
|
// components/overlays/popover/index.tsx
|
|
30
30
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
} from "react";
|
|
38
38
|
import { jsx } from "react/jsx-runtime";
|
|
39
39
|
var PopoverContext = createContext({ open: false, origin: { current: {} } });
|
|
40
|
-
var
|
|
40
|
+
var PopoverTrigger2 = forwardRef(({ render, asChild, children, ...props }, ref) => {
|
|
41
41
|
const el = slotRender(render, asChild, children);
|
|
42
42
|
return el ? /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
|
|
43
43
|
ref,
|
|
@@ -49,8 +49,8 @@ var PopoverTrigger = forwardRef(({ render, asChild, children, ...props }, ref) =
|
|
|
49
49
|
children
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
|
-
|
|
53
|
-
var
|
|
52
|
+
PopoverTrigger2.displayName = "PopoverTrigger";
|
|
53
|
+
var PopoverClose2 = forwardRef(({ render, asChild, children, ...props }, ref) => {
|
|
54
54
|
const el = slotRender(render, asChild, children);
|
|
55
55
|
return el ? /* @__PURE__ */ jsx(PopoverPrimitive.Close, {
|
|
56
56
|
ref,
|
|
@@ -62,8 +62,8 @@ var PopoverClose = forwardRef(({ render, asChild, children, ...props }, ref) =>
|
|
|
62
62
|
children
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
var
|
|
65
|
+
PopoverClose2.displayName = "PopoverClose";
|
|
66
|
+
var PopoverContent2 = forwardRef(({
|
|
67
67
|
side = "bottom",
|
|
68
68
|
align,
|
|
69
69
|
sideOffset = 12,
|
|
@@ -81,7 +81,7 @@ var PopoverContent = forwardRef(({
|
|
|
81
81
|
const inPlace = opensInPlace({ effect, hideSource });
|
|
82
82
|
useImperativeHandle(ref, () => morph.popup, [morph.popup]);
|
|
83
83
|
const shape = useShape();
|
|
84
|
-
const level = Math.min(
|
|
84
|
+
const level = Math.min(useSurface2() + 2, 8);
|
|
85
85
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, {
|
|
86
86
|
container: container ?? undefined,
|
|
87
87
|
children: /* @__PURE__ */ jsx(PopoverPrimitive.Positioner, {
|
|
@@ -93,14 +93,14 @@ var PopoverContent = forwardRef(({
|
|
|
93
93
|
ref: morph.popupRef,
|
|
94
94
|
className: "relative outline-none",
|
|
95
95
|
...props,
|
|
96
|
-
children: /* @__PURE__ */ jsx(
|
|
96
|
+
children: /* @__PURE__ */ jsx(SurfaceProvider2, {
|
|
97
97
|
value: level,
|
|
98
98
|
children: /* @__PURE__ */ jsx(MorphSurface, {
|
|
99
99
|
morph,
|
|
100
100
|
bg: SURFACE_BG[level],
|
|
101
101
|
shadow: SURFACE_SHADOW[3],
|
|
102
102
|
radius: shape.container,
|
|
103
|
-
className:
|
|
103
|
+
className: cn2("flex w-max max-w-[min(92vw,20rem)] flex-col gap-1 p-4", className),
|
|
104
104
|
children
|
|
105
105
|
})
|
|
106
106
|
})
|
|
@@ -108,20 +108,20 @@ var PopoverContent = forwardRef(({
|
|
|
108
108
|
})
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
var
|
|
111
|
+
PopoverContent2.displayName = "PopoverContent";
|
|
112
|
+
var PopoverTitle2 = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Title, {
|
|
113
113
|
ref,
|
|
114
|
-
className:
|
|
114
|
+
className: cn2("text-subtitle weight-semibold text-foreground", className),
|
|
115
115
|
...props
|
|
116
116
|
}));
|
|
117
|
-
|
|
118
|
-
var
|
|
117
|
+
PopoverTitle2.displayName = "PopoverTitle";
|
|
118
|
+
var PopoverDescription2 = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Description, {
|
|
119
119
|
ref,
|
|
120
|
-
className:
|
|
120
|
+
className: cn2("text-caption text-muted-foreground", className),
|
|
121
121
|
...props
|
|
122
122
|
}));
|
|
123
|
-
|
|
124
|
-
function
|
|
123
|
+
PopoverDescription2.displayName = "PopoverDescription";
|
|
124
|
+
function Popover2({ open, defaultOpen = false, onOpenChange, modal = false, children }) {
|
|
125
125
|
const [current, setCurrent] = useControllableState(open, defaultOpen, onOpenChange);
|
|
126
126
|
const { origin, capture } = useMorphOrigin();
|
|
127
127
|
const ctx = useMemo(() => ({ open: current, origin }), [current, origin]);
|
|
@@ -139,11 +139,11 @@ function Popover({ open, defaultOpen = false, onOpenChange, modal = false, child
|
|
|
139
139
|
})
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
var popover_default =
|
|
142
|
+
Popover2.Trigger = PopoverTrigger2;
|
|
143
|
+
Popover2.Content = PopoverContent2;
|
|
144
|
+
Popover2.Title = PopoverTitle2;
|
|
145
|
+
Popover2.Description = PopoverDescription2;
|
|
146
|
+
Popover2.Close = PopoverClose2;
|
|
147
|
+
var popover_default = Popover2;
|
|
148
148
|
|
|
149
|
-
export {
|
|
149
|
+
export { PopoverTrigger2, PopoverClose2, PopoverContent2, PopoverTitle2, PopoverDescription2, Popover2, popover_default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DialogTrigger2,
|
|
3
|
+
DialogClose2,
|
|
4
|
+
DialogContent2,
|
|
5
|
+
DialogHeader2,
|
|
6
|
+
DialogFooter2,
|
|
7
|
+
DialogTitle2,
|
|
8
|
+
DialogDescription2,
|
|
9
|
+
DialogState2
|
|
10
|
+
} from "./components-zfnmn5d4.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 AlertDialogContent2 = forwardRef(({ showCloseButton = false, ...props }, ref) => /* @__PURE__ */ jsx(DialogContent2, {
|
|
17
|
+
ref,
|
|
18
|
+
showCloseButton,
|
|
19
|
+
...props
|
|
20
|
+
}));
|
|
21
|
+
AlertDialogContent2.displayName = "AlertDialogContent";
|
|
22
|
+
function AlertDialog2({ children, open, defaultOpen, onOpenChange }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(DialogState2, {
|
|
24
|
+
open,
|
|
25
|
+
defaultOpen,
|
|
26
|
+
onOpenChange,
|
|
27
|
+
children: (root) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, {
|
|
28
|
+
...root,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
AlertDialog2.Trigger = DialogTrigger2;
|
|
34
|
+
AlertDialog2.Content = AlertDialogContent2;
|
|
35
|
+
AlertDialog2.Header = DialogHeader2;
|
|
36
|
+
AlertDialog2.Footer = DialogFooter2;
|
|
37
|
+
AlertDialog2.Title = DialogTitle2;
|
|
38
|
+
AlertDialog2.Description = DialogDescription2;
|
|
39
|
+
AlertDialog2.Close = DialogClose2;
|
|
40
|
+
var alert_dialog_default = AlertDialog2;
|
|
41
|
+
|
|
42
|
+
export { AlertDialogContent2, AlertDialog2, alert_dialog_default };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./components-
|
|
5
|
-
import {
|
|
6
|
-
SizeProvider
|
|
7
|
-
} from "./components-vb033rns.js";
|
|
8
|
-
import {
|
|
9
|
-
useFluidHover,
|
|
10
|
-
useRegisterFluidHoverItem
|
|
11
|
-
} from "./components-e46kf6cp.js";
|
|
2
|
+
fieldVariants,
|
|
3
|
+
fieldIconClasses
|
|
4
|
+
} from "./components-mhd39z7x.js";
|
|
12
5
|
import {
|
|
13
6
|
useShape
|
|
14
|
-
} from "./components-
|
|
7
|
+
} from "./components-cv16mryv.js";
|
|
8
|
+
import {
|
|
9
|
+
useSize2
|
|
10
|
+
} from "./components-0sn7ypjw.js";
|
|
15
11
|
import {
|
|
16
12
|
useControllableState
|
|
17
|
-
} from "./components-
|
|
13
|
+
} from "./components-n7mjr357.js";
|
|
14
|
+
import {
|
|
15
|
+
useFluidHover2,
|
|
16
|
+
useRegisterFluidHoverItem2
|
|
17
|
+
} from "./components-59efxjd9.js";
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
} from "./components-
|
|
19
|
+
cn2
|
|
20
|
+
} from "./components-ezxhrmer.js";
|
|
21
21
|
import {
|
|
22
|
-
|
|
23
|
-
} from "./components-
|
|
22
|
+
SizeProvider2
|
|
23
|
+
} from "./components-jjw69c4c.js";
|
|
24
24
|
|
|
25
25
|
// components/inputs/input/index.tsx
|
|
26
26
|
import { Field } from "@base-ui/react/field";
|
|
@@ -40,7 +40,7 @@ function useInputGroup() {
|
|
|
40
40
|
return ctx;
|
|
41
41
|
}
|
|
42
42
|
var FieldStateContext = createContext(null);
|
|
43
|
-
var
|
|
43
|
+
var Input2 = forwardRef(({
|
|
44
44
|
icon: Icon,
|
|
45
45
|
value: valueProp,
|
|
46
46
|
defaultValue = "",
|
|
@@ -55,7 +55,7 @@ var Input = forwardRef(({
|
|
|
55
55
|
const inputRef = useRef(null);
|
|
56
56
|
const field = useContext(FieldStateContext);
|
|
57
57
|
const shape = useShape();
|
|
58
|
-
const sizeClasses =
|
|
58
|
+
const sizeClasses = useSize2(size);
|
|
59
59
|
const compact = sizeClasses.variant === "compact";
|
|
60
60
|
return /* @__PURE__ */ jsxs("div", {
|
|
61
61
|
onMouseDown: (e) => {
|
|
@@ -67,7 +67,7 @@ var Input = forwardRef(({
|
|
|
67
67
|
"data-active": field?.active || undefined,
|
|
68
68
|
"data-invalid": invalid || undefined,
|
|
69
69
|
"data-disabled": disabled || undefined,
|
|
70
|
-
className:
|
|
70
|
+
className: cn2(fieldVariants(), "flex items-center", sizeClasses.gap, shape.input, compact ? "px-2" : "px-2.5", sizeClasses.control, className),
|
|
71
71
|
children: [
|
|
72
72
|
Icon && /* @__PURE__ */ jsx(Icon, {
|
|
73
73
|
size: sizeClasses.icon,
|
|
@@ -88,19 +88,19 @@ var Input = forwardRef(({
|
|
|
88
88
|
onChange: (e) => onChange(e.target.value),
|
|
89
89
|
disabled,
|
|
90
90
|
"aria-invalid": invalid || undefined,
|
|
91
|
-
className:
|
|
91
|
+
className: cn2("w-full rounded-none bg-transparent text-foreground placeholder:text-muted-foreground outline-none font-[inherit]", sizeClasses.text, "weight-normal"),
|
|
92
92
|
...props
|
|
93
93
|
})
|
|
94
94
|
]
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
|
-
|
|
98
|
-
var
|
|
99
|
-
const sizeClasses =
|
|
97
|
+
Input2.displayName = "Input";
|
|
98
|
+
var Label2 = forwardRef(({ children, invalid, size, className, ...props }, ref) => {
|
|
99
|
+
const sizeClasses = useSize2(size);
|
|
100
100
|
const compact = sizeClasses.variant === "compact";
|
|
101
101
|
return /* @__PURE__ */ jsxs("label", {
|
|
102
102
|
ref,
|
|
103
|
-
className:
|
|
103
|
+
className: cn2("inline-grid", sizeClasses.text, "data-[disabled]:opacity-50", compact ? "pl-2" : "pl-2.5", className),
|
|
104
104
|
...props,
|
|
105
105
|
children: [
|
|
106
106
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -109,16 +109,16 @@ var Label = forwardRef(({ children, invalid, size, className, ...props }, ref) =
|
|
|
109
109
|
children
|
|
110
110
|
}),
|
|
111
111
|
/* @__PURE__ */ jsx("span", {
|
|
112
|
-
className:
|
|
112
|
+
className: cn2("col-start-1 row-start-1", invalid ? "text-destructive" : "text-muted-foreground", "weight-normal"),
|
|
113
113
|
children
|
|
114
114
|
})
|
|
115
115
|
]
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
|
-
|
|
119
|
-
var
|
|
118
|
+
Label2.displayName = "Label";
|
|
119
|
+
var InputGroup2 = forwardRef(({ children, size, className, ...props }, ref) => {
|
|
120
120
|
const containerRef = useRef(null);
|
|
121
|
-
const { activeIndex, handlers, registerItem } =
|
|
121
|
+
const { activeIndex, handlers, registerItem } = useFluidHover2(containerRef);
|
|
122
122
|
const contextValue = useMemo(() => ({ registerItem, activeIndex }), [registerItem, activeIndex]);
|
|
123
123
|
const group = /* @__PURE__ */ jsx(InputGroupContext.Provider, {
|
|
124
124
|
value: contextValue,
|
|
@@ -133,23 +133,23 @@ var InputGroup = forwardRef(({ children, size, className, ...props }, ref) => {
|
|
|
133
133
|
onMouseEnter: handlers.onMouseEnter,
|
|
134
134
|
onMouseMove: handlers.onMouseMove,
|
|
135
135
|
onMouseLeave: handlers.onMouseLeave,
|
|
136
|
-
className:
|
|
136
|
+
className: cn2("relative flex flex-col gap-3 w-72 max-w-full", className),
|
|
137
137
|
...props,
|
|
138
138
|
children
|
|
139
139
|
})
|
|
140
140
|
});
|
|
141
|
-
return size ? /* @__PURE__ */ jsx(
|
|
141
|
+
return size ? /* @__PURE__ */ jsx(SizeProvider2, {
|
|
142
142
|
size,
|
|
143
143
|
children: group
|
|
144
144
|
}) : group;
|
|
145
145
|
});
|
|
146
|
-
|
|
146
|
+
InputGroup2.displayName = "InputGroup";
|
|
147
147
|
var InputField = forwardRef(({ label, labelHidden, index, error, disabled, className, ...props }, ref) => {
|
|
148
148
|
const internalRef = useRef(null);
|
|
149
149
|
const { registerItem, activeIndex } = useInputGroup();
|
|
150
|
-
const sizeClasses =
|
|
150
|
+
const sizeClasses = useSize2();
|
|
151
151
|
const compact = sizeClasses.variant === "compact";
|
|
152
|
-
|
|
152
|
+
useRegisterFluidHoverItem2(registerItem, index, internalRef);
|
|
153
153
|
const fieldState = useMemo(() => ({ active: activeIndex === index }), [activeIndex, index]);
|
|
154
154
|
return /* @__PURE__ */ jsxs(Field.Root, {
|
|
155
155
|
ref: (node) => {
|
|
@@ -161,10 +161,10 @@ var InputField = forwardRef(({ label, labelHidden, index, error, disabled, class
|
|
|
161
161
|
},
|
|
162
162
|
invalid: !!error,
|
|
163
163
|
disabled,
|
|
164
|
-
className:
|
|
164
|
+
className: cn2("flex flex-col gap-1 cursor-text", disabled && "pointer-events-none", className),
|
|
165
165
|
children: [
|
|
166
166
|
/* @__PURE__ */ jsx(Field.Label, {
|
|
167
|
-
render: /* @__PURE__ */ jsx(
|
|
167
|
+
render: /* @__PURE__ */ jsx(Label2, {
|
|
168
168
|
invalid: !!error,
|
|
169
169
|
className: labelHidden ? "sr-only" : undefined,
|
|
170
170
|
children: label
|
|
@@ -172,7 +172,7 @@ var InputField = forwardRef(({ label, labelHidden, index, error, disabled, class
|
|
|
172
172
|
}),
|
|
173
173
|
/* @__PURE__ */ jsx(FieldStateContext.Provider, {
|
|
174
174
|
value: fieldState,
|
|
175
|
-
children: /* @__PURE__ */ jsx(
|
|
175
|
+
children: /* @__PURE__ */ jsx(Input2, {
|
|
176
176
|
invalid: !!error,
|
|
177
177
|
disabled,
|
|
178
178
|
...props
|
|
@@ -180,14 +180,14 @@ var InputField = forwardRef(({ label, labelHidden, index, error, disabled, class
|
|
|
180
180
|
}),
|
|
181
181
|
error && /* @__PURE__ */ jsx(Field.Error, {
|
|
182
182
|
match: true,
|
|
183
|
-
className:
|
|
183
|
+
className: cn2("text-destructive", compact ? "text-caption-compact pl-2" : "text-caption pl-2.5", "weight-medium"),
|
|
184
184
|
children: error
|
|
185
185
|
})
|
|
186
186
|
]
|
|
187
187
|
});
|
|
188
188
|
});
|
|
189
189
|
InputField.displayName = "InputField";
|
|
190
|
-
Object.assign(
|
|
191
|
-
var input_default =
|
|
190
|
+
Object.assign(InputGroup2, { Field: InputField });
|
|
191
|
+
var input_default = Input2;
|
|
192
192
|
|
|
193
|
-
export {
|
|
193
|
+
export { Input2, Label2, InputGroup2, input_default };
|