@workday/canvas-kit-react 7.0.0-alpha.0-next.7 → 7.0.0-alpha.80-next.8

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 (352) hide show
  1. package/badge/README.md +2 -3
  2. package/banner/lib/BannerIcon.tsx +2 -2
  3. package/button/README.md +68 -1
  4. package/button/index.ts +1 -1
  5. package/button/lib/{parts/ButtonContainer.tsx → BaseButton.tsx} +123 -66
  6. package/button/lib/DeleteButton.tsx +7 -4
  7. package/button/lib/PrimaryButton.tsx +86 -109
  8. package/button/lib/SecondaryButton.tsx +41 -64
  9. package/button/lib/TertiaryButton.tsx +86 -53
  10. package/button/lib/ToolbarDropdownButton.tsx +12 -11
  11. package/button/lib/ToolbarIconButton.tsx +22 -17
  12. package/button/lib/parts/ButtonLabel.tsx +17 -2
  13. package/button/lib/parts/ButtonLabelIcon.tsx +30 -54
  14. package/button/lib/parts/index.tsx +0 -2
  15. package/button/lib/types.ts +2 -2
  16. package/card/lib/Card.tsx +1 -1
  17. package/common/lib/parts/_brand-assets.ts +5 -5
  18. package/common/lib/utils/StaticStates.tsx +6 -5
  19. package/dist/commonjs/banner/lib/BannerIcon.js +2 -2
  20. package/dist/commonjs/button/index.d.ts +1 -1
  21. package/dist/commonjs/button/index.d.ts.map +1 -1
  22. package/dist/commonjs/button/index.js +3 -3
  23. package/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
  24. package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -0
  25. package/dist/commonjs/button/lib/BaseButton.js +198 -0
  26. package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
  27. package/dist/commonjs/button/lib/DeleteButton.js +4 -3
  28. package/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
  29. package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
  30. package/dist/commonjs/button/lib/PrimaryButton.js +15 -36
  31. package/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
  32. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  33. package/dist/commonjs/button/lib/SecondaryButton.js +13 -36
  34. package/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
  35. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  36. package/dist/commonjs/button/lib/TertiaryButton.js +66 -38
  37. package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
  38. package/dist/commonjs/button/lib/ToolbarDropdownButton.js +7 -7
  39. package/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
  40. package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
  41. package/dist/commonjs/button/lib/ToolbarIconButton.js +5 -11
  42. package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
  43. package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts.map +1 -1
  44. package/dist/commonjs/button/lib/parts/ButtonLabel.js +35 -1
  45. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  46. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
  47. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.js +13 -62
  48. package/dist/commonjs/button/lib/parts/index.d.ts +0 -2
  49. package/dist/commonjs/button/lib/parts/index.d.ts.map +1 -1
  50. package/dist/commonjs/button/lib/parts/index.js +1 -5
  51. package/dist/commonjs/button/lib/types.d.ts +2 -2
  52. package/dist/commonjs/button/lib/types.d.ts.map +1 -1
  53. package/dist/commonjs/card/lib/Card.js +1 -1
  54. package/dist/commonjs/common/lib/parts/_brand-assets.d.ts.map +1 -1
  55. package/dist/commonjs/common/lib/parts/_brand-assets.js +5 -5
  56. package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +1 -1
  57. package/dist/commonjs/common/lib/utils/StaticStates.js +5 -2
  58. package/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
  59. package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
  60. package/dist/commonjs/icon/lib/AccentIcon.js +8 -24
  61. package/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
  62. package/dist/commonjs/icon/lib/AppletIcon.d.ts.map +1 -1
  63. package/dist/commonjs/icon/lib/AppletIcon.js +13 -27
  64. package/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
  65. package/dist/commonjs/icon/lib/Graphic.d.ts.map +1 -1
  66. package/dist/commonjs/icon/lib/Graphic.js +8 -24
  67. package/dist/commonjs/icon/lib/Icon.d.ts +2 -5
  68. package/dist/commonjs/icon/lib/Icon.d.ts.map +1 -1
  69. package/dist/commonjs/icon/lib/Icon.js +10 -25
  70. package/dist/commonjs/icon/lib/Svg.d.ts +4 -6
  71. package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
  72. package/dist/commonjs/icon/lib/Svg.js +11 -27
  73. package/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
  74. package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
  75. package/dist/commonjs/icon/lib/SystemIcon.js +8 -24
  76. package/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
  77. package/dist/commonjs/icon/lib/SystemIconCircle.d.ts.map +1 -1
  78. package/dist/commonjs/icon/lib/SystemIconCircle.js +7 -25
  79. package/dist/commonjs/layout/lib/Box.d.ts +18 -1
  80. package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
  81. package/dist/commonjs/layout/lib/Box.js +42 -2
  82. package/dist/commonjs/layout/lib/Flex.d.ts +1 -1
  83. package/dist/commonjs/layout/lib/Flex.js +1 -1
  84. package/dist/commonjs/modal/lib/ModalCard.js +1 -1
  85. package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
  86. package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
  87. package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  88. package/dist/commonjs/pagination/lib/Pagination/Controls.js +4 -4
  89. package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
  90. package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
  91. package/dist/commonjs/pagination/lib/Pagination/PageButton.js +34 -9
  92. package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
  93. package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
  94. package/dist/commonjs/popup/lib/PopupCard.js +1 -1
  95. package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
  96. package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts.map +1 -1
  97. package/dist/commonjs/popup/lib/PopupCloseIcon.js +5 -6
  98. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
  99. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +4 -0
  100. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
  101. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  102. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +21 -57
  103. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  104. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
  105. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +106 -0
  106. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  107. package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
  108. package/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
  109. package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
  110. package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
  111. package/dist/commonjs/tabs/lib/TabsList.js +1 -1
  112. package/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
  113. package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
  114. package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts.map +1 -1
  115. package/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
  116. package/dist/commonjs/text-input/lib/InputIconContainer.d.ts.map +1 -1
  117. package/dist/commonjs/toast/lib/Toast.d.ts.map +1 -1
  118. package/dist/commonjs/toast/lib/Toast.js +1 -1
  119. package/dist/commonjs/tokens/lib/depth.d.ts +48 -17
  120. package/dist/commonjs/tokens/lib/depth.d.ts.map +1 -1
  121. package/dist/commonjs/tokens/lib/depth.js +14 -9
  122. package/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
  123. package/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
  124. package/dist/es6/banner/lib/BannerIcon.js +2 -2
  125. package/dist/es6/button/index.d.ts +1 -1
  126. package/dist/es6/button/index.d.ts.map +1 -1
  127. package/dist/es6/button/index.js +1 -1
  128. package/dist/es6/button/lib/BaseButton.d.ts +31 -0
  129. package/dist/es6/button/lib/BaseButton.d.ts.map +1 -0
  130. package/dist/es6/button/lib/BaseButton.js +174 -0
  131. package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
  132. package/dist/es6/button/lib/DeleteButton.js +4 -3
  133. package/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
  134. package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
  135. package/dist/es6/button/lib/PrimaryButton.js +15 -35
  136. package/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
  137. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  138. package/dist/es6/button/lib/SecondaryButton.js +13 -36
  139. package/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
  140. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  141. package/dist/es6/button/lib/TertiaryButton.js +68 -40
  142. package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
  143. package/dist/es6/button/lib/ToolbarDropdownButton.js +8 -8
  144. package/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
  145. package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
  146. package/dist/es6/button/lib/ToolbarIconButton.js +7 -13
  147. package/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
  148. package/dist/es6/button/lib/parts/ButtonLabel.d.ts.map +1 -1
  149. package/dist/es6/button/lib/parts/ButtonLabel.js +33 -2
  150. package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  151. package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
  152. package/dist/es6/button/lib/parts/ButtonLabelIcon.js +13 -42
  153. package/dist/es6/button/lib/parts/index.d.ts +0 -2
  154. package/dist/es6/button/lib/parts/index.d.ts.map +1 -1
  155. package/dist/es6/button/lib/parts/index.js +0 -2
  156. package/dist/es6/button/lib/types.d.ts +2 -2
  157. package/dist/es6/button/lib/types.d.ts.map +1 -1
  158. package/dist/es6/card/lib/Card.js +1 -1
  159. package/dist/es6/common/lib/parts/_brand-assets.d.ts.map +1 -1
  160. package/dist/es6/common/lib/parts/_brand-assets.js +5 -5
  161. package/dist/es6/common/lib/utils/StaticStates.d.ts.map +1 -1
  162. package/dist/es6/common/lib/utils/StaticStates.js +5 -2
  163. package/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
  164. package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
  165. package/dist/es6/icon/lib/AccentIcon.js +8 -24
  166. package/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
  167. package/dist/es6/icon/lib/AppletIcon.d.ts.map +1 -1
  168. package/dist/es6/icon/lib/AppletIcon.js +11 -25
  169. package/dist/es6/icon/lib/Graphic.d.ts +3 -5
  170. package/dist/es6/icon/lib/Graphic.d.ts.map +1 -1
  171. package/dist/es6/icon/lib/Graphic.js +8 -24
  172. package/dist/es6/icon/lib/Icon.d.ts +2 -5
  173. package/dist/es6/icon/lib/Icon.d.ts.map +1 -1
  174. package/dist/es6/icon/lib/Icon.js +8 -24
  175. package/dist/es6/icon/lib/Svg.d.ts +4 -6
  176. package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
  177. package/dist/es6/icon/lib/Svg.js +10 -27
  178. package/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
  179. package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
  180. package/dist/es6/icon/lib/SystemIcon.js +8 -24
  181. package/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
  182. package/dist/es6/icon/lib/SystemIconCircle.d.ts.map +1 -1
  183. package/dist/es6/icon/lib/SystemIconCircle.js +8 -26
  184. package/dist/es6/layout/lib/Box.d.ts +18 -1
  185. package/dist/es6/layout/lib/Box.d.ts.map +1 -1
  186. package/dist/es6/layout/lib/Box.js +40 -1
  187. package/dist/es6/layout/lib/Flex.d.ts +1 -1
  188. package/dist/es6/layout/lib/Flex.js +1 -1
  189. package/dist/es6/modal/lib/ModalCard.js +1 -1
  190. package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
  191. package/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
  192. package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  193. package/dist/es6/pagination/lib/Pagination/Controls.js +5 -5
  194. package/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
  195. package/dist/es6/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
  196. package/dist/es6/pagination/lib/Pagination/PageButton.js +35 -10
  197. package/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
  198. package/dist/es6/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
  199. package/dist/es6/popup/lib/PopupCard.js +1 -1
  200. package/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
  201. package/dist/es6/popup/lib/PopupCloseIcon.d.ts.map +1 -1
  202. package/dist/es6/popup/lib/PopupCloseIcon.js +6 -7
  203. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
  204. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +4 -0
  205. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
  206. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  207. package/dist/es6/segmented-control/lib/SegmentedControl.js +20 -57
  208. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  209. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
  210. package/dist/es6/segmented-control/lib/SegmentedControlButton.js +100 -0
  211. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  212. package/dist/es6/side-panel/lib/SidePanel.js +3 -3
  213. package/dist/es6/tabs/lib/Tabs.d.ts +2 -2
  214. package/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
  215. package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
  216. package/dist/es6/tabs/lib/TabsList.js +1 -1
  217. package/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
  218. package/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
  219. package/dist/es6/tabs/lib/menu/MenuItem.d.ts.map +1 -1
  220. package/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
  221. package/dist/es6/text-input/lib/InputIconContainer.d.ts.map +1 -1
  222. package/dist/es6/toast/lib/Toast.d.ts.map +1 -1
  223. package/dist/es6/toast/lib/Toast.js +1 -1
  224. package/dist/es6/tokens/lib/depth.d.ts +48 -17
  225. package/dist/es6/tokens/lib/depth.d.ts.map +1 -1
  226. package/dist/es6/tokens/lib/depth.js +14 -9
  227. package/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
  228. package/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
  229. package/icon/README.md +0 -30
  230. package/icon/lib/AccentIcon.tsx +17 -16
  231. package/icon/lib/AppletIcon.tsx +18 -12
  232. package/icon/lib/Graphic.tsx +15 -8
  233. package/icon/lib/Icon.tsx +10 -8
  234. package/icon/lib/Svg.tsx +12 -14
  235. package/icon/lib/SystemIcon.tsx +21 -12
  236. package/icon/lib/SystemIconCircle.tsx +17 -14
  237. package/layout/lib/Box.tsx +41 -1
  238. package/layout/lib/Flex.tsx +1 -1
  239. package/modal/lib/ModalCard.tsx +1 -1
  240. package/modal/lib/ModalOverflowOverlay.tsx +1 -1
  241. package/package.json +5 -5
  242. package/pagination/lib/Pagination/Controls.tsx +6 -10
  243. package/pagination/lib/Pagination/PageButton.tsx +38 -17
  244. package/pagination/lib/Pagination/Pagination.tsx +5 -5
  245. package/popup/lib/PopupCard.tsx +1 -1
  246. package/popup/lib/PopupCloseIcon.tsx +7 -8
  247. package/popup/lib/hooks/useDisableBodyScroll.ts +6 -0
  248. package/segmented-control/README.md +8 -9
  249. package/segmented-control/lib/SegmentedControl.tsx +39 -78
  250. package/segmented-control/lib/SegmentedControlButton.tsx +109 -0
  251. package/side-panel/README.md +3 -3
  252. package/side-panel/lib/SidePanel.tsx +4 -5
  253. package/tabs/lib/TabsList.tsx +1 -1
  254. package/text-input/lib/InputIconContainer.tsx +1 -1
  255. package/toast/lib/Toast.tsx +1 -0
  256. package/tokens/README.md +11 -8
  257. package/tokens/lib/depth.ts +60 -24
  258. package/tooltip/README.md +6 -5
  259. package/tooltip/lib/Tooltip.tsx +1 -1
  260. package/tooltip/lib/useTooltip.tsx +1 -1
  261. package/ts3.5/dist/commonjs/button/index.d.ts +1 -1
  262. package/ts3.5/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
  263. package/ts3.5/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
  264. package/ts3.5/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
  265. package/ts3.5/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
  266. package/ts3.5/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
  267. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
  268. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  269. package/ts3.5/dist/commonjs/button/lib/parts/index.d.ts +0 -2
  270. package/ts3.5/dist/commonjs/button/lib/types.d.ts +2 -2
  271. package/ts3.5/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
  272. package/ts3.5/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
  273. package/ts3.5/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
  274. package/ts3.5/dist/commonjs/icon/lib/Icon.d.ts +2 -5
  275. package/ts3.5/dist/commonjs/icon/lib/Svg.d.ts +4 -6
  276. package/ts3.5/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
  277. package/ts3.5/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
  278. package/ts3.5/dist/commonjs/layout/lib/Box.d.ts +18 -1
  279. package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +1 -1
  280. package/ts3.5/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
  281. package/ts3.5/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
  282. package/ts3.5/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
  283. package/ts3.5/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
  284. package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
  285. package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  286. package/ts3.5/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
  287. package/ts3.5/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
  288. package/ts3.5/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
  289. package/ts3.5/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
  290. package/ts3.5/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
  291. package/ts3.5/dist/commonjs/tokens/lib/depth.d.ts +48 -17
  292. package/ts3.5/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
  293. package/ts3.5/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
  294. package/ts3.5/dist/es6/button/index.d.ts +1 -1
  295. package/ts3.5/dist/es6/button/lib/BaseButton.d.ts +31 -0
  296. package/ts3.5/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
  297. package/ts3.5/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
  298. package/ts3.5/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
  299. package/ts3.5/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
  300. package/ts3.5/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
  301. package/ts3.5/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  302. package/ts3.5/dist/es6/button/lib/parts/index.d.ts +0 -2
  303. package/ts3.5/dist/es6/button/lib/types.d.ts +2 -2
  304. package/ts3.5/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
  305. package/ts3.5/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
  306. package/ts3.5/dist/es6/icon/lib/Graphic.d.ts +3 -5
  307. package/ts3.5/dist/es6/icon/lib/Icon.d.ts +2 -5
  308. package/ts3.5/dist/es6/icon/lib/Svg.d.ts +4 -6
  309. package/ts3.5/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
  310. package/ts3.5/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
  311. package/ts3.5/dist/es6/layout/lib/Box.d.ts +18 -1
  312. package/ts3.5/dist/es6/layout/lib/Flex.d.ts +1 -1
  313. package/ts3.5/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
  314. package/ts3.5/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
  315. package/ts3.5/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
  316. package/ts3.5/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
  317. package/ts3.5/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
  318. package/ts3.5/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  319. package/ts3.5/dist/es6/tabs/lib/Tabs.d.ts +2 -2
  320. package/ts3.5/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
  321. package/ts3.5/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
  322. package/ts3.5/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
  323. package/ts3.5/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
  324. package/ts3.5/dist/es6/tokens/lib/depth.d.ts +48 -17
  325. package/ts3.5/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
  326. package/ts3.5/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
  327. package/button/lib/IconButton.tsx +0 -279
  328. package/button/lib/parts/ButtonLabelData.tsx +0 -16
  329. package/dist/commonjs/button/lib/IconButton.d.ts +0 -44
  330. package/dist/commonjs/button/lib/IconButton.d.ts.map +0 -1
  331. package/dist/commonjs/button/lib/IconButton.js +0 -219
  332. package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
  333. package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts.map +0 -1
  334. package/dist/commonjs/button/lib/parts/ButtonContainer.js +0 -126
  335. package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
  336. package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
  337. package/dist/commonjs/button/lib/parts/ButtonLabelData.js +0 -45
  338. package/dist/es6/button/lib/IconButton.d.ts +0 -44
  339. package/dist/es6/button/lib/IconButton.d.ts.map +0 -1
  340. package/dist/es6/button/lib/IconButton.js +0 -197
  341. package/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
  342. package/dist/es6/button/lib/parts/ButtonContainer.d.ts.map +0 -1
  343. package/dist/es6/button/lib/parts/ButtonContainer.js +0 -120
  344. package/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
  345. package/dist/es6/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
  346. package/dist/es6/button/lib/parts/ButtonLabelData.js +0 -22
  347. package/ts3.5/dist/commonjs/button/lib/IconButton.d.ts +0 -44
  348. package/ts3.5/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
  349. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
  350. package/ts3.5/dist/es6/button/lib/IconButton.d.ts +0 -44
  351. package/ts3.5/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
  352. package/ts3.5/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
@@ -1,30 +1,52 @@
1
1
  import * as React from 'react';
2
2
  import {styled} from '@workday/canvas-kit-react/common';
3
- import canvas, {type} from '@workday/canvas-kit-react/tokens';
4
- import {IconButton, IconButtonProps} from '@workday/canvas-kit-react/button';
3
+ import {borderRadius, colors, space} from '@workday/canvas-kit-react/tokens';
4
+ import {BaseButton} from '@workday/canvas-kit-react/button';
5
5
 
6
6
  import {PaginationModel} from './types';
7
7
 
8
- const toggledStyles = {
9
- color: canvas.colors.frenchVanilla100,
10
- fontWeight: 700,
11
- pointerEvents: 'none',
12
- };
13
-
14
- const StyledPageButton = styled(IconButton)<{toggled?: boolean}>(
8
+ const StyledPageButton = styled(BaseButton)<{toggled?: boolean}>(
15
9
  {
16
- ...type.levels.subtext.large,
10
+ minWidth: space.l,
11
+ width: space.l,
12
+ borderRadius: borderRadius.circle,
13
+ height: space.l,
17
14
  },
18
15
  ({toggled}) => {
19
- return toggled ? toggledStyles : {};
16
+ return {
17
+ fontWeight: toggled ? 700 : 'normal',
18
+ };
20
19
  }
21
20
  );
22
21
 
23
- export type PageButtonProps = IconButtonProps &
24
- React.ButtonHTMLAttributes<HTMLButtonElement> & {
25
- model: PaginationModel;
26
- pageNumber: number;
22
+ const getPaginationButtonColors = (toggled: boolean) => {
23
+ return {
24
+ default: {
25
+ background: toggled ? colors.blueberry400 : 'transparent',
26
+ label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
27
+ },
28
+ hover: {
29
+ background: toggled ? colors.blueberry400 : colors.soap300,
30
+ label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
31
+ },
32
+ active: {
33
+ background: toggled ? colors.blueberry400 : 'transparent',
34
+ label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
35
+ },
36
+ focus: {
37
+ background: toggled ? colors.blueberry400 : 'transparent',
38
+ label: toggled ? colors.frenchVanilla100 : colors.blackPepper400,
39
+ },
40
+ disabled: {
41
+ background: colors.licorice100,
42
+ },
27
43
  };
44
+ };
45
+
46
+ export type PageButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
47
+ model: PaginationModel;
48
+ pageNumber: number;
49
+ };
28
50
 
29
51
  export const PageButton = ({
30
52
  model,
@@ -43,11 +65,10 @@ export const PageButton = ({
43
65
  return (
44
66
  <StyledPageButton
45
67
  aria-current={isCurrentPage ? 'page' : undefined}
68
+ colors={getPaginationButtonColors(isCurrentPage)}
46
69
  aria-pressed={undefined}
47
70
  onClick={handleClick}
48
- size="small"
49
71
  toggled={isCurrentPage}
50
- variant="square"
51
72
  {...elemProps}
52
73
  >
53
74
  {children || pageNumber}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import {IconButtonProps} from '@workday/canvas-kit-react/button';
2
+ import {TertiaryButtonProps} from '@workday/canvas-kit-react/button';
3
3
 
4
4
  import {PaginationModel} from './types';
5
5
  import {usePaginationModel, UsePaginationModelConfig} from './usePaginationModel';
@@ -78,7 +78,7 @@ Pagination.Controls = (props: ControlsProps) => {
78
78
  };
79
79
 
80
80
  Pagination.JumpToFirstButton = (
81
- props: IconButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
81
+ props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
82
82
  ) => {
83
83
  // The linter doesn't recognize the dot syntax, so we're disabling the rule
84
84
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -87,7 +87,7 @@ Pagination.JumpToFirstButton = (
87
87
  };
88
88
 
89
89
  Pagination.StepToPreviousButton = (
90
- props: IconButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
90
+ props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
91
91
  ) => {
92
92
  // The linter doesn't recognize the dot syntax, so we're disabling the rule
93
93
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -96,7 +96,7 @@ Pagination.StepToPreviousButton = (
96
96
  };
97
97
 
98
98
  Pagination.StepToNextButton = (
99
- props: IconButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
99
+ props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
100
100
  ) => {
101
101
  // The linter doesn't recognize the dot syntax, so we're disabling the rule
102
102
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -105,7 +105,7 @@ Pagination.StepToNextButton = (
105
105
  };
106
106
 
107
107
  Pagination.JumpToLastButton = (
108
- props: IconButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
108
+ props: TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>
109
109
  ) => {
110
110
  // The linter doesn't recognize the dot syntax, so we're disabling the rule
111
111
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -78,7 +78,7 @@ export const PopupCard = createComponent('div')({
78
78
  transformOrigin={transformOrigin}
79
79
  position="relative"
80
80
  padding="l"
81
- depth={2}
81
+ depth={5}
82
82
  maxWidth={`calc(100vw - ${space.l})`}
83
83
  spacing={0}
84
84
  flexDirection="column"
@@ -8,14 +8,13 @@ import {
8
8
  useModelContext,
9
9
  ExtractProps,
10
10
  } from '@workday/canvas-kit-react/common';
11
- import {IconButton} from '@workday/canvas-kit-react/button';
11
+ import {TertiaryButton} from '@workday/canvas-kit-react/button';
12
12
 
13
13
  import {usePopupCloseButton, PopupModel, PopupModelContext} from './hooks';
14
14
 
15
- const closeIconSpacing = 11;
16
- const closeIconSpacingSmall = 9;
15
+ const closeIconSpacing = 4;
17
16
 
18
- export interface PopupCloseIconProps extends ExtractProps<typeof IconButton, never> {
17
+ export interface PopupCloseIconProps extends ExtractProps<typeof TertiaryButton, never> {
19
18
  /**
20
19
  * Optionally pass a model directly to this component. Default is to implicitly use the same
21
20
  * model as the container component which uses React context. Only use this for advanced use-cases
@@ -23,13 +22,13 @@ export interface PopupCloseIconProps extends ExtractProps<typeof IconButton, nev
23
22
  model?: PopupModel;
24
23
  }
25
24
 
26
- const StyledCloseIcon = styled(IconButton)<StyledType & PopupCloseIconProps>(
25
+ const StyledCloseIcon = styled(TertiaryButton)<StyledType & PopupCloseIconProps>(
27
26
  {
28
27
  position: 'absolute',
29
28
  },
30
29
  ({size}) => ({
31
- right: size === 'small' ? closeIconSpacingSmall : closeIconSpacing,
32
- top: size === 'small' ? closeIconSpacingSmall : closeIconSpacing,
30
+ right: closeIconSpacing,
31
+ top: closeIconSpacing,
33
32
  })
34
33
  );
35
34
 
@@ -42,6 +41,6 @@ export const PopupCloseIcon = createComponent('button')({
42
41
  ) => {
43
42
  const localModel = useModelContext(PopupModelContext, model);
44
43
  const props = usePopupCloseButton(localModel, elemProps, ref);
45
- return <StyledCloseIcon as={Element} variant="plain" size={size} icon={xIcon} {...props} />;
44
+ return <StyledCloseIcon as={Element} size={size} icon={xIcon} {...props} />;
46
45
  },
47
46
  });
@@ -16,11 +16,17 @@ export const useDisableBodyScroll = (model: PopupModel, elemProps = {}) => {
16
16
  if (!visible) {
17
17
  return;
18
18
  }
19
+
20
+ const overflowY = document.body.style.overflowY;
21
+ const overflowX = document.body.style.overflowX;
19
22
  const overflow = document.body.style.overflow;
23
+
20
24
  document.body.style.overflow = 'hidden';
21
25
 
22
26
  return () => {
23
27
  document.body.style.overflow = overflow;
28
+ document.body.style.overflowY = overflowY;
29
+ document.body.style.overflowX = overflowX;
24
30
  };
25
31
  }, [visible]);
26
32
 
@@ -14,17 +14,16 @@ yarn add @workday/canvas-kit-react
14
14
  ```tsx
15
15
  import * as React from 'react';
16
16
  import {SegmentedControl} from '@workday/canvas-kit-react/segmented-control';
17
- import {IconButton} from '@workday/canvas-kit-react/button';
18
17
  import {listViewIcon, worksheetsIcon} from '@workday/canvas-system-icons-web';
19
18
 
20
19
  <SegmentedControl>
21
- <IconButton icon={listViewIcon} aria-label="List View" value="list-view" />
22
- <IconButton icon={worksheetsIcon} aria-label="Table view" value="table-view" />
20
+ <SegmentedControl.Button icon={listViewIcon} aria-label="List View" value="list-view" />
21
+ <SegmentedControl.Button icon={worksheetsIcon} aria-label="Table view" value="table-view" />
23
22
  </SegmentedControl>;
24
23
  ```
25
24
 
26
- **Note:** while managing state using a unique `value` for each `IconButton` child is encouraged, you
27
- can also use indexes and omit the `value` field. It is strongly recommended to not mix these two
25
+ **Note:** while managing state using a unique `value` for each `Button` child is encouraged, you can
26
+ also use indexes and omit the `value` field. It is strongly recommended to not mix these two
28
27
  methods.
29
28
 
30
29
  ## Static Properties
@@ -35,9 +34,9 @@ methods.
35
34
 
36
35
  ### Required
37
36
 
38
- #### `children: React.ReactElement<IconButton>[]`
37
+ #### `children:React.ReactElement<SegmentedControlButtonProps>[]`
39
38
 
40
- > Icon buttons to toggle between.
39
+ > Buttons to toggle between.
41
40
 
42
41
  ---
43
42
 
@@ -45,8 +44,8 @@ methods.
45
44
 
46
45
  #### `value: string | number`
47
46
 
48
- > Identify which item is selected (toggled=true). If a string is passed, the IconButton with the
49
- > corresponding value will be selected. If a number is passed, the IconButton with the corresponding
47
+ > Identify which item is selected (toggled=true). If a string is passed, the Button with the
48
+ > corresponding value will be selected. If a number is passed, the Button with the corresponding
50
49
  > index will be selected.
51
50
 
52
51
  ---
@@ -1,19 +1,19 @@
1
1
  import * as React from 'react';
2
- import {borderRadius, colors} from '@workday/canvas-kit-react/tokens';
3
- import {IconButton, IconButtonProps} from '@workday/canvas-kit-react/button';
4
- import {mouseFocusBehavior, styled} from '@workday/canvas-kit-react/common';
2
+
3
+ import {createComponent} from '@workday/canvas-kit-react/common';
4
+ import {SegmentedControlButton, SegmentedControlButtonProps} from './SegmentedControlButton';
5
5
 
6
6
  export interface SegmentedControlProps {
7
7
  /**
8
- * The IconButton children of the SegmentedControl (must be at least two).
8
+ * The Button children of the SegmentedControl (must be at least two).
9
9
  * TODO: Add support for text children
10
10
  */
11
- children: React.ReactElement<IconButtonProps>[];
11
+ children: React.ReactElement<SegmentedControlButtonProps>[];
12
12
 
13
13
  /**
14
- * The value or index of the IconButton that the SegmentedControl should be toggled on to.
15
- * If a string is provided, the IconButton with the corresponding value will be selected.
16
- * If a number is provided, the IconButton with the corresponding index will be selected.
14
+ * The value or index of the Button that the SegmentedControl should be toggled on to.
15
+ * If a string is provided, the Button with the corresponding value will be selected.
16
+ * If a number is provided, the Button with the corresponding index will be selected.
17
17
  * @default 0
18
18
  */
19
19
  value?: string | number;
@@ -26,54 +26,6 @@ export interface SegmentedControlProps {
26
26
  onChange?: (value: string | number) => void;
27
27
  }
28
28
 
29
- const SegmentedControlContainer = styled('div')(
30
- {
31
- '& button': {
32
- borderRadius: borderRadius.zero,
33
- border: `1px solid ${colors.soap500}`,
34
- borderLeft: 'none',
35
- '&[aria-pressed="true"]': {
36
- borderColor: colors.blueberry400,
37
- '&:hover, &:focus:hover': {
38
- background: colors.blueberry400,
39
- },
40
- },
41
- '&:first-of-type': {
42
- borderRadius: `${borderRadius.m} 0 0 ${borderRadius.m}`,
43
- borderLeft: `1px solid ${colors.soap500}`,
44
- },
45
- '&:last-of-type': {
46
- borderRadius: `0 ${borderRadius.m} ${borderRadius.m} 0`,
47
- },
48
- '&:focus': {
49
- borderRadius: borderRadius.m,
50
- zIndex: 1,
51
- animation: 'none', // reset focusRing animation
52
- transition: 'all 120ms, border-radius 1ms',
53
- ...mouseFocusBehavior({
54
- '&': {
55
- borderRadius: borderRadius.zero,
56
- '&:first-of-type': {
57
- borderRadius: `${borderRadius.m} 0 0 ${borderRadius.m}`,
58
- },
59
- '&:last-of-type': {
60
- borderRadius: `0 ${borderRadius.m} ${borderRadius.m} 0`,
61
- },
62
- },
63
- }),
64
- },
65
- },
66
- },
67
- ({theme}) => ({
68
- '& button[aria-pressed="true"]': {
69
- borderColor: theme.canvas.palette.primary.main,
70
- '&:hover, &:focus:hover': {
71
- background: theme.canvas.palette.primary.main,
72
- },
73
- },
74
- })
75
- );
76
-
77
29
  const onButtonClick = (
78
30
  existingOnClick: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined,
79
31
  onChange: ((value: string | number) => void) | undefined,
@@ -94,28 +46,37 @@ const onButtonClick = (
94
46
  }
95
47
  };
96
48
 
97
- const SegmentedControl = ({value = 0, children, onChange, ...elemProps}: SegmentedControlProps) => (
98
- <SegmentedControlContainer {...elemProps}>
99
- {React.Children.map(
100
- children,
101
- (
102
- child: React.ReactElement<
103
- IconButtonProps & {onClick?: React.MouseEventHandler<HTMLButtonElement>} // IconButton will have correct props
104
- >,
105
- index: number
106
- ) => {
107
- if (typeof child.type === typeof IconButton) {
108
- return React.cloneElement(child, {
109
- toggled: typeof value === 'number' ? index === value : child.props.value === value,
110
- variant: 'squareFilled',
111
- onClick: onButtonClick.bind(undefined, child.props.onClick, onChange, index),
112
- });
113
- }
49
+ export const SegmentedControl = createComponent('div')({
50
+ displayName: 'SegmentedControl',
51
+ Component: ({value = 0, children, onChange, ...elemProps}: SegmentedControlProps, ref) => {
52
+ return (
53
+ <div {...elemProps}>
54
+ {React.Children.map(
55
+ children,
56
+ (
57
+ child: React.ReactElement<
58
+ SegmentedControlButtonProps & {
59
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
60
+ } & React.HTMLAttributes<HTMLButtonElement> // segmented control button will have correct props
61
+ >,
62
+ index: number
63
+ ) => {
64
+ if (typeof child.type === typeof SegmentedControlButton) {
65
+ return React.cloneElement(child, {
66
+ toggled: typeof value === 'number' ? index === value : child.props.value === value,
67
+ onClick: onButtonClick.bind(undefined, child.props.onClick, onChange, index),
68
+ });
69
+ }
114
70
 
115
- return child;
116
- }
117
- )}
118
- </SegmentedControlContainer>
119
- );
71
+ return child;
72
+ }
73
+ )}
74
+ </div>
75
+ );
76
+ },
77
+ subComponents: {
78
+ Button: SegmentedControlButton,
79
+ },
80
+ });
120
81
 
121
82
  export default SegmentedControl;
@@ -0,0 +1,109 @@
1
+ import React from 'react';
2
+ import {BaseButton, ButtonColors} from '@workday/canvas-kit-react/button';
3
+ import {
4
+ createComponent,
5
+ mouseFocusBehavior,
6
+ styled,
7
+ StyledType,
8
+ } from '@workday/canvas-kit-react/common';
9
+ import {CanvasSystemIcon} from '@workday/design-assets-types';
10
+ import {colors, borderRadius, space} from '@workday/canvas-kit-react/tokens';
11
+
12
+ const getIconButtonColors = (toggled?: boolean): ButtonColors => {
13
+ return {
14
+ default: {
15
+ background: toggled ? colors.blueberry400 : colors.soap200,
16
+ icon: toggled ? colors.frenchVanilla100 : colors.licorice200,
17
+ },
18
+ hover: {
19
+ background: toggled ? colors.blueberry400 : colors.soap300,
20
+ icon: toggled ? colors.frenchVanilla100 : colors.licorice500,
21
+ },
22
+ active: {
23
+ background: toggled ? colors.blueberry400 : colors.soap500,
24
+ icon: toggled ? colors.frenchVanilla100 : colors.licorice500,
25
+ },
26
+ focus: {
27
+ background: toggled ? colors.blueberry400 : undefined,
28
+ icon: toggled ? colors.frenchVanilla100 : colors.licorice500,
29
+ },
30
+ disabled: {
31
+ background: toggled ? colors.soap100 : colors.soap100,
32
+ icon: colors.soap600,
33
+ opacity: '1',
34
+ },
35
+ };
36
+ };
37
+
38
+ const StyledButton = styled(BaseButton)<StyledType>(
39
+ {
40
+ borderRadius: borderRadius.zero,
41
+ border: `1px solid ${colors.soap500}`,
42
+ borderLeft: 'none',
43
+ minWidth: space.xl,
44
+ '&:first-of-type': {
45
+ borderRadius: `${borderRadius.m} 0 0 ${borderRadius.m}`,
46
+ borderLeft: `1px solid ${colors.soap500}`,
47
+ },
48
+ '&:last-of-type': {
49
+ borderRadius: `0 ${borderRadius.m} ${borderRadius.m} 0`,
50
+ },
51
+ '&[aria-pressed="true"]': {
52
+ borderColor: `${colors.blueberry400} !important`,
53
+ '&:hover, &:focus:hover': {
54
+ background: colors.blueberry400,
55
+ },
56
+ },
57
+ '&:focus': {
58
+ borderRadius: borderRadius.m,
59
+ zIndex: 1,
60
+ animation: 'none', // reset focusRing animation
61
+ transition: 'all 120ms, border-radius 1ms',
62
+ ...mouseFocusBehavior({
63
+ '&': {
64
+ borderRadius: borderRadius.zero,
65
+ '&:first-of-type': {
66
+ borderRadius: `${borderRadius.m} 0 0 ${borderRadius.m}`,
67
+ },
68
+ '&:last-of-type': {
69
+ borderRadius: `0 ${borderRadius.m} ${borderRadius.m} 0`,
70
+ },
71
+ },
72
+ }),
73
+ },
74
+ },
75
+ ({theme}) => ({
76
+ '[aria-pressed="true"]': {
77
+ borderColor: theme.canvas.palette.primary.main,
78
+ '&:hover, &:focus:hover': {
79
+ background: theme.canvas.palette.primary.main,
80
+ },
81
+ },
82
+ })
83
+ );
84
+
85
+ export interface SegmentedControlButtonProps {
86
+ toggled?: boolean;
87
+ icon: CanvasSystemIcon;
88
+ value?: string | number;
89
+ }
90
+
91
+ export const SegmentedControlButton = createComponent('button')({
92
+ displayName: 'Button',
93
+ Component: ({value, icon, toggled, ...props}: SegmentedControlButtonProps, ref, Element) => {
94
+ console.warn(props);
95
+ return (
96
+ <StyledButton
97
+ as={Element}
98
+ aria-pressed={toggled}
99
+ value={value}
100
+ colors={getIconButtonColors(toggled)}
101
+ fillIcon={toggled}
102
+ ref={ref}
103
+ {...props}
104
+ >
105
+ <BaseButton.Icon size="large" icon={icon} />
106
+ </StyledButton>
107
+ );
108
+ },
109
+ });
@@ -15,7 +15,7 @@ yarn add @workday/canvas-kit-react
15
15
 
16
16
  ```tsx
17
17
  import * as React from 'react';
18
- import {SecondaryButton, IconButton} from '@workday/canvas-kit-react/button';
18
+ import {SecondaryButton, TertiaryButton} from '@workday/canvas-kit-react/button';
19
19
  import SidePanel from '@workday/canvas-kit-react/side-panel';
20
20
 
21
21
  interface SidePanelState {
@@ -41,9 +41,9 @@ class SidePanelExample extends React.Component<{}, SidePanelState> {
41
41
  {open ? (
42
42
  <SecondaryButton variant="primary">Add New</SecondaryButton>
43
43
  ) : (
44
- <IconButton size="small" variant="filled">
44
+ <TertiaryButton size="small" variant="filled">
45
45
  <SystemIcon icon={plusIcon} />
46
- </IconButton>
46
+ </TertiaryButton>
47
47
  )}
48
48
  <ul>
49
49
  <li css={listItemStyles}>{open && <span>Home</span>}</li>
@@ -4,7 +4,7 @@ import throttle from 'lodash/throttle';
4
4
 
5
5
  import {CanvasSystemIcon} from '@workday/design-assets-types';
6
6
  import {colors, space, type, CanvasSpaceValues} from '@workday/canvas-kit-react/tokens';
7
- import {IconButton, IconButtonProps} from '@workday/canvas-kit-react/button';
7
+ import {TertiaryButton, TertiaryButtonProps} from '@workday/canvas-kit-react/button';
8
8
  import {chevronLeftIcon, chevronRightIcon} from '@workday/canvas-system-icons-web';
9
9
 
10
10
  export interface SidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -141,7 +141,9 @@ const ChildrenContainer = styled('div')<Pick<SidePanelProps, 'openWidth' | 'open
141
141
  })
142
142
  );
143
143
 
144
- const ToggleButton = styled(IconButton)<IconButtonProps & Pick<SidePanelProps, 'openDirection'>>(
144
+ const ToggleButton = styled(TertiaryButton)<
145
+ TertiaryButtonProps & Pick<SidePanelProps, 'openDirection'>
146
+ >(
145
147
  {
146
148
  position: 'absolute',
147
149
  bottom: space.s,
@@ -220,11 +222,8 @@ export default class SidePanel extends React.Component<SidePanelProps, SidePanel
220
222
  <ToggleButton
221
223
  openDirection={openDirection}
222
224
  aria-label={open ? closeNavigationAriaLabel : openNavigationAriaLabel}
223
- toggled={false}
224
- size="small"
225
225
  onClick={this.onToggleClick}
226
226
  icon={this.toggleButtonDirection(open, openDirection)}
227
- variant="circleFilled"
228
227
  />
229
228
  )}
230
229
  </SidePanelFooter>
@@ -47,7 +47,7 @@ export const TabsList = createComponent('div')({
47
47
  as={Element}
48
48
  position="relative"
49
49
  borderBottom={`1px solid ${commonColors.divider}`}
50
- marginX="m"
50
+ paddingX="m"
51
51
  spacing="xxxs"
52
52
  {...props}
53
53
  >
@@ -5,7 +5,7 @@ import {space} from '@workday/canvas-kit-react/tokens';
5
5
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
6
6
 
7
7
  export interface InputIconContainerProps extends GrowthBehavior {
8
- icon?: React.ReactElement<SystemIcon>;
8
+ icon?: React.ReactElement<typeof SystemIcon>;
9
9
  }
10
10
 
11
11
  const Container = styled('div')<InputIconContainerProps>(({grow}) => ({
@@ -92,6 +92,7 @@ export const Toast = createComponent('div')({
92
92
  as={Element}
93
93
  width={toastWidth}
94
94
  padding="s"
95
+ depth={5}
95
96
  role={isInteractive ? 'dialog' : 'status'}
96
97
  aria-live={isInteractive ? 'off' : 'polite'}
97
98
  aria-atomic={!isInteractive}
package/tokens/README.md CHANGED
@@ -174,16 +174,19 @@ const buttonSyles = {
174
174
 
175
175
  ## Depth
176
176
 
177
- Depth is the relative distance between surfaces in the z-axis. It provides delineation, focus, and priority with shadows and layering. There are five depth levels, `inset`, `1`, `2`, `3`, and `4`. Most levels only apply box-shadow styles, but `depth[4]` also applies border styles.
177
+ Depth is the relative distance between surfaces in the z-axis. It provides delineation, focus, and
178
+ priority with shadows and layering. There are seven depth levels, `none`, `1`, `2`, `3`, `4`, `5`
179
+ and `6`. `none` is a special value to remove depth styles. All other levels only apply box-shadow
180
+ styles.
178
181
 
179
182
  ### Usage
180
183
 
181
184
  ```tsx
182
- import { depth } from '@workday/canvas-kit-react/tokens';
185
+ import {depth} from '@workday/canvas-kit-react/tokens';
183
186
 
184
187
  const CustomCard = () => {
185
- return <div css={depth[2]}>A standard-depth card</div>;
186
- }
188
+ return <div css={depth[1]}>A standard-depth card</div>;
189
+ };
187
190
  ```
188
191
 
189
192
  ## Type
@@ -211,8 +214,8 @@ To use the Canvas Kit font
211
214
 
212
215
  Canvas Kit v5 introduced `rem` units (instead of `px`) to our type tokens. This update follows the
213
216
  guidance [from the WCAG spec](https://www.w3.org/TR/WCAG21/#resize-text) and provides better support
214
- for users who change their browser's default font size. If you'd like to learn more about `rem` and relative units, you can
215
- review this
217
+ for users who change their browser's default font size. If you'd like to learn more about `rem` and
218
+ relative units, you can review this
216
219
  [documentation](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#ems_and_rems).
217
220
 
218
221
  > **Note:** We are using `16px` as our base font-size for these values. This is a browser standard
@@ -299,8 +302,8 @@ _Intended for standard body text_
299
302
 
300
303
  _Intended for small subtext content or in tight spaces_
301
304
 
302
- | Size | Properties |
303
- | -------- | ----------------------------------------------------- |
305
+ | Size | Properties |
306
+ | -------- | ------------------------------------------------------------ |
304
307
  | `large` | fontSize: `14px` (`0.875rem`), fontWeight: `regular` (`400`) |
305
308
  | `medium` | fontSize: `12px` (`0.75rem`), fontWeight: `regular` (`400`) |
306
309
  | `small` | fontSize: `10px` (`0.625rem`), fontWeight: `regular` (`400`) |