@workday/canvas-kit-react 7.0.0-alpha.129-next.3 → 7.0.0-alpha.256-next.2

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 (742) hide show
  1. package/action-bar/lib/ActionBarItem.tsx +2 -7
  2. package/action-bar/lib/ActionBarList.tsx +14 -4
  3. package/action-bar/lib/ActionBarOverflowButton.tsx +10 -6
  4. package/banner/lib/Banner.tsx +3 -6
  5. package/breadcrumbs/LICENSE +52 -0
  6. package/breadcrumbs/README.md +9 -0
  7. package/breadcrumbs/index.ts +2 -0
  8. package/breadcrumbs/lib/Breadcrumbs.tsx +151 -0
  9. package/breadcrumbs/lib/BreadcrumbsCurrentItem.tsx +76 -0
  10. package/breadcrumbs/lib/BreadcrumbsItem.tsx +82 -0
  11. package/breadcrumbs/lib/BreadcrumbsLink.tsx +52 -0
  12. package/breadcrumbs/lib/BreadcrumbsList.tsx +51 -0
  13. package/breadcrumbs/lib/BreadcrumbsMenu.tsx +28 -0
  14. package/breadcrumbs/lib/BreadcrumbsOverflowButton.tsx +58 -0
  15. package/breadcrumbs/lib/hooks/useBreadcrumbsModel.tsx +76 -0
  16. package/breadcrumbs/lib/hooks/utils/index.ts +22 -0
  17. package/breadcrumbs/package.json +6 -0
  18. package/button/index.ts +7 -1
  19. package/button/lib/BaseButton.tsx +7 -4
  20. package/button/lib/DeleteButton.tsx +2 -2
  21. package/button/lib/PrimaryButton.tsx +2 -2
  22. package/button/lib/SecondaryButton.tsx +2 -2
  23. package/button/lib/TertiaryButton.tsx +21 -10
  24. package/card/lib/CardBody.tsx +3 -6
  25. package/card/lib/CardHeading.tsx +13 -10
  26. package/checkbox/index.ts +0 -1
  27. package/checkbox/lib/Checkbox.tsx +9 -24
  28. package/color-picker/index.ts +0 -1
  29. package/color-picker/lib/ColorInput.tsx +1 -2
  30. package/common/index.ts +1 -0
  31. package/common/lib/InputProvider.tsx +0 -5
  32. package/common/lib/responsive/useResponsiveContainerStyles.ts +128 -0
  33. package/common/lib/theming/index.ts +1 -1
  34. package/common/lib/theming/styled.ts +6 -3
  35. package/common/lib/utils/components.ts +48 -22
  36. package/common/lib/utils/elements.ts +7 -12
  37. package/common/lib/utils/index.ts +0 -1
  38. package/common/lib/utils/isWithinBreakpoint.ts +6 -0
  39. package/common/lib/utils/models.ts +10 -2
  40. package/common/lib/utils/useModalityType.ts +13 -13
  41. package/dist/commonjs/action-bar/lib/ActionBar.d.ts +1 -1
  42. package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +8 -0
  43. package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
  44. package/dist/commonjs/action-bar/lib/ActionBarItem.js +1 -1
  45. package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +92 -0
  46. package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
  47. package/dist/commonjs/action-bar/lib/ActionBarList.js +5 -5
  48. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +5 -1
  49. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
  50. package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.js +3 -3
  51. package/dist/commonjs/banner/lib/Banner.d.ts +0 -9
  52. package/dist/commonjs/banner/lib/Banner.d.ts.map +1 -1
  53. package/dist/commonjs/banner/lib/Banner.js +2 -4
  54. package/dist/commonjs/breadcrumbs/index.d.ts +3 -0
  55. package/dist/commonjs/breadcrumbs/index.d.ts.map +1 -0
  56. package/dist/commonjs/breadcrumbs/index.js +14 -0
  57. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +3851 -0
  58. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -0
  59. package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.js +177 -0
  60. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +212 -0
  61. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -0
  62. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.js +63 -0
  63. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +226 -0
  64. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -0
  65. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +76 -0
  66. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.d.ts +17 -0
  67. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.d.ts.map +1 -0
  68. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.js +46 -0
  69. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts +164 -0
  70. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -0
  71. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.js +63 -0
  72. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +1717 -0
  73. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -0
  74. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.js +58 -0
  75. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +241 -0
  76. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -0
  77. package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.js +68 -0
  78. package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +1661 -0
  79. package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -0
  80. package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.js +67 -0
  81. package/dist/commonjs/breadcrumbs/lib/hooks/utils/index.d.ts +6 -0
  82. package/dist/commonjs/breadcrumbs/lib/hooks/utils/index.d.ts.map +1 -0
  83. package/dist/commonjs/breadcrumbs/lib/hooks/utils/index.js +22 -0
  84. package/dist/commonjs/button/index.d.ts +1 -1
  85. package/dist/commonjs/button/index.d.ts.map +1 -1
  86. package/dist/commonjs/button/index.js +3 -1
  87. package/dist/commonjs/button/lib/BaseButton.d.ts +7 -4
  88. package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
  89. package/dist/commonjs/button/lib/DeleteButton.d.ts +2 -1
  90. package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
  91. package/dist/commonjs/button/lib/PrimaryButton.d.ts +2 -1
  92. package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
  93. package/dist/commonjs/button/lib/SecondaryButton.d.ts +2 -1
  94. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  95. package/dist/commonjs/button/lib/TertiaryButton.d.ts +11 -1
  96. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  97. package/dist/commonjs/button/lib/TertiaryButton.js +9 -8
  98. package/dist/commonjs/card/lib/Card.d.ts +1 -1
  99. package/dist/commonjs/card/lib/CardBody.d.ts +1 -1
  100. package/dist/commonjs/card/lib/CardBody.d.ts.map +1 -1
  101. package/dist/commonjs/card/lib/CardBody.js +1 -6
  102. package/dist/commonjs/card/lib/CardHeading.d.ts.map +1 -1
  103. package/dist/commonjs/card/lib/CardHeading.js +2 -10
  104. package/dist/commonjs/checkbox/index.d.ts.map +1 -1
  105. package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
  106. package/dist/commonjs/checkbox/lib/Checkbox.js +2 -13
  107. package/dist/commonjs/collection/lib/ListBox.d.ts +0 -57
  108. package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
  109. package/dist/commonjs/color-picker/index.d.ts.map +1 -1
  110. package/dist/commonjs/color-picker/lib/ColorInput.d.ts.map +1 -1
  111. package/dist/commonjs/color-picker/lib/ColorInput.js +1 -2
  112. package/dist/commonjs/common/index.d.ts +1 -0
  113. package/dist/commonjs/common/index.d.ts.map +1 -1
  114. package/dist/commonjs/common/index.js +1 -0
  115. package/dist/commonjs/common/lib/InputProvider.d.ts.map +1 -1
  116. package/dist/commonjs/common/lib/InputProvider.js +0 -7
  117. package/dist/commonjs/common/lib/responsive/useResponsiveContainerStyles.d.ts +78 -0
  118. package/dist/commonjs/common/lib/responsive/useResponsiveContainerStyles.d.ts.map +1 -0
  119. package/dist/commonjs/common/lib/responsive/useResponsiveContainerStyles.js +139 -0
  120. package/dist/commonjs/common/lib/theming/index.d.ts +1 -1
  121. package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
  122. package/dist/commonjs/common/lib/theming/styled.d.ts +2 -0
  123. package/dist/commonjs/common/lib/theming/styled.d.ts.map +1 -1
  124. package/dist/commonjs/common/lib/theming/styled.js +1 -2
  125. package/dist/commonjs/common/lib/utils/components.d.ts +30 -18
  126. package/dist/commonjs/common/lib/utils/components.d.ts.map +1 -1
  127. package/dist/commonjs/common/lib/utils/components.js +10 -5
  128. package/dist/commonjs/common/lib/utils/elements.d.ts +1 -1
  129. package/dist/commonjs/common/lib/utils/elements.d.ts.map +1 -1
  130. package/dist/commonjs/common/lib/utils/elements.js +5 -11
  131. package/dist/commonjs/common/lib/utils/index.d.ts +0 -1
  132. package/dist/commonjs/common/lib/utils/index.d.ts.map +1 -1
  133. package/dist/commonjs/common/lib/utils/index.js +0 -1
  134. package/dist/commonjs/common/lib/utils/isWithinBreakpoint.d.ts +5 -0
  135. package/dist/commonjs/common/lib/utils/isWithinBreakpoint.d.ts.map +1 -0
  136. package/dist/commonjs/common/lib/utils/isWithinBreakpoint.js +10 -0
  137. package/dist/commonjs/common/lib/utils/models.d.ts +10 -2
  138. package/dist/commonjs/common/lib/utils/models.d.ts.map +1 -1
  139. package/dist/commonjs/common/lib/utils/models.js +3 -0
  140. package/dist/commonjs/common/lib/utils/useModalityType.js +13 -13
  141. package/dist/commonjs/dialog/lib/Dialog.d.ts +1 -1
  142. package/dist/commonjs/form-field/index.d.ts.map +1 -1
  143. package/dist/commonjs/form-field/lib/Hint.d.ts.map +1 -1
  144. package/dist/commonjs/form-field/lib/Hint.js +5 -13
  145. package/dist/commonjs/form-field/lib/Label.d.ts.map +1 -1
  146. package/dist/commonjs/form-field/lib/Label.js +0 -2
  147. package/dist/commonjs/icon/lib/SystemIcon.d.ts +1 -1
  148. package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
  149. package/dist/commonjs/index.d.ts +4 -1
  150. package/dist/commonjs/index.d.ts.map +1 -1
  151. package/dist/commonjs/index.js +4 -1
  152. package/dist/commonjs/layout/index.d.ts +15 -5
  153. package/dist/commonjs/layout/index.d.ts.map +1 -1
  154. package/dist/commonjs/layout/index.js +14 -3
  155. package/dist/commonjs/layout/lib/Box.d.ts +23 -11
  156. package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
  157. package/dist/commonjs/layout/lib/Box.js +34 -8
  158. package/dist/commonjs/layout/lib/Column.d.ts +13 -4
  159. package/dist/commonjs/layout/lib/Column.d.ts.map +1 -1
  160. package/dist/commonjs/layout/lib/Column.js +10 -7
  161. package/dist/commonjs/layout/lib/Flex.d.ts +6 -3
  162. package/dist/commonjs/layout/lib/Flex.d.ts.map +1 -1
  163. package/dist/commonjs/layout/lib/Flex.js +5 -1
  164. package/dist/commonjs/layout/lib/Grid.d.ts +51 -0
  165. package/dist/commonjs/layout/lib/Grid.d.ts.map +1 -0
  166. package/dist/commonjs/layout/lib/Grid.js +115 -0
  167. package/dist/commonjs/layout/lib/Layout.d.ts +26 -9
  168. package/dist/commonjs/layout/lib/Layout.d.ts.map +1 -1
  169. package/dist/commonjs/layout/lib/Layout.js +21 -10
  170. package/dist/commonjs/layout/lib/Stack.d.ts +4 -4
  171. package/dist/commonjs/layout/lib/Stack.js +4 -4
  172. package/dist/commonjs/layout/lib/utils/background.d.ts +44 -0
  173. package/dist/commonjs/layout/lib/utils/background.d.ts.map +1 -0
  174. package/dist/commonjs/layout/lib/utils/background.js +57 -0
  175. package/dist/commonjs/layout/lib/utils/border/color.d.ts +47 -0
  176. package/dist/commonjs/layout/lib/utils/border/color.d.ts.map +1 -0
  177. package/dist/commonjs/layout/lib/utils/border/color.js +42 -0
  178. package/dist/commonjs/layout/lib/utils/border/index.d.ts +26 -0
  179. package/dist/commonjs/layout/lib/utils/border/index.d.ts.map +1 -0
  180. package/dist/commonjs/layout/lib/utils/border/index.js +46 -0
  181. package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts +38 -0
  182. package/dist/commonjs/layout/lib/utils/border/lineStyle.d.ts.map +1 -0
  183. package/dist/commonjs/layout/lib/utils/border/lineStyle.js +52 -0
  184. package/dist/commonjs/layout/lib/utils/border/radius.d.ts +33 -0
  185. package/dist/commonjs/layout/lib/utils/border/radius.d.ts.map +1 -0
  186. package/dist/commonjs/layout/lib/utils/border/radius.js +32 -0
  187. package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts +34 -0
  188. package/dist/commonjs/layout/lib/utils/border/shorthand.d.ts.map +1 -0
  189. package/dist/commonjs/layout/lib/utils/border/shorthand.js +42 -0
  190. package/dist/commonjs/layout/lib/utils/border/width.d.ts +34 -0
  191. package/dist/commonjs/layout/lib/utils/border/width.d.ts.map +1 -0
  192. package/dist/commonjs/layout/lib/utils/border/width.js +42 -0
  193. package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts +12 -0
  194. package/dist/commonjs/layout/lib/utils/buildStyleFns.d.ts.map +1 -0
  195. package/dist/commonjs/layout/lib/utils/buildStyleFns.js +90 -0
  196. package/dist/commonjs/layout/lib/utils/color.d.ts +23 -16
  197. package/dist/commonjs/layout/lib/utils/color.d.ts.map +1 -1
  198. package/dist/commonjs/layout/lib/utils/color.js +25 -48
  199. package/dist/commonjs/layout/lib/utils/depth.d.ts +17 -11
  200. package/dist/commonjs/layout/lib/utils/depth.d.ts.map +1 -1
  201. package/dist/commonjs/layout/lib/utils/depth.js +20 -20
  202. package/dist/commonjs/layout/lib/utils/flex.d.ts +33 -14
  203. package/dist/commonjs/layout/lib/utils/flex.d.ts.map +1 -1
  204. package/dist/commonjs/layout/lib/utils/flex.js +58 -25
  205. package/dist/commonjs/layout/lib/utils/flexItem.d.ts +18 -15
  206. package/dist/commonjs/layout/lib/utils/flexItem.d.ts.map +1 -1
  207. package/dist/commonjs/layout/lib/utils/flexItem.js +43 -26
  208. package/dist/commonjs/layout/lib/utils/grid.d.ts +72 -0
  209. package/dist/commonjs/layout/lib/utils/grid.d.ts.map +1 -0
  210. package/dist/commonjs/layout/lib/utils/grid.js +112 -0
  211. package/dist/commonjs/layout/lib/utils/gridItem.d.ts +42 -0
  212. package/dist/commonjs/layout/lib/utils/gridItem.d.ts.map +1 -0
  213. package/dist/commonjs/layout/lib/utils/gridItem.js +71 -0
  214. package/dist/commonjs/layout/lib/utils/layout.d.ts +47 -25
  215. package/dist/commonjs/layout/lib/utils/layout.d.ts.map +1 -1
  216. package/dist/commonjs/layout/lib/utils/layout.js +71 -33
  217. package/dist/commonjs/layout/lib/utils/other.d.ts +46 -2
  218. package/dist/commonjs/layout/lib/utils/other.d.ts.map +1 -1
  219. package/dist/commonjs/layout/lib/utils/other.js +101 -17
  220. package/dist/commonjs/layout/lib/utils/position.d.ts +37 -20
  221. package/dist/commonjs/layout/lib/utils/position.d.ts.map +1 -1
  222. package/dist/commonjs/layout/lib/utils/position.js +49 -66
  223. package/dist/commonjs/layout/lib/utils/space.d.ts +107 -51
  224. package/dist/commonjs/layout/lib/utils/space.d.ts.map +1 -1
  225. package/dist/commonjs/layout/lib/utils/space.js +98 -148
  226. package/dist/commonjs/layout/lib/utils/stack.d.ts +3 -6
  227. package/dist/commonjs/layout/lib/utils/stack.d.ts.map +1 -1
  228. package/dist/commonjs/layout/lib/utils/stack.js +13 -39
  229. package/dist/commonjs/layout/lib/utils/styleProps.d.ts +41 -0
  230. package/dist/commonjs/layout/lib/utils/styleProps.d.ts.map +1 -0
  231. package/dist/commonjs/layout/lib/utils/styleProps.js +2 -0
  232. package/dist/commonjs/layout/lib/utils/systemProps.d.ts +31 -0
  233. package/dist/commonjs/layout/lib/utils/systemProps.d.ts.map +1 -0
  234. package/dist/commonjs/layout/lib/utils/systemProps.js +2 -0
  235. package/dist/commonjs/layout/lib/utils/text.d.ts +53 -0
  236. package/dist/commonjs/layout/lib/utils/text.d.ts.map +1 -0
  237. package/dist/commonjs/layout/lib/utils/text.js +84 -0
  238. package/dist/commonjs/loading-dots/index.d.ts +2 -0
  239. package/dist/commonjs/loading-dots/index.d.ts.map +1 -0
  240. package/dist/commonjs/loading-dots/index.js +13 -0
  241. package/dist/commonjs/{loading-animation → loading-dots}/lib/LoadingDots.d.ts +0 -0
  242. package/dist/commonjs/loading-dots/lib/LoadingDots.d.ts.map +1 -0
  243. package/dist/commonjs/{loading-animation → loading-dots}/lib/LoadingDots.js +0 -0
  244. package/dist/commonjs/menu/lib/MenuCard.d.ts.map +1 -1
  245. package/dist/commonjs/menu/lib/MenuCard.js +1 -1
  246. package/dist/commonjs/menu/lib/MenuContextTarget.d.ts.map +1 -1
  247. package/dist/commonjs/menu/lib/MenuContextTarget.js +2 -4
  248. package/dist/commonjs/menu/lib/MenuItem.js +13 -12
  249. package/dist/commonjs/menu/lib/MenuTarget.d.ts.map +1 -1
  250. package/dist/commonjs/menu/lib/MenuTarget.js +2 -4
  251. package/dist/commonjs/modal/lib/Modal.d.ts +1 -1
  252. package/dist/commonjs/modal/lib/ModalCard.d.ts.map +1 -1
  253. package/dist/commonjs/modal/lib/ModalCard.js +15 -1
  254. package/dist/commonjs/modal/lib/ModalHeading.d.ts.map +1 -1
  255. package/dist/commonjs/modal/lib/ModalHeading.js +11 -1
  256. package/dist/commonjs/modal/lib/ModalOverlay.d.ts.map +1 -1
  257. package/dist/commonjs/modal/lib/ModalOverlay.js +21 -16
  258. package/dist/commonjs/modal/lib/hooks/useCloseOnOverlayClick.d.ts.map +1 -1
  259. package/dist/commonjs/modal/lib/hooks/useCloseOnOverlayClick.js +3 -1
  260. package/dist/commonjs/modal/lib/hooks/useModalModel.js +1 -1
  261. package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
  262. package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +5 -4
  263. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
  264. package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +2 -4
  265. package/dist/commonjs/pagination/lib/Pagination/usePaginationModel.d.ts.map +1 -1
  266. package/dist/commonjs/pagination/lib/Pagination/usePaginationModel.js +5 -1
  267. package/dist/commonjs/popup/lib/Popup.d.ts +1 -1
  268. package/dist/commonjs/popup/lib/PopupBody.d.ts +1 -1
  269. package/dist/commonjs/popup/lib/PopupBody.js +1 -1
  270. package/dist/commonjs/popup/lib/PopupCard.d.ts +3 -2
  271. package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
  272. package/dist/commonjs/popup/lib/PopupCard.js +20 -13
  273. package/dist/commonjs/popup/lib/PopupCloseButton.d.ts.map +1 -1
  274. package/dist/commonjs/popup/lib/PopupCloseButton.js +1 -1
  275. package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
  276. package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
  277. package/dist/commonjs/popup/lib/PopupPopper.d.ts +2 -3
  278. package/dist/commonjs/popup/lib/PopupPopper.d.ts.map +1 -1
  279. package/dist/commonjs/popup/lib/hooks/index.d.ts +1 -0
  280. package/dist/commonjs/popup/lib/hooks/index.d.ts.map +1 -1
  281. package/dist/commonjs/popup/lib/hooks/index.js +1 -0
  282. package/dist/commonjs/popup/lib/hooks/useCloseOnTargetHidden.d.ts +31 -0
  283. package/dist/commonjs/popup/lib/hooks/useCloseOnTargetHidden.d.ts.map +1 -0
  284. package/dist/commonjs/popup/lib/hooks/useCloseOnTargetHidden.js +56 -0
  285. package/dist/commonjs/popup/lib/hooks/useReturnFocus.d.ts.map +1 -1
  286. package/dist/commonjs/popup/lib/hooks/useReturnFocus.js +97 -3
  287. package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
  288. package/dist/commonjs/radio/lib/Radio.js +2 -13
  289. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +3 -1
  290. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
  291. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +11 -2
  292. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  293. package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
  294. package/dist/commonjs/tabs/lib/Tabs.d.ts +1149 -1
  295. package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
  296. package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
  297. package/dist/commonjs/tabs/lib/useTabsModel.d.ts +2773 -469
  298. package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
  299. package/dist/commonjs/testing/index.d.ts +5 -0
  300. package/dist/commonjs/testing/index.d.ts.map +1 -0
  301. package/dist/commonjs/testing/index.js +16 -0
  302. package/dist/commonjs/testing/lib/ComponentStatesTable.d.ts +26 -0
  303. package/dist/commonjs/testing/lib/ComponentStatesTable.d.ts.map +1 -0
  304. package/dist/commonjs/testing/lib/ComponentStatesTable.js +48 -0
  305. package/dist/commonjs/testing/lib/StaticStates.d.ts +7 -0
  306. package/dist/commonjs/testing/lib/StaticStates.d.ts.map +1 -0
  307. package/dist/commonjs/{common/lib/utils → testing/lib}/StaticStates.js +1 -1
  308. package/dist/commonjs/testing/lib/permutateProps.d.ts +5 -0
  309. package/dist/commonjs/testing/lib/permutateProps.d.ts.map +1 -0
  310. package/dist/commonjs/testing/lib/permutateProps.js +47 -0
  311. package/dist/commonjs/testing/lib/propTypes.d.ts +15 -0
  312. package/dist/commonjs/testing/lib/propTypes.d.ts.map +1 -0
  313. package/dist/commonjs/testing/lib/propTypes.js +2 -0
  314. package/dist/commonjs/text/index.d.ts +4 -0
  315. package/dist/commonjs/text/index.d.ts.map +1 -0
  316. package/dist/commonjs/text/index.js +15 -0
  317. package/dist/commonjs/text/lib/LabelText.d.ts +30 -0
  318. package/dist/commonjs/text/lib/LabelText.d.ts.map +1 -0
  319. package/dist/commonjs/text/lib/LabelText.js +73 -0
  320. package/dist/commonjs/text/lib/Text.d.ts +58 -0
  321. package/dist/commonjs/text/lib/Text.d.ts.map +1 -0
  322. package/dist/commonjs/text/lib/Text.js +123 -0
  323. package/dist/commonjs/text/lib/TypeLevelComponents.d.ts +132 -0
  324. package/dist/commonjs/text/lib/TypeLevelComponents.d.ts.map +1 -0
  325. package/dist/commonjs/text/lib/TypeLevelComponents.js +195 -0
  326. package/dist/commonjs/text-input/index.d.ts.map +1 -1
  327. package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
  328. package/dist/commonjs/toast/lib/Toast.js +1 -2
  329. package/dist/commonjs/tokens/lib/colors.types.d.ts +4 -6
  330. package/dist/commonjs/tokens/lib/colors.types.d.ts.map +1 -1
  331. package/dist/commonjs/tooltip/lib/OverflowTooltip.d.ts.map +1 -1
  332. package/dist/commonjs/tooltip/lib/OverflowTooltip.js +1 -4
  333. package/dist/commonjs/tooltip/lib/TooltipContainer.d.ts.map +1 -1
  334. package/dist/commonjs/tooltip/lib/TooltipContainer.js +5 -0
  335. package/dist/commonjs/tooltip/lib/useTooltip.d.ts.map +1 -1
  336. package/dist/commonjs/tooltip/lib/useTooltip.js +1 -0
  337. package/dist/es6/action-bar/lib/ActionBar.d.ts +1 -1
  338. package/dist/es6/action-bar/lib/ActionBarItem.d.ts +8 -0
  339. package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
  340. package/dist/es6/action-bar/lib/ActionBarItem.js +2 -2
  341. package/dist/es6/action-bar/lib/ActionBarList.d.ts +92 -0
  342. package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
  343. package/dist/es6/action-bar/lib/ActionBarList.js +4 -4
  344. package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +5 -1
  345. package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
  346. package/dist/es6/action-bar/lib/ActionBarOverflowButton.js +3 -3
  347. package/dist/es6/banner/lib/Banner.d.ts +0 -9
  348. package/dist/es6/banner/lib/Banner.d.ts.map +1 -1
  349. package/dist/es6/banner/lib/Banner.js +2 -4
  350. package/dist/es6/breadcrumbs/index.d.ts +3 -0
  351. package/dist/es6/breadcrumbs/index.d.ts.map +1 -0
  352. package/dist/es6/breadcrumbs/index.js +2 -0
  353. package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +3851 -0
  354. package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -0
  355. package/dist/es6/breadcrumbs/lib/Breadcrumbs.js +155 -0
  356. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +212 -0
  357. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -0
  358. package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.js +57 -0
  359. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +226 -0
  360. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -0
  361. package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +54 -0
  362. package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.d.ts +17 -0
  363. package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.d.ts.map +1 -0
  364. package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.js +40 -0
  365. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts +164 -0
  366. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -0
  367. package/dist/es6/breadcrumbs/lib/BreadcrumbsList.js +41 -0
  368. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +1717 -0
  369. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -0
  370. package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.js +36 -0
  371. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +241 -0
  372. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -0
  373. package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.js +46 -0
  374. package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +1661 -0
  375. package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -0
  376. package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.js +61 -0
  377. package/dist/es6/breadcrumbs/lib/hooks/utils/index.d.ts +6 -0
  378. package/dist/es6/breadcrumbs/lib/hooks/utils/index.d.ts.map +1 -0
  379. package/dist/es6/breadcrumbs/lib/hooks/utils/index.js +18 -0
  380. package/dist/es6/button/index.d.ts +1 -1
  381. package/dist/es6/button/index.d.ts.map +1 -1
  382. package/dist/es6/button/index.js +1 -1
  383. package/dist/es6/button/lib/BaseButton.d.ts +7 -4
  384. package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
  385. package/dist/es6/button/lib/DeleteButton.d.ts +2 -1
  386. package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
  387. package/dist/es6/button/lib/PrimaryButton.d.ts +2 -1
  388. package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
  389. package/dist/es6/button/lib/SecondaryButton.d.ts +2 -1
  390. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  391. package/dist/es6/button/lib/TertiaryButton.d.ts +11 -1
  392. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  393. package/dist/es6/button/lib/TertiaryButton.js +9 -8
  394. package/dist/es6/card/lib/Card.d.ts +1 -1
  395. package/dist/es6/card/lib/CardBody.d.ts +1 -1
  396. package/dist/es6/card/lib/CardBody.d.ts.map +1 -1
  397. package/dist/es6/card/lib/CardBody.js +1 -3
  398. package/dist/es6/card/lib/CardHeading.d.ts.map +1 -1
  399. package/dist/es6/card/lib/CardHeading.js +2 -7
  400. package/dist/es6/checkbox/index.d.ts.map +1 -1
  401. package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
  402. package/dist/es6/checkbox/lib/Checkbox.js +3 -14
  403. package/dist/es6/collection/lib/ListBox.d.ts +0 -57
  404. package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
  405. package/dist/es6/color-picker/index.d.ts.map +1 -1
  406. package/dist/es6/color-picker/lib/ColorInput.d.ts.map +1 -1
  407. package/dist/es6/color-picker/lib/ColorInput.js +1 -2
  408. package/dist/es6/common/index.d.ts +1 -0
  409. package/dist/es6/common/index.d.ts.map +1 -1
  410. package/dist/es6/common/index.js +1 -0
  411. package/dist/es6/common/lib/InputProvider.d.ts.map +1 -1
  412. package/dist/es6/common/lib/InputProvider.js +0 -4
  413. package/dist/es6/common/lib/responsive/useResponsiveContainerStyles.d.ts +78 -0
  414. package/dist/es6/common/lib/responsive/useResponsiveContainerStyles.d.ts.map +1 -0
  415. package/dist/es6/common/lib/responsive/useResponsiveContainerStyles.js +135 -0
  416. package/dist/es6/common/lib/theming/index.d.ts +1 -1
  417. package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
  418. package/dist/es6/common/lib/theming/styled.d.ts +2 -0
  419. package/dist/es6/common/lib/theming/styled.d.ts.map +1 -1
  420. package/dist/es6/common/lib/theming/styled.js +1 -2
  421. package/dist/es6/common/lib/utils/components.d.ts +30 -18
  422. package/dist/es6/common/lib/utils/components.d.ts.map +1 -1
  423. package/dist/es6/common/lib/utils/components.js +10 -5
  424. package/dist/es6/common/lib/utils/elements.d.ts +1 -1
  425. package/dist/es6/common/lib/utils/elements.d.ts.map +1 -1
  426. package/dist/es6/common/lib/utils/elements.js +5 -11
  427. package/dist/es6/common/lib/utils/index.d.ts +0 -1
  428. package/dist/es6/common/lib/utils/index.d.ts.map +1 -1
  429. package/dist/es6/common/lib/utils/index.js +0 -1
  430. package/dist/es6/common/lib/utils/isWithinBreakpoint.d.ts +5 -0
  431. package/dist/es6/common/lib/utils/isWithinBreakpoint.d.ts.map +1 -0
  432. package/dist/es6/common/lib/utils/isWithinBreakpoint.js +6 -0
  433. package/dist/es6/common/lib/utils/models.d.ts +10 -2
  434. package/dist/es6/common/lib/utils/models.d.ts.map +1 -1
  435. package/dist/es6/common/lib/utils/models.js +3 -0
  436. package/dist/es6/common/lib/utils/useModalityType.js +13 -13
  437. package/dist/es6/dialog/lib/Dialog.d.ts +1 -1
  438. package/dist/es6/form-field/index.d.ts.map +1 -1
  439. package/dist/es6/form-field/lib/Hint.d.ts.map +1 -1
  440. package/dist/es6/form-field/lib/Hint.js +6 -14
  441. package/dist/es6/form-field/lib/Label.d.ts.map +1 -1
  442. package/dist/es6/form-field/lib/Label.js +0 -2
  443. package/dist/es6/icon/lib/SystemIcon.d.ts +1 -1
  444. package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
  445. package/dist/es6/index.d.ts +4 -1
  446. package/dist/es6/index.d.ts.map +1 -1
  447. package/dist/es6/index.js +4 -1
  448. package/dist/es6/layout/index.d.ts +15 -5
  449. package/dist/es6/layout/index.d.ts.map +1 -1
  450. package/dist/es6/layout/index.js +12 -3
  451. package/dist/es6/layout/lib/Box.d.ts +23 -11
  452. package/dist/es6/layout/lib/Box.d.ts.map +1 -1
  453. package/dist/es6/layout/lib/Box.js +34 -8
  454. package/dist/es6/layout/lib/Column.d.ts +13 -4
  455. package/dist/es6/layout/lib/Column.d.ts.map +1 -1
  456. package/dist/es6/layout/lib/Column.js +9 -6
  457. package/dist/es6/layout/lib/Flex.d.ts +6 -3
  458. package/dist/es6/layout/lib/Flex.d.ts.map +1 -1
  459. package/dist/es6/layout/lib/Flex.js +5 -1
  460. package/dist/es6/layout/lib/Grid.d.ts +51 -0
  461. package/dist/es6/layout/lib/Grid.d.ts.map +1 -0
  462. package/dist/es6/layout/lib/Grid.js +90 -0
  463. package/dist/es6/layout/lib/Layout.d.ts +26 -9
  464. package/dist/es6/layout/lib/Layout.d.ts.map +1 -1
  465. package/dist/es6/layout/lib/Layout.js +21 -10
  466. package/dist/es6/layout/lib/Stack.d.ts +4 -4
  467. package/dist/es6/layout/lib/Stack.js +4 -4
  468. package/dist/es6/layout/lib/utils/background.d.ts +44 -0
  469. package/dist/es6/layout/lib/utils/background.d.ts.map +1 -0
  470. package/dist/es6/layout/lib/utils/background.js +54 -0
  471. package/dist/es6/layout/lib/utils/border/color.d.ts +47 -0
  472. package/dist/es6/layout/lib/utils/border/color.d.ts.map +1 -0
  473. package/dist/es6/layout/lib/utils/border/color.js +39 -0
  474. package/dist/es6/layout/lib/utils/border/index.d.ts +26 -0
  475. package/dist/es6/layout/lib/utils/border/index.d.ts.map +1 -0
  476. package/dist/es6/layout/lib/utils/border/index.js +43 -0
  477. package/dist/es6/layout/lib/utils/border/lineStyle.d.ts +38 -0
  478. package/dist/es6/layout/lib/utils/border/lineStyle.d.ts.map +1 -0
  479. package/dist/es6/layout/lib/utils/border/lineStyle.js +49 -0
  480. package/dist/es6/layout/lib/utils/border/radius.d.ts +33 -0
  481. package/dist/es6/layout/lib/utils/border/radius.d.ts.map +1 -0
  482. package/dist/es6/layout/lib/utils/border/radius.js +29 -0
  483. package/dist/es6/layout/lib/utils/border/shorthand.d.ts +34 -0
  484. package/dist/es6/layout/lib/utils/border/shorthand.d.ts.map +1 -0
  485. package/dist/es6/layout/lib/utils/border/shorthand.js +39 -0
  486. package/dist/es6/layout/lib/utils/border/width.d.ts +34 -0
  487. package/dist/es6/layout/lib/utils/border/width.d.ts.map +1 -0
  488. package/dist/es6/layout/lib/utils/border/width.js +39 -0
  489. package/dist/es6/layout/lib/utils/buildStyleFns.d.ts +12 -0
  490. package/dist/es6/layout/lib/utils/buildStyleFns.d.ts.map +1 -0
  491. package/dist/es6/layout/lib/utils/buildStyleFns.js +85 -0
  492. package/dist/es6/layout/lib/utils/color.d.ts +23 -16
  493. package/dist/es6/layout/lib/utils/color.d.ts.map +1 -1
  494. package/dist/es6/layout/lib/utils/color.js +24 -46
  495. package/dist/es6/layout/lib/utils/depth.d.ts +17 -11
  496. package/dist/es6/layout/lib/utils/depth.d.ts.map +1 -1
  497. package/dist/es6/layout/lib/utils/depth.js +19 -18
  498. package/dist/es6/layout/lib/utils/flex.d.ts +33 -14
  499. package/dist/es6/layout/lib/utils/flex.d.ts.map +1 -1
  500. package/dist/es6/layout/lib/utils/flex.js +57 -23
  501. package/dist/es6/layout/lib/utils/flexItem.d.ts +18 -15
  502. package/dist/es6/layout/lib/utils/flexItem.d.ts.map +1 -1
  503. package/dist/es6/layout/lib/utils/flexItem.js +42 -24
  504. package/dist/es6/layout/lib/utils/grid.d.ts +72 -0
  505. package/dist/es6/layout/lib/utils/grid.d.ts.map +1 -0
  506. package/dist/es6/layout/lib/utils/grid.js +109 -0
  507. package/dist/es6/layout/lib/utils/gridItem.d.ts +42 -0
  508. package/dist/es6/layout/lib/utils/gridItem.d.ts.map +1 -0
  509. package/dist/es6/layout/lib/utils/gridItem.js +68 -0
  510. package/dist/es6/layout/lib/utils/layout.d.ts +47 -25
  511. package/dist/es6/layout/lib/utils/layout.d.ts.map +1 -1
  512. package/dist/es6/layout/lib/utils/layout.js +70 -31
  513. package/dist/es6/layout/lib/utils/other.d.ts +46 -2
  514. package/dist/es6/layout/lib/utils/other.d.ts.map +1 -1
  515. package/dist/es6/layout/lib/utils/other.js +100 -15
  516. package/dist/es6/layout/lib/utils/position.d.ts +37 -20
  517. package/dist/es6/layout/lib/utils/position.d.ts.map +1 -1
  518. package/dist/es6/layout/lib/utils/position.js +48 -64
  519. package/dist/es6/layout/lib/utils/space.d.ts +107 -51
  520. package/dist/es6/layout/lib/utils/space.d.ts.map +1 -1
  521. package/dist/es6/layout/lib/utils/space.js +97 -146
  522. package/dist/es6/layout/lib/utils/stack.d.ts +3 -6
  523. package/dist/es6/layout/lib/utils/stack.d.ts.map +1 -1
  524. package/dist/es6/layout/lib/utils/stack.js +13 -39
  525. package/dist/es6/layout/lib/utils/styleProps.d.ts +41 -0
  526. package/dist/es6/layout/lib/utils/styleProps.d.ts.map +1 -0
  527. package/dist/es6/layout/lib/utils/styleProps.js +1 -0
  528. package/dist/es6/layout/lib/utils/systemProps.d.ts +31 -0
  529. package/dist/es6/layout/lib/utils/systemProps.d.ts.map +1 -0
  530. package/dist/es6/layout/lib/utils/systemProps.js +1 -0
  531. package/dist/es6/layout/lib/utils/text.d.ts +53 -0
  532. package/dist/es6/layout/lib/utils/text.d.ts.map +1 -0
  533. package/dist/es6/layout/lib/utils/text.js +81 -0
  534. package/dist/es6/loading-dots/index.d.ts +2 -0
  535. package/dist/es6/loading-dots/index.d.ts.map +1 -0
  536. package/dist/es6/loading-dots/index.js +1 -0
  537. package/dist/es6/{loading-animation → loading-dots}/lib/LoadingDots.d.ts +0 -0
  538. package/dist/es6/loading-dots/lib/LoadingDots.d.ts.map +1 -0
  539. package/dist/es6/{loading-animation → loading-dots}/lib/LoadingDots.js +0 -0
  540. package/dist/es6/menu/lib/MenuCard.d.ts.map +1 -1
  541. package/dist/es6/menu/lib/MenuCard.js +1 -1
  542. package/dist/es6/menu/lib/MenuContextTarget.d.ts.map +1 -1
  543. package/dist/es6/menu/lib/MenuContextTarget.js +2 -4
  544. package/dist/es6/menu/lib/MenuItem.js +13 -12
  545. package/dist/es6/menu/lib/MenuTarget.d.ts.map +1 -1
  546. package/dist/es6/menu/lib/MenuTarget.js +2 -4
  547. package/dist/es6/modal/lib/Modal.d.ts +1 -1
  548. package/dist/es6/modal/lib/ModalCard.d.ts.map +1 -1
  549. package/dist/es6/modal/lib/ModalCard.js +16 -2
  550. package/dist/es6/modal/lib/ModalHeading.d.ts.map +1 -1
  551. package/dist/es6/modal/lib/ModalHeading.js +12 -2
  552. package/dist/es6/modal/lib/ModalOverlay.d.ts.map +1 -1
  553. package/dist/es6/modal/lib/ModalOverlay.js +21 -16
  554. package/dist/es6/modal/lib/hooks/useCloseOnOverlayClick.d.ts.map +1 -1
  555. package/dist/es6/modal/lib/hooks/useCloseOnOverlayClick.js +4 -2
  556. package/dist/es6/modal/lib/hooks/useModalModel.js +1 -1
  557. package/dist/es6/pagination/lib/Pagination/AdditionalDetails.d.ts.map +1 -1
  558. package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +6 -5
  559. package/dist/es6/pagination/lib/Pagination/GoTo/Label.d.ts.map +1 -1
  560. package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +2 -4
  561. package/dist/es6/pagination/lib/Pagination/usePaginationModel.d.ts.map +1 -1
  562. package/dist/es6/pagination/lib/Pagination/usePaginationModel.js +5 -1
  563. package/dist/es6/popup/lib/Popup.d.ts +1 -1
  564. package/dist/es6/popup/lib/PopupBody.d.ts +1 -1
  565. package/dist/es6/popup/lib/PopupBody.js +1 -1
  566. package/dist/es6/popup/lib/PopupCard.d.ts +3 -2
  567. package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
  568. package/dist/es6/popup/lib/PopupCard.js +21 -14
  569. package/dist/es6/popup/lib/PopupCloseButton.d.ts.map +1 -1
  570. package/dist/es6/popup/lib/PopupCloseButton.js +1 -1
  571. package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
  572. package/dist/es6/popup/lib/PopupHeading.js +1 -1
  573. package/dist/es6/popup/lib/PopupPopper.d.ts +2 -3
  574. package/dist/es6/popup/lib/PopupPopper.d.ts.map +1 -1
  575. package/dist/es6/popup/lib/hooks/index.d.ts +1 -0
  576. package/dist/es6/popup/lib/hooks/index.d.ts.map +1 -1
  577. package/dist/es6/popup/lib/hooks/index.js +1 -0
  578. package/dist/es6/popup/lib/hooks/useCloseOnTargetHidden.d.ts +31 -0
  579. package/dist/es6/popup/lib/hooks/useCloseOnTargetHidden.d.ts.map +1 -0
  580. package/dist/es6/popup/lib/hooks/useCloseOnTargetHidden.js +50 -0
  581. package/dist/es6/popup/lib/hooks/useReturnFocus.d.ts.map +1 -1
  582. package/dist/es6/popup/lib/hooks/useReturnFocus.js +98 -4
  583. package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
  584. package/dist/es6/radio/lib/Radio.js +3 -14
  585. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +3 -1
  586. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -1
  587. package/dist/es6/segmented-control/lib/SegmentedControlButton.js +12 -3
  588. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  589. package/dist/es6/side-panel/lib/SidePanel.js +3 -3
  590. package/dist/es6/tabs/lib/Tabs.d.ts +1149 -1
  591. package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
  592. package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
  593. package/dist/es6/tabs/lib/useTabsModel.d.ts +2773 -469
  594. package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
  595. package/dist/es6/testing/index.d.ts +5 -0
  596. package/dist/es6/testing/index.d.ts.map +1 -0
  597. package/dist/es6/testing/index.js +4 -0
  598. package/dist/es6/testing/lib/ComponentStatesTable.d.ts +26 -0
  599. package/dist/es6/testing/lib/ComponentStatesTable.d.ts.map +1 -0
  600. package/dist/es6/testing/lib/ComponentStatesTable.js +41 -0
  601. package/dist/es6/testing/lib/StaticStates.d.ts +7 -0
  602. package/dist/es6/testing/lib/StaticStates.d.ts.map +1 -0
  603. package/dist/es6/{common/lib/utils → testing/lib}/StaticStates.js +1 -1
  604. package/dist/es6/testing/lib/permutateProps.d.ts +5 -0
  605. package/dist/es6/testing/lib/permutateProps.d.ts.map +1 -0
  606. package/dist/es6/testing/lib/permutateProps.js +43 -0
  607. package/dist/es6/testing/lib/propTypes.d.ts +15 -0
  608. package/dist/es6/testing/lib/propTypes.d.ts.map +1 -0
  609. package/dist/es6/testing/lib/propTypes.js +1 -0
  610. package/dist/es6/text/index.d.ts +4 -0
  611. package/dist/es6/text/index.d.ts.map +1 -0
  612. package/dist/es6/text/index.js +3 -0
  613. package/dist/es6/text/lib/LabelText.d.ts +30 -0
  614. package/dist/es6/text/lib/LabelText.d.ts.map +1 -0
  615. package/dist/es6/text/lib/LabelText.js +51 -0
  616. package/dist/es6/text/lib/Text.d.ts +58 -0
  617. package/dist/es6/text/lib/Text.d.ts.map +1 -0
  618. package/dist/es6/text/lib/Text.js +101 -0
  619. package/dist/es6/text/lib/TypeLevelComponents.d.ts +132 -0
  620. package/dist/es6/text/lib/TypeLevelComponents.d.ts.map +1 -0
  621. package/dist/es6/text/lib/TypeLevelComponents.js +173 -0
  622. package/dist/es6/text-input/index.d.ts.map +1 -1
  623. package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
  624. package/dist/es6/toast/lib/Toast.js +1 -2
  625. package/dist/es6/tokens/lib/colors.types.d.ts +4 -6
  626. package/dist/es6/tokens/lib/colors.types.d.ts.map +1 -1
  627. package/dist/es6/tooltip/lib/OverflowTooltip.d.ts.map +1 -1
  628. package/dist/es6/tooltip/lib/OverflowTooltip.js +1 -4
  629. package/dist/es6/tooltip/lib/TooltipContainer.d.ts.map +1 -1
  630. package/dist/es6/tooltip/lib/TooltipContainer.js +5 -0
  631. package/dist/es6/tooltip/lib/useTooltip.d.ts.map +1 -1
  632. package/dist/es6/tooltip/lib/useTooltip.js +2 -1
  633. package/form-field/index.ts +0 -1
  634. package/form-field/lib/Hint.tsx +8 -19
  635. package/form-field/lib/Label.tsx +1 -2
  636. package/icon/lib/SystemIcon.tsx +1 -1
  637. package/index.ts +4 -1
  638. package/layout/README.md +28 -27
  639. package/layout/index.ts +15 -5
  640. package/layout/lib/Box.tsx +63 -45
  641. package/layout/lib/Column.tsx +22 -5
  642. package/layout/lib/Flex.tsx +6 -2
  643. package/layout/lib/Grid.tsx +85 -0
  644. package/layout/lib/Layout.tsx +37 -12
  645. package/layout/lib/Stack.tsx +4 -4
  646. package/layout/lib/utils/background.ts +83 -0
  647. package/layout/lib/utils/border/color.ts +85 -0
  648. package/layout/lib/utils/border/index.ts +49 -0
  649. package/layout/lib/utils/border/lineStyle.ts +87 -0
  650. package/layout/lib/utils/border/radius.ts +61 -0
  651. package/layout/lib/utils/border/shorthand.ts +73 -0
  652. package/layout/lib/utils/border/width.ts +73 -0
  653. package/layout/lib/utils/buildStyleFns.ts +117 -0
  654. package/layout/lib/utils/color.ts +40 -50
  655. package/layout/lib/utils/depth.ts +28 -24
  656. package/layout/lib/utils/flex.ts +85 -34
  657. package/layout/lib/utils/flexItem.ts +54 -36
  658. package/layout/lib/utils/grid.ts +166 -0
  659. package/layout/lib/utils/gridItem.ts +96 -0
  660. package/layout/lib/utils/layout.ts +109 -50
  661. package/layout/lib/utils/other.ts +144 -15
  662. package/layout/lib/utils/position.ts +79 -73
  663. package/layout/lib/utils/space.ts +202 -196
  664. package/layout/lib/utils/stack.ts +19 -45
  665. package/layout/lib/utils/styleProps.ts +56 -0
  666. package/layout/lib/utils/systemProps.ts +46 -0
  667. package/layout/lib/utils/text.ts +122 -0
  668. package/{loading-animation → loading-dots}/LICENSE +0 -0
  669. package/loading-dots/README.md +7 -0
  670. package/loading-dots/index.ts +1 -0
  671. package/{loading-animation → loading-dots}/lib/LoadingDots.tsx +0 -0
  672. package/loading-dots/package.json +6 -0
  673. package/menu/lib/MenuCard.tsx +1 -0
  674. package/menu/lib/MenuContextTarget.tsx +2 -4
  675. package/menu/lib/MenuItem.tsx +12 -12
  676. package/menu/lib/MenuTarget.tsx +2 -4
  677. package/modal/lib/ModalCard.tsx +17 -4
  678. package/modal/lib/ModalHeading.tsx +14 -2
  679. package/modal/lib/ModalOverlay.tsx +11 -13
  680. package/modal/lib/hooks/useCloseOnOverlayClick.ts +4 -2
  681. package/modal/lib/hooks/useModalModel.ts +1 -1
  682. package/package.json +3 -6
  683. package/pagination/lib/Pagination/AdditionalDetails.tsx +7 -8
  684. package/pagination/lib/Pagination/GoTo/Label.tsx +3 -11
  685. package/pagination/lib/Pagination/usePaginationModel.ts +5 -2
  686. package/popup/lib/PopupBody.tsx +1 -1
  687. package/popup/lib/PopupCard.tsx +16 -8
  688. package/popup/lib/PopupCloseButton.tsx +5 -1
  689. package/popup/lib/PopupCloseIcon.tsx +1 -1
  690. package/popup/lib/PopupHeading.tsx +1 -1
  691. package/popup/lib/PopupPopper.tsx +2 -3
  692. package/popup/lib/hooks/index.ts +1 -0
  693. package/popup/lib/hooks/useCloseOnTargetHidden.ts +66 -0
  694. package/popup/lib/hooks/useReturnFocus.tsx +112 -4
  695. package/radio/lib/Radio.tsx +9 -24
  696. package/segmented-control/lib/SegmentedControlButton.tsx +24 -5
  697. package/select/lib/Select.tsx +1 -1
  698. package/side-panel/lib/SidePanel.tsx +7 -7
  699. package/tabs/lib/useTabsModel.tsx +2 -2
  700. package/testing/LICENSE +52 -0
  701. package/testing/README.md +6 -0
  702. package/testing/index.ts +4 -0
  703. package/testing/lib/ComponentStatesTable.tsx +80 -0
  704. package/{common/lib/utils → testing/lib}/StaticStates.tsx +5 -4
  705. package/testing/lib/permutateProps.ts +47 -0
  706. package/testing/lib/propTypes.ts +15 -0
  707. package/testing/package.json +6 -0
  708. package/text/LICENSE +52 -0
  709. package/text/README.md +5 -0
  710. package/text/index.ts +3 -0
  711. package/text/lib/LabelText.tsx +47 -0
  712. package/text/lib/Text.tsx +110 -0
  713. package/text/lib/TypeLevelComponents.tsx +164 -0
  714. package/text/package.json +6 -0
  715. package/text-input/index.ts +0 -1
  716. package/toast/lib/Toast.tsx +1 -2
  717. package/tokens/lib/colors.types.ts +4 -7
  718. package/tooltip/lib/OverflowTooltip.tsx +1 -4
  719. package/tooltip/lib/TooltipContainer.tsx +6 -0
  720. package/tooltip/lib/useTooltip.tsx +2 -0
  721. package/dist/commonjs/common/lib/utils/StaticStates.d.ts +0 -8
  722. package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +0 -1
  723. package/dist/commonjs/layout/lib/utils/border.d.ts +0 -103
  724. package/dist/commonjs/layout/lib/utils/border.d.ts.map +0 -1
  725. package/dist/commonjs/layout/lib/utils/border.js +0 -153
  726. package/dist/commonjs/loading-animation/index.d.ts +0 -3
  727. package/dist/commonjs/loading-animation/index.d.ts.map +0 -1
  728. package/dist/commonjs/loading-animation/index.js +0 -5
  729. package/dist/commonjs/loading-animation/lib/LoadingDots.d.ts.map +0 -1
  730. package/dist/es6/common/lib/utils/StaticStates.d.ts +0 -8
  731. package/dist/es6/common/lib/utils/StaticStates.d.ts.map +0 -1
  732. package/dist/es6/layout/lib/utils/border.d.ts +0 -103
  733. package/dist/es6/layout/lib/utils/border.d.ts.map +0 -1
  734. package/dist/es6/layout/lib/utils/border.js +0 -149
  735. package/dist/es6/loading-animation/index.d.ts +0 -3
  736. package/dist/es6/loading-animation/index.d.ts.map +0 -1
  737. package/dist/es6/loading-animation/index.js +0 -2
  738. package/dist/es6/loading-animation/lib/LoadingDots.d.ts.map +0 -1
  739. package/layout/lib/utils/border.ts +0 -263
  740. package/loading-animation/README.md +0 -7
  741. package/loading-animation/index.ts +0 -3
  742. package/loading-animation/package.json +0 -6
@@ -4,6 +4,7 @@ export * from './useBringToTopOnClick';
4
4
  export * from './useCloseOnEscape';
5
5
  export * from './useCloseOnFullscreenExit';
6
6
  export * from './useCloseOnOutsideClick';
7
+ export * from './useCloseOnTargetHidden';
7
8
  export * from './useDisableBodyScroll';
8
9
  export * from './useFocusRedirect';
9
10
  export * from './useFocusTrap';
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+
3
+ import {createElemPropsHook} from '@workday/canvas-kit-react/common';
4
+ import {usePopupModel} from '@workday/canvas-kit-react/popup';
5
+
6
+ function getScrollParent(element: HTMLElement): HTMLElement {
7
+ if (element === document.body || !element.parentElement) {
8
+ return element;
9
+ }
10
+ const styles = getComputedStyle(element);
11
+
12
+ if (
13
+ styles.overflowY === 'scroll' ||
14
+ styles.overflowY === 'auto' ||
15
+ styles.overflowX === 'scroll' ||
16
+ styles.overflowX === 'auto'
17
+ ) {
18
+ return element;
19
+ }
20
+
21
+ return getScrollParent(element.parentElement);
22
+ }
23
+
24
+ /**
25
+ * Sets up an
26
+ * [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
27
+ * for the target element. When the target is detected as being less than 50% visible, the popup
28
+ * will close. Most likely, this will happen if the user scrolls an overflowed content area of the
29
+ * page and the target is no longer visible.
30
+ *
31
+ * This should be used with popup elements that are transitory like Tooltips and dropdown menus.
32
+ */
33
+ export const useCloseOnTargetHidden = createElemPropsHook(usePopupModel)(model => {
34
+ const visible = model.state.visibility !== 'hidden';
35
+
36
+ const callback: IntersectionObserverCallback = React.useCallback(
37
+ entries => {
38
+ if (entries[0].intersectionRatio < 0.5) {
39
+ model.events.hide();
40
+ }
41
+ },
42
+ [model.events]
43
+ );
44
+
45
+ React.useLayoutEffect(() => {
46
+ if (!visible || !model.state.targetRef.current) {
47
+ return;
48
+ }
49
+
50
+ const target = model.state.targetRef.current;
51
+ const scrollParent = getScrollParent(target);
52
+
53
+ // eslint-disable-next-line compat/compat
54
+ const observer = new IntersectionObserver(callback, {
55
+ root: scrollParent,
56
+ threshold: 0.5,
57
+ });
58
+
59
+ observer.observe(model.state.targetRef.current);
60
+ return () => {
61
+ observer.disconnect();
62
+ };
63
+ }, [callback, model.state.targetRef, visible]);
64
+
65
+ return {};
66
+ });
@@ -1,8 +1,35 @@
1
1
  import React from 'react';
2
2
 
3
- import {changeFocus, createElemPropsHook} from '@workday/canvas-kit-react/common';
3
+ import {changeFocus, createElemPropsHook, isFocusable} from '@workday/canvas-kit-react/common';
4
4
 
5
5
  import {usePopupModel} from './usePopupModel';
6
+ import {PopupStack} from '@workday/canvas-kit-popup-stack';
7
+
8
+ function getScrollParent(element: HTMLElement): HTMLElement {
9
+ if (element === document.body || !element.parentElement) {
10
+ return element;
11
+ }
12
+ const styles = getComputedStyle(element);
13
+
14
+ if (styles.overflowY === 'scroll' || styles.overflowY === 'auto') {
15
+ return element;
16
+ }
17
+
18
+ return getScrollParent(element.parentElement);
19
+ }
20
+
21
+ /**
22
+ * Get a focusable element in an element's tree
23
+ */
24
+ function getFocusableElement(element: Element | null): Element | null {
25
+ if (element === null || element === document.body || !element.parentElement) {
26
+ return null;
27
+ } else if (isFocusable(element)) {
28
+ return element;
29
+ }
30
+
31
+ return getFocusableElement(element.parentElement);
32
+ }
6
33
 
7
34
  /**
8
35
  * Returns focus to the target element when the popup is hidden. This works well with
@@ -13,17 +40,98 @@ import {usePopupModel} from './usePopupModel';
13
40
  */
14
41
  export const useReturnFocus = createElemPropsHook(usePopupModel)(model => {
15
42
  const visible = model.state.visibility !== 'hidden';
43
+ const elementRef = React.useRef<Element | null>(null);
44
+
45
+ // This boolean tracks keyboard-driven focus changes. This is required for `useFocusRedirect` as
46
+ // focus redirection needs synchronous focus management and everything else needs asynchronous
47
+ // focus management.
48
+ const requiresFocusChangeRef = React.useRef(false);
16
49
 
50
+ const onKeyDown = React.useCallback((event: KeyboardEvent) => {
51
+ // The tab key changes focus
52
+ if (event.key === 'Tab') {
53
+ requiresFocusChangeRef.current = true;
54
+ }
55
+ }, []);
56
+
57
+ // track mousedown events to determine if the mouse target is a focusable element. If it is, we
58
+ // should not return focus
59
+ const onMouseDown = React.useCallback(
60
+ (event: MouseEvent) => {
61
+ if (model.state.stackRef.current && event.target instanceof HTMLElement) {
62
+ if (!PopupStack.contains(model.state.stackRef.current, event.target)) {
63
+ elementRef.current = event.target;
64
+ }
65
+ }
66
+ },
67
+ [model.state.stackRef]
68
+ );
69
+
70
+ // We use `useLayoutEffect` because the callback will be called _before_ the browser changes
71
+ // focus. This allows the browser to change focus as normal. For example, if the popup closes
72
+ // because the user hits the tab key when focused on the last focusable element,
73
+ // `useFocusRedirect` will cause the popup to close before the browser is finished processing the
74
+ // `keydown`. The browser's default action of a keydown of a tab key is to advance focus to the
75
+ // next focusable element. This means that the `useFocusRedirect` will change focus back to the
76
+ // target, then the tab key is processed by the browser to focus on the next item after the target
77
+ // without us having to use a focus manager to guess what the next focusable element is.
78
+ //
79
+ // But because we're using `useLayoutEffect` instead of `useEffect`, we cannot use
80
+ // `document.activeElement` (because the focus hasn't changed yet because the browser hasn't
81
+ // triggered a default action yet) to determine if a user clicked on something that can accept
82
+ // focus itself. If we don't short-circuit return focus, the user will intend to click on an
83
+ // `input` element only to get focus changed back. This is annoying to users and unintuitive. Instead,
84
+ // we'll use `mousedown` and `mouseup` to determine if we're closing because of a mouse click.
17
85
  React.useLayoutEffect(() => {
18
86
  if (!visible) {
19
87
  return;
20
88
  }
21
89
  // capture the element here. The refs will be null by the time the cleanup function is called
22
- const element = (model.state.returnFocusRef || model.state.targetRef).current;
90
+ const element = (model.state.returnFocusRef || model.state.targetRef)
91
+ .current as HTMLElement | null;
92
+ document.addEventListener('mousedown', onMouseDown, true);
93
+ document.addEventListener('keydown', onKeyDown, true);
94
+
23
95
  return () => {
24
- changeFocus(element);
96
+ document.removeEventListener('mousedown', onMouseDown, true);
97
+ document.removeEventListener('keydown', onKeyDown, true);
98
+ if (!element) {
99
+ return;
100
+ }
101
+ const scrollParent = getScrollParent(element);
102
+ const scrollParentRect = scrollParent.getBoundingClientRect();
103
+ const elementRect = element.getBoundingClientRect();
104
+
105
+ // Don't change focus if user focused on a different element like a `input` or the target
106
+ // element isn't on at least halfway rendered on the screen.
107
+ if (
108
+ (elementRef.current && getFocusableElement(elementRef.current)) || // did the user click on a focusable element?
109
+ elementRect.top + elementRect.height / 2 < scrollParentRect.top || // is the top half of the target element visible?
110
+ elementRect.bottom - elementRect.height / 2 > scrollParentRect.bottom || // is the bottom half of the target element visible?
111
+ elementRect.left + elementRect.width / 2 < scrollParentRect.left || // is the left half of the target element visible?
112
+ elementRect.right - elementRect.width / 2 > scrollParentRect.right // is the right half of the target element visible?
113
+ ) {
114
+ // reset the focus element and bail early
115
+ elementRef.current = null;
116
+ return;
117
+ }
118
+
119
+ if (requiresFocusChangeRef.current) {
120
+ // We need to change focus _before_ the browser process the default action of picking a new
121
+ // focus target. Doing this immediately prevents the `focus` event from firing on `element`,
122
+ // but that's okay because the browser will change focus anyways.
123
+ changeFocus(element);
124
+ } else {
125
+ // We wait a frame for the current event to process, allowing the browser to fire default
126
+ // actions. This delay allows the focus change to trigger a `focus` event on `element`.
127
+ requestAnimationFrame(() => {
128
+ changeFocus(element);
129
+ });
130
+ }
131
+
132
+ elementRef.current = null;
25
133
  };
26
- }, [model.state.returnFocusRef, model.state.targetRef, visible]);
134
+ }, [model.state.returnFocusRef, model.state.targetRef, visible, onMouseDown, onKeyDown]);
27
135
 
28
136
  return {};
29
137
  });
@@ -8,13 +8,8 @@ import {
8
8
  Themeable,
9
9
  useUniqueId,
10
10
  } from '@workday/canvas-kit-react/common';
11
- import {
12
- canvas,
13
- borderRadius,
14
- colors,
15
- inputColors,
16
- spaceNumbers,
17
- } from '@workday/canvas-kit-react/tokens';
11
+ import {borderRadius, colors, inputColors, spaceNumbers} from '@workday/canvas-kit-react/tokens';
12
+ import {LabelText} from '@workday/canvas-kit-react/text';
18
13
 
19
14
  export interface RadioProps extends Themeable {
20
15
  /**
@@ -277,21 +272,6 @@ const RadioCheck = styled('div')<Pick<RadioProps, 'checked' | 'variant'>>(
277
272
  })
278
273
  );
279
274
 
280
- const RadioLabel = styled('label')<{disabled?: boolean; variant?: 'inverse' | undefined}>(
281
- {
282
- ...canvas.type.levels.subtext.large,
283
- paddingLeft: radioLabelDistance,
284
- },
285
- ({variant}) => (variant === 'inverse' ? {color: colors.frenchVanilla100} : undefined),
286
- ({disabled, variant}) =>
287
- disabled
288
- ? {
289
- color: variant === 'inverse' ? colors.frenchVanilla100 : inputColors.disabled.text,
290
- opacity: variant === 'inverse' ? '.4' : '1',
291
- }
292
- : {cursor: 'pointer'}
293
- );
294
-
295
275
  export const Radio = createComponent('input')({
296
276
  displayName: 'Radio',
297
277
  Component: (
@@ -333,9 +313,14 @@ export const Radio = createComponent('input')({
333
313
  </RadioBackground>
334
314
  </RadioInputWrapper>
335
315
  {label && (
336
- <RadioLabel htmlFor={inputId} disabled={disabled} variant={variant}>
316
+ <LabelText
317
+ paddingLeft={radioLabelDistance}
318
+ htmlFor={inputId}
319
+ disabled={disabled}
320
+ variant={variant}
321
+ >
337
322
  {label}
338
- </RadioLabel>
323
+ </LabelText>
339
324
  )}
340
325
  </RadioContainer>
341
326
  );
@@ -1,5 +1,10 @@
1
1
  import React from 'react';
2
- import {BaseButton, ButtonColors} from '@workday/canvas-kit-react/button';
2
+ import {
3
+ BaseButton,
4
+ ButtonColors,
5
+ ButtonSizes,
6
+ ButtonContainerProps,
7
+ } from '@workday/canvas-kit-react/button';
3
8
  import {
4
9
  createComponent,
5
10
  mouseFocusBehavior,
@@ -35,12 +40,22 @@ const getIconButtonColors = (toggled?: boolean): ButtonColors => {
35
40
  };
36
41
  };
37
42
 
38
- const StyledButton = styled(BaseButton)<StyledType>(
43
+ const getSizeStyles = (size?: ButtonSizes) => {
44
+ const sizeValue =
45
+ size === 'large' ? `calc(${space.xl} + ${space.xxs})` : size === 'small' ? space.l : space.xl;
46
+
47
+ return {
48
+ width: sizeValue,
49
+ height: sizeValue,
50
+ };
51
+ };
52
+
53
+ const StyledButton = styled(BaseButton)<ButtonContainerProps & StyledType>(
39
54
  {
40
55
  borderRadius: borderRadius.zero,
41
56
  border: `1px solid ${colors.soap500}`,
42
57
  borderLeft: 'none',
43
- minWidth: space.xl,
58
+
44
59
  '&:first-of-type': {
45
60
  borderRadius: `${borderRadius.m} 0 0 ${borderRadius.m}`,
46
61
  borderLeft: `1px solid ${colors.soap500}`,
@@ -79,13 +94,17 @@ const StyledButton = styled(BaseButton)<StyledType>(
79
94
  background: theme.canvas.palette.primary.main,
80
95
  },
81
96
  },
97
+ }),
98
+ ({size}: ButtonContainerProps) => ({
99
+ ...getSizeStyles(size),
82
100
  })
83
101
  );
84
102
 
85
- export interface SegmentedControlButtonProps {
103
+ export interface SegmentedControlButtonProps extends ButtonContainerProps {
86
104
  toggled?: boolean;
87
105
  icon: CanvasSystemIcon;
88
106
  value?: string | number;
107
+ size?: 'small' | 'medium' | 'large';
89
108
  }
90
109
 
91
110
  export const SegmentedControlButton = createComponent('button')({
@@ -101,7 +120,7 @@ export const SegmentedControlButton = createComponent('button')({
101
120
  ref={ref}
102
121
  {...props}
103
122
  >
104
- <BaseButton.Icon size="large" icon={icon} />
123
+ <BaseButton.Icon size={props.size || 'large'} icon={icon} />
105
124
  </StyledButton>
106
125
  );
107
126
  },
@@ -55,7 +55,7 @@ const StyledSelect = styled('select')<SelectProps & StyledType>(
55
55
  height: space.xl,
56
56
  minWidth: 280,
57
57
  transition: '0.2s box-shadow, 0.2s border-color',
58
- padding: spaceNumbers.xxs, // IE11 bugfix: add padding so text is displayed properly
58
+ padding: spaceNumbers.xxs,
59
59
  margin: 0, // Fix Safari
60
60
  MozAppearance: 'none', // FF bugfix: hide arrow so it doesn't show under ours
61
61
  WebkitAppearance: 'none',
@@ -3,9 +3,10 @@ import styled from '@emotion/styled';
3
3
  import throttle from 'lodash/throttle';
4
4
 
5
5
  import {CanvasSystemIcon} from '@workday/design-assets-types';
6
- import {colors, space, type, CanvasSpaceValues} from '@workday/canvas-kit-react/tokens';
6
+ import {colors, space, CanvasSpaceValues} from '@workday/canvas-kit-react/tokens';
7
7
  import {TertiaryButton, TertiaryButtonProps} from '@workday/canvas-kit-react/button';
8
8
  import {chevronLeftIcon, chevronRightIcon} from '@workday/canvas-system-icons-web';
9
+ import {Heading} from '@workday/canvas-kit-react/text';
9
10
 
10
11
  export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
11
12
  /**
@@ -78,11 +79,6 @@ export enum SidePanelBackgroundColor {
78
79
 
79
80
  const closedWidth = space.xxl;
80
81
 
81
- const Header = styled('h2')({
82
- ...type.levels.heading.small,
83
- marginTop: space.zero,
84
- });
85
-
86
82
  const SidePanelContainer = styled('div')<
87
83
  Pick<SidePanelProps, 'open' | 'backgroundColor' | 'padding' | 'openWidth' | 'openDirection'>
88
84
  >(
@@ -214,7 +210,11 @@ export class SidePanel extends React.Component<SidePanelProps, SidePanelState> {
214
210
  {...elemProps}
215
211
  >
216
212
  <ChildrenContainer open={open} openWidth={openWidth}>
217
- {header && open ? <Header>{header}</Header> : null}
213
+ {header && open ? (
214
+ <Heading as="h2" size="small" marginTop="zero">
215
+ {header}
216
+ </Heading>
217
+ ) : null}
218
218
  {this.props.children}
219
219
  </ChildrenContainer>
220
220
  <SidePanelFooter openWidth={openWidth} open={open}>
@@ -29,7 +29,7 @@ export const useTabsModel = createModelHook({
29
29
  * @default 'horizontal'
30
30
  */
31
31
  orientation: 'horizontal' as typeof useOverflowListModel.defaultConfig.orientation,
32
- menuConfig: {} as Partial<typeof useMenuModel.defaultConfig>,
32
+ menuConfig: {} as typeof useMenuModel.TConfig,
33
33
  },
34
34
  requiredConfig: useOverflowListModel.requiredConfig,
35
35
  })(config => {
@@ -96,7 +96,7 @@ export const useTabsModel = createModelHook({
96
96
  };
97
97
 
98
98
  const menu = useMenuModel(
99
- useMenuModel.mergeConfig(config.menuConfig as Required<typeof config.menuConfig>, {
99
+ useMenuModel.mergeConfig(config.menuConfig, {
100
100
  id: `menu-${model.state.id}`,
101
101
  items: overflowItems,
102
102
  nonInteractiveIds: state.nonInteractiveIds.filter(key => !state.hiddenIds.includes(key)),
@@ -0,0 +1,52 @@
1
+ Apache License, Version 2.0 Apache License Version 2.0, January 2004
2
+
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
9
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
10
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
11
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
12
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
13
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
14
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
15
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
16
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
17
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
18
+
19
+ 2. Grant of Copyright License.
20
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
21
+
22
+ 3. Grant of Patent License.
23
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
24
+
25
+ 4. Redistribution.
26
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
27
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
28
+
29
+ 5. Submission of Contributions.
30
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
31
+
32
+ 6. Trademarks.
33
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
34
+
35
+ 7. Disclaimer of Warranty.
36
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
37
+
38
+ 8. Limitation of Liability.
39
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
40
+
41
+ 9. Accepting Warranty or Additional Liability.
42
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
43
+
44
+ END OF TERMS AND CONDITIONS
45
+
46
+ ©2021 Workday, Inc. All rights reserved. Workday and the Workday logo are registered trademarks of Workday, Inc. All other brand and product names are trademarks or registered trademarks of their respective holders.
47
+
48
+
49
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
50
+ http://www.apache.org/licenses/LICENSE-2.0
51
+
52
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
@@ -0,0 +1,6 @@
1
+ # Canvas Kit Testing
2
+
3
+ A package that provides components for testing
4
+
5
+ View the [documentation for Testing](https://workday.github.io/canvas-kit/?path=/docs/testing-react)
6
+ on Storybook.
@@ -0,0 +1,4 @@
1
+ export * from './lib/ComponentStatesTable';
2
+ export * from './lib/StaticStates';
3
+ export * from './lib/permutateProps';
4
+ export * from './lib/propTypes';
@@ -0,0 +1,80 @@
1
+ import React from 'react';
2
+ import {styled} from '@workday/canvas-kit-react/common';
3
+ import {PropCombination, Props} from './propTypes';
4
+
5
+ /**
6
+ * A helper to generate a table of all possible states for component visual testing.
7
+ */
8
+ export interface ComponentStatesTableProps {
9
+ /**
10
+ * The props that will be passed to the component when it is rendered and the corresponding
11
+ * row label for that permutation. It is encouraged to use the result of permutateProps()
12
+ * rather than passing in a list so we don't miss any combinations.
13
+ */
14
+ rowProps: PropCombination[];
15
+ /**
16
+ * The props that will be passed to the component when it is rendered and the corresponding
17
+ * column label for that permutation. It is encouraged to use the result of permutateProps()
18
+ * rather than passing in a list so we don't miss any combinations.
19
+ */
20
+ columnProps: PropCombination[];
21
+ /**
22
+ * The render function called to render the component in each cell of the table. This gives you
23
+ * the ability to add extra styling or markup (a blue background for an inverse variant, for example).
24
+ */
25
+ children(props: Props): React.ReactNode;
26
+ }
27
+
28
+ const Table = styled('table')({
29
+ width: '100%',
30
+ thead: {
31
+ textAlign: 'left',
32
+ paddingBottom: 16,
33
+ },
34
+ 'td, th': {
35
+ minWidth: 100,
36
+ paddingBottom: 16,
37
+ paddingRight: 16,
38
+ textAlign: 'left',
39
+ },
40
+ });
41
+
42
+ export const ComponentStatesTable = ({
43
+ rowProps,
44
+ columnProps,
45
+ children,
46
+ }: ComponentStatesTableProps) => {
47
+ return (
48
+ <Table>
49
+ <thead>
50
+ <tr>
51
+ <th>Variants</th>
52
+ {columnProps.map(col => (
53
+ <th key={`component-table-heading-${col.label.toLowerCase().replace(' ', ',')}`}>
54
+ {col.label}
55
+ </th>
56
+ ))}
57
+ </tr>
58
+ </thead>
59
+ <tbody>
60
+ {rowProps.map(row => {
61
+ return (
62
+ <tr key={row.label.toLowerCase().replace(' ', '-')}>
63
+ <td>{row.label}</td>
64
+ {columnProps.map(col => {
65
+ return (
66
+ <td key={col.label.toLowerCase().replace(' ', '-')}>
67
+ {children({
68
+ ...row.props,
69
+ ...col.props,
70
+ })}
71
+ </td>
72
+ );
73
+ })}
74
+ </tr>
75
+ );
76
+ })}
77
+ </tbody>
78
+ </Table>
79
+ );
80
+ };
@@ -4,10 +4,11 @@ import {
4
4
  CanvasProvider,
5
5
  EmotionCanvasTheme,
6
6
  PartialEmotionCanvasTheme,
7
+ StyleRewriteFn,
7
8
  } from '@workday/canvas-kit-react/common';
8
9
  import {CSSProperties} from '@workday/canvas-kit-react/tokens';
9
10
 
10
- export const convertToStaticStates = (obj?: CSSProperties): CSSProperties | undefined => {
11
+ export const convertToStaticStates: StyleRewriteFn = obj => {
11
12
  if (!obj) {
12
13
  return obj;
13
14
  }
@@ -26,14 +27,14 @@ export const convertToStaticStates = (obj?: CSSProperties): CSSProperties | unde
26
27
  typeof obj[key] === 'object' ? convertToStaticStates(obj[key] as CSSProperties) : obj[key];
27
28
  const newObj = {...result, [newKey]: value};
28
29
  return newObj;
29
- }, {});
30
+ }, {} as CSSProperties);
30
31
  };
31
32
 
32
33
  export const StaticStates: React.FC<React.PropsWithChildren<
33
34
  {theme?: PartialEmotionCanvasTheme} & React.HTMLAttributes<HTMLElement>
34
35
  >> = ({children, theme, ...elemProps}) => {
35
- const localTheme: EmotionCanvasTheme & {_staticStates?: boolean} = useTheme(theme);
36
- localTheme._staticStates = true;
36
+ const localTheme: EmotionCanvasTheme & {_styleRewriteFn?: StyleRewriteFn} = useTheme(theme);
37
+ localTheme._styleRewriteFn = convertToStaticStates;
37
38
 
38
39
  return (
39
40
  <CanvasProvider theme={localTheme} {...elemProps}>
@@ -0,0 +1,47 @@
1
+ import {PropCombination, PropDeclaration, Props, PropsDeclaration} from './propTypes';
2
+
3
+ export const permutateProps = (
4
+ allProps: PropsDeclaration,
5
+ filter?: (props: Props) => boolean,
6
+ remainingProps: string[] = Object.keys(allProps),
7
+ values: {[key: string]: PropDeclaration} = {}
8
+ ): PropCombination[] => {
9
+ // When there are no more props to combine with, return result
10
+ const prop = remainingProps[0];
11
+ if (!prop) {
12
+ const props: Props = {};
13
+ Object.keys(values).forEach(prop => {
14
+ props[prop] = values?.[prop]?.value;
15
+ });
16
+
17
+ if (filter && !filter(props)) {
18
+ return [];
19
+ }
20
+
21
+ const label = Object.keys(values)
22
+ .map(prop => values?.[prop]?.label)
23
+ .join(' ');
24
+
25
+ return [
26
+ {
27
+ label,
28
+ props,
29
+ },
30
+ ];
31
+ }
32
+ const possiblePropValues = allProps[prop];
33
+
34
+ const permutations = possiblePropValues?.map((value: PropDeclaration) => {
35
+ const newValues = {...values}; // Required so we don't overwrite previous references
36
+ newValues[prop] = value;
37
+
38
+ return permutateProps(
39
+ allProps,
40
+ filter,
41
+ remainingProps!.slice(1, remainingProps!.length),
42
+ newValues
43
+ );
44
+ });
45
+
46
+ return (permutations as any).flat();
47
+ };
@@ -0,0 +1,15 @@
1
+ export type PropDeclaration = {
2
+ value: any;
3
+ label: string;
4
+ };
5
+
6
+ export type PropsDeclaration = {[key: string]: PropDeclaration[]};
7
+
8
+ export type Props = {
9
+ [key: string]: any;
10
+ };
11
+
12
+ export type PropCombination = {
13
+ label: string;
14
+ props: Props;
15
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/commonjs/testing",
3
+ "module": "../dist/es6/testing",
4
+ "sideEffects": false,
5
+ "types": "../dist/es6/testing"
6
+ }