@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,321 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __rest = (this && this.__rest) || function (s, e) {
27
- var t = {};
28
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
29
- t[p] = s[p];
30
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
31
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
32
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
33
- t[p[i]] = s[p[i]];
34
- }
35
- return t;
36
- };
37
- var __importStar = (this && this.__importStar) || function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
41
- result["default"] = mod;
42
- return result;
43
- };
44
- var __importDefault = (this && this.__importDefault) || function (mod) {
45
- return (mod && mod.__esModule) ? mod : { "default": mod };
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- var React = __importStar(require("react"));
49
- var core_1 = require("@emotion/core");
50
- var styled_1 = __importDefault(require("@emotion/styled"));
51
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
52
- var parts_1 = require("./parts");
53
- var themes_1 = require("./shared/themes");
54
- var types_1 = require("./shared/types");
55
- var button_1 = require("@workday/canvas-kit-react/button");
56
- var icon_1 = require("@workday/canvas-kit-react/icon");
57
- var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
58
- var childrenSpacing = tokens_1.space.s;
59
- var HeaderShell = styled_1.default('div')(__assign(__assign({ display: 'flex', alignItems: 'center', boxSizing: 'border-box' }, tokens_1.type.levels.subtext.large), { WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale', position: 'relative' }), function (_a) {
60
- var variant = _a.variant, themeColor = _a.themeColor;
61
- return (__assign(__assign({
62
- // Only the variant Full has a large header, all the other one (Dub, Global) have a small header height
63
- height: variant === types_1.DeprecatedHeaderVariant.Full
64
- ? types_1.DeprecatedHeaderHeight.Large
65
- : types_1.DeprecatedHeaderHeight.Small, background: themes_1.deprecatedHeaderThemes[themeColor].background }, themes_1.deprecatedHeaderThemes[themeColor].depth), { color: themes_1.deprecatedHeaderThemes[themeColor].color }));
66
- });
67
- var BrandSlot = styled_1.default('div')({
68
- height: '100%',
69
- }, function (props) { return ({
70
- flex: props.grow ? "1 0 auto" : 'unset',
71
- }); });
72
- var BrandLink = styled_1.default(button_1.Hyperlink)({
73
- '&:hover': {
74
- textDecoration: 'none',
75
- },
76
- '&:focus': {
77
- textDecoration: 'none',
78
- },
79
- });
80
- var navStyle = function (_a) {
81
- var themeColor = _a.themeColor;
82
- var theme = themes_1.deprecatedHeaderThemes[themeColor];
83
- return core_1.css({
84
- nav: {
85
- display: 'flex',
86
- flex: "1 0 auto",
87
- justifyContent: 'center',
88
- height: 'inherit',
89
- marginLeft: tokens_1.space.xl,
90
- '& ul': {
91
- color: theme.linkColor,
92
- display: 'flex',
93
- alignItems: 'center',
94
- justifyContent: 'center',
95
- listStyleType: 'none',
96
- padding: 0,
97
- margin: 0,
98
- height: 'inherit',
99
- '&:hover': {
100
- // De-emphasizes all color on hover, this allows us to create an illusion that hovering over a specific element
101
- // fades out the rest
102
- color: theme.linkFadeOutColor,
103
- },
104
- '& li': {
105
- boxSizing: 'border-box',
106
- position: 'relative',
107
- display: 'flex',
108
- alignItems: 'center',
109
- fontSize: '14px',
110
- fontWeight: 700,
111
- height: 'inherit',
112
- transition: "color 150ms ease-out 0s",
113
- cursor: 'pointer',
114
- '&:first-of-type > *': {
115
- marginLeft: 0,
116
- },
117
- '&:last-child > *': {
118
- marginRight: 0,
119
- },
120
- '& > *': {
121
- color: 'inherit',
122
- textDecoration: 'none',
123
- padding: "0px " + tokens_1.space.s,
124
- margin: "0 " + tokens_1.space.xxxs,
125
- display: 'flex',
126
- alignItems: 'center',
127
- height: 'inherit',
128
- '&:visited': {
129
- color: 'inherit',
130
- },
131
- },
132
- '&:hover, &:active': {
133
- color: theme.linkColor,
134
- },
135
- '&.current': {
136
- color: theme.currentLinkColor,
137
- '& a': {
138
- cursor: 'default',
139
- },
140
- '&:hover, &:active': {
141
- color: theme.currentLinkColor,
142
- },
143
- '&:after': {
144
- position: 'absolute',
145
- bottom: 0,
146
- left: 0,
147
- content: "''",
148
- height: 4,
149
- width: '100%',
150
- backgroundColor: theme.chipColor,
151
- borderRadius: tokens_1.borderRadius.m + " " + tokens_1.borderRadius.m + " 0 0",
152
- },
153
- },
154
- },
155
- },
156
- },
157
- });
158
- };
159
- var ChildrenSlot = styled_1.default('div')({
160
- marginRight: tokens_1.space.m,
161
- // TODO: remove this when we get real icon buttons
162
- '> .canvas-header--menu-icon': {
163
- cursor: 'pointer',
164
- },
165
- display: 'flex',
166
- alignItems: 'center',
167
- justifyContent: 'flex-end',
168
- height: '100%',
169
- '> *': {
170
- marginLeft: childrenSpacing,
171
- },
172
- }, function (_a) {
173
- var centeredNav = _a.centeredNav, isCollapsed = _a.isCollapsed;
174
- return ({
175
- '> *:not(.canvas-header--menu-icon)': {
176
- display: isCollapsed ? 'none' : 'flex',
177
- },
178
- '> *:last-child': {
179
- marginRight: isCollapsed ? '' : 0,
180
- },
181
- flex: !isCollapsed && centeredNav ? "1 0 auto" : 'unset',
182
- });
183
- }, navStyle);
184
- var Brand = /** @class */ (function (_super) {
185
- __extends(Brand, _super);
186
- function Brand() {
187
- return _super !== null && _super.apply(this, arguments) || this;
188
- }
189
- Brand.prototype.render = function () {
190
- var _a = this.props, _b = _a.variant, variant = _b === void 0 ? types_1.DeprecatedHeaderVariant.Dub : _b, brand = _a.brand, _c = _a.themeColor, themeColor = _c === void 0 ? types_1.DeprecatedHeaderTheme.White : _c, title = _a.title;
191
- switch (variant) {
192
- case types_1.DeprecatedHeaderVariant.Global: {
193
- return React.createElement("span", null, brand);
194
- }
195
- case types_1.DeprecatedHeaderVariant.Full: {
196
- return (React.createElement("span", null, brand || (React.createElement(parts_1.DeprecatedWorkdayLogoTitle, { title: title ? title : '', themeColor: themeColor }))));
197
- }
198
- // DeprecatedHeaderVariant.Dub is default
199
- default: {
200
- return (React.createElement("span", null, brand || React.createElement(parts_1.DeprecatedDubLogoTitle, { title: title ? title : '', themeColor: themeColor })));
201
- }
202
- }
203
- };
204
- return Brand;
205
- }(React.Component));
206
- var MenuIconButton = /** @class */ (function (_super) {
207
- __extends(MenuIconButton, _super);
208
- function MenuIconButton() {
209
- return _super !== null && _super.apply(this, arguments) || this;
210
- }
211
- MenuIconButton.prototype.render = function () {
212
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? types_1.DeprecatedHeaderTheme.White : _b, menuToggle = _a.menuToggle, onMenuClick = _a.onMenuClick;
213
- if (menuToggle) {
214
- var menuToggleElement = menuToggle;
215
- var onClick = menuToggleElement.props.onClick
216
- ? menuToggleElement.props.onClick
217
- : onMenuClick;
218
- return React.cloneElement(menuToggleElement, {
219
- onClick: onClick,
220
- className: 'canvas-header--menu-icon',
221
- });
222
- }
223
- return (React.createElement(button_1.IconButton, { variant: themeColor === types_1.DeprecatedHeaderTheme.White ? 'circle' : 'inverse', icon: canvas_system_icons_web_1.justifyIcon, className: 'canvas-header--menu-icon', "aria-label": "Open Menu", onClick: onMenuClick }));
224
- };
225
- return MenuIconButton;
226
- }(React.Component));
227
- /**
228
- * ### Deprecated Header
229
- *
230
- * As of Canvas Kit v6, this component is being soft-deprecated.
231
- * It will be hard-deprecated (completely removed) in v7. Please see the
232
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
233
- * for more information.
234
- */
235
- var Header = /** @class */ (function (_super) {
236
- __extends(Header, _super);
237
- function Header() {
238
- return _super !== null && _super.apply(this, arguments) || this;
239
- }
240
- Header.prototype.componentDidMount = function () {
241
- console.warn("Header is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
242
- };
243
- /**
244
- * Helper that recursively maps ReactNodes to their theme-based equivalent.
245
- * Any children that are included in a Header may need to undergo transformation
246
- * before stamped out in render().
247
- *
248
- * E.g. <SystemIcon> components need to have the appropriate `color` and `colorHover`
249
- * props set based on the theme.
250
- *
251
- * @param children From props.children of a React component
252
- *
253
- * @returns {React.ReactNode} The child/children to be rendered
254
- */
255
- Header.prototype.renderChildren = function (children) {
256
- var _this = this;
257
- return React.Children.map(children, function (child) {
258
- if (!React.isValidElement(child)) {
259
- return child;
260
- }
261
- var propsChildren = child.props.children;
262
- var singleChild = React.Children.count(propsChildren) === 1 && propsChildren;
263
- var iconButtonVariant = _this.props.themeColor === types_1.DeprecatedHeaderTheme.White ? 'circle' : 'inverse';
264
- // Convert old method of SystemIcon into IconButton. If SystemIcon is within a link, make sure it's passed through
265
- if (child.type === 'a' && singleChild && singleChild.type === icon_1.SystemIcon) {
266
- var href_1 = child.props.href;
267
- var iconButtonProps = {
268
- onClick: function () {
269
- if (href_1) {
270
- window.location.href = href_1;
271
- }
272
- },
273
- variant: iconButtonVariant,
274
- icon: singleChild.props.icon,
275
- };
276
- return React.createElement(button_1.IconButton, __assign({}, iconButtonProps, { "aria-label": "" }));
277
- }
278
- // If child has children, render them
279
- if (React.Children.count(propsChildren)) {
280
- return React.cloneElement(child, {
281
- children: _this.renderChildren(propsChildren),
282
- });
283
- }
284
- // Convert old method of SystemIcon into IconButton
285
- if (child.type === icon_1.SystemIcon) {
286
- var icon = child.props.icon;
287
- return React.createElement(button_1.IconButton, { variant: iconButtonVariant, icon: icon, "aria-label": icon.name });
288
- }
289
- // Plain icon buttons have negative margin that we need to negate.
290
- if (child.type === button_1.IconButton && child.props.variant === 'plain') {
291
- return React.cloneElement(child, {
292
- style: { margin: "0 0 0 " + childrenSpacing },
293
- });
294
- }
295
- return child;
296
- });
297
- };
298
- Header.prototype.render = function () {
299
- var _a = this.props, menuToggle = _a.menuToggle, _b = _a.themeColor, themeColor = _b === void 0 ? types_1.DeprecatedHeaderTheme.White : _b, _c = _a.variant, variant = _c === void 0 ? types_1.DeprecatedHeaderVariant.Dub : _c, centeredNav = _a.centeredNav, title = _a.title, brand = _a.brand, brandUrl = _a.brandUrl, onMenuClick = _a.onMenuClick, leftSlot = _a.leftSlot, isCollapsed = _a.isCollapsed, children = _a.children, elemProps = __rest(_a, ["menuToggle", "themeColor", "variant", "centeredNav", "title", "brand", "brandUrl", "onMenuClick", "leftSlot", "isCollapsed", "children"]);
300
- /* Push everything to the right if:
301
- - on tablet and mobile screens
302
- - Search isn't enabled and the nav shouldn't be centered
303
- - Search is enabled, and there aren't any children
304
- */
305
- var growBrand = isCollapsed || (!leftSlot && !centeredNav) || (leftSlot && !children);
306
- // Ignore centeredNav if search is enabled
307
- var shouldCenteredNav = leftSlot ? false : centeredNav;
308
- return (React.createElement(HeaderShell, __assign({ variant: variant, themeColor: themeColor }, elemProps),
309
- React.createElement(BrandSlot, { grow: growBrand }, brandUrl ? (React.createElement(BrandLink, { href: brandUrl },
310
- React.createElement(Brand, { variant: variant, brand: brand, title: title, themeColor: themeColor }))) : (React.createElement(Brand, { variant: variant, brand: brand, title: title, themeColor: themeColor }))),
311
- leftSlot,
312
- React.createElement(ChildrenSlot, { themeColor: themeColor, centeredNav: shouldCenteredNav, isCollapsed: isCollapsed }, isCollapsed ? (
313
- // Screen size is smaller than our largest breakpoint so turn nav into a hamburger
314
- // TODO: This needs to get changed to IconButton when we get it restyled for headers
315
- React.createElement(MenuIconButton, { themeColor: themeColor, menuToggle: menuToggle, onMenuClick: onMenuClick })) : (this.renderChildren(children)))));
316
- };
317
- Header.Theme = types_1.DeprecatedHeaderTheme;
318
- Header.Variant = types_1.DeprecatedHeaderVariant;
319
- return Header;
320
- }(React.Component));
321
- exports.default = Header;
@@ -1,30 +0,0 @@
1
- import * as React from 'react';
2
- import { DeprecatedHeaderTheme } from '../shared/types';
3
- export declare type DubTitleProps = {
4
- /**
5
- * The theme of the DubLogoTitle. Accepts `White`, `Blue`, or `Transparent`.
6
- * @default DeprecatedHeaderTheme.White
7
- */
8
- themeColor?: DeprecatedHeaderTheme;
9
- /**
10
- * The text of the DubLogoTitle. Not used if `brand` is provided.
11
- */
12
- title?: string;
13
- /**
14
- * The background color/gradient behind the DubLogoTitle logo.
15
- */
16
- bgColor?: string;
17
- };
18
- /**
19
- * ### Deprecated Dub Logo Title
20
- *
21
- * As of Canvas Kit v6, this component is being soft-deprecated.
22
- * It will be hard-deprecated (completely removed) in v7. Please see the
23
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
24
- * for more information.
25
- */
26
- export declare class DeprecatedDubLogoTitle extends React.Component<DubTitleProps> {
27
- componentDidMount(): void;
28
- render(): JSX.Element;
29
- }
30
- //# sourceMappingURL=DubLogoTitle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DubLogoTitle.d.ts","sourceRoot":"","sources":["../../../../../header/lib/parts/DubLogoTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAyB,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AAI9E,oBAAY,aAAa,GAAG;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AA4CF;;;;;;;GAOG;AACH,qBAAa,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACxE,iBAAiB;IAQjB,MAAM;CAgBP"}
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __importStar = (this && this.__importStar) || function (mod) {
27
- if (mod && mod.__esModule) return mod;
28
- var result = {};
29
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
30
- result["default"] = mod;
31
- return result;
32
- };
33
- var __importDefault = (this && this.__importDefault) || function (mod) {
34
- return (mod && mod.__esModule) ? mod : { "default": mod };
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- var React = __importStar(require("react"));
38
- var styled_1 = __importDefault(require("@emotion/styled"));
39
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
40
- var types_1 = require("../shared/types");
41
- var chroma_js_1 = __importDefault(require("chroma-js"));
42
- var common_1 = require("@workday/canvas-kit-react/common");
43
- var LockupContainer = styled_1.default('div')({
44
- display: 'inline-block',
45
- });
46
- var Lockup = styled_1.default('div')({
47
- display: 'flex',
48
- alignItems: 'center',
49
- height: types_1.DeprecatedHeaderHeight.Small,
50
- paddingLeft: tokens_1.space.m,
51
- }, function (_a) {
52
- var bgColor = _a.bgColor;
53
- return ({
54
- background: bgColor ? bgColor : 'none',
55
- });
56
- });
57
- var Title = styled_1.default('h3')({
58
- fontSize: '20px',
59
- fontWeight: 400,
60
- padding: tokens_1.space.xxs + " " + tokens_1.space.s,
61
- paddingRight: tokens_1.space.l,
62
- marginLeft: tokens_1.space.s,
63
- whiteSpace: 'nowrap',
64
- }, function (_a) {
65
- var themeColor = _a.themeColor;
66
- return ({
67
- color: themeColor === types_1.DeprecatedHeaderTheme.White ? tokens_1.colors.blueberry500 : tokens_1.colors.frenchVanilla100,
68
- borderLeft: "1px solid " + (themeColor === types_1.DeprecatedHeaderTheme.White
69
- ? tokens_1.colors.soap400
70
- : chroma_js_1.default(tokens_1.colors.frenchVanilla100)
71
- .alpha(0.3)
72
- .css()),
73
- });
74
- });
75
- var DubLogo = styled_1.default('div')({
76
- lineHeight: 0,
77
- });
78
- /**
79
- * ### Deprecated Dub Logo Title
80
- *
81
- * As of Canvas Kit v6, this component is being soft-deprecated.
82
- * It will be hard-deprecated (completely removed) in v7. Please see the
83
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
84
- * for more information.
85
- */
86
- var DeprecatedDubLogoTitle = /** @class */ (function (_super) {
87
- __extends(DeprecatedDubLogoTitle, _super);
88
- function DeprecatedDubLogoTitle() {
89
- return _super !== null && _super.apply(this, arguments) || this;
90
- }
91
- DeprecatedDubLogoTitle.prototype.componentDidMount = function () {
92
- console.warn("DubLogoTitle is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
93
- };
94
- DeprecatedDubLogoTitle.prototype.render = function () {
95
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? types_1.DeprecatedHeaderTheme.White : _b, title = _a.title;
96
- return (React.createElement(LockupContainer, null,
97
- React.createElement(Lockup, __assign({}, this.props),
98
- React.createElement(DubLogo, __assign({}, this.props, { dangerouslySetInnerHTML: {
99
- __html: themeColor === types_1.DeprecatedHeaderTheme.White ? common_1.dubLogoBlue : common_1.dubLogoWhite,
100
- } })),
101
- title && React.createElement(Title, __assign({}, this.props), title))));
102
- };
103
- return DeprecatedDubLogoTitle;
104
- }(React.Component));
105
- exports.DeprecatedDubLogoTitle = DeprecatedDubLogoTitle;
@@ -1,31 +0,0 @@
1
- import * as React from 'react';
2
- import { DeprecatedHeaderTheme, DeprecatedHeaderVariant } from '../shared/types';
3
- export declare type WorkdayLogoTitleProps = {
4
- /**
5
- * The theme of the WorkdayLogoTitle. Accepts `White`, `Blue`, or `Transparent`.
6
- * @default DeprecatedHeaderTheme.White
7
- */
8
- themeColor?: DeprecatedHeaderTheme;
9
- /**
10
- * The text of the WorkdayLogoTitle. Not used if `brand` is provided.
11
- * @default ''
12
- */
13
- title?: string;
14
- /**
15
- * The variant of the WorkdayLogoTitle.
16
- */
17
- variant?: DeprecatedHeaderVariant;
18
- };
19
- /**
20
- * ### Deprecated Workday Logo Title
21
- *
22
- * As of Canvas Kit v6, this component is being soft-deprecated.
23
- * It will be hard-deprecated (completely removed) in v7. Please see the
24
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
25
- * for more information.
26
- */
27
- export declare class DeprecatedWorkdayLogoTitle extends React.Component<WorkdayLogoTitleProps> {
28
- componentDidMount(): void;
29
- render(): JSX.Element;
30
- }
31
- //# sourceMappingURL=WorkdayLogoTitle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkdayLogoTitle.d.ts","sourceRoot":"","sources":["../../../../../header/lib/parts/WorkdayLogoTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AAKzB,oBAAY,qBAAqB,GAAG;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,CAAC;AAiDF;;;;;;;GAOG;AACH,qBAAa,0BAA2B,SAAQ,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC;IACpF,iBAAiB;IAQV,MAAM;CA2Bd"}
@@ -1,124 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __assign = (this && this.__assign) || function () {
16
- __assign = Object.assign || function(t) {
17
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18
- s = arguments[i];
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
- t[p] = s[p];
21
- }
22
- return t;
23
- };
24
- return __assign.apply(this, arguments);
25
- };
26
- var __rest = (this && this.__rest) || function (s, e) {
27
- var t = {};
28
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
29
- t[p] = s[p];
30
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
31
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
32
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
33
- t[p[i]] = s[p[i]];
34
- }
35
- return t;
36
- };
37
- var __importStar = (this && this.__importStar) || function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
41
- result["default"] = mod;
42
- return result;
43
- };
44
- var __importDefault = (this && this.__importDefault) || function (mod) {
45
- return (mod && mod.__esModule) ? mod : { "default": mod };
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- var React = __importStar(require("react"));
49
- var styled_1 = __importDefault(require("@emotion/styled"));
50
- var types_1 = require("../shared/types");
51
- var common_1 = require("@workday/canvas-kit-react/common");
52
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
53
- var chroma_js_1 = __importDefault(require("chroma-js"));
54
- var LockupContainer = styled_1.default('div')({
55
- display: 'inline-block',
56
- });
57
- var Lockup = styled_1.default('div')({
58
- display: 'flex',
59
- alignItems: 'center',
60
- justifyContent: 'center',
61
- }, function (_a) {
62
- var variant = _a.variant;
63
- return ({
64
- height: variant === types_1.DeprecatedHeaderVariant.Global
65
- ? types_1.DeprecatedHeaderHeight.Small
66
- : types_1.DeprecatedHeaderHeight.Large,
67
- });
68
- });
69
- var Title = styled_1.default('h3')({
70
- fontSize: '20px',
71
- fontWeight: 400,
72
- marginLeft: tokens_1.space.l,
73
- padding: tokens_1.space.s,
74
- paddingLeft: tokens_1.space.m,
75
- paddingRight: tokens_1.space.l,
76
- whiteSpace: 'nowrap',
77
- display: 'initial',
78
- }, function (_a) {
79
- var themeColor = _a.themeColor;
80
- return ({
81
- color: themeColor === types_1.DeprecatedHeaderTheme.White ? tokens_1.colors.blueberry500 : tokens_1.colors.frenchVanilla100,
82
- borderLeft: "1px solid " + (themeColor === types_1.DeprecatedHeaderTheme.White
83
- ? tokens_1.colors.soap400
84
- : chroma_js_1.default(tokens_1.colors.soap400)
85
- .alpha(0.4)
86
- .css()),
87
- });
88
- });
89
- var WorkdayLogo = styled_1.default('span')({
90
- paddingLeft: tokens_1.space.m,
91
- lineHeight: 0,
92
- });
93
- /**
94
- * ### Deprecated Workday Logo Title
95
- *
96
- * As of Canvas Kit v6, this component is being soft-deprecated.
97
- * It will be hard-deprecated (completely removed) in v7. Please see the
98
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
99
- * for more information.
100
- */
101
- var DeprecatedWorkdayLogoTitle = /** @class */ (function (_super) {
102
- __extends(DeprecatedWorkdayLogoTitle, _super);
103
- function DeprecatedWorkdayLogoTitle() {
104
- return _super !== null && _super.apply(this, arguments) || this;
105
- }
106
- DeprecatedWorkdayLogoTitle.prototype.componentDidMount = function () {
107
- console.warn("WorkdayLogoTitle is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
108
- };
109
- DeprecatedWorkdayLogoTitle.prototype.render = function () {
110
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? types_1.DeprecatedHeaderTheme.White : _b, _c = _a.title, title = _c === void 0 ? '' : _c, variant = _a.variant, elemProps = __rest(_a, ["themeColor", "title", "variant"]);
111
- return (React.createElement(LockupContainer, null,
112
- React.createElement(Lockup, __assign({}, this.props, elemProps),
113
- React.createElement(WorkdayLogo, __assign({}, this.props, { dangerouslySetInnerHTML: {
114
- __html: themeColor === types_1.DeprecatedHeaderTheme.White
115
- ? variant === types_1.DeprecatedHeaderVariant.Global
116
- ? common_1.miniWdayLogoBlue
117
- : common_1.wdayLogoBlue
118
- : common_1.wdayLogoWhite,
119
- } })),
120
- title && React.createElement(Title, __assign({}, this.props), title))));
121
- };
122
- return DeprecatedWorkdayLogoTitle;
123
- }(React.Component));
124
- exports.DeprecatedWorkdayLogoTitle = DeprecatedWorkdayLogoTitle;
@@ -1,3 +0,0 @@
1
- export { DeprecatedDubLogoTitle } from './DubLogoTitle';
2
- export { DeprecatedWorkdayLogoTitle } from './WorkdayLogoTitle';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../header/lib/parts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,0BAA0B,EAAC,MAAM,oBAAoB,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var DubLogoTitle_1 = require("./DubLogoTitle");
4
- exports.DeprecatedDubLogoTitle = DubLogoTitle_1.DeprecatedDubLogoTitle;
5
- var WorkdayLogoTitle_1 = require("./WorkdayLogoTitle");
6
- exports.DeprecatedWorkdayLogoTitle = WorkdayLogoTitle_1.DeprecatedWorkdayLogoTitle;