@workday/canvas-kit-labs-react 6.0.0-beta.0-next.16 → 6.0.3

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
@@ -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"}
@@ -61,7 +61,9 @@ var Lockup = styled_1.default('div')({
61
61
  }, function (_a) {
62
62
  var variant = _a.variant;
63
63
  return ({
64
- height: variant === types_1.HeaderVariant.Global ? types_1.HeaderHeight.Small : types_1.HeaderHeight.Large,
64
+ height: variant === types_1.DeprecatedHeaderVariant.Global
65
+ ? types_1.DeprecatedHeaderHeight.Small
66
+ : types_1.DeprecatedHeaderHeight.Large,
65
67
  });
66
68
  });
67
69
  var Title = styled_1.default('h3')({
@@ -76,8 +78,8 @@ var Title = styled_1.default('h3')({
76
78
  }, function (_a) {
77
79
  var themeColor = _a.themeColor;
78
80
  return ({
79
- color: themeColor === types_1.HeaderTheme.White ? tokens_1.colors.blueberry500 : tokens_1.colors.frenchVanilla100,
80
- borderLeft: "1px solid " + (themeColor === types_1.HeaderTheme.White
81
+ color: themeColor === types_1.DeprecatedHeaderTheme.White ? tokens_1.colors.blueberry500 : tokens_1.colors.frenchVanilla100,
82
+ borderLeft: "1px solid " + (themeColor === types_1.DeprecatedHeaderTheme.White
81
83
  ? tokens_1.colors.soap400
82
84
  : chroma_js_1.default(tokens_1.colors.soap400)
83
85
  .alpha(0.4)
@@ -88,24 +90,35 @@ var WorkdayLogo = styled_1.default('span')({
88
90
  paddingLeft: tokens_1.space.m,
89
91
  lineHeight: 0,
90
92
  });
91
- var WorkdayLogoTitle = /** @class */ (function (_super) {
92
- __extends(WorkdayLogoTitle, _super);
93
- function WorkdayLogoTitle() {
93
+ /**
94
+ * ### Deprecated Workday Logo Title
95
+ *
96
+ * As of Canvas Kit v6, this component is being soft-deprecated.
97
+ * It will be hard-deprecated (completely removed) in v7. Please see the
98
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
99
+ * for more information.
100
+ */
101
+ var DeprecatedWorkdayLogoTitle = /** @class */ (function (_super) {
102
+ __extends(DeprecatedWorkdayLogoTitle, _super);
103
+ function DeprecatedWorkdayLogoTitle() {
94
104
  return _super !== null && _super.apply(this, arguments) || this;
95
105
  }
96
- WorkdayLogoTitle.prototype.render = function () {
97
- var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? types_1.HeaderTheme.White : _b, _c = _a.title, title = _c === void 0 ? '' : _c, variant = _a.variant, elemProps = __rest(_a, ["themeColor", "title", "variant"]);
106
+ DeprecatedWorkdayLogoTitle.prototype.componentDidMount = function () {
107
+ console.warn("WorkdayLogoTitle is being deprecated and will be removed in Canvas Kit V7.\n\n For more information, please see the V6 migration guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page\n ");
108
+ };
109
+ DeprecatedWorkdayLogoTitle.prototype.render = function () {
110
+ var _a = this.props, _b = _a.themeColor, themeColor = _b === void 0 ? types_1.DeprecatedHeaderTheme.White : _b, _c = _a.title, title = _c === void 0 ? '' : _c, variant = _a.variant, elemProps = __rest(_a, ["themeColor", "title", "variant"]);
98
111
  return (React.createElement(LockupContainer, null,
99
112
  React.createElement(Lockup, __assign({}, this.props, elemProps),
100
113
  React.createElement(WorkdayLogo, __assign({}, this.props, { dangerouslySetInnerHTML: {
101
- __html: themeColor === types_1.HeaderTheme.White
102
- ? variant === types_1.HeaderVariant.Global
114
+ __html: themeColor === types_1.DeprecatedHeaderTheme.White
115
+ ? variant === types_1.DeprecatedHeaderVariant.Global
103
116
  ? common_1.miniWdayLogoBlue
104
117
  : common_1.wdayLogoBlue
105
118
  : common_1.wdayLogoWhite,
106
119
  } })),
107
120
  title && React.createElement(Title, __assign({}, this.props), title))));
108
121
  };
109
- return WorkdayLogoTitle;
122
+ return DeprecatedWorkdayLogoTitle;
110
123
  }(React.Component));
111
- exports.WorkdayLogoTitle = WorkdayLogoTitle;
124
+ exports.DeprecatedWorkdayLogoTitle = 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,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var DubLogoTitle_1 = require("./DubLogoTitle");
4
- exports.DubLogoTitle = DubLogoTitle_1.DubLogoTitle;
5
- var SearchBar_1 = require("./SearchBar");
6
- exports.SearchBar = SearchBar_1.SearchBar;
4
+ exports.DeprecatedDubLogoTitle = DubLogoTitle_1.DeprecatedDubLogoTitle;
7
5
  var WorkdayLogoTitle_1 = require("./WorkdayLogoTitle");
8
- exports.WorkdayLogoTitle = WorkdayLogoTitle_1.WorkdayLogoTitle;
6
+ exports.DeprecatedWorkdayLogoTitle = WorkdayLogoTitle_1.DeprecatedWorkdayLogoTitle;
@@ -1,5 +1,13 @@
1
1
  import { CSSProperties } from '@workday/canvas-kit-react/tokens';
2
- export interface ThemeAttributes {
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 {
3
11
  color: string;
4
12
  background: string;
5
13
  depth: CSSProperties;
@@ -12,23 +20,24 @@ export interface ThemeAttributes {
12
20
  currentLinkColor: string;
13
21
  chipColor: string;
14
22
  }
15
- export interface Themes {
16
- [key: string]: ThemeAttributes;
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;
17
33
  }
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;
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;
34
43
  //# sourceMappingURL=themes.d.ts.map
@@ -1 +1 @@
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
+ {"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"}
@@ -2,14 +2,21 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- var _a, _b;
5
+ var _a;
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- var common_1 = require("@workday/canvas-kit-react/common");
8
7
  var tokens_1 = require("@workday/canvas-kit-react/tokens");
9
8
  var chroma_js_1 = __importDefault(require("chroma-js"));
10
9
  var types_1 = require("./types");
11
- exports.themes = (_a = {},
12
- _a[types_1.HeaderTheme.White] = {
10
+ /**
11
+ * ### Deprecated Header Themes
12
+ *
13
+ * As of Canvas Kit v6, this theme object is being soft-deprecated along with the rest of the labs/header package.
14
+ * It will be hard-deprecated (completely removed) in v7. Please see the
15
+ * [migration guide](https://workday.github.io/canvas-kit/?path=/story/welcome-migration-guides-v6-0--page)
16
+ * for more information.
17
+ */
18
+ exports.deprecatedHeaderThemes = (_a = {},
19
+ _a[types_1.DeprecatedHeaderTheme.White] = {
13
20
  color: tokens_1.colors.blackPepper400,
14
21
  background: tokens_1.colors.frenchVanilla100,
15
22
  depth: tokens_1.depth['1'],
@@ -22,7 +29,7 @@ exports.themes = (_a = {},
22
29
  currentLinkColor: tokens_1.colors.blueberry500,
23
30
  chipColor: tokens_1.colors.blueberry400,
24
31
  },
25
- _a[types_1.HeaderTheme.Blue] = {
32
+ _a[types_1.DeprecatedHeaderTheme.Blue] = {
26
33
  color: tokens_1.colors.frenchVanilla100,
27
34
  background: tokens_1.gradients.blueberry,
28
35
  depth: tokens_1.depth['3'],
@@ -37,7 +44,7 @@ exports.themes = (_a = {},
37
44
  currentLinkColor: tokens_1.colors.frenchVanilla100,
38
45
  chipColor: tokens_1.colors.frenchVanilla100,
39
46
  },
40
- _a[types_1.HeaderTheme.Transparent] = {
47
+ _a[types_1.DeprecatedHeaderTheme.Transparent] = {
41
48
  color: tokens_1.colors.frenchVanilla100,
42
49
  background: 'transparent',
43
50
  depth: { boxShadow: 'none' },
@@ -53,33 +60,3 @@ exports.themes = (_a = {},
53
60
  chipColor: tokens_1.colors.frenchVanilla100,
54
61
  },
55
62
  _a);
56
- exports.searchThemes = (_b = {},
57
- _b[types_1.SearchTheme.Transparent] = {
58
- background: 'rgba(0, 0, 0, 0)',
59
- backgroundFocus: 'rgba(0, 0, 0, 0)',
60
- color: tokens_1.colors.blackPepper300,
61
- colorFocus: tokens_1.colors.blackPepper300,
62
- placeholderColor: tokens_1.colors.licorice300,
63
- placeholderColorFocus: tokens_1.colors.licorice300,
64
- boxShadow: 'none',
65
- boxShadowFocus: 'none',
66
- },
67
- _b[types_1.SearchTheme.Light] = {
68
- background: tokens_1.colors.soap200,
69
- backgroundFocus: tokens_1.colors.soap200,
70
- backgroundHover: tokens_1.colors.soap300,
71
- color: tokens_1.colors.blackPepper300,
72
- placeholderColor: tokens_1.colors.licorice300,
73
- boxShadow: 'none',
74
- boxShadowFocus: common_1.focusRing().boxShadow,
75
- },
76
- _b[types_1.SearchTheme.Dark] = {
77
- background: 'rgba(0, 0, 0, 0.2)',
78
- backgroundFocus: tokens_1.colors.frenchVanilla100,
79
- color: tokens_1.colors.frenchVanilla100,
80
- colorFocus: tokens_1.colors.blackPepper300,
81
- placeholderColor: tokens_1.colors.frenchVanilla100,
82
- placeholderColorFocus: tokens_1.colors.licorice300,
83
- boxShadow: 'none',
84
- },
85
- _b);
@@ -1,20 +1,15 @@
1
- export declare enum HeaderTheme {
1
+ export declare enum DeprecatedHeaderTheme {
2
2
  White = 0,
3
3
  Blue = 1,
4
4
  Transparent = 2
5
5
  }
6
- export declare enum HeaderVariant {
6
+ export declare enum DeprecatedHeaderVariant {
7
7
  Dub = 0,
8
8
  Full = 1,
9
9
  Global = 2
10
10
  }
11
- export declare enum HeaderHeight {
11
+ export declare enum DeprecatedHeaderHeight {
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
- }
20
15
  //# 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,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
+ {"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,25 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var HeaderTheme;
4
- (function (HeaderTheme) {
5
- HeaderTheme[HeaderTheme["White"] = 0] = "White";
6
- HeaderTheme[HeaderTheme["Blue"] = 1] = "Blue";
7
- HeaderTheme[HeaderTheme["Transparent"] = 2] = "Transparent";
8
- })(HeaderTheme = exports.HeaderTheme || (exports.HeaderTheme = {}));
9
- var HeaderVariant;
10
- (function (HeaderVariant) {
11
- HeaderVariant[HeaderVariant["Dub"] = 0] = "Dub";
12
- HeaderVariant[HeaderVariant["Full"] = 1] = "Full";
13
- HeaderVariant[HeaderVariant["Global"] = 2] = "Global";
14
- })(HeaderVariant = exports.HeaderVariant || (exports.HeaderVariant = {}));
15
- var HeaderHeight;
16
- (function (HeaderHeight) {
17
- HeaderHeight["Small"] = "64px";
18
- HeaderHeight["Large"] = "80px";
19
- })(HeaderHeight = exports.HeaderHeight || (exports.HeaderHeight = {}));
20
- var SearchTheme;
21
- (function (SearchTheme) {
22
- SearchTheme[SearchTheme["Light"] = 0] = "Light";
23
- SearchTheme[SearchTheme["Dark"] = 1] = "Dark";
24
- SearchTheme[SearchTheme["Transparent"] = 2] = "Transparent";
25
- })(SearchTheme = exports.SearchTheme || (exports.SearchTheme = {}));
3
+ var DeprecatedHeaderTheme;
4
+ (function (DeprecatedHeaderTheme) {
5
+ DeprecatedHeaderTheme[DeprecatedHeaderTheme["White"] = 0] = "White";
6
+ DeprecatedHeaderTheme[DeprecatedHeaderTheme["Blue"] = 1] = "Blue";
7
+ DeprecatedHeaderTheme[DeprecatedHeaderTheme["Transparent"] = 2] = "Transparent";
8
+ })(DeprecatedHeaderTheme = exports.DeprecatedHeaderTheme || (exports.DeprecatedHeaderTheme = {}));
9
+ var DeprecatedHeaderVariant;
10
+ (function (DeprecatedHeaderVariant) {
11
+ DeprecatedHeaderVariant[DeprecatedHeaderVariant["Dub"] = 0] = "Dub";
12
+ DeprecatedHeaderVariant[DeprecatedHeaderVariant["Full"] = 1] = "Full";
13
+ DeprecatedHeaderVariant[DeprecatedHeaderVariant["Global"] = 2] = "Global";
14
+ })(DeprecatedHeaderVariant = exports.DeprecatedHeaderVariant || (exports.DeprecatedHeaderVariant = {}));
15
+ var DeprecatedHeaderHeight;
16
+ (function (DeprecatedHeaderHeight) {
17
+ DeprecatedHeaderHeight["Small"] = "64px";
18
+ DeprecatedHeaderHeight["Large"] = "80px";
19
+ })(DeprecatedHeaderHeight = exports.DeprecatedHeaderHeight || (exports.DeprecatedHeaderHeight = {}));
@@ -3,4 +3,6 @@ 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';
6
8
  //# 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"}
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"}
@@ -8,3 +8,5 @@ __export(require("./common"));
8
8
  __export(require("./drawer"));
9
9
  __export(require("./header"));
10
10
  __export(require("./layout"));
11
+ __export(require("./text-input"));
12
+ __export(require("./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, string | any | (new (props: any) => React.Component<any, 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, 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,oNAIzD"}
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"}
@@ -0,0 +1,3 @@
1
+ export * from './lib/SearchForm';
2
+ export * from './lib/themes';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../search-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ __export(require("./lib/SearchForm"));
7
+ __export(require("./lib/themes"));
@@ -1,24 +1,23 @@
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 } from '../shared/themes';
5
- import { SearchTheme } from '../shared/types';
6
- export interface SearchBarProps extends GrowthBehavior, React.FormHTMLAttributes<HTMLFormElement> {
4
+ import { SearchThemeAttributes, SearchTheme } from './themes';
5
+ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttributes<HTMLFormElement> {
7
6
  /**
8
- * The function called when the SearchBar form is submitted. The current input value is passed to the callback function.
7
+ * The function called when the SearchForm form is submitted. The current input value is passed to the callback function.
9
8
  */
10
9
  onSubmit: React.FormEventHandler<HTMLFormElement>;
11
10
  /**
12
- * If true, collapse the SearchBar text input into a toggle icon. Useful for responsive layouts.
11
+ * If true, collapse the SearchForm text input into a toggle icon. Useful for responsive layouts.
13
12
  * @default false
14
13
  */
15
14
  isCollapsed?: boolean;
16
15
  /**
17
- * The function called when the SearchBar text input changes.
16
+ * The function called when the SearchForm text input changes.
18
17
  */
19
18
  onInputChange?: React.ChangeEventHandler<HTMLInputElement>;
20
19
  /**
21
- * The autocomplete items of the SearchBar. This array of menu items is shown under the search bar.
20
+ * The autocomplete items of the SearchForm. This array of menu items is shown under the search bar.
22
21
  */
23
22
  autocompleteItems?: React.ReactElement<MenuItemProps>[];
24
23
  /**
@@ -26,73 +25,73 @@ export interface SearchBarProps extends GrowthBehavior, React.FormHTMLAttributes
26
25
  */
27
26
  searchTheme?: SearchTheme | SearchThemeAttributes;
28
27
  /**
29
- * The placeholder text of the SearchBar text input.
28
+ * The placeholder text of the SearchForm text input.
30
29
  * @default Search
31
30
  */
32
31
  placeholder?: string;
33
32
  /**
34
- * The initial value of the SearchBar text input.
33
+ * The initial value of the SearchForm text input.
35
34
  */
36
35
  initialValue?: string;
37
36
  /**
38
- * If true, right-align the SearchBar. If false, the text input should grow to left-align the SearchBar.
37
+ * If true, right-align the SearchForm. If false, the text input should grow to left-align the SearchForm.
39
38
  * @default false
40
39
  */
41
40
  rightAlign?: boolean;
42
41
  /**
43
- * The screenreader label text for the SearchBar text input.
42
+ * The screenreader label text for the SearchForm text input.
44
43
  * @default Search
45
44
  */
46
45
  inputLabel?: string;
47
46
  /**
48
- * The screenreader label text for the SearchBar submit button.
47
+ * The screenreader label text for the SearchForm submit button.
49
48
  * @default Search
50
49
  */
51
50
  submitAriaLabel?: string;
52
51
  /**
53
- * The screenreader label text for the SearchBar clear button.
52
+ * The screenreader label text for the SearchForm clear button.
54
53
  * @default Reset Search Form
55
54
  */
56
55
  clearButtonAriaLabel?: string;
57
56
  /**
58
- * The screenreader label text for the button to open the collapsed SearchBar.
57
+ * The screenreader label text for the button to open the collapsed SearchForm.
59
58
  * @default Open Search
60
59
  */
61
60
  openButtonAriaLabel?: string;
62
61
  /**
63
- * The screenreader label text for the button to close the open SearchBar.
62
+ * The screenreader label text for the button to close the open SearchForm.
64
63
  * @default Cancel
65
64
  */
66
65
  closeButtonAriaLabel?: string;
67
66
  /**
68
- * If true, render the SearchBar with a button to clear the text input.
67
+ * If true, render the SearchForm with a button to clear the text input.
69
68
  * @default true
70
69
  */
71
70
  showClearButton?: boolean;
72
71
  /**
73
- * Height of the Search Bar in pixels
74
- * @default: 40
72
+ * Height of the Search Form in pixels
73
+ * @default 40
75
74
  */
76
75
  height?: number;
77
76
  }
78
- export interface SearchBarState {
77
+ export interface SearchFormState {
79
78
  showForm: boolean;
80
79
  searchQuery: string;
81
80
  isFocused: boolean;
82
81
  }
83
- export declare class SearchBar extends React.Component<SearchBarProps, SearchBarState> {
82
+ export declare class SearchForm extends React.Component<SearchFormProps, SearchFormState> {
84
83
  static Theme: typeof SearchTheme;
85
84
  private inputRef;
86
85
  private openRef;
87
86
  private labelId;
88
- state: Readonly<SearchBarState>;
87
+ state: Readonly<SearchFormState>;
89
88
  private getTheme;
90
89
  private getThemeColors;
91
90
  getIconButtonType: () => "circle" | "square" | "inverse" | "squareFilled" | "plain" | "circleFilled" | "inverseFilled" | undefined;
92
91
  handleSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
93
92
  openCollapsedSearch: () => void;
94
93
  closeCollapsedSearch: () => void;
95
- componentDidUpdate(prevProps: SearchBarProps, prevState: SearchBarState): void;
94
+ componentDidUpdate(prevProps: SearchFormProps, prevState: SearchFormState): void;
96
95
  focusInput: () => void;
97
96
  focusOpen: () => void;
98
97
  handleFocus: () => void;
@@ -100,4 +99,4 @@ export declare class SearchBar extends React.Component<SearchBarProps, SearchBar
100
99
  handleSearchInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
101
100
  render(): JSX.Element;
102
101
  }
103
- //# sourceMappingURL=SearchBar.d.ts.map
102
+ //# sourceMappingURL=SearchForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../../search-form/lib/SearchForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,cAAc,EAAS,MAAM,kCAAkC,CAAC;AAMxE,OAAO,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAC,qBAAqB,EAAgB,WAAW,EAAC,MAAM,UAAU,CAAC;AAI1E,MAAM,WAAW,eAAgB,SAAQ,cAAc,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC;IAChG;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAC3D;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,qBAAqB,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAuMD,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAC/E,MAAM,CAAC,KAAK,qBAAe;IAE3B,OAAO,CAAC,QAAQ,CAAuC;IACvD,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAU;IAEzB,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAI9B;IAEF,OAAO,CAAC,QAAQ,CAUd;IAEF,OAAO,CAAC,cAAc,CAMpB;IAEF,iBAAiB,kHAOf;IAEF,YAAY,oDAOV;IAEF,mBAAmB,aAIjB;IAEF,oBAAoB,aAIlB;IAEF,kBAAkB,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe;IAWzE,UAAU,aAIR;IAEF,SAAS,aAIP;IAEF,WAAW,aAET;IAEF,UAAU,aAER;IAEF,uBAAuB,uDAMrB;IAEF,MAAM;CAkGP"}
@@ -53,8 +53,7 @@ var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
53
53
  var form_field_1 = require("@workday/canvas-kit-react/form-field");
54
54
  var combobox_1 = require("@workday/canvas-kit-labs-react/combobox");
55
55
  var text_input_1 = require("@workday/canvas-kit-react/text-input");
56
- var themes_1 = require("../shared/themes");
57
- var types_1 = require("../shared/types");
56
+ var themes_1 = require("./themes");
58
57
  var chroma_js_1 = __importDefault(require("chroma-js"));
59
58
  var v4_1 = __importDefault(require("uuid/v4"));
60
59
  function getInputColors(theme, isFocused) {
@@ -71,7 +70,7 @@ function getInputColors(theme, isFocused) {
71
70
  var formCollapsedBackground = tokens_1.colors.frenchVanilla100;
72
71
  var maxWidth = 480;
73
72
  var minWidth = 120;
74
- var SearchForm = common_1.styled('form')({
73
+ var StyledSearchForm = common_1.styled('form')({
75
74
  position: 'relative',
76
75
  flex: "1 1 auto",
77
76
  display: 'flex',
@@ -198,9 +197,9 @@ var SearchInput = common_1.styled(text_input_1.TextInput)(function (_a) {
198
197
  },
199
198
  } }, collapseStyles);
200
199
  });
201
- var SearchBar = /** @class */ (function (_super) {
202
- __extends(SearchBar, _super);
203
- function SearchBar() {
200
+ var SearchForm = /** @class */ (function (_super) {
201
+ __extends(SearchForm, _super);
202
+ function SearchForm() {
204
203
  var _this = _super !== null && _super.apply(this, arguments) || this;
205
204
  _this.inputRef = React.createRef();
206
205
  _this.openRef = React.createRef();
@@ -219,13 +218,13 @@ var SearchBar = /** @class */ (function (_super) {
219
218
  theme = _this.props.searchTheme;
220
219
  }
221
220
  else {
222
- theme = themes_1.searchThemes[types_1.SearchTheme.Light];
221
+ theme = themes_1.searchThemes[themes_1.SearchTheme.Light];
223
222
  }
224
223
  return theme;
225
224
  };
226
225
  _this.getThemeColors = function () {
227
226
  var theme = _this.props.isCollapsed && _this.state.showForm
228
- ? themes_1.searchThemes[types_1.SearchTheme.Transparent]
227
+ ? themes_1.searchThemes[themes_1.SearchTheme.Transparent]
229
228
  : _this.getTheme();
230
229
  return getInputColors(theme, _this.state.isFocused);
231
230
  };
@@ -281,7 +280,7 @@ var SearchBar = /** @class */ (function (_super) {
281
280
  };
282
281
  return _this;
283
282
  }
284
- SearchBar.prototype.componentDidUpdate = function (prevProps, prevState) {
283
+ SearchForm.prototype.componentDidUpdate = function (prevProps, prevState) {
285
284
  var showFormToggled = this.state.showForm !== prevState.showForm;
286
285
  if (showFormToggled) {
287
286
  if (this.state.showForm) {
@@ -292,9 +291,9 @@ var SearchBar = /** @class */ (function (_super) {
292
291
  }
293
292
  }
294
293
  };
295
- SearchBar.prototype.render = function () {
294
+ SearchForm.prototype.render = function () {
296
295
  var _a = this.props, _b = _a.clearButtonAriaLabel, clearButtonAriaLabel = _b === void 0 ? 'Reset Search Form' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Search' : _c, _d = _a.inputLabel, inputLabel = _d === void 0 ? 'Search' : _d, _e = _a.submitAriaLabel, submitAriaLabel = _e === void 0 ? 'Search' : _e, _f = _a.openButtonAriaLabel, openButtonAriaLabel = _f === void 0 ? 'Open Search' : _f, _g = _a.closeButtonAriaLabel, closeButtonAriaLabel = _g === void 0 ? 'Cancel' : _g, _h = _a.showClearButton, showClearButton = _h === void 0 ? true : _h, _j = _a.height, height = _j === void 0 ? 40 : _j, grow = _a.grow, onSubmit = _a.onSubmit, isCollapsed = _a.isCollapsed, onInputChange = _a.onInputChange, autocompleteItems = _a.autocompleteItems, initialValue = _a.initialValue, searchTheme = _a.searchTheme, rightAlign = _a.rightAlign, elemProps = __rest(_a, ["clearButtonAriaLabel", "placeholder", "inputLabel", "submitAriaLabel", "openButtonAriaLabel", "closeButtonAriaLabel", "showClearButton", "height", "grow", "onSubmit", "isCollapsed", "onInputChange", "autocompleteItems", "initialValue", "searchTheme", "rightAlign"]);
297
- return (React.createElement(SearchForm, __assign({ role: "search", action: ".", rightAlign: rightAlign, grow: grow, "aria-labelledby": this.labelId, isCollapsed: isCollapsed, onSubmit: this.handleSubmit, showForm: this.state.showForm }, elemProps),
296
+ return (React.createElement(StyledSearchForm, __assign({ role: "search", action: ".", rightAlign: rightAlign, grow: grow, "aria-labelledby": this.labelId, isCollapsed: isCollapsed, onSubmit: this.handleSubmit, showForm: this.state.showForm }, elemProps),
298
297
  React.createElement(SearchContainer, { height: height },
299
298
  React.createElement(SearchIcon, { "aria-label": submitAriaLabel, icon: canvas_system_icons_web_1.searchIcon, isCollapsed: isCollapsed, variant: this.getIconButtonType(), type: "submit", isHidden: !!isCollapsed && !this.state.showForm }),
300
299
  React.createElement(SearchIcon, { "aria-label": openButtonAriaLabel, icon: canvas_system_icons_web_1.searchIcon, isCollapsed: isCollapsed, variant: this.getIconButtonType(), onClick: this.openCollapsedSearch, ref: this.openRef, type: "button", isHidden: !isCollapsed || (!!isCollapsed && this.state.showForm) }),
@@ -303,7 +302,7 @@ var SearchBar = /** @class */ (function (_super) {
303
302
  React.createElement(SearchInput, { ref: this.inputRef, value: this.state.searchQuery, placeholder: placeholder, isCollapsed: isCollapsed, inputColors: this.getThemeColors(), height: height, name: "search" }))),
304
303
  React.createElement(CloseButton, { "aria-label": closeButtonAriaLabel, icon: canvas_system_icons_web_1.xIcon, isCollapsed: isCollapsed, variant: "plain", showForm: this.state.showForm, onClick: this.closeCollapsedSearch, type: "button" }))));
305
304
  };
306
- SearchBar.Theme = types_1.SearchTheme;
307
- return SearchBar;
305
+ SearchForm.Theme = themes_1.SearchTheme;
306
+ return SearchForm;
308
307
  }(React.Component));
309
- exports.SearchBar = SearchBar;
308
+ exports.SearchForm = SearchForm;