@ds-mo/ui 12.7.0 → 12.9.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 (313) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/agent-patterns.json +22 -9
  3. package/dist/agent.json +246 -19
  4. package/dist/angular/ds-button-filled.d.ts +1 -1
  5. package/dist/angular/ds-button-filled.js +3 -3
  6. package/dist/angular/ds-button-unfilled.d.ts +1 -1
  7. package/dist/angular/ds-button-unfilled.js +3 -3
  8. package/dist/angular/ds-card-overview.d.ts +19 -0
  9. package/dist/angular/ds-card-overview.js +42 -0
  10. package/dist/angular/index.d.ts +1 -1
  11. package/dist/angular/index.js +1 -0
  12. package/dist/angular/proxies.d.ts +1 -0
  13. package/dist/angular/proxies.js +1 -0
  14. package/dist/components/ds-agent-activity.js +1 -1
  15. package/dist/components/ds-agent-response.js +1 -1
  16. package/dist/components/ds-agent-source-list.js +1 -1
  17. package/dist/components/ds-agent-tool-call.js +1 -1
  18. package/dist/components/ds-attachment-list.js +1 -1
  19. package/dist/components/ds-badge.js +1 -1
  20. package/dist/components/ds-bar-nav.js +1 -1
  21. package/dist/components/ds-bar-title.js +1 -1
  22. package/dist/components/ds-bar-title.js.map +1 -1
  23. package/dist/components/ds-bar-workflow.js +1 -1
  24. package/dist/components/ds-breadcrumb.js +1 -1
  25. package/dist/components/ds-button-filled.js +1 -1
  26. package/dist/components/ds-button-unfilled.js +1 -1
  27. package/dist/components/ds-card-data-viz-bar.js +1 -1
  28. package/dist/components/ds-card-data-viz-bar.js.map +1 -1
  29. package/dist/components/ds-card-data-viz-donut.js +1 -1
  30. package/dist/components/ds-card-data-viz-donut.js.map +1 -1
  31. package/dist/components/ds-card-data-viz-line.js +1 -1
  32. package/dist/components/ds-card-data-viz-line.js.map +1 -1
  33. package/dist/components/ds-card-overview.d.ts +11 -0
  34. package/dist/components/ds-card-overview.js +2 -0
  35. package/dist/components/ds-card-overview.js.map +1 -0
  36. package/dist/components/ds-card-setting.js +1 -1
  37. package/dist/components/ds-card-shell-data-viz.js +1 -1
  38. package/dist/components/ds-chart-bar-stacked.js +1 -1
  39. package/dist/components/ds-chart-bar-stacked.js.map +1 -1
  40. package/dist/components/ds-chart-bar.js +1 -1
  41. package/dist/components/ds-chart-bar.js.map +1 -1
  42. package/dist/components/ds-chart-donut.js +1 -1
  43. package/dist/components/ds-chart-donut.js.map +1 -1
  44. package/dist/components/ds-chart-legend.js +1 -1
  45. package/dist/components/ds-chart-line.js +1 -1
  46. package/dist/components/ds-chart-line.js.map +1 -1
  47. package/dist/components/ds-checkbox.js +1 -1
  48. package/dist/components/ds-chip.js +1 -1
  49. package/dist/components/ds-code-block.js +1 -1
  50. package/dist/components/ds-conversation-list-item.js +1 -1
  51. package/dist/components/ds-conversation-list-item.js.map +1 -1
  52. package/dist/components/ds-conversation-list-section.js +1 -1
  53. package/dist/components/ds-conversation-list.js +1 -1
  54. package/dist/components/ds-conversation-list.js.map +1 -1
  55. package/dist/components/ds-divider.js +1 -1
  56. package/dist/components/ds-empty-state.js +1 -1
  57. package/dist/components/ds-field.js +1 -1
  58. package/dist/components/ds-input.js +1 -1
  59. package/dist/components/ds-markdown.js +1 -1
  60. package/dist/components/ds-menu.js +1 -1
  61. package/dist/components/ds-message-bubble.js +1 -1
  62. package/dist/components/ds-message-composer.js +1 -1
  63. package/dist/components/ds-message-scroller.js +1 -1
  64. package/dist/components/ds-message-scroller.js.map +1 -1
  65. package/dist/components/ds-message.js +1 -1
  66. package/dist/components/ds-mobile-bar-nav.js +1 -1
  67. package/dist/components/ds-mobile-header.js +1 -1
  68. package/dist/components/ds-mobile-section-switcher.js +1 -1
  69. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  70. package/dist/components/ds-modal.js +1 -1
  71. package/dist/components/ds-modal.js.map +1 -1
  72. package/dist/components/ds-panel-nav.js +1 -1
  73. package/dist/components/ds-panel-nav.js.map +1 -1
  74. package/dist/components/ds-panel-sub-nav.js +1 -1
  75. package/dist/components/ds-panel-tool-header.js +1 -1
  76. package/dist/components/ds-panel-tool-search.js +1 -1
  77. package/dist/components/ds-panel-tools.js +1 -1
  78. package/dist/components/ds-radio.js +1 -1
  79. package/dist/components/ds-scroll-overlay.js +1 -1
  80. package/dist/components/ds-scroll-overlay.js.map +1 -1
  81. package/dist/components/ds-select-multi.js +1 -1
  82. package/dist/components/ds-select-multi.js.map +1 -1
  83. package/dist/components/ds-select.js +1 -1
  84. package/dist/components/ds-select.js.map +1 -1
  85. package/dist/components/ds-shell-app.js +1 -1
  86. package/dist/components/ds-shell-gradient-picker.js +1 -1
  87. package/dist/components/ds-shell-gradient-picker.js.map +1 -1
  88. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  89. package/dist/components/ds-shell-page.js +1 -1
  90. package/dist/components/ds-shell-page.js.map +1 -1
  91. package/dist/components/ds-shell-tools.js +1 -1
  92. package/dist/components/ds-skeleton.js +1 -1
  93. package/dist/components/ds-skeleton.js.map +1 -1
  94. package/dist/components/ds-slider.js +1 -1
  95. package/dist/components/ds-slider.js.map +1 -1
  96. package/dist/components/ds-swatch-picker.js +1 -1
  97. package/dist/components/ds-switch.js +1 -1
  98. package/dist/components/ds-tab-group.js +1 -1
  99. package/dist/components/ds-tag.js +1 -1
  100. package/dist/components/ds-text.js +1 -1
  101. package/dist/components/ds-toast.js +1 -1
  102. package/dist/components/ds-toast.js.map +1 -1
  103. package/dist/components/ds-tooltip-data-viz.js +1 -1
  104. package/dist/components/ds-tooltip.js +1 -1
  105. package/dist/components/ds-typing-indicator.js +1 -1
  106. package/dist/components/p-2foAUsDN.js +2 -0
  107. package/dist/components/p-2foAUsDN.js.map +1 -0
  108. package/dist/components/{p-BuiZcSga.js → p-8GK7B7K4.js} +2 -2
  109. package/dist/components/p-8GK7B7K4.js.map +1 -0
  110. package/dist/components/p-B5tMlca-.js +2 -0
  111. package/dist/components/p-B5tMlca-.js.map +1 -0
  112. package/dist/components/p-B6Vuayt6.js +2 -0
  113. package/dist/components/p-B6Vuayt6.js.map +1 -0
  114. package/dist/components/{p-B-9A0e_0.js → p-B88n0pO3.js} +2 -2
  115. package/dist/components/p-BBePKRHC.js +2 -0
  116. package/dist/components/p-BBePKRHC.js.map +1 -0
  117. package/dist/components/p-BBxcMVqk.js +2 -0
  118. package/dist/components/p-BBxcMVqk.js.map +1 -0
  119. package/dist/components/p-BDKtu6Wb.js +2 -0
  120. package/dist/components/{p-Bl001G0Y.js.map → p-BDKtu6Wb.js.map} +1 -1
  121. package/dist/components/p-BKOlvCGS.js +2 -0
  122. package/dist/components/p-BKOlvCGS.js.map +1 -0
  123. package/dist/components/{p-C7bZ-jiU.js → p-BO5aqZcf.js} +2 -2
  124. package/dist/components/{p-guQ7hv6W.js → p-BOCfICln.js} +2 -2
  125. package/dist/components/p-BX0BMhgz.js +2 -0
  126. package/dist/components/p-BX0BMhgz.js.map +1 -0
  127. package/dist/components/p-BhV5e6vF.js +2 -0
  128. package/dist/components/{p-1darPzys.js.map → p-BhV5e6vF.js.map} +1 -1
  129. package/dist/components/p-C8HU4W8q.js +2 -0
  130. package/dist/components/{p-pgxlkvUy.js.map → p-C8HU4W8q.js.map} +1 -1
  131. package/dist/components/{p-CvyTZ4Mg.js → p-CChcuL04.js} +2 -2
  132. package/dist/components/{p-Crsn82rz.js → p-CCzG5xDD.js} +2 -2
  133. package/dist/components/p-CGVXbXv9.js +2 -0
  134. package/dist/components/p-CGVXbXv9.js.map +1 -0
  135. package/dist/components/{p-BT5hgg5i.js → p-CIiBpjCn.js} +2 -2
  136. package/dist/components/{p-B_5nxOeB.js → p-CgEYdMee.js} +2 -2
  137. package/dist/components/{p-k0Hmj1KV.js → p-Cr3tEx7o.js} +2 -2
  138. package/dist/components/p-Cr3tEx7o.js.map +1 -0
  139. package/dist/components/{p-5-QAFB4j.js → p-Cuih680v.js} +2 -2
  140. package/dist/components/{p-C_9ZH0A3.js → p-Cuqxh-Tq.js} +2 -2
  141. package/dist/components/{p--eKXTylf.js → p-DCvA3Dc9.js} +2 -2
  142. package/dist/components/{p-DNFd4Ao-.js → p-DLZm_-sU.js} +2 -2
  143. package/dist/components/{p-C9h13YnX.js → p-DRnIuCiT.js} +2 -2
  144. package/dist/components/p-DhKvqh5G.js +2 -0
  145. package/dist/components/p-DhKvqh5G.js.map +1 -0
  146. package/dist/components/p-DjKkSqrG.js +2 -0
  147. package/dist/components/p-DjKkSqrG.js.map +1 -0
  148. package/dist/components/{p-CUAYsK44.js → p-DlscFn2m.js} +2 -2
  149. package/dist/components/{p-BcfC6phQ.js → p-DxkEC0hR.js} +2 -2
  150. package/dist/components/p-DxkEC0hR.js.map +1 -0
  151. package/dist/components/{p-C6xC48hG.js → p-Re2kPrXm.js} +2 -2
  152. package/dist/components/{p-DIa73GJP.js → p-XMZCaXs7.js} +2 -2
  153. package/dist/components/p-YR1XeuZf.js +2 -0
  154. package/dist/components/p-YR1XeuZf.js.map +1 -0
  155. package/dist/components/{p-CqWV4Hl_.js → p-dyUp3Adm.js} +2 -2
  156. package/dist/components/{p-CnAkobDW.js → p-nkYN0Bub.js} +2 -2
  157. package/dist/components/p-yhj1lIPx.js +2 -0
  158. package/dist/docs/components.json +847 -167
  159. package/dist/lib/components/Menu/menu-position.d.ts +6 -6
  160. package/dist/lib/toast/toast-types.d.ts +3 -3
  161. package/dist/lib/utils/anchored-position.d.ts +34 -0
  162. package/dist/lib/utils/choice-popup-alignment.d.ts +2 -2
  163. package/dist/lib/utils/index.d.ts +2 -0
  164. package/dist/lib/utils/index.js +31 -0
  165. package/dist/lib/utils/index.js.map +3 -3
  166. package/dist/lib/utils/metric-change.d.ts +52 -0
  167. package/dist/lib/utils/token-defaults.d.ts +3 -0
  168. package/dist/mcp-data/registry/agent-activity.json +1 -1
  169. package/dist/mcp-data/registry/agent-response.json +1 -1
  170. package/dist/mcp-data/registry/agent-source-list.json +1 -1
  171. package/dist/mcp-data/registry/agent-tool-call.json +1 -1
  172. package/dist/mcp-data/registry/attachment-list.json +1 -1
  173. package/dist/mcp-data/registry/avatar.json +1 -1
  174. package/dist/mcp-data/registry/badge.json +1 -1
  175. package/dist/mcp-data/registry/bar-nav.json +1 -1
  176. package/dist/mcp-data/registry/bar-title.json +2 -2
  177. package/dist/mcp-data/registry/bar-workflow.json +1 -1
  178. package/dist/mcp-data/registry/breadcrumb.json +1 -1
  179. package/dist/mcp-data/registry/button-filled.json +122 -6
  180. package/dist/mcp-data/registry/button-unfilled.json +49 -5
  181. package/dist/mcp-data/registry/card-data-viz-bar.json +2 -2
  182. package/dist/mcp-data/registry/card-data-viz-donut.json +2 -1
  183. package/dist/mcp-data/registry/card-data-viz-line.json +2 -2
  184. package/dist/mcp-data/registry/card-overview.json +360 -0
  185. package/dist/mcp-data/registry/card-setting.json +1 -1
  186. package/dist/mcp-data/registry/card-shell-data-viz.json +1 -1
  187. package/dist/mcp-data/registry/chart-bar-stacked.json +14 -9
  188. package/dist/mcp-data/registry/chart-bar.json +15 -10
  189. package/dist/mcp-data/registry/chart-donut.json +3 -2
  190. package/dist/mcp-data/registry/chart-legend.json +1 -1
  191. package/dist/mcp-data/registry/chart-line.json +15 -10
  192. package/dist/mcp-data/registry/checkbox.json +1 -1
  193. package/dist/mcp-data/registry/chip.json +1 -1
  194. package/dist/mcp-data/registry/code-block.json +1 -1
  195. package/dist/mcp-data/registry/conversation-list-item.json +1 -1
  196. package/dist/mcp-data/registry/conversation-list-section.json +1 -1
  197. package/dist/mcp-data/registry/conversation-list.json +1 -1
  198. package/dist/mcp-data/registry/divider.json +1 -1
  199. package/dist/mcp-data/registry/empty-state.json +1 -1
  200. package/dist/mcp-data/registry/field.json +1 -1
  201. package/dist/mcp-data/registry/icon.json +1 -1
  202. package/dist/mcp-data/registry/input.json +1 -1
  203. package/dist/mcp-data/registry/loader.json +1 -1
  204. package/dist/mcp-data/registry/markdown.json +1 -1
  205. package/dist/mcp-data/registry/menu.json +3 -3
  206. package/dist/mcp-data/registry/message-bubble.json +1 -1
  207. package/dist/mcp-data/registry/message-composer.json +1 -1
  208. package/dist/mcp-data/registry/message-scroller.json +1 -1
  209. package/dist/mcp-data/registry/message.json +1 -1
  210. package/dist/mcp-data/registry/mobile-bar-nav.json +1 -1
  211. package/dist/mcp-data/registry/mobile-header.json +1 -1
  212. package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
  213. package/dist/mcp-data/registry/mobile-sheet-nav.json +1 -1
  214. package/dist/mcp-data/registry/modal.json +1 -1
  215. package/dist/mcp-data/registry/panel-nav.json +1 -1
  216. package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
  217. package/dist/mcp-data/registry/panel-tool-header.json +1 -1
  218. package/dist/mcp-data/registry/panel-tool-search.json +1 -1
  219. package/dist/mcp-data/registry/panel-tools.json +3 -2
  220. package/dist/mcp-data/registry/radio.json +1 -1
  221. package/dist/mcp-data/registry/registry.json +249 -19
  222. package/dist/mcp-data/registry/scroll-overlay.json +1 -1
  223. package/dist/mcp-data/registry/select-multi.json +2 -2
  224. package/dist/mcp-data/registry/select.json +2 -2
  225. package/dist/mcp-data/registry/shell-app.json +1 -1
  226. package/dist/mcp-data/registry/shell-gradient-picker.json +1 -1
  227. package/dist/mcp-data/registry/shell-gradient-swatch.json +1 -1
  228. package/dist/mcp-data/registry/shell-page.json +5 -4
  229. package/dist/mcp-data/registry/shell-tools.json +1 -1
  230. package/dist/mcp-data/registry/skeleton.json +1 -1
  231. package/dist/mcp-data/registry/slider.json +1 -1
  232. package/dist/mcp-data/registry/swatch-picker.json +1 -1
  233. package/dist/mcp-data/registry/switch.json +1 -1
  234. package/dist/mcp-data/registry/tab-group.json +1 -1
  235. package/dist/mcp-data/registry/tag.json +1 -1
  236. package/dist/mcp-data/registry/text.json +3 -3
  237. package/dist/mcp-data/registry/toast.json +2 -2
  238. package/dist/mcp-data/registry/tooltip-data-viz.json +3 -1
  239. package/dist/mcp-data/registry/tooltip.json +3 -8
  240. package/dist/mcp-data/registry/typing-indicator.json +1 -1
  241. package/dist/react/components.d.ts +1 -0
  242. package/dist/react/components.js +1 -0
  243. package/dist/react/ds-card-overview.d.ts +12 -0
  244. package/dist/react/ds-card-overview.js +12 -0
  245. package/dist/styles/control-elevation.css +11 -0
  246. package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +32 -0
  247. package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +20 -0
  248. package/dist/types/components/CardOverview/CardOverview.d.ts +64 -0
  249. package/dist/types/components/CardOverview/card-overview-types.d.ts +34 -0
  250. package/dist/types/components/CardOverview/index.d.ts +2 -0
  251. package/dist/types/components/ChartBar/ChartBar.d.ts +11 -0
  252. package/dist/types/components/ChartBarStacked/ChartBarStacked.d.ts +11 -0
  253. package/dist/types/components/ChartLine/ChartLine.d.ts +11 -0
  254. package/dist/types/components/Menu/Menu.d.ts +7 -5
  255. package/dist/types/components/Menu/menu-position.d.ts +6 -6
  256. package/dist/types/components/ShellPage/ShellPage.d.ts +1 -0
  257. package/dist/types/components/Tooltip/Tooltip.d.ts +1 -4
  258. package/dist/types/components.d.ts +234 -2
  259. package/dist/types/toast/toast-types.d.ts +3 -3
  260. package/dist/types/utils/anchored-position-controller.d.ts +105 -0
  261. package/dist/types/utils/anchored-position.d.ts +35 -0
  262. package/dist/types/utils/cartesian-chart-layout.d.ts +13 -0
  263. package/dist/types/utils/chart-viewport-controller.d.ts +21 -0
  264. package/dist/types/utils/choice-popup-alignment.d.ts +2 -2
  265. package/dist/types/utils/index.d.ts +2 -0
  266. package/dist/types/utils/metric-change.d.ts +53 -0
  267. package/dist/types/utils/select-controller.d.ts +3 -3
  268. package/dist/types/utils/token-defaults.d.ts +3 -0
  269. package/package.json +3 -3
  270. package/dist/components/p-1darPzys.js +0 -2
  271. package/dist/components/p-B8C_yfLQ.js +0 -2
  272. package/dist/components/p-B8C_yfLQ.js.map +0 -1
  273. package/dist/components/p-BcfC6phQ.js.map +0 -1
  274. package/dist/components/p-Bl001G0Y.js +0 -2
  275. package/dist/components/p-BuiZcSga.js.map +0 -1
  276. package/dist/components/p-Bv9frkvW.js +0 -2
  277. package/dist/components/p-Bv9frkvW.js.map +0 -1
  278. package/dist/components/p-C0-K8vnW.js +0 -2
  279. package/dist/components/p-C0-K8vnW.js.map +0 -1
  280. package/dist/components/p-C2ym_Ich.js +0 -2
  281. package/dist/components/p-C_ewSXTT.js +0 -2
  282. package/dist/components/p-C_ewSXTT.js.map +0 -1
  283. package/dist/components/p-Ca9-fnFl.js +0 -2
  284. package/dist/components/p-Ca9-fnFl.js.map +0 -1
  285. package/dist/components/p-CydY-v7X.js +0 -2
  286. package/dist/components/p-CydY-v7X.js.map +0 -1
  287. package/dist/components/p-De7NquTI.js +0 -2
  288. package/dist/components/p-De7NquTI.js.map +0 -1
  289. package/dist/components/p-Dg3xLna0.js +0 -2
  290. package/dist/components/p-Dg3xLna0.js.map +0 -1
  291. package/dist/components/p-k0Hmj1KV.js.map +0 -1
  292. package/dist/components/p-pgxlkvUy.js +0 -2
  293. package/dist/lib/utils/anchored-popup.d.ts +0 -23
  294. package/dist/types/components/Tooltip/tooltip-position.d.ts +0 -21
  295. package/dist/types/utils/anchored-popup.d.ts +0 -24
  296. /package/dist/components/{p-B-9A0e_0.js.map → p-B88n0pO3.js.map} +0 -0
  297. /package/dist/components/{p-C7bZ-jiU.js.map → p-BO5aqZcf.js.map} +0 -0
  298. /package/dist/components/{p-guQ7hv6W.js.map → p-BOCfICln.js.map} +0 -0
  299. /package/dist/components/{p-CvyTZ4Mg.js.map → p-CChcuL04.js.map} +0 -0
  300. /package/dist/components/{p-Crsn82rz.js.map → p-CCzG5xDD.js.map} +0 -0
  301. /package/dist/components/{p-BT5hgg5i.js.map → p-CIiBpjCn.js.map} +0 -0
  302. /package/dist/components/{p-B_5nxOeB.js.map → p-CgEYdMee.js.map} +0 -0
  303. /package/dist/components/{p-5-QAFB4j.js.map → p-Cuih680v.js.map} +0 -0
  304. /package/dist/components/{p-C_9ZH0A3.js.map → p-Cuqxh-Tq.js.map} +0 -0
  305. /package/dist/components/{p--eKXTylf.js.map → p-DCvA3Dc9.js.map} +0 -0
  306. /package/dist/components/{p-DNFd4Ao-.js.map → p-DLZm_-sU.js.map} +0 -0
  307. /package/dist/components/{p-C9h13YnX.js.map → p-DRnIuCiT.js.map} +0 -0
  308. /package/dist/components/{p-CUAYsK44.js.map → p-DlscFn2m.js.map} +0 -0
  309. /package/dist/components/{p-C6xC48hG.js.map → p-Re2kPrXm.js.map} +0 -0
  310. /package/dist/components/{p-DIa73GJP.js.map → p-XMZCaXs7.js.map} +0 -0
  311. /package/dist/components/{p-CqWV4Hl_.js.map → p-dyUp3Adm.js.map} +0 -0
  312. /package/dist/components/{p-CnAkobDW.js.map → p-nkYN0Bub.js.map} +0 -0
  313. /package/dist/components/{p-C2ym_Ich.js.map → p-yhj1lIPx.js.map} +0 -0
@@ -0,0 +1,360 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "card-overview",
4
+ "title": "CardOverview",
5
+ "description": "Page-level summary card pairing one headline score with a reporting period, an application-owned period control, and a responsive grid of comparable measures, with an optional compact 48px presentation.",
6
+ "type": "registry:ui",
7
+ "meta": {
8
+ "library": "@ds-mo/ui",
9
+ "distribution": "npm",
10
+ "storybook": "https://zainadeel.github.io/compomo/?path=/story/card-overview",
11
+ "source": "src/wc/components/CardOverview/CardOverview.tsx",
12
+ "intentStatus": "complete",
13
+ "intent": {
14
+ "audience": "general",
15
+ "status": "experimental",
16
+ "summary": "Page-level summary card pairing one headline score with a reporting period, an application-owned period control, and a responsive grid of comparable measures, with an optional compact 48px presentation.",
17
+ "useWhen": [
18
+ "A page opens with one headline figure that the surrounding measures explain.",
19
+ "Every measure is compared against the same period, so one caption describes the comparison for all of them.",
20
+ "The measures are read together at a glance rather than explored individually."
21
+ ],
22
+ "avoidWhen": [
23
+ "There is no headline figure and the measures are unrelated; use the matching card surface for each one.",
24
+ "A measure needs a chart, sparkline, or other visualization; the grid presents values and change only.",
25
+ "The measures each require their own comparison period or their own filter control.",
26
+ "The content is a settings section or a general read-only card."
27
+ ],
28
+ "alternatives": [
29
+ {
30
+ "when": "A measure needs a chart or other data visualization.",
31
+ "component": "component:ds-card-shell-data-viz",
32
+ "reason": "CardShellDataViz owns the data-visualization shell contract; the overview grid presents values and change only."
33
+ },
34
+ {
35
+ "when": "The surface is a settings section with an edit workflow.",
36
+ "component": "component:ds-card-setting",
37
+ "reason": "CardSetting owns the controlled view and edit chrome."
38
+ }
39
+ ],
40
+ "commonlyComposedWith": [
41
+ "component:ds-select",
42
+ "component:ds-button-unfilled",
43
+ "component:ds-text",
44
+ "component:ds-tooltip"
45
+ ],
46
+ "accessibility": [
47
+ "The bar is a labelled region; set overviewLabel to name what is being summarised, such as Safety summary.",
48
+ "Trend arrows are decorative and hidden from assistive technology, so the formatted change value must read correctly on its own.",
49
+ "Colour never carries the trend meaning alone; the arrow direction and the value are both present.",
50
+ "Measures become selectable only when they are not inactive. Selectable measures form one roving tab stop, so the grid is a single stop and arrow keys move between measures.",
51
+ "Set labelTooltip when a measure's label needs qualifying rather than shortening the label into something ambiguous.",
52
+ "While loading, the region exposes a busy state and renders skeletons whose type metrics match the resolved content."
53
+ ],
54
+ "states": [
55
+ "Score and measures are supplied as data; the component owns their type treatment so summary bars stay consistent across pages.",
56
+ "Trend is supplied already resolved as a direction, a formatted value, and a tone. Whether a rise reads well is a product decision, so the component never infers tone from the numbers. Derive it with resolveMetricTrend.",
57
+ "Omit a trend when there is nothing to report; resolveMetricTrend returns null in that case so no zero change is rendered.",
58
+ "Omit score to render the bar without a headline figure. Set scoreErrorMessage to report that the figure could not be resolved while the measures remain readable.",
59
+ "Loading replaces the score and the measures with skeletons and does not alter the slotted period control.",
60
+ "At most six measures are shown. Keep larger collections outside the summary bar rather than turning it into a dense dashboard.",
61
+ "The period control is slotted rather than owned, because the choice of stepper, select, or date range varies by product surface.",
62
+ "compact is exactly 48px high and keeps only the score label, score value, trend, reporting copy, and slotted period control. It omits the score band, measures, and footer."
63
+ ],
64
+ "responsiveBehavior": [
65
+ "The measure grid reflows to fewer columns and finally stacks, driven by the minimum measure width alone. There is no measurement and no horizontal scrolling.",
66
+ "Every occupied grid track has the same width. When a final row is incomplete, its measures keep the same width as the row above and the unused tracks remain empty.",
67
+ "Set metricMinWidth to change the width a measure may shrink to before the grid drops a column.",
68
+ "The score block hugs its content and never shrinks, so the headline figure holds its size while the grid absorbs the remaining width.",
69
+ "Once the card reaches its narrow stacked state, one summary block holds the score label, score, trend, score band, reporting period, and the application-owned period control above the single-column measures.",
70
+ "In that stacked summary, the score and trend share one line at the start, while the score band is hidden to preserve space. The period control stays at the upper end, while the current period and comparison sit on separate right-aligned lines beside the score.",
71
+ "Every measure occupies a full-width row in the stacked state.",
72
+ "Set layout to stacked when the owning page shell enters a responsive mode before the card's own container reaches its narrow threshold.",
73
+ "CardOverview does not observe scroll or choose its own presentation. The page owner may use compact as sticky summary chrome on supported breakpoints."
74
+ ],
75
+ "frameworkCaveats": {
76
+ "customElements": [
77
+ "Assign score and metrics as JavaScript properties; both are objects and cannot be expressed as HTML attributes.",
78
+ "Place the period control in the filter slot; the component reserves space for it but never renders one."
79
+ ],
80
+ "react": [
81
+ "Pass score and metrics as props and read the selected measure from the onDsMetricSelect event detail.",
82
+ "Derive each trend with resolveMetricTrend so tone stays an explicit product decision."
83
+ ],
84
+ "angular": [
85
+ "Bind [score] and [metrics] as properties and read the selected measure from $event.detail on (dsMetricSelect).",
86
+ "Derive each trend with resolveMetricTrend so tone stays an explicit product decision."
87
+ ]
88
+ },
89
+ "references": [
90
+ {
91
+ "label": "Storybook structural examples",
92
+ "path": "src/wc/components/CardOverview/CardOverview.stories.ts"
93
+ },
94
+ {
95
+ "label": "Trend resolution unit coverage",
96
+ "path": "tests/metric-change.test.ts"
97
+ }
98
+ ]
99
+ },
100
+ "api": {
101
+ "props": {
102
+ "comparisonLabel": {
103
+ "type": "string",
104
+ "resolvedType": "string",
105
+ "attribute": "comparison-label",
106
+ "default": "''",
107
+ "required": false,
108
+ "mutable": false,
109
+ "description": "Comparison caption, for example `vs Previous period`."
110
+ },
111
+ "isLoading": {
112
+ "type": "boolean",
113
+ "resolvedType": "boolean",
114
+ "attribute": "is-loading",
115
+ "default": "false",
116
+ "required": false,
117
+ "mutable": false,
118
+ "description": "Replace the score and metrics with skeletons while data resolves."
119
+ },
120
+ "layout": {
121
+ "type": "CardOverviewLayout",
122
+ "resolvedType": "\"auto\" | \"stacked\"",
123
+ "attribute": "layout",
124
+ "default": "'auto'",
125
+ "required": false,
126
+ "mutable": false,
127
+ "description": "Intrinsic responsive layout, or a page-owned single-column stack."
128
+ },
129
+ "metricMinWidth": {
130
+ "type": "string",
131
+ "resolvedType": "string",
132
+ "attribute": "metric-min-width",
133
+ "default": "'var(--dimension-menu-width-xs)'",
134
+ "required": false,
135
+ "mutable": false,
136
+ "description": "Width a metric cell may shrink to before the grid drops a column. The grid\nreflows and then stacks from this alone, so no measurement is required."
137
+ },
138
+ "metrics": {
139
+ "type": "OverviewMetric[]",
140
+ "resolvedType": "OverviewMetric[]",
141
+ "default": "[]",
142
+ "required": false,
143
+ "mutable": false,
144
+ "description": "Measures rendered in the responsive grid. Only the first six are shown."
145
+ },
146
+ "overviewLabel": {
147
+ "type": "string",
148
+ "resolvedType": "string",
149
+ "attribute": "overview-label",
150
+ "default": "'Overview'",
151
+ "required": false,
152
+ "mutable": false,
153
+ "description": "Accessible name for the region."
154
+ },
155
+ "periodLabel": {
156
+ "type": "string",
157
+ "resolvedType": "string",
158
+ "attribute": "period-label",
159
+ "default": "''",
160
+ "required": false,
161
+ "mutable": false,
162
+ "description": "Current reporting period, for example `Jun 29, 2026 – Jul 26, 2026`."
163
+ },
164
+ "score": {
165
+ "type": "OverviewScore | undefined",
166
+ "resolvedType": "OverviewScore | undefined",
167
+ "required": false,
168
+ "mutable": false,
169
+ "description": "Leading summary block. Omit to render the bar without a headline figure."
170
+ },
171
+ "scoreErrorMessage": {
172
+ "type": "string | undefined",
173
+ "resolvedType": "string | undefined",
174
+ "attribute": "score-error-message",
175
+ "required": false,
176
+ "mutable": false,
177
+ "description": "Message shown in place of the score when its figure cannot be resolved."
178
+ },
179
+ "variant": {
180
+ "type": "CardOverviewVariant",
181
+ "resolvedType": "\"compact\" | \"default\"",
182
+ "attribute": "variant",
183
+ "default": "'default'",
184
+ "required": false,
185
+ "mutable": false,
186
+ "description": "Full summary card, or the condensed 48px summary bar."
187
+ }
188
+ },
189
+ "events": [
190
+ {
191
+ "name": "dsMetricSelect",
192
+ "detail": "OverviewMetric",
193
+ "bubbles": true,
194
+ "cancelable": true,
195
+ "composed": true,
196
+ "description": "Emitted when a metric that is not inactive is activated."
197
+ }
198
+ ],
199
+ "methods": [],
200
+ "slots": []
201
+ },
202
+ "props": {
203
+ "comparisonLabel": {
204
+ "type": "string",
205
+ "resolvedType": "string",
206
+ "attribute": "comparison-label",
207
+ "default": "''",
208
+ "required": false,
209
+ "mutable": false,
210
+ "description": "Comparison caption, for example `vs Previous period`."
211
+ },
212
+ "isLoading": {
213
+ "type": "boolean",
214
+ "resolvedType": "boolean",
215
+ "attribute": "is-loading",
216
+ "default": "false",
217
+ "required": false,
218
+ "mutable": false,
219
+ "description": "Replace the score and metrics with skeletons while data resolves."
220
+ },
221
+ "layout": {
222
+ "type": "CardOverviewLayout",
223
+ "resolvedType": "\"auto\" | \"stacked\"",
224
+ "attribute": "layout",
225
+ "default": "'auto'",
226
+ "required": false,
227
+ "mutable": false,
228
+ "description": "Intrinsic responsive layout, or a page-owned single-column stack."
229
+ },
230
+ "metricMinWidth": {
231
+ "type": "string",
232
+ "resolvedType": "string",
233
+ "attribute": "metric-min-width",
234
+ "default": "'var(--dimension-menu-width-xs)'",
235
+ "required": false,
236
+ "mutable": false,
237
+ "description": "Width a metric cell may shrink to before the grid drops a column. The grid\nreflows and then stacks from this alone, so no measurement is required."
238
+ },
239
+ "metrics": {
240
+ "type": "OverviewMetric[]",
241
+ "resolvedType": "OverviewMetric[]",
242
+ "default": "[]",
243
+ "required": false,
244
+ "mutable": false,
245
+ "description": "Measures rendered in the responsive grid. Only the first six are shown."
246
+ },
247
+ "overviewLabel": {
248
+ "type": "string",
249
+ "resolvedType": "string",
250
+ "attribute": "overview-label",
251
+ "default": "'Overview'",
252
+ "required": false,
253
+ "mutable": false,
254
+ "description": "Accessible name for the region."
255
+ },
256
+ "periodLabel": {
257
+ "type": "string",
258
+ "resolvedType": "string",
259
+ "attribute": "period-label",
260
+ "default": "''",
261
+ "required": false,
262
+ "mutable": false,
263
+ "description": "Current reporting period, for example `Jun 29, 2026 – Jul 26, 2026`."
264
+ },
265
+ "score": {
266
+ "type": "OverviewScore | undefined",
267
+ "resolvedType": "OverviewScore | undefined",
268
+ "required": false,
269
+ "mutable": false,
270
+ "description": "Leading summary block. Omit to render the bar without a headline figure."
271
+ },
272
+ "scoreErrorMessage": {
273
+ "type": "string | undefined",
274
+ "resolvedType": "string | undefined",
275
+ "attribute": "score-error-message",
276
+ "required": false,
277
+ "mutable": false,
278
+ "description": "Message shown in place of the score when its figure cannot be resolved."
279
+ },
280
+ "variant": {
281
+ "type": "CardOverviewVariant",
282
+ "resolvedType": "\"compact\" | \"default\"",
283
+ "attribute": "variant",
284
+ "default": "'default'",
285
+ "required": false,
286
+ "mutable": false,
287
+ "description": "Full summary card, or the condensed 48px summary bar."
288
+ }
289
+ },
290
+ "events": [
291
+ {
292
+ "name": "dsMetricSelect",
293
+ "detail": "OverviewMetric",
294
+ "bubbles": true,
295
+ "cancelable": true,
296
+ "composed": true,
297
+ "description": "Emitted when a metric that is not inactive is activated."
298
+ }
299
+ ],
300
+ "methods": [],
301
+ "slots": [],
302
+ "exports": {
303
+ "customElement": "ds-card-overview",
304
+ "react": "DsCardOverview",
305
+ "angular": "DsCardOverview"
306
+ },
307
+ "consumption": {
308
+ "install": "npm install @ds-mo/ui @ds-mo/tokens @ds-mo/icons",
309
+ "cssSetup": "import '@ds-mo/tokens';\nimport '@ds-mo/tokens/reset';\nimport '@ds-mo/tokens/globals';",
310
+ "customElements": {
311
+ "import": "import '@ds-mo/ui/dist/components/ds-card-overview.js';",
312
+ "example": "<ds-card-overview></ds-card-overview>"
313
+ },
314
+ "react": {
315
+ "import": "import { DsCardOverview } from '@ds-mo/ui/react';",
316
+ "example": "<DsCardOverview />"
317
+ },
318
+ "angular": {
319
+ "import": "import { DsCardOverview } from '@ds-mo/ui/angular/ds-card-overview';",
320
+ "example": "<ds-card-overview></ds-card-overview>"
321
+ },
322
+ "complexPropertyNote": "Assign these non-primitive values as JavaScript properties: metrics, score.",
323
+ "peerDependencies": {
324
+ "required": [
325
+ "@ds-mo/tokens ^5.0.0",
326
+ "@ds-mo/icons ^6.4.0"
327
+ ],
328
+ "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
329
+ }
330
+ }
331
+ },
332
+ "dependencies": [
333
+ "@ds-mo/ui",
334
+ "@ds-mo/tokens",
335
+ "@ds-mo/icons"
336
+ ],
337
+ "registryDependencies": [
338
+ "icon",
339
+ "skeleton",
340
+ "text",
341
+ "tooltip"
342
+ ],
343
+ "files": [
344
+ {
345
+ "path": "src/wc/components/CardOverview/CardOverview.css",
346
+ "content": "@import '../../utils/interaction-fill.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/control-density.css';\n@import '../../utils/control-parts.css';\n@import '../../styles/control-elevation.css';\n\n/*\n * A permanently dark surface, independent of the page theme, so the summary bar\n * reads the same on every product surface. Every foreground, border, and\n * interaction token below therefore comes from the always-dark family rather\n * than the theme-reactive one.\n */\n\n:host {\n display: block;\n box-sizing: border-box;\n /* Drives the narrow layout below from the card's own width, not the viewport's. */\n container-type: inline-size;\n /* A summary is read, not copied; stray selection while clicking cells is noise. */\n -webkit-user-select: none;\n user-select: none;\n /* Width a metric may shrink to before the grid drops a column. */\n --ds-card-overview-metric-min: calc(var(--dimension-size-400) * 5);\n --ds-card-overview-divider-width: var(--dimension-stroke-width-012);\n --ds-card-overview-divider-color: var(--color-always-dark-border-tertiary);\n --ds-card-overview-divider: var(--ds-card-overview-divider-width) solid\n var(--ds-card-overview-divider-color);\n border-radius: var(--dimension-radius-050);\n background: var(--color-always-dark-background);\n color: var(--color-always-dark-foreground-primary);\n /*\n * Clips the square-cornered metric washes to the card radius. The outer\n * elevation shadow is painted outside the border box and is unaffected, and\n * the inset highlight is meant to sit exactly on this edge.\n */\n overflow: hidden;\n}\n\n.card-overview__layout {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n grid-template-columns: minmax(0, 1fr);\n align-items: stretch;\n min-width: 0;\n}\n\n.card-overview__layout--has-score {\n grid-template-columns: auto minmax(0, 1fr);\n}\n\n/*\n * Transparent at regular widths so the score and header participate in the\n * inner layout grid directly. At the narrow breakpoint it becomes the unified\n * summary block above the metrics.\n */\n.card-overview__summary {\n display: contents;\n}\n\n/* ── Score ────────────────────────────────────────────────────────────────── */\n\n/*\n * Hugs its content and never shrinks, so the headline figure keeps its size and\n * the metric grid absorbs the remaining width.\n */\n/*\n * Top aligned rather than centred, and padded to match the header, so the score\n * label sits in the same 32px box at the same offset as the period text beside\n * it. Both use the same type variant, so their baselines land together.\n */\n.card-overview__score {\n display: flex;\n grid-row: 1 / span 2;\n grid-column: 1;\n flex: 0 0 auto;\n flex-direction: column;\n gap: 0;\n min-width: 0;\n padding: var(--dimension-space-100) var(--dimension-space-200);\n border-inline-end: var(--ds-card-overview-divider);\n}\n\n.card-overview__score--resolved {\n min-inline-size: max-content;\n}\n\n/* The control-height box that aligns this label with the period text. */\n.card-overview__score-label-row {\n display: flex;\n align-items: center;\n min-height: var(--ds-control-height);\n}\n\n/*\n * The score is its own column, so its rows cannot baseline-align with the measure\n * rows through flex or grid — those only align items that share a line. These two\n * offsets pull the column onto the measure baselines instead.\n *\n * They are compensation for how much lower a display-scale figure sits in its line\n * box than the body text it aligns to, so they are coupled to the type pairing:\n * change the score or measure variants and both need re-measuring.\n */\n.card-overview__score-figure {\n display: flex;\n align-items: baseline;\n gap: var(--dimension-space-050);\n min-width: 0;\n margin-block-start: calc(-1 * (var(--dimension-space-150) + var(--dimension-space-012)));\n}\n\n.card-overview__score-value {\n flex: 0 0 auto;\n}\n\n/* Second half of the baseline compensation described above the score figure. */\n.card-overview__score-band {\n margin-block-start: calc(-1 * var(--dimension-space-025));\n}\n\n/*\n * A skeleton bar is a solid block, so in a baseline-aligned row it aligns on its\n * bottom edge while the text it stands in for aligns on its baseline. Next to a\n * display-scale figure that difference is the descent under the figure's\n * baseline, which drops the bar below where the resolved trend sits.\n *\n * The offset is applied with relative positioning rather than a margin: a margin\n * is not part of a synthesized baseline, so it grows the figure instead of moving\n * the bar, which then pushes the band below it out of place.\n *\n * Only needed beside the score figure; the measure rows pair body variants whose\n * bottom edge and baseline already agree.\n */\n.card-overview__skeleton-baseline {\n position: relative;\n inset-block-start: calc(-1 * var(--dimension-space-150));\n}\n\n.card-overview__score--error {\n flex-direction: row;\n align-items: center;\n gap: var(--dimension-space-050);\n color: var(--color-always-dark-foreground-negative);\n}\n\n/* ── Body ─────────────────────────────────────────────────────────────────── */\n\n/*\n * Takes the remaining inline space. The minimum is what makes the host wrap: once\n * the score and roughly two measure columns no longer fit side by side, the body\n * drops below the score instead of squeezing it. `min()` keeps that from becoming\n * an overflow floor on very narrow viewports.\n */\n.card-overview__body {\n display: flex;\n grid-row: 2;\n grid-column: 1;\n flex-direction: column;\n min-width: 0;\n}\n\n.card-overview__body--has-score {\n grid-column: 2;\n}\n\n/*\n * One control row: 8px of padding on every side around a 32px md control, so the\n * bar is 8 + 32 + 8. Both ends of the bar are control-shaped boxes — the period\n * text on the left and the slotted control on the right — so the row reads\n * balanced rather than text on one side and a control on the other.\n */\n.card-overview__header {\n display: flex;\n grid-row: 1;\n grid-column: 1;\n align-items: center;\n gap: var(--dimension-space-100);\n min-width: 0;\n padding: var(--dimension-space-100);\n border-block-end: var(--ds-card-overview-divider);\n box-sizing: border-box;\n}\n\n.card-overview__header--has-score {\n grid-column: 2;\n}\n\n/*\n * Matches the control's box on the opposite end, including its inline padding, so\n * the text lands at the same optical inset the slotted control does:\n * 8 from the bar + 6 from this box + 2 from the label inset = 16.\n *\n * Nowrap keeps the row at the control height; the period truncates rather than\n * growing the bar to two lines.\n */\n.card-overview__period {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: var(--dimension-space-050);\n min-height: var(--ds-control-height);\n min-width: 0;\n padding-inline: var(--ds-control-padding-inline);\n overflow: hidden;\n white-space: nowrap;\n}\n\n/* The period control is slotted, so only reserve space for it. */\n.card-overview__filter {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n}\n\n/* ── Metrics ──────────────────────────────────────────────────────────────── */\n\n/*\n * `auto-fit` gives every occupied track an equal share while all metrics fit on\n * one row. Once wrapping creates another row, its cells stay on those same\n * tracks, so a partial final row leaves empty space instead of stretching one\n * measure wider than its peers.\n *\n * Dividers are painted outward from each cell and clipped by this grid. That\n * leaves only the lines between cells: anything emitted from the final column or\n * final row lands outside the grid and is clipped without needing to detect the\n * number of tracks.\n *\n * `flex: 1 1 auto` makes the grid absorb whatever height the body has\n * left, so cells reach the card bottom and their hover wash has no dead strip.\n */\n.card-overview__metrics {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: repeat(\n auto-fit,\n minmax(min(100%, var(--ds-card-overview-metric-min)), 1fr)\n );\n align-content: stretch;\n min-width: 0;\n overflow: clip;\n}\n\n/*\n * Square by design. Cells tile edge to edge against their dividers, so a radius\n * would break the seam; the card's own radius clips the outer corners instead.\n *\n * Padding is plain rather than control-derived: a cell is a block of content, not\n * a control box that has to optically match something on the far side.\n */\n.card-overview__metric {\n display: flex;\n position: relative;\n flex-direction: column;\n gap: var(--dimension-space-050);\n min-width: 0;\n padding: var(--dimension-space-175) var(--dimension-space-200);\n border-radius: 0;\n box-shadow:\n var(--ds-card-overview-divider-width) 0 0 0 var(--ds-card-overview-divider-color),\n 0 var(--ds-card-overview-divider-width) 0 0 var(--ds-card-overview-divider-color);\n}\n\n.card-overview__metric[role='button'] {\n cursor: default;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.card-overview__metric-label {\n min-width: 0;\n}\n\n.card-overview__metric-figure {\n display: flex;\n align-items: baseline;\n gap: var(--dimension-space-100);\n min-width: 0;\n}\n\n/* ── Trend ────────────────────────────────────────────────────────────────── */\n\n/*\n * Tone arrives resolved from the caller: the arrow direction and the sentiment\n * are independent, so a falling metric can read positive or neutral. The arrow is\n * a glyph inside this text node, so it always matches the surrounding weight.\n */\n.card-overview__trend {\n flex: 0 0 auto;\n white-space: nowrap;\n}\n\n/* ── Narrow layout ────────────────────────────────────────────────────────── */\n\n/*\n * Below roughly two measure columns the card becomes a full stack. The summary\n * wrapper owns one block above the metrics: score label, figure, and trend stay\n * together at the start; the period control sits at the upper end; and the period\n * copy follows the score instead of becoming a separate divided row.\n */\n/*\n * Selectors are host-qualified purely for specificity: the compiled sheet places\n * these rules ahead of the base ones, so a plain class here would only ever add\n * properties and never override them.\n */\n@container (max-width: 480px) {\n :host .card-overview__layout {\n grid-template-rows: auto minmax(0, 1fr);\n grid-template-columns: minmax(0, 1fr);\n }\n\n :host .card-overview__summary {\n display: grid;\n grid-row: 1;\n grid-column: 1;\n grid-template-columns: minmax(0, 1fr) auto;\n grid-template-rows: auto;\n border-block-end: var(--ds-card-overview-divider);\n }\n\n :host .card-overview__score {\n display: grid;\n grid-row: 1;\n grid-column: 1;\n grid-template-rows: auto auto;\n grid-template-columns: auto auto;\n justify-content: start;\n column-gap: var(--dimension-space-100);\n width: auto;\n padding-block-end: var(--dimension-space-100);\n padding-inline-end: var(--dimension-space-100);\n border-inline-end: none;\n }\n\n :host .card-overview__score-label-row {\n grid-row: 1;\n grid-column: 1 / -1;\n min-height: var(--ds-control-height);\n }\n\n /*\n * The wide score uses optical offsets to meet the neighbouring metric\n * baselines. In the stacked summary those neighbours are gone, so natural\n * document flow keeps the label, figure, band, and period clearly ordered.\n */\n :host .card-overview__score-band,\n :host .card-overview__score-figure {\n grid-row: 2;\n margin-block-start: 0;\n }\n\n :host .card-overview__score-figure {\n grid-column: 1;\n align-self: baseline;\n gap: var(--dimension-space-100);\n }\n\n :host .card-overview__score-band {\n grid-column: 2;\n align-self: baseline;\n display: none;\n }\n\n :host .card-overview__header {\n display: grid;\n grid-row: 1;\n grid-column: 2;\n grid-template-rows: auto auto;\n align-content: start;\n gap: 0;\n padding: 0;\n border-block-end: none;\n }\n\n :host .card-overview__filter {\n grid-row: 1;\n grid-column: 1;\n align-self: start;\n justify-self: end;\n padding: var(--dimension-space-100) var(--dimension-space-100) 0 0;\n }\n\n :host .card-overview__period {\n grid-row: 2;\n grid-column: 1;\n flex-direction: column;\n align-items: flex-end;\n justify-self: stretch;\n gap: 0;\n min-height: 0;\n padding-block: var(--dimension-space-150) var(--dimension-space-100);\n padding-inline: var(--dimension-space-100) var(--dimension-space-200);\n overflow: visible;\n text-align: end;\n white-space: nowrap;\n }\n\n :host .card-overview__body {\n grid-row: 2;\n grid-column: 1;\n }\n}\n\n/*\n * Page shells may enter a responsive mode before this card itself becomes\n * narrow. The explicit stacked layout applies the same composition without\n * coupling CardOverview to a viewport breakpoint.\n */\n:host(.card-overview--stacked) .card-overview__layout {\n grid-template-rows: auto minmax(0, 1fr);\n grid-template-columns: minmax(0, 1fr);\n}\n\n:host(.card-overview--stacked) .card-overview__summary {\n display: grid;\n grid-row: 1;\n grid-column: 1;\n grid-template-columns: minmax(0, 1fr) auto;\n grid-template-rows: auto;\n border-block-end: var(--ds-card-overview-divider);\n}\n\n:host(.card-overview--stacked) .card-overview__score {\n display: grid;\n grid-row: 1;\n grid-column: 1;\n grid-template-rows: auto auto;\n grid-template-columns: auto auto;\n justify-content: start;\n column-gap: var(--dimension-space-100);\n width: auto;\n padding-block-end: var(--dimension-space-100);\n padding-inline-end: var(--dimension-space-100);\n border-inline-end: none;\n}\n\n:host(.card-overview--stacked) .card-overview__score-label-row {\n grid-row: 1;\n grid-column: 1 / -1;\n min-height: var(--ds-control-height);\n}\n\n:host(.card-overview--stacked) .card-overview__score-band,\n:host(.card-overview--stacked) .card-overview__score-figure {\n grid-row: 2;\n margin-block-start: 0;\n}\n\n:host(.card-overview--stacked) .card-overview__score-figure {\n grid-column: 1;\n align-self: baseline;\n gap: var(--dimension-space-100);\n}\n\n:host(.card-overview--stacked) .card-overview__score-band {\n grid-column: 2;\n align-self: baseline;\n display: none;\n}\n\n:host(.card-overview--stacked) .card-overview__header {\n display: grid;\n grid-row: 1;\n grid-column: 2;\n grid-template-rows: auto auto;\n align-content: start;\n gap: 0;\n padding: 0;\n border-block-end: none;\n}\n\n:host(.card-overview--stacked) .card-overview__filter {\n grid-row: 1;\n grid-column: 1;\n align-self: start;\n justify-self: end;\n padding: var(--dimension-space-100) var(--dimension-space-100) 0 0;\n}\n\n:host(.card-overview--stacked) .card-overview__period {\n grid-row: 2;\n grid-column: 1;\n flex-direction: column;\n align-items: flex-end;\n justify-self: stretch;\n gap: 0;\n min-height: 0;\n padding-block: var(--dimension-space-150) var(--dimension-space-100);\n padding-inline: var(--dimension-space-100) var(--dimension-space-200);\n overflow: visible;\n text-align: end;\n white-space: nowrap;\n}\n\n:host(.card-overview--stacked) .card-overview__body {\n grid-row: 2;\n grid-column: 1;\n}\n\n:host(.card-overview--stacked) .card-overview__metrics {\n grid-template-columns: minmax(0, 1fr);\n}\n\n/* ── Compact presentation ───────────────────────────────────────────────── */\n\n/*\n * Matches the shared 48px bar contract: one 32px control row with 8px above\n * and below. The score remains a distinct leading cell, while reporting copy\n * absorbs the available width and the application-owned control never shrinks.\n */\n:host(.card-overview--compact) {\n height: var(--dimension-size-600);\n min-height: var(--dimension-size-600);\n}\n\n:host(.card-overview--compact) .card-overview__layout,\n:host(.card-overview--compact) .card-overview__summary {\n display: flex;\n width: 100%;\n height: 100%;\n min-width: 0;\n}\n\n:host(.card-overview--compact) .card-overview__score {\n display: flex;\n flex: 0 0 auto;\n flex-direction: row;\n align-items: center;\n gap: var(--dimension-space-100);\n width: auto;\n height: 100%;\n min-width: 0;\n padding: var(--dimension-space-100) var(--dimension-space-200);\n border-inline-end: var(--ds-card-overview-divider);\n box-sizing: border-box;\n}\n\n:host(.card-overview--compact) .card-overview__score-label-row {\n display: contents;\n min-height: 0;\n}\n\n:host(.card-overview--compact) .card-overview__score-label,\n:host(.card-overview--compact) .card-overview__score-figure,\n:host(.card-overview--compact) .card-overview__trend {\n flex: 0 0 auto;\n}\n\n:host(.card-overview--compact) .card-overview__score-figure {\n display: flex;\n align-self: center;\n align-items: baseline;\n gap: var(--dimension-space-050);\n margin-block-start: 0;\n}\n\n:host(.card-overview--compact) .card-overview__score-band {\n display: none;\n}\n\n:host(.card-overview--compact) .card-overview__header {\n display: flex;\n flex: 1 1 auto;\n grid-row: auto;\n grid-column: auto;\n align-items: center;\n gap: var(--dimension-space-100);\n height: 100%;\n min-width: 0;\n padding: var(--dimension-space-100);\n border-block-end: none;\n box-sizing: border-box;\n}\n\n:host(.card-overview--compact) .card-overview__period {\n display: flex;\n flex: 1 1 auto;\n flex-direction: row;\n align-items: center;\n gap: var(--dimension-space-050);\n min-width: 0;\n min-height: var(--ds-control-height);\n padding-inline: var(--ds-control-padding-inline);\n overflow: hidden;\n text-align: start;\n white-space: nowrap;\n}\n\n:host(.card-overview--compact) .card-overview__period-current,\n:host(.card-overview--compact) .card-overview__period-comparison {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n:host(.card-overview--compact) .card-overview__period-current {\n flex: 0 1 auto;\n}\n\n:host(.card-overview--compact) .card-overview__period-comparison {\n flex: 1 1 auto;\n}\n\n:host(.card-overview--compact) .card-overview__filter {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n padding: 0;\n}\n",
347
+ "type": "registry:ui"
348
+ },
349
+ {
350
+ "path": "src/wc/components/CardOverview/CardOverview.tsx",
351
+ "content": "import { Component, Element, Event, EventEmitter, h, Host, Prop, State } from '@stencil/core';\nimport type { TextColor, TextVariant } from '../Text/text-types';\nimport type { MetricTrend } from '../../utils/metric-change';\nimport type {\n CardOverviewLayout,\n CardOverviewVariant,\n OverviewMetric,\n OverviewScore,\n} from './card-overview-types';\n\n/** Metric cells below this width drop a grid column rather than compress further. */\nconst DEFAULT_METRIC_MIN_WIDTH = 'var(--dimension-menu-width-xs)';\n\n/** Skeleton cells rendered while loading with no metrics supplied yet. */\nconst LOADING_PLACEHOLDER_COUNT = 4;\n\n/** Maximum number of comparable measures the summary bar presents at once. */\nconst MAX_METRIC_COUNT = 6;\n\nconst TREND_COLORS: Record<MetricTrend['tone'], TextColor> = {\n positive: 'var(--color-always-dark-foreground-positive)',\n negative: 'var(--color-always-dark-foreground-negative)',\n neutral: 'var(--color-always-dark-foreground-secondary)',\n};\n\nconst ALWAYS_DARK_PRIMARY: TextColor = 'var(--color-always-dark-foreground-primary)';\nconst ALWAYS_DARK_SECONDARY: TextColor = 'var(--color-always-dark-foreground-secondary)';\n\n@Component({\n tag: 'ds-card-overview',\n styleUrl: 'CardOverview.css',\n scoped: true,\n})\nexport class CardOverview {\n @Element() el!: HTMLElement;\n\n /** Full summary card, or the condensed 48px summary bar. */\n @Prop() variant: CardOverviewVariant = 'default';\n\n /** Intrinsic responsive layout, or a page-owned single-column stack. */\n @Prop() layout: CardOverviewLayout = 'auto';\n\n /** Leading summary block. Omit to render the bar without a headline figure. */\n @Prop() score: OverviewScore | undefined;\n\n /** Current reporting period, for example `Jun 29, 2026 – Jul 26, 2026`. */\n @Prop() periodLabel: string = '';\n\n /** Comparison caption, for example `vs Previous period`. */\n @Prop() comparisonLabel: string = '';\n\n /** Measures rendered in the responsive grid. Only the first six are shown. */\n @Prop() metrics: OverviewMetric[] = [];\n\n /**\n * Width a metric cell may shrink to before the grid drops a column. The grid\n * reflows and then stacks from this alone, so no measurement is required.\n */\n @Prop() metricMinWidth: string = DEFAULT_METRIC_MIN_WIDTH;\n\n /** Replace the score and metrics with skeletons while data resolves. */\n @Prop() isLoading: boolean = false;\n\n /** Message shown in place of the score when its figure cannot be resolved. */\n @Prop() scoreErrorMessage: string | undefined;\n\n /** Accessible name for the region. */\n @Prop() overviewLabel: string = 'Overview';\n\n /** Emitted when a metric that is not inactive is activated. */\n @Event() dsMetricSelect!: EventEmitter<OverviewMetric>;\n\n /** Roving tab stop across selectable metrics. */\n @State() private focusedMetricIndex: number = 0;\n\n private get hasScore(): boolean {\n return this.score !== undefined || this.scoreErrorMessage !== undefined || this.isLoading;\n }\n\n private get visibleMetrics(): OverviewMetric[] {\n return this.metrics.slice(0, MAX_METRIC_COUNT);\n }\n\n /** Index of the roving tab stop, skipping inactive metrics. */\n private get rovingIndex(): number {\n const first = this.visibleMetrics.findIndex(metric => !metric.isInactive);\n if (first < 0) return -1;\n const current = this.visibleMetrics[this.focusedMetricIndex];\n return current && !current.isInactive ? this.focusedMetricIndex : first;\n }\n\n private selectMetric(metric: OverviewMetric, index: number) {\n if (metric.isInactive) return;\n this.focusedMetricIndex = index;\n this.dsMetricSelect.emit(metric);\n }\n\n /** Move the roving tab stop, wrapping and skipping inactive metrics. */\n private moveFocus(from: number, step: number) {\n const metrics = this.visibleMetrics;\n const count = metrics.length;\n if (count === 0) return;\n\n for (let offset = 1; offset <= count; offset += 1) {\n // Positive modulo so a backwards step from the first metric wraps to the last.\n const next = (((from + step * offset) % count) + count) % count;\n if (metrics[next]?.isInactive) continue;\n\n this.focusedMetricIndex = next;\n const cells = this.el.querySelectorAll<HTMLElement>('.card-overview__metric');\n cells[next]?.focus();\n return;\n }\n }\n\n private handleMetricKeyDown = (event: KeyboardEvent, index: number) => {\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n event.preventDefault();\n this.moveFocus(index, 1);\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n event.preventDefault();\n this.moveFocus(index, -1);\n break;\n default:\n break;\n }\n };\n\n /**\n * A skeleton bar matching the type metrics of the text it stands in for, so the\n * loading state holds the same shape and rhythm as the resolved content.\n *\n * `background` is always passed: the default base is the theme's quaternary\n * foreground, which is black and therefore invisible on this permanently dark\n * surface.\n */\n private bar(textVariant: TextVariant, width: string, className?: string) {\n return (\n <ds-skeleton\n class={className}\n variant=\"text\"\n textVariant={textVariant}\n width={width}\n background=\"always-dark\"\n />\n );\n }\n\n /**\n * Arrow and change in one text node.\n *\n * The arrow is a typeface glyph rather than an icon so it inherits the exact\n * size, weight, and baseline of the value beside it; an icon would need its\n * own size scale and would drift whenever the type scale changed.\n *\n * Tone is supplied by the caller and never inferred here.\n */\n private renderTrend(trend: MetricTrend | undefined, variant: TextVariant, emphasis = false) {\n if (!trend) return null;\n return (\n <ds-text\n as=\"span\"\n class={{\n 'card-overview__trend': true,\n [`card-overview__trend--${trend.tone}`]: true,\n }}\n variant={variant}\n emphasis={emphasis}\n color={TREND_COLORS[trend.tone]}\n fontFeature=\"tabular-nums\"\n >\n {trend.direction === 'up' ? '↑' : '↓'} {trend.value}\n </ds-text>\n );\n }\n\n private renderScore(compact: boolean) {\n if (this.isLoading) {\n if (compact) {\n return (\n <div class=\"card-overview__score ds-control--md\" part=\"score\">\n {this.bar('text-body-medium', '40px', 'card-overview__score-label')}\n <div class=\"card-overview__score-figure\">\n {this.bar('text-body-medium', '24px')}\n {this.bar('text-body-medium', '32px')}\n </div>\n </div>\n );\n }\n\n return (\n <div class=\"card-overview__score ds-control--md\" part=\"score\">\n {/*\n * The label row is kept but left empty. It carries the control-height\n * box that aligns the score block with the period control, so dropping\n * it would shift the whole block up; a bar inside it would collide with\n * the figure, which sits under the label by design.\n */}\n <div class=\"card-overview__score-label-row\" />\n <div class=\"card-overview__score-figure\">\n {this.bar('text-display-medium', '56px')}\n {this.bar('text-body-small', '24px', 'card-overview__skeleton-baseline')}\n </div>\n {/*\n * Class goes on the skeleton itself, matching the resolved band. In a\n * wrapper the bar picks up inline leading and drops below the resolved\n * band position.\n */}\n {this.bar(\n 'text-caption',\n '80px',\n 'card-overview__score-band card-overview__score-band--loading'\n )}\n </div>\n );\n }\n\n if (this.scoreErrorMessage) {\n return (\n <div class=\"card-overview__score card-overview__score--error\" part=\"score\" role=\"alert\">\n <ds-icon name=\"CircleExclamation\" size=\"sm\" color=\"inherit\" aria-hidden=\"true\" />\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.scoreErrorMessage}\n </ds-text>\n </div>\n );\n }\n\n const score = this.score;\n if (!score) return null;\n\n return (\n <div class=\"card-overview__score card-overview__score--resolved ds-control--md\" part=\"score\">\n <div class=\"card-overview__score-label-row\">\n <ds-text\n as=\"span\"\n class=\"card-overview__score-label\"\n variant=\"text-body-medium\"\n emphasis={!compact}\n color={ALWAYS_DARK_SECONDARY}\n >\n {score.label}\n </ds-text>\n </div>\n <div class=\"card-overview__score-figure\">\n <ds-text\n as=\"span\"\n class=\"card-overview__score-value\"\n variant={compact ? 'text-body-medium' : 'text-display-medium'}\n emphasis\n color={ALWAYS_DARK_PRIMARY}\n fontFeature=\"tabular-nums\"\n >\n {score.value}\n </ds-text>\n {this.renderTrend(\n score.trend,\n compact ? 'text-body-medium' : 'text-body-small',\n !compact\n )}\n </div>\n {score.band && !compact && (\n <ds-text\n as=\"span\"\n class=\"card-overview__score-band\"\n variant=\"text-caption\"\n color={ALWAYS_DARK_SECONDARY}\n >\n {score.band}\n </ds-text>\n )}\n </div>\n );\n }\n\n private renderMetric(metric: OverviewMetric, index: number) {\n const selectable = !metric.isInactive;\n const label = (\n <ds-text\n as=\"span\"\n class=\"card-overview__metric-label\"\n variant=\"text-body-small\"\n color={ALWAYS_DARK_SECONDARY}\n >\n {metric.label}\n </ds-text>\n );\n\n return (\n <div\n class={{\n 'card-overview__metric': true,\n 'card-overview__metric--inactive': !selectable,\n // Selection targets get the shared wash; press scaling is not used here\n // so the grid keeps its columns aligned. See docs/control-press-policy.md.\n 'ds-interaction-fill': selectable,\n // The card is permanently dark, so interaction tokens come from that family.\n 'ds-interaction-fill--on-always-dark': selectable,\n 'ds-focus-ring-inset': selectable,\n }}\n part=\"metric\"\n role={selectable ? 'button' : undefined}\n tabIndex={selectable && index === this.rovingIndex ? 0 : -1}\n onClick={() => this.selectMetric(metric, index)}\n onKeyDown={event => this.handleMetricKeyDown(event, index)}\n onFocusin={() => {\n if (selectable) this.focusedMetricIndex = index;\n }}\n >\n {metric.labelTooltip ? (\n <ds-tooltip label={metric.labelTooltip} side=\"top\" size=\"sm\">\n {label}\n </ds-tooltip>\n ) : (\n label\n )}\n <div class=\"card-overview__metric-figure\">\n <ds-text\n as=\"span\"\n class=\"card-overview__metric-value\"\n variant=\"text-body-medium\"\n color={ALWAYS_DARK_PRIMARY}\n fontFeature=\"tabular-nums\"\n >\n {metric.value}\n </ds-text>\n {this.renderTrend(metric.trend, 'text-body-medium')}\n </div>\n </div>\n );\n }\n\n private renderMetrics() {\n if (this.isLoading && this.metrics.length === 0) {\n return Array.from({ length: LOADING_PLACEHOLDER_COUNT }, (_, index) => (\n <div class=\"card-overview__metric\" key={`loading-${index}`}>\n {this.bar('text-body-small', '70%', 'card-overview__metric-label')}\n <div class=\"card-overview__metric-figure\">\n {this.bar('text-body-medium', '36px')}\n {/* text-body-medium, matching renderTrend for a metric — a smaller\n * variant here leaves the trend bar short of the value beside it. */}\n {this.bar('text-body-medium', '40px')}\n </div>\n </div>\n ));\n }\n\n return this.visibleMetrics.map((metric, index) => this.renderMetric(metric, index));\n }\n\n render() {\n const hasHeader = Boolean(this.periodLabel || this.comparisonLabel);\n const compact = this.variant === 'compact';\n\n return (\n <Host\n class={{\n 'card-overview': true,\n 'card-overview--has-score': this.hasScore,\n 'card-overview--compact': compact,\n 'card-overview--stacked': !compact && this.layout === 'stacked',\n // Split shadow and inset highlight, so the opaque surface cannot cover\n // the highlight the way a combined elevation shadow would.\n 'ds-control-elevation': true,\n 'ds-control-elevation--sm': !compact,\n 'ds-control-elevation--floating': compact,\n }}\n role=\"region\"\n aria-label={this.overviewLabel}\n aria-busy={this.isLoading ? 'true' : undefined}\n style={{ '--ds-card-overview-metric-min': this.metricMinWidth }}\n >\n <div\n class={{\n 'card-overview__layout': true,\n 'card-overview__layout--has-score': this.hasScore,\n }}\n >\n <div class=\"card-overview__summary\">\n {this.hasScore && this.renderScore(compact)}\n\n {/* `ds-control--md` supplies the 32px height and the label inset below. */}\n <div\n class={{\n 'card-overview__header': true,\n 'card-overview__header--has-score': this.hasScore,\n 'ds-control--md': true,\n }}\n >\n {this.isLoading ? (\n <div class=\"card-overview__period ds-control-label-box\">\n {this.bar('text-body-medium', '184px')}\n {this.bar('text-body-medium', '248px')}\n </div>\n ) : (\n hasHeader && (\n <div class=\"card-overview__period ds-control-label-box\">\n {this.periodLabel && (\n <ds-text\n as=\"span\"\n class=\"card-overview__period-current ds-control-label-box\"\n variant=\"text-body-medium\"\n emphasis\n color={ALWAYS_DARK_PRIMARY}\n >\n {this.periodLabel}\n </ds-text>\n )}\n {this.comparisonLabel && (\n <ds-text\n as=\"span\"\n class=\"card-overview__period-comparison ds-control-label-box\"\n variant=\"text-body-medium\"\n color={ALWAYS_DARK_SECONDARY}\n >\n {this.comparisonLabel}\n </ds-text>\n )}\n </div>\n )\n )}\n <div class=\"card-overview__filter\">\n {/*\n Period control is application owned: it varies by product surface.\n While loading it is stood in for by a control-shaped skeleton so the\n header keeps its resolved proportions.\n */}\n {this.isLoading ? (\n <ds-skeleton\n variant=\"control\"\n controlSize=\"md\"\n width=\"128px\"\n background=\"always-dark\"\n />\n ) : (\n <slot name=\"filter\" />\n )}\n </div>\n </div>\n </div>\n\n {!compact && (\n <div\n class={{\n 'card-overview__body': true,\n 'card-overview__body--has-score': this.hasScore,\n }}\n >\n <div class=\"card-overview__metrics\" part=\"metrics\">\n {this.renderMetrics()}\n </div>\n\n <slot name=\"footer\" />\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n",
352
+ "type": "registry:ui"
353
+ },
354
+ {
355
+ "path": "src/wc/components/CardOverview/card-overview-types.ts",
356
+ "content": "import type { MetricTrend } from '../../utils/metric-change';\n\nexport type CardOverviewVariant = 'default' | 'compact';\nexport type CardOverviewLayout = 'auto' | 'stacked';\n\n/**\n * Leading summary block — the headline figure the rest of the bar contextualises.\n *\n * Derive `trend` with `resolveMetricTrend` so whether a rise reads well stays a\n * product decision rather than a design-system one.\n */\nexport interface OverviewScore {\n /** Category above the figure, for example `Safety score`. */\n label: string;\n /** Display-ready headline figure. */\n value: string | number;\n /** Change against the comparison period. Omit when there is nothing to report. */\n trend?: MetricTrend;\n /** Qualitative band beneath the figure, for example `Good (67–83)`. */\n band?: string;\n}\n\n/** One measure in the overview grid. */\nexport interface OverviewMetric {\n /** Stable identity for keyed rendering and selection events. */\n id: string;\n label: string;\n /** Display-ready value; format compactly before passing it in. */\n value: string | number;\n /** Change against the comparison period. Omit when there is nothing to report. */\n trend?: MetricTrend;\n /** Present the measure without making it selectable. */\n isInactive?: boolean;\n /** Supplementary explanation for the label. */\n labelTooltip?: string;\n}\n",
357
+ "type": "registry:ui"
358
+ }
359
+ ]
360
+ }
@@ -249,7 +249,7 @@
249
249
  },
250
250
  "peerDependencies": {
251
251
  "required": [
252
- "@ds-mo/tokens ^3.1.1",
252
+ "@ds-mo/tokens ^5.0.0",
253
253
  "@ds-mo/icons ^6.4.0"
254
254
  ],
255
255
  "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
@@ -151,7 +151,7 @@
151
151
  },
152
152
  "peerDependencies": {
153
153
  "required": [
154
- "@ds-mo/tokens ^3.1.1",
154
+ "@ds-mo/tokens ^5.0.0",
155
155
  "@ds-mo/icons ^6.4.0"
156
156
  ],
157
157
  "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
@@ -61,8 +61,9 @@
61
61
  "Negative values are unsupported and render as zero; the owning product supplies loading, empty, and error states."
62
62
  ],
63
63
  "responsiveBehavior": [
64
- "The SVG preserves its authored aspect ratio while shrinking to fit a narrower parent.",
65
- "The parent supplies dimensions and chooses how many time buckets remain legible at each width.",
64
+ "Width and height provide the standalone intrinsic viewport; constrained card regions are measured and reflow both axes to their rendered pixel dimensions.",
65
+ "Responsive layout changes stack positions and plot extents without scaling SVG text, strokes, separators, corner radii, or margins.",
66
+ "The parent chooses how many time buckets remain legible at each width.",
66
67
  "Pre-format category labels and reduce bucket count before rendering when horizontal space becomes constrained."
67
68
  ],
68
69
  "frameworkCaveats": {
@@ -99,7 +100,8 @@
99
100
  "attribute": "height",
100
101
  "default": "240",
101
102
  "required": false,
102
- "mutable": false
103
+ "mutable": false,
104
+ "description": "Standalone intrinsic height. Container constraints reflow the plot at rendered pixel size."
103
105
  },
104
106
  "series": {
105
107
  "type": "ChartSeries[]",
@@ -123,7 +125,8 @@
123
125
  "attribute": "width",
124
126
  "default": "480",
125
127
  "required": false,
126
- "mutable": false
128
+ "mutable": false,
129
+ "description": "Standalone intrinsic width. Container constraints reflow the plot at rendered pixel size."
127
130
  }
128
131
  },
129
132
  "events": [],
@@ -145,7 +148,8 @@
145
148
  "attribute": "height",
146
149
  "default": "240",
147
150
  "required": false,
148
- "mutable": false
151
+ "mutable": false,
152
+ "description": "Standalone intrinsic height. Container constraints reflow the plot at rendered pixel size."
149
153
  },
150
154
  "series": {
151
155
  "type": "ChartSeries[]",
@@ -169,7 +173,8 @@
169
173
  "attribute": "width",
170
174
  "default": "480",
171
175
  "required": false,
172
- "mutable": false
176
+ "mutable": false,
177
+ "description": "Standalone intrinsic width. Container constraints reflow the plot at rendered pixel size."
173
178
  }
174
179
  },
175
180
  "events": [],
@@ -198,7 +203,7 @@
198
203
  "complexPropertyNote": "Assign these non-primitive values as JavaScript properties: categories, series.",
199
204
  "peerDependencies": {
200
205
  "required": [
201
- "@ds-mo/tokens ^3.1.1",
206
+ "@ds-mo/tokens ^5.0.0",
202
207
  "@ds-mo/icons ^6.4.0"
203
208
  ],
204
209
  "frameworks": "Custom Elements; React 18/19 wrappers; Angular 19-22 standalone adapters."
@@ -213,12 +218,12 @@
213
218
  "files": [
214
219
  {
215
220
  "path": "src/wc/components/ChartBarStacked/ChartBarStacked.css",
216
- "content": ":host {\n display: inline-flex;\n max-width: 100%;\n font-family: var(--typography-font-family);\n}\n\n.chart-bar-stacked__svg {\n display: block;\n max-width: 100%;\n height: auto;\n}\n\n.chart-bar-stacked__gridline {\n stroke: var(--color-border-tertiary);\n stroke-width: 1;\n}\n\n/* Matches ds-text text-caption regular (SVG cannot host ds-text). */\n.chart-bar-stacked__axis-label {\n fill: var(--color-foreground-secondary);\n font-family: var(--typography-font-family);\n font-size: var(--typography-fontsize-xs);\n font-weight: var(--typography-weight-medium);\n letter-spacing: var(--typography-letterspacing-positive);\n text-transform: uppercase;\n}\n\n.chart-bar-stacked__segment-shape--rounded {\n rx: var(--dimension-radius-025);\n}\n\n.chart-bar-stacked__segment-separator {\n stroke: var(--color-background-primary);\n stroke-width: var(--dimension-stroke-width-012);\n stroke-linecap: butt;\n}\n",
221
+ "content": ":host {\n display: inline-flex;\n max-width: 100%;\n font-family: var(--typography-font-family);\n}\n\n.chart-bar-stacked__svg {\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.chart-bar-stacked__gridline {\n stroke: var(--color-border-tertiary);\n stroke-width: var(--dimension-stroke-width-012);\n vector-effect: non-scaling-stroke;\n}\n\n/* Matches ds-text text-caption regular (SVG cannot host ds-text). */\n.chart-bar-stacked__axis-label {\n fill: var(--color-foreground-secondary);\n font-family: var(--typography-font-family);\n font-size: var(--typography-fontsize-xs);\n font-weight: var(--typography-weight-medium);\n letter-spacing: var(--typography-letterspacing-positive);\n text-transform: uppercase;\n}\n\n.chart-bar-stacked__segment-shape--rounded {\n rx: var(--dimension-radius-025);\n}\n\n.chart-bar-stacked__segment-separator {\n stroke: var(--color-background-primary);\n stroke-width: var(--dimension-stroke-width-012);\n stroke-linecap: butt;\n vector-effect: non-scaling-stroke;\n}\n",
217
222
  "type": "registry:ui"
218
223
  },
219
224
  {
220
225
  "path": "src/wc/components/ChartBarStacked/ChartBarStacked.tsx",
221
- "content": "import { Component, Prop, h, Host } from '@stencil/core';\nimport { scaleBand, scaleLinear } from 'd3-scale';\nimport { categoryColor } from '../../utils/chart-colors';\nimport { formatPercentage } from '../../utils';\nimport type { ChartSeries } from '../../utils/chart-types';\n\nexport type ChartBarStackedVariant = 'stacked' | 'percentage';\n\nconst MARGIN = { top: 16, right: 16, bottom: 24, left: 32 };\nconst PERCENTAGE_TICKS = [0, 25, 50, 75, 100];\n\n@Component({\n tag: 'ds-chart-bar-stacked',\n styleUrl: 'ChartBarStacked.css',\n scoped: true,\n})\nexport class ChartBarStacked {\n /** Ordered stack series. Set as a JS property (not an HTML attribute). */\n @Prop() series: ChartSeries[] = [];\n /** X-axis labels — must match each series' `data` length. Set as a JS property. */\n @Prop() categories: string[] = [];\n @Prop() variant: ChartBarStackedVariant = 'stacked';\n @Prop() width: number = 480;\n @Prop() height: number = 240;\n\n private valuesForCategory(categoryIndex: number) {\n return this.series.map(series => Math.max(0, series.data[categoryIndex] ?? 0));\n }\n\n private accessibleLabel() {\n return this.categories\n .map((category, categoryIndex) => {\n const values = this.valuesForCategory(categoryIndex);\n const total = values.reduce((sum, value) => sum + value, 0);\n const details = this.series\n .map((series, seriesIndex) => {\n const value = values[seriesIndex];\n const visibleValue = this.variant === 'percentage'\n ? formatPercentage(total ? value / total : 0, 1)\n : String(value);\n return `${series.name}: ${visibleValue}`;\n })\n .join(', ');\n return `${category}: ${details}`;\n })\n .join('; ');\n }\n\n render() {\n const innerWidth = this.width - MARGIN.left - MARGIN.right;\n const innerHeight = this.height - MARGIN.top - MARGIN.bottom;\n const categoryValues = this.categories.map((_, index) => this.valuesForCategory(index));\n const totals = categoryValues.map(values =>\n values.reduce((sum, value) => sum + value, 0)\n );\n const yMax = this.variant === 'percentage' ? 100 : Math.max(0, ...totals);\n\n const xScale = scaleBand()\n .domain(this.categories)\n .range([0, innerWidth])\n .padding(0.35);\n\n const yScale = scaleLinear()\n .domain([0, yMax || 1])\n .range([innerHeight, 0])\n .nice();\n\n const yTicks = this.variant === 'percentage' ? PERCENTAGE_TICKS : yScale.ticks(4);\n\n return (\n <Host class=\"chart-bar-stacked\">\n <svg\n class=\"chart-bar-stacked__svg\"\n viewBox={`0 0 ${this.width} ${this.height}`}\n width={this.width}\n height={this.height}\n role=\"img\"\n aria-label={this.accessibleLabel()}\n >\n <g transform={`translate(${MARGIN.left}, ${MARGIN.top})`}>\n {yTicks.map(tick => (\n <g key={`grid-${tick}`} transform={`translate(0, ${yScale(tick)})`}>\n <line class=\"chart-bar-stacked__gridline\" x1={0} x2={innerWidth} />\n <text\n class=\"chart-bar-stacked__axis-label\"\n x={-8}\n text-anchor=\"end\"\n dominant-baseline=\"middle\"\n >\n {this.variant === 'percentage' ? `${tick}%` : tick}\n </text>\n </g>\n ))}\n\n {this.categories.map((category, categoryIndex) => {\n const barWidth = xScale.bandwidth();\n const barX = xScale(category) ?? 0;\n const values = categoryValues[categoryIndex];\n const total = totals[categoryIndex];\n const topSeriesIndex = values.reduce(\n (topIndex, value, seriesIndex) => (value > 0 ? seriesIndex : topIndex),\n -1\n );\n let cumulativeValue = 0;\n\n return (\n <g class=\"chart-bar-stacked__stack\" data-category={category} key={category}>\n {this.series.map((series, seriesIndex) => {\n const rawValue = values[seriesIndex];\n const value = this.variant === 'percentage'\n ? total\n ? (rawValue / total) * 100\n : 0\n : rawValue;\n const segmentStart = cumulativeValue;\n const segmentEnd = cumulativeValue + value;\n cumulativeValue = segmentEnd;\n\n const segmentY = yScale(segmentEnd);\n const segmentBottom = yScale(segmentStart);\n const segmentHeight = Math.max(0, segmentBottom - segmentY);\n if (!segmentHeight) return null;\n\n const fill = series.color ?? categoryColor(seriesIndex);\n const isTopSegment = seriesIndex === topSeriesIndex;\n const hasRoundedTop =\n this.variant === 'stacked' && isTopSegment;\n const squareBaseY = segmentY + segmentHeight / 2;\n const squareBaseHeight = segmentHeight / 2;\n\n return (\n <g\n class=\"chart-bar-stacked__segment\"\n data-series={series.name}\n key={series.name}\n >\n <rect\n class={{\n 'chart-bar-stacked__segment-shape': true,\n 'chart-bar-stacked__segment-shape--rounded': hasRoundedTop,\n }}\n x={barX}\n y={segmentY}\n width={barWidth}\n height={segmentHeight}\n fill={fill}\n />\n {hasRoundedTop ? (\n <rect\n class=\"chart-bar-stacked__segment-square-base\"\n x={barX}\n y={squareBaseY}\n width={barWidth}\n height={squareBaseHeight}\n fill={fill}\n />\n ) : null}\n {segmentStart > 0 ? (\n <line\n class=\"chart-bar-stacked__segment-separator\"\n x1={barX}\n x2={barX + barWidth}\n y1={segmentBottom}\n y2={segmentBottom}\n vector-effect=\"non-scaling-stroke\"\n />\n ) : null}\n </g>\n );\n })}\n <text\n class=\"chart-bar-stacked__axis-label\"\n x={barX + barWidth / 2}\n y={innerHeight + 16}\n text-anchor=\"middle\"\n >\n {category}\n </text>\n </g>\n );\n })}\n </g>\n </svg>\n </Host>\n );\n }\n}\n",
226
+ "content": "import { Component, Prop, State, Watch, h, Host } from '@stencil/core';\nimport { scaleBand, scaleLinear } from 'd3-scale';\nimport { categoryColor } from '../../utils/chart-colors';\nimport { formatPercentage } from '../../utils';\nimport { resolveCartesianChartLayout } from '../../utils/cartesian-chart-layout';\nimport {\n ChartViewportController,\n type ChartViewportSize,\n} from '../../utils/chart-viewport-controller';\nimport type { ChartSeries } from '../../utils/chart-types';\n\nexport type ChartBarStackedVariant = 'stacked' | 'percentage';\n\nconst PERCENTAGE_TICKS = [0, 25, 50, 75, 100];\n\n@Component({\n tag: 'ds-chart-bar-stacked',\n styleUrl: 'ChartBarStacked.css',\n scoped: true,\n})\nexport class ChartBarStacked {\n /** Ordered stack series. Set as a JS property (not an HTML attribute). */\n @Prop() series: ChartSeries[] = [];\n /** X-axis labels — must match each series' `data` length. Set as a JS property. */\n @Prop() categories: string[] = [];\n @Prop() variant: ChartBarStackedVariant = 'stacked';\n /** Standalone intrinsic width. Container constraints reflow the plot at rendered pixel size. */\n @Prop() width: number = 480;\n /** Standalone intrinsic height. Container constraints reflow the plot at rendered pixel size. */\n @Prop() height: number = 240;\n\n @State() private viewport: ChartViewportSize | undefined;\n\n private viewportController: ChartViewportController | null = null;\n private svgEl: SVGElement | null = null;\n\n componentDidLoad() {\n this.connectViewportController();\n }\n\n connectedCallback() {\n if (this.svgEl && !this.viewportController) this.connectViewportController();\n }\n\n componentDidRender() {\n if (!this.viewportController) this.connectViewportController();\n }\n\n private connectViewportController() {\n if (!this.svgEl) return;\n this.viewportController = new ChartViewportController(this.svgEl, viewport => {\n if (\n viewport.width !== this.viewport?.width ||\n viewport.height !== this.viewport?.height\n ) {\n this.viewport = viewport;\n }\n });\n this.viewportController.connect();\n }\n\n disconnectedCallback() {\n this.viewportController?.disconnect();\n this.viewportController = null;\n }\n\n @Watch('width')\n @Watch('height')\n handleIntrinsicSizeChange() {\n this.viewport = undefined;\n if (typeof requestAnimationFrame === 'function') {\n requestAnimationFrame(() => this.viewportController?.measure());\n }\n }\n\n private valuesForCategory(categoryIndex: number) {\n return this.series.map(series => Math.max(0, series.data[categoryIndex] ?? 0));\n }\n\n private accessibleLabel() {\n return this.categories\n .map((category, categoryIndex) => {\n const values = this.valuesForCategory(categoryIndex);\n const total = values.reduce((sum, value) => sum + value, 0);\n const details = this.series\n .map((series, seriesIndex) => {\n const value = values[seriesIndex];\n const visibleValue = this.variant === 'percentage'\n ? formatPercentage(total ? value / total : 0, 1)\n : String(value);\n return `${series.name}: ${visibleValue}`;\n })\n .join(', ');\n return `${category}: ${details}`;\n })\n .join('; ');\n }\n\n render() {\n const viewportWidth = this.viewport?.width ?? this.width;\n const viewportHeight = this.viewport?.height ?? this.height;\n const { margin, axisLabelGap, categoryLabelOffset } =\n resolveCartesianChartLayout();\n const innerWidth = Math.max(0, viewportWidth - margin.left - margin.right);\n const innerHeight = Math.max(0, viewportHeight - margin.top - margin.bottom);\n const categoryValues = this.categories.map((_, index) => this.valuesForCategory(index));\n const totals = categoryValues.map(values =>\n values.reduce((sum, value) => sum + value, 0)\n );\n const yMax = this.variant === 'percentage' ? 100 : Math.max(0, ...totals);\n\n const xScale = scaleBand()\n .domain(this.categories)\n .range([0, innerWidth])\n .padding(0.35);\n\n const yScale = scaleLinear()\n .domain([0, yMax || 1])\n .range([innerHeight, 0])\n .nice();\n\n const yTicks = this.variant === 'percentage' ? PERCENTAGE_TICKS : yScale.ticks(4);\n\n return (\n <Host class=\"chart-bar-stacked\">\n <svg\n class=\"chart-bar-stacked__svg\"\n ref={element => {\n this.svgEl = element ?? null;\n }}\n width={viewportWidth}\n height={viewportHeight}\n role=\"img\"\n aria-label={this.accessibleLabel()}\n >\n <g transform={`translate(${margin.left}, ${margin.top})`}>\n {yTicks.map(tick => (\n <g key={`grid-${tick}`} transform={`translate(0, ${yScale(tick)})`}>\n <line class=\"chart-bar-stacked__gridline\" x1={0} x2={innerWidth} />\n <text\n class=\"chart-bar-stacked__axis-label\"\n x={-axisLabelGap}\n text-anchor=\"end\"\n dominant-baseline=\"middle\"\n >\n {this.variant === 'percentage' ? `${tick}%` : tick}\n </text>\n </g>\n ))}\n\n {this.categories.map((category, categoryIndex) => {\n const barWidth = xScale.bandwidth();\n const barX = xScale(category) ?? 0;\n const values = categoryValues[categoryIndex];\n const total = totals[categoryIndex];\n const topSeriesIndex = values.reduce(\n (topIndex, value, seriesIndex) => (value > 0 ? seriesIndex : topIndex),\n -1\n );\n let cumulativeValue = 0;\n\n return (\n <g class=\"chart-bar-stacked__stack\" data-category={category} key={category}>\n {this.series.map((series, seriesIndex) => {\n const rawValue = values[seriesIndex];\n const value = this.variant === 'percentage'\n ? total\n ? (rawValue / total) * 100\n : 0\n : rawValue;\n const segmentStart = cumulativeValue;\n const segmentEnd = cumulativeValue + value;\n cumulativeValue = segmentEnd;\n\n const segmentY = yScale(segmentEnd);\n const segmentBottom = yScale(segmentStart);\n const segmentHeight = Math.max(0, segmentBottom - segmentY);\n if (!segmentHeight) return null;\n\n const fill = series.color ?? categoryColor(seriesIndex);\n const isTopSegment = seriesIndex === topSeriesIndex;\n const hasRoundedTop =\n this.variant === 'stacked' && isTopSegment;\n const squareBaseY = segmentY + segmentHeight / 2;\n const squareBaseHeight = segmentHeight / 2;\n\n return (\n <g\n class=\"chart-bar-stacked__segment\"\n data-series={series.name}\n key={series.name}\n >\n <rect\n class={{\n 'chart-bar-stacked__segment-shape': true,\n 'chart-bar-stacked__segment-shape--rounded': hasRoundedTop,\n }}\n x={barX}\n y={segmentY}\n width={barWidth}\n height={segmentHeight}\n fill={fill}\n />\n {hasRoundedTop ? (\n <rect\n class=\"chart-bar-stacked__segment-square-base\"\n x={barX}\n y={squareBaseY}\n width={barWidth}\n height={squareBaseHeight}\n fill={fill}\n />\n ) : null}\n {segmentStart > 0 ? (\n <line\n class=\"chart-bar-stacked__segment-separator\"\n x1={barX}\n x2={barX + barWidth}\n y1={segmentBottom}\n y2={segmentBottom}\n vector-effect=\"non-scaling-stroke\"\n />\n ) : null}\n </g>\n );\n })}\n <text\n class=\"chart-bar-stacked__axis-label\"\n x={barX + barWidth / 2}\n y={innerHeight + categoryLabelOffset}\n text-anchor=\"middle\"\n >\n {category}\n </text>\n </g>\n );\n })}\n </g>\n </svg>\n </Host>\n );\n }\n}\n",
222
227
  "type": "registry:ui"
223
228
  }
224
229
  ]