@poodle64/ui 2026.11.13 → 2026.11.15
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 +8 -7
- package/dist/components/ui/page-lead/page-lead.svelte +1 -1
- package/dist/components/ui/page-section/page-section.svelte +7 -1
- package/dist/components/ui/page-section/page-section.svelte.d.ts +6 -2
- package/dist/components/ui/panel/panel.svelte +13 -2
- package/dist/components/ui/stat-card/stat-card.svelte +4 -3
- package/dist/components/ui/stat-card/stat-card.svelte.d.ts +1 -1
- package/dist/components/ui/stat-list/stat-list.svelte +4 -3
- package/dist/components/ui/stat-list/stat-list.svelte.d.ts +2 -2
- package/dist/components/ui/status/index.d.ts +1 -0
- package/dist/components/ui/status/index.js +1 -1
- package/dist/components/ui/status/status-icon.svelte +40 -0
- package/dist/components/ui/status/status-icon.svelte.d.ts +10 -0
- package/dist/components/ui/status-badge/status-badge.svelte +8 -7
- package/dist/components/ui/status-badge/status-badge.svelte.d.ts +3 -3
- package/dist/styles.css +31 -0
- package/package.json +1 -1
- package/registry/component-map.json +1 -1
- package/registry/component-map.md +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,8 @@ stock look is what the AI app builders generate, and every app read as machine-m
|
|
|
31
31
|
in it. Sections are open, a heading over a hairline, never a bordered card each
|
|
32
32
|
(`Panel`, `StatList`, `StatCard`); a surface is a tonal step with no ring or shadow
|
|
33
33
|
(`Card`, `DetailPanel`). Labels and column heads are sentence case (`.ds-label`),
|
|
34
|
-
never small caps. Status is
|
|
34
|
+
never small caps. Status is its own glyph in its own colour, and a word. An icon in
|
|
35
|
+
the content, a section's or a figure's mark, takes the accent in its tone layer.
|
|
35
36
|
Tabs are underlined, the page ground is plain, corners are tight (`--ds-radius-lg`
|
|
36
37
|
0.5rem) and icons are the household set (§Icons). A change that brings a stock
|
|
37
38
|
default back is a regression of that issue.
|
|
@@ -45,7 +46,7 @@ src/lib/
|
|
|
45
46
|
numbers — en-AU, AUD, Australia/Brisbane
|
|
46
47
|
telemetry.ts browser telemetry: one initBrowserTelemetry() call, one Faro
|
|
47
48
|
instance, one session id (see below)
|
|
48
|
-
styles.css the component stylesheet: scale keys, .ds-label, .ds-chip/.ds-
|
|
49
|
+
styles.css the component stylesheet: scale keys, .ds-label, .ds-chip/.ds-status-icon,
|
|
49
50
|
the icon tone, the dialogue-section divider rule
|
|
50
51
|
icon-props.ts the household icons' props (icons/ is generated at build, gitignored)
|
|
51
52
|
components/ui/ one directory per component: the shadcn-svelte primitives
|
|
@@ -107,7 +108,7 @@ rather than rebuilding it:
|
|
|
107
108
|
| `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). |
|
|
108
109
|
| `page-container` | A route's page at the one rhythm: header, sections and panels 1.5rem apart, filling the content box. |
|
|
109
110
|
| `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`. |
|
|
110
|
-
| `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. |
|
|
111
|
+
| `page-section` | A section of a page: `title` at `level` 2 or 3, an optional `icon`, `description`, `count` and `actions`, and its content at one distance below. |
|
|
111
112
|
| `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). |
|
|
112
113
|
| `content-skeleton` | A region loading, shaped like what replaces it: `rows`, `tiles` or `prose`. A whole page waiting is LoadingState. |
|
|
113
114
|
| `panel` | The generic titled section, open rather than boxed, and the settings section: optional icon, a short `subtitle` or a longer `description`, both wrapping, trailing `action`s, a body that can opt out of padding or scroll inside the section (`scroll`), an optional `footer` over a hairline for Save/Cancel, and `tone="destructive"` for a danger zone. There is no `SettingsSection`; see [The settings destination](#the-settings-destination). |
|
|
@@ -121,13 +122,13 @@ rather than rebuilding it:
|
|
|
121
122
|
| `context-column` | The page's right-hand context, as its aside (`PageAside`). A list page's: a standing `StatList` plus an optional detail that flows in on select. A record page's (`title`, `children`): the one opened item, closable, scrolling inside itself, and its `documentPane` in the item's place. The page type places it; below the aside's width it opens from the bar as a sheet. See [A record's page](#a-records-page). |
|
|
122
123
|
| `app-dialog` | The dialogue frame: titled header, scrollable body, footer action bar, five sizes (`xs`…`xl`), and an `onOpenChange` for the dismissals the caller did not drive. |
|
|
123
124
|
| `dialog-section` | One section of a dialogue body; adjacent sections are divided automatically. |
|
|
124
|
-
| `stat-card` | A single metric that earns its space (label, value, unit, sub, status
|
|
125
|
+
| `stat-card` | A single metric that earns its space (label, value, unit, sub, status glyph, and `valueTone` to colour the figure itself). |
|
|
125
126
|
| `stat-list` | A route's low-context integers as a label→value list. Zero-aware: `muted` keeps a healthy zero quiet. |
|
|
126
127
|
| `arc-gauge` | A radial capacity/percentage ring for a single 0–100 metric, in a footprint too compact for a `stat-card`. |
|
|
127
128
|
| `bar-row` | A labelled horizontal bar with a trailing tabular value, for a ranked list (usage, rank, token burn). |
|
|
128
129
|
| `scorecard` | A compact 0/1/2 dot-row health strip for several independent checks read at a glance. |
|
|
129
130
|
| `sparkline` | An inline multi-series area+line trend for a row or card with room for a trend but not a full chart. |
|
|
130
|
-
| `status` / `status-badge` | The fixed five-state vocabulary (`success \| warning \| error \| info \| neutral`) and the one state chip, with `pulse` for a state still in motion and `class` for placement. `status-badge` alone also accepts `'primary'`, a brand-emphasis extension outside the shared vocabulary — `stat-card`, `stat-list` and `data-table-toolbar` never see it. |
|
|
131
|
+
| `status` / `status-badge` | The fixed five-state vocabulary (`success \| warning \| error \| info \| neutral`) and the one state chip, with `pulse` for a state still in motion and `class` for placement. `StatusIcon` is a state's glyph alone: check, triangle, cross, `i`, minus, in its status ink. `status-badge` alone also accepts `'primary'`, a brand-emphasis extension outside the shared vocabulary — `stat-card`, `stat-list` and `data-table-toolbar` never see it. |
|
|
131
132
|
| `empty-state` / `error-state` / `loading-state` | The shared blank, error and loading surfaces. Never hand-roll one. |
|
|
132
133
|
| `info-tip` | One tooltip pattern: a small info trigger, or wrap an existing affordance as children. |
|
|
133
134
|
| `data-table-toolbar` | Search field plus filter-chip groups for a TanStack table. Owns no state; fires callbacks. |
|
|
@@ -1018,7 +1019,7 @@ Settled here, the same in every module, and not props:
|
|
|
1018
1019
|
- **Two lines a row**, the note under the title, the pair centred on the row; a
|
|
1019
1020
|
row with no note centres its title. The checkbox, the review chip, the date and
|
|
1020
1021
|
every single-value cell centre too.
|
|
1021
|
-
- **One mark per kind.** A review chip (StatusBadge's
|
|
1022
|
+
- **One mark per kind.** A review chip (StatusBadge's glyph and label)
|
|
1022
1023
|
beside the title on line one, which wraps (to two lines at most) before the chip gives any width; a synthetic row's "Not as printed" badge leads its second line and
|
|
1023
1024
|
opens the row in place to the lines it was made from.
|
|
1024
1025
|
- **PocketSmith's look.** No panel around the list; a head card exactly as wide
|
|
@@ -1476,7 +1477,7 @@ unnoticed through a full app migration (#3).
|
|
|
1476
1477
|
|
|
1477
1478
|
Second, what the variable layer does not cover: the `text-display` / `text-body` /
|
|
1478
1479
|
`text-stat` / `tracking-eyebrow` scale keys, the `.ds-edge` card treatment, the
|
|
1479
|
-
`.ds-dialog-section` divider rule, the `.ds-chip` / `.ds-
|
|
1480
|
+
`.ds-dialog-section` divider rule, the `.ds-chip` / `.ds-status-icon` / `.ds-ink` status
|
|
1480
1481
|
classes, the `--ds-control-*` geometry the density option turns (below), and the
|
|
1481
1482
|
two things that make this package's overlays animate at all — a
|
|
1482
1483
|
`@custom-variant` per `data-state` value (bits-ui emits `data-state="open"`, so
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
{/if}
|
|
38
38
|
<div class="flex min-w-0 items-center gap-2.5">
|
|
39
39
|
{#if icon}
|
|
40
|
-
<span class="text-muted-foreground grid size-6 flex-none place-items-center" data-slot="page-lead-icon">
|
|
40
|
+
<span class="ds-icon-accent text-muted-foreground grid size-6 flex-none place-items-center" data-slot="page-lead-icon">
|
|
41
41
|
{@render icon()}
|
|
42
42
|
</span>
|
|
43
43
|
{/if}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* kicker form: a small caps label above content is the column head of a
|
|
16
16
|
* table or a nav group, never a heading.
|
|
17
17
|
*/
|
|
18
|
-
import type { Snippet } from 'svelte';
|
|
18
|
+
import type { Component, Snippet } from 'svelte';
|
|
19
19
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
20
20
|
import { cn, type WithElementRef } from '../../../utils.js';
|
|
21
21
|
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
level = 2,
|
|
25
25
|
description,
|
|
26
26
|
count,
|
|
27
|
+
icon: Icon,
|
|
27
28
|
actions,
|
|
28
29
|
children,
|
|
29
30
|
id,
|
|
@@ -38,6 +39,8 @@
|
|
|
38
39
|
description?: string;
|
|
39
40
|
/** How many things the section holds, set beside the heading. */
|
|
40
41
|
count?: number;
|
|
42
|
+
/** The section's mark, a household icon, before the heading, its tone in the accent. */
|
|
43
|
+
icon?: Component<{ class?: string }>;
|
|
41
44
|
/** Controls for the section, trailing the heading. */
|
|
42
45
|
actions?: Snippet;
|
|
43
46
|
children?: Snippet;
|
|
@@ -70,6 +73,9 @@
|
|
|
70
73
|
: 'text-body leading-tight tracking-tight'
|
|
71
74
|
)}
|
|
72
75
|
>
|
|
76
|
+
{#if Icon}
|
|
77
|
+
<Icon class="ds-icon-accent flex-none self-center" />
|
|
78
|
+
{/if}
|
|
73
79
|
<span class="min-w-0">{title}</span>
|
|
74
80
|
{#if count !== undefined}
|
|
75
81
|
<span
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* kicker form: a small caps label above content is the column head of a
|
|
15
15
|
* table or a nav group, never a heading.
|
|
16
16
|
*/
|
|
17
|
-
import type { Snippet } from 'svelte';
|
|
17
|
+
import type { Component, Snippet } from 'svelte';
|
|
18
18
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
19
19
|
import { type WithElementRef } from '../../../utils.js';
|
|
20
20
|
type $$ComponentProps = Omit<WithElementRef<HTMLAttributes<HTMLElement>>, 'title'> & {
|
|
@@ -25,12 +25,16 @@ type $$ComponentProps = Omit<WithElementRef<HTMLAttributes<HTMLElement>>, 'title
|
|
|
25
25
|
description?: string;
|
|
26
26
|
/** How many things the section holds, set beside the heading. */
|
|
27
27
|
count?: number;
|
|
28
|
+
/** The section's mark, a household icon, before the heading, its tone in the accent. */
|
|
29
|
+
icon?: Component<{
|
|
30
|
+
class?: string;
|
|
31
|
+
}>;
|
|
28
32
|
/** Controls for the section, trailing the heading. */
|
|
29
33
|
actions?: Snippet;
|
|
30
34
|
children?: Snippet;
|
|
31
35
|
/** The heading's id, for a link to the section. One is generated otherwise. */
|
|
32
36
|
id?: string;
|
|
33
37
|
};
|
|
34
|
-
declare const PageSection:
|
|
38
|
+
declare const PageSection: Component<$$ComponentProps, {}, "ref">;
|
|
35
39
|
type PageSection = ReturnType<typeof PageSection>;
|
|
36
40
|
export default PageSection;
|
|
@@ -108,7 +108,10 @@
|
|
|
108
108
|
>
|
|
109
109
|
{#if Icon}
|
|
110
110
|
<Icon
|
|
111
|
-
class={cn(
|
|
111
|
+
class={cn(
|
|
112
|
+
'size-4',
|
|
113
|
+
destructive ? 'text-destructive' : 'ds-icon-accent text-muted-foreground'
|
|
114
|
+
)}
|
|
112
115
|
/>
|
|
113
116
|
{/if}
|
|
114
117
|
<div class="min-w-0">
|
|
@@ -132,7 +135,15 @@
|
|
|
132
135
|
{/if}
|
|
133
136
|
</header>
|
|
134
137
|
{/if}
|
|
135
|
-
<div
|
|
138
|
+
<div
|
|
139
|
+
class={cn(
|
|
140
|
+
pad && 'pt-4',
|
|
141
|
+
// A flush table has no padding to end it, and its last row carries no rule of its own.
|
|
142
|
+
!pad && 'border-border border-b',
|
|
143
|
+
scroll && 'min-h-0 flex-1 overflow-y-auto'
|
|
144
|
+
)}
|
|
145
|
+
data-slot="panel-body"
|
|
146
|
+
>
|
|
136
147
|
{@render children()}
|
|
137
148
|
</div>
|
|
138
149
|
{#if footer}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import StatusIcon from '../status/status-icon.svelte';
|
|
2
3
|
import type { Status } from '../status/index.js';
|
|
3
4
|
import type { Component } from 'svelte';
|
|
4
5
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
value: string | number;
|
|
23
24
|
unit?: string;
|
|
24
25
|
sub?: string;
|
|
25
|
-
/**
|
|
26
|
+
/** Marks the LABEL with the state's glyph: the state of the thing being measured. */
|
|
26
27
|
status?: Status;
|
|
27
28
|
/**
|
|
28
29
|
* Colours the FIGURE itself: the sign of the number, not the health of its
|
|
@@ -52,13 +53,13 @@
|
|
|
52
53
|
>
|
|
53
54
|
<div class="flex items-center gap-2">
|
|
54
55
|
{#if Icon}
|
|
55
|
-
<Icon class="text-muted-foreground size-4" />
|
|
56
|
+
<Icon class="ds-icon-accent text-muted-foreground size-4" />
|
|
56
57
|
{/if}
|
|
57
58
|
<span class="ds-label">
|
|
58
59
|
{label}
|
|
59
60
|
</span>
|
|
60
61
|
{#if status}
|
|
61
|
-
<
|
|
62
|
+
<StatusIcon {status} class="ml-auto" />
|
|
62
63
|
{/if}
|
|
63
64
|
</div>
|
|
64
65
|
<div class="flex items-baseline gap-1.5">
|
|
@@ -7,7 +7,7 @@ type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
|
7
7
|
value: string | number;
|
|
8
8
|
unit?: string;
|
|
9
9
|
sub?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Marks the LABEL with the state's glyph: the state of the thing being measured. */
|
|
11
11
|
status?: Status;
|
|
12
12
|
/**
|
|
13
13
|
* Colours the FIGURE itself: the sign of the number, not the health of its
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
label: string;
|
|
7
7
|
/** The figure. Numbers render mono + tabular. */
|
|
8
8
|
value: string | number;
|
|
9
|
-
/** Optional status;
|
|
9
|
+
/** Optional status; marks the value with the state's glyph, unless muted. */
|
|
10
10
|
status?: Status;
|
|
11
|
-
/** Render quiet (e.g. a healthy zero): dims the value and suppresses the
|
|
11
|
+
/** Render quiet (e.g. a healthy zero): dims the value and suppresses the mark. */
|
|
12
12
|
muted?: boolean;
|
|
13
13
|
/** Optional small trailing unit/sub next to the value (e.g. "/ 1"). */
|
|
14
14
|
sub?: string;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
20
20
|
import type { WithElementRef } from '../../../utils.js';
|
|
21
21
|
import InfoTip from '../info-tip/info-tip.svelte';
|
|
22
|
+
import StatusIcon from '../status/status-icon.svelte';
|
|
22
23
|
|
|
23
24
|
// The standing metric card for the right-hand context column: a route's
|
|
24
25
|
// low-context integers stacked as a vertical label→value list inside one card,
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
</dt>
|
|
69
70
|
<dd class="flex items-center gap-1.5">
|
|
70
71
|
{#if item.status && !item.muted}
|
|
71
|
-
<
|
|
72
|
+
<StatusIcon status={item.status} />
|
|
72
73
|
{/if}
|
|
73
74
|
<span
|
|
74
75
|
class="ds-tabular text-stat leading-none font-semibold {item.muted
|
|
@@ -4,9 +4,9 @@ export interface StatItem {
|
|
|
4
4
|
label: string;
|
|
5
5
|
/** The figure. Numbers render mono + tabular. */
|
|
6
6
|
value: string | number;
|
|
7
|
-
/** Optional status;
|
|
7
|
+
/** Optional status; marks the value with the state's glyph, unless muted. */
|
|
8
8
|
status?: Status;
|
|
9
|
-
/** Render quiet (e.g. a healthy zero): dims the value and suppresses the
|
|
9
|
+
/** Render quiet (e.g. a healthy zero): dims the value and suppresses the mark. */
|
|
10
10
|
muted?: boolean;
|
|
11
11
|
/** Optional small trailing unit/sub next to the value (e.g. "/ 1"). */
|
|
12
12
|
sub?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { default as StatusIcon } from './status-icon.svelte';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import CheckCircle from '../../../icons/check-circle.svelte';
|
|
3
|
+
import Circle from '../../../icons/circle.svelte';
|
|
4
|
+
import Info from '../../../icons/info.svelte';
|
|
5
|
+
import MinusCircle from '../../../icons/minus-circle.svelte';
|
|
6
|
+
import Warning from '../../../icons/warning.svelte';
|
|
7
|
+
import XCircle from '../../../icons/x-circle.svelte';
|
|
8
|
+
import { cn } from '../../../utils.js';
|
|
9
|
+
import type { Status } from './index.js';
|
|
10
|
+
|
|
11
|
+
// A state's mark: its own glyph in its own colour, so states differ in shape as
|
|
12
|
+
// well as hue, the eye finds them before it reads, and a reader who cannot tell
|
|
13
|
+
// the hues apart still can (WCAG 1.4.1). StatusBadge, StatCard and StatList
|
|
14
|
+
// draw every state with it.
|
|
15
|
+
let {
|
|
16
|
+
status,
|
|
17
|
+
pulse = false,
|
|
18
|
+
class: className
|
|
19
|
+
}: {
|
|
20
|
+
status: Status | 'primary';
|
|
21
|
+
/** Breathe, for a state that is still moving; still under reduced motion. */
|
|
22
|
+
pulse?: boolean;
|
|
23
|
+
class?: string;
|
|
24
|
+
} = $props();
|
|
25
|
+
|
|
26
|
+
const GLYPH = {
|
|
27
|
+
success: CheckCircle,
|
|
28
|
+
warning: Warning,
|
|
29
|
+
error: XCircle,
|
|
30
|
+
info: Info,
|
|
31
|
+
neutral: MinusCircle,
|
|
32
|
+
primary: Circle
|
|
33
|
+
};
|
|
34
|
+
const Glyph = $derived(GLYPH[status]);
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<Glyph
|
|
38
|
+
class={cn('ds-status-icon', `ds-ink-${status}`, pulse && 'ds-dot-pulse', className)}
|
|
39
|
+
data-status={status}
|
|
40
|
+
/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Status } from './index.js';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
status: Status | 'primary';
|
|
4
|
+
/** Breathe, for a state that is still moving; still under reduced motion. */
|
|
5
|
+
pulse?: boolean;
|
|
6
|
+
class?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const StatusIcon: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type StatusIcon = ReturnType<typeof StatusIcon>;
|
|
10
|
+
export default StatusIcon;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import StatusIcon from '../status/status-icon.svelte';
|
|
2
3
|
import type { Status } from '../status/index.js';
|
|
3
4
|
import { cn } from '../../../utils.js';
|
|
4
5
|
|
|
5
|
-
// The one state chip:
|
|
6
|
-
// comes from .ds-chip / .ds-
|
|
7
|
-
// status vocabulary changes in one place.
|
|
6
|
+
// The one state chip: the state's glyph in its colour, and a label. Styling
|
|
7
|
+
// comes from .ds-chip / .ds-status-icon in @poodle64/ui/styles.css, so the whole
|
|
8
|
+
// app's status vocabulary changes in one place.
|
|
8
9
|
let {
|
|
9
10
|
status,
|
|
10
11
|
label,
|
|
@@ -14,14 +15,14 @@
|
|
|
14
15
|
/**
|
|
15
16
|
* The shared five-state Status vocabulary, plus `'primary'` — a
|
|
16
17
|
* StatusBadge-only extension for brand-emphasis chips (not a health
|
|
17
|
-
* state), backed by `.ds-chip-primary`/`.ds-
|
|
18
|
+
* state), backed by `.ds-chip-primary`/`.ds-ink-primary`. The shared
|
|
18
19
|
* `Status` type itself stays closed at five states; StatCard, StatList
|
|
19
20
|
* and DataTableToolbar never see `'primary'`.
|
|
20
21
|
*/
|
|
21
22
|
status: Status | 'primary';
|
|
22
23
|
label: string;
|
|
23
24
|
/**
|
|
24
|
-
* Animate the
|
|
25
|
+
* Animate the mark, for a state that is still moving.
|
|
25
26
|
*
|
|
26
27
|
* The vocabulary is five settled states, and an app kept a local badge
|
|
27
28
|
* purely because none of them says "in progress": a sync that is running
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
* adding a sixth state to a vocabulary that is deliberately closed.
|
|
32
33
|
*
|
|
33
34
|
* Motion is honoured only where it is welcome: under
|
|
34
|
-
* `prefers-reduced-motion: reduce` the
|
|
35
|
+
* `prefers-reduced-motion: reduce` the mark goes still (`.ds-dot-pulse` in
|
|
35
36
|
* styles.css). It is therefore never the only carrier of meaning — the
|
|
36
37
|
* label still says what is happening (WCAG 1.4.1).
|
|
37
38
|
*/
|
|
@@ -48,6 +49,6 @@
|
|
|
48
49
|
</script>
|
|
49
50
|
|
|
50
51
|
<span class={cn('ds-chip', `ds-chip-${status}`, className)}>
|
|
51
|
-
<
|
|
52
|
+
<StatusIcon {status} {pulse} />
|
|
52
53
|
{label}
|
|
53
54
|
</span>
|
|
@@ -3,14 +3,14 @@ type $$ComponentProps = {
|
|
|
3
3
|
/**
|
|
4
4
|
* The shared five-state Status vocabulary, plus `'primary'` — a
|
|
5
5
|
* StatusBadge-only extension for brand-emphasis chips (not a health
|
|
6
|
-
* state), backed by `.ds-chip-primary`/`.ds-
|
|
6
|
+
* state), backed by `.ds-chip-primary`/`.ds-ink-primary`. The shared
|
|
7
7
|
* `Status` type itself stays closed at five states; StatCard, StatList
|
|
8
8
|
* and DataTableToolbar never see `'primary'`.
|
|
9
9
|
*/
|
|
10
10
|
status: Status | 'primary';
|
|
11
11
|
label: string;
|
|
12
12
|
/**
|
|
13
|
-
* Animate the
|
|
13
|
+
* Animate the mark, for a state that is still moving.
|
|
14
14
|
*
|
|
15
15
|
* The vocabulary is five settled states, and an app kept a local badge
|
|
16
16
|
* purely because none of them says "in progress": a sync that is running
|
|
@@ -20,7 +20,7 @@ type $$ComponentProps = {
|
|
|
20
20
|
* adding a sixth state to a vocabulary that is deliberately closed.
|
|
21
21
|
*
|
|
22
22
|
* Motion is honoured only where it is welcome: under
|
|
23
|
-
* `prefers-reduced-motion: reduce` the
|
|
23
|
+
* `prefers-reduced-motion: reduce` the mark goes still (`.ds-dot-pulse` in
|
|
24
24
|
* styles.css). It is therefore never the only carrier of meaning — the
|
|
25
25
|
* label still says what is happening (WCAG 1.4.1).
|
|
26
26
|
*/
|
package/dist/styles.css
CHANGED
|
@@ -494,6 +494,16 @@
|
|
|
494
494
|
opacity: var(--ds-icon-tone-opacity, 0.2);
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
+
/**
|
|
498
|
+
* An icon in the content, a section's or a figure's mark, takes the rail's
|
|
499
|
+
* treatment: the outline in its own ink, the tone layer in the app's accent, so
|
|
500
|
+
* the palette lands where the eye does.
|
|
501
|
+
*/
|
|
502
|
+
.ds-icon-accent {
|
|
503
|
+
--ds-icon-tone: var(--primary);
|
|
504
|
+
--ds-icon-tone-opacity: 0.45;
|
|
505
|
+
}
|
|
506
|
+
|
|
497
507
|
/**
|
|
498
508
|
* How the display face is set. An app says it once in its palette
|
|
499
509
|
* (`--ds-font-display-transform: uppercase; --ds-font-display-tracking:
|
|
@@ -553,6 +563,17 @@
|
|
|
553
563
|
white-space: nowrap;
|
|
554
564
|
}
|
|
555
565
|
|
|
566
|
+
/**
|
|
567
|
+
* A state's glyph (StatusIcon): its own shape and its status ink, the tone
|
|
568
|
+
* layer a quarter of that ink, a little larger than the text beside it.
|
|
569
|
+
*/
|
|
570
|
+
.ds-status-icon {
|
|
571
|
+
width: 1.125em;
|
|
572
|
+
height: 1.125em;
|
|
573
|
+
flex: none;
|
|
574
|
+
--ds-icon-tone-opacity: 0.25;
|
|
575
|
+
}
|
|
576
|
+
|
|
556
577
|
.ds-dot {
|
|
557
578
|
width: 0.4375rem;
|
|
558
579
|
height: 0.4375rem;
|
|
@@ -624,6 +645,9 @@
|
|
|
624
645
|
.ds-ink-neutral {
|
|
625
646
|
color: var(--muted-foreground);
|
|
626
647
|
}
|
|
648
|
+
.ds-ink-primary {
|
|
649
|
+
color: var(--ds-color-primary-ink, var(--ds-color-primary));
|
|
650
|
+
}
|
|
627
651
|
|
|
628
652
|
/**
|
|
629
653
|
* A dot for a state that is still moving (StatusBadge's `pulse`). Opacity
|
|
@@ -1260,6 +1284,13 @@
|
|
|
1260
1284
|
max-width: var(--ds-page-panel);
|
|
1261
1285
|
}
|
|
1262
1286
|
|
|
1287
|
+
/* A block that holds a table is tabular, not prose: its measure is the frame's,
|
|
1288
|
+
so a list of people does not stop at the width a paragraph reads at and leave
|
|
1289
|
+
an empty band beside it. Prose and forms keep the panel measure. */
|
|
1290
|
+
.ds-page[data-page='panel']:not([data-fill]) > .ds-page-main > :has([data-slot='table']) {
|
|
1291
|
+
max-width: none;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1263
1294
|
.ds-page[data-page='panel'][data-fill] > .ds-page-main {
|
|
1264
1295
|
padding: 0;
|
|
1265
1296
|
overflow: hidden;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poodle64/ui",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.15",
|
|
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.11.
|
|
4
|
+
Generated from `@poodle64/ui@2026.11.15`. 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
|
|