@3fn/core 13.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/agents/ada-prompt.md +80 -132
- package/.kiro/agents/ada-prompt.md.attribution.json +45 -0
- package/.kiro/agents/ada.json +44 -59
- package/.kiro/agents/ada.json.attribution.json +13 -0
- package/.kiro/agents/data-prompt.md +83 -74
- package/.kiro/agents/data-prompt.md.attribution.json +53 -0
- package/.kiro/agents/data.json +31 -38
- package/.kiro/agents/data.json.attribution.json +13 -0
- package/.kiro/agents/kenya-prompt.md +83 -72
- package/.kiro/agents/kenya-prompt.md.attribution.json +53 -0
- package/.kiro/agents/kenya.json +27 -35
- package/.kiro/agents/kenya.json.attribution.json +13 -0
- package/.kiro/agents/leonardo-prompt.md +176 -234
- package/.kiro/agents/leonardo-prompt.md.attribution.json +45 -0
- package/.kiro/agents/leonardo.json +28 -36
- package/.kiro/agents/leonardo.json.attribution.json +13 -0
- package/.kiro/agents/lina-prompt.md +110 -151
- package/.kiro/agents/lina-prompt.md.attribution.json +53 -0
- package/.kiro/agents/lina.json +46 -59
- package/.kiro/agents/lina.json.attribution.json +13 -0
- package/.kiro/agents/sparky-prompt.md +89 -72
- package/.kiro/agents/sparky-prompt.md.attribution.json +53 -0
- package/.kiro/agents/sparky.json +37 -37
- package/.kiro/agents/sparky.json.attribution.json +13 -0
- package/.kiro/agents/stacy-prompt.md +74 -48
- package/.kiro/agents/stacy-prompt.md.attribution.json +45 -0
- package/.kiro/agents/stacy.json +28 -30
- package/.kiro/agents/stacy.json.attribution.json +13 -0
- package/.kiro/agents/thurgood-prompt.md +94 -138
- package/.kiro/agents/thurgood-prompt.md.attribution.json +45 -0
- package/.kiro/agents/thurgood.json +31 -35
- package/.kiro/agents/thurgood.json.attribution.json +13 -0
- package/.kiro/steering/AI-Collaboration-Principles.md +3 -3
- package/.kiro/steering/Civitas-System-Overview.md +7 -16
- package/.kiro/steering/DesignerPunk-Systems-Overview.md +6 -6
- package/.kiro/steering/Spec-Feedback-Protocol.md +2 -11
- package/.kiro/steering/Task-Completion-Protocol.md +98 -17
- package/.kiro/steering/core-goals.md +3 -3
- package/.kiro/steering/personal-note.md +1 -1
- package/.kiro/steering/start-up-tasks.md +17 -6
- package/application-mcp-server/src/index.ts +26 -0
- 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 +8 -5
- package/dist/DesignTokens.figma.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/blend/OklchBlendCalculator.js +1 -0
- package/dist/blend/ThemeAwareBlendUtilities.web.d.ts +13 -2
- package/dist/blend/ThemeAwareBlendUtilities.web.js +6 -1
- package/dist/browser/designerpunk.esm.js +36 -90
- package/dist/browser/designerpunk.esm.min.js +33 -36
- package/dist/browser/designerpunk.umd.js +36 -90
- package/dist/browser/designerpunk.umd.min.js +47 -50
- 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/Avatar-Base/platforms/web/Avatar.web.js +24 -5
- package/dist/components/core/Button-CTA/examples/BasicUsage.d.ts +16 -28
- package/dist/components/core/Button-CTA/examples/BasicUsage.js +18 -43
- package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.d.ts +3 -15
- package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.js +9 -58
- package/dist/components/core/Button-CTA/types.d.ts +0 -24
- package/dist/components/core/Button-CTA/types.js +6 -0
- 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/components/core/Input-Text-Base/types.d.ts +13 -1
- package/dist/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.js +11 -2
- package/dist/generators/DTCGFormatGenerator.js +8 -0
- package/dist/generators/TokenFileGenerator.js +7 -2
- package/dist/integration/BuildErrorHandler.js +2 -2
- package/dist/ios/DesignTokens.ios.swift +1 -1
- package/dist/mcp/application-mcp.js +24 -0
- package/dist/mcp/docs-mcp.js +130 -15
- package/dist/mcp/product-mcp.js +25 -0
- package/dist/tokens/OpacityTokens.js +1 -1
- package/dist/tokens/component/progress.d.ts +65 -5
- package/dist/tokens/component/progress.js +79 -18
- package/dist/tokens/semantic/BlendTokens.d.ts +10 -3
- package/dist/tokens/semantic/BlendTokens.js +17 -5
- package/dist/tokens/semantic/OpacityTokens.d.ts +4 -4
- package/dist/tokens/semantic/OpacityTokens.js +4 -4
- package/dist/types/ComponentTypes.d.ts +1 -1
- package/dist/types/generated/TokenTypes.d.ts +1 -1
- package/dist/types/generated/TokenTypes.js +1 -1
- package/dist/validators/StemmaTokenUsageValidator.js +3 -2
- package/dist/web/DesignTokens.web.css +1 -1
- package/governance/BUILD-SYSTEM-SETUP.md +1 -2
- package/governance/Component-Development-Guide.md +23 -13
- package/governance/Component-Development-Standards.md +21 -20
- package/governance/Component-Family-Avatar.md +6 -7
- package/governance/Component-Family-Badge.md +19 -20
- package/governance/Component-Family-Button.md +30 -43
- package/governance/Component-Family-Chip.md +14 -15
- package/governance/Component-Family-Container.md +12 -13
- package/governance/Component-Family-Data-Display.md +1 -2
- package/governance/Component-Family-Divider.md +1 -2
- package/governance/Component-Family-Form-Inputs.md +65 -65
- package/governance/Component-Family-Icon.md +9 -10
- package/governance/Component-Family-Loading.md +1 -2
- package/governance/Component-Family-Modal.md +1 -2
- package/governance/Component-Family-Navigation.md +1 -2
- package/governance/Component-Family-Progress.md +0 -1
- package/governance/Component-Inheritance-Structures.md +219 -99
- package/governance/Component-MCP-Document-Template.md +6 -5
- package/governance/Component-Primitive-vs-Semantic-Philosophy.md +1 -1
- package/governance/Component-Quick-Reference.md +33 -33
- package/governance/Component-Readiness-Status.md +59 -44
- package/governance/Component-Templates.md +57 -61
- package/governance/Contract-System-Reference.md +7 -7
- package/governance/MCP-Integration-Guide.md +1 -1
- package/governance/Process-Cross-Reference-Standards.md +31 -13
- package/governance/Process-Development-Workflow.md +49 -59
- package/governance/Process-File-Organization.md +25 -28
- package/governance/Process-Hook-Operations.md +22 -11
- package/governance/Process-Orchestration-Model-Selection.md +92 -0
- package/governance/Process-Spec-Planning.md +98 -52
- package/governance/Process-Task-Type-Definitions.md +80 -4
- package/governance/Product-Handoff-Protocol.md +2 -0
- package/governance/Rosetta-System-Architecture.md +13 -11
- package/governance/Test-Behavioral-Contract-Validation.md +38 -31
- package/governance/Test-Failure-Audit-Methodology.md +1 -1
- package/governance/Token-Family-Accessibility.md +1 -2
- package/governance/Token-Family-Blend.md +18 -16
- package/governance/Token-Family-Blur.md +0 -1
- package/governance/Token-Family-Border.md +1 -2
- package/governance/Token-Family-Color.md +0 -1
- package/governance/Token-Family-Glow.md +1 -2
- package/governance/Token-Family-Layering.md +0 -1
- package/governance/Token-Family-Motion.md +1 -2
- package/governance/Token-Family-Opacity.md +0 -1
- package/governance/Token-Family-Radius.md +1 -2
- package/governance/Token-Family-Responsive.md +1 -2
- package/governance/Token-Family-Shadow.md +1 -2
- package/governance/Token-Family-Sizing.md +0 -1
- package/governance/Token-Family-Spacing.md +1 -2
- package/governance/Token-Family-Typography.md +1 -2
- package/governance/Token-Governance.md +8 -8
- package/governance/Token-Quick-Reference.md +47 -34
- package/governance/Token-Resolution-Patterns.md +1 -1
- package/governance/Token-Semantic-Structure.md +1 -1
- package/governance/Web-Authoring-Standards.md +5 -5
- package/governance/browser-distribution-guide.md +1 -4
- package/governance/classification-map.md +474 -0
- package/governance/completion-documentation-guide.md +23 -37
- package/governance/component-meta-authoring-guide.md +1 -1
- package/governance/cross-platform-vs-platform-specific-decision-framework.md +1 -1
- package/governance/platform-implementation-guidelines.md +2 -3
- package/governance/release-management-system.md +28 -63
- package/governance/rosetta-system-principles.md +8 -6
- package/governance/stemma-system-principles.md +18 -17
- package/mcp-server/src/index.ts +24 -6
- package/mcp-server/src/indexer/DocumentIndexer.ts +119 -9
- package/mcp-server/src/indexer/__tests__/bare-id-crossrefs.test.ts +250 -0
- package/mcp-server/src/indexer/cross-ref-parser.ts +29 -1
- package/mcp-server/src/indexer/index-health.ts +27 -2
- package/mcp-server/src/query/__tests__/find-docs-calibration.test.ts +11 -26
- package/mcp-server/src/relocation-integrity-gate/__tests__/relocation-integrity-gate.test.ts +72 -5
- package/mcp-server/src/relocation-integrity-gate/relocation-integrity-gate.ts +81 -24
- package/mcp-server/src/tools/list-cross-references.ts +2 -2
- package/package.json +24 -26
- package/src/__tests__/browser-distribution/css-bundling.test.ts +6 -4
- package/src/__tests__/console-allowlist.json +14 -0
- package/src/__tests__/console-fail-setup.ts +169 -0
- package/src/__tests__/integration/Spec107-DesignLanguageContext.test.ts +16 -0
- package/src/__tests__/stemma-system/behavioral-contract-validation.test.ts +70 -17
- package/src/__tests__/stemma-system/contract-catalog-name-validation.test.ts +28 -0
- package/src/__tests__/stemma-system/form-inputs-contracts.test.ts +223 -16
- package/src/__tests__/stemma-system/input-text-native-base-call-alignment.test.ts +298 -0
- package/src/blend/OklchBlendCalculator.ts +3 -0
- package/src/blend/ThemeAwareBlendUtilities.android.kt +3 -0
- package/src/blend/ThemeAwareBlendUtilities.ios.swift +3 -0
- package/src/blend/ThemeAwareBlendUtilities.web.ts +9 -1
- package/src/blend/__tests__/InteractionStateAudit.test.ts +12 -9
- package/src/build/errors/__tests__/ErrorHandler.integration.test.ts +8 -0
- package/src/build/errors/__tests__/ErrorHandler.test.ts +5 -0
- package/src/build/tokens/__tests__/defineComponentTokens.test.ts +113 -0
- package/src/build/tokens/defineComponentTokens.ts +43 -1
- package/src/build/workflow/__tests__/CICDIntegration.test.ts +12 -1
- package/src/cli/__tests__/init.test.ts +45 -11
- package/src/components/core/Avatar-Base/Avatar-Base.schema.yaml +1 -1
- package/src/components/core/Avatar-Base/__tests__/Avatar.accessibility.test.ts +121 -7
- package/src/components/core/Avatar-Base/__tests__/Avatar.image.test.ts +3 -0
- package/src/components/core/Avatar-Base/__tests__/Avatar.test.ts +15 -6
- package/src/components/core/Avatar-Base/avatar.tokens.ts +31 -34
- package/src/components/core/Avatar-Base/contracts.yaml +11 -1
- package/src/components/core/Avatar-Base/index.ts +1 -1
- package/src/components/core/Avatar-Base/platforms/web/Avatar.web.ts +24 -5
- package/src/components/core/Badge-Count-Base/contracts.yaml +1 -1
- package/src/components/core/Badge-Label-Base/contracts.yaml +1 -1
- package/src/components/core/Button-CTA/Button-CTA.schema.yaml +2 -12
- package/src/components/core/Button-CTA/README.md +3 -6
- package/src/components/core/Button-CTA/__tests__/ButtonCTA.test.ts +35 -89
- package/src/components/core/Button-CTA/__tests__/setup.test.ts +0 -2
- package/src/components/core/Button-CTA/__tests__/test-utils.ts +0 -2
- package/src/components/core/Button-CTA/contracts.yaml +6 -29
- package/src/components/core/Button-CTA/examples/BasicUsage.html +2 -14
- package/src/components/core/Button-CTA/examples/BasicUsage.tsx +17 -44
- package/src/components/core/Button-CTA/platforms/android/ButtonCTA.android.kt +12 -20
- package/src/components/core/Button-CTA/platforms/ios/ButtonCTA.ios.swift +12 -51
- package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.css +2 -26
- package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.ts +18 -71
- package/src/components/core/Button-CTA/types.ts +10 -28
- package/src/components/core/Button-Icon/buttonIcon.tokens.ts +43 -27
- package/src/components/core/Chip-Base/__tests__/ChipBase.test.ts +13 -0
- package/src/components/core/Chip-Filter/__tests__/ChipFilter.test.ts +13 -0
- package/src/components/core/Chip-Input/__tests__/ChipInput.test.ts +13 -0
- package/src/components/core/Input-Text-Base/Input-Text-Base.schema.yaml +30 -2
- package/src/components/core/Input-Text-Base/README.md +25 -2
- package/src/components/core/Input-Text-Base/__tests__/focusIndicators.test.ts +16 -15
- package/src/components/core/Input-Text-Base/contracts.yaml +90 -0
- package/src/components/core/Input-Text-Base/platforms/android/InputTextBase.android.kt +26 -12
- package/src/components/core/Input-Text-Base/platforms/ios/InputTextBase.ios.swift +195 -59
- package/src/components/core/Input-Text-Base/types.ts +13 -1
- package/src/components/core/Input-Text-Email/Input-Text-Email.schema.yaml +5 -1
- package/src/components/core/Input-Text-Email/README.md +8 -7
- package/src/components/core/Input-Text-Email/platforms/android/InputTextEmail.android.kt +1 -4
- package/src/components/core/Input-Text-Email/platforms/ios/InputTextEmail.ios.swift +2 -16
- package/src/components/core/Input-Text-Password/Input-Text-Password.schema.yaml +10 -3
- package/src/components/core/Input-Text-Password/README.md +9 -8
- package/src/components/core/Input-Text-Password/contracts.yaml +5 -0
- package/src/components/core/Input-Text-Password/platforms/android/InputTextPassword.android.kt +17 -7
- package/src/components/core/Input-Text-Password/platforms/ios/InputTextPassword.ios.swift +22 -20
- package/src/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.ts +11 -2
- package/src/components/core/Input-Text-PhoneNumber/Input-Text-PhoneNumber.schema.yaml +5 -1
- package/src/components/core/Input-Text-PhoneNumber/README.md +9 -8
- package/src/components/core/Input-Text-PhoneNumber/platforms/android/InputTextPhoneNumber.android.kt +2 -5
- package/src/components/core/Input-Text-PhoneNumber/platforms/ios/InputTextPhoneNumber.ios.swift +3 -17
- package/src/components/core/Nav-Header-App/contracts.yaml +1 -1
- package/src/components/core/Nav-SegmentedChoice-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Indicator-Connector-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Indicator-Label-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Indicator-Node-Base/contracts.yaml +1 -1
- package/src/components/core/Progress-Stepper-Base/__tests__/StepperBase.test.ts +5 -2
- package/src/components/core/Progress-Stepper-Detailed/__tests__/StepperDetailed.test.ts +5 -2
- package/src/generators/DTCGFormatGenerator.ts +6 -0
- package/src/generators/TokenFileGenerator.ts +7 -2
- package/src/generators/__tests__/DTCGConfigOptions.test.ts +14 -5
- package/src/integration/BuildErrorHandler.ts +2 -2
- package/src/tokens/OpacityTokens.ts +1 -1
- package/src/tokens/__tests__/OpacityTokens.test.ts +3 -1
- 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/tokens/semantic/BlendTokens.ts +26 -5
- package/src/tokens/semantic/OpacityTokens.ts +4 -4
- package/src/types/ComponentTypes.ts +1 -1
- package/src/types/generated/TokenTypes.ts +1 -1
- package/src/validators/StemmaTokenUsageValidator.ts +3 -2
- package/token-index/components.yaml +8 -8
- package/token-index/semantics.yaml +1 -2
- 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
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* the design system while maintaining semantic meaning.
|
|
7
7
|
*
|
|
8
8
|
* Opacity values:
|
|
9
|
-
* - subtle:
|
|
10
|
-
* - medium:
|
|
11
|
-
* - heavy:
|
|
12
|
-
* - ghost:
|
|
9
|
+
* - subtle: opacity088 (88%) - Minimal transparency for subtle effects
|
|
10
|
+
* - medium: opacity072 (72%) - Moderate transparency for overlays
|
|
11
|
+
* - heavy: opacity048 (48%) - Strong transparency for backgrounds
|
|
12
|
+
* - ghost: opacity032 (32%) - Maximum transparency for ghost effects
|
|
13
13
|
*
|
|
14
14
|
* All opacity tokens reference primitive opacity values that can be applied
|
|
15
15
|
* to any color or surface for consistent transparency effects.
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* the design system while maintaining semantic meaning.
|
|
8
8
|
*
|
|
9
9
|
* Opacity values:
|
|
10
|
-
* - subtle:
|
|
11
|
-
* - medium:
|
|
12
|
-
* - heavy:
|
|
13
|
-
* - ghost:
|
|
10
|
+
* - subtle: opacity088 (88%) - Minimal transparency for subtle effects
|
|
11
|
+
* - medium: opacity072 (72%) - Moderate transparency for overlays
|
|
12
|
+
* - heavy: opacity048 (48%) - Strong transparency for backgrounds
|
|
13
|
+
* - ghost: opacity032 (32%) - Maximum transparency for ghost effects
|
|
14
14
|
*
|
|
15
15
|
* All opacity tokens reference primitive opacity values that can be applied
|
|
16
16
|
* to any color or surface for consistent transparency effects.
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
* }
|
|
65
65
|
* ```
|
|
66
66
|
*
|
|
67
|
-
* @see {@link https://github.com/3fn/
|
|
67
|
+
* @see {@link https://github.com/3fn/DesignerPunk/blob/main/.kiro/specs/011-inset-token-renaming/design.md | Inset Token Renaming Design}
|
|
68
68
|
*/
|
|
69
69
|
export type InsetPadding = 'inset050' | 'inset100' | 'inset150' | 'inset200' | 'inset300' | 'inset400';
|
|
70
70
|
//# sourceMappingURL=ComponentTypes.d.ts.map
|
|
@@ -208,9 +208,10 @@ exports.TOKEN_CATEGORIES = {
|
|
|
208
208
|
'border.default', 'border.strong',
|
|
209
209
|
'radius.100', 'radius.150', 'radius.200',
|
|
210
210
|
],
|
|
211
|
+
// blend.disabledDesaturate removed 2026-07-15: deprecated (no-disabled-states
|
|
212
|
+
// philosophy) — the validator must not suggest it for new component work
|
|
211
213
|
blend: [
|
|
212
|
-
'blend.hoverDarker', 'blend.pressedDarker',
|
|
213
|
-
'blend.disabledDesaturate', 'blend.iconLighter',
|
|
214
|
+
'blend.hoverDarker', 'blend.pressedDarker', 'blend.iconLighter',
|
|
214
215
|
],
|
|
215
216
|
};
|
|
216
217
|
/**
|
|
@@ -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`.
|
|
@@ -61,7 +61,7 @@ description: Guide for building components with appropriate token usage, True Na
|
|
|
61
61
|
4. ✅ **Icon Integration Anti-Patterns** (what NOT to do)
|
|
62
62
|
5. ✅ **Icon Integration Checklist** (verification steps)
|
|
63
63
|
|
|
64
|
-
**WHEN implementing interaction states (hover, pressed, focus
|
|
64
|
+
**WHEN implementing interaction states (hover, pressed, focus) THEN read:**
|
|
65
65
|
1. ✅ **Blend Utility Integration** (how to use blend utilities for state colors)
|
|
66
66
|
2. ✅ **Semantic Blend Token Reference** (which token/function for each state)
|
|
67
67
|
3. ✅ **Blend Utility Anti-Patterns** (what NOT to do - no opacity, no filters)
|
|
@@ -433,7 +433,8 @@ export interface ButtonCTAProps {
|
|
|
433
433
|
variant?: 'primary' | 'secondary' | 'danger'; // ✅ Use variant
|
|
434
434
|
size?: 'small' | 'medium' | 'large';
|
|
435
435
|
icon?: string;
|
|
436
|
-
disabled
|
|
436
|
+
// No `disabled` prop — DesignerPunk components do not support disabled
|
|
437
|
+
// states (see "No Disabled States" under Behavioral Contracts Workflow).
|
|
437
438
|
}
|
|
438
439
|
```
|
|
439
440
|
|
|
@@ -494,14 +495,27 @@ Author `contracts.yaml` after `types.ts` and before platform implementation. Con
|
|
|
494
495
|
### Naming Convention
|
|
495
496
|
|
|
496
497
|
All contract names follow `{category}_{concept}` in `snake_case`:
|
|
497
|
-
- `interaction_focusable`, `
|
|
498
|
+
- `interaction_focusable`, `state_error`, `accessibility_reduced_motion`
|
|
498
499
|
- 10 categories: accessibility, animation, composition, content, interaction, layout, performance, state, validation, visual
|
|
499
500
|
|
|
501
|
+
### No Disabled States
|
|
502
|
+
|
|
503
|
+
**DesignerPunk components MUST NOT declare a disabled-state contract.** Per the 2026-07-15 adjudication (`.kiro/issues/button-cta-disabled-state-adjudication.md`), the no-disabled-states philosophy holds corpus-wide with zero exceptions. Every component's `contracts.yaml` MUST instead carry the standardized exclusion block:
|
|
504
|
+
|
|
505
|
+
```yaml
|
|
506
|
+
excludes:
|
|
507
|
+
state_disabled:
|
|
508
|
+
reason: "DesignerPunk does not support disabled states for usability and accessibility reasons. If an action is unavailable, the component should not be rendered."
|
|
509
|
+
category: state
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
If an action is temporarily unavailable, use one of these alternatives instead: `state_loading` (in-flight async operation), validate-on-press/validate-on-blur (surface the error rather than disabling the trigger), or don't render the component (no valid path forward). See Component-Templates.md § "No Disabled States — Standardized Exclusion" for the full rationale and reference implementation.
|
|
513
|
+
|
|
500
514
|
### Concept Catalog Consultation
|
|
501
515
|
|
|
502
516
|
Before naming a contract, query the Concept Catalog via MCP:
|
|
503
517
|
```
|
|
504
|
-
get_section({ path: "
|
|
518
|
+
get_section({ path: "contract-system-reference", heading: "Concept Catalog" })
|
|
505
519
|
```
|
|
506
520
|
- Use existing catalog concepts whenever possible
|
|
507
521
|
- If a behavior needs a new concept, propose a catalog addition (ballot measure) before using it
|
|
@@ -517,7 +531,7 @@ get_section({ path: ".kiro/steering/Contract-System-Reference.md", heading: "Con
|
|
|
517
531
|
|
|
518
532
|
For the full contract system (taxonomy, canonical format, classification rules, inheritance patterns):
|
|
519
533
|
```
|
|
520
|
-
get_document_full({ path: "
|
|
534
|
+
get_document_full({ path: "contract-system-reference" })
|
|
521
535
|
```
|
|
522
536
|
|
|
523
537
|
---
|
|
@@ -1036,7 +1050,7 @@ theme.colorActionPrimary
|
|
|
1036
1050
|
|
|
1037
1051
|
### Overview
|
|
1038
1052
|
|
|
1039
|
-
Blend utilities enable components to create new opaque colors for interaction states (hover, pressed, focus
|
|
1053
|
+
Blend utilities enable components to create new opaque colors for interaction states (hover, pressed, focus) rather than using opacity-based workarounds. All components should use blend utilities for state color modifications.
|
|
1040
1054
|
|
|
1041
1055
|
### Why Blend Utilities Over CSS Filters
|
|
1042
1056
|
|
|
@@ -1064,7 +1078,7 @@ Blend utilities enable components to create new opaque colors for interaction st
|
|
|
1064
1078
|
|
|
1065
1079
|
- Importing `getBlendUtilities()` from the theme-aware blend utilities module
|
|
1066
1080
|
- Initializing blend utilities in the constructor
|
|
1067
|
-
- Calculating state colors (hover, pressed,
|
|
1081
|
+
- Calculating state colors (hover, pressed, icon) in `connectedCallback()`
|
|
1068
1082
|
- Applying calculated colors via CSS custom properties
|
|
1069
1083
|
- Retry pattern for handling CSS custom property timing
|
|
1070
1084
|
|
|
@@ -1076,7 +1090,6 @@ Blend utilities enable components to create new opaque colors for interaction st
|
|
|
1076
1090
|
- Hover state colors (darken or lighten based on background)
|
|
1077
1091
|
- Pressed state colors (stronger darkening than hover)
|
|
1078
1092
|
- Focus state colors (increased saturation for emphasis)
|
|
1079
|
-
- Disabled state colors (desaturation for muted appearance)
|
|
1080
1093
|
- Icon optical balance (lightening for visual weight compensation)
|
|
1081
1094
|
|
|
1082
1095
|
### Web Platform Usage
|
|
@@ -1096,7 +1109,6 @@ class MyComponent extends HTMLElement {
|
|
|
1096
1109
|
// Calculate state colors
|
|
1097
1110
|
this._hoverColor = blendUtils.hoverColor(primaryColor); // 8% darker
|
|
1098
1111
|
this._pressedColor = blendUtils.pressedColor(primaryColor); // 12% darker
|
|
1099
|
-
this._disabledColor = blendUtils.disabledColor(primaryColor); // 12% desaturated
|
|
1100
1112
|
this._focusColor = blendUtils.focusColor(primaryColor); // 8% more saturated
|
|
1101
1113
|
}
|
|
1102
1114
|
}
|
|
@@ -1145,7 +1157,6 @@ fun MyComponent(primaryColor: Color) {
|
|
|
1145
1157
|
| Hover (dark bg) | `blend.hoverLighter` | `lighterBlend(color, 0.08)` | 8% lighter |
|
|
1146
1158
|
| Pressed | `blend.pressedDarker` | `pressedColor()` | 12% darker |
|
|
1147
1159
|
| Focus | `blend.focusSaturate` | `focusColor()` | 8% more saturated |
|
|
1148
|
-
| Disabled | `blend.disabledDesaturate` | `disabledColor()` | 12% desaturated |
|
|
1149
1160
|
| Container hover | `blend.containerHoverDarker` | `darkerBlend(color, 0.04)` | 4% darker |
|
|
1150
1161
|
| Icon optical | `color.icon.opticalBalance` | `iconColor()` | 8% lighter |
|
|
1151
1162
|
|
|
@@ -1464,7 +1475,7 @@ All component-scoped CSS custom properties MUST use the `--_[abbrev]-*` naming p
|
|
|
1464
1475
|
| Button-CTA | `_cta` | `--_cta-hover-bg`, `--_cta-pressed-bg` |
|
|
1465
1476
|
| Button-VerticalList-Item | `_vlbi` | `--_vlbi-background`, `--_vlbi-border-color` |
|
|
1466
1477
|
| ButtonIcon | `_bi` | `--_bi-hover-bg`, `--_bi-icon-color` |
|
|
1467
|
-
| Input-Text-Base | `_itb` | `--_itb-focus-color
|
|
1478
|
+
| Input-Text-Base | `_itb` | `--_itb-focus-color` |
|
|
1468
1479
|
|
|
1469
1480
|
### When to Use Each Type
|
|
1470
1481
|
|
|
@@ -1492,7 +1503,6 @@ All component-scoped CSS custom properties MUST use the `--_[abbrev]-*` naming p
|
|
|
1492
1503
|
/* Component-scoped properties - internal, calculated */
|
|
1493
1504
|
--_cta-hover-bg: /* calculated by blend utilities */;
|
|
1494
1505
|
--_cta-pressed-bg: /* calculated by blend utilities */;
|
|
1495
|
-
--_cta-disabled-bg: /* calculated by blend utilities */;
|
|
1496
1506
|
}
|
|
1497
1507
|
|
|
1498
1508
|
.button-cta {
|
|
@@ -1866,7 +1876,7 @@ Components come with their own unique properties that might include, but are not
|
|
|
1866
1876
|
5. **README** (required) - Create comprehensive component documentation
|
|
1867
1877
|
6. **HTML Canaries** (required) - Create validation examples
|
|
1868
1878
|
7. **Implementation** (required) - Build component across platforms
|
|
1869
|
-
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)*
|
|
1870
1880
|
9. **Demo Page** (if web implementation) - Create or update demo in `demos/` (see Demo Maintenance Checklist)
|
|
1871
1881
|
|
|
1872
1882
|
This workflow produces clearer requirements, better documentation, and validation that ensures documentation stays accurate.
|
|
@@ -13,7 +13,7 @@ description: Step-by-step guidelines for creating new component families in the
|
|
|
13
13
|
**Scope**: cross-project
|
|
14
14
|
**Layer**: 2
|
|
15
15
|
**Relevant Tasks**: component-development, architecture, spec-planning
|
|
16
|
-
**Last Reviewed**: 2026-
|
|
16
|
+
**Last Reviewed**: 2026-07-05
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -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
|
|
@@ -1121,7 +1122,7 @@ test_integration:
|
|
|
1121
1122
|
#### Completion Documentation
|
|
1122
1123
|
|
|
1123
1124
|
1. **Create Summary Document**: `docs/specs/[spec-name]/task-N-summary.md`
|
|
1124
|
-
2. **
|
|
1125
|
+
2. **Open the Task PR**: `./.kiro/hooks/complete-task.sh "Task N Complete: Description (<spec>)"` — complete at merge; release analysis runs post-merge on `main`
|
|
1125
1126
|
|
|
1126
1127
|
#### Version Impact
|
|
1127
1128
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
id: component-family-avatar
|
|
3
3
|
inclusion: manual
|
|
4
4
|
name: Component-Family-Avatar
|
|
5
|
-
aliases: avatar family work
|
|
6
5
|
description: Avatar component family — identity representation with shape-based entity differentiation (circle for humans, hexagon for AI agents), image support with loading states and fallback. Load when working with avatar components, identity representation, or user/agent visual differentiation.
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -81,13 +80,13 @@ Avatar-Base (Primitive) [IMPLEMENTED]
|
|
|
81
80
|
|
|
82
81
|
| Contract | Description | WCAG | Platforms |
|
|
83
82
|
|----------|-------------|------|-----------|
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
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 |
|
|
87
86
|
| `error_handling` | Falls back to icon on image load failure | N/A | web, ios, android |
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
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 |
|
|
91
90
|
| `wrapper_delegation` | No onClick/onPress - wrapper handles interaction | 2.1.1 | web, ios, android |
|
|
92
91
|
|
|
93
92
|
---
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
id: component-family-badge
|
|
3
3
|
inclusion: manual
|
|
4
4
|
name: Component-Family-Badge
|
|
5
|
-
aliases: badge family work
|
|
6
5
|
description: Badge component family — read-only, non-interactive visual indicators for status, category, or metadata display. Load when working with badge components, status indicators, or notification counts.
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -78,24 +77,24 @@ Badge (Family)
|
|
|
78
77
|
|
|
79
78
|
| Contract | Description | WCAG | Platforms |
|
|
80
79
|
|----------|-------------|------|-----------|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
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 |
|
|
87
86
|
|
|
88
87
|
### Base Contracts (Badge-Count-Base)
|
|
89
88
|
|
|
90
89
|
| Contract | Description | WCAG | Platforms |
|
|
91
90
|
|----------|-------------|------|-----------|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
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 |
|
|
99
98
|
|
|
100
99
|
### Extended Contracts (Badge-Count-Notification)
|
|
101
100
|
|
|
@@ -103,13 +102,13 @@ Inherits all contracts from Badge-Count-Base, plus:
|
|
|
103
102
|
|
|
104
103
|
| Contract | Description | WCAG | Platforms |
|
|
105
104
|
|----------|-------------|------|-----------|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
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 |
|
|
109
108
|
|
|
110
109
|
### Contract Details
|
|
111
110
|
|
|
112
|
-
####
|
|
111
|
+
#### content_displays_label
|
|
113
112
|
|
|
114
113
|
**Description**: Renders the provided text label visibly within the badge container.
|
|
115
114
|
|
|
@@ -122,7 +121,7 @@ Inherits all contracts from Badge-Count-Base, plus:
|
|
|
122
121
|
|
|
123
122
|
**WCAG Compliance**: 1.3.1 Info and Relationships
|
|
124
123
|
|
|
125
|
-
####
|
|
124
|
+
#### accessibility_non_interactive
|
|
126
125
|
|
|
127
126
|
**Description**: Badge components do not respond to user interaction.
|
|
128
127
|
|
|
@@ -133,7 +132,7 @@ Inherits all contracts from Badge-Count-Base, plus:
|
|
|
133
132
|
- iOS: No onTapGesture, not focusable
|
|
134
133
|
- Android: No clickable modifier, not focusable
|
|
135
134
|
|
|
136
|
-
####
|
|
135
|
+
#### accessibility_announces_changes
|
|
137
136
|
|
|
138
137
|
**Description**: When count changes and announceChanges is enabled, screen readers are notified.
|
|
139
138
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
id: component-family-button
|
|
3
3
|
inclusion: manual
|
|
4
4
|
name: Component-Family-Button
|
|
5
|
-
aliases: button family work
|
|
6
5
|
description: Button component family — ButtonCTA variants, sizes, icon support, interaction states, and platform implementations. Load when working with button components or button behavioral contracts.
|
|
7
6
|
---
|
|
8
7
|
|
|
@@ -32,7 +31,7 @@ The Buttons family provides interactive components for triggering user actions w
|
|
|
32
31
|
|
|
33
32
|
- **Visual Hierarchy**: Three visual variants (primary, secondary, tertiary) establish clear action hierarchy
|
|
34
33
|
- **Size Variants**: Three sizes (small, medium, large) for different contexts and emphasis levels
|
|
35
|
-
- **Interaction States**: Comprehensive hover, pressed,
|
|
34
|
+
- **Interaction States**: Comprehensive hover, pressed, and loading states (no disabled state — DesignerPunk philosophy)
|
|
36
35
|
- **Accessibility First**: WCAG 2.1 AA compliant with keyboard navigation and screen reader support
|
|
37
36
|
- **Cross-Platform Consistent**: Platform-appropriate feedback (ripple on Android, scale on iOS)
|
|
38
37
|
|
|
@@ -98,37 +97,36 @@ Button-CTA uses the `[Family]-[Type]` pattern without a variant suffix because i
|
|
|
98
97
|
|
|
99
98
|
### Base Contracts
|
|
100
99
|
|
|
101
|
-
All Button-CTA instances implement these
|
|
100
|
+
All Button-CTA instances implement these 6 foundational contracts:
|
|
102
101
|
|
|
103
102
|
| Contract | Description | WCAG | Platforms |
|
|
104
103
|
|----------|-------------|------|-----------|
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
107
|
-
| `
|
|
108
|
-
| `
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `focus_ring` | WCAG 2.4.7 focus visible indicator | 2.4.7 | web, ios, android |
|
|
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 |
|
|
112
110
|
|
|
113
111
|
### Contract Details
|
|
114
112
|
|
|
115
|
-
####
|
|
113
|
+
#### interaction_focusable
|
|
116
114
|
|
|
117
115
|
**Description**: Component can receive keyboard focus via Tab key navigation.
|
|
118
116
|
|
|
119
|
-
**Behavior**: Focus state is visually indicated with a focus ring.
|
|
117
|
+
**Behavior**: Focus state is visually indicated with a focus ring.
|
|
120
118
|
|
|
121
119
|
**WCAG Compliance**: 2.1.1 Keyboard, 2.4.7 Focus Visible
|
|
122
120
|
|
|
123
|
-
####
|
|
121
|
+
#### interaction_pressable
|
|
124
122
|
|
|
125
123
|
**Description**: Component responds to click, tap, Enter key, and Space key.
|
|
126
124
|
|
|
127
|
-
**Behavior**: Press triggers the onPress callback
|
|
125
|
+
**Behavior**: Press triggers the onPress callback. Platform-appropriate feedback is provided during press (ripple on Android, scale on iOS).
|
|
128
126
|
|
|
129
127
|
**WCAG Compliance**: 2.1.1 Keyboard
|
|
130
128
|
|
|
131
|
-
####
|
|
129
|
+
#### interaction_hover
|
|
132
130
|
|
|
133
131
|
**Description**: Visual feedback on hover (desktop only).
|
|
134
132
|
|
|
@@ -136,7 +134,7 @@ All Button-CTA instances implement these 7 foundational contracts:
|
|
|
136
134
|
|
|
137
135
|
**WCAG Compliance**: 1.4.13 Content on Hover or Focus
|
|
138
136
|
|
|
139
|
-
####
|
|
137
|
+
#### interaction_pressed
|
|
140
138
|
|
|
141
139
|
**Description**: Visual feedback when pressed.
|
|
142
140
|
|
|
@@ -144,15 +142,7 @@ All Button-CTA instances implement these 7 foundational contracts:
|
|
|
144
142
|
|
|
145
143
|
**WCAG Compliance**: 2.4.7 Focus Visible
|
|
146
144
|
|
|
147
|
-
####
|
|
148
|
-
|
|
149
|
-
**Description**: Prevents interaction when disabled.
|
|
150
|
-
|
|
151
|
-
**Behavior**: When disabled, component cannot receive focus, cannot be clicked/tapped, uses desaturated colors (`blend.disabledDesaturate` - 12% less saturated), shows `cursor: not-allowed` (web), and communicates disabled state to assistive technology.
|
|
152
|
-
|
|
153
|
-
**WCAG Compliance**: 4.1.2 Name, Role, Value
|
|
154
|
-
|
|
155
|
-
#### focus_ring
|
|
145
|
+
#### interaction_focus_ring
|
|
156
146
|
|
|
157
147
|
**Description**: WCAG 2.4.7 focus visible indicator.
|
|
158
148
|
|
|
@@ -179,7 +169,6 @@ All Button-CTA instances implement these 7 foundational contracts:
|
|
|
179
169
|
| `variant` | `'primary' \| 'secondary' \| 'tertiary'` | No | `'primary'` | Visual variant for hierarchy |
|
|
180
170
|
| `icon` | `IconName` | No | - | Optional leading icon |
|
|
181
171
|
| `noWrap` | `boolean` | No | `false` | Truncate text instead of wrapping |
|
|
182
|
-
| `disabled` | `boolean` | No | `false` | Disabled state |
|
|
183
172
|
| `onPress` | `() => void` | Yes | - | Press callback |
|
|
184
173
|
| `testID` | `string` | No | - | Test identifier |
|
|
185
174
|
|
|
@@ -303,14 +292,14 @@ Container component that orchestrates selection behavior across child Button-Ver
|
|
|
303
292
|
|
|
304
293
|
| Contract | Description | WCAG |
|
|
305
294
|
|----------|-------------|------|
|
|
306
|
-
| `
|
|
307
|
-
| `
|
|
308
|
-
| `
|
|
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 | - |
|
|
309
298
|
| `animation_coordination` | Coordinates transition timing across children | 2.3.3 |
|
|
310
|
-
| `
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
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 |
|
|
314
303
|
|
|
315
304
|
#### Usage Example
|
|
316
305
|
|
|
@@ -394,14 +383,14 @@ Presentational button component for vertical list selection patterns. Renders vi
|
|
|
394
383
|
|
|
395
384
|
| Contract | Description | WCAG |
|
|
396
385
|
|----------|-------------|------|
|
|
397
|
-
| `
|
|
398
|
-
| `
|
|
399
|
-
| `
|
|
400
|
-
| `
|
|
401
|
-
| `
|
|
402
|
-
| `
|
|
403
|
-
| `
|
|
404
|
-
| `
|
|
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 |
|
|
405
394
|
|
|
406
395
|
#### Usage Example
|
|
407
396
|
|
|
@@ -503,7 +492,6 @@ Button components rely on three semantic concepts:
|
|
|
503
492
|
| Icon | `icon.size100`, `icon.size125` | Icon sizing |
|
|
504
493
|
| Blend | `blend.hoverDarker` | Hover state (8% darker) |
|
|
505
494
|
| Blend | `blend.pressedDarker` | Pressed state (12% darker) |
|
|
506
|
-
| Blend | `blend.disabledDesaturate` | Disabled state (12% less saturated) |
|
|
507
495
|
|
|
508
496
|
**Why Semantic Concept Tokens**:
|
|
509
497
|
- **Action concept**: `color.action.primary` clearly indicates emphasized interactive elements
|
|
@@ -650,7 +638,6 @@ iOS uses scale transforms + color blends for all press feedback. The ripple dist
|
|
|
650
638
|
|
|
651
639
|
All platforms implement the same behavioral contracts:
|
|
652
640
|
- Press feedback timing matches across platforms
|
|
653
|
-
- Disabled state appearance is mathematically equivalent
|
|
654
641
|
- Focus ring appearance is consistent
|
|
655
642
|
- Touch targets meet platform guidelines
|
|
656
643
|
|