@aurodesignsystem-dev/auro-formkit 0.0.0-pr1578.0 → 0.0.0-pr1581.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/ai/README.md +142 -0
- package/ai/_a11y-baseline.md +27 -0
- package/ai/_authored/_defaults.overlay.yaml +81 -0
- package/ai/_authored/auro-checkbox.overlay.yaml +22 -0
- package/ai/_authored/auro-combobox.overlay.yaml +37 -0
- package/ai/_authored/auro-counter.overlay.yaml +23 -0
- package/ai/_authored/auro-datepicker.overlay.yaml +44 -0
- package/ai/_authored/auro-dropdown.overlay.yaml +35 -0
- package/ai/_authored/auro-form.overlay.yaml +12 -0
- package/ai/_authored/auro-input.overlay.yaml +33 -0
- package/ai/_authored/auro-menu.overlay.yaml +21 -0
- package/ai/_authored/auro-radio.overlay.yaml +19 -0
- package/ai/_authored/auro-select.overlay.yaml +37 -0
- package/ai/_prompt-template.md +33 -0
- package/ai/llms.txt +26 -0
- package/ai/specs/auro-checkbox.spec.yaml +181 -0
- package/ai/specs/auro-combobox.spec.yaml +349 -0
- package/ai/specs/auro-counter.spec.yaml +215 -0
- package/ai/specs/auro-datepicker.spec.yaml +395 -0
- package/ai/specs/auro-dropdown.spec.yaml +295 -0
- package/ai/specs/auro-form.spec.yaml +148 -0
- package/ai/specs/auro-input.spec.yaml +392 -0
- package/ai/specs/auro-menu.spec.yaml +213 -0
- package/ai/specs/auro-radio.spec.yaml +184 -0
- package/ai/specs/auro-select.spec.yaml +324 -0
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +12 -3
- package/components/combobox/demo/getting-started.min.js +12 -3
- package/components/combobox/demo/index.min.js +12 -3
- package/components/combobox/dist/index.js +12 -3
- package/components/combobox/dist/registered.js +12 -3
- package/components/counter/demo/customize.min.js +12 -3
- package/components/counter/demo/index.min.js +12 -3
- package/components/counter/dist/index.js +12 -3
- package/components/counter/dist/registered.js +12 -3
- package/components/datepicker/demo/customize.min.js +12 -3
- package/components/datepicker/demo/index.min.js +12 -3
- package/components/datepicker/dist/index.js +12 -3
- package/components/datepicker/dist/registered.js +12 -3
- package/components/dropdown/demo/customize.min.js +10 -1
- package/components/dropdown/demo/getting-started.min.js +11 -2
- package/components/dropdown/demo/index.min.js +10 -1
- package/components/dropdown/dist/index.js +10 -1
- package/components/dropdown/dist/registered.js +10 -1
- package/components/form/demo/customize.min.js +50 -14
- package/components/form/demo/getting-started.min.js +50 -14
- package/components/form/demo/index.min.js +50 -14
- package/components/form/demo/registerDemoDeps.min.js +50 -14
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/radio/demo/customize.min.js +1 -1
- package/components/radio/demo/getting-started.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +11 -2
- package/components/select/demo/getting-started.min.js +11 -2
- package/components/select/demo/index.min.js +11 -2
- package/components/select/dist/index.js +11 -2
- package/components/select/dist/registered.js +11 -2
- package/custom-elements.json +1521 -1521
- package/package.json +6 -3
package/ai/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Using Auro FormKit with AI
|
|
2
|
+
|
|
3
|
+
This directory publishes a machine-consumable **AI implementation standard** for
|
|
4
|
+
Auro FormKit. It lets a team use an AI assistant to build Auro form components in
|
|
5
|
+
plain HTML/CSS/JS — on-brand and accessible — for situations where the Auro web
|
|
6
|
+
components cannot be consumed directly (a framework constraint, a locked-down
|
|
7
|
+
build, a non-Auro stack).
|
|
8
|
+
|
|
9
|
+
> **When to use this vs. the web components.** If you can install and render
|
|
10
|
+
> `<auro-input>` and friends, do that — the web components are the maintained
|
|
11
|
+
> source of truth and carry behavior (masking, validation, keyboard) that plain
|
|
12
|
+
> HTML cannot fully reproduce. Reach for these specs only when the components are
|
|
13
|
+
> genuinely off the table.
|
|
14
|
+
|
|
15
|
+
## What's here
|
|
16
|
+
|
|
17
|
+
| File | Purpose |
|
|
18
|
+
|---|---|
|
|
19
|
+
| [`llms.txt`](./llms.txt) | Index of every component spec + the global rules. Start here. |
|
|
20
|
+
| [`specs/*.spec.yaml`](./specs/) | One authoritative spec per component (API, visual recipe, behavior, gaps, examples, verify). Generated from source. |
|
|
21
|
+
| [`_prompt-template.md`](./_prompt-template.md) | The instruction block that makes an AI follow a spec correctly. |
|
|
22
|
+
| [`_a11y-baseline.md`](./_a11y-baseline.md) | Accessibility rules that apply to every component. |
|
|
23
|
+
| `_authored/` | Hand-authored inputs the generator merges into each spec (see [Maintainers](#for-maintainers)). |
|
|
24
|
+
|
|
25
|
+
Components with specs today: `checkbox`, `combobox`, `counter`, `datepicker`,
|
|
26
|
+
`dropdown`, `form`, `input`, `menu`, `radio`, `select`.
|
|
27
|
+
|
|
28
|
+
## Consuming the specs
|
|
29
|
+
|
|
30
|
+
There are two supported models. Both keep you in sync with the components — the
|
|
31
|
+
specs are regenerated from source and published on every release.
|
|
32
|
+
|
|
33
|
+
### Model A — MCP server (recommended for Claude / MCP-capable tools)
|
|
34
|
+
|
|
35
|
+
The `@aurodesignsystem/auro-formkit-mcp` server lets the AI discover and fetch the
|
|
36
|
+
right spec on its own. No copy-pasting.
|
|
37
|
+
|
|
38
|
+
**Claude Code**
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
claude mcp add auro-formkit -- npx -y @aurodesignsystem/auro-formkit-mcp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Claude Desktop / other MCP clients** — add to the client's MCP config:
|
|
45
|
+
|
|
46
|
+
```jsonc
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"auro-formkit": {
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["-y", "@aurodesignsystem/auro-formkit-mcp"],
|
|
52
|
+
"env": { "AURO_FORMKIT_VERSION": "latest" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The server exposes three tools the model calls automatically:
|
|
59
|
+
|
|
60
|
+
| Tool | What it does |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `list_components` | Returns the global rules + the list of available components. |
|
|
63
|
+
| `get_component_spec` | Fetches one component's spec, wrapped in the prompt template. |
|
|
64
|
+
| `search_tokens` | Looks up Auro `--ds-*` design tokens by keyword. |
|
|
65
|
+
|
|
66
|
+
Then just prompt: *"Build a required email field the Auro way."*
|
|
67
|
+
|
|
68
|
+
### Model B — URL / @Docs (Cursor, ChatGPT, any fetch-capable agent)
|
|
69
|
+
|
|
70
|
+
Point the tool at the published index:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/llms.txt
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- **Cursor** — add that URL under Settings → Docs, then reference it: `@auro-formkit build an email input`.
|
|
77
|
+
- **Any agent that can fetch URLs** — paste one line into your prompt:
|
|
78
|
+
*"Follow the Auro standard at `<llms.txt url>`; fetch the relevant spec before writing code."*
|
|
79
|
+
|
|
80
|
+
## Working with a spec
|
|
81
|
+
|
|
82
|
+
Once the AI has a spec, expect its output in this order (enforced by the prompt
|
|
83
|
+
template): **HTML → CSS → JS → Fidelity Report → Self-check.**
|
|
84
|
+
|
|
85
|
+
Two concepts drive correct output:
|
|
86
|
+
|
|
87
|
+
- **Tiers** on every attribute/slot/event tell the AI what's reproducible:
|
|
88
|
+
- `core` — implemented fully (maps to a native HTML attribute).
|
|
89
|
+
- `enhanced` — implemented only if your request needs it.
|
|
90
|
+
- `wc-only` — **not reproducible in plain HTML.** The AI must report it, never fake it.
|
|
91
|
+
- **Gaps** — the `gaps` section (and the Fidelity Report in the output) lists what
|
|
92
|
+
you lose versus the real component (e.g. input masking, credit-card detection,
|
|
93
|
+
the stylable dropdown panel). If your request needs a `wc-only` feature, the AI
|
|
94
|
+
will tell you and recommend using the actual web component instead.
|
|
95
|
+
|
|
96
|
+
Always skim the **Fidelity Report** — it's how you learn whether the plain-HTML
|
|
97
|
+
version is good enough or whether you should escalate back to `<auro-*>`.
|
|
98
|
+
|
|
99
|
+
## Versioning
|
|
100
|
+
|
|
101
|
+
Pin to a release for reproducible output instead of tracking `latest`:
|
|
102
|
+
|
|
103
|
+
- MCP: set `AURO_FORMKIT_VERSION` (e.g. `0.3`) in the server env.
|
|
104
|
+
- URL: replace `@latest` with `@0.3` in the `llms.txt` URL.
|
|
105
|
+
|
|
106
|
+
This is the same discipline as pinning the npm component dependency — upgrade
|
|
107
|
+
deliberately.
|
|
108
|
+
|
|
109
|
+
## Limits
|
|
110
|
+
|
|
111
|
+
- Specs cover the 10 components listed above. Components without a `css-only`
|
|
112
|
+
recipe (e.g. `bibtemplate`, `helptext`, `layoutElement`) are not included.
|
|
113
|
+
- These specs produce a visual + structural approximation. Complex behavior marked
|
|
114
|
+
`wc-only` is intentionally out of scope — that's what the web components are for.
|
|
115
|
+
- A reimplementation is bound to the design tokens available at author time; it
|
|
116
|
+
does not pick up runtime theme swaps the way the components do.
|
|
117
|
+
|
|
118
|
+
## For maintainers
|
|
119
|
+
|
|
120
|
+
Specs are **generated** — never edit `specs/*.yaml` or `llms.txt` by hand.
|
|
121
|
+
|
|
122
|
+
**Sources (per component):**
|
|
123
|
+
1. `custom-elements.json` → API (attributes, slots, events, methods).
|
|
124
|
+
2. `components/<c>/demo/css-only.md` → token import, CSS recipe, golden examples, fidelity gaps.
|
|
125
|
+
3. `ai/_authored/<tag>.overlay.yaml` → the judgment calls (tiers, native equivalents, behavioral rules, verify).
|
|
126
|
+
|
|
127
|
+
**Regenerate:**
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
npm run build:ai # analyze + generate
|
|
131
|
+
# or, if custom-elements.json is already current:
|
|
132
|
+
npm run build:ai:generate
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Generation also runs inside `npm run build`, and `ai/**` ships via the package
|
|
136
|
+
`files` array — so a normal release republishes the specs and the CDN serves them
|
|
137
|
+
within minutes.
|
|
138
|
+
|
|
139
|
+
**To improve a component's spec**, edit its overlay in `_authored/` (add native
|
|
140
|
+
mappings, reclassify a tier, add an a11y rule) and regenerate. `_defaults.overlay.yaml`
|
|
141
|
+
holds the rules applied to every component. The generator (`packages/build-tools/src/aiSpecGenerator.mjs`)
|
|
142
|
+
logs a tier breakdown and warns when a component parses zero examples or gaps.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Auro accessibility baseline
|
|
2
|
+
|
|
3
|
+
Rules that apply to **every** Auro FormKit component reimplemented in plain
|
|
4
|
+
HTML/CSS/JS. A component spec's `behavior.a11y` section adds to these; it never
|
|
5
|
+
overrides them.
|
|
6
|
+
|
|
7
|
+
## Labels
|
|
8
|
+
- Every control has a programmatically associated `<label>` (via `for`/`id` or by
|
|
9
|
+
wrapping the control). A `placeholder` is NOT a label.
|
|
10
|
+
- To hide a label visually, keep it in the DOM with a visually-hidden class — never
|
|
11
|
+
remove it.
|
|
12
|
+
- When a field is optional, indicate it in the accessible label (Auro appends
|
|
13
|
+
"(optional)" to non-`required` fields).
|
|
14
|
+
|
|
15
|
+
## Help text and errors
|
|
16
|
+
- Associate help text with the control via `aria-describedby`.
|
|
17
|
+
- Reflect validity with `aria-invalid="true|false"` on the control.
|
|
18
|
+
- Announce validation errors immediately with `role="alert"` and
|
|
19
|
+
`aria-live="assertive"`; do not require the user to move focus to hear them.
|
|
20
|
+
|
|
21
|
+
## Keyboard and focus
|
|
22
|
+
- Every interactive affordance (clear button, toggle, stepper) is a real,
|
|
23
|
+
focusable element in DOM order and operable with Enter/Space as appropriate.
|
|
24
|
+
- Use `:focus-visible` for the focus ring, styled with Auro border/active tokens.
|
|
25
|
+
|
|
26
|
+
## Motion
|
|
27
|
+
- Respect `prefers-reduced-motion` for any label animation or transition.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Default overlay applied to every component before its own overlay.
|
|
2
|
+
# These are the judgment calls the generator cannot derive from source.
|
|
3
|
+
# A per-component overlay (auro-<tag>.overlay.yaml) deep-merges on top of this.
|
|
4
|
+
|
|
5
|
+
# Tier inference (used when a per-component overlay does not set a tier):
|
|
6
|
+
# 1. attribute has a nativeEquiv below -> core
|
|
7
|
+
# 2. attribute name matches a wcOnlyHint -> wc-only
|
|
8
|
+
# 3. otherwise -> enhanced
|
|
9
|
+
tierPolicy:
|
|
10
|
+
# Standard HTML attributes that map 1:1 onto a native element. These are core.
|
|
11
|
+
nativeEquiv:
|
|
12
|
+
value: value
|
|
13
|
+
type: type
|
|
14
|
+
name: name
|
|
15
|
+
required: required
|
|
16
|
+
disabled: disabled
|
|
17
|
+
readonly: "readonly (+ aria-readonly=\"true\")"
|
|
18
|
+
placeholder: placeholder
|
|
19
|
+
pattern: pattern
|
|
20
|
+
min: min
|
|
21
|
+
max: max
|
|
22
|
+
step: step
|
|
23
|
+
minLength: minlength
|
|
24
|
+
maxLength: maxlength
|
|
25
|
+
inputmode: inputmode
|
|
26
|
+
autocomplete: autocomplete
|
|
27
|
+
autocapitalize: autocapitalize
|
|
28
|
+
autocorrect: autocorrect
|
|
29
|
+
spellcheck: spellcheck
|
|
30
|
+
id: id
|
|
31
|
+
lang: lang
|
|
32
|
+
checked: checked
|
|
33
|
+
multiple: multiple
|
|
34
|
+
hideLabelVisually: "visually-hidden <label> class"
|
|
35
|
+
# Auro-specific behavior with no native analogue. These are wc-only:
|
|
36
|
+
# do not fake them, report them in the fidelity gaps.
|
|
37
|
+
wcOnlyHints:
|
|
38
|
+
- format
|
|
39
|
+
- layout
|
|
40
|
+
- shape
|
|
41
|
+
- appearance
|
|
42
|
+
- simple
|
|
43
|
+
- onDark
|
|
44
|
+
- ondark
|
|
45
|
+
- nested
|
|
46
|
+
- icon
|
|
47
|
+
- displayValue
|
|
48
|
+
- dvInputOnly
|
|
49
|
+
- activeLabel
|
|
50
|
+
- showPassword
|
|
51
|
+
- validateOnInput
|
|
52
|
+
- noValidate
|
|
53
|
+
- validity
|
|
54
|
+
- error
|
|
55
|
+
- errorMessage
|
|
56
|
+
- setCustomValidity
|
|
57
|
+
|
|
58
|
+
# Accessibility rules that apply to every form field. Per-component overlays
|
|
59
|
+
# append component-specific rules.
|
|
60
|
+
behavior:
|
|
61
|
+
a11y:
|
|
62
|
+
- Every control MUST have a programmatically associated <label> (for/id or wrapping).
|
|
63
|
+
- Link help text via aria-describedby so it is announced after the label.
|
|
64
|
+
- Reflect invalid state with aria-invalid="true|false" on the control.
|
|
65
|
+
- Render validation errors with role="alert" aria-live="assertive" so they announce immediately.
|
|
66
|
+
keyboard:
|
|
67
|
+
- All interactive affordances are real, focusable elements in DOM order.
|
|
68
|
+
|
|
69
|
+
# Machine-checkable assertions the AI output must pass. Per-component overlays add more.
|
|
70
|
+
verify:
|
|
71
|
+
- "every color, size, spacing, radius, and font value uses var(--ds-*)"
|
|
72
|
+
- "each control has an associated <label>"
|
|
73
|
+
- "controls with aria-invalid=\"true\" have a role=\"alert\" message referenced by aria-describedby"
|
|
74
|
+
- "axe: label, aria-valid-attr-value, color-contrast pass"
|
|
75
|
+
|
|
76
|
+
# The single rule AI most often violates.
|
|
77
|
+
visual:
|
|
78
|
+
rule: >
|
|
79
|
+
NEVER hardcode a hex, px, rem, or font-family value. Every visual value MUST
|
|
80
|
+
be an Auro --ds-* token via var(--ds-token, fallback). Literal values are
|
|
81
|
+
allowed only as the second argument (fallback) of var().
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Checkbox for selecting one or more options; also composes into a checkbox-group
|
|
3
|
+
for grouped selection. Native equivalent is <input type="checkbox"> + <label>.
|
|
4
|
+
|
|
5
|
+
tiers:
|
|
6
|
+
tabindex: core
|
|
7
|
+
role: enhanced
|
|
8
|
+
aria-checked: enhanced
|
|
9
|
+
aria-disabled: enhanced
|
|
10
|
+
|
|
11
|
+
nativeEquiv:
|
|
12
|
+
tabindex: tabindex
|
|
13
|
+
|
|
14
|
+
behavior:
|
|
15
|
+
a11y:
|
|
16
|
+
- Use a native <input type="checkbox"> with an associated <label>.
|
|
17
|
+
- Group related checkboxes in a <fieldset> with a <legend> as the group label.
|
|
18
|
+
- Reflect checked state natively; do not add aria-checked to a native checkbox.
|
|
19
|
+
keyboard:
|
|
20
|
+
- Space toggles the focused checkbox (native).
|
|
21
|
+
validation:
|
|
22
|
+
- Group-level "select at least one" is not native — script it and expose the error with role="alert".
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Combobox — a text input that filters a listbox of options. The web platform has
|
|
3
|
+
no full equivalent; the closest is <input list> + <datalist>, which cannot style
|
|
4
|
+
the option panel or render rich option content.
|
|
5
|
+
|
|
6
|
+
tiers:
|
|
7
|
+
value: core
|
|
8
|
+
placeholder: core
|
|
9
|
+
required: core
|
|
10
|
+
disabled: core
|
|
11
|
+
inputmode: core
|
|
12
|
+
autocomplete: core
|
|
13
|
+
availableOptions: wc-only
|
|
14
|
+
behavior: wc-only
|
|
15
|
+
checkmark: wc-only
|
|
16
|
+
matchWidth: wc-only
|
|
17
|
+
noFilter: wc-only
|
|
18
|
+
noFlip: wc-only
|
|
19
|
+
offset: wc-only
|
|
20
|
+
optionSelected: wc-only
|
|
21
|
+
persistInput: wc-only
|
|
22
|
+
placement: wc-only
|
|
23
|
+
shift: wc-only
|
|
24
|
+
triggerIcon: wc-only
|
|
25
|
+
typedValue: wc-only
|
|
26
|
+
autoPlacement: wc-only
|
|
27
|
+
fullscreenBreakpoint: wc-only
|
|
28
|
+
largeFullscreenHeadline: wc-only
|
|
29
|
+
|
|
30
|
+
behavior:
|
|
31
|
+
a11y:
|
|
32
|
+
- The input has role="combobox", aria-expanded, aria-controls pointing to the listbox id, and aria-activedescendant pointing to the highlighted option.
|
|
33
|
+
- The listbox uses role="listbox" with role="option" children and aria-selected on the chosen option.
|
|
34
|
+
keyboard:
|
|
35
|
+
- Down opens/enters the list; Up/Down move the active option; Enter selects; Esc closes.
|
|
36
|
+
validation:
|
|
37
|
+
- Enforce "must select a listed option" in script; native <datalist> does not restrict input to its options.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Numeric stepper with increment/decrement buttons; composes into a counter-group.
|
|
3
|
+
Native closest is <input type="number"> or a role="spinbutton" with real +/- buttons.
|
|
4
|
+
|
|
5
|
+
tiers:
|
|
6
|
+
disableMax: enhanced
|
|
7
|
+
disableMin: enhanced
|
|
8
|
+
defaultSlot: wc-only
|
|
9
|
+
|
|
10
|
+
nativeEquiv:
|
|
11
|
+
value: value
|
|
12
|
+
min: min
|
|
13
|
+
max: max
|
|
14
|
+
disabled: disabled
|
|
15
|
+
|
|
16
|
+
behavior:
|
|
17
|
+
a11y:
|
|
18
|
+
- Use <input type="number"> with an associated <label>, or role="spinbutton" with aria-valuenow/valuemin/valuemax.
|
|
19
|
+
- The minus/plus controls are real <button>s with accessible names (see the ariaLabel.minus / ariaLabel.plus slots).
|
|
20
|
+
keyboard:
|
|
21
|
+
- Arrow Up/Down increment and decrement the value (native on number input).
|
|
22
|
+
validation:
|
|
23
|
+
- Clamp to min/max and disable the relevant button at the bounds; expose range errors with role="alert".
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Date / date-range picker — a text input plus a calendar popup. Native closest is
|
|
3
|
+
<input type="date"> (single date only; no range or blackout dates, and the
|
|
4
|
+
browser's picker cannot be styled with Auro tokens).
|
|
5
|
+
|
|
6
|
+
tiers:
|
|
7
|
+
autoPlacement: wc-only
|
|
8
|
+
blackoutDates: wc-only
|
|
9
|
+
blackoutLabel: wc-only
|
|
10
|
+
calendarEndDate: wc-only
|
|
11
|
+
calendarStartDate: wc-only
|
|
12
|
+
calendarFocusDate: wc-only
|
|
13
|
+
calendarGridLabel: wc-only
|
|
14
|
+
centralDate: wc-only
|
|
15
|
+
monthFirst: wc-only
|
|
16
|
+
monthNames: wc-only
|
|
17
|
+
navLabelNextMonth: wc-only
|
|
18
|
+
navLabelPrevMonth: wc-only
|
|
19
|
+
noFlip: wc-only
|
|
20
|
+
offset: wc-only
|
|
21
|
+
placement: wc-only
|
|
22
|
+
range: wc-only
|
|
23
|
+
referenceDates: wc-only
|
|
24
|
+
shift: wc-only
|
|
25
|
+
stacked: wc-only
|
|
26
|
+
valueEnd: wc-only
|
|
27
|
+
fullscreenBreakpoint: wc-only
|
|
28
|
+
largeFullscreenHeadline: wc-only
|
|
29
|
+
|
|
30
|
+
nativeEquiv:
|
|
31
|
+
value: value (on a native <input type="date">)
|
|
32
|
+
minDate: min
|
|
33
|
+
maxDate: max
|
|
34
|
+
required: required
|
|
35
|
+
disabled: disabled
|
|
36
|
+
|
|
37
|
+
behavior:
|
|
38
|
+
a11y:
|
|
39
|
+
- Label the date input; the calendar popup is a dialog containing a grid (role="grid") of day cells.
|
|
40
|
+
- Provide accessible names for the previous/next month navigation and announce the selected date(s).
|
|
41
|
+
keyboard:
|
|
42
|
+
- Arrow keys move between days, PageUp/PageDown change month, Enter selects, Esc closes.
|
|
43
|
+
validation:
|
|
44
|
+
- Range selection, blackout dates, and min/max beyond a single value are scripted; native <input type="date"> only supports min/max on one date.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Generic disclosure — a trigger that toggles a bib/panel of content. Native
|
|
3
|
+
closest is <details>/<summary> or a <button> with aria-expanded controlling a region.
|
|
4
|
+
|
|
5
|
+
tiers:
|
|
6
|
+
open: enhanced
|
|
7
|
+
chevron: enhanced
|
|
8
|
+
autoPlacement: wc-only
|
|
9
|
+
desktopModal: wc-only
|
|
10
|
+
disableEventShow: wc-only
|
|
11
|
+
disableKeyboardHandling: wc-only
|
|
12
|
+
dropdownWidth: wc-only
|
|
13
|
+
focusShow: wc-only
|
|
14
|
+
isBibFullscreen: wc-only
|
|
15
|
+
hoverToggle: wc-only
|
|
16
|
+
hasTriggerContent: wc-only
|
|
17
|
+
fullscreenBreakpoint: wc-only
|
|
18
|
+
matchWidth: wc-only
|
|
19
|
+
noFlip: wc-only
|
|
20
|
+
shift: wc-only
|
|
21
|
+
noHideOnThisFocusLoss: wc-only
|
|
22
|
+
noToggle: wc-only
|
|
23
|
+
offset: wc-only
|
|
24
|
+
parentBorder: wc-only
|
|
25
|
+
placement: wc-only
|
|
26
|
+
|
|
27
|
+
nativeEquiv:
|
|
28
|
+
disabled: disabled
|
|
29
|
+
|
|
30
|
+
behavior:
|
|
31
|
+
a11y:
|
|
32
|
+
- The trigger is a <button> with aria-expanded and aria-controls pointing to the panel id.
|
|
33
|
+
- The panel is a region whose visibility follows aria-expanded.
|
|
34
|
+
keyboard:
|
|
35
|
+
- Enter/Space toggles the panel; Esc closes it and returns focus to the trigger.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Form coordinator that validates and manages child fields. Native equivalent is
|
|
3
|
+
the <form> element with native submit/reset and constraint validation.
|
|
4
|
+
|
|
5
|
+
behavior:
|
|
6
|
+
a11y:
|
|
7
|
+
- Use a native <form>; group related fields in <fieldset>/<legend>; the submit control is a real <button type="submit">.
|
|
8
|
+
keyboard:
|
|
9
|
+
- Enter in a text field submits the form (native).
|
|
10
|
+
validation:
|
|
11
|
+
- Use native constraint validation (required, pattern, min/max) surfaced on submit.
|
|
12
|
+
- auro-form's cross-field coordination and aggregated validity are wc-only — validate each field and aggregate in script.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Reference overlay for auro-input. Shows every authored field the generator merges.
|
|
2
|
+
# Other components can start with just `summaryOverride` and grow from here.
|
|
3
|
+
|
|
4
|
+
summaryOverride: >
|
|
5
|
+
Single-line text input (types text, email, password, number) with built-in
|
|
6
|
+
validation, required/error states, and a bordered theme.
|
|
7
|
+
|
|
8
|
+
# Reclassify specific attributes. Anything not listed falls back to the
|
|
9
|
+
# _defaults tierPolicy (nativeEquiv -> core, wcOnlyHints -> wc-only, else enhanced).
|
|
10
|
+
tiers:
|
|
11
|
+
type: core # constrain to the natively supported subset via `enum` below
|
|
12
|
+
hideLabelVisually: core
|
|
13
|
+
|
|
14
|
+
# Constrain enum-like attributes to the values reproducible in plain HTML.
|
|
15
|
+
enums:
|
|
16
|
+
type: [text, email, password, number]
|
|
17
|
+
|
|
18
|
+
# Override or add native mappings beyond the defaults.
|
|
19
|
+
nativeEquiv:
|
|
20
|
+
hideLabelVisually: "add a visually-hidden class to the <label> (keep it in the DOM)"
|
|
21
|
+
|
|
22
|
+
# Component-specific behavior appended to the _defaults behavior lists.
|
|
23
|
+
behavior:
|
|
24
|
+
validation:
|
|
25
|
+
- Track a "touched" state; do NOT show errors before the field is first blurred.
|
|
26
|
+
- On invalid, swap the helpText content for the error message and set aria-invalid="true".
|
|
27
|
+
a11y:
|
|
28
|
+
- When the field is not `required`, append "(optional)" to the accessible label.
|
|
29
|
+
- For password fields, the show/hide toggle needs its own accessible name (aria-label).
|
|
30
|
+
|
|
31
|
+
# Extra assertions on top of the _defaults verify list.
|
|
32
|
+
verify:
|
|
33
|
+
- "type is one of text|email|password|number (other Auro types are wc-only)"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Selectable option list; native closest is a <ul role="listbox"> with role="option"
|
|
3
|
+
items, or the <option>s inside a native <select>.
|
|
4
|
+
|
|
5
|
+
tiers:
|
|
6
|
+
value: core
|
|
7
|
+
disabled: core
|
|
8
|
+
loading: wc-only
|
|
9
|
+
matchword: wc-only
|
|
10
|
+
nocheckmark: wc-only
|
|
11
|
+
|
|
12
|
+
nativeEquiv:
|
|
13
|
+
value: value
|
|
14
|
+
disabled: disabled
|
|
15
|
+
multiselect: aria-multiselectable="true" on the listbox (or the native `multiple` attribute)
|
|
16
|
+
|
|
17
|
+
behavior:
|
|
18
|
+
a11y:
|
|
19
|
+
- Use role="listbox" with role="option" children; set aria-selected on chosen options and aria-activedescendant for the highlighted one.
|
|
20
|
+
keyboard:
|
|
21
|
+
- Up/Down move the active option, Enter/Space selects, type-ahead jumps to matching options, Home/End jump to the ends.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Radio button for selecting exactly one option from a set; composes into a
|
|
3
|
+
radio-group. Native equivalent is a set of <input type="radio"> sharing a name.
|
|
4
|
+
|
|
5
|
+
tiers:
|
|
6
|
+
role: enhanced
|
|
7
|
+
label: enhanced
|
|
8
|
+
|
|
9
|
+
nativeEquiv:
|
|
10
|
+
label: associate a <label> via for/id (label is not a native attribute)
|
|
11
|
+
|
|
12
|
+
behavior:
|
|
13
|
+
a11y:
|
|
14
|
+
- Use native <input type="radio"> elements that share the same `name` to form one group.
|
|
15
|
+
- Wrap the group in a <fieldset> with a <legend> as the group label.
|
|
16
|
+
keyboard:
|
|
17
|
+
- Arrow keys move selection within the group; only the checked radio is in the tab order (native roving).
|
|
18
|
+
validation:
|
|
19
|
+
- Mark one radio in the group `required` to require a selection (native).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
summaryOverride: >
|
|
2
|
+
Select control (wraps auro-dropdown + auro-menu). Native equivalent is a
|
|
3
|
+
<select> with <option>/<optgroup>; the option panel cannot be styled natively.
|
|
4
|
+
|
|
5
|
+
tiers:
|
|
6
|
+
multiselect: core
|
|
7
|
+
autoPlacement: wc-only
|
|
8
|
+
flexMenuWidth: wc-only
|
|
9
|
+
fluid: wc-only
|
|
10
|
+
forceDisplayValue: wc-only
|
|
11
|
+
fullscreenBreakpoint: wc-only
|
|
12
|
+
isPopoverVisible: wc-only
|
|
13
|
+
largeFullscreenHeadline: wc-only
|
|
14
|
+
matchWidth: wc-only
|
|
15
|
+
noCheckmark: wc-only
|
|
16
|
+
noFlip: wc-only
|
|
17
|
+
offset: wc-only
|
|
18
|
+
optionSelected: wc-only
|
|
19
|
+
placement: wc-only
|
|
20
|
+
shift: wc-only
|
|
21
|
+
typeaheadTimeoutMs: wc-only
|
|
22
|
+
|
|
23
|
+
nativeEquiv:
|
|
24
|
+
multiselect: multiple
|
|
25
|
+
name: name
|
|
26
|
+
value: value
|
|
27
|
+
required: required
|
|
28
|
+
disabled: disabled
|
|
29
|
+
|
|
30
|
+
behavior:
|
|
31
|
+
a11y:
|
|
32
|
+
- Use a native <select> with an associated <label>; group options with <optgroup label="...">.
|
|
33
|
+
- Multi-select uses the native `multiple` attribute.
|
|
34
|
+
keyboard:
|
|
35
|
+
- Type-ahead, Up/Down, and Home/End are provided natively by <select>.
|
|
36
|
+
validation:
|
|
37
|
+
- Set `required` on <select> with an empty-value first <option> to enforce a selection natively.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Role
|
|
2
|
+
You implement Alaska Airlines Auro components as plain HTML/CSS/JS for a team
|
|
3
|
+
that cannot use the Auro web components directly. You are given a COMPONENT SPEC
|
|
4
|
+
(YAML) that is the authoritative contract. Follow it exactly; do not rely on
|
|
5
|
+
prior knowledge of how the component "usually" works.
|
|
6
|
+
|
|
7
|
+
# Hard rules (violating any is a failed response)
|
|
8
|
+
1. TOKENS ONLY. Every color, size, spacing, radius, and font value must be an
|
|
9
|
+
Auro `--ds-*` token via `var(--ds-token, fallback)`. Never emit a bare hex,
|
|
10
|
+
px, rem, or font-family. Import the token file named in `visual.tokensImport`.
|
|
11
|
+
2. ACCESSIBILITY IS NOT OPTIONAL. Implement every item in `behavior.a11y` and
|
|
12
|
+
`behavior.keyboard`.
|
|
13
|
+
3. RESPECT TIERS.
|
|
14
|
+
- `core` -> implement fully.
|
|
15
|
+
- `enhanced` -> implement only if the request needs it; otherwise omit cleanly.
|
|
16
|
+
- `wc-only` -> DO NOT implement or fake. List it in the Fidelity Report.
|
|
17
|
+
4. USE THE GOLDEN EXAMPLES (`examples`) as the structural pattern: element order,
|
|
18
|
+
class names, and ARIA attributes should match.
|
|
19
|
+
5. NO INVENTED BEHAVIOR. If the spec does not define something, say so.
|
|
20
|
+
|
|
21
|
+
# Output format (always, in this order)
|
|
22
|
+
1. HTML — semantic markup matching the golden examples.
|
|
23
|
+
2. CSS — token-based, derived from `visual.css`, including the required states.
|
|
24
|
+
3. JS — only if the request needs interactivity the spec defines. Framework-agnostic
|
|
25
|
+
unless told otherwise.
|
|
26
|
+
4. Fidelity Report — every relevant `gaps` / `wc-only` item, what is lost, and the
|
|
27
|
+
guidance. If the request asks for a wc-only feature, recommend the real web
|
|
28
|
+
component instead of faking it.
|
|
29
|
+
5. Self-check — confirm each `verify` assertion passes, or flag which failed.
|
|
30
|
+
|
|
31
|
+
# Framework target
|
|
32
|
+
Generate for: {{framework — e.g. "vanilla HTML", "React", "Svelte"}}. Preserve all
|
|
33
|
+
ARIA attributes and token usage regardless of framework.
|
package/ai/llms.txt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Auro FormKit — AI Implementation Standard
|
|
2
|
+
|
|
3
|
+
> Reimplement Auro form components in plain HTML/CSS/JS using Auro design
|
|
4
|
+
> tokens, for teams that cannot consume the web components. Specs are generated
|
|
5
|
+
> from source on every release, so they never drift from the real component.
|
|
6
|
+
|
|
7
|
+
## Non-negotiable rules
|
|
8
|
+
- Style ONLY with Auro `--ds-*` tokens via `var(--ds-x, fallback)`; never bare hex/px.
|
|
9
|
+
- Every control needs an associated `<label>` and full ARIA wiring.
|
|
10
|
+
- `tier: wc-only` features are NOT reproducible in plain HTML — report, never fake.
|
|
11
|
+
|
|
12
|
+
## Component specs
|
|
13
|
+
- [auro-checkbox](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-checkbox.spec.yaml): Checkbox for selecting one or more options; also composes into a checkbox-group for grouped selection. Native equivalent is <input type="checkbox"> + <label>.
|
|
14
|
+
- [auro-combobox](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-combobox.spec.yaml): Combobox — a text input that filters a listbox of options. The web platform has no full equivalent; the closest is <input list> + <datalist>, which cannot style the option panel or render rich option content.
|
|
15
|
+
- [auro-counter](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-counter.spec.yaml): Numeric stepper with increment/decrement buttons; composes into a counter-group. Native closest is <input type="number"> or a role="spinbutton" with real +/- buttons.
|
|
16
|
+
- [auro-datepicker](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-datepicker.spec.yaml): Date / date-range picker — a text input plus a calendar popup. Native closest is <input type="date"> (single date only; no range or blackout dates, and the browser's picker cannot be styled with Auro tokens).
|
|
17
|
+
- [auro-dropdown](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-dropdown.spec.yaml): Generic disclosure — a trigger that toggles a bib/panel of content. Native closest is <details>/<summary> or a <button> with aria-expanded controlling a region.
|
|
18
|
+
- [auro-form](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-form.spec.yaml): Form coordinator that validates and manages child fields. Native equivalent is the <form> element with native submit/reset and constraint validation.
|
|
19
|
+
- [auro-input](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-input.spec.yaml): Single-line text input (types text, email, password, number) with built-in validation, required/error states, and a bordered theme.
|
|
20
|
+
- [auro-menu](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-menu.spec.yaml): Selectable option list; native closest is a <ul role="listbox"> with role="option" items, or the <option>s inside a native <select>.
|
|
21
|
+
- [auro-radio](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-radio.spec.yaml): Radio button for selecting exactly one option from a set; composes into a radio-group. Native equivalent is a set of <input type="radio"> sharing a name.
|
|
22
|
+
- [auro-select](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/specs/auro-select.spec.yaml): Select control (wraps auro-dropdown + auro-menu). Native equivalent is a <select> with <option>/<optgroup>; the option panel cannot be styled natively.
|
|
23
|
+
|
|
24
|
+
## Global contracts
|
|
25
|
+
- [Prompt template](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/_prompt-template.md)
|
|
26
|
+
- [Accessibility baseline](https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/ai/_a11y-baseline.md)
|