jamespot-react-components 1.0.125 → 1.0.126
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/assets/group-background.daf782321c7f65cde0fc3d5918d27762.png +0 -0
- package/build/jamespot-react-components.js +284 -183
- package/build/jamespot-react-components.js.LICENSE.txt +30 -0
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/Common/JRCFormFieldRenderer.types.d.ts +2 -0
- package/build/src/components/Form/Input/JRCFormRichText/JRCFormRichTextField.d.ts +20 -3
- package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.d.ts +2 -1
- package/build/src/components/Form/Input/JRCInputFile/JRCInputFile.d.ts +25 -0
- package/build/src/components/Form/Input/JRCInputFile/JRCInputFile.stories.d.ts +5 -0
- package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.d.ts +28 -0
- package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.stories.d.ts +6 -0
- package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.styles.d.ts +16 -0
- package/build/src/components/Form/Input/JRCInputRange/JRCInputRange.d.ts +13 -0
- package/build/src/components/Form/Input/JRCInputRange/JRCInputRange.stories.d.ts +7 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.style.d.ts +1 -3
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.defaults.d.ts +9 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +2 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.types.d.ts +1 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.utils.d.ts +1 -1
- package/build/src/components/JRCAppLeftColumn/JRCAppLeftColumn.styles.d.ts +1 -3
- package/build/src/components/JRCButton/JRCButton.d.ts +9 -3
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +1 -0
- package/build/src/components/JRCCard/JRCCardImg.d.ts +7 -1
- package/build/src/components/JRCCropImage/JRCCropImage.d.ts +14 -0
- package/build/src/components/JRCCropImage/JRCCropImage.stories.d.ts +5 -0
- package/build/src/components/JRCFlex/JRCFlexBox.d.ts +2 -2
- package/build/src/components/JRCIconButton/JRCIconButton.d.ts +1 -3
- package/build/src/components/Stepper/JRCFadeStepper.d.ts +1 -1
- package/build/src/components/Stepper/JRCStepper.d.ts +6 -2
- package/build/src/components/Templates/JRCStepperPage.d.ts +3 -2
- package/build/src/index.d.ts +3 -0
- package/build/src/types.d.ts +3 -0
- package/package.json +3 -2
|
@@ -12,6 +12,7 @@ import { RegisterOptions } from 'react-hook-form/dist/types/validator';
|
|
|
12
12
|
* @member labelIsLegend,
|
|
13
13
|
* @member description, description, part of the html label
|
|
14
14
|
* @member helper, tooltip, part of the html label
|
|
15
|
+
* @member className,
|
|
15
16
|
*/
|
|
16
17
|
export interface FieldRenderProps extends DataCy {
|
|
17
18
|
label?: string;
|
|
@@ -20,6 +21,7 @@ export interface FieldRenderProps extends DataCy {
|
|
|
20
21
|
labelIsLegend?: boolean;
|
|
21
22
|
description?: string;
|
|
22
23
|
helper?: Omit<JRCTooltipProps, 'children'>;
|
|
24
|
+
className?: string;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* react-hook-form prop alias for the required *name* and *control* props
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Editor } from '@tiptap/react';
|
|
2
3
|
import { JRCWritableFormInputProps } from '../JRCFormFieldRender';
|
|
3
|
-
import {
|
|
4
|
+
import { EventHandler, EventOrValueHandler } from 'redux-form';
|
|
4
5
|
import { DataCy } from '../../../../types/dataAttributes';
|
|
5
6
|
/**
|
|
6
7
|
* This component is used with redux-form (studio) and with react-hook-form!!
|
|
@@ -8,11 +9,27 @@ import { DataCy } from '../../../../types/dataAttributes';
|
|
|
8
9
|
export declare const MenuBar: ({ editor }: {
|
|
9
10
|
editor: Editor | null;
|
|
10
11
|
}) => JSX.Element | null;
|
|
11
|
-
export declare type
|
|
12
|
+
export declare type RichTextValue = {
|
|
13
|
+
html: string;
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type FormRichTextFieldProps = {
|
|
17
|
+
name: string;
|
|
18
|
+
value: Partial<RichTextValue> | undefined;
|
|
19
|
+
onFocus: EventHandler<React.FocusEvent>;
|
|
20
|
+
onBlur: EventOrValueHandler<React.FocusEvent>;
|
|
21
|
+
onChange: (value: RichTextValue) => void;
|
|
22
|
+
} & DataCy;
|
|
12
23
|
/**
|
|
13
24
|
* This component is used with redux-form (studio) and with react-hook-form!!
|
|
14
25
|
*/
|
|
15
|
-
export declare const FormRichTextField:
|
|
26
|
+
export declare const FormRichTextField: React.ForwardRefExoticComponent<{
|
|
27
|
+
name: string;
|
|
28
|
+
value: Partial<RichTextValue> | undefined;
|
|
29
|
+
onFocus: EventHandler<React.FocusEvent>;
|
|
30
|
+
onBlur: EventOrValueHandler<React.FocusEvent>;
|
|
31
|
+
onChange: (value: RichTextValue) => void;
|
|
32
|
+
} & DataCy & React.RefAttributes<unknown>>;
|
|
16
33
|
/**
|
|
17
34
|
* Component used as a <input type="text"/>
|
|
18
35
|
* @param props JRCWritableFormInputProps
|
|
@@ -7,11 +7,12 @@ declare type CheckboxOption<TFieldValues> = {
|
|
|
7
7
|
label: string | JSX.Element;
|
|
8
8
|
value: string | number | TFieldValues;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
recommended?: boolean;
|
|
10
11
|
};
|
|
11
12
|
export declare type CheckboxProps<TFieldValues> = DataCy & {
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
checkboxMode?: 'checkbox' | 'toggle' | 'radio';
|
|
14
|
-
options: CheckboxOption<TFieldValues
|
|
15
|
+
options: Array<CheckboxOption<TFieldValues>>;
|
|
15
16
|
direction?: 'row' | 'column' | 'two-columns';
|
|
16
17
|
variant?: 'default' | 'outlined';
|
|
17
18
|
labelPosition?: 'before' | 'after';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
|
+
import { FieldValues } from 'react-hook-form/dist/types';
|
|
5
|
+
import { ApiWrapper, FileResponse } from 'jamespot-user-api';
|
|
6
|
+
export declare type NativeInputFileProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
|
|
7
|
+
token?: string | undefined;
|
|
8
|
+
onLoading?: (state: boolean) => void;
|
|
9
|
+
value: ApiWrapper<FileResponse, string[]>[];
|
|
10
|
+
onChange: (files: ApiWrapper<FileResponse, string[]>[]) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare type JRCInputFileProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & Omit<NativeInputFileProps, 'value' | 'onChange'>;
|
|
13
|
+
export declare const InputFile: React.ForwardRefExoticComponent<DataCy & Omit<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value"> & {
|
|
14
|
+
token?: string | undefined;
|
|
15
|
+
onLoading?: ((state: boolean) => void) | undefined;
|
|
16
|
+
value: ApiWrapper<FileResponse, string[]>[];
|
|
17
|
+
onChange: (files: ApiWrapper<FileResponse, string[]>[]) => void;
|
|
18
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
19
|
+
/**
|
|
20
|
+
* Component used as a <input type="file"/>
|
|
21
|
+
* @param props JRCInputFieldProps
|
|
22
|
+
* validation props: required
|
|
23
|
+
* @returns JSX.Element
|
|
24
|
+
*/
|
|
25
|
+
export declare function JRCInputFile<T extends FieldValues = FieldValues>(props: JRCInputFileProps<T>): JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JRCInputFileProps } from './JRCInputFile';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const InputFile: Story<JRCInputFileProps<import("react-hook-form").FieldValues>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
|
+
import { FieldValues } from 'react-hook-form/dist/types';
|
|
5
|
+
import { FileResponse } from 'jamespot-user-api';
|
|
6
|
+
export declare type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
|
|
7
|
+
token?: string | undefined;
|
|
8
|
+
onLoading?: (state: boolean) => void;
|
|
9
|
+
aspectRatio?: number | undefined;
|
|
10
|
+
defaultImages: {
|
|
11
|
+
imgs: Array<{
|
|
12
|
+
src: string;
|
|
13
|
+
alt: string;
|
|
14
|
+
}>;
|
|
15
|
+
position?: 'right' | 'bottom';
|
|
16
|
+
columnCount: number;
|
|
17
|
+
};
|
|
18
|
+
value: undefined | FileResponse;
|
|
19
|
+
onChange: (files: undefined | FileResponse) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare type JRCInputImageProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & Omit<NativeInputImageProps, 'value' | 'onChange'>;
|
|
22
|
+
/**
|
|
23
|
+
* Component used as a <input type="file"/>
|
|
24
|
+
* @param props JRCInputFieldProps
|
|
25
|
+
* validation props: required
|
|
26
|
+
* @returns JSX.Element
|
|
27
|
+
*/
|
|
28
|
+
export declare function JRCInputImage<T extends FieldValues = FieldValues>(props: JRCInputImageProps<T>): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { JRCInputImageProps } from './JRCInputImage';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const InputImageHorizontal: Story<JRCInputImageProps<import("react-hook-form").FieldValues>>;
|
|
6
|
+
export declare const InputImageVertical: Story<JRCInputImageProps<import("react-hook-form").FieldValues>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const Grid: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
position?: "right" | "bottom" | undefined;
|
|
3
|
+
columnCount: number;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const DropZone: import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
position?: "right" | "bottom" | undefined;
|
|
7
|
+
columnCount: number;
|
|
8
|
+
}, never>;
|
|
9
|
+
export declare const DropZoneButton: import("styled-components").StyledComponent<"button", any, {
|
|
10
|
+
aspectRatio?: number | undefined;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const DropZoneImage: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
13
|
+
export declare const ImageButton: import("styled-components").StyledComponent<"button", any, {
|
|
14
|
+
aspectRatio: number;
|
|
15
|
+
}, never>;
|
|
16
|
+
export declare const Img: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
|
+
import { FieldValues } from 'react-hook-form/dist/types';
|
|
5
|
+
export declare type JRCInputRangeProps = DataCy & React.ComponentPropsWithoutRef<'input'>;
|
|
6
|
+
export declare const InputRange: React.ForwardRefExoticComponent<DataCy & Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
/**
|
|
8
|
+
* Component used as a <input type="range"/>
|
|
9
|
+
* @param props JRCInputFieldProps
|
|
10
|
+
* validation props: required
|
|
11
|
+
* @returns JSX.Element
|
|
12
|
+
*/
|
|
13
|
+
export declare function JRCInputRange<T extends FieldValues = FieldValues>(props: JRCInputFieldProps<T>): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const InputRange: Story<JRCInputFieldProps<{
|
|
6
|
+
range: string;
|
|
7
|
+
}>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const IconBefore: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, }: import("components/JRCIcon/JRCIcon").JRCIconProps) => JSX.Element, any, {}, never>;
|
|
2
2
|
export declare const IconAfter: import("styled-components").StyledComponent<{
|
|
3
|
-
({ hasLicense, ...props }: Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement
|
|
3
|
+
({ hasLicense, ...props }: Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "onClick"> & import("../../../../types/dataAttributes").DataCy & {
|
|
4
4
|
icon: string;
|
|
5
5
|
size?: "small" | "medium" | undefined;
|
|
6
6
|
onClick?: ((event?: import("react").MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void) | undefined;
|
|
@@ -14,13 +14,11 @@ export declare const IconAfter: import("styled-components").StyledComponent<{
|
|
|
14
14
|
variant?: "circle" | "square" | undefined;
|
|
15
15
|
hasLicense?: boolean | undefined;
|
|
16
16
|
} & {
|
|
17
|
-
onClick: () => void;
|
|
18
17
|
type: string;
|
|
19
18
|
variant: string;
|
|
20
19
|
size: string;
|
|
21
20
|
}): JSX.Element;
|
|
22
21
|
defaultProps: {
|
|
23
|
-
onClick: () => void;
|
|
24
22
|
type: string;
|
|
25
23
|
variant: string;
|
|
26
24
|
size: string;
|
|
@@ -278,7 +278,8 @@ export declare const JRCDefaultSelectedOption: import("styled-components").Style
|
|
|
278
278
|
export declare const TimesIcon: import("styled-components").StyledComponent<"i", any, {
|
|
279
279
|
className: "react-icon icon-times";
|
|
280
280
|
}, "className">;
|
|
281
|
-
export declare const DropdownIndicator: ({ loading, open }: {
|
|
281
|
+
export declare const DropdownIndicator: ({ loading, open, onClick, }: {
|
|
282
282
|
loading: boolean;
|
|
283
283
|
open: boolean;
|
|
284
|
+
onClick: () => void;
|
|
284
285
|
}) => JSX.Element;
|
|
@@ -22,7 +22,7 @@ export declare function addItem<T>(arr: Array<T> | any, value: T): Array<T>;
|
|
|
22
22
|
* @param getGroup group accessor
|
|
23
23
|
* @param reorder whether the array should be ordered with the group
|
|
24
24
|
*/
|
|
25
|
-
export declare function group<T>(arr: Array<T
|
|
25
|
+
export declare function group<T>(arr: Readonly<Array<T>>, getGroup: (v: T) => string, reorder?: boolean): {
|
|
26
26
|
label: string;
|
|
27
27
|
options: (T & {
|
|
28
28
|
_index: number;
|
|
@@ -21,7 +21,7 @@ export declare const MenuWrapper: import("styled-components").StyledComponent<"d
|
|
|
21
21
|
export declare const ItemsIcon: import("styled-components").StyledComponent<"button", any, import("../JRCTabs/JRCTabs").ItemProps, never>;
|
|
22
22
|
export declare const TitleMenu: import("styled-components").StyledComponent<"h2", any, Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof import("react").HTMLAttributes<HTMLHeadingElement>>, never>;
|
|
23
23
|
export declare const JRCIconButtonAppLeftColumn: import("styled-components").StyledComponent<{
|
|
24
|
-
({ hasLicense, ...props }: Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement
|
|
24
|
+
({ hasLicense, ...props }: Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "onClick"> & import("../../types/dataAttributes").DataCy & {
|
|
25
25
|
icon: string;
|
|
26
26
|
size?: "small" | "medium" | undefined;
|
|
27
27
|
onClick?: ((event?: import("react").MouseEvent<HTMLButtonElement, MouseEvent> | undefined) => void) | undefined;
|
|
@@ -35,13 +35,11 @@ export declare const JRCIconButtonAppLeftColumn: import("styled-components").Sty
|
|
|
35
35
|
variant?: "circle" | "square" | undefined;
|
|
36
36
|
hasLicense?: boolean | undefined;
|
|
37
37
|
} & {
|
|
38
|
-
onClick: () => void;
|
|
39
38
|
type: string;
|
|
40
39
|
variant: string;
|
|
41
40
|
size: string;
|
|
42
41
|
}): JSX.Element;
|
|
43
42
|
defaultProps: {
|
|
44
|
-
onClick: () => void;
|
|
45
43
|
type: string;
|
|
46
44
|
variant: string;
|
|
47
45
|
size: string;
|
|
@@ -19,7 +19,7 @@ export declare type JRCButtonProps = React.ComponentPropsWithoutRef<'button'> &
|
|
|
19
19
|
iconRight?: boolean;
|
|
20
20
|
/** The variant is used to define what type of action the button will take */
|
|
21
21
|
variant?: 'contained' | 'outlined' | 'link';
|
|
22
|
-
/** CSS float attribute */
|
|
22
|
+
/** @deprecated CSS float attribute */
|
|
23
23
|
float?: 'left' | 'right';
|
|
24
24
|
/** CSS min-width attribute */
|
|
25
25
|
minWidth?: string;
|
|
@@ -27,6 +27,8 @@ export declare type JRCButtonProps = React.ComponentPropsWithoutRef<'button'> &
|
|
|
27
27
|
hasLicense?: boolean;
|
|
28
28
|
/** tooltip tooltip props */
|
|
29
29
|
tooltip?: Omit<JRCTooltipProps, 'children'>;
|
|
30
|
+
/** label, optional, replaces children */
|
|
31
|
+
label?: string;
|
|
30
32
|
};
|
|
31
33
|
export declare const transformColor: (color?: string | undefined) => JRCIconProps['color'];
|
|
32
34
|
/**
|
|
@@ -50,7 +52,7 @@ export declare const Button: import("styled-components").StyledComponent<"button
|
|
|
50
52
|
iconRight?: boolean | undefined;
|
|
51
53
|
/** The variant is used to define what type of action the button will take */
|
|
52
54
|
variant?: "link" | "contained" | "outlined" | undefined;
|
|
53
|
-
/** CSS float attribute */
|
|
55
|
+
/** @deprecated CSS float attribute */
|
|
54
56
|
float?: "left" | "right" | undefined;
|
|
55
57
|
/** CSS min-width attribute */
|
|
56
58
|
minWidth?: string | undefined;
|
|
@@ -58,6 +60,8 @@ export declare const Button: import("styled-components").StyledComponent<"button
|
|
|
58
60
|
hasLicense?: boolean | undefined;
|
|
59
61
|
/** tooltip tooltip props */
|
|
60
62
|
tooltip?: Omit<JRCTooltipProps, "children"> | undefined;
|
|
63
|
+
/** label, optional, replaces children */
|
|
64
|
+
label?: string | undefined;
|
|
61
65
|
} & DashedFocusBorderProps, never>;
|
|
62
66
|
export declare const JRCButton: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & DataCy & {
|
|
63
67
|
/** Color of the background of the button */
|
|
@@ -74,7 +78,7 @@ export declare const JRCButton: React.ForwardRefExoticComponent<Pick<React.Detai
|
|
|
74
78
|
iconRight?: boolean | undefined;
|
|
75
79
|
/** The variant is used to define what type of action the button will take */
|
|
76
80
|
variant?: "link" | "contained" | "outlined" | undefined;
|
|
77
|
-
/** CSS float attribute */
|
|
81
|
+
/** @deprecated CSS float attribute */
|
|
78
82
|
float?: "left" | "right" | undefined;
|
|
79
83
|
/** CSS min-width attribute */
|
|
80
84
|
minWidth?: string | undefined;
|
|
@@ -82,4 +86,6 @@ export declare const JRCButton: React.ForwardRefExoticComponent<Pick<React.Detai
|
|
|
82
86
|
hasLicense?: boolean | undefined;
|
|
83
87
|
/** tooltip tooltip props */
|
|
84
88
|
tooltip?: Omit<JRCTooltipProps, "children"> | undefined;
|
|
89
|
+
/** label, optional, replaces children */
|
|
90
|
+
label?: string | undefined;
|
|
85
91
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -12,6 +12,7 @@ export declare const MarginLessJRCButton: import("styled-components").StyledComp
|
|
|
12
12
|
minWidth?: string | undefined;
|
|
13
13
|
hasLicense?: boolean | undefined;
|
|
14
14
|
tooltip?: Omit<import("../..").JRCTooltipProps, "children"> | undefined;
|
|
15
|
+
label?: string | undefined;
|
|
15
16
|
} & React.RefAttributes<HTMLButtonElement>>, any, ButtonProps, never>;
|
|
16
17
|
export declare const MenuWithoutTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
18
|
export declare const MenuWithTitle: ({ direction, label, themeButton, children }: MenuWithTitleProps) => JSX.Element;
|
|
@@ -9,7 +9,10 @@ declare const ASPECTS: {
|
|
|
9
9
|
'4:5': number;
|
|
10
10
|
'9:16': number;
|
|
11
11
|
};
|
|
12
|
-
export declare type ActionsPosition =
|
|
12
|
+
export declare type ActionsPosition = {
|
|
13
|
+
x?: 'left' | 'right';
|
|
14
|
+
y?: 'top' | 'bottom';
|
|
15
|
+
};
|
|
13
16
|
export declare type JRCCardImgProps = {
|
|
14
17
|
color?: string;
|
|
15
18
|
img?: string;
|
|
@@ -24,5 +27,8 @@ export declare type JRCCardImgProps = {
|
|
|
24
27
|
position?: ActionsPosition;
|
|
25
28
|
};
|
|
26
29
|
};
|
|
30
|
+
export declare const Actions: import("styled-components").StyledComponent<"div", any, {
|
|
31
|
+
position?: ActionsPosition | undefined;
|
|
32
|
+
}, never>;
|
|
27
33
|
export declare const JRCCardImg: (props: JRCCardImgProps) => JSX.Element;
|
|
28
34
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Area as _Area, Point as _Point, Size as _Size } from 'react-easy-crop/types';
|
|
3
|
+
import { JRCModalProps } from '../JRCModal/JRCModal';
|
|
4
|
+
export declare type Size = _Size;
|
|
5
|
+
export declare type Point = _Point;
|
|
6
|
+
export declare type Area = _Area;
|
|
7
|
+
export declare type JRCCropImageProps = Pick<JRCModalProps, 'open' | 'closeHandler'> & {
|
|
8
|
+
aspectRatio?: number | undefined;
|
|
9
|
+
src?: string | undefined;
|
|
10
|
+
save: (cropConfig: Area & {
|
|
11
|
+
rotation: number;
|
|
12
|
+
}) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function JRCCropImage(props: JRCCropImageProps): JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { FastCssProps } from '../Common/FastCss';
|
|
|
2
2
|
declare type FlexBoxProps = Omit<FastCssProps, 'display'> & {
|
|
3
3
|
direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
4
4
|
inline?: boolean;
|
|
5
|
-
flex?: boolean;
|
|
5
|
+
flex?: boolean | string;
|
|
6
6
|
gap?: number;
|
|
7
7
|
x?: 'flex-start' | 'center' | 'flex-end';
|
|
8
8
|
y?: 'flex-start' | 'center' | 'flex-end';
|
|
@@ -11,7 +11,7 @@ declare type FlexBoxProps = Omit<FastCssProps, 'display'> & {
|
|
|
11
11
|
export declare const JRCFlexBox: import("styled-components").StyledComponent<"div", any, Omit<FastCssProps, "display"> & {
|
|
12
12
|
direction?: "row" | "column" | "column-reverse" | "row-reverse" | undefined;
|
|
13
13
|
inline?: boolean | undefined;
|
|
14
|
-
flex?: boolean | undefined;
|
|
14
|
+
flex?: string | boolean | undefined;
|
|
15
15
|
gap?: number | undefined;
|
|
16
16
|
x?: "center" | "flex-end" | "flex-start" | undefined;
|
|
17
17
|
y?: "center" | "flex-end" | "flex-start" | undefined;
|
|
@@ -16,7 +16,7 @@ import { DataCy } from '../../types/dataAttributes';
|
|
|
16
16
|
* @member variant can be 'circle' | 'square';
|
|
17
17
|
* @member hasLicense If false, the button will be disabled with a license tooltip. Default to true
|
|
18
18
|
*/
|
|
19
|
-
export declare type JRCIconButtonProps = React.ComponentPropsWithoutRef<'button'> & DataCy & {
|
|
19
|
+
export declare type JRCIconButtonProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'onClick'> & DataCy & {
|
|
20
20
|
icon: string;
|
|
21
21
|
size?: 'small' | 'medium';
|
|
22
22
|
onClick?: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -31,7 +31,6 @@ export declare type JRCIconButtonProps = React.ComponentPropsWithoutRef<'button'
|
|
|
31
31
|
hasLicense?: boolean;
|
|
32
32
|
};
|
|
33
33
|
declare const defaultProps: {
|
|
34
|
-
onClick: () => void;
|
|
35
34
|
type: string;
|
|
36
35
|
variant: string;
|
|
37
36
|
size: string;
|
|
@@ -39,7 +38,6 @@ declare const defaultProps: {
|
|
|
39
38
|
declare const JRCIconButton: {
|
|
40
39
|
({ hasLicense, ...props }: JRCIconButtonProps & typeof defaultProps): JSX.Element;
|
|
41
40
|
defaultProps: {
|
|
42
|
-
onClick: () => void;
|
|
43
41
|
type: string;
|
|
44
42
|
variant: string;
|
|
45
43
|
size: string;
|
|
@@ -5,6 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare type JRCFadeStepperProps = {
|
|
7
7
|
activeStep: number;
|
|
8
|
-
children: Iterable<React.ReactNode>;
|
|
8
|
+
children: React.ReactNode | Iterable<React.ReactNode>;
|
|
9
9
|
};
|
|
10
10
|
export declare function JRCFadeStepper(props: JRCFadeStepperProps): JSX.Element | null;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare type Step = {
|
|
3
|
+
label: string | React.ReactNode;
|
|
4
|
+
onClick?: (step: number) => void;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* @member steps array of steps
|
|
4
8
|
* @member activeStep active step of the stepper. Starts at 0.
|
|
5
9
|
*/
|
|
6
10
|
export declare type JRCStepperProps = {
|
|
7
|
-
steps
|
|
11
|
+
steps?: Array<Step>;
|
|
8
12
|
activeStep: number;
|
|
9
13
|
};
|
|
10
14
|
export declare function JRCStepper(props: JRCStepperProps): JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Step } from 'components/Stepper/JRCStepper';
|
|
2
3
|
export declare type JRCStepperPageProps = {
|
|
3
|
-
children: Iterable<React.ReactNode>;
|
|
4
|
+
children: React.ReactNode | Iterable<React.ReactNode>;
|
|
4
5
|
activeStep: number;
|
|
5
6
|
imgSrc: string;
|
|
6
7
|
headerContent: React.ReactNode;
|
|
7
|
-
steps
|
|
8
|
+
steps?: Array<Step>;
|
|
8
9
|
loadingContent?: React.ReactNode | string;
|
|
9
10
|
isLoading?: boolean;
|
|
10
11
|
};
|
package/build/src/index.d.ts
CHANGED
|
@@ -85,6 +85,8 @@ export { JRCInputCheckbox } from './components/Form/Input/JRCInputCheckbox/JRCIn
|
|
|
85
85
|
export { JRCInputCommunity } from './components/Form/Input/JRCSelect/JRCAutocompleteCommunity';
|
|
86
86
|
export { JRCInputDate } from './components/Form/Input/JRCInputDate/JRCInputDate';
|
|
87
87
|
export { JRCInputEmail } from './components/Form/Input/JRCFormEmail/JRCInputEmail';
|
|
88
|
+
export { JRCInputFile } from './components/Form/Input/JRCInputFile/JRCInputFile';
|
|
89
|
+
export { JRCInputImage } from './components/Form/Input/JRCInputImage/JRCInputImage';
|
|
88
90
|
export { JRCInputRichText } from './components/Form/Input/JRCInputRichText/JRCInputRichText';
|
|
89
91
|
export { JRCInputSelect } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
90
92
|
export { JRCInputText } from './components/Form/Input/JRCInputText/JRCInputText';
|
|
@@ -112,6 +114,7 @@ export { JRCThemeProvider } from './components/JRCThemeProvider/JRCThemeProvider
|
|
|
112
114
|
export { JRCTooltip } from './components/JRCTooltip/JRCTooltip';
|
|
113
115
|
export { JRCTypography } from './components/JRCTypography/JRCTypography';
|
|
114
116
|
export { JRCValidationButton } from './components/JRCButton/JRCValidationButton';
|
|
117
|
+
export { LabelDescriptionOption } from './components/Form/Input/JRCSelect/JRCInputSelect.defaults';
|
|
115
118
|
export { StyledInput } from './components/Form/Input/JRCStyledInput';
|
|
116
119
|
export { useDebounce } from './hooks/UseDebounce';
|
|
117
120
|
export { useDidMountEffect } from './hooks/UseDidMountEffect';
|
package/build/src/types.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { JRCFormInputFileProps, JRCFormInputFileFieldProps } from './components/
|
|
|
32
32
|
export { JRCFormInputImageProps, JRCFormInputImageFieldProps } from './components/Form/Input/JRCFormImage/JRCFormImage';
|
|
33
33
|
export { JRCFormRangeProps } from './components/Form/Input/JRCFormRange/JRCFormRange';
|
|
34
34
|
export { JRCFormReceiveACopyInputProps } from './components/Form/Input/JRCFormReceiveACopy/JRCFormReceiveACopy';
|
|
35
|
+
export { RichTextValue, FormRichTextFieldProps } from './components/Form/Input/JRCFormRichText/JRCFormRichTextField';
|
|
35
36
|
export { JRCFormSelectProps } from './components/Form/Input/JRCFormSelect/JRCFormSelect';
|
|
36
37
|
export { JRCFormSendAlertInputProps } from './components/Form/Input/JRCFormSendAlert/JRCFormSendAlert';
|
|
37
38
|
export { JRCGridProps } from './components/JRCGrid/JRCGrid';
|
|
@@ -43,6 +44,8 @@ export { JRCImageStepper } from './components/Stepper/JRCImageStepper';
|
|
|
43
44
|
export { JRCImgProps } from './components/JRCImg/JRCImg';
|
|
44
45
|
export { JRCInputCheckboxProps, InputCheckboxProps, CheckboxValue, CheckboxOption, InnerProps, } from './components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.types';
|
|
45
46
|
export { JRCInputDateProps } from './components/Form/Input/JRCInputDate/JRCInputDate';
|
|
47
|
+
export { JRCInputFileProps } from './components/Form/Input/JRCInputFile/JRCInputFile';
|
|
48
|
+
export { JRCInputImageProps } from './components/Form/Input/JRCInputImage/JRCInputImage';
|
|
46
49
|
export { JRCInputFieldProps } from './components/Form/Input/Common/JRCFormFieldRenderer.types';
|
|
47
50
|
export { JRCInputSelectProps } from './components/Form/Input/JRCSelect/JRCInputSelect.types';
|
|
48
51
|
export { JRCInputTextareaProps } from './components/Form/Input/JRCInputTextarea/JRCInputTextarea';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.126",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -98,12 +98,13 @@
|
|
|
98
98
|
"@tiptap/starter-kit": "^2.0.0-beta.203",
|
|
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.98",
|
|
102
102
|
"moment": "^2.29.1",
|
|
103
103
|
"react": "^17.x",
|
|
104
104
|
"react-dnd": "^14.0.4",
|
|
105
105
|
"react-dnd-html5-backend": "^14.0.2",
|
|
106
106
|
"react-dom": "^17.0.2",
|
|
107
|
+
"react-easy-crop": "^4.6.3",
|
|
107
108
|
"react-hook-form": "^7.25.0",
|
|
108
109
|
"react-intl": "^5.8.6",
|
|
109
110
|
"react-redux": "^7.2.9",
|