@justanarthur/modo-ui 2.9.0 → 2.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/components/overlays/command/index.tsx +9 -2
- package/dist/components/inputs/search/index.js +2 -2
- package/dist/components/overlays/command/index.js +1 -1
- package/dist/docs/index.d.ts +10 -2
- package/dist/docs/index.js +98 -3
- package/dist/index.js +2 -2
- package/dist/shared/{components-m78c04dv.js → components-98k9speb.js} +1 -1
- package/dist/shared/{components-aa77h13m.js → components-qacvk8vq.js} +13 -5
- package/dist/styles.css +1 -1
- package/docs/chrome.css +31 -0
- package/docs/chrome.tsx +83 -0
- package/docs/index.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -258,6 +258,7 @@ shell: {
|
|
|
258
258
|
Select: '@justanarthur/modo-ui/docs#Select',
|
|
259
259
|
Icon: '@justanarthur/modo-ui/docs#Icon',
|
|
260
260
|
Sidebar: '@justanarthur/modo-ui/docs#DocsNav',
|
|
261
|
+
SiteSwitcher: '@justanarthur/modo-ui/docs#SiteSwitcher',
|
|
261
262
|
},
|
|
262
263
|
panel: { items: [{ label: 'Theme', component: '@justanarthur/modo-ui/docs#ThemeSwitcher' }] },
|
|
263
264
|
vite: './vite.ts',
|
|
@@ -195,8 +195,15 @@ function CommandList({ onPick, emptyMessage, className }: CommandListProps) {
|
|
|
195
195
|
const pick = useCallback((item: CommandItem) => pickRef.current(item), [])
|
|
196
196
|
const { itemRects, isMeasured, registerItem } = useFluidHover(containerRef, { isItemDisabled: isDisabledRow })
|
|
197
197
|
const rect = isMeasured && highlight !== null ? (itemRects[highlight] ?? null) : null
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
// Labels can repeat (two sessions with one title): a repeat takes its count, so React keeps every row.
|
|
199
|
+
const rows = (items: CommandItem[], start: number) => {
|
|
200
|
+
const seen = new Map<string, number>()
|
|
201
|
+
return items.map((item, i) => {
|
|
202
|
+
const n = seen.get(item.label) ?? 0
|
|
203
|
+
seen.set(item.label, n + 1)
|
|
204
|
+
return <CommandRow key={n ? `${item.label}\n${n}` : item.label} item={item} index={start + i} onPick={pick} />
|
|
205
|
+
})
|
|
206
|
+
}
|
|
200
207
|
let start = 0
|
|
201
208
|
|
|
202
209
|
return (
|
|
@@ -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-98k9speb.js";
|
|
5
|
+
import"../../../shared/components-qacvk8vq.js";
|
|
6
6
|
import"../../../shared/components-rkcqr15c.js";
|
|
7
7
|
import"../../../shared/components-mse06t0x.js";
|
|
8
8
|
import"../../../shared/components-5fet4gqt.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
CommandContent2,
|
|
8
8
|
Command2,
|
|
9
9
|
command_default
|
|
10
|
-
} from "../../../shared/components-
|
|
10
|
+
} from "../../../shared/components-qacvk8vq.js";
|
|
11
11
|
import"../../../shared/components-rkcqr15c.js";
|
|
12
12
|
import"../../../shared/components-mse06t0x.js";
|
|
13
13
|
import"../../../shared/components-5fet4gqt.js";
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconSlotProps, LinkSlotProps, SelectSlotProps, SidebarItemProps, SidebarSectionProps, SidebarSlotProps } from "@justanarthur/modo";
|
|
1
|
+
import { IconSlotProps, LinkSlotProps, SelectSlotProps, SidebarItemProps, SidebarSectionProps, SidebarSlotProps, SiteSwitcherSlotProps } from "@justanarthur/modo";
|
|
2
2
|
import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn } from "react";
|
|
3
3
|
import { ButtonProps as ButtonProps_1qs1xe } from "..";
|
|
4
4
|
import { RefAttributes as RefAttributes_miuf56 } from "react";
|
|
@@ -51,4 +51,12 @@ declare function DocsNavSection({ title, children }: SidebarSectionProps): Eleme
|
|
|
51
51
|
* OS flips underneath 'system'.
|
|
52
52
|
*/
|
|
53
53
|
declare function ThemeSwitcher(): Element_12xgc;
|
|
54
|
-
|
|
54
|
+
/**
|
|
55
|
+
* SiteSwitcher slot: the site view's badge (the site's mark, else a pages glyph) on an elevated
|
|
56
|
+
* surface, opening a Popover that grows out of it: the site and the page on screen, the pages as a
|
|
57
|
+
* Sidebar menu (the current one lit, the hover melting from row to row, arrow keys between them), the
|
|
58
|
+
* panel items as list rows, and the links back to the docs. It opens away from the corner modo keeps
|
|
59
|
+
* it in; picking a page closes it. modo drags it between corners, so the tooltip says so.
|
|
60
|
+
*/
|
|
61
|
+
declare function SiteSwitcher({ name, logo, pages, current, sections, links, corner }: SiteSwitcherSlotProps): Element_12xgc;
|
|
62
|
+
export { Button, DocsNav, Icon, Link, Select, SiteSwitcher, ThemeSwitcher };
|
package/dist/docs/index.js
CHANGED
|
@@ -14,6 +14,12 @@ import"../shared/components-ywgqahmg.js";
|
|
|
14
14
|
import {
|
|
15
15
|
button_default
|
|
16
16
|
} from "../shared/components-rtkrpv3p.js";
|
|
17
|
+
import"../shared/components-wwd093xg.js";
|
|
18
|
+
import"../shared/components-nz14rwtd.js";
|
|
19
|
+
import {
|
|
20
|
+
LIST_POPOVER2,
|
|
21
|
+
list_default
|
|
22
|
+
} from "../shared/components-t0c1rw40.js";
|
|
17
23
|
import"../shared/components-grxgqa75.js";
|
|
18
24
|
import"../shared/components-ytqnnpab.js";
|
|
19
25
|
import"../shared/components-21hcwp85.js";
|
|
@@ -22,7 +28,6 @@ import"../shared/components-8pnvkrbw.js";
|
|
|
22
28
|
import"../shared/components-bxqmbcz2.js";
|
|
23
29
|
import"../shared/components-9b2m90st.js";
|
|
24
30
|
import"../shared/components-5wykqxph.js";
|
|
25
|
-
import"../shared/components-wwd093xg.js";
|
|
26
31
|
import"../shared/components-jh0g2xr9.js";
|
|
27
32
|
import"../shared/components-mse06t0x.js";
|
|
28
33
|
import"../shared/components-rkcqr15c.js";
|
|
@@ -36,7 +41,6 @@ import"../shared/components-tcyz2tdn.js";
|
|
|
36
41
|
import"../shared/components-v2j3jx89.js";
|
|
37
42
|
import"../shared/components-6f5pyzb2.js";
|
|
38
43
|
import"../shared/components-5fet4gqt.js";
|
|
39
|
-
import"../shared/components-nz14rwtd.js";
|
|
40
44
|
import {
|
|
41
45
|
select_default
|
|
42
46
|
} from "../shared/components-1ck8ct1k.js";
|
|
@@ -52,7 +56,12 @@ import"../shared/components-y09nr7fe.js";
|
|
|
52
56
|
import {
|
|
53
57
|
useIsMobile2
|
|
54
58
|
} from "../shared/components-8wp8d8q1.js";
|
|
55
|
-
import
|
|
59
|
+
import {
|
|
60
|
+
tooltip_default
|
|
61
|
+
} from "../shared/components-gmmht6k5.js";
|
|
62
|
+
import {
|
|
63
|
+
popover_default
|
|
64
|
+
} from "../shared/components-d2g9eqvc.js";
|
|
56
65
|
|
|
57
66
|
// docs/chrome.tsx
|
|
58
67
|
import {
|
|
@@ -65,6 +74,7 @@ import {
|
|
|
65
74
|
Monitor,
|
|
66
75
|
Moon,
|
|
67
76
|
Package,
|
|
77
|
+
PanelsTopLeft,
|
|
68
78
|
Sun,
|
|
69
79
|
X
|
|
70
80
|
} from "lucide-react";
|
|
@@ -318,11 +328,96 @@ function ThemeSwitcher() {
|
|
|
318
328
|
]
|
|
319
329
|
});
|
|
320
330
|
}
|
|
331
|
+
function SiteSwitcher({ name, logo, pages, current, sections, links, corner }) {
|
|
332
|
+
const [open, setOpen] = useState(false);
|
|
333
|
+
const label = current ? `Pages: ${current}` : "Pages";
|
|
334
|
+
return /* @__PURE__ */ jsxs(popover_default, {
|
|
335
|
+
open,
|
|
336
|
+
onOpenChange: setOpen,
|
|
337
|
+
children: [
|
|
338
|
+
/* @__PURE__ */ jsx("div", {
|
|
339
|
+
"data-modo-ui": "site-badge",
|
|
340
|
+
children: /* @__PURE__ */ jsx(tooltip_default, {
|
|
341
|
+
content: "Pages · drag to move",
|
|
342
|
+
side: corner.startsWith("top") ? "bottom" : "top",
|
|
343
|
+
children: /* @__PURE__ */ jsx(popover_default.Trigger, {
|
|
344
|
+
render: /* @__PURE__ */ jsx(button_default, {
|
|
345
|
+
variant: "ghost",
|
|
346
|
+
size: "icon",
|
|
347
|
+
"aria-label": label,
|
|
348
|
+
children: logo ?? /* @__PURE__ */ jsx(PanelsTopLeft, {
|
|
349
|
+
"aria-hidden": true
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
})
|
|
353
|
+
})
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ jsxs(popover_default.Content, {
|
|
356
|
+
side: corner.startsWith("top") ? "bottom" : "top",
|
|
357
|
+
align: corner.endsWith("left") ? "start" : "end",
|
|
358
|
+
sideOffset: 8,
|
|
359
|
+
className: LIST_POPOVER2,
|
|
360
|
+
"aria-label": `${name} pages`,
|
|
361
|
+
children: [
|
|
362
|
+
/* @__PURE__ */ jsxs("div", {
|
|
363
|
+
"data-modo-ui": "site-head",
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ jsx(popover_default.Title, {
|
|
366
|
+
children: name
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ jsx(popover_default.Description, {
|
|
369
|
+
children: current ?? "No page"
|
|
370
|
+
})
|
|
371
|
+
]
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ jsx(list_default.Section, {
|
|
374
|
+
title: "Pages",
|
|
375
|
+
children: /* @__PURE__ */ jsx("nav", {
|
|
376
|
+
"aria-label": "Pages",
|
|
377
|
+
children: /* @__PURE__ */ jsx(sidebar_default.Menu, {
|
|
378
|
+
children: pages.map((page) => /* @__PURE__ */ jsx(sidebar_default.MenuItem, {
|
|
379
|
+
children: /* @__PURE__ */ jsx(sidebar_default.MenuButton, {
|
|
380
|
+
isActive: page.current,
|
|
381
|
+
render: /* @__PURE__ */ jsx("a", {
|
|
382
|
+
href: page.href,
|
|
383
|
+
"aria-current": page.current ? "page" : undefined
|
|
384
|
+
}),
|
|
385
|
+
onClick: () => setOpen(false),
|
|
386
|
+
children: page.title
|
|
387
|
+
})
|
|
388
|
+
}, page.id))
|
|
389
|
+
})
|
|
390
|
+
})
|
|
391
|
+
}),
|
|
392
|
+
sections.length > 0 && /* @__PURE__ */ jsx(list_default, {
|
|
393
|
+
children: sections.map((section, i) => /* @__PURE__ */ jsx(list_default.Row, {
|
|
394
|
+
label: section.label,
|
|
395
|
+
children: section.content
|
|
396
|
+
}, `${i}-${section.label}`))
|
|
397
|
+
}),
|
|
398
|
+
/* @__PURE__ */ jsx("div", {
|
|
399
|
+
"data-modo-ui": "site-foot",
|
|
400
|
+
children: links.map((link) => /* @__PURE__ */ jsx(button_default, {
|
|
401
|
+
variant: "ghost",
|
|
402
|
+
size: "compact",
|
|
403
|
+
render: /* @__PURE__ */ jsx("a", {
|
|
404
|
+
href: link.href
|
|
405
|
+
}),
|
|
406
|
+
onClick: () => setOpen(false),
|
|
407
|
+
children: link.label
|
|
408
|
+
}, link.href))
|
|
409
|
+
})
|
|
410
|
+
]
|
|
411
|
+
})
|
|
412
|
+
]
|
|
413
|
+
});
|
|
414
|
+
}
|
|
321
415
|
export {
|
|
322
416
|
Button,
|
|
323
417
|
DocsNav,
|
|
324
418
|
Icon,
|
|
325
419
|
Link,
|
|
326
420
|
Select,
|
|
421
|
+
SiteSwitcher,
|
|
327
422
|
ThemeSwitcher
|
|
328
423
|
};
|
package/dist/index.js
CHANGED
|
@@ -395,10 +395,10 @@ import {
|
|
|
395
395
|
CommandTrigger2,
|
|
396
396
|
CommandContent2,
|
|
397
397
|
Command2
|
|
398
|
-
} from "./shared/components-
|
|
398
|
+
} from "./shared/components-qacvk8vq.js";
|
|
399
399
|
import {
|
|
400
400
|
Search2
|
|
401
|
-
} from "./shared/components-
|
|
401
|
+
} from "./shared/components-98k9speb.js";
|
|
402
402
|
import"./shared/components-tcyz2tdn.js";
|
|
403
403
|
import {
|
|
404
404
|
SelectValue2,
|
|
@@ -154,11 +154,19 @@ function CommandList2({ onPick, emptyMessage, className }) {
|
|
|
154
154
|
const pick = useCallback((item) => pickRef.current(item), []);
|
|
155
155
|
const { itemRects, isMeasured, registerItem } = useFluidHover2(containerRef, { isItemDisabled: isDisabledRow2 });
|
|
156
156
|
const rect = isMeasured && highlight !== null ? itemRects[highlight] ?? null : null;
|
|
157
|
-
const rows = (items, start) =>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
const rows = (items, start) => {
|
|
158
|
+
const seen = new Map;
|
|
159
|
+
return items.map((item, i) => {
|
|
160
|
+
const n = seen.get(item.label) ?? 0;
|
|
161
|
+
seen.set(item.label, n + 1);
|
|
162
|
+
return /* @__PURE__ */ jsx(CommandRow, {
|
|
163
|
+
item,
|
|
164
|
+
index: start + i,
|
|
165
|
+
onPick: pick
|
|
166
|
+
}, n ? `${item.label}
|
|
167
|
+
${n}` : item.label);
|
|
168
|
+
});
|
|
169
|
+
};
|
|
162
170
|
let start = 0;
|
|
163
171
|
return /* @__PURE__ */ jsx(CommandRows.Provider, {
|
|
164
172
|
value: registerItem,
|
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; --default-transition-timingFunction: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --radius-none: 0; --radius-lg: 0.5rem; --radius-xl: 0.75rem; --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; --leading-relaxed: 1.625; --ease-DEFAULT: cubic-bezier(0.4, 0, 0.2, 1); --radius-sm: 0.25rem; --ease-out: cubic-bezier(0, 0, 0.2, 1); --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --radius-xs: 0.125rem; --leading-snug: 1.375; --leading-normal: 1.5; --
|
|
65
|
+
:root, :host { --spacing: 0.25rem; --default-transition-timingFunction: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --radius-none: 0; --radius-lg: 0.5rem; --radius-xl: 0.75rem; --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; --leading-relaxed: 1.625; --ease-DEFAULT: cubic-bezier(0.4, 0, 0.2, 1); --radius-sm: 0.25rem; --ease-out: cubic-bezier(0, 0, 0.2, 1); --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --radius-xs: 0.125rem; --leading-snug: 1.375; --leading-normal: 1.5; --radius-md: 0.375rem; --leading-none: 1; --leading-tight: 1.25; --radius-DEFAULT: 0.25rem; --radius-3xl: 1.5rem; --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif; --radius-2xl: 1rem; --container-2xl: 42rem; --container-sm: 24rem; --default-font-family: var(--font-sans); --default-monoFont-family: var(--font-mono); }
|
|
66
66
|
}
|
|
67
67
|
/* layer: base */
|
|
68
68
|
@layer base{
|
package/docs/chrome.css
CHANGED
|
@@ -207,3 +207,34 @@
|
|
|
207
207
|
[data-modo="site-menu-page"][aria-current="page"] {
|
|
208
208
|
background-color: var(--active);
|
|
209
209
|
}
|
|
210
|
+
|
|
211
|
+
/* The SiteSwitcher slot (./chrome.tsx): its badge is a popup surface off the
|
|
212
|
+
page, round around its icon button; the logo sits at the icon's size. */
|
|
213
|
+
[data-modo-ui="site-badge"] {
|
|
214
|
+
display: flex;
|
|
215
|
+
padding: var(--space-1);
|
|
216
|
+
border-radius: var(--radius-pill-shell);
|
|
217
|
+
background-color: var(--surface-3);
|
|
218
|
+
box-shadow: var(--shadow-3);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-modo-ui="site-badge"] > button {
|
|
222
|
+
border-radius: var(--radius-pill);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
[data-modo-ui="site-badge"] img {
|
|
226
|
+
width: 1rem;
|
|
227
|
+
height: 1rem;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* The popover's head and links, inset like the list's captions. */
|
|
231
|
+
[data-modo-ui="site-head"] {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
padding-inline: var(--space-2);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-modo-ui="site-foot"] {
|
|
238
|
+
display: flex;
|
|
239
|
+
gap: var(--space-1);
|
|
240
|
+
}
|
package/docs/chrome.tsx
CHANGED
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
SidebarItemProps,
|
|
19
19
|
SidebarSectionProps,
|
|
20
20
|
SidebarSlotProps,
|
|
21
|
+
SiteSwitcherSlotProps,
|
|
21
22
|
} from '@justanarthur/modo'
|
|
22
23
|
import {
|
|
23
24
|
Check,
|
|
@@ -30,13 +31,17 @@ import {
|
|
|
30
31
|
Monitor,
|
|
31
32
|
Moon,
|
|
32
33
|
Package,
|
|
34
|
+
PanelsTopLeft,
|
|
33
35
|
Sun,
|
|
34
36
|
X,
|
|
35
37
|
} from 'lucide-react'
|
|
36
38
|
import { Children, createContext, isValidElement, type ReactNode, useContext, useEffect, useState } from 'react'
|
|
37
39
|
import ModoButton from '../components/actions/button'
|
|
40
|
+
import List, { LIST_POPOVER } from '../components/data-display/list'
|
|
38
41
|
import FluidSelect from '../components/inputs/select'
|
|
39
42
|
import Sidebar, { type SidebarSide, useSidebar } from '../components/navigation/sidebar'
|
|
43
|
+
import Popover from '../components/overlays/popover'
|
|
44
|
+
import Tooltip from '../components/overlays/tooltip'
|
|
40
45
|
import { useIsMobile } from '../lib/use-is-mobile'
|
|
41
46
|
|
|
42
47
|
/**
|
|
@@ -312,3 +317,81 @@ export function ThemeSwitcher() {
|
|
|
312
317
|
</FluidSelect>
|
|
313
318
|
)
|
|
314
319
|
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* SiteSwitcher slot: the site view's badge (the site's mark, else a pages glyph) on an elevated
|
|
323
|
+
* surface, opening a Popover that grows out of it: the site and the page on screen, the pages as a
|
|
324
|
+
* Sidebar menu (the current one lit, the hover melting from row to row, arrow keys between them), the
|
|
325
|
+
* panel items as list rows, and the links back to the docs. It opens away from the corner modo keeps
|
|
326
|
+
* it in; picking a page closes it. modo drags it between corners, so the tooltip says so.
|
|
327
|
+
*/
|
|
328
|
+
export function SiteSwitcher({ name, logo, pages, current, sections, links, corner }: SiteSwitcherSlotProps) {
|
|
329
|
+
const [open, setOpen] = useState(false)
|
|
330
|
+
const label = current ? `Pages: ${current}` : 'Pages'
|
|
331
|
+
return (
|
|
332
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
333
|
+
<div data-modo-ui="site-badge">
|
|
334
|
+
<Tooltip content="Pages · drag to move" side={corner.startsWith('top') ? 'bottom' : 'top'}>
|
|
335
|
+
<Popover.Trigger
|
|
336
|
+
render={
|
|
337
|
+
<ModoButton variant="ghost" size="icon" aria-label={label}>
|
|
338
|
+
{logo ?? <PanelsTopLeft aria-hidden />}
|
|
339
|
+
</ModoButton>
|
|
340
|
+
}
|
|
341
|
+
/>
|
|
342
|
+
</Tooltip>
|
|
343
|
+
</div>
|
|
344
|
+
<Popover.Content
|
|
345
|
+
side={corner.startsWith('top') ? 'bottom' : 'top'}
|
|
346
|
+
align={corner.endsWith('left') ? 'start' : 'end'}
|
|
347
|
+
sideOffset={8}
|
|
348
|
+
className={LIST_POPOVER}
|
|
349
|
+
aria-label={`${name} pages`}
|
|
350
|
+
>
|
|
351
|
+
<div data-modo-ui="site-head">
|
|
352
|
+
<Popover.Title>{name}</Popover.Title>
|
|
353
|
+
<Popover.Description>{current ?? 'No page'}</Popover.Description>
|
|
354
|
+
</div>
|
|
355
|
+
<List.Section title="Pages">
|
|
356
|
+
<nav aria-label="Pages">
|
|
357
|
+
<Sidebar.Menu>
|
|
358
|
+
{pages.map(page => (
|
|
359
|
+
<Sidebar.MenuItem key={page.id}>
|
|
360
|
+
<Sidebar.MenuButton
|
|
361
|
+
isActive={page.current}
|
|
362
|
+
render={<a href={page.href} aria-current={page.current ? 'page' : undefined} />}
|
|
363
|
+
onClick={() => setOpen(false)}
|
|
364
|
+
>
|
|
365
|
+
{page.title}
|
|
366
|
+
</Sidebar.MenuButton>
|
|
367
|
+
</Sidebar.MenuItem>
|
|
368
|
+
))}
|
|
369
|
+
</Sidebar.Menu>
|
|
370
|
+
</nav>
|
|
371
|
+
</List.Section>
|
|
372
|
+
{sections.length > 0 && (
|
|
373
|
+
<List>
|
|
374
|
+
{sections.map((section, i) => (
|
|
375
|
+
<List.Row key={`${i}-${section.label}`} label={section.label}>
|
|
376
|
+
{section.content}
|
|
377
|
+
</List.Row>
|
|
378
|
+
))}
|
|
379
|
+
</List>
|
|
380
|
+
)}
|
|
381
|
+
<div data-modo-ui="site-foot">
|
|
382
|
+
{links.map(link => (
|
|
383
|
+
<ModoButton
|
|
384
|
+
key={link.href}
|
|
385
|
+
variant="ghost"
|
|
386
|
+
size="compact"
|
|
387
|
+
render={<a href={link.href} />}
|
|
388
|
+
onClick={() => setOpen(false)}
|
|
389
|
+
>
|
|
390
|
+
{link.label}
|
|
391
|
+
</ModoButton>
|
|
392
|
+
))}
|
|
393
|
+
</div>
|
|
394
|
+
</Popover.Content>
|
|
395
|
+
</Popover>
|
|
396
|
+
)
|
|
397
|
+
}
|
package/docs/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* The docs chrome as one module, for a design system documented with modo:
|
|
3
|
-
* `shell: { Sidebar: '@justanarthur/modo-ui/docs#DocsNav', … }` and
|
|
3
|
+
* `shell: { Sidebar: '@justanarthur/modo-ui/docs#DocsNav', SiteSwitcher: '@justanarthur/modo-ui/docs#SiteSwitcher', … }` and
|
|
4
4
|
* `panel: { items: [{ label: 'Theme', component: '@justanarthur/modo-ui/docs#ThemeSwitcher' }] }`.
|
|
5
5
|
* Its look is `@justanarthur/modo-ui/docs/chrome.css`; the pre-paint theme controller is
|
|
6
6
|
* `docsTheme` in `@justanarthur/modo-ui/docs/vite`. The package's main entry never imports it.
|
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.10.1",
|
|
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": [
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
351
|
"devDependencies": {
|
|
352
|
-
"@justanarthur/modo": "1.
|
|
352
|
+
"@justanarthur/modo": "1.3.0",
|
|
353
353
|
"@types/react": "^18.3.0",
|
|
354
354
|
"@types/react-dom": "^18.3.0",
|
|
355
355
|
"bunup": "^0.16.0",
|