@aitrien/motifspec 1.17.3 → 1.18.1
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/CHANGELOG.md +31 -0
- package/README.md +37 -9
- package/dist/codex.css +26 -6
- package/dist/contrast.md +5 -1
- package/dist/icons.svg +13 -0
- package/dist/tokens.css +1 -1
- package/dist/tokens.js +17 -1
- package/dist/tokens.json +17 -1
- package/docs/components/_template.md +5 -0
- package/docs/components/accession-label.md +5 -1
- package/docs/components/backdrop.md +3 -1
- package/docs/components/button-and-link.md +10 -1
- package/docs/components/callout.md +1 -0
- package/docs/components/code-block.md +10 -0
- package/docs/components/data-table.md +22 -1
- package/docs/components/disclosure.md +73 -0
- package/docs/components/figure.md +1 -0
- package/docs/components/heading-anchor.md +3 -1
- package/docs/components/icon.md +3 -2
- package/docs/components/keyboard-key.md +53 -0
- package/docs/components/ornament.md +2 -0
- package/docs/components/pagination.md +1 -0
- package/docs/components/post-list-item.md +1 -0
- package/docs/components/project-card.md +1 -0
- package/docs/components/prose.md +1 -0
- package/docs/components/site-footer.md +1 -0
- package/docs/components/site-header.md +10 -0
- package/docs/components/specimen-plate.md +1 -0
- package/docs/components/status.md +74 -0
- package/docs/components/table-of-contents.md +9 -0
- package/docs/components/tag.md +2 -1
- package/docs/components/tooltip.md +6 -0
- package/docs/hugo.md +2 -2
- package/docs/layouts/a-la-carte.md +36 -0
- package/docs/layouts/dashboard.md +58 -0
- package/docs/layouts/documentation.md +48 -0
- package/docs/{templates.md → layouts/portfolio.md} +34 -2
- package/icons/manifest.json +52 -0
- package/icons/svg/apps.svg +1 -0
- package/icons/svg/close.svg +1 -0
- package/icons/svg/dashboard.svg +1 -0
- package/icons/svg/dns.svg +1 -0
- package/icons/svg/edit.svg +1 -0
- package/icons/svg/lan.svg +1 -0
- package/icons/svg/menu.svg +1 -0
- package/icons/svg/notifications.svg +1 -0
- package/icons/svg/restart_alt.svg +1 -0
- package/icons/svg/search.svg +1 -0
- package/icons/svg/settings.svg +1 -0
- package/icons/svg/storage.svg +1 -0
- package/icons/svg/terminal.svg +1 -0
- package/layouts/_partials/motifspec/filed-under.html +1 -1
- package/package.json +1 -1
- package/scripts/check.mjs +208 -23
- package/scripts/lib.mjs +64 -0
- package/tokens/color.json +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of MotifSpec (named brand-codex until 1.10.0), newest first. Entries before 1.10.0 keep the names they were released under. Versions follow the rules in `CONVENTIONS.md`: renaming or removing a semantic token is major, adding tokens, components or icons is minor, and changing a value or fixing a description is a patch. `npm run build` fails if the version in `package.json` has no entry here.
|
|
4
4
|
|
|
5
|
+
## [1.18.1] - 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- The checker read a Hugo site's `[params.motifspec]` only when the table started at the beginning of a line. An indented table, such as one under `[params]` in a config that indents its tables, was ignored, so the site was checked as portfolio whatever it declared. It now reads the table indented or not, and also dotted keys (`motifspec.layout = "dashboard"` under `[params]`, or `params.motifspec.layout` at the top) and inline tables (`motifspec = { layout = "dashboard" }`).
|
|
9
|
+
|
|
10
|
+
## [1.18.0] - 2026-11-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Layouts: `docs/layouts/` has one file each for the portfolio, dashboard and documentation layouts, and for à la carte (a project that fits none of them). Each gives the shell, page templates, components, decoration, heading rules and a table for choosing a stack. Dashboard and documentation are marked in progress, with what exists now and what doesn't.
|
|
14
|
+
- Every component doc says which layouts it belongs to (`layouts:` in its front matter), and the build fails if one doesn't. The README has a Layouts section, and its first rule for AI assistants is to choose the layout and keep the project's stack.
|
|
15
|
+
- The MCP server's `get_doc` serves the four layouts, and `get_component` lists each component with its layouts. Its instructions say to choose the layout first.
|
|
16
|
+
- Projects declare their layout: a Hugo site in `[params.motifspec]` (`layout`, and `components` for à la carte), anything else with the checker's `--layout` and `--components`. A project that declares nothing is checked as portfolio, as before.
|
|
17
|
+
- The checker warns when a component's classes or Hugo partial are used outside its layouts, or when an à la carte project uses a layout component it hasn't listed. These are warnings in this release and failures in a later one; warnings don't fail the run.
|
|
18
|
+
- An à la carte project may have a stylesheet of its own for its frame. The checker holds it to semantic tokens and fails any selector that targets a `cx-` class (`cx-override`). It fails an unknown layout or component name too.
|
|
19
|
+
- The MCP server's `check` takes `layout` and `components`, reports warnings separately from problems, and checks CSS as an à la carte project's own stylesheet.
|
|
20
|
+
|
|
21
|
+
- Status (`status.md`, shared): `cx-status` in five tones, `--success`, `--warning`, `--danger`, `--info` and `--muted` (a ring instead of a dot), for any list of states. The portfolio's `--live`, `--building` and `--archived` are named variants of them. Each status colour now declares `color.surface.hover`, so a status in a table row that's hovered is checked too (99 contrast pairs).
|
|
22
|
+
- Compact buttons (`cx-button--sm`) for table rows and toolbars, and data tables with a state cell (`td.is-state`) and an actions cell (`td.is-actions` with `cx-table__actions`).
|
|
23
|
+
- Disclosure (`disclosure.md`, shared): a styled native `<details>` with a turning chevron.
|
|
24
|
+
- Keyboard key (`keyboard-key.md`, shared): `cx-kbd`, the prose keycap outside prose.
|
|
25
|
+
- Thirteen icons for navigation and tools: `search`, `menu`, `close`, `edit`, `dashboard`, `notifications`, `dns`, `storage`, `lan`, `apps`, `settings`, `restart` and `logs`. `icon.md` allows icons before side navigation items and on toolbar controls in the dashboard and documentation layouts.
|
|
26
|
+
- A JSX form of every component example: the MCP server's `get_component` takes `form` (`html`, `jsx` or `hugo`) and returns only that markup, so answers are shorter. The JSX is converted from the HTML examples (renamed attributes, closed void elements, comments, fragments), and a test compiles every example with esbuild. The two examples written in Hugo template syntax say they have no JSX form.
|
|
27
|
+
- Behaviour sections in the docs of components with script (site header's theme toggle, code block's copy button, table of contents, tooltip) and in the disclosure's, so an app that renders them itself can match.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- `docs/templates.md` is now `docs/layouts/portfolio.md`. `get_doc("templates")` still returns it.
|
|
31
|
+
- `cx-status` sets its own mono label type, so it can stand on its own in a table or a feed; inside accession labels and meta lines it looks the same as before.
|
|
32
|
+
- Rules that only suit a portfolio say so: catalogue numbers, the six page templates and the backdrop on every page are in the portfolio layout. Heading anchors are for reading text; dashboard sections have an id and no anchor. The seventh principle is now "One accent; decoration as the layout allows".
|
|
33
|
+
- The MCP server's tool descriptions are shorter, so what it sends with every request stays the same size despite the new options (+23 characters, from 3,689).
|
|
34
|
+
- The rule that JavaScript is enhancement says what it means in an app that needs script to render, and a new rule says MotifSpec's own files are served by the project, never a CDN, while an app's data is the project's business.
|
|
35
|
+
|
|
5
36
|
## [1.17.3] - 2026-11-04
|
|
6
37
|
|
|
7
38
|
### Fixed
|
package/README.md
CHANGED
|
@@ -10,10 +10,33 @@ Liam Marshall's design system: the single source of truth for aitrien.com and ev
|
|
|
10
10
|
4. **HTML first, script second.** Content, navigation and code work without JavaScript. Scripts add the theme toggle, copy buttons and TOC tracking.
|
|
11
11
|
5. **Square, hairline, labelled.** Structure is drawn with 1px rules, square corners and mono labels, like a field ledger. Buttons, nav items and icon-only controls are the one exception: they are pills, so anything you can press is recognisable at a glance.
|
|
12
12
|
6. **Motion confirms a change.** Only state changes animate, plus the contour survey: it settles once on arrival and answers the pointer, and the specimen plate's drift can be paused. Text never moves, and reduced motion means none.
|
|
13
|
-
7. **One accent
|
|
13
|
+
7. **One accent; decoration as the layout allows.** Sap green marks action. Yarndings and the contour survey (the backdrop, or the specimen plate) are the only decoration, once per view, where the layout allows them.
|
|
14
|
+
|
|
15
|
+
## Layouts
|
|
16
|
+
|
|
17
|
+
A layout is a kind of site: its shell, page templates, components, decoration and heading rules. Pick the one that fits before choosing components.
|
|
18
|
+
|
|
19
|
+
| Layout | For | File |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Portfolio | Case studies, writing and an about page | `docs/layouts/portfolio.md` |
|
|
22
|
+
| Dashboard | Tools and admin screens (in progress) | `docs/layouts/dashboard.md` |
|
|
23
|
+
| Documentation | Guides, reference and a changelog (in progress) | `docs/layouts/documentation.md` |
|
|
24
|
+
| À la carte | A project that fits none of them: chosen components, its own frame | `docs/layouts/a-la-carte.md` |
|
|
25
|
+
|
|
26
|
+
Each component doc says which layouts it belongs to in its front matter (`layouts:`). Shared components belong to every layout.
|
|
27
|
+
|
|
28
|
+
A project declares its layout so the checker can hold it to it. A Hugo site sets it in its config:
|
|
29
|
+
|
|
30
|
+
```toml
|
|
31
|
+
[params.motifspec]
|
|
32
|
+
layout = "dashboard"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
An à la carte project also lists the components it uses, by doc name: `components = ["table-of-contents", "heading-anchor"]`. Outside Hugo, pass `--layout` (and `--components`) to the checker. A project that declares nothing is checked as portfolio.
|
|
14
36
|
|
|
15
37
|
## Rules for AI assistants
|
|
16
38
|
|
|
39
|
+
- Choose the layout first (`docs/layouts/`), and use the project's stack if it has one; otherwise see the layout's stack table. Use shared components and the components of that layout only.
|
|
17
40
|
- Use semantic tokens only: `var(--cx-color-text-primary)`, never `--cx-primitive-*`, never a raw hex, px, rem or ms value.
|
|
18
41
|
- Read a token's `$description` before using it. It is the usage rule, including when *not* to use it.
|
|
19
42
|
- Put text on a surface only if the text token lists that surface in `codex.pairsWith`. If the pair isn't declared, pick a token that declares it.
|
|
@@ -24,10 +47,11 @@ Liam Marshall's design system: the single source of truth for aitrien.com and ev
|
|
|
24
47
|
- Icons come only from `icons/manifest.json`, each for its listed role, as `<svg class="cx-icon"><use href="#cx-icon-{key}"></use></svg>` beside text that says the same thing. Never the icon font, never a CDN.
|
|
25
48
|
- Separate inline metadata with `<span class="cx-sep" aria-hidden="true">|</span>`. Never use "·" as a separator.
|
|
26
49
|
- Lay out with flex-wrap, auto-fill grids and `min()`. Width media queries can't read custom properties: when a layout must switch between alternate content at a width, write `@media (width < token(size.breakpoint.md))` in `css/components.css` and the build fills in the value. Nothing else may be written as `token(...)`.
|
|
27
|
-
- JavaScript is enhancement.
|
|
50
|
+
- JavaScript is enhancement. In a site that renders without script, anything a reader needs must work without it; controls that need script ship `hidden` and are revealed by it. In an app that needs script to render at all, MotifSpec's components add no script of their own: native elements (`<details>`, `<meter>`, `<dialog>`, radio buttons) do the work.
|
|
51
|
+
- Serve MotifSpec's own files (CSS, fonts, icons, scripts) from the project, never from a CDN. Where an app gets its data is the project's decision, not a MotifSpec rule.
|
|
28
52
|
- Use plain, functional labels: Work, Writing, About.
|
|
29
53
|
- Write sample and placeholder content from scratch. Never copy wording from reference or competitor sites; quote only with a named person and a traceable source in the blockquote footer.
|
|
30
|
-
- Give every section `<h2>` an id and a `cx-anchor` link (see `docs/components/heading-anchor.md`).
|
|
54
|
+
- Give every section `<h2>` in reading text an id and a `cx-anchor` link (see `docs/components/heading-anchor.md`). Dashboard sections have an id and no anchor.
|
|
31
55
|
|
|
32
56
|
## What's here
|
|
33
57
|
|
|
@@ -40,7 +64,7 @@ css/components.css Reference implementation of every component (tokens only)
|
|
|
40
64
|
syntax/chroma.json Hugo Chroma class → token mapping
|
|
41
65
|
icons/ Approved Material Symbols (manifest.json, source SVGs, Apache-2.0 LICENSE)
|
|
42
66
|
docs/components/ One rule file per component (front-matter token lists generated from the CSS)
|
|
43
|
-
docs/
|
|
67
|
+
docs/layouts/ One file per layout: shell, page templates, components, decoration, headings, stack
|
|
44
68
|
docs/hugo.md The Hugo partials and render hooks, their contexts and the front matter they read
|
|
45
69
|
layouts/ Hugo partials (_partials/motifspec/) and Markdown render hooks (_markup/), mounted by the module
|
|
46
70
|
docs/syntax-highlighting.md
|
|
@@ -76,6 +100,10 @@ npm run mcp:bundle # build/mcp.zip, the server's Lambda package
|
|
|
76
100
|
- a primitive, unknown or deprecated `--cx-` token
|
|
77
101
|
- a `cx-` class that the stylesheet and scripts don't define, or a `cx-icon-` that isn't in `icons/manifest.json`
|
|
78
102
|
- "·" used as a separator
|
|
103
|
+
- an unknown layout, or an unknown component in an à la carte list
|
|
104
|
+
- in an à la carte project's own stylesheet, the same raw values and tokens, and any selector that targets a `cx-` class
|
|
105
|
+
|
|
106
|
+
It warns, without failing, when a component (its classes or its Hugo partial) is used outside its layouts, or an à la carte project uses a layout component it hasn't listed. These become failures in a later release.
|
|
79
107
|
|
|
80
108
|
Releases are automatic; `CONVENTIONS.md` (Versioning) says how.
|
|
81
109
|
|
|
@@ -105,13 +133,13 @@ Pin an exact version, as a Hugo site pins a tag: the version you install is the
|
|
|
105
133
|
| `@aitrien/motifspec/check` | `checkText` and `checkProject` from the rule checker. |
|
|
106
134
|
| `@aitrien/motifspec/fonts/*` | The WOFF2 files, for preloading. |
|
|
107
135
|
|
|
108
|
-
Copy component markup from `docs/components/*.md` (in the package under `node_modules/@aitrien/motifspec/docs/`). Then check the project, pointing `--dirs` at the folders with your markup:
|
|
136
|
+
Copy component markup from `docs/components/*.md` (in the package under `node_modules/@aitrien/motifspec/docs/`). For React and similar, the MCP server's `get_component` with `form: "jsx"` gives the same examples as JSX, converted mechanically; components with script describe what to implement in their Behaviour section. Then check the project, pointing `--dirs` at the folders with your markup:
|
|
109
137
|
|
|
110
138
|
```sh
|
|
111
139
|
npx motifspec-check . --dirs src
|
|
112
140
|
```
|
|
113
141
|
|
|
114
|
-
It reads `.html`, `.jsx`, `.tsx`, `.vue`, `.svelte`, `.astro`, `.md` and `.mdx` (both `class` and `className`), and skips `node_modules`, `dist` and `build`. Its stylesheet rule applies here too: a project using MotifSpec has no CSS of its own.
|
|
142
|
+
Add `--layout dashboard` (or the project's layout) so components are checked against it; à la carte projects add `--components` with their list. It reads `.html`, `.jsx`, `.tsx`, `.vue`, `.svelte`, `.astro`, `.md` and `.mdx` (both `class` and `className`), and skips `node_modules`, `dist` and `build`. Its stylesheet rule applies here too: a project using MotifSpec has no CSS of its own, except an à la carte project's frame (`docs/layouts/a-la-carte.md`).
|
|
115
143
|
|
|
116
144
|
## Using it from an AI assistant
|
|
117
145
|
|
|
@@ -121,9 +149,9 @@ The MCP server at `https://mcp.motifspec.com/mcp` serves the latest release to a
|
|
|
121
149
|
|---|---|
|
|
122
150
|
| `get_rules` | The rules above, and what the checker enforces |
|
|
123
151
|
| `find_tokens` | Semantic tokens matching a query: CSS property, usage rule, light and dark values, the surfaces a colour may sit on |
|
|
124
|
-
| `get_component` | A component's doc (markup, do and don't, accessibility
|
|
125
|
-
| `get_doc` | `docs/hugo.md
|
|
126
|
-
| `check` | The checker's problems in a piece of markup, Markdown or CSS |
|
|
152
|
+
| `get_component` | A component's doc (markup, do and don't, accessibility, behaviour). `form` picks the markup: `html`, `jsx` or `hugo` (with its partial); without it, the HTML and the partial. Without a name, the list with each component's layouts |
|
|
153
|
+
| `get_doc` | `docs/hugo.md`, or a layout from `docs/layouts/` (`portfolio`, `dashboard`, `documentation`, `a-la-carte`) |
|
|
154
|
+
| `check` | The checker's problems in a piece of markup, Markdown or CSS; with a `layout`, warnings for components from other layouts |
|
|
127
155
|
|
|
128
156
|
To connect it:
|
|
129
157
|
|
package/dist/codex.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
|
|
3
3
|
@font-face { font-family: "Yarndings 12"; src: url("../fonts/yarndings-12-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
|
|
4
4
|
|
|
5
|
-
/* MotifSpec 1.
|
|
5
|
+
/* MotifSpec 1.18.1 — generated from tokens/*.json. Do not edit.
|
|
6
6
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
7
7
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
8
8
|
:root {
|
|
@@ -718,11 +718,14 @@ label:is(:hover, :has(:focus-visible)):not(.is-tooltip-dismissed) > .cx-tooltip
|
|
|
718
718
|
}
|
|
719
719
|
.cx-id__no { color: var(--cx-color-text-accent); font-weight: var(--cx-font-weight-ui); }
|
|
720
720
|
.cx-id > * + *::before { content: "|" / ""; order: -2; margin-right: var(--cx-space-inline-sm); color: var(--cx-color-text-muted); }
|
|
721
|
-
.cx-status { display: inline-flex; align-items: center; gap: var(--cx-space-inline-xs); text-transform: uppercase; letter-spacing: var(--cx-font-tracking-label); }
|
|
721
|
+
.cx-status { display: inline-flex; align-items: center; gap: var(--cx-space-inline-xs); font-family: var(--cx-font-family-mono); font-size: var(--cx-font-size-label); line-height: var(--cx-font-line-height-ui); text-transform: uppercase; letter-spacing: var(--cx-font-tracking-label); white-space: nowrap; }
|
|
722
722
|
.cx-status::after { content: ""; order: -1; width: var(--cx-space-inset-sm); height: var(--cx-space-inset-sm); border-radius: var(--cx-radius-round); background: currentColor; }
|
|
723
|
-
.cx-status--live { color: var(--cx-color-status-success-text); }
|
|
724
|
-
.cx-status--building { color: var(--cx-color-status-warning-text); }
|
|
725
|
-
.cx-status--
|
|
723
|
+
.cx-status--live, .cx-status--success { color: var(--cx-color-status-success-text); }
|
|
724
|
+
.cx-status--building, .cx-status--warning { color: var(--cx-color-status-warning-text); }
|
|
725
|
+
.cx-status--danger { color: var(--cx-color-status-danger-text); }
|
|
726
|
+
.cx-status--info { color: var(--cx-color-status-info-text); }
|
|
727
|
+
.cx-status--archived, .cx-status--muted { color: var(--cx-color-text-muted); }
|
|
728
|
+
.cx-status--muted::after { background: transparent; box-shadow: inset 0 0 0 var(--cx-border-width-emphasis) currentColor; }
|
|
726
729
|
|
|
727
730
|
/* ------------------------------------------------------------ tag */
|
|
728
731
|
.cx-tags { display: flex; flex-wrap: wrap; gap: var(--cx-space-inline-sm); margin: 0; padding: 0; list-style: none; }
|
|
@@ -753,6 +756,7 @@ a.cx-tag:hover { border-color: var(--cx-color-accent-border); color: var(--cx-co
|
|
|
753
756
|
.cx-button--primary { border-color: var(--cx-color-accent-fill-rest); background: var(--cx-color-accent-fill-rest); color: var(--cx-color-text-on-accent); }
|
|
754
757
|
.cx-button--primary:hover { border-color: var(--cx-color-accent-fill-hover); background: var(--cx-color-accent-fill-hover); }
|
|
755
758
|
.cx-button[disabled], .cx-button[aria-disabled="true"] { cursor: not-allowed; border-style: dashed; background: transparent; color: var(--cx-color-text-muted); }
|
|
759
|
+
.cx-button--sm { min-height: var(--cx-size-target-min); padding-inline: var(--cx-space-inset-md); }
|
|
756
760
|
.cx-button__arrow { display: inline-block; transition: transform var(--cx-motion-duration-fast) var(--cx-motion-easing-standard); }
|
|
757
761
|
.cx-button:hover .cx-button__arrow, .cx-link:hover .cx-button__arrow, .cx-pagination__link[rel="next"]:hover .cx-button__arrow { transform: translateX(var(--cx-motion-distance-nudge)); }
|
|
758
762
|
.cx-back:hover .cx-button__arrow, .cx-pagination__link[rel="prev"]:hover .cx-button__arrow { transform: translateX(calc(var(--cx-motion-distance-nudge) * -1)); }
|
|
@@ -818,7 +822,7 @@ a.cx-tag:hover { border-color: var(--cx-color-accent-border); color: var(--cx-co
|
|
|
818
822
|
background: var(--cx-color-surface-sunken); font-family: var(--cx-font-family-mono); font-size: var(--cx-font-size-code-inline);
|
|
819
823
|
overflow-wrap: anywhere;
|
|
820
824
|
}
|
|
821
|
-
.cx-prose kbd {
|
|
825
|
+
.cx-prose kbd, .cx-kbd {
|
|
822
826
|
padding-inline: var(--cx-space-inset-xs); border: var(--cx-border-width-hairline) solid var(--cx-color-border-strong);
|
|
823
827
|
border-bottom-width: var(--cx-border-width-emphasis); border-radius: var(--cx-radius-control);
|
|
824
828
|
background: var(--cx-color-surface-sunken); font-family: var(--cx-font-family-mono); font-size: var(--cx-font-size-code-inline);
|
|
@@ -921,6 +925,9 @@ a.cx-tag:hover { border-color: var(--cx-color-accent-border); color: var(--cx-co
|
|
|
921
925
|
.cx-table tbody tr:hover > * { background: var(--cx-color-surface-hover); }
|
|
922
926
|
.cx-table .is-num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--cx-font-family-mono); }
|
|
923
927
|
.cx-table code { font-family: var(--cx-font-family-mono); }
|
|
928
|
+
.cx-table td.is-state { white-space: nowrap; }
|
|
929
|
+
.cx-table td.is-actions { width: 1%; white-space: nowrap; }
|
|
930
|
+
.cx-table__actions { display: flex; justify-content: flex-end; gap: var(--cx-space-inline-xs); }
|
|
924
931
|
|
|
925
932
|
/* ------------------------------------------------------------ project card */
|
|
926
933
|
.cx-cards { display: grid; gap: var(--cx-space-gutter-grid); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--cx-size-column-card)), 1fr)); margin: 0; padding: 0; list-style: none; }
|
|
@@ -983,6 +990,19 @@ a.cx-tag:hover { border-color: var(--cx-color-accent-border); color: var(--cx-co
|
|
|
983
990
|
.cx-pagination__status strong { color: var(--cx-color-text-primary); font-weight: var(--cx-font-weight-ui); }
|
|
984
991
|
.cx-pagination [aria-disabled="true"] { color: var(--cx-color-text-muted); pointer-events: none; }
|
|
985
992
|
|
|
993
|
+
/* ------------------------------------------------------------ disclosure */
|
|
994
|
+
.cx-disclosure { border-top: var(--cx-border-width-hairline) solid var(--cx-color-border-default); border-bottom: var(--cx-border-width-hairline) solid var(--cx-color-border-default); }
|
|
995
|
+
.cx-disclosure + .cx-disclosure { border-top: 0; }
|
|
996
|
+
.cx-disclosure > summary {
|
|
997
|
+
display: flex; align-items: center; gap: var(--cx-space-inline-sm); min-height: var(--cx-size-target-control); padding-inline: var(--cx-space-inset-sm);
|
|
998
|
+
color: var(--cx-color-text-primary); font-weight: var(--cx-font-weight-strong); cursor: pointer; list-style: none;
|
|
999
|
+
}
|
|
1000
|
+
.cx-disclosure > summary::-webkit-details-marker { display: none; }
|
|
1001
|
+
.cx-disclosure > summary:hover { background: var(--cx-color-surface-hover); }
|
|
1002
|
+
.cx-disclosure__chevron { margin-left: auto; transition: transform var(--cx-motion-duration-base) var(--cx-motion-easing-standard); }
|
|
1003
|
+
.cx-disclosure[open] > summary .cx-disclosure__chevron { transform: rotate(180deg); }
|
|
1004
|
+
.cx-disclosure__body { padding: var(--cx-space-inset-sm) var(--cx-space-inset-sm) var(--cx-space-inset-md); }
|
|
1005
|
+
|
|
986
1006
|
/* ------------------------------------------------------------ table of contents */
|
|
987
1007
|
.cx-toc { min-width: 0; font-size: var(--cx-font-size-small); }
|
|
988
1008
|
.cx-toc.is-docked { position: sticky; top: calc(var(--_header-height, var(--cx-size-target-touch)) + var(--cx-space-stack-xl)); }
|
package/dist/contrast.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Contrast report (generated)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
99 declared pairs, each measured in both themes. Target is the pair's `min`.
|
|
4
4
|
|
|
5
5
|
| Foreground | Background | Min | Light | Dark | Result |
|
|
6
6
|
|---|---|---|---|---|---|
|
|
@@ -46,18 +46,22 @@
|
|
|
46
46
|
| `color.status.success.text` | `color.status.success.surface` | 4.5 | 6.46 | 10.91 | pass |
|
|
47
47
|
| `color.status.success.text` | `color.surface.base` | 4.5 | 6.41 | 9.18 | pass |
|
|
48
48
|
| `color.status.success.text` | `color.surface.raised` | 4.5 | 6.77 | 8.12 | pass |
|
|
49
|
+
| `color.status.success.text` | `color.surface.hover` | 4.5 | 5.99 | 7.37 | pass |
|
|
49
50
|
| `color.status.success.border` | `color.status.success.surface` | 3 | 4.49 | 7.81 | pass |
|
|
50
51
|
| `color.status.warning.text` | `color.status.warning.surface` | 4.5 | 6.79 | 10.70 | pass |
|
|
51
52
|
| `color.status.warning.text` | `color.surface.base` | 4.5 | 6.82 | 8.90 | pass |
|
|
52
53
|
| `color.status.warning.text` | `color.surface.raised` | 4.5 | 7.20 | 7.88 | pass |
|
|
54
|
+
| `color.status.warning.text` | `color.surface.hover` | 4.5 | 6.37 | 7.15 | pass |
|
|
53
55
|
| `color.status.warning.border` | `color.status.warning.surface` | 3 | 4.73 | 7.56 | pass |
|
|
54
56
|
| `color.status.danger.text` | `color.status.danger.surface` | 4.5 | 7.21 | 10.56 | pass |
|
|
55
57
|
| `color.status.danger.text` | `color.surface.base` | 4.5 | 7.27 | 8.62 | pass |
|
|
56
58
|
| `color.status.danger.text` | `color.surface.raised` | 4.5 | 7.67 | 7.63 | pass |
|
|
59
|
+
| `color.status.danger.text` | `color.surface.hover` | 4.5 | 6.79 | 6.92 | pass |
|
|
57
60
|
| `color.status.danger.border` | `color.status.danger.surface` | 3 | 5.04 | 7.39 | pass |
|
|
58
61
|
| `color.status.info.text` | `color.status.info.surface` | 4.5 | 6.72 | 10.74 | pass |
|
|
59
62
|
| `color.status.info.text` | `color.surface.base` | 4.5 | 6.76 | 8.95 | pass |
|
|
60
63
|
| `color.status.info.text` | `color.surface.raised` | 4.5 | 7.13 | 7.92 | pass |
|
|
64
|
+
| `color.status.info.text` | `color.surface.hover` | 4.5 | 6.31 | 7.18 | pass |
|
|
61
65
|
| `color.status.info.border` | `color.status.info.surface` | 3 | 4.70 | 7.64 | pass |
|
|
62
66
|
| `color.syntax.comment` | `color.surface.sunken` | 4.5 | 6.29 | 7.62 | pass |
|
|
63
67
|
| `color.syntax.comment` | `color.syntax.line-highlight` | 4.5 | 5.55 | 6.34 | pass |
|
package/dist/icons.svg
CHANGED
|
@@ -15,4 +15,17 @@
|
|
|
15
15
|
<symbol id="cx-icon-expand" viewBox="0 -960 960 960"><path d="M480-357.85 253.85-584l32.61-32.61L480-423.08l193.54-193.53L706.15-584 480-357.85Z"/></symbol>
|
|
16
16
|
<symbol id="cx-icon-pause" viewBox="0 -960 960 960"><path d="M533.85-220v-520H740v520H533.85ZM220-220v-520h206.54v520H220Zm359.23-45.39h115.38v-429.22H579.23v429.22Zm-313.84 0h115.76v-429.22H265.39v429.22Zm0-429.22v429.22-429.22Zm313.84 0v429.22-429.22Z"/></symbol>
|
|
17
17
|
<symbol id="cx-icon-play" viewBox="0 -960 960 960"><path d="M340-238.39v-487.68l383.07 243.84L340-238.39Zm45.39-243.84Zm0 161 253.99-161-253.99-161v322Z"/></symbol>
|
|
18
|
+
<symbol id="cx-icon-search" viewBox="0 -960 960 960"><path d="M790.61-137.54 531.08-397.08q-29.85 26.42-69.65 40.71-39.81 14.29-82.28 14.29-101.62 0-172.31-70.57-70.68-70.58-70.68-171 0-100.43 70.57-171 70.58-70.58 171.72-70.58 100.14 0 170.69 70.58 70.55 70.57 70.55 170.86 0 42.17-14.38 81.98-14.39 39.81-41.62 72.12l260.15 258.54-33.23 33.61ZM378.54-387.46q81.7 0 138.74-57.12 57.03-57.11 57.03-139.07 0-81.97-57.03-139.08-57.04-57.12-138.74-57.12-82.39 0-139.69 57.12-57.31 57.11-57.31 139.08 0 81.96 57.31 139.07 57.3 57.12 139.69 57.12Z"/></symbol>
|
|
19
|
+
<symbol id="cx-icon-menu" viewBox="0 -960 960 960"><path d="M140-254.62V-300h680v45.38H140Zm0-202.69v-45.38h680v45.38H140ZM140-660v-45.38h680V-660H140Z"/></symbol>
|
|
20
|
+
<symbol id="cx-icon-close" viewBox="0 -960 960 960"><path d="m250.92-218.92-32-32L448-480 218.92-709.08l32-32L480-512l229.08-229.08 32 32L512-480l229.08 229.08-32 32L480-448 250.92-218.92Z"/></symbol>
|
|
21
|
+
<symbol id="cx-icon-edit" viewBox="0 -960 960 960"><path d="M185.39-185.39h40.92l468.54-467.92-40.93-40.92-468.53 467.92v40.92ZM140-140v-104.54l593.54-593.69 105.69 105.31L244.54-140H140Zm634-593.92L734.54-773 774-733.92Zm-99.37 60.29-20.71-20.6 40.93 40.92-20.22-20.32Z"/></symbol>
|
|
22
|
+
<symbol id="cx-icon-dashboard" viewBox="0 -960 960 960"><path d="M522.69-578.08V-820H820v241.92H522.69ZM140-467.31V-820h297.31v352.69H140ZM522.69-140v-352.69H820V-140H522.69ZM140-140v-241.92h297.31V-140H140Zm45.39-372.69h206.53v-261.92H185.39v261.92Zm382.69 327.3h206.53v-261.92H568.08v261.92Zm0-438.07h206.53v-151.15H568.08v151.15ZM185.39-185.39h206.53v-151.15H185.39v151.15Zm206.53-327.3Zm176.16-110.77Zm0 176.15ZM391.92-336.54Z"/></symbol>
|
|
23
|
+
<symbol id="cx-icon-notifications" viewBox="0 -960 960 960"><path d="M180-204.62V-250h72.31v-315.92q0-81.31 49.31-144.93 49.3-63.61 128.38-78.69V-860h100v70.46q79.08 15.08 128.38 78.69 49.31 63.62 49.31 144.93V-250H780v45.38H180Zm300-294.69Zm-.07 407q-29.85 0-51.04-21.24-21.2-21.24-21.2-51.07h144.62q0 29.93-21.26 51.12-21.26 21.19-51.12 21.19ZM297.69-250h364.62v-315.92q0-75.77-53.27-129.04-53.27-53.27-129.04-53.27-75.77 0-129.04 53.27-53.27 53.27-53.27 129.04V-250Z"/></symbol>
|
|
24
|
+
<symbol id="cx-icon-dns" viewBox="0 -960 960 960"><path d="M290.37-695.46q-17.83 0-30.22 12.48-12.38 12.48-12.38 30.31 0 17.82 12.48 30.21 12.48 12.38 30.31 12.38 17.82 0 30.21-12.48 12.38-12.48 12.38-30.3 0-17.83-12.48-30.22-12.48-12.38-30.3-12.38Zm0 385.54q-17.83 0-30.22 12.48-12.38 12.48-12.38 30.3 0 17.83 12.48 30.22 12.48 12.38 30.31 12.38 17.82 0 30.21-12.48 12.38-12.48 12.38-30.31 0-17.82-12.48-30.21-12.48-12.38-30.3-12.38ZM140-497.85v-309.22h680v309.22H140Zm45.39-263.84v218.46h589.22v-218.46H185.39ZM140-112.31v-309.84h680v309.84H140Zm45.39-264.46v219.08h589.22v-219.08H185.39Zm0-384.92v218.46-218.46Zm0 384.92v219.08-219.08Z"/></symbol>
|
|
25
|
+
<symbol id="cx-icon-storage" viewBox="0 -960 960 960"><path d="M134.62-168.46v-134.15h690.76v134.15H134.62Zm56.15-33.77h66.62v-66.62h-66.62v66.62Zm-56.15-455.16v-134.15h690.76v134.15H134.62Zm56.15-33.76h66.62v-66.62h-66.62v66.62Zm-56.15 278.23v-134.16h690.76v134.16H134.62Zm56.15-33.77h66.62v-66.62h-66.62v66.62Z"/></symbol>
|
|
26
|
+
<symbol id="cx-icon-lan" viewBox="0 -960 960 960"><path d="M130-90v-252.69h120v-160h207.31v-114.62h-120V-870h285.38v252.69h-120v114.62H710v160h120V-90H544.62v-252.69h120v-114.62H295.38v114.62h120V-90H130Zm252.69-572.69h194.62v-161.93H382.69v161.93ZM175.38-135.38H370v-161.93H175.38v161.93Zm414.62 0h194.62v-161.93H590v161.93ZM480-662.69ZM370-297.31Zm220 0Z"/></symbol>
|
|
27
|
+
<symbol id="cx-icon-apps" viewBox="0 -960 960 960"><path d="M191.12-191.12q-15.73-15.73-15.73-38.73 0-23 15.73-38.73 15.73-15.73 38.73-15.73 23 0 38.73 15.73 15.73 15.73 15.73 38.73 0 23-15.73 38.73-15.73 15.73-38.73 15.73-23 0-38.73-15.73Zm250.15 0q-15.73-15.73-15.73-38.73 0-23 15.73-38.73Q457-284.31 480-284.31q23 0 38.73 15.73 15.73 15.73 15.73 38.73 0 23-15.73 38.73Q503-175.39 480-175.39q-23 0-38.73-15.73Zm250.15 0q-15.73-15.73-15.73-38.73 0-23 15.73-38.73 15.73-15.73 38.73-15.73 23 0 38.73 15.73 15.73 15.73 15.73 38.73 0 23-15.73 38.73-15.73 15.73-38.73 15.73-23 0-38.73-15.73Zm-500.3-250.15Q175.39-457 175.39-480q0-23 15.73-38.73 15.73-15.73 38.73-15.73 23 0 38.73 15.73Q284.31-503 284.31-480q0 23-15.73 38.73-15.73 15.73-38.73 15.73-23 0-38.73-15.73Zm250.15 0Q425.54-457 425.54-480q0-23 15.73-38.73Q457-534.46 480-534.46q23 0 38.73 15.73Q534.46-503 534.46-480q0 23-15.73 38.73Q503-425.54 480-425.54q-23 0-38.73-15.73Zm250.15 0Q675.69-457 675.69-480q0-23 15.73-38.73 15.73-15.73 38.73-15.73 23 0 38.73 15.73Q784.61-503 784.61-480q0 23-15.73 38.73-15.73 15.73-38.73 15.73-23 0-38.73-15.73Zm-500.3-250.15q-15.73-15.73-15.73-38.73 0-23 15.73-38.73 15.73-15.73 38.73-15.73 23 0 38.73 15.73 15.73 15.73 15.73 38.73 0 23-15.73 38.73-15.73 15.73-38.73 15.73-23 0-38.73-15.73Zm250.15 0q-15.73-15.73-15.73-38.73 0-23 15.73-38.73Q457-784.61 480-784.61q23 0 38.73 15.73 15.73 15.73 15.73 38.73 0 23-15.73 38.73Q503-675.69 480-675.69q-23 0-38.73-15.73Zm250.15 0q-15.73-15.73-15.73-38.73 0-23 15.73-38.73 15.73-15.73 38.73-15.73 23 0 38.73 15.73 15.73 15.73 15.73 38.73 0 23-15.73 38.73-15.73 15.73-38.73 15.73-23 0-38.73-15.73Z"/></symbol>
|
|
28
|
+
<symbol id="cx-icon-settings" viewBox="0 -960 960 960"><path d="m400.69-100-18.07-120.23q-20.54-7-44.23-20.35-23.7-13.34-40.85-28.27l-111.85 50.93-79.92-141.31 101.08-74.38q-2-10.54-2.89-23.01-.88-12.46-.88-23 0-10.15.88-22.61.89-12.46 2.89-24.16l-101.08-74.76 79.92-140.16 111.46 50.16q18.31-14.93 41.24-28.08 22.92-13.15 43.84-19.54L400.69-860h158.62l18.07 120.62q22.08 8.15 44.16 20.23 22.07 12.07 39.77 28l113.38-50.16 79.54 140.16-102.62 74.3q2.77 11.93 3.47 24 .69 12.08.69 22.85 0 10.38-.89 22.15-.88 11.77-3.27 24.47l102.23 74.15-79.92 141.31-112.61-51.31q-18.7 15.69-40.35 28.96-21.65 13.27-43.58 19.65L559.31-100H400.69Zm36.46-45.39h85.31L536.85-257q31.84-8 59.42-23.85 27.58-15.84 52.73-40.23l104.46 45.23 40-70.84L701-414.92q4-17.77 6.31-33.5 2.3-15.73 2.3-31.58 0-16.62-2-31.96-2-15.35-6.61-32.35l93.23-69-40-70.84-105.62 45.23q-21.07-23.69-50.84-41.77Q568-698.77 536.46-703l-13.61-111.61h-85.7l-13.23 111.23q-33.23 6.61-61.19 22.65t-52.11 41.42l-104.85-44.84-40 70.84 92.46 67.85q-4.38 15.84-6.69 32.15-2.31 16.31-2.31 33.69 0 16.62 2.31 32.54 2.31 15.93 6.31 32.16l-92.08 68.23 40 70.84 104.46-44.84q24 24.38 52.15 40.23 28.16 15.84 61.16 23.84l13.61 111.23Zm41.7-221.92q47.07 0 79.88-32.81 32.81-32.8 32.81-79.88t-32.81-79.88q-32.81-32.81-79.88-32.81-46.7 0-79.7 32.81-32.99 32.8-32.99 79.88t32.99 79.88q33 32.81 79.7 32.81ZM480-480Z"/></symbol>
|
|
29
|
+
<symbol id="cx-icon-restart" viewBox="0 -960 960 960"><path d="M447.92-142.77q-113.77-11.15-190.84-96Q180-323.62 180-439.38q0-68.93 31.08-130.2 31.07-61.26 86.23-102.34l32.23 32.61q-49.85 33-77 86.46-27.15 53.47-27.15 113.47 0 96.92 63.49 167.99 63.5 71.08 159.04 83.24v45.38Zm65.39.77v-45.39q96.15-14.3 159.04-84.88 62.88-70.58 62.88-167.11 0-106.7-73.96-180.66T480.62-694h-26.54l65.77 65.77-32.62 32.61-121.07-121.07 121.07-121.08 32.62 32.62-65.77 65.77h26.54q125.53 0 212.76 87.73 87.23 87.73 87.23 212.27 0 115.76-76.76 200.42-76.77 84.65-190.54 96.96Z"/></symbol>
|
|
30
|
+
<symbol id="cx-icon-logs" viewBox="0 -960 960 960"><path d="M100-180v-600h760v600H100Zm45.39-45.39h669.22v-426.38H145.39v426.38ZM300-303.15l-31.61-31.23 103-104-104-104L300-574l135.61 135.62L300-303.15Zm197.31 7.46v-45.39h205.38v45.39H497.31Z"/></symbol>
|
|
18
31
|
</svg>
|
package/dist/tokens.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* MotifSpec 1.
|
|
1
|
+
/* MotifSpec 1.18.1 — generated from tokens/*.json. Do not edit.
|
|
2
2
|
Themes: semantic colours use light-dark(); color-scheme follows the system unless
|
|
3
3
|
<html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
|
|
4
4
|
:root {
|
package/dist/tokens.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by npm run build. Do not edit.
|
|
2
|
-
export const version = "1.
|
|
2
|
+
export const version = "1.18.1";
|
|
3
3
|
export const changelog = "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md";
|
|
4
4
|
export const showcase = "https://motifspec.com";
|
|
5
5
|
export const tokens = [
|
|
@@ -988,6 +988,10 @@ export const tokens = [
|
|
|
988
988
|
{
|
|
989
989
|
"token": "color.surface.raised",
|
|
990
990
|
"min": 4.5
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"token": "color.surface.hover",
|
|
994
|
+
"min": 4.5
|
|
991
995
|
}
|
|
992
996
|
]
|
|
993
997
|
},
|
|
@@ -1041,6 +1045,10 @@ export const tokens = [
|
|
|
1041
1045
|
{
|
|
1042
1046
|
"token": "color.surface.raised",
|
|
1043
1047
|
"min": 4.5
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"token": "color.surface.hover",
|
|
1051
|
+
"min": 4.5
|
|
1044
1052
|
}
|
|
1045
1053
|
]
|
|
1046
1054
|
},
|
|
@@ -1094,6 +1102,10 @@ export const tokens = [
|
|
|
1094
1102
|
{
|
|
1095
1103
|
"token": "color.surface.raised",
|
|
1096
1104
|
"min": 4.5
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"token": "color.surface.hover",
|
|
1108
|
+
"min": 4.5
|
|
1097
1109
|
}
|
|
1098
1110
|
]
|
|
1099
1111
|
},
|
|
@@ -1147,6 +1159,10 @@ export const tokens = [
|
|
|
1147
1159
|
{
|
|
1148
1160
|
"token": "color.surface.raised",
|
|
1149
1161
|
"min": 4.5
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"token": "color.surface.hover",
|
|
1165
|
+
"min": 4.5
|
|
1150
1166
|
}
|
|
1151
1167
|
]
|
|
1152
1168
|
},
|
package/dist/tokens.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.18.1",
|
|
3
3
|
"changelog": "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md",
|
|
4
4
|
"showcase": "https://motifspec.com",
|
|
5
5
|
"tokens": [
|
|
@@ -988,6 +988,10 @@
|
|
|
988
988
|
{
|
|
989
989
|
"token": "color.surface.raised",
|
|
990
990
|
"min": 4.5
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"token": "color.surface.hover",
|
|
994
|
+
"min": 4.5
|
|
991
995
|
}
|
|
992
996
|
]
|
|
993
997
|
},
|
|
@@ -1041,6 +1045,10 @@
|
|
|
1041
1045
|
{
|
|
1042
1046
|
"token": "color.surface.raised",
|
|
1043
1047
|
"min": 4.5
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"token": "color.surface.hover",
|
|
1051
|
+
"min": 4.5
|
|
1044
1052
|
}
|
|
1045
1053
|
]
|
|
1046
1054
|
},
|
|
@@ -1094,6 +1102,10 @@
|
|
|
1094
1102
|
{
|
|
1095
1103
|
"token": "color.surface.raised",
|
|
1096
1104
|
"min": 4.5
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"token": "color.surface.hover",
|
|
1108
|
+
"min": 4.5
|
|
1097
1109
|
}
|
|
1098
1110
|
]
|
|
1099
1111
|
},
|
|
@@ -1147,6 +1159,10 @@
|
|
|
1147
1159
|
{
|
|
1148
1160
|
"token": "color.surface.raised",
|
|
1149
1161
|
"min": 4.5
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"token": "color.surface.hover",
|
|
1165
|
+
"min": 4.5
|
|
1150
1166
|
}
|
|
1151
1167
|
]
|
|
1152
1168
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: component-name
|
|
3
3
|
status: draft # draft | stable | deprecated
|
|
4
|
+
layouts: [shared] # [shared], or the layouts it belongs to: portfolio, dashboard, documentation
|
|
4
5
|
tokens: # semantic tokens this component uses
|
|
5
6
|
- color.accent
|
|
6
7
|
- space.md
|
|
@@ -35,3 +36,7 @@ One sentence: what it is for.
|
|
|
35
36
|
## Accessibility
|
|
36
37
|
|
|
37
38
|
- Keyboard behaviour, roles, contrast pairs.
|
|
39
|
+
|
|
40
|
+
## Behaviour
|
|
41
|
+
|
|
42
|
+
Only for a component with behaviour: what changes on interaction, what script (if any) does it, and what an app that renders the component itself (React, say) must do to match.
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: accession-label
|
|
3
3
|
status: stable
|
|
4
|
+
layouts: [portfolio]
|
|
4
5
|
tokens:
|
|
6
|
+
- border.width.emphasis
|
|
5
7
|
- border.width.hairline
|
|
6
8
|
- color.border.default
|
|
7
9
|
- color.border.subtle
|
|
8
10
|
- color.link.rest
|
|
9
11
|
- color.ornament.muted
|
|
12
|
+
- color.status.danger.text
|
|
13
|
+
- color.status.info.text
|
|
10
14
|
- color.status.success.text
|
|
11
15
|
- color.status.warning.text
|
|
12
16
|
- color.surface.raised
|
|
@@ -87,7 +91,7 @@ Store the number in front matter (`accession: LM-W-004`) rather than deriving it
|
|
|
87
91
|
- Put the number first, then the date, then everything else.
|
|
88
92
|
- Use ISO dates (`2026-03-14`) in tabular figures.
|
|
89
93
|
- Separate items inside a field with `cx-sep` (a hidden "|"). The compact form adds its own "|" between items.
|
|
90
|
-
- Use `cx-status--live`, `--building` or `--archived
|
|
94
|
+
- Use `cx-status--live`, `--building` or `--archived` (`status.md`); each pairs a dot with a word.
|
|
91
95
|
- On a case study, pair a lead label (`cx-label--lead`) above the title with a card (`cx-label--card`) after the article, holding the same fields. Below `size.breakpoint.md` the lead label shows only the number, date and status, because role and stack are marked `cx-label__detail`, and the card shows the full label at the end. From `size.breakpoint.md` up the lead label is complete and the card is hidden. Only one of the two is ever complete on screen.
|
|
92
96
|
- Let the fields wrap. Each field grows to fill its row and carries a `color.border.subtle` rule on its right and below, so a label that wraps onto several rows reads as a ruled grid, with every row closed by a full-width rule; the frame stays `color.border.default`.
|
|
93
97
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: backdrop
|
|
3
3
|
status: stable
|
|
4
|
+
layouts: [portfolio, documentation, dashboard]
|
|
4
5
|
tokens:
|
|
5
6
|
- border.width.emphasis
|
|
6
7
|
- border.width.hairline
|
|
@@ -22,8 +23,9 @@ Contour surveys drawn full-bleed behind the top of the home page and the bottom
|
|
|
22
23
|
|
|
23
24
|
## When to use
|
|
24
25
|
|
|
25
|
-
- The foot on every page of a
|
|
26
|
+
- The foot on every page of a portfolio or documentation site, 404 included (`docs/layouts/`).
|
|
26
27
|
- The head on the home page only, behind the statement: it is where a visitor starts. Every other page opens on the plain surface.
|
|
28
|
+
- On a dashboard, behind the main area, as `docs/layouts/dashboard.md` says.
|
|
27
29
|
- Once each per page, both inside `<body class="cx-backdrop-page">`: the head as its first child, the foot after the footer.
|
|
28
30
|
|
|
29
31
|
## When not to use
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: button-and-link
|
|
3
3
|
status: stable
|
|
4
|
+
layouts: [shared]
|
|
4
5
|
tokens:
|
|
5
6
|
- border.focus.offset
|
|
6
7
|
- border.focus.width
|
|
@@ -35,6 +36,7 @@ tokens:
|
|
|
35
36
|
- space.inline.sm
|
|
36
37
|
- space.inline.xs
|
|
37
38
|
- space.inset.lg
|
|
39
|
+
- space.inset.md
|
|
38
40
|
---
|
|
39
41
|
|
|
40
42
|
# Button and link
|
|
@@ -66,6 +68,12 @@ Buttons start actions or journeys; standalone links and back links move between
|
|
|
66
68
|
<a class="cx-back" href="/writing/"><svg class="cx-icon cx-icon--sm cx-button__arrow" aria-hidden="true" focusable="false"><use href="#cx-icon-arrow-back"></use></svg>All writing</a>
|
|
67
69
|
```
|
|
68
70
|
|
|
71
|
+
Add `cx-button--sm` for a compact button in a table row or a toolbar, where full-size buttons would make every row tall:
|
|
72
|
+
|
|
73
|
+
```html preview
|
|
74
|
+
<button class="cx-button cx-button--sm" type="button">Restart<span class="cx-visually-hidden"> Jellyfin</span></button>
|
|
75
|
+
```
|
|
76
|
+
|
|
69
77
|
## Do
|
|
70
78
|
|
|
71
79
|
- Use `<a>` when it goes somewhere and `<button>` when it does something.
|
|
@@ -78,7 +86,8 @@ Buttons start actions or journeys; standalone links and back links move between
|
|
|
78
86
|
- Don't use buttons for decoration or as tags.
|
|
79
87
|
- Don't round anything else: cards, tags, labels, tooltips and inputs stay square.
|
|
80
88
|
- Don't make disabled buttons look clickable. They are dashed and muted, and should say why they're unavailable.
|
|
81
|
-
- Don't add icons beyond the direction arrow.
|
|
89
|
+
- Don't add icons beyond the direction arrow, except the roles `icon.md` lists for tools, such as restart or logs.
|
|
90
|
+
- Don't use `cx-button--sm` for a page's main actions; it is for repeated actions in rows and toolbars.
|
|
82
91
|
|
|
83
92
|
## Accessibility
|
|
84
93
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-block
|
|
3
3
|
status: stable
|
|
4
|
+
layouts: [shared]
|
|
4
5
|
tokens:
|
|
5
6
|
- border.focus.offset
|
|
6
7
|
- border.focus.width
|
|
@@ -107,3 +108,12 @@ Hugo render hook (`layouts/_default/_markup/render-codeblock.html`):
|
|
|
107
108
|
- The copy button says "Copied" on success. If the clipboard is refused, the code is selected and the button says to press Ctrl+C.
|
|
108
109
|
- Highlighted lines use an inset rule as well as a background, so the cue survives forced colours.
|
|
109
110
|
- Pairs: every `color.syntax.*` role on `color.surface.sunken` and `color.syntax.line-highlight` (4.5:1, both themes).
|
|
111
|
+
|
|
112
|
+
## Behaviour
|
|
113
|
+
|
|
114
|
+
`dist/codex.js` adds this; an app that renders code blocks itself does the same.
|
|
115
|
+
|
|
116
|
+
- The copy button ships `hidden` and is shown by script.
|
|
117
|
+
- A click copies the code's text (each line's `.cl` span when Chroma wrote them, otherwise the whole `<code>`) with the Clipboard API. The label becomes "Copied", the icon `check`, and `data-state="copied"`.
|
|
118
|
+
- If the clipboard is unavailable or refused, the code is selected instead, the label becomes "Selected, press Ctrl+C" and `data-state="selected"`.
|
|
119
|
+
- After `motion.duration.plate`, the button returns to "Copy" with the `content-copy` icon.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: data-table
|
|
3
3
|
status: stable
|
|
4
|
+
layouts: [shared]
|
|
4
5
|
tokens:
|
|
5
6
|
- border.focus.offset
|
|
6
7
|
- border.focus.width
|
|
@@ -22,6 +23,7 @@ tokens:
|
|
|
22
23
|
- font.weight.ui
|
|
23
24
|
- size.container.breakout
|
|
24
25
|
- size.measure.prose
|
|
26
|
+
- space.inline.xs
|
|
25
27
|
- space.inset.md
|
|
26
28
|
- space.inset.sm
|
|
27
29
|
- space.stack.lg
|
|
@@ -55,6 +57,25 @@ A framed table for comparing values: mono headers, hairline rows, right-aligned
|
|
|
55
57
|
</div>
|
|
56
58
|
```
|
|
57
59
|
|
|
60
|
+
A table of things to act on gives each row a state cell (`td.is-state`, with a status from `status.md`) and an actions cell (`td.is-actions`) of compact buttons. Each button's hidden text finishes its name, so a screen reader hears "Restart Jellyfin", not "Restart" six times:
|
|
61
|
+
|
|
62
|
+
```html preview
|
|
63
|
+
<div class="cx-table" role="region" aria-labelledby="tbl-services" tabindex="0">
|
|
64
|
+
<table>
|
|
65
|
+
<caption id="tbl-services">Services</caption>
|
|
66
|
+
<thead><tr><th scope="col">Service</th><th scope="col">State</th><th scope="col" class="is-num">Uptime</th><th scope="col"><span class="cx-visually-hidden">Actions</span></th></tr></thead>
|
|
67
|
+
<tbody>
|
|
68
|
+
<tr>
|
|
69
|
+
<th scope="row">Jellyfin</th>
|
|
70
|
+
<td class="is-state"><span class="cx-status cx-status--success">Running</span></td>
|
|
71
|
+
<td class="is-num">12 d</td>
|
|
72
|
+
<td class="is-actions"><div class="cx-table__actions"><button class="cx-button cx-button--sm" type="button">Restart<span class="cx-visually-hidden"> Jellyfin</span></button><button class="cx-button cx-button--sm" type="button">Logs<span class="cx-visually-hidden"> for Jellyfin</span></button></div></td>
|
|
73
|
+
</tr>
|
|
74
|
+
</tbody>
|
|
75
|
+
</table>
|
|
76
|
+
</div>
|
|
77
|
+
```
|
|
78
|
+
|
|
58
79
|
## Do
|
|
59
80
|
|
|
60
81
|
- Give every table a `<caption>`.
|
|
@@ -64,7 +85,7 @@ A framed table for comparing values: mono headers, hairline rows, right-aligned
|
|
|
64
85
|
## Don't
|
|
65
86
|
|
|
66
87
|
- Don't zebra-stripe; rows are separated by hairlines and highlight on hover.
|
|
67
|
-
- Don't put interactive controls in cells.
|
|
88
|
+
- Don't put interactive controls in cells other than the actions cell, and keep those to two or three per row.
|
|
68
89
|
|
|
69
90
|
## Accessibility
|
|
70
91
|
|