@motion-proto/live-tokens 0.82.0 → 0.83.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/.claude/skills/live-tokens-create-component/SKILL.md +16 -4
- package/.claude/skills/live-tokens-create-page/SKILL.md +19 -17
- package/.claude/skills/live-tokens-create-page/references/interaction-sources.md +3 -3
- package/.claude/skills/live-tokens-pick-component/SKILL.md +10 -83
- package/CHANGELOG.md +53 -0
- package/README.md +1 -1
- package/bin/cli.mjs +21 -8
- package/bin/lib/catalogue.mjs +140 -41
- package/bin/rules/componentStructure.mjs +12 -4
- package/dist-plugin/{chunk-REBHE3ZM.js → chunk-6JKUYCPL.js} +29 -9
- package/dist-plugin/{chunk-D4WRIKEZ.js → chunk-LBZISJPG.js} +1 -1
- package/dist-plugin/index.cjs +33 -13
- package/dist-plugin/index.js +2 -2
- package/dist-plugin/migrateData/index.cjs +29 -9
- package/dist-plugin/migrateData/index.js +2 -2
- package/dist-plugin/setColors/index.cjs +29 -9
- package/dist-plugin/setColors/index.js +1 -1
- package/dist-plugin/setGeometry/index.cjs +29 -9
- package/dist-plugin/setGeometry/index.js +1 -1
- package/package.json +3 -1
- package/src/editor/component-editor/ImageLightboxEditor.svelte +1 -1
- package/src/editor/component-editor/scaffolding/types.ts +13 -8
- package/src/editor/core/sketch/sketchLayer.ts +1 -1
- package/src/editor/core/themes/migrations/2026-09-20-imagelightbox-scrim.ts +28 -0
- package/src/editor/core/themes/migrations/index.ts +2 -0
- package/src/editor/docs/content/creating-components.md +3 -0
- package/src/editor/docs/content.generated.ts +1 -1
- package/src/editor/skill-atlas/SkillAtlas.svelte +65 -38
- package/src/editor/skill-atlas/SkillValue.svelte +202 -0
- package/src/editor/skill-atlas/evalResults.ts +46 -0
- package/src/editor/skill-atlas/skillSources.generated.ts +4 -4
- package/src/editor/skill-atlas/trees/create-component.ts +18 -18
- package/src/editor/skill-atlas/trees/create-page.ts +28 -32
- package/src/editor/skill-atlas/trees/pick-component.ts +66 -196
- package/src/live-tokens/data/themes/autumn.json +3 -3
- package/src/live-tokens/data/themes/halloween.json +3 -3
- package/src/live-tokens/data/themes/midnight-study.json +3 -3
- package/src/live-tokens/data/themes/ocean.json +3 -3
- package/src/live-tokens/data/themes/royal-velvet.json +3 -3
- package/src/live-tokens/data/themes/sketchy.json +3 -3
- package/src/live-tokens/data/themes/spring-meadow.json +3 -3
- package/src/live-tokens/data/themes/sunset.json +3 -3
- package/src/system/components/Badge.svelte +5 -2
- package/src/system/components/Button.svelte +10 -2
- package/src/system/components/Callout.svelte +5 -2
- package/src/system/components/Card.svelte +8 -3
- package/src/system/components/CodeSnippet.svelte +6 -2
- package/src/system/components/CollapsibleSection.svelte +6 -2
- package/src/system/components/CornerBadge.svelte +5 -2
- package/src/system/components/Dialog.svelte +5 -2
- package/src/system/components/IconButton.svelte +5 -2
- package/src/system/components/Image.svelte +5 -2
- package/src/system/components/ImageLightbox.svelte +47 -4
- package/src/system/components/InlineEditActions.svelte +5 -2
- package/src/system/components/Input.svelte +6 -2
- package/src/system/components/MenuSelect.svelte +9 -2
- package/src/system/components/Notification.svelte +5 -2
- package/src/system/components/Panel.svelte +5 -2
- package/src/system/components/ProgressBar.svelte +5 -2
- package/src/system/components/RadioButton.svelte +5 -2
- package/src/system/components/SectionDivider.svelte +5 -2
- package/src/system/components/SegmentedControl.svelte +5 -2
- package/src/system/components/SideNavigation.svelte +5 -2
- package/src/system/components/Slider.svelte +6 -2
- package/src/system/components/TabBar.svelte +5 -2
- package/src/system/components/Table.svelte +4 -2
- package/src/system/components/Toggle.svelte +5 -2
- package/src/system/components/Tooltip.svelte +5 -2
- package/src/testing-js/{chunk-ZMZQZ33J.js → chunk-RDHCBQ6I.js} +2 -2
- package/src/testing-js/chunk-RDHCBQ6I.js.map +1 -0
- package/src/testing-js/{chunk-Q3YIAAG3.js → chunk-XV5CYADO.js} +2 -2
- package/src/testing-js/component-behavior.contract.js +1 -1
- package/src/testing-js/component-editor.contract.js +1 -1
- package/src/testing-js/component-render.contract.js +1 -1
- package/src/testing-js/index.js +2 -2
- package/src/testing-js/page-compliance.contract.js +1 -1
- package/src/testing-js/vitest.js +2 -2
- package/src/testing-js/chunk-ZMZQZ33J.js.map +0 -1
- /package/src/testing-js/{chunk-Q3YIAAG3.js.map → chunk-XV5CYADO.js.map} +0 -0
|
@@ -3178,7 +3178,7 @@
|
|
|
3178
3178
|
"--imagelightbox-tile-border": "--color-transparent",
|
|
3179
3179
|
"--imagelightbox-tile-border-width": "--border-width-0",
|
|
3180
3180
|
"--imagelightbox-tile-shadow": "--shadow-md",
|
|
3181
|
-
"--imagelightbox-
|
|
3181
|
+
"--imagelightbox-scrim-surface": "color-mix(in srgb, var(--color-neutral-950) 76%, transparent)",
|
|
3182
3182
|
"--imagelightbox-chrome-surface": "--surface-neutral-low",
|
|
3183
3183
|
"--imagelightbox-chrome-border": "--border-brand",
|
|
3184
3184
|
"--imagelightbox-chrome-border-width": "--border-width-1",
|
|
@@ -4032,5 +4032,5 @@
|
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
4034
|
},
|
|
4035
|
-
"componentSchemaVersion":
|
|
4036
|
-
}
|
|
4035
|
+
"componentSchemaVersion": 36
|
|
4036
|
+
}
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A short standing label on an element.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'status the reader takes at a glance, such as "Beta", "New", or a version.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: "the marker sits on the thing it describes, in the parent's corner.", use: 'cornerbadge' },
|
|
9
|
+
{ when: 'the message is feedback about something that just happened.', use: 'notification' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
variant: '`brand`, `accent`, `special`, `alternate`, `canvas`, and `neutral` paint a color family; `success`, `warning`, `danger`, and `info` carry a status.',
|
|
10
13
|
},
|
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A labelled action.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'an action that needs a word to be unambiguous.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the glyph alone is plain, and space is short.', use: 'iconbutton' },
|
|
9
|
+
{ when: 'the actions confirm or cancel an inline edit.', use: 'inlineeditactions' },
|
|
10
|
+
],
|
|
11
|
+
constraints: [
|
|
12
|
+
'One primary Button per page.',
|
|
13
|
+
'A danger Button opens a Dialog to confirm before it runs.',
|
|
14
|
+
'A link to another page is an anchor.',
|
|
15
|
+
],
|
|
8
16
|
props: {
|
|
9
17
|
variant: 'one primary per page; secondary for the rest; outline for a tertiary action; danger for a destructive one.',
|
|
10
18
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A standing message that sits inside a section.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'something the reader must know about the content around it.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the message is feedback about something that just happened, and the reader can dismiss it.', use: 'notification' },
|
|
9
|
+
{ when: 'the note hangs off one element, shown on hover or focus.', use: 'tooltip' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
variant: '`info` notes, `success` confirms, `warning` cautions, `danger` flags harm.',
|
|
10
13
|
},
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'One item with a title.',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
whenToUse: 'an item on its own, or each item in a set: a product, a record, a plan the reader may act on.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: "the block is a stage, a list, a form, or copy that forms one section of the page's content.", use: 'panel' },
|
|
9
|
+
{ when: 'the content is secondary, and most readers skip it until they open it.', use: 'collapsiblesection' },
|
|
10
|
+
{ when: 'the page cannot continue until the reader decides.', use: 'dialog' },
|
|
11
|
+
{ when: 'the reader scans and compares the records.', use: 'table' },
|
|
12
|
+
],
|
|
13
|
+
constraints: ["The title prop is the Card's title, and the card's own tokens type it."],
|
|
9
14
|
props: {
|
|
10
15
|
variant: '`bare` drops the header for content that carries its own title.',
|
|
11
16
|
},
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A command or value with a copy button.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'text the reader is meant to run or paste somewhere else.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the text is prose the reader only reads, inside its own titled block.', use: 'card' },
|
|
9
|
+
{ when: 'the text is prose the reader only reads, inside a section of the page.', use: 'panel' },
|
|
10
|
+
{ when: 'the reader edits the value.', use: 'input' },
|
|
11
|
+
],
|
|
8
12
|
} satisfies CatalogueEntry;
|
|
9
13
|
</script>
|
|
10
14
|
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A section the reader opens and closes.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'secondary content that most readers skip.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'every reader needs the content, so it stays open.', use: 'card' },
|
|
9
|
+
{ when: 'the choice moves the reader to another page.', use: 'sidenavigation' },
|
|
10
|
+
],
|
|
11
|
+
constraints: ["In a form, CollapsibleSection holds the secondary fields, and the form's actions stay outside it on the form's bottom edge."],
|
|
8
12
|
props: {
|
|
9
13
|
variant: '`chromeless` sits inside other content, `hairline` draws a line under the header, `container` frames the whole section.',
|
|
10
14
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A badge that sits on a corner of its parent.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a count or status marker that sits on the thing it describes.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the label sits in the text flow.', use: 'badge' },
|
|
9
|
+
{ when: 'the message is feedback about something that just happened.', use: 'notification' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
variant: '`brand`, `accent`, `special`, `alternate`, `canvas`, and `neutral` paint a color family; `success`, `warning`, `danger`, and `info` carry a status.',
|
|
10
13
|
anchor: 'the corner the badge sits on; `bottom-right` unless named.',
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A modal window that blocks the page.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a decision the page cannot continue without, such as a destructive confirmation or a sign-in.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the form is routine, and the page can continue around it.', use: 'panel' },
|
|
9
|
+
{ when: 'the message asks nothing of the reader.', use: 'notification' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'An action that an icon alone carries.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'an action whose meaning is plain from the glyph, such as close, edit, or delete.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the action needs a word to be unambiguous.', use: 'button' },
|
|
9
|
+
{ when: 'the pair confirms or cancels an inline edit.', use: 'inlineeditactions' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
variant: 'one primary per page; secondary for the rest; outline for a tertiary action; danger for a destructive one.',
|
|
10
13
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A framed picture in the page flow.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'any picture the page shows.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the detail is the point, and the reader opens it to see more.', use: 'imagelightbox' },
|
|
9
|
+
],
|
|
10
|
+
constraints: ['Page CSS paints decoration.'],
|
|
8
11
|
props: {
|
|
9
12
|
variant:
|
|
10
13
|
"`default` keeps the picture's own proportions, `banner` gives it a tall frame, `medium` and `compact` shorter ones.",
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A picture that opens to a full view on click.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a screenshot, artwork, or chart whose detail is the point, and for a gallery of them.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the reader takes the picture in at a glance, with no detail to open.', use: 'image' },
|
|
9
|
+
],
|
|
8
10
|
} satisfies CatalogueEntry;
|
|
9
11
|
</script>
|
|
10
12
|
|
|
@@ -41,6 +43,28 @@
|
|
|
41
43
|
a non-zero spread has no shadow under `content` — `drop-shadow()` has no
|
|
42
44
|
spread slot. */
|
|
43
45
|
shadow?: 'box' | 'content' | 'none';
|
|
46
|
+
/** A ground behind the image, for this instance, as any CSS fill. Overrides
|
|
47
|
+
`--imagelightbox-tile-surface`, which a theme sets for every tile at once
|
|
48
|
+
and which defaults to transparent. Art with transparency wants one:
|
|
49
|
+
without a ground the page shows through the art's own gaps while a `box`
|
|
50
|
+
shadow still casts from the rectangle around them. */
|
|
51
|
+
surface?: string | undefined;
|
|
52
|
+
/** A line around the tile, for this instance, as any CSS colour. Overrides
|
|
53
|
+
`--imagelightbox-tile-border`. It paints nothing on its own: the width
|
|
54
|
+
is a second token, so pass `borderWidth` with it wherever the theme
|
|
55
|
+
leaves that at zero. */
|
|
56
|
+
border?: string | undefined;
|
|
57
|
+
/** The width of that line, as any CSS length. Overrides
|
|
58
|
+
`--imagelightbox-tile-border-width`. */
|
|
59
|
+
borderWidth?: string | undefined;
|
|
60
|
+
/** The scrim behind the open image, for this instance, as any CSS fill.
|
|
61
|
+
Overrides `--imagelightbox-scrim-surface`. The modal portals to
|
|
62
|
+
<body>, out of reach of a wrapper around the tile, so a page that wants
|
|
63
|
+
its own scrim has to say so here. */
|
|
64
|
+
scrim?: string | undefined;
|
|
65
|
+
/** How much of `scrim` covers the page, 0 to 1. Needs `scrim`: it is
|
|
66
|
+
mixed with it, and on its own there is no colour to mix. */
|
|
67
|
+
scrimOpacity?: number | undefined;
|
|
44
68
|
/** When true, shows a bottom toolbar (zoom in/out + percent) and a top-right close button, and enables wheel/drag zoom inside the open modal. When false, click anywhere closes. */
|
|
45
69
|
extended?: boolean;
|
|
46
70
|
/** Maximum zoom, as a multiple of the image's natural resolution: `1` = 100%
|
|
@@ -73,11 +97,26 @@
|
|
|
73
97
|
maxWidth = undefined,
|
|
74
98
|
fit = 'contain',
|
|
75
99
|
shadow = 'box',
|
|
100
|
+
surface = undefined,
|
|
101
|
+
border = undefined,
|
|
102
|
+
borderWidth = undefined,
|
|
103
|
+
scrim = undefined,
|
|
104
|
+
scrimOpacity = undefined,
|
|
76
105
|
extended = false,
|
|
77
106
|
maxZoom = undefined,
|
|
78
107
|
capNatural = false,
|
|
79
108
|
}: Props = $props();
|
|
80
109
|
|
|
110
|
+
// An opacity is mixed into the colour, so the two arrive as one fill. Without
|
|
111
|
+
// a colour there is nothing to mix, and the theme's scrim stands.
|
|
112
|
+
const scrimFill = $derived(
|
|
113
|
+
scrim == null
|
|
114
|
+
? undefined
|
|
115
|
+
: scrimOpacity == null
|
|
116
|
+
? scrim
|
|
117
|
+
: `color-mix(in srgb, ${scrim} ${scrimOpacity * 100}%, transparent)`,
|
|
118
|
+
);
|
|
119
|
+
|
|
81
120
|
const items = $derived(
|
|
82
121
|
images && images.length
|
|
83
122
|
? images
|
|
@@ -603,6 +642,9 @@
|
|
|
603
642
|
class:shadow-box={shadow === 'box'}
|
|
604
643
|
class:shadow-content={shadow === 'content'}
|
|
605
644
|
style:--imagelightbox-tile-object-fit={fit}
|
|
645
|
+
style:--imagelightbox-tile-surface={surface}
|
|
646
|
+
style:--imagelightbox-tile-border={border}
|
|
647
|
+
style:--imagelightbox-tile-border-width={borderWidth}
|
|
606
648
|
type="button"
|
|
607
649
|
aria-label={cover?.alt ? `Expand image: ${cover.alt}` : 'Expand image'}
|
|
608
650
|
aria-haspopup="dialog"
|
|
@@ -625,6 +667,7 @@
|
|
|
625
667
|
<div
|
|
626
668
|
bind:this={overlayEl}
|
|
627
669
|
class="image-lightbox-overlay"
|
|
670
|
+
style:--imagelightbox-scrim-surface={scrimFill}
|
|
628
671
|
class:active={open}
|
|
629
672
|
aria-hidden="true"
|
|
630
673
|
onclick={closeLightbox}
|
|
@@ -748,7 +791,7 @@
|
|
|
748
791
|
--imagelightbox-tile-object-fit: contain;
|
|
749
792
|
|
|
750
793
|
/* overlay */
|
|
751
|
-
--imagelightbox-
|
|
794
|
+
--imagelightbox-scrim-surface: var(--scrim-high);
|
|
752
795
|
|
|
753
796
|
/* chrome (toolbar + close button) */
|
|
754
797
|
--imagelightbox-chrome-surface: var(--surface-neutral-low);
|
|
@@ -874,7 +917,7 @@
|
|
|
874
917
|
.image-lightbox-overlay {
|
|
875
918
|
position: fixed;
|
|
876
919
|
inset: 0;
|
|
877
|
-
background: var(--imagelightbox-
|
|
920
|
+
background: var(--imagelightbox-scrim-surface);
|
|
878
921
|
backdrop-filter: blur(var(--blur-md));
|
|
879
922
|
z-index: var(--z-overlay);
|
|
880
923
|
opacity: 0;
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'The confirm-and-cancel pair that ends an inline edit.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'the two actions that close an in-place rename or value edit.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the actions belong to a form or a Dialog.', use: 'button' },
|
|
9
|
+
{ when: 'the row needs one lone action.', use: 'iconbutton' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A text field with its label, hint, and error line.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'an answer the page cannot list, such as a name, an amount, or a search string.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the answer comes from a predefined list of options.', use: 'menuselect' },
|
|
9
|
+
{ when: 'the setting is on or off, and takes effect at once.', use: 'toggle' },
|
|
10
|
+
{ when: 'the position on a track carries the meaning of the number.', use: 'slider' },
|
|
11
|
+
],
|
|
8
12
|
props: {
|
|
9
13
|
type: '`number` for an amount, `search` for a query, `password` for a secret; `text` otherwise.',
|
|
10
14
|
},
|
|
@@ -3,8 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A list of options with one checked.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'single selection from a set too long to sit in a row, dropped from a Button.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the choice allows more than one value.' },
|
|
9
|
+
{ when: 'the set is two to four options that fit inline.', use: 'segmentedcontrol' },
|
|
10
|
+
{ when: 'the reader reads every option as text inside a larger form.', use: 'radiobutton' },
|
|
11
|
+
],
|
|
12
|
+
constraints: [
|
|
13
|
+
'The Button that opens it is the control on the page; MenuSelect renders its list open.',
|
|
14
|
+
],
|
|
8
15
|
props: {
|
|
9
16
|
role: '`listbox` for a select; `menu` for a command menu.',
|
|
10
17
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'Feedback about something that just happened.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'the outcome of an action or a system event, which the reader can dismiss.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the reader must know it about the content around it, and it stays present.', use: 'callout' },
|
|
9
|
+
{ when: 'the page cannot continue until the reader decides.', use: 'dialog' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
variant: '`info` notes, `success` confirms, `warning` cautions, `danger` flags harm.',
|
|
10
13
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: "A frame around one section of the page's content.",
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a stage, a list, a form, or a block of copy that forms one section.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the block is one item, or each item in a set.', use: 'card' },
|
|
9
|
+
{ when: 'the page cannot continue until the reader decides.', use: 'dialog' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
minHeight: 'holds the height while the content changes.',
|
|
10
13
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A read-out of progress against a labelled track.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'reporting how far a task has run.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the reader sets the number.', use: 'slider' },
|
|
9
|
+
{ when: 'the label stands on its own, with no progress to report.', use: 'badge' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A form row that selects one option.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a choice the reader reviews as text before committing to a larger form.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the choice switches between views of the same data, inline.', use: 'segmentedcontrol' },
|
|
9
|
+
{ when: 'the setting takes effect the moment it flips.', use: 'toggle' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A titled break between the sections of a page.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'naming the section that follows it.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the titles are links that move the reader between pages.', use: 'sidenavigation' },
|
|
9
|
+
{ when: 'the title belongs to one item inside a container.', use: 'card' },
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
variant: '`sm` titles a section, `md` titles a page, and `lg` is the largest size.',
|
|
10
13
|
eyebrow: 'an opt-in label above the title.',
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'An inline switch between named alternatives.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'two to four short labels that pick one view of the same data.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: "the choice swaps the page's content area below it.", use: 'tabbar' },
|
|
9
|
+
{ when: 'a label would wrap.', use: 'radiobutton' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'The rail that moves between the pages of a site.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'navigation that follows the current path.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the switch stays inside one page, with no URL change.', use: 'tabbar' },
|
|
9
|
+
{ when: 'the list holds actions.', use: 'menuselect' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A number the reader picks by position on a track.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a volume, a price range, or a percentage, where the position carries the meaning.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the reader knows the exact number and would rather type it.', use: 'input' },
|
|
9
|
+
{ when: 'the setting is on or off, and takes effect at once.', use: 'toggle' },
|
|
10
|
+
{ when: 'the number is a read-out of progress.', use: 'progressbar' },
|
|
11
|
+
],
|
|
8
12
|
props: {
|
|
9
13
|
variant: '`single` picks one number; `range` picks a low and a high.',
|
|
10
14
|
},
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'Tabs that swap the content below them.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'two to seven views the reader moves between inside one page.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the switch sits among other controls in a row.', use: 'segmentedcontrol' },
|
|
9
|
+
{ when: 'the choice changes the URL.', use: 'sidenavigation' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A themed frame around the rows and cells the page writes.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'records the reader scans and compares.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the reader acts on each item.', use: 'card' },
|
|
9
|
+
],
|
|
8
10
|
} satisfies CatalogueEntry;
|
|
9
11
|
</script>
|
|
10
12
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'An on/off switch that names the setting it controls.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a setting that takes effect the moment it flips.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the two states have names of their own that the reader compares.', use: 'segmentedcontrol' },
|
|
9
|
+
{ when: 'the reader answers yes or no inside a larger form.', use: 'radiobutton' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
export const catalogue = {
|
|
5
5
|
description: 'A short note that appears on an element on hover or focus.',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
whenToUse: 'a definition or a shortcut the reader can do without.',
|
|
7
|
+
whenNotToUse: [
|
|
8
|
+
{ when: 'the reader must not miss the content.', use: 'callout' },
|
|
9
|
+
{ when: 'the message is feedback about something that just happened.', use: 'notification' },
|
|
10
|
+
],
|
|
8
11
|
} satisfies CatalogueEntry;
|
|
9
12
|
</script>
|
|
10
13
|
|
|
@@ -1117,7 +1117,7 @@ var imageLightboxContract = {
|
|
|
1117
1117
|
borderRadius: "--imagelightbox-tile-radius",
|
|
1118
1118
|
boxShadow: "--imagelightbox-tile-shadow"
|
|
1119
1119
|
},
|
|
1120
|
-
overlay: { backgroundColor: "--imagelightbox-
|
|
1120
|
+
overlay: { backgroundColor: "--imagelightbox-scrim-surface" },
|
|
1121
1121
|
closeButton: {
|
|
1122
1122
|
backgroundColor: "--imagelightbox-chrome-surface",
|
|
1123
1123
|
borderTopColor: "--imagelightbox-chrome-border",
|
|
@@ -3368,4 +3368,4 @@ export {
|
|
|
3368
3368
|
allContracts,
|
|
3369
3369
|
selectedContracts
|
|
3370
3370
|
};
|
|
3371
|
-
//# sourceMappingURL=chunk-
|
|
3371
|
+
//# sourceMappingURL=chunk-RDHCBQ6I.js.map
|