@poodle64/ui 2026.10.20 → 2026.10.22
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/components/ui/app-shell/app-nav.svelte +13 -5
- package/dist/components/ui/app-shell/app-nav.svelte.d.ts +4 -0
- package/dist/components/ui/app-shell/app-shell.svelte +78 -10
- package/dist/components/ui/command-palette/command-palette.svelte +35 -2
- package/dist/components/ui/command-palette/command-palette.svelte.d.ts +24 -1
- package/dist/styles.css +37 -3
- package/package.json +1 -1
- package/registry/component-map.json +1 -1
- package/registry/component-map.md +1 -1
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
nav,
|
|
34
34
|
currentPath,
|
|
35
35
|
collapsed = false,
|
|
36
|
+
peek = false,
|
|
36
37
|
label = 'Primary',
|
|
37
38
|
onNavigate,
|
|
38
39
|
selected,
|
|
@@ -45,6 +46,10 @@
|
|
|
45
46
|
currentPath?: string;
|
|
46
47
|
/** Icon-only mode. Labels stay in the accessible tree via sr-only text. */
|
|
47
48
|
collapsed?: boolean;
|
|
49
|
+
/** Collapsed, with the labels drawn: the rail peeking. The collapsed
|
|
50
|
+
* structure stays (a rule for a heading, no child rows), so not one row
|
|
51
|
+
* moves under the pointer that opened it. */
|
|
52
|
+
peek?: boolean;
|
|
48
53
|
/** Accessible name for the landmark; distinguish a secondary column. */
|
|
49
54
|
label?: string;
|
|
50
55
|
/** Fired after any nav link activates — AppShell uses it to shut the drawer. */
|
|
@@ -68,6 +73,8 @@
|
|
|
68
73
|
} = $props();
|
|
69
74
|
|
|
70
75
|
const groups = $derived(toGroups(nav));
|
|
76
|
+
/** The labels are hidden: collapsed and not peeking. */
|
|
77
|
+
const iconOnly = $derived(collapsed && !peek);
|
|
71
78
|
|
|
72
79
|
// Ids are real ids in the consumer's document, and this component renders
|
|
73
80
|
// more than once per page by design (the rail, plus any route-scoped second
|
|
@@ -194,8 +201,8 @@
|
|
|
194
201
|
>{item.label.slice(0, 1).toUpperCase()}</span
|
|
195
202
|
>
|
|
196
203
|
{/if}
|
|
197
|
-
<span class={
|
|
198
|
-
{#if item.badge !== undefined && !
|
|
204
|
+
<span class={iconOnly ? 'sr-only' : 'truncate'}>{item.label}</span>
|
|
205
|
+
{#if item.badge !== undefined && !iconOnly}
|
|
199
206
|
<span class="ds-nav-badge">{item.badge}</span>
|
|
200
207
|
{/if}
|
|
201
208
|
{/snippet}
|
|
@@ -211,7 +218,7 @@
|
|
|
211
218
|
class="ds-nav-item w-full text-start"
|
|
212
219
|
data-active={active ? 'true' : undefined}
|
|
213
220
|
aria-current={active ? 'true' : undefined}
|
|
214
|
-
title={
|
|
221
|
+
title={iconOnly ? item.label : undefined}
|
|
215
222
|
onclick={() => {
|
|
216
223
|
onSelect(item.href);
|
|
217
224
|
onNavigate?.();
|
|
@@ -234,7 +241,7 @@
|
|
|
234
241
|
data-within={within ? 'true' : undefined}
|
|
235
242
|
data-child={opts.child ? 'true' : undefined}
|
|
236
243
|
aria-current={active ? 'page' : undefined}
|
|
237
|
-
title={
|
|
244
|
+
title={iconOnly ? item.label : undefined}
|
|
238
245
|
target={item.external ? '_blank' : undefined}
|
|
239
246
|
rel={item.external ? 'noreferrer noopener' : undefined}
|
|
240
247
|
onclick={onNavigate}
|
|
@@ -248,7 +255,8 @@
|
|
|
248
255
|
<nav
|
|
249
256
|
class={cn('ds-nav flex flex-1 flex-col gap-5 overflow-y-auto px-3 py-4', className)}
|
|
250
257
|
aria-label={label}
|
|
251
|
-
data-collapsed={
|
|
258
|
+
data-collapsed={iconOnly ? 'true' : undefined}
|
|
259
|
+
data-peek={collapsed && peek ? 'true' : undefined}
|
|
252
260
|
>
|
|
253
261
|
{#each groups as group, i (group.heading ?? group.items[0]?.href ?? i)}
|
|
254
262
|
<div class="flex flex-col gap-1">
|
|
@@ -5,6 +5,10 @@ type $$ComponentProps = {
|
|
|
5
5
|
currentPath?: string;
|
|
6
6
|
/** Icon-only mode. Labels stay in the accessible tree via sr-only text. */
|
|
7
7
|
collapsed?: boolean;
|
|
8
|
+
/** Collapsed, with the labels drawn: the rail peeking. The collapsed
|
|
9
|
+
* structure stays (a rule for a heading, no child rows), so not one row
|
|
10
|
+
* moves under the pointer that opened it. */
|
|
11
|
+
peek?: boolean;
|
|
8
12
|
/** Accessible name for the landmark; distinguish a secondary column. */
|
|
9
13
|
label?: string;
|
|
10
14
|
/** Fired after any nav link activates — AppShell uses it to shut the drawer. */
|
|
@@ -310,6 +310,53 @@
|
|
|
310
310
|
// that), so this can never suppress a legitimate desktop collapse.
|
|
311
311
|
const railCollapsed = $derived(collapsible && collapsed && !mobileNavOpen);
|
|
312
312
|
|
|
313
|
+
// A collapsed rail PEEKS: while a mouse rests on it, or keyboard focus is
|
|
314
|
+
// inside it, it widens over the page to show labels, and slims again when
|
|
315
|
+
// either leaves. The page does not reflow (the rail keeps its slim slot and
|
|
316
|
+
// the extra width overlays; see `data-peek` in styles.css). `collapsed` is
|
|
317
|
+
// untouched, so what an app persists is still the user's pin, the toggle.
|
|
318
|
+
//
|
|
319
|
+
// Pointer peeks need a mouse or pen: a touch tap fires pointerenter too, and
|
|
320
|
+
// a rail that opened on a tap would sit over the link being aimed at. Below
|
|
321
|
+
// md the rail is a drawer, never `railCollapsed`, so this cannot arise there.
|
|
322
|
+
// Focus peeks only for keyboard focus (`:focus-visible`), so pressing the
|
|
323
|
+
// toggle with a mouse does not hold the rail open. `peekSuppressed` is the
|
|
324
|
+
// other half of that: collapsing from under the pointer would otherwise peek
|
|
325
|
+
// at once and read as a toggle that did nothing, so it waits for the pointer
|
|
326
|
+
// to leave first.
|
|
327
|
+
const PEEK_DELAY_MS = 120;
|
|
328
|
+
let pointerOn = $state(false);
|
|
329
|
+
let focusIn = $state(false);
|
|
330
|
+
let peekSuppressed = $state(false);
|
|
331
|
+
let peekTimer: ReturnType<typeof setTimeout> | undefined;
|
|
332
|
+
const peeking = $derived(railCollapsed && !peekSuppressed && (pointerOn || focusIn));
|
|
333
|
+
// What the rail DRAWS: labels while peeking, icons otherwise.
|
|
334
|
+
const railNarrow = $derived(railCollapsed && !peeking);
|
|
335
|
+
|
|
336
|
+
function peekPointerEnter(event: PointerEvent) {
|
|
337
|
+
if (event.pointerType === 'touch') return;
|
|
338
|
+
clearTimeout(peekTimer);
|
|
339
|
+
peekTimer = setTimeout(() => (pointerOn = true), PEEK_DELAY_MS);
|
|
340
|
+
}
|
|
341
|
+
function peekPointerLeave() {
|
|
342
|
+
clearTimeout(peekTimer);
|
|
343
|
+
pointerOn = false;
|
|
344
|
+
peekSuppressed = false;
|
|
345
|
+
}
|
|
346
|
+
function peekFocusIn(event: FocusEvent) {
|
|
347
|
+
const target = event.target as HTMLElement | null;
|
|
348
|
+
if (target?.matches?.(':focus-visible')) focusIn = true;
|
|
349
|
+
}
|
|
350
|
+
function peekFocusOut(event: FocusEvent) {
|
|
351
|
+
const next = event.relatedTarget as Node | null;
|
|
352
|
+
if (!next || !(event.currentTarget as HTMLElement).contains(next)) focusIn = false;
|
|
353
|
+
}
|
|
354
|
+
function toggleCollapsed() {
|
|
355
|
+
collapsed = !collapsed;
|
|
356
|
+
peekSuppressed = true;
|
|
357
|
+
}
|
|
358
|
+
$effect(() => () => clearTimeout(peekTimer));
|
|
359
|
+
|
|
313
360
|
// The collapse toggle's accessible name states what pressing it will DO, so it
|
|
314
361
|
// flips with the state: collapsed → "Expand", expanded → "Collapse".
|
|
315
362
|
const collapseLabel = $derived(collapsed ? 'Expand sidebar' : 'Collapse sidebar');
|
|
@@ -411,7 +458,7 @@
|
|
|
411
458
|
!e.altKey &&
|
|
412
459
|
!isTypingTarget(e.target)
|
|
413
460
|
) {
|
|
414
|
-
|
|
461
|
+
toggleCollapsed();
|
|
415
462
|
}
|
|
416
463
|
}}
|
|
417
464
|
/>
|
|
@@ -422,7 +469,8 @@
|
|
|
422
469
|
class={cn(
|
|
423
470
|
'flex flex-none items-center gap-2.5',
|
|
424
471
|
compact ? '' : 'h-14 px-4',
|
|
425
|
-
|
|
472
|
+
railNarrow && !compact && 'justify-center px-0',
|
|
473
|
+
railCollapsed && !railNarrow && !compact && 'px-3'
|
|
426
474
|
)}
|
|
427
475
|
aria-label={brandTitle ?? 'Home'}
|
|
428
476
|
>
|
|
@@ -443,7 +491,7 @@
|
|
|
443
491
|
{@render brandMark()}
|
|
444
492
|
</span>
|
|
445
493
|
{/if}
|
|
446
|
-
{#if brandTitle && !
|
|
494
|
+
{#if brandTitle && !railNarrow}
|
|
447
495
|
<!--
|
|
448
496
|
The wordmark stands down below sm, leaving the mark alone. On a phone
|
|
449
497
|
the rail is gone, so this same lockup is what the top bar carries — and
|
|
@@ -534,6 +582,7 @@
|
|
|
534
582
|
class="ds-shell-rail bg-shell text-shell-foreground border-border flex-none flex-col border-r"
|
|
535
583
|
style={railWidth ? `--ds-shell-rail-width: ${railWidth}px` : undefined}
|
|
536
584
|
data-collapsed={railCollapsed ? 'true' : undefined}
|
|
585
|
+
data-peek={peeking ? 'true' : undefined}
|
|
537
586
|
data-resizing={resizing ? 'true' : undefined}
|
|
538
587
|
data-drawer={mobileNavOpen ? 'true' : undefined}
|
|
539
588
|
data-testid={mobileNavOpen ? 'ds-shell-drawer' : undefined}
|
|
@@ -541,6 +590,10 @@
|
|
|
541
590
|
aria-modal={mobileNavOpen ? 'true' : undefined}
|
|
542
591
|
aria-label={mobileNavOpen ? 'Navigation' : undefined}
|
|
543
592
|
onkeydown={trapTab}
|
|
593
|
+
onpointerenter={peekPointerEnter}
|
|
594
|
+
onpointerleave={peekPointerLeave}
|
|
595
|
+
onfocusin={peekFocusIn}
|
|
596
|
+
onfocusout={peekFocusOut}
|
|
544
597
|
>
|
|
545
598
|
{#if mobileNavOpen}
|
|
546
599
|
<button
|
|
@@ -560,18 +613,29 @@
|
|
|
560
613
|
the foot that read as a navigation destination. Expanded, it sits right
|
|
561
614
|
of the wordmark (`ml-auto`); collapsed, the head has no room beside the
|
|
562
615
|
mark, so the row becomes a column and the toggle stacks under it,
|
|
563
|
-
centred.
|
|
564
|
-
|
|
616
|
+
centred. A peek keeps that column, the mark and the toggle where the
|
|
617
|
+
slim rail put them: a peeked row half the height pulled every nav row 50px up
|
|
618
|
+
under the pointer, and a click landed on the row below the one aimed
|
|
619
|
+
at (caspo#177). `md:grid` keeps it off the mobile drawer, where
|
|
620
|
+
collapse does not apply — the same reason the foot control carried
|
|
621
|
+
`md:flex`.
|
|
565
622
|
-->
|
|
566
623
|
{#if collapsible}
|
|
567
|
-
<div
|
|
624
|
+
<div
|
|
625
|
+
class={cn(
|
|
626
|
+
'flex',
|
|
627
|
+
railCollapsed ? 'flex-col gap-1 py-2' : 'items-center pr-2',
|
|
628
|
+
railNarrow && 'items-center'
|
|
629
|
+
)}
|
|
630
|
+
>
|
|
568
631
|
{@render brandLockup()}
|
|
569
632
|
<button
|
|
570
633
|
type="button"
|
|
571
|
-
onclick={
|
|
634
|
+
onclick={toggleCollapsed}
|
|
572
635
|
class={cn(
|
|
573
636
|
'text-shell-muted-foreground hover:text-shell-foreground hidden size-8 flex-none place-items-center rounded-md transition-colors md:grid',
|
|
574
|
-
!railCollapsed && 'ml-auto'
|
|
637
|
+
!railCollapsed && 'ml-auto',
|
|
638
|
+
railCollapsed && !railNarrow && 'ml-3'
|
|
575
639
|
)}
|
|
576
640
|
aria-label={collapseLabel}
|
|
577
641
|
aria-pressed={collapsed}
|
|
@@ -592,6 +656,7 @@
|
|
|
592
656
|
{nav}
|
|
593
657
|
{currentPath}
|
|
594
658
|
collapsed={railCollapsed}
|
|
659
|
+
peek={peeking}
|
|
595
660
|
label={navLabel}
|
|
596
661
|
onNavigate={() => (mobileNavOpen = false)}
|
|
597
662
|
/>
|
|
@@ -617,7 +682,7 @@
|
|
|
617
682
|
onclick={() => (mobileNavOpen = false)}
|
|
618
683
|
>
|
|
619
684
|
<Settings class="ds-nav-icon size-[1.125rem] flex-none" aria-hidden="true" />
|
|
620
|
-
<span class={
|
|
685
|
+
<span class={railNarrow && !mobileNavOpen ? 'sr-only' : 'truncate'}>
|
|
621
686
|
{settingsLabel}
|
|
622
687
|
</span>
|
|
623
688
|
</a>
|
|
@@ -629,7 +694,10 @@
|
|
|
629
694
|
bind:dragging={resizing}
|
|
630
695
|
storageKey="ds-shell-rail-width"
|
|
631
696
|
snap={170}
|
|
632
|
-
onsnap={() =>
|
|
697
|
+
onsnap={() => {
|
|
698
|
+
collapsed = true;
|
|
699
|
+
peekSuppressed = true;
|
|
700
|
+
}}
|
|
633
701
|
data-testid="ds-rail-resize"
|
|
634
702
|
/>
|
|
635
703
|
{/if}
|
|
@@ -15,6 +15,23 @@
|
|
|
15
15
|
* let paletteOpen = $state(false);
|
|
16
16
|
* <AppShell {nav} onSearch={() => (paletteOpen = true)}>…</AppShell>
|
|
17
17
|
* <CommandPalette bind:open={paletteOpen} {nav} onNavigate={goto} />
|
|
18
|
+
*
|
|
19
|
+
* `query` is the text in the input, bindable, so an app can offer a row that
|
|
20
|
+
* acts on what was typed ("Ask the agent: …", "Search everything for …"). Pass
|
|
21
|
+
* `forceMount` on that row, or the palette's own filter hides it the moment
|
|
22
|
+
* the text matches no label. In `lead` it renders above the nav group and
|
|
23
|
+
* ungrouped, so it leads whether or not the text also matches a destination
|
|
24
|
+
* (the filter's sort moves every group after it), and it is what answers a
|
|
25
|
+
* text nothing else matches, so no "No results." line is drawn over it.
|
|
26
|
+
* `children` is for groups of the app's own, beneath the nav group:
|
|
27
|
+
*
|
|
28
|
+
* <CommandPalette bind:open bind:query {nav}>
|
|
29
|
+
* {#snippet lead()}
|
|
30
|
+
* {#if query.trim()}
|
|
31
|
+
* <Command.Item forceMount value="ask" onSelect={() => ask(query)}>Ask: {query}</Command.Item>
|
|
32
|
+
* {/if}
|
|
33
|
+
* {/snippet}
|
|
34
|
+
* </CommandPalette>
|
|
18
35
|
*/
|
|
19
36
|
import type { Snippet } from 'svelte';
|
|
20
37
|
import * as Command from '../command/index.js';
|
|
@@ -22,15 +39,19 @@
|
|
|
22
39
|
|
|
23
40
|
let {
|
|
24
41
|
open = $bindable(false),
|
|
42
|
+
query = $bindable(''),
|
|
25
43
|
nav,
|
|
26
44
|
onNavigate,
|
|
27
45
|
placeholder = 'Search…',
|
|
28
46
|
navHeading = 'Navigate',
|
|
29
47
|
emptyText = 'No results.',
|
|
30
48
|
shortcut = true,
|
|
49
|
+
lead,
|
|
31
50
|
children
|
|
32
51
|
}: {
|
|
33
52
|
open?: boolean;
|
|
53
|
+
/** What the user has typed. Cleared whenever the palette closes. */
|
|
54
|
+
query?: string;
|
|
34
55
|
/** The same value passed to AppShell. Filter for permissions first. */
|
|
35
56
|
nav?: NavSource;
|
|
36
57
|
/**
|
|
@@ -44,12 +65,20 @@
|
|
|
44
65
|
emptyText?: string;
|
|
45
66
|
/** Bind ⌘K / Ctrl-K to toggle. Turn off to drive `open` yourself. */
|
|
46
67
|
shortcut?: boolean;
|
|
68
|
+
/** App rows above the nav group, left ungrouped so they stay first while
|
|
69
|
+
* the filter sorts: an action on what was typed. Given, the palette
|
|
70
|
+
* draws no empty line of its own. */
|
|
71
|
+
lead?: Snippet;
|
|
47
72
|
/** Extra command groups: app-specific actions beneath the nav group. */
|
|
48
73
|
children?: Snippet;
|
|
49
74
|
} = $props();
|
|
50
75
|
|
|
51
76
|
const items = $derived(toItems(nav));
|
|
52
77
|
|
|
78
|
+
$effect(() => {
|
|
79
|
+
if (!open) query = '';
|
|
80
|
+
});
|
|
81
|
+
|
|
53
82
|
function go(href: string) {
|
|
54
83
|
open = false;
|
|
55
84
|
if (onNavigate) onNavigate(href);
|
|
@@ -71,9 +100,13 @@
|
|
|
71
100
|
/>
|
|
72
101
|
|
|
73
102
|
<Command.Dialog bind:open title="Command palette" description={placeholder}>
|
|
74
|
-
<Command.Input {placeholder} />
|
|
103
|
+
<Command.Input {placeholder} bind:value={query} />
|
|
75
104
|
<Command.List>
|
|
76
|
-
|
|
105
|
+
{#if lead}
|
|
106
|
+
{@render lead()}
|
|
107
|
+
{:else}
|
|
108
|
+
<Command.Empty>{emptyText}</Command.Empty>
|
|
109
|
+
{/if}
|
|
77
110
|
|
|
78
111
|
{#if items.length > 0}
|
|
79
112
|
<Command.Group heading={navHeading}>
|
|
@@ -14,11 +14,30 @@
|
|
|
14
14
|
* let paletteOpen = $state(false);
|
|
15
15
|
* <AppShell {nav} onSearch={() => (paletteOpen = true)}>…</AppShell>
|
|
16
16
|
* <CommandPalette bind:open={paletteOpen} {nav} onNavigate={goto} />
|
|
17
|
+
*
|
|
18
|
+
* `query` is the text in the input, bindable, so an app can offer a row that
|
|
19
|
+
* acts on what was typed ("Ask the agent: …", "Search everything for …"). Pass
|
|
20
|
+
* `forceMount` on that row, or the palette's own filter hides it the moment
|
|
21
|
+
* the text matches no label. In `lead` it renders above the nav group and
|
|
22
|
+
* ungrouped, so it leads whether or not the text also matches a destination
|
|
23
|
+
* (the filter's sort moves every group after it), and it is what answers a
|
|
24
|
+
* text nothing else matches, so no "No results." line is drawn over it.
|
|
25
|
+
* `children` is for groups of the app's own, beneath the nav group:
|
|
26
|
+
*
|
|
27
|
+
* <CommandPalette bind:open bind:query {nav}>
|
|
28
|
+
* {#snippet lead()}
|
|
29
|
+
* {#if query.trim()}
|
|
30
|
+
* <Command.Item forceMount value="ask" onSelect={() => ask(query)}>Ask: {query}</Command.Item>
|
|
31
|
+
* {/if}
|
|
32
|
+
* {/snippet}
|
|
33
|
+
* </CommandPalette>
|
|
17
34
|
*/
|
|
18
35
|
import type { Snippet } from 'svelte';
|
|
19
36
|
import { type NavSource } from '../app-shell/types.js';
|
|
20
37
|
type $$ComponentProps = {
|
|
21
38
|
open?: boolean;
|
|
39
|
+
/** What the user has typed. Cleared whenever the palette closes. */
|
|
40
|
+
query?: string;
|
|
22
41
|
/** The same value passed to AppShell. Filter for permissions first. */
|
|
23
42
|
nav?: NavSource;
|
|
24
43
|
/**
|
|
@@ -32,9 +51,13 @@ type $$ComponentProps = {
|
|
|
32
51
|
emptyText?: string;
|
|
33
52
|
/** Bind ⌘K / Ctrl-K to toggle. Turn off to drive `open` yourself. */
|
|
34
53
|
shortcut?: boolean;
|
|
54
|
+
/** App rows above the nav group, left ungrouped so they stay first while
|
|
55
|
+
* the filter sorts: an action on what was typed. Given, the palette
|
|
56
|
+
* draws no empty line of its own. */
|
|
57
|
+
lead?: Snippet;
|
|
35
58
|
/** Extra command groups: app-specific actions beneath the nav group. */
|
|
36
59
|
children?: Snippet;
|
|
37
60
|
};
|
|
38
|
-
declare const CommandPalette: import("svelte").Component<$$ComponentProps, {}, "open">;
|
|
61
|
+
declare const CommandPalette: import("svelte").Component<$$ComponentProps, {}, "open" | "query">;
|
|
39
62
|
type CommandPalette = ReturnType<typeof CommandPalette>;
|
|
40
63
|
export default CommandPalette;
|
package/dist/styles.css
CHANGED
|
@@ -251,6 +251,15 @@
|
|
|
251
251
|
--color-accent-foreground: var(--accent-foreground, var(--ds-color-foreground));
|
|
252
252
|
--color-input: var(--input, var(--ds-color-border));
|
|
253
253
|
|
|
254
|
+
/* The accent as TEXT. An accent chosen as a fill can fail 4.5:1 as text
|
|
255
|
+
(caspo's is 2.48:1 on its light ground), so every text use of it reads
|
|
256
|
+
--ds-color-primary-ink, which an app sets where its accent fails as text;
|
|
257
|
+
unset, it is the accent itself, resolved live at the element. Tailwind's
|
|
258
|
+
`text-*` reads `--text-color-*` before `--color-*`, so `text-primary`
|
|
259
|
+
takes the ink while `bg-`, `border-` and `ring-primary` keep the fill.
|
|
260
|
+
A key @poodle64/design-tokens does not register (it owns `--color-primary`). */
|
|
261
|
+
--text-color-primary: var(--ds-color-primary-ink, var(--ds-color-primary));
|
|
262
|
+
|
|
254
263
|
/* The shell's chrome surface — the nav rail and the top bar.
|
|
255
264
|
Deliberately NOT `sidebar`. `20-sveltekit-frontend.md` makes the
|
|
256
265
|
`sidebar-*` set the app's own to define, and this package registers
|
|
@@ -571,7 +580,7 @@
|
|
|
571
580
|
}
|
|
572
581
|
|
|
573
582
|
.ds-chip-primary {
|
|
574
|
-
color: var(--ds-color-primary);
|
|
583
|
+
color: var(--ds-color-primary-ink, var(--ds-color-primary));
|
|
575
584
|
background: color-mix(in oklch, var(--ds-color-primary) 14%, transparent);
|
|
576
585
|
}
|
|
577
586
|
.ds-dot-primary {
|
|
@@ -676,9 +685,12 @@
|
|
|
676
685
|
--ds-nav-chrome-ink-muted: var(--ds-shell-chrome-muted-foreground);
|
|
677
686
|
}
|
|
678
687
|
|
|
688
|
+
/* One height labelled or icon-only (the 1.25rem line, not the 1.125rem
|
|
689
|
+
icon, sets it), so a peek that draws the labels moves no row. */
|
|
679
690
|
.ds-nav-item {
|
|
680
691
|
position: relative;
|
|
681
692
|
display: flex;
|
|
693
|
+
min-height: 2.25rem;
|
|
682
694
|
align-items: center;
|
|
683
695
|
gap: 0.75rem;
|
|
684
696
|
border-radius: var(--ds-radius-md);
|
|
@@ -913,6 +925,13 @@
|
|
|
913
925
|
padding-inline: 0;
|
|
914
926
|
}
|
|
915
927
|
|
|
928
|
+
/* Peeking, a row's icon keeps the place the slim rail centred it in (the
|
|
929
|
+
rail less the nav's 0.75rem gutters, less the 1.125rem icon, halved), the
|
|
930
|
+
label drawn after it: nothing under the pointer moves, across or down. */
|
|
931
|
+
.ds-nav[data-peek='true'] .ds-nav-item {
|
|
932
|
+
padding-inline: calc((var(--ds-shell-rail-width-collapsed) - 1.5rem - 1.125rem) / 2) 0.625rem;
|
|
933
|
+
}
|
|
934
|
+
|
|
916
935
|
/* The settings destination's two panes (SettingsShell).
|
|
917
936
|
|
|
918
937
|
Only the SHAPE is here; the list's width, tint and rule are utilities on the
|
|
@@ -1004,7 +1023,9 @@
|
|
|
1004
1023
|
height: 100dvh;
|
|
1005
1024
|
width: var(--ds-shell-rail-width);
|
|
1006
1025
|
max-width: 50%;
|
|
1007
|
-
transition:
|
|
1026
|
+
transition:
|
|
1027
|
+
width 200ms ease,
|
|
1028
|
+
margin-right 200ms ease;
|
|
1008
1029
|
}
|
|
1009
1030
|
|
|
1010
1031
|
/* Full viewport height (`inset-block: 0`), so the brand row at its top and
|
|
@@ -1068,6 +1089,19 @@
|
|
|
1068
1089
|
width: var(--ds-shell-rail-width-collapsed);
|
|
1069
1090
|
}
|
|
1070
1091
|
|
|
1092
|
+
/* A collapsed rail peeking: it takes its full width but a negative right
|
|
1093
|
+
margin of the difference, so it still claims only the slim slot in the
|
|
1094
|
+
flex row and the page does not move. It sits above the top bar (z-20) and
|
|
1095
|
+
throws the same soft shadow the drawer does. */
|
|
1096
|
+
.ds-shell-rail[data-collapsed='true'][data-peek='true'] {
|
|
1097
|
+
width: var(--ds-shell-rail-width);
|
|
1098
|
+
margin-right: calc(var(--ds-shell-rail-width-collapsed) - var(--ds-shell-rail-width));
|
|
1099
|
+
z-index: 30;
|
|
1100
|
+
box-shadow:
|
|
1101
|
+
0 10px 15px -3px oklch(0 0 0 / 0.1),
|
|
1102
|
+
0 4px 6px -4px oklch(0 0 0 / 0.1);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1071
1105
|
/* Width follows the pointer during a drag; the transition is for the
|
|
1072
1106
|
collapse, not for every pixel of a resize. */
|
|
1073
1107
|
.ds-shell-rail[data-resizing='true'] {
|
|
@@ -1225,7 +1259,7 @@
|
|
|
1225
1259
|
}
|
|
1226
1260
|
|
|
1227
1261
|
.ds-prose a {
|
|
1228
|
-
color: var(--ds-color-primary);
|
|
1262
|
+
color: var(--ds-color-primary-ink, var(--ds-color-primary));
|
|
1229
1263
|
text-decoration: underline;
|
|
1230
1264
|
text-underline-offset: 2px;
|
|
1231
1265
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poodle64/ui",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.22",
|
|
4
4
|
"description": "Household shared component layer: shadcn-svelte primitives (bits-ui) plus the composed page chrome every app builds its routes from, restyled by each app's @poodle64/design-tokens alias layer. One fix reaches every app.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @poodle64/ui — situation → component map
|
|
2
2
|
|
|
3
3
|
<!-- GENERATED by scripts/generate-registry.mjs from scripts/situations.json + package source. DO NOT EDIT. -->
|
|
4
|
-
Generated from `@poodle64/ui@2026.10.
|
|
4
|
+
Generated from `@poodle64/ui@2026.10.22`. 76 components, 20 situations.
|
|
5
5
|
|
|
6
6
|
**Read this before writing a `<div>`.** Find the SITUATION you are in below, then compose the component named for it — do not hand-build it from raw `Card` or utility classes. Import is `import { Name } from '<import path>'`. Props marked `?` are optional. This map is the retrieval step the [`frontend-design` skill] makes mandatory; the [CHI 2026 study] measured composing-from-a-registry at 95% design-system compliance against 71% for writing the CSS from a prose style guide.
|
|
7
7
|
|