@thecb/components 8.3.0-beta.0 → 8.3.0
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.
- package/dist/index.cjs.js +4 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.esm.js +4 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/badge/Badge.theme.js +2 -2
- package/src/components/atoms/form-layouts/index.d.ts +6 -2
- package/src/components/atoms/form-select/index.d.ts +8 -8
- package/src/constants/colors.js +3 -2
- package/src/index.d.ts +1 -0
- package/src/types/common/ErrorMessageDictionary.ts +3 -0
- package/src/types/common/FieldActions.ts +6 -6
- package/src/types/common/FormSelectOption.ts +4 -0
- package/src/types/common/index.ts +3 -1
- package/src/types/common/ErrorMessage.ts +0 -3
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
HINT_GREEN,
|
|
5
5
|
INFO_BLUE,
|
|
6
6
|
MATISSE_BLUE,
|
|
7
|
-
|
|
7
|
+
ROYAL_BLUE_VIVID,
|
|
8
8
|
SEA_GREEN,
|
|
9
9
|
ZEST_ORANGE
|
|
10
10
|
} from "../../../constants/colors";
|
|
@@ -19,7 +19,7 @@ const background = {
|
|
|
19
19
|
const color = {
|
|
20
20
|
info: `${MATISSE_BLUE}`,
|
|
21
21
|
warn: `${ZEST_ORANGE}`,
|
|
22
|
-
primary: `${
|
|
22
|
+
primary: `${ROYAL_BLUE_VIVID}`,
|
|
23
23
|
success: `${SEA_GREEN}`
|
|
24
24
|
};
|
|
25
25
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Expand from "../../../util/expand";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
ErrorMessageDictionary,
|
|
5
|
+
Field,
|
|
6
|
+
FieldActions
|
|
7
|
+
} from "../../../types/common";
|
|
4
8
|
|
|
5
9
|
export interface FormInputProps {
|
|
6
10
|
extraStyles?: string;
|
|
7
11
|
field?: Field;
|
|
8
12
|
fieldActions?: FieldActions;
|
|
9
13
|
disabled?: boolean;
|
|
10
|
-
errorMessages?:
|
|
14
|
+
errorMessages?: ErrorMessageDictionary;
|
|
11
15
|
helperModal?: boolean;
|
|
12
16
|
isEmail?: boolean;
|
|
13
17
|
isNum?: boolean;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Expand from "../../../util/expand";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
3
|
+
import {
|
|
4
|
+
ErrorMessageDictionary,
|
|
5
|
+
Field,
|
|
6
|
+
FieldActions,
|
|
7
|
+
FormSelectOption
|
|
8
|
+
} from "../../../types/common";
|
|
9
9
|
|
|
10
10
|
export interface FormSelectProps {
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
dropdownMaxHeight?: string;
|
|
13
13
|
labelTextWhenNoError?: string;
|
|
14
|
-
options?:
|
|
14
|
+
options?: FormSelectOption[];
|
|
15
15
|
fieldActions?: FieldActions;
|
|
16
16
|
showErrors?: boolean;
|
|
17
|
-
errorMessages?:
|
|
17
|
+
errorMessages?: ErrorMessageDictionary;
|
|
18
18
|
field?: Field;
|
|
19
19
|
}
|
|
20
20
|
|
package/src/constants/colors.js
CHANGED
|
@@ -40,7 +40,6 @@ const COOL_GREY_05 = "#fbfcfd"; // CBS-050
|
|
|
40
40
|
const CLOUDBURST_BLUE = "#26395c";
|
|
41
41
|
const ZODIAC_BLUE = "#14284b";
|
|
42
42
|
const CONGRESS_BLUE = "#005095";
|
|
43
|
-
const ROYAL_BLUE = "#3B5BDB";
|
|
44
43
|
const SCIENCE_BLUE = "#0074D9";
|
|
45
44
|
const MARINER_BLUE = "#2E75D2";
|
|
46
45
|
const CURIOUS_BLUE = "#27A9E1";
|
|
@@ -55,7 +54,8 @@ const INFO_BLUE = "#E4F4FD";
|
|
|
55
54
|
const CORNFLOWER_BLUE = "#EBEFFB";
|
|
56
55
|
const HOVER_LIGHT_BLUE = "#EFFAFF";
|
|
57
56
|
const MATISSE_BLUE = "#15749D";
|
|
58
|
-
|
|
57
|
+
const ROYAL_BLUE = "#3181E3";
|
|
58
|
+
const ROYAL_BLUE_VIVID = "#3B5BDB";
|
|
59
59
|
const ASTRAL_BLUE = "#3176AA";
|
|
60
60
|
const SAPPHIRE_BLUE = "#116285";
|
|
61
61
|
const PEACOCK_BLUE = "#0E506D";
|
|
@@ -188,6 +188,7 @@ export {
|
|
|
188
188
|
HOVER_LIGHT_BLUE,
|
|
189
189
|
MATISSE_BLUE,
|
|
190
190
|
ROYAL_BLUE,
|
|
191
|
+
ROYAL_BLUE_VIVID,
|
|
191
192
|
ASTRAL_BLUE,
|
|
192
193
|
SAPPHIRE_BLUE,
|
|
193
194
|
PEACOCK_BLUE,
|
package/src/index.d.ts
CHANGED
|
@@ -4,24 +4,24 @@ import ReduxAction from "./ReduxAction";
|
|
|
4
4
|
* These types should be moved to and referenced from redux-freeform if it implements TypeScript
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
type ValidatorFn = (value: string) => boolean;
|
|
7
|
+
export type ValidatorFn = (value: string) => boolean;
|
|
8
8
|
|
|
9
|
-
interface FieldActionPayload {
|
|
9
|
+
export interface FieldActionPayload {
|
|
10
10
|
fieldName: string;
|
|
11
11
|
value?: string;
|
|
12
12
|
validator?: ValidatorFn;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
type SetAction = ReduxAction<"field/SET", FieldActionPayload>;
|
|
16
|
-
type AddValidatorAction = ReduxAction<
|
|
15
|
+
export type SetAction = ReduxAction<"field/SET", FieldActionPayload>;
|
|
16
|
+
export type AddValidatorAction = ReduxAction<
|
|
17
17
|
"field/ADD_VALIDATOR",
|
|
18
18
|
FieldActionPayload
|
|
19
19
|
>;
|
|
20
|
-
type RemoveValidatorAction = ReduxAction<
|
|
20
|
+
export type RemoveValidatorAction = ReduxAction<
|
|
21
21
|
"field/REMOVE_VALIDATOR",
|
|
22
22
|
FieldActionPayload
|
|
23
23
|
>;
|
|
24
|
-
type ClearAction = ReduxAction<"field/CLEAR">;
|
|
24
|
+
export type ClearAction = ReduxAction<"field/CLEAR">;
|
|
25
25
|
|
|
26
26
|
export default interface FieldActions {
|
|
27
27
|
set?: (fieldName: string) => (value: string) => SetAction;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as Field } from "./Field";
|
|
2
2
|
export { default as ReduxAction } from "./ReduxAction";
|
|
3
3
|
export { default as FieldActions } from "./FieldActions";
|
|
4
|
-
export { default as
|
|
4
|
+
export { default as FormSelectOption } from "./FormSelectOption";
|
|
5
|
+
export { default as ErrorMessageDictionary } from "./ErrorMessageDictionary";
|
|
6
|
+
export * from "./FieldActions";
|