@echelon-foundry/design-system 0.7.0 → 0.8.0-main.250.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.
@@ -1,4 +1,4 @@
1
- 171d3cb1485da7a9f83f6bdfc80c8043b0d194a32eadc3e0b5e09b12fade2f80 forma-marketing.css
2
- 027334d7946a3342812dca297967630cb5f5b1e96dd849672c8e146bf257b153 forma-marketing-theme-echelon.css
3
- 2baacb6423cc930e15b1da5cbf39289bed5bd3c721e35ef2e97cb73f48c0c0fc forma-echelon-marketing.css
4
- 5aae64c6fa2e8784347b2207fe7324dae2492a5f45f6b134463e243f419b4dec forma-all.css
1
+ 3089398445d5898cdae9cc0dc2ec4629e8130a1a885291d9ae1bfdf9141dab48 forma-marketing.css
2
+ 970b7986b609331c1bc12d51173c8e185f48906df5d8b2fcc585c3187be3e9fd forma-marketing-theme-echelon.css
3
+ ee17288af3ae5ba708b8fd1b471835a14ea93da588a39206dcc27db2ee2f98ba forma-echelon-marketing.css
4
+ 93cafe35f219e7297b8ad5cd8b3a22ad660e753a2ce247c0709eb75281701cad forma-all.css
@@ -0,0 +1,19 @@
1
+ <form class="ef-form" id="nasa-mission-customer" method="get" action="#nasa-mission-customer-saved" aria-labelledby="nasa-mission-customer-title">
2
+ <h2 id="nasa-mission-customer-title">Artemis mission customer contact</h2>
3
+ <div class="ef-form-row" data-ef-form-layout="grid">
4
+ <div class="ef-field">
5
+ <label class="ef-field__label" for="nasa-mission-contact-name">Mission contact name (required)</label>
6
+ <span class="ef-field__description" id="nasa-mission-contact-name-description">Primary contact for Artemis II payload coordination.</span>
7
+ <input type="text" id="nasa-mission-contact-name" name="contact-name" required autocomplete="name" value="Reid Wiseman" aria-describedby="nasa-mission-contact-name-description nasa-mission-contact-name-error">
8
+ <p class="ef-validation-message ef-validation-message--when-invalid" id="nasa-mission-contact-name-error"><span class="ef-validation-message__mark" aria-hidden="true">!</span>Enter the mission contact name.</p>
9
+ </div>
10
+ <div class="ef-field">
11
+ <label class="ef-field__label" for="nasa-mission-contact-email">Mission contact email (required)</label>
12
+ <span class="ef-field__description" id="nasa-mission-contact-email-description">Use the monitored address for launch-window updates.</span>
13
+ <input type="email" id="nasa-mission-contact-email" name="contact-email" required autocomplete="email" inputmode="email" value="artemis-ii@nasa.gov" aria-describedby="nasa-mission-contact-email-description nasa-mission-contact-email-error">
14
+ <p class="ef-validation-message ef-validation-message--when-invalid" id="nasa-mission-contact-email-error"><span class="ef-validation-message__mark" aria-hidden="true">!</span>Enter an email address such as name@nasa.gov.</p>
15
+ </div>
16
+ </div>
17
+ <div class="ef-actions"><button type="submit">Save customer</button><button type="reset">Reset form</button></div>
18
+ <p class="ef-form__outcome" id="nasa-mission-customer-saved" role="status" aria-label="Save status">Mission customer contact saved.</p>
19
+ </form>
@@ -0,0 +1,48 @@
1
+ # Forma design contract 1.0
2
+
3
+ Forma's design contract is an optional build-time guardrail for producing the same semantic HTML documented in the component catalog. It does not add a browser runtime and it does not replace ordinary HTML/CSS authoring.
4
+
5
+ ## Validate and render
6
+
7
+ ```sh
8
+ npm run design:validate
9
+ node tools/design-contract/cli.mjs validate examples/design/valid/customer-form.forma-design.json
10
+ node tools/design-contract/cli.mjs render examples/design/valid/customer-form.forma-design.json
11
+ ```
12
+
13
+ `validate` exits nonzero and prints stable diagnostic codes and JSON paths when a document is invalid. `render` validates first and emits no HTML on failure. The published JSON Schema supplies structural validation; the CLI adds contextual rules such as parent-child legality, ID references, standard-mode alignment, action binding, and feedback targets.
14
+
15
+ ## Modes
16
+
17
+ - `standard`: documented semantics only. Grid fields align, overflow wraps, actions bind to native submit/reset, and raw overrides are refused.
18
+ - `extended`: the same invariants plus namespaced extension data such as `acme:chart`.
19
+ - `custom`: requires `customReason` and non-empty `validationEvidence`; it is auditable, not an accessibility bypass.
20
+
21
+ ## Supported form structure
22
+
23
+ ```text
24
+ form
25
+ ├── layout (stack | grid)
26
+ │ └── field (native control)
27
+ ├── actions
28
+ │ └── action (form.submit | form.reset)
29
+ └── feedback
30
+ ```
31
+
32
+ The reference customer form uses a responsive grid with two peer fields, native email validation, Save and Reset commands, and URL-targeted save feedback. At narrow container widths the grid becomes a stack without changing DOM, reading, focus, or submission order.
33
+
34
+ ## Unsupported examples
35
+
36
+ The fixtures under `examples/design/invalid/` are executable documentation:
37
+
38
+ - `misaligned-standard-fields`: turns off peer alignment in standard mode;
39
+ - `unsupported-standard-override`: injects raw presentation overrides;
40
+ - `missing-action-binding`: supplies an action with no supported command;
41
+ - `invalid-parent-child`: places an action inside a field layout;
42
+ - `unsupported-version`: asks 1.0 tooling to guess a different contract.
43
+
44
+ Each fails before rendering and identifies the exact correction. Unsupported contract versions must be migrated explicitly. Hand-authored Forma patterns remain compatible and do not have to adopt the contract.
45
+
46
+ ## Application boundary
47
+
48
+ Forma can bind native submit and reset. Persistence, network requests, computed values, conditional application state, asynchronous feedback, authorization, and domain legality belong to Limen or the consuming application. Extended/custom contracts may preserve namespaced intent, but a renderer must report unavailable capabilities rather than emit a decorative no-op control.
@@ -0,0 +1,36 @@
1
+ {
2
+ "format": "forma.design",
3
+ "schemaVersion": "1.0.0",
4
+ "id": "invalid-parent-child",
5
+ "mode": "standard",
6
+ "compatibility": { "forma": ">=0.8.0 <1.0.0" },
7
+ "responsive": { "strategy": "container", "narrow": "stack", "minimumViewportCssPx": 320 },
8
+ "motion": { "profile": "none", "reducedMotion": "preserve-state" },
9
+ "root": {
10
+ "kind": "form",
11
+ "id": "parent-form",
12
+ "title": "Parent form",
13
+ "method": "get",
14
+ "action": "#saved",
15
+ "children": [
16
+ {
17
+ "kind": "layout",
18
+ "id": "fields",
19
+ "model": "grid",
20
+ "alignControls": true,
21
+ "overflow": "wrap",
22
+ "children": [
23
+ { "kind": "action", "id": "save-in-fields", "label": "Save", "type": "submit", "binding": "form.submit" }
24
+ ]
25
+ },
26
+ {
27
+ "kind": "actions",
28
+ "id": "actions",
29
+ "children": [
30
+ { "kind": "action", "id": "save", "label": "Save", "type": "submit", "binding": "form.submit" }
31
+ ]
32
+ },
33
+ { "kind": "feedback", "id": "saved", "label": "Save status", "message": "Saved." }
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "format": "forma.design",
3
+ "schemaVersion": "1.0.0",
4
+ "id": "misaligned-fields",
5
+ "mode": "standard",
6
+ "compatibility": { "forma": ">=0.8.0 <1.0.0" },
7
+ "responsive": { "strategy": "container", "narrow": "stack", "minimumViewportCssPx": 320 },
8
+ "motion": { "profile": "none", "reducedMotion": "preserve-state" },
9
+ "root": {
10
+ "kind": "form",
11
+ "id": "bad-form",
12
+ "title": "Bad form",
13
+ "method": "get",
14
+ "action": "#saved",
15
+ "children": [
16
+ {
17
+ "kind": "layout",
18
+ "id": "fields",
19
+ "model": "grid",
20
+ "alignControls": false,
21
+ "overflow": "wrap",
22
+ "children": [
23
+ { "kind": "field", "id": "name", "name": "name", "label": "Name", "control": { "kind": "text" } }
24
+ ]
25
+ },
26
+ {
27
+ "kind": "actions",
28
+ "id": "actions",
29
+ "children": [
30
+ { "kind": "action", "id": "save", "label": "Save", "type": "submit", "binding": "form.submit" }
31
+ ]
32
+ },
33
+ { "kind": "feedback", "id": "saved", "label": "Save status", "message": "Saved." }
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "format": "forma.design",
3
+ "schemaVersion": "1.0.0",
4
+ "id": "missing-action-binding",
5
+ "mode": "standard",
6
+ "compatibility": { "forma": ">=0.8.0 <1.0.0" },
7
+ "responsive": { "strategy": "container", "narrow": "stack", "minimumViewportCssPx": 320 },
8
+ "motion": { "profile": "none", "reducedMotion": "preserve-state" },
9
+ "root": {
10
+ "kind": "form",
11
+ "id": "binding-form",
12
+ "title": "Binding form",
13
+ "method": "get",
14
+ "action": "#saved",
15
+ "children": [
16
+ {
17
+ "kind": "layout",
18
+ "id": "fields",
19
+ "model": "stack",
20
+ "overflow": "wrap",
21
+ "children": [
22
+ { "kind": "field", "id": "name", "name": "name", "label": "Name", "control": { "kind": "text" } }
23
+ ]
24
+ },
25
+ {
26
+ "kind": "actions",
27
+ "id": "actions",
28
+ "children": [
29
+ { "kind": "action", "id": "save", "label": "Save", "type": "submit" }
30
+ ]
31
+ },
32
+ { "kind": "feedback", "id": "saved", "label": "Save status", "message": "Saved." }
33
+ ]
34
+ }
35
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "format": "forma.design",
3
+ "schemaVersion": "1.0.0",
4
+ "id": "raw-override",
5
+ "mode": "standard",
6
+ "compatibility": { "forma": ">=0.8.0 <1.0.0" },
7
+ "responsive": { "strategy": "container", "narrow": "stack", "minimumViewportCssPx": 320 },
8
+ "motion": { "profile": "none", "reducedMotion": "preserve-state" },
9
+ "root": {
10
+ "kind": "form",
11
+ "id": "override-form",
12
+ "title": "Override form",
13
+ "method": "get",
14
+ "action": "#saved",
15
+ "children": [
16
+ {
17
+ "kind": "layout",
18
+ "id": "fields",
19
+ "model": "stack",
20
+ "overflow": "wrap",
21
+ "overrides": { "margin-left": "37px" },
22
+ "children": [
23
+ { "kind": "field", "id": "name", "name": "name", "label": "Name", "control": { "kind": "text" } }
24
+ ]
25
+ },
26
+ {
27
+ "kind": "actions",
28
+ "id": "actions",
29
+ "children": [
30
+ { "kind": "action", "id": "save", "label": "Save", "type": "submit", "binding": "form.submit" }
31
+ ]
32
+ },
33
+ { "kind": "feedback", "id": "saved", "label": "Save status", "message": "Saved." }
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "format": "forma.design",
3
+ "schemaVersion": "2.0.0",
4
+ "id": "future-form",
5
+ "mode": "standard",
6
+ "compatibility": { "forma": ">=1.0.0 <2.0.0" },
7
+ "responsive": { "strategy": "container", "narrow": "stack", "minimumViewportCssPx": 320 },
8
+ "motion": { "profile": "none", "reducedMotion": "preserve-state" },
9
+ "root": {
10
+ "kind": "form",
11
+ "id": "future",
12
+ "title": "Future form",
13
+ "method": "get",
14
+ "action": "#saved",
15
+ "children": [
16
+ {
17
+ "kind": "layout",
18
+ "id": "fields",
19
+ "model": "stack",
20
+ "overflow": "wrap",
21
+ "children": [
22
+ { "kind": "field", "id": "name", "name": "name", "label": "Name", "control": { "kind": "text" } }
23
+ ]
24
+ },
25
+ {
26
+ "kind": "actions",
27
+ "id": "actions",
28
+ "children": [
29
+ { "kind": "action", "id": "save", "label": "Save", "type": "submit", "binding": "form.submit" }
30
+ ]
31
+ },
32
+ { "kind": "feedback", "id": "saved", "label": "Save status", "message": "Saved." }
33
+ ]
34
+ }
35
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "../../../schemas/design/1.0/forma-design.schema.json",
3
+ "format": "forma.design",
4
+ "schemaVersion": "1.0.0",
5
+ "id": "nasa-mission-customer-form",
6
+ "mode": "standard",
7
+ "compatibility": { "forma": ">=0.8.0 <1.0.0" },
8
+ "responsive": {
9
+ "strategy": "container",
10
+ "narrow": "stack",
11
+ "minimumViewportCssPx": 320
12
+ },
13
+ "motion": {
14
+ "profile": "none",
15
+ "reducedMotion": "preserve-state"
16
+ },
17
+ "root": {
18
+ "kind": "form",
19
+ "id": "nasa-mission-customer",
20
+ "title": "Artemis mission customer contact",
21
+ "method": "get",
22
+ "action": "#nasa-mission-customer-saved",
23
+ "children": [
24
+ {
25
+ "kind": "layout",
26
+ "id": "nasa-mission-customer-fields",
27
+ "model": "grid",
28
+ "alignControls": true,
29
+ "overflow": "wrap",
30
+ "density": "comfortable",
31
+ "children": [
32
+ {
33
+ "kind": "field",
34
+ "id": "nasa-mission-contact-name",
35
+ "name": "contact-name",
36
+ "label": "Mission contact name",
37
+ "description": "Primary contact for Artemis II payload coordination.",
38
+ "control": {
39
+ "kind": "text",
40
+ "value": "Reid Wiseman",
41
+ "required": true,
42
+ "autocomplete": "name"
43
+ },
44
+ "validation": {
45
+ "kind": "required",
46
+ "message": "Enter the mission contact name."
47
+ }
48
+ },
49
+ {
50
+ "kind": "field",
51
+ "id": "nasa-mission-contact-email",
52
+ "name": "contact-email",
53
+ "label": "Mission contact email",
54
+ "description": "Use the monitored address for launch-window updates.",
55
+ "control": {
56
+ "kind": "email",
57
+ "value": "artemis-ii@nasa.gov",
58
+ "required": true,
59
+ "autocomplete": "email",
60
+ "inputmode": "email"
61
+ },
62
+ "validation": {
63
+ "kind": "email",
64
+ "message": "Enter an email address such as name@nasa.gov."
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "kind": "actions",
71
+ "id": "nasa-mission-customer-actions",
72
+ "children": [
73
+ {
74
+ "kind": "action",
75
+ "id": "save-nasa-mission-customer",
76
+ "label": "Save customer",
77
+ "type": "submit",
78
+ "binding": "form.submit"
79
+ },
80
+ {
81
+ "kind": "action",
82
+ "id": "reset-nasa-mission-customer",
83
+ "label": "Reset form",
84
+ "type": "reset",
85
+ "binding": "form.reset"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "kind": "feedback",
91
+ "id": "nasa-mission-customer-saved",
92
+ "label": "Save status",
93
+ "message": "Mission customer contact saved."
94
+ }
95
+ ]
96
+ }
97
+ }
@@ -680,6 +680,16 @@
680
680
  "status": "requires-published-figma-component"
681
681
  }
682
682
  },
683
+ {
684
+ "id": "form",
685
+ "figmaName": "Forma / Form",
686
+ "source": "patterns/form.html",
687
+ "codeConnect": {
688
+ "id": "Forma/form",
689
+ "nodeUrl": null,
690
+ "status": "requires-published-figma-component"
691
+ }
692
+ },
683
693
  {
684
694
  "id": "grid",
685
695
  "figmaName": "Forma / Grid",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echelon-foundry/design-system",
3
- "version": "0.7.0",
3
+ "version": "0.8.0-main.250.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Zero-runtime HTML and CSS design system for Echelon Foundry applications.",
@@ -28,6 +28,9 @@
28
28
  "./workflow/forma-workflow.schema.json": "./schemas/workflow/1.0/forma-workflow.schema.json",
29
29
  "./contracts/workflow-capabilities.json": "./contracts/workflow-capabilities.json",
30
30
  "./workflow/examples/*": "./examples/workflows/forma/workflows/*",
31
+ "./design/forma-design.schema.json": "./schemas/design/1.0/forma-design.schema.json",
32
+ "./contracts/design-capabilities.json": "./contracts/design-capabilities.json",
33
+ "./design/examples/*": "./examples/design/*",
31
34
  "./contracts/machine-operability.json": "./contracts/machine-operability.json",
32
35
  "./icons/registry.schema.json": "./schemas/icon-registry.schema.json",
33
36
  "./icons/*": "./dist/icons/*"
@@ -46,6 +49,10 @@
46
49
  "examples/workflows/forma/workflows",
47
50
  "examples/workflows/fixtures.json",
48
51
  "docs/workflow",
52
+ "schemas/design/1.0/forma-design.schema.json",
53
+ "contracts/design-capabilities.json",
54
+ "examples/design",
55
+ "docs/DESIGN-CONTRACT.md",
49
56
  "contracts/machine-operability.json",
50
57
  "CHANGELOG.md",
51
58
  "schemas/icon-registry.schema.json",
@@ -60,9 +67,10 @@
60
67
  "test:browser": "playwright test",
61
68
  "test:a11y": "playwright test tests/browser/accessibility.spec.mjs",
62
69
  "test:runtime": "node --test tests/zero-runtime.test.mjs",
70
+ "test:design": "node --test tests/design-contract.test.mjs",
63
71
  "motion:audit": "node tools/motion-audit.mjs",
64
72
  "test:motion": "node --test tests/motion-audit.test.mjs tests/motion-gate.test.mjs && node tools/motion-audit.mjs --strict",
65
- "check": "npm run build && npm run icons:check && npm run test:tokens && npm run test:brands && npm run test:runtime && npm run test:motion && npm run test:marketing && npm run test:character-grid && npm run test:figma && npm run test:css && npm run test:package && npm run workflow:test && npm run workflow:build && npm run test:workflow-package && npm run test:browser",
73
+ "check": "npm run build && npm run icons:check && npm run test:tokens && npm run test:brands && npm run test:runtime && npm run test:design && npm run test:motion && npm run test:marketing && npm run test:character-grid && npm run test:figma && npm run test:css && npm run test:package && npm run workflow:test && npm run workflow:build && npm run test:workflow-package && npm run test:browser",
66
74
  "site:build": "npm run build && node tools/build-site.mjs",
67
75
  "site:test": "node --test tests/site-build.test.mjs tests/catalog-coverage.test.mjs tests/icon-docs.test.mjs tests/catalog-interaction.test.mjs",
68
76
  "site:check": "npm run site:build && npm run catalog:check && npm run site:test && npm run site:mobile",
@@ -79,13 +87,14 @@
79
87
  "test:marketing": "node --test tests/marketing-tokens.test.mjs tests/marketing-distribution.test.mjs tests/marketing-structure.test.mjs tests/site-css-policy.test.mjs",
80
88
  "example:install": "mkdir -p build/example && cp examples/echelon-marketing-site/forma.lock build/example/forma.lock && bash actions/install-presentation/install.sh --lock build/example/forma.lock --source dist/marketing --update --output examples/echelon-marketing-site/assets/forma",
81
89
  "policy:check": "dotnet run --project tools/SiteCssPolicy/SiteCssPolicy.fsproj --",
82
- "release:check": "npm run build && npm run icons:check && npm run test:tokens && npm run test:brands && npm run test:runtime && npm run test:motion && npm run test:marketing && npm run test:character-grid && npm run test:css && npm run test:package && npm run test:machine && playwright test tests/browser/marketing.spec.mjs && npm run site:check",
90
+ "release:check": "npm run build && npm run icons:check && npm run test:tokens && npm run test:brands && npm run test:runtime && npm run test:design && npm run test:motion && npm run test:marketing && npm run test:character-grid && npm run test:css && npm run test:package && npm run test:machine && playwright test tests/browser/marketing.spec.mjs && npm run site:check",
83
91
  "test:figma": "node --test tests/figma-contract.test.mjs",
84
92
  "catalog:check": "node tools/catalog/validate.mjs && node tools/catalog/inventory.mjs --check",
85
93
  "catalog:inventory": "node tools/catalog/inventory.mjs",
86
94
  "workflow:test": "dotnet run --project tests/workflow/Forma.Workflow.Tests -c Release",
87
95
  "workflow:build": "node tools/build-workflow-package.mjs",
88
96
  "workflow:validate": "dotnet run --project src/workflow/Forma.Workflow.Cli -c Release -- validate examples/workflows/forma/workflows/*.forma-workflow.json",
97
+ "design:validate": "node tools/design-contract/cli.mjs validate examples/design/valid/*.forma-design.json",
89
98
  "test:workflow-package": "node --test tests/workflow-package.test.mjs",
90
99
  "test:workflow-browser": "playwright test tests/browser/workflow-static.spec.mjs tests/browser/workflow-embed.spec.mjs",
91
100
  "workflow:check": "npm run workflow:test && npm run workflow:build && npm run test:workflow-package && npm run test:workflow-browser",
@@ -113,5 +122,6 @@
113
122
  "accessibility",
114
123
  "workflow",
115
124
  "machine-operability"
116
- ]
125
+ ],
126
+ "license": "PolyForm-Noncommercial-1.0.0"
117
127
  }
@@ -0,0 +1,19 @@
1
+ <form class="ef-form" id="nasa-mission-customer" method="get" action="#nasa-mission-customer-saved" aria-labelledby="nasa-mission-customer-title">
2
+ <h2 id="nasa-mission-customer-title">Artemis mission customer contact</h2>
3
+ <div class="ef-form-row" data-ef-form-layout="grid">
4
+ <div class="ef-field">
5
+ <label class="ef-field__label" for="nasa-mission-contact-name">Mission contact name (required)</label>
6
+ <span class="ef-field__description" id="nasa-mission-contact-name-description">Primary contact for Artemis II payload coordination.</span>
7
+ <input type="text" id="nasa-mission-contact-name" name="contact-name" required autocomplete="name" value="Reid Wiseman" aria-describedby="nasa-mission-contact-name-description nasa-mission-contact-name-error">
8
+ <p class="ef-validation-message ef-validation-message--when-invalid" id="nasa-mission-contact-name-error"><span class="ef-validation-message__mark" aria-hidden="true">!</span>Enter the mission contact name.</p>
9
+ </div>
10
+ <div class="ef-field">
11
+ <label class="ef-field__label" for="nasa-mission-contact-email">Mission contact email (required)</label>
12
+ <span class="ef-field__description" id="nasa-mission-contact-email-description">Use the monitored address for launch-window updates.</span>
13
+ <input type="email" id="nasa-mission-contact-email" name="contact-email" required autocomplete="email" inputmode="email" value="artemis-ii@nasa.gov" aria-describedby="nasa-mission-contact-email-description nasa-mission-contact-email-error">
14
+ <p class="ef-validation-message ef-validation-message--when-invalid" id="nasa-mission-contact-email-error"><span class="ef-validation-message__mark" aria-hidden="true">!</span>Enter an email address such as name@nasa.gov.</p>
15
+ </div>
16
+ </div>
17
+ <div class="ef-actions"><button type="submit">Save customer</button><button type="reset">Reset form</button></div>
18
+ <p class="ef-form__outcome" id="nasa-mission-customer-saved" role="status" aria-label="Save status">Mission customer contact saved.</p>
19
+ </form>