@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,3 +1,4 @@
1
+ import {focusRing} from '@workday/canvas-kit-react/common';
1
2
  import {
2
3
  colors,
3
4
  gradients,
@@ -6,17 +7,9 @@ import {
6
7
  CSSProperties,
7
8
  } from '@workday/canvas-kit-react/tokens';
8
9
  import chroma from 'chroma-js';
9
- import {DeprecatedHeaderTheme} from './types';
10
+ import {HeaderTheme, SearchTheme} from './types';
10
11
 
11
- /**
12
- * ### Deprecated Header Theme Attributes Interface
13
- *
14
- * As of Canvas Kit v6, this type interface is being soft-deprecated along with the rest of the labs/header package.
15
- * It will be hard-deprecated (completely removed) in v7. Please see the
16
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
17
- * for more information.
18
- */
19
- export interface DeprecatedHeaderThemeAttributes {
12
+ export interface ThemeAttributes {
20
13
  color: string;
21
14
  background: string;
22
15
  depth: CSSProperties;
@@ -30,28 +23,12 @@ export interface DeprecatedHeaderThemeAttributes {
30
23
  chipColor: string;
31
24
  }
32
25
 
33
- /**
34
- * ### Deprecated Header Themes Interface
35
- *
36
- * As of Canvas Kit v6, this type interface is being soft-deprecated along with the rest of the labs/header package.
37
- * It will be hard-deprecated (completely removed) in v7. Please see the
38
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
39
- * for more information.
40
- */
41
- export interface DeprecatedHeaderThemes {
42
- [key: string]: DeprecatedHeaderThemeAttributes;
26
+ export interface Themes {
27
+ [key: string]: ThemeAttributes;
43
28
  }
44
29
 
45
- /**
46
- * ### Deprecated Header Themes
47
- *
48
- * As of Canvas Kit v6, this theme object is being soft-deprecated along with the rest of the labs/header package.
49
- * It will be hard-deprecated (completely removed) in v7. Please see the
50
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
51
- * for more information.
52
- */
53
- export const deprecatedHeaderThemes: DeprecatedHeaderThemes = {
54
- [DeprecatedHeaderTheme.White]: {
30
+ export const themes: Themes = {
31
+ [HeaderTheme.White]: {
55
32
  color: colors.blackPepper400,
56
33
  background: colors.frenchVanilla100,
57
34
  depth: depth['1'],
@@ -64,7 +41,7 @@ export const deprecatedHeaderThemes: DeprecatedHeaderThemes = {
64
41
  currentLinkColor: colors.blueberry500,
65
42
  chipColor: colors.blueberry400,
66
43
  },
67
- [DeprecatedHeaderTheme.Blue]: {
44
+ [HeaderTheme.Blue]: {
68
45
  color: colors.frenchVanilla100,
69
46
  background: gradients.blueberry,
70
47
  depth: depth['3'],
@@ -79,7 +56,7 @@ export const deprecatedHeaderThemes: DeprecatedHeaderThemes = {
79
56
  currentLinkColor: colors.frenchVanilla100,
80
57
  chipColor: colors.frenchVanilla100,
81
58
  },
82
- [DeprecatedHeaderTheme.Transparent]: {
59
+ [HeaderTheme.Transparent]: {
83
60
  color: colors.frenchVanilla100,
84
61
  background: 'transparent',
85
62
  depth: {boxShadow: 'none'},
@@ -95,3 +72,50 @@ export const deprecatedHeaderThemes: DeprecatedHeaderThemes = {
95
72
  chipColor: colors.frenchVanilla100,
96
73
  },
97
74
  };
75
+
76
+ export interface SearchThemeAttributes {
77
+ background?: string;
78
+ backgroundFocus?: string;
79
+ backgroundHover?: string;
80
+ color?: string;
81
+ colorFocus?: string;
82
+ placeholderColor?: string;
83
+ placeholderColorFocus?: string;
84
+ boxShadow?: string | string[];
85
+ boxShadowFocus?: string | string[];
86
+ }
87
+
88
+ export interface SearchThemes {
89
+ [key: string]: SearchThemeAttributes;
90
+ }
91
+
92
+ export const searchThemes: SearchThemes = {
93
+ [SearchTheme.Transparent]: {
94
+ background: 'rgba(0, 0, 0, 0)',
95
+ backgroundFocus: 'rgba(0, 0, 0, 0)',
96
+ color: colors.blackPepper300,
97
+ colorFocus: colors.blackPepper300,
98
+ placeholderColor: colors.licorice300,
99
+ placeholderColorFocus: colors.licorice300,
100
+ boxShadow: 'none',
101
+ boxShadowFocus: 'none',
102
+ },
103
+ [SearchTheme.Light]: {
104
+ background: colors.soap200,
105
+ backgroundFocus: colors.soap200,
106
+ backgroundHover: colors.soap300,
107
+ color: colors.blackPepper300,
108
+ placeholderColor: colors.licorice300,
109
+ boxShadow: 'none',
110
+ boxShadowFocus: focusRing().boxShadow,
111
+ },
112
+ [SearchTheme.Dark]: {
113
+ background: 'rgba(0, 0, 0, 0.2)',
114
+ backgroundFocus: colors.frenchVanilla100,
115
+ color: colors.frenchVanilla100,
116
+ colorFocus: colors.blackPepper300,
117
+ placeholderColor: colors.frenchVanilla100,
118
+ placeholderColorFocus: colors.licorice300,
119
+ boxShadow: 'none',
120
+ },
121
+ };
@@ -1,16 +1,22 @@
1
- export enum DeprecatedHeaderTheme {
1
+ export enum HeaderTheme {
2
2
  White,
3
3
  Blue,
4
4
  Transparent,
5
5
  }
6
6
 
7
- export enum DeprecatedHeaderVariant {
7
+ export enum HeaderVariant {
8
8
  Dub,
9
9
  Full,
10
10
  Global,
11
11
  }
12
12
 
13
- export enum DeprecatedHeaderHeight {
13
+ export enum HeaderHeight {
14
14
  Small = '64px',
15
15
  Large = '80px',
16
16
  }
17
+
18
+ export enum SearchTheme {
19
+ Light,
20
+ Dark,
21
+ Transparent,
22
+ }
package/index.ts 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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-labs-react",
3
- "version": "5.3.0",
3
+ "version": "5.3.4",
4
4
  "description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -55,8 +55,8 @@
55
55
  "@emotion/is-prop-valid": "^0.8.2",
56
56
  "@emotion/styled": "^10.0.27",
57
57
  "@types/uuid": "^3.4.4",
58
- "@workday/canvas-kit-preview-react": "^5.3.0",
59
- "@workday/canvas-kit-react": "^5.3.0",
58
+ "@workday/canvas-kit-preview-react": "^5.3.4",
59
+ "@workday/canvas-kit-react": "^5.3.4",
60
60
  "@workday/canvas-system-icons-web": "1.0.41",
61
61
  "chroma-js": "^2.1.0",
62
62
  "csstype": "^2.6.17",
@@ -65,9 +65,7 @@
65
65
  "uuid": "^3.3.3"
66
66
  },
67
67
  "devDependencies": {
68
- "@types/lodash.flatten": "^4.4.6",
69
- "formik": "^2.2.9",
70
- "yup": "^0.31.1"
68
+ "@types/lodash.flatten": "^4.4.6"
71
69
  },
72
- "gitHead": "0cf3030eb73935b5679f8c9bb79fb6178a721a4a"
70
+ "gitHead": "4816e7af5053c69d3dc6f302d0205b4259ffe943"
73
71
  }
@@ -1,3 +1,2 @@
1
1
  export * from './useThemeRTL';
2
- export * from './useThemedRing';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
- import DeprecatedHeader from './lib/Header';
2
- import DeprecatedGlobalHeader from './lib/GlobalHeader';
3
- export default DeprecatedHeader;
4
- export { DeprecatedHeader };
5
- export { DeprecatedGlobalHeader };
1
+ import Header from './lib/Header';
2
+ import GlobalHeader from './lib/GlobalHeader';
3
+ export default Header;
4
+ export { Header };
5
+ export { GlobalHeader };
6
6
  export * from './lib/parts';
7
7
  export * from './lib/shared/themes';
8
8
  export * from './lib/shared/types';
@@ -19,20 +19,11 @@ 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 SearchForm component.
22
+ * The React element to render in the left slot of the GlobalHeader. This is typically a SearchBar component.
23
23
  */
24
24
  leftSlot?: React.ReactElement;
25
25
  }
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;
26
+ export default class GlobalHeader extends React.Component<GlobalHeaderProps> {
36
27
  render(): JSX.Element;
37
28
  }
38
29
  //# sourceMappingURL=GlobalHeader.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { DeprecatedHeaderTheme, DeprecatedHeaderVariant } from './shared/types';
2
+ import { HeaderTheme, HeaderVariant } 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 DeprecatedHeaderTheme.White
10
+ * @default HeaderTheme.White
11
11
  */
12
- themeColor?: DeprecatedHeaderTheme;
12
+ themeColor?: HeaderTheme;
13
13
  /**
14
14
  * The variant of the Header. Accepts `Dub` (small) or `Full` (large).
15
- * @default DeprecatedHeaderVariant.Dub
15
+ * @default HeaderVariant.Dub
16
16
  */
17
- variant?: DeprecatedHeaderVariant;
17
+ variant?: HeaderVariant;
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 SearchForm component.
40
+ * The React element to render in the left slot of the Header. This is typically a SearchBar component.
41
41
  */
42
42
  leftSlot?: React.ReactElement;
43
43
  /**
@@ -46,18 +46,9 @@ 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
- */
57
49
  export default class Header extends React.Component<HeaderProps, {}> {
58
- static Theme: typeof DeprecatedHeaderTheme;
59
- static Variant: typeof DeprecatedHeaderVariant;
60
- componentDidMount(): void;
50
+ static Theme: typeof HeaderTheme;
51
+ static Variant: typeof HeaderVariant;
61
52
  /**
62
53
  * Helper that recursively maps ReactNodes to their theme-based equivalent.
63
54
  * Any children that are included in a Header may need to undergo transformation
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
- import { DeprecatedHeaderTheme } from '../shared/types';
2
+ import { HeaderTheme } 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 DeprecatedHeaderTheme.White
6
+ * @default HeaderTheme.White
7
7
  */
8
- themeColor?: DeprecatedHeaderTheme;
8
+ themeColor?: HeaderTheme;
9
9
  /**
10
10
  * The text of the DubLogoTitle. Not used if `brand` is provided.
11
11
  */
@@ -15,16 +15,7 @@ export declare type DubTitleProps = {
15
15
  */
16
16
  bgColor?: string;
17
17
  };
18
- /**
19
- * ### Deprecated Dub Logo Title
20
- *
21
- * As of Canvas Kit v6, this component is being soft-deprecated.
22
- * It will be hard-deprecated (completely removed) in v7. Please see the
23
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
24
- * for more information.
25
- */
26
- export declare class DeprecatedDubLogoTitle extends React.Component<DubTitleProps> {
27
- componentDidMount(): void;
18
+ export declare class DubLogoTitle extends React.Component<DubTitleProps> {
28
19
  render(): JSX.Element;
29
20
  }
30
21
  //# sourceMappingURL=DubLogoTitle.d.ts.map
@@ -1,23 +1,24 @@
1
1
  import * as React from 'react';
2
2
  import { GrowthBehavior } from '@workday/canvas-kit-react/common';
3
3
  import { MenuItemProps } from '@workday/canvas-kit-preview-react/menu';
4
- import { SearchThemeAttributes, SearchTheme } from './themes';
5
- export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttributes<HTMLFormElement> {
4
+ import { SearchThemeAttributes } from '../shared/themes';
5
+ import { SearchTheme } from '../shared/types';
6
+ export interface SearchBarProps extends GrowthBehavior, React.FormHTMLAttributes<HTMLFormElement> {
6
7
  /**
7
- * The function called when the SearchForm form is submitted. The current input value is passed to the callback function.
8
+ * The function called when the SearchBar form is submitted. The current input value is passed to the callback function.
8
9
  */
9
10
  onSubmit: React.FormEventHandler<HTMLFormElement>;
10
11
  /**
11
- * If true, collapse the SearchForm text input into a toggle icon. Useful for responsive layouts.
12
+ * If true, collapse the SearchBar text input into a toggle icon. Useful for responsive layouts.
12
13
  * @default false
13
14
  */
14
15
  isCollapsed?: boolean;
15
16
  /**
16
- * The function called when the SearchForm text input changes.
17
+ * The function called when the SearchBar text input changes.
17
18
  */
18
19
  onInputChange?: React.ChangeEventHandler<HTMLInputElement>;
19
20
  /**
20
- * The autocomplete items of the SearchForm. This array of menu items is shown under the search bar.
21
+ * The autocomplete items of the SearchBar. This array of menu items is shown under the search bar.
21
22
  */
22
23
  autocompleteItems?: React.ReactElement<MenuItemProps>[];
23
24
  /**
@@ -25,73 +26,73 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
25
26
  */
26
27
  searchTheme?: SearchTheme | SearchThemeAttributes;
27
28
  /**
28
- * The placeholder text of the SearchForm text input.
29
+ * The placeholder text of the SearchBar text input.
29
30
  * @default Search
30
31
  */
31
32
  placeholder?: string;
32
33
  /**
33
- * The initial value of the SearchForm text input.
34
+ * The initial value of the SearchBar text input.
34
35
  */
35
36
  initialValue?: string;
36
37
  /**
37
- * If true, right-align the SearchForm. If false, the text input should grow to left-align the SearchForm.
38
+ * If true, right-align the SearchBar. If false, the text input should grow to left-align the SearchBar.
38
39
  * @default false
39
40
  */
40
41
  rightAlign?: boolean;
41
42
  /**
42
- * The screenreader label text for the SearchForm text input.
43
+ * The screenreader label text for the SearchBar text input.
43
44
  * @default Search
44
45
  */
45
46
  inputLabel?: string;
46
47
  /**
47
- * The screenreader label text for the SearchForm submit button.
48
+ * The screenreader label text for the SearchBar submit button.
48
49
  * @default Search
49
50
  */
50
51
  submitAriaLabel?: string;
51
52
  /**
52
- * The screenreader label text for the SearchForm clear button.
53
+ * The screenreader label text for the SearchBar clear button.
53
54
  * @default Reset Search Form
54
55
  */
55
56
  clearButtonAriaLabel?: string;
56
57
  /**
57
- * The screenreader label text for the button to open the collapsed SearchForm.
58
+ * The screenreader label text for the button to open the collapsed SearchBar.
58
59
  * @default Open Search
59
60
  */
60
61
  openButtonAriaLabel?: string;
61
62
  /**
62
- * The screenreader label text for the button to close the open SearchForm.
63
+ * The screenreader label text for the button to close the open SearchBar.
63
64
  * @default Cancel
64
65
  */
65
66
  closeButtonAriaLabel?: string;
66
67
  /**
67
- * If true, render the SearchForm with a button to clear the text input.
68
+ * If true, render the SearchBar with a button to clear the text input.
68
69
  * @default true
69
70
  */
70
71
  showClearButton?: boolean;
71
72
  /**
72
- * Height of the Search Form in pixels
73
- * @default 40
73
+ * Height of the Search Bar in pixels
74
+ * @default: 40
74
75
  */
75
76
  height?: number;
76
77
  }
77
- export interface SearchFormState {
78
+ export interface SearchBarState {
78
79
  showForm: boolean;
79
80
  searchQuery: string;
80
81
  isFocused: boolean;
81
82
  }
82
- export declare class SearchForm extends React.Component<SearchFormProps, SearchFormState> {
83
+ export declare class SearchBar extends React.Component<SearchBarProps, SearchBarState> {
83
84
  static Theme: typeof SearchTheme;
84
85
  private inputRef;
85
86
  private openRef;
86
87
  private labelId;
87
- state: Readonly<SearchFormState>;
88
+ state: Readonly<SearchBarState>;
88
89
  private getTheme;
89
90
  private getThemeColors;
90
91
  getIconButtonType: () => "circle" | "square" | "inverse" | "squareFilled" | "plain" | "circleFilled" | "inverseFilled" | undefined;
91
92
  handleSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
92
93
  openCollapsedSearch: () => void;
93
94
  closeCollapsedSearch: () => void;
94
- componentDidUpdate(prevProps: SearchFormProps, prevState: SearchFormState): void;
95
+ componentDidUpdate(prevProps: SearchBarProps, prevState: SearchBarState): void;
95
96
  focusInput: () => void;
96
97
  focusOpen: () => void;
97
98
  handleFocus: () => void;
@@ -99,4 +100,4 @@ export declare class SearchForm extends React.Component<SearchFormProps, SearchF
99
100
  handleSearchInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
100
101
  render(): JSX.Element;
101
102
  }
102
- //# sourceMappingURL=SearchForm.d.ts.map
103
+ //# sourceMappingURL=SearchBar.d.ts.map
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
- import { DeprecatedHeaderTheme, DeprecatedHeaderVariant } from '../shared/types';
2
+ import { HeaderTheme, HeaderVariant } 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 DeprecatedHeaderTheme.White
6
+ * @default HeaderTheme.White
7
7
  */
8
- themeColor?: DeprecatedHeaderTheme;
8
+ themeColor?: HeaderTheme;
9
9
  /**
10
10
  * The text of the WorkdayLogoTitle. Not used if `brand` is provided.
11
11
  * @default ''
@@ -14,18 +14,9 @@ export declare type WorkdayLogoTitleProps = {
14
14
  /**
15
15
  * The variant of the WorkdayLogoTitle.
16
16
  */
17
- variant?: DeprecatedHeaderVariant;
17
+ variant?: HeaderVariant;
18
18
  };
19
- /**
20
- * ### Deprecated Workday Logo Title
21
- *
22
- * As of Canvas Kit v6, this component is being soft-deprecated.
23
- * It will be hard-deprecated (completely removed) in v7. Please see the
24
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
25
- * for more information.
26
- */
27
- export declare class DeprecatedWorkdayLogoTitle extends React.Component<WorkdayLogoTitleProps> {
28
- componentDidMount(): void;
19
+ export declare class WorkdayLogoTitle extends React.Component<WorkdayLogoTitleProps> {
29
20
  render(): JSX.Element;
30
21
  }
31
22
  //# sourceMappingURL=WorkdayLogoTitle.d.ts.map
@@ -1,3 +1,4 @@
1
- export { DeprecatedDubLogoTitle } from './DubLogoTitle';
2
- export { DeprecatedWorkdayLogoTitle } from './WorkdayLogoTitle';
1
+ export { DubLogoTitle } from './DubLogoTitle';
2
+ export { SearchBar, SearchBarProps } from './SearchBar';
3
+ export { WorkdayLogoTitle } from './WorkdayLogoTitle';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,13 +1,5 @@
1
1
  import { CSSProperties } from '@workday/canvas-kit-react/tokens';
2
- /**
3
- * ### Deprecated Header Theme Attributes Interface
4
- *
5
- * As of Canvas Kit v6, this type interface is being soft-deprecated along with the rest of the labs/header package.
6
- * It will be hard-deprecated (completely removed) in v7. Please see the
7
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
8
- * for more information.
9
- */
10
- export interface DeprecatedHeaderThemeAttributes {
2
+ export interface ThemeAttributes {
11
3
  color: string;
12
4
  background: string;
13
5
  depth: CSSProperties;
@@ -20,24 +12,23 @@ export interface DeprecatedHeaderThemeAttributes {
20
12
  currentLinkColor: string;
21
13
  chipColor: string;
22
14
  }
23
- /**
24
- * ### Deprecated Header Themes Interface
25
- *
26
- * As of Canvas Kit v6, this type interface is being soft-deprecated along with the rest of the labs/header package.
27
- * It will be hard-deprecated (completely removed) in v7. Please see the
28
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
29
- * for more information.
30
- */
31
- export interface DeprecatedHeaderThemes {
32
- [key: string]: DeprecatedHeaderThemeAttributes;
15
+ export interface Themes {
16
+ [key: string]: ThemeAttributes;
33
17
  }
34
- /**
35
- * ### Deprecated Header Themes
36
- *
37
- * As of Canvas Kit v6, this theme object is being soft-deprecated along with the rest of the labs/header package.
38
- * It will be hard-deprecated (completely removed) in v7. Please see the
39
- * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
40
- * for more information.
41
- */
42
- export declare const deprecatedHeaderThemes: DeprecatedHeaderThemes;
18
+ export declare const themes: Themes;
19
+ export interface SearchThemeAttributes {
20
+ background?: string;
21
+ backgroundFocus?: string;
22
+ backgroundHover?: string;
23
+ color?: string;
24
+ colorFocus?: string;
25
+ placeholderColor?: string;
26
+ placeholderColorFocus?: string;
27
+ boxShadow?: string | string[];
28
+ boxShadowFocus?: string | string[];
29
+ }
30
+ export interface SearchThemes {
31
+ [key: string]: SearchThemeAttributes;
32
+ }
33
+ export declare const searchThemes: SearchThemes;
43
34
  //# sourceMappingURL=themes.d.ts.map
@@ -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
@@ -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,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,3 +1,2 @@
1
1
  export * from './useThemeRTL';
2
- export * from './useThemedRing';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,8 @@
1
- import DeprecatedHeader from './lib/Header';
2
- import DeprecatedGlobalHeader from './lib/GlobalHeader';
3
- export default DeprecatedHeader;
4
- export { DeprecatedHeader };
5
- export { DeprecatedGlobalHeader };
1
+ import Header from './lib/Header';
2
+ import GlobalHeader from './lib/GlobalHeader';
3
+ export default Header;
4
+ export { Header };
5
+ export { GlobalHeader };
6
6
  export * from './lib/parts';
7
7
  export * from './lib/shared/themes';
8
8
  export * from './lib/shared/types';
@@ -19,20 +19,11 @@ 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 SearchForm component.
22
+ * The React element to render in the left slot of the GlobalHeader. This is typically a SearchBar component.
23
23
  */
24
24
  leftSlot?: React.ReactElement;
25
25
  }
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;
26
+ export default class GlobalHeader extends React.Component<GlobalHeaderProps> {
36
27
  render(): JSX.Element;
37
28
  }
38
29
  //# sourceMappingURL=GlobalHeader.d.ts.map