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.
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,57 +1,57 @@
1
- import React from "react";
2
- import { Collapse } from "antd";
3
- import { CollapseProps, CollapsePanelProps } from "antd/lib/collapse";
4
-
5
- const { Panel } = Collapse;
6
-
7
- interface AppCollapseProps extends CollapseProps {
8
- panels?: {
9
- key: string;
10
- header: React.ReactNode;
11
- content: React.ReactNode;
12
- collapsible?: CollapsePanelProps["collapsible"];
13
- }[];
14
- className?: string;
15
- }
16
-
17
- const AppCollapse = ({
18
- panels = [],
19
- defaultActiveKey,
20
- onChange,
21
- expandIconPosition,
22
- ghost,
23
- accordion,
24
- expandIcon,
25
- size,
26
- bordered,
27
- activeKey,
28
- className,
29
- ...restProps
30
- }: AppCollapseProps) => {
31
- const items = panels.map((panel) => ({
32
- key: panel.key,
33
- label: panel.header,
34
- children: panel.content,
35
- collapsible: panel.collapsible,
36
- }));
37
-
38
- return (
39
- <div className={className}>
40
- <Collapse
41
- defaultActiveKey={defaultActiveKey}
42
- onChange={onChange}
43
- expandIconPosition={expandIconPosition}
44
- ghost={ghost}
45
- accordion={accordion}
46
- expandIcon={expandIcon}
47
- size={size}
48
- bordered={bordered}
49
- activeKey={activeKey}
50
- items={items}
51
- {...restProps}
52
- />
53
- </div>
54
- );
55
- };
56
-
57
- export default AppCollapse;
1
+ import React from "react";
2
+ import { Collapse } from "antd";
3
+ import { CollapseProps, CollapsePanelProps } from "antd/lib/collapse";
4
+
5
+ const { Panel } = Collapse;
6
+
7
+ interface AppCollapseProps extends CollapseProps {
8
+ panels?: {
9
+ key: string;
10
+ header: React.ReactNode;
11
+ content: React.ReactNode;
12
+ collapsible?: CollapsePanelProps["collapsible"];
13
+ }[];
14
+ className?: string;
15
+ }
16
+
17
+ const AppCollapse = ({
18
+ panels = [],
19
+ defaultActiveKey,
20
+ onChange,
21
+ expandIconPosition,
22
+ ghost,
23
+ accordion,
24
+ expandIcon,
25
+ size,
26
+ bordered,
27
+ activeKey,
28
+ className,
29
+ ...restProps
30
+ }: AppCollapseProps) => {
31
+ const items = panels.map((panel) => ({
32
+ key: panel.key,
33
+ label: panel.header,
34
+ children: panel.content,
35
+ collapsible: panel.collapsible,
36
+ }));
37
+
38
+ return (
39
+ <div className={className}>
40
+ <Collapse
41
+ defaultActiveKey={defaultActiveKey}
42
+ onChange={onChange}
43
+ expandIconPosition={expandIconPosition}
44
+ ghost={ghost}
45
+ accordion={accordion}
46
+ expandIcon={expandIcon}
47
+ size={size}
48
+ bordered={bordered}
49
+ activeKey={activeKey}
50
+ items={items}
51
+ {...restProps}
52
+ />
53
+ </div>
54
+ );
55
+ };
56
+
57
+ export default AppCollapse;
@@ -1,116 +1,116 @@
1
- .wrapper {
2
- width: 100vw;
3
- height: 100vh;
4
- position: fixed;
5
- top: 0;
6
- left: 0;
7
- background-color: (0, 0, 0, 0.3);
8
- backdrop-filter: blur(10px);
9
- display: flex;
10
- z-index: 99;
11
- }
12
-
13
- /*code for custom loading icon*/
14
-
15
- .loader {
16
- position: relative;
17
- width: 80px;
18
- margin-left: 45%;
19
- margin-top: 25%;
20
- }
21
-
22
- .loader span {
23
- display: block;
24
- transform-origin: 40px 40px;
25
- animation: ding 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
26
- }
27
-
28
- .loader span::before {
29
- content: "";
30
- position: absolute;
31
- width: 5px;
32
- height: 5px;
33
- border-radius: 50%;
34
- background: rgb(0, 0, 0);
35
- margin: -4px 0 0 -4px;
36
- }
37
-
38
- .loader span:nth-child(1) {
39
- animation-delay: -0.36s;
40
- }
41
-
42
- .loader span:nth-child(1):before {
43
- top: 63px;
44
- left: 63px;
45
- }
46
-
47
- .loader span:nth-child(2) {
48
- animation-delay: -0.72s;
49
- }
50
-
51
- .loader span:nth-child(2):before {
52
- top: 68px;
53
- left: 56px;
54
- }
55
-
56
- .loader span:nth-child(3) {
57
- animation-delay: -0.108s;
58
- }
59
-
60
- .loader span:nth-child(3):before {
61
- top: 71px;
62
- left: 48px;
63
- }
64
- .loader span:nth-child(4) {
65
- animation-delay: -0.144s;
66
- }
67
-
68
- .loader span:nth-child(4):before {
69
- top: 72px;
70
- left: 40px;
71
- }
72
-
73
- .loader span:nth-child(5) {
74
- animation-delay: -0.18;
75
- }
76
-
77
- .loader span:nth-child(5):before {
78
- top: 71px;
79
- left: 32px;
80
- }
81
-
82
- .loader span:nth-child(6) {
83
- animation-delay: -0.216s;
84
- }
85
-
86
- .loader span:nth-child(6):before {
87
- top: 68px;
88
- left: 24px;
89
- }
90
-
91
- .loader span:nth-child(7) {
92
- animation-delay: -0.252s;
93
- }
94
-
95
- .loader span:nth-child(7):before {
96
- top: 63px;
97
- left: 17px;
98
- }
99
-
100
- .loader span:nth-child(8) {
101
- animation-delay: -0.288s;
102
- }
103
-
104
- .loader span:nth-child(8):before {
105
- top: 56px;
106
- left: 12px;
107
- }
108
-
109
- @keyframes ding {
110
- 0% {
111
- transform: rotate(0deg);
112
- }
113
- 100% {
114
- transform: rotate(360deg);
115
- }
116
- }
1
+ .wrapper {
2
+ width: 100vw;
3
+ height: 100vh;
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ background-color: (0, 0, 0, 0.3);
8
+ backdrop-filter: blur(10px);
9
+ display: flex;
10
+ z-index: 99;
11
+ }
12
+
13
+ /*code for custom loading icon*/
14
+
15
+ .loader {
16
+ position: relative;
17
+ width: 80px;
18
+ margin-left: 45%;
19
+ margin-top: 25%;
20
+ }
21
+
22
+ .loader span {
23
+ display: block;
24
+ transform-origin: 40px 40px;
25
+ animation: ding 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
26
+ }
27
+
28
+ .loader span::before {
29
+ content: "";
30
+ position: absolute;
31
+ width: 5px;
32
+ height: 5px;
33
+ border-radius: 50%;
34
+ background: rgb(0, 0, 0);
35
+ margin: -4px 0 0 -4px;
36
+ }
37
+
38
+ .loader span:nth-child(1) {
39
+ animation-delay: -0.36s;
40
+ }
41
+
42
+ .loader span:nth-child(1):before {
43
+ top: 63px;
44
+ left: 63px;
45
+ }
46
+
47
+ .loader span:nth-child(2) {
48
+ animation-delay: -0.72s;
49
+ }
50
+
51
+ .loader span:nth-child(2):before {
52
+ top: 68px;
53
+ left: 56px;
54
+ }
55
+
56
+ .loader span:nth-child(3) {
57
+ animation-delay: -0.108s;
58
+ }
59
+
60
+ .loader span:nth-child(3):before {
61
+ top: 71px;
62
+ left: 48px;
63
+ }
64
+ .loader span:nth-child(4) {
65
+ animation-delay: -0.144s;
66
+ }
67
+
68
+ .loader span:nth-child(4):before {
69
+ top: 72px;
70
+ left: 40px;
71
+ }
72
+
73
+ .loader span:nth-child(5) {
74
+ animation-delay: -0.18;
75
+ }
76
+
77
+ .loader span:nth-child(5):before {
78
+ top: 71px;
79
+ left: 32px;
80
+ }
81
+
82
+ .loader span:nth-child(6) {
83
+ animation-delay: -0.216s;
84
+ }
85
+
86
+ .loader span:nth-child(6):before {
87
+ top: 68px;
88
+ left: 24px;
89
+ }
90
+
91
+ .loader span:nth-child(7) {
92
+ animation-delay: -0.252s;
93
+ }
94
+
95
+ .loader span:nth-child(7):before {
96
+ top: 63px;
97
+ left: 17px;
98
+ }
99
+
100
+ .loader span:nth-child(8) {
101
+ animation-delay: -0.288s;
102
+ }
103
+
104
+ .loader span:nth-child(8):before {
105
+ top: 56px;
106
+ left: 12px;
107
+ }
108
+
109
+ @keyframes ding {
110
+ 0% {
111
+ transform: rotate(0deg);
112
+ }
113
+ 100% {
114
+ transform: rotate(360deg);
115
+ }
116
+ }
@@ -1,23 +1,23 @@
1
- import "./app-custom-loader.css";
2
-
3
- interface AppCustomLoaderProps {
4
- className?: string;
5
- }
6
-
7
- const AppCustomLoader = ({ className }: AppCustomLoaderProps) => {
8
- return (
9
- <div className={`wrapper ${className}`}>
10
- <div className={"loader"}>
11
- <span></span>
12
- <span></span>
13
- <span></span>
14
- <span></span>
15
- <span></span>
16
- <span></span>
17
- <span></span>
18
- <span></span>
19
- </div>
20
- </div>
21
- );
22
- };
23
- export default AppCustomLoader;
1
+ import "./app-custom-loader.css";
2
+
3
+ interface AppCustomLoaderProps {
4
+ className?: string;
5
+ }
6
+
7
+ const AppCustomLoader = ({ className }: AppCustomLoaderProps) => {
8
+ return (
9
+ <div className={`wrapper ${className}`}>
10
+ <div className={"loader"}>
11
+ <span></span>
12
+ <span></span>
13
+ <span></span>
14
+ <span></span>
15
+ <span></span>
16
+ <span></span>
17
+ <span></span>
18
+ <span></span>
19
+ </div>
20
+ </div>
21
+ );
22
+ };
23
+ export default AppCustomLoader;
@@ -1,16 +1,16 @@
1
- import React from "react";
2
- import { Divider, DividerProps } from "antd";
3
-
4
- interface AppDividerProps extends DividerProps {
5
- className?: string;
6
- }
7
-
8
- const AppDivider = ({ className, ...props }: AppDividerProps) => {
9
- return (
10
- <div className={className}>
11
- <Divider {...props} />
12
- </div>
13
- );
14
- };
15
-
16
- export default AppDivider;
1
+ import React from "react";
2
+ import { Divider, DividerProps } from "antd";
3
+
4
+ interface AppDividerProps extends DividerProps {
5
+ className?: string;
6
+ }
7
+
8
+ const AppDivider = ({ className, ...props }: AppDividerProps) => {
9
+ return (
10
+ <div className={className}>
11
+ <Divider {...props} />
12
+ </div>
13
+ );
14
+ };
15
+
16
+ export default AppDivider;
@@ -1,23 +1,23 @@
1
- import React from "react";
2
- import { FloatButton, FloatButtonProps } from "antd";
3
-
4
- interface AppFloatButtonProps extends FloatButtonProps {
5
- className?: string;
6
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
7
- onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
8
- }
9
-
10
- const AppFloatButton = ({
11
- className,
12
- onClick,
13
- onMouseEnter,
14
- ...props
15
- }: AppFloatButtonProps) => {
16
- return (
17
- <div className={className}>
18
- <FloatButton {...props} onClick={onClick} onMouseEnter={onMouseEnter} />
19
- </div>
20
- );
21
- };
22
-
23
- export default AppFloatButton;
1
+ import React from "react";
2
+ import { FloatButton, FloatButtonProps } from "antd";
3
+
4
+ interface AppFloatButtonProps extends FloatButtonProps {
5
+ className?: string;
6
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
7
+ onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
8
+ }
9
+
10
+ const AppFloatButton = ({
11
+ className,
12
+ onClick,
13
+ onMouseEnter,
14
+ ...props
15
+ }: AppFloatButtonProps) => {
16
+ return (
17
+ <div className={className}>
18
+ <FloatButton {...props} onClick={onClick} onMouseEnter={onMouseEnter} />
19
+ </div>
20
+ );
21
+ };
22
+
23
+ export default AppFloatButton;
@@ -1,22 +1,22 @@
1
- .appImageBox {
2
- width: max-content;
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- gap: 1rem;
7
-
8
- .ant-image {
9
- border-radius: 50%;
10
- overflow: hidden;
11
-
12
- .ant-image-img {
13
- border-radius: 50%;
14
- }
15
- }
16
- .text {
17
- font-size: 16px;
18
- font-weight: 700;
19
- line-height: normal;
20
- color: #000000;
21
- }
22
- }
1
+ .appImageBox {
2
+ width: max-content;
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: center;
6
+ gap: 1rem;
7
+
8
+ .ant-image {
9
+ border-radius: 50%;
10
+ overflow: hidden;
11
+
12
+ .ant-image-img {
13
+ border-radius: 50%;
14
+ }
15
+ }
16
+ .text {
17
+ font-size: 16px;
18
+ font-weight: 700;
19
+ line-height: normal;
20
+ color: #000000;
21
+ }
22
+ }
@@ -1,42 +1,42 @@
1
- import React, { MouseEventHandler } from "react";
2
- import { Image } from "antd";
3
- import "./app-image-box.css";
4
-
5
- interface ImageType {
6
- src: string;
7
- }
8
-
9
- interface AppImageBoxProps {
10
- width?: number;
11
- height?: number;
12
- text?: string;
13
- image: ImageType;
14
- className?: string;
15
- handleClick?: MouseEventHandler<HTMLElement>;
16
- }
17
-
18
- const AppImageBox = ({
19
- width = 100,
20
- height = 100,
21
- text,
22
- image,
23
- className,
24
- handleClick,
25
- }: AppImageBoxProps) => {
26
- return (
27
- <div className={`appImageBox ${className}`} onClick={handleClick}>
28
- <Image
29
- preview={false}
30
- width={width}
31
- height={height}
32
- src={image.src}
33
- alt={text}
34
- />
35
- {text && (
36
- <span className={"text"} dangerouslySetInnerHTML={{ __html: text }} />
37
- )}
38
- </div>
39
- );
40
- };
41
-
42
- export default AppImageBox;
1
+ import React, { MouseEventHandler } from "react";
2
+ import { Image } from "antd";
3
+ import "./app-image-box.css";
4
+
5
+ interface ImageType {
6
+ src: string;
7
+ }
8
+
9
+ interface AppImageBoxProps {
10
+ width?: number;
11
+ height?: number;
12
+ text?: string;
13
+ image: ImageType;
14
+ className?: string;
15
+ handleClick?: MouseEventHandler<HTMLElement>;
16
+ }
17
+
18
+ const AppImageBox = ({
19
+ width = 100,
20
+ height = 100,
21
+ text,
22
+ image,
23
+ className,
24
+ handleClick,
25
+ }: AppImageBoxProps) => {
26
+ return (
27
+ <div className={`appImageBox ${className}`} onClick={handleClick}>
28
+ <Image
29
+ preview={false}
30
+ width={width}
31
+ height={height}
32
+ src={image.src}
33
+ alt={text}
34
+ />
35
+ {text && (
36
+ <span className={"text"} dangerouslySetInnerHTML={{ __html: text }} />
37
+ )}
38
+ </div>
39
+ );
40
+ };
41
+
42
+ export default AppImageBox;