@workday/canvas-kit-labs-react 5.3.0 → 5.3.4

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 (223) hide show
  1. package/common/lib/theming/index.ts +0 -1
  2. package/dist/commonjs/common/lib/theming/index.d.ts +0 -1
  3. package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
  4. package/dist/commonjs/common/lib/theming/index.js +0 -1
  5. package/dist/commonjs/header/index.d.ts +5 -5
  6. package/dist/commonjs/header/index.d.ts.map +1 -1
  7. package/dist/commonjs/header/index.js +2 -2
  8. package/dist/commonjs/header/lib/GlobalHeader.d.ts +2 -11
  9. package/dist/commonjs/header/lib/GlobalHeader.d.ts.map +1 -1
  10. package/dist/commonjs/header/lib/GlobalHeader.js +8 -19
  11. package/dist/commonjs/header/lib/Header.d.ts +8 -17
  12. package/dist/commonjs/header/lib/Header.d.ts.map +1 -1
  13. package/dist/commonjs/header/lib/Header.js +14 -27
  14. package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +4 -13
  15. package/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts.map +1 -1
  16. package/dist/commonjs/header/lib/parts/DubLogoTitle.js +11 -22
  17. package/dist/commonjs/{search-form/lib/SearchForm.d.ts → header/lib/parts/SearchBar.d.ts} +23 -22
  18. package/dist/commonjs/header/lib/parts/SearchBar.d.ts.map +1 -0
  19. package/dist/commonjs/{search-form/lib/SearchForm.js → header/lib/parts/SearchBar.js} +14 -13
  20. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
  21. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts.map +1 -1
  22. package/dist/commonjs/header/lib/parts/WorkdayLogoTitle.js +12 -25
  23. package/dist/commonjs/header/lib/parts/index.d.ts +3 -2
  24. package/dist/commonjs/header/lib/parts/index.d.ts.map +1 -1
  25. package/dist/commonjs/header/lib/parts/index.js +4 -2
  26. package/dist/commonjs/header/lib/shared/themes.d.ts +19 -28
  27. package/dist/commonjs/header/lib/shared/themes.d.ts.map +1 -1
  28. package/dist/commonjs/header/lib/shared/themes.js +36 -13
  29. package/dist/commonjs/header/lib/shared/types.d.ts +8 -3
  30. package/dist/commonjs/header/lib/shared/types.d.ts.map +1 -1
  31. package/dist/commonjs/header/lib/shared/types.js +23 -17
  32. package/dist/commonjs/index.d.ts +0 -2
  33. package/dist/commonjs/index.d.ts.map +1 -1
  34. package/dist/commonjs/index.js +0 -2
  35. package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +1 -1
  36. package/dist/commonjs/layout/lib/utils/getValidChildren.d.ts.map +1 -1
  37. package/dist/es6/common/lib/theming/index.d.ts +0 -1
  38. package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
  39. package/dist/es6/common/lib/theming/index.js +0 -1
  40. package/dist/es6/header/index.d.ts +5 -5
  41. package/dist/es6/header/index.d.ts.map +1 -1
  42. package/dist/es6/header/index.js +5 -5
  43. package/dist/es6/header/lib/GlobalHeader.d.ts +2 -11
  44. package/dist/es6/header/lib/GlobalHeader.d.ts.map +1 -1
  45. package/dist/es6/header/lib/GlobalHeader.js +11 -22
  46. package/dist/es6/header/lib/Header.d.ts +8 -17
  47. package/dist/es6/header/lib/Header.d.ts.map +1 -1
  48. package/dist/es6/header/lib/Header.js +17 -30
  49. package/dist/es6/header/lib/parts/DubLogoTitle.d.ts +4 -13
  50. package/dist/es6/header/lib/parts/DubLogoTitle.d.ts.map +1 -1
  51. package/dist/es6/header/lib/parts/DubLogoTitle.js +12 -23
  52. package/dist/es6/{search-form/lib/SearchForm.d.ts → header/lib/parts/SearchBar.d.ts} +23 -22
  53. package/dist/es6/header/lib/parts/SearchBar.d.ts.map +1 -0
  54. package/dist/es6/{search-form/lib/SearchForm.js → header/lib/parts/SearchBar.js} +12 -11
  55. package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
  56. package/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts.map +1 -1
  57. package/dist/es6/header/lib/parts/WorkdayLogoTitle.js +13 -26
  58. package/dist/es6/header/lib/parts/index.d.ts +3 -2
  59. package/dist/es6/header/lib/parts/index.d.ts.map +1 -1
  60. package/dist/es6/header/lib/parts/index.js +3 -2
  61. package/dist/es6/header/lib/shared/themes.d.ts +19 -28
  62. package/dist/es6/header/lib/shared/themes.d.ts.map +1 -1
  63. package/dist/es6/header/lib/shared/themes.js +37 -14
  64. package/dist/es6/header/lib/shared/types.d.ts +8 -3
  65. package/dist/es6/header/lib/shared/types.d.ts.map +1 -1
  66. package/dist/es6/header/lib/shared/types.js +23 -17
  67. package/dist/es6/index.d.ts +0 -2
  68. package/dist/es6/index.d.ts.map +1 -1
  69. package/dist/es6/index.js +0 -2
  70. package/dist/es6/layout/lib/utils/getValidChildren.d.ts +1 -1
  71. package/dist/es6/layout/lib/utils/getValidChildren.d.ts.map +1 -1
  72. package/header/README.md +181 -37
  73. package/header/index.ts +5 -5
  74. package/header/lib/GlobalHeader.tsx +9 -26
  75. package/header/lib/Header.tsx +26 -58
  76. package/header/lib/parts/DubLogoTitle.tsx +9 -26
  77. package/{search-form/lib/SearchForm.tsx → header/lib/parts/SearchBar.tsx} +31 -30
  78. package/header/lib/parts/WorkdayLogoTitle.tsx +11 -40
  79. package/header/lib/parts/index.ts +3 -2
  80. package/header/lib/shared/themes.tsx +56 -32
  81. package/header/lib/shared/types.tsx +9 -3
  82. package/index.ts +0 -2
  83. package/package.json +5 -7
  84. package/ts3.5/dist/commonjs/common/lib/theming/index.d.ts +0 -1
  85. package/ts3.5/dist/commonjs/header/index.d.ts +5 -5
  86. package/ts3.5/dist/commonjs/header/lib/GlobalHeader.d.ts +2 -11
  87. package/ts3.5/dist/commonjs/header/lib/Header.d.ts +8 -17
  88. package/ts3.5/dist/commonjs/header/lib/parts/DubLogoTitle.d.ts +4 -13
  89. package/ts3.5/dist/{es6/search-form/lib/SearchForm.d.ts → commonjs/header/lib/parts/SearchBar.d.ts} +23 -22
  90. package/ts3.5/dist/commonjs/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
  91. package/ts3.5/dist/commonjs/header/lib/parts/index.d.ts +3 -2
  92. package/ts3.5/dist/commonjs/header/lib/shared/themes.d.ts +19 -28
  93. package/ts3.5/dist/commonjs/header/lib/shared/types.d.ts +8 -3
  94. package/ts3.5/dist/commonjs/index.d.ts +0 -2
  95. package/ts3.5/dist/commonjs/layout/lib/utils/getValidChildren.d.ts +1 -1
  96. package/ts3.5/dist/es6/common/lib/theming/index.d.ts +0 -1
  97. package/ts3.5/dist/es6/header/index.d.ts +5 -5
  98. package/ts3.5/dist/es6/header/lib/GlobalHeader.d.ts +2 -11
  99. package/ts3.5/dist/es6/header/lib/Header.d.ts +8 -17
  100. package/ts3.5/dist/es6/header/lib/parts/DubLogoTitle.d.ts +4 -13
  101. package/ts3.5/dist/{commonjs/search-form/lib/SearchForm.d.ts → es6/header/lib/parts/SearchBar.d.ts} +23 -22
  102. package/ts3.5/dist/es6/header/lib/parts/WorkdayLogoTitle.d.ts +5 -14
  103. package/ts3.5/dist/es6/header/lib/parts/index.d.ts +3 -2
  104. package/ts3.5/dist/es6/header/lib/shared/themes.d.ts +19 -28
  105. package/ts3.5/dist/es6/header/lib/shared/types.d.ts +8 -3
  106. package/ts3.5/dist/es6/index.d.ts +0 -2
  107. package/ts3.5/dist/es6/layout/lib/utils/getValidChildren.d.ts +1 -1
  108. package/common/lib/theming/useThemedRing.ts +0 -84
  109. package/dist/commonjs/common/lib/theming/useThemedRing.d.ts +0 -11
  110. package/dist/commonjs/common/lib/theming/useThemedRing.d.ts.map +0 -1
  111. package/dist/commonjs/common/lib/theming/useThemedRing.js +0 -61
  112. package/dist/commonjs/search-form/index.d.ts +0 -3
  113. package/dist/commonjs/search-form/index.d.ts.map +0 -1
  114. package/dist/commonjs/search-form/index.js +0 -7
  115. package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +0 -1
  116. package/dist/commonjs/search-form/lib/themes.d.ts +0 -21
  117. package/dist/commonjs/search-form/lib/themes.d.ts.map +0 -1
  118. package/dist/commonjs/search-form/lib/themes.js +0 -41
  119. package/dist/commonjs/text-input/index.d.ts +0 -7
  120. package/dist/commonjs/text-input/index.d.ts.map +0 -1
  121. package/dist/commonjs/text-input/index.js +0 -11
  122. package/dist/commonjs/text-input/lib/TextInput.d.ts +0 -21
  123. package/dist/commonjs/text-input/lib/TextInput.d.ts.map +0 -1
  124. package/dist/commonjs/text-input/lib/TextInput.js +0 -36
  125. package/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
  126. package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +0 -1
  127. package/dist/commonjs/text-input/lib/TextInputField.js +0 -66
  128. package/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -13
  129. package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +0 -1
  130. package/dist/commonjs/text-input/lib/TextInputHint.js +0 -46
  131. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -17
  132. package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +0 -1
  133. package/dist/commonjs/text-input/lib/TextInputLabel.js +0 -54
  134. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -19
  135. package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +0 -1
  136. package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +0 -16
  137. package/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
  138. package/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts.map +0 -1
  139. package/dist/commonjs/text-input/lib/hooks/useTextInputHint.js +0 -12
  140. package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
  141. package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts.map +0 -1
  142. package/dist/commonjs/text-input/lib/hooks/useTextInputLabel.js +0 -12
  143. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
  144. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +0 -1
  145. package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +0 -23
  146. package/dist/es6/common/lib/theming/useThemedRing.d.ts +0 -11
  147. package/dist/es6/common/lib/theming/useThemedRing.d.ts.map +0 -1
  148. package/dist/es6/common/lib/theming/useThemedRing.js +0 -55
  149. package/dist/es6/search-form/index.d.ts +0 -3
  150. package/dist/es6/search-form/index.d.ts.map +0 -1
  151. package/dist/es6/search-form/index.js +0 -2
  152. package/dist/es6/search-form/lib/SearchForm.d.ts.map +0 -1
  153. package/dist/es6/search-form/lib/themes.d.ts +0 -21
  154. package/dist/es6/search-form/lib/themes.d.ts.map +0 -1
  155. package/dist/es6/search-form/lib/themes.js +0 -39
  156. package/dist/es6/text-input/index.d.ts +0 -7
  157. package/dist/es6/text-input/index.d.ts.map +0 -1
  158. package/dist/es6/text-input/index.js +0 -6
  159. package/dist/es6/text-input/lib/TextInput.d.ts +0 -21
  160. package/dist/es6/text-input/lib/TextInput.d.ts.map +0 -1
  161. package/dist/es6/text-input/lib/TextInput.js +0 -31
  162. package/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
  163. package/dist/es6/text-input/lib/TextInputField.d.ts.map +0 -1
  164. package/dist/es6/text-input/lib/TextInputField.js +0 -64
  165. package/dist/es6/text-input/lib/TextInputHint.d.ts +0 -13
  166. package/dist/es6/text-input/lib/TextInputHint.d.ts.map +0 -1
  167. package/dist/es6/text-input/lib/TextInputHint.js +0 -44
  168. package/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -17
  169. package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +0 -1
  170. package/dist/es6/text-input/lib/TextInputLabel.js +0 -52
  171. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -19
  172. package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +0 -1
  173. package/dist/es6/text-input/lib/hooks/useTextInputField.js +0 -14
  174. package/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
  175. package/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts.map +0 -1
  176. package/dist/es6/text-input/lib/hooks/useTextInputHint.js +0 -10
  177. package/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
  178. package/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts.map +0 -1
  179. package/dist/es6/text-input/lib/hooks/useTextInputLabel.js +0 -10
  180. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
  181. package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +0 -1
  182. package/dist/es6/text-input/lib/hooks/useTextInputModel.js +0 -21
  183. package/search-form/LICENSE +0 -52
  184. package/search-form/README.md +0 -6
  185. package/search-form/index.ts +0 -2
  186. package/search-form/lib/themes.ts +0 -54
  187. package/search-form/package.json +0 -5
  188. package/text-input/LICENSE +0 -52
  189. package/text-input/README.md +0 -11
  190. package/text-input/index.ts +0 -6
  191. package/text-input/lib/TextInput.tsx +0 -34
  192. package/text-input/lib/TextInputField.tsx +0 -75
  193. package/text-input/lib/TextInputHint.tsx +0 -52
  194. package/text-input/lib/TextInputLabel.tsx +0 -74
  195. package/text-input/lib/hooks/useTextInputField.tsx +0 -15
  196. package/text-input/lib/hooks/useTextInputHint.tsx +0 -11
  197. package/text-input/lib/hooks/useTextInputLabel.tsx +0 -11
  198. package/text-input/lib/hooks/useTextInputModel.tsx +0 -45
  199. package/text-input/package.json +0 -5
  200. package/ts3.5/dist/commonjs/common/lib/theming/useThemedRing.d.ts +0 -11
  201. package/ts3.5/dist/commonjs/search-form/index.d.ts +0 -3
  202. package/ts3.5/dist/commonjs/search-form/lib/themes.d.ts +0 -21
  203. package/ts3.5/dist/commonjs/text-input/index.d.ts +0 -7
  204. package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +0 -21
  205. package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
  206. package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -13
  207. package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -17
  208. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -19
  209. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
  210. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
  211. package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
  212. package/ts3.5/dist/es6/common/lib/theming/useThemedRing.d.ts +0 -11
  213. package/ts3.5/dist/es6/search-form/index.d.ts +0 -3
  214. package/ts3.5/dist/es6/search-form/lib/themes.d.ts +0 -21
  215. package/ts3.5/dist/es6/text-input/index.d.ts +0 -7
  216. package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +0 -21
  217. package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
  218. package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +0 -13
  219. package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -17
  220. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -19
  221. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputHint.d.ts +0 -15
  222. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputLabel.d.ts +0 -15
  223. package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../../header/lib/shared/themes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EACd,MAAM,kCAAkC,CAAC;AAI1C;;;;;;;GAOG;AACH,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,CAAC,GAAG,EAAE,MAAM,GAAG,+BAA+B,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBA4CpC,CAAC"}
1
+ {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../../header/lib/shared/themes.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,aAAa,EACd,MAAM,kCAAkC,CAAC;AAI1C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,MAAM;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;CAChC;AAED,eAAO,MAAM,MAAM,EAAE,MA4CpB,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAC;CACtC;AAED,eAAO,MAAM,YAAY,EAAE,YA6B1B,CAAC"}
@@ -1,17 +1,10 @@
1
- var _a;
1
+ var _a, _b;
2
+ import { focusRing } from '@workday/canvas-kit-react/common';
2
3
  import { colors, gradients, iconColors, depth, } from '@workday/canvas-kit-react/tokens';
3
4
  import chroma from 'chroma-js';
4
- import { DeprecatedHeaderTheme } from './types';
5
- /**
6
- * ### Deprecated Header Themes
7
- *
8
- * As of Canvas Kit v6, this theme object is being soft-deprecated along with the rest of the labs/header package.
9
- * It will be hard-deprecated (completely removed) in v7. Please see the
10
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
11
- * for more information.
12
- */
13
- export var deprecatedHeaderThemes = (_a = {},
14
- _a[DeprecatedHeaderTheme.White] = {
5
+ import { HeaderTheme, SearchTheme } from './types';
6
+ export var themes = (_a = {},
7
+ _a[HeaderTheme.White] = {
15
8
  color: colors.blackPepper400,
16
9
  background: colors.frenchVanilla100,
17
10
  depth: depth['1'],
@@ -24,7 +17,7 @@ export var deprecatedHeaderThemes = (_a = {},
24
17
  currentLinkColor: colors.blueberry500,
25
18
  chipColor: colors.blueberry400,
26
19
  },
27
- _a[DeprecatedHeaderTheme.Blue] = {
20
+ _a[HeaderTheme.Blue] = {
28
21
  color: colors.frenchVanilla100,
29
22
  background: gradients.blueberry,
30
23
  depth: depth['3'],
@@ -39,7 +32,7 @@ export var deprecatedHeaderThemes = (_a = {},
39
32
  currentLinkColor: colors.frenchVanilla100,
40
33
  chipColor: colors.frenchVanilla100,
41
34
  },
42
- _a[DeprecatedHeaderTheme.Transparent] = {
35
+ _a[HeaderTheme.Transparent] = {
43
36
  color: colors.frenchVanilla100,
44
37
  background: 'transparent',
45
38
  depth: { boxShadow: 'none' },
@@ -55,3 +48,33 @@ export var deprecatedHeaderThemes = (_a = {},
55
48
  chipColor: colors.frenchVanilla100,
56
49
  },
57
50
  _a);
51
+ export var searchThemes = (_b = {},
52
+ _b[SearchTheme.Transparent] = {
53
+ background: 'rgba(0, 0, 0, 0)',
54
+ backgroundFocus: 'rgba(0, 0, 0, 0)',
55
+ color: colors.blackPepper300,
56
+ colorFocus: colors.blackPepper300,
57
+ placeholderColor: colors.licorice300,
58
+ placeholderColorFocus: colors.licorice300,
59
+ boxShadow: 'none',
60
+ boxShadowFocus: 'none',
61
+ },
62
+ _b[SearchTheme.Light] = {
63
+ background: colors.soap200,
64
+ backgroundFocus: colors.soap200,
65
+ backgroundHover: colors.soap300,
66
+ color: colors.blackPepper300,
67
+ placeholderColor: colors.licorice300,
68
+ boxShadow: 'none',
69
+ boxShadowFocus: focusRing().boxShadow,
70
+ },
71
+ _b[SearchTheme.Dark] = {
72
+ background: 'rgba(0, 0, 0, 0.2)',
73
+ backgroundFocus: colors.frenchVanilla100,
74
+ color: colors.frenchVanilla100,
75
+ colorFocus: colors.blackPepper300,
76
+ placeholderColor: colors.frenchVanilla100,
77
+ placeholderColorFocus: colors.licorice300,
78
+ boxShadow: 'none',
79
+ },
80
+ _b);
@@ -1,15 +1,20 @@
1
- export declare enum DeprecatedHeaderTheme {
1
+ export declare enum HeaderTheme {
2
2
  White = 0,
3
3
  Blue = 1,
4
4
  Transparent = 2
5
5
  }
6
- export declare enum DeprecatedHeaderVariant {
6
+ export declare enum HeaderVariant {
7
7
  Dub = 0,
8
8
  Full = 1,
9
9
  Global = 2
10
10
  }
11
- export declare enum DeprecatedHeaderHeight {
11
+ export declare enum HeaderHeight {
12
12
  Small = "64px",
13
13
  Large = "80px"
14
14
  }
15
+ export declare enum SearchTheme {
16
+ Light = 0,
17
+ Dark = 1,
18
+ Transparent = 2
19
+ }
15
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../header/lib/shared/types.tsx"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,WAAW,IAAA;CACZ;AAED,oBAAY,uBAAuB;IACjC,GAAG,IAAA;IACH,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,oBAAY,sBAAsB;IAChC,KAAK,SAAS;IACd,KAAK,SAAS;CACf"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../header/lib/shared/types.tsx"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,WAAW,IAAA;CACZ;AAED,oBAAY,aAAa;IACvB,GAAG,IAAA;IACH,IAAI,IAAA;IACJ,MAAM,IAAA;CACP;AAED,oBAAY,YAAY;IACtB,KAAK,SAAS;IACd,KAAK,SAAS;CACf;AAED,oBAAY,WAAW;IACrB,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,WAAW,IAAA;CACZ"}
@@ -1,17 +1,23 @@
1
- export var DeprecatedHeaderTheme;
2
- (function (DeprecatedHeaderTheme) {
3
- DeprecatedHeaderTheme[DeprecatedHeaderTheme["White"] = 0] = "White";
4
- DeprecatedHeaderTheme[DeprecatedHeaderTheme["Blue"] = 1] = "Blue";
5
- DeprecatedHeaderTheme[DeprecatedHeaderTheme["Transparent"] = 2] = "Transparent";
6
- })(DeprecatedHeaderTheme || (DeprecatedHeaderTheme = {}));
7
- export var DeprecatedHeaderVariant;
8
- (function (DeprecatedHeaderVariant) {
9
- DeprecatedHeaderVariant[DeprecatedHeaderVariant["Dub"] = 0] = "Dub";
10
- DeprecatedHeaderVariant[DeprecatedHeaderVariant["Full"] = 1] = "Full";
11
- DeprecatedHeaderVariant[DeprecatedHeaderVariant["Global"] = 2] = "Global";
12
- })(DeprecatedHeaderVariant || (DeprecatedHeaderVariant = {}));
13
- export var DeprecatedHeaderHeight;
14
- (function (DeprecatedHeaderHeight) {
15
- DeprecatedHeaderHeight["Small"] = "64px";
16
- DeprecatedHeaderHeight["Large"] = "80px";
17
- })(DeprecatedHeaderHeight || (DeprecatedHeaderHeight = {}));
1
+ export var HeaderTheme;
2
+ (function (HeaderTheme) {
3
+ HeaderTheme[HeaderTheme["White"] = 0] = "White";
4
+ HeaderTheme[HeaderTheme["Blue"] = 1] = "Blue";
5
+ HeaderTheme[HeaderTheme["Transparent"] = 2] = "Transparent";
6
+ })(HeaderTheme || (HeaderTheme = {}));
7
+ export var HeaderVariant;
8
+ (function (HeaderVariant) {
9
+ HeaderVariant[HeaderVariant["Dub"] = 0] = "Dub";
10
+ HeaderVariant[HeaderVariant["Full"] = 1] = "Full";
11
+ HeaderVariant[HeaderVariant["Global"] = 2] = "Global";
12
+ })(HeaderVariant || (HeaderVariant = {}));
13
+ export var HeaderHeight;
14
+ (function (HeaderHeight) {
15
+ HeaderHeight["Small"] = "64px";
16
+ HeaderHeight["Large"] = "80px";
17
+ })(HeaderHeight || (HeaderHeight = {}));
18
+ export var SearchTheme;
19
+ (function (SearchTheme) {
20
+ SearchTheme[SearchTheme["Light"] = 0] = "Light";
21
+ SearchTheme[SearchTheme["Dark"] = 1] = "Dark";
22
+ SearchTheme[SearchTheme["Transparent"] = 2] = "Transparent";
23
+ })(SearchTheme || (SearchTheme = {}));
@@ -3,6 +3,4 @@ export * from './common';
3
3
  export * from './drawer';
4
4
  export * from './header';
5
5
  export * from './layout';
6
- export * from './text-input';
7
- export * from './search-form';
8
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
package/dist/es6/index.js CHANGED
@@ -3,5 +3,3 @@ export * from './common';
3
3
  export * from './drawer';
4
4
  export * from './header';
5
5
  export * from './layout';
6
- export * from './text-input';
7
- export * from './search-form';
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
- export declare function getValidChildren(children: React.ReactNode): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)>[];
2
+ export declare function getValidChildren(children: React.ReactNode): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[];
3
3
  //# sourceMappingURL=getValidChildren.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getValidChildren.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/getValidChildren.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,oJAIzD"}
1
+ {"version":3,"file":"getValidChildren.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/getValidChildren.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,oNAIzD"}
package/header/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Canvas Kit Labs React Header (Deprecated)
1
+ # Canvas Kit Labs React Header
2
2
 
3
3
  <a href="https://github.com/Workday/canvas-kit/tree/master/modules/labs-react/README.md">
4
4
  <img src="https://img.shields.io/badge/LABS-alpha-orange" alt="LABS: Alpha" />
@@ -8,6 +8,10 @@ A set of components to create headers for various Workday applications and sites
8
8
 
9
9
  For a full suite of examples, have a look at the [Header Stories](./stories.tsx).
10
10
 
11
+ ## Coming Soon
12
+
13
+ - Mobile Expanded Nav
14
+
11
15
  ## Installation
12
16
 
13
17
  ```sh
@@ -22,13 +26,13 @@ This component renders a responsive, Canvas-style header.
22
26
 
23
27
  ```tsx
24
28
  import * as React from 'react';
25
- import {DeprecatedHeader} from '@workday/canvas-kit-labs-react/header';
29
+ import {Header} from '@workday/canvas-kit-labs-react/header';
26
30
  import {IconButton} from '@workday/canvas-kit-react/button';
27
31
  import {Avatar} from '@workday/canvas-kit-react/avatar';
28
32
  import {notificationsIcon} from '@workday/canvas-system-icons-web';
29
33
  import {PrimaryButton} from '@workday/canvas-kit-react/button';
30
34
 
31
- <DeprecatedHeader title="Header" brandUrl="#">
35
+ <Header title="Header" brandUrl="#">
32
36
  <nav>
33
37
  <ul>
34
38
  <li className="current">
@@ -58,7 +62,7 @@ import {PrimaryButton} from '@workday/canvas-kit-react/button';
58
62
  altText="Profile"
59
63
  />
60
64
  <PrimaryButton>Sign Up</PrimaryButton>
61
- </DeprecatedHeader>;
65
+ </Header>;
62
66
  ```
63
67
 
64
68
  ## Special Children
@@ -84,18 +88,18 @@ _Deprecated (but supported) - please use `IconButton` instead._
84
88
 
85
89
  ## Static Properties
86
90
 
87
- #### `Theme: DeprecatedHeaderTheme`
91
+ #### `Theme: HeaderTheme`
88
92
 
89
93
  ```tsx
90
- <DeprecatedHeader title="Blue Header" themeColor={DeprecatedHeader.Theme.Blue} />
94
+ <Header title="Blue Header" themeColor={Header.Theme.Blue} />
91
95
  ```
92
96
 
93
97
  ---
94
98
 
95
- #### `Variant: DeprecatedHeaderVariant`
99
+ #### `Variant: HeaderVariant`
96
100
 
97
101
  ```tsx
98
- <DeprecatedHeader title="Marketing Header" variant={DeprecatedHeader.Variant.Full} />
102
+ <Header title="Marketing Header" variant={Header.Variant.Full} />
99
103
  ```
100
104
 
101
105
  ## Component Props
@@ -114,7 +118,7 @@ Default: `''`
114
118
 
115
119
  ---
116
120
 
117
- #### `themeColor: DeprecatedHeaderTheme`
121
+ #### `themeColor: HeaderTheme`
118
122
 
119
123
  > The theme of the header (White, Blue, or Transparent).
120
124
 
@@ -124,11 +128,11 @@ Default: `''`
124
128
  | Blue | Dark blue gradient background with white text, white system icons. |
125
129
  | Transparent | Transparent background (intended for dark-colored overlays) with white text, white system icons. |
126
130
 
127
- Default: `DeprecatedHeaderTheme.White`
131
+ Default: `HeaderTheme.White`
128
132
 
129
133
  ---
130
134
 
131
- #### `variant: DeprecatedHeaderVariant`
135
+ #### `variant: HeaderVariant`
132
136
 
133
137
  > Specifies the variation of the header.
134
138
 
@@ -137,7 +141,7 @@ Default: `DeprecatedHeaderTheme.White`
137
141
  | Dub | "Dub" headers have a singular "Dub" logo and a title, separated by a equivalent-height divider. It is shorter in height (64px) than the "Full" variant. |
138
142
  | Full | "Full" headers have the full Workday logo and an optional title at minimum, separated by an equivalent-height divider (when a title is defined). It is taller in height (80px) than the "Dub" variant. |
139
143
 
140
- Default: `DeprecatedHeaderVariant.Dub`
144
+ Default: `HeaderVariant.Dub`
141
145
 
142
146
  ---
143
147
 
@@ -152,7 +156,7 @@ Default: `DeprecatedHeaderVariant.Dub`
152
156
  > If specified, this replaces the contents of the Dub logo and title. Used for replacing Dub + title
153
157
  > with a `contained lockup` and/or for adding custon design elements next to the Dub + title lockup.
154
158
 
155
- Default: `DeprecatedDubLogoTitle` (for "Dub" variants) or `DeprecatedWorkdayLogoTitle` (for "Full" variants)
159
+ Default: `DubLogoTitle` (for "Dub" variants) or `WorkdayLogoTitle` (for "Full" variants)
156
160
 
157
161
  ---
158
162
 
@@ -179,7 +183,7 @@ Default: `DeprecatedDubLogoTitle` (for "Dub" variants) or `DeprecatedWorkdayLogo
179
183
 
180
184
  > A React element for the left of the header, this is typically a search bar component
181
185
 
182
- # Global Header (Deprecated)
186
+ # Global Header
183
187
 
184
188
  The Global Header (or App Header) is used for Workday applications.
185
189
 
@@ -187,13 +191,12 @@ The Global Header (or App Header) is used for Workday applications.
187
191
 
188
192
  ```tsx
189
193
  import {Avatar} from '@workday/canvas-kit-react/avatar';
190
- import {DeprecatedGlobalHeader, DeprecatedDubLogoTitle} from '@workday/canvas-kit-labs-react/header';
191
- import {SearchForm} from '@workday/canvas-kit-labs-react/search-form';
194
+ import {GlobalHeader, DubLogoTitle} from '@workday/canvas-kit-labs-react/header';
192
195
  import {Avatar} from '@workday/canvas-kit-react/avatar';
193
196
  import {IconButton} from '@workday/canvas-kit-react/button';
194
197
  import {notificationsIcon, inboxIcon} from '@workday/canvas-system-icons-web';
195
198
 
196
- const HeaderBrand = () => <DeprecatedDubLogoTitle themeColor={Header.Theme.White} />
199
+ const HeaderBrand = () => <DubLogoTitle themeColor={Header.Theme.White} />
197
200
  const HeaderAvatar = () => <Avatar onClick={handleMenuClick} url="https://my.cdn.amazonaws.com/assets/avatar_pic.png" />
198
201
  const handleSearchSubmit = event => {
199
202
  const query = (event.target as HTMLFormElement).getElementsByTagName('input')[0].value;
@@ -202,15 +205,15 @@ const handleSearchSubmit = event => {
202
205
  const openMenu = e => console.log("Menu opened")
203
206
 
204
207
  /**
205
- * In this instance, the right-most child will be an Avatar component, when the DeprecatedGlobalHeader
208
+ * In this instance, the right-most child will be an Avatar component, when the GlobalHeader
206
209
  * shrinks below the specified breakpoint (720 in this case), the children get replaced by a menuToggle.
207
- * For most DeprecatedGlobalHeader implementations, the menuToggle is also the Avatar component.
210
+ * For most GlobalHeader implementations, the menuToggle is also the Avatar component.
208
211
  */
209
- <DeprecatedGlobalHeader
212
+ <GlobalHeader
210
213
  brand={<HeaderBrand />}
211
214
  menuToggle={<HeaderAvatar />}
212
215
  onMenuClick={openMenu}
213
- leftSlot={<SearchForm
216
+ leftSlot={<SearchBar
214
217
  isCollapsed={false}
215
218
  grow={true}
216
219
  onSubmit={handleSearchSubmit}
@@ -220,7 +223,7 @@ const openMenu = e => console.log("Menu opened")
220
223
  <IconButton icon={notificationsIcon} variant={IconButton.Variant.Circle} />
221
224
  <IconButton icon={inboxIcon} variant={IconButton.Variant.Circle} />
222
225
  <HeaderAvatar />
223
- </DeprecatedGlobalHeader>
226
+ </GlobalHeader>
224
227
  ```
225
228
 
226
229
  ## Static Properties
@@ -240,13 +243,13 @@ const openMenu = e => console.log("Menu opened")
240
243
  > If specified, this replaces the contents of the Dub logo and title. Used for replacing Dub + title
241
244
  > with a branded element and/or for adding custon design elements next to the Dub + title lockup.
242
245
 
243
- Default: `<DeprecatedDubLogoTitle />`
246
+ Default: `<DubLogoTitle />`
244
247
 
245
248
  #### `menuToggle: React.ReactNode`
246
249
 
247
250
  > _Note: This `menuToggle` slot only appears when the screen size shrinks below the `breakpoint`._
248
251
  >
249
- > For most `DeprecatedGlobalHeader` implementations, this is generally the same as the users' `Avatar`. If not
252
+ > For most `GlobalHeader` implementations, this is generally the same as the users' `Avatar`. If not
250
253
  > specified, `menuToggle` defaults to a "hamburger" menu icon or "justify" icon.
251
254
 
252
255
  Default: `justifyIcon` from `@workday/canvas-system-icons-web`
@@ -255,7 +258,7 @@ Default: `justifyIcon` from `@workday/canvas-system-icons-web`
255
258
 
256
259
  > A click handler for when the user clicks the `menuToggle` element.
257
260
 
258
- Default: `<DeprecatedDubLogoTitle />`
261
+ Default: `<DubLogoTitle />`
259
262
 
260
263
  #### `leftSlot: React.ReactElement`
261
264
 
@@ -267,7 +270,7 @@ Default: `<DeprecatedDubLogoTitle />`
267
270
 
268
271
  # "Dub" Logo and Title
269
272
 
270
- _Intended to be used in conjunction with the `DeprecatedHeader` component_
273
+ _Intended to be used in conjunction with the `Header` component_
271
274
 
272
275
  A component that encapsulates the 'Dub' logo and a title (we call this the contained lockup). This
273
276
  is used whenever you want to override the contained lockup that comes default with a header, or if
@@ -277,11 +280,11 @@ background color of the contained lockup
277
280
  ## Usage
278
281
 
279
282
  ```tsx
280
- import {DeprecatedHeader, DeprecatedDubLogoTitle} from '@workday/canvas-kit-labs-react/header';
283
+ import {Header, DubLogoTitle} from '@workday/canvas-kit-labs-react/header';
281
284
  import {colors} from '@workday/canvas-kit-react/tokens';
282
285
 
283
- <DeprecatedHeader
284
- brand={<DeprecatedDubLogoTitle title="This title will show up instead" bgColor={colors.blueberry600} />}
286
+ <Header
287
+ brand={<DubLogoTitle title="This title will show up instead" bgColor={colors.blueberry600} />}
285
288
  />;
286
289
  ```
287
290
 
@@ -301,11 +304,11 @@ Default: `''`
301
304
 
302
305
  ### Optional
303
306
 
304
- #### `themeColor: DeprecatedHeaderTheme`
307
+ #### `themeColor: HeaderTheme`
305
308
 
306
309
  > The theme of the header (White, Blue, or Transparent).
307
310
 
308
- Default: `DeprecatedHeaderTheme.White`
311
+ Default: `HeaderTheme.White`
309
312
 
310
313
  ---
311
314
 
@@ -317,7 +320,7 @@ Default: `'none'`
317
320
 
318
321
  # Workday Logo and Title
319
322
 
320
- _Intended to be used in conjunction with the `DeprecatedHeader` component_
323
+ _Intended to be used in conjunction with the `Header` component_
321
324
 
322
325
  A component that contains the full Workday logo and a title. This is used whenever you want to
323
326
  override the contained lockup that comes default with a header, or if you want to add more elements
@@ -326,9 +329,9 @@ next to the title with custom components or markup.
326
329
  ## Usage
327
330
 
328
331
  ```tsx
329
- import {DeprecatedHeader, DeprecatedWorkdayLogoTitle} from '@workday/canvas-kit-labs-react/header';
332
+ import {Header, WorkdayLogoTitle} from '@workday/canvas-kit-labs-react/header';
330
333
 
331
- <DeprecatedHeader brand={<DeprecatedWorkdayLogoTitle title="Display Title" />} />;
334
+ <Header brand={<WorkdayLogoTitle title="Display Title" />} />;
332
335
  ```
333
336
 
334
337
  ## Static Properties
@@ -343,12 +346,12 @@ import {DeprecatedHeader, DeprecatedWorkdayLogoTitle} from '@workday/canvas-kit-
343
346
 
344
347
  ### Optional
345
348
 
346
- #### `themeColor: DeprecatedHeaderTheme`
349
+ #### `themeColor: HeaderTheme`
347
350
 
348
351
  > The theme of the header (White, Blue, or Transparent). See the
349
- > [`themeColor`](#themecolor-headertheme) prop on the `DeprecatedHeader` component.
352
+ > [`themeColor`](#themecolor-headertheme) prop on the `Header` component.
350
353
 
351
- Default: `DeprecatedHeaderTheme.White`
354
+ Default: `HeaderTheme.White`
352
355
 
353
356
  ---
354
357
 
@@ -357,3 +360,144 @@ Default: `DeprecatedHeaderTheme.White`
357
360
  > The title displayed on the header next to the logo.
358
361
 
359
362
  Default `''`
363
+
364
+ # Search Bar
365
+
366
+ _Intended to be used in conjunction with the `Header` component_
367
+
368
+ A component that contains a search bar with autocomplete functionality.
369
+
370
+ ## Usage
371
+
372
+ ```tsx
373
+ import {SearchBar} from '@workday/canvas-kit-labs-react/header';
374
+ import {MenuItem} from '@workday/canvas-kit-labs-react/menu';
375
+
376
+ const handleInputChange = event => console.log('Adjust menu items here');
377
+ const handleSearchSubmit = event => {
378
+ const query = (event.target as HTMLFormElement).getElementsByTagName('input')[0].value;
379
+ console.log('Submitted query: ', query);
380
+ };
381
+
382
+ <SearchBar
383
+ autocompleteItems={[<MenuItem>Item 1</MenuItem>]}
384
+ isCollapsed={false}
385
+ onInputChange={this.autocompleteCallback}
386
+ placeholder={`Search with Autocomplete`}
387
+ grow={true}
388
+ searchTheme={SearchBar.Theme.Dark}
389
+ onSubmit={handleSearchSubmit}
390
+ />;
391
+ ```
392
+
393
+ ## Static Properties
394
+
395
+ > None
396
+
397
+ ## Component Props
398
+
399
+ ### Required
400
+
401
+ #### `onSubmit: React.FormEventHandler<HTMLFormElement>`
402
+
403
+ > An function that gets called and passed the current input value when the search form is submitted.
404
+
405
+ ### Optional
406
+
407
+ #### `isCollapsed: boolean`
408
+
409
+ > True if the search input should be collapsed into a toggle icon (for responsive).
410
+
411
+ ---
412
+
413
+ #### `onInputChange: React.ChangeEventHandler<HTMLInputElement>`
414
+
415
+ > Callback to listen when the TextInput changes. This is usually used to update the autocomplete
416
+ > items.
417
+
418
+ ---
419
+
420
+ #### `autocompleteItems: React.ReactElement<MenuItemProps>[]`
421
+
422
+ > An array of MenuItems to show under the search bar.
423
+
424
+ ---
425
+
426
+ #### `searchTheme?: SearchTheme | SearchThemeAttributes`
427
+
428
+ > The theme of the header the search input is being rendered in. There are 3 build in themes, but
429
+ > the styles are customizable via SearchThemeAttributes.
430
+
431
+ | Theme | Description |
432
+ | ----------- | -------------------------------------------------------------------------------------------------------- |
433
+ | Light | White background with dark-colored text, blue focus ring. |
434
+ | Dark | Dark semi transparent background with white text. Inverts on focus. |
435
+ | Transparent | Transparent background (intended for light-colored header) with dark text. Also used in collapsed state. |
436
+
437
+ Default: `SearchTheme.Light`
438
+
439
+ ---
440
+
441
+ #### `placeholder: string`
442
+
443
+ > Placeholder for search input.
444
+
445
+ Default: `'Search'`
446
+
447
+ ---
448
+
449
+ #### `initialValue: string;`
450
+
451
+ > Initial value to set the input to.
452
+
453
+ ---
454
+
455
+ #### `rightAlign: boolean;`
456
+
457
+ > False if the search input should grow to left align it. True if it should right align.
458
+
459
+ ---
460
+
461
+ #### `inputLabel: string`
462
+
463
+ > Screenreader label for text input.
464
+
465
+ Default: `'Search'`
466
+
467
+ ---
468
+
469
+ #### `submitLabel: string`
470
+
471
+ > Screenreader label for submit button
472
+
473
+ Default: `'Search'`
474
+
475
+ ---
476
+
477
+ #### `clearButtonAriaLabel: string`
478
+
479
+ > Screenreader Label for clear button
480
+
481
+ ---
482
+
483
+ #### `openButtonLabel: string`
484
+
485
+ > Screenreader Label to open collapsed search bar
486
+
487
+ Default: `'Open Search'`
488
+
489
+ ---
490
+
491
+ #### `closeButtonLabel: string`
492
+
493
+ > Screenreader Label to close collapsed search bar
494
+
495
+ Default: `'Cancel'`
496
+
497
+ ---
498
+
499
+ #### `showClearButton: string`
500
+
501
+ > Show button to clear input field
502
+
503
+ Default: `true`
package/header/index.ts CHANGED
@@ -1,9 +1,9 @@
1
- import DeprecatedHeader from './lib/Header';
2
- import DeprecatedGlobalHeader from './lib/GlobalHeader';
1
+ import Header from './lib/Header';
2
+ import GlobalHeader from './lib/GlobalHeader';
3
3
 
4
- export default DeprecatedHeader;
5
- export {DeprecatedHeader};
6
- export {DeprecatedGlobalHeader};
4
+ export default Header;
5
+ export {Header};
6
+ export {GlobalHeader};
7
7
  export * from './lib/parts';
8
8
  export * from './lib/shared/themes';
9
9
  export * from './lib/shared/types';
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import DeprecatedHeader from './Header';
3
- import {DeprecatedHeaderVariant} from './shared/types';
4
- import {DeprecatedDubLogoTitle} from './parts';
2
+ import Header from './Header';
3
+ import {HeaderVariant} from './shared/types';
4
+ import {DubLogoTitle} from './parts';
5
5
 
6
6
  export interface GlobalHeaderProps {
7
7
  /**
@@ -23,32 +23,15 @@ export interface GlobalHeaderProps {
23
23
  */
24
24
  isCollapsed?: boolean;
25
25
  /**
26
- * The React element to render in the left slot of the GlobalHeader. This is typically a SearchForm component.
26
+ * The React element to render in the left slot of the GlobalHeader. This is typically a SearchBar component.
27
27
  */
28
28
  leftSlot?: React.ReactElement;
29
29
  }
30
30
 
31
- /**
32
- * ### Deprecated Global Header
33
- *
34
- * As of Canvas Kit v6, this component is being soft-deprecated.
35
- * It will be hard-deprecated (completely removed) in v7. Please see the
36
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
37
- * for more information.
38
- */
39
- export default class DeprecatedGlobalHeader extends React.Component<GlobalHeaderProps> {
40
- componentDidMount() {
41
- console.warn(
42
- `GlobalHeader is being deprecated and will be removed in Canvas Kit V7.\n
43
- For more information, please see the V6 migration guide:\n
44
- https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page
45
- `
46
- );
47
- }
48
-
31
+ export default class GlobalHeader extends React.Component<GlobalHeaderProps> {
49
32
  public render() {
50
33
  const {
51
- brand = <DeprecatedDubLogoTitle />,
34
+ brand = <DubLogoTitle />,
52
35
  menuToggle,
53
36
  onMenuClick,
54
37
  isCollapsed,
@@ -57,17 +40,17 @@ export default class DeprecatedGlobalHeader extends React.Component<GlobalHeader
57
40
  ...elemProps
58
41
  } = this.props;
59
42
  return (
60
- <DeprecatedHeader
43
+ <Header
61
44
  brand={brand}
62
45
  menuToggle={menuToggle}
63
46
  leftSlot={leftSlot}
64
47
  onMenuClick={onMenuClick}
65
- variant={DeprecatedHeaderVariant.Global}
48
+ variant={HeaderVariant.Global}
66
49
  isCollapsed={isCollapsed}
67
50
  {...elemProps}
68
51
  >
69
52
  {children}
70
- </DeprecatedHeader>
53
+ </Header>
71
54
  );
72
55
  }
73
56
  }