@poodle64/ui 2026.11.2 → 2026.11.3
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 +2 -1
- package/dist/components/ui/app-shell/bar-actions.svelte +2 -0
- package/dist/components/ui/app-shell/controls.d.ts +2 -0
- package/dist/components/ui/page-lead/index.d.ts +2 -0
- package/dist/components/ui/page-lead/index.js +2 -0
- package/dist/components/ui/page-lead/page-lead.svelte +46 -0
- package/dist/components/ui/page-lead/page-lead.svelte.d.ts +21 -0
- package/package.json +1 -1
- package/registry/component-map.json +9 -2
- package/registry/component-map.md +2 -1
package/README.md
CHANGED
|
@@ -95,6 +95,7 @@ rather than rebuilding it:
|
|
|
95
95
|
| `page-header` | The only page-title pattern: optional `breadcrumbs` (the trail's items, or a snippet) and `icon`, eyebrow, an optional title, one clamped subtitle, an `info` tooltip, a `meta` row and an `actions` slot. Omit `title` for a header that is a breadcrumb bar. |
|
|
96
96
|
| `breadcrumbs` | The trail: `items` of `{ label, href? }`, a named landmark, chevrons, each step truncating rather than wrapping. PageHeader draws it from `breadcrumbs={[…]}`. See [The page](#the-page-container-sections-and-the-type-scale). |
|
|
97
97
|
| `page-container` | A route's page at the one rhythm: header, sections and panels 1.5rem apart, filling the content box. |
|
|
98
|
+
| `page-lead` | A page's lead, under the rail's title: one answer sentence (`lead`, an `h2`), an optional `eyebrow`, `subtitle` and `meta` row. Its actions go to `ShellActions`. |
|
|
98
99
|
| `page-section` | A section of a page: `title` at `level` 2 or 3, an optional `description`, `count` and `actions`, and its content at one distance below. |
|
|
99
100
|
| `document-reader` | A document to read: PageHeader, the body (`html` the app sanitised, or `children`) in `.ds-prose`, and a contents list from its own headings, which a shell places as the page's aside. See [A document to read](#a-document-to-read). |
|
|
100
101
|
| `content-skeleton` | A region loading, shaped like what replaces it: `rows`, `tiles` or `prose`. A whole page waiting is LoadingState. |
|
|
@@ -210,7 +211,7 @@ a second row of the bar below that:
|
|
|
210
211
|
A page's own actions (a download, an export) register with `ShellActions`.
|
|
211
212
|
From `sm` each is a labelled button in the bar's trailing group; below it they
|
|
212
213
|
fold into one "More actions" (`⋯`) menu listing each with its icon and name,
|
|
213
|
-
and the status stands down. The shell's own icons stay as they are.
|
|
214
|
+
and the status stands down. An action takes `disabled` (a refresh in flight). The shell's own icons stay as they are.
|
|
214
215
|
|
|
215
216
|
```svelte
|
|
216
217
|
<ShellActions
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
href={action.href}
|
|
21
21
|
download={action.download ? '' : undefined}
|
|
22
22
|
onclick={action.onclick}
|
|
23
|
+
disabled={action.disabled}
|
|
23
24
|
title={action.detail}
|
|
24
25
|
class="pointer-coarse:h-11"
|
|
25
26
|
>
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
</DropdownMenu.Item>
|
|
57
58
|
{:else}
|
|
58
59
|
<DropdownMenu.Item
|
|
60
|
+
disabled={action.disabled}
|
|
59
61
|
onSelect={() => action.onclick?.()}
|
|
60
62
|
class="pointer-coarse:min-h-11 pointer-coarse:text-base"
|
|
61
63
|
>
|
|
@@ -29,6 +29,8 @@ export interface BarAction {
|
|
|
29
29
|
href?: string;
|
|
30
30
|
download?: boolean;
|
|
31
31
|
onclick?: () => void;
|
|
32
|
+
/** Shown but not usable (a refresh in flight). */
|
|
33
|
+
disabled?: boolean;
|
|
32
34
|
/** The page's one primary action takes the accent. */
|
|
33
35
|
primary?: boolean;
|
|
34
36
|
/** What the label leaves out (a file's size), as the tooltip. */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* A page's lead: the one sentence that answers what the reader came for
|
|
4
|
+
* ("Nothing new since 24/10"), with an eyebrow, a subtitle and the facts
|
|
5
|
+
* that go with it. It is the page's content, never its title: the shell's
|
|
6
|
+
* bar names the page, and this is a second-level heading under that name.
|
|
7
|
+
* The page's actions go to the bar (`ShellActions`), not here.
|
|
8
|
+
*/
|
|
9
|
+
import type { Snippet } from 'svelte';
|
|
10
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
11
|
+
import { cn } from '../../../utils.js';
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
lead,
|
|
15
|
+
eyebrow,
|
|
16
|
+
subtitle,
|
|
17
|
+
meta,
|
|
18
|
+
class: className,
|
|
19
|
+
...restProps
|
|
20
|
+
}: HTMLAttributes<HTMLDivElement> & {
|
|
21
|
+
/** The answer, in one sentence. */
|
|
22
|
+
lead: string;
|
|
23
|
+
/** A short kicker above it. */
|
|
24
|
+
eyebrow?: string;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
/** Facts about the answer, under it: badges, dates, a status. */
|
|
27
|
+
meta?: Snippet;
|
|
28
|
+
} = $props();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<div data-slot="page-lead" class={cn('min-w-0', className)} {...restProps}>
|
|
32
|
+
{#if eyebrow}
|
|
33
|
+
<div class="text-primary text-2xs tracking-eyebrow mb-1 font-medium uppercase">{eyebrow}</div>
|
|
34
|
+
{/if}
|
|
35
|
+
<h2 class="font-display max-w-3xl text-xl leading-snug font-semibold" data-answer>{lead}</h2>
|
|
36
|
+
{#if subtitle}
|
|
37
|
+
<p class="text-muted-foreground mt-1.5 max-w-4xl text-sm">{subtitle}</p>
|
|
38
|
+
{/if}
|
|
39
|
+
{#if meta}
|
|
40
|
+
<div
|
|
41
|
+
class="text-muted-foreground mt-2 flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1.5 text-xs"
|
|
42
|
+
>
|
|
43
|
+
{@render meta()}
|
|
44
|
+
</div>
|
|
45
|
+
{/if}
|
|
46
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A page's lead: the one sentence that answers what the reader came for
|
|
3
|
+
* ("Nothing new since 24/10"), with an eyebrow, a subtitle and the facts
|
|
4
|
+
* that go with it. It is the page's content, never its title: the shell's
|
|
5
|
+
* bar names the page, and this is a second-level heading under that name.
|
|
6
|
+
* The page's actions go to the bar (`ShellActions`), not here.
|
|
7
|
+
*/
|
|
8
|
+
import type { Snippet } from 'svelte';
|
|
9
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
10
|
+
type $$ComponentProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
|
+
/** The answer, in one sentence. */
|
|
12
|
+
lead: string;
|
|
13
|
+
/** A short kicker above it. */
|
|
14
|
+
eyebrow?: string;
|
|
15
|
+
subtitle?: string;
|
|
16
|
+
/** Facts about the answer, under it: badges, dates, a status. */
|
|
17
|
+
meta?: Snippet;
|
|
18
|
+
};
|
|
19
|
+
declare const PageLead: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
20
|
+
type PageLead = ReturnType<typeof PageLead>;
|
|
21
|
+
export default PageLead;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poodle64/ui",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.3",
|
|
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,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"package": "@poodle64/ui",
|
|
4
|
-
"version": "2026.11.
|
|
4
|
+
"version": "2026.11.3",
|
|
5
5
|
"generatedBy": "scripts/generate-registry.mjs",
|
|
6
6
|
"source": "scripts/situations.json + package source (DO NOT EDIT the outputs by hand)",
|
|
7
|
-
"componentCount":
|
|
7
|
+
"componentCount": 76,
|
|
8
8
|
"situationCount": 20
|
|
9
9
|
},
|
|
10
10
|
"situations": [
|
|
@@ -398,6 +398,13 @@
|
|
|
398
398
|
"props": "title?, eyebrow?, breadcrumbs?, icon?, subtitle?, info?, meta?, actions?",
|
|
399
399
|
"insteadOf": "a hand-written <h1> and title bar (the drift gate fails this)"
|
|
400
400
|
},
|
|
401
|
+
{
|
|
402
|
+
"name": "PageLead",
|
|
403
|
+
"dir": "page-lead",
|
|
404
|
+
"import": "@poodle64/ui/page-lead",
|
|
405
|
+
"props": "lead, eyebrow?, subtitle?, meta?",
|
|
406
|
+
"insteadOf": "an app-side lead component: the answer-led sentence a page opens on, under the rail's title (its actions go to ShellActions)"
|
|
407
|
+
},
|
|
401
408
|
{
|
|
402
409
|
"name": "Breadcrumbs",
|
|
403
410
|
"dir": "breadcrumbs",
|
|
@@ -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.11.
|
|
4
|
+
Generated from `@poodle64/ui@2026.11.3`. 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 [`design-frontend` 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
|
|
|
@@ -165,6 +165,7 @@ _The standing chrome — the app shell and its nav, the one page-title treatment
|
|
|
165
165
|
| `ShellControls` | `@poodle64/ui/app-shell` | `children` | a scope row (entity, financial year, chart/table) hand-placed above the page body; the shell's top bar carries it |
|
|
166
166
|
| `Segmented` | `@poodle64/ui/segmented` | `value, options, label, size?` | a hand-built row of aria-pressed buttons for a small fixed choice |
|
|
167
167
|
| `PageHeader` | `@poodle64/ui/page-header` | `title?, eyebrow?, breadcrumbs?, icon?, subtitle?, info?, meta?, actions?` | a hand-written <h1> and title bar (the drift gate fails this) |
|
|
168
|
+
| `PageLead` | `@poodle64/ui/page-lead` | `lead, eyebrow?, subtitle?, meta?` | an app-side lead component: the answer-led sentence a page opens on, under the rail's title (its actions go to ShellActions) |
|
|
168
169
|
| `Breadcrumbs` | `@poodle64/ui/breadcrumbs` | `items, label?` | a hand-written chevron trail in PageHeader's breadcrumbs snippet; PageHeader takes the same items as `breadcrumbs={[…]}` |
|
|
169
170
|
| `PageContainer` | `@poodle64/ui/page-container` | `children` | a per-page wrapper picking its own vertical rhythm (space-y-6, gap-10, …) |
|
|
170
171
|
| `PageSection` | `@poodle64/ui/page-section` | `title, level?, description?, count?, actions?, children?, id?` | a hand-styled section heading (an uppercase kicker, text-lg font-semibold, a display h2) and its own gap to the content under it |
|