@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,21 +0,0 @@
1
- import React from 'react';
2
- import { TextInputModel, TextInputModelConfig } from './hooks/useTextInputModel';
3
- export declare const TextInputModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
4
- hasError?: boolean | undefined;
5
- inputId?: string | undefined;
6
- hintId?: string | undefined;
7
- isRequired?: boolean | undefined;
8
- }, {}>>;
9
- export interface TextInputProps extends TextInputModelConfig {
10
- model?: TextInputModel;
11
- /**
12
- * Children of the Text Input. Should contain a `<TextInput.Field>`, a `<TextInput.Label>` and an optional `<TextInput.Hint>`
13
- */
14
- children: React.ReactNode;
15
- }
16
- export declare const TextInput: import("@workday/canvas-kit-react/common").Component<TextInputProps> & {
17
- Field: import("@workday/canvas-kit-react/common").ElementComponent<"input", import("./TextInputField").TextInputFieldProps>;
18
- Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("./TextInputLabel").TextInputLabelProps>;
19
- Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("./TextInputHint").TextInputHintProps>;
20
- };
21
- //# sourceMappingURL=TextInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAoB,cAAc,EAAE,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAKlG,eAAO,MAAM,qBAAqB;;;;;OAAiD,CAAC;AAEpF,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,SAAS;;;;CAcpB,CAAC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var react_1 = __importDefault(require("react"));
18
- var common_1 = require("@workday/canvas-kit-react/common");
19
- var useTextInputModel_1 = require("./hooks/useTextInputModel");
20
- var TextInputField_1 = require("./TextInputField");
21
- var TextInputLabel_1 = require("./TextInputLabel");
22
- var TextInputHint_1 = require("./TextInputHint");
23
- exports.TextInputModelContext = react_1.default.createContext({});
24
- exports.TextInput = common_1.createComponent()({
25
- displayName: 'TextInput',
26
- Component: function (_a) {
27
- var children = _a.children, model = _a.model, config = __rest(_a, ["children", "model"]);
28
- var value = common_1.useDefaultModel(model, config, useTextInputModel_1.useTextInputModel);
29
- return (react_1.default.createElement(exports.TextInputModelContext.Provider, { value: value }, children));
30
- },
31
- subComponents: {
32
- Field: TextInputField_1.TextInputField,
33
- Label: TextInputLabel_1.TextInputLabel,
34
- Hint: TextInputHint_1.TextInputHint,
35
- },
36
- });
@@ -1,8 +0,0 @@
1
- import { ExtractProps } from '@workday/canvas-kit-react/common';
2
- import { Box } from '@workday/canvas-kit-labs-react/common';
3
- import { TextInputModel } from './hooks/useTextInputModel';
4
- export interface TextInputFieldProps extends ExtractProps<typeof Box, never> {
5
- model?: TextInputModel;
6
- }
7
- export declare const TextInputField: import("@workday/canvas-kit-react/common").ElementComponent<"input", TextInputFieldProps>;
8
- //# sourceMappingURL=TextInputField.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInputField.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAkB,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAC,GAAG,EAA6B,MAAM,uCAAuC,CAAC;AAGtF,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAGzD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC;IAC1E,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAmCD,eAAO,MAAM,cAAc,2FAoBzB,CAAC"}
@@ -1,66 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- /** @jsx jsx */
26
- var core_1 = require("@emotion/core");
27
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
28
- var common_1 = require("@workday/canvas-kit-react/common");
29
- var common_2 = require("@workday/canvas-kit-labs-react/common");
30
- var TextInput_1 = require("./TextInput");
31
- var useTextInputField_1 = require("./hooks/useTextInputField");
32
- var baseStyles = __assign(__assign({}, tokens_1.type.levels.subtext.large), { padding: tokens_1.space.xxs, margin: 0, minWidth: '280px', border: "1px solid " + tokens_1.inputColors.border, backgroundColor: tokens_1.inputColors.background, borderRadius: tokens_1.borderRadius.m, display: 'block', height: '40px', transition: '0.2s box-shadow, 0.2s border-color', '&::placeholder': {
33
- color: tokens_1.inputColors.placeholder,
34
- }, '&:hover': {
35
- borderColor: tokens_1.inputColors.hoverBorder,
36
- }, '&:focus:not([disabled])': {
37
- outline: 'none',
38
- }, '&:disabled': {
39
- backgroundColor: tokens_1.inputColors.disabled.background,
40
- borderColor: tokens_1.inputColors.disabled.border,
41
- color: tokens_1.inputColors.disabled.text,
42
- '&::placeholder': {
43
- color: tokens_1.inputColors.disabled.text,
44
- },
45
- }, '::-ms-clear': {
46
- display: 'none',
47
- } });
48
- exports.TextInputField = common_1.createComponent('input')({
49
- displayName: 'TextInput.Field',
50
- Component: function (_a, ref) {
51
- var model = _a.model, elemProps = __rest(_a, ["model"]);
52
- var localModel = common_1.useModelContext(TextInput_1.TextInputModelContext, model);
53
- var props = useTextInputField_1.useTextInputField(localModel, elemProps, ref);
54
- var _b = common_2.useThemeRTL(), themeRTL = _b.themeRTL, theme = _b.theme;
55
- var errorRing = common_2.useThemedRing('error');
56
- var focusStyles = localModel.state.hasError
57
- ? errorRing
58
- : themeRTL({
59
- '&:focus:not([disabled])': {
60
- borderColor: theme.canvas.palette.common.focusOutline,
61
- boxShadow: "inset 0 0 0 1px " + theme.canvas.palette.common.focusOutline,
62
- },
63
- });
64
- return core_1.jsx(common_2.Box, __assign({ as: "input", css: [themeRTL(baseStyles), focusStyles] }, props));
65
- },
66
- });
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { Box } from '@workday/canvas-kit-labs-react/common';
4
- import { TextInputModel } from './hooks/useTextInputModel';
5
- export interface TextInputHintProps extends ExtractProps<typeof Box, never> {
6
- model?: TextInputModel;
7
- /**
8
- * Hint text to show to the user regarding the Error/Alert
9
- */
10
- children?: React.ReactNode;
11
- }
12
- export declare const TextInputHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", TextInputHintProps>;
13
- //# sourceMappingURL=TextInputHint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInputHint.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputHint.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAEhG,OAAO,EAAC,GAAG,EAAc,MAAM,uCAAuC,CAAC;AAGvE,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAGzD,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC;IACzE,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAQD,eAAO,MAAM,aAAa,sFAyBxB,CAAC"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- /** @jsx jsx */
26
- var core_1 = require("@emotion/core");
27
- var common_1 = require("@workday/canvas-kit-react/common");
28
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
29
- var common_2 = require("@workday/canvas-kit-labs-react/common");
30
- var TextInput_1 = require("./TextInput");
31
- var useTextInputHint_1 = require("./hooks/useTextInputHint");
32
- var baseStyles = __assign(__assign({}, tokens_1.type.levels.subtext.medium), { margin: tokens_1.space.xxs + " 0 0", width: '100%' });
33
- exports.TextInputHint = common_1.createComponent('p')({
34
- displayName: 'TextInput.Hint',
35
- Component: function (_a, ref, Element) {
36
- var model = _a.model, children = _a.children, elemProps = __rest(_a, ["model", "children"]);
37
- var localModel = common_1.useModelContext(TextInput_1.TextInputModelContext, model);
38
- var props = useTextInputHint_1.useTextInputHint(localModel, elemProps, ref);
39
- var _b = common_2.useThemeRTL(), themeRTL = _b.themeRTL, theme = _b.theme;
40
- if (!children) {
41
- // If there is no hint text just skip rendering
42
- return null;
43
- }
44
- return (core_1.jsx(common_2.Box, __assign({ as: Element, css: themeRTL(baseStyles, localModel.state.hasError ? { color: theme.canvas.palette.error.main } : {}) }, props), children));
45
- },
46
- });
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { Box } from '@workday/canvas-kit-labs-react/common';
4
- import { TextInputModel } from './hooks/useTextInputModel';
5
- export interface TextInputLabelProps extends ExtractProps<typeof Box, never> {
6
- model?: TextInputModel;
7
- /**
8
- * If true, apply the `accessibleHide` styles to the Label.
9
- */
10
- isVisuallyHidden?: boolean;
11
- /**
12
- * The text of the label.
13
- */
14
- children: React.ReactNode;
15
- }
16
- export declare const TextInputLabel: import("@workday/canvas-kit-react/common").ElementComponent<"label", TextInputLabelProps>;
17
- //# sourceMappingURL=TextInputLabel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInputLabel.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAGL,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,GAAG,EAA+B,MAAM,uCAAuC,CAAC;AAKxF,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAGzD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,KAAK,CAAC;IAC1E,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAkBD,eAAO,MAAM,cAAc,2FA2BzB,CAAC"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- /** @jsx jsx */
26
- var core_1 = require("@emotion/core");
27
- var common_1 = require("@workday/canvas-kit-react/common");
28
- var common_2 = require("@workday/canvas-kit-labs-react/common");
29
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
30
- var layout_1 = require("@workday/canvas-kit-labs-react/layout");
31
- var TextInput_1 = require("./TextInput");
32
- var useTextInputLabel_1 = require("./hooks/useTextInputLabel");
33
- var styles = {
34
- label: __assign(__assign({}, tokens_1.type.levels.subtext.large), { fontWeight: tokens_1.type.properties.fontWeights.medium, minWidth: '180px' }),
35
- label_visuallyHidden: __assign({}, common_1.accessibleHide),
36
- asterisk: {
37
- fontSize: tokens_1.type.properties.fontSizes[16],
38
- fontWeight: tokens_1.type.properties.fontWeights.regular,
39
- textDecoration: 'unset',
40
- },
41
- };
42
- exports.TextInputLabel = common_1.createComponent('label')({
43
- displayName: 'TextInput.Label',
44
- Component: function (_a, ref) {
45
- var isVisuallyHidden = _a.isVisuallyHidden, model = _a.model, children = _a.children, elemProps = __rest(_a, ["isVisuallyHidden", "model", "children"]);
46
- var localModel = common_1.useModelContext(TextInput_1.TextInputModelContext, model);
47
- var props = useTextInputLabel_1.useTextInputLabel(localModel, elemProps, ref);
48
- var _b = common_2.useThemeRTL(), themeRTL = _b.themeRTL, theme = _b.theme;
49
- return (core_1.jsx(common_2.Box, __assign({ as: "label", css: themeRTL(styles.label, isVisuallyHidden ? styles.label_visuallyHidden : {}) }, props),
50
- core_1.jsx(layout_1.HStack, { spacing: "xxxs" },
51
- core_1.jsx("span", null, children),
52
- localModel.state.isRequired && (core_1.jsx("span", { css: themeRTL(styles.asterisk, { color: theme.canvas.palette.error.main }), "aria-hidden": "true" }, "*")))));
53
- },
54
- });
@@ -1,19 +0,0 @@
1
- /// <reference types="@emotion/core" />
2
- /**
3
- * Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
4
- */
5
- export declare const useTextInputField: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
6
- hasError?: boolean | undefined;
7
- inputId?: string | undefined;
8
- hintId?: string | undefined;
9
- isRequired?: boolean | undefined;
10
- }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
- type: string;
12
- required: boolean | undefined;
13
- 'aria-invalid': boolean | undefined;
14
- 'aria-describedby': string | undefined;
15
- id: string | undefined;
16
- } & P & (R extends HTMLOrSVGElement ? {
17
- ref: import("react").Ref<R>;
18
- } : {});
19
- //# sourceMappingURL=useTextInputField.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTextInputField.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputField.tsx"],"names":[],"mappings":";AAGA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;OAQ5B,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var common_1 = require("@workday/canvas-kit-react/common");
4
- /**
5
- * Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
6
- */
7
- exports.useTextInputField = common_1.createHook(function (_a) {
8
- var state = _a.state;
9
- return {
10
- type: 'text',
11
- required: state.isRequired ? true : undefined,
12
- 'aria-invalid': state.hasError ? true : undefined,
13
- 'aria-describedby': state.hintId,
14
- id: state.inputId,
15
- };
16
- });
@@ -1,15 +0,0 @@
1
- /// <reference types="@emotion/core" />
2
- /**
3
- * Adds the necessary props to a `Hint` component. Used by the TextInput.Hint subcomponent.
4
- */
5
- export declare const useTextInputHint: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
6
- hasError?: boolean | undefined;
7
- inputId?: string | undefined;
8
- hintId?: string | undefined;
9
- isRequired?: boolean | undefined;
10
- }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
- id: string | undefined;
12
- } & P & (R extends HTMLOrSVGElement ? {
13
- ref: import("react").Ref<R>;
14
- } : {});
15
- //# sourceMappingURL=useTextInputHint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTextInputHint.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputHint.tsx"],"names":[],"mappings":";AAGA;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;OAI3B,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var common_1 = require("@workday/canvas-kit-react/common");
4
- /**
5
- * Adds the necessary props to a `Hint` component. Used by the TextInput.Hint subcomponent.
6
- */
7
- exports.useTextInputHint = common_1.createHook(function (_a) {
8
- var state = _a.state;
9
- return {
10
- id: state.hintId,
11
- };
12
- });
@@ -1,15 +0,0 @@
1
- /// <reference types="@emotion/core" />
2
- /**
3
- * Adds the necessary props to a `Label` component. Used by the TextInput.Label subcomponent.
4
- */
5
- export declare const useTextInputLabel: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
6
- hasError?: boolean | undefined;
7
- inputId?: string | undefined;
8
- hintId?: string | undefined;
9
- isRequired?: boolean | undefined;
10
- }, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
11
- htmlFor: string | undefined;
12
- } & P & (R extends HTMLOrSVGElement ? {
13
- ref: import("react").Ref<R>;
14
- } : {});
15
- //# sourceMappingURL=useTextInputLabel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTextInputLabel.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputLabel.tsx"],"names":[],"mappings":";AAGA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;OAI5B,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var common_1 = require("@workday/canvas-kit-react/common");
4
- /**
5
- * Adds the necessary props to a `Label` component. Used by the TextInput.Label subcomponent.
6
- */
7
- exports.useTextInputLabel = common_1.createHook(function (_a) {
8
- var state = _a.state;
9
- return {
10
- htmlFor: state.inputId,
11
- };
12
- });
@@ -1,17 +0,0 @@
1
- import { Model, ToModelConfig } from '@workday/canvas-kit-react/common';
2
- declare type TextInputState = {
3
- hasError?: boolean;
4
- inputId?: string;
5
- hintId?: string;
6
- isRequired?: boolean;
7
- };
8
- declare type TextInputEvents = {};
9
- export declare type TextInputModel = Model<TextInputState, TextInputEvents>;
10
- declare const textInputEventMap: {
11
- guards: {};
12
- callbacks: {};
13
- };
14
- export declare type TextInputModelConfig = TextInputState & Partial<ToModelConfig<TextInputState, TextInputEvents, typeof textInputEventMap>>;
15
- export declare const useTextInputModel: (config?: TextInputModelConfig) => Model<TextInputState, TextInputEvents>;
16
- export {};
17
- //# sourceMappingURL=useTextInputModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTextInputModel.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputModel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,aAAa,EAGd,MAAM,kCAAkC,CAAC;AAE1C,aAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,aAAK,eAAe,GAAG,EAAE,CAAC;AAE1B,oBAAY,cAAc,GAAG,KAAK,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAEpE,QAAA,MAAM,iBAAiB;;;CAGrB,CAAC;AAEH,oBAAY,oBAAoB,GAAG,cAAc,GAC/C,OAAO,CAAC,aAAa,CAAC,cAAc,EAAE,eAAe,EAAE,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEpF,eAAO,MAAM,iBAAiB,2EAiB7B,CAAC"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var common_1 = require("@workday/canvas-kit-react/common");
4
- var textInputEventMap = common_1.createEventMap()({
5
- guards: {},
6
- callbacks: {},
7
- });
8
- exports.useTextInputModel = function (config) {
9
- if (config === void 0) { config = {}; }
10
- var inputId = common_1.useUniqueId(config.inputId);
11
- var hintId = common_1.useUniqueId(config.hintId);
12
- var state = {
13
- hasError: config.hasError,
14
- isRequired: config.isRequired,
15
- inputId: inputId,
16
- hintId: hintId,
17
- };
18
- var events = common_1.useEventMap(textInputEventMap, state, config, {});
19
- return {
20
- state: state,
21
- events: events,
22
- };
23
- };
@@ -1,11 +0,0 @@
1
- import { EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
2
- import { CSSProperties } from '@workday/canvas-kit-react/tokens';
3
- declare type paletteSelection = Exclude<keyof EmotionCanvasTheme['canvas']['palette'], 'common'>;
4
- interface ContrastColors {
5
- outer?: string;
6
- inner?: string;
7
- }
8
- export declare function getPaletteColors(type: paletteSelection, theme?: EmotionCanvasTheme): ContrastColors;
9
- export declare const useThemedRing: (type: "alert" | "error" | "primary" | "success" | "neutral") => CSSProperties;
10
- export {};
11
- //# sourceMappingURL=useThemedRing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useThemedRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/theming/useThemedRing.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAS,aAAa,EAAc,MAAM,kCAAkC,CAAC;AAGpF,aAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACzF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkBD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,gBAAgB,EACtB,KAAK,CAAC,EAAE,kBAAkB,GACzB,cAAc,CA0BhB;AAED,eAAO,MAAM,aAAa,gFAyBzB,CAAC"}
@@ -1,55 +0,0 @@
1
- import { useThemeRTL } from './useThemeRTL';
2
- import { colors, inputColors } from '@workday/canvas-kit-react/tokens';
3
- import chroma from 'chroma-js';
4
- var isAccessible = function (foreground, background) {
5
- if (background === void 0) { background = colors.frenchVanilla100; }
6
- return chroma.contrast(foreground, background) >= 3;
7
- };
8
- var getPaletteColorsFromTheme = function (fallbackColors, palette) {
9
- return palette
10
- ? {
11
- outer: isAccessible(palette === null || palette === void 0 ? void 0 : palette.main) ? palette === null || palette === void 0 ? void 0 : palette.main : palette === null || palette === void 0 ? void 0 : palette.darkest,
12
- inner: palette === null || palette === void 0 ? void 0 : palette.main,
13
- }
14
- : fallbackColors;
15
- };
16
- export function getPaletteColors(type, theme) {
17
- var palette = theme === null || theme === void 0 ? void 0 : theme.canvas.palette[type];
18
- switch (type) {
19
- case 'error': {
20
- return getPaletteColorsFromTheme({
21
- outer: inputColors.error.border,
22
- inner: inputColors.error.border,
23
- }, palette);
24
- }
25
- case 'alert': {
26
- return getPaletteColorsFromTheme({
27
- outer: colors.cantaloupe600,
28
- inner: inputColors.alert.border,
29
- }, palette);
30
- }
31
- default: {
32
- return getPaletteColorsFromTheme({}, palette);
33
- }
34
- }
35
- }
36
- export var useThemedRing = function (type) {
37
- var _a = useThemeRTL(), themeRTL = _a.themeRTL, theme = _a.theme;
38
- var paletteColors = getPaletteColors(type, theme);
39
- if (!((paletteColors === null || paletteColors === void 0 ? void 0 : paletteColors.outer) || (paletteColors === null || paletteColors === void 0 ? void 0 : paletteColors.inner))) {
40
- return {};
41
- }
42
- var errorBoxShadow = "inset 0 0 0 " + (paletteColors.outer === paletteColors.inner ? 1 : 2) + "px " + paletteColors.inner;
43
- return themeRTL({
44
- borderColor: paletteColors.outer,
45
- transition: '100ms box-shadow',
46
- boxShadow: errorBoxShadow,
47
- '&:hover, &:disabled': {
48
- borderColor: paletteColors.outer,
49
- },
50
- '&:focus:not([disabled])': {
51
- borderColor: paletteColors.outer,
52
- boxShadow: errorBoxShadow + ",\n 0 0 0 2px " + colors.frenchVanilla100 + ",\n 0 0 0 4px " + (theme ? theme.canvas.palette.common.focusOutline : inputColors.focusBorder),
53
- },
54
- });
55
- };
@@ -1,3 +0,0 @@
1
- export * from './lib/SearchForm';
2
- export * from './lib/themes';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../search-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './lib/SearchForm';
2
- export * from './lib/themes';
@@ -1 +0,0 @@
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"}
@@ -1,21 +0,0 @@
1
- export declare enum SearchTheme {
2
- Light = 0,
3
- Dark = 1,
4
- Transparent = 2
5
- }
6
- export interface SearchThemeAttributes {
7
- background?: string;
8
- backgroundFocus?: string;
9
- backgroundHover?: string;
10
- color?: string;
11
- colorFocus?: string;
12
- placeholderColor?: string;
13
- placeholderColorFocus?: string;
14
- boxShadow?: string | string[];
15
- boxShadowFocus?: string | string[];
16
- }
17
- export interface SearchThemes {
18
- [key: string]: SearchThemeAttributes;
19
- }
20
- export declare const searchThemes: SearchThemes;
21
- //# sourceMappingURL=themes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../search-form/lib/themes.ts"],"names":[],"mappings":"AAGA,oBAAY,WAAW;IACrB,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,WAAW,IAAA;CACZ;AACD,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,39 +0,0 @@
1
- var _a;
2
- import { focusRing } from '@workday/canvas-kit-react/common';
3
- import { colors } from '@workday/canvas-kit-react/tokens';
4
- export var SearchTheme;
5
- (function (SearchTheme) {
6
- SearchTheme[SearchTheme["Light"] = 0] = "Light";
7
- SearchTheme[SearchTheme["Dark"] = 1] = "Dark";
8
- SearchTheme[SearchTheme["Transparent"] = 2] = "Transparent";
9
- })(SearchTheme || (SearchTheme = {}));
10
- export var searchThemes = (_a = {},
11
- _a[SearchTheme.Transparent] = {
12
- background: 'rgba(0, 0, 0, 0)',
13
- backgroundFocus: 'rgba(0, 0, 0, 0)',
14
- color: colors.blackPepper300,
15
- colorFocus: colors.blackPepper300,
16
- placeholderColor: colors.licorice300,
17
- placeholderColorFocus: colors.licorice300,
18
- boxShadow: 'none',
19
- boxShadowFocus: 'none',
20
- },
21
- _a[SearchTheme.Light] = {
22
- background: colors.soap200,
23
- backgroundFocus: colors.soap200,
24
- backgroundHover: colors.soap300,
25
- color: colors.blackPepper300,
26
- placeholderColor: colors.licorice300,
27
- boxShadow: 'none',
28
- boxShadowFocus: focusRing().boxShadow,
29
- },
30
- _a[SearchTheme.Dark] = {
31
- background: 'rgba(0, 0, 0, 0.2)',
32
- backgroundFocus: colors.frenchVanilla100,
33
- color: colors.frenchVanilla100,
34
- colorFocus: colors.blackPepper300,
35
- placeholderColor: colors.frenchVanilla100,
36
- placeholderColorFocus: colors.licorice300,
37
- boxShadow: 'none',
38
- },
39
- _a);
@@ -1,7 +0,0 @@
1
- export * from './lib/TextInput';
2
- export * from './lib/hooks/useTextInputModel';
3
- export * from './lib/hooks/useTextInputHint';
4
- export * from './lib/hooks/useTextInputField';
5
- export * from './lib/hooks/useTextInputHint';
6
- export * from './lib/hooks/useTextInputLabel';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC"}
@@ -1,6 +0,0 @@
1
- export * from './lib/TextInput';
2
- export * from './lib/hooks/useTextInputModel';
3
- export * from './lib/hooks/useTextInputHint';
4
- export * from './lib/hooks/useTextInputField';
5
- export * from './lib/hooks/useTextInputHint';
6
- export * from './lib/hooks/useTextInputLabel';