pixelize-design-library 1.1.94 → 2.0.1
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/App.js +25 -11
- package/dist/Assets/defaultLogo.d.ts +3 -0
- package/dist/Assets/defaultLogo.js +15 -0
- package/dist/Assets/defaultLogo.tsx +31 -0
- package/dist/Components/Button/Button.d.ts +1 -1
- package/dist/Components/Button/Button.js +2 -59
- package/dist/Components/Button/Button.styles.d.ts +2 -0
- package/dist/Components/Button/Button.styles.js +112 -0
- package/dist/Components/Button/ButtonProps.d.ts +4 -3
- package/dist/Components/Checkbox/Checkbox.styles.d.ts +2 -0
- package/dist/Components/Checkbox/Checkbox.styles.js +54 -0
- package/dist/Components/Common/FormLabel.js +8 -4
- package/dist/Components/Divider/Divider.d.ts +3 -0
- package/dist/Components/Divider/Divider.js +14 -0
- package/dist/Components/Input/TextInput.d.ts +1 -1
- package/dist/Components/Input/TextInput.js +17 -23
- package/dist/Components/Input/TextInput.styles.d.ts +2 -0
- package/dist/Components/Input/TextInput.styles.js +68 -0
- package/dist/Components/Input/TextInputProps.d.ts +3 -1
- package/dist/Components/SideBar/SideBar.d.ts +1 -1
- package/dist/Components/SideBar/SideBar.js +44 -61
- package/dist/Components/SideBar/SideBarProps.d.ts +18 -8
- package/dist/Components/SideBar/components/MenuItemBox.d.ts +11 -0
- package/dist/Components/SideBar/components/MenuItemBox.js +116 -0
- package/dist/Components/SideBar/components/MenuItems.d.ts +4 -0
- package/dist/Components/SideBar/components/MenuItems.js +13 -0
- package/dist/Components/SideBar/components/MenuPopoverContent.d.ts +9 -0
- package/dist/Components/SideBar/components/MenuPopoverContent.js +37 -0
- package/dist/Components/SideBar/components/TextTruncation.d.ts +8 -0
- package/dist/Components/SideBar/components/TextTruncation.js +65 -0
- package/dist/Components/Table/Components/HeaderActions.d.ts +7 -0
- package/dist/Components/Table/Components/HeaderActions.js +45 -0
- package/dist/Components/Table/Components/Pagination.js +7 -12
- package/dist/Components/Table/Components/TableBody.d.ts +1 -1
- package/dist/Components/Table/Components/TableBody.js +23 -30
- package/dist/Components/Table/Components/TableHeader.js +17 -30
- package/dist/Components/Table/Components/TableSearch.d.ts +6 -0
- package/dist/Components/Table/Components/TableSearch.js +60 -0
- package/dist/Components/Table/Components/useTable.d.ts +1 -0
- package/dist/Components/Table/Components/useTable.js +6 -0
- package/dist/Components/Table/Table.d.ts +1 -1
- package/dist/Components/Table/Table.js +25 -13
- package/dist/Components/Table/TableProps.d.ts +16 -0
- package/dist/Components/Table/TableSettings/ManageColumns.js +2 -6
- package/dist/Components/Table/TableSettings/TableSettings.js +6 -6
- package/dist/Components/Toggle/TableToggle.d.ts +4 -0
- package/dist/Components/Toggle/TableToggle.js +57 -0
- package/dist/Components/Toggle/TableToggleProps.d.ts +5 -0
- package/dist/Constants/Sidebar.js +25 -2
- package/dist/Layout.js +33 -32
- package/dist/Pages/TInput.js +4 -1
- package/dist/Pages/button.js +1 -1
- package/dist/Pages/input.js +16 -9
- package/dist/Pages/modal.js +1 -1
- package/dist/Pages/toster.js +1 -1
- package/dist/Theme/Default/palette.d.ts +19 -0
- package/dist/Theme/Default/palette.js +19 -0
- package/dist/Theme/Default/theme.js +2 -1
- package/dist/Theme/Meadow/palette.d.ts +168 -0
- package/dist/Theme/Meadow/palette.js +186 -32
- package/dist/Theme/Meadow/theme.js +2 -1
- package/dist/Theme/Radiant/palette.d.ts +168 -0
- package/dist/Theme/Radiant/palette.js +186 -32
- package/dist/Theme/Radiant/theme.js +2 -1
- package/dist/Theme/Skyline/palette.d.ts +168 -0
- package/dist/Theme/Skyline/palette.js +185 -31
- package/dist/Theme/Skyline/theme.js +2 -1
- package/dist/Theme/componentStyles.d.ts +5 -0
- package/dist/Theme/componentStyles.js +11 -0
- package/dist/Theme/themeProps.d.ts +168 -0
- package/dist/Utils/table.d.ts +9 -0
- package/dist/Utils/table.js +47 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/withTheme.js +1 -1
- package/package.json +1 -1
- package/dist/Components/KaTable/CustomHeader.d.ts +0 -14
- package/dist/Components/KaTable/CustomHeader.js +0 -69
- package/dist/Components/KaTable/KaTable.d.ts +0 -13
- package/dist/Components/KaTable/KaTable.js +0 -111
- package/dist/Components/KaTable/KaTableProps.d.ts +0 -23
- package/dist/Components/KaTable/SelectionCell.d.ts +0 -8
- package/dist/Components/KaTable/SelectionCell.js +0 -38
- package/dist/Components/KaTable/SelectionHeader.d.ts +0 -3
- package/dist/Components/KaTable/SelectionHeader.js +0 -56
- package/dist/Components/KaTable/ka-table.css +0 -27
- package/dist/Components/KaTable/useMergedChildComponents.d.ts +0 -14
- package/dist/Components/KaTable/useMergedChildComponents.js +0 -224
- package/dist/Pages/KaTableExample.d.ts +0 -3
- package/dist/Pages/KaTableExample.js +0 -259
- package/dist/Theme/Default/fonts.d.ts +0 -35
- package/dist/Theme/Default/fonts.js +0 -37
- /package/dist/Components/{KaTable/KaTableProps.js → Toggle/TableToggleProps.js} +0 -0
package/dist/App.js
CHANGED
|
@@ -64,16 +64,26 @@ function App() {
|
|
|
64
64
|
console.log("Navigating to ".concat(path));
|
|
65
65
|
};
|
|
66
66
|
var menu = [
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
67
|
+
{ id: 1, title: "Dashboard", icon: lucide_react_1.House, url: "dashboard" },
|
|
68
|
+
{ id: 2, title: "Calendar", icon: lucide_react_1.Calendar, url: "calendar" },
|
|
69
|
+
{ id: 3, title: "Reports", icon: lucide_react_1.Calendar, url: "reports" },
|
|
70
|
+
{ id: 4, title: "Settings", icon: lucide_react_1.Calendar, url: "settings" },
|
|
71
|
+
{ id: 5, title: "Users", icon: lucide_react_1.Calendar, url: "users" },
|
|
72
|
+
{ id: 6, title: "Notifications", icon: lucide_react_1.Calendar, url: "notifications" },
|
|
73
|
+
{ id: 7, title: "Analytics", icon: lucide_react_1.Calendar, url: "analytics" },
|
|
74
|
+
{ id: 8, title: "Projects", icon: lucide_react_1.Calendar, url: "projects" },
|
|
75
|
+
{ id: 9, title: "Tasks", icon: lucide_react_1.Calendar, url: "tasks" },
|
|
76
|
+
{ id: 10, title: "Teams", icon: lucide_react_1.Calendar, url: "teams" },
|
|
77
|
+
{ id: 11, title: "Clients", icon: lucide_react_1.Calendar, url: "clients" },
|
|
78
|
+
{ id: 12, title: "Invoices", icon: lucide_react_1.Calendar, url: "invoices" },
|
|
79
|
+
{ id: 13, title: "Payments", icon: lucide_react_1.Calendar, url: "payments" },
|
|
80
|
+
{ id: 14, title: "Leads", icon: lucide_react_1.Calendar, url: "leads" },
|
|
81
|
+
{ id: 15, title: "Opportunities", icon: lucide_react_1.Calendar, url: "opportunities" },
|
|
82
|
+
{ id: 16, title: "Campaigns", icon: lucide_react_1.Calendar, url: "campaigns" },
|
|
83
|
+
{ id: 17, title: "Documents", icon: lucide_react_1.Calendar, url: "documents" },
|
|
84
|
+
{ id: 18, title: "Files", icon: lucide_react_1.Calendar, url: "files" },
|
|
85
|
+
{ id: 19, title: "Support", icon: lucide_react_1.Calendar, url: "support" },
|
|
86
|
+
{ id: 20, title: "Integrations", icon: lucide_react_1.Calendar, url: "integrations" },
|
|
77
87
|
];
|
|
78
88
|
var _b = (0, react_1.useState)(true), toggle = _b[0], changeToggle = _b[1];
|
|
79
89
|
var _c = (0, react_1.useState)(""), activeMenu = _c[0], setActiveMenu = _c[1];
|
|
@@ -91,7 +101,11 @@ function App() {
|
|
|
91
101
|
react_1.default.createElement(Loading_1.default, { text: "PIXELIZE CRM", isLoading: false, onlytext: true }),
|
|
92
102
|
react_1.default.createElement(react_2.Flex, null,
|
|
93
103
|
react_1.default.createElement(react_2.Box, null,
|
|
94
|
-
react_1.default.createElement(SideBar_1.default, { menus: menu, activeMenu: activeMenu, handleMenuClick: handleMenuClick, toggle: toggle, changeToggle: function () { return changeToggle(!toggle); },
|
|
104
|
+
react_1.default.createElement(SideBar_1.default, { menus: menu, activeMenu: activeMenu, handleMenuClick: handleMenuClick, toggle: toggle, changeToggle: function () { return changeToggle(!toggle); },
|
|
105
|
+
// logo={
|
|
106
|
+
// "https://play-lh.googleusercontent.com/Fro4e_osoDhhrjgiZ_Y2C5FNXBMWvrb4rGpmkM1PDAcUPXeiAlPCq7NeaT4Q6NRUxRqo"
|
|
107
|
+
// }
|
|
108
|
+
companyName: "PIXELIZE" })),
|
|
95
109
|
react_1.default.createElement(react_2.Box, { flex: "1", maxWidth: width, overflow: "hidden" },
|
|
96
110
|
react_1.default.createElement(NavigationBar_1.default, { userAvathar: "https://bit.ly/dan-abramo", userName: "PIXELIZE", navMenu: navmenus, handleNavOnClick: handleNavOnClick, handleLogout: handleLogout, logoutText: "Logout", key: "navbar", moreIcon: react_1.default.createElement(lucide_react_1.Calendar, null) }),
|
|
97
111
|
react_1.default.createElement("br", null),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var useCustomTheme_1 = require("../Theme/useCustomTheme");
|
|
8
|
+
var DefaultLogo = function () {
|
|
9
|
+
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
10
|
+
return (react_1.default.createElement("svg", { width: "12.09", height: "15.95", viewBox: "0 0 31 29", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11
|
+
react_1.default.createElement("path", { d: "M30.4999 6.26137V7.81058H15.9761H14.8787V22.8508V28.8862H12.5226C9.6824 28.8862 7.32632 26.4656 7.06812 23.3995C7.06812 23.2381 7.06812 23.0444 7.06812 22.8508V18.3323C7.06812 18.2677 7.06812 18.2032 7.06812 18.1063V15.5889V6.2291C7.06812 2.80793 9.84378 -5.72205e-06 13.2972 -5.72205e-06H24.8517C28.0147 0.355021 30.4676 3.00158 30.4676 6.2291L30.4999 6.26137Z", fill: theme.colors.black }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M7.10053 23.3672H7.03598C5.16402 23.2381 3.48571 22.4635 2.25926 21.3338C0.871428 20.0428 0 18.2677 0 16.3312V15.6211H7.06825V18.1386C7.06825 18.2032 7.06825 18.2677 7.06825 18.3645V22.883C7.06825 23.0767 7.06825 23.2381 7.06825 23.4317L7.10053 23.3672Z", fill: theme.colors.black }),
|
|
13
|
+
react_1.default.createElement("path", { d: "M30.4678 12.0063V15.6211V17.1703C30.4678 20.6238 26.272 23.3994 21.0757 23.3994H14.8789V22.8508V15.6211H22.6572V7.81056C22.6895 7.81056 30.5001 7.81056 30.5001 7.81056V11.5868C30.5001 11.7159 30.5001 11.8772 30.5001 12.0063H30.4678Z", fill: theme.colors.black })));
|
|
14
|
+
};
|
|
15
|
+
exports.default = DefaultLogo;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCustomTheme } from "../Theme/useCustomTheme";
|
|
3
|
+
|
|
4
|
+
const DefaultLogo = () => {
|
|
5
|
+
const theme = useCustomTheme();
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width="12.09"
|
|
9
|
+
height="15.95"
|
|
10
|
+
viewBox="0 0 31 29"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d="M30.4999 6.26137V7.81058H15.9761H14.8787V22.8508V28.8862H12.5226C9.6824 28.8862 7.32632 26.4656 7.06812 23.3995C7.06812 23.2381 7.06812 23.0444 7.06812 22.8508V18.3323C7.06812 18.2677 7.06812 18.2032 7.06812 18.1063V15.5889V6.2291C7.06812 2.80793 9.84378 -5.72205e-06 13.2972 -5.72205e-06H24.8517C28.0147 0.355021 30.4676 3.00158 30.4676 6.2291L30.4999 6.26137Z"
|
|
16
|
+
fill={theme.colors.black}
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M7.10053 23.3672H7.03598C5.16402 23.2381 3.48571 22.4635 2.25926 21.3338C0.871428 20.0428 0 18.2677 0 16.3312V15.6211H7.06825V18.1386C7.06825 18.2032 7.06825 18.2677 7.06825 18.3645V22.883C7.06825 23.0767 7.06825 23.2381 7.06825 23.4317L7.10053 23.3672Z"
|
|
20
|
+
fill={theme.colors.black}
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
d="M30.4678 12.0063V15.6211V17.1703C30.4678 20.6238 26.272 23.3994 21.0757 23.3994H14.8789V22.8508V15.6211H22.6572V7.81056C22.6895 7.81056 30.5001 7.81056 30.5001 7.81056V11.5868C30.5001 11.7159 30.5001 11.8772 30.5001 12.0063H30.4678Z"
|
|
24
|
+
fill={theme.colors.black}
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
|
|
28
|
+
)
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default DefaultLogo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonProps } from "./ButtonProps";
|
|
3
|
-
declare function Button({ label, onClick,
|
|
3
|
+
declare function Button({ label, onClick, variant, leftIcon, rightIcon, size, isDisabled, isLoading, loadingText, type, width, sx, colorScheme, ref }: ButtonProps): React.JSX.Element;
|
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Button>;
|
|
5
5
|
export default _default;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -36,54 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
36
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
26
|
var react_1 = __importStar(require("react"));
|
|
38
27
|
var react_2 = require("@chakra-ui/react");
|
|
39
|
-
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
40
28
|
function Button(_a) {
|
|
41
|
-
var label = _a.label, onClick = _a.onClick,
|
|
42
|
-
|
|
43
|
-
var buttonColor = !color ? theme.colors.primary[500] : color;
|
|
44
|
-
var variantStyles = {
|
|
45
|
-
solid: {
|
|
46
|
-
backgroundColor: theme.colors.primary[500],
|
|
47
|
-
color: theme.colors.white,
|
|
48
|
-
_hover: {
|
|
49
|
-
backgroundColor: theme.colors.primary[600],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
outline: {
|
|
53
|
-
borderColor: theme.colors.primary[500],
|
|
54
|
-
color: theme.colors.primary[500],
|
|
55
|
-
_hover: {
|
|
56
|
-
backgroundColor: theme.colors.primary[50],
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
ghost: {
|
|
60
|
-
color: theme.colors.primary[500],
|
|
61
|
-
_hover: {
|
|
62
|
-
backgroundColor: theme.colors.primary[50],
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
link: {
|
|
66
|
-
color: theme.colors.primary[500],
|
|
67
|
-
textDecoration: "underline",
|
|
68
|
-
_hover: {
|
|
69
|
-
color: theme.colors.primary[600],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
unstyled: {
|
|
73
|
-
backgroundColor: "transparent",
|
|
74
|
-
color: "inherit",
|
|
75
|
-
_hover: {
|
|
76
|
-
backgroundColor: "transparent",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
var appliedVariantStyle = !color ? variantStyles[variant] : {};
|
|
81
|
-
return (react_1.default.createElement(react_2.Button, __assign({ type: type, onClick: onClick, width: width || "fit-content", padding: padding, borderRadius: "4px", bg: "#9A4FE5", color: "white", _hover: { bg: "#8847C5" }, variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, sx: sx }, appliedVariantStyle),
|
|
82
|
-
react_1.default.createElement(react_2.Text, { sx: {
|
|
83
|
-
overflow: "hidden",
|
|
84
|
-
textOverflow: "ellipsis",
|
|
85
|
-
whiteSpace: "nowrap",
|
|
86
|
-
maxWidth: "100%",
|
|
87
|
-
}, fontSize: "1rem", fontWeight: 500 }, label)));
|
|
29
|
+
var label = _a.label, onClick = _a.onClick, _b = _a.variant, variant = _b === void 0 ? "solid" : _b, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, size = _a.size, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.loadingText, loadingText = _e === void 0 ? "Loading" : _e, type = _a.type, width = _a.width, sx = _a.sx, colorScheme = _a.colorScheme, ref = _a.ref;
|
|
30
|
+
return (react_1.default.createElement(react_2.Button, { type: type, onClick: onClick, width: width || "fit-content", variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, ref: ref, colorScheme: colorScheme, sx: sx }, label));
|
|
88
31
|
}
|
|
89
32
|
exports.default = (0, react_1.memo)(Button);
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Button = void 0;
|
|
4
|
+
exports.Button = {
|
|
5
|
+
baseStyle: function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
return ({
|
|
8
|
+
borderRadius: "0.25rem",
|
|
9
|
+
fontWeight: 500,
|
|
10
|
+
fontSize: "1rem",
|
|
11
|
+
_disabled: {
|
|
12
|
+
opacity: 0.6,
|
|
13
|
+
cursor: "not-allowed",
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
solid: function (_a) {
|
|
19
|
+
var theme = _a.theme, _b = _a.colorScheme, colorScheme = _b === void 0 ? "primary" : _b;
|
|
20
|
+
return ({
|
|
21
|
+
bg: theme.colors[colorScheme][500],
|
|
22
|
+
color: theme.colors.white,
|
|
23
|
+
_hover: {
|
|
24
|
+
bg: theme.colors[colorScheme][600],
|
|
25
|
+
},
|
|
26
|
+
_active: {
|
|
27
|
+
bg: theme.colors[colorScheme][700],
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
outline: function (_a) {
|
|
32
|
+
var theme = _a.theme, _b = _a.colorScheme, colorScheme = _b === void 0 ? "primary" : _b;
|
|
33
|
+
return ({
|
|
34
|
+
border: "0.1rem solid",
|
|
35
|
+
borderColor: theme.colors[colorScheme][500],
|
|
36
|
+
color: theme.colors[colorScheme][500],
|
|
37
|
+
bg: "transparent",
|
|
38
|
+
_hover: {
|
|
39
|
+
bg: theme.colors[colorScheme][500],
|
|
40
|
+
borderColor: theme.colors[colorScheme][600],
|
|
41
|
+
color: theme.colors.white,
|
|
42
|
+
},
|
|
43
|
+
_active: {
|
|
44
|
+
bg: theme.colors[colorScheme][600],
|
|
45
|
+
color: theme.colors.white,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
ghost: function (_a) {
|
|
50
|
+
var theme = _a.theme, _b = _a.colorScheme, colorScheme = _b === void 0 ? "primary" : _b;
|
|
51
|
+
return ({
|
|
52
|
+
color: theme.colors[colorScheme][500],
|
|
53
|
+
bg: "transparent",
|
|
54
|
+
_hover: {
|
|
55
|
+
bg: theme.colors.gray[200],
|
|
56
|
+
},
|
|
57
|
+
_active: {
|
|
58
|
+
bg: theme.colors.gray[200],
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
link: function (_a) {
|
|
63
|
+
var theme = _a.theme, _b = _a.colorScheme, colorScheme = _b === void 0 ? "primary" : _b;
|
|
64
|
+
return ({
|
|
65
|
+
color: theme.colors[colorScheme][500],
|
|
66
|
+
textDecoration: "underline",
|
|
67
|
+
bg: "transparent",
|
|
68
|
+
_hover: {
|
|
69
|
+
color: theme.colors[colorScheme][600],
|
|
70
|
+
textDecoration: "none",
|
|
71
|
+
},
|
|
72
|
+
_active: {
|
|
73
|
+
color: theme.colors[colorScheme][600],
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
unstyled: function () { return ({
|
|
78
|
+
bg: "transparent",
|
|
79
|
+
color: "inherit",
|
|
80
|
+
_hover: {
|
|
81
|
+
bg: "transparent",
|
|
82
|
+
},
|
|
83
|
+
}); },
|
|
84
|
+
},
|
|
85
|
+
sizes: {
|
|
86
|
+
xs: {
|
|
87
|
+
h: "1.5rem",
|
|
88
|
+
fontSize: "0.75rem",
|
|
89
|
+
px: "0.5rem",
|
|
90
|
+
},
|
|
91
|
+
sm: {
|
|
92
|
+
h: "2rem",
|
|
93
|
+
fontSize: "0.875rem",
|
|
94
|
+
px: "0.75rem",
|
|
95
|
+
},
|
|
96
|
+
md: {
|
|
97
|
+
h: "2.5rem",
|
|
98
|
+
fontSize: "1rem",
|
|
99
|
+
px: "1rem",
|
|
100
|
+
},
|
|
101
|
+
lg: {
|
|
102
|
+
h: "3rem",
|
|
103
|
+
fontSize: "1.125rem",
|
|
104
|
+
px: "1.5rem",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
defaultProps: {
|
|
108
|
+
size: "md",
|
|
109
|
+
variant: "solid",
|
|
110
|
+
colorScheme: "primary",
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
|
|
2
|
-
export type ButtonProps = Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "loadingText" | "
|
|
3
|
+
export type ButtonProps = Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "loadingText" | "spinner" | "sx"> & {
|
|
3
4
|
label?: string;
|
|
4
5
|
width?: string | number;
|
|
5
6
|
size?: "lg" | "md" | "sm" | "xs";
|
|
6
7
|
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled";
|
|
7
|
-
color?: string;
|
|
8
8
|
type?: "button" | "submit" | "reset";
|
|
9
|
-
|
|
9
|
+
colorScheme?: 'primary' | 'secondary' | 'tertiary' | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink';
|
|
10
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
10
11
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Checkbox = void 0;
|
|
4
|
+
exports.Checkbox = {
|
|
5
|
+
baseStyle: function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
return {
|
|
8
|
+
control: {
|
|
9
|
+
width: "1.25rem",
|
|
10
|
+
height: "1.25rem",
|
|
11
|
+
borderWidth: "1.6px",
|
|
12
|
+
_disabled: {
|
|
13
|
+
bg: theme.colors.background[50],
|
|
14
|
+
borderColor: theme.colors.boxborder[500],
|
|
15
|
+
cursor: "not-allowed",
|
|
16
|
+
},
|
|
17
|
+
_indeterminate: {
|
|
18
|
+
bg: theme.colors.background[50],
|
|
19
|
+
borderColor: theme.colors.primary[500],
|
|
20
|
+
svg: {
|
|
21
|
+
color: theme.colors.primary[500],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
_checked: {
|
|
25
|
+
bg: theme.colors.primary[600],
|
|
26
|
+
borderColor: theme.colors.primary[600],
|
|
27
|
+
},
|
|
28
|
+
_hover: {
|
|
29
|
+
bg: theme.colors.background[100],
|
|
30
|
+
borderColor: theme.colors.primary[400],
|
|
31
|
+
_checked: {
|
|
32
|
+
bg: theme.colors.primary[600],
|
|
33
|
+
borderColor: theme.colors.primary[600],
|
|
34
|
+
},
|
|
35
|
+
_indeterminate: {
|
|
36
|
+
bg: "none",
|
|
37
|
+
borderColor: theme.colors.primary[600],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
_focus: {
|
|
41
|
+
boxShadow: "0 0 0 2px ".concat(theme.colors.primary[300]),
|
|
42
|
+
borderColor: theme.colors.primary[500],
|
|
43
|
+
},
|
|
44
|
+
_active: {
|
|
45
|
+
bg: theme.colors.primary[600],
|
|
46
|
+
borderColor: theme.colors.primary[600],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
color: theme.colors.background[50],
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
};
|
|
@@ -7,12 +7,16 @@ exports.TextLabel = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var react_2 = require("@chakra-ui/react");
|
|
9
9
|
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
|
+
var lucide_react_1 = require("lucide-react");
|
|
10
11
|
var TextLabel = function (_a) {
|
|
11
12
|
var label = _a.label, id = _a.id, _b = _a.isRequired, isRequired = _b === void 0 ? false : _b, _c = _a.isInformation, isInformation = _c === void 0 ? false : _c, _d = _a.informationMessage, informationMessage = _d === void 0 ? "" : _d;
|
|
12
13
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
13
|
-
return (react_1.default.createElement(react_2.Box,
|
|
14
|
-
react_1.default.createElement(react_2.FormLabel, { htmlFor: id !== null && id !== void 0 ? id : label, color: theme.colors.gray[600],
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
return (react_1.default.createElement(react_2.Box, null,
|
|
15
|
+
react_1.default.createElement(react_2.FormLabel, { htmlFor: id !== null && id !== void 0 ? id : label, color: theme.colors.gray[600], fontWeight: 400, fontSize: "0.875rem" },
|
|
16
|
+
react_1.default.createElement(react_2.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: "0.35rem" },
|
|
17
|
+
label,
|
|
18
|
+
isRequired && (react_1.default.createElement("span", { style: { color: theme.colors.semantic.error[500] } }, "*")),
|
|
19
|
+
isInformation && informationMessage && (react_1.default.createElement(react_2.Tooltip, { label: informationMessage, hasArrow: true, placement: "top", bg: theme.colors.gray[600], color: theme.colors.white, fontSize: "0.75rem" },
|
|
20
|
+
react_1.default.createElement(react_2.Icon, { as: lucide_react_1.InfoIcon, color: theme.colors.gray[500], boxSize: 4 })))))));
|
|
17
21
|
};
|
|
18
22
|
exports.TextLabel = TextLabel;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var react_2 = require("@chakra-ui/react");
|
|
8
|
+
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
9
|
+
var VeritcalDivider = function () {
|
|
10
|
+
var _a;
|
|
11
|
+
var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
|
|
12
|
+
return (react_1.default.createElement(react_2.Divider, { orientation: "vertical", height: 5, borderWidth: 1.2, borderColor: (_a = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _a === void 0 ? void 0 : _a[500] }));
|
|
13
|
+
};
|
|
14
|
+
exports.default = VeritcalDivider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextInputProps } from "./TextInputProps";
|
|
3
|
-
declare function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, height, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputLeftIcon, onLeftIconClick, inputGroupStyle, inputStyle, size, isInformation, informationMessage, leftElementStyle, rightElementStyle, }: TextInputProps): React.JSX.Element;
|
|
3
|
+
declare function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, height, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputLeftIcon, onLeftIconClick, inputGroupStyle, inputStyle, size, isInformation, informationMessage, leftElementStyle, rightElementStyle, ref, ...props }: TextInputProps): React.JSX.Element;
|
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof TextInput>;
|
|
5
5
|
export default _default;
|
|
@@ -10,40 +10,34 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
13
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
26
|
};
|
|
16
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
28
|
var react_1 = __importDefault(require("react"));
|
|
18
29
|
var react_2 = require("@chakra-ui/react");
|
|
19
|
-
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
20
30
|
var FormLabel_1 = require("../Common/FormLabel");
|
|
21
31
|
var HelperText_1 = __importDefault(require("../Common/HelperText"));
|
|
22
32
|
var ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
|
|
23
33
|
function TextInput(_a) {
|
|
24
|
-
var label = _a.label, _b = _a.type, type = _b === void 0 ? "text" : _b, id = _a.id, name = _a.name, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, value = _a.value, _f = _a.placeholder, placeholder = _f === void 0 ? "Placeholder" : _f, _g = _a.width, width = _g === void 0 ? "
|
|
25
|
-
|
|
26
|
-
var getPadding = function () {
|
|
27
|
-
if (inputLeftIcon && inputRightIcon) {
|
|
28
|
-
return { pl: "1.9rem", pr: "1.9rem" };
|
|
29
|
-
}
|
|
30
|
-
else if (inputLeftIcon) {
|
|
31
|
-
return { pl: "1.9rem", pr: "1rem" };
|
|
32
|
-
}
|
|
33
|
-
else if (inputRightIcon) {
|
|
34
|
-
return { pl: "1rem", pr: "1.9rem" };
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
return { pl: "1rem", pr: "1rem" };
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var padding = getPadding();
|
|
41
|
-
return (react_1.default.createElement(react_2.FormControl, { isInvalid: error, w: width },
|
|
34
|
+
var label = _a.label, _b = _a.type, type = _b === void 0 ? "text" : _b, id = _a.id, name = _a.name, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, value = _a.value, _f = _a.placeholder, placeholder = _f === void 0 ? "Placeholder" : _f, _g = _a.width, width = _g === void 0 ? "22.5rem" : _g, _h = _a.height, height = _h === void 0 ? "2.75rem" : _h, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, onRightIconclick = _a.onRightIconclick, inputRightIcon = _a.inputRightIcon, inputLeftIcon = _a.inputLeftIcon, onLeftIconClick = _a.onLeftIconClick, inputGroupStyle = _a.inputGroupStyle, inputStyle = _a.inputStyle, _j = _a.size, size = _j === void 0 ? "md" : _j, _k = _a.isInformation, isInformation = _k === void 0 ? false : _k, informationMessage = _a.informationMessage, leftElementStyle = _a.leftElementStyle, rightElementStyle = _a.rightElementStyle, ref = _a.ref, props = __rest(_a, ["label", "type", "id", "name", "onChange", "onBlur", "onFocus", "isDisabled", "isReadOnly", "isRequired", "value", "placeholder", "width", "height", "error", "errorMessage", "helperText", "onRightIconclick", "inputRightIcon", "inputLeftIcon", "onLeftIconClick", "inputGroupStyle", "inputStyle", "size", "isInformation", "informationMessage", "leftElementStyle", "rightElementStyle", "ref"]);
|
|
35
|
+
return (react_1.default.createElement(react_2.FormControl, { w: width },
|
|
42
36
|
label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id, isInformation: isInformation, informationMessage: informationMessage, isRequired: isRequired })),
|
|
43
|
-
react_1.default.createElement(react_2.InputGroup, {
|
|
44
|
-
inputLeftIcon && (react_1.default.createElement(react_2.InputLeftElement, __assign({ onClick: onLeftIconClick, pointerEvents: onLeftIconClick ? "auto" : "none"
|
|
45
|
-
react_1.default.createElement(react_2.Input, __assign({ type: type, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus, value: value,
|
|
46
|
-
inputRightIcon && (react_1.default.createElement(react_2.InputRightElement, __assign({ onClick: onRightIconclick, pointerEvents: onRightIconclick ? "auto" : "none"
|
|
37
|
+
react_1.default.createElement(react_2.InputGroup, { style: inputGroupStyle, height: height },
|
|
38
|
+
inputLeftIcon && (react_1.default.createElement(react_2.InputLeftElement, __assign({ onClick: onLeftIconClick, pointerEvents: onLeftIconClick ? "auto" : "none" }, leftElementStyle), inputLeftIcon)),
|
|
39
|
+
react_1.default.createElement(react_2.Input, __assign({ type: type, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus, value: value, isDisabled: isDisabled, isReadOnly: isReadOnly, id: id, name: name, size: size, height: height, isInvalid: error, ref: ref }, inputStyle, props)),
|
|
40
|
+
inputRightIcon && (react_1.default.createElement(react_2.InputRightElement, __assign({ onClick: onRightIconclick, pointerEvents: onRightIconclick ? "auto" : "none" }, rightElementStyle), inputRightIcon))),
|
|
47
41
|
error && react_1.default.createElement(ErrorMessage_1.default, { errorMessage: errorMessage }),
|
|
48
42
|
helperText && !error && react_1.default.createElement(HelperText_1.default, { helperText: helperText })));
|
|
49
43
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Input = void 0;
|
|
4
|
+
exports.Input = {
|
|
5
|
+
baseStyle: {
|
|
6
|
+
field: {
|
|
7
|
+
fontWeight: 500,
|
|
8
|
+
fontSize: "0.875rem",
|
|
9
|
+
letterSpacing: "0.044rem",
|
|
10
|
+
pt: "0.813rem",
|
|
11
|
+
pb: "0.813rem",
|
|
12
|
+
borderRadius: "0.25rem",
|
|
13
|
+
_placeholder: {
|
|
14
|
+
fontStyle: "italic",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
sizes: {
|
|
19
|
+
md: {
|
|
20
|
+
field: {
|
|
21
|
+
h: "2.75rem",
|
|
22
|
+
fontSize: "0.875rem",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
outline: function (props) {
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
29
|
+
var theme = props.theme;
|
|
30
|
+
var errorColor = (_c = (_b = (_a = theme.colors.semantic) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b[500]) !== null && _c !== void 0 ? _c : "red.500";
|
|
31
|
+
var borderColor = (_e = (_d = theme.colors.boxborder) === null || _d === void 0 ? void 0 : _d[500]) !== null && _e !== void 0 ? _e : "gray.300";
|
|
32
|
+
var shadowPrimary = (_g = (_f = theme.colors.boxShadow) === null || _f === void 0 ? void 0 : _f.primary) !== null && _g !== void 0 ? _g : "blue.100";
|
|
33
|
+
var shadowError = (_j = (_h = theme.colors.boxShadow) === null || _h === void 0 ? void 0 : _h.error) !== null && _j !== void 0 ? _j : "red.100";
|
|
34
|
+
var primary = (_l = (_k = theme.colors.primary) === null || _k === void 0 ? void 0 : _k[500]) !== null && _l !== void 0 ? _l : "blue.500";
|
|
35
|
+
return {
|
|
36
|
+
field: {
|
|
37
|
+
bg: (_o = (_m = theme.colors.gray) === null || _m === void 0 ? void 0 : _m[50]) !== null && _o !== void 0 ? _o : "gray.50",
|
|
38
|
+
border: "0.063rem solid",
|
|
39
|
+
borderColor: borderColor,
|
|
40
|
+
_hover: {
|
|
41
|
+
borderColor: primary,
|
|
42
|
+
boxShadow: "0 0 0 0.125rem ".concat(shadowPrimary),
|
|
43
|
+
},
|
|
44
|
+
_focus: {
|
|
45
|
+
borderColor: primary,
|
|
46
|
+
boxShadow: "0 0 0 0.125rem ".concat(shadowPrimary),
|
|
47
|
+
},
|
|
48
|
+
_invalid: {
|
|
49
|
+
borderColor: errorColor,
|
|
50
|
+
boxShadow: "0 0 0 0.125rem ".concat(shadowError),
|
|
51
|
+
_hover: {
|
|
52
|
+
borderColor: errorColor,
|
|
53
|
+
boxShadow: "0 0 0 0.125rem ".concat(shadowError),
|
|
54
|
+
},
|
|
55
|
+
_focus: {
|
|
56
|
+
borderColor: errorColor,
|
|
57
|
+
boxShadow: "0 0 0 0.125rem ".concat(shadowError),
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
defaultProps: {
|
|
65
|
+
variant: "outline",
|
|
66
|
+
size: "md",
|
|
67
|
+
},
|
|
68
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { InputProps } from "@chakra-ui/react";
|
|
2
|
-
export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "placeholder" | "onBlur" | "onFocus" | "isDisabled" | "isRequired" | "isReadOnly" | "width" | "height" | "errorBorderColor" | "size"> & {
|
|
3
|
+
export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "placeholder" | "onBlur" | "onFocus" | "isDisabled" | "isRequired" | "isReadOnly" | "width" | "height" | "errorBorderColor" | "size" | "onKeyDown" | "onKeyUp" | "onMouseEnter" | "onMouseLeave"> & {
|
|
3
4
|
label?: string;
|
|
4
5
|
id?: string;
|
|
5
6
|
name?: string;
|
|
@@ -16,4 +17,5 @@ export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "p
|
|
|
16
17
|
informationMessage?: string;
|
|
17
18
|
leftElementStyle?: {};
|
|
18
19
|
rightElementStyle?: {};
|
|
20
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
19
21
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SidebarProps } from "./SideBarProps";
|
|
3
|
-
export default function Sidebar({ menus, activeMenu, handleMenuClick, toggle, changeToggle, logo, companyName, }: SidebarProps): React.JSX.Element;
|
|
3
|
+
export default function Sidebar({ menus, activeMenu, handleMenuClick, toggle, changeToggle, logo, companyName, isDisableAddNew, onAddNewClick, selectedSubMenu, }: SidebarProps): React.JSX.Element;
|