@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,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { BrandingColor } from '@workday/canvas-kit-react/tokens';
3
2
  import { CanvasAppletIcon } from '@workday/design-assets-types';
4
3
  import { CSSObject } from '@emotion/styled';
@@ -11,7 +10,7 @@ export interface AppletIconStyles {
11
10
  color?: BrandingColor;
12
11
  }
13
12
  export declare const appletIconStyles: ({ color, }: AppletIconStyles) => CSSObject;
14
- export interface AppletIconProps extends AppletIconStyles, Pick<IconProps, 'iconRef' | 'shouldMirror'> {
13
+ export interface AppletIconProps extends AppletIconStyles, Pick<IconProps, 'shouldMirror'> {
15
14
  /**
16
15
  * The icon to display from `@workday/canvas-applet-icons-web`.
17
16
  */
@@ -22,8 +21,8 @@ export interface AppletIconProps extends AppletIconStyles, Pick<IconProps, 'icon
22
21
  */
23
22
  size?: number;
24
23
  }
25
- export default class AppletIcon extends React.Component<AppletIconProps> {
26
- static Colors: typeof BrandingColor;
27
- render(): JSX.Element;
28
- }
24
+ export declare const AppletIcon: import("../../common").ElementComponent<"span", AppletIconProps> & {
25
+ Colors: typeof BrandingColor;
26
+ };
27
+ export default AppletIcon;
29
28
  //# sourceMappingURL=AppletIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppletIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AppletIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AACpF,OAAO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,eAAO,MAAM,UAAU;;CAuBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -1,16 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __assign = (this && this.__assign) || function () {
15
2
  __assign = Object.assign || function(t) {
16
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -37,6 +24,7 @@ import * as React from 'react';
37
24
  import { colors, BrandingColor } from '@workday/canvas-kit-react/tokens';
38
25
  import { CanvasIconTypes } from '@workday/design-assets-types';
39
26
  import Icon from './Icon';
27
+ import { createComponent } from '../../common';
40
28
  export var appletIconStyles = function (_a) {
41
29
  var _b = _a.color, color = _b === void 0 ? BrandingColor.Blueberry : _b;
42
30
  // Check if valid color
@@ -73,16 +61,14 @@ export var appletIconStyles = function (_a) {
73
61
  },
74
62
  };
75
63
  };
76
- var AppletIcon = /** @class */ (function (_super) {
77
- __extends(AppletIcon, _super);
78
- function AppletIcon() {
79
- return _super !== null && _super.apply(this, arguments) || this;
80
- }
81
- AppletIcon.prototype.render = function () {
82
- var _a = this.props, _b = _a.size, size = _b === void 0 ? 92 : _b, icon = _a.icon, color = _a.color, iconRef = _a.iconRef, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["size", "icon", "color", "iconRef", "shouldMirror"]);
83
- return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.Applet, styles: appletIconStyles({ color: color }), size: size, iconRef: iconRef, shouldMirror: shouldMirror }, elemProps)));
84
- };
85
- AppletIcon.Colors = BrandingColor;
86
- return AppletIcon;
87
- }(React.Component));
64
+ export var AppletIcon = createComponent('span')({
65
+ displayName: 'AppletIcon',
66
+ Component: function (_a, ref, Element) {
67
+ var _b = _a.size, size = _b === void 0 ? 92 : _b, icon = _a.icon, color = _a.color, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["size", "icon", "color", "shouldMirror"]);
68
+ return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.Applet, styles: appletIconStyles({ color: color }), as: Element, size: size, ref: ref, shouldMirror: shouldMirror }, elemProps)));
69
+ },
70
+ subComponents: {
71
+ Colors: BrandingColor,
72
+ },
73
+ });
88
74
  export default AppletIcon;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { CanvasGraphic } from '@workday/design-assets-types';
3
2
  import { CSSObject } from '@emotion/styled';
4
3
  import { SvgProps } from './Svg';
@@ -19,14 +18,13 @@ export interface GraphicStyles {
19
18
  */
20
19
  grow?: boolean;
21
20
  }
22
- export interface GraphicProps extends GraphicStyles, Pick<SvgProps, 'iconRef' | 'shouldMirror'> {
21
+ export interface GraphicProps extends GraphicStyles, Pick<SvgProps, 'shouldMirror'> {
23
22
  /**
24
23
  * The graphic to display from `@workday/canvas-graphics-web`.
25
24
  */
26
25
  src: CanvasGraphic;
27
26
  }
28
27
  export declare const graphicStyles: ({ width, height, grow }: GraphicStyles) => CSSObject;
29
- export default class Graphic extends React.Component<GraphicProps> {
30
- render(): JSX.Element;
31
- }
28
+ declare const Graphic: import("../../common").ElementComponent<"span", GraphicProps>;
29
+ export default Graphic;
32
30
  //# sourceMappingURL=Graphic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Graphic.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Graphic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAkB,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAA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,eAAe,OAAO,CAAC"}
@@ -1,16 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __assign = (this && this.__assign) || function () {
15
2
  __assign = Object.assign || function(t) {
16
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -36,6 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
36
23
  import * as React from 'react';
37
24
  import { CanvasIconTypes } from '@workday/design-assets-types';
38
25
  import Svg from './Svg';
26
+ import { createComponent } from '../../common';
39
27
  export var graphicStyles = function (_a) {
40
28
  var width = _a.width, height = _a.height, grow = _a.grow;
41
29
  if (grow) {
@@ -65,15 +53,11 @@ export var graphicStyles = function (_a) {
65
53
  }
66
54
  return {};
67
55
  };
68
- var Graphic = /** @class */ (function (_super) {
69
- __extends(Graphic, _super);
70
- function Graphic() {
71
- return _super !== null && _super.apply(this, arguments) || this;
72
- }
73
- Graphic.prototype.render = function () {
74
- var _a = this.props, _b = _a.grow, grow = _b === void 0 ? false : _b, src = _a.src, width = _a.width, height = _a.height, iconRef = _a.iconRef, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["grow", "src", "width", "height", "iconRef", "shouldMirror"]);
75
- return (React.createElement(Svg, __assign({ src: src, styles: graphicStyles({ width: width, height: height, grow: grow }), type: CanvasIconTypes.Graphic, iconRef: iconRef, shouldMirror: shouldMirror }, elemProps)));
76
- };
77
- return Graphic;
78
- }(React.Component));
56
+ var Graphic = createComponent('span')({
57
+ displayName: 'Graphic',
58
+ Component: function (_a, ref, Element) {
59
+ var _b = _a.grow, grow = _b === void 0 ? false : _b, src = _a.src, width = _a.width, height = _a.height, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["grow", "src", "width", "height", "shouldMirror"]);
60
+ return (React.createElement(Svg, __assign({ src: src, styles: graphicStyles({ width: width, height: height, grow: grow }), type: CanvasIconTypes.Graphic, as: Element, ref: ref, shouldMirror: shouldMirror }, elemProps)));
61
+ },
62
+ });
79
63
  export default Graphic;
@@ -1,13 +1,10 @@
1
- import * as React from 'react';
2
1
  import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
3
2
  import { SvgProps } from './Svg';
4
3
  export interface IconProps extends SvgProps {
5
4
  src: CanvasIcon;
6
5
  size?: number;
7
6
  type: CanvasIconTypes.Accent | CanvasIconTypes.Applet | CanvasIconTypes.System;
8
- iconRef?: React.Ref<HTMLSpanElement>;
9
- }
10
- export default class Icon extends React.Component<IconProps> {
11
- render(): JSX.Element;
12
7
  }
8
+ export declare const Icon: import("../../common").ElementComponent<"span", IconProps>;
9
+ export default Icon;
13
10
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;IAC/E,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IACnD,MAAM;CAuBd"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAY,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;CAChF;AAED,eAAO,MAAM,IAAI,4DAwBf,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,16 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __assign = (this && this.__assign) || function () {
15
2
  __assign = Object.assign || function(t) {
16
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -35,13 +22,11 @@ var __rest = (this && this.__rest) || function (s, e) {
35
22
  };
36
23
  import * as React from 'react';
37
24
  import Svg from './Svg';
38
- var Icon = /** @class */ (function (_super) {
39
- __extends(Icon, _super);
40
- function Icon() {
41
- return _super !== null && _super.apply(this, arguments) || this;
42
- }
43
- Icon.prototype.render = function () {
44
- var _a = this.props, src = _a.src, size = _a.size, styles = _a.styles, type = _a.type, iconRef = _a.iconRef, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["src", "size", "styles", "type", "iconRef", "shouldMirror"]);
25
+ import { createComponent } from '../../common';
26
+ export var Icon = createComponent('span')({
27
+ displayName: 'Icon',
28
+ Component: function (_a, ref, Element) {
29
+ var src = _a.src, size = _a.size, styles = _a.styles, type = _a.type, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["src", "size", "styles", "type", "shouldMirror"]);
45
30
  var iconStyles = __assign({}, styles);
46
31
  if (size) {
47
32
  iconStyles['& svg'] = {
@@ -49,8 +34,7 @@ var Icon = /** @class */ (function (_super) {
49
34
  height: size,
50
35
  };
51
36
  }
52
- return (React.createElement(Svg, __assign({ src: src, type: type, shouldMirror: shouldMirror }, elemProps, { styles: iconStyles, iconRef: iconRef })));
53
- };
54
- return Icon;
55
- }(React.Component));
37
+ return (React.createElement(Svg, __assign({ src: src, type: type, shouldMirror: shouldMirror, as: Element }, elemProps, { ref: ref, styles: iconStyles })));
38
+ },
39
+ });
56
40
  export default Icon;
@@ -1,18 +1,16 @@
1
1
  import { CSSObject } from '@emotion/styled';
2
- import * as React from 'react';
3
2
  import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
4
- export interface SvgProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ import { BoxProps } from '@workday/canvas-kit-react/layout';
4
+ export interface SvgProps extends BoxProps {
5
5
  src: CanvasIcon;
6
6
  styles?: CSSObject;
7
7
  type: CanvasIconTypes;
8
- iconRef?: React.Ref<HTMLSpanElement>;
9
8
  /**
10
9
  * If set to `true`, transform the SVG's x-axis to mirror the graphic
11
10
  * @default false
12
11
  */
13
12
  shouldMirror?: boolean;
14
13
  }
15
- export default class Svg extends React.Component<SvgProps> {
16
- render(): JSX.Element | null;
17
- }
14
+ export declare const Svg: import("../../common").ElementComponent<"span", SvgProps>;
15
+ export default Svg;
18
16
  //# sourceMappingURL=Svg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAIzE,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACrE,GAAG,EAAE,UAAU,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAaD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;IACjD,MAAM;CAed"}
1
+ {"version":3,"file":"Svg.d.ts","sourceRoot":"","sources":["../../../../icon/lib/Svg.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAAM,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAE/D,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACxC,GAAG,EAAE,UAAU,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAaD,eAAO,MAAM,GAAG,2DAYd,CAAC;AAEH,eAAe,GAAG,CAAC"}
@@ -1,16 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __assign = (this && this.__assign) || function () {
15
2
  __assign = Object.assign || function(t) {
16
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -35,22 +22,19 @@ var __rest = (this && this.__rest) || function (s, e) {
35
22
  };
36
23
  import * as React from 'react';
37
24
  import { validateIconType } from './utils';
38
- import { styled } from '@workday/canvas-kit-react/common';
39
- var StyledIconSpan = styled('span')({
25
+ import { createComponent, styled } from '@workday/canvas-kit-react/common';
26
+ import { Box } from '@workday/canvas-kit-react/layout';
27
+ var StyledIconSpan = styled(Box.as('span'))({
40
28
  display: 'inline-block',
41
29
  '> svg': { display: 'block' },
42
30
  }, function (_a) {
43
31
  var shouldMirror = _a.shouldMirror, styles = _a.styles;
44
32
  return (__assign({ transform: shouldMirror ? 'scaleX(-1)' : undefined }, styles));
45
33
  });
46
- var Svg = /** @class */ (function (_super) {
47
- __extends(Svg, _super);
48
- function Svg() {
49
- return _super !== null && _super.apply(this, arguments) || this;
50
- }
51
- Svg.prototype.render = function () {
52
- var _a = this.props, src = _a.src, type = _a.type, iconRef = _a.iconRef, elemProps = __rest(_a, ["src", "type", "iconRef"]);
53
- // Validation for JS
34
+ export var Svg = createComponent('span')({
35
+ displayName: 'Svg',
36
+ Component: function (_a, ref, Element) {
37
+ var src = _a.src, type = _a.type, elemProps = __rest(_a, ["src", "type"]);
54
38
  try {
55
39
  validateIconType(src, type);
56
40
  }
@@ -58,8 +42,7 @@ var Svg = /** @class */ (function (_super) {
58
42
  console.error(e);
59
43
  return null;
60
44
  }
61
- return (React.createElement(StyledIconSpan, __assign({}, elemProps, { dangerouslySetInnerHTML: { __html: src.svg }, ref: iconRef })));
62
- };
63
- return Svg;
64
- }(React.Component));
45
+ return React.createElement(StyledIconSpan, __assign({ dangerouslySetInnerHTML: { __html: src.svg } }, elemProps, { ref: ref }));
46
+ },
47
+ });
65
48
  export default Svg;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { CanvasSystemIcon } from '@workday/design-assets-types';
3
2
  import { CSSObject } from '@emotion/styled';
4
3
  import { IconProps } from './Icon';
@@ -40,7 +39,7 @@ export interface SystemIconStyles {
40
39
  */
41
40
  fillHover?: string;
42
41
  }
43
- export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src' | 'type'> {
42
+ export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src' | 'color' | 'type' | 'background'> {
44
43
  /**
45
44
  * The icon to display from `@workday/canvas-system-icons-web`.
46
45
  */
@@ -48,10 +47,10 @@ export interface SystemIconProps extends SystemIconStyles, Omit<IconProps, 'src'
48
47
  /**
49
48
  * The size of the SystemIcon in `px`.
50
49
  */
51
- size?: number;
50
+ size?: number | undefined;
51
+ className?: string;
52
52
  }
53
53
  export declare const systemIconStyles: ({ accent, accentHover, background, backgroundHover, color, colorHover, fill, fillHover, }: SystemIconStyles) => CSSObject;
54
- export default class SystemIcon extends React.Component<SystemIconProps> {
55
- render(): JSX.Element;
56
- }
54
+ declare const SystemIcon: import("../../common").ElementComponent<"span", SystemIconProps>;
55
+ export default SystemIcon;
57
56
  //# sourceMappingURL=SystemIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAa,EAAC,SAAS,EAAC,MAAM,QAAQ,CAAC;AAEvC,MAAM,WAAW,gBAA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G;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IAC1D;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,QAAA,MAAM,UAAU,kEA4Cd,CAAC;AAEH,eAAe,UAAU,CAAC"}
@@ -1,16 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __assign = (this && this.__assign) || function () {
15
2
  __assign = Object.assign || function(t) {
16
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -37,6 +24,7 @@ import * as React from 'react';
37
24
  import { iconColors } from '@workday/canvas-kit-react/tokens';
38
25
  import { CanvasIconTypes } from '@workday/design-assets-types';
39
26
  import Icon from './Icon';
27
+ import { createComponent } from '../../common';
40
28
  export var systemIconStyles = function (_a) {
41
29
  var accent = _a.accent, accentHover = _a.accentHover, _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, fill = _a.fill, fillHover = _a.fillHover;
42
30
  return ({
@@ -60,13 +48,10 @@ export var systemIconStyles = function (_a) {
60
48
  },
61
49
  });
62
50
  };
63
- var SystemIcon = /** @class */ (function (_super) {
64
- __extends(SystemIcon, _super);
65
- function SystemIcon() {
66
- return _super !== null && _super.apply(this, arguments) || this;
67
- }
68
- SystemIcon.prototype.render = function () {
69
- var _a = this.props, _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, icon = _a.icon, iconRef = _a.iconRef, accent = _a.accent, accentHover = _a.accentHover, fill = _a.fill, fillHover = _a.fillHover, size = _a.size, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "backgroundHover", "color", "colorHover", "icon", "iconRef", "accent", "accentHover", "fill", "fillHover", "size", "shouldMirror"]);
51
+ var SystemIcon = createComponent('span')({
52
+ displayName: 'SystemIcon',
53
+ Component: function (_a, ref, Element) {
54
+ var _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, icon = _a.icon, accent = _a.accent, accentHover = _a.accentHover, fill = _a.fill, fillHover = _a.fillHover, size = _a.size, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "backgroundHover", "color", "colorHover", "icon", "accent", "accentHover", "fill", "fillHover", "size", "shouldMirror"]);
70
55
  var style = systemIconStyles({
71
56
  accent: accent,
72
57
  accentHover: accentHover,
@@ -77,8 +62,7 @@ var SystemIcon = /** @class */ (function (_super) {
77
62
  fill: fill,
78
63
  fillHover: fillHover,
79
64
  });
80
- return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.System, size: size, styles: style, iconRef: iconRef, shouldMirror: shouldMirror }, elemProps)));
81
- };
82
- return SystemIcon;
83
- }(React.Component));
65
+ return (React.createElement(Icon, __assign({ src: icon, type: CanvasIconTypes.System, size: size, as: Element, shouldMirror: shouldMirror, ref: ref, styles: style }, elemProps)));
66
+ },
67
+ });
84
68
  export default SystemIcon;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { SystemIconProps } from './SystemIcon';
3
2
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
3
  export declare enum SystemIconCircleSize {
@@ -9,7 +8,7 @@ export declare enum SystemIconCircleSize {
9
8
  xl = 64,
10
9
  xxl = 120
11
10
  }
12
- export interface SystemIconCircleProps extends Pick<SystemIconProps, 'iconRef' | 'shouldMirror'> {
11
+ export interface SystemIconCircleProps extends Pick<SystemIconProps, 'shouldMirror'> {
13
12
  /**
14
13
  * The background color of the SystemIconCircle from `@workday/canvas-colors-web`.
15
14
  * @default colors.soap300
@@ -25,8 +24,6 @@ export interface SystemIconCircleProps extends Pick<SystemIconProps, 'iconRef' |
25
24
  */
26
25
  size?: SystemIconCircleSize | number;
27
26
  }
28
- export default class SystemIconCircle extends React.Component<SystemIconCircleProps> {
29
- static Size: typeof SystemIconCircleSize;
30
- render(): JSX.Element;
31
- }
27
+ declare const SystemIconCircle: import("../../common").ElementComponent<"span", SystemIconCircleProps>;
28
+ export default SystemIconCircle;
32
29
  //# sourceMappingURL=SystemIconCircle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAmB,EAAC,eAAe,EAAC,M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@@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __assign = (this && this.__assign) || function () {
15
2
  __assign = Object.assign || function(t) {
16
3
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -38,7 +25,7 @@ import styled from '@emotion/styled';
38
25
  import isPropValid from '@emotion/is-prop-valid';
39
26
  import { colors, borderRadius } from '@workday/canvas-kit-react/tokens';
40
27
  import SystemIcon from './SystemIcon';
41
- import { pickForegroundColor } from '@workday/canvas-kit-react/common';
28
+ import { createComponent, pickForegroundColor } from '@workday/canvas-kit-react/common';
42
29
  export var SystemIconCircleSize;
43
30
  (function (SystemIconCircleSize) {
44
31
  SystemIconCircleSize[SystemIconCircleSize["xs"] = 16] = "xs";
@@ -75,19 +62,14 @@ var Container = styled('div', {
75
62
  height: size,
76
63
  });
77
64
  });
78
- var SystemIconCircle = /** @class */ (function (_super) {
79
- __extends(SystemIconCircle, _super);
80
- function SystemIconCircle() {
81
- return _super !== null && _super.apply(this, arguments) || this;
82
- }
83
- SystemIconCircle.prototype.render = function () {
84
- var _a = this.props, _b = _a.background, background = _b === void 0 ? colors.soap200 : _b, _c = _a.size, size = _c === void 0 ? SystemIconCircleSize.l : _c, icon = _a.icon, iconRef = _a.iconRef, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "size", "icon", "iconRef", "shouldMirror"]);
65
+ var SystemIconCircle = createComponent('span')({
66
+ displayName: 'SystemIconCircle',
67
+ Component: function (_a, ref, Element) {
68
+ var _b = _a.background, background = _b === void 0 ? colors.soap200 : _b, _c = _a.size, size = _c === void 0 ? SystemIconCircleSize.l : _c, icon = _a.icon, shouldMirror = _a.shouldMirror, elemProps = __rest(_a, ["background", "size", "icon", "shouldMirror"]);
85
69
  var iconColor = pickForegroundColor(background, 'rgba(0,0,0,0.65)', colors.frenchVanilla100);
86
70
  var iconSize = size * 0.625;
87
71
  return (React.createElement(Container, __assign({ background: background, size: size }, elemProps),
88
- React.createElement(SystemIcon, { icon: icon, color: iconColor, colorHover: iconColor, size: iconSize, iconRef: iconRef, shouldMirror: shouldMirror })));
89
- };
90
- SystemIconCircle.Size = SystemIconCircleSize;
91
- return SystemIconCircle;
92
- }(React.Component));
72
+ React.createElement(SystemIcon, { icon: icon, color: iconColor, colorHover: iconColor, as: Element, size: iconSize, ref: ref, shouldMirror: shouldMirror })));
73
+ },
74
+ });
93
75
  export default SystemIconCircle;
@@ -10,6 +10,23 @@ import { SpaceStyleProps } from './utils/space';
10
10
  export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & {
11
11
  children?: React.ReactNode;
12
12
  };
13
+ /**
14
+ * A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
15
+ * Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
16
+ * @example
17
+ * import { boxStyleFn } from '@workday/canvas-kit-react/layout';
18
+ * const StyledHeader = styled('h1')(
19
+ * boxStyleFn,
20
+ * {
21
+ * fontWeight: 400,
22
+ * }
23
+ * )
24
+ *
25
+ * ....
26
+ *
27
+ * <StyledHeader color='red'>Hello World</StyledHeader>
28
+ */
29
+ export declare const boxStyleFn: <P extends BoxProps>(props: P) => {};
13
30
  /**
14
31
  * `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
15
32
  * It is highly flexible, and its primary purpose is to build other components.
@@ -1 +1 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../layout/lib/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O,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AAErD,oBAAY,QAAQ,GAAG,gBAAgB,GACrC,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,eAAe,GAAG;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAQJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,UAAU,sCAsBtB,CAAC;AA+BF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,unBAad,CAAC"}
@@ -37,6 +37,45 @@ var omittedProps = ['display', 'color', 'height', 'overflow', 'width', 'border',
37
37
  var shouldForwardProp = function (prop) {
38
38
  return isPropValid(prop) && !omittedProps.includes(prop);
39
39
  };
40
+ /**
41
+ * A function that allows us to call Box styles on an element and reduce the amount of elements in the React Dom tree.
42
+ * Instead of using the `as` in a styled function, you can just call this instead to pass those props to the styled element
43
+ * @example
44
+ * import { boxStyleFn } from '@workday/canvas-kit-react/layout';
45
+ * const StyledHeader = styled('h1')(
46
+ * boxStyleFn,
47
+ * {
48
+ * fontWeight: 400,
49
+ * }
50
+ * )
51
+ *
52
+ * ....
53
+ *
54
+ * <StyledHeader color='red'>Hello World</StyledHeader>
55
+ */
56
+ export var boxStyleFn = function (props) {
57
+ return [
58
+ {
59
+ boxSizing: 'border-box',
60
+ },
61
+ border,
62
+ color,
63
+ depth,
64
+ flexItem,
65
+ layout,
66
+ position,
67
+ space,
68
+ ].reduce(function (result, style) {
69
+ // @ts-ignore
70
+ var temp = typeof style === 'function' ? style(props) : style;
71
+ // eslint-disable-next-line guard-for-in
72
+ for (var key in temp) {
73
+ // @ts-ignore
74
+ result[key] = temp[key];
75
+ }
76
+ return result;
77
+ }, {});
78
+ };
40
79
  // Meant to be used with elements. The `shouldForwardProps` will remove all style props
41
80
  var StyledBoxElement = styled('div', { shouldForwardProp: shouldForwardProp })({
42
81
  boxSizing: 'border-box',
@@ -31,6 +31,6 @@ export var ModalOverflowOverlay = createComponent('div')({
31
31
  displayName: 'Modal.OverflowOverlay',
32
32
  Component: function (_a, ref, Element) {
33
33
  var children = _a.children, model = _a.model, elemProps = __rest(_a, ["children", "model"]);
34
- return (React.createElement(StyledOverlay, __assign({ as: Element, ref: ref, overflow: "auto" }, elemProps), children));
34
+ return (React.createElement(StyledOverlay, __assign({ as: Element, ref: ref, overflowX: "hidden", overflowY: "auto" }, elemProps), children));
35
35
  },
36
36
  });
@@ -1,7 +1,7 @@
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
  import { PaginationModel } from './types';
4
- export declare type ControlButtonProps = IconButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
4
+ export declare type ControlButtonProps = TertiaryButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
5
5
  model: PaginationModel;
6
6
  };
7
7
  export declare type ControlsProps = React.HTMLAttributes<HTMLDivElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../../../pagination/lib/Pagination/Controls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAa,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAQ7E,OAAO,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAIxC,oBAAY,kBAAkB,GAAG,eAAe,GAC9C,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC9C,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAEJ,oBAAY,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,QAAQ,4DAMpB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qCAAoC,kBAAkB,gBAqBnF,CAAC;AAEF,eAAO,MAAM,oBAAoB,qCAAo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