react-frontend-common-components 0.0.77 → 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.
Files changed (78) hide show
  1. package/dist/index.d.ts +7 -5
  2. package/dist/index.js +13 -27
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +14 -28
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +40 -40
  7. package/rollup.config.js +44 -44
  8. package/src/components/app-avatar/app-avatar.tsx +24 -24
  9. package/src/components/app-back-arrow/app-back-arrow.css +17 -17
  10. package/src/components/app-back-arrow/app-back-arrow.tsx +37 -37
  11. package/src/components/app-badge/app-badge.css +11 -11
  12. package/src/components/app-badge/app-badge.tsx +44 -44
  13. package/src/components/app-bread-crumb/app-bread-crumb.tsx +16 -16
  14. package/src/components/app-button/app-button.css +13 -13
  15. package/src/components/app-button/app-button.tsx +51 -51
  16. package/src/components/app-card/app-card.css +8 -8
  17. package/src/components/app-card/app-card.tsx +43 -43
  18. package/src/components/app-carousel/app-carousel.css +68 -68
  19. package/src/components/app-carousel/app-carousel.tsx +62 -62
  20. package/src/components/app-chart/app-chart.css +6 -6
  21. package/src/components/app-chart/app-chart.tsx +98 -98
  22. package/src/components/app-checkbox-text/app-checkbox-text.css +12 -12
  23. package/src/components/app-checkbox-text/app-checkbox-text.tsx +32 -32
  24. package/src/components/app-collapse/app-collapse.tsx +57 -57
  25. package/src/components/app-custom-loader/app-custom-loader.css +116 -116
  26. package/src/components/app-custom-loader/app-custom-loader.tsx +23 -23
  27. package/src/components/app-divider/app-divider.tsx +16 -16
  28. package/src/components/app-float-button/app-float-button.tsx +23 -23
  29. package/src/components/app-image-box/app-image-box.css +22 -22
  30. package/src/components/app-image-box/app-image-box.tsx +42 -42
  31. package/src/components/app-input/app-input.css +59 -59
  32. package/src/components/app-input/app-input.tsx +93 -93
  33. package/src/components/app-label/app-label.css +5 -5
  34. package/src/components/app-label/app-label.tsx +34 -34
  35. package/src/components/app-list/app-list.tsx +26 -26
  36. package/src/components/app-loader/app-loader.css +16 -16
  37. package/src/components/app-loader/app-loader.tsx +28 -28
  38. package/src/components/app-location-map/app-location-map.css +4 -4
  39. package/src/components/app-location-map/app-location-map.tsx +62 -62
  40. package/src/components/app-modal/app-modal.css +34 -34
  41. package/src/components/app-modal/app-modal.tsx +61 -61
  42. package/src/components/app-otp-field/app-otp-field.css +28 -28
  43. package/src/components/app-otp-field/app-otp-field.tsx +70 -70
  44. package/src/components/app-pagination/app-pagination.tsx +40 -40
  45. package/src/components/app-password-input/app-password-input.css +41 -41
  46. package/src/components/app-password-input/app-password-input.tsx +90 -90
  47. package/src/components/app-phone-input/app-phone-input.css +12 -12
  48. package/src/components/app-phone-input/app-phone-input.tsx +56 -56
  49. package/src/components/app-popover/app-popover.css +5 -5
  50. package/src/components/app-popover/app-popover.tsx +45 -45
  51. package/src/components/app-progress/app-progress.tsx +40 -40
  52. package/src/components/app-radio-group/app-radio-group.css +6 -6
  53. package/src/components/app-radio-group/app-radio-group.tsx +45 -45
  54. package/src/components/app-select/app-select.css +33 -33
  55. package/src/components/app-select/app-select.tsx +90 -59
  56. package/src/components/app-select-add/app-select-add.css +21 -21
  57. package/src/components/app-select-add/app-select-add.tsx +34 -34
  58. package/src/components/app-sidebar/app-sidebar.css +49 -49
  59. package/src/components/app-sidebar/app-sidebar.tsx +87 -87
  60. package/src/components/app-tab/app-tab.css +22 -22
  61. package/src/components/app-tab/app-tab.tsx +31 -31
  62. package/src/components/app-table/app-table.tsx +42 -42
  63. package/src/components/app-tag/app-tag.css +11 -11
  64. package/src/components/app-tag/app-tag.tsx +48 -48
  65. package/src/components/app-textarea/app-textarea.css +25 -25
  66. package/src/components/app-textarea/app-textarea.tsx +59 -59
  67. package/src/components/app-title/app-title.css +12 -12
  68. package/src/components/app-title/app-title.tsx +28 -28
  69. package/src/components/app-toggle-button/app-toggle-button.css +27 -27
  70. package/src/components/app-toggle-button/app-toggle-button.tsx +43 -43
  71. package/src/components/app-upload-image/app-upload-image.css +26 -26
  72. package/src/components/app-upload-image/app-upload-image.tsx +90 -90
  73. package/src/components/over-view-card/over-view-card.css +15 -15
  74. package/src/components/over-view-card/over-view-card.tsx +26 -26
  75. package/src/index.ts +38 -38
  76. package/src/themes/icons/icons.tsx +146 -146
  77. package/src/themes/images/profile-img.svg +14 -14
  78. package/tsconfig.json +20 -20
@@ -1,34 +1,34 @@
1
- .header {
2
- width: 100%;
3
- }
4
-
5
- .title,
6
- .titleLeft {
7
- font-size: 1rem;
8
- font-weight: 500;
9
- text-align: center;
10
- flex-grow: 1;
11
- }
12
-
13
- .titleLeft {
14
- text-align: left;
15
- }
16
-
17
- .descriptionLeft {
18
- text-align: left;
19
- }
20
-
21
- .closeButton {
22
- align-self: flex-end;
23
- }
24
-
25
- .body {
26
- text-align: center;
27
- }
28
-
29
- .footer {
30
- margin-top: 16px;
31
- display: flex;
32
- justify-content: center;
33
- width: 100%;
34
- }
1
+ .header {
2
+ width: 100%;
3
+ }
4
+
5
+ .title,
6
+ .titleLeft {
7
+ font-size: 1rem;
8
+ font-weight: 500;
9
+ text-align: center;
10
+ flex-grow: 1;
11
+ }
12
+
13
+ .titleLeft {
14
+ text-align: left;
15
+ }
16
+
17
+ .descriptionLeft {
18
+ text-align: left;
19
+ }
20
+
21
+ .closeButton {
22
+ align-self: flex-end;
23
+ }
24
+
25
+ .body {
26
+ text-align: center;
27
+ }
28
+
29
+ .footer {
30
+ margin-top: 16px;
31
+ display: flex;
32
+ justify-content: center;
33
+ width: 100%;
34
+ }
@@ -1,61 +1,61 @@
1
- import React from "react";
2
- import { Modal, Button } from "antd";
3
- import { CloseOutlined } from "@ant-design/icons";
4
- import "./app-modal.css";
5
-
6
- interface AppModalProps {
7
- visible: boolean;
8
- onClose: () => void;
9
- title?: string;
10
- description?: string;
11
- children: React.ReactNode;
12
- footerButtons?: React.ReactNode;
13
- alignTitleLeft?: boolean;
14
- className?: string;
15
- closeIcon?: React.ReactNode;
16
- width?: number;
17
- }
18
-
19
- const AppModal = ({
20
- visible,
21
- onClose,
22
- title,
23
- description,
24
- children,
25
- footerButtons,
26
- alignTitleLeft = false,
27
- className,
28
- closeIcon,
29
- width,
30
- }: AppModalProps) => {
31
- return (
32
- <div>
33
- <Modal
34
- open={visible}
35
- width={width}
36
- onCancel={onClose}
37
- footer={null}
38
- closeIcon={closeIcon || <CloseOutlined />}
39
- className={className}
40
- >
41
- <div className={"header"}>
42
- {title && (
43
- <div className={alignTitleLeft ? "titleLeft" : "title"}>
44
- {title}
45
- </div>
46
- )}
47
- {description && (
48
- <div className={alignTitleLeft ? "descriptionLeft" : "description"}>
49
- {description}
50
- </div>
51
- )}
52
- </div>
53
-
54
- <div className={"body"}>{children}</div>
55
- {footerButtons && <div className={"footer"}>{footerButtons}</div>}
56
- </Modal>
57
- </div>
58
- );
59
- };
60
-
61
- export default AppModal;
1
+ import React from "react";
2
+ import { Modal, Button } from "antd";
3
+ import { CloseOutlined } from "@ant-design/icons";
4
+ import "./app-modal.css";
5
+
6
+ interface AppModalProps {
7
+ visible: boolean;
8
+ onClose: () => void;
9
+ title?: string;
10
+ description?: string;
11
+ children: React.ReactNode;
12
+ footerButtons?: React.ReactNode;
13
+ alignTitleLeft?: boolean;
14
+ className?: string;
15
+ closeIcon?: React.ReactNode;
16
+ width?: number;
17
+ }
18
+
19
+ const AppModal = ({
20
+ visible,
21
+ onClose,
22
+ title,
23
+ description,
24
+ children,
25
+ footerButtons,
26
+ alignTitleLeft = false,
27
+ className,
28
+ closeIcon,
29
+ width,
30
+ }: AppModalProps) => {
31
+ return (
32
+ <div>
33
+ <Modal
34
+ open={visible}
35
+ width={width}
36
+ onCancel={onClose}
37
+ footer={null}
38
+ closeIcon={closeIcon || <CloseOutlined />}
39
+ className={className}
40
+ >
41
+ <div className={"header"}>
42
+ {title && (
43
+ <div className={alignTitleLeft ? "titleLeft" : "title"}>
44
+ {title}
45
+ </div>
46
+ )}
47
+ {description && (
48
+ <div className={alignTitleLeft ? "descriptionLeft" : "description"}>
49
+ {description}
50
+ </div>
51
+ )}
52
+ </div>
53
+
54
+ <div className={"body"}>{children}</div>
55
+ {footerButtons && <div className={"footer"}>{footerButtons}</div>}
56
+ </Modal>
57
+ </div>
58
+ );
59
+ };
60
+
61
+ export default AppModal;
@@ -1,28 +1,28 @@
1
- .appOtpField {
2
- .otpInputStyle {
3
- gap: 0.5rem;
4
- & input {
5
- margin: 0 5px;
6
- font-size: 24px;
7
- border-radius: 10px;
8
- border-color: #f6f7f9;
9
- }
10
- }
11
- .resendWrap {
12
- margin-top: 1rem;
13
- & .forgotPassword {
14
- font-size: 0.875rem;
15
- font-style: normal;
16
- font-weight: 500;
17
- line-height: 150%;
18
- letter-spacing: -0.0175rem;
19
- cursor: pointer;
20
- .resendTimer {
21
- color: rgb(255, 0, 0);
22
- }
23
- .resendBtn {
24
- color: #009046;
25
- }
26
- }
27
- }
28
- }
1
+ .appOtpField {
2
+ .otpInputStyle {
3
+ gap: 0.5rem;
4
+ & input {
5
+ margin: 0 5px;
6
+ font-size: 24px;
7
+ border-radius: 10px;
8
+ border-color: #f6f7f9;
9
+ }
10
+ }
11
+ .resendWrap {
12
+ margin-top: 1rem;
13
+ & .forgotPassword {
14
+ font-size: 0.875rem;
15
+ font-style: normal;
16
+ font-weight: 500;
17
+ line-height: 150%;
18
+ letter-spacing: -0.0175rem;
19
+ cursor: pointer;
20
+ .resendTimer {
21
+ color: rgb(255, 0, 0);
22
+ }
23
+ .resendBtn {
24
+ color: #009046;
25
+ }
26
+ }
27
+ }
28
+ }
@@ -1,70 +1,70 @@
1
- import React, { useEffect } from "react";
2
- import OTPInput from "react-otp-input";
3
- import "./app-otp-field.css";
4
-
5
- interface AppOtpFieldProps {
6
- otp: string;
7
- onChange: (otp: string) => void;
8
- numInputs?: number;
9
- otpError?: string;
10
- resendTimeout?: number;
11
- onResendOtp?: () => void;
12
- setResendTimeout: (timeout: number) => void;
13
- className?: string;
14
- resendTxt?: React.ReactNode;
15
- resendTime: string;
16
- }
17
-
18
- const AppOtpField = ({
19
- otp,
20
- onChange,
21
- numInputs = 4,
22
- otpError,
23
- resendTimeout,
24
- onResendOtp,
25
- setResendTimeout,
26
- className,
27
- resendTxt,
28
- resendTime,
29
- }: AppOtpFieldProps) => {
30
- useEffect(() => {
31
- if (resendTimeout && resendTimeout > 0) {
32
- const timer = setTimeout(() => {
33
- setResendTimeout(resendTimeout - 1);
34
- }, 1000);
35
-
36
- return () => clearTimeout(timer);
37
- }
38
- }, [resendTimeout, setResendTimeout]);
39
-
40
- return (
41
- <div className={`appOtpField ${className}`}>
42
- <OTPInput
43
- value={otp}
44
- onChange={onChange}
45
- numInputs={numInputs}
46
- containerStyle={"otpInputStyle"}
47
- renderSeparator={<span>-</span>}
48
- renderInput={(props) => <input {...props} />}
49
- />
50
- {otpError && <p className={"error"}>{otpError}</p>}{" "}
51
- <div className={"resendWrap"}>
52
- {resendTimeout !== undefined && (
53
- <span className={"forgotPassword"}>
54
- {resendTimeout > 0 ? (
55
- <span className={"resendTimer"}>{resendTime}</span>
56
- ) : (
57
- onResendOtp && (
58
- <span className={"resendBtn"} onClick={() => onResendOtp()}>
59
- {resendTxt}
60
- </span>
61
- )
62
- )}
63
- </span>
64
- )}
65
- </div>
66
- </div>
67
- );
68
- };
69
-
70
- export default AppOtpField;
1
+ import React, { useEffect } from "react";
2
+ import OTPInput from "react-otp-input";
3
+ import "./app-otp-field.css";
4
+
5
+ interface AppOtpFieldProps {
6
+ otp: string;
7
+ onChange: (otp: string) => void;
8
+ numInputs?: number;
9
+ otpError?: string;
10
+ resendTimeout?: number;
11
+ onResendOtp?: () => void;
12
+ setResendTimeout: (timeout: number) => void;
13
+ className?: string;
14
+ resendTxt?: React.ReactNode;
15
+ resendTime: string;
16
+ }
17
+
18
+ const AppOtpField = ({
19
+ otp,
20
+ onChange,
21
+ numInputs = 4,
22
+ otpError,
23
+ resendTimeout,
24
+ onResendOtp,
25
+ setResendTimeout,
26
+ className,
27
+ resendTxt,
28
+ resendTime,
29
+ }: AppOtpFieldProps) => {
30
+ useEffect(() => {
31
+ if (resendTimeout && resendTimeout > 0) {
32
+ const timer = setTimeout(() => {
33
+ setResendTimeout(resendTimeout - 1);
34
+ }, 1000);
35
+
36
+ return () => clearTimeout(timer);
37
+ }
38
+ }, [resendTimeout, setResendTimeout]);
39
+
40
+ return (
41
+ <div className={`appOtpField ${className}`}>
42
+ <OTPInput
43
+ value={otp}
44
+ onChange={onChange}
45
+ numInputs={numInputs}
46
+ containerStyle={"otpInputStyle"}
47
+ renderSeparator={<span>-</span>}
48
+ renderInput={(props) => <input {...props} />}
49
+ />
50
+ {otpError && <p className={"error"}>{otpError}</p>}{" "}
51
+ <div className={"resendWrap"}>
52
+ {resendTimeout !== undefined && (
53
+ <span className={"forgotPassword"}>
54
+ {resendTimeout > 0 ? (
55
+ <span className={"resendTimer"}>{resendTime}</span>
56
+ ) : (
57
+ onResendOtp && (
58
+ <span className={"resendBtn"} onClick={() => onResendOtp()}>
59
+ {resendTxt}
60
+ </span>
61
+ )
62
+ )}
63
+ </span>
64
+ )}
65
+ </div>
66
+ </div>
67
+ );
68
+ };
69
+
70
+ export default AppOtpField;
@@ -1,40 +1,40 @@
1
- import React from "react";
2
- import { Pagination } from "antd";
3
- import { PaginationProps } from "antd/lib/pagination";
4
-
5
- interface AppPaginationProps extends PaginationProps {
6
- total: number;
7
- currentPage: number;
8
- pageSize?: number;
9
- onPageChange: (page: number, pageSize: number) => void;
10
- showGotoBox: boolean;
11
- sizeChanger: boolean;
12
- className?: string;
13
- }
14
-
15
- const AppPagination = ({
16
- total,
17
- currentPage,
18
- pageSize = 10,
19
- onPageChange,
20
- showGotoBox = false,
21
- sizeChanger = true,
22
- className,
23
- ...rest
24
- }: AppPaginationProps) => {
25
- return (
26
- <div className={className}>
27
- <Pagination
28
- current={currentPage}
29
- pageSize={pageSize}
30
- total={total}
31
- onChange={onPageChange}
32
- showSizeChanger={sizeChanger}
33
- showQuickJumper={showGotoBox}
34
- {...rest}
35
- />
36
- </div>
37
- );
38
- };
39
-
40
- export default AppPagination;
1
+ import React from "react";
2
+ import { Pagination } from "antd";
3
+ import { PaginationProps } from "antd/lib/pagination";
4
+
5
+ interface AppPaginationProps extends PaginationProps {
6
+ total: number;
7
+ currentPage: number;
8
+ pageSize?: number;
9
+ onPageChange: (page: number, pageSize: number) => void;
10
+ showGotoBox: boolean;
11
+ sizeChanger: boolean;
12
+ className?: string;
13
+ }
14
+
15
+ const AppPagination = ({
16
+ total,
17
+ currentPage,
18
+ pageSize = 10,
19
+ onPageChange,
20
+ showGotoBox = false,
21
+ sizeChanger = true,
22
+ className,
23
+ ...rest
24
+ }: AppPaginationProps) => {
25
+ return (
26
+ <div className={className}>
27
+ <Pagination
28
+ current={currentPage}
29
+ pageSize={pageSize}
30
+ total={total}
31
+ onChange={onPageChange}
32
+ showSizeChanger={sizeChanger}
33
+ showQuickJumper={showGotoBox}
34
+ {...rest}
35
+ />
36
+ </div>
37
+ );
38
+ };
39
+
40
+ export default AppPagination;
@@ -1,41 +1,41 @@
1
- .appPasswordInput {
2
- font-size: var(--font-14);
3
- font-weight: 500;
4
- border: none;
5
- position: relative;
6
-
7
- .icon {
8
- position: absolute;
9
- right: 1rem;
10
- top: 50%;
11
- transform: translateY(-50%);
12
- display: flex;
13
- align-items: center;
14
- height: 100%;
15
- cursor: pointer;
16
- }
17
-
18
- *:focus {
19
- outline: 0 !important;
20
- box-shadow: unset !important;
21
- }
22
- .ant-input-outlined {
23
- height: 40px;
24
- &:hover {
25
- border-color: #bfbebe !important;
26
- }
27
- &::placeholder {
28
- color: #202123 !important;
29
- font-size: 14px;
30
- font-weight: 500;
31
- line-height: normal;
32
-
33
- }
34
- }
35
- }
36
-
37
- .error {
38
- color: red;
39
- font-size: 0.875rem;
40
- margin-top: 0.25rem;
41
- }
1
+ .appPasswordInput {
2
+ font-size: var(--font-14);
3
+ font-weight: 500;
4
+ border: none;
5
+ position: relative;
6
+
7
+ .icon {
8
+ position: absolute;
9
+ right: 1rem;
10
+ top: 50%;
11
+ transform: translateY(-50%);
12
+ display: flex;
13
+ align-items: center;
14
+ height: 100%;
15
+ cursor: pointer;
16
+ }
17
+
18
+ *:focus {
19
+ outline: 0 !important;
20
+ box-shadow: unset !important;
21
+ }
22
+ .ant-input-outlined {
23
+ height: 40px;
24
+ &:hover {
25
+ border-color: #bfbebe !important;
26
+ }
27
+ &::placeholder {
28
+ color: #202123 !important;
29
+ font-size: 14px;
30
+ font-weight: 500;
31
+ line-height: normal;
32
+
33
+ }
34
+ }
35
+ }
36
+
37
+ .error {
38
+ color: red;
39
+ font-size: 0.875rem;
40
+ margin-top: 0.25rem;
41
+ }