@taikai/rocket-kit 3.0.2 → 3.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.
- package/dist/atoms/avatar-image/index.d.ts +2 -2
- package/dist/atoms/button/index.d.ts +1 -1
- package/dist/atoms/button-dropdown/index.d.ts +2 -2
- package/dist/atoms/button-link/index.d.ts +1 -1
- package/dist/atoms/checkbox/index.d.ts +1 -1
- package/dist/atoms/checkbox-button/index.d.ts +1 -1
- package/dist/atoms/error-field/index.d.ts +2 -2
- package/dist/atoms/file-picker/index.d.ts +1 -1
- package/dist/atoms/icon/index.d.ts +2 -2
- package/dist/atoms/label/index.d.ts +1 -1
- package/dist/atoms/progress-bar/index.d.ts +1 -2
- package/dist/atoms/select/index.d.ts +1 -1
- package/dist/atoms/select-interactive/components/index.d.ts +3 -4
- package/dist/atoms/select-interactive/index.d.ts +1 -2
- package/dist/atoms/slideshow/index.d.ts +1 -2
- package/dist/atoms/spinner/index.d.ts +2 -2
- package/dist/atoms/tag/index.d.ts +2 -2
- package/dist/atoms/tag-number/index.d.ts +2 -2
- package/dist/atoms/text-area/index.d.ts +1 -1
- package/dist/atoms/text-field/index.d.ts +1 -1
- package/dist/atoms/text-field-appendix/index.d.ts +1 -1
- package/dist/atoms/toggle/index.d.ts +1 -2
- package/dist/atoms/truncate-line/index.d.ts +2 -2
- package/dist/atoms/video-player/index.d.ts +1 -2
- package/dist/ions/icon-empty-data.d.ts +1 -2
- package/dist/ions/icon-login-only.d.ts +1 -2
- package/dist/molecules/actions-menu/index.d.ts +2 -3
- package/dist/molecules/card-value/index.d.ts +1 -1
- package/dist/molecules/checkbox-group/index.d.ts +1 -1
- package/dist/molecules/data-warning/index.d.ts +1 -1
- package/dist/molecules/empty-table/index.d.ts +1 -2
- package/dist/molecules/error/index.d.ts +1 -2
- package/dist/molecules/field-with-button/index.d.ts +4 -3
- package/dist/molecules/form-group/index.d.ts +1 -1
- package/dist/molecules/modal-footer/index.d.ts +1 -1
- package/dist/molecules/note-card/index.d.ts +1 -1
- package/dist/molecules/number-input-spinner/index.d.ts +1 -2
- package/dist/molecules/pagination-control/index.d.ts +1 -1
- package/dist/molecules/radio-group/index.d.ts +1 -1
- package/dist/molecules/table/index.d.ts +1 -1
- package/dist/molecules/table-dnd/index.d.ts +1 -1
- package/dist/molecules/wizard-steps/index.d.ts +2 -2
- package/dist/organisms/grid-container/grid-col.d.ts +1 -1
- package/dist/organisms/grid-container/grid-row.d.ts +1 -2
- package/dist/organisms/grid-container/index.d.ts +1 -1
- package/dist/organisms/horizontal-nav/index.d.ts +1 -2
- package/dist/organisms/loading-state/index.d.ts +1 -2
- package/dist/organisms/modal/index.d.ts +1 -1
- package/dist/organisms/modal-drawer/index.d.ts +1 -1
- package/dist/organisms/tabs-panel/index.d.ts +1 -1
- package/dist/rocket-kit.cjs.development.js +32 -5
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +6 -6
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +32 -5
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
export interface AvatarProps {
|
|
3
3
|
style?: CSSProperties;
|
|
4
4
|
className?: string;
|
|
@@ -9,5 +9,5 @@ export interface AvatarProps {
|
|
|
9
9
|
boringType?: 'marble' | 'beam' | 'pixel' | 'sunset' | 'ring' | 'bauhaus';
|
|
10
10
|
square?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const AvatarImage: (props: AvatarProps) =>
|
|
12
|
+
declare const AvatarImage: (props: AvatarProps) => JSX.Element;
|
|
13
13
|
export default AvatarImage;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { ButtonColor, ButtonVariant } from '../button/types';
|
|
3
3
|
import { ActionMenu } from './types';
|
|
4
4
|
export interface ActionsMenuInterface<T> {
|
|
@@ -19,5 +19,5 @@ export interface ActionsMenuInterface<T> {
|
|
|
19
19
|
startsOpen?: boolean;
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare const ButtonDropdown: <T>(props: ActionsMenuInterface<T>) =>
|
|
22
|
+
declare const ButtonDropdown: <T>(props: ActionsMenuInterface<T>) => JSX.Element;
|
|
23
23
|
export default ButtonDropdown;
|
|
@@ -11,5 +11,5 @@ interface Props {
|
|
|
11
11
|
dataTestId?: string;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare const Checkbox: ({ label, value, checked, onChange, error, disabled, className, style, dataTestId, required, }: Props) =>
|
|
14
|
+
declare const Checkbox: ({ label, value, checked, onChange, error, disabled, className, style, dataTestId, required, }: Props) => JSX.Element;
|
|
15
15
|
export default Checkbox;
|
|
@@ -10,5 +10,5 @@ export interface CheckboxButtonProps {
|
|
|
10
10
|
dataTestId?: string;
|
|
11
11
|
required?: boolean;
|
|
12
12
|
}
|
|
13
|
-
declare const CheckboxButton: (props: CheckboxButtonProps) =>
|
|
13
|
+
declare const CheckboxButton: (props: CheckboxButtonProps) => JSX.Element;
|
|
14
14
|
export default CheckboxButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { ErrorFieldColor } from './types';
|
|
3
3
|
interface ErrorFieldProps {
|
|
4
4
|
color?: ErrorFieldColor;
|
|
@@ -6,5 +6,5 @@ interface ErrorFieldProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
}
|
|
9
|
-
declare const ErrorField: (props: ErrorFieldProps) =>
|
|
9
|
+
declare const ErrorField: (props: ErrorFieldProps) => JSX.Element;
|
|
10
10
|
export default ErrorField;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
export interface IconProps {
|
|
3
3
|
fill?: string;
|
|
4
4
|
icon: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
}
|
|
8
|
-
declare const Icon: (props: IconProps) =>
|
|
8
|
+
declare const Icon: (props: IconProps) => JSX.Element;
|
|
9
9
|
export default Icon;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface ProgressBarProps {
|
|
3
2
|
progress: number;
|
|
4
3
|
value?: string;
|
|
5
4
|
}
|
|
6
|
-
declare const ProgressBar: (props: ProgressBarProps) =>
|
|
5
|
+
declare const ProgressBar: (props: ProgressBarProps) => JSX.Element;
|
|
7
6
|
export default ProgressBar;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TCustomOptions, TSelectInteractiveOption } from '../types';
|
|
3
2
|
export interface GroupBase {
|
|
4
3
|
options: readonly TSelectInteractiveOption[];
|
|
5
4
|
label?: string;
|
|
6
5
|
}
|
|
7
|
-
export declare const FormatGroupLabel: (props: GroupBase) =>
|
|
8
|
-
export declare const CustomSelectOption: (props: TCustomOptions, commonProps: any) =>
|
|
9
|
-
export declare const CustomSelectValue: (props: TCustomOptions) =>
|
|
6
|
+
export declare const FormatGroupLabel: (props: GroupBase) => JSX.Element;
|
|
7
|
+
export declare const CustomSelectOption: (props: TCustomOptions, commonProps: any) => JSX.Element;
|
|
8
|
+
export declare const CustomSelectValue: (props: TCustomOptions) => JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { SelectInteractiveProps, TSelectInteractiveOption } from './types';
|
|
3
|
-
declare const SelectInteractive: ({ name, multi, search, placeholder, options, value, clear, error, disabled, formatGroupLabel, onChange, onInputChange, ...rest }: SelectInteractiveProps<TSelectInteractiveOption>) =>
|
|
2
|
+
declare const SelectInteractive: ({ name, multi, search, placeholder, options, value, clear, error, disabled, formatGroupLabel, onChange, onInputChange, ...rest }: SelectInteractiveProps<TSelectInteractiveOption>) => JSX.Element;
|
|
4
3
|
export default SelectInteractive;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface SlideshowProps {
|
|
3
2
|
showArrows?: boolean;
|
|
4
3
|
slidesNumber: number;
|
|
@@ -9,5 +8,5 @@ export interface SlideshowProps {
|
|
|
9
8
|
slideSelected?: number;
|
|
10
9
|
children: any;
|
|
11
10
|
}
|
|
12
|
-
declare const Slideshow: (props: SlideshowProps) =>
|
|
11
|
+
declare const Slideshow: (props: SlideshowProps) => JSX.Element;
|
|
13
12
|
export default Slideshow;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
interface SpinnerProps {
|
|
3
3
|
fill?: string;
|
|
4
4
|
size?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: CSSProperties;
|
|
7
7
|
}
|
|
8
|
-
declare const Spinner: (props: SpinnerProps) =>
|
|
8
|
+
declare const Spinner: (props: SpinnerProps) => JSX.Element;
|
|
9
9
|
export default Spinner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { TagVariant, TagColor } from './types';
|
|
3
3
|
export interface TagProps {
|
|
4
4
|
variant?: TagVariant;
|
|
@@ -8,5 +8,5 @@ export interface TagProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
style?: CSSProperties;
|
|
10
10
|
}
|
|
11
|
-
declare const Tag: (props: TagProps) =>
|
|
11
|
+
declare const Tag: (props: TagProps) => JSX.Element;
|
|
12
12
|
export default Tag;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { TagColor } from '../tag/types';
|
|
3
3
|
export interface TagNumberProps {
|
|
4
4
|
className?: string;
|
|
@@ -8,5 +8,5 @@ export interface TagNumberProps {
|
|
|
8
8
|
label: string;
|
|
9
9
|
value: number | string;
|
|
10
10
|
}
|
|
11
|
-
declare const TagNumber: (props: TagNumberProps) =>
|
|
11
|
+
declare const TagNumber: (props: TagNumberProps) => JSX.Element;
|
|
12
12
|
export default TagNumber;
|
|
@@ -18,5 +18,5 @@ export interface TextFieldAppendixProps {
|
|
|
18
18
|
pattern?: string;
|
|
19
19
|
required?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const TextFieldAppendix: (props: TextFieldAppendixProps) =>
|
|
21
|
+
declare const TextFieldAppendix: (props: TextFieldAppendixProps) => JSX.Element;
|
|
22
22
|
export default TextFieldAppendix;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ToggleProps } from './types';
|
|
3
|
-
declare const Toggle: ({ ariaLabelOn, ariaLabelOff, labelLeft, labelRight, checked, disabled, isLabelVisible, onClick, ...rest }: ToggleProps) =>
|
|
2
|
+
declare const Toggle: ({ ariaLabelOn, ariaLabelOff, labelLeft, labelRight, checked, disabled, isLabelVisible, onClick, ...rest }: ToggleProps) => JSX.Element;
|
|
4
3
|
export default Toggle;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
export interface TruncateLineProps {
|
|
3
3
|
value: string;
|
|
4
4
|
className?: string;
|
|
5
5
|
style?: CSSProperties;
|
|
6
6
|
dataTestId?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const TruncateLine: (props: TruncateLineProps) =>
|
|
8
|
+
declare const TruncateLine: (props: TruncateLineProps) => JSX.Element;
|
|
9
9
|
export default TruncateLine;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface VideoPlayerProps {
|
|
3
2
|
video: any;
|
|
4
3
|
playing?: boolean;
|
|
@@ -10,5 +9,5 @@ export interface VideoPlayerProps {
|
|
|
10
9
|
onReady?: any;
|
|
11
10
|
onError?: any;
|
|
12
11
|
}
|
|
13
|
-
declare const VideoPlayer: (props: VideoPlayerProps) =>
|
|
12
|
+
declare const VideoPlayer: (props: VideoPlayerProps) => JSX.Element;
|
|
14
13
|
export default VideoPlayer;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ActionMenu } from './types';
|
|
3
2
|
interface ActionsMenuListInterface<T> {
|
|
4
3
|
actions: ActionMenu<T>[];
|
|
@@ -14,6 +13,6 @@ interface ActionsMenuInterface<T> {
|
|
|
14
13
|
dataTestId?: string;
|
|
15
14
|
startsOpen?: boolean;
|
|
16
15
|
}
|
|
17
|
-
export declare const ActionMenuList: <T>(props: ActionsMenuListInterface<T>) =>
|
|
18
|
-
declare const ActionsMenu: <T>(props: ActionsMenuInterface<T>) =>
|
|
16
|
+
export declare const ActionMenuList: <T>(props: ActionsMenuListInterface<T>) => JSX.Element;
|
|
17
|
+
declare const ActionsMenu: <T>(props: ActionsMenuInterface<T>) => JSX.Element;
|
|
19
18
|
export default ActionsMenu;
|
|
@@ -19,5 +19,5 @@ export interface CheckboxGroupProps {
|
|
|
19
19
|
onChange?: () => {};
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
}
|
|
22
|
-
declare const CheckboxGroup: (props: CheckboxGroupProps) =>
|
|
22
|
+
declare const CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element;
|
|
23
23
|
export default CheckboxGroup;
|
|
@@ -3,5 +3,5 @@ export interface DataWarningProps {
|
|
|
3
3
|
type?: 'login' | 'data';
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare const DataWarning: (props: DataWarningProps) =>
|
|
6
|
+
declare const DataWarning: (props: DataWarningProps) => JSX.Element;
|
|
7
7
|
export default DataWarning;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface EmptyTableProps {
|
|
3
2
|
border?: boolean;
|
|
4
3
|
value: string;
|
|
5
4
|
tableHead: string[];
|
|
6
5
|
}
|
|
7
|
-
declare const EmptyTable: (props: EmptyTableProps) =>
|
|
6
|
+
declare const EmptyTable: (props: EmptyTableProps) => JSX.Element;
|
|
8
7
|
export default EmptyTable;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextFieldType } from '../../atoms/text-field/types';
|
|
3
2
|
export interface FieldWidthButtonProps {
|
|
4
3
|
label?: string;
|
|
@@ -6,11 +5,13 @@ export interface FieldWidthButtonProps {
|
|
|
6
5
|
name?: string;
|
|
7
6
|
placeholder?: string;
|
|
8
7
|
value?: string | number;
|
|
8
|
+
disabled?: boolean;
|
|
9
9
|
dataTestId?: string;
|
|
10
10
|
buttonIcon: string;
|
|
11
11
|
buttonValue?: string;
|
|
12
|
-
|
|
12
|
+
onChange?: (value: string | number | null) => void;
|
|
13
|
+
buttonAction?: (value: string | number | null) => void | Promise<void>;
|
|
13
14
|
buttonDisabled?: boolean;
|
|
14
15
|
}
|
|
15
|
-
declare const FieldWidthButton: (props: FieldWidthButtonProps) =>
|
|
16
|
+
declare const FieldWidthButton: (props: FieldWidthButtonProps) => JSX.Element;
|
|
16
17
|
export default FieldWidthButton;
|
|
@@ -7,5 +7,5 @@ export interface ModalFooterProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
}
|
|
10
|
-
declare const ModalFooter: (props: ModalFooterProps) =>
|
|
10
|
+
declare const ModalFooter: (props: ModalFooterProps) => JSX.Element;
|
|
11
11
|
export default ModalFooter;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface NumberInputSpinnerProps {
|
|
3
2
|
decreaseAriaLabel?: string;
|
|
4
3
|
increaseAriaLabel?: string;
|
|
@@ -9,5 +8,5 @@ export interface NumberInputSpinnerProps {
|
|
|
9
8
|
onChange?: (value: number) => void;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
}
|
|
12
|
-
declare const NumberInputSpinner: (props: NumberInputSpinnerProps) =>
|
|
11
|
+
declare const NumberInputSpinner: (props: NumberInputSpinnerProps) => JSX.Element;
|
|
13
12
|
export default NumberInputSpinner;
|
|
@@ -7,5 +7,5 @@ export interface PageControlProps {
|
|
|
7
7
|
onPageChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
8
|
ariaLabelBuilder?: any;
|
|
9
9
|
}
|
|
10
|
-
declare const PaginationControl: (props: PageControlProps) =>
|
|
10
|
+
declare const PaginationControl: (props: PageControlProps) => JSX.Element;
|
|
11
11
|
export default PaginationControl;
|
|
@@ -31,5 +31,5 @@ export interface TableProps<CellDataType> {
|
|
|
31
31
|
export interface CellBaseType {
|
|
32
32
|
id: string;
|
|
33
33
|
}
|
|
34
|
-
declare const Table: <CellData extends CellBaseType>(props: TableProps<CellData>) =>
|
|
34
|
+
declare const Table: <CellData extends CellBaseType>(props: TableProps<CellData>) => JSX.Element;
|
|
35
35
|
export default Table;
|
|
@@ -29,5 +29,5 @@ export interface TableProps<CellDataType> {
|
|
|
29
29
|
export interface CellBaseType {
|
|
30
30
|
id: string;
|
|
31
31
|
}
|
|
32
|
-
declare const TableDnD: <CellData extends CellBaseType>(props: TableProps<CellData>) =>
|
|
32
|
+
declare const TableDnD: <CellData extends CellBaseType>(props: TableProps<CellData>) => JSX.Element;
|
|
33
33
|
export default TableDnD;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
export declare type Step = {
|
|
3
3
|
active: boolean;
|
|
4
4
|
value: string;
|
|
@@ -10,5 +10,5 @@ export interface WizardStepsProps {
|
|
|
10
10
|
steps: Step[];
|
|
11
11
|
dataTestId?: string;
|
|
12
12
|
}
|
|
13
|
-
declare const WizardSteps: (props: WizardStepsProps) =>
|
|
13
|
+
declare const WizardSteps: (props: WizardStepsProps) => JSX.Element;
|
|
14
14
|
export default WizardSteps;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface HorizontalNavInterface {
|
|
3
2
|
className?: string;
|
|
4
3
|
customColor?: string;
|
|
5
4
|
items: any;
|
|
6
5
|
startsOpen?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare const HorizontalNav: (props: HorizontalNavInterface) =>
|
|
7
|
+
declare const HorizontalNav: (props: HorizontalNavInterface) => JSX.Element;
|
|
9
8
|
export default HorizontalNav;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface LoadingStateProps {
|
|
3
2
|
type: 'text' | 'card' | 'value';
|
|
4
3
|
lines?: number;
|
|
5
4
|
cardsNumber?: number;
|
|
6
5
|
center?: boolean;
|
|
7
6
|
}
|
|
8
|
-
declare const LoadingState: (props: LoadingStateProps) =>
|
|
7
|
+
declare const LoadingState: (props: LoadingStateProps) => JSX.Element;
|
|
9
8
|
export default LoadingState;
|
|
@@ -5357,27 +5357,54 @@ const FieldWidthButton = props => {
|
|
|
5357
5357
|
name,
|
|
5358
5358
|
placeholder,
|
|
5359
5359
|
value,
|
|
5360
|
+
onChange,
|
|
5360
5361
|
dataTestId,
|
|
5361
5362
|
buttonIcon,
|
|
5362
5363
|
buttonValue,
|
|
5363
5364
|
buttonAction,
|
|
5364
|
-
buttonDisabled
|
|
5365
|
+
buttonDisabled,
|
|
5366
|
+
disabled = true
|
|
5365
5367
|
} = props;
|
|
5368
|
+
const [loading, setLoading] = React.useState(false);
|
|
5369
|
+
const [fieldValue, setFieldValue] = React.useState(value != null ? value : null);
|
|
5370
|
+
const handleOnClickAction = async () => {
|
|
5371
|
+
if ((buttonAction == null ? void 0 : buttonAction.constructor.name) !== 'AsyncFunction') {
|
|
5372
|
+
buttonAction == null ? void 0 : buttonAction(fieldValue);
|
|
5373
|
+
return;
|
|
5374
|
+
}
|
|
5375
|
+
setLoading(true);
|
|
5376
|
+
await (buttonAction == null ? void 0 : buttonAction(fieldValue));
|
|
5377
|
+
setLoading(false);
|
|
5378
|
+
};
|
|
5366
5379
|
return /*#__PURE__*/React__default.createElement(Wrapper$e, null, label && /*#__PURE__*/React__default.createElement(Label, {
|
|
5367
5380
|
value: label
|
|
5368
5381
|
}), /*#__PURE__*/React__default.createElement(Field, null, /*#__PURE__*/React__default.createElement(TextField, {
|
|
5369
5382
|
type: type,
|
|
5370
5383
|
name: name,
|
|
5371
|
-
|
|
5384
|
+
disabled: disabled,
|
|
5372
5385
|
placeholder: placeholder,
|
|
5373
5386
|
dataTestId: dataTestId,
|
|
5374
|
-
|
|
5387
|
+
value: fieldValue != null ? fieldValue : undefined,
|
|
5388
|
+
onChange: e => {
|
|
5389
|
+
e.preventDefault();
|
|
5390
|
+
if (e.target.value === '' || e.target.value === ' ') {
|
|
5391
|
+
setFieldValue(null);
|
|
5392
|
+
onChange == null ? void 0 : onChange(e.target.value);
|
|
5393
|
+
} else {
|
|
5394
|
+
setFieldValue(e.target.value);
|
|
5395
|
+
onChange == null ? void 0 : onChange(e.target.value);
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5375
5398
|
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
5376
5399
|
color: "purple100",
|
|
5400
|
+
loading: loading,
|
|
5377
5401
|
icon: buttonIcon,
|
|
5378
5402
|
value: buttonValue,
|
|
5379
|
-
|
|
5380
|
-
|
|
5403
|
+
disabled: buttonDisabled,
|
|
5404
|
+
action: e => {
|
|
5405
|
+
e.preventDefault();
|
|
5406
|
+
handleOnClickAction();
|
|
5407
|
+
}
|
|
5381
5408
|
})));
|
|
5382
5409
|
};
|
|
5383
5410
|
|