@workday/canvas-kit-labs-react 7.0.0-alpha.0-next.3 → 7.0.0-alpha.0-next.7

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 (299) hide show
  1. package/combobox/lib/Combobox.tsx +5 -3
  2. package/common/index.ts +0 -8
  3. package/dist/commonjs/combobox/index.js +12 -4
  4. package/dist/commonjs/combobox/lib/AutocompleteList.d.ts.map +1 -1
  5. package/dist/commonjs/combobox/lib/AutocompleteList.js +19 -7
  6. package/dist/commonjs/combobox/lib/Combobox.d.ts.map +1 -1
  7. package/dist/commonjs/combobox/lib/Combobox.js +27 -12
  8. package/dist/commonjs/combobox/lib/Status.d.ts.map +1 -1
  9. package/dist/commonjs/combobox/lib/Status.js +14 -2
  10. package/dist/commonjs/common/index.d.ts +0 -8
  11. package/dist/commonjs/common/index.d.ts.map +1 -1
  12. package/dist/commonjs/common/index.js +14 -7
  13. package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.d.ts.map +1 -1
  14. package/dist/commonjs/common/lib/storybook-utils/ComponentStatesTable.js +3 -1
  15. package/dist/commonjs/common/lib/storybook-utils/permutateProps.d.ts.map +1 -1
  16. package/dist/commonjs/common/lib/storybook-utils/permutateProps.js +3 -1
  17. package/dist/commonjs/common/lib/theming/index.js +12 -5
  18. package/dist/commonjs/common/lib/theming/useThemeRTL.d.ts.map +1 -1
  19. package/dist/commonjs/common/lib/theming/useThemeRTL.js +1 -0
  20. package/dist/commonjs/common/lib/theming/useThemedRing.d.ts +1 -1
  21. package/dist/commonjs/common/lib/theming/useThemedRing.d.ts.map +1 -1
  22. package/dist/commonjs/common/lib/theming/useThemedRing.js +3 -1
  23. package/dist/commonjs/drawer/index.js +12 -4
  24. package/dist/commonjs/drawer/lib/Drawer.js +21 -8
  25. package/dist/commonjs/drawer/lib/DrawerHeader.js +20 -8
  26. package/dist/commonjs/index.d.ts +0 -2
  27. package/dist/commonjs/index.d.ts.map +1 -1
  28. package/dist/commonjs/index.js +14 -9
  29. package/dist/commonjs/search-form/index.js +12 -5
  30. package/dist/commonjs/search-form/lib/SearchForm.d.ts +3 -2
  31. package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -1
  32. package/dist/commonjs/search-form/lib/SearchForm.js +21 -8
  33. package/dist/commonjs/search-form/lib/themes.d.ts.map +1 -1
  34. package/dist/commonjs/search-form/lib/themes.js +1 -0
  35. package/dist/es6/combobox/lib/AutocompleteList.d.ts.map +1 -1
  36. package/dist/es6/combobox/lib/Combobox.d.ts.map +1 -1
  37. package/dist/es6/combobox/lib/Combobox.js +1 -1
  38. package/dist/es6/combobox/lib/Status.d.ts.map +1 -1
  39. package/dist/es6/common/index.d.ts +0 -8
  40. package/dist/es6/common/index.d.ts.map +1 -1
  41. package/dist/es6/common/index.js +0 -1
  42. package/dist/es6/common/lib/storybook-utils/ComponentStatesTable.d.ts.map +1 -1
  43. package/dist/es6/common/lib/storybook-utils/permutateProps.d.ts.map +1 -1
  44. package/dist/es6/common/lib/storybook-utils/propTypes.js +1 -0
  45. package/dist/es6/common/lib/theming/useThemeRTL.d.ts.map +1 -1
  46. package/dist/es6/common/lib/theming/useThemedRing.d.ts +1 -1
  47. package/dist/es6/common/lib/theming/useThemedRing.d.ts.map +1 -1
  48. package/dist/es6/drawer/lib/Drawer.js +1 -1
  49. package/dist/es6/drawer/lib/DrawerHeader.js +1 -1
  50. package/dist/es6/index.d.ts +0 -2
  51. package/dist/es6/index.d.ts.map +1 -1
  52. package/dist/es6/index.js +0 -2
  53. package/dist/es6/search-form/lib/SearchForm.d.ts +3 -2
  54. package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -1
  55. package/dist/es6/search-form/lib/SearchForm.js +1 -1
  56. package/dist/es6/search-form/lib/themes.d.ts.map +1 -1
  57. package/index.ts +0 -2
  58. package/package.json +6 -8
  59. package/search-form/lib/SearchForm.tsx +3 -3
  60. package/search-form/lib/themes.ts +2 -1
  61. package/ts3.5/dist/commonjs/common/index.d.ts +0 -8
  62. package/ts3.5/dist/commonjs/common/lib/theming/useThemedRing.d.ts +1 -1
  63. package/ts3.5/dist/commonjs/index.d.ts +0 -2
  64. package/ts3.5/dist/commonjs/search-form/lib/SearchForm.d.ts +3 -2
  65. package/ts3.5/dist/es6/common/index.d.ts +0 -8
  66. package/ts3.5/dist/es6/common/lib/theming/useThemedRing.d.ts +1 -1
  67. package/ts3.5/dist/es6/index.d.ts +0 -2
  68. package/ts3.5/dist/es6/search-form/lib/SearchForm.d.ts +3 -2
  69. package/common/lib/Box.tsx +0 -73
  70. package/common/lib/utils/border.ts +0 -263
  71. package/common/lib/utils/color.ts +0 -62
  72. package/common/lib/utils/depth.ts +0 -37
  73. package/common/lib/utils/flexItem.ts +0 -56
  74. package/common/lib/utils/layout.ts +0 -77
  75. package/common/lib/utils/other.ts +0 -20
  76. package/common/lib/utils/position.ts +0 -96
  77. package/common/lib/utils/space.ts +0 -207
  78. package/common/lib/utils/types.ts +0 -105
  79. package/dist/commonjs/common/lib/Box.d.ts +0 -31
  80. package/dist/commonjs/common/lib/Box.d.ts.map +0 -1
  81. package/dist/commonjs/common/lib/Box.js +0 -78
  82. package/dist/commonjs/common/lib/utils/border.d.ts +0 -103
  83. package/dist/commonjs/common/lib/utils/border.d.ts.map +0 -1
  84. package/dist/commonjs/common/lib/utils/border.js +0 -152
  85. package/dist/commonjs/common/lib/utils/color.d.ts +0 -26
  86. package/dist/commonjs/common/lib/utils/color.d.ts.map +0 -1
  87. package/dist/commonjs/common/lib/utils/color.js +0 -56
  88. package/dist/commonjs/common/lib/utils/depth.d.ts +0 -22
  89. package/dist/commonjs/common/lib/utils/depth.d.ts.map +0 -1
  90. package/dist/commonjs/common/lib/utils/depth.js +0 -28
  91. package/dist/commonjs/common/lib/utils/flexItem.d.ts +0 -33
  92. package/dist/commonjs/common/lib/utils/flexItem.d.ts.map +0 -1
  93. package/dist/commonjs/common/lib/utils/flexItem.js +0 -38
  94. package/dist/commonjs/common/lib/utils/layout.d.ts +0 -43
  95. package/dist/commonjs/common/lib/utils/layout.d.ts.map +0 -1
  96. package/dist/commonjs/common/lib/utils/layout.js +0 -42
  97. package/dist/commonjs/common/lib/utils/other.d.ts +0 -5
  98. package/dist/commonjs/common/lib/utils/other.d.ts.map +0 -1
  99. package/dist/commonjs/common/lib/utils/other.js +0 -18
  100. package/dist/commonjs/common/lib/utils/position.d.ts +0 -41
  101. package/dist/commonjs/common/lib/utils/position.d.ts.map +0 -1
  102. package/dist/commonjs/common/lib/utils/position.js +0 -77
  103. package/dist/commonjs/common/lib/utils/space.d.ts +0 -64
  104. package/dist/commonjs/common/lib/utils/space.d.ts.map +0 -1
  105. package/dist/commonjs/common/lib/utils/space.js +0 -160
  106. package/dist/commonjs/common/lib/utils/types.d.ts +0 -14
  107. package/dist/commonjs/common/lib/utils/types.d.ts.map +0 -1
  108. package/dist/commonjs/common/lib/utils/types.js +0 -2
  109. package/dist/commonjs/header/index.d.ts +0 -9
  110. package/dist/commonjs/header/index.d.ts.map +0 -1
  111. package/dist/commonjs/header/index.js +0 -16
  112. package/dist/commonjs/header/lib/GlobalHeader.d.ts +0 -38
  113. package/dist/commonjs/header/lib/GlobalHeader.d.ts.map +0 -1
  114. package/dist/commonjs/header/lib/GlobalHeader.js +0 -74
  115. package/dist/commonjs/header/lib/Header.d.ts +0 -76
  116. package/dist/commonjs/header/lib/Header.d.ts.map +0 -1
  117. package/dist/commonjs/header/lib/Header.js +0 -321
  118. package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +0 -30
  119. package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts.map +0 -1
  120. package/dist/commonjs/header/lib/parts/DubLogoTitle.js +0 -105
  121. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
  122. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts.map +0 -1
  123. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.js +0 -124
  124. package/dist/commonjs/header/lib/parts/index.d.ts +0 -3
  125. package/dist/commonjs/header/lib/parts/index.d.ts.map +0 -1
  126. package/dist/commonjs/header/lib/parts/index.js +0 -6
  127. package/dist/commonjs/header/lib/shared/themes.d.ts +0 -43
  128. package/dist/commonjs/header/lib/shared/themes.d.ts.map +0 -1
  129. package/dist/commonjs/header/lib/shared/themes.js +0 -62
  130. package/dist/commonjs/header/lib/shared/types.d.ts +0 -15
  131. package/dist/commonjs/header/lib/shared/types.d.ts.map +0 -1
  132. package/dist/commonjs/header/lib/shared/types.js +0 -19
  133. package/dist/commonjs/layout/index.d.ts +0 -5
  134. package/dist/commonjs/layout/index.d.ts.map +0 -1
  135. package/dist/commonjs/layout/index.js +0 -7
  136. package/dist/commonjs/layout/lib/Flex.d.ts +0 -26
  137. package/dist/commonjs/layout/lib/Flex.d.ts.map +0 -1
  138. package/dist/commonjs/layout/lib/Flex.js +0 -70
  139. package/dist/commonjs/layout/lib/Stack.d.ts +0 -27
  140. package/dist/commonjs/layout/lib/Stack.d.ts.map +0 -1
  141. package/dist/commonjs/layout/lib/Stack.js +0 -86
  142. package/dist/commonjs/layout/lib/utils/flex.d.ts +0 -36
  143. package/dist/commonjs/layout/lib/utils/flex.d.ts.map +0 -1
  144. package/dist/commonjs/layout/lib/utils/flex.js +0 -37
  145. package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +0 -3
  146. package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts.map +0 -1
  147. package/dist/commonjs/layout/lib/utils/getValidChildren.js +0 -16
  148. package/dist/commonjs/layout/lib/utils/stack.d.ts +0 -26
  149. package/dist/commonjs/layout/lib/utils/stack.d.ts.map +0 -1
  150. package/dist/commonjs/layout/lib/utils/stack.js +0 -54
  151. package/dist/commonjs/layout/lib/utils/types.d.ts +0 -8
  152. package/dist/commonjs/layout/lib/utils/types.d.ts.map +0 -1
  153. package/dist/commonjs/layout/lib/utils/types.js +0 -2
  154. package/dist/es6/common/lib/Box.d.ts +0 -31
  155. package/dist/es6/common/lib/Box.d.ts.map +0 -1
  156. package/dist/es6/common/lib/Box.js +0 -66
  157. package/dist/es6/common/lib/utils/border.d.ts +0 -103
  158. package/dist/es6/common/lib/utils/border.d.ts.map +0 -1
  159. package/dist/es6/common/lib/utils/border.js +0 -149
  160. package/dist/es6/common/lib/utils/color.d.ts +0 -26
  161. package/dist/es6/common/lib/utils/color.d.ts.map +0 -1
  162. package/dist/es6/common/lib/utils/color.js +0 -53
  163. package/dist/es6/common/lib/utils/depth.d.ts +0 -22
  164. package/dist/es6/common/lib/utils/depth.d.ts.map +0 -1
  165. package/dist/es6/common/lib/utils/depth.js +0 -25
  166. package/dist/es6/common/lib/utils/flexItem.d.ts +0 -33
  167. package/dist/es6/common/lib/utils/flexItem.d.ts.map +0 -1
  168. package/dist/es6/common/lib/utils/flexItem.js +0 -35
  169. package/dist/es6/common/lib/utils/layout.d.ts +0 -43
  170. package/dist/es6/common/lib/utils/layout.d.ts.map +0 -1
  171. package/dist/es6/common/lib/utils/layout.js +0 -39
  172. package/dist/es6/common/lib/utils/other.d.ts +0 -5
  173. package/dist/es6/common/lib/utils/other.d.ts.map +0 -1
  174. package/dist/es6/common/lib/utils/other.js +0 -15
  175. package/dist/es6/common/lib/utils/position.d.ts +0 -41
  176. package/dist/es6/common/lib/utils/position.d.ts.map +0 -1
  177. package/dist/es6/common/lib/utils/position.js +0 -74
  178. package/dist/es6/common/lib/utils/space.d.ts +0 -64
  179. package/dist/es6/common/lib/utils/space.d.ts.map +0 -1
  180. package/dist/es6/common/lib/utils/space.js +0 -157
  181. package/dist/es6/common/lib/utils/types.d.ts +0 -14
  182. package/dist/es6/common/lib/utils/types.d.ts.map +0 -1
  183. package/dist/es6/common/lib/utils/types.js +0 -0
  184. package/dist/es6/header/index.d.ts +0 -9
  185. package/dist/es6/header/index.d.ts.map +0 -1
  186. package/dist/es6/header/index.js +0 -8
  187. package/dist/es6/header/lib/GlobalHeader.d.ts +0 -38
  188. package/dist/es6/header/lib/GlobalHeader.d.ts.map +0 -1
  189. package/dist/es6/header/lib/GlobalHeader.js +0 -62
  190. package/dist/es6/header/lib/Header.d.ts +0 -76
  191. package/dist/es6/header/lib/Header.d.ts.map +0 -1
  192. package/dist/es6/header/lib/Header.js +0 -309
  193. package/dist/es6/header/lib/parts/DubLogoTitle.d.ts +0 -30
  194. package/dist/es6/header/lib/parts/DubLogoTitle.d.ts.map +0 -1
  195. package/dist/es6/header/lib/parts/DubLogoTitle.js +0 -93
  196. package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
  197. package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts.map +0 -1
  198. package/dist/es6/header/lib/parts/WorkdayLogoTitle.js +0 -112
  199. package/dist/es6/header/lib/parts/index.d.ts +0 -3
  200. package/dist/es6/header/lib/parts/index.d.ts.map +0 -1
  201. package/dist/es6/header/lib/parts/index.js +0 -2
  202. package/dist/es6/header/lib/shared/themes.d.ts +0 -43
  203. package/dist/es6/header/lib/shared/themes.d.ts.map +0 -1
  204. package/dist/es6/header/lib/shared/themes.js +0 -57
  205. package/dist/es6/header/lib/shared/types.d.ts +0 -15
  206. package/dist/es6/header/lib/shared/types.d.ts.map +0 -1
  207. package/dist/es6/header/lib/shared/types.js +0 -17
  208. package/dist/es6/layout/index.d.ts +0 -5
  209. package/dist/es6/layout/index.d.ts.map +0 -1
  210. package/dist/es6/layout/index.js +0 -2
  211. package/dist/es6/layout/lib/Flex.d.ts +0 -26
  212. package/dist/es6/layout/lib/Flex.d.ts.map +0 -1
  213. package/dist/es6/layout/lib/Flex.js +0 -58
  214. package/dist/es6/layout/lib/Stack.d.ts +0 -27
  215. package/dist/es6/layout/lib/Stack.d.ts.map +0 -1
  216. package/dist/es6/layout/lib/Stack.js +0 -74
  217. package/dist/es6/layout/lib/utils/flex.d.ts +0 -36
  218. package/dist/es6/layout/lib/utils/flex.d.ts.map +0 -1
  219. package/dist/es6/layout/lib/utils/flex.js +0 -34
  220. package/dist/es6/layout/lib/utils/getValidChildren.d.ts +0 -3
  221. package/dist/es6/layout/lib/utils/getValidChildren.d.ts.map +0 -1
  222. package/dist/es6/layout/lib/utils/getValidChildren.js +0 -6
  223. package/dist/es6/layout/lib/utils/stack.d.ts +0 -26
  224. package/dist/es6/layout/lib/utils/stack.d.ts.map +0 -1
  225. package/dist/es6/layout/lib/utils/stack.js +0 -51
  226. package/dist/es6/layout/lib/utils/types.d.ts +0 -8
  227. package/dist/es6/layout/lib/utils/types.d.ts.map +0 -1
  228. package/dist/es6/layout/lib/utils/types.js +0 -0
  229. package/header/LICENSE +0 -51
  230. package/header/README.md +0 -359
  231. package/header/index.ts +0 -9
  232. package/header/lib/GlobalHeader.tsx +0 -73
  233. package/header/lib/Header.tsx +0 -429
  234. package/header/lib/parts/DubLogoTitle.tsx +0 -99
  235. package/header/lib/parts/WorkdayLogoTitle.tsx +0 -120
  236. package/header/lib/parts/index.ts +0 -2
  237. package/header/lib/shared/themes.tsx +0 -97
  238. package/header/lib/shared/types.tsx +0 -16
  239. package/header/package.json +0 -5
  240. package/layout/LICENSE +0 -52
  241. package/layout/README.md +0 -16
  242. package/layout/index.ts +0 -4
  243. package/layout/lib/Flex.tsx +0 -47
  244. package/layout/lib/Stack.tsx +0 -111
  245. package/layout/lib/utils/flex.ts +0 -65
  246. package/layout/lib/utils/getValidChildren.ts +0 -7
  247. package/layout/lib/utils/stack.ts +0 -78
  248. package/layout/lib/utils/types.ts +0 -45
  249. package/layout/package.json +0 -5
  250. package/ts3.5/dist/commonjs/common/lib/Box.d.ts +0 -31
  251. package/ts3.5/dist/commonjs/common/lib/utils/border.d.ts +0 -103
  252. package/ts3.5/dist/commonjs/common/lib/utils/color.d.ts +0 -26
  253. package/ts3.5/dist/commonjs/common/lib/utils/depth.d.ts +0 -22
  254. package/ts3.5/dist/commonjs/common/lib/utils/flexItem.d.ts +0 -33
  255. package/ts3.5/dist/commonjs/common/lib/utils/layout.d.ts +0 -43
  256. package/ts3.5/dist/commonjs/common/lib/utils/other.d.ts +0 -5
  257. package/ts3.5/dist/commonjs/common/lib/utils/position.d.ts +0 -41
  258. package/ts3.5/dist/commonjs/common/lib/utils/space.d.ts +0 -64
  259. package/ts3.5/dist/commonjs/common/lib/utils/types.d.ts +0 -14
  260. package/ts3.5/dist/commonjs/header/index.d.ts +0 -9
  261. package/ts3.5/dist/commonjs/header/lib/GlobalHeader.d.ts +0 -38
  262. package/ts3.5/dist/commonjs/header/lib/Header.d.ts +0 -76
  263. package/ts3.5/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +0 -30
  264. package/ts3.5/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
  265. package/ts3.5/dist/commonjs/header/lib/parts/index.d.ts +0 -3
  266. package/ts3.5/dist/commonjs/header/lib/shared/themes.d.ts +0 -43
  267. package/ts3.5/dist/commonjs/header/lib/shared/types.d.ts +0 -15
  268. package/ts3.5/dist/commonjs/layout/index.d.ts +0 -5
  269. package/ts3.5/dist/commonjs/layout/lib/Flex.d.ts +0 -26
  270. package/ts3.5/dist/commonjs/layout/lib/Stack.d.ts +0 -27
  271. package/ts3.5/dist/commonjs/layout/lib/utils/flex.d.ts +0 -36
  272. package/ts3.5/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +0 -3
  273. package/ts3.5/dist/commonjs/layout/lib/utils/stack.d.ts +0 -26
  274. package/ts3.5/dist/commonjs/layout/lib/utils/types.d.ts +0 -8
  275. package/ts3.5/dist/es6/common/lib/Box.d.ts +0 -31
  276. package/ts3.5/dist/es6/common/lib/utils/border.d.ts +0 -103
  277. package/ts3.5/dist/es6/common/lib/utils/color.d.ts +0 -26
  278. package/ts3.5/dist/es6/common/lib/utils/depth.d.ts +0 -22
  279. package/ts3.5/dist/es6/common/lib/utils/flexItem.d.ts +0 -33
  280. package/ts3.5/dist/es6/common/lib/utils/layout.d.ts +0 -43
  281. package/ts3.5/dist/es6/common/lib/utils/other.d.ts +0 -5
  282. package/ts3.5/dist/es6/common/lib/utils/position.d.ts +0 -41
  283. package/ts3.5/dist/es6/common/lib/utils/space.d.ts +0 -64
  284. package/ts3.5/dist/es6/common/lib/utils/types.d.ts +0 -14
  285. package/ts3.5/dist/es6/header/index.d.ts +0 -9
  286. package/ts3.5/dist/es6/header/lib/GlobalHeader.d.ts +0 -38
  287. package/ts3.5/dist/es6/header/lib/Header.d.ts +0 -76
  288. package/ts3.5/dist/es6/header/lib/parts/DubLogoTitle.d.ts +0 -30
  289. package/ts3.5/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +0 -31
  290. package/ts3.5/dist/es6/header/lib/parts/index.d.ts +0 -3
  291. package/ts3.5/dist/es6/header/lib/shared/themes.d.ts +0 -43
  292. package/ts3.5/dist/es6/header/lib/shared/types.d.ts +0 -15
  293. package/ts3.5/dist/es6/layout/index.d.ts +0 -5
  294. package/ts3.5/dist/es6/layout/lib/Flex.d.ts +0 -26
  295. package/ts3.5/dist/es6/layout/lib/Stack.d.ts +0 -27
  296. package/ts3.5/dist/es6/layout/lib/utils/flex.d.ts +0 -36
  297. package/ts3.5/dist/es6/layout/lib/utils/getValidChildren.d.ts +0 -3
  298. package/ts3.5/dist/es6/layout/lib/utils/stack.d.ts +0 -26
  299. package/ts3.5/dist/es6/layout/lib/utils/types.d.ts +0 -8
@@ -1,31 +0,0 @@
1
- import * as React from 'react';
2
- import { BorderStyleProps } from './utils/border';
3
- import { ColorStyleProps } from './utils/color';
4
- import { DepthStyleProps } from './utils/depth';
5
- import { FlexItemStyleProps } from './utils/flexItem';
6
- import { LayoutStyleProps } from './utils/layout';
7
- import { OtherStyleProps } from './utils/other';
8
- import { PositionStyleProps } from './utils/position';
9
- import { SpaceStyleProps } from './utils/space';
10
- export declare type BoxProps = BorderStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & PositionStyleProps & SpaceStyleProps & {
11
- children?: React.ReactNode;
12
- };
13
- /**
14
- * `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
15
- * It is highly flexible, and its primary purpose is to build other components.
16
- *
17
- * @example
18
- * import { Box, BoxProps } from '@workday/canvas-kit-labs-react/common';
19
- *
20
- * interface CardProps extends BoxProps {
21
- * // card-specific props
22
- * }
23
- *
24
- * // `Card`'s default values are set using `BoxProps`
25
- * const Card = (props: CardProps) => (
26
- * <Box depth={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
27
- * );
28
- *
29
- */
30
- export declare const Box: import("@workday/canvas-kit-react/common").ElementComponent<"div", import("./utils/border").BorderShorthandStyleProps & import("./utils/border").BorderColorStyleProps & import("./utils/border").BorderRadiusStyleProps & import("./utils/border").BorderLineStyleProps & import("./utils/border").BorderWidthStyleProps & import("./utils/border").BorderLogicalStyleProps & ColorStyleProps & DepthStyleProps & FlexItemStyleProps & LayoutStyleProps & OtherStyleProps & import("./utils/position").PositionStandardProps & import("./utils/position").PositionLogicalProps & import("./utils/space").SpaceStandardProps & import("./utils/space").SpaceLogicalProps>;
31
- //# sourceMappingURL=Box.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../common/lib/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAS,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAQ,eAAe,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAW,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,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;AAsBJ;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,GAAG,2oBASd,CAAC"}
@@ -1,66 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import * as React from 'react';
24
- import styled from '@emotion/styled';
25
- import isPropValid from '@emotion/is-prop-valid';
26
- import { createComponent } from '@workday/canvas-kit-react/common';
27
- // style props
28
- import { border } from './utils/border';
29
- import { color } from './utils/color';
30
- import { depth } from './utils/depth';
31
- import { flexItem } from './utils/flexItem';
32
- import { layout } from './utils/layout';
33
- import { other } from './utils/other';
34
- import { position } from './utils/position';
35
- import { space } from './utils/space';
36
- var omittedProps = ['display', 'color', 'height', 'overflow', 'width', 'border', 'background'];
37
- var shouldForwardProp = function (prop) {
38
- return isPropValid(prop) && !omittedProps.includes(prop);
39
- };
40
- var StyledBox = styled('div', { shouldForwardProp: shouldForwardProp })({
41
- boxSizing: 'border-box',
42
- }, border, color, depth, flexItem, layout, other, position, space);
43
- /**
44
- * `Box` is a primitive component that provides a common, ergonomic API around Canvas design tokens.
45
- * It is highly flexible, and its primary purpose is to build other components.
46
- *
47
- * @example
48
- * import { Box, BoxProps } from '@workday/canvas-kit-labs-react/common';
49
- *
50
- * interface CardProps extends BoxProps {
51
- * // card-specific props
52
- * }
53
- *
54
- * // `Card`'s default values are set using `BoxProps`
55
- * const Card = (props: CardProps) => (
56
- * <Box depth={2} padding="m" borderRadius="l" {...props}>Hello, Card!</Box>
57
- * );
58
- *
59
- */
60
- export var Box = createComponent('div')({
61
- displayName: 'Box',
62
- Component: function (_a, ref, Element) {
63
- var children = _a.children, elemProps = __rest(_a, ["children"]);
64
- return (React.createElement(StyledBox, __assign({ as: Element, ref: ref }, elemProps), children));
65
- },
66
- });
@@ -1,103 +0,0 @@
1
- import { CanvasBorderRadiusKeys, CanvasColor } from '@workday/canvas-kit-react/tokens';
2
- import { PartialEmotionCanvasTheme } from '@workday/canvas-kit-react/common';
3
- import { PropertyBorder } from './types';
4
- /** style props to set the border properties */
5
- export declare type BorderShorthandStyleProps = {
6
- /** sets `border` property */
7
- border?: string;
8
- /** sets `border-top` property */
9
- borderTop?: string;
10
- /** sets `border-right` property (no bidirectional support) */
11
- borderRight?: string;
12
- /** sets `border-bottom` property */
13
- borderBottom?: string;
14
- /** sets `border-left` property (no bidirectional support) */
15
- borderLeft?: string;
16
- };
17
- /** style props to set the border color properties */
18
- export declare type BorderColorStyleProps = {
19
- /** sets `border-color` property */
20
- borderColor?: CanvasColor | (string & {});
21
- /** sets `border-top-color` property */
22
- borderTopColor?: CanvasColor | (string & {});
23
- /** sets `border-right-color` property (no bidirectional support) */
24
- borderRightColor?: CanvasColor | (string & {});
25
- /** sets `border-bottom-color` property */
26
- borderBottomColor?: CanvasColor | (string & {});
27
- /** sets `border-left-color` property (no bidirectional support) */
28
- borderLeftColor?: CanvasColor | (string & {});
29
- };
30
- /** style props to set the border radius properties */
31
- export declare type BorderRadiusStyleProps = {
32
- /** sets `border-radius` property */
33
- borderRadius?: CanvasBorderRadiusKeys | number | (string & {});
34
- /** sets `border-top-left-radius` property */
35
- borderTopLeftRadius?: CanvasBorderRadiusKeys | number | (string & {});
36
- /** sets `border-top-right-radius` property */
37
- borderTopRightRadius?: CanvasBorderRadiusKeys | number | (string & {});
38
- /** sets `border-bottom-left-radius` property */
39
- borderBottomLeftRadius?: CanvasBorderRadiusKeys | number | (string & {});
40
- /** sets `border-bottom-right-radius` property */
41
- borderBottomRightRadius?: CanvasBorderRadiusKeys | number | (string & {});
42
- };
43
- /** style props to set the border style properties */
44
- export declare type BorderLineStyleProps = {
45
- /** sets `border-style` property */
46
- borderStyle?: PropertyBorder;
47
- /** sets `border-top-style` property */
48
- borderTopStyle?: PropertyBorder;
49
- /** sets `border-right-style` property (no bidirectional support) */
50
- borderRightStyle?: PropertyBorder;
51
- /** sets `border-bottom-style` property */
52
- borderBottomStyle?: PropertyBorder;
53
- /** sets `border-left-style` property (no bidirectional support) */
54
- borderLeftStyle?: PropertyBorder;
55
- };
56
- /** style props to set the border width properties */
57
- export declare type BorderWidthStyleProps = {
58
- /** sets `border-width` property */
59
- borderWidth?: string | number;
60
- /** sets `border-top-width` property */
61
- borderTopWidth?: string | number;
62
- /** sets `border-right-width` property (no bidirectional support) */
63
- borderRightWidth?: string | number;
64
- /** sets `border-bottom-width` property */
65
- borderBottomWidth?: string | number;
66
- /** sets `border-left-width` property (no bidirectional support) */
67
- borderLeftWidth?: string | number;
68
- };
69
- export declare type BorderLogicalStyleProps = {
70
- /** sets `border-left` property (bidirectional support) */
71
- borderInlineStart?: string;
72
- /** sets `border-left-color` property (bidirectional support) */
73
- borderInlineStartColor?: CanvasColor | (string & {});
74
- /** sets `border-left-style` property (bidirectional support) */
75
- borderInlineStartStyle?: PropertyBorder;
76
- /** sets `border-left-width` property (bidirectional support) */
77
- borderInlineStartWidth?: string | number;
78
- /** sets `border-right` property (bidirectional support) */
79
- borderInlineEnd?: string;
80
- /** sets `border-right-color` property (bidirectional support) */
81
- borderInlineEndColor?: CanvasColor | (string & {});
82
- /** sets `border-right-style` property (bidirectional support) */
83
- borderInlineEndStyle?: PropertyBorder;
84
- /** sets `border-right-width` property (bidirectional support) */
85
- borderInlineEndWidth?: string | number;
86
- };
87
- /** a collection style props for border properties */
88
- export declare type BorderStyleProps = BorderShorthandStyleProps & BorderColorStyleProps & BorderRadiusStyleProps & BorderLineStyleProps & BorderWidthStyleProps & BorderLogicalStyleProps;
89
- /**
90
- * A style prop function that takes components props and returns border styles. Some props, such as borderRadius and borderColor, are connected to our design tokens.
91
- * If no `BorderStyleProps` are found, it returns an empty object.
92
- *
93
- * @example
94
- * // You'll most likely use `border` with low-level, styled components
95
- * const BoxExample = () => (
96
- * <Box border={`solid 1px #333333 ${colors.blackPepper400}`}>Hello, border styles!</Box>
97
- * );
98
- *
99
- */
100
- export declare function border<P extends BorderStyleProps & {
101
- theme?: PartialEmotionCanvasTheme;
102
- }>(props: P): {};
103
- //# sourceMappingURL=border.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"border.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/border.ts"],"names":[],"mappings":"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"}
@@ -1,149 +0,0 @@
1
- import { borderRadius as borderRadiusTokens, colors as colorTokens, } from '@workday/canvas-kit-react/tokens';
2
- import { ContentDirection, useTheme, } from '@workday/canvas-kit-react/common';
3
- // border logical prop handlers
4
- var borderInlineStart = function (isRTL) { return (isRTL ? 'borderRight' : 'borderLeft'); };
5
- var borderInlineEnd = function (isRTL) { return (isRTL ? 'borderLeft' : 'borderRight'); };
6
- var borderInlineStartColor = function (isRTL) { return (isRTL ? 'borderRightColor' : 'borderLeftColor'); };
7
- var borderInlineEndColor = function (isRTL) { return (isRTL ? 'borderLeftColor' : 'borderRightColor'); };
8
- var borderInlineStartStyle = function (isRTL) { return (isRTL ? 'borderRightStyle' : 'borderLeftStyle'); };
9
- var borderInlineEndStyle = function (isRTL) { return (isRTL ? 'borderLeftStyle' : 'borderRightStyle'); };
10
- var borderInlineStartWidth = function (isRTL) { return (isRTL ? 'borderRightWidth' : 'borderLeftWidth'); };
11
- var borderInlineEndWidth = function (isRTL) { return (isRTL ? 'borderLeftWidth' : 'borderRightWidth'); };
12
- var borderShorthandProps = {
13
- border: 'border',
14
- borderTop: 'borderTop',
15
- borderRight: 'borderRight',
16
- borderBottom: 'borderBottom',
17
- borderLeft: 'borderLeft',
18
- borderInlineStart: borderInlineStart,
19
- borderInlineEnd: borderInlineEnd,
20
- };
21
- var borderColors = {
22
- borderColor: 'borderColor',
23
- borderTopColor: 'borderTopColor',
24
- borderRightColor: 'borderRightColor',
25
- borderBottomColor: 'borderBottomColor',
26
- borderLeftColor: 'borderLeftColor',
27
- borderInlineStartColor: borderInlineStartColor,
28
- borderInlineEndColor: borderInlineEndColor,
29
- };
30
- var borderRadii = {
31
- borderRadius: 'borderRadius',
32
- borderTopLeftRadius: 'borderTopLeftRadius',
33
- borderTopRightRadius: 'borderTopRightRadius',
34
- borderBottomLeftRadius: 'borderBottomLeftRadius',
35
- borderBottomRightRadius: 'borderBottomRightRadius',
36
- };
37
- var borderStyles = {
38
- borderStyle: 'borderStyle',
39
- borderTopStyle: 'borderTopStyle',
40
- borderRightStyle: 'borderRightStyle',
41
- borderBottomStyle: 'borderBottomStyle',
42
- borderLeftStyle: 'borderLeftStyle',
43
- borderInlineStartStyle: borderInlineStartStyle,
44
- borderInlineEndStyle: borderInlineEndStyle,
45
- };
46
- var borderWidths = {
47
- borderWidth: 'borderWidth',
48
- borderTopWidth: 'borderTopWidth',
49
- borderRightWidth: 'borderRightWidth',
50
- borderBottomWidth: 'borderBottomWidth',
51
- borderLeftWidth: 'borderLeftWidth',
52
- borderInlineStartWidth: borderInlineStartWidth,
53
- borderInlineEndWidth: borderInlineEndWidth,
54
- };
55
- /**
56
- * A style prop function that takes components props and returns border styles. Some props, such as borderRadius and borderColor, are connected to our design tokens.
57
- * If no `BorderStyleProps` are found, it returns an empty object.
58
- *
59
- * @example
60
- * // You'll most likely use `border` with low-level, styled components
61
- * const BoxExample = () => (
62
- * <Box border={`solid 1px #333333 ${colors.blackPepper400}`}>Hello, border styles!</Box>
63
- * );
64
- *
65
- */
66
- export function border(props) {
67
- // border will always be used within the context of a component, but eslint doesn't know that
68
- // eslint-disable-next-line react-hooks/rules-of-hooks
69
- var canvas = useTheme(props.theme).canvas;
70
- var isRTL = canvas.direction === ContentDirection.RTL;
71
- var styles = {};
72
- for (var key in props) {
73
- if (props.hasOwnProperty(key)) {
74
- if (key in borderShorthandProps) {
75
- var value = props[key];
76
- var attr = void 0;
77
- if (key === 'borderInlineStart') {
78
- attr = borderInlineStart(isRTL);
79
- }
80
- else if (key === 'borderInlineEnd') {
81
- attr = borderInlineEnd(isRTL);
82
- }
83
- else {
84
- attr = borderShorthandProps[key];
85
- }
86
- // @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
87
- styles[attr] = value;
88
- continue;
89
- }
90
- if (key in borderColors) {
91
- var propValue = props[key];
92
- var value = colorTokens[propValue] || propValue;
93
- var attr = void 0;
94
- if (key === 'borderInlineStartColor') {
95
- attr = borderInlineStartColor(isRTL);
96
- }
97
- else if (key === 'borderInlineEndColor') {
98
- attr = borderInlineEndColor(isRTL);
99
- }
100
- else {
101
- attr = borderColors[key];
102
- }
103
- // @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
104
- styles[attr] = value;
105
- continue;
106
- }
107
- if (key in borderRadii) {
108
- var propValue = props[key];
109
- var value = borderRadiusTokens[propValue] || propValue;
110
- var attr = borderRadii[key];
111
- // @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
112
- styles[attr] = value;
113
- continue;
114
- }
115
- if (key in borderStyles) {
116
- var value = props[key];
117
- var attr = void 0;
118
- if (key === 'borderInlineStartStyle') {
119
- attr = borderInlineStartStyle(isRTL);
120
- }
121
- else if (key === 'borderInlineEndStyle') {
122
- attr = borderInlineEndStyle(isRTL);
123
- }
124
- else {
125
- attr = borderStyles[key];
126
- }
127
- // @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
128
- styles[attr] = value;
129
- continue;
130
- }
131
- if (key in borderWidths) {
132
- var value = props[key];
133
- var attr = void 0;
134
- if (key === 'borderInlineStartWidth') {
135
- attr = borderInlineStartWidth(isRTL);
136
- }
137
- else if (key === 'borderInlineEndWidth') {
138
- attr = borderInlineEndWidth(isRTL);
139
- }
140
- else {
141
- attr = borderWidths[key];
142
- }
143
- // @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
144
- styles[attr] = value;
145
- }
146
- }
147
- }
148
- return styles;
149
- }
@@ -1,26 +0,0 @@
1
- import { colors as colorTokens, CanvasColor } from '@workday/canvas-kit-react/tokens';
2
- export declare type ColorTokens = typeof colorTokens;
3
- /** style props to for color properties */
4
- export declare type ColorStyleProps = {
5
- /** sets `background` property */
6
- background?: CanvasColor | (string & {});
7
- /** sets `background-color` property */
8
- backgroundColor?: CanvasColor | (string & {});
9
- /** sets `background-image` property */
10
- backgroundImage?: string;
11
- /** sets `color` property */
12
- color?: CanvasColor | (string & {});
13
- };
14
- /**
15
- * A style prop function that takes components props and returns color styles from canvas token values.
16
- * If no `ColorStyleProps` are found, it returns an empty object.
17
- *
18
- * @example
19
- * // You'll most likely use `color` with low-level, styled components
20
- * const BoxExample = () => (
21
- * <Box backgroundColor="blueberry500" color="frenchVanilla100">Hello, colors!</Box>
22
- * );
23
- *
24
- */
25
- export declare function color<P extends ColorStyleProps>(props: P): {};
26
- //# sourceMappingURL=color.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/color.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,IAAI,WAAW,EAAE,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAEpF,oBAAY,WAAW,GAAG,OAAO,WAAW,CAAC;AAE7C,0CAA0C;AAC1C,oBAAY,eAAe,GAAG;IAC5B,iCAAiC;IACjC,UAAU,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACzC,uCAAuC;IACvC,eAAe,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC9C,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACrC,CAAC;AAyBF;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,MAWxD"}
@@ -1,53 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { colors as colorTokens } from '@workday/canvas-kit-react/tokens';
13
- var getBackground = function (value) { return ({
14
- background: colorTokens[value] || value,
15
- }); };
16
- var getBackgroundColor = function (value) { return ({
17
- backgroundColor: colorTokens[value] || value,
18
- }); };
19
- var getBackgroundImage = function (value) { return ({
20
- backgroundImage: value,
21
- }); };
22
- var getColor = function (value) { return ({
23
- color: colorTokens[value] || value,
24
- }); };
25
- var colorProps = {
26
- background: getBackground,
27
- backgroundColor: getBackgroundColor,
28
- backgroundImage: getBackgroundImage,
29
- color: getColor,
30
- };
31
- /**
32
- * A style prop function that takes components props and returns color styles from canvas token values.
33
- * If no `ColorStyleProps` are found, it returns an empty object.
34
- *
35
- * @example
36
- * // You'll most likely use `color` with low-level, styled components
37
- * const BoxExample = () => (
38
- * <Box backgroundColor="blueberry500" color="frenchVanilla100">Hello, colors!</Box>
39
- * );
40
- *
41
- */
42
- export function color(props) {
43
- var styles = {};
44
- for (var key in props) {
45
- if (key in colorProps) {
46
- var value = props[key];
47
- var colorFn = colorProps[key];
48
- var style = colorFn(value);
49
- styles = __assign(__assign({}, styles), style);
50
- }
51
- }
52
- return styles;
53
- }
@@ -1,22 +0,0 @@
1
- import { depth as depthTokens } from '@workday/canvas-kit-react/tokens';
2
- export declare type DepthTokens = typeof depthTokens;
3
- export declare type DepthTokenKeys = keyof DepthTokens;
4
- export declare type DepthTokenValues = DepthTokens[keyof DepthTokens];
5
- /** style props to for depth styles */
6
- export declare type DepthStyleProps = {
7
- /** sets depth styles (box-shadow & border) */
8
- depth?: DepthTokenKeys;
9
- };
10
- /**
11
- * A style prop function that takes components props and returns depth styles from canvas token values.
12
- * If no `DepthStyleProps` are found, it returns an empty object.
13
- *
14
- * @example
15
- * // You'll mostly likely use `depth` with low-level, styled components
16
- * const BoxExample = () => (
17
- * <Box depth={3}>Hello, box shadows!</Box>
18
- * );
19
- *
20
- */
21
- export declare function depth<P extends DepthStyleProps>(props: P): DepthTokenValues;
22
- //# sourceMappingURL=depth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/depth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,IAAI,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAEtE,oBAAY,WAAW,GAAG,OAAO,WAAW,CAAC;AAC7C,oBAAY,cAAc,GAAG,MAAM,WAAW,CAAC;AAC/C,oBAAY,gBAAgB,GAAG,WAAW,CAAC,MAAM,WAAW,CAAC,CAAC;AAE9D,sCAAsC;AACtC,oBAAY,eAAe,GAAG;IAC5B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB,CAAC;AAMF;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAS3E"}
@@ -1,25 +0,0 @@
1
- import { depth as depthTokens } from '@workday/canvas-kit-react/tokens';
2
- var depthProps = {
3
- depth: function (token) { return depthTokens[token]; },
4
- };
5
- /**
6
- * A style prop function that takes components props and returns depth styles from canvas token values.
7
- * If no `DepthStyleProps` are found, it returns an empty object.
8
- *
9
- * @example
10
- * // You'll mostly likely use `depth` with low-level, styled components
11
- * const BoxExample = () => (
12
- * <Box depth={3}>Hello, box shadows!</Box>
13
- * );
14
- *
15
- */
16
- export function depth(props) {
17
- for (var key in props) {
18
- if (key in depthProps) {
19
- var token = props[key];
20
- var depthFn = depthProps[key];
21
- return depthFn(token);
22
- }
23
- }
24
- return {};
25
- }
@@ -1,33 +0,0 @@
1
- import { PropertyJustifySelf, PropertyAlignSelf, PropertyOrder } from './types';
2
- /** style props to for flexbox item properties */
3
- export declare type FlexItemStyleProps = {
4
- /** sets `flex` property */
5
- flex?: number | string;
6
- /** sets `flex-grow` property */
7
- flexGrow?: number | string;
8
- /** sets `flex-shrink` property */
9
- flexShrink?: number | string;
10
- /** sets `flex-basis` property */
11
- flexBasis?: number | string;
12
- /** sets `justify-self` property */
13
- justifySelf?: PropertyJustifySelf;
14
- /** sets `align-self` property */
15
- alignSelf?: PropertyAlignSelf;
16
- /** sets `order` property */
17
- order?: PropertyOrder;
18
- };
19
- /**
20
- * A style prop function that takes component props and returns flexbox item styles.
21
- * If no `FlexItemStyleProps` are found, it returns an empty object.
22
- *
23
- * @example
24
- * // You'll most likely use `flexItem` with low-level, styled components
25
- * const FlexItemExample = () => (
26
- * <Box flex={1} flexBasis="auto" alignSelf={center}>
27
- * Hello, flex item!
28
- * </Box>
29
- * );
30
- *
31
- */
32
- export declare function flexItem<P extends FlexItemStyleProps>(props: P): {};
33
- //# sourceMappingURL=flexItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flexItem.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/flexItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAE9E,iDAAiD;AACjD,oBAAY,kBAAkB,GAAG;IAC/B,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,mCAAmC;IACnC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,iCAAiC;IACjC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,4BAA4B;IAC5B,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAaF;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,kBAAkB,EAAE,KAAK,EAAE,CAAC,MAW9D"}
@@ -1,35 +0,0 @@
1
- /** style props to for flexbox item properties */
2
- var flexItemProps = {
3
- flex: 'flex',
4
- flexGrow: 'flexGrow',
5
- flexShrink: 'flexShrink',
6
- flexBasis: 'flexBasis',
7
- justifySelf: 'justifySelf',
8
- alignSelf: 'alignSelf',
9
- order: 'order',
10
- };
11
- /**
12
- * A style prop function that takes component props and returns flexbox item styles.
13
- * If no `FlexItemStyleProps` are found, it returns an empty object.
14
- *
15
- * @example
16
- * // You'll most likely use `flexItem` with low-level, styled components
17
- * const FlexItemExample = () => (
18
- * <Box flex={1} flexBasis="auto" alignSelf={center}>
19
- * Hello, flex item!
20
- * </Box>
21
- * );
22
- *
23
- */
24
- export function flexItem(props) {
25
- var styles = {};
26
- for (var key in props) {
27
- if (key in flexItemProps) {
28
- var attr = flexItemProps[key];
29
- var value = props[key];
30
- // @ts-ignore TS doesn't like adding a potentially unknown key to an object, but because we own this object, it's fine.
31
- styles[attr] = value;
32
- }
33
- }
34
- return styles;
35
- }
@@ -1,43 +0,0 @@
1
- import { PropertyDisplay, PropertyListStyle, PropertyOverflow, PropertyOverflowX, PropertyOverflowY, PropertyVerticalAlign } from './types';
2
- /** style props to for layout properties */
3
- export declare type LayoutStyleProps = {
4
- /** sets `display` property */
5
- display?: PropertyDisplay;
6
- /** sets `height` property */
7
- height?: number | string;
8
- /** sets `list-style property */
9
- listStyle?: PropertyListStyle;
10
- /** sets `max-height` property */
11
- maxHeight?: number | string;
12
- /** sets `max-width` property */
13
- maxWidth?: number | string;
14
- /** sets `min-height` property */
15
- minHeight?: number | string;
16
- /** sets `min-width` property */
17
- minWidth?: number | string;
18
- /** sets `overflow` property */
19
- overflow?: PropertyOverflow;
20
- /** sets `overflow-x` property */
21
- overflowX?: PropertyOverflowX;
22
- /** sets `overflow-y` property */
23
- overflowY?: PropertyOverflowY;
24
- /** sets `vertical-align` property */
25
- verticalAlign?: PropertyVerticalAlign;
26
- /** sets `width` property */
27
- width?: number | string;
28
- };
29
- /**
30
- * A style prop function that takes components props and returns layout styles.
31
- * If no `LayoutStyleProps` are found, it returns an empty object.
32
- *
33
- * @example
34
- * // You'll most likely use `layout` with low-level, styled components
35
- * const BoxExample = () => (
36
- * <Box display="inline-block" height="50%">
37
- * Hello, positions!
38
- * </Box>
39
- * );
40
- *
41
- */
42
- export declare function layout<P extends LayoutStyleProps>(props: P): {};
43
- //# sourceMappingURL=layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,2CAA2C;AAC3C,oBAAY,gBAAgB,GAAG;IAC7B,8BAA8B;IAC9B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,gCAAgC;IAChC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,iCAAiC;IACjC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,iCAAiC;IACjC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,qCAAqC;IACrC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAiBF;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,MAW1D"}