react-frontend-common-components 0.0.76 → 0.0.79
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.d.ts +7 -5
- package/dist/index.js +13 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +40 -40
- package/rollup.config.js +44 -44
- package/src/components/app-avatar/app-avatar.tsx +24 -24
- package/src/components/app-back-arrow/app-back-arrow.css +17 -17
- package/src/components/app-back-arrow/app-back-arrow.tsx +37 -37
- package/src/components/app-badge/app-badge.css +11 -11
- package/src/components/app-badge/app-badge.tsx +44 -44
- package/src/components/app-bread-crumb/app-bread-crumb.tsx +16 -16
- package/src/components/app-button/app-button.css +13 -13
- package/src/components/app-button/app-button.tsx +51 -51
- package/src/components/app-card/app-card.css +8 -8
- package/src/components/app-card/app-card.tsx +43 -43
- package/src/components/app-carousel/app-carousel.css +68 -68
- package/src/components/app-carousel/app-carousel.tsx +62 -62
- package/src/components/app-chart/app-chart.css +6 -6
- package/src/components/app-chart/app-chart.tsx +98 -98
- package/src/components/app-checkbox-text/app-checkbox-text.css +12 -12
- package/src/components/app-checkbox-text/app-checkbox-text.tsx +32 -32
- package/src/components/app-collapse/app-collapse.tsx +57 -57
- package/src/components/app-custom-loader/app-custom-loader.css +116 -116
- package/src/components/app-custom-loader/app-custom-loader.tsx +23 -23
- package/src/components/app-divider/app-divider.tsx +16 -16
- package/src/components/app-float-button/app-float-button.tsx +23 -23
- package/src/components/app-image-box/app-image-box.css +22 -22
- package/src/components/app-image-box/app-image-box.tsx +42 -42
- package/src/components/app-input/app-input.css +59 -59
- package/src/components/app-input/app-input.tsx +93 -93
- package/src/components/app-label/app-label.css +5 -5
- package/src/components/app-label/app-label.tsx +34 -34
- package/src/components/app-list/app-list.tsx +26 -26
- package/src/components/app-loader/app-loader.css +16 -16
- package/src/components/app-loader/app-loader.tsx +28 -28
- package/src/components/app-location-map/app-location-map.css +4 -4
- package/src/components/app-location-map/app-location-map.tsx +62 -62
- package/src/components/app-modal/app-modal.css +34 -34
- package/src/components/app-modal/app-modal.tsx +61 -61
- package/src/components/app-otp-field/app-otp-field.css +28 -28
- package/src/components/app-otp-field/app-otp-field.tsx +70 -70
- package/src/components/app-pagination/app-pagination.tsx +40 -40
- package/src/components/app-password-input/app-password-input.css +41 -41
- package/src/components/app-password-input/app-password-input.tsx +90 -90
- package/src/components/app-phone-input/app-phone-input.css +12 -12
- package/src/components/app-phone-input/app-phone-input.tsx +56 -56
- package/src/components/app-popover/app-popover.css +5 -5
- package/src/components/app-popover/app-popover.tsx +45 -45
- package/src/components/app-progress/app-progress.tsx +40 -40
- package/src/components/app-radio-group/app-radio-group.css +6 -6
- package/src/components/app-radio-group/app-radio-group.tsx +45 -45
- package/src/components/app-select/app-select.css +33 -33
- package/src/components/app-select/app-select.tsx +90 -59
- package/src/components/app-select-add/app-select-add.css +21 -21
- package/src/components/app-select-add/app-select-add.tsx +34 -34
- package/src/components/app-sidebar/app-sidebar.css +49 -49
- package/src/components/app-sidebar/app-sidebar.tsx +87 -87
- package/src/components/app-tab/app-tab.css +22 -22
- package/src/components/app-tab/app-tab.tsx +31 -31
- package/src/components/app-table/app-table.tsx +42 -42
- package/src/components/app-tag/app-tag.css +11 -11
- package/src/components/app-tag/app-tag.tsx +48 -48
- package/src/components/app-textarea/app-textarea.css +25 -25
- package/src/components/app-textarea/app-textarea.tsx +59 -59
- package/src/components/app-title/app-title.css +12 -12
- package/src/components/app-title/app-title.tsx +28 -28
- package/src/components/app-toggle-button/app-toggle-button.css +27 -27
- package/src/components/app-toggle-button/app-toggle-button.tsx +43 -43
- package/src/components/app-upload-image/app-upload-image.css +26 -26
- package/src/components/app-upload-image/app-upload-image.tsx +90 -90
- package/src/components/over-view-card/over-view-card.css +15 -15
- package/src/components/over-view-card/over-view-card.tsx +26 -26
- package/src/index.ts +38 -38
- package/src/themes/icons/icons.tsx +146 -146
- package/src/themes/images/profile-img.svg +14 -14
- package/tsconfig.json +20 -20
@@ -1,90 +1,90 @@
|
|
1
|
-
import React, { ReactElement, useState } from "react";
|
2
|
-
import { Input } from "antd";
|
3
|
-
import {
|
4
|
-
ChangeEventHandler,
|
5
|
-
KeyboardEventHandler,
|
6
|
-
MouseEventHandler,
|
7
|
-
} from "react";
|
8
|
-
import Icons from "../../themes/icons/icons";
|
9
|
-
import "./app-password-input.css";
|
10
|
-
|
11
|
-
interface AppPasswordInputProps {
|
12
|
-
className?: string;
|
13
|
-
label?: string;
|
14
|
-
name?: string;
|
15
|
-
value?: string;
|
16
|
-
dataTestId?: string;
|
17
|
-
id?: string;
|
18
|
-
disabled?: boolean;
|
19
|
-
handleChange?: ChangeEventHandler<HTMLInputElement>;
|
20
|
-
onClick?: MouseEventHandler<HTMLElement>;
|
21
|
-
onPressEnter?: KeyboardEventHandler<HTMLInputElement>;
|
22
|
-
defaultValue?: string;
|
23
|
-
isAutoFocus?: boolean;
|
24
|
-
triggerFocus?: boolean;
|
25
|
-
errorMessage?: string;
|
26
|
-
autoComplete?: string;
|
27
|
-
icon?: React.ReactNode;
|
28
|
-
hiddenIcon?: React.ReactNode;
|
29
|
-
showIcon?: boolean;
|
30
|
-
}
|
31
|
-
|
32
|
-
const AppPasswordInput = ({
|
33
|
-
label,
|
34
|
-
name,
|
35
|
-
value,
|
36
|
-
dataTestId,
|
37
|
-
id,
|
38
|
-
disabled,
|
39
|
-
handleChange,
|
40
|
-
onClick,
|
41
|
-
defaultValue,
|
42
|
-
onPressEnter,
|
43
|
-
className,
|
44
|
-
errorMessage,
|
45
|
-
isAutoFocus,
|
46
|
-
triggerFocus,
|
47
|
-
autoComplete = "new-password",
|
48
|
-
icon,
|
49
|
-
hiddenIcon,
|
50
|
-
showIcon = true,
|
51
|
-
}: AppPasswordInputProps) => {
|
52
|
-
const [showPassword, setShowPassword] = useState(false);
|
53
|
-
|
54
|
-
const togglePasswordVisibility = () => {
|
55
|
-
setShowPassword(!showPassword);
|
56
|
-
};
|
57
|
-
|
58
|
-
return (
|
59
|
-
<div className={`appPasswordInput ${className}`}>
|
60
|
-
<div className="position-relative w-100">
|
61
|
-
<Input
|
62
|
-
type={showPassword ? "text" : "password"}
|
63
|
-
className={"inputPassword"}
|
64
|
-
data-test-id={dataTestId}
|
65
|
-
id={id}
|
66
|
-
disabled={disabled}
|
67
|
-
name={name}
|
68
|
-
value={value}
|
69
|
-
onChange={handleChange}
|
70
|
-
onClick={onClick}
|
71
|
-
defaultValue={defaultValue}
|
72
|
-
onPressEnter={onPressEnter}
|
73
|
-
placeholder={label}
|
74
|
-
autoFocus={isAutoFocus}
|
75
|
-
autoComplete={autoComplete}
|
76
|
-
/>
|
77
|
-
{showIcon && (
|
78
|
-
<span className={"icon"} onClick={togglePasswordVisibility}>
|
79
|
-
{!showPassword
|
80
|
-
? icon || Icons.
|
81
|
-
: hiddenIcon || Icons.
|
82
|
-
</span>
|
83
|
-
)}
|
84
|
-
</div>
|
85
|
-
{errorMessage && <div className={"error"}>{errorMessage}</div>}
|
86
|
-
</div>
|
87
|
-
);
|
88
|
-
};
|
89
|
-
|
90
|
-
export default AppPasswordInput;
|
1
|
+
import React, { ReactElement, useState } from "react";
|
2
|
+
import { Input } from "antd";
|
3
|
+
import {
|
4
|
+
ChangeEventHandler,
|
5
|
+
KeyboardEventHandler,
|
6
|
+
MouseEventHandler,
|
7
|
+
} from "react";
|
8
|
+
import Icons from "../../themes/icons/icons";
|
9
|
+
import "./app-password-input.css";
|
10
|
+
|
11
|
+
interface AppPasswordInputProps {
|
12
|
+
className?: string;
|
13
|
+
label?: string;
|
14
|
+
name?: string;
|
15
|
+
value?: string;
|
16
|
+
dataTestId?: string;
|
17
|
+
id?: string;
|
18
|
+
disabled?: boolean;
|
19
|
+
handleChange?: ChangeEventHandler<HTMLInputElement>;
|
20
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
21
|
+
onPressEnter?: KeyboardEventHandler<HTMLInputElement>;
|
22
|
+
defaultValue?: string;
|
23
|
+
isAutoFocus?: boolean;
|
24
|
+
triggerFocus?: boolean;
|
25
|
+
errorMessage?: string;
|
26
|
+
autoComplete?: string;
|
27
|
+
icon?: React.ReactNode;
|
28
|
+
hiddenIcon?: React.ReactNode;
|
29
|
+
showIcon?: boolean;
|
30
|
+
}
|
31
|
+
|
32
|
+
const AppPasswordInput = ({
|
33
|
+
label,
|
34
|
+
name,
|
35
|
+
value,
|
36
|
+
dataTestId,
|
37
|
+
id,
|
38
|
+
disabled,
|
39
|
+
handleChange,
|
40
|
+
onClick,
|
41
|
+
defaultValue,
|
42
|
+
onPressEnter,
|
43
|
+
className,
|
44
|
+
errorMessage,
|
45
|
+
isAutoFocus,
|
46
|
+
triggerFocus,
|
47
|
+
autoComplete = "new-password",
|
48
|
+
icon,
|
49
|
+
hiddenIcon,
|
50
|
+
showIcon = true,
|
51
|
+
}: AppPasswordInputProps) => {
|
52
|
+
const [showPassword, setShowPassword] = useState(false);
|
53
|
+
|
54
|
+
const togglePasswordVisibility = () => {
|
55
|
+
setShowPassword(!showPassword);
|
56
|
+
};
|
57
|
+
|
58
|
+
return (
|
59
|
+
<div className={`appPasswordInput ${className}`}>
|
60
|
+
<div className="position-relative w-100">
|
61
|
+
<Input
|
62
|
+
type={showPassword ? "text" : "password"}
|
63
|
+
className={"inputPassword"}
|
64
|
+
data-test-id={dataTestId}
|
65
|
+
id={id}
|
66
|
+
disabled={disabled}
|
67
|
+
name={name}
|
68
|
+
value={value}
|
69
|
+
onChange={handleChange}
|
70
|
+
onClick={onClick}
|
71
|
+
defaultValue={defaultValue}
|
72
|
+
onPressEnter={onPressEnter}
|
73
|
+
placeholder={label}
|
74
|
+
autoFocus={isAutoFocus}
|
75
|
+
autoComplete={autoComplete}
|
76
|
+
/>
|
77
|
+
{showIcon && (
|
78
|
+
<span className={"icon"} onClick={togglePasswordVisibility}>
|
79
|
+
{!showPassword
|
80
|
+
? icon || Icons.iconHiddenIcon
|
81
|
+
: hiddenIcon || Icons.eyePassword}
|
82
|
+
</span>
|
83
|
+
)}
|
84
|
+
</div>
|
85
|
+
{errorMessage && <div className={"error"}>{errorMessage}</div>}
|
86
|
+
</div>
|
87
|
+
);
|
88
|
+
};
|
89
|
+
|
90
|
+
export default AppPasswordInput;
|
@@ -1,12 +1,12 @@
|
|
1
|
-
.inputContainer {
|
2
|
-
.react-tel-input .flag-dropdown {
|
3
|
-
height: 40px !important;
|
4
|
-
background-color: unset;
|
5
|
-
border: unset;
|
6
|
-
}
|
7
|
-
.react-tel-input .form-control {
|
8
|
-
height: 40px !important;
|
9
|
-
width: 100%;
|
10
|
-
padding-left: 40px;
|
11
|
-
}
|
12
|
-
}
|
1
|
+
.inputContainer {
|
2
|
+
.react-tel-input .flag-dropdown {
|
3
|
+
height: 40px !important;
|
4
|
+
background-color: unset;
|
5
|
+
border: unset;
|
6
|
+
}
|
7
|
+
.react-tel-input .form-control {
|
8
|
+
height: 40px !important;
|
9
|
+
width: 100%;
|
10
|
+
padding-left: 40px;
|
11
|
+
}
|
12
|
+
}
|
@@ -1,56 +1,56 @@
|
|
1
|
-
import React, { useEffect, useRef } from "react";
|
2
|
-
import "react-phone-input-2/lib/style.css";
|
3
|
-
import PhoneInput, { CountryData } from "react-phone-input-2";
|
4
|
-
import "./app-phone-input.css";
|
5
|
-
|
6
|
-
interface AppPhoneInputProps {
|
7
|
-
countryCode?: string;
|
8
|
-
phone: string;
|
9
|
-
handleChange: (phone: string, countryCode: string, uniCode: string) => void;
|
10
|
-
className: string;
|
11
|
-
id: string;
|
12
|
-
}
|
13
|
-
|
14
|
-
const AppPhoneInput = ({
|
15
|
-
handleChange,
|
16
|
-
countryCode,
|
17
|
-
phone,
|
18
|
-
className,
|
19
|
-
id,
|
20
|
-
}: AppPhoneInputProps) => {
|
21
|
-
const wrapperRef = useRef<HTMLDivElement>(null);
|
22
|
-
|
23
|
-
useEffect(() => {
|
24
|
-
if (wrapperRef.current) {
|
25
|
-
const inputElement = wrapperRef.current.querySelector("input");
|
26
|
-
if (inputElement) {
|
27
|
-
inputElement.id = id;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}, [id]);
|
31
|
-
return (
|
32
|
-
<div className={className}>
|
33
|
-
<div className={"inputContainer"} ref={wrapperRef}>
|
34
|
-
<PhoneInput
|
35
|
-
value={`+${countryCode}${phone}`}
|
36
|
-
country={
|
37
|
-
(countryCode && phone) || (countryCode != "" && phone != "")
|
38
|
-
? ""
|
39
|
-
: "us"
|
40
|
-
}
|
41
|
-
countryCodeEditable={false}
|
42
|
-
onChange={(phone, country: CountryData) => {
|
43
|
-
handleChange(
|
44
|
-
phone.replace(country.dialCode, ""),
|
45
|
-
country.dialCode,
|
46
|
-
country.countryCode
|
47
|
-
);
|
48
|
-
}}
|
49
|
-
enableSearch={true}
|
50
|
-
inputProps={{ required: true }}
|
51
|
-
/>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
);
|
55
|
-
};
|
56
|
-
export default AppPhoneInput;
|
1
|
+
import React, { useEffect, useRef } from "react";
|
2
|
+
import "react-phone-input-2/lib/style.css";
|
3
|
+
import PhoneInput, { CountryData } from "react-phone-input-2";
|
4
|
+
import "./app-phone-input.css";
|
5
|
+
|
6
|
+
interface AppPhoneInputProps {
|
7
|
+
countryCode?: string;
|
8
|
+
phone: string;
|
9
|
+
handleChange: (phone: string, countryCode: string, uniCode: string) => void;
|
10
|
+
className: string;
|
11
|
+
id: string;
|
12
|
+
}
|
13
|
+
|
14
|
+
const AppPhoneInput = ({
|
15
|
+
handleChange,
|
16
|
+
countryCode,
|
17
|
+
phone,
|
18
|
+
className,
|
19
|
+
id,
|
20
|
+
}: AppPhoneInputProps) => {
|
21
|
+
const wrapperRef = useRef<HTMLDivElement>(null);
|
22
|
+
|
23
|
+
useEffect(() => {
|
24
|
+
if (wrapperRef.current) {
|
25
|
+
const inputElement = wrapperRef.current.querySelector("input");
|
26
|
+
if (inputElement) {
|
27
|
+
inputElement.id = id;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}, [id]);
|
31
|
+
return (
|
32
|
+
<div className={className}>
|
33
|
+
<div className={"inputContainer"} ref={wrapperRef}>
|
34
|
+
<PhoneInput
|
35
|
+
value={`+${countryCode}${phone}`}
|
36
|
+
country={
|
37
|
+
(countryCode && phone) || (countryCode != "" && phone != "")
|
38
|
+
? ""
|
39
|
+
: "us"
|
40
|
+
}
|
41
|
+
countryCodeEditable={false}
|
42
|
+
onChange={(phone, country: CountryData) => {
|
43
|
+
handleChange(
|
44
|
+
phone.replace(country.dialCode, ""),
|
45
|
+
country.dialCode,
|
46
|
+
country.countryCode
|
47
|
+
);
|
48
|
+
}}
|
49
|
+
enableSearch={true}
|
50
|
+
inputProps={{ required: true }}
|
51
|
+
/>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
);
|
55
|
+
};
|
56
|
+
export default AppPhoneInput;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
.appPopover {
|
2
|
-
.popoverComponent {
|
3
|
-
width: max-content;
|
4
|
-
}
|
5
|
-
}
|
1
|
+
.appPopover {
|
2
|
+
.popoverComponent {
|
3
|
+
width: max-content;
|
4
|
+
}
|
5
|
+
}
|
@@ -1,45 +1,45 @@
|
|
1
|
-
import { Popover } from "antd";
|
2
|
-
import { PopoverProps } from "antd/lib/popover";
|
3
|
-
import "./app-popover.css";
|
4
|
-
|
5
|
-
interface AppPopoverProps extends PopoverProps {
|
6
|
-
content: React.ReactNode;
|
7
|
-
title?: React.ReactNode;
|
8
|
-
children: React.ReactNode;
|
9
|
-
bgColor?: string;
|
10
|
-
triggerType?: "hover" | "click";
|
11
|
-
color?: string;
|
12
|
-
className?: string;
|
13
|
-
}
|
14
|
-
|
15
|
-
const AppPopover = ({
|
16
|
-
content,
|
17
|
-
title,
|
18
|
-
children,
|
19
|
-
bgColor,
|
20
|
-
color,
|
21
|
-
triggerType = "hover",
|
22
|
-
className,
|
23
|
-
...popoverProps
|
24
|
-
}: AppPopoverProps) => {
|
25
|
-
const popoverStyle = {
|
26
|
-
color: color ?? "inherit",
|
27
|
-
};
|
28
|
-
|
29
|
-
return (
|
30
|
-
<div className={`appPopover ${className}`}>
|
31
|
-
<Popover
|
32
|
-
color={bgColor}
|
33
|
-
content={<div style={popoverStyle}>{content}</div>}
|
34
|
-
title={title ? <div style={popoverStyle}>{title}</div> : null}
|
35
|
-
trigger={triggerType}
|
36
|
-
overlayClassName={className}
|
37
|
-
{...popoverProps}
|
38
|
-
>
|
39
|
-
<div className={"popoverComponent"}>{children}</div>
|
40
|
-
</Popover>
|
41
|
-
</div>
|
42
|
-
);
|
43
|
-
};
|
44
|
-
|
45
|
-
export default AppPopover;
|
1
|
+
import { Popover } from "antd";
|
2
|
+
import { PopoverProps } from "antd/lib/popover";
|
3
|
+
import "./app-popover.css";
|
4
|
+
|
5
|
+
interface AppPopoverProps extends PopoverProps {
|
6
|
+
content: React.ReactNode;
|
7
|
+
title?: React.ReactNode;
|
8
|
+
children: React.ReactNode;
|
9
|
+
bgColor?: string;
|
10
|
+
triggerType?: "hover" | "click";
|
11
|
+
color?: string;
|
12
|
+
className?: string;
|
13
|
+
}
|
14
|
+
|
15
|
+
const AppPopover = ({
|
16
|
+
content,
|
17
|
+
title,
|
18
|
+
children,
|
19
|
+
bgColor,
|
20
|
+
color,
|
21
|
+
triggerType = "hover",
|
22
|
+
className,
|
23
|
+
...popoverProps
|
24
|
+
}: AppPopoverProps) => {
|
25
|
+
const popoverStyle = {
|
26
|
+
color: color ?? "inherit",
|
27
|
+
};
|
28
|
+
|
29
|
+
return (
|
30
|
+
<div className={`appPopover ${className}`}>
|
31
|
+
<Popover
|
32
|
+
color={bgColor}
|
33
|
+
content={<div style={popoverStyle}>{content}</div>}
|
34
|
+
title={title ? <div style={popoverStyle}>{title}</div> : null}
|
35
|
+
trigger={triggerType}
|
36
|
+
overlayClassName={className}
|
37
|
+
{...popoverProps}
|
38
|
+
>
|
39
|
+
<div className={"popoverComponent"}>{children}</div>
|
40
|
+
</Popover>
|
41
|
+
</div>
|
42
|
+
);
|
43
|
+
};
|
44
|
+
|
45
|
+
export default AppPopover;
|
@@ -1,40 +1,40 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Progress } from "antd";
|
3
|
-
|
4
|
-
interface AppProgressProps {
|
5
|
-
percent: number;
|
6
|
-
type?: "line" | "circle" | "dashboard";
|
7
|
-
strokeColor?: string;
|
8
|
-
trailColor?: string;
|
9
|
-
size?: "default" | "small";
|
10
|
-
status?: "success" | "exception" | "normal" | "active";
|
11
|
-
showInfo?: boolean;
|
12
|
-
className?: string;
|
13
|
-
}
|
14
|
-
|
15
|
-
const AppProgress = ({
|
16
|
-
percent,
|
17
|
-
type = "line",
|
18
|
-
strokeColor,
|
19
|
-
trailColor,
|
20
|
-
size = "default",
|
21
|
-
status,
|
22
|
-
showInfo = true,
|
23
|
-
className,
|
24
|
-
}: AppProgressProps) => {
|
25
|
-
return (
|
26
|
-
<div className={className}>
|
27
|
-
<Progress
|
28
|
-
percent={percent}
|
29
|
-
type={type}
|
30
|
-
strokeColor={strokeColor}
|
31
|
-
trailColor={trailColor}
|
32
|
-
size={size}
|
33
|
-
status={status}
|
34
|
-
showInfo={showInfo}
|
35
|
-
/>
|
36
|
-
</div>
|
37
|
-
);
|
38
|
-
};
|
39
|
-
|
40
|
-
export default AppProgress;
|
1
|
+
import React from "react";
|
2
|
+
import { Progress } from "antd";
|
3
|
+
|
4
|
+
interface AppProgressProps {
|
5
|
+
percent: number;
|
6
|
+
type?: "line" | "circle" | "dashboard";
|
7
|
+
strokeColor?: string;
|
8
|
+
trailColor?: string;
|
9
|
+
size?: "default" | "small";
|
10
|
+
status?: "success" | "exception" | "normal" | "active";
|
11
|
+
showInfo?: boolean;
|
12
|
+
className?: string;
|
13
|
+
}
|
14
|
+
|
15
|
+
const AppProgress = ({
|
16
|
+
percent,
|
17
|
+
type = "line",
|
18
|
+
strokeColor,
|
19
|
+
trailColor,
|
20
|
+
size = "default",
|
21
|
+
status,
|
22
|
+
showInfo = true,
|
23
|
+
className,
|
24
|
+
}: AppProgressProps) => {
|
25
|
+
return (
|
26
|
+
<div className={className}>
|
27
|
+
<Progress
|
28
|
+
percent={percent}
|
29
|
+
type={type}
|
30
|
+
strokeColor={strokeColor}
|
31
|
+
trailColor={trailColor}
|
32
|
+
size={size}
|
33
|
+
status={status}
|
34
|
+
showInfo={showInfo}
|
35
|
+
/>
|
36
|
+
</div>
|
37
|
+
);
|
38
|
+
};
|
39
|
+
|
40
|
+
export default AppProgress;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.appRadioGroup {
|
2
|
-
.radioGroup {
|
3
|
-
display: flex;
|
4
|
-
align-items: center;
|
5
|
-
}
|
6
|
-
}
|
1
|
+
.appRadioGroup {
|
2
|
+
.radioGroup {
|
3
|
+
display: flex;
|
4
|
+
align-items: center;
|
5
|
+
}
|
6
|
+
}
|
@@ -1,45 +1,45 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Radio } from "antd";
|
3
|
-
import type { RadioChangeEvent } from "antd";
|
4
|
-
import "./app-radio-group.css";
|
5
|
-
|
6
|
-
interface Option {
|
7
|
-
value: number;
|
8
|
-
text: string;
|
9
|
-
}
|
10
|
-
|
11
|
-
interface AppRadioGroupProps {
|
12
|
-
options: Option[];
|
13
|
-
selectedValue: number | null;
|
14
|
-
onChange: (value: number) => void;
|
15
|
-
className?: string;
|
16
|
-
}
|
17
|
-
|
18
|
-
const AppRadioGroup = ({
|
19
|
-
options,
|
20
|
-
selectedValue,
|
21
|
-
onChange,
|
22
|
-
className,
|
23
|
-
}: AppRadioGroupProps) => {
|
24
|
-
const handleChange = (e: RadioChangeEvent) => {
|
25
|
-
onChange(e.target.value);
|
26
|
-
};
|
27
|
-
|
28
|
-
return (
|
29
|
-
<div className={`appRadioGroup ${className}`}>
|
30
|
-
<Radio.Group
|
31
|
-
className={"radioGroup"}
|
32
|
-
onChange={handleChange}
|
33
|
-
value={selectedValue}
|
34
|
-
>
|
35
|
-
{options.map((option) => (
|
36
|
-
<Radio key={option.value} value={option.value}>
|
37
|
-
{option.text}
|
38
|
-
</Radio>
|
39
|
-
))}
|
40
|
-
</Radio.Group>
|
41
|
-
</div>
|
42
|
-
);
|
43
|
-
};
|
44
|
-
|
45
|
-
export default AppRadioGroup;
|
1
|
+
import React from "react";
|
2
|
+
import { Radio } from "antd";
|
3
|
+
import type { RadioChangeEvent } from "antd";
|
4
|
+
import "./app-radio-group.css";
|
5
|
+
|
6
|
+
interface Option {
|
7
|
+
value: number;
|
8
|
+
text: string;
|
9
|
+
}
|
10
|
+
|
11
|
+
interface AppRadioGroupProps {
|
12
|
+
options: Option[];
|
13
|
+
selectedValue: number | null;
|
14
|
+
onChange: (value: number) => void;
|
15
|
+
className?: string;
|
16
|
+
}
|
17
|
+
|
18
|
+
const AppRadioGroup = ({
|
19
|
+
options,
|
20
|
+
selectedValue,
|
21
|
+
onChange,
|
22
|
+
className,
|
23
|
+
}: AppRadioGroupProps) => {
|
24
|
+
const handleChange = (e: RadioChangeEvent) => {
|
25
|
+
onChange(e.target.value);
|
26
|
+
};
|
27
|
+
|
28
|
+
return (
|
29
|
+
<div className={`appRadioGroup ${className}`}>
|
30
|
+
<Radio.Group
|
31
|
+
className={"radioGroup"}
|
32
|
+
onChange={handleChange}
|
33
|
+
value={selectedValue}
|
34
|
+
>
|
35
|
+
{options.map((option) => (
|
36
|
+
<Radio key={option.value} value={option.value}>
|
37
|
+
{option.text}
|
38
|
+
</Radio>
|
39
|
+
))}
|
40
|
+
</Radio.Group>
|
41
|
+
</div>
|
42
|
+
);
|
43
|
+
};
|
44
|
+
|
45
|
+
export default AppRadioGroup;
|
@@ -1,33 +1,33 @@
|
|
1
|
-
.appselect {
|
2
|
-
font-weight: 500;
|
3
|
-
font-size: var(--font-14);
|
4
|
-
*:focus,
|
5
|
-
*:active,
|
6
|
-
*:focus-within {
|
7
|
-
outline: 0 !important;
|
8
|
-
box-shadow: unset !important;
|
9
|
-
}
|
10
|
-
.ant-select {
|
11
|
-
width: 100%;
|
12
|
-
height: 40px;
|
13
|
-
.ant-select-selector {
|
14
|
-
.ant-select-selection-placeholder {
|
15
|
-
color: #202123 !important;
|
16
|
-
font-size: 14px;
|
17
|
-
font-weight: 500;
|
18
|
-
line-height: normal;
|
19
|
-
}
|
20
|
-
}
|
21
|
-
&:hover {
|
22
|
-
.ant-select-selector {
|
23
|
-
border-color: #d9d9d9 !important;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
.error {
|
30
|
-
color: red;
|
31
|
-
font-size: 0.875rem;
|
32
|
-
margin-top: 0.25rem;
|
33
|
-
}
|
1
|
+
.appselect {
|
2
|
+
font-weight: 500;
|
3
|
+
font-size: var(--font-14);
|
4
|
+
*:focus,
|
5
|
+
*:active,
|
6
|
+
*:focus-within {
|
7
|
+
outline: 0 !important;
|
8
|
+
box-shadow: unset !important;
|
9
|
+
}
|
10
|
+
.ant-select {
|
11
|
+
width: 100%;
|
12
|
+
height: 40px;
|
13
|
+
.ant-select-selector {
|
14
|
+
.ant-select-selection-placeholder {
|
15
|
+
color: #202123 !important;
|
16
|
+
font-size: 14px;
|
17
|
+
font-weight: 500;
|
18
|
+
line-height: normal;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
&:hover {
|
22
|
+
.ant-select-selector {
|
23
|
+
border-color: #d9d9d9 !important;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
.error {
|
30
|
+
color: red;
|
31
|
+
font-size: 0.875rem;
|
32
|
+
margin-top: 0.25rem;
|
33
|
+
}
|