@canonical/react-ds-global 0.36.0 → 0.38.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 (279) hide show
  1. package/README.md +72 -0
  2. package/dist/esm/lib/_work_in_progress/Announcement/styles.css +51 -42
  3. package/dist/esm/lib/_work_in_progress/CategoriesSection/common/Category/styles.css +21 -17
  4. package/dist/esm/lib/_work_in_progress/CategoriesSection/styles.css +16 -12
  5. package/dist/esm/lib/_work_in_progress/ChatSection/styles.css +22 -18
  6. package/dist/esm/lib/_work_in_progress/DescriptionSection/styles.css +14 -10
  7. package/dist/esm/lib/_work_in_progress/IconSection/styles.css +18 -14
  8. package/dist/esm/lib/_work_in_progress/Label/styles.css +36 -32
  9. package/dist/esm/lib/_work_in_progress/Link/styles.css +32 -28
  10. package/dist/esm/lib/_work_in_progress/Rule/styles.css +21 -14
  11. package/dist/esm/lib/_work_in_progress/Section/styles.css +66 -62
  12. package/dist/esm/lib/_work_in_progress/SkipLink/styles.css +35 -32
  13. package/dist/esm/lib/_work_in_progress/TSection/styles.css +26 -22
  14. package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.js +4 -1
  15. package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.js.map +1 -1
  16. package/dist/esm/lib/_work_in_progress/grid/ApplicationLayout/styles.css +21 -17
  17. package/dist/esm/lib/_work_in_progress/grid/GridCard/GridCard.js +4 -1
  18. package/dist/esm/lib/_work_in_progress/grid/GridCard/GridCard.js.map +1 -1
  19. package/dist/esm/lib/_work_in_progress/grid/GridCard/styles.css +8 -4
  20. package/dist/esm/lib/_work_in_progress/grid/InnerGridDemo/styles.css +38 -33
  21. package/dist/esm/lib/_work_in_progress/grid/SettingsView/SettingsView.js +4 -1
  22. package/dist/esm/lib/_work_in_progress/grid/SettingsView/SettingsView.js.map +1 -1
  23. package/dist/esm/lib/_work_in_progress/grid/SettingsView/styles.css +23 -19
  24. package/dist/esm/lib/component/Accordion/common/Item/styles.css +305 -299
  25. package/dist/esm/lib/component/Accordion/styles.css +35 -31
  26. package/dist/esm/lib/component/Badge/hooks/useBadge.js +1 -1
  27. package/dist/esm/lib/component/Badge/hooks/useBadge.js.map +1 -1
  28. package/dist/esm/lib/component/Badge/styles.css +45 -41
  29. package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js +1 -1
  30. package/dist/esm/lib/component/Breadcrumbs/Breadcrumbs.js.map +1 -1
  31. package/dist/esm/lib/component/Breadcrumbs/common/Item/styles.css +69 -65
  32. package/dist/esm/lib/component/Breadcrumbs/styles.css +30 -26
  33. package/dist/esm/lib/component/Button/styles.css +293 -260
  34. package/dist/esm/lib/component/Card/common/Content/styles.css +27 -23
  35. package/dist/esm/lib/component/Card/common/Footer/styles.css +30 -26
  36. package/dist/esm/lib/component/Card/common/Header/styles.css +25 -21
  37. package/dist/esm/lib/component/Card/common/Image/styles.css +8 -4
  38. package/dist/esm/lib/component/Card/styles.css +77 -73
  39. package/dist/esm/lib/component/Chip/Chip.js +29 -6
  40. package/dist/esm/lib/component/Chip/Chip.js.map +1 -1
  41. package/dist/esm/lib/component/Chip/styles.css +105 -101
  42. package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js +29 -20
  43. package/dist/esm/lib/component/ContextualMenu/ContextualMenu.js.map +1 -1
  44. package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js +25 -2
  45. package/dist/esm/lib/component/ContextualMenu/common/Item/Item.js.map +1 -1
  46. package/dist/esm/lib/component/ContextualMenu/common/Item/styles.css +116 -106
  47. package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js +29 -9
  48. package/dist/esm/lib/component/ContextualMenu/common/SubMenu/SubMenu.js.map +1 -1
  49. package/dist/esm/lib/component/ContextualMenu/styles.css +74 -72
  50. package/dist/esm/lib/component/Icon/styles.css +24 -20
  51. package/dist/esm/lib/component/InlineCode/styles.css +19 -15
  52. package/dist/esm/lib/component/KeyboardKey/styles.css +44 -40
  53. package/dist/esm/lib/component/Popover/Popover.js.map +1 -1
  54. package/dist/esm/lib/component/Popover/styles.css +59 -52
  55. package/dist/esm/lib/component/Tabs/common/Item/styles.css +80 -76
  56. package/dist/esm/lib/component/Tabs/styles.css +36 -32
  57. package/dist/esm/lib/component/Tile/common/Content/styles.css +28 -24
  58. package/dist/esm/lib/component/Tile/common/Header/styles.css +28 -24
  59. package/dist/esm/lib/component/Tile/styles.css +31 -27
  60. package/dist/esm/lib/component/Tooltip/Tooltip.js +6 -2
  61. package/dist/esm/lib/component/Tooltip/Tooltip.js.map +1 -1
  62. package/dist/esm/lib/component/Tooltip/styles.css +213 -208
  63. package/dist/esm/lib/group/Cards/styles.css +26 -22
  64. package/dist/esm/lib/group/KeyboardKeys/styles.css +14 -10
  65. package/dist/esm/lib/hooks/useContextualMenu/index.js +1 -0
  66. package/dist/esm/lib/hooks/useContextualMenu/index.js.map +1 -1
  67. package/dist/esm/lib/hooks/useContextualMenu/isMenuSeparator.js +11 -0
  68. package/dist/esm/lib/hooks/useContextualMenu/isMenuSeparator.js.map +1 -0
  69. package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js +54 -34
  70. package/dist/esm/lib/hooks/useContextualMenu/useContextualMenu.js.map +1 -1
  71. package/dist/esm/lib/hooks/useDisclosure/useDisclosure.js.map +1 -1
  72. package/dist/esm/lib/hooks/useWindowDimensions/useWindowDimensions.js +1 -1
  73. package/dist/esm/lib/hooks/useWindowDimensions/useWindowDimensions.js.map +1 -1
  74. package/dist/esm/lib/hooks/useWindowFitment/useWindowFitment.js +3 -0
  75. package/dist/esm/lib/hooks/useWindowFitment/useWindowFitment.js.map +1 -1
  76. package/dist/esm/lib/index.css +79 -0
  77. package/dist/esm/lib/pattern/Modal/Context.js +10 -0
  78. package/dist/esm/lib/pattern/Modal/Context.js.map +1 -0
  79. package/dist/esm/lib/pattern/Modal/Provider.js +103 -0
  80. package/dist/esm/lib/pattern/Modal/Provider.js.map +1 -0
  81. package/dist/esm/lib/pattern/Modal/common/Content/Content.js +15 -0
  82. package/dist/esm/lib/pattern/Modal/common/Content/Content.js.map +1 -0
  83. package/dist/esm/lib/pattern/Modal/common/Content/index.js +3 -0
  84. package/dist/esm/lib/pattern/Modal/common/Content/index.js.map +1 -0
  85. package/dist/esm/lib/pattern/Modal/common/Content/styles.css +37 -0
  86. package/dist/esm/lib/pattern/Modal/common/Content/types.js +2 -0
  87. package/dist/esm/lib/pattern/Modal/common/Content/types.js.map +1 -0
  88. package/dist/esm/lib/pattern/Modal/common/Footer/Footer.js +16 -0
  89. package/dist/esm/lib/pattern/Modal/common/Footer/Footer.js.map +1 -0
  90. package/dist/esm/lib/pattern/Modal/common/Footer/index.js +3 -0
  91. package/dist/esm/lib/pattern/Modal/common/Footer/index.js.map +1 -0
  92. package/dist/esm/lib/pattern/Modal/common/Footer/styles.css +57 -0
  93. package/dist/esm/lib/pattern/Modal/common/Footer/types.js +2 -0
  94. package/dist/esm/lib/pattern/Modal/common/Footer/types.js.map +1 -0
  95. package/dist/esm/lib/pattern/Modal/common/Header/Header.js +27 -0
  96. package/dist/esm/lib/pattern/Modal/common/Header/Header.js.map +1 -0
  97. package/dist/esm/lib/pattern/Modal/common/Header/index.js +3 -0
  98. package/dist/esm/lib/pattern/Modal/common/Header/index.js.map +1 -0
  99. package/dist/esm/lib/pattern/Modal/common/Header/styles.css +79 -0
  100. package/dist/esm/lib/pattern/Modal/common/Header/types.js +2 -0
  101. package/dist/esm/lib/pattern/Modal/common/Header/types.js.map +1 -0
  102. package/dist/esm/lib/pattern/Modal/common/index.js +5 -0
  103. package/dist/esm/lib/pattern/Modal/common/index.js.map +1 -0
  104. package/dist/esm/lib/pattern/Modal/hooks/useModalContext.js +11 -0
  105. package/dist/esm/lib/pattern/Modal/hooks/useModalContext.js.map +1 -0
  106. package/dist/esm/lib/pattern/Modal/hooks/useModalState.js +15 -0
  107. package/dist/esm/lib/pattern/Modal/hooks/useModalState.js.map +1 -0
  108. package/dist/esm/lib/pattern/Modal/index.js +4 -0
  109. package/dist/esm/lib/pattern/Modal/index.js.map +1 -0
  110. package/dist/esm/lib/pattern/Modal/styles.css +119 -0
  111. package/dist/esm/lib/pattern/Modal/types.js +2 -0
  112. package/dist/esm/lib/pattern/Modal/types.js.map +1 -0
  113. package/dist/esm/lib/pattern/Modal/withModal.js +102 -0
  114. package/dist/esm/lib/pattern/Modal/withModal.js.map +1 -0
  115. package/dist/esm/lib/pattern/Timeline/common/Content/styles.css +16 -12
  116. package/dist/esm/lib/pattern/Timeline/common/Event/styles.css +116 -112
  117. package/dist/esm/lib/pattern/Timeline/styles.css +16 -12
  118. package/dist/esm/lib/pattern/index.js +1 -0
  119. package/dist/esm/lib/pattern/index.js.map +1 -1
  120. package/dist/esm/lib/subcomponent/Spinner/styles.css +38 -34
  121. package/dist/types/lib/_work_in_progress/Announcement/types.d.ts +8 -8
  122. package/dist/types/lib/_work_in_progress/Announcement/types.d.ts.map +1 -1
  123. package/dist/types/lib/_work_in_progress/CategoriesSection/common/Category/types.d.ts +5 -3
  124. package/dist/types/lib/_work_in_progress/CategoriesSection/common/Category/types.d.ts.map +1 -1
  125. package/dist/types/lib/_work_in_progress/CategoriesSection/types.d.ts +6 -3
  126. package/dist/types/lib/_work_in_progress/CategoriesSection/types.d.ts.map +1 -1
  127. package/dist/types/lib/_work_in_progress/ChatSection/types.d.ts +6 -3
  128. package/dist/types/lib/_work_in_progress/ChatSection/types.d.ts.map +1 -1
  129. package/dist/types/lib/_work_in_progress/DescriptionSection/types.d.ts +6 -3
  130. package/dist/types/lib/_work_in_progress/DescriptionSection/types.d.ts.map +1 -1
  131. package/dist/types/lib/_work_in_progress/IconSection/types.d.ts +6 -3
  132. package/dist/types/lib/_work_in_progress/IconSection/types.d.ts.map +1 -1
  133. package/dist/types/lib/_work_in_progress/Label/types.d.ts +20 -18
  134. package/dist/types/lib/_work_in_progress/Label/types.d.ts.map +1 -1
  135. package/dist/types/lib/_work_in_progress/Rule/types.d.ts +5 -7
  136. package/dist/types/lib/_work_in_progress/Rule/types.d.ts.map +1 -1
  137. package/dist/types/lib/_work_in_progress/Section/types.d.ts +9 -10
  138. package/dist/types/lib/_work_in_progress/Section/types.d.ts.map +1 -1
  139. package/dist/types/lib/_work_in_progress/SkipLink/types.d.ts +14 -8
  140. package/dist/types/lib/_work_in_progress/SkipLink/types.d.ts.map +1 -1
  141. package/dist/types/lib/_work_in_progress/TSection/types.d.ts +14 -3
  142. package/dist/types/lib/_work_in_progress/TSection/types.d.ts.map +1 -1
  143. package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/ApplicationLayout.d.ts.map +1 -1
  144. package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/types.d.ts +5 -3
  145. package/dist/types/lib/_work_in_progress/grid/ApplicationLayout/types.d.ts.map +1 -1
  146. package/dist/types/lib/_work_in_progress/grid/GridCard/GridCard.d.ts.map +1 -1
  147. package/dist/types/lib/_work_in_progress/grid/GridCard/types.d.ts +5 -3
  148. package/dist/types/lib/_work_in_progress/grid/GridCard/types.d.ts.map +1 -1
  149. package/dist/types/lib/_work_in_progress/grid/InnerGridDemo/types.d.ts +5 -3
  150. package/dist/types/lib/_work_in_progress/grid/InnerGridDemo/types.d.ts.map +1 -1
  151. package/dist/types/lib/_work_in_progress/grid/SettingsView/SettingsView.d.ts.map +1 -1
  152. package/dist/types/lib/_work_in_progress/grid/SettingsView/types.d.ts +5 -3
  153. package/dist/types/lib/_work_in_progress/grid/SettingsView/types.d.ts.map +1 -1
  154. package/dist/types/lib/component/Accordion/common/Item/types.d.ts +28 -22
  155. package/dist/types/lib/component/Accordion/common/Item/types.d.ts.map +1 -1
  156. package/dist/types/lib/component/Accordion/types.d.ts +8 -6
  157. package/dist/types/lib/component/Accordion/types.d.ts.map +1 -1
  158. package/dist/types/lib/component/Badge/types.d.ts +6 -4
  159. package/dist/types/lib/component/Badge/types.d.ts.map +1 -1
  160. package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts +12 -10
  161. package/dist/types/lib/component/Breadcrumbs/common/Item/types.d.ts.map +1 -1
  162. package/dist/types/lib/component/Breadcrumbs/types.d.ts +11 -10
  163. package/dist/types/lib/component/Breadcrumbs/types.d.ts.map +1 -1
  164. package/dist/types/lib/component/Button/index.d.ts +1 -1
  165. package/dist/types/lib/component/Button/index.d.ts.map +1 -1
  166. package/dist/types/lib/component/Button/types.d.ts +10 -8
  167. package/dist/types/lib/component/Button/types.d.ts.map +1 -1
  168. package/dist/types/lib/component/Card/common/Content/types.d.ts +7 -5
  169. package/dist/types/lib/component/Card/common/Content/types.d.ts.map +1 -1
  170. package/dist/types/lib/component/Card/common/Footer/types.d.ts +7 -5
  171. package/dist/types/lib/component/Card/common/Footer/types.d.ts.map +1 -1
  172. package/dist/types/lib/component/Card/common/Header/types.d.ts +7 -5
  173. package/dist/types/lib/component/Card/common/Header/types.d.ts.map +1 -1
  174. package/dist/types/lib/component/Card/common/Image/types.d.ts +6 -3
  175. package/dist/types/lib/component/Card/common/Image/types.d.ts.map +1 -1
  176. package/dist/types/lib/component/Card/types.d.ts +6 -3
  177. package/dist/types/lib/component/Card/types.d.ts.map +1 -1
  178. package/dist/types/lib/component/Chip/Chip.d.ts +7 -2
  179. package/dist/types/lib/component/Chip/Chip.d.ts.map +1 -1
  180. package/dist/types/lib/component/Chip/types.d.ts +29 -13
  181. package/dist/types/lib/component/Chip/types.d.ts.map +1 -1
  182. package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts +4 -4
  183. package/dist/types/lib/component/ContextualMenu/ContextualMenu.d.ts.map +1 -1
  184. package/dist/types/lib/component/ContextualMenu/common/Item/Item.d.ts.map +1 -1
  185. package/dist/types/lib/component/ContextualMenu/common/Item/types.d.ts +7 -0
  186. package/dist/types/lib/component/ContextualMenu/common/Item/types.d.ts.map +1 -1
  187. package/dist/types/lib/component/ContextualMenu/common/MenuContext.d.ts +1 -1
  188. package/dist/types/lib/component/ContextualMenu/common/MenuContext.d.ts.map +1 -1
  189. package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts +9 -7
  190. package/dist/types/lib/component/ContextualMenu/common/SubMenu/SubMenu.d.ts.map +1 -1
  191. package/dist/types/lib/component/ContextualMenu/types.d.ts +17 -8
  192. package/dist/types/lib/component/ContextualMenu/types.d.ts.map +1 -1
  193. package/dist/types/lib/component/Icon/types.d.ts +6 -8
  194. package/dist/types/lib/component/Icon/types.d.ts.map +1 -1
  195. package/dist/types/lib/component/InlineCode/types.d.ts +6 -3
  196. package/dist/types/lib/component/InlineCode/types.d.ts.map +1 -1
  197. package/dist/types/lib/component/KeyboardKey/types.d.ts +6 -3
  198. package/dist/types/lib/component/KeyboardKey/types.d.ts.map +1 -1
  199. package/dist/types/lib/component/Popover/types.d.ts +10 -3
  200. package/dist/types/lib/component/Popover/types.d.ts.map +1 -1
  201. package/dist/types/lib/component/Tabs/common/Item/types.d.ts +4 -0
  202. package/dist/types/lib/component/Tabs/common/Item/types.d.ts.map +1 -1
  203. package/dist/types/lib/component/Tabs/types.d.ts +12 -10
  204. package/dist/types/lib/component/Tabs/types.d.ts.map +1 -1
  205. package/dist/types/lib/component/Tile/common/Content/types.d.ts +9 -7
  206. package/dist/types/lib/component/Tile/common/Content/types.d.ts.map +1 -1
  207. package/dist/types/lib/component/Tile/common/Header/types.d.ts +9 -7
  208. package/dist/types/lib/component/Tile/common/Header/types.d.ts.map +1 -1
  209. package/dist/types/lib/component/Tile/types.d.ts +10 -8
  210. package/dist/types/lib/component/Tile/types.d.ts.map +1 -1
  211. package/dist/types/lib/component/Tooltip/Tooltip.d.ts +1 -1
  212. package/dist/types/lib/component/Tooltip/Tooltip.d.ts.map +1 -1
  213. package/dist/types/lib/component/Tooltip/types.d.ts +11 -10
  214. package/dist/types/lib/component/Tooltip/types.d.ts.map +1 -1
  215. package/dist/types/lib/group/Cards/types.d.ts +6 -3
  216. package/dist/types/lib/group/Cards/types.d.ts.map +1 -1
  217. package/dist/types/lib/group/KeyboardKeys/types.d.ts +6 -3
  218. package/dist/types/lib/group/KeyboardKeys/types.d.ts.map +1 -1
  219. package/dist/types/lib/hooks/useContextualMenu/index.d.ts +1 -0
  220. package/dist/types/lib/hooks/useContextualMenu/index.d.ts.map +1 -1
  221. package/dist/types/lib/hooks/useContextualMenu/isMenuSeparator.d.ts +13 -0
  222. package/dist/types/lib/hooks/useContextualMenu/isMenuSeparator.d.ts.map +1 -0
  223. package/dist/types/lib/hooks/useContextualMenu/types.d.ts +45 -15
  224. package/dist/types/lib/hooks/useContextualMenu/types.d.ts.map +1 -1
  225. package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts +5 -6
  226. package/dist/types/lib/hooks/useContextualMenu/useContextualMenu.d.ts.map +1 -1
  227. package/dist/types/lib/hooks/useDisclosure/types.d.ts +7 -2
  228. package/dist/types/lib/hooks/useDisclosure/types.d.ts.map +1 -1
  229. package/dist/types/lib/hooks/useDisclosure/useDisclosure.d.ts +1 -1
  230. package/dist/types/lib/hooks/useDisclosure/useDisclosure.d.ts.map +1 -1
  231. package/dist/types/lib/hooks/useWindowFitment/types.d.ts +12 -3
  232. package/dist/types/lib/hooks/useWindowFitment/types.d.ts.map +1 -1
  233. package/dist/types/lib/hooks/useWindowFitment/useWindowFitment.d.ts +1 -1
  234. package/dist/types/lib/hooks/useWindowFitment/useWindowFitment.d.ts.map +1 -1
  235. package/dist/types/lib/pattern/Modal/Context.d.ts +10 -0
  236. package/dist/types/lib/pattern/Modal/Context.d.ts.map +1 -0
  237. package/dist/types/lib/pattern/Modal/Provider.d.ts +63 -0
  238. package/dist/types/lib/pattern/Modal/Provider.d.ts.map +1 -0
  239. package/dist/types/lib/pattern/Modal/common/Content/Content.d.ts +17 -0
  240. package/dist/types/lib/pattern/Modal/common/Content/Content.d.ts.map +1 -0
  241. package/dist/types/lib/pattern/Modal/common/Content/index.d.ts +3 -0
  242. package/dist/types/lib/pattern/Modal/common/Content/index.d.ts.map +1 -0
  243. package/dist/types/lib/pattern/Modal/common/Content/types.d.ts +15 -0
  244. package/dist/types/lib/pattern/Modal/common/Content/types.d.ts.map +1 -0
  245. package/dist/types/lib/pattern/Modal/common/Footer/Footer.d.ts +18 -0
  246. package/dist/types/lib/pattern/Modal/common/Footer/Footer.d.ts.map +1 -0
  247. package/dist/types/lib/pattern/Modal/common/Footer/index.d.ts +3 -0
  248. package/dist/types/lib/pattern/Modal/common/Footer/index.d.ts.map +1 -0
  249. package/dist/types/lib/pattern/Modal/common/Footer/types.d.ts +16 -0
  250. package/dist/types/lib/pattern/Modal/common/Footer/types.d.ts.map +1 -0
  251. package/dist/types/lib/pattern/Modal/common/Header/Header.d.ts +24 -0
  252. package/dist/types/lib/pattern/Modal/common/Header/Header.d.ts.map +1 -0
  253. package/dist/types/lib/pattern/Modal/common/Header/index.d.ts +3 -0
  254. package/dist/types/lib/pattern/Modal/common/Header/index.d.ts.map +1 -0
  255. package/dist/types/lib/pattern/Modal/common/Header/types.d.ts +36 -0
  256. package/dist/types/lib/pattern/Modal/common/Header/types.d.ts.map +1 -0
  257. package/dist/types/lib/pattern/Modal/common/index.d.ts +4 -0
  258. package/dist/types/lib/pattern/Modal/common/index.d.ts.map +1 -0
  259. package/dist/types/lib/pattern/Modal/hooks/useModalContext.d.ts +4 -0
  260. package/dist/types/lib/pattern/Modal/hooks/useModalContext.d.ts.map +1 -0
  261. package/dist/types/lib/pattern/Modal/hooks/useModalState.d.ts +10 -0
  262. package/dist/types/lib/pattern/Modal/hooks/useModalState.d.ts.map +1 -0
  263. package/dist/types/lib/pattern/Modal/index.d.ts +4 -0
  264. package/dist/types/lib/pattern/Modal/index.d.ts.map +1 -0
  265. package/dist/types/lib/pattern/Modal/types.d.ts +122 -0
  266. package/dist/types/lib/pattern/Modal/types.d.ts.map +1 -0
  267. package/dist/types/lib/pattern/Modal/withModal.d.ts +74 -0
  268. package/dist/types/lib/pattern/Modal/withModal.d.ts.map +1 -0
  269. package/dist/types/lib/pattern/Timeline/common/Content/types.d.ts +10 -8
  270. package/dist/types/lib/pattern/Timeline/common/Content/types.d.ts.map +1 -1
  271. package/dist/types/lib/pattern/Timeline/common/Event/types.d.ts +18 -16
  272. package/dist/types/lib/pattern/Timeline/common/Event/types.d.ts.map +1 -1
  273. package/dist/types/lib/pattern/Timeline/types.d.ts +10 -8
  274. package/dist/types/lib/pattern/Timeline/types.d.ts.map +1 -1
  275. package/dist/types/lib/pattern/index.d.ts +1 -0
  276. package/dist/types/lib/pattern/index.d.ts.map +1 -1
  277. package/dist/types/lib/subcomponent/Spinner/types.d.ts +10 -8
  278. package/dist/types/lib/subcomponent/Spinner/types.d.ts.map +1 -1
  279. package/package.json +28 -18
@@ -1,26 +1,30 @@
1
- /**
2
- * Card.Content styles
3
- * @implements ds:global.subcomponent.card-content
4
- *
5
- * DSL anatomy: layout.type stack, direction vertical.
6
- * A content-bearing section: it pads itself (the card frame applies no general
7
- * padding). Vertical padding is in baseline multiples, asymmetric per the
8
- * Figma styling frame: one baseline on top, two below (top 100 / bottom 200 /
9
- * sides 200).
10
- */
11
- :root {
12
- --card-content-gap: var(--dimension-100);
13
- --card-content-padding-block-start: var(--dimension-100);
14
- --card-content-padding-block-end: var(--dimension-200);
15
- --card-content-padding-inline: var(--dimension-200);
16
- }
1
+ /* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
2
+
3
+ @layer ds.components.global {
4
+ /**
5
+ * Card.Content styles
6
+ * @implements ds:global.subcomponent.card-content
7
+ *
8
+ * DSL anatomy: layout.type stack, direction vertical.
9
+ * A content-bearing section: it pads itself (the card frame applies no general
10
+ * padding). Vertical padding is in baseline multiples, asymmetric per the
11
+ * Figma styling frame: one baseline on top, two below (top 100 / bottom 200 /
12
+ * sides 200).
13
+ */
14
+ :root {
15
+ --card-content-gap: var(--dimension-100);
16
+ --card-content-padding-block-start: var(--dimension-100);
17
+ --card-content-padding-block-end: var(--dimension-200);
18
+ --card-content-padding-inline: var(--dimension-200);
19
+ }
17
20
 
18
- .ds.card-content {
19
- display: flex;
20
- flex-direction: column;
21
- gap: var(--card-content-gap);
21
+ .ds.card-content {
22
+ display: flex;
23
+ flex-direction: column;
24
+ gap: var(--card-content-gap);
22
25
 
23
- padding-block-start: var(--card-content-padding-block-start);
24
- padding-block-end: var(--card-content-padding-block-end);
25
- padding-inline: var(--card-content-padding-inline);
26
+ padding-block-start: var(--card-content-padding-block-start);
27
+ padding-block-end: var(--card-content-padding-block-end);
28
+ padding-inline: var(--card-content-padding-inline);
29
+ }
26
30
  }
@@ -1,31 +1,35 @@
1
- /**
2
- * Card.Footer styles
3
- * @implements ds:global.subcomponent.card-footer
4
- *
5
- * A content-bearing section: it pads itself (the card frame applies no general
6
- * padding). Vertical padding is in baseline multiples. Holds tags and labels,
7
- * which flow in a wrapping row.
8
- */
9
- :root {
10
- --card-footer-gap: var(--dimension-100);
11
- --card-footer-padding-block: var(--dimension-200);
12
- --card-footer-padding-inline: var(--dimension-200);
13
- }
1
+ /* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
2
+
3
+ @layer ds.components.global {
4
+ /**
5
+ * Card.Footer styles
6
+ * @implements ds:global.subcomponent.card-footer
7
+ *
8
+ * A content-bearing section: it pads itself (the card frame applies no general
9
+ * padding). Vertical padding is in baseline multiples. Holds tags and labels,
10
+ * which flow in a wrapping row.
11
+ */
12
+ :root {
13
+ --card-footer-gap: var(--dimension-100);
14
+ --card-footer-padding-block: var(--dimension-200);
15
+ --card-footer-padding-inline: var(--dimension-200);
16
+ }
14
17
 
15
- .ds.card-footer {
16
- /* Inline flow: badges, chips and inline text sit on a line and wrap. Children
17
- * keep their natural width (`flex: 0 0 auto` — no grow, no shrink) and are
18
- * vertically centred, so a Badge is not stretched to the footer width. */
19
- display: flex;
20
- flex-direction: row;
21
- flex-wrap: wrap;
22
- align-items: center;
23
- gap: var(--card-footer-gap);
18
+ .ds.card-footer {
19
+ /* Inline flow: badges, chips and inline text sit on a line and wrap. Children
20
+ * keep their natural width (`flex: 0 0 auto` — no grow, no shrink) and are
21
+ * vertically centred, so a Badge is not stretched to the footer width. */
22
+ display: flex;
23
+ flex-direction: row;
24
+ flex-wrap: wrap;
25
+ align-items: center;
26
+ gap: var(--card-footer-gap);
24
27
 
25
- padding-block: var(--card-footer-padding-block);
26
- padding-inline: var(--card-footer-padding-inline);
28
+ padding-block: var(--card-footer-padding-block);
29
+ padding-inline: var(--card-footer-padding-inline);
27
30
 
28
- & > * {
29
- flex: 0 0 auto;
31
+ & > * {
32
+ flex: 0 0 auto;
33
+ }
30
34
  }
31
35
  }
@@ -1,24 +1,28 @@
1
- /**
2
- * Card.Header styles
3
- * @implements ds:global.subcomponent.card-header
4
- *
5
- * DSL anatomy: layout.type flow, space-between; title uses font/weight/semibold.
6
- * A content-bearing section: it pads itself (the card frame applies no general
7
- * padding). Vertical padding is in baseline multiples.
8
- */
9
- :root {
10
- --card-header-gap: var(--dimension-200);
11
- --card-header-padding-block: var(--dimension-200);
12
- --card-header-padding-inline: var(--dimension-200);
13
- }
1
+ /* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
2
+
3
+ @layer ds.components.global {
4
+ /**
5
+ * Card.Header styles
6
+ * @implements ds:global.subcomponent.card-header
7
+ *
8
+ * DSL anatomy: layout.type flow, space-between; title uses font/weight/semibold.
9
+ * A content-bearing section: it pads itself (the card frame applies no general
10
+ * padding). Vertical padding is in baseline multiples.
11
+ */
12
+ :root {
13
+ --card-header-gap: var(--dimension-200);
14
+ --card-header-padding-block: var(--dimension-200);
15
+ --card-header-padding-inline: var(--dimension-200);
16
+ }
14
17
 
15
- .ds.card-header {
16
- display: flex;
17
- flex-direction: row;
18
- align-items: center;
19
- justify-content: space-between;
20
- gap: var(--card-header-gap);
18
+ .ds.card-header {
19
+ display: flex;
20
+ flex-direction: row;
21
+ align-items: center;
22
+ justify-content: space-between;
23
+ gap: var(--card-header-gap);
21
24
 
22
- padding-block: var(--card-header-padding-block);
23
- padding-inline: var(--card-header-padding-inline);
25
+ padding-block: var(--card-header-padding-block);
26
+ padding-inline: var(--card-header-padding-inline);
27
+ }
24
28
  }
@@ -1,5 +1,9 @@
1
- .ds.card-image {
2
- display: block;
3
- height: auto;
4
- width: 100%;
1
+ /* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
2
+
3
+ @layer ds.components.global {
4
+ .ds.card-image {
5
+ display: block;
6
+ height: auto;
7
+ width: 100%;
8
+ }
5
9
  }
@@ -1,79 +1,83 @@
1
- /**
2
- * Card styles
3
- * @implements ds:global.component.card
4
- *
5
- * The Card is NOT a surface: it establishes no `.surface` context and sets no
6
- * background of its own, so on a surface it takes the same background as its
7
- * container (no step) and reads as flush. It stays delimited by its border,
8
- * radius, and the dividers between its sections. Colour tokens follow the Figma
9
- * spec.
10
- *
11
- * ── A Card is a grid participant ────────────────────────────────────────────
12
- * A Card always lives inside a grid (standalone: wrap it in a `.grid`; in bulk:
13
- * use the `Cards` group). It carries all of its OWN grid logic here. The card is
14
- * a ROW SUBGRID spanning FOUR section tracks — image / header / content / footer
15
- * — inheriting them from the parent so several cards can line their sections up
16
- * across a row. A card that omits a section simply leaves that track empty for
17
- * itself; the four-track vocabulary is fixed because a Card only ever has those
18
- * four section types. `Cards` supplies the shared tracks and the column flow.
19
- */
20
- :root {
21
- --card-color-border: var(--color-border-muted);
22
- --card-border-width: var(--dimension-stroke-thickness-medium);
23
- /* --dimension-radius-medium is currently 0; it is intended to resolve to 9. */
24
- --card-border-radius: var(--dimension-radius-medium);
25
- }
1
+ /* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
26
2
 
27
- .ds.card {
28
- /* One grid item spanning `--card-span` parent columns and its four section
29
- * rows; a ROW subgrid so its sections snap to the parent's four shared tracks
30
- * (that is the cross-card alignment). The parent (a `.grid` or the `Cards`
31
- * group) owns the four row tracks. */
32
- grid-column: span var(--card-span, 1);
33
- grid-row: span 4;
34
- display: grid;
35
- grid-template-rows: subgrid;
36
- grid-template-columns: minmax(0, 1fr);
3
+ @layer ds.components.global {
4
+ /**
5
+ * Card styles
6
+ * @implements ds:global.component.card
7
+ *
8
+ * The Card is NOT a surface: it establishes no `.surface` context and sets no
9
+ * background of its own, so on a surface it takes the same background as its
10
+ * container (no step) and reads as flush. It stays delimited by its border,
11
+ * radius, and the dividers between its sections. Colour tokens follow the Figma
12
+ * spec.
13
+ *
14
+ * ── A Card is a grid participant ────────────────────────────────────────────
15
+ * A Card always lives inside a grid (standalone: wrap it in a `.grid`; in bulk:
16
+ * use the `Cards` group). It carries all of its OWN grid logic here. The card is
17
+ * a ROW SUBGRID spanning FOUR section tracks — image / header / content / footer
18
+ * — inheriting them from the parent so several cards can line their sections up
19
+ * across a row. A card that omits a section simply leaves that track empty for
20
+ * itself; the four-track vocabulary is fixed because a Card only ever has those
21
+ * four section types. `Cards` supplies the shared tracks and the column flow.
22
+ */
23
+ :root {
24
+ --card-color-border: var(--color-border-muted);
25
+ --card-border-width: var(--dimension-stroke-thickness-medium);
26
+ /* --dimension-radius-medium is currently 0; it is intended to resolve to 9. */
27
+ --card-border-radius: var(--dimension-radius-medium);
28
+ }
37
29
 
38
- /* No background of its own: the card is not a surface, so it inherits its
39
- container's background and blends with the surface it sits on. */
40
- border: var(--card-border-width) solid var(--card-color-border);
41
- border-radius: var(--card-border-radius);
42
- /* Clip section corners (e.g. full-bleed images) to the card radius. */
43
- overflow: hidden;
44
- }
30
+ .ds.card {
31
+ /* One grid item spanning `--card-span` parent columns and its four section
32
+ * rows; a ROW subgrid so its sections snap to the parent's four shared tracks
33
+ * (that is the cross-card alignment). The parent (a `.grid` or the `Cards`
34
+ * group) owns the four row tracks. */
35
+ grid-column: span var(--card-span, 1);
36
+ grid-row: span 4;
37
+ display: grid;
38
+ grid-template-rows: subgrid;
39
+ grid-template-columns: minmax(0, 1fr);
45
40
 
46
- /* Place each section on its fixed row track, spanning the card's single column.
47
- * DOM order matches track order: image (1) / header (2) / content (3) /
48
- * footer (4). An absent section leaves its track empty for this card only. */
49
- .ds.card > .card-image {
50
- grid-row: 1;
51
- grid-column: 1 / -1;
52
- }
53
- .ds.card > .card-header {
54
- grid-row: 2;
55
- grid-column: 1 / -1;
56
- }
57
- .ds.card > .card-content {
58
- grid-row: 3;
59
- grid-column: 1 / -1;
60
- }
61
- .ds.card > .card-footer {
62
- grid-row: 4;
63
- grid-column: 1 / -1;
64
- }
41
+ /* No background of its own: the card is not a surface, so it inherits its
42
+ container's background and blends with the surface it sits on. */
43
+ border: var(--card-border-width) solid var(--card-color-border);
44
+ border-radius: var(--card-border-radius);
45
+ /* Clip section corners (e.g. full-bleed images) to the card radius. */
46
+ overflow: hidden;
47
+ }
65
48
 
66
- /* Section separators: a divider between adjacent sections. The card frame
67
- * provides the outer border, so the last section has none. The header is NOT a
68
- * separate visual section — no divider is drawn under it and it merges with the
69
- * content that follows. Media (Image) stays full-bleed; the content-bearing
70
- * sections pad themselves. */
71
- .ds.card > :is(.card-content, .card-footer, .card-image):not(:last-child) {
72
- border-block-end: var(--card-border-width) solid var(--card-color-border);
73
- }
49
+ /* Place each section on its fixed row track, spanning the card's single column.
50
+ * DOM order matches track order: image (1) / header (2) / content (3) /
51
+ * footer (4). An absent section leaves its track empty for this card only. */
52
+ .ds.card > .card-image {
53
+ grid-row: 1;
54
+ grid-column: 1 / -1;
55
+ }
56
+ .ds.card > .card-header {
57
+ grid-row: 2;
58
+ grid-column: 1 / -1;
59
+ }
60
+ .ds.card > .card-content {
61
+ grid-row: 3;
62
+ grid-column: 1 / -1;
63
+ }
64
+ .ds.card > .card-footer {
65
+ grid-row: 4;
66
+ grid-column: 1 / -1;
67
+ }
68
+
69
+ /* Section separators: a divider between adjacent sections. The card frame
70
+ * provides the outer border, so the last section has none. The header is NOT a
71
+ * separate visual section — no divider is drawn under it and it merges with the
72
+ * content that follows. Media (Image) stays full-bleed; the content-bearing
73
+ * sections pad themselves. */
74
+ .ds.card > :is(.card-content, .card-footer, .card-image):not(:last-child) {
75
+ border-block-end: var(--card-border-width) solid var(--card-color-border);
76
+ }
74
77
 
75
- /* Collapse the header/content seam so title and content read as one region
76
- (raw 0: unthemable by design). */
77
- .ds.card > .card-header:has(+ .card-content) {
78
- padding-block-end: 0;
78
+ /* Collapse the header/content seam so title and content read as one region
79
+ (raw 0: unthemable by design). */
80
+ .ds.card > .card-header:has(+ .card-content) {
81
+ padding-block-end: 0;
82
+ }
79
83
  }
@@ -1,17 +1,40 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "./styles.css";
3
3
  const componentCssClassName = "ds chip";
4
4
  /**
5
5
  * A chip is a compact, interactive component used to represent an attribute,
6
6
  * entity, or filter while facilitating secondary actions.
7
7
  *
8
+ * The root element is variable: a chip with an `onClick` renders a `<button>`
9
+ * (and extends button props), one without renders a `<span>` (and extends span
10
+ * props). Each branch spreads only the native props of its own root — the
11
+ * DS-owned props are destructured out first so none of them leak to the DOM.
12
+ *
8
13
  * @implements ds:global.component.chip
9
14
  */
10
- const Chip = ({ criticality, release, lead, value, onClick, onDismiss, id, className, style, ...props }) => {
11
- const Container = onClick ? "button" : "span";
12
- return (_jsxs(Container, { id: id, style: style, className: [componentCssClassName, criticality, release, className]
13
- .filter(Boolean)
14
- .join(" "), onClick: onClick, ...props, children: [lead && _jsx("span", { className: "lead", children: lead }), value && _jsx("span", { className: "value", children: value }), onDismiss && (_jsx("button", { type: "button", className: "dismiss", "aria-label": "Dismiss", onClick: () => onDismiss() }))] }));
15
+ const Chip = (props) => {
16
+ const className = [
17
+ componentCssClassName,
18
+ props.criticality,
19
+ props.release,
20
+ props.className,
21
+ ]
22
+ .filter(Boolean)
23
+ .join(" ");
24
+ const content = (_jsxs(_Fragment, { children: [props.lead && _jsx("span", { className: "lead", children: props.lead }), props.value && _jsx("span", { className: "value", children: props.value }), props.onDismiss && (_jsx("button", { type: "button", className: "dismiss", "aria-label": "Dismiss", onClick: () => props.onDismiss?.() }))] }));
25
+ // Interactive chip → <button>. Its native button props (including onClick)
26
+ // are forwarded after the DS-owned props are stripped off.
27
+ if (props.onClick) {
28
+ const { criticality: _criticality, release: _release, lead: _lead, value: _value, onDismiss: _onDismiss, className: _className, ...rest } = props;
29
+ return (
30
+ // Default type="button" so a Chip inside a <form> doesn't submit it on
31
+ // click (the native default is "submit"); placed before the spread so a
32
+ // caller can still override it via the native `type` prop.
33
+ _jsx("button", { type: "button", className: className, ...rest, children: content }));
34
+ }
35
+ // Static chip → <span>.
36
+ const { criticality: _criticality, release: _release, lead: _lead, value: _value, onDismiss: _onDismiss, onClick: _onClick, className: _className, ...rest } = props;
37
+ return (_jsx("span", { className: className, ...rest, children: content }));
15
38
  };
16
39
  export default Chip;
17
40
  //# sourceMappingURL=Chip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../../src/lib/component/Chip/Chip.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAGtB,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAExC;;;;;GAKG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,WAAW,EACX,OAAO,EACP,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAS,EACT,EAAE,EACF,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACM,EAAsB,EAAE;IACtC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,CACL,MAAC,SAAS,IACR,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC;aAChE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,OAAO,EAAE,OAAO,KACZ,KAAK,aAER,IAAI,IAAI,eAAM,SAAS,EAAC,MAAM,YAAE,IAAI,GAAQ,EAC5C,KAAK,IAAI,eAAM,SAAS,EAAC,OAAO,YAAE,KAAK,GAAQ,EAC/C,SAAS,IAAI,CACZ,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,SAAS,gBACR,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,GAC1B,CACH,IACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../../src/lib/component/Chip/Chip.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAGtB,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAExC;;;;;;;;;;GAUG;AACH,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAsB,EAAE;IACpD,MAAM,SAAS,GAAG;QAChB,qBAAqB;QACrB,KAAK,CAAC,WAAW;QACjB,KAAK,CAAC,OAAO;QACb,KAAK,CAAC,SAAS;KAChB;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,MAAM,OAAO,GAAG,CACd,8BACG,KAAK,CAAC,IAAI,IAAI,eAAM,SAAS,EAAC,MAAM,YAAE,KAAK,CAAC,IAAI,GAAQ,EACxD,KAAK,CAAC,KAAK,IAAI,eAAM,SAAS,EAAC,OAAO,YAAE,KAAK,CAAC,KAAK,GAAQ,EAC3D,KAAK,CAAC,SAAS,IAAI,CAClB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,SAAS,gBACR,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,GAClC,CACH,IACA,CACJ,CAAC;IAEF,2EAA2E;IAC3E,2DAA2D;IAC3D,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,EACJ,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,UAAU,EACrB,SAAS,EAAE,UAAU,EACrB,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;QACV,OAAO;QACL,uEAAuE;QACvE,wEAAwE;QACxE,2DAA2D;QAC3D,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,SAAS,KAAM,IAAI,YACjD,OAAO,GACD,CACV,CAAC;IACJ,CAAC;IAED,wBAAwB;IACxB,MAAM,EACJ,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,UAAU,EACrB,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IACV,OAAO,CACL,eAAM,SAAS,EAAE,SAAS,KAAM,IAAI,YACjC,OAAO,GACH,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,109 +1,113 @@
1
- /* Component tokens — sourced from @canonical/design-tokens */
2
- :root {
3
- --chip-color-background: var(--color-foreground-secondary);
4
- --chip-color-background-hover: var(--color-foreground-secondary-hover);
5
- --chip-color-background-active: var(--color-foreground-secondary-active);
6
- --chip-color-border: var(--color-border-high-contrast);
7
- --chip-color-text: var(--color-text);
8
-
9
- --chip-border-radius: 1rem;
10
- --chip-font-size: var(--font-size-small);
11
- --chip-font-weight: var(--font-weight-default);
12
- --chip-line-height: var(--line-height-small);
13
- --chip-border-width: var(--spacing-border-width);
14
- --chip-padding-vertical: var(--spacing-vertical-xsmall);
15
- --chip-padding-horizontal: var(--spacing-horizontal-small);
16
- --chip-margin-bottom: var(--spacing-vertical-small);
17
- --chip-margin-left: var(--spacing-horizontal-medium);
18
- }
19
-
20
- .ds.chip {
21
- border-color: var(--modifier-color-border, var(--chip-color-border));
22
- border-style: solid;
23
- border-radius: var(--chip-border-radius);
24
- border-width: var(--chip-border-width);
25
-
26
- color: var(--modifier-color-text, var(--chip-color-text));
27
- background-color: var(
28
- --modifier-color-foreground-secondary,
29
- var(--chip-color-background)
30
- );
31
-
32
- display: inline-flex;
33
- align-items: baseline;
34
-
35
- user-select: none;
36
- white-space: nowrap;
37
-
38
- font-size: var(--chip-font-size);
39
- font-weight: var(--chip-font-weight);
40
- line-height: var(--chip-line-height);
41
-
42
- margin-block-end: var(--chip-margin-bottom);
43
- margin-inline-end: var(--chip-margin-left);
44
- padding-block: var(--chip-padding-vertical);
45
- padding-inline: var(--chip-padding-horizontal);
46
-
47
- & > .lead {
48
- font-variant-caps: all-small-caps;
49
- font-variant-numeric: oldstyle-nums;
1
+ /* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
2
+
3
+ @layer ds.components.global {
4
+ /* Component tokens — sourced from @canonical/design-tokens */
5
+ :root {
6
+ --chip-color-background: var(--color-foreground-secondary);
7
+ --chip-color-background-hover: var(--color-foreground-secondary-hover);
8
+ --chip-color-background-active: var(--color-foreground-secondary-active);
9
+ --chip-color-border: var(--color-border-high-contrast);
10
+ --chip-color-text: var(--color-text);
11
+
12
+ --chip-border-radius: 1rem;
13
+ --chip-font-size: var(--font-size-small);
14
+ --chip-font-weight: var(--font-weight-default);
15
+ --chip-line-height: var(--line-height-small);
16
+ --chip-border-width: var(--spacing-border-width);
17
+ --chip-padding-vertical: var(--spacing-vertical-xsmall);
18
+ --chip-padding-horizontal: var(--spacing-horizontal-small);
19
+ --chip-margin-bottom: var(--spacing-vertical-small);
20
+ --chip-margin-left: var(--spacing-horizontal-medium);
50
21
  }
51
22
 
52
- & > .lead + .value::before {
53
- content: ": ";
54
- }
55
-
56
- & > .lead,
57
- & > .value {
58
- display: inline;
59
- overflow: hidden;
60
- text-overflow: ellipsis;
61
- }
23
+ .ds.chip {
24
+ border-color: var(--modifier-color-border, var(--chip-color-border));
25
+ border-style: solid;
26
+ border-radius: var(--chip-border-radius);
27
+ border-width: var(--chip-border-width);
62
28
 
63
- & > .dismiss {
64
- background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M13.041 1.898l1.06 1.06L9.062 8l5.04 5.042-1.06 1.06L8 9.062 2.96 14.1l-1.06-1.06L6.938 8 1.9 2.96l1.06-1.06 5.04 5.04z'/%3E%3C/svg%3E");
65
- background-color: var(--chip-color-background);
66
- align-self: center;
67
- background-size: 0.75rem;
68
- background-repeat: no-repeat;
69
- background-position: center;
70
- display: inline-block;
71
- cursor: pointer;
72
- margin-left: var(--spacing-horizontal-xsmall);
73
- flex: 0 0 auto;
74
- border-radius: 50%;
75
- border-color: transparent;
76
- height: var(--font-size-default);
77
- width: var(--font-size-default);
78
- }
79
-
80
- &:is(button) {
81
- cursor: pointer;
82
- }
83
-
84
- &:hover:not(:has(.dismiss)),
85
- & > .dismiss:hover {
86
- background-color: var(
87
- --hover--color-foreground-secondary,
88
- var(--chip-color-background-hover)
89
- );
90
- }
91
-
92
- &:active:not(:has(.dismiss)),
93
- & > .dismiss:active {
29
+ color: var(--modifier-color-text, var(--chip-color-text));
94
30
  background-color: var(
95
- --active--color-foreground-secondary,
96
- var(--chip-color-background-active)
31
+ --modifier-color-foreground-secondary,
32
+ var(--chip-color-background)
97
33
  );
98
- }
99
-
100
- /* Context-specific styling for badges within chips */
101
- & .ds.badge {
102
- /** Pull the badge closer to the edge of a chip */
103
- --badge-chip-margin-tweak: var(--dimension-025);
104
34
 
105
- align-self: center;
106
- margin-left: var(--spacing-horizontal-small);
107
- margin-right: var(--badge-chip-margin-tweak);
35
+ display: inline-flex;
36
+ align-items: baseline;
37
+
38
+ user-select: none;
39
+ white-space: nowrap;
40
+
41
+ font-size: var(--chip-font-size);
42
+ font-weight: var(--chip-font-weight);
43
+ line-height: var(--chip-line-height);
44
+
45
+ margin-block-end: var(--chip-margin-bottom);
46
+ margin-inline-end: var(--chip-margin-left);
47
+ padding-block: var(--chip-padding-vertical);
48
+ padding-inline: var(--chip-padding-horizontal);
49
+
50
+ & > .lead {
51
+ font-variant-caps: all-small-caps;
52
+ font-variant-numeric: oldstyle-nums;
53
+ }
54
+
55
+ & > .lead + .value::before {
56
+ content: ": ";
57
+ }
58
+
59
+ & > .lead,
60
+ & > .value {
61
+ display: inline;
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ }
65
+
66
+ & > .dismiss {
67
+ background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M13.041 1.898l1.06 1.06L9.062 8l5.04 5.042-1.06 1.06L8 9.062 2.96 14.1l-1.06-1.06L6.938 8 1.9 2.96l1.06-1.06 5.04 5.04z'/%3E%3C/svg%3E");
68
+ background-color: var(--chip-color-background);
69
+ align-self: center;
70
+ background-size: 0.75rem;
71
+ background-repeat: no-repeat;
72
+ background-position: center;
73
+ display: inline-block;
74
+ cursor: pointer;
75
+ margin-left: var(--spacing-horizontal-xsmall);
76
+ flex: 0 0 auto;
77
+ border-radius: 50%;
78
+ border-color: transparent;
79
+ height: var(--font-size-default);
80
+ width: var(--font-size-default);
81
+ }
82
+
83
+ &:is(button) {
84
+ cursor: pointer;
85
+ }
86
+
87
+ &:hover:not(:has(.dismiss)),
88
+ & > .dismiss:hover {
89
+ background-color: var(
90
+ --hover--color-foreground-secondary,
91
+ var(--chip-color-background-hover)
92
+ );
93
+ }
94
+
95
+ &:active:not(:has(.dismiss)),
96
+ & > .dismiss:active {
97
+ background-color: var(
98
+ --active--color-foreground-secondary,
99
+ var(--chip-color-background-active)
100
+ );
101
+ }
102
+
103
+ /* Context-specific styling for badges within chips */
104
+ & .ds.badge {
105
+ /** Pull the badge closer to the edge of a chip */
106
+ --badge-chip-margin-tweak: var(--dimension-025);
107
+
108
+ align-self: center;
109
+ margin-left: var(--spacing-horizontal-small);
110
+ margin-right: var(--badge-chip-margin-tweak);
111
+ }
108
112
  }
109
113
  }