@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.
Files changed (284) hide show
  1. package/.kiro/agents/ada-prompt.md +80 -132
  2. package/.kiro/agents/ada-prompt.md.attribution.json +45 -0
  3. package/.kiro/agents/ada.json +44 -59
  4. package/.kiro/agents/ada.json.attribution.json +13 -0
  5. package/.kiro/agents/data-prompt.md +83 -74
  6. package/.kiro/agents/data-prompt.md.attribution.json +53 -0
  7. package/.kiro/agents/data.json +31 -38
  8. package/.kiro/agents/data.json.attribution.json +13 -0
  9. package/.kiro/agents/kenya-prompt.md +83 -72
  10. package/.kiro/agents/kenya-prompt.md.attribution.json +53 -0
  11. package/.kiro/agents/kenya.json +27 -35
  12. package/.kiro/agents/kenya.json.attribution.json +13 -0
  13. package/.kiro/agents/leonardo-prompt.md +176 -234
  14. package/.kiro/agents/leonardo-prompt.md.attribution.json +45 -0
  15. package/.kiro/agents/leonardo.json +28 -36
  16. package/.kiro/agents/leonardo.json.attribution.json +13 -0
  17. package/.kiro/agents/lina-prompt.md +110 -151
  18. package/.kiro/agents/lina-prompt.md.attribution.json +53 -0
  19. package/.kiro/agents/lina.json +46 -59
  20. package/.kiro/agents/lina.json.attribution.json +13 -0
  21. package/.kiro/agents/sparky-prompt.md +89 -72
  22. package/.kiro/agents/sparky-prompt.md.attribution.json +53 -0
  23. package/.kiro/agents/sparky.json +37 -37
  24. package/.kiro/agents/sparky.json.attribution.json +13 -0
  25. package/.kiro/agents/stacy-prompt.md +74 -48
  26. package/.kiro/agents/stacy-prompt.md.attribution.json +45 -0
  27. package/.kiro/agents/stacy.json +28 -30
  28. package/.kiro/agents/stacy.json.attribution.json +13 -0
  29. package/.kiro/agents/thurgood-prompt.md +94 -138
  30. package/.kiro/agents/thurgood-prompt.md.attribution.json +45 -0
  31. package/.kiro/agents/thurgood.json +31 -35
  32. package/.kiro/agents/thurgood.json.attribution.json +13 -0
  33. package/.kiro/steering/AI-Collaboration-Principles.md +3 -3
  34. package/.kiro/steering/Civitas-System-Overview.md +7 -16
  35. package/.kiro/steering/DesignerPunk-Systems-Overview.md +6 -6
  36. package/.kiro/steering/Spec-Feedback-Protocol.md +2 -11
  37. package/.kiro/steering/Task-Completion-Protocol.md +98 -17
  38. package/.kiro/steering/core-goals.md +3 -3
  39. package/.kiro/steering/personal-note.md +1 -1
  40. package/.kiro/steering/start-up-tasks.md +17 -6
  41. package/application-mcp-server/src/index.ts +26 -0
  42. package/dist/ComponentTokens.android.kt +12 -12
  43. package/dist/ComponentTokens.ios.swift +12 -12
  44. package/dist/ComponentTokens.web.css +3 -3
  45. package/dist/DesignTokens.android.kt +1 -1
  46. package/dist/DesignTokens.dtcg.json +8 -5
  47. package/dist/DesignTokens.figma.json +2 -2
  48. package/dist/DesignTokens.ios.swift +1 -1
  49. package/dist/DesignTokens.web.css +1 -1
  50. package/dist/android/DesignTokens.android.kt +1 -1
  51. package/dist/blend/OklchBlendCalculator.js +1 -0
  52. package/dist/blend/ThemeAwareBlendUtilities.web.d.ts +13 -2
  53. package/dist/blend/ThemeAwareBlendUtilities.web.js +6 -1
  54. package/dist/browser/designerpunk.esm.js +36 -90
  55. package/dist/browser/designerpunk.esm.min.js +33 -36
  56. package/dist/browser/designerpunk.umd.js +36 -90
  57. package/dist/browser/designerpunk.umd.min.js +47 -50
  58. package/dist/browser/tokens.css +3 -3
  59. package/dist/build/tokens/defineComponentTokens.d.ts +10 -0
  60. package/dist/build/tokens/defineComponentTokens.js +26 -0
  61. package/dist/components/core/Avatar-Base/avatar.tokens.d.ts +21 -26
  62. package/dist/components/core/Avatar-Base/avatar.tokens.js +31 -34
  63. package/dist/components/core/Avatar-Base/index.d.ts +1 -1
  64. package/dist/components/core/Avatar-Base/index.js +2 -2
  65. package/dist/components/core/Avatar-Base/platforms/web/Avatar.web.js +24 -5
  66. package/dist/components/core/Button-CTA/examples/BasicUsage.d.ts +16 -28
  67. package/dist/components/core/Button-CTA/examples/BasicUsage.js +18 -43
  68. package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.d.ts +3 -15
  69. package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.js +9 -58
  70. package/dist/components/core/Button-CTA/types.d.ts +0 -24
  71. package/dist/components/core/Button-CTA/types.js +6 -0
  72. package/dist/components/core/Button-Icon/buttonIcon.tokens.d.ts +28 -14
  73. package/dist/components/core/Button-Icon/buttonIcon.tokens.js +35 -20
  74. package/dist/components/core/Input-Text-Base/types.d.ts +13 -1
  75. package/dist/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.js +11 -2
  76. package/dist/generators/DTCGFormatGenerator.js +8 -0
  77. package/dist/generators/TokenFileGenerator.js +7 -2
  78. package/dist/integration/BuildErrorHandler.js +2 -2
  79. package/dist/ios/DesignTokens.ios.swift +1 -1
  80. package/dist/mcp/application-mcp.js +24 -0
  81. package/dist/mcp/docs-mcp.js +130 -15
  82. package/dist/mcp/product-mcp.js +25 -0
  83. package/dist/tokens/OpacityTokens.js +1 -1
  84. package/dist/tokens/component/progress.d.ts +65 -5
  85. package/dist/tokens/component/progress.js +79 -18
  86. package/dist/tokens/semantic/BlendTokens.d.ts +10 -3
  87. package/dist/tokens/semantic/BlendTokens.js +17 -5
  88. package/dist/tokens/semantic/OpacityTokens.d.ts +4 -4
  89. package/dist/tokens/semantic/OpacityTokens.js +4 -4
  90. package/dist/types/ComponentTypes.d.ts +1 -1
  91. package/dist/types/generated/TokenTypes.d.ts +1 -1
  92. package/dist/types/generated/TokenTypes.js +1 -1
  93. package/dist/validators/StemmaTokenUsageValidator.js +3 -2
  94. package/dist/web/DesignTokens.web.css +1 -1
  95. package/governance/BUILD-SYSTEM-SETUP.md +1 -2
  96. package/governance/Component-Development-Guide.md +23 -13
  97. package/governance/Component-Development-Standards.md +21 -20
  98. package/governance/Component-Family-Avatar.md +6 -7
  99. package/governance/Component-Family-Badge.md +19 -20
  100. package/governance/Component-Family-Button.md +30 -43
  101. package/governance/Component-Family-Chip.md +14 -15
  102. package/governance/Component-Family-Container.md +12 -13
  103. package/governance/Component-Family-Data-Display.md +1 -2
  104. package/governance/Component-Family-Divider.md +1 -2
  105. package/governance/Component-Family-Form-Inputs.md +65 -65
  106. package/governance/Component-Family-Icon.md +9 -10
  107. package/governance/Component-Family-Loading.md +1 -2
  108. package/governance/Component-Family-Modal.md +1 -2
  109. package/governance/Component-Family-Navigation.md +1 -2
  110. package/governance/Component-Family-Progress.md +0 -1
  111. package/governance/Component-Inheritance-Structures.md +219 -99
  112. package/governance/Component-MCP-Document-Template.md +6 -5
  113. package/governance/Component-Primitive-vs-Semantic-Philosophy.md +1 -1
  114. package/governance/Component-Quick-Reference.md +33 -33
  115. package/governance/Component-Readiness-Status.md +59 -44
  116. package/governance/Component-Templates.md +57 -61
  117. package/governance/Contract-System-Reference.md +7 -7
  118. package/governance/MCP-Integration-Guide.md +1 -1
  119. package/governance/Process-Cross-Reference-Standards.md +31 -13
  120. package/governance/Process-Development-Workflow.md +49 -59
  121. package/governance/Process-File-Organization.md +25 -28
  122. package/governance/Process-Hook-Operations.md +22 -11
  123. package/governance/Process-Orchestration-Model-Selection.md +92 -0
  124. package/governance/Process-Spec-Planning.md +98 -52
  125. package/governance/Process-Task-Type-Definitions.md +80 -4
  126. package/governance/Product-Handoff-Protocol.md +2 -0
  127. package/governance/Rosetta-System-Architecture.md +13 -11
  128. package/governance/Test-Behavioral-Contract-Validation.md +38 -31
  129. package/governance/Test-Failure-Audit-Methodology.md +1 -1
  130. package/governance/Token-Family-Accessibility.md +1 -2
  131. package/governance/Token-Family-Blend.md +18 -16
  132. package/governance/Token-Family-Blur.md +0 -1
  133. package/governance/Token-Family-Border.md +1 -2
  134. package/governance/Token-Family-Color.md +0 -1
  135. package/governance/Token-Family-Glow.md +1 -2
  136. package/governance/Token-Family-Layering.md +0 -1
  137. package/governance/Token-Family-Motion.md +1 -2
  138. package/governance/Token-Family-Opacity.md +0 -1
  139. package/governance/Token-Family-Radius.md +1 -2
  140. package/governance/Token-Family-Responsive.md +1 -2
  141. package/governance/Token-Family-Shadow.md +1 -2
  142. package/governance/Token-Family-Sizing.md +0 -1
  143. package/governance/Token-Family-Spacing.md +1 -2
  144. package/governance/Token-Family-Typography.md +1 -2
  145. package/governance/Token-Governance.md +8 -8
  146. package/governance/Token-Quick-Reference.md +47 -34
  147. package/governance/Token-Resolution-Patterns.md +1 -1
  148. package/governance/Token-Semantic-Structure.md +1 -1
  149. package/governance/Web-Authoring-Standards.md +5 -5
  150. package/governance/browser-distribution-guide.md +1 -4
  151. package/governance/classification-map.md +474 -0
  152. package/governance/completion-documentation-guide.md +23 -37
  153. package/governance/component-meta-authoring-guide.md +1 -1
  154. package/governance/cross-platform-vs-platform-specific-decision-framework.md +1 -1
  155. package/governance/platform-implementation-guidelines.md +2 -3
  156. package/governance/release-management-system.md +28 -63
  157. package/governance/rosetta-system-principles.md +8 -6
  158. package/governance/stemma-system-principles.md +18 -17
  159. package/mcp-server/src/index.ts +24 -6
  160. package/mcp-server/src/indexer/DocumentIndexer.ts +119 -9
  161. package/mcp-server/src/indexer/__tests__/bare-id-crossrefs.test.ts +250 -0
  162. package/mcp-server/src/indexer/cross-ref-parser.ts +29 -1
  163. package/mcp-server/src/indexer/index-health.ts +27 -2
  164. package/mcp-server/src/query/__tests__/find-docs-calibration.test.ts +11 -26
  165. package/mcp-server/src/relocation-integrity-gate/__tests__/relocation-integrity-gate.test.ts +72 -5
  166. package/mcp-server/src/relocation-integrity-gate/relocation-integrity-gate.ts +81 -24
  167. package/mcp-server/src/tools/list-cross-references.ts +2 -2
  168. package/package.json +24 -26
  169. package/src/__tests__/browser-distribution/css-bundling.test.ts +6 -4
  170. package/src/__tests__/console-allowlist.json +14 -0
  171. package/src/__tests__/console-fail-setup.ts +169 -0
  172. package/src/__tests__/integration/Spec107-DesignLanguageContext.test.ts +16 -0
  173. package/src/__tests__/stemma-system/behavioral-contract-validation.test.ts +70 -17
  174. package/src/__tests__/stemma-system/contract-catalog-name-validation.test.ts +28 -0
  175. package/src/__tests__/stemma-system/form-inputs-contracts.test.ts +223 -16
  176. package/src/__tests__/stemma-system/input-text-native-base-call-alignment.test.ts +298 -0
  177. package/src/blend/OklchBlendCalculator.ts +3 -0
  178. package/src/blend/ThemeAwareBlendUtilities.android.kt +3 -0
  179. package/src/blend/ThemeAwareBlendUtilities.ios.swift +3 -0
  180. package/src/blend/ThemeAwareBlendUtilities.web.ts +9 -1
  181. package/src/blend/__tests__/InteractionStateAudit.test.ts +12 -9
  182. package/src/build/errors/__tests__/ErrorHandler.integration.test.ts +8 -0
  183. package/src/build/errors/__tests__/ErrorHandler.test.ts +5 -0
  184. package/src/build/tokens/__tests__/defineComponentTokens.test.ts +113 -0
  185. package/src/build/tokens/defineComponentTokens.ts +43 -1
  186. package/src/build/workflow/__tests__/CICDIntegration.test.ts +12 -1
  187. package/src/cli/__tests__/init.test.ts +45 -11
  188. package/src/components/core/Avatar-Base/Avatar-Base.schema.yaml +1 -1
  189. package/src/components/core/Avatar-Base/__tests__/Avatar.accessibility.test.ts +121 -7
  190. package/src/components/core/Avatar-Base/__tests__/Avatar.image.test.ts +3 -0
  191. package/src/components/core/Avatar-Base/__tests__/Avatar.test.ts +15 -6
  192. package/src/components/core/Avatar-Base/avatar.tokens.ts +31 -34
  193. package/src/components/core/Avatar-Base/contracts.yaml +11 -1
  194. package/src/components/core/Avatar-Base/index.ts +1 -1
  195. package/src/components/core/Avatar-Base/platforms/web/Avatar.web.ts +24 -5
  196. package/src/components/core/Badge-Count-Base/contracts.yaml +1 -1
  197. package/src/components/core/Badge-Label-Base/contracts.yaml +1 -1
  198. package/src/components/core/Button-CTA/Button-CTA.schema.yaml +2 -12
  199. package/src/components/core/Button-CTA/README.md +3 -6
  200. package/src/components/core/Button-CTA/__tests__/ButtonCTA.test.ts +35 -89
  201. package/src/components/core/Button-CTA/__tests__/setup.test.ts +0 -2
  202. package/src/components/core/Button-CTA/__tests__/test-utils.ts +0 -2
  203. package/src/components/core/Button-CTA/contracts.yaml +6 -29
  204. package/src/components/core/Button-CTA/examples/BasicUsage.html +2 -14
  205. package/src/components/core/Button-CTA/examples/BasicUsage.tsx +17 -44
  206. package/src/components/core/Button-CTA/platforms/android/ButtonCTA.android.kt +12 -20
  207. package/src/components/core/Button-CTA/platforms/ios/ButtonCTA.ios.swift +12 -51
  208. package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.css +2 -26
  209. package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.ts +18 -71
  210. package/src/components/core/Button-CTA/types.ts +10 -28
  211. package/src/components/core/Button-Icon/buttonIcon.tokens.ts +43 -27
  212. package/src/components/core/Chip-Base/__tests__/ChipBase.test.ts +13 -0
  213. package/src/components/core/Chip-Filter/__tests__/ChipFilter.test.ts +13 -0
  214. package/src/components/core/Chip-Input/__tests__/ChipInput.test.ts +13 -0
  215. package/src/components/core/Input-Text-Base/Input-Text-Base.schema.yaml +30 -2
  216. package/src/components/core/Input-Text-Base/README.md +25 -2
  217. package/src/components/core/Input-Text-Base/__tests__/focusIndicators.test.ts +16 -15
  218. package/src/components/core/Input-Text-Base/contracts.yaml +90 -0
  219. package/src/components/core/Input-Text-Base/platforms/android/InputTextBase.android.kt +26 -12
  220. package/src/components/core/Input-Text-Base/platforms/ios/InputTextBase.ios.swift +195 -59
  221. package/src/components/core/Input-Text-Base/types.ts +13 -1
  222. package/src/components/core/Input-Text-Email/Input-Text-Email.schema.yaml +5 -1
  223. package/src/components/core/Input-Text-Email/README.md +8 -7
  224. package/src/components/core/Input-Text-Email/platforms/android/InputTextEmail.android.kt +1 -4
  225. package/src/components/core/Input-Text-Email/platforms/ios/InputTextEmail.ios.swift +2 -16
  226. package/src/components/core/Input-Text-Password/Input-Text-Password.schema.yaml +10 -3
  227. package/src/components/core/Input-Text-Password/README.md +9 -8
  228. package/src/components/core/Input-Text-Password/contracts.yaml +5 -0
  229. package/src/components/core/Input-Text-Password/platforms/android/InputTextPassword.android.kt +17 -7
  230. package/src/components/core/Input-Text-Password/platforms/ios/InputTextPassword.ios.swift +22 -20
  231. package/src/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.ts +11 -2
  232. package/src/components/core/Input-Text-PhoneNumber/Input-Text-PhoneNumber.schema.yaml +5 -1
  233. package/src/components/core/Input-Text-PhoneNumber/README.md +9 -8
  234. package/src/components/core/Input-Text-PhoneNumber/platforms/android/InputTextPhoneNumber.android.kt +2 -5
  235. package/src/components/core/Input-Text-PhoneNumber/platforms/ios/InputTextPhoneNumber.ios.swift +3 -17
  236. package/src/components/core/Nav-Header-App/contracts.yaml +1 -1
  237. package/src/components/core/Nav-SegmentedChoice-Base/contracts.yaml +1 -1
  238. package/src/components/core/Progress-Indicator-Connector-Base/contracts.yaml +1 -1
  239. package/src/components/core/Progress-Indicator-Label-Base/contracts.yaml +1 -1
  240. package/src/components/core/Progress-Indicator-Node-Base/contracts.yaml +1 -1
  241. package/src/components/core/Progress-Stepper-Base/__tests__/StepperBase.test.ts +5 -2
  242. package/src/components/core/Progress-Stepper-Detailed/__tests__/StepperDetailed.test.ts +5 -2
  243. package/src/generators/DTCGFormatGenerator.ts +6 -0
  244. package/src/generators/TokenFileGenerator.ts +7 -2
  245. package/src/generators/__tests__/DTCGConfigOptions.test.ts +14 -5
  246. package/src/integration/BuildErrorHandler.ts +2 -2
  247. package/src/tokens/OpacityTokens.ts +1 -1
  248. package/src/tokens/__tests__/OpacityTokens.test.ts +3 -1
  249. package/src/tokens/__tests__/ProgressTokenCompliance.test.ts +5 -3
  250. package/src/tokens/__tests__/ProgressTokenFormulas.test.ts +11 -11
  251. package/src/tokens/__tests__/ProgressTokenTranslation.test.ts +22 -20
  252. package/src/tokens/component/progress.ts +83 -21
  253. package/src/tokens/semantic/BlendTokens.ts +26 -5
  254. package/src/tokens/semantic/OpacityTokens.ts +4 -4
  255. package/src/types/ComponentTypes.ts +1 -1
  256. package/src/types/generated/TokenTypes.ts +1 -1
  257. package/src/validators/StemmaTokenUsageValidator.ts +3 -2
  258. package/token-index/components.yaml +8 -8
  259. package/token-index/semantics.yaml +1 -2
  260. package/src/tools/release/__tests__/ChangeClassifier.test.ts +0 -133
  261. package/src/tools/release/__tests__/ChangeExtractor.test.ts +0 -222
  262. package/src/tools/release/__tests__/GitHubPublisher.test.ts +0 -240
  263. package/src/tools/release/__tests__/NotesRenderer.test.ts +0 -142
  264. package/src/tools/release/__tests__/NpmPublisher.test.ts +0 -289
  265. package/src/tools/release/__tests__/PipelineIntegration.test.ts +0 -188
  266. package/src/tools/release/__tests__/ReleasePipeline.test.ts +0 -192
  267. package/src/tools/release/__tests__/SemanticVersionValidator.test.ts +0 -49
  268. package/src/tools/release/__tests__/SummaryScanner.test.ts +0 -141
  269. package/src/tools/release/__tests__/TagResolver.test.ts +0 -91
  270. package/src/tools/release/__tests__/VersionCalculator.test.ts +0 -270
  271. package/src/tools/release/__tests__/helpers/NpmMockHelper.ts +0 -80
  272. package/src/tools/release/cli/ReleasePipeline.ts +0 -165
  273. package/src/tools/release/cli/release-tool.ts +0 -107
  274. package/src/tools/release/pipeline/ChangeClassifier.ts +0 -61
  275. package/src/tools/release/pipeline/ChangeExtractor.ts +0 -87
  276. package/src/tools/release/pipeline/NotesRenderer.ts +0 -66
  277. package/src/tools/release/pipeline/SummaryScanner.ts +0 -70
  278. package/src/tools/release/pipeline/TagResolver.ts +0 -40
  279. package/src/tools/release/pipeline/VersionCalculator.ts +0 -375
  280. package/src/tools/release/publishers/GitHubPublisher.ts +0 -228
  281. package/src/tools/release/publishers/NpmPublisher.ts +0 -196
  282. package/src/tools/release/release-config.json +0 -5
  283. package/src/tools/release/types/index.ts +0 -282
  284. package/src/tools/release/validators/SemanticVersionValidator.ts +0 -67
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DesignerPunk Design System - Web Tokens
3
- * Generated: 2026-07-05T14:35:59.888Z
3
+ * Generated: 2026-08-26T14:15:24.233Z
4
4
  * Version: 1.0.0
5
5
  * Platform: Web (CSS Custom Properties)
6
6
  *
@@ -998,6 +998,8 @@
998
998
  --inputradio-box-lg: var(--size-500);
999
999
 
1000
1000
  /* Progress Component Tokens */
1001
+ /* Connector line thickness (1px). References borderDefault primitive for consistent border treatment across the design system. */
1002
+ --progress-connector-thickness: var(--border-width-100);
1001
1003
  /* Small node base size (12px). Inactive dots in compact mobile contexts. */
1002
1004
  --progress-node-size-sm: var(--size-150);
1003
1005
  /* Medium node base size (16px). Default inactive dot size. */
@@ -1016,8 +1018,6 @@
1016
1018
  --progress-node-gap-md: var(--space-100);
1017
1019
  /* Large gap between nodes (12px = 1.5× base). Generous spacing for detailed steppers with labels in desktop contexts. */
1018
1020
  --progress-node-gap-lg: var(--space-150);
1019
- /* Connector line thickness (1px). References borderDefault primitive for consistent border treatment across the design system. */
1020
- --progress-connector-thickness: var(--border-width-100);
1021
1021
 
1022
1022
  /* VerticalListItem Component Tokens */
1023
1023
  /* Block padding at rest state (1px border). 11px padding + 1px border = 12px per side, achieving 48px total with 24px content. Uses TokenWithValue pattern as no primitive token exists for 11px. */
@@ -60,6 +60,16 @@ export interface PrimitiveTokenReference {
60
60
  name: string;
61
61
  /** Unitless base value from the primitive token */
62
62
  baseValue: number;
63
+ /**
64
+ * Primitive token family (the `category` field of a `PrimitiveToken`, e.g. 'spacing',
65
+ * 'sizing', 'radius'). OPTIONAL for backward compatibility: minimal `{ name, baseValue }`
66
+ * reference literals remain valid.
67
+ *
68
+ * When present, it is cross-checked against the call's declared `family` by the
69
+ * family-mismatch guard in {@link defineComponentTokens}. Real primitives from
70
+ * src/tokens/** always carry it, so the guard is active for all production authoring.
71
+ */
72
+ category?: string;
63
73
  }
64
74
  /**
65
75
  * Token definition with primitive reference
@@ -125,6 +125,32 @@ function defineComponentTokens(config) {
125
125
  if (isTokenWithReference(definition)) {
126
126
  // Token with primitive reference
127
127
  const primitiveToken = definition.reference;
128
+ // FAMILY-MISMATCH GUARD.
129
+ // The call's `family` is stamped onto every token it registers, and the generator
130
+ // derives platform output from it — notably the primitive class name used for
131
+ // reference-path tokens (getFamilyClassName) and the Android `.dp` suffix. A call
132
+ // that declares one family but references another family's primitive therefore emits
133
+ // a member that does not exist on the target platform. That is exactly the Button-Icon
134
+ // defect: a `family: 'spacing'` call referencing `sizingTokens.size600` generated
135
+ // `SpacingTokens.size600`, a non-existent member (PR #126).
136
+ //
137
+ // Only enforced when the reference carries a `category` — minimal `{ name, baseValue }`
138
+ // literals (used widely in tests) are intentionally exempt rather than rejected.
139
+ //
140
+ // Escape hatch: a token that legitimately needs another family's VALUE should use the
141
+ // value path (`value:`), which asserts no cross-family token-chain claim.
142
+ if (typeof primitiveToken.category === 'string' &&
143
+ primitiveToken.category !== family) {
144
+ throw new Error(`Token family mismatch in defineComponentTokens() for component '${component}': ` +
145
+ `token '${key}' is declared in a '${family}' family call but references primitive ` +
146
+ `'${primitiveToken.name}' from the '${primitiveToken.category}' family. ` +
147
+ `Every token in a call is stamped with that call's family, which drives platform ` +
148
+ `output (e.g. the generated '${family.charAt(0).toUpperCase() + family.slice(1)}Tokens' ` +
149
+ `class reference), so this would emit a non-existent platform member. ` +
150
+ `Fix: move '${key}' into a separate defineComponentTokens() call with ` +
151
+ `family: '${primitiveToken.category}', or use the value path if no token-chain ` +
152
+ `relationship is intended.`);
153
+ }
128
154
  const value = primitiveToken.baseValue;
129
155
  values[key] = value;
130
156
  registeredTokens.push({
@@ -34,6 +34,15 @@
34
34
  * - xs: calc(icon.size050 × 0.75) = 12px
35
35
  * - xxl: calc(icon.size050 × 4) = 64px
36
36
  *
37
+ * TOKEN FAMILY: all dimensional Avatar tokens (container `size.*` AND icon
38
+ * `icon.size.*` gap fillers) are registered by the single sizing-family call
39
+ * `AvatarSizingTokens` below. The `icon.size.*` pair previously lived in a
40
+ * separate `AvatarTokens` call stamped `family: 'spacing'` — a mislabel, since
41
+ * both are dimensional sizing values. `AvatarTokens` is removed; consumers use
42
+ * `AvatarSizingTokens` or the `getAvatarIconSize()` / `getAvatarSize()` accessors.
43
+ * Generated platform output is unaffected: both calls declare `component: 'Avatar'`,
44
+ * so all tokens still land in one `AvatarTokens` Swift enum / Kotlin object.
45
+ *
37
46
  * COLOR TOKENS (Spec 058):
38
47
  * Avatar color tokens are defined in this file following the Rosetta System architecture
39
48
  * which mandates component tokens live at src/components/[ComponentName]/tokens.ts.
@@ -52,13 +61,24 @@
52
61
  * @see .kiro/specs/058-component-token-architecture-cleanup for color token migration
53
62
  */
54
63
  /**
55
- * Avatar sizing tokens — container dimensions for each size variant.
64
+ * Avatar sizing tokens — container dimensions and icon dimensions for each size variant.
56
65
  *
57
66
  * Previously in a separate file (avatar-sizing.tokens.ts). Inlined to prevent
58
67
  * architectural anomaly (no other component splits tokens across files) and
59
68
  * simplify the package surface for sync.
60
69
  *
70
+ * ONE CALL PER FAMILY. Every token registered by a single defineComponentTokens()
71
+ * call is stamped with that call's `family`, and the family drives platform output
72
+ * (Swift type, Kotlin `.dp` suffix, primitive class name). The `icon.size.*` gap
73
+ * fillers below are dimensional sizing values, so they live in this sizing-family
74
+ * call — they were previously mis-stamped `family: 'spacing'` in a separate
75
+ * `AvatarTokens` call, the same latent mislabel class fixed for Button-Icon.
76
+ * Do NOT spread/merge this result with another call's result — the rich metadata
77
+ * rides on a non-enumerable brand (see src/build/tokens/defineComponentTokens.ts,
78
+ * TOKEN_CONTRACT_BRAND) that a spread would silently drop.
79
+ *
61
80
  * @see .kiro/specs/092-sizing-token-family/design.md
81
+ * @see src/components/core/Button-Icon/buttonIcon.tokens.ts for the two-call pattern
62
82
  */
63
83
  export declare const AvatarSizingTokens: import("../../../build/tokens").ComponentTokenValues<{
64
84
  'size.xs': {
@@ -85,31 +105,6 @@ export declare const AvatarSizingTokens: import("../../../build/tokens").Compone
85
105
  reference: import("../../../types").PrimitiveToken;
86
106
  reasoning: string;
87
107
  };
88
- }>;
89
- /**
90
- * Avatar component tokens defined using the hybrid authoring API.
91
- *
92
- * Each token either references a primitive spacing token or uses a family-conformant
93
- * derivation, and includes reasoning explaining why the token exists.
94
- *
95
- * NOTE: Web platform uses CSS calc() with icon tokens for sizing (see Avatar.styles.css).
96
- * These component tokens are primarily used for iOS/Android platforms and documentation.
97
- *
98
- * Size token values:
99
- * - size.xs: 24px (3 × base, references size300)
100
- * - size.sm: 32px (4 × base, references size400)
101
- * - size.md: 40px (5 × base, references size500)
102
- * - size.lg: 48px (6 × base, references size600)
103
- * - size.xl: 80px (10 × base, derivation)
104
- * - size.xxl: 128px (16 × base, derivation)
105
- *
106
- * Icon size token values (gap fillers - web uses calc() instead):
107
- * - icon.size.xs: 12px (1.5 × base, derivation) - web uses calc(icon.size050 × 0.75)
108
- * - icon.size.xxl: 64px (8 × base, derivation) - web uses calc(icon.size050 × 4)
109
- *
110
- * @see Requirements 2.1-2.6, 3.1, 3.6 in .kiro/specs/042-avatar-component/requirements.md
111
- */
112
- export declare const AvatarTokens: import("../../../build/tokens").ComponentTokenValues<{
113
108
  'icon.size.xs': {
114
109
  value: number;
115
110
  reasoning: string;
@@ -35,6 +35,15 @@
35
35
  * - xs: calc(icon.size050 × 0.75) = 12px
36
36
  * - xxl: calc(icon.size050 × 4) = 64px
37
37
  *
38
+ * TOKEN FAMILY: all dimensional Avatar tokens (container `size.*` AND icon
39
+ * `icon.size.*` gap fillers) are registered by the single sizing-family call
40
+ * `AvatarSizingTokens` below. The `icon.size.*` pair previously lived in a
41
+ * separate `AvatarTokens` call stamped `family: 'spacing'` — a mislabel, since
42
+ * both are dimensional sizing values. `AvatarTokens` is removed; consumers use
43
+ * `AvatarSizingTokens` or the `getAvatarIconSize()` / `getAvatarSize()` accessors.
44
+ * Generated platform output is unaffected: both calls declare `component: 'Avatar'`,
45
+ * so all tokens still land in one `AvatarTokens` Swift enum / Kotlin object.
46
+ *
38
47
  * COLOR TOKENS (Spec 058):
39
48
  * Avatar color tokens are defined in this file following the Rosetta System architecture
40
49
  * which mandates component tokens live at src/components/[ComponentName]/tokens.ts.
@@ -53,7 +62,7 @@
53
62
  * @see .kiro/specs/058-component-token-architecture-cleanup for color token migration
54
63
  */
55
64
  Object.defineProperty(exports, "__esModule", { value: true });
56
- exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.AvatarColorTokens = exports.AvatarTokens = exports.AvatarSizingTokens = void 0;
65
+ exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.AvatarColorTokens = exports.AvatarSizingTokens = void 0;
57
66
  exports.getAvatarColorToken = getAvatarColorToken;
58
67
  exports.getAvatarSize = getAvatarSize;
59
68
  exports.getAvatarIconSize = getAvatarIconSize;
@@ -62,13 +71,24 @@ exports.getAvatarIconSizeTokenReference = getAvatarIconSizeTokenReference;
62
71
  const tokens_1 = require("../../../build/tokens");
63
72
  const SizingTokens_1 = require("../../../tokens/SizingTokens");
64
73
  /**
65
- * Avatar sizing tokens — container dimensions for each size variant.
74
+ * Avatar sizing tokens — container dimensions and icon dimensions for each size variant.
66
75
  *
67
76
  * Previously in a separate file (avatar-sizing.tokens.ts). Inlined to prevent
68
77
  * architectural anomaly (no other component splits tokens across files) and
69
78
  * simplify the package surface for sync.
70
79
  *
80
+ * ONE CALL PER FAMILY. Every token registered by a single defineComponentTokens()
81
+ * call is stamped with that call's `family`, and the family drives platform output
82
+ * (Swift type, Kotlin `.dp` suffix, primitive class name). The `icon.size.*` gap
83
+ * fillers below are dimensional sizing values, so they live in this sizing-family
84
+ * call — they were previously mis-stamped `family: 'spacing'` in a separate
85
+ * `AvatarTokens` call, the same latent mislabel class fixed for Button-Icon.
86
+ * Do NOT spread/merge this result with another call's result — the rich metadata
87
+ * rides on a non-enumerable brand (see src/build/tokens/defineComponentTokens.ts,
88
+ * TOKEN_CONTRACT_BRAND) that a spread would silently drop.
89
+ *
71
90
  * @see .kiro/specs/092-sizing-token-family/design.md
91
+ * @see src/components/core/Button-Icon/buttonIcon.tokens.ts for the two-call pattern
72
92
  */
73
93
  exports.AvatarSizingTokens = (0, tokens_1.defineComponentTokens)({
74
94
  component: 'Avatar',
@@ -98,37 +118,14 @@ exports.AvatarSizingTokens = (0, tokens_1.defineComponentTokens)({
98
118
  reference: SizingTokens_1.sizingTokens.size1600,
99
119
  reasoning: 'Extra extra large avatar (128px). Full profile view, onboarding.',
100
120
  },
101
- },
102
- });
103
- /**
104
- * Avatar component tokens defined using the hybrid authoring API.
105
- *
106
- * Each token either references a primitive spacing token or uses a family-conformant
107
- * derivation, and includes reasoning explaining why the token exists.
108
- *
109
- * NOTE: Web platform uses CSS calc() with icon tokens for sizing (see Avatar.styles.css).
110
- * These component tokens are primarily used for iOS/Android platforms and documentation.
111
- *
112
- * Size token values:
113
- * - size.xs: 24px (3 × base, references size300)
114
- * - size.sm: 32px (4 × base, references size400)
115
- * - size.md: 40px (5 × base, references size500)
116
- * - size.lg: 48px (6 × base, references size600)
117
- * - size.xl: 80px (10 × base, derivation)
118
- * - size.xxl: 128px (16 × base, derivation)
119
- *
120
- * Icon size token values (gap fillers - web uses calc() instead):
121
- * - icon.size.xs: 12px (1.5 × base, derivation) - web uses calc(icon.size050 × 0.75)
122
- * - icon.size.xxl: 64px (8 × base, derivation) - web uses calc(icon.size050 × 4)
123
- *
124
- * @see Requirements 2.1-2.6, 3.1, 3.6 in .kiro/specs/042-avatar-component/requirements.md
125
- */
126
- exports.AvatarTokens = (0, tokens_1.defineComponentTokens)({
127
- component: 'Avatar',
128
- family: 'spacing',
129
- tokens: {
130
- // Icon size tokens (gap fillers for sizes without existing icon tokens)
131
- // These fill gaps where no standard icon token exists at the required 50% ratio
121
+ // Icon size tokens (gap fillers for sizes without an existing icon token).
122
+ // Kept on the VALUE path deliberately: sizing primitives exist at both values
123
+ // (size150 = 12, size800 = 64), but the reference path currently emits a
124
+ // fabricated `SizingTokens.<name>` class on iOS/Android that no generated or
125
+ // hand-written platform file defines. Switching these to `reference:` would
126
+ // trade compiling output (`12.dp`) for non-compiling output and break
127
+ // Avatar.android.kt's `val iconSizeXs: Dp = GeneratedAvatarTokens.iconSizeXs`.
128
+ // Revisit once TokenFileGenerator.getFamilyClassName emits a real platform type.
132
129
  'icon.size.xs': {
133
130
  value: SizingTokens_1.SIZING_BASE_VALUE * 1.5,
134
131
  reasoning: 'Icon size for xs avatar (12px = 1.5× base) maintains 50% ratio (12/24). No existing icon token at this size, so component token fills the gap.',
@@ -254,7 +251,7 @@ function getAvatarSize(variant) {
254
251
  * @see Requirements 3.1, 3.6 in .kiro/specs/042-avatar-component/requirements.md
255
252
  */
256
253
  function getAvatarIconSize(variant) {
257
- return exports.AvatarTokens[`icon.size.${variant}`];
254
+ return exports.AvatarSizingTokens[`icon.size.${variant}`];
258
255
  }
259
256
  /**
260
257
  * Semantic token references for Avatar size values
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export type { AvatarProps, AvatarType, AvatarSize } from './types';
8
8
  export { AVATAR_DEFAULTS } from './types';
9
- export { AvatarTokens, getAvatarSize, getAvatarIconSize, getAvatarSizeTokenReference, getAvatarIconSizeTokenReference, AvatarSizeTokenReferences, AvatarIconSizeTokenReferences, } from './avatar.tokens';
9
+ export { AvatarSizingTokens, getAvatarSize, getAvatarIconSize, getAvatarSizeTokenReference, getAvatarIconSizeTokenReference, AvatarSizeTokenReferences, AvatarIconSizeTokenReferences, } from './avatar.tokens';
10
10
  export type { AvatarSizeVariant, AvatarIconSizeVariant } from './avatar.tokens';
11
11
  export { AvatarBaseElement } from './platforms/web/Avatar.web';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -6,12 +6,12 @@
6
6
  * @see .kiro/specs/042-avatar-component/requirements.md for requirements
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.AvatarBaseElement = exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.getAvatarIconSizeTokenReference = exports.getAvatarSizeTokenReference = exports.getAvatarIconSize = exports.getAvatarSize = exports.AvatarTokens = exports.AVATAR_DEFAULTS = void 0;
9
+ exports.AvatarBaseElement = exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.getAvatarIconSizeTokenReference = exports.getAvatarSizeTokenReference = exports.getAvatarIconSize = exports.getAvatarSize = exports.AvatarSizingTokens = exports.AVATAR_DEFAULTS = void 0;
10
10
  var types_1 = require("./types");
11
11
  Object.defineProperty(exports, "AVATAR_DEFAULTS", { enumerable: true, get: function () { return types_1.AVATAR_DEFAULTS; } });
12
12
  // Token exports
13
13
  var avatar_tokens_1 = require("./avatar.tokens");
14
- Object.defineProperty(exports, "AvatarTokens", { enumerable: true, get: function () { return avatar_tokens_1.AvatarTokens; } });
14
+ Object.defineProperty(exports, "AvatarSizingTokens", { enumerable: true, get: function () { return avatar_tokens_1.AvatarSizingTokens; } });
15
15
  Object.defineProperty(exports, "getAvatarSize", { enumerable: true, get: function () { return avatar_tokens_1.getAvatarSize; } });
16
16
  Object.defineProperty(exports, "getAvatarIconSize", { enumerable: true, get: function () { return avatar_tokens_1.getAvatarIconSize; } });
17
17
  Object.defineProperty(exports, "getAvatarSizeTokenReference", { enumerable: true, get: function () { return avatar_tokens_1.getAvatarSizeTokenReference; } });
@@ -643,11 +643,30 @@ class AvatarBaseElement extends HTMLElement {
643
643
  // Generate aria-hidden attribute for decorative avatars
644
644
  // @see Requirements: 9.2 - Apply aria-hidden="true" when decorative prop is true
645
645
  const ariaHiddenAttr = decorative ? ' aria-hidden="true"' : '';
646
- // Warn in development if src is provided without alt
647
- // @see Requirements: 5.4 - Require alt prop when src is provided
648
- if (src && !alt && typeof console !== 'undefined') {
649
- console.warn('AvatarBaseElement: "alt" prop is required when "src" is provided for accessibility. ' +
650
- 'Please add an alt attribute describing the image.');
646
+ // Warn in development if a human-type avatar is missing alt text for its image.
647
+ // @see Requirements: 5.4 - Human type + src SHALL require alt for accessibility
648
+ // @see Requirements: 5 AC 5 - Agent type SHALL ignore src entirely (src not
649
+ // rendered as an image), so agent-type avatars never warn regardless of alt.
650
+ //
651
+ // Settled edge semantics (Spec 126, O2, ratified 2026-07-09):
652
+ // - Scope is human-type only — Req 5.4 is human-type-scoped, and Req 5 AC 5
653
+ // affirmatively establishes that agent-type SHALL ignore src, so a src+no-alt
654
+ // agent avatar is not a violation of anything.
655
+ // - `alt == null` (loose equality — also excludes `undefined`), not `!alt`, is the
656
+ // test. The `alt` attribute getter returns `getAttribute('alt')`. Raw
657
+ // `setAttribute('alt', '')` yields `alt === ''`, which is the HTML-idiomatic
658
+ // explicit-empty-alt signal and must NOT warn. The `alt` *property setter*
659
+ // (see below) treats a falsy value as "remove the attribute," so
660
+ // `avatar.alt = ''` collapses to `alt === null` — indistinguishable from
661
+ // omitting alt entirely, and DOES warn under this condition.
662
+ // - `!decorative` is the operative fix for the confirmed false positive: a
663
+ // `decorative` avatar is the component's official signal that the image is
664
+ // non-informative (Req 9.2 applies `aria-hidden="true"`), so it must never warn
665
+ // regardless of alt.
666
+ if (type === 'human' && src && alt == null && !decorative && typeof console !== 'undefined') {
667
+ console.warn('AvatarBaseElement: "alt" is required when "src" is provided. ' +
668
+ 'Add an alt description of the image; or, if this avatar is purely decorative ' +
669
+ '(non-informative), set the "decorative" prop to hide it from screen readers.');
651
670
  }
652
671
  // Render different structures based on type
653
672
  // Agent type uses SVG-based hexagon with Bézier curves for true rounded corners
@@ -19,7 +19,6 @@
19
19
  * - size: 'medium' (48px height)
20
20
  * - variant: 'primary' (filled background with primary color)
21
21
  * - noWrap: false (text wraps if needed)
22
- * - disabled: false (interactive)
23
22
  *
24
23
  * @example
25
24
  * ```html
@@ -54,7 +53,6 @@ export declare function customLabelButton(): void;
54
53
  *
55
54
  * The 'press' event:
56
55
  * - Bubbles up through the DOM
57
- * - Is not called when button is disabled
58
56
  * - Works with click, tap, Enter key, and Space key
59
57
  * - Provides originalEvent in event.detail for advanced use cases
60
58
  *
@@ -67,39 +65,29 @@ export declare function customLabelButton(): void;
67
65
  */
68
66
  export declare function buttonWithHandler(): void;
69
67
  /**
70
- * Example 4: Disabled Button
68
+ * Example 4: Unavailable Actions (no disabled state)
71
69
  *
72
- * Demonstrates how to disable a button to prevent user interaction.
73
- * Disabled buttons are commonly used during form submission, when prerequisites
74
- * aren't met, or when an action is temporarily unavailable.
70
+ * DesignerPunk does not support disabled states for usability and
71
+ * accessibility reasons. If an action is unavailable, the component
72
+ * should not be rendered.
75
73
  *
76
- * Disabled button behavior:
77
- * - Not keyboard focusable (skipped in Tab order)
78
- * - Does not respond to clicks or keyboard activation
79
- * - Visual styling indicates non-interactive state
80
- * - Screen readers announce disabled state
81
- * - onPress handler is not called
82
- *
83
- * Common use cases:
84
- * - Form submission in progress
85
- * - Required fields not filled
86
- * - User lacks permissions
87
- * - Action temporarily unavailable
88
- *
89
- * @example
90
- * ```html
91
- * <button-cta label="Submit" disabled></button-cta>
92
- * ```
74
+ * For in-flight async operations (e.g. form submission), use the loading
75
+ * state instead of disabling the button. For actions the user cannot take
76
+ * yet, keep the button interactive and validate on press, or do not render
77
+ * the button at all.
93
78
  *
94
79
  * @example
95
80
  * ```typescript
96
- * // Conditional disable based on form state
97
- * const button = document.createElement('button-cta') as ButtonCTA;
98
- * button.label = 'Submit';
99
- * button.disabled = isSubmitting || !isFormValid;
81
+ * // Conditionally render instead of disabling
82
+ * if (userCanSubmit) {
83
+ * const button = document.createElement('button-cta') as ButtonCTA;
84
+ * button.label = 'Submit';
85
+ * button.addEventListener('press', handleSubmit);
86
+ * document.body.appendChild(button);
87
+ * }
100
88
  * ```
101
89
  */
102
- export declare function disabledButton(): void;
90
+ export declare function conditionallyRenderedButton(): void;
103
91
  /**
104
92
  * Example 5: All Examples Together
105
93
  *
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.defaultButton = defaultButton;
15
15
  exports.customLabelButton = customLabelButton;
16
16
  exports.buttonWithHandler = buttonWithHandler;
17
- exports.disabledButton = disabledButton;
17
+ exports.conditionallyRenderedButton = conditionallyRenderedButton;
18
18
  exports.renderAllBasicExamples = renderAllBasicExamples;
19
19
  /**
20
20
  * Example 1: Default Button (Medium, Primary)
@@ -26,7 +26,6 @@ exports.renderAllBasicExamples = renderAllBasicExamples;
26
26
  * - size: 'medium' (48px height)
27
27
  * - variant: 'primary' (filled background with primary color)
28
28
  * - noWrap: false (text wraps if needed)
29
- * - disabled: false (interactive)
30
29
  *
31
30
  * @example
32
31
  * ```html
@@ -77,7 +76,6 @@ function customLabelButton() {
77
76
  *
78
77
  * The 'press' event:
79
78
  * - Bubbles up through the DOM
80
- * - Is not called when button is disabled
81
79
  * - Works with click, tap, Enter key, and Space key
82
80
  * - Provides originalEvent in event.detail for advanced use cases
83
81
  *
@@ -105,52 +103,35 @@ function buttonWithHandler() {
105
103
  document.body.appendChild(button);
106
104
  }
107
105
  /**
108
- * Example 4: Disabled Button
106
+ * Example 4: Unavailable Actions (no disabled state)
109
107
  *
110
- * Demonstrates how to disable a button to prevent user interaction.
111
- * Disabled buttons are commonly used during form submission, when prerequisites
112
- * aren't met, or when an action is temporarily unavailable.
108
+ * DesignerPunk does not support disabled states for usability and
109
+ * accessibility reasons. If an action is unavailable, the component
110
+ * should not be rendered.
113
111
  *
114
- * Disabled button behavior:
115
- * - Not keyboard focusable (skipped in Tab order)
116
- * - Does not respond to clicks or keyboard activation
117
- * - Visual styling indicates non-interactive state
118
- * - Screen readers announce disabled state
119
- * - onPress handler is not called
120
- *
121
- * Common use cases:
122
- * - Form submission in progress
123
- * - Required fields not filled
124
- * - User lacks permissions
125
- * - Action temporarily unavailable
126
- *
127
- * @example
128
- * ```html
129
- * <button-cta label="Submit" disabled></button-cta>
130
- * ```
112
+ * For in-flight async operations (e.g. form submission), use the loading
113
+ * state instead of disabling the button. For actions the user cannot take
114
+ * yet, keep the button interactive and validate on press, or do not render
115
+ * the button at all.
131
116
  *
132
117
  * @example
133
118
  * ```typescript
134
- * // Conditional disable based on form state
135
- * const button = document.createElement('button-cta') as ButtonCTA;
136
- * button.label = 'Submit';
137
- * button.disabled = isSubmitting || !isFormValid;
119
+ * // Conditionally render instead of disabling
120
+ * if (userCanSubmit) {
121
+ * const button = document.createElement('button-cta') as ButtonCTA;
122
+ * button.label = 'Submit';
123
+ * button.addEventListener('press', handleSubmit);
124
+ * document.body.appendChild(button);
125
+ * }
138
126
  * ```
139
127
  */
140
- function disabledButton() {
128
+ function conditionallyRenderedButton() {
141
129
  const button = document.createElement('button-cta');
142
130
  button.label = 'Submit';
143
- button.disabled = true; // Button is non-interactive
144
- // This handler will NOT be called when button is disabled
145
131
  button.addEventListener('press', () => {
146
- console.log('This will not be logged when button is disabled');
132
+ console.log('Submitted');
147
133
  });
148
134
  document.body.appendChild(button);
149
- // Example: Enable button after 3 seconds (simulating async operation)
150
- setTimeout(() => {
151
- button.disabled = false;
152
- console.log('Button is now enabled');
153
- }, 3000);
154
135
  }
155
136
  /**
156
137
  * Example 5: All Examples Together
@@ -188,12 +169,6 @@ function renderAllBasicExamples() {
188
169
  alert('Form submitted successfully!');
189
170
  });
190
171
  container.appendChild(handlerBtn);
191
- // Example 4: Disabled
192
- const disabledBtn = document.createElement('button-cta');
193
- disabledBtn.label = 'Disabled Button';
194
- disabledBtn.disabled = true;
195
- disabledBtn.addEventListener('press', () => console.log('This will not log'));
196
- container.appendChild(disabledBtn);
197
172
  // Add container to document
198
173
  document.body.appendChild(container);
199
174
  }
@@ -12,7 +12,7 @@
12
12
  * composition pattern as iOS and Android platforms. This ensures cross-platform
13
13
  * consistency and single source of truth for icon rendering.
14
14
  *
15
- * Uses theme-aware blend utilities for state colors (hover, pressed, disabled, icon)
15
+ * Uses theme-aware blend utilities for state colors (hover, pressed, icon)
16
16
  * instead of opacity or filter workarounds. This ensures cross-platform consistency
17
17
  * with iOS and Android implementations.
18
18
  *
@@ -32,13 +32,12 @@ import '../../../Icon-Base/platforms/web/IconBase.web';
32
32
  * - Semantic `<button>` element with proper accessibility
33
33
  * - Token-based styling via CSS custom properties
34
34
  * - Supports text wrapping by default (accessibility-first)
35
- * - Uses blend utilities for state colors (hover, pressed, disabled, icon)
35
+ * - Uses blend utilities for state colors (hover, pressed, icon)
36
36
  * - WCAG 2.1 AA compliant:
37
37
  * - Keyboard navigation (Tab, Enter, Space)
38
38
  * - Focus indicators with 3:1 contrast ratio
39
39
  * - Color contrast 4.5:1 for all styles
40
40
  * - Screen reader support with ARIA attributes
41
- * - Proper disabled state handling
42
41
  *
43
42
  * @example
44
43
  * ```html
@@ -52,7 +51,6 @@ import '../../../Icon-Base/platforms/web/IconBase.web';
52
51
  * variant="primary"
53
52
  * icon="arrow-right"
54
53
  * no-wrap="false"
55
- * disabled="false"
56
54
  * test-id="submit-button"
57
55
  * ></button-cta>
58
56
  * ```
@@ -77,7 +75,6 @@ export declare class ButtonCTA extends HTMLElement {
77
75
  private _blendUtils;
78
76
  private _hoverColor;
79
77
  private _pressedColor;
80
- private _disabledColor;
81
78
  private _iconColor;
82
79
  private _iconOpticalBalanceColor;
83
80
  /**
@@ -108,7 +105,7 @@ export declare class ButtonCTA extends HTMLElement {
108
105
  * Calculate blend colors from CSS custom properties.
109
106
  *
110
107
  * Reads base colors from CSS custom properties and applies theme-aware blend
111
- * utilities to generate state colors (hover, pressed, disabled, icon).
108
+ * utilities to generate state colors (hover, pressed, icon).
112
109
  *
113
110
  * Uses getBlendUtilities() factory functions instead of direct blend calculations
114
111
  * for cross-platform consistency with iOS and Android implementations.
@@ -116,7 +113,6 @@ export declare class ButtonCTA extends HTMLElement {
116
113
  * State color mappings:
117
114
  * - Hover: darkerBlend(color.action.primary, blend.hoverDarker) - 8% darker
118
115
  * - Pressed: darkerBlend(color.action.primary, blend.pressedDarker) - 12% darker
119
- * - Disabled: desaturate(color.action.primary, blend.disabledDesaturate) - 12% less saturated
120
116
  * - Icon: lighterBlend(color.contrast.onAction, blend.iconLighter) - 8% lighter
121
117
  *
122
118
  * @see Requirements: 7.1, 7.2, 7.3, 7.4 - Button-CTA state colors
@@ -180,14 +176,6 @@ export declare class ButtonCTA extends HTMLElement {
180
176
  * Set the no-wrap state.
181
177
  */
182
178
  set noWrap(value: boolean);
183
- /**
184
- * Get the disabled state.
185
- */
186
- get disabled(): boolean;
187
- /**
188
- * Set the disabled state.
189
- */
190
- set disabled(value: boolean);
191
179
  /**
192
180
  * Get the test ID.
193
181
  */