@justanarthur/modo-ui 2.4.0 → 2.5.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/components/navigation/sidebar/index.tsx +48 -1
- package/dist/blocks/desktop-shell/index.js +3 -3
- package/dist/blocks/sidebar-app/index.js +4 -4
- package/dist/components/data-display/diff/index.js +2 -2
- package/dist/components/data-display/markdown/index.js +3 -3
- package/dist/components/inputs/combobox/index.js +2 -2
- package/dist/components/inputs/search/index.js +3 -3
- package/dist/components/inputs/select/index.js +2 -2
- package/dist/components/navigation/breadcrumb/index.js +3 -3
- package/dist/components/navigation/sidebar/index.js +2 -2
- package/dist/components/overlays/command/index.js +2 -2
- package/dist/components/overlays/context-menu/index.js +3 -3
- package/dist/components/overlays/dropdown/index.js +2 -2
- package/dist/docs/index.js +3 -3
- package/dist/index.js +14 -14
- package/dist/primitives/content/code/index.js +2 -2
- package/dist/primitives/layout/scroll-area/index.js +1 -1
- package/dist/shared/{components-hjdv4y8d.js → components-2c22zpm2.js} +1 -1
- package/dist/shared/{components-greka6z2.js → components-4d0v8nzm.js} +1 -1
- package/dist/shared/{components-y4gsk1jt.js → components-5w7hxa1n.js} +1 -1
- package/dist/shared/{components-sh8j39z3.js → components-66aw235e.js} +1 -1
- package/dist/shared/{components-s0megs1g.js → components-766w1xcw.js} +2 -2
- package/dist/shared/{components-fv9y76b0.js → components-8dgrpegd.js} +1 -1
- package/dist/shared/{components-0bvxny7s.js → components-8hzwz162.js} +1 -1
- package/dist/shared/{components-cc9kfhkb.js → components-b2fag579.js} +43 -8
- package/dist/shared/{components-xq8j9c2f.js → components-jnjw9j2z.js} +1 -1
- package/dist/shared/{components-pw6gzev8.js → components-k8awpmbn.js} +1 -1
- package/dist/shared/{components-pwsqp2np.js → components-pfwjhxd8.js} +1 -1
- package/dist/shared/{components-rgdspnth.js → components-q28xct6t.js} +1 -1
- package/dist/shared/{components-esy5nsvc.js → components-resqc2d2.js} +12 -0
- package/dist/shared/{components-qmkfpcw0.js → components-z14s3avn.js} +1 -1
- package/dist/styles.css +2 -1
- package/package.json +1 -1
- package/primitives/layout/scroll-area/index.tsx +20 -0
|
@@ -14,9 +14,12 @@ import {
|
|
|
14
14
|
type HTMLAttributes,
|
|
15
15
|
type ReactNode,
|
|
16
16
|
type RefAttributes,
|
|
17
|
+
type RefObject,
|
|
17
18
|
useEffect,
|
|
18
19
|
useMemo,
|
|
20
|
+
useRef,
|
|
19
21
|
} from 'react'
|
|
22
|
+
import { useMergeRefs } from '../../../lib/merge-refs'
|
|
20
23
|
import { useControllableState } from '../../../lib/use-controllable-state'
|
|
21
24
|
import { cn } from '../../../lib/utils'
|
|
22
25
|
import { ScrollArea } from '../../../primitives/layout/scroll-area'
|
|
@@ -271,6 +274,41 @@ const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(
|
|
|
271
274
|
) as SidebarComponent
|
|
272
275
|
Sidebar.displayName = 'Sidebar'
|
|
273
276
|
|
|
277
|
+
/**
|
|
278
|
+
* While the list scrolls under a resting pointer, its rows stop taking the
|
|
279
|
+
* pointer: every row passing under it would hover (the highlight, revealed
|
|
280
|
+
* actions, a row's lazy tooltips), a style change and often a commit per row.
|
|
281
|
+
* Moving the pointer, or 150 ms without a scroll, hands it back.
|
|
282
|
+
*/
|
|
283
|
+
function usePauseHoverWhileScrolling(ref: RefObject<HTMLDivElement | null>, enabled: boolean) {
|
|
284
|
+
useEffect(() => {
|
|
285
|
+
const content = enabled ? ref.current : null
|
|
286
|
+
const scroller = content?.closest('[data-slot="scroll-area-viewport"]')
|
|
287
|
+
if (!content || !scroller) return
|
|
288
|
+
let timer: ReturnType<typeof setTimeout> | undefined
|
|
289
|
+
const resume = () => {
|
|
290
|
+
clearTimeout(timer)
|
|
291
|
+
content.removeAttribute('data-scrolling')
|
|
292
|
+
}
|
|
293
|
+
const onScroll = () => {
|
|
294
|
+
if (!content.hasAttribute('data-scrolling')) content.setAttribute('data-scrolling', '')
|
|
295
|
+
clearTimeout(timer)
|
|
296
|
+
timer = setTimeout(resume, 150)
|
|
297
|
+
}
|
|
298
|
+
const onPointerMove = (e: Event) => {
|
|
299
|
+
const { movementX, movementY } = e as PointerEvent
|
|
300
|
+
if ((movementX || movementY) && content.hasAttribute('data-scrolling')) resume()
|
|
301
|
+
}
|
|
302
|
+
scroller.addEventListener('scroll', onScroll, { passive: true })
|
|
303
|
+
scroller.addEventListener('pointermove', onPointerMove, { passive: true })
|
|
304
|
+
return () => {
|
|
305
|
+
resume()
|
|
306
|
+
scroller.removeEventListener('scroll', onScroll)
|
|
307
|
+
scroller.removeEventListener('pointermove', onPointerMove)
|
|
308
|
+
}
|
|
309
|
+
}, [ref, enabled])
|
|
310
|
+
}
|
|
311
|
+
|
|
274
312
|
export interface SidebarContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
275
313
|
viewportClassName?: string
|
|
276
314
|
}
|
|
@@ -278,6 +316,10 @@ export interface SidebarContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
278
316
|
const SidebarContent = forwardRef<HTMLDivElement, SidebarContentProps>(
|
|
279
317
|
({ className, viewportClassName, children, ...props }, ref) => {
|
|
280
318
|
const { isMobile } = useSidebar()
|
|
319
|
+
const contentRef = useRef<HTMLDivElement>(null)
|
|
320
|
+
const mergedRef = useMergeRefs(ref, contentRef)
|
|
321
|
+
// The sheet is touch, which has no hover to pause.
|
|
322
|
+
usePauseHoverWhileScrolling(contentRef, !isMobile)
|
|
281
323
|
|
|
282
324
|
// In the sheet this region scrolls natively (a ScrollArea would
|
|
283
325
|
// double-scroll). The hairline can't sit on the scroller, whose fade mask
|
|
@@ -304,7 +346,12 @@ const SidebarContent = forwardRef<HTMLDivElement, SidebarContentProps>(
|
|
|
304
346
|
className={cn('scroll-divider min-h-0 w-full flex-1', className)}
|
|
305
347
|
viewportClassName={cn('scroll-fade [&>div]:!block [&>div]:!min-w-0', viewportClassName)}
|
|
306
348
|
>
|
|
307
|
-
<div
|
|
349
|
+
<div
|
|
350
|
+
ref={mergedRef}
|
|
351
|
+
data-sidebar="content"
|
|
352
|
+
className="flex w-full min-w-0 flex-col data-[scrolling]:pointer-events-none"
|
|
353
|
+
{...props}
|
|
354
|
+
>
|
|
308
355
|
{children}
|
|
309
356
|
</div>
|
|
310
357
|
</ScrollArea>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DesktopShell2
|
|
3
|
-
} from "../../shared/components-
|
|
4
|
-
import"../../shared/components-
|
|
3
|
+
} from "../../shared/components-8hzwz162.js";
|
|
4
|
+
import"../../shared/components-b2fag579.js";
|
|
5
5
|
import"../../shared/components-2myjk2zf.js";
|
|
6
6
|
import"../../shared/components-v2j3jx89.js";
|
|
7
7
|
import"../../shared/components-7rn454aq.js";
|
|
@@ -35,7 +35,7 @@ import"../../shared/components-ew4wq7mj.js";
|
|
|
35
35
|
import"../../shared/components-tz0axc0f.js";
|
|
36
36
|
import"../../shared/components-ceyn28cf.js";
|
|
37
37
|
import"../../shared/components-nwa2a9tq.js";
|
|
38
|
-
import"../../shared/components-
|
|
38
|
+
import"../../shared/components-resqc2d2.js";
|
|
39
39
|
import"../../shared/components-6f5pyzb2.js";
|
|
40
40
|
import"../../shared/components-kxpcj2ry.js";
|
|
41
41
|
import"../../shared/components-s217vq1n.js";
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
SidebarInsetTopbar2,
|
|
3
3
|
SidebarSearchField2,
|
|
4
4
|
SidebarApp2
|
|
5
|
-
} from "../../shared/components-
|
|
6
|
-
import"../../shared/components-
|
|
5
|
+
} from "../../shared/components-766w1xcw.js";
|
|
6
|
+
import"../../shared/components-b2fag579.js";
|
|
7
7
|
import"../../shared/components-2myjk2zf.js";
|
|
8
8
|
import"../../shared/components-rtwfh1gc.js";
|
|
9
|
-
import"../../shared/components-
|
|
9
|
+
import"../../shared/components-pfwjhxd8.js";
|
|
10
10
|
import"../../shared/components-t84071ay.js";
|
|
11
11
|
import"../../shared/components-v2j3jx89.js";
|
|
12
12
|
import"../../shared/components-7rn454aq.js";
|
|
@@ -48,7 +48,7 @@ import"../../shared/components-ew4wq7mj.js";
|
|
|
48
48
|
import"../../shared/components-tz0axc0f.js";
|
|
49
49
|
import"../../shared/components-ceyn28cf.js";
|
|
50
50
|
import"../../shared/components-nwa2a9tq.js";
|
|
51
|
-
import"../../shared/components-
|
|
51
|
+
import"../../shared/components-resqc2d2.js";
|
|
52
52
|
import"../../shared/components-6f5pyzb2.js";
|
|
53
53
|
import"../../shared/components-kxpcj2ry.js";
|
|
54
54
|
import"../../shared/components-s217vq1n.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parsePatch2,
|
|
3
3
|
Diff2
|
|
4
|
-
} from "../../../shared/components-
|
|
4
|
+
} from "../../../shared/components-8dgrpegd.js";
|
|
5
5
|
import"../../../shared/components-jnhpgpfk.js";
|
|
6
6
|
import"../../../shared/components-ceyn28cf.js";
|
|
7
7
|
import"../../../shared/components-nwa2a9tq.js";
|
|
8
|
-
import"../../../shared/components-
|
|
8
|
+
import"../../../shared/components-resqc2d2.js";
|
|
9
9
|
import"../../../shared/components-6f5pyzb2.js";
|
|
10
10
|
import"../../../shared/components-kxpcj2ry.js";
|
|
11
11
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
MarkdownProse2,
|
|
3
3
|
Markdown2,
|
|
4
4
|
markdown_default
|
|
5
|
-
} from "../../../shared/components-
|
|
5
|
+
} from "../../../shared/components-k8awpmbn.js";
|
|
6
6
|
import"../../../shared/components-0ep66sg9.js";
|
|
7
7
|
import"../../../shared/components-t84071ay.js";
|
|
8
8
|
import"../../../shared/components-v2j3jx89.js";
|
|
@@ -19,10 +19,10 @@ import"../../../shared/components-wwd093xg.js";
|
|
|
19
19
|
import"../../../shared/components-znspksk0.js";
|
|
20
20
|
import"../../../shared/components-ew4wq7mj.js";
|
|
21
21
|
import"../../../shared/components-tz0axc0f.js";
|
|
22
|
-
import"../../../shared/components-
|
|
22
|
+
import"../../../shared/components-5w7hxa1n.js";
|
|
23
23
|
import"../../../shared/components-ceyn28cf.js";
|
|
24
24
|
import"../../../shared/components-nwa2a9tq.js";
|
|
25
|
-
import"../../../shared/components-
|
|
25
|
+
import"../../../shared/components-resqc2d2.js";
|
|
26
26
|
import"../../../shared/components-6f5pyzb2.js";
|
|
27
27
|
import"../../../shared/components-kxpcj2ry.js";
|
|
28
28
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
ComboboxEmpty2,
|
|
8
8
|
Combobox2,
|
|
9
9
|
combobox_default
|
|
10
|
-
} from "../../../shared/components-
|
|
10
|
+
} from "../../../shared/components-z14s3avn.js";
|
|
11
11
|
import"../../../shared/components-q0hs5rqn.js";
|
|
12
12
|
import"../../../shared/components-mse06t0x.js";
|
|
13
13
|
import"../../../shared/components-nxqrw789.js";
|
|
@@ -32,7 +32,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
32
32
|
import"../../../shared/components-tz0axc0f.js";
|
|
33
33
|
import"../../../shared/components-ceyn28cf.js";
|
|
34
34
|
import"../../../shared/components-nwa2a9tq.js";
|
|
35
|
-
import"../../../shared/components-
|
|
35
|
+
import"../../../shared/components-resqc2d2.js";
|
|
36
36
|
import"../../../shared/components-6f5pyzb2.js";
|
|
37
37
|
import"../../../shared/components-kxpcj2ry.js";
|
|
38
38
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Search2,
|
|
3
3
|
search_default
|
|
4
|
-
} from "../../../shared/components-
|
|
5
|
-
import"../../../shared/components-
|
|
4
|
+
} from "../../../shared/components-q28xct6t.js";
|
|
5
|
+
import"../../../shared/components-4d0v8nzm.js";
|
|
6
6
|
import"../../../shared/components-q0hs5rqn.js";
|
|
7
7
|
import"../../../shared/components-mse06t0x.js";
|
|
8
8
|
import"../../../shared/components-br6t88cb.js";
|
|
@@ -29,7 +29,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
29
29
|
import"../../../shared/components-tz0axc0f.js";
|
|
30
30
|
import"../../../shared/components-ceyn28cf.js";
|
|
31
31
|
import"../../../shared/components-nwa2a9tq.js";
|
|
32
|
-
import"../../../shared/components-
|
|
32
|
+
import"../../../shared/components-resqc2d2.js";
|
|
33
33
|
import"../../../shared/components-6f5pyzb2.js";
|
|
34
34
|
import"../../../shared/components-kxpcj2ry.js";
|
|
35
35
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
SelectSeparator2,
|
|
9
9
|
Select2,
|
|
10
10
|
select_default
|
|
11
|
-
} from "../../../shared/components-
|
|
11
|
+
} from "../../../shared/components-jnjw9j2z.js";
|
|
12
12
|
import"../../../shared/components-tcyz2tdn.js";
|
|
13
13
|
import"../../../shared/components-q0hs5rqn.js";
|
|
14
14
|
import"../../../shared/components-mse06t0x.js";
|
|
@@ -35,7 +35,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
35
35
|
import"../../../shared/components-tz0axc0f.js";
|
|
36
36
|
import"../../../shared/components-ceyn28cf.js";
|
|
37
37
|
import"../../../shared/components-nwa2a9tq.js";
|
|
38
|
-
import"../../../shared/components-
|
|
38
|
+
import"../../../shared/components-resqc2d2.js";
|
|
39
39
|
import"../../../shared/components-6f5pyzb2.js";
|
|
40
40
|
import"../../../shared/components-kxpcj2ry.js";
|
|
41
41
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
BreadcrumbItem2,
|
|
3
3
|
Breadcrumb2,
|
|
4
4
|
breadcrumb_default
|
|
5
|
-
} from "../../../shared/components-
|
|
6
|
-
import"../../../shared/components-
|
|
5
|
+
} from "../../../shared/components-66aw235e.js";
|
|
6
|
+
import"../../../shared/components-pfwjhxd8.js";
|
|
7
7
|
import"../../../shared/components-t84071ay.js";
|
|
8
8
|
import"../../../shared/components-v2j3jx89.js";
|
|
9
9
|
import"../../../shared/components-q0hs5rqn.js";
|
|
@@ -33,7 +33,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
33
33
|
import"../../../shared/components-tz0axc0f.js";
|
|
34
34
|
import"../../../shared/components-ceyn28cf.js";
|
|
35
35
|
import"../../../shared/components-nwa2a9tq.js";
|
|
36
|
-
import"../../../shared/components-
|
|
36
|
+
import"../../../shared/components-resqc2d2.js";
|
|
37
37
|
import"../../../shared/components-6f5pyzb2.js";
|
|
38
38
|
import"../../../shared/components-kxpcj2ry.js";
|
|
39
39
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
Sidebar2,
|
|
37
37
|
SidebarContent2,
|
|
38
38
|
sidebar_default
|
|
39
|
-
} from "../../../shared/components-
|
|
39
|
+
} from "../../../shared/components-b2fag579.js";
|
|
40
40
|
import"../../../shared/components-2myjk2zf.js";
|
|
41
41
|
import"../../../shared/components-v2j3jx89.js";
|
|
42
42
|
import"../../../shared/components-7rn454aq.js";
|
|
@@ -69,7 +69,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
69
69
|
import"../../../shared/components-tz0axc0f.js";
|
|
70
70
|
import"../../../shared/components-ceyn28cf.js";
|
|
71
71
|
import"../../../shared/components-nwa2a9tq.js";
|
|
72
|
-
import"../../../shared/components-
|
|
72
|
+
import"../../../shared/components-resqc2d2.js";
|
|
73
73
|
import"../../../shared/components-6f5pyzb2.js";
|
|
74
74
|
import"../../../shared/components-kxpcj2ry.js";
|
|
75
75
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
CommandContent2,
|
|
8
8
|
Command2,
|
|
9
9
|
command_default
|
|
10
|
-
} from "../../../shared/components-
|
|
10
|
+
} from "../../../shared/components-4d0v8nzm.js";
|
|
11
11
|
import"../../../shared/components-q0hs5rqn.js";
|
|
12
12
|
import"../../../shared/components-mse06t0x.js";
|
|
13
13
|
import"../../../shared/components-br6t88cb.js";
|
|
@@ -33,7 +33,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
33
33
|
import"../../../shared/components-tz0axc0f.js";
|
|
34
34
|
import"../../../shared/components-ceyn28cf.js";
|
|
35
35
|
import"../../../shared/components-nwa2a9tq.js";
|
|
36
|
-
import"../../../shared/components-
|
|
36
|
+
import"../../../shared/components-resqc2d2.js";
|
|
37
37
|
import"../../../shared/components-6f5pyzb2.js";
|
|
38
38
|
import"../../../shared/components-kxpcj2ry.js";
|
|
39
39
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
ContextMenu2,
|
|
4
4
|
ContextMenuItem2,
|
|
5
5
|
context_menu_default
|
|
6
|
-
} from "../../../shared/components-
|
|
7
|
-
import"../../../shared/components-
|
|
6
|
+
} from "../../../shared/components-2c22zpm2.js";
|
|
7
|
+
import"../../../shared/components-pfwjhxd8.js";
|
|
8
8
|
import"../../../shared/components-t84071ay.js";
|
|
9
9
|
import"../../../shared/components-v2j3jx89.js";
|
|
10
10
|
import"../../../shared/components-q0hs5rqn.js";
|
|
@@ -34,7 +34,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
34
34
|
import"../../../shared/components-tz0axc0f.js";
|
|
35
35
|
import"../../../shared/components-ceyn28cf.js";
|
|
36
36
|
import"../../../shared/components-nwa2a9tq.js";
|
|
37
|
-
import"../../../shared/components-
|
|
37
|
+
import"../../../shared/components-resqc2d2.js";
|
|
38
38
|
import"../../../shared/components-6f5pyzb2.js";
|
|
39
39
|
import"../../../shared/components-kxpcj2ry.js";
|
|
40
40
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
DropdownContent2,
|
|
19
19
|
DropdownSeparator2,
|
|
20
20
|
dropdown_default
|
|
21
|
-
} from "../../../shared/components-
|
|
21
|
+
} from "../../../shared/components-pfwjhxd8.js";
|
|
22
22
|
import"../../../shared/components-t84071ay.js";
|
|
23
23
|
import"../../../shared/components-v2j3jx89.js";
|
|
24
24
|
import"../../../shared/components-q0hs5rqn.js";
|
|
@@ -48,7 +48,7 @@ import"../../../shared/components-ew4wq7mj.js";
|
|
|
48
48
|
import"../../../shared/components-tz0axc0f.js";
|
|
49
49
|
import"../../../shared/components-ceyn28cf.js";
|
|
50
50
|
import"../../../shared/components-nwa2a9tq.js";
|
|
51
|
-
import"../../../shared/components-
|
|
51
|
+
import"../../../shared/components-resqc2d2.js";
|
|
52
52
|
import"../../../shared/components-6f5pyzb2.js";
|
|
53
53
|
import"../../../shared/components-kxpcj2ry.js";
|
|
54
54
|
import"../../../shared/components-s217vq1n.js";
|
package/dist/docs/index.js
CHANGED
|
@@ -34,11 +34,11 @@ import"../shared/components-nxqrw789.js";
|
|
|
34
34
|
import"../shared/components-vcte8p75.js";
|
|
35
35
|
import"../shared/components-tcyz2tdn.js";
|
|
36
36
|
import"../shared/components-6f5pyzb2.js";
|
|
37
|
-
import"../shared/components-
|
|
37
|
+
import"../shared/components-resqc2d2.js";
|
|
38
38
|
import"../shared/components-nz14rwtd.js";
|
|
39
39
|
import {
|
|
40
40
|
select_default
|
|
41
|
-
} from "../shared/components-
|
|
41
|
+
} from "../shared/components-jnjw9j2z.js";
|
|
42
42
|
import"../shared/components-jnhpgpfk.js";
|
|
43
43
|
import"../shared/components-br6t88cb.js";
|
|
44
44
|
import"../shared/components-ac0x7zpq.js";
|
|
@@ -46,7 +46,7 @@ import"../shared/components-v2j3jx89.js";
|
|
|
46
46
|
import {
|
|
47
47
|
useSidebar2,
|
|
48
48
|
sidebar_default
|
|
49
|
-
} from "../shared/components-
|
|
49
|
+
} from "../shared/components-b2fag579.js";
|
|
50
50
|
import"../shared/components-2myjk2zf.js";
|
|
51
51
|
import"../shared/components-y09nr7fe.js";
|
|
52
52
|
import {
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
import {
|
|
41
41
|
ScrollArea2,
|
|
42
42
|
ScrollBar2
|
|
43
|
-
} from "./shared/components-
|
|
43
|
+
} from "./shared/components-resqc2d2.js";
|
|
44
44
|
import"./shared/components-pva1wj1r.js";
|
|
45
45
|
import {
|
|
46
46
|
useMorph2
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
SidebarRail2,
|
|
132
132
|
Sidebar2,
|
|
133
133
|
SidebarContent2
|
|
134
|
-
} from "./shared/components-
|
|
134
|
+
} from "./shared/components-b2fag579.js";
|
|
135
135
|
import"./shared/components-2myjk2zf.js";
|
|
136
136
|
import"./shared/components-y09nr7fe.js";
|
|
137
137
|
import {
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
} from "./shared/components-gr82tz50.js";
|
|
155
155
|
import {
|
|
156
156
|
DesktopShell2
|
|
157
|
-
} from "./shared/components-
|
|
157
|
+
} from "./shared/components-8hzwz162.js";
|
|
158
158
|
import {
|
|
159
159
|
ShellCard2
|
|
160
160
|
} from "./shared/components-hh1g7r3t.js";
|
|
@@ -185,12 +185,12 @@ import {
|
|
|
185
185
|
DropdownTrigger2,
|
|
186
186
|
DropdownContent2,
|
|
187
187
|
DropdownSeparator2
|
|
188
|
-
} from "./shared/components-
|
|
188
|
+
} from "./shared/components-pfwjhxd8.js";
|
|
189
189
|
import {
|
|
190
190
|
SidebarInsetTopbar2,
|
|
191
191
|
SidebarSearchField2,
|
|
192
192
|
SidebarApp2
|
|
193
|
-
} from "./shared/components-
|
|
193
|
+
} from "./shared/components-766w1xcw.js";
|
|
194
194
|
import"./shared/components-j3q9kaps.js";
|
|
195
195
|
import {
|
|
196
196
|
CardGroup2,
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
import {
|
|
237
237
|
parsePatch2,
|
|
238
238
|
Diff2
|
|
239
|
-
} from "./shared/components-
|
|
239
|
+
} from "./shared/components-8dgrpegd.js";
|
|
240
240
|
import {
|
|
241
241
|
Kbd2
|
|
242
242
|
} from "./shared/components-g8qgr7p8.js";
|
|
@@ -256,7 +256,7 @@ import {
|
|
|
256
256
|
} from "./shared/components-s2pnh8h9.js";
|
|
257
257
|
import {
|
|
258
258
|
Code2
|
|
259
|
-
} from "./shared/components-
|
|
259
|
+
} from "./shared/components-5w7hxa1n.js";
|
|
260
260
|
import {
|
|
261
261
|
TableHead2,
|
|
262
262
|
TableHeader2,
|
|
@@ -271,7 +271,7 @@ import {
|
|
|
271
271
|
import {
|
|
272
272
|
MarkdownProse2,
|
|
273
273
|
Markdown2
|
|
274
|
-
} from "./shared/components-
|
|
274
|
+
} from "./shared/components-k8awpmbn.js";
|
|
275
275
|
import {
|
|
276
276
|
Sparkline2
|
|
277
277
|
} from "./shared/components-nw2k1pg9.js";
|
|
@@ -318,7 +318,7 @@ import {
|
|
|
318
318
|
ComboboxItem2,
|
|
319
319
|
ComboboxEmpty2,
|
|
320
320
|
Combobox2
|
|
321
|
-
} from "./shared/components-
|
|
321
|
+
} from "./shared/components-z14s3avn.js";
|
|
322
322
|
import"./shared/components-29ebea21.js";
|
|
323
323
|
import"./shared/components-zckgawt6.js";
|
|
324
324
|
import {
|
|
@@ -390,10 +390,10 @@ import {
|
|
|
390
390
|
CommandTrigger2,
|
|
391
391
|
CommandContent2,
|
|
392
392
|
Command2
|
|
393
|
-
} from "./shared/components-
|
|
393
|
+
} from "./shared/components-4d0v8nzm.js";
|
|
394
394
|
import {
|
|
395
395
|
Search2
|
|
396
|
-
} from "./shared/components-
|
|
396
|
+
} from "./shared/components-q28xct6t.js";
|
|
397
397
|
import"./shared/components-tcyz2tdn.js";
|
|
398
398
|
import {
|
|
399
399
|
SelectValue2,
|
|
@@ -404,7 +404,7 @@ import {
|
|
|
404
404
|
SelectLabel2,
|
|
405
405
|
SelectSeparator2,
|
|
406
406
|
Select2
|
|
407
|
-
} from "./shared/components-
|
|
407
|
+
} from "./shared/components-jnjw9j2z.js";
|
|
408
408
|
import {
|
|
409
409
|
Switch2,
|
|
410
410
|
SwitchGroup2
|
|
@@ -418,7 +418,7 @@ import {
|
|
|
418
418
|
import {
|
|
419
419
|
BreadcrumbItem2,
|
|
420
420
|
Breadcrumb2
|
|
421
|
-
} from "./shared/components-
|
|
421
|
+
} from "./shared/components-66aw235e.js";
|
|
422
422
|
import {
|
|
423
423
|
NavigationMenuContent2,
|
|
424
424
|
NavigationMenuIndicator2,
|
|
@@ -450,7 +450,7 @@ import {
|
|
|
450
450
|
ContextMenuContent2,
|
|
451
451
|
ContextMenu2,
|
|
452
452
|
ContextMenuItem2
|
|
453
|
-
} from "./shared/components-
|
|
453
|
+
} from "./shared/components-2c22zpm2.js";
|
|
454
454
|
import {
|
|
455
455
|
LightboxTrigger2,
|
|
456
456
|
Lightbox2
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Code2
|
|
3
|
-
} from "../../../shared/components-
|
|
3
|
+
} from "../../../shared/components-5w7hxa1n.js";
|
|
4
4
|
import"../../../shared/components-ceyn28cf.js";
|
|
5
5
|
import"../../../shared/components-nwa2a9tq.js";
|
|
6
|
-
import"../../../shared/components-
|
|
6
|
+
import"../../../shared/components-resqc2d2.js";
|
|
7
7
|
import"../../../shared/components-6f5pyzb2.js";
|
|
8
8
|
import"../../../shared/components-kxpcj2ry.js";
|
|
9
9
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ScrollArea2,
|
|
3
3
|
ScrollBar2,
|
|
4
4
|
scroll_area_default
|
|
5
|
-
} from "../../../shared/components-
|
|
5
|
+
} from "../../../shared/components-resqc2d2.js";
|
|
6
6
|
import"../../../shared/components-6f5pyzb2.js";
|
|
7
7
|
import"../../../shared/components-kxpcj2ry.js";
|
|
8
8
|
import"../../../shared/components-s217vq1n.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
DropdownSubTrigger2,
|
|
19
19
|
DropdownSubContent2,
|
|
20
20
|
DropdownSeparator2
|
|
21
|
-
} from "./components-
|
|
21
|
+
} from "./components-pfwjhxd8.js";
|
|
22
22
|
|
|
23
23
|
// components/overlays/context-menu/index.tsx
|
|
24
24
|
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./components-nz14rwtd.js";
|
|
25
25
|
import {
|
|
26
26
|
dropdown_default
|
|
27
|
-
} from "./components-
|
|
27
|
+
} from "./components-pfwjhxd8.js";
|
|
28
28
|
|
|
29
29
|
// components/navigation/breadcrumb/index.tsx
|
|
30
30
|
import { Children, isValidElement, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
SidebarInput2,
|
|
23
23
|
SidebarTrigger2,
|
|
24
24
|
sidebar_default
|
|
25
|
-
} from "./components-
|
|
25
|
+
} from "./components-b2fag579.js";
|
|
26
26
|
import {
|
|
27
27
|
tooltip_default
|
|
28
28
|
} from "./components-7rn454aq.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
DropdownMenu2,
|
|
32
32
|
DropdownTrigger2,
|
|
33
33
|
DropdownContent2
|
|
34
|
-
} from "./components-
|
|
34
|
+
} from "./components-pfwjhxd8.js";
|
|
35
35
|
import {
|
|
36
36
|
card_default
|
|
37
37
|
} from "./components-rtwfh1gc.js";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
mergeRefs2,
|
|
5
|
+
useMergeRefs2
|
|
6
|
+
} from "./components-bkwjvvkh.js";
|
|
3
7
|
import {
|
|
4
8
|
useControllableState2
|
|
5
9
|
} from "./components-wwd093xg.js";
|
|
@@ -11,11 +15,7 @@ import {
|
|
|
11
15
|
} from "./components-kxpcj2ry.js";
|
|
12
16
|
import {
|
|
13
17
|
ScrollArea2
|
|
14
|
-
} from "./components-
|
|
15
|
-
import {
|
|
16
|
-
mergeRefs2,
|
|
17
|
-
useMergeRefs2
|
|
18
|
-
} from "./components-bkwjvvkh.js";
|
|
18
|
+
} from "./components-resqc2d2.js";
|
|
19
19
|
import {
|
|
20
20
|
useReduceMotion2
|
|
21
21
|
} from "./components-tz0axc0f.js";
|
|
@@ -86,7 +86,8 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
forwardRef as forwardRef10,
|
|
88
88
|
useEffect as useEffect6,
|
|
89
|
-
useMemo as useMemo5
|
|
89
|
+
useMemo as useMemo5,
|
|
90
|
+
useRef as useRef10
|
|
90
91
|
} from "react";
|
|
91
92
|
|
|
92
93
|
// components/navigation/sidebar/menu-scope.tsx
|
|
@@ -1826,8 +1827,42 @@ var Sidebar2 = forwardRef10(({
|
|
|
1826
1827
|
});
|
|
1827
1828
|
});
|
|
1828
1829
|
Sidebar2.displayName = "Sidebar";
|
|
1830
|
+
function usePauseHoverWhileScrolling(ref, enabled) {
|
|
1831
|
+
useEffect6(() => {
|
|
1832
|
+
const content = enabled ? ref.current : null;
|
|
1833
|
+
const scroller = content?.closest('[data-slot="scroll-area-viewport"]');
|
|
1834
|
+
if (!content || !scroller)
|
|
1835
|
+
return;
|
|
1836
|
+
let timer;
|
|
1837
|
+
const resume = () => {
|
|
1838
|
+
clearTimeout(timer);
|
|
1839
|
+
content.removeAttribute("data-scrolling");
|
|
1840
|
+
};
|
|
1841
|
+
const onScroll = () => {
|
|
1842
|
+
if (!content.hasAttribute("data-scrolling"))
|
|
1843
|
+
content.setAttribute("data-scrolling", "");
|
|
1844
|
+
clearTimeout(timer);
|
|
1845
|
+
timer = setTimeout(resume, 150);
|
|
1846
|
+
};
|
|
1847
|
+
const onPointerMove = (e) => {
|
|
1848
|
+
const { movementX, movementY } = e;
|
|
1849
|
+
if ((movementX || movementY) && content.hasAttribute("data-scrolling"))
|
|
1850
|
+
resume();
|
|
1851
|
+
};
|
|
1852
|
+
scroller.addEventListener("scroll", onScroll, { passive: true });
|
|
1853
|
+
scroller.addEventListener("pointermove", onPointerMove, { passive: true });
|
|
1854
|
+
return () => {
|
|
1855
|
+
resume();
|
|
1856
|
+
scroller.removeEventListener("scroll", onScroll);
|
|
1857
|
+
scroller.removeEventListener("pointermove", onPointerMove);
|
|
1858
|
+
};
|
|
1859
|
+
}, [ref, enabled]);
|
|
1860
|
+
}
|
|
1829
1861
|
var SidebarContent2 = forwardRef10(({ className, viewportClassName, children, ...props }, ref) => {
|
|
1830
1862
|
const { isMobile } = useSidebar2();
|
|
1863
|
+
const contentRef = useRef10(null);
|
|
1864
|
+
const mergedRef = useMergeRefs2(ref, contentRef);
|
|
1865
|
+
usePauseHoverWhileScrolling(contentRef, !isMobile);
|
|
1831
1866
|
if (isMobile) {
|
|
1832
1867
|
return /* @__PURE__ */ jsx13("div", {
|
|
1833
1868
|
className: "scroll-divider [--scroll-divider-inset:8px] flex min-h-0 w-full flex-1 flex-col",
|
|
@@ -1844,9 +1879,9 @@ var SidebarContent2 = forwardRef10(({ className, viewportClassName, children, ..
|
|
|
1844
1879
|
className: cn2("scroll-divider min-h-0 w-full flex-1", className),
|
|
1845
1880
|
viewportClassName: cn2("scroll-fade [&>div]:!block [&>div]:!min-w-0", viewportClassName),
|
|
1846
1881
|
children: /* @__PURE__ */ jsx13("div", {
|
|
1847
|
-
ref,
|
|
1882
|
+
ref: mergedRef,
|
|
1848
1883
|
"data-sidebar": "content",
|
|
1849
|
-
className: "flex w-full min-w-0 flex-col",
|
|
1884
|
+
className: "flex w-full min-w-0 flex-col data-[scrolling]:pointer-events-none",
|
|
1850
1885
|
...props,
|
|
1851
1886
|
children
|
|
1852
1887
|
})
|
|
@@ -24,6 +24,18 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
* MIT License © 2026 Micka Touillaud — fluidfunctionalism.com (notice: LICENSE.fluid-functionalism)
|
|
25
25
|
* Local changes: see PORTING.md.
|
|
26
26
|
*/
|
|
27
|
+
if (typeof CSS !== "undefined" && "registerProperty" in CSS) {
|
|
28
|
+
for (const edge of ["x-start", "x-end", "y-start", "y-end"]) {
|
|
29
|
+
try {
|
|
30
|
+
CSS.registerProperty({
|
|
31
|
+
name: `--scroll-area-overflow-${edge}`,
|
|
32
|
+
syntax: "<length>",
|
|
33
|
+
inherits: false,
|
|
34
|
+
initialValue: "0px"
|
|
35
|
+
});
|
|
36
|
+
} catch {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
27
39
|
var ScrollAreaContext = createContext(false);
|
|
28
40
|
var ScrollArea2 = forwardRef(({ className, children, viewportClassName, orientation = "vertical", ...props }, ref) => {
|
|
29
41
|
const isTouch = useTouchPrimary2();
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
} from "./components-eawe4nxm.js";
|
|
77
77
|
import {
|
|
78
78
|
ScrollArea2
|
|
79
|
-
} from "./components-
|
|
79
|
+
} from "./components-resqc2d2.js";
|
|
80
80
|
|
|
81
81
|
// components/inputs/combobox/index.tsx
|
|
82
82
|
import { Combobox as ComboboxPrimitive3 } from "@base-ui/react/combobox";
|
package/dist/styles.css
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
/* layer: theme */
|
|
64
64
|
@layer theme{
|
|
65
|
-
:root, :host { --spacing: 0.25rem; --
|
|
65
|
+
:root, :host { --spacing: 0.25rem; --ease-DEFAULT: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-timingFunction: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif; --container-sm: 24rem; --radius-xl: 0.75rem; --leading-relaxed: 1.625; --container-2xl: 42rem; --radius-md: 0.375rem; --radius-3xl: 1.5rem; --radius-DEFAULT: 0.25rem; --radius-none: 0; --ease-out: cubic-bezier(0, 0, 0.2, 1); --leading-tight: 1.25; --radius-sm: 0.25rem; --radius-2xl: 1rem; --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --radius-xs: 0.125rem; --leading-snug: 1.375; --leading-normal: 1.5; --radius-lg: 0.5rem; --leading-none: 1; --default-font-family: var(--font-sans); --default-monoFont-family: var(--font-mono); }
|
|
66
66
|
}
|
|
67
67
|
/* layer: base */
|
|
68
68
|
@layer base{
|
|
@@ -716,6 +716,7 @@
|
|
|
716
716
|
.\[\&_\*\]\:pointer-events-none *,
|
|
717
717
|
.aria-disabled\:pointer-events-none[aria-disabled="true"],
|
|
718
718
|
.data-\[disabled\]\:pointer-events-none[data-disabled],
|
|
719
|
+
.data-\[scrolling\]\:pointer-events-none[data-scrolling],
|
|
719
720
|
.pointer-events-none{pointer-events:none;}
|
|
720
721
|
.disabled\:pointer-events-none:disabled{pointer-events:none;}
|
|
721
722
|
.resize{resize:both;}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justanarthur/modo-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.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": [
|
|
@@ -22,6 +22,26 @@ import { useShape } from '../../../lib/shape-context'
|
|
|
22
22
|
import { useTouchPrimary } from '../../../lib/use-touch-primary'
|
|
23
23
|
import { cn } from '../../../lib/utils'
|
|
24
24
|
|
|
25
|
+
// Base UI writes the edge distances (`--scroll-area-overflow-*`) on the
|
|
26
|
+
// viewport at every scroll event and registers them non-inherited, except in
|
|
27
|
+
// WebKit, where an inherited var re-styles every descendant per event: a long
|
|
28
|
+
// list recalculated thousands of elements a frame. Only the viewport reads
|
|
29
|
+
// them (`scroll-fade`), so they are registered for WebKit too.
|
|
30
|
+
if (typeof CSS !== 'undefined' && 'registerProperty' in CSS) {
|
|
31
|
+
for (const edge of ['x-start', 'x-end', 'y-start', 'y-end']) {
|
|
32
|
+
try {
|
|
33
|
+
CSS.registerProperty({
|
|
34
|
+
name: `--scroll-area-overflow-${edge}`,
|
|
35
|
+
syntax: '<length>',
|
|
36
|
+
inherits: false,
|
|
37
|
+
initialValue: '0px',
|
|
38
|
+
})
|
|
39
|
+
} catch {
|
|
40
|
+
// Already registered.
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
25
45
|
// Touch-primary devices get native overflow scrolling (momentum,
|
|
26
46
|
// rubber-banding); the exported ScrollBar no-ops there.
|
|
27
47
|
const ScrollAreaContext = createContext<boolean>(false)
|