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

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