@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
@@ -0,0 +1,122 @@
1
+ import type { ComponentProps, MouseEventHandler, ReactElement, ReactNode, RefCallback, RefObject } from "react";
2
+ type OwnProps = {
3
+ /**
4
+ * The handle on the underlying `<dialog>`, and the only way the modal opens:
5
+ * `ref.current?.showModal()`, with `ref.current?.close()` closing it. The prop
6
+ * is required because the modal is only ever opened through `showModal()`, so
7
+ * a modal with no ref is a modal that can never open — every modal needs a ref:
8
+ * withModal hands its factory the ref to attach and a
9
+ * directly-composed modal driven by a trigger takes a stored ref. Requiring the prop turns
10
+ * the withModal factory's duty — attaching the ref it receives —
11
+ * into a compile error instead of a silent nothing.
12
+ *
13
+ * `showModal()` throws on a dialog that is already open. A trigger sitting
14
+ * on the page cannot be clicked while the modal holds it inert, so it needs
15
+ * no guard; anything that can fire twice — a keyboard shortcut, an effect —
16
+ * should check `ref.current.open` first.
17
+ */
18
+ ref: RefCallback<HTMLDialogElement> | RefObject<HTMLDialogElement | null>;
19
+ /**
20
+ * Whether clicking the backdrop dismisses the modal. Defaults to `false`, so
21
+ * backdrop dismissal is opt-in. Independent of the header's `undismissible`.
22
+ */
23
+ closeOnBackdropClick?: boolean;
24
+ /**
25
+ * The composed sections — `Modal.Header`, `Modal.Content` and
26
+ * `Modal.Footer`, in that order. The header and footer are optional; the
27
+ * content carries the main information the modal conveys.
28
+ */
29
+ children: ReactNode;
30
+ };
31
+ /**
32
+ * Props for the Modal pattern
33
+ *
34
+ * @implements ds:global.pattern.modal
35
+ *
36
+ * `open` is omitted because a `<dialog>` carrying the `open` attribute is
37
+ * *non-modal*: no top layer, no backdrop, no focus trap. The modal is only
38
+ * ever opened through `showModal()`, so the open state lives in the DOM
39
+ * element and not in a prop. Use the `ref` to open or close it.
40
+ *
41
+ * `onClose` is *not* omitted: the native `close` event is how a consumer hears
42
+ * that the modal is gone, whichever way out the user took, and it replaces the
43
+ * `onOpenChange` callback a controlled modal would need. It does not say *which*
44
+ * way out that was — an action that needs to be told apart from a dismissal
45
+ * should close the modal with `ref.current?.close(value)` and read
46
+ * `event.currentTarget.returnValue`.
47
+ */
48
+ export type ModalProps = OwnProps & Omit<ComponentProps<"dialog">, keyof OwnProps | "open">;
49
+ /**
50
+ * The shared modal API threaded to the composed subcomponents through the
51
+ * Modal context: the id the dialog's `aria-labelledby` points at (set on the
52
+ * Header's title, which is what gives the dialog its accessible name), and
53
+ * the dismissal that closes the dialog (what the Header's close button calls).
54
+ */
55
+ export interface ModalContextValue {
56
+ /**
57
+ * The id the dialog's `aria-labelledby` points at. The Header sets it on the
58
+ * title, which is what gives the dialog its accessible name.
59
+ */
60
+ titleId: string;
61
+ /** Closes the dialog. What the Header's close button calls. */
62
+ onDismiss: () => void;
63
+ }
64
+ /**
65
+ * The one requirement {@link withModal} places on the component it wraps: it
66
+ * must accept an `onClick` handler. The HOC composes its open handler onto
67
+ * the trigger itself — no wrapper element — so a trigger that accepts
68
+ * `onClick` but never forwards it to a clickable element never opens its
69
+ * modal. An `onClick` the consumer passes still runs: the HOC calls it first,
70
+ * then opens the modal.
71
+ *
72
+ * The event is typed against plain `Element` so triggers rooted at any
73
+ * element — `<button>`, `<a>`, a clickable `<span>` — satisfy the constraint:
74
+ * React's event handlers are bivariant (the `bivarianceHack`), so a
75
+ * `MouseEventHandler<HTMLButtonElement>` prop fits where a
76
+ * `MouseEventHandler<Element>` is expected.
77
+ */
78
+ export type WithModalTriggerProps = {
79
+ onClick?: MouseEventHandler<Element>;
80
+ };
81
+ /**
82
+ * The props the modal element returned by a {@link WithModalRender} carries:
83
+ * everything `Modal` accepts — including the required `ref`, which the factory
84
+ * sets on the `<Modal>` so the trigger can open it.
85
+ */
86
+ export type WithModalModalProps = ModalProps;
87
+ /**
88
+ * What {@link withModal} hands a {@link WithModalRender} function: a props
89
+ * object.
90
+ */
91
+ export type WithModalRenderProps = {
92
+ /** Closes the modal. What a footer button wires its `onClick` to. */
93
+ close: () => void;
94
+ /**
95
+ * The handle on the `<dialog>` the trigger opens. The factory MUST set it
96
+ * on the `<Modal>` it returns — `<Modal ref={ref}>`. `Modal` requires its
97
+ * `ref`, so a factory that forgets it fails to compile.
98
+ */
99
+ ref: RefObject<HTMLDialogElement | null>;
100
+ };
101
+ /**
102
+ * The second argument of {@link withModal}: a render contract. The HOC calls
103
+ * it during render with a {@link WithModalRenderProps} object — `{ close,
104
+ * ref }` — and it returns the complete `<Modal>` element.
105
+ *
106
+ * **Every factory must attach the `ref` it receives to the `<Modal>` it
107
+ * returns.** The trigger opens the dialog through that ref. `Modal` requires
108
+ * its `ref`, so a factory that forgets it fails to compile:
109
+ *
110
+ * `({ ref }) => <Modal ref={ref}>…</Modal>`
111
+ *
112
+ * or, with a footer button that closes the modal:
113
+ *
114
+ * `({ close, ref }) => <Modal ref={ref}><Modal.Footer><Button onClick={close}>Got it</Button></Modal.Footer></Modal>`
115
+ *
116
+ * A footer action can only close. If it must do more — submit data, close
117
+ * conditionally, open another modal — skip the HOC and compose `Modal`
118
+ * directly, driving it through its `ref`.
119
+ */
120
+ export type WithModalRender = (props: WithModalRenderProps) => ReactElement<WithModalModalProps>;
121
+ export {};
122
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/pattern/Modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,KAAK,QAAQ,GAAG;IACd;;;;;;;;;;;;;;OAcG;IACH,GAAG,EAAE,WAAW,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAC1E;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAC/B,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,qEAAqE;IACrE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;;OAIG;IACH,GAAG,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG,CAC5B,KAAK,EAAE,oBAAoB,KACxB,YAAY,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,74 @@
1
+ import type { ComponentType } from "react";
2
+ import type { WithModalRender, WithModalTriggerProps } from "./types.js";
3
+ /**
4
+ * Wraps a trigger with a modal. Click the trigger → the modal opens.
5
+ *
6
+ * **The wrapped component must accept `onClick`** and forward it to the
7
+ * clickable element at its root — the HOC composes its open handler onto the
8
+ * trigger itself, with no wrapper element in between. An `onClick` the
9
+ * consumer passes keeps working: it runs first, then the modal opens.
10
+ *
11
+ * The second argument is a function: the HOC calls it with a props object
12
+ * carrying `close` and `ref`, and it returns a complete `<Modal>` element —
13
+ * sections, props and all:
14
+ *
15
+ * ```tsx
16
+ * const OpenButton = withModal(
17
+ * Button,
18
+ * ({ ref }) => (
19
+ * <Modal ref={ref}>
20
+ * <Modal.Content>Hello</Modal.Content>
21
+ * </Modal>
22
+ * ),
23
+ * );
24
+ * <OpenButton>Open</OpenButton>;
25
+ * ```
26
+ *
27
+ * Everything `Modal` accepts lives on the element the function returns —
28
+ * `closeOnBackdropClick`, `aria-label`, `className` — so the consumer sees the
29
+ * real modal, not an options bag. **One duty comes with that freedom: the
30
+ * factory must attach the `ref` it receives to the `<Modal>`** (`<Modal
31
+ * ref={ref}>`). The trigger opens the dialog through that ref — and `Modal`
32
+ * requires its `ref`, so a factory that forgets it fails to compile.
33
+ *
34
+ * **How it closes:** the header's X button and Escape always work. Add
35
+ * `closeOnBackdropClick` to the modal element and a backdrop click works too.
36
+ *
37
+ * **Footer buttons can only close the modal.** That is the one and only
38
+ * action this HOC provides — wire one to the `close` the function receives:
39
+ *
40
+ * ```tsx
41
+ * const confirmationModal: WithModalRender = ({ close, ref }) => (
42
+ * <Modal ref={ref}>
43
+ * <Modal.Footer>
44
+ * <Button onClick={close}>Got it</Button>
45
+ * </Modal.Footer>
46
+ * </Modal>
47
+ * );
48
+ *
49
+ * const OpenButton = withModal(Button, confirmationModal);
50
+ * ```
51
+ *
52
+ * If an action needs to do more than close — save data, open another modal,
53
+ * close conditionally — don't use this HOC: compose `Modal` directly and drive
54
+ * it through its `ref`.
55
+ *
56
+ * `withModal` is meant for static content and belongs at module scope, called
57
+ * once. The function it is handed is invoked on every render of the trigger,
58
+ * but at module scope it can only see module-level values, so what it returns
59
+ * is the same on every render. If the modal must show data from the parent —
60
+ * for example a different `userId` depending on which user is selected —
61
+ * don't call this HOC inside the component; compose `Modal` directly and
62
+ * drive it through its `ref`.
63
+ *
64
+ * A pure composition wrapper: it renders the wrapped component and the modal
65
+ * as siblings, so it carries no root element of its own.
66
+ *
67
+ * `import { withModal } from "@canonical/react-ds-global";`
68
+ *
69
+ * @param Component The trigger component to wrap (e.g. `Button`). It must accept `onClick` and forward it to its root element; clicking it opens the modal.
70
+ * @param modal A {@link WithModalRender} function: it receives `{ close, ref }`, must attach `ref` to the `<Modal>` it returns, and the trigger opens it.
71
+ */
72
+ declare const withModal: <TProps extends WithModalTriggerProps>(Component: ComponentType<TProps>, modal: WithModalRender) => ComponentType<TProps>;
73
+ export default withModal;
74
+ //# sourceMappingURL=withModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withModal.d.ts","sourceRoot":"","sources":["../../../../../src/lib/pattern/Modal/withModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,QAAA,MAAM,SAAS,GAAI,MAAM,SAAS,qBAAqB,EACrD,WAAW,aAAa,CAAC,MAAM,CAAC,EAChC,OAAO,eAAe,KACrB,aAAa,CAAC,MAAM,CAyCtB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,5 +1,12 @@
1
- import type { HTMLAttributes, ReactElement } from "react";
1
+ import type { ComponentProps, ReactElement } from "react";
2
2
  import type { EventProps } from "../Event/types.js";
3
+ type OwnProps = {
4
+ /**
5
+ * Timeline.Event elements
6
+ * Maps to DSL cardinality: 0..* (zero or more)
7
+ */
8
+ children?: ReactElement<EventProps> | ReactElement<EventProps>[] | null;
9
+ };
3
10
  /**
4
11
  * Props for the Timeline.Content subcomponent
5
12
  *
@@ -11,11 +18,6 @@ import type { EventProps } from "../Event/types.js";
11
18
  * - edges:
12
19
  * - [0] timeline-event (cardinality: 0..*, slotName: default)
13
20
  */
14
- export interface ContentProps extends HTMLAttributes<HTMLDivElement> {
15
- /**
16
- * Timeline.Event elements
17
- * Maps to DSL cardinality: 0..* (zero or more)
18
- */
19
- children?: ReactElement<EventProps> | ReactElement<EventProps>[] | null;
20
- }
21
+ export type ContentProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
22
+ export {};
21
23
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/pattern/Timeline/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,CAAC;CACzE"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/pattern/Timeline/common/Content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,CAAC;CACzE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
@@ -1,19 +1,6 @@
1
1
  import type { ModifierFamily } from "@canonical/ds-types";
2
- import type { HTMLAttributes, ReactNode } from "react";
3
- /**
4
- * Props for the Timeline.Event subcomponent
5
- *
6
- * @implements ds:global.subcomponent.timeline-event
7
- *
8
- * Anatomy (from DSL):
9
- * - layout.type: flow
10
- * - layout.direction: horizontal
11
- * - edges:
12
- * - [0] actor (role: actor, cardinality: 0..1)
13
- * - [1] datetime (role: datetime, cardinality: 0..1)
14
- * - [2] payload (role: payload, cardinality: 1, slotName: default)
15
- */
16
- export interface EventProps extends HTMLAttributes<HTMLDivElement> {
2
+ import type { ComponentProps, ReactNode } from "react";
3
+ type OwnProps = {
17
4
  /**
18
5
  * Actor/user who performed the action
19
6
  * Maps to DSL role: actor (cardinality: 0..1)
@@ -34,5 +21,20 @@ export interface EventProps extends HTMLAttributes<HTMLDivElement> {
34
21
  * Maps to DSL hasModifierFamily: criticality
35
22
  */
36
23
  criticality?: ModifierFamily<"criticality">;
37
- }
24
+ };
25
+ /**
26
+ * Props for the Timeline.Event subcomponent
27
+ *
28
+ * @implements ds:global.subcomponent.timeline-event
29
+ *
30
+ * Anatomy (from DSL):
31
+ * - layout.type: flow
32
+ * - layout.direction: horizontal
33
+ * - edges:
34
+ * - [0] actor (role: actor, cardinality: 0..1)
35
+ * - [1] datetime (role: datetime, cardinality: 0..1)
36
+ * - [2] payload (role: payload, cardinality: 1, slotName: default)
37
+ */
38
+ export type EventProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
39
+ export {};
38
40
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/pattern/Timeline/common/Event/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CAC7C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/pattern/Timeline/common/Event/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
@@ -1,6 +1,13 @@
1
- import type { HTMLAttributes, ReactElement } from "react";
1
+ import type { ComponentProps, ReactElement } from "react";
2
2
  import type { ContentProps } from "./common/Content/types.js";
3
3
  import type { EventProps } from "./common/Event/types.js";
4
+ type OwnProps = {
5
+ /**
6
+ * Timeline.Content element (required)
7
+ * Maps to DSL edges[1]: timeline-content (cardinality: 1)
8
+ */
9
+ children: ReactElement<ContentProps>;
10
+ };
4
11
  /**
5
12
  * Props for the Timeline component
6
13
  *
@@ -16,13 +23,7 @@ import type { EventProps } from "./common/Event/types.js";
16
23
  *
17
24
  * Note: Timeline.Header and Timeline.Footer are not yet implemented.
18
25
  */
19
- export interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
20
- /**
21
- * Timeline.Content element (required)
22
- * Maps to DSL edges[1]: timeline-content (cardinality: 1)
23
- */
24
- children: ReactElement<ContentProps>;
25
- }
26
+ export type TimelineProps = OwnProps & Omit<ComponentProps<"div">, keyof OwnProps>;
26
27
  /**
27
28
  * Timeline component type with attached subcomponents
28
29
  */
@@ -30,4 +31,5 @@ export type TimelineComponent = ((props: TimelineProps) => ReactElement) & {
30
31
  Content: (props: ContentProps) => ReactElement;
31
32
  Event: (props: EventProps) => ReactElement;
32
33
  };
34
+ export {};
33
35
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/pattern/Timeline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACnE;;;OAGG;IACH,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,YAAY,CAAC,GAAG;IACzE,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,YAAY,CAAC;IAC/C,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,YAAY,CAAC;CAC5C,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/pattern/Timeline/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,QAAQ,GAAG;IACd;;;OAGG;IACH,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAClC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,EAAE,aAAa,KAAK,YAAY,CAAC,GAAG;IACzE,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,YAAY,CAAC;IAC/C,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,YAAY,CAAC;CAC5C,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from "./Modal/index.js";
1
2
  export * from "./Timeline/index.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pattern/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/pattern/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
@@ -1,8 +1,12 @@
1
- import type { SVGAttributes } from "react";
1
+ import type { ComponentProps } from "react";
2
+ type OwnProps = {
3
+ /** Root path to the icons (default: /icons). Must be exposed to the user. */
4
+ rootPath?: string;
5
+ };
2
6
  /**
3
- * The Spinner has no props of its own beyond those of the underlying icon
4
- * `<svg>`: it always renders the `spinner` icon and animates it. The `icon`
5
- * name is fixed, so it is not part of the public surface.
7
+ * The Spinner has no props of its own beyond `rootPath` and those of the
8
+ * underlying icon `<svg>`: it always renders the `spinner` icon and animates
9
+ * it. The `icon` name is fixed, so it is not part of the public surface.
6
10
  *
7
11
  * Like `Icon`, the Spinner is decorative by default (`aria-hidden="true"`).
8
12
  * Pass an `aria-label` (or `aria-labelledby`) when the spinner is the only
@@ -10,8 +14,6 @@ import type { SVGAttributes } from "react";
10
14
  * When the spinner sits inside a control that already announces its busy
11
15
  * state (e.g. a submitting Button), leave it decorative.
12
16
  */
13
- export interface SpinnerProps extends SVGAttributes<HTMLOrSVGElement> {
14
- /** Root path to the icons (default: /icons). Must be exposed to the user. */
15
- rootPath?: string;
16
- }
17
+ export type SpinnerProps = OwnProps & Omit<ComponentProps<"svg">, keyof OwnProps>;
18
+ export {};
17
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/Spinner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAa,SAAQ,aAAa,CAAC,gBAAgB,CAAC;IACnE,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/subcomponent/Spinner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,KAAK,QAAQ,GAAG;IACd,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,20 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-global",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
8
+ "style": "dist/esm/lib/index.css",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "default": "./dist/esm/index.js"
13
+ },
14
+ "./index.css": "./dist/esm/lib/index.css",
15
+ "./package.json": "./package.json",
16
+ "./dist/*": "./dist/*"
17
+ },
8
18
  "files": [
9
19
  "dist"
10
20
  ],
@@ -43,26 +53,26 @@
43
53
  "test:vitest:watch": "vitest"
44
54
  },
45
55
  "dependencies": {
46
- "@canonical/design-tokens": "0.8.1",
47
- "@canonical/ds-assets": "^0.36.0",
48
- "@canonical/react-hooks": "^0.36.0",
49
- "@canonical/storybook-config": "^0.36.0",
50
- "@canonical/styles": "^0.36.0",
51
- "@canonical/utils": "^0.36.0",
56
+ "@canonical/design-tokens": "0.10.0",
57
+ "@canonical/ds-assets": "^0.38.0",
58
+ "@canonical/ds-utils": "^0.38.0",
59
+ "@canonical/react-hooks": "^0.38.0",
60
+ "@canonical/storybook-config": "^0.38.0",
61
+ "@canonical/styles": "^0.38.0",
52
62
  "react": "^19.2.4",
53
63
  "react-dom": "^19.2.4"
54
64
  },
55
65
  "devDependencies": {
56
- "@biomejs/biome": "2.4.9",
57
- "@canonical/biome-config": "^0.36.0",
58
- "@canonical/ds-types": "^0.36.0",
59
- "@canonical/router-core": "^0.36.0",
60
- "@canonical/router-react": "^0.36.0",
61
- "@canonical/storybook-addon-utils": "^0.36.0",
62
- "@canonical/storybook-helpers": "^0.36.0",
63
- "@canonical/typescript-config-react": "^0.36.0",
64
- "@canonical/vitest-config-react": "^0.36.0",
65
- "@canonical/webarchitect": "^0.36.0",
66
+ "@biomejs/biome": "2.5.13",
67
+ "@canonical/biome-config": "^0.38.0",
68
+ "@canonical/ds-types": "^0.38.0",
69
+ "@canonical/router-core": "^0.38.0",
70
+ "@canonical/router-react": "^0.38.0",
71
+ "@canonical/storybook-addon-utils": "^0.38.0",
72
+ "@canonical/storybook-helpers": "^0.38.0",
73
+ "@canonical/typescript-config-react": "^0.38.0",
74
+ "@canonical/vitest-config-react": "^0.38.0",
75
+ "@canonical/webarchitect": "^0.38.0",
66
76
  "@chromatic-com/storybook": "^5.0.1",
67
77
  "@storybook/addon-docs": "^10.3.1",
68
78
  "@storybook/react-vite": "^10.3.1",
@@ -80,5 +90,5 @@
80
90
  "vite": "^8.0.1",
81
91
  "vitest": "^4.0.18"
82
92
  },
83
- "gitHead": "78eb47ac10104e914eeacd331795e14b832703d4"
93
+ "gitHead": "4d10a68a9b299af6fe3d1d7d053e54ca128944ad"
84
94
  }