@motion-proto/live-tokens 0.97.0 → 0.99.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-check-compliance/SKILL.md +5 -0
- package/.claude/skills/live-tokens-create-component/SKILL.md +4 -3
- package/.claude/skills/live-tokens-create-component/references/contract-tests.md +71 -11
- package/CHANGELOG.md +339 -0
- package/README.md +2 -2
- package/bin/check-component.mjs +8 -0
- package/bin/check-page.mjs +6 -0
- package/bin/cli.mjs +36 -6
- package/bin/contractRunner.mjs +144 -19
- package/bin/lib/findings.mjs +20 -4
- package/bin/rules/a11y.mjs +53 -0
- package/dist-plugin/{chunk-A4TBP4MM.js → chunk-SLICH4IH.js} +2 -2
- package/dist-plugin/index.cjs +204 -3
- package/dist-plugin/index.js +306 -105
- package/dist-plugin/setColors/index.js +1 -1
- package/package.json +47 -2
- package/src/demo/LabeledSelect.svelte +1 -1
- package/src/editor/bootstrap.ts +5 -1
- package/src/editor/component-editor/BadgeEditor.svelte +13 -0
- package/src/editor/component-editor/ButtonEditor.svelte +33 -2
- package/src/editor/component-editor/CalloutEditor.svelte +13 -0
- package/src/editor/component-editor/CardEditor.svelte +12 -2
- package/src/editor/component-editor/CodeSnippetEditor.svelte +11 -1
- package/src/editor/component-editor/CollapsibleSectionEditor.svelte +18 -1
- package/src/editor/component-editor/CornerBadgeEditor.svelte +13 -0
- package/src/editor/component-editor/DialogEditor.svelte +15 -0
- package/src/editor/component-editor/IconButtonEditor.svelte +29 -1
- package/src/editor/component-editor/ImageEditor.svelte +20 -9
- package/src/editor/component-editor/ImageLightboxEditor.svelte +44 -0
- package/src/editor/component-editor/InlineEditActionsEditor.svelte +13 -1
- package/src/editor/component-editor/InputEditor.svelte +23 -0
- package/src/editor/component-editor/MenuSelectEditor.svelte +27 -1
- package/src/editor/component-editor/NotificationEditor.svelte +15 -0
- package/src/editor/component-editor/PanelEditor.svelte +1 -1
- package/src/editor/component-editor/ProgressBarEditor.svelte +13 -0
- package/src/editor/component-editor/RadioButtonEditor.svelte +20 -1
- package/src/editor/component-editor/SectionDividerEditor.svelte +40 -13
- package/src/editor/component-editor/SegmentedControlEditor.svelte +29 -1
- package/src/editor/component-editor/SideNavigationEditor.svelte +40 -1
- package/src/editor/component-editor/SlidePagerEditor.svelte +20 -0
- package/src/editor/component-editor/SliderEditor.svelte +33 -0
- package/src/editor/component-editor/TabBarEditor.svelte +23 -2
- package/src/editor/component-editor/TableEditor.svelte +14 -0
- package/src/editor/component-editor/ToggleEditor.svelte +17 -0
- package/src/editor/component-editor/TooltipEditor.svelte +11 -2
- package/src/editor/component-editor/VideoFrameEditor.svelte +8 -0
- package/src/editor/component-editor/VideoLightboxEditor.svelte +10 -0
- package/src/editor/component-editor/registration.ts +2 -1
- package/src/editor/component-editor/registry.ts +69 -27
- package/src/editor/component-editor/scaffolding/DemoHeader.svelte +2 -0
- package/src/editor/component-editor/scaffolding/StateBlock.svelte +19 -8
- package/src/editor/component-editor/scaffolding/TokenLayout.svelte +3 -0
- package/src/editor/component-editor/scaffolding/VariantGroup.svelte +70 -3
- package/src/editor/component-editor/scaffolding/editorContext.ts +7 -0
- package/src/editor/core/a11y/a11yReport.ts +164 -0
- package/src/editor/core/a11y/a11yReportTypes.ts +77 -0
- package/src/editor/core/a11y/contrastFailures.ts +22 -0
- package/src/editor/core/a11y/contrastFixes.ts +41 -0
- package/src/editor/core/components/contrastPairRegistry.ts +18 -0
- package/src/editor/core/palettes/contrast.ts +44 -0
- package/src/editor/core/palettes/contrastPairs.ts +82 -0
- package/src/editor/core/palettes/resolveColor.ts +77 -0
- package/src/editor/core/store/editorStore.ts +4 -0
- package/src/editor/core/store/editorViewStore.ts +2 -2
- package/src/editor/core/store/unsavedEdits.ts +10 -0
- package/src/editor/core/themes/liveStateStream.ts +7 -1
- package/src/editor/core/themes/parsers/gradient.ts +5 -2
- package/src/editor/docs/chapters.ts +1 -0
- package/src/editor/docs/content/accessibility.md +411 -0
- package/src/editor/docs/content/editing-tokens.md +32 -1
- package/src/editor/docs/content.generated.ts +2 -1
- package/src/editor/pages/ComponentEditorPage.svelte +11 -1
- package/src/editor/pages/EditorShell.svelte +98 -10
- package/src/editor/skill-atlas/skillSources.generated.ts +3 -3
- package/src/editor/skill-atlas/trees/check-compliance.ts +3 -3
- package/src/editor/skill-atlas/trees/create-component.ts +12 -12
- package/src/editor/styles/ui-editor.css +2 -0
- package/src/editor/ui/EditorViewSwitcher.svelte +15 -2
- package/src/editor/ui/GradientEditor.svelte +9 -1
- package/src/editor/ui/ThemePanel.svelte +4 -4
- package/src/editor/ui/UIContrastReadout.svelte +186 -0
- package/src/editor/ui/UIInfoPopover.svelte +16 -2
- package/src/editor/ui/UIPaletteSelector.svelte +9 -0
- package/src/editor/ui/UITokenSelector.svelte +26 -2
- package/src/editor/ui/a11y/A11yByEye.svelte +264 -0
- package/src/editor/ui/a11y/A11yComponentIssues.svelte +121 -0
- package/src/editor/ui/a11y/A11yFindingRow.svelte +119 -0
- package/src/editor/ui/a11y/A11yIssueRow.svelte +152 -0
- package/src/editor/ui/a11y/A11yOverview.svelte +246 -0
- package/src/editor/ui/a11y/A11yPanel.svelte +153 -0
- package/src/editor/ui/a11y/A11yPropertyMark.svelte +84 -0
- package/src/editor/ui/a11y/A11yRailMark.svelte +41 -0
- package/src/editor/ui/a11y/AccessibilityTab.svelte +321 -0
- package/src/editor/ui/a11y/a11yView.ts +257 -0
- package/src/editor/ui/contrastReadout.ts +45 -0
- package/src/live-tokens/data/colors-and-type/halloween.json +1 -1
- package/src/live-tokens/data/themes/autumn.json +35 -35
- package/src/live-tokens/data/themes/halloween.json +36 -36
- package/src/live-tokens/data/themes/midnight-study.json +35 -35
- package/src/live-tokens/data/themes/ocean.json +35 -35
- package/src/live-tokens/data/themes/royal-velvet.json +35 -35
- package/src/live-tokens/data/themes/sketchy.json +35 -35
- package/src/live-tokens/data/themes/spring-meadow.json +35 -35
- package/src/live-tokens/data/themes/sunset.json +35 -35
- package/src/system/components/Badge.svelte +3 -3
- package/src/system/components/Button.svelte +12 -6
- package/src/system/components/CodeSnippet.svelte +8 -1
- package/src/system/components/CornerBadge.svelte +3 -3
- package/src/system/components/Dialog.svelte +43 -14
- package/src/system/components/IconButton.svelte +1 -1
- package/src/system/components/Image.svelte +7 -0
- package/src/system/components/ImageLightbox.svelte +18 -25
- package/src/system/components/InlineEditActions.svelte +1 -1
- package/src/system/components/Input.svelte +9 -2
- package/src/system/components/MenuSelect.svelte +31 -3
- package/src/system/components/Notification.svelte +1 -1
- package/src/system/components/ProgressBar.svelte +7 -1
- package/src/system/components/RadioButton.svelte +36 -3
- package/src/system/components/SegmentedControl.svelte +36 -2
- package/src/system/components/SlidePager.svelte +3 -3
- package/src/system/components/Slider.svelte +19 -15
- package/src/system/components/TabBar.svelte +33 -3
- package/src/system/components/Toggle.svelte +3 -3
- package/src/system/components/VideoFrame.svelte +1 -1
- package/src/system/components/VideoLightbox.svelte +2 -2
- package/src/system/internal/focusTrap.ts +35 -0
- package/src/testing-js/__aria__/badge.yml +40 -0
- package/src/testing-js/__aria__/button.yml +88 -0
- package/src/testing-js/__aria__/callout.yml +12 -0
- package/src/testing-js/__aria__/card.yml +8 -0
- package/src/testing-js/__aria__/codesnippet.yml +21 -0
- package/src/testing-js/__aria__/collapsiblesection.yml +23 -0
- package/src/testing-js/__aria__/cornerbadge.yml +24 -0
- package/src/testing-js/__aria__/dialog.yml +42 -0
- package/src/testing-js/__aria__/iconbutton.yml +57 -0
- package/src/testing-js/__aria__/image.yml +10 -0
- package/src/testing-js/__aria__/imagelightbox.yml +50 -0
- package/src/testing-js/__aria__/inlineeditactions.yml +16 -0
- package/src/testing-js/__aria__/input.yml +61 -0
- package/src/testing-js/__aria__/menuselect.yml +30 -0
- package/src/testing-js/__aria__/notification.yml +30 -0
- package/src/testing-js/__aria__/panel.yml +2 -0
- package/src/testing-js/__aria__/progressbar.yml +2 -0
- package/src/testing-js/__aria__/radiobutton.yml +20 -0
- package/src/testing-js/__aria__/sectiondivider.yml +9 -0
- package/src/testing-js/__aria__/segmentedcontrol.yml +35 -0
- package/src/testing-js/__aria__/sidenavigation.yml +304 -0
- package/src/testing-js/__aria__/slidepager.yml +72 -0
- package/src/testing-js/__aria__/slider.yml +28 -0
- package/src/testing-js/__aria__/tabbar.yml +35 -0
- package/src/testing-js/__aria__/table.yml +144 -0
- package/src/testing-js/__aria__/toggle.yml +12 -0
- package/src/testing-js/__aria__/tooltip.yml +2 -0
- package/src/testing-js/__aria__/videoframe.yml +6 -0
- package/src/testing-js/__aria__/videolightbox.yml +12 -0
- package/src/testing-js/{chunk-WIZ6W7UT.js → chunk-3WCLMOM7.js} +2 -2
- package/src/testing-js/{chunk-NB3NZRBM.js → chunk-7CM5D7PF.js} +5 -1
- package/src/testing-js/chunk-7CM5D7PF.js.map +1 -0
- package/src/testing-js/{chunk-X6KHEVIG.js → chunk-7QXUJRSO.js} +97 -29
- package/src/testing-js/chunk-7QXUJRSO.js.map +1 -0
- package/src/testing-js/chunk-GZKUYLDW.js +193 -0
- package/src/testing-js/chunk-GZKUYLDW.js.map +1 -0
- package/src/testing-js/chunk-RTZQLW3F.js +649 -0
- package/src/testing-js/chunk-RTZQLW3F.js.map +1 -0
- package/src/testing-js/{chunk-SHBYZUPD.js → chunk-RWOT2XDB.js} +212 -15
- package/src/testing-js/chunk-RWOT2XDB.js.map +1 -0
- package/src/testing-js/{chunk-GKO27NGN.js → chunk-THWGMSRH.js} +2 -2
- package/src/testing-js/{chunk-3UKGXCDL.js → chunk-YVVR3GJZ.js} +1 -1
- package/src/testing-js/chunk-YVVR3GJZ.js.map +1 -0
- package/src/testing-js/component-a11y.contract.js +313 -0
- package/src/testing-js/component-a11y.contract.js.map +1 -0
- package/src/testing-js/component-alias.contract.js +2 -2
- package/src/testing-js/component-behavior.contract.js +2 -2
- package/src/testing-js/component-editor.contract.js +6 -5
- package/src/testing-js/component-editor.contract.js.map +1 -1
- package/src/testing-js/component-render.contract.js +10 -6
- package/src/testing-js/component-render.contract.js.map +1 -1
- package/src/testing-js/index.d.ts +44 -16
- package/src/testing-js/index.js +11 -11
- package/src/testing-js/index.js.map +1 -1
- package/src/testing-js/page-compliance.contract.js +132 -13
- package/src/testing-js/page-compliance.contract.js.map +1 -1
- package/src/testing-js/vitest.js +3 -3
- package/template/_gitignore +3 -0
- package/template/package.json +9 -0
- package/src/testing-js/chunk-3UKGXCDL.js.map +0 -1
- package/src/testing-js/chunk-NB3NZRBM.js.map +0 -1
- package/src/testing-js/chunk-SHBYZUPD.js.map +0 -1
- package/src/testing-js/chunk-X6KHEVIG.js.map +0 -1
- /package/src/testing-js/{chunk-WIZ6W7UT.js.map → chunk-3WCLMOM7.js.map} +0 -0
- /package/src/testing-js/{chunk-GKO27NGN.js.map → chunk-THWGMSRH.js.map} +0 -0
|
@@ -58,22 +58,52 @@
|
|
|
58
58
|
dispatch('tabChange', tab.id);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
const buttons: HTMLButtonElement[] = $state([]);
|
|
63
|
+
|
|
64
|
+
// Roving tab stop: the bar takes one Tab press, on the selected tab.
|
|
65
|
+
let tabStop = $derived(
|
|
66
|
+
tabs.find((t) => t.id === value && !t.disabled)?.id ?? tabs.find((t) => !t.disabled)?.id,
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
// Arrows move focus alone; Enter or Space selects, since a consumer's
|
|
70
|
+
// onchange may load the panel.
|
|
71
|
+
function moveFocus(event: KeyboardEvent, from: number) {
|
|
72
|
+
const enabled = tabs.flatMap((t, i) => (t.disabled ? [] : [i]));
|
|
73
|
+
const at = enabled.indexOf(from);
|
|
74
|
+
const to = {
|
|
75
|
+
ArrowRight: enabled[(at + 1) % enabled.length],
|
|
76
|
+
ArrowLeft: enabled[(at - 1 + enabled.length) % enabled.length],
|
|
77
|
+
Home: enabled[0],
|
|
78
|
+
End: enabled[enabled.length - 1],
|
|
79
|
+
}[event.key];
|
|
80
|
+
if (to === undefined) return;
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
buttons[to].focus();
|
|
83
|
+
}
|
|
61
84
|
</script>
|
|
62
85
|
|
|
63
86
|
<div
|
|
64
87
|
class="tab-bar {className}"
|
|
88
|
+
role="tablist"
|
|
65
89
|
style:--tabbar-hover-tint-enabled={hoverTintValue}
|
|
66
90
|
>
|
|
67
|
-
{#each tabs as tab}
|
|
91
|
+
{#each tabs as tab, i}
|
|
68
92
|
<button
|
|
69
93
|
class="tab"
|
|
70
94
|
class:selected={value === tab.id}
|
|
71
95
|
class:icon-only={iconOnly}
|
|
96
|
+
role="tab"
|
|
97
|
+
aria-selected={value === tab.id}
|
|
98
|
+
aria-label={iconOnly ? tab.label : undefined}
|
|
99
|
+
tabindex={tab.id === tabStop ? 0 : -1}
|
|
72
100
|
disabled={tab.disabled}
|
|
101
|
+
bind:this={buttons[i]}
|
|
73
102
|
onclick={() => selectTab(tab)}
|
|
103
|
+
onkeydown={(event) => moveFocus(event, i)}
|
|
74
104
|
>
|
|
75
105
|
{#if tab.icon}
|
|
76
|
-
<i class={tab.icon}></i>
|
|
106
|
+
<i class={tab.icon} aria-hidden="true"></i>
|
|
77
107
|
{/if}
|
|
78
108
|
{#if !iconOnly}
|
|
79
109
|
<span>{tab.label}</span>
|
|
@@ -133,7 +163,7 @@
|
|
|
133
163
|
|
|
134
164
|
/* Selected tab */
|
|
135
165
|
--tabbar-selected-text: var(--text-primary);
|
|
136
|
-
--tabbar-selected-border: var(--
|
|
166
|
+
--tabbar-selected-border: var(--border-brand-strong);
|
|
137
167
|
--tabbar-selected-surface: var(--tint-low);
|
|
138
168
|
--tabbar-selected-text-font-family: var(--font-sans);
|
|
139
169
|
--tabbar-selected-text-font-size: var(--font-size-md);
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
:global(:root) {
|
|
60
60
|
/* Default (off resting) — also carries all geometry + label typography. */
|
|
61
61
|
--toggle-track-surface: var(--surface-neutral);
|
|
62
|
-
--toggle-track-border: var(--border-neutral);
|
|
62
|
+
--toggle-track-border: var(--border-neutral-medium);
|
|
63
63
|
--toggle-track-border-width: var(--border-width-1);
|
|
64
64
|
--toggle-track-radius: var(--radius-full);
|
|
65
65
|
--toggle-track-padding: var(--space-2);
|
|
66
|
-
--toggle-thumb-surface: var(--
|
|
66
|
+
--toggle-thumb-surface: var(--text-primary);
|
|
67
67
|
--toggle-thumb-border: var(--border-neutral-strong);
|
|
68
68
|
--toggle-thumb-size: var(--font-size-md);
|
|
69
69
|
--toggle-label: var(--text-primary);
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
|
|
79
79
|
/* On (selected — toggle is checked). */
|
|
80
80
|
--toggle-on-track-surface: var(--surface-brand-high);
|
|
81
|
-
--toggle-on-track-border: var(--border-brand);
|
|
81
|
+
--toggle-on-track-border: var(--border-brand-medium);
|
|
82
82
|
--toggle-on-thumb-surface: var(--text-primary);
|
|
83
83
|
--toggle-on-thumb-border: var(--border-brand-strong);
|
|
84
84
|
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
|
|
226
226
|
.videoframe-trigger:focus-visible {
|
|
227
227
|
outline: none;
|
|
228
|
-
box-shadow: var(--
|
|
228
|
+
box-shadow: 0 0 0 var(--border-width-2) var(--border-neutral-strong);
|
|
229
229
|
border-radius: var(--sketch-radius, var(--videoframe-frame-radius));
|
|
230
230
|
}
|
|
231
231
|
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
|
|
319
319
|
.videolightbox-trigger:focus-visible {
|
|
320
320
|
outline: none;
|
|
321
|
-
box-shadow: var(--
|
|
321
|
+
box-shadow: 0 0 0 var(--border-width-2) var(--border-neutral-strong);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
.videolightbox-trigger img,
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
|
|
437
437
|
.videolightbox-close:focus-visible {
|
|
438
438
|
outline: none;
|
|
439
|
-
box-shadow: var(--
|
|
439
|
+
box-shadow: 0 0 0 var(--border-width-2) var(--border-neutral-strong);
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const TABBABLE = [
|
|
2
|
+
'[href]',
|
|
3
|
+
'button:not([disabled])',
|
|
4
|
+
'input:not([disabled]):not([type="hidden"])',
|
|
5
|
+
'select:not([disabled])',
|
|
6
|
+
'textarea:not([disabled])',
|
|
7
|
+
'[tabindex]',
|
|
8
|
+
]
|
|
9
|
+
.map((selector) => `${selector}:not([tabindex="-1"])`)
|
|
10
|
+
.join(', ');
|
|
11
|
+
|
|
12
|
+
export function tabbables(container: HTMLElement): HTMLElement[] {
|
|
13
|
+
return [...container.querySelectorAll<HTMLElement>(TABBABLE)];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Keeps Tab and Shift+Tab cycling through `container`'s tabbable elements.
|
|
17
|
+
* Focus on the container itself or outside it enters at the near end.
|
|
18
|
+
* Returns false when the container holds none, so the caller picks where
|
|
19
|
+
* focus rests. */
|
|
20
|
+
export function trapTab(container: HTMLElement, e: KeyboardEvent): boolean {
|
|
21
|
+
const stops = tabbables(container);
|
|
22
|
+
if (stops.length === 0) return false;
|
|
23
|
+
const first = stops[0];
|
|
24
|
+
const last = stops[stops.length - 1];
|
|
25
|
+
const active = document.activeElement as HTMLElement | null;
|
|
26
|
+
const inside = active !== null && active !== container && container.contains(active);
|
|
27
|
+
if (e.shiftKey && (!inside || active === first)) {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
last.focus();
|
|
30
|
+
} else if (!e.shiftKey && (!inside || active === last)) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
first.focus();
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"Brand / base": |
|
|
2
|
+
- text: Brand With Icon
|
|
3
|
+
"Brand / colors": |
|
|
4
|
+
- text: Brand With Icon
|
|
5
|
+
"Accent / base": |
|
|
6
|
+
- text: Accent With Icon
|
|
7
|
+
"Accent / colors": |
|
|
8
|
+
- text: Accent With Icon
|
|
9
|
+
"Neutral / base": |
|
|
10
|
+
- text: Neutral With Icon
|
|
11
|
+
"Neutral / colors": |
|
|
12
|
+
- text: Neutral With Icon
|
|
13
|
+
"Alternate / base": |
|
|
14
|
+
- text: Alternate With Icon
|
|
15
|
+
"Alternate / colors": |
|
|
16
|
+
- text: Alternate With Icon
|
|
17
|
+
"Canvas / base": |
|
|
18
|
+
- text: Canvas With Icon
|
|
19
|
+
"Canvas / colors": |
|
|
20
|
+
- text: Canvas With Icon
|
|
21
|
+
"Special / base": |
|
|
22
|
+
- text: Special With Icon
|
|
23
|
+
"Special / colors": |
|
|
24
|
+
- text: Special With Icon
|
|
25
|
+
"Success / base": |
|
|
26
|
+
- text: Success With Icon
|
|
27
|
+
"Success / colors": |
|
|
28
|
+
- text: Success With Icon
|
|
29
|
+
"Warning / base": |
|
|
30
|
+
- text: Warning With Icon
|
|
31
|
+
"Warning / colors": |
|
|
32
|
+
- text: Warning With Icon
|
|
33
|
+
"Danger / base": |
|
|
34
|
+
- text: Danger With Icon
|
|
35
|
+
"Danger / colors": |
|
|
36
|
+
- text: Danger With Icon
|
|
37
|
+
"Info / base": |
|
|
38
|
+
- text: Info With Icon
|
|
39
|
+
"Info / colors": |
|
|
40
|
+
- text: Info With Icon
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"Primary / base": |
|
|
2
|
+
- button "Primary"
|
|
3
|
+
- button "With Icon"
|
|
4
|
+
"Secondary / base": |
|
|
5
|
+
- button "Secondary"
|
|
6
|
+
- button "With Icon"
|
|
7
|
+
"Secondary / default": |
|
|
8
|
+
- button "Secondary"
|
|
9
|
+
- button "With Icon"
|
|
10
|
+
"Secondary / hover": |
|
|
11
|
+
- button "Secondary"
|
|
12
|
+
- button "With Icon"
|
|
13
|
+
"Secondary / disabled": |
|
|
14
|
+
- button "Secondary" [disabled]
|
|
15
|
+
- button "With Icon" [disabled]
|
|
16
|
+
"Outline / base": |
|
|
17
|
+
- button "Outline"
|
|
18
|
+
- button "With Icon"
|
|
19
|
+
"Outline / default": |
|
|
20
|
+
- button "Outline"
|
|
21
|
+
- button "With Icon"
|
|
22
|
+
"Outline / hover": |
|
|
23
|
+
- button "Outline"
|
|
24
|
+
- button "With Icon"
|
|
25
|
+
"Outline / disabled": |
|
|
26
|
+
- button "Outline" [disabled]
|
|
27
|
+
- button "With Icon" [disabled]
|
|
28
|
+
"Success / base": |
|
|
29
|
+
- button "Success"
|
|
30
|
+
- button "With Icon"
|
|
31
|
+
"Success / default": |
|
|
32
|
+
- button "Success"
|
|
33
|
+
- button "With Icon"
|
|
34
|
+
"Success / hover": |
|
|
35
|
+
- button "Success"
|
|
36
|
+
- button "With Icon"
|
|
37
|
+
"Success / disabled": |
|
|
38
|
+
- button "Success" [disabled]
|
|
39
|
+
- button "With Icon" [disabled]
|
|
40
|
+
"Danger / base": |
|
|
41
|
+
- button "Danger"
|
|
42
|
+
- button "With Icon"
|
|
43
|
+
"Danger / default": |
|
|
44
|
+
- button "Danger"
|
|
45
|
+
- button "With Icon"
|
|
46
|
+
"Danger / hover": |
|
|
47
|
+
- button "Danger"
|
|
48
|
+
- button "With Icon"
|
|
49
|
+
"Danger / disabled": |
|
|
50
|
+
- button "Danger" [disabled]
|
|
51
|
+
- button "With Icon" [disabled]
|
|
52
|
+
"Warning / base": |
|
|
53
|
+
- button "Warning"
|
|
54
|
+
- button "With Icon"
|
|
55
|
+
"Warning / default": |
|
|
56
|
+
- button "Warning"
|
|
57
|
+
- button "With Icon"
|
|
58
|
+
"Warning / hover": |
|
|
59
|
+
- button "Warning"
|
|
60
|
+
- button "With Icon"
|
|
61
|
+
"Warning / disabled": |
|
|
62
|
+
- button "Warning" [disabled]
|
|
63
|
+
- button "With Icon" [disabled]
|
|
64
|
+
"Outline / active": |
|
|
65
|
+
- button "Outline"
|
|
66
|
+
- button "With Icon"
|
|
67
|
+
"Primary / default": |
|
|
68
|
+
- button "Primary"
|
|
69
|
+
- button "With Icon"
|
|
70
|
+
"Primary / hover": |
|
|
71
|
+
- button "Primary"
|
|
72
|
+
- button "With Icon"
|
|
73
|
+
"Primary / disabled": |
|
|
74
|
+
- button "Primary" [disabled]
|
|
75
|
+
- button "With Icon" [disabled]
|
|
76
|
+
"Primary (small)": |
|
|
77
|
+
- button "Primary"
|
|
78
|
+
- button "Secondary"
|
|
79
|
+
- button "Outline"
|
|
80
|
+
- button "Success"
|
|
81
|
+
- button "Danger"
|
|
82
|
+
- button "Warning"
|
|
83
|
+
- button "Primary"
|
|
84
|
+
- button "Secondary"
|
|
85
|
+
- button "Outline"
|
|
86
|
+
- button "Success"
|
|
87
|
+
- button "Danger"
|
|
88
|
+
- button "Warning"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"Info": |
|
|
2
|
+
- strong: Note.
|
|
3
|
+
- text: This is contextual information you should know about.
|
|
4
|
+
"Success": |
|
|
5
|
+
- strong: Tip.
|
|
6
|
+
- text: Bookmark this page so you can return when you need it.
|
|
7
|
+
"Warning": |
|
|
8
|
+
- strong: Warning.
|
|
9
|
+
- text: This is a warning callout for important caveats or potential issues.
|
|
10
|
+
"Danger": |
|
|
11
|
+
- strong: Danger.
|
|
12
|
+
- text: This action is destructive and cannot be undone.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"preview": |
|
|
2
|
+
- text: Card title Content Placeholder Bare variant
|
|
3
|
+
"default": |
|
|
4
|
+
- text: Card title Content Placeholder Bare variant
|
|
5
|
+
"hover": |
|
|
6
|
+
- text: Card title Content Placeholder Bare variant
|
|
7
|
+
"preview (click root)": |
|
|
8
|
+
- text: Card title Content Placeholder Bare variant
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"preview": |
|
|
2
|
+
- text: Preview text
|
|
3
|
+
- textbox "Preview text":
|
|
4
|
+
- /placeholder: Paste a long command or block to preview scrolling
|
|
5
|
+
- text: npx @motion-proto/live-tokens setup-claude
|
|
6
|
+
- code: npx @motion-proto/live-tokens setup-claude
|
|
7
|
+
- button "Copy to clipboard"
|
|
8
|
+
"default": |
|
|
9
|
+
- text: Preview text
|
|
10
|
+
- textbox "Preview text":
|
|
11
|
+
- /placeholder: Paste a long command or block to preview scrolling
|
|
12
|
+
- text: npx @motion-proto/live-tokens setup-claude
|
|
13
|
+
- code: npx @motion-proto/live-tokens setup-claude
|
|
14
|
+
- button "Copy to clipboard"
|
|
15
|
+
"hover": |
|
|
16
|
+
- text: Preview text
|
|
17
|
+
- textbox "Preview text":
|
|
18
|
+
- /placeholder: Paste a long command or block to preview scrolling
|
|
19
|
+
- text: npx @motion-proto/live-tokens setup-claude
|
|
20
|
+
- code: npx @motion-proto/live-tokens setup-claude
|
|
21
|
+
- button "Copy to clipboard"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"Container / Container": |
|
|
2
|
+
- button "Click to expand"
|
|
3
|
+
"Container / Header": |
|
|
4
|
+
- button "Click to expand"
|
|
5
|
+
"Container / Body": |
|
|
6
|
+
- button "Click to expand" [expanded]
|
|
7
|
+
- paragraph: This content is revealed when the section is open. Any content can go here.
|
|
8
|
+
"Chromeless / Header": |
|
|
9
|
+
- button "Click to expand"
|
|
10
|
+
"Chromeless / Body": |
|
|
11
|
+
- button "Click to expand" [expanded]
|
|
12
|
+
- paragraph: This content is revealed when the section is open. Any content can go here.
|
|
13
|
+
"With Hairline / Header": |
|
|
14
|
+
- button "Click to expand"
|
|
15
|
+
"With Hairline / Body": |
|
|
16
|
+
- button "Click to expand" [expanded]
|
|
17
|
+
- paragraph: This content is revealed when the section is open. Any content can go here.
|
|
18
|
+
"Container / Header (Hover)": |
|
|
19
|
+
- button "Click to expand"
|
|
20
|
+
"Chromeless / Header (Hover)": |
|
|
21
|
+
- button "Click to expand"
|
|
22
|
+
"With Hairline / Header (Hover)": |
|
|
23
|
+
- button "Click to expand"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"Brand": |
|
|
2
|
+
- text: Brand
|
|
3
|
+
"Accent": |
|
|
4
|
+
- text: Accent
|
|
5
|
+
"Neutral": |
|
|
6
|
+
- text: Neutral
|
|
7
|
+
"Alternate": |
|
|
8
|
+
- text: Alternate
|
|
9
|
+
"Canvas": |
|
|
10
|
+
- text: Canvas
|
|
11
|
+
"Special": |
|
|
12
|
+
- text: Special
|
|
13
|
+
"Success": |
|
|
14
|
+
- text: Success
|
|
15
|
+
"Warning": |
|
|
16
|
+
- text: Warning
|
|
17
|
+
"Danger": |
|
|
18
|
+
- text: Danger
|
|
19
|
+
"Info": |
|
|
20
|
+
- text: Info
|
|
21
|
+
"Brand / base": |
|
|
22
|
+
- text: Brand
|
|
23
|
+
"Brand / colors": |
|
|
24
|
+
- text: Brand
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"preview": |
|
|
2
|
+
- dialog "Sample Dialog":
|
|
3
|
+
- heading "Sample Dialog" [level=3]
|
|
4
|
+
- button "Close"
|
|
5
|
+
- paragraph: This is the dialog body content. It supports any slotted content including forms, lists, or other components.
|
|
6
|
+
- button "Cancel"
|
|
7
|
+
- button "Save"
|
|
8
|
+
"scrim": |
|
|
9
|
+
- dialog "Sample Dialog":
|
|
10
|
+
- heading "Sample Dialog" [level=3]
|
|
11
|
+
- button "Close"
|
|
12
|
+
- paragraph: This is the dialog body content. It supports any slotted content including forms, lists, or other components.
|
|
13
|
+
- button "Cancel"
|
|
14
|
+
- button "Save"
|
|
15
|
+
"dialog": |
|
|
16
|
+
- dialog "Sample Dialog":
|
|
17
|
+
- heading "Sample Dialog" [level=3]
|
|
18
|
+
- button "Close"
|
|
19
|
+
- paragraph: This is the dialog body content. It supports any slotted content including forms, lists, or other components.
|
|
20
|
+
- button "Cancel"
|
|
21
|
+
- button "Save"
|
|
22
|
+
"header": |
|
|
23
|
+
- dialog "Sample Dialog":
|
|
24
|
+
- heading "Sample Dialog" [level=3]
|
|
25
|
+
- button "Close"
|
|
26
|
+
- paragraph: This is the dialog body content. It supports any slotted content including forms, lists, or other components.
|
|
27
|
+
- button "Cancel"
|
|
28
|
+
- button "Save"
|
|
29
|
+
"body": |
|
|
30
|
+
- dialog "Sample Dialog":
|
|
31
|
+
- heading "Sample Dialog" [level=3]
|
|
32
|
+
- button "Close"
|
|
33
|
+
- paragraph: This is the dialog body content. It supports any slotted content including forms, lists, or other components.
|
|
34
|
+
- button "Cancel"
|
|
35
|
+
- button "Save"
|
|
36
|
+
"footer": |
|
|
37
|
+
- dialog "Sample Dialog":
|
|
38
|
+
- heading "Sample Dialog" [level=3]
|
|
39
|
+
- button "Close"
|
|
40
|
+
- paragraph: This is the dialog body content. It supports any slotted content including forms, lists, or other components.
|
|
41
|
+
- button "Cancel"
|
|
42
|
+
- button "Save"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"Primary / base": |
|
|
2
|
+
- button "primary action"
|
|
3
|
+
"Secondary / base": |
|
|
4
|
+
- button "secondary action"
|
|
5
|
+
"Secondary / default": |
|
|
6
|
+
- button "secondary action"
|
|
7
|
+
"Secondary / hover": |
|
|
8
|
+
- button "secondary action"
|
|
9
|
+
"Secondary / disabled": |
|
|
10
|
+
- button "secondary action" [disabled]
|
|
11
|
+
"Outline / base": |
|
|
12
|
+
- button "outline action"
|
|
13
|
+
"Outline / default": |
|
|
14
|
+
- button "outline action"
|
|
15
|
+
"Outline / hover": |
|
|
16
|
+
- button "outline action"
|
|
17
|
+
"Outline / disabled": |
|
|
18
|
+
- button "outline action" [disabled]
|
|
19
|
+
"Success / base": |
|
|
20
|
+
- button "success action"
|
|
21
|
+
"Success / default": |
|
|
22
|
+
- button "success action"
|
|
23
|
+
"Success / hover": |
|
|
24
|
+
- button "success action"
|
|
25
|
+
"Success / disabled": |
|
|
26
|
+
- button "success action" [disabled]
|
|
27
|
+
"Danger / base": |
|
|
28
|
+
- button "danger action"
|
|
29
|
+
"Danger / default": |
|
|
30
|
+
- button "danger action"
|
|
31
|
+
"Danger / hover": |
|
|
32
|
+
- button "danger action"
|
|
33
|
+
"Danger / disabled": |
|
|
34
|
+
- button "danger action" [disabled]
|
|
35
|
+
"Warning / base": |
|
|
36
|
+
- button "warning action"
|
|
37
|
+
"Warning / default": |
|
|
38
|
+
- button "warning action"
|
|
39
|
+
"Warning / hover": |
|
|
40
|
+
- button "warning action"
|
|
41
|
+
"Warning / disabled": |
|
|
42
|
+
- button "warning action" [disabled]
|
|
43
|
+
"Outline / active": |
|
|
44
|
+
- button "outline action"
|
|
45
|
+
"Primary / default": |
|
|
46
|
+
- button "primary action"
|
|
47
|
+
"Primary / hover": |
|
|
48
|
+
- button "primary action"
|
|
49
|
+
"Primary / disabled": |
|
|
50
|
+
- button "primary action" [disabled]
|
|
51
|
+
"Primary (small)": |
|
|
52
|
+
- button "primary action"
|
|
53
|
+
- button "secondary action"
|
|
54
|
+
- button "outline action"
|
|
55
|
+
- button "success action"
|
|
56
|
+
- button "danger action"
|
|
57
|
+
- button "warning action"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"Default": |
|
|
2
|
+
- img "Demo"
|
|
3
|
+
- paragraph:
|
|
4
|
+
- text: "Use zoom on hover: every image scales on hover (a page can still force it per image with the"
|
|
5
|
+
- code: zoom
|
|
6
|
+
- text: "prop). Overflow scaling on (default): the content zooms inside the fixed frame, masked by overflow. Off: the whole framed image grows past its box. Override per image with"
|
|
7
|
+
- code: overflowScaling
|
|
8
|
+
- text: .
|
|
9
|
+
"Bare": |
|
|
10
|
+
- img "Demo"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"preview": |
|
|
2
|
+
- 'button "Expand image: Newspaper" [expanded]':
|
|
3
|
+
- img "Newspaper"
|
|
4
|
+
- img "Newspaper"
|
|
5
|
+
- button "Close"
|
|
6
|
+
- button "Previous image"
|
|
7
|
+
- button "Next image"
|
|
8
|
+
- button "Zoom out" [disabled]
|
|
9
|
+
- text: 59%
|
|
10
|
+
- button "Zoom in"
|
|
11
|
+
"tile": |
|
|
12
|
+
- 'button "Expand image: Newspaper" [expanded]':
|
|
13
|
+
- img "Newspaper"
|
|
14
|
+
- img "Newspaper"
|
|
15
|
+
- button "Close"
|
|
16
|
+
- button "Previous image"
|
|
17
|
+
- button "Next image"
|
|
18
|
+
- button "Zoom out" [disabled]
|
|
19
|
+
- text: 59%
|
|
20
|
+
- button "Zoom in"
|
|
21
|
+
"overlay": |
|
|
22
|
+
- 'button "Expand image: Newspaper" [expanded]':
|
|
23
|
+
- img "Newspaper"
|
|
24
|
+
- img "Newspaper"
|
|
25
|
+
- button "Close"
|
|
26
|
+
- button "Previous image"
|
|
27
|
+
- button "Next image"
|
|
28
|
+
- button "Zoom out" [disabled]
|
|
29
|
+
- text: 59%
|
|
30
|
+
- button "Zoom in"
|
|
31
|
+
"chrome": |
|
|
32
|
+
- 'button "Expand image: Newspaper" [expanded]':
|
|
33
|
+
- img "Newspaper"
|
|
34
|
+
- img "Newspaper"
|
|
35
|
+
- button "Close"
|
|
36
|
+
- button "Previous image"
|
|
37
|
+
- button "Next image"
|
|
38
|
+
- button "Zoom out" [disabled]
|
|
39
|
+
- text: 59%
|
|
40
|
+
- button "Zoom in"
|
|
41
|
+
"preview (click nextButton)": |
|
|
42
|
+
- 'button "Expand image: Newspaper" [expanded]':
|
|
43
|
+
- img "Newspaper"
|
|
44
|
+
- img "Newspaper"
|
|
45
|
+
- button "Close"
|
|
46
|
+
- button "Previous image"
|
|
47
|
+
- button "Next image"
|
|
48
|
+
- button "Zoom out" [disabled]
|
|
49
|
+
- text: 59%
|
|
50
|
+
- button "Zoom in"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"Save button / default": |
|
|
2
|
+
- text: Editing value...
|
|
3
|
+
- button "Save"
|
|
4
|
+
- button "Cancel"
|
|
5
|
+
"Save button / hover": |
|
|
6
|
+
- text: Editing value...
|
|
7
|
+
- button "Save"
|
|
8
|
+
- button "Cancel"
|
|
9
|
+
"Cancel button / default": |
|
|
10
|
+
- text: Editing value...
|
|
11
|
+
- button "Save"
|
|
12
|
+
- button "Cancel"
|
|
13
|
+
"Cancel button / hover": |
|
|
14
|
+
- text: Editing value...
|
|
15
|
+
- button "Save"
|
|
16
|
+
- button "Cancel"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"preview": |
|
|
2
|
+
- text: Field label
|
|
3
|
+
- textbox "Field label" [invalid]:
|
|
4
|
+
- /placeholder: Enter password
|
|
5
|
+
- button "Show password"
|
|
6
|
+
- paragraph: Helper text describing the field.
|
|
7
|
+
- alert: Please enter a valid value.
|
|
8
|
+
"error": |
|
|
9
|
+
- text: Field label
|
|
10
|
+
- textbox "Field label" [invalid]:
|
|
11
|
+
- /placeholder: Enter password
|
|
12
|
+
- button "Show password"
|
|
13
|
+
- paragraph: Helper text describing the field.
|
|
14
|
+
- alert: Please enter a valid value.
|
|
15
|
+
"field": |
|
|
16
|
+
- text: Field label
|
|
17
|
+
- textbox "Field label" [invalid]:
|
|
18
|
+
- /placeholder: Enter password
|
|
19
|
+
- button "Show password"
|
|
20
|
+
- paragraph: Helper text describing the field.
|
|
21
|
+
- alert: Please enter a valid value.
|
|
22
|
+
"default": |
|
|
23
|
+
- text: Field label
|
|
24
|
+
- textbox "Field label" [invalid]:
|
|
25
|
+
- /placeholder: Enter password
|
|
26
|
+
- button "Show password"
|
|
27
|
+
- paragraph: Helper text describing the field.
|
|
28
|
+
- alert: Please enter a valid value.
|
|
29
|
+
"disabled": |
|
|
30
|
+
- text: Field label
|
|
31
|
+
- textbox "Field label" [disabled] [invalid]:
|
|
32
|
+
- /placeholder: Enter password
|
|
33
|
+
- button "Show password" [disabled]
|
|
34
|
+
- paragraph: Helper text describing the field.
|
|
35
|
+
- alert: Please enter a valid value.
|
|
36
|
+
"label": |
|
|
37
|
+
- text: Field label
|
|
38
|
+
- textbox "Field label" [invalid]:
|
|
39
|
+
- /placeholder: Enter password
|
|
40
|
+
- button "Show password"
|
|
41
|
+
- paragraph: Helper text describing the field.
|
|
42
|
+
- alert: Please enter a valid value.
|
|
43
|
+
"hint": |
|
|
44
|
+
- text: Field label
|
|
45
|
+
- textbox "Field label" [invalid]:
|
|
46
|
+
- /placeholder: Enter password
|
|
47
|
+
- button "Show password"
|
|
48
|
+
- paragraph: Helper text describing the field.
|
|
49
|
+
- alert: Please enter a valid value.
|
|
50
|
+
"focused (password, Error off)": |
|
|
51
|
+
- text: Field label
|
|
52
|
+
- textbox "Field label":
|
|
53
|
+
- /placeholder: Enter password
|
|
54
|
+
- button "Show password"
|
|
55
|
+
- paragraph: Helper text describing the field.
|
|
56
|
+
"disabled (password, Error off)": |
|
|
57
|
+
- text: Field label
|
|
58
|
+
- textbox "Field label" [disabled]:
|
|
59
|
+
- /placeholder: Enter password
|
|
60
|
+
- button "Show password" [disabled]
|
|
61
|
+
- paragraph: Helper text describing the field.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"menu": |
|
|
2
|
+
- listbox "Options":
|
|
3
|
+
- option "Option one"
|
|
4
|
+
- option "Option two"
|
|
5
|
+
- option "Option three"
|
|
6
|
+
- option "Option four" [disabled]
|
|
7
|
+
"default item": |
|
|
8
|
+
- listbox "Options":
|
|
9
|
+
- option "Option one"
|
|
10
|
+
- option "Option two"
|
|
11
|
+
- option "Option three"
|
|
12
|
+
- option "Option four" [disabled]
|
|
13
|
+
"hover item": |
|
|
14
|
+
- listbox "Options":
|
|
15
|
+
- option "Option one"
|
|
16
|
+
- option "Option two"
|
|
17
|
+
- option "Option three"
|
|
18
|
+
- option "Option four" [disabled]
|
|
19
|
+
"selected item": |
|
|
20
|
+
- listbox "Options":
|
|
21
|
+
- option "Option one"
|
|
22
|
+
- option "Option two" [selected]
|
|
23
|
+
- option "Option three"
|
|
24
|
+
- option "Option four" [disabled]
|
|
25
|
+
"disabled item": |
|
|
26
|
+
- listbox "Options":
|
|
27
|
+
- option "Option one"
|
|
28
|
+
- option "Option two"
|
|
29
|
+
- option "Option three"
|
|
30
|
+
- option "Option four" [disabled]
|