jamespot-react-components 1.0.86 → 1.0.91
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/build/jamespot-react-components.js +48 -48
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/Common/JRCFormErrors.d.ts +1 -1
- package/build/src/components/Form/Input/Common/useFormControls.d.ts +12 -24
- package/build/src/components/Form/Input/JRCFormCheckbox/JRCFormCheckbox.d.ts +3 -0
- package/build/src/components/Form/Input/JRCFormCheckbox/JRCFormCheckbox.style.d.ts +2 -2
- package/build/src/components/Form/Input/JRCFormCheckbox/JRCFormCheckbox.types.d.ts +6 -6
- package/build/src/components/JRCAppLeftColumn/JRCAppLeftColumn.stories.d.ts +2 -3
- package/build/src/hooks/UseDidMountEffect.d.ts +5 -0
- package/build/src/styles/theme.d.ts +4 -4
- package/package.json +2 -2
- package/storybook-static/{587.e875d59e.iframe.bundle.js → 587.0ddc54e5.iframe.bundle.js} +2 -2
- package/storybook-static/{587.e875d59e.iframe.bundle.js.LICENSE.txt → 587.0ddc54e5.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.cbb259a9.iframe.bundle.js +1 -0
- package/storybook-static/main.08c3c60d.iframe.bundle.js +0 -1
|
@@ -6,5 +6,5 @@ import { FieldValues } from 'react-hook-form/dist/types';
|
|
|
6
6
|
* @param error react-hook-form object
|
|
7
7
|
*/
|
|
8
8
|
export declare const JRCFormErrors: <TFieldValues extends FieldValues = FieldValues>({ error, }: {
|
|
9
|
-
error: import("react-hook-form/dist/types").DeepMap<import("react-hook-form/dist/types").DeepPartial<TFieldValues>, import("react-hook-form/dist/types").FieldError
|
|
9
|
+
error: import("react-hook-form/dist/types").DeepMap<import("react-hook-form/dist/types").DeepPartial<TFieldValues>, import("react-hook-form/dist/types").FieldError> | undefined;
|
|
10
10
|
}) => JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RegisterOptions, ValidationRule, ValidationValue } from 'react-hook-form/dist/types/validator';
|
|
2
3
|
import { IntlShape } from 'react-intl/src/types';
|
|
3
4
|
export declare type AllowedDefaultTypes = 'required' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern';
|
|
4
5
|
export declare type FormControls = Pick<RegisterOptions, AllowedDefaultTypes>;
|
|
@@ -11,32 +12,19 @@ export declare type AllowedTypes = AllowedDefaultTypes | keyof JRCFormControls;
|
|
|
11
12
|
* @param rules rules applied to the field
|
|
12
13
|
* @param intl translation object
|
|
13
14
|
*/
|
|
14
|
-
export declare const useFormControls: (rules: FormControls & JRCFormControls, intl: IntlShape) => FormControls | undefined;
|
|
15
|
+
export declare const useFormControls: (rules: (FormControls & JRCFormControls) | undefined, intl: IntlShape) => FormControls | undefined;
|
|
16
|
+
declare type getJRCErrorsReturnType = [
|
|
17
|
+
AllowedTypes,
|
|
18
|
+
{
|
|
19
|
+
value: ValidationValue;
|
|
20
|
+
message: string | React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
];
|
|
15
23
|
/**
|
|
16
24
|
* Produces a react-hook-form compatible validation object with default messages for each error type
|
|
17
25
|
* @param rule rule applied to the field
|
|
18
26
|
* @param validation validation object
|
|
19
27
|
* @param intl translation object
|
|
20
28
|
*/
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
23
|
-
message: string;
|
|
24
|
-
})[] | ("max" | {
|
|
25
|
-
value: import("react-hook-form/dist/types/validator").ValidationValue;
|
|
26
|
-
message: import("react").ReactNode;
|
|
27
|
-
})[] | ("min" | {
|
|
28
|
-
value: import("react-hook-form/dist/types/validator").ValidationValue;
|
|
29
|
-
message: import("react").ReactNode;
|
|
30
|
-
})[] | ("maxLength" | {
|
|
31
|
-
value: import("react-hook-form/dist/types/validator").ValidationValue;
|
|
32
|
-
message: import("react").ReactNode;
|
|
33
|
-
})[] | ("minLength" | {
|
|
34
|
-
value: import("react-hook-form/dist/types/validator").ValidationValue;
|
|
35
|
-
message: import("react").ReactNode;
|
|
36
|
-
})[] | ("pattern" | {
|
|
37
|
-
value: import("react-hook-form/dist/types/validator").ValidationValue;
|
|
38
|
-
message: import("react").ReactNode;
|
|
39
|
-
})[] | (string | {
|
|
40
|
-
value: RegExp;
|
|
41
|
-
message: string;
|
|
42
|
-
})[] | undefined;
|
|
29
|
+
export declare const getJRCErrors: (rule: AllowedTypes, validation: ValidationRule, intl: IntlShape) => getJRCErrorsReturnType | undefined;
|
|
30
|
+
export {};
|
|
@@ -9,8 +9,8 @@ export declare const FocusBackground: import("styled-components").StyledComponen
|
|
|
9
9
|
}, never>;
|
|
10
10
|
export declare const CheckboxLabel: import("styled-components").StyledComponent<"label", any, CheckboxLabelProps, never>;
|
|
11
11
|
export declare type CheckboxOrToggleProps = Omit<React.ComponentPropsWithoutRef<'input'>, 'type'> & {
|
|
12
|
-
checkboxMode
|
|
12
|
+
checkboxMode?: string;
|
|
13
13
|
};
|
|
14
14
|
export declare const CheckboxOrToggle: React.ForwardRefExoticComponent<Omit<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type"> & {
|
|
15
|
-
checkboxMode
|
|
15
|
+
checkboxMode?: string | undefined;
|
|
16
16
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -45,11 +45,11 @@ export interface JRCFormCheckboxProps extends React.ComponentPropsWithoutRef<'in
|
|
|
45
45
|
reduxFormValueType?: 'array' | 'boolean';
|
|
46
46
|
}
|
|
47
47
|
export declare type CheckboxLabelProps = {
|
|
48
|
-
direction
|
|
49
|
-
variant
|
|
48
|
+
direction?: string;
|
|
49
|
+
variant?: string;
|
|
50
50
|
checked: boolean;
|
|
51
|
-
disabled
|
|
52
|
-
labelPosition
|
|
53
|
-
backgroundOnHover
|
|
54
|
-
backgroundOnSelect
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
labelPosition?: string;
|
|
53
|
+
backgroundOnHover?: boolean;
|
|
54
|
+
backgroundOnSelect?: boolean;
|
|
55
55
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { JRCAppLeftColumnProps } from './JRCAppLeftColumn.types';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: <T extends import("./JRCAppLeftColumn.types").SectionEntry = import("./JRCAppLeftColumn.types").SectionEntry>({ Component, ...props }: JRCAppLeftColumnProps<T>) => JSX.Element;
|
|
4
|
+
component: <T extends import("./JRCAppLeftColumn.types").SectionEntry = import("./JRCAppLeftColumn.types").SectionEntry>({ Component, ...props }: import("./JRCAppLeftColumn.types").JRCAppLeftColumnProps<T>) => JSX.Element;
|
|
6
5
|
};
|
|
7
6
|
export default _default;
|
|
8
|
-
export declare const Simple: (
|
|
7
|
+
export declare const Simple: () => JSX.Element;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export interface ITheme {
|
|
2
2
|
config: ThemeType;
|
|
3
3
|
get: () => ThemeType;
|
|
4
|
-
initTheme: (options
|
|
4
|
+
initTheme: (options?: ThemeConfigOptions) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare type ThemeConfigOptions = {
|
|
7
|
-
fontFamily
|
|
7
|
+
fontFamily?: string;
|
|
8
8
|
linkColor: string;
|
|
9
9
|
buttonColor: string;
|
|
10
|
-
headerColor
|
|
10
|
+
headerColor?: string;
|
|
11
11
|
headerTextColor: string;
|
|
12
12
|
headerUserBackground: string;
|
|
13
13
|
headerUserTextColor: string;
|
|
14
14
|
headerSearchBarTextColor: string;
|
|
15
|
-
headerSearchBarBackgroundColor
|
|
15
|
+
headerSearchBarBackgroundColor?: string;
|
|
16
16
|
navBackground: string;
|
|
17
17
|
navTextColor: string;
|
|
18
18
|
bgColorNotLogged: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.91",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@types/redux-logger": "^3.0.8",
|
|
99
99
|
"chroma-js": "^2.1.1",
|
|
100
100
|
"classnames": "^2.3.1",
|
|
101
|
-
"jamespot-user-api": "^1.0.
|
|
101
|
+
"jamespot-user-api": "^1.0.61",
|
|
102
102
|
"moment": "^2.29.1",
|
|
103
103
|
"react": "^17.x",
|
|
104
104
|
"react-dnd": "^14.0.4",
|