@workday/canvas-kit-labs-react 6.0.0-beta.0-next.15 → 6.0.2

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 (233) hide show
  1. package/combobox/lib/AutocompleteList.tsx +5 -2
  2. package/combobox/lib/Combobox.tsx +0 -1
  3. package/common/lib/theming/index.ts +1 -0
  4. package/common/lib/theming/useThemedRing.ts +84 -0
  5. package/dist/commonjs/combobox/lib/AutocompleteList.d.ts.map +1 -1
  6. package/dist/commonjs/combobox/lib/AutocompleteList.js +5 -2
  7. package/dist/commonjs/combobox/lib/Combobox.d.ts.map +1 -1
  8. package/dist/commonjs/combobox/lib/Combobox.js +0 -1
  9. package/dist/commonjs/common/lib/theming/index.d.ts +1 -0
  10. package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
  11. package/dist/commonjs/common/lib/theming/index.js +1 -0
  12. package/dist/commonjs/common/lib/theming/useThemedRing.d.ts +11 -0
  13. package/dist/commonjs/common/lib/theming/useThemedRing.d.ts.map +1 -0
  14. package/dist/commonjs/common/lib/theming/useThemedRing.js +61 -0
  15. package/dist/commonjs/header/index.d.ts +5 -5
  16. package/dist/commonjs/header/index.d.ts.map +1 -1
  17. package/dist/commonjs/header/index.js +2 -2
  18. package/dist/commonjs/header/lib/GlobalHeader.d.ts +11 -2
  19. package/dist/commonjs/header/lib/GlobalHeader.d.ts.map +1 -1
  20. package/dist/commonjs/header/lib/GlobalHeader.js +19 -8
  21. package/dist/commonjs/header/lib/Header.d.ts +17 -8
  22. package/dist/commonjs/header/lib/Header.d.ts.map +1 -1
  23. package/dist/commonjs/header/lib/Header.js +27 -14
  24. package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +13 -4
  25. package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts.map +1 -1
  26. package/dist/commonjs/header/lib/parts/DubLogoTitle.js +22 -11
  27. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +14 -5
  28. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts.map +1 -1
  29. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.js +25 -12
  30. package/dist/commonjs/header/lib/parts/index.d.ts +2 -3
  31. package/dist/commonjs/header/lib/parts/index.d.ts.map +1 -1
  32. package/dist/commonjs/header/lib/parts/index.js +2 -4
  33. package/dist/commonjs/header/lib/shared/themes.d.ts +28 -19
  34. package/dist/commonjs/header/lib/shared/themes.d.ts.map +1 -1
  35. package/dist/commonjs/header/lib/shared/themes.js +13 -36
  36. package/dist/commonjs/header/lib/shared/types.d.ts +3 -8
  37. package/dist/commonjs/header/lib/shared/types.d.ts.map +1 -1
  38. package/dist/commonjs/header/lib/shared/types.js +17 -23
  39. package/dist/commonjs/index.d.ts +2 -0
  40. package/dist/commonjs/index.d.ts.map +1 -1
  41. package/dist/commonjs/index.js +2 -0
  42. package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +1 -1
  43. package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts.map +1 -1
  44. package/dist/commonjs/search-form/index.d.ts +3 -0
  45. package/dist/commonjs/search-form/index.d.ts.map +1 -0
  46. package/dist/commonjs/search-form/index.js +7 -0
  47. package/dist/commonjs/{header/lib/parts/SearchBar.d.ts → search-form/lib/SearchForm.d.ts} +22 -23
  48. package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -0
  49. package/dist/commonjs/{header/lib/parts/SearchBar.js → search-form/lib/SearchForm.js} +13 -14
  50. package/dist/commonjs/search-form/lib/themes.d.ts +21 -0
  51. package/dist/commonjs/search-form/lib/themes.d.ts.map +1 -0
  52. package/dist/commonjs/search-form/lib/themes.js +41 -0
  53. package/dist/commonjs/text-input/index.d.ts +7 -0
  54. package/dist/commonjs/text-input/index.d.ts.map +1 -0
  55. package/dist/commonjs/text-input/index.js +11 -0
  56. package/dist/commonjs/text-input/lib/TextInput.d.ts +21 -0
  57. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -0
  58. package/dist/commonjs/text-input/lib/TextInput.js +36 -0
  59. package/dist/commonjs/text-input/lib/TextInputField.d.ts +8 -0
  60. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -0
  61. package/dist/commonjs/text-input/lib/TextInputField.js +66 -0
  62. package/dist/commonjs/text-input/lib/TextInputHint.d.ts +13 -0
  63. package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +1 -0
  64. package/dist/commonjs/text-input/lib/TextInputHint.js +46 -0
  65. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +17 -0
  66. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +1 -0
  67. package/dist/commonjs/text-input/lib/TextInputLabel.js +54 -0
  68. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +19 -0
  69. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -0
  70. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +16 -0
  71. package/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts +15 -0
  72. package/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts.map +1 -0
  73. package/dist/commonjs/text-input/lib/hooks/useTextInputHint.js +12 -0
  74. package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts +15 -0
  75. package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts.map +1 -0
  76. package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.js +12 -0
  77. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +17 -0
  78. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -0
  79. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +23 -0
  80. package/dist/es6/combobox/lib/AutocompleteList.d.ts.map +1 -1
  81. package/dist/es6/combobox/lib/AutocompleteList.js +5 -2
  82. package/dist/es6/combobox/lib/Combobox.d.ts.map +1 -1
  83. package/dist/es6/combobox/lib/Combobox.js +0 -1
  84. package/dist/es6/common/lib/theming/index.d.ts +1 -0
  85. package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
  86. package/dist/es6/common/lib/theming/index.js +1 -0
  87. package/dist/es6/common/lib/theming/useThemedRing.d.ts +11 -0
  88. package/dist/es6/common/lib/theming/useThemedRing.d.ts.map +1 -0
  89. package/dist/es6/common/lib/theming/useThemedRing.js +55 -0
  90. package/dist/es6/header/index.d.ts +5 -5
  91. package/dist/es6/header/index.d.ts.map +1 -1
  92. package/dist/es6/header/index.js +5 -5
  93. package/dist/es6/header/lib/GlobalHeader.d.ts +11 -2
  94. package/dist/es6/header/lib/GlobalHeader.d.ts.map +1 -1
  95. package/dist/es6/header/lib/GlobalHeader.js +22 -11
  96. package/dist/es6/header/lib/Header.d.ts +17 -8
  97. package/dist/es6/header/lib/Header.d.ts.map +1 -1
  98. package/dist/es6/header/lib/Header.js +30 -17
  99. package/dist/es6/header/lib/parts/DubLogoTitle.d.ts +13 -4
  100. package/dist/es6/header/lib/parts/DubLogoTitle.d.ts.map +1 -1
  101. package/dist/es6/header/lib/parts/DubLogoTitle.js +23 -12
  102. package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +14 -5
  103. package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts.map +1 -1
  104. package/dist/es6/header/lib/parts/WorkdayLogoTitle.js +26 -13
  105. package/dist/es6/header/lib/parts/index.d.ts +2 -3
  106. package/dist/es6/header/lib/parts/index.d.ts.map +1 -1
  107. package/dist/es6/header/lib/parts/index.js +2 -3
  108. package/dist/es6/header/lib/shared/themes.d.ts +28 -19
  109. package/dist/es6/header/lib/shared/themes.d.ts.map +1 -1
  110. package/dist/es6/header/lib/shared/themes.js +14 -37
  111. package/dist/es6/header/lib/shared/types.d.ts +3 -8
  112. package/dist/es6/header/lib/shared/types.d.ts.map +1 -1
  113. package/dist/es6/header/lib/shared/types.js +17 -23
  114. package/dist/es6/index.d.ts +2 -0
  115. package/dist/es6/index.d.ts.map +1 -1
  116. package/dist/es6/index.js +2 -0
  117. package/dist/es6/layout/lib/utils/getValidChildren.d.ts +1 -1
  118. package/dist/es6/layout/lib/utils/getValidChildren.d.ts.map +1 -1
  119. package/dist/es6/search-form/index.d.ts +3 -0
  120. package/dist/es6/search-form/index.d.ts.map +1 -0
  121. package/dist/es6/search-form/index.js +2 -0
  122. package/dist/es6/{header/lib/parts/SearchBar.d.ts → search-form/lib/SearchForm.d.ts} +22 -23
  123. package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -0
  124. package/dist/es6/{header/lib/parts/SearchBar.js → search-form/lib/SearchForm.js} +11 -12
  125. package/dist/es6/search-form/lib/themes.d.ts +21 -0
  126. package/dist/es6/search-form/lib/themes.d.ts.map +1 -0
  127. package/dist/es6/search-form/lib/themes.js +39 -0
  128. package/dist/es6/text-input/index.d.ts +7 -0
  129. package/dist/es6/text-input/index.d.ts.map +1 -0
  130. package/dist/es6/text-input/index.js +6 -0
  131. package/dist/es6/text-input/lib/TextInput.d.ts +21 -0
  132. package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -0
  133. package/dist/es6/text-input/lib/TextInput.js +31 -0
  134. package/dist/es6/text-input/lib/TextInputField.d.ts +8 -0
  135. package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -0
  136. package/dist/es6/text-input/lib/TextInputField.js +64 -0
  137. package/dist/es6/text-input/lib/TextInputHint.d.ts +13 -0
  138. package/dist/es6/text-input/lib/TextInputHint.d.ts.map +1 -0
  139. package/dist/es6/text-input/lib/TextInputHint.js +44 -0
  140. package/dist/es6/text-input/lib/TextInputLabel.d.ts +17 -0
  141. package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +1 -0
  142. package/dist/es6/text-input/lib/TextInputLabel.js +52 -0
  143. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +19 -0
  144. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -0
  145. package/dist/es6/text-input/lib/hooks/useTextInputField.js +14 -0
  146. package/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts +15 -0
  147. package/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts.map +1 -0
  148. package/dist/es6/text-input/lib/hooks/useTextInputHint.js +10 -0
  149. package/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts +15 -0
  150. package/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts.map +1 -0
  151. package/dist/es6/text-input/lib/hooks/useTextInputLabel.js +10 -0
  152. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +17 -0
  153. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -0
  154. package/dist/es6/text-input/lib/hooks/useTextInputModel.js +21 -0
  155. package/header/README.md +37 -181
  156. package/header/index.ts +5 -5
  157. package/header/lib/GlobalHeader.tsx +26 -9
  158. package/header/lib/Header.tsx +58 -26
  159. package/header/lib/parts/DubLogoTitle.tsx +26 -9
  160. package/header/lib/parts/WorkdayLogoTitle.tsx +40 -11
  161. package/header/lib/parts/index.ts +2 -3
  162. package/header/lib/shared/themes.tsx +32 -56
  163. package/header/lib/shared/types.tsx +3 -9
  164. package/index.ts +2 -0
  165. package/package.json +7 -5
  166. package/search-form/LICENSE +52 -0
  167. package/search-form/README.md +6 -0
  168. package/search-form/index.ts +2 -0
  169. package/{header/lib/parts/SearchBar.tsx → search-form/lib/SearchForm.tsx} +30 -31
  170. package/search-form/lib/themes.ts +54 -0
  171. package/search-form/package.json +5 -0
  172. package/text-input/LICENSE +52 -0
  173. package/text-input/README.md +11 -0
  174. package/text-input/index.ts +6 -0
  175. package/text-input/lib/TextInput.tsx +34 -0
  176. package/text-input/lib/TextInputField.tsx +75 -0
  177. package/text-input/lib/TextInputHint.tsx +52 -0
  178. package/text-input/lib/TextInputLabel.tsx +74 -0
  179. package/text-input/lib/hooks/useTextInputField.tsx +15 -0
  180. package/text-input/lib/hooks/useTextInputHint.tsx +11 -0
  181. package/text-input/lib/hooks/useTextInputLabel.tsx +11 -0
  182. package/text-input/lib/hooks/useTextInputModel.tsx +45 -0
  183. package/text-input/package.json +5 -0
  184. package/ts3.5/dist/commonjs/common/lib/theming/index.d.ts +1 -0
  185. package/ts3.5/dist/commonjs/common/lib/theming/useThemedRing.d.ts +11 -0
  186. package/ts3.5/dist/commonjs/header/index.d.ts +5 -5
  187. package/ts3.5/dist/commonjs/header/lib/GlobalHeader.d.ts +11 -2
  188. package/ts3.5/dist/commonjs/header/lib/Header.d.ts +17 -8
  189. package/ts3.5/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +13 -4
  190. package/ts3.5/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +14 -5
  191. package/ts3.5/dist/commonjs/header/lib/parts/index.d.ts +2 -3
  192. package/ts3.5/dist/commonjs/header/lib/shared/themes.d.ts +28 -19
  193. package/ts3.5/dist/commonjs/header/lib/shared/types.d.ts +3 -8
  194. package/ts3.5/dist/commonjs/index.d.ts +2 -0
  195. package/ts3.5/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +1 -1
  196. package/ts3.5/dist/commonjs/search-form/index.d.ts +3 -0
  197. package/ts3.5/dist/commonjs/{header/lib/parts/SearchBar.d.ts → search-form/lib/SearchForm.d.ts} +22 -23
  198. package/ts3.5/dist/commonjs/search-form/lib/themes.d.ts +21 -0
  199. package/ts3.5/dist/commonjs/text-input/index.d.ts +7 -0
  200. package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +21 -0
  201. package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +8 -0
  202. package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +13 -0
  203. package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +17 -0
  204. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +19 -0
  205. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts +15 -0
  206. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts +15 -0
  207. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +17 -0
  208. package/ts3.5/dist/es6/common/lib/theming/index.d.ts +1 -0
  209. package/ts3.5/dist/es6/common/lib/theming/useThemedRing.d.ts +11 -0
  210. package/ts3.5/dist/es6/header/index.d.ts +5 -5
  211. package/ts3.5/dist/es6/header/lib/GlobalHeader.d.ts +11 -2
  212. package/ts3.5/dist/es6/header/lib/Header.d.ts +17 -8
  213. package/ts3.5/dist/es6/header/lib/parts/DubLogoTitle.d.ts +13 -4
  214. package/ts3.5/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +14 -5
  215. package/ts3.5/dist/es6/header/lib/parts/index.d.ts +2 -3
  216. package/ts3.5/dist/es6/header/lib/shared/themes.d.ts +28 -19
  217. package/ts3.5/dist/es6/header/lib/shared/types.d.ts +3 -8
  218. package/ts3.5/dist/es6/index.d.ts +2 -0
  219. package/ts3.5/dist/es6/layout/lib/utils/getValidChildren.d.ts +1 -1
  220. package/ts3.5/dist/es6/search-form/index.d.ts +3 -0
  221. package/ts3.5/dist/es6/{header/lib/parts/SearchBar.d.ts → search-form/lib/SearchForm.d.ts} +22 -23
  222. package/ts3.5/dist/es6/search-form/lib/themes.d.ts +21 -0
  223. package/ts3.5/dist/es6/text-input/index.d.ts +7 -0
  224. package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +21 -0
  225. package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +8 -0
  226. package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +13 -0
  227. package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +17 -0
  228. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +19 -0
  229. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts +15 -0
  230. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts +15 -0
  231. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +17 -0
  232. package/dist/commonjs/header/lib/parts/SearchBar.d.ts.map +0 -1
  233. package/dist/es6/header/lib/parts/SearchBar.d.ts.map +0 -1
@@ -0,0 +1,55 @@
1
+ import { useThemeRTL } from './useThemeRTL';
2
+ import { colors, inputColors } from '@workday/canvas-kit-react/tokens';
3
+ import chroma from 'chroma-js';
4
+ var isAccessible = function (foreground, background) {
5
+ if (background === void 0) { background = colors.frenchVanilla100; }
6
+ return chroma.contrast(foreground, background) >= 3;
7
+ };
8
+ var getPaletteColorsFromTheme = function (fallbackColors, palette) {
9
+ return palette
10
+ ? {
11
+ outer: isAccessible(palette === null || palette === void 0 ? void 0 : palette.main) ? palette === null || palette === void 0 ? void 0 : palette.main : palette === null || palette === void 0 ? void 0 : palette.darkest,
12
+ inner: palette === null || palette === void 0 ? void 0 : palette.main,
13
+ }
14
+ : fallbackColors;
15
+ };
16
+ export function getPaletteColors(type, theme) {
17
+ var palette = theme === null || theme === void 0 ? void 0 : theme.canvas.palette[type];
18
+ switch (type) {
19
+ case 'error': {
20
+ return getPaletteColorsFromTheme({
21
+ outer: inputColors.error.border,
22
+ inner: inputColors.error.border,
23
+ }, palette);
24
+ }
25
+ case 'alert': {
26
+ return getPaletteColorsFromTheme({
27
+ outer: colors.cantaloupe600,
28
+ inner: inputColors.alert.border,
29
+ }, palette);
30
+ }
31
+ default: {
32
+ return getPaletteColorsFromTheme({}, palette);
33
+ }
34
+ }
35
+ }
36
+ export var useThemedRing = function (type) {
37
+ var _a = useThemeRTL(), themeRTL = _a.themeRTL, theme = _a.theme;
38
+ var paletteColors = getPaletteColors(type, theme);
39
+ if (!((paletteColors === null || paletteColors === void 0 ? void 0 : paletteColors.outer) || (paletteColors === null || paletteColors === void 0 ? void 0 : paletteColors.inner))) {
40
+ return {};
41
+ }
42
+ var errorBoxShadow = "inset 0 0 0 " + (paletteColors.outer === paletteColors.inner ? 1 : 2) + "px " + paletteColors.inner;
43
+ return themeRTL({
44
+ borderColor: paletteColors.outer,
45
+ transition: '100ms box-shadow',
46
+ boxShadow: errorBoxShadow,
47
+ '&:hover, &:disabled': {
48
+ borderColor: paletteColors.outer,
49
+ },
50
+ '&:focus:not([disabled])': {
51
+ borderColor: paletteColors.outer,
52
+ boxShadow: errorBoxShadow + ",\n 0 0 0 2px " + colors.frenchVanilla100 + ",\n 0 0 0 4px " + (theme ? theme.canvas.palette.common.focusOutline : inputColors.focusBorder),
53
+ },
54
+ });
55
+ };
@@ -1,8 +1,8 @@
1
- import Header from './lib/Header';
2
- import GlobalHeader from './lib/GlobalHeader';
3
- export default Header;
4
- export { Header };
5
- export { GlobalHeader };
1
+ import DeprecatedHeader from './lib/Header';
2
+ import DeprecatedGlobalHeader from './lib/GlobalHeader';
3
+ export default DeprecatedHeader;
4
+ export { DeprecatedHeader };
5
+ export { DeprecatedGlobalHeader };
6
6
  export * from './lib/parts';
7
7
  export * from './lib/shared/themes';
8
8
  export * from './lib/shared/types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../header/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,eAAe,MAAM,CAAC;AACtB,OAAO,EAAC,MAAM,EAAC,CAAC;AAChB,OAAO,EAAC,YAAY,EAAC,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../header/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,cAAc,CAAC;AAC5C,OAAO,sBAAsB,MAAM,oBAAoB,CAAC;AAExD,eAAe,gBAAgB,CAAC;AAChC,OAAO,EAAC,gBAAgB,EAAC,CAAC;AAC1B,OAAO,EAAC,sBAAsB,EAAC,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -1,8 +1,8 @@
1
- import Header from './lib/Header';
2
- import GlobalHeader from './lib/GlobalHeader';
3
- export default Header;
4
- export { Header };
5
- export { GlobalHeader };
1
+ import DeprecatedHeader from './lib/Header';
2
+ import DeprecatedGlobalHeader from './lib/GlobalHeader';
3
+ export default DeprecatedHeader;
4
+ export { DeprecatedHeader };
5
+ export { DeprecatedGlobalHeader };
6
6
  export * from './lib/parts';
7
7
  export * from './lib/shared/themes';
8
8
  export * from './lib/shared/types';
@@ -19,11 +19,20 @@ export interface GlobalHeaderProps {
19
19
  */
20
20
  isCollapsed?: boolean;
21
21
  /**
22
- * The React element to render in the left slot of the GlobalHeader. This is typically a SearchBar component.
22
+ * The React element to render in the left slot of the GlobalHeader. This is typically a SearchForm component.
23
23
  */
24
24
  leftSlot?: React.ReactElement;
25
25
  }
26
- export default class GlobalHeader extends React.Component<GlobalHeaderProps> {
26
+ /**
27
+ * ### Deprecated Global Header
28
+ *
29
+ * As of Canvas Kit v6, this component is being soft-deprecated.
30
+ * It will be hard-deprecated (completely removed) in v7. Please see the
31
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
32
+ * for more information.
33
+ */
34
+ export default class DeprecatedGlobalHeader extends React.Component<GlobalHeaderProps> {
35
+ componentDidMount(): void;
27
36
  render(): JSX.Element;
28
37
  }
29
38
  //# sourceMappingURL=GlobalHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalHeader.d.ts","sourceRoot":"","sources":["../../../../header/lib/GlobalHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IACnE,MAAM;CAwBd"}
1
+ {"version":3,"file":"GlobalHeader.d.ts","sourceRoot":"","sources":["../../../../header/lib/GlobalHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC;IACpF,iBAAiB;IASV,MAAM;CAwBd"}
@@ -34,18 +34,29 @@ var __rest = (this && this.__rest) || function (s, e) {
34
34
  return t;
35
35
  };
36
36
  import * as React from 'react';
37
- import Header from './Header';
38
- import { HeaderVariant } from './shared/types';
39
- import { DubLogoTitle } from './parts';
40
- var GlobalHeader = /** @class */ (function (_super) {
41
- __extends(GlobalHeader, _super);
42
- function GlobalHeader() {
37
+ import DeprecatedHeader from './Header';
38
+ import { DeprecatedHeaderVariant } from './shared/types';
39
+ import { DeprecatedDubLogoTitle } from './parts';
40
+ /**
41
+ * ### Deprecated Global Header
42
+ *
43
+ * As of Canvas Kit v6, this component is being soft-deprecated.
44
+ * It will be hard-deprecated (completely removed) in v7. Please see the
45
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
46
+ * for more information.
47
+ */
48
+ var DeprecatedGlobalHeader = /** @class */ (function (_super) {
49
+ __extends(DeprecatedGlobalHeader, _super);
50
+ function DeprecatedGlobalHeader() {
43
51
  return _super !== null && _super.apply(this, arguments) || this;
44
52
  }
45
- GlobalHeader.prototype.render = function () {
46
- var _a = this.props, _b = _a.brand, brand = _b === void 0 ? React.createElement(DubLogoTitle, null) : _b, menuToggle = _a.menuToggle, onMenuClick = _a.onMenuClick, isCollapsed = _a.isCollapsed, leftSlot = _a.leftSlot, children = _a.children, elemProps = __rest(_a, ["brand", "menuToggle", "onMenuClick", "isCollapsed", "leftSlot", "children"]);
47
- return (React.createElement(Header, __assign({ brand: brand, menuToggle: menuToggle, leftSlot: leftSlot, onMenuClick: onMenuClick, variant: HeaderVariant.Global, isCollapsed: isCollapsed }, elemProps), children));
53
+ DeprecatedGlobalHeader.prototype.componentDidMount = function () {
54
+ console.warn("GlobalHeader 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 ");
48
55
  };
49
- return GlobalHeader;
56
+ DeprecatedGlobalHeader.prototype.render = function () {
57
+ var _a = this.props, _b = _a.brand, brand = _b === void 0 ? React.createElement(DeprecatedDubLogoTitle, null) : _b, menuToggle = _a.menuToggle, onMenuClick = _a.onMenuClick, isCollapsed = _a.isCollapsed, leftSlot = _a.leftSlot, children = _a.children, elemProps = __rest(_a, ["brand", "menuToggle", "onMenuClick", "isCollapsed", "leftSlot", "children"]);
58
+ return (React.createElement(DeprecatedHeader, __assign({ brand: brand, menuToggle: menuToggle, leftSlot: leftSlot, onMenuClick: onMenuClick, variant: DeprecatedHeaderVariant.Global, isCollapsed: isCollapsed }, elemProps), children));
59
+ };
60
+ return DeprecatedGlobalHeader;
50
61
  }(React.Component));
51
- export default GlobalHeader;
62
+ export default DeprecatedGlobalHeader;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { HeaderTheme, HeaderVariant } from './shared/types';
2
+ import { DeprecatedHeaderTheme, DeprecatedHeaderVariant } from './shared/types';
3
3
  export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /**
5
5
  * The custom menu toggle node of the Header. This React node replaces the default menu toggle.
@@ -7,14 +7,14 @@ export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  menuToggle?: React.ReactNode;
8
8
  /**
9
9
  * The theme of the Header. Accepts `White`, `Blue`, or `Transparent`.
10
- * @default HeaderTheme.White
10
+ * @default DeprecatedHeaderTheme.White
11
11
  */
12
- themeColor?: HeaderTheme;
12
+ themeColor?: DeprecatedHeaderTheme;
13
13
  /**
14
14
  * The variant of the Header. Accepts `Dub` (small) or `Full` (large).
15
- * @default HeaderVariant.Dub
15
+ * @default DeprecatedHeaderVariant.Dub
16
16
  */
17
- variant?: HeaderVariant;
17
+ variant?: DeprecatedHeaderVariant;
18
18
  /**
19
19
  * The text of the Header title. Not used if `brand` is provided.
20
20
  */
@@ -37,7 +37,7 @@ export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
37
37
  */
38
38
  onMenuClick?: (e: React.MouseEvent) => void;
39
39
  /**
40
- * The React element to render in the left slot of the Header. This is typically a SearchBar component.
40
+ * The React element to render in the left slot of the Header. This is typically a SearchForm component.
41
41
  */
42
42
  leftSlot?: React.ReactElement;
43
43
  /**
@@ -46,9 +46,18 @@ export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
46
46
  */
47
47
  isCollapsed?: boolean;
48
48
  }
49
+ /**
50
+ * ### Deprecated Header
51
+ *
52
+ * As of Canvas Kit v6, this component is being soft-deprecated.
53
+ * It will be hard-deprecated (completely removed) in v7. Please see the
54
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
55
+ * for more information.
56
+ */
49
57
  export default class Header extends React.Component<HeaderProps, {}> {
50
- static Theme: typeof HeaderTheme;
51
- static Variant: typeof HeaderVariant;
58
+ static Theme: typeof DeprecatedHeaderTheme;
59
+ static Variant: typeof DeprecatedHeaderVariant;
60
+ componentDidMount(): void;
52
61
  /**
53
62
  * Helper that recursively maps ReactNodes to their theme-based equivalent.
54
63
  * Any children that are included in a Header may need to undergo transformation
@@ -1 +1 @@
1
- {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../header/lib/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAe,WAAW,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAMxE,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAkND,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;IAClE,MAAM,CAAC,KAAK,qBAAe;IAC3B,MAAM,CAAC,OAAO,uBAAiB;IAE/B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,cAAc;IAuDtB,MAAM;CA0DP"}
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../header/lib/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAEL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AA4ND;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;IAClE,MAAM,CAAC,KAAK,+BAAyB;IACrC,MAAM,CAAC,OAAO,iCAA2B;IAEzC,iBAAiB;IASjB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,cAAc;IAwDtB,MAAM;CA0DP"}
@@ -37,9 +37,9 @@ import * as React from 'react';
37
37
  import { css } from '@emotion/core';
38
38
  import styled from '@emotion/styled';
39
39
  import { borderRadius, space, type } from '@workday/canvas-kit-react/tokens';
40
- import { DubLogoTitle, WorkdayLogoTitle } from './parts';
41
- import { themes } from './shared/themes';
42
- import { HeaderHeight, HeaderTheme, HeaderVariant } from './shared/types';
40
+ import { DeprecatedDubLogoTitle, DeprecatedWorkdayLogoTitle } from './parts';
41
+ import { deprecatedHeaderThemes } from './shared/themes';
42
+ import { DeprecatedHeaderHeight, DeprecatedHeaderTheme, DeprecatedHeaderVariant, } from './shared/types';
43
43
  import { Hyperlink, IconButton } from '@workday/canvas-kit-react/button';
44
44
  import { SystemIcon } from '@workday/canvas-kit-react/icon';
45
45
  import { justifyIcon } from '@workday/canvas-system-icons-web';
@@ -48,7 +48,9 @@ var HeaderShell = styled('div')(__assign(__assign({ display: 'flex', alignItems:
48
48
  var variant = _a.variant, themeColor = _a.themeColor;
49
49
  return (__assign(__assign({
50
50
  // Only the variant Full has a large header, all the other one (Dub, Global) have a small header height
51
- height: variant === HeaderVariant.Full ? HeaderHeight.Large : HeaderHeight.Small, background: themes[themeColor].background }, themes[themeColor].depth), { color: themes[themeColor].color }));
51
+ height: variant === DeprecatedHeaderVariant.Full
52
+ ? DeprecatedHeaderHeight.Large
53
+ : DeprecatedHeaderHeight.Small, background: deprecatedHeaderThemes[themeColor].background }, deprecatedHeaderThemes[themeColor].depth), { color: deprecatedHeaderThemes[themeColor].color }));
52
54
  });
53
55
  var BrandSlot = styled('div')({
54
56
  height: '100%',
@@ -65,7 +67,7 @@ var BrandLink = styled(Hyperlink)({
65
67
  });
66
68
  var navStyle = function (_a) {
67
69
  var themeColor = _a.themeColor;
68
- var theme = themes[themeColor];
70
+ var theme = deprecatedHeaderThemes[themeColor];
69
71
  return css({
70
72
  nav: {
71
73
  display: 'flex',
@@ -173,17 +175,17 @@ var Brand = /** @class */ (function (_super) {
173
175
  return _super !== null && _super.apply(this, arguments) || this;
174
176
  }
175
177
  Brand.prototype.render = function () {
176
- var _a = this.props, _b = _a.variant, variant = _b === void 0 ? HeaderVariant.Dub : _b, brand = _a.brand, _c = _a.themeColor, themeColor = _c === void 0 ? HeaderTheme.White : _c, title = _a.title;
178
+ var _a = this.props, _b = _a.variant, variant = _b === void 0 ? DeprecatedHeaderVariant.Dub : _b, brand = _a.brand, _c = _a.themeColor, themeColor = _c === void 0 ? DeprecatedHeaderTheme.White : _c, title = _a.title;
177
179
  switch (variant) {
178
- case HeaderVariant.Global: {
180
+ case DeprecatedHeaderVariant.Global: {
179
181
  return React.createElement("span", null, brand);
180
182
  }
181
- case HeaderVariant.Full: {
182
- return (React.createElement("span", null, brand || React.createElement(WorkdayLogoTitle, { title: title ? title : '', themeColor: themeColor })));
183
+ case DeprecatedHeaderVariant.Full: {
184
+ return (React.createElement("span", null, brand || (React.createElement(DeprecatedWorkdayLogoTitle, { title: title ? title : '', themeColor: themeColor }))));
183
185
  }
184
- // HeaderVariant.Dub is default
186
+ // DeprecatedHeaderVariant.Dub is default
185
187
  default: {
186
- return (React.createElement("span", null, brand || React.createElement(DubLogoTitle, { title: title ? title : '', themeColor: themeColor })));
188
+ return (React.createElement("span", null, brand || React.createElement(DeprecatedDubLogoTitle, { title: title ? title : '', themeColor: themeColor })));
187
189
  }
188
190
  }
189
191
  };
@@ -195,7 +197,7 @@ var MenuIconButton = /** @class */ (function (_super) {
195
197
  return _super !== null && _super.apply(this, arguments) || this;
196
198
  }
197
199
  MenuIconButton.prototype.render = function () {
198
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? HeaderTheme.White : _b, menuToggle = _a.menuToggle, onMenuClick = _a.onMenuClick;
200
+ var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? DeprecatedHeaderTheme.White : _b, menuToggle = _a.menuToggle, onMenuClick = _a.onMenuClick;
199
201
  if (menuToggle) {
200
202
  var menuToggleElement = menuToggle;
201
203
  var onClick = menuToggleElement.props.onClick
@@ -206,15 +208,26 @@ var MenuIconButton = /** @class */ (function (_super) {
206
208
  className: 'canvas-header--menu-icon',
207
209
  });
208
210
  }
209
- return (React.createElement(IconButton, { variant: themeColor === HeaderTheme.White ? 'circle' : 'inverse', icon: justifyIcon, className: 'canvas-header--menu-icon', "aria-label": "Open Menu", onClick: onMenuClick }));
211
+ return (React.createElement(IconButton, { variant: themeColor === DeprecatedHeaderTheme.White ? 'circle' : 'inverse', icon: justifyIcon, className: 'canvas-header--menu-icon', "aria-label": "Open Menu", onClick: onMenuClick }));
210
212
  };
211
213
  return MenuIconButton;
212
214
  }(React.Component));
215
+ /**
216
+ * ### Deprecated Header
217
+ *
218
+ * As of Canvas Kit v6, this component is being soft-deprecated.
219
+ * It will be hard-deprecated (completely removed) in v7. Please see the
220
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
221
+ * for more information.
222
+ */
213
223
  var Header = /** @class */ (function (_super) {
214
224
  __extends(Header, _super);
215
225
  function Header() {
216
226
  return _super !== null && _super.apply(this, arguments) || this;
217
227
  }
228
+ Header.prototype.componentDidMount = function () {
229
+ 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 ");
230
+ };
218
231
  /**
219
232
  * Helper that recursively maps ReactNodes to their theme-based equivalent.
220
233
  * Any children that are included in a Header may need to undergo transformation
@@ -235,7 +248,7 @@ var Header = /** @class */ (function (_super) {
235
248
  }
236
249
  var propsChildren = child.props.children;
237
250
  var singleChild = React.Children.count(propsChildren) === 1 && propsChildren;
238
- var iconButtonVariant = _this.props.themeColor === HeaderTheme.White ? 'circle' : 'inverse';
251
+ var iconButtonVariant = _this.props.themeColor === DeprecatedHeaderTheme.White ? 'circle' : 'inverse';
239
252
  // Convert old method of SystemIcon into IconButton. If SystemIcon is within a link, make sure it's passed through
240
253
  if (child.type === 'a' && singleChild && singleChild.type === SystemIcon) {
241
254
  var href_1 = child.props.href;
@@ -271,7 +284,7 @@ var Header = /** @class */ (function (_super) {
271
284
  });
272
285
  };
273
286
  Header.prototype.render = function () {
274
- var _a = this.props, menuToggle = _a.menuToggle, _b = _a.themeColor, themeColor = _b === void 0 ? HeaderTheme.White : _b, _c = _a.variant, variant = _c === void 0 ? HeaderVariant.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"]);
287
+ var _a = this.props, menuToggle = _a.menuToggle, _b = _a.themeColor, themeColor = _b === void 0 ? DeprecatedHeaderTheme.White : _b, _c = _a.variant, variant = _c === void 0 ? 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"]);
275
288
  /* Push everything to the right if:
276
289
  - on tablet and mobile screens
277
290
  - Search isn't enabled and the nav shouldn't be centered
@@ -289,8 +302,8 @@ var Header = /** @class */ (function (_super) {
289
302
  // TODO: This needs to get changed to IconButton when we get it restyled for headers
290
303
  React.createElement(MenuIconButton, { themeColor: themeColor, menuToggle: menuToggle, onMenuClick: onMenuClick })) : (this.renderChildren(children)))));
291
304
  };
292
- Header.Theme = HeaderTheme;
293
- Header.Variant = HeaderVariant;
305
+ Header.Theme = DeprecatedHeaderTheme;
306
+ Header.Variant = DeprecatedHeaderVariant;
294
307
  return Header;
295
308
  }(React.Component));
296
309
  export default Header;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
- import { HeaderTheme } from '../shared/types';
2
+ import { DeprecatedHeaderTheme } from '../shared/types';
3
3
  export declare type DubTitleProps = {
4
4
  /**
5
5
  * The theme of the DubLogoTitle. Accepts `White`, `Blue`, or `Transparent`.
6
- * @default HeaderTheme.White
6
+ * @default DeprecatedHeaderTheme.White
7
7
  */
8
- themeColor?: HeaderTheme;
8
+ themeColor?: DeprecatedHeaderTheme;
9
9
  /**
10
10
  * The text of the DubLogoTitle. Not used if `brand` is provided.
11
11
  */
@@ -15,7 +15,16 @@ export declare type DubTitleProps = {
15
15
  */
16
16
  bgColor?: string;
17
17
  };
18
- export declare class DubLogoTitle extends React.Component<DubTitleProps> {
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;
19
28
  render(): JSX.Element;
20
29
  }
21
30
  //# sourceMappingURL=DubLogoTitle.d.ts.map
@@ -1 +1 @@
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,EAAe,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAI1D,oBAAY,aAAa,GAAG;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AA2CF,qBAAa,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IAC9D,MAAM;CAgBP"}
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"}
@@ -25,7 +25,7 @@ var __assign = (this && this.__assign) || function () {
25
25
  import * as React from 'react';
26
26
  import styled from '@emotion/styled';
27
27
  import { colors, space } from '@workday/canvas-kit-react/tokens';
28
- import { HeaderHeight, HeaderTheme } from '../shared/types';
28
+ import { DeprecatedHeaderHeight, DeprecatedHeaderTheme } from '../shared/types';
29
29
  import chroma from 'chroma-js';
30
30
  import { dubLogoWhite, dubLogoBlue } from '@workday/canvas-kit-react/common';
31
31
  var LockupContainer = styled('div')({
@@ -34,7 +34,7 @@ var LockupContainer = styled('div')({
34
34
  var Lockup = styled('div')({
35
35
  display: 'flex',
36
36
  alignItems: 'center',
37
- height: HeaderHeight.Small,
37
+ height: DeprecatedHeaderHeight.Small,
38
38
  paddingLeft: space.m,
39
39
  }, function (_a) {
40
40
  var bgColor = _a.bgColor;
@@ -52,8 +52,8 @@ var Title = styled('h3')({
52
52
  }, function (_a) {
53
53
  var themeColor = _a.themeColor;
54
54
  return ({
55
- color: themeColor === HeaderTheme.White ? colors.blueberry500 : colors.frenchVanilla100,
56
- borderLeft: "1px solid " + (themeColor === HeaderTheme.White
55
+ color: themeColor === DeprecatedHeaderTheme.White ? colors.blueberry500 : colors.frenchVanilla100,
56
+ borderLeft: "1px solid " + (themeColor === DeprecatedHeaderTheme.White
57
57
  ? colors.soap400
58
58
  : chroma(colors.frenchVanilla100)
59
59
  .alpha(0.3)
@@ -63,20 +63,31 @@ var Title = styled('h3')({
63
63
  var DubLogo = styled('div')({
64
64
  lineHeight: 0,
65
65
  });
66
- var DubLogoTitle = /** @class */ (function (_super) {
67
- __extends(DubLogoTitle, _super);
68
- function DubLogoTitle() {
66
+ /**
67
+ * ### Deprecated Dub Logo Title
68
+ *
69
+ * As of Canvas Kit v6, this component is being soft-deprecated.
70
+ * It will be hard-deprecated (completely removed) in v7. Please see the
71
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
72
+ * for more information.
73
+ */
74
+ var DeprecatedDubLogoTitle = /** @class */ (function (_super) {
75
+ __extends(DeprecatedDubLogoTitle, _super);
76
+ function DeprecatedDubLogoTitle() {
69
77
  return _super !== null && _super.apply(this, arguments) || this;
70
78
  }
71
- DubLogoTitle.prototype.render = function () {
72
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? HeaderTheme.White : _b, title = _a.title;
79
+ DeprecatedDubLogoTitle.prototype.componentDidMount = function () {
80
+ 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 ");
81
+ };
82
+ DeprecatedDubLogoTitle.prototype.render = function () {
83
+ var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? DeprecatedHeaderTheme.White : _b, title = _a.title;
73
84
  return (React.createElement(LockupContainer, null,
74
85
  React.createElement(Lockup, __assign({}, this.props),
75
86
  React.createElement(DubLogo, __assign({}, this.props, { dangerouslySetInnerHTML: {
76
- __html: themeColor === HeaderTheme.White ? dubLogoBlue : dubLogoWhite,
87
+ __html: themeColor === DeprecatedHeaderTheme.White ? dubLogoBlue : dubLogoWhite,
77
88
  } })),
78
89
  title && React.createElement(Title, __assign({}, this.props), title))));
79
90
  };
80
- return DubLogoTitle;
91
+ return DeprecatedDubLogoTitle;
81
92
  }(React.Component));
82
- export { DubLogoTitle };
93
+ export { DeprecatedDubLogoTitle };
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
- import { HeaderTheme, HeaderVariant } from '../shared/types';
2
+ import { DeprecatedHeaderTheme, DeprecatedHeaderVariant } from '../shared/types';
3
3
  export declare type WorkdayLogoTitleProps = {
4
4
  /**
5
5
  * The theme of the WorkdayLogoTitle. Accepts `White`, `Blue`, or `Transparent`.
6
- * @default HeaderTheme.White
6
+ * @default DeprecatedHeaderTheme.White
7
7
  */
8
- themeColor?: HeaderTheme;
8
+ themeColor?: DeprecatedHeaderTheme;
9
9
  /**
10
10
  * The text of the WorkdayLogoTitle. Not used if `brand` is provided.
11
11
  * @default ''
@@ -14,9 +14,18 @@ export declare type WorkdayLogoTitleProps = {
14
14
  /**
15
15
  * The variant of the WorkdayLogoTitle.
16
16
  */
17
- variant?: HeaderVariant;
17
+ variant?: DeprecatedHeaderVariant;
18
18
  };
19
- export declare class WorkdayLogoTitle extends React.Component<WorkdayLogoTitleProps> {
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;
20
29
  render(): JSX.Element;
21
30
  }
22
31
  //# sourceMappingURL=WorkdayLogoTitle.d.ts.map
@@ -1 +1 @@
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,EAAe,WAAW,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAKzE,oBAAY,qBAAqB,GAAG;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC;AA6CF,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC;IACnE,MAAM;CAsBd"}
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"}
@@ -35,7 +35,7 @@ var __rest = (this && this.__rest) || function (s, e) {
35
35
  };
36
36
  import * as React from 'react';
37
37
  import styled from '@emotion/styled';
38
- import { HeaderHeight, HeaderTheme, HeaderVariant } from '../shared/types';
38
+ import { DeprecatedHeaderHeight, DeprecatedHeaderTheme, DeprecatedHeaderVariant, } from '../shared/types';
39
39
  import { miniWdayLogoBlue, wdayLogoWhite, wdayLogoBlue } from '@workday/canvas-kit-react/common';
40
40
  import { colors, space } from '@workday/canvas-kit-react/tokens';
41
41
  import chroma from 'chroma-js';
@@ -49,7 +49,9 @@ var Lockup = styled('div')({
49
49
  }, function (_a) {
50
50
  var variant = _a.variant;
51
51
  return ({
52
- height: variant === HeaderVariant.Global ? HeaderHeight.Small : HeaderHeight.Large,
52
+ height: variant === DeprecatedHeaderVariant.Global
53
+ ? DeprecatedHeaderHeight.Small
54
+ : DeprecatedHeaderHeight.Large,
53
55
  });
54
56
  });
55
57
  var Title = styled('h3')({
@@ -64,8 +66,8 @@ var Title = styled('h3')({
64
66
  }, function (_a) {
65
67
  var themeColor = _a.themeColor;
66
68
  return ({
67
- color: themeColor === HeaderTheme.White ? colors.blueberry500 : colors.frenchVanilla100,
68
- borderLeft: "1px solid " + (themeColor === HeaderTheme.White
69
+ color: themeColor === DeprecatedHeaderTheme.White ? colors.blueberry500 : colors.frenchVanilla100,
70
+ borderLeft: "1px solid " + (themeColor === DeprecatedHeaderTheme.White
69
71
  ? colors.soap400
70
72
  : chroma(colors.soap400)
71
73
  .alpha(0.4)
@@ -76,24 +78,35 @@ var WorkdayLogo = styled('span')({
76
78
  paddingLeft: space.m,
77
79
  lineHeight: 0,
78
80
  });
79
- var WorkdayLogoTitle = /** @class */ (function (_super) {
80
- __extends(WorkdayLogoTitle, _super);
81
- function WorkdayLogoTitle() {
81
+ /**
82
+ * ### Deprecated Workday Logo Title
83
+ *
84
+ * As of Canvas Kit v6, this component is being soft-deprecated.
85
+ * It will be hard-deprecated (completely removed) in v7. Please see the
86
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
87
+ * for more information.
88
+ */
89
+ var DeprecatedWorkdayLogoTitle = /** @class */ (function (_super) {
90
+ __extends(DeprecatedWorkdayLogoTitle, _super);
91
+ function DeprecatedWorkdayLogoTitle() {
82
92
  return _super !== null && _super.apply(this, arguments) || this;
83
93
  }
84
- WorkdayLogoTitle.prototype.render = function () {
85
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? HeaderTheme.White : _b, _c = _a.title, title = _c === void 0 ? '' : _c, variant = _a.variant, elemProps = __rest(_a, ["themeColor", "title", "variant"]);
94
+ DeprecatedWorkdayLogoTitle.prototype.componentDidMount = function () {
95
+ 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 ");
96
+ };
97
+ DeprecatedWorkdayLogoTitle.prototype.render = function () {
98
+ var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? DeprecatedHeaderTheme.White : _b, _c = _a.title, title = _c === void 0 ? '' : _c, variant = _a.variant, elemProps = __rest(_a, ["themeColor", "title", "variant"]);
86
99
  return (React.createElement(LockupContainer, null,
87
100
  React.createElement(Lockup, __assign({}, this.props, elemProps),
88
101
  React.createElement(WorkdayLogo, __assign({}, this.props, { dangerouslySetInnerHTML: {
89
- __html: themeColor === HeaderTheme.White
90
- ? variant === HeaderVariant.Global
102
+ __html: themeColor === DeprecatedHeaderTheme.White
103
+ ? variant === DeprecatedHeaderVariant.Global
91
104
  ? miniWdayLogoBlue
92
105
  : wdayLogoBlue
93
106
  : wdayLogoWhite,
94
107
  } })),
95
108
  title && React.createElement(Title, __assign({}, this.props), title))));
96
109
  };
97
- return WorkdayLogoTitle;
110
+ return DeprecatedWorkdayLogoTitle;
98
111
  }(React.Component));
99
- export { WorkdayLogoTitle };
112
+ export { DeprecatedWorkdayLogoTitle };
@@ -1,4 +1,3 @@
1
- export { DubLogoTitle } from './DubLogoTitle';
2
- export { SearchBar, SearchBarProps } from './SearchBar';
3
- export { WorkdayLogoTitle } from './WorkdayLogoTitle';
1
+ export { DeprecatedDubLogoTitle } from './DubLogoTitle';
2
+ export { DeprecatedWorkdayLogoTitle } from './WorkdayLogoTitle';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../header/lib/parts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,aAAa,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC"}
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,3 +1,2 @@
1
- export { DubLogoTitle } from './DubLogoTitle';
2
- export { SearchBar } from './SearchBar';
3
- export { WorkdayLogoTitle } from './WorkdayLogoTitle';
1
+ export { DeprecatedDubLogoTitle } from './DubLogoTitle';
2
+ export { DeprecatedWorkdayLogoTitle } from './WorkdayLogoTitle';