react-frontend-common-components 0.0.83 → 0.0.84
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.js +27 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -14
- 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 +81 -81
- package/src/components/app-input/app-input.tsx +119 -119
- 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 +55 -55
- package/src/components/app-select/app-select.tsx +130 -130
- 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 +34 -34
- 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
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-frontend-common-components",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Reusable frontend library",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
-
"rollup": "rollup -c --bundleConfigAsCjs"
|
|
11
|
-
},
|
|
12
|
-
"author": "",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
16
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
17
|
-
"@rollup/plugin-terser": "^0.4.4",
|
|
18
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
19
|
-
"postcss": "^8.4.45",
|
|
20
|
-
"react": "^18.3.1",
|
|
21
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
22
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
23
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
24
|
-
"tslib": "^2.7.0",
|
|
25
|
-
"typescript": "^5.5.4"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@react-google-maps/api": "^2.19.3",
|
|
29
|
-
"@types/react": "^18.3.5",
|
|
30
|
-
"@types/uuid": "^10.0.0",
|
|
31
|
-
"antd": "^5.20.5",
|
|
32
|
-
"chart.js": "^4.4.4",
|
|
33
|
-
"react-chartjs-2": "^5.2.0",
|
|
34
|
-
"react-icons": "^5.3.0",
|
|
35
|
-
"react-otp-input": "^3.1.1",
|
|
36
|
-
"react-phone-input-2": "^2.15.1",
|
|
37
|
-
"rollup": "^4.21.2",
|
|
38
|
-
"uuid": "^10.0.0"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-frontend-common-components",
|
|
3
|
+
"version": "0.0.84",
|
|
4
|
+
"description": "Reusable frontend library",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
+
"rollup": "rollup -c --bundleConfigAsCjs"
|
|
11
|
+
},
|
|
12
|
+
"author": "",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
16
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
17
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
18
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
19
|
+
"postcss": "^8.4.45",
|
|
20
|
+
"react": "^18.3.1",
|
|
21
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
22
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
23
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
24
|
+
"tslib": "^2.7.0",
|
|
25
|
+
"typescript": "^5.5.4"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@react-google-maps/api": "^2.19.3",
|
|
29
|
+
"@types/react": "^18.3.5",
|
|
30
|
+
"@types/uuid": "^10.0.0",
|
|
31
|
+
"antd": "^5.20.5",
|
|
32
|
+
"chart.js": "^4.4.4",
|
|
33
|
+
"react-chartjs-2": "^5.2.0",
|
|
34
|
+
"react-icons": "^5.3.0",
|
|
35
|
+
"react-otp-input": "^3.1.1",
|
|
36
|
+
"react-phone-input-2": "^2.15.1",
|
|
37
|
+
"rollup": "^4.21.2",
|
|
38
|
+
"uuid": "^10.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
3
|
-
import typescript from "@rollup/plugin-typescript";
|
|
4
|
-
import dts from "rollup-plugin-dts";
|
|
5
|
-
import terser from "@rollup/plugin-terser";
|
|
6
|
-
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
7
|
-
import postcss from "rollup-plugin-postcss";
|
|
8
|
-
|
|
9
|
-
const packageJson = require("./package.json");
|
|
10
|
-
|
|
11
|
-
export default [
|
|
12
|
-
// CommonJS and ES module output
|
|
13
|
-
{
|
|
14
|
-
input: "src/index.ts",
|
|
15
|
-
output: [
|
|
16
|
-
{
|
|
17
|
-
file: packageJson.main, // CommonJS
|
|
18
|
-
format: "cjs",
|
|
19
|
-
sourcemap: true,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
file: packageJson.module, // ES module
|
|
23
|
-
format: "esm",
|
|
24
|
-
sourcemap: true,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
plugins: [
|
|
28
|
-
peerDepsExternal(),
|
|
29
|
-
resolve(),
|
|
30
|
-
commonjs(),
|
|
31
|
-
typescript({ tsconfig: "./tsconfig.json" }),
|
|
32
|
-
terser(),
|
|
33
|
-
postcss(),
|
|
34
|
-
],
|
|
35
|
-
external: ["react", "react-dom"],
|
|
36
|
-
},
|
|
37
|
-
// TypeScript declaration files
|
|
38
|
-
{
|
|
39
|
-
input: "src/index.ts",
|
|
40
|
-
output: [{ file: packageJson.types }],
|
|
41
|
-
plugins: [dts.default()],
|
|
42
|
-
external: [/\.css/],
|
|
43
|
-
},
|
|
44
|
-
];
|
|
1
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
3
|
+
import typescript from "@rollup/plugin-typescript";
|
|
4
|
+
import dts from "rollup-plugin-dts";
|
|
5
|
+
import terser from "@rollup/plugin-terser";
|
|
6
|
+
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
7
|
+
import postcss from "rollup-plugin-postcss";
|
|
8
|
+
|
|
9
|
+
const packageJson = require("./package.json");
|
|
10
|
+
|
|
11
|
+
export default [
|
|
12
|
+
// CommonJS and ES module output
|
|
13
|
+
{
|
|
14
|
+
input: "src/index.ts",
|
|
15
|
+
output: [
|
|
16
|
+
{
|
|
17
|
+
file: packageJson.main, // CommonJS
|
|
18
|
+
format: "cjs",
|
|
19
|
+
sourcemap: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
file: packageJson.module, // ES module
|
|
23
|
+
format: "esm",
|
|
24
|
+
sourcemap: true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
plugins: [
|
|
28
|
+
peerDepsExternal(),
|
|
29
|
+
resolve(),
|
|
30
|
+
commonjs(),
|
|
31
|
+
typescript({ tsconfig: "./tsconfig.json" }),
|
|
32
|
+
terser(),
|
|
33
|
+
postcss(),
|
|
34
|
+
],
|
|
35
|
+
external: ["react", "react-dom"],
|
|
36
|
+
},
|
|
37
|
+
// TypeScript declaration files
|
|
38
|
+
{
|
|
39
|
+
input: "src/index.ts",
|
|
40
|
+
output: [{ file: packageJson.types }],
|
|
41
|
+
plugins: [dts.default()],
|
|
42
|
+
external: [/\.css/],
|
|
43
|
+
},
|
|
44
|
+
];
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Avatar } from "antd";
|
|
3
|
-
import type { AvatarProps } from "antd";
|
|
4
|
-
import { UserOutlined } from "@ant-design/icons";
|
|
5
|
-
|
|
6
|
-
interface AppAvatarProps extends AvatarProps {
|
|
7
|
-
fallbackIcon?: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const AppAvatar = ({
|
|
12
|
-
src,
|
|
13
|
-
fallbackIcon = <UserOutlined />,
|
|
14
|
-
className,
|
|
15
|
-
...props
|
|
16
|
-
}: AppAvatarProps) => {
|
|
17
|
-
return (
|
|
18
|
-
<div className={className}>
|
|
19
|
-
<Avatar src={src} icon={!src ? fallbackIcon : undefined} {...props} />
|
|
20
|
-
</div>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default AppAvatar;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Avatar } from "antd";
|
|
3
|
+
import type { AvatarProps } from "antd";
|
|
4
|
+
import { UserOutlined } from "@ant-design/icons";
|
|
5
|
+
|
|
6
|
+
interface AppAvatarProps extends AvatarProps {
|
|
7
|
+
fallbackIcon?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const AppAvatar = ({
|
|
12
|
+
src,
|
|
13
|
+
fallbackIcon = <UserOutlined />,
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: AppAvatarProps) => {
|
|
17
|
+
return (
|
|
18
|
+
<div className={className}>
|
|
19
|
+
<Avatar src={src} icon={!src ? fallbackIcon : undefined} {...props} />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default AppAvatar;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
.backArrow {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
cursor: pointer;
|
|
5
|
-
font-size: 1rem;
|
|
6
|
-
& > span {
|
|
7
|
-
display: flex;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.icon {
|
|
11
|
-
margin-right: 0.5rem;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.text {
|
|
15
|
-
font-weight: 500;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
.backArrow {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
font-size: 1rem;
|
|
6
|
+
& > span {
|
|
7
|
+
display: flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.icon {
|
|
11
|
+
margin-right: 0.5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.text {
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MouseEventHandler } from "react";
|
|
3
|
-
import Icons from "../../themes/icons/icons";
|
|
4
|
-
import "./app-back-arrow.css";
|
|
5
|
-
|
|
6
|
-
interface BackArrowProps {
|
|
7
|
-
text?: string;
|
|
8
|
-
href?: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
backIcon?: React.ReactNode;
|
|
11
|
-
onClick?: MouseEventHandler<HTMLElement>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const AppBackArrow = ({
|
|
15
|
-
text = "Back",
|
|
16
|
-
href,
|
|
17
|
-
className,
|
|
18
|
-
backIcon,
|
|
19
|
-
onClick,
|
|
20
|
-
}: BackArrowProps) => {
|
|
21
|
-
const handleNavigation: MouseEventHandler<HTMLElement> = (event) => {
|
|
22
|
-
if (onClick) {
|
|
23
|
-
onClick(event);
|
|
24
|
-
} else if (href) {
|
|
25
|
-
window.location.href = href;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div className={`backArrow ${className}`} onClick={handleNavigation}>
|
|
31
|
-
<span className={"icon"}>{backIcon || Icons.backArrow}</span>
|
|
32
|
-
{text && <span className={"text"}>{text}</span>}
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default AppBackArrow;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MouseEventHandler } from "react";
|
|
3
|
+
import Icons from "../../themes/icons/icons";
|
|
4
|
+
import "./app-back-arrow.css";
|
|
5
|
+
|
|
6
|
+
interface BackArrowProps {
|
|
7
|
+
text?: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
backIcon?: React.ReactNode;
|
|
11
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const AppBackArrow = ({
|
|
15
|
+
text = "Back",
|
|
16
|
+
href,
|
|
17
|
+
className,
|
|
18
|
+
backIcon,
|
|
19
|
+
onClick,
|
|
20
|
+
}: BackArrowProps) => {
|
|
21
|
+
const handleNavigation: MouseEventHandler<HTMLElement> = (event) => {
|
|
22
|
+
if (onClick) {
|
|
23
|
+
onClick(event);
|
|
24
|
+
} else if (href) {
|
|
25
|
+
window.location.href = href;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={`backArrow ${className}`} onClick={handleNavigation}>
|
|
31
|
+
<span className={"icon"}>{backIcon || Icons.backArrow}</span>
|
|
32
|
+
{text && <span className={"text"}>{text}</span>}
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default AppBackArrow;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.appBadge {
|
|
2
|
-
.ribbonWrapper {
|
|
3
|
-
.ant-ribbon-wrapper {
|
|
4
|
-
position: relative;
|
|
5
|
-
.ant-ribbon {
|
|
6
|
-
position: absolute;
|
|
7
|
-
top: 0;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
.appBadge {
|
|
2
|
+
.ribbonWrapper {
|
|
3
|
+
.ant-ribbon-wrapper {
|
|
4
|
+
position: relative;
|
|
5
|
+
.ant-ribbon {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Badge, BadgeProps as AntdBadgeProps } from "antd";
|
|
3
|
-
import "./app-badge.css";
|
|
4
|
-
|
|
5
|
-
interface AppBadgeProps extends Omit<AntdBadgeProps, "content"> {
|
|
6
|
-
content?: React.ReactNode;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
ribbon?: {
|
|
10
|
-
text: React.ReactNode;
|
|
11
|
-
color?: string;
|
|
12
|
-
placement?: "start" | "end";
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const AppBadge = ({
|
|
17
|
-
content,
|
|
18
|
-
children,
|
|
19
|
-
className,
|
|
20
|
-
ribbon,
|
|
21
|
-
...props
|
|
22
|
-
}: AppBadgeProps) => {
|
|
23
|
-
return (
|
|
24
|
-
<div className={`appBadge ${className}`}>
|
|
25
|
-
<Badge count={content} {...props}>
|
|
26
|
-
{ribbon ? (
|
|
27
|
-
<div className={"ribbonWrapper"}>
|
|
28
|
-
<Badge.Ribbon
|
|
29
|
-
text={ribbon.text}
|
|
30
|
-
color={ribbon.color}
|
|
31
|
-
placement={ribbon.placement}
|
|
32
|
-
>
|
|
33
|
-
{children}
|
|
34
|
-
</Badge.Ribbon>
|
|
35
|
-
</div>
|
|
36
|
-
) : (
|
|
37
|
-
children
|
|
38
|
-
)}
|
|
39
|
-
</Badge>
|
|
40
|
-
</div>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default AppBadge;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Badge, BadgeProps as AntdBadgeProps } from "antd";
|
|
3
|
+
import "./app-badge.css";
|
|
4
|
+
|
|
5
|
+
interface AppBadgeProps extends Omit<AntdBadgeProps, "content"> {
|
|
6
|
+
content?: React.ReactNode;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
ribbon?: {
|
|
10
|
+
text: React.ReactNode;
|
|
11
|
+
color?: string;
|
|
12
|
+
placement?: "start" | "end";
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const AppBadge = ({
|
|
17
|
+
content,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
ribbon,
|
|
21
|
+
...props
|
|
22
|
+
}: AppBadgeProps) => {
|
|
23
|
+
return (
|
|
24
|
+
<div className={`appBadge ${className}`}>
|
|
25
|
+
<Badge count={content} {...props}>
|
|
26
|
+
{ribbon ? (
|
|
27
|
+
<div className={"ribbonWrapper"}>
|
|
28
|
+
<Badge.Ribbon
|
|
29
|
+
text={ribbon.text}
|
|
30
|
+
color={ribbon.color}
|
|
31
|
+
placement={ribbon.placement}
|
|
32
|
+
>
|
|
33
|
+
{children}
|
|
34
|
+
</Badge.Ribbon>
|
|
35
|
+
</div>
|
|
36
|
+
) : (
|
|
37
|
+
children
|
|
38
|
+
)}
|
|
39
|
+
</Badge>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default AppBadge;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Breadcrumb, BreadcrumbProps } from "antd";
|
|
3
|
-
|
|
4
|
-
interface AppBreadcrumbProps extends BreadcrumbProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const AppBreadcrumb = ({ className, ...props }: AppBreadcrumbProps) => {
|
|
9
|
-
return (
|
|
10
|
-
<div className={className}>
|
|
11
|
-
<Breadcrumb {...props} />
|
|
12
|
-
</div>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default AppBreadcrumb;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Breadcrumb, BreadcrumbProps } from "antd";
|
|
3
|
+
|
|
4
|
+
interface AppBreadcrumbProps extends BreadcrumbProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const AppBreadcrumb = ({ className, ...props }: AppBreadcrumbProps) => {
|
|
9
|
+
return (
|
|
10
|
+
<div className={className}>
|
|
11
|
+
<Breadcrumb {...props} />
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default AppBreadcrumb;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.appButton {
|
|
2
|
-
width: max-content;
|
|
3
|
-
|
|
4
|
-
.ant-btn {
|
|
5
|
-
padding: 12px;
|
|
6
|
-
height: unset;
|
|
7
|
-
&:hover {
|
|
8
|
-
border-color: transparent !important;
|
|
9
|
-
outline: unset !important;
|
|
10
|
-
box-shadow: unset !important;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
.appButton {
|
|
2
|
+
width: max-content;
|
|
3
|
+
|
|
4
|
+
.ant-btn {
|
|
5
|
+
padding: 12px;
|
|
6
|
+
height: unset;
|
|
7
|
+
&:hover {
|
|
8
|
+
border-color: transparent !important;
|
|
9
|
+
outline: unset !important;
|
|
10
|
+
box-shadow: unset !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Button } from "antd";
|
|
2
|
-
import { MouseEventHandler } from "react";
|
|
3
|
-
import { SizeType } from "antd/lib/config-provider/SizeContext";
|
|
4
|
-
import "./app-button.css";
|
|
5
|
-
import React from "react";
|
|
6
|
-
|
|
7
|
-
interface AppButtonProps {
|
|
8
|
-
size?: "small" | "middle" | "large" | "default" | undefined;
|
|
9
|
-
className?: string;
|
|
10
|
-
handleClick?: MouseEventHandler<HTMLElement>;
|
|
11
|
-
icon?: React.ReactNode;
|
|
12
|
-
text?: string;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
iconPosition?: string;
|
|
15
|
-
isLoading?: boolean;
|
|
16
|
-
type?: "default" | "text" | "link" | "primary" | "dashed" | undefined;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const AppButton = ({
|
|
20
|
-
type,
|
|
21
|
-
size,
|
|
22
|
-
className,
|
|
23
|
-
handleClick,
|
|
24
|
-
icon,
|
|
25
|
-
text,
|
|
26
|
-
disabled,
|
|
27
|
-
iconPosition,
|
|
28
|
-
isLoading,
|
|
29
|
-
}: AppButtonProps) => {
|
|
30
|
-
return (
|
|
31
|
-
<div className={`appButton ${className}`}>
|
|
32
|
-
<Button
|
|
33
|
-
disabled={disabled}
|
|
34
|
-
type={type}
|
|
35
|
-
className={[
|
|
36
|
-
"customBtn",
|
|
37
|
-
icon ? "btn-icon" : "",
|
|
38
|
-
iconPosition === "right" ? "iconRight" : "",
|
|
39
|
-
].join(" ")}
|
|
40
|
-
size={size as SizeType}
|
|
41
|
-
onClick={handleClick}
|
|
42
|
-
icon={icon}
|
|
43
|
-
loading={isLoading}
|
|
44
|
-
>
|
|
45
|
-
{text}
|
|
46
|
-
</Button>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export default AppButton;
|
|
1
|
+
import { Button } from "antd";
|
|
2
|
+
import { MouseEventHandler } from "react";
|
|
3
|
+
import { SizeType } from "antd/lib/config-provider/SizeContext";
|
|
4
|
+
import "./app-button.css";
|
|
5
|
+
import React from "react";
|
|
6
|
+
|
|
7
|
+
interface AppButtonProps {
|
|
8
|
+
size?: "small" | "middle" | "large" | "default" | undefined;
|
|
9
|
+
className?: string;
|
|
10
|
+
handleClick?: MouseEventHandler<HTMLElement>;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
text?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
iconPosition?: string;
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
type?: "default" | "text" | "link" | "primary" | "dashed" | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const AppButton = ({
|
|
20
|
+
type,
|
|
21
|
+
size,
|
|
22
|
+
className,
|
|
23
|
+
handleClick,
|
|
24
|
+
icon,
|
|
25
|
+
text,
|
|
26
|
+
disabled,
|
|
27
|
+
iconPosition,
|
|
28
|
+
isLoading,
|
|
29
|
+
}: AppButtonProps) => {
|
|
30
|
+
return (
|
|
31
|
+
<div className={`appButton ${className}`}>
|
|
32
|
+
<Button
|
|
33
|
+
disabled={disabled}
|
|
34
|
+
type={type}
|
|
35
|
+
className={[
|
|
36
|
+
"customBtn",
|
|
37
|
+
icon ? "btn-icon" : "",
|
|
38
|
+
iconPosition === "right" ? "iconRight" : "",
|
|
39
|
+
].join(" ")}
|
|
40
|
+
size={size as SizeType}
|
|
41
|
+
onClick={handleClick}
|
|
42
|
+
icon={icon}
|
|
43
|
+
loading={isLoading}
|
|
44
|
+
>
|
|
45
|
+
{text}
|
|
46
|
+
</Button>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default AppButton;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.borderless {
|
|
2
|
-
border: none !important;
|
|
3
|
-
box-shadow: none !important;
|
|
4
|
-
& * {
|
|
5
|
-
border: none !important;
|
|
6
|
-
box-shadow: none !important;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
.borderless {
|
|
2
|
+
border: none !important;
|
|
3
|
+
box-shadow: none !important;
|
|
4
|
+
& * {
|
|
5
|
+
border: none !important;
|
|
6
|
+
box-shadow: none !important;
|
|
7
|
+
}
|
|
8
|
+
}
|