@workday/canvas-kit-react 7.0.0-alpha.0-next.7 → 7.0.0-alpha.78-next.6

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 (321) 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 +44 -66
  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/common/lib/parts/_brand-assets.ts +5 -5
  17. package/common/lib/utils/StaticStates.tsx +6 -5
  18. package/dist/commonjs/banner/lib/BannerIcon.js +2 -2
  19. package/dist/commonjs/button/index.d.ts +1 -1
  20. package/dist/commonjs/button/index.d.ts.map +1 -1
  21. package/dist/commonjs/button/index.js +3 -3
  22. package/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
  23. package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -0
  24. package/dist/commonjs/button/lib/BaseButton.js +198 -0
  25. package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
  26. package/dist/commonjs/button/lib/DeleteButton.js +4 -3
  27. package/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
  28. package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
  29. package/dist/commonjs/button/lib/PrimaryButton.js +15 -36
  30. package/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
  31. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  32. package/dist/commonjs/button/lib/SecondaryButton.js +16 -38
  33. package/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
  34. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  35. package/dist/commonjs/button/lib/TertiaryButton.js +66 -38
  36. package/dist/commonjs/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
  37. package/dist/commonjs/button/lib/ToolbarDropdownButton.js +7 -7
  38. package/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
  39. package/dist/commonjs/button/lib/ToolbarIconButton.d.ts.map +1 -1
  40. package/dist/commonjs/button/lib/ToolbarIconButton.js +5 -11
  41. package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
  42. package/dist/commonjs/button/lib/parts/ButtonLabel.d.ts.map +1 -1
  43. package/dist/commonjs/button/lib/parts/ButtonLabel.js +35 -1
  44. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  45. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
  46. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.js +13 -62
  47. package/dist/commonjs/button/lib/parts/index.d.ts +0 -2
  48. package/dist/commonjs/button/lib/parts/index.d.ts.map +1 -1
  49. package/dist/commonjs/button/lib/parts/index.js +1 -5
  50. package/dist/commonjs/button/lib/types.d.ts +2 -2
  51. package/dist/commonjs/button/lib/types.d.ts.map +1 -1
  52. package/dist/commonjs/common/lib/parts/_brand-assets.d.ts.map +1 -1
  53. package/dist/commonjs/common/lib/parts/_brand-assets.js +5 -5
  54. package/dist/commonjs/common/lib/utils/StaticStates.d.ts.map +1 -1
  55. package/dist/commonjs/common/lib/utils/StaticStates.js +5 -2
  56. package/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
  57. package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
  58. package/dist/commonjs/icon/lib/AccentIcon.js +8 -24
  59. package/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
  60. package/dist/commonjs/icon/lib/AppletIcon.d.ts.map +1 -1
  61. package/dist/commonjs/icon/lib/AppletIcon.js +13 -27
  62. package/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
  63. package/dist/commonjs/icon/lib/Graphic.d.ts.map +1 -1
  64. package/dist/commonjs/icon/lib/Graphic.js +8 -24
  65. package/dist/commonjs/icon/lib/Icon.d.ts +2 -5
  66. package/dist/commonjs/icon/lib/Icon.d.ts.map +1 -1
  67. package/dist/commonjs/icon/lib/Icon.js +10 -25
  68. package/dist/commonjs/icon/lib/Svg.d.ts +4 -6
  69. package/dist/commonjs/icon/lib/Svg.d.ts.map +1 -1
  70. package/dist/commonjs/icon/lib/Svg.js +11 -27
  71. package/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
  72. package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
  73. package/dist/commonjs/icon/lib/SystemIcon.js +8 -24
  74. package/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
  75. package/dist/commonjs/icon/lib/SystemIconCircle.d.ts.map +1 -1
  76. package/dist/commonjs/icon/lib/SystemIconCircle.js +7 -25
  77. package/dist/commonjs/layout/lib/Box.d.ts +17 -0
  78. package/dist/commonjs/layout/lib/Box.d.ts.map +1 -1
  79. package/dist/commonjs/layout/lib/Box.js +41 -1
  80. package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
  81. package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
  82. package/dist/commonjs/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  83. package/dist/commonjs/pagination/lib/Pagination/Controls.js +4 -4
  84. package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
  85. package/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
  86. package/dist/commonjs/pagination/lib/Pagination/PageButton.js +34 -9
  87. package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
  88. package/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
  89. package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
  90. package/dist/commonjs/popup/lib/PopupCloseIcon.d.ts.map +1 -1
  91. package/dist/commonjs/popup/lib/PopupCloseIcon.js +5 -6
  92. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
  93. package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +4 -0
  94. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
  95. package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  96. package/dist/commonjs/segmented-control/lib/SegmentedControl.js +21 -57
  97. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  98. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
  99. package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +106 -0
  100. package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
  101. package/dist/commonjs/side-panel/lib/SidePanel.js +2 -2
  102. package/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
  103. package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
  104. package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
  105. package/dist/commonjs/tabs/lib/TabsList.js +1 -1
  106. package/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
  107. package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
  108. package/dist/commonjs/tabs/lib/menu/MenuItem.d.ts.map +1 -1
  109. package/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
  110. package/dist/commonjs/text-input/lib/InputIconContainer.d.ts.map +1 -1
  111. package/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
  112. package/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
  113. package/dist/es6/banner/lib/BannerIcon.js +2 -2
  114. package/dist/es6/button/index.d.ts +1 -1
  115. package/dist/es6/button/index.d.ts.map +1 -1
  116. package/dist/es6/button/index.js +1 -1
  117. package/dist/es6/button/lib/BaseButton.d.ts +31 -0
  118. package/dist/es6/button/lib/BaseButton.d.ts.map +1 -0
  119. package/dist/es6/button/lib/BaseButton.js +174 -0
  120. package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
  121. package/dist/es6/button/lib/DeleteButton.js +4 -3
  122. package/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
  123. package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
  124. package/dist/es6/button/lib/PrimaryButton.js +15 -35
  125. package/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
  126. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  127. package/dist/es6/button/lib/SecondaryButton.js +16 -38
  128. package/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
  129. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  130. package/dist/es6/button/lib/TertiaryButton.js +68 -40
  131. package/dist/es6/button/lib/ToolbarDropdownButton.d.ts.map +1 -1
  132. package/dist/es6/button/lib/ToolbarDropdownButton.js +8 -8
  133. package/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
  134. package/dist/es6/button/lib/ToolbarIconButton.d.ts.map +1 -1
  135. package/dist/es6/button/lib/ToolbarIconButton.js +7 -13
  136. package/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
  137. package/dist/es6/button/lib/parts/ButtonLabel.d.ts.map +1 -1
  138. package/dist/es6/button/lib/parts/ButtonLabel.js +33 -2
  139. package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  140. package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
  141. package/dist/es6/button/lib/parts/ButtonLabelIcon.js +13 -42
  142. package/dist/es6/button/lib/parts/index.d.ts +0 -2
  143. package/dist/es6/button/lib/parts/index.d.ts.map +1 -1
  144. package/dist/es6/button/lib/parts/index.js +0 -2
  145. package/dist/es6/button/lib/types.d.ts +2 -2
  146. package/dist/es6/button/lib/types.d.ts.map +1 -1
  147. package/dist/es6/common/lib/parts/_brand-assets.d.ts.map +1 -1
  148. package/dist/es6/common/lib/parts/_brand-assets.js +5 -5
  149. package/dist/es6/common/lib/utils/StaticStates.d.ts.map +1 -1
  150. package/dist/es6/common/lib/utils/StaticStates.js +5 -2
  151. package/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
  152. package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
  153. package/dist/es6/icon/lib/AccentIcon.js +8 -24
  154. package/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
  155. package/dist/es6/icon/lib/AppletIcon.d.ts.map +1 -1
  156. package/dist/es6/icon/lib/AppletIcon.js +11 -25
  157. package/dist/es6/icon/lib/Graphic.d.ts +3 -5
  158. package/dist/es6/icon/lib/Graphic.d.ts.map +1 -1
  159. package/dist/es6/icon/lib/Graphic.js +8 -24
  160. package/dist/es6/icon/lib/Icon.d.ts +2 -5
  161. package/dist/es6/icon/lib/Icon.d.ts.map +1 -1
  162. package/dist/es6/icon/lib/Icon.js +8 -24
  163. package/dist/es6/icon/lib/Svg.d.ts +4 -6
  164. package/dist/es6/icon/lib/Svg.d.ts.map +1 -1
  165. package/dist/es6/icon/lib/Svg.js +10 -27
  166. package/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
  167. package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
  168. package/dist/es6/icon/lib/SystemIcon.js +8 -24
  169. package/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
  170. package/dist/es6/icon/lib/SystemIconCircle.d.ts.map +1 -1
  171. package/dist/es6/icon/lib/SystemIconCircle.js +8 -26
  172. package/dist/es6/layout/lib/Box.d.ts +17 -0
  173. package/dist/es6/layout/lib/Box.d.ts.map +1 -1
  174. package/dist/es6/layout/lib/Box.js +39 -0
  175. package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
  176. package/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
  177. package/dist/es6/pagination/lib/Pagination/Controls.d.ts.map +1 -1
  178. package/dist/es6/pagination/lib/Pagination/Controls.js +5 -5
  179. package/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
  180. package/dist/es6/pagination/lib/Pagination/PageButton.d.ts.map +1 -1
  181. package/dist/es6/pagination/lib/Pagination/PageButton.js +35 -10
  182. package/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
  183. package/dist/es6/pagination/lib/Pagination/Pagination.d.ts.map +1 -1
  184. package/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
  185. package/dist/es6/popup/lib/PopupCloseIcon.d.ts.map +1 -1
  186. package/dist/es6/popup/lib/PopupCloseIcon.js +6 -7
  187. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.d.ts.map +1 -1
  188. package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +4 -0
  189. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
  190. package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
  191. package/dist/es6/segmented-control/lib/SegmentedControl.js +20 -57
  192. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  193. package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +1 -0
  194. package/dist/es6/segmented-control/lib/SegmentedControlButton.js +100 -0
  195. package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
  196. package/dist/es6/side-panel/lib/SidePanel.js +3 -3
  197. package/dist/es6/tabs/lib/Tabs.d.ts +2 -2
  198. package/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
  199. package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
  200. package/dist/es6/tabs/lib/TabsList.js +1 -1
  201. package/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
  202. package/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
  203. package/dist/es6/tabs/lib/menu/MenuItem.d.ts.map +1 -1
  204. package/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
  205. package/dist/es6/text-input/lib/InputIconContainer.d.ts.map +1 -1
  206. package/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
  207. package/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
  208. package/icon/README.md +0 -30
  209. package/icon/lib/AccentIcon.tsx +17 -16
  210. package/icon/lib/AppletIcon.tsx +18 -12
  211. package/icon/lib/Graphic.tsx +15 -8
  212. package/icon/lib/Icon.tsx +10 -8
  213. package/icon/lib/Svg.tsx +12 -14
  214. package/icon/lib/SystemIcon.tsx +21 -12
  215. package/icon/lib/SystemIconCircle.tsx +17 -14
  216. package/layout/lib/Box.tsx +40 -0
  217. package/modal/lib/ModalOverflowOverlay.tsx +1 -1
  218. package/package.json +5 -5
  219. package/pagination/lib/Pagination/Controls.tsx +6 -10
  220. package/pagination/lib/Pagination/PageButton.tsx +38 -17
  221. package/pagination/lib/Pagination/Pagination.tsx +5 -5
  222. package/popup/lib/PopupCloseIcon.tsx +7 -8
  223. package/popup/lib/hooks/useDisableBodyScroll.ts +6 -0
  224. package/segmented-control/README.md +8 -9
  225. package/segmented-control/lib/SegmentedControl.tsx +39 -78
  226. package/segmented-control/lib/SegmentedControlButton.tsx +109 -0
  227. package/side-panel/README.md +3 -3
  228. package/side-panel/lib/SidePanel.tsx +4 -5
  229. package/tabs/lib/TabsList.tsx +1 -1
  230. package/text-input/lib/InputIconContainer.tsx +1 -1
  231. package/tooltip/README.md +6 -5
  232. package/tooltip/lib/Tooltip.tsx +1 -1
  233. package/tooltip/lib/useTooltip.tsx +1 -1
  234. package/ts3.5/dist/commonjs/button/index.d.ts +1 -1
  235. package/ts3.5/dist/commonjs/button/lib/BaseButton.d.ts +31 -0
  236. package/ts3.5/dist/commonjs/button/lib/PrimaryButton.d.ts +4 -76
  237. package/ts3.5/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
  238. package/ts3.5/dist/commonjs/button/lib/TertiaryButton.d.ts +2 -2
  239. package/ts3.5/dist/commonjs/button/lib/ToolbarIconButton.d.ts +5 -2
  240. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabel.d.ts +4 -4
  241. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  242. package/ts3.5/dist/commonjs/button/lib/parts/index.d.ts +0 -2
  243. package/ts3.5/dist/commonjs/button/lib/types.d.ts +2 -2
  244. package/ts3.5/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -5
  245. package/ts3.5/dist/commonjs/icon/lib/AppletIcon.d.ts +5 -6
  246. package/ts3.5/dist/commonjs/icon/lib/Graphic.d.ts +3 -5
  247. package/ts3.5/dist/commonjs/icon/lib/Icon.d.ts +2 -5
  248. package/ts3.5/dist/commonjs/icon/lib/Svg.d.ts +4 -6
  249. package/ts3.5/dist/commonjs/icon/lib/SystemIcon.d.ts +5 -6
  250. package/ts3.5/dist/commonjs/icon/lib/SystemIconCircle.d.ts +3 -6
  251. package/ts3.5/dist/commonjs/layout/lib/Box.d.ts +17 -0
  252. package/ts3.5/dist/commonjs/pagination/lib/Pagination/Controls.d.ts +2 -2
  253. package/ts3.5/dist/commonjs/pagination/lib/Pagination/PageButton.d.ts +1 -2
  254. package/ts3.5/dist/commonjs/pagination/lib/Pagination/Pagination.d.ts +5 -5
  255. package/ts3.5/dist/commonjs/popup/lib/PopupCloseIcon.d.ts +2 -2
  256. package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +9 -7
  257. package/ts3.5/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  258. package/ts3.5/dist/commonjs/tabs/lib/Tabs.d.ts +2 -2
  259. package/ts3.5/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -2
  260. package/ts3.5/dist/commonjs/tabs/lib/menu/Menu.d.ts +1 -1
  261. package/ts3.5/dist/commonjs/tabs/lib/menu/MenuItem.d.ts +1 -2
  262. package/ts3.5/dist/commonjs/text-input/lib/InputIconContainer.d.ts +1 -1
  263. package/ts3.5/dist/commonjs/tooltip/lib/Tooltip.d.ts +1 -1
  264. package/ts3.5/dist/commonjs/tooltip/lib/useTooltip.d.ts +1 -1
  265. package/ts3.5/dist/es6/button/index.d.ts +1 -1
  266. package/ts3.5/dist/es6/button/lib/BaseButton.d.ts +31 -0
  267. package/ts3.5/dist/es6/button/lib/PrimaryButton.d.ts +4 -76
  268. package/ts3.5/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
  269. package/ts3.5/dist/es6/button/lib/TertiaryButton.d.ts +2 -2
  270. package/ts3.5/dist/es6/button/lib/ToolbarIconButton.d.ts +5 -2
  271. package/ts3.5/dist/es6/button/lib/parts/ButtonLabel.d.ts +4 -4
  272. package/ts3.5/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +4 -3
  273. package/ts3.5/dist/es6/button/lib/parts/index.d.ts +0 -2
  274. package/ts3.5/dist/es6/button/lib/types.d.ts +2 -2
  275. package/ts3.5/dist/es6/icon/lib/AccentIcon.d.ts +3 -5
  276. package/ts3.5/dist/es6/icon/lib/AppletIcon.d.ts +5 -6
  277. package/ts3.5/dist/es6/icon/lib/Graphic.d.ts +3 -5
  278. package/ts3.5/dist/es6/icon/lib/Icon.d.ts +2 -5
  279. package/ts3.5/dist/es6/icon/lib/Svg.d.ts +4 -6
  280. package/ts3.5/dist/es6/icon/lib/SystemIcon.d.ts +5 -6
  281. package/ts3.5/dist/es6/icon/lib/SystemIconCircle.d.ts +3 -6
  282. package/ts3.5/dist/es6/layout/lib/Box.d.ts +17 -0
  283. package/ts3.5/dist/es6/pagination/lib/Pagination/Controls.d.ts +2 -2
  284. package/ts3.5/dist/es6/pagination/lib/Pagination/PageButton.d.ts +1 -2
  285. package/ts3.5/dist/es6/pagination/lib/Pagination/Pagination.d.ts +5 -5
  286. package/ts3.5/dist/es6/popup/lib/PopupCloseIcon.d.ts +2 -2
  287. package/ts3.5/dist/es6/segmented-control/lib/SegmentedControl.d.ts +9 -7
  288. package/ts3.5/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +8 -0
  289. package/ts3.5/dist/es6/tabs/lib/Tabs.d.ts +2 -2
  290. package/ts3.5/dist/es6/tabs/lib/TabsItem.d.ts +1 -2
  291. package/ts3.5/dist/es6/tabs/lib/menu/Menu.d.ts +1 -1
  292. package/ts3.5/dist/es6/tabs/lib/menu/MenuItem.d.ts +1 -2
  293. package/ts3.5/dist/es6/text-input/lib/InputIconContainer.d.ts +1 -1
  294. package/ts3.5/dist/es6/tooltip/lib/Tooltip.d.ts +1 -1
  295. package/ts3.5/dist/es6/tooltip/lib/useTooltip.d.ts +1 -1
  296. package/button/lib/IconButton.tsx +0 -279
  297. package/button/lib/parts/ButtonLabelData.tsx +0 -16
  298. package/dist/commonjs/button/lib/IconButton.d.ts +0 -44
  299. package/dist/commonjs/button/lib/IconButton.d.ts.map +0 -1
  300. package/dist/commonjs/button/lib/IconButton.js +0 -219
  301. package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
  302. package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts.map +0 -1
  303. package/dist/commonjs/button/lib/parts/ButtonContainer.js +0 -126
  304. package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
  305. package/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
  306. package/dist/commonjs/button/lib/parts/ButtonLabelData.js +0 -45
  307. package/dist/es6/button/lib/IconButton.d.ts +0 -44
  308. package/dist/es6/button/lib/IconButton.d.ts.map +0 -1
  309. package/dist/es6/button/lib/IconButton.js +0 -197
  310. package/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
  311. package/dist/es6/button/lib/parts/ButtonContainer.d.ts.map +0 -1
  312. package/dist/es6/button/lib/parts/ButtonContainer.js +0 -120
  313. package/dist/es6/button/lib/parts/ButtonLabelData.d.ts +0 -3
  314. package/dist/es6/button/lib/parts/ButtonLabelData.d.ts.map +0 -1
  315. package/dist/es6/button/lib/parts/ButtonLabelData.js +0 -22
  316. package/ts3.5/dist/commonjs/button/lib/IconButton.d.ts +0 -44
  317. package/ts3.5/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +0 -33
  318. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelData.d.ts +0 -3
  319. package/ts3.5/dist/es6/button/lib/IconButton.d.ts +0 -44
  320. package/ts3.5/dist/es6/button/lib/parts/ButtonContainer.d.ts +0 -33
  321. 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
@@ -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}) => ({
package/tooltip/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  A Tooltip component that renders information/text when the user hovers over an element. A tooltip is
4
4
  used to label or describe an element. By default, a tooltip will label an element. This is useful
5
- for IconButtons. A tooltip can also be used to describe additional information about an element
5
+ for TertiaryButtons that render just an icon. A tooltip can also be used to describe additional
6
+ information about an element
6
7
 
7
8
  [> Workday Design Reference](https://design.workday.com/components/popups/tooltips)
8
9
 
@@ -18,12 +19,12 @@ yarn add @workday/canvas-kit-react
18
19
  import * as React from 'react';
19
20
 
20
21
  import {Tooltip} from '@workday/canvas-kit-react/tooltip';
21
- import {IconButton} from '@workday/canvas-kit-react/button';
22
+ import {TertiaryButton} from '@workday/canvas-kit-react/button';
22
23
 
23
24
  const TooltipExample = () => {
24
25
  return (
25
26
  <Tooltip title="Close">
26
- <IconButton variant="circle" icon={xIcon} aria-label="Close" />
27
+ <TertiaryButton icon={xIcon} aria-label="Close" />
27
28
  </Tooltip>
28
29
  );
29
30
  };
@@ -60,8 +61,8 @@ const TooltipExample = () => {
60
61
  > Determines the tooltip type for accessibility.
61
62
  >
62
63
  > - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip `title`
63
- > prop is the same as the text content of the wrapped element. E.g. IconButtons or Ellipsis
64
- > tooltips.
64
+ > prop is the same as the text content of the wrapped element. E.g. TertiaryButtons that render an
65
+ > icon or Ellipsis tooltips.
65
66
  > - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
66
67
  > information about the target. **Note**: Assistive technology may ignore `describe` techniques
67
68
  > based on verbosity settings. Consider an alternate way to inform a user of additional important
@@ -31,7 +31,7 @@ export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
31
31
  * Determines the tooltip type for accessibility.
32
32
  *
33
33
  * - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
34
- * `title` prop is the same as the text content of the wrapped element. E.g. IconButtons or
34
+ * `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButtons that render an icon or
35
35
  * Ellipsis tooltips.
36
36
  * - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
37
37
  * information about the target.
@@ -62,7 +62,7 @@ export function useTooltip<T extends Element = Element>({
62
62
  * Determines the tooltip type for accessibility.
63
63
  *
64
64
  * - `label`: Sets the accessible name for the wrapped element. Use for icons or if tooltip
65
- * `title` prop is the same as the text content of the wrapped element. E.g. IconButtons or
65
+ * `title` prop is the same as the text content of the wrapped element. E.g. TertiaryButton that renders an icon or
66
66
  * Ellipsis tooltips.
67
67
  * - `describe`: Sets `aria-describedby` of the wrapped element. Use if the tooltip has additional
68
68
  * information about the target.
@@ -3,9 +3,9 @@ export { SecondaryButton, SecondaryButtonProps } from './lib/SecondaryButton';
3
3
  export { TertiaryButton, TertiaryButtonProps } from './lib/TertiaryButton';
4
4
  export { DeleteButton, DeleteButtonProps } from './lib/DeleteButton';
5
5
  export { DeprecatedButton as deprecated_Button, DeprecatedButtonProps, } from './lib/deprecated_Button';
6
- export { IconButton, IconButtonProps } from './lib/IconButton';
7
6
  export { ToolbarIconButton, ToolbarIconButtonProps } from './lib/ToolbarIconButton';
8
7
  export { ToolbarDropdownButton, ToolbarDropdownButtonProps } from './lib/ToolbarDropdownButton';
9
8
  export { Hyperlink, HyperlinkProps } from './lib/Hyperlink';
9
+ export { BaseButton, ButtonContainerProps } from './lib/BaseButton';
10
10
  export * from './lib/types';
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { GrowthBehavior } from '@workday/canvas-kit-react/common';
3
+ import { BoxProps } from '@workday/canvas-kit-react/layout';
4
+ import { ButtonColors, ButtonSizes, IconPositions, TertiaryButtonSizes } from './types';
5
+ import { CanvasSystemIcon } from '@workday/design-assets-types';
6
+ export interface ButtonContainerProps extends BoxProps, GrowthBehavior {
7
+ colors?: ButtonColors;
8
+ /**
9
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
10
+ * If no size is provided, it will default to `medium`.
11
+ *
12
+ * @default 'medium'
13
+ */
14
+ size?: ButtonSizes;
15
+ /**
16
+ * The ref to the button that the styled component renders.
17
+ */
18
+ ref?: React.Ref<HTMLButtonElement>;
19
+ /**
20
+ * Whether the icon should received filled (colored background layer) or regular styles.
21
+ * Corresponds to `toggled` in ToolbarIconButton
22
+ */
23
+ fillIcon?: boolean;
24
+ }
25
+ export declare const getMinWidthStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes) => "24px" | "32px" | "40px" | "80px" | "auto" | "48px" | "112px" | "96px";
26
+ export declare const getPaddingStyles: (children: React.ReactNode, size: ButtonSizes | TertiaryButtonSizes, icon: CanvasSystemIcon | undefined, iconPosition: IconPositions | undefined) => string | 0;
27
+ export declare const BaseButton: import("../../common").ElementComponent<"button", ButtonContainerProps> & {
28
+ Icon: import("../../common").ElementComponent<"span", import("./parts/ButtonLabelIcon").ButtonLabelIconProps>;
29
+ Label: import("../../common").ElementComponent<"span", import("./parts/ButtonLabel").ButtonLabelProps>;
30
+ };
31
+ //# sourceMappingURL=BaseButton.d.ts.map