@3fn/core 14.0.0 → 14.1.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/.kiro/steering/Civitas-System-Overview.md +3 -12
- package/.kiro/steering/Spec-Feedback-Protocol.md +2 -11
- package/.kiro/steering/Task-Completion-Protocol.md +7 -7
- package/.kiro/steering/start-up-tasks.md +4 -4
- package/dist/ComponentTokens.android.kt +12 -12
- package/dist/ComponentTokens.ios.swift +12 -12
- package/dist/ComponentTokens.web.css +3 -3
- package/dist/DesignTokens.android.kt +1 -1
- package/dist/DesignTokens.dtcg.json +2 -2
- package/dist/DesignTokens.ios.swift +1 -1
- package/dist/DesignTokens.web.css +1 -1
- package/dist/android/DesignTokens.android.kt +1 -1
- package/dist/browser/designerpunk.esm.js +14 -9
- package/dist/browser/designerpunk.esm.min.js +7 -7
- package/dist/browser/designerpunk.umd.js +14 -9
- package/dist/browser/designerpunk.umd.min.js +12 -12
- package/dist/browser/tokens.css +3 -3
- package/dist/build/tokens/defineComponentTokens.d.ts +10 -0
- package/dist/build/tokens/defineComponentTokens.js +26 -0
- package/dist/components/core/Avatar-Base/avatar.tokens.d.ts +21 -26
- package/dist/components/core/Avatar-Base/avatar.tokens.js +31 -34
- package/dist/components/core/Avatar-Base/index.d.ts +1 -1
- package/dist/components/core/Avatar-Base/index.js +2 -2
- package/dist/components/core/Button-Icon/buttonIcon.tokens.d.ts +28 -14
- package/dist/components/core/Button-Icon/buttonIcon.tokens.js +35 -20
- package/dist/generators/TokenFileGenerator.js +7 -2
- package/dist/ios/DesignTokens.ios.swift +1 -1
- package/dist/tokens/component/progress.d.ts +65 -5
- package/dist/tokens/component/progress.js +79 -18
- package/dist/types/generated/TokenTypes.d.ts +1 -1
- package/dist/types/generated/TokenTypes.js +1 -1
- package/dist/web/DesignTokens.web.css +1 -1
- package/governance/BUILD-SYSTEM-SETUP.md +1 -2
- package/governance/Component-Development-Guide.md +1 -1
- package/governance/Component-Development-Standards.md +19 -18
- package/governance/Component-Family-Avatar.md +6 -6
- package/governance/Component-Family-Badge.md +19 -19
- package/governance/Component-Family-Button.md +26 -26
- package/governance/Component-Family-Chip.md +14 -14
- package/governance/Component-Family-Container.md +12 -12
- package/governance/Component-Family-Form-Inputs.md +61 -61
- package/governance/Component-Family-Icon.md +8 -8
- package/governance/Component-Family-Navigation.md +1 -1
- package/governance/Component-Inheritance-Structures.md +29 -28
- package/governance/Component-Readiness-Status.md +6 -7
- package/governance/Component-Templates.md +26 -26
- package/governance/Contract-System-Reference.md +1 -1
- package/governance/Process-Development-Workflow.md +4 -4
- package/governance/Process-File-Organization.md +1 -4
- package/governance/Process-Hook-Operations.md +6 -7
- package/governance/Process-Spec-Planning.md +8 -14
- package/governance/Rosetta-System-Architecture.md +7 -5
- package/governance/Token-Quick-Reference.md +35 -22
- package/governance/Web-Authoring-Standards.md +1 -1
- package/governance/classification-map.md +109 -3
- package/governance/completion-documentation-guide.md +14 -31
- package/governance/platform-implementation-guidelines.md +1 -2
- package/governance/release-management-system.md +28 -63
- package/package.json +2 -6
- package/src/build/tokens/__tests__/defineComponentTokens.test.ts +113 -0
- package/src/build/tokens/defineComponentTokens.ts +43 -1
- package/src/components/core/Avatar-Base/avatar.tokens.ts +31 -34
- package/src/components/core/Avatar-Base/index.ts +1 -1
- package/src/components/core/Button-Icon/buttonIcon.tokens.ts +43 -27
- package/src/generators/TokenFileGenerator.ts +7 -2
- package/src/tokens/__tests__/ProgressTokenCompliance.test.ts +5 -3
- package/src/tokens/__tests__/ProgressTokenFormulas.test.ts +11 -11
- package/src/tokens/__tests__/ProgressTokenTranslation.test.ts +22 -20
- package/src/tokens/component/progress.ts +83 -21
- package/src/types/generated/TokenTypes.ts +1 -1
- package/token-index/components.yaml +8 -8
- package/src/tools/release/__tests__/ChangeClassifier.test.ts +0 -133
- package/src/tools/release/__tests__/ChangeExtractor.test.ts +0 -222
- package/src/tools/release/__tests__/GitHubPublisher.test.ts +0 -240
- package/src/tools/release/__tests__/NotesRenderer.test.ts +0 -142
- package/src/tools/release/__tests__/NpmPublisher.test.ts +0 -289
- package/src/tools/release/__tests__/PipelineIntegration.test.ts +0 -188
- package/src/tools/release/__tests__/ReleasePipeline.test.ts +0 -192
- package/src/tools/release/__tests__/SemanticVersionValidator.test.ts +0 -49
- package/src/tools/release/__tests__/SummaryScanner.test.ts +0 -141
- package/src/tools/release/__tests__/TagResolver.test.ts +0 -91
- package/src/tools/release/__tests__/VersionCalculator.test.ts +0 -270
- package/src/tools/release/__tests__/helpers/NpmMockHelper.ts +0 -80
- package/src/tools/release/cli/ReleasePipeline.ts +0 -165
- package/src/tools/release/cli/release-tool.ts +0 -107
- package/src/tools/release/pipeline/ChangeClassifier.ts +0 -61
- package/src/tools/release/pipeline/ChangeExtractor.ts +0 -87
- package/src/tools/release/pipeline/NotesRenderer.ts +0 -66
- package/src/tools/release/pipeline/SummaryScanner.ts +0 -70
- package/src/tools/release/pipeline/TagResolver.ts +0 -40
- package/src/tools/release/pipeline/VersionCalculator.ts +0 -375
- package/src/tools/release/publishers/GitHubPublisher.ts +0 -228
- package/src/tools/release/publishers/NpmPublisher.ts +0 -196
- package/src/tools/release/release-config.json +0 -5
- package/src/tools/release/types/index.ts +0 -282
- package/src/tools/release/validators/SemanticVersionValidator.ts +0 -67
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
* @see .kiro/specs/048-progress-family/design.md (Size Variant, Token Usage sections)
|
|
22
22
|
*/
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.progressComponentTokenNames = exports.PROGRESS_COMPONENT_TOKEN_COUNT = exports.
|
|
24
|
+
exports.progressComponentTokenNames = exports.PROGRESS_COMPONENT_TOKEN_COUNT = exports.progressTokenValues = exports.ProgressBorderWidthTokens = exports.ProgressSpacingTokens = exports.ProgressSizingTokens = void 0;
|
|
25
|
+
exports.getProgressRegisteredTokens = getProgressRegisteredTokens;
|
|
25
26
|
exports.validateProgressComponentTokenCount = validateProgressComponentTokenCount;
|
|
26
27
|
exports.getProgressComponentToken = getProgressComponentToken;
|
|
27
28
|
exports.getAllProgressComponentTokens = getAllProgressComponentTokens;
|
|
@@ -30,20 +31,37 @@ const SpacingTokens_1 = require("../../tokens/SpacingTokens");
|
|
|
30
31
|
const SizingTokens_1 = require("../../tokens/SizingTokens");
|
|
31
32
|
const BorderWidthTokens_1 = require("../../tokens/BorderWidthTokens");
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* ONE CALL PER FAMILY.
|
|
35
|
+
*
|
|
36
|
+
* Every token registered by a single defineComponentTokens() call is stamped with that
|
|
37
|
+
* call's `family`, and the family drives platform output — notably the primitive class
|
|
38
|
+
* name emitted for reference-path tokens (TokenFileGenerator.getFamilyClassName) and the
|
|
39
|
+
* Android `.dp` suffix. These 10 tokens span THREE primitive families, so they require
|
|
40
|
+
* three calls. A single `family: 'spacing'` call previously produced
|
|
41
|
+
* `SpacingTokens.size150` / `SpacingTokens.borderWidth100` — members no generated platform
|
|
42
|
+
* file defines — the same defect fixed for Button-Icon in PR #126.
|
|
43
|
+
*
|
|
44
|
+
* The three branded results MUST NOT be spread/merged into one registration object: the
|
|
45
|
+
* rich metadata rides on a non-enumerable brand (src/build/tokens/defineComponentTokens.ts,
|
|
46
|
+
* TOKEN_CONTRACT_BRAND) that a spread silently drops. The harvest in loadComponentTokens
|
|
47
|
+
* collects each branded export separately. Use {@link progressTokenValues} for flat
|
|
48
|
+
* value lookups and {@link getProgressRegisteredTokens} for the rich metadata.
|
|
49
|
+
*
|
|
50
|
+
* All three calls declare `component: 'Progress'`, so platform output is still a single
|
|
51
|
+
* `ProgressTokens` Swift enum / Kotlin object.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Node dimension tokens — reference sizing primitives (dimensions, not spacing).
|
|
34
55
|
*
|
|
35
|
-
* 13 tokens organized by concept:
|
|
36
56
|
* - node.size.{sm|md|lg} — base node dimensions
|
|
37
57
|
* - node.size.{sm|md|lg}.current — emphasized node dimensions (+4px)
|
|
38
|
-
* - node.gap.{sm|md|lg} — spacing between nodes
|
|
39
|
-
* - connector.thickness — connector line width
|
|
40
58
|
*/
|
|
41
|
-
exports.
|
|
59
|
+
exports.ProgressSizingTokens = (0, tokens_1.defineComponentTokens)({
|
|
42
60
|
component: 'Progress',
|
|
43
|
-
family: '
|
|
61
|
+
family: 'sizing',
|
|
44
62
|
tokens: {
|
|
45
63
|
// ========================================================================
|
|
46
|
-
// BASE NODE SIZES
|
|
64
|
+
// BASE NODE SIZES
|
|
47
65
|
// ========================================================================
|
|
48
66
|
'node.size.sm': {
|
|
49
67
|
reference: SizingTokens_1.sizingTokens.size150,
|
|
@@ -58,7 +76,7 @@ exports.ProgressTokens = (0, tokens_1.defineComponentTokens)({
|
|
|
58
76
|
reasoning: 'Large node base size (20px). Inactive dots in desktop contexts.',
|
|
59
77
|
},
|
|
60
78
|
// ========================================================================
|
|
61
|
-
// CURRENT NODE SIZES —
|
|
79
|
+
// CURRENT NODE SIZES — +4px emphasis
|
|
62
80
|
// Provides non-color visual differentiation of active position
|
|
63
81
|
// ========================================================================
|
|
64
82
|
'node.size.sm.current': {
|
|
@@ -73,9 +91,17 @@ exports.ProgressTokens = (0, tokens_1.defineComponentTokens)({
|
|
|
73
91
|
reference: SizingTokens_1.sizingTokens.size300,
|
|
74
92
|
reasoning: 'Current node emphasis for lg (24px). +4px over base 20px for non-color visual differentiation.',
|
|
75
93
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Node gap tokens — reference spacing primitives (gaps are spacing, not sizing).
|
|
98
|
+
*
|
|
99
|
+
* - node.gap.{sm|md|lg} — spacing between nodes
|
|
100
|
+
*/
|
|
101
|
+
exports.ProgressSpacingTokens = (0, tokens_1.defineComponentTokens)({
|
|
102
|
+
component: 'Progress',
|
|
103
|
+
family: 'spacing',
|
|
104
|
+
tokens: {
|
|
79
105
|
'node.gap.sm': {
|
|
80
106
|
reference: SpacingTokens_1.spacingTokens.space075,
|
|
81
107
|
reasoning: 'Small gap between nodes (6px = 0.75× base). Tight spacing for compact pagination dots in mobile contexts.',
|
|
@@ -88,15 +114,50 @@ exports.ProgressTokens = (0, tokens_1.defineComponentTokens)({
|
|
|
88
114
|
reference: SpacingTokens_1.spacingTokens.space150,
|
|
89
115
|
reasoning: 'Large gap between nodes (12px = 1.5× base). Generous spacing for detailed steppers with labels in desktop contexts.',
|
|
90
116
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* Connector tokens — line connecting nodes in steppers. References a borderWidth primitive.
|
|
121
|
+
*
|
|
122
|
+
* - connector.thickness — connector line width
|
|
123
|
+
*/
|
|
124
|
+
exports.ProgressBorderWidthTokens = (0, tokens_1.defineComponentTokens)({
|
|
125
|
+
component: 'Progress',
|
|
126
|
+
family: 'borderWidth',
|
|
127
|
+
tokens: {
|
|
94
128
|
'connector.thickness': {
|
|
95
129
|
reference: BorderWidthTokens_1.borderWidthTokens.borderWidth100,
|
|
96
130
|
reasoning: 'Connector line thickness (1px). References borderDefault primitive for consistent border treatment across the design system.',
|
|
97
131
|
},
|
|
98
132
|
},
|
|
99
133
|
});
|
|
134
|
+
/**
|
|
135
|
+
* Flat value map across all three Progress token calls — a READ-ONLY convenience for
|
|
136
|
+
* value lookups (`progressTokenValues['node.size.md']`).
|
|
137
|
+
*
|
|
138
|
+
* NOT a registration surface: spreading drops the non-enumerable brand, so this object
|
|
139
|
+
* deliberately harvests to zero and cannot double-register. For the rich metadata use
|
|
140
|
+
* {@link getProgressRegisteredTokens}, never `getTokenContract(progressTokenValues)`.
|
|
141
|
+
*/
|
|
142
|
+
exports.progressTokenValues = {
|
|
143
|
+
...exports.ProgressSizingTokens,
|
|
144
|
+
...exports.ProgressSpacingTokens,
|
|
145
|
+
...exports.ProgressBorderWidthTokens,
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* All Progress component tokens with their rich metadata, concatenated across the three
|
|
149
|
+
* family calls in declaration order (sizing → spacing → borderWidth).
|
|
150
|
+
*
|
|
151
|
+
* This is the brand-safe replacement for `getTokenContract(ProgressTokens)`, which is no
|
|
152
|
+
* longer meaningful now that Progress registers through three calls.
|
|
153
|
+
*/
|
|
154
|
+
function getProgressRegisteredTokens() {
|
|
155
|
+
return [
|
|
156
|
+
...((0, tokens_1.getTokenContract)(exports.ProgressSizingTokens) ?? []),
|
|
157
|
+
...((0, tokens_1.getTokenContract)(exports.ProgressSpacingTokens) ?? []),
|
|
158
|
+
...((0, tokens_1.getTokenContract)(exports.ProgressBorderWidthTokens) ?? []),
|
|
159
|
+
];
|
|
160
|
+
}
|
|
100
161
|
// ============================================================================
|
|
101
162
|
// Constants and Utilities
|
|
102
163
|
// ============================================================================
|
|
@@ -128,18 +189,18 @@ exports.progressComponentTokenNames = [
|
|
|
128
189
|
* Validate that the progress component token count matches the expected count (13)
|
|
129
190
|
*/
|
|
130
191
|
function validateProgressComponentTokenCount() {
|
|
131
|
-
return Object.keys(exports.
|
|
192
|
+
return Object.keys(exports.progressTokenValues).length === exports.PROGRESS_COMPONENT_TOKEN_COUNT;
|
|
132
193
|
}
|
|
133
194
|
/**
|
|
134
195
|
* Get a single progress component token value by key
|
|
135
196
|
*/
|
|
136
197
|
function getProgressComponentToken(key) {
|
|
137
|
-
return exports.
|
|
198
|
+
return exports.progressTokenValues[key];
|
|
138
199
|
}
|
|
139
200
|
/**
|
|
140
201
|
* Get all progress component token entries as key-value pairs
|
|
141
202
|
*/
|
|
142
203
|
function getAllProgressComponentTokens() {
|
|
143
|
-
return Object.entries(exports.
|
|
204
|
+
return Object.entries(exports.progressTokenValues).map(([name, value]) => ({ name, value }));
|
|
144
205
|
}
|
|
145
206
|
//# sourceMappingURL=progress.js.map
|
|
@@ -125,7 +125,7 @@ The `build:verify` script (`verify-build.js`) checks that:
|
|
|
125
125
|
|
|
126
126
|
### You DON'T need to build when:
|
|
127
127
|
- Running tests with `npm test` (ts-jest handles compilation)
|
|
128
|
-
- Using CLI tools that run via tsx (e.g., the
|
|
128
|
+
- Using CLI tools that run via tsx (e.g., the agent generator: `npx tsx tools/agent-generator/generate.ts`)
|
|
129
129
|
- Making changes and running tests immediately
|
|
130
130
|
|
|
131
131
|
## Development Workflow
|
|
@@ -215,7 +215,6 @@ The build system now enforces full TypeScript type safety:
|
|
|
215
215
|
### Option 1: Separate Build Configs
|
|
216
216
|
Create separate `tsconfig.json` files for different parts of the codebase:
|
|
217
217
|
- `tsconfig.tokens.json` - Just token generation code
|
|
218
|
-
- `tsconfig.release.json` - Release analysis code
|
|
219
218
|
|
|
220
219
|
### Module-resolution direction (settled — Spec 118)
|
|
221
220
|
*(Supersedes the former "Go Full ts-node" option, which is moot: ts-node is retired from the governed surface.)* The settled direction is **compiled-`dist/` for package own code** (Class A — CLI, generators, exports run as compiled JS) and **scoped `tsx`** as the sole runtime-TS mechanism for consumer `.ts` (Class B). See the Rosetta-System-Architecture "Module-Resolution Contract (Spec 118)" for the full contract; full ESM modernization is a separate, externally-triggered future migration tracked in `docs/roadmap/m0a-deferred-items.md`.
|
|
@@ -1876,7 +1876,7 @@ Components come with their own unique properties that might include, but are not
|
|
|
1876
1876
|
5. **README** (required) - Create comprehensive component documentation
|
|
1877
1877
|
6. **HTML Canaries** (required) - Create validation examples
|
|
1878
1878
|
7. **Implementation** (required) - Build component across platforms
|
|
1879
|
-
8. **Dark Mode Token Population** (if component has dark mode differentiation) - Coordinate with Ada to populate the component's semantic color token entries in the dark theme file (`src/tokens/themes/dark/SemanticOverrides.ts`). Identify which tokens need Level 2 overrides (different primitive
|
|
1879
|
+
8. **Dark Mode Token Population** (if component has dark mode differentiation) - Coordinate with Ada to populate the component's semantic color token entries in the dark theme file (`src/tokens/themes/dark/SemanticOverrides.ts`). Identify which tokens need Level 2 overrides (different primitive in dark mode) and populate those entries. Leave Level 1 tokens as commented-out — Level 1 means the token deliberately resolves to the *same* value in both modes (primitives have no mode dimension, so a commented-out entry falls back to the base/light reference). Without this step, the component will silently render light-mode fallback values in dark mode for any tokens that need Level 2 overrides. *(Added by Spec 080, Lina R2 F36)*
|
|
1880
1880
|
9. **Demo Page** (if web implementation) - Create or update demo in `demos/` (see Demo Maintenance Checklist)
|
|
1881
1881
|
|
|
1882
1882
|
This workflow produces clearer requirements, better documentation, and validation that ensures documentation stays accurate.
|
|
@@ -36,7 +36,7 @@ This document provides comprehensive guidelines for creating new component famil
|
|
|
36
36
|
|-----------|----------|---------|
|
|
37
37
|
| **Shared Purpose** | Do components share a common purpose that doesn't fit existing families? | "Progress indication" doesn't fit Form Inputs or Buttons |
|
|
38
38
|
| **Multiple Variants** | Can you identify at least 3 potential semantic variants? | Loading: Spinner, Progress, Skeleton |
|
|
39
|
-
| **Clear Base Behaviors** | Can you define foundational behaviors that ALL variants share? | All loading indicators: `
|
|
39
|
+
| **Clear Base Behaviors** | Can you define foundational behaviors that ALL variants share? | All loading indicators: `state_loading`, `accessibility_aria_label` |
|
|
40
40
|
| **Cross-Platform Need** | Is this needed across web, iOS, and Android? | Yes - all platforms need loading indicators |
|
|
41
41
|
|
|
42
42
|
**Do NOT create a new family when**:
|
|
@@ -113,7 +113,7 @@ List the foundational behaviors that ALL semantic variants will inherit.
|
|
|
113
113
|
**Behavior Identification Checklist**:
|
|
114
114
|
- [ ] What interaction patterns are common to all variants?
|
|
115
115
|
- [ ] What accessibility requirements apply to all variants?
|
|
116
|
-
- [ ] What visual states are shared (focus, error,
|
|
116
|
+
- [ ] What visual states are shared (focus, error, loading)?
|
|
117
117
|
- [ ] What token dependencies are universal?
|
|
118
118
|
|
|
119
119
|
**Template**:
|
|
@@ -319,29 +319,28 @@ properties:
|
|
|
319
319
|
type: string
|
|
320
320
|
required: false
|
|
321
321
|
description: Error message to display
|
|
322
|
-
disabled:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
description: Whether input is disabled
|
|
322
|
+
# No disabled prop: disabled states are not supported corpus-wide, zero
|
|
323
|
+
# exceptions (adjudicated 2026-07-15 — .kiro/issues/button-cta-disabled-state-adjudication.md).
|
|
324
|
+
# Components declare the standardized `excludes: state_disabled` block in
|
|
325
|
+
# contracts.yaml instead; use state_loading or validate-on-press/blur.
|
|
327
326
|
|
|
328
327
|
contracts:
|
|
329
|
-
- name:
|
|
328
|
+
- name: interaction_focusable
|
|
330
329
|
description: Can receive keyboard focus via Tab key navigation
|
|
331
330
|
platforms: [web, ios, android]
|
|
332
331
|
required: true
|
|
333
332
|
wcag: "2.1.1"
|
|
334
|
-
- name:
|
|
333
|
+
- name: content_float_label
|
|
335
334
|
description: Label animates from placeholder to floating position on focus
|
|
336
335
|
platforms: [web, ios, android]
|
|
337
336
|
required: true
|
|
338
337
|
wcag: "2.3.3"
|
|
339
|
-
- name:
|
|
338
|
+
- name: validation_on_blur
|
|
340
339
|
description: Validation triggers when field loses focus
|
|
341
340
|
platforms: [web, ios, android]
|
|
342
341
|
required: true
|
|
343
342
|
wcag: "3.3.1"
|
|
344
|
-
- name:
|
|
343
|
+
- name: state_error
|
|
345
344
|
description: Displays error message and visual error indication
|
|
346
345
|
platforms: [web, ios, android]
|
|
347
346
|
required: true
|
|
@@ -510,7 +509,6 @@ Add the new family to the Component Family Inheritance Structures document.
|
|
|
510
509
|
Verify all schemas are valid and complete:
|
|
511
510
|
- [ ] All required fields present
|
|
512
511
|
- [ ] Property types are valid
|
|
513
|
-
- [ ] Contracts reference valid WCAG criteria
|
|
514
512
|
- [ ] Token patterns exist in token system
|
|
515
513
|
- [ ] Platforms list is complete
|
|
516
514
|
|
|
@@ -683,7 +681,6 @@ Complete these checks before starting implementation:
|
|
|
683
681
|
- [ ] **Schema Location Correct**: `src/components/core/[Component-Name]/[Component-Name].schema.yaml`
|
|
684
682
|
- [ ] **Required Fields Present**: name, type, family, behaviors, properties, contracts, tokens, platforms, readiness
|
|
685
683
|
- [ ] **Property Types Valid**: All properties have valid type definitions
|
|
686
|
-
- [ ] **Contracts Reference WCAG**: Accessibility contracts include WCAG criterion references
|
|
687
684
|
- [ ] **Token Patterns Exist**: All referenced tokens exist in the token system
|
|
688
685
|
- [ ] **Platforms List Complete**: All supported platforms listed (web, ios, android)
|
|
689
686
|
|
|
@@ -803,16 +800,20 @@ This section defines the formal review process for ensuring new component famili
|
|
|
803
800
|
**Automated Validation Checks**:
|
|
804
801
|
```yaml
|
|
805
802
|
schema_validation:
|
|
803
|
+
# Per spec 063, contracts live in contracts.yaml — NOT in the schema. These
|
|
804
|
+
# five fields are what schema validation actually requires (see
|
|
805
|
+
# src/__tests__/stemma-system/behavioral-contract-validation.test.ts).
|
|
806
806
|
required_fields:
|
|
807
807
|
- name
|
|
808
808
|
- type
|
|
809
809
|
- family
|
|
810
810
|
- behaviors
|
|
811
|
-
- properties
|
|
812
|
-
- contracts
|
|
813
|
-
- tokens
|
|
814
811
|
- platforms
|
|
815
|
-
|
|
812
|
+
|
|
813
|
+
# Authored by convention, but NOT presence-checked by schema validation:
|
|
814
|
+
# properties, tokens, readiness (and `inherits` on semantic variants)
|
|
815
|
+
# Contract-level checks below read the component's contracts.yaml, not the
|
|
816
|
+
# schema; contracts.yaml must exist and declare at least one contract.
|
|
816
817
|
|
|
817
818
|
type_validation:
|
|
818
819
|
- type must be: primitive | semantic | standalone
|
|
@@ -821,7 +822,7 @@ schema_validation:
|
|
|
821
822
|
|
|
822
823
|
contract_validation:
|
|
823
824
|
- Each contract must have: description, platforms, validation
|
|
824
|
-
-
|
|
825
|
+
- Allowlisted contracts (exact names + accessibility_*/content_*_label prefixes) must carry a wcag value ('N/A' when genuinely not applicable)
|
|
825
826
|
|
|
826
827
|
token_validation:
|
|
827
828
|
- All token patterns must exist in token system
|
|
@@ -80,13 +80,13 @@ Avatar-Base (Primitive) [IMPLEMENTED]
|
|
|
80
80
|
|
|
81
81
|
| Contract | Description | WCAG | Platforms |
|
|
82
82
|
|----------|-------------|------|-----------|
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
83
|
+
| `visual_entity_shape` | Circle for human, hexagon for agent | 1.4.1 | web, ios, android |
|
|
84
|
+
| `content_displays_image` | Shows user image when available (human only) | 1.1.1 | web, ios, android |
|
|
85
|
+
| `content_displays_fallback` | Shows icon when image unavailable or agent type | 1.1.1 | web, ios, android |
|
|
86
86
|
| `error_handling` | Falls back to icon on image load failure | N/A | web, ios, android |
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
87
|
+
| `visual_size_variants` | Supports six size variants (xs-xxl) | N/A | web, ios, android |
|
|
88
|
+
| `interaction_hover` | Shows hover visual feedback when interactive | N/A | web, ios, android |
|
|
89
|
+
| `accessibility_decorative_mode` | Hides from screen readers when decorative | 1.1.1 | web, ios, android |
|
|
90
90
|
| `wrapper_delegation` | No onClick/onPress - wrapper handles interaction | 2.1.1 | web, ios, android |
|
|
91
91
|
|
|
92
92
|
---
|
|
@@ -77,24 +77,24 @@ Badge (Family)
|
|
|
77
77
|
|
|
78
78
|
| Contract | Description | WCAG | Platforms |
|
|
79
79
|
|----------|-------------|------|-----------|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
80
|
+
| content_displays_label | Renders text label visibly | 1.3.1 | web, ios, android |
|
|
81
|
+
| accessibility_non_interactive | Does not respond to user interaction | — | web, ios, android |
|
|
82
|
+
| content_supports_icon | Optionally displays leading icon via Icon-Base | 1.3.1 | web, ios, android |
|
|
83
|
+
| content_truncation | Truncates with ellipsis when truncate=true; full text accessible | 1.3.1 | web, ios, android |
|
|
84
|
+
| accessibility_color_contrast | Meets WCAG AA contrast requirements (4.5:1) | 1.4.3 | web, ios, android |
|
|
85
|
+
| accessibility_text_scaling | Scales proportionally with user font size preferences | 1.4.4 | web, ios, android |
|
|
86
86
|
|
|
87
87
|
### Base Contracts (Badge-Count-Base)
|
|
88
88
|
|
|
89
89
|
| Contract | Description | WCAG | Platforms |
|
|
90
90
|
|----------|-------------|------|-----------|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
91
|
+
| content_displays_count | Shows numeric value | 1.3.1 | web, ios, android |
|
|
92
|
+
| content_truncates_at_max | Shows "[max]+" when count exceeds max | 1.3.1 | web, ios, android |
|
|
93
|
+
| visual_circular_shape | Renders circular for single-digit counts | — | web, ios, android |
|
|
94
|
+
| visual_pill_shape | Renders pill shape for multi-digit counts | — | web, ios, android |
|
|
95
|
+
| accessibility_non_interactive | Does not respond to user interaction | — | web, ios, android |
|
|
96
|
+
| accessibility_color_contrast | Meets WCAG AA contrast requirements (4.5:1) | 1.4.3 | web, ios, android |
|
|
97
|
+
| accessibility_text_scaling | Scales proportionally with user font size preferences | 1.4.4 | web, ios, android |
|
|
98
98
|
|
|
99
99
|
### Extended Contracts (Badge-Count-Notification)
|
|
100
100
|
|
|
@@ -102,13 +102,13 @@ Inherits all contracts from Badge-Count-Base, plus:
|
|
|
102
102
|
|
|
103
103
|
| Contract | Description | WCAG | Platforms |
|
|
104
104
|
|----------|-------------|------|-----------|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
105
|
+
| visual_notification_color | Conveys notification/alert meaning through color | 1.3.1 | web, ios, android |
|
|
106
|
+
| accessibility_announces_changes | Announces count changes to screen readers when enabled | 4.1.3 | web, ios, android |
|
|
107
|
+
| accessibility_pluralized_announcements | Uses correct pluralization in announcements | 4.1.3 | web, ios, android |
|
|
108
108
|
|
|
109
109
|
### Contract Details
|
|
110
110
|
|
|
111
|
-
####
|
|
111
|
+
#### content_displays_label
|
|
112
112
|
|
|
113
113
|
**Description**: Renders the provided text label visibly within the badge container.
|
|
114
114
|
|
|
@@ -121,7 +121,7 @@ Inherits all contracts from Badge-Count-Base, plus:
|
|
|
121
121
|
|
|
122
122
|
**WCAG Compliance**: 1.3.1 Info and Relationships
|
|
123
123
|
|
|
124
|
-
####
|
|
124
|
+
#### accessibility_non_interactive
|
|
125
125
|
|
|
126
126
|
**Description**: Badge components do not respond to user interaction.
|
|
127
127
|
|
|
@@ -132,7 +132,7 @@ Inherits all contracts from Badge-Count-Base, plus:
|
|
|
132
132
|
- iOS: No onTapGesture, not focusable
|
|
133
133
|
- Android: No clickable modifier, not focusable
|
|
134
134
|
|
|
135
|
-
####
|
|
135
|
+
#### accessibility_announces_changes
|
|
136
136
|
|
|
137
137
|
**Description**: When count changes and announceChanges is enabled, screen readers are notified.
|
|
138
138
|
|
|
@@ -101,16 +101,16 @@ All Button-CTA instances implement these 6 foundational contracts:
|
|
|
101
101
|
|
|
102
102
|
| Contract | Description | WCAG | Platforms |
|
|
103
103
|
|----------|-------------|------|-----------|
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
104
|
+
| `interaction_focusable` | Can receive keyboard focus | 2.1.1, 2.4.7 | web, ios, android |
|
|
105
|
+
| `interaction_pressable` | Responds to press/click events | 2.1.1 | web, ios, android |
|
|
106
|
+
| `interaction_hover` | Visual feedback on hover (desktop) | 1.4.13 | web |
|
|
107
|
+
| `interaction_pressed` | Visual feedback when pressed | 2.4.7 | web, ios, android |
|
|
108
|
+
| `state_loading` | Shows loading indicator during async | 4.1.3 | web, ios, android |
|
|
109
|
+
| `interaction_focus_ring` | WCAG 2.4.7 focus visible indicator | 2.4.7 | web, ios, android |
|
|
110
110
|
|
|
111
111
|
### Contract Details
|
|
112
112
|
|
|
113
|
-
####
|
|
113
|
+
#### interaction_focusable
|
|
114
114
|
|
|
115
115
|
**Description**: Component can receive keyboard focus via Tab key navigation.
|
|
116
116
|
|
|
@@ -118,7 +118,7 @@ All Button-CTA instances implement these 6 foundational contracts:
|
|
|
118
118
|
|
|
119
119
|
**WCAG Compliance**: 2.1.1 Keyboard, 2.4.7 Focus Visible
|
|
120
120
|
|
|
121
|
-
####
|
|
121
|
+
#### interaction_pressable
|
|
122
122
|
|
|
123
123
|
**Description**: Component responds to click, tap, Enter key, and Space key.
|
|
124
124
|
|
|
@@ -126,7 +126,7 @@ All Button-CTA instances implement these 6 foundational contracts:
|
|
|
126
126
|
|
|
127
127
|
**WCAG Compliance**: 2.1.1 Keyboard
|
|
128
128
|
|
|
129
|
-
####
|
|
129
|
+
#### interaction_hover
|
|
130
130
|
|
|
131
131
|
**Description**: Visual feedback on hover (desktop only).
|
|
132
132
|
|
|
@@ -134,7 +134,7 @@ All Button-CTA instances implement these 6 foundational contracts:
|
|
|
134
134
|
|
|
135
135
|
**WCAG Compliance**: 1.4.13 Content on Hover or Focus
|
|
136
136
|
|
|
137
|
-
####
|
|
137
|
+
#### interaction_pressed
|
|
138
138
|
|
|
139
139
|
**Description**: Visual feedback when pressed.
|
|
140
140
|
|
|
@@ -142,7 +142,7 @@ All Button-CTA instances implement these 6 foundational contracts:
|
|
|
142
142
|
|
|
143
143
|
**WCAG Compliance**: 2.4.7 Focus Visible
|
|
144
144
|
|
|
145
|
-
####
|
|
145
|
+
#### interaction_focus_ring
|
|
146
146
|
|
|
147
147
|
**Description**: WCAG 2.4.7 focus visible indicator.
|
|
148
148
|
|
|
@@ -292,14 +292,14 @@ Container component that orchestrates selection behavior across child Button-Ver
|
|
|
292
292
|
|
|
293
293
|
| Contract | Description | WCAG |
|
|
294
294
|
|----------|-------------|------|
|
|
295
|
-
| `
|
|
296
|
-
| `
|
|
297
|
-
| `
|
|
295
|
+
| `state_mode_driven` | Behavior determined by mode prop | - |
|
|
296
|
+
| `state_controlled` | Selection state managed by parent via props | - |
|
|
297
|
+
| `composition_state_coordination` | Derives and propagates visual states to children | - |
|
|
298
298
|
| `animation_coordination` | Coordinates transition timing across children | 2.3.3 |
|
|
299
|
-
| `
|
|
300
|
-
| `
|
|
301
|
-
| `
|
|
302
|
-
| `
|
|
299
|
+
| `interaction_keyboard_navigation` | Arrow keys, Home, End, Enter, Space support | 2.1.1 |
|
|
300
|
+
| `interaction_roving_tabindex` | Single tab stop with arrow key navigation | 2.4.3 |
|
|
301
|
+
| `composition_error_propagation` | Error state propagates to all children | 3.3.1 |
|
|
302
|
+
| `accessibility_aria_roles` | Appropriate ARIA roles based on mode | 4.1.2 |
|
|
303
303
|
|
|
304
304
|
#### Usage Example
|
|
305
305
|
|
|
@@ -383,14 +383,14 @@ Presentational button component for vertical list selection patterns. Renders vi
|
|
|
383
383
|
|
|
384
384
|
| Contract | Description | WCAG |
|
|
385
385
|
|----------|-------------|------|
|
|
386
|
-
| `
|
|
387
|
-
| `
|
|
388
|
-
| `
|
|
389
|
-
| `
|
|
390
|
-
| `
|
|
391
|
-
| `
|
|
392
|
-
| `
|
|
393
|
-
| `
|
|
386
|
+
| `interaction_focusable` | Can receive keyboard focus | 2.1.1, 2.4.7 |
|
|
387
|
+
| `interaction_pressable` | Responds to press/click events | 2.1.1 |
|
|
388
|
+
| `interaction_hover` | Visual feedback on hover | 1.4.13 |
|
|
389
|
+
| `interaction_pressed` | Visual feedback when pressed | 2.4.7 |
|
|
390
|
+
| `state_visual_driven` | Renders appearance based on visualState prop | - |
|
|
391
|
+
| `animation_checkmark` | Animated selection indicator | 2.3.3 |
|
|
392
|
+
| `state_error` | Shows error styling when error=true | 3.3.1 |
|
|
393
|
+
| `interaction_focus_ring` | WCAG 2.4.7 focus visible indicator | 2.4.7 |
|
|
394
394
|
|
|
395
395
|
#### Usage Example
|
|
396
396
|
|
|
@@ -83,13 +83,13 @@ Chip (Family)
|
|
|
83
83
|
|
|
84
84
|
| Contract | Description | WCAG | Platforms |
|
|
85
85
|
|----------|-------------|------|-----------|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
86
|
+
| visual_pill_container | Renders pill-shaped container with label text | — | web, ios, android |
|
|
87
|
+
| visual_renders_icon | Optionally displays leading icon via Icon-Base at icon.size075 | — | web, ios, android |
|
|
88
|
+
| interaction_pressable | Responds to press/click/tap events, calls onPress callback | 2.1.1 | web, ios, android |
|
|
89
89
|
| state_styling | Visual feedback for default, hover, pressed states | 1.4.13 | web, ios, android |
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
90
|
+
| interaction_focusable | Can receive keyboard focus via Tab key | 2.1.1, 2.4.7 | web, ios, android |
|
|
91
|
+
| interaction_keyboard_activation | Activates on Space/Enter key press | 2.1.1 | web |
|
|
92
|
+
| interaction_expanded_tap_area | 48px tap area exceeds WCAG 44px minimum | 2.5.5 | web, ios, android |
|
|
93
93
|
| accessibility_role | Announces as button to assistive technology | 4.1.2 | web, ios, android |
|
|
94
94
|
|
|
95
95
|
### Extended Contracts (Chip-Filter)
|
|
@@ -98,10 +98,10 @@ Inherits all contracts from Chip-Base, plus:
|
|
|
98
98
|
|
|
99
99
|
| Contract | Description | WCAG | Platforms |
|
|
100
100
|
|----------|-------------|------|-----------|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
101
|
+
| interaction_toggle_selection | Toggles selected state on press, calls onSelectionChange | 4.1.2 | web, ios, android |
|
|
102
|
+
| state_selected_styling | Visual feedback for selected state using select feedback colors | 1.4.1 | web, ios, android |
|
|
103
|
+
| visual_checkmark_icon | Displays checkmark icon when selected (replaces leading icon) | — | web, ios, android |
|
|
104
|
+
| accessibility_aria_pressed | Announces selection state via aria-pressed attribute | 4.1.2 | web |
|
|
105
105
|
|
|
106
106
|
### Extended Contracts (Chip-Input)
|
|
107
107
|
|
|
@@ -109,10 +109,10 @@ Inherits most contracts from Chip-Base, plus:
|
|
|
109
109
|
|
|
110
110
|
| Contract | Description | WCAG | Platforms |
|
|
111
111
|
|----------|-------------|------|-----------|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
112
|
+
| interaction_dismiss | Dismisses chip on press anywhere, calls onDismiss | 2.1.1 | web, ios, android |
|
|
113
|
+
| content_trailing_dismiss_icon | Always displays X icon as trailing element | — | web, ios, android |
|
|
114
|
+
| content_dual_icons | Supports both leading icon AND trailing X icon | — | web, ios, android |
|
|
115
|
+
| accessibility_dismiss_label | X icon has accessible label "Remove [label]" | 4.1.2 | web, ios, android |
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -97,17 +97,17 @@ All components in the Containers family inherit these 7 foundational contracts f
|
|
|
97
97
|
|
|
98
98
|
| Contract | Description | WCAG | Platforms |
|
|
99
99
|
|----------|-------------|------|-----------|
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
100
|
+
| `layout_contains_children` | Can contain child components | 1.3.1 | web, ios, android |
|
|
101
|
+
| `layout_padding` | Applies consistent internal padding | 1.4.12 | web, ios, android |
|
|
102
|
+
| `visual_background` | Applies background color styling | 1.4.3 | web, ios, android |
|
|
103
|
+
| `visual_shadow` | Applies shadow/elevation styling | 1.4.11 | web, ios, android |
|
|
104
|
+
| `visual_border` | Applies border styling | 1.4.11 | web, ios, android |
|
|
105
|
+
| `visual_radius` | Applies border radius styling | N/A | web, ios, android |
|
|
106
|
+
| `interaction_hover` | Visual feedback on hover (pointer devices) | 1.4.13 | web, ios, android |
|
|
107
107
|
|
|
108
108
|
### Contract Details
|
|
109
109
|
|
|
110
|
-
####
|
|
110
|
+
#### layout_contains_children
|
|
111
111
|
|
|
112
112
|
**Description**: Container-Base can contain any child components or content.
|
|
113
113
|
|
|
@@ -115,7 +115,7 @@ All components in the Containers family inherit these 7 foundational contracts f
|
|
|
115
115
|
|
|
116
116
|
**WCAG Compliance**: 1.3.1 Info and Relationships
|
|
117
117
|
|
|
118
|
-
####
|
|
118
|
+
#### layout_padding
|
|
119
119
|
|
|
120
120
|
**Description**: Applies consistent internal padding using space.inset tokens.
|
|
121
121
|
|
|
@@ -123,7 +123,7 @@ All components in the Containers family inherit these 7 foundational contracts f
|
|
|
123
123
|
|
|
124
124
|
**WCAG Compliance**: 1.4.12 Text Spacing
|
|
125
125
|
|
|
126
|
-
####
|
|
126
|
+
#### visual_background
|
|
127
127
|
|
|
128
128
|
**Description**: Applies background color styling.
|
|
129
129
|
|
|
@@ -131,7 +131,7 @@ All components in the Containers family inherit these 7 foundational contracts f
|
|
|
131
131
|
|
|
132
132
|
**WCAG Compliance**: 1.4.3 Contrast (Minimum)
|
|
133
133
|
|
|
134
|
-
####
|
|
134
|
+
#### visual_shadow
|
|
135
135
|
|
|
136
136
|
**Description**: Applies shadow/elevation styling.
|
|
137
137
|
|
|
@@ -139,7 +139,7 @@ All components in the Containers family inherit these 7 foundational contracts f
|
|
|
139
139
|
|
|
140
140
|
**WCAG Compliance**: 1.4.11 Non-text Contrast
|
|
141
141
|
|
|
142
|
-
####
|
|
142
|
+
#### interaction_hover
|
|
143
143
|
|
|
144
144
|
**Description**: Visual feedback on hover (pointer devices only).
|
|
145
145
|
|