pixelize-design-library 2.0.1 → 2.0.2
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 +9 -2
- package/dist/Components/KanbanBoard/AccountCard.d.ts +9 -0
- package/dist/Components/KanbanBoard/AccountCard.js +74 -0
- package/dist/Components/KanbanBoard/AccountRow.d.ts +6 -0
- package/dist/Components/KanbanBoard/AccountRow.js +20 -0
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +4 -0
- package/dist/Components/KanbanBoard/KanbanBoard.js +106 -0
- package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +26 -0
- package/dist/Components/KanbanBoard/KanbanBoardProps.js +2 -0
- package/dist/Components/SideBar/SideBar.js +2 -2
- package/dist/Components/SideBar/components/TextTruncation.js +20 -8
- package/dist/Constants/Sidebar.d.ts +23 -0
- package/dist/Constants/Sidebar.js +2 -1
- package/dist/Layout.js +7 -3
- package/dist/Pages/kanbanboard.d.ts +3 -0
- package/dist/Pages/kanbanboard.js +115 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/package.json +2 -1
package/dist/App.js
CHANGED
|
@@ -69,9 +69,16 @@ function App() {
|
|
|
69
69
|
{ id: 3, title: "Reports", icon: lucide_react_1.Calendar, url: "reports" },
|
|
70
70
|
{ id: 4, title: "Settings", icon: lucide_react_1.Calendar, url: "settings" },
|
|
71
71
|
{ id: 5, title: "Users", icon: lucide_react_1.Calendar, url: "users" },
|
|
72
|
-
{ id: 6, title: "Notifications", icon: lucide_react_1.Calendar, url: "notifications" },
|
|
72
|
+
{ id: 6, title: "Notifications notifications notifications notifications notifications", icon: lucide_react_1.Calendar, url: "notifications" },
|
|
73
73
|
{ id: 7, title: "Analytics", icon: lucide_react_1.Calendar, url: "analytics" },
|
|
74
|
-
{
|
|
74
|
+
{
|
|
75
|
+
id: 8, title: "Projects", icon: lucide_react_1.Calendar, url: "projects", subMenu: [{
|
|
76
|
+
id: 21, title: "submenu1hghvhvkhvkhvkhvh", icon: lucide_react_1.Calendar, url: "submenu1"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 22, title: "submenu2", icon: lucide_react_1.Calendar, url: "submenu2"
|
|
80
|
+
}]
|
|
81
|
+
},
|
|
75
82
|
{ id: 9, title: "Tasks", icon: lucide_react_1.Calendar, url: "tasks" },
|
|
76
83
|
{ id: 10, title: "Teams", icon: lucide_react_1.Calendar, url: "teams" },
|
|
77
84
|
{ id: 11, title: "Clients", icon: lucide_react_1.Calendar, url: "clients" },
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Account, KanbanBoardProps } from "./KanbanBoardProps";
|
|
3
|
+
declare const AccountCard: ({ account, index, onDelete, onOpen, }: {
|
|
4
|
+
account: Account;
|
|
5
|
+
index: number;
|
|
6
|
+
onDelete: KanbanBoardProps['onDelete'];
|
|
7
|
+
onOpen: KanbanBoardProps['onOpen'];
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default AccountCard;
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var react_1 = __importStar(require("react"));
|
|
41
|
+
var react_2 = require("@chakra-ui/react");
|
|
42
|
+
var dnd_1 = require("@hello-pangea/dnd");
|
|
43
|
+
var lucide_react_1 = require("lucide-react");
|
|
44
|
+
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
45
|
+
var AccountRow_1 = __importDefault(require("./AccountRow"));
|
|
46
|
+
var excludeKeys = ["id", "details"];
|
|
47
|
+
var AccountCard = function (_a) {
|
|
48
|
+
var account = _a.account, index = _a.index, onDelete = _a.onDelete, onOpen = _a.onOpen;
|
|
49
|
+
var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
|
|
50
|
+
var _b = (0, react_1.useState)(false), showMore = _b[0], setShowMore = _b[1];
|
|
51
|
+
var keys = Object.keys(account).filter(function (key) { return typeof account[key] === "string" && !excludeKeys.includes(key); });
|
|
52
|
+
var visibleKeys = showMore ? keys : keys.slice(0, 4);
|
|
53
|
+
return (react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id, index: index }, function (provided) {
|
|
54
|
+
var _a, _b, _c, _d, _e, _f;
|
|
55
|
+
return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { width: "16.5rem", borderRadius: "0.25rem", borderWidth: "0.063rem", background: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[500], border: "0.1rem solid ".concat((_b = colors.gray) === null || _b === void 0 ? void 0 : _b[200]), p: 2, mt: 3 }),
|
|
56
|
+
react_1.default.createElement(react_2.VStack, { align: "start", spacing: 2, fontSize: "0.875rem", color: (_c = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _c === void 0 ? void 0 : _c[700], overflow: "none" },
|
|
57
|
+
visibleKeys.map(function (key) { return (react_1.default.createElement(AccountRow_1.default, { key: key, label: key.replace(/\b\w/g, function (c) { return c.toUpperCase(); }), value: account[key] })); }),
|
|
58
|
+
react_1.default.createElement(react_2.Collapse, { in: showMore && account.details !== undefined, animateOpacity: true },
|
|
59
|
+
react_1.default.createElement(react_2.Text, { pt: 2 }, account.details)),
|
|
60
|
+
keys.length > 4 && (react_1.default.createElement(react_2.Flex, { justify: "space-between", w: "full", pt: 2, alignItems: "center" },
|
|
61
|
+
react_1.default.createElement(react_2.Text, { color: (_d = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _d === void 0 ? void 0 : _d[500], fontSize: "sm", fontWeight: "medium", cursor: "pointer", onClick: function () { return setShowMore(!showMore); }, display: "flex", alignItems: "center", gap: 2 },
|
|
62
|
+
"Show ",
|
|
63
|
+
showMore ? "less" : "more",
|
|
64
|
+
" ",
|
|
65
|
+
showMore ? (react_1.default.createElement(lucide_react_1.ChevronUp, { size: 14 })) : (react_1.default.createElement(lucide_react_1.ChevronDown, { size: 14 }))),
|
|
66
|
+
react_1.default.createElement(react_2.Spacer, null),
|
|
67
|
+
react_1.default.createElement(react_2.HStack, { spacing: 2 },
|
|
68
|
+
react_1.default.createElement(react_2.Tooltip, { label: "Delete" },
|
|
69
|
+
react_1.default.createElement(lucide_react_1.Trash2, { size: 16, color: (_e = colors === null || colors === void 0 ? void 0 : colors.red) === null || _e === void 0 ? void 0 : _e[600], onClick: function () { return onDelete === null || onDelete === void 0 ? void 0 : onDelete(account); } })),
|
|
70
|
+
react_1.default.createElement(react_2.Tooltip, { label: "Open" },
|
|
71
|
+
react_1.default.createElement(lucide_react_1.ExternalLink, { size: 16, color: (_f = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _f === void 0 ? void 0 : _f[600], onClick: function () { return onOpen === null || onOpen === void 0 ? void 0 : onOpen(account); } }))))))));
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
exports.default = AccountCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 AccountRow = function (_a) {
|
|
10
|
+
var _b, _c;
|
|
11
|
+
var label = _a.label, value = _a.value;
|
|
12
|
+
var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
|
|
13
|
+
return (react_1.default.createElement(react_2.Flex, { w: "full" },
|
|
14
|
+
react_1.default.createElement(react_2.Tooltip, { label: label, isDisabled: label.length <= 15, hasArrow: true },
|
|
15
|
+
react_1.default.createElement(react_2.Text, { color: (_b = colors === null || colors === void 0 ? void 0 : colors.text) === null || _b === void 0 ? void 0 : _b[700], w: "45%", noOfLines: 1 }, label)),
|
|
16
|
+
react_1.default.createElement(react_2.Text, { w: "0.625rem", textAlign: "center" }, ":"),
|
|
17
|
+
react_1.default.createElement(react_2.Tooltip, { label: value, isDisabled: value.length <= 17, hasArrow: true },
|
|
18
|
+
react_1.default.createElement(react_2.Text, { fontWeight: 600, color: (_c = colors === null || colors === void 0 ? void 0 : colors.text) === null || _c === void 0 ? void 0 : _c[800], w: "calc(55% - 0.625rem)", noOfLines: 1 }, value))));
|
|
19
|
+
};
|
|
20
|
+
exports.default = AccountRow;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
37
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
38
|
+
if (ar || !(i in from)) {
|
|
39
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
40
|
+
ar[i] = from[i];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44
|
+
};
|
|
45
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
var react_1 = __importStar(require("react"));
|
|
50
|
+
var react_2 = require("@chakra-ui/react");
|
|
51
|
+
var dnd_1 = require("@hello-pangea/dnd");
|
|
52
|
+
var lucide_react_1 = require("lucide-react");
|
|
53
|
+
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
54
|
+
var AccountCard_1 = __importDefault(require("./AccountCard"));
|
|
55
|
+
var KanbanBoard = function (_a) {
|
|
56
|
+
var _b;
|
|
57
|
+
var data = _a.data, onDrag = _a.onDrag, onDelete = _a.onDelete, onOpen = _a.onOpen, onColumnDelete = _a.onColumnDelete;
|
|
58
|
+
var colors = (0, useCustomTheme_1.useCustomTheme)().colors;
|
|
59
|
+
var _c = (0, react_1.useState)(data), columns = _c[0], setColumns = _c[1];
|
|
60
|
+
var onDragEnd = function (result) {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
var source = result.source, destination = result.destination;
|
|
63
|
+
if (!destination)
|
|
64
|
+
return;
|
|
65
|
+
var sourceCol = columns[source.droppableId];
|
|
66
|
+
var destCol = columns[destination.droppableId];
|
|
67
|
+
var draggedItem = sourceCol.items[source.index];
|
|
68
|
+
if (!draggedItem)
|
|
69
|
+
return;
|
|
70
|
+
if (source.droppableId === destination.droppableId) {
|
|
71
|
+
var copiedItems = __spreadArray([], sourceCol.items, true);
|
|
72
|
+
copiedItems.splice(source.index, 1);
|
|
73
|
+
copiedItems.splice(destination.index, 0, draggedItem);
|
|
74
|
+
var newCol = __assign(__assign({}, columns), (_a = {}, _a[source.droppableId] = __assign(__assign({}, sourceCol), { items: copiedItems }), _a));
|
|
75
|
+
setColumns(newCol);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
var sourceItems = __spreadArray([], sourceCol.items, true);
|
|
79
|
+
var destItems = __spreadArray([], destCol.items, true);
|
|
80
|
+
sourceItems.splice(source.index, 1);
|
|
81
|
+
destItems.splice(destination.index, 0, draggedItem);
|
|
82
|
+
var updatedCols = __assign(__assign({}, columns), (_b = {}, _b[source.droppableId] = __assign(__assign({}, sourceCol), { items: sourceItems }), _b[destination.droppableId] = __assign(__assign({}, destCol), { items: destItems }), _b));
|
|
83
|
+
setColumns(updatedCols);
|
|
84
|
+
onDrag === null || onDrag === void 0 ? void 0 : onDrag({
|
|
85
|
+
from: source.droppableId,
|
|
86
|
+
to: destination.droppableId,
|
|
87
|
+
item: draggedItem,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
return (react_1.default.createElement(dnd_1.DragDropContext, { onDragEnd: onDragEnd },
|
|
92
|
+
react_1.default.createElement(react_2.Flex, { gap: 4, p: 4, bg: (_b = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _b === void 0 ? void 0 : _b[200], minH: "100vh", overflowX: "auto", maxWidth: "100vw" }, Object.entries(columns).map(function (_a) {
|
|
93
|
+
var colId = _a[0], column = _a[1];
|
|
94
|
+
return (react_1.default.createElement(dnd_1.Droppable, { droppableId: colId, key: colId }, function (provided, snapshot) {
|
|
95
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
96
|
+
return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.droppableProps, { width: "17.5rem", opacity: 1, borderRadius: "0.5rem", borderWidth: "0.063rem", background: snapshot.isDraggingOver ? (_a = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _a === void 0 ? void 0 : _a[50] : (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[100], border: "".concat(snapshot.isDraggingOver ? '0.5px dashed' + ((_c = colors === null || colors === void 0 ? void 0 : colors.blue) === null || _c === void 0 ? void 0 : _c[500]) : '0.125rem solid' + ((_d = colors.gray) === null || _d === void 0 ? void 0 : _d[200])), display: "flex", flexDirection: "column" }),
|
|
97
|
+
react_1.default.createElement(react_2.Flex, { width: "16.5rem", height: "2.75rem", borderRadius: "0.25rem", borderLeft: "0.188rem solid", borderLeftColor: (_e = column.color) !== null && _e !== void 0 ? _e : (_f = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _f === void 0 ? void 0 : _f[500], background: (_g = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _g === void 0 ? void 0 : _g[100], align: "center", px: 2, mb: 3, flexShrink: 0, m: 2, display: "flex", justifyContent: "space-between" },
|
|
98
|
+
react_1.default.createElement(react_2.Text, { fontWeight: "600", fontSize: "1rem", lineHeight: "100%", letterSpacing: "0%", color: (_h = colors === null || colors === void 0 ? void 0 : colors.text) === null || _h === void 0 ? void 0 : _h[700] }, column.title),
|
|
99
|
+
react_1.default.createElement(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: (_j = colors === null || colors === void 0 ? void 0 : colors.text) === null || _j === void 0 ? void 0 : _j[600], _hover: { color: (_k = colors === null || colors === void 0 ? void 0 : colors.red) === null || _k === void 0 ? void 0 : _k[600] }, onClick: function () { return onColumnDelete === null || onColumnDelete === void 0 ? void 0 : onColumnDelete(colId); } })),
|
|
100
|
+
react_1.default.createElement(react_2.Box, { px: 2, pb: 2, overflowY: "auto", maxHeight: "calc(100vh - 12.5rem)", overflow: "hidden" },
|
|
101
|
+
column.items.map(function (account, index) { return (react_1.default.createElement(AccountCard_1.default, { key: account.id, account: account, index: index, onDelete: onDelete, onOpen: onOpen })); }),
|
|
102
|
+
provided.placeholder)));
|
|
103
|
+
}));
|
|
104
|
+
}))));
|
|
105
|
+
};
|
|
106
|
+
exports.default = KanbanBoard;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Account = {
|
|
2
|
+
id: string;
|
|
3
|
+
rating: string;
|
|
4
|
+
name: string;
|
|
5
|
+
owner: string;
|
|
6
|
+
site: string;
|
|
7
|
+
details?: string;
|
|
8
|
+
[key: string]: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type ColumnType = {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
color: string;
|
|
14
|
+
items: Account[];
|
|
15
|
+
};
|
|
16
|
+
export type KanbanBoardProps = {
|
|
17
|
+
data: Record<string, ColumnType>;
|
|
18
|
+
onDelete?: (account: Account) => void;
|
|
19
|
+
onOpen?: (account: Account) => void;
|
|
20
|
+
onColumnDelete?: (colId: string | number) => void;
|
|
21
|
+
onDrag?: ({ from, to, item, }: {
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
item: Account;
|
|
25
|
+
}) => void;
|
|
26
|
+
};
|
|
@@ -38,8 +38,8 @@ function Sidebar(_a) {
|
|
|
38
38
|
// mt={5}
|
|
39
39
|
, {
|
|
40
40
|
// mt={5}
|
|
41
|
-
flexDir: "column", w: "100%", alignItems: toggle ? "center" : "flex-start", h: "100vh", overflow: "auto", css: Sidebar_1.FlexCss },
|
|
42
|
-
react_1.default.createElement(react_2.Box, { width: "100%", flex: "1", overflowY: "auto", overflowX: "hidden", alignItems: toggle ? "center" : "flex-start", css: __assign({}, Sidebar_1.FlexCss) },
|
|
41
|
+
flexDir: "column", w: "100%", alignItems: toggle ? "center" : "flex-start", h: "100vh", overflow: "auto", css: Sidebar_1.FlexCss, overflowX: "hidden" },
|
|
42
|
+
react_1.default.createElement(react_2.Box, { width: "100%", flex: "1", overflowY: "auto", overflowX: "hidden", alignItems: toggle ? "center" : "flex-start", css: __assign(__assign({}, Sidebar_1.FlexCss), { transition: 'all 0.3s ease' }) },
|
|
43
43
|
react_1.default.createElement(MenuItems_1.default, { activeMenu: activeMenu, menus: menus, handleMenuClick: handleMenuClick !== null && handleMenuClick !== void 0 ? handleMenuClick : (function () { }), toggle: toggle, selectedSubMenu: selectedSubMenu })),
|
|
44
44
|
react_1.default.createElement(react_2.Box, { w: "100%", h: "0.063rem", bg: theme.colors.sidebar.background[200], mb: "0.125rem" }),
|
|
45
45
|
!isDisableAddNew && (react_1.default.createElement(react_2.Flex, { alignItems: "center", gap: "0.5rem", p: "0.625rem",
|
|
@@ -50,16 +50,28 @@ var react_2 = require("@chakra-ui/react");
|
|
|
50
50
|
var TruncatedTextWithTooltip = function (_a) {
|
|
51
51
|
var children = _a.children, _b = _a.open, open = _b === void 0 ? false : _b, props = __rest(_a, ["children", "open"]);
|
|
52
52
|
var textRef = (0, react_1.useRef)(null);
|
|
53
|
+
var shadowRef = (0, react_1.useRef)(null);
|
|
53
54
|
var _c = (0, react_1.useState)(false), isTruncated = _c[0], setIsTruncated = _c[1];
|
|
54
55
|
(0, react_1.useEffect)(function () {
|
|
55
|
-
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
var checkTruncation = function () {
|
|
57
|
+
var textEl = textRef.current;
|
|
58
|
+
var shadowEl = shadowRef.current;
|
|
59
|
+
if (textEl && shadowEl) {
|
|
60
|
+
var visibleWidth = textEl.offsetWidth;
|
|
61
|
+
var fullTextWidth = shadowEl.scrollWidth;
|
|
62
|
+
setIsTruncated(fullTextWidth > visibleWidth);
|
|
59
63
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
};
|
|
65
|
+
checkTruncation();
|
|
66
|
+
var resizeObserver = new ResizeObserver(checkTruncation);
|
|
67
|
+
if (textRef.current) {
|
|
68
|
+
resizeObserver.observe(textRef.current);
|
|
69
|
+
}
|
|
70
|
+
return function () { return resizeObserver.disconnect(); };
|
|
71
|
+
}, [children]);
|
|
72
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
73
|
+
react_1.default.createElement(react_2.Tooltip, { label: children, isDisabled: !isTruncated, hasArrow: true, placement: "right" },
|
|
74
|
+
react_1.default.createElement(react_2.Text, __assign({ ref: textRef, isTruncated: true, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", maxW: "100%" }, props), children)),
|
|
75
|
+
react_1.default.createElement(react_2.Box, { ref: shadowRef, position: "absolute", visibility: "hidden", whiteSpace: "nowrap", fontSize: props.fontSize, fontWeight: props.fontWeight, fontFamily: props.fontFamily, lineHeight: props.lineHeight, px: props.px, py: props.py }, children)));
|
|
64
76
|
};
|
|
65
77
|
exports.default = TruncatedTextWithTooltip;
|
|
@@ -13,3 +13,26 @@ export declare const FlexCss: {
|
|
|
13
13
|
background: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
export declare const cssForScrollBar: (theme: any) => {
|
|
17
|
+
"&::-webkit-scrollbar": {
|
|
18
|
+
width: string;
|
|
19
|
+
};
|
|
20
|
+
"&::-webkit-scrollbar-track": {
|
|
21
|
+
background: any;
|
|
22
|
+
};
|
|
23
|
+
"&::-webkit-scrollbar-thumb": {
|
|
24
|
+
background: string;
|
|
25
|
+
borderRadius: string;
|
|
26
|
+
};
|
|
27
|
+
"&:hover::-webkit-scrollbar-thumb": {
|
|
28
|
+
background: any;
|
|
29
|
+
};
|
|
30
|
+
"&:hover::-webkit-scrollbar-thumb:hover": {
|
|
31
|
+
background: any;
|
|
32
|
+
};
|
|
33
|
+
scrollbarWidth: string;
|
|
34
|
+
"&:hover": {
|
|
35
|
+
scrollbarWidth: string;
|
|
36
|
+
scrollbarColor: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FlexCss = void 0;
|
|
3
|
+
exports.cssForScrollBar = exports.FlexCss = void 0;
|
|
4
4
|
exports.FlexCss = {
|
|
5
5
|
"&::-webkit-scrollbar": {
|
|
6
6
|
width: "0.188rem",
|
|
@@ -39,3 +39,4 @@ var cssForScrollBar = function (theme) { return ({
|
|
|
39
39
|
scrollbarColor: "".concat(theme.colors.primary[500], " ").concat(theme.colors.sidebar.background[500]),
|
|
40
40
|
},
|
|
41
41
|
}); };
|
|
42
|
+
exports.cssForScrollBar = cssForScrollBar;
|
package/dist/Layout.js
CHANGED
|
@@ -59,6 +59,7 @@ var input_1 = __importDefault(require("./Pages/input"));
|
|
|
59
59
|
var alertdialog_1 = __importDefault(require("./Pages/alertdialog"));
|
|
60
60
|
var table_1 = require("./Pages/table");
|
|
61
61
|
var TInput_1 = __importDefault(require("./Pages/TInput"));
|
|
62
|
+
var kanbanboard_1 = __importDefault(require("./Pages/kanbanboard"));
|
|
62
63
|
var Layout = function () {
|
|
63
64
|
var _a = (0, react_2.useState)(window.location.pathname), currentPath = _a[0], setCurrentPath = _a[1];
|
|
64
65
|
var navigate = function (path) {
|
|
@@ -75,7 +76,7 @@ var Layout = function () {
|
|
|
75
76
|
};
|
|
76
77
|
}, []);
|
|
77
78
|
var switchTheme = function (themeName) {
|
|
78
|
-
document.documentElement.setAttribute(
|
|
79
|
+
document.documentElement.setAttribute("data-theme", themeName);
|
|
79
80
|
};
|
|
80
81
|
var renderPage = function () {
|
|
81
82
|
switch (currentPath) {
|
|
@@ -141,6 +142,8 @@ var Layout = function () {
|
|
|
141
142
|
return react_2.default.createElement(table_1.TableExample, null);
|
|
142
143
|
case "/tinput":
|
|
143
144
|
return react_2.default.createElement(TInput_1.default, null);
|
|
145
|
+
case "/kanban":
|
|
146
|
+
return react_2.default.createElement(kanbanboard_1.default, null);
|
|
144
147
|
case "/":
|
|
145
148
|
default:
|
|
146
149
|
}
|
|
@@ -178,12 +181,13 @@ var Layout = function () {
|
|
|
178
181
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/checkbox"); }, variant: "outline" }, "Checkbox"),
|
|
179
182
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/toster"); }, variant: "outline" }, "Toster"),
|
|
180
183
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/InputPage"); }, variant: "outline" }, "Input"),
|
|
181
|
-
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/table"); }, variant: "outline" }, "Table")
|
|
184
|
+
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/table"); }, variant: "outline" }, "Table"),
|
|
185
|
+
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/kanban"); }, variant: "outline" }, "Kanban")),
|
|
182
186
|
react_2.default.createElement("br", null),
|
|
183
187
|
react_2.default.createElement("br", null),
|
|
184
188
|
react_2.default.createElement("h2", { className: "text-3xl" }, " TailWindCss"),
|
|
185
189
|
react_2.default.createElement(react_1.Button, { onClick: function () { return navigate("/tinput"); }, variant: "outline" }, "Input"),
|
|
186
|
-
react_2.default.createElement("button", { onClick: function () { return switchTheme(
|
|
190
|
+
react_2.default.createElement("button", { onClick: function () { return switchTheme("theme2"); } }, "Switch to Theme 2")),
|
|
187
191
|
react_2.default.createElement("br", null),
|
|
188
192
|
react_2.default.createElement("br", null),
|
|
189
193
|
renderPage()));
|
|
@@ -0,0 +1,115 @@
|
|
|
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 KanbanBoard_1 = __importDefault(require("../Components/KanbanBoard/KanbanBoard"));
|
|
8
|
+
var initialData = {
|
|
9
|
+
acquired: {
|
|
10
|
+
id: "acquired",
|
|
11
|
+
title: "Acquired",
|
|
12
|
+
color: "#9A4FE5",
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
id: "1",
|
|
16
|
+
rating: "Acquired",
|
|
17
|
+
name: "1",
|
|
18
|
+
owner: "Mathew John and so",
|
|
19
|
+
site: "Demo",
|
|
20
|
+
details: "Additional details here...",
|
|
21
|
+
location: "Chennai",
|
|
22
|
+
status: "Pending",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
active: {
|
|
27
|
+
id: "requetsed",
|
|
28
|
+
title: "Requested",
|
|
29
|
+
color: "#4CAF50",
|
|
30
|
+
items: [
|
|
31
|
+
{
|
|
32
|
+
id: "2",
|
|
33
|
+
rating: "Acquired",
|
|
34
|
+
name: "1",
|
|
35
|
+
owner: "Mathew John",
|
|
36
|
+
site: "Demo",
|
|
37
|
+
details: "Additional details here...",
|
|
38
|
+
location: "Bangalore",
|
|
39
|
+
status: "Completed",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
active2: {
|
|
44
|
+
id: "done",
|
|
45
|
+
title: "Done",
|
|
46
|
+
color: "#4CfF50",
|
|
47
|
+
items: [
|
|
48
|
+
{
|
|
49
|
+
id: "33",
|
|
50
|
+
rating: "Done",
|
|
51
|
+
name: "1",
|
|
52
|
+
owner: "Mathew John",
|
|
53
|
+
site: "Demo",
|
|
54
|
+
details: "Additional details here...",
|
|
55
|
+
location: "Mumbai",
|
|
56
|
+
status: "In Progress",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
active3: {
|
|
61
|
+
id: "done",
|
|
62
|
+
title: "Done",
|
|
63
|
+
color: "#4CfF50",
|
|
64
|
+
items: [
|
|
65
|
+
{
|
|
66
|
+
id: "332",
|
|
67
|
+
rating: "Done",
|
|
68
|
+
name: "1",
|
|
69
|
+
owner: "Mathew John",
|
|
70
|
+
site: "Demo",
|
|
71
|
+
details: "Additional details here...",
|
|
72
|
+
location: "Mumbai",
|
|
73
|
+
status: "In Progress",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
active4: {
|
|
78
|
+
id: "done",
|
|
79
|
+
title: "Done",
|
|
80
|
+
color: "#4CfF50",
|
|
81
|
+
items: [
|
|
82
|
+
{
|
|
83
|
+
id: "3322",
|
|
84
|
+
rating: "Done",
|
|
85
|
+
name: "1",
|
|
86
|
+
owner: "Mathew John",
|
|
87
|
+
site: "Demo",
|
|
88
|
+
details: "Additional details here...",
|
|
89
|
+
location: "Mumbai",
|
|
90
|
+
status: "In Progress",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
active5: {
|
|
95
|
+
id: "done",
|
|
96
|
+
title: "Done",
|
|
97
|
+
color: "#4CfF50",
|
|
98
|
+
items: [
|
|
99
|
+
{
|
|
100
|
+
id: "332e2",
|
|
101
|
+
rating: "Done",
|
|
102
|
+
name: "1",
|
|
103
|
+
owner: "Mathew John",
|
|
104
|
+
site: "Demo",
|
|
105
|
+
details: "Additional details here...",
|
|
106
|
+
location: "Mumbai",
|
|
107
|
+
status: "In Progress",
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
var KanbanBoardExample = function () {
|
|
113
|
+
return (react_1.default.createElement(KanbanBoard_1.default, { data: initialData, onDelete: function (item) { return console.log("Delete", item); }, onOpen: function (item) { return console.log("Open", item); }, onDrag: function (updatedColumns) { return console.log("New State", updatedColumns); }, onColumnDelete: function (updatedColumns) { return console.log("New Del", updatedColumns); } }));
|
|
114
|
+
};
|
|
115
|
+
exports.default = KanbanBoardExample;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import Drawer, { DrawerHeader, DrawerBody, DrawerFooter } from "./Components/Dra
|
|
|
12
12
|
import Dropdown from "./Components/Dropdown/DropDown";
|
|
13
13
|
import Editor from "./Components/Editor/Editor";
|
|
14
14
|
import InputTextArea from "./Components/InputTextArea/InputTextArea";
|
|
15
|
+
import KanbanBoard from "./Components/KanbanBoard/KanbanBoard";
|
|
15
16
|
import Loading from "./Components/Loading/Loading";
|
|
16
17
|
import Modal, { ModalHeader, ModalBody, ModalFooter } from "./Components/Modal/Modal";
|
|
17
18
|
import MultiSelect from "./Components/MultiSelect/MultiSelect";
|
|
@@ -40,5 +41,5 @@ import withTheme from "./withTheme";
|
|
|
40
41
|
import { useCustomTheme } from "./Theme/useCustomTheme";
|
|
41
42
|
import { ThemesList } from "./Theme";
|
|
42
43
|
import { debounce } from "./Utils/table";
|
|
43
|
-
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, InputTextArea, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, NoteTextArea, MultiSelect, NumberInput, PinInput, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Search, Select, SelectSearch, SideBar, Skeletons, Switch, Table, TableToggle, TextInput, Timeline, Toaster, ToolTip, useToaster, VerifyEmailOtp, useCustomTheme, ThemesList, debounce, };
|
|
44
|
+
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, InputTextArea, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, NoteTextArea, MultiSelect, NumberInput, PinInput, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Search, Select, SelectSearch, SideBar, Skeletons, Switch, Table, TableToggle, TextInput, Timeline, Toaster, ToolTip, useToaster, VerifyEmailOtp, useCustomTheme, ThemesList, debounce, };
|
|
44
45
|
export default withTheme;
|
package/dist/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.
|
|
31
|
-
exports.debounce = exports.ThemesList = void 0;
|
|
30
|
+
exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.TableToggle = exports.Table = exports.Switch = exports.Skeletons = exports.SideBar = exports.SelectSearch = exports.Select = exports.Search = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.PinInput = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.NavigationBar = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.KanbanBoard = exports.InputTextArea = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
|
|
31
|
+
exports.debounce = exports.ThemesList = exports.useCustomTheme = void 0;
|
|
32
32
|
var Accordion_1 = __importDefault(require("./Components/Accordion/Accordion"));
|
|
33
33
|
exports.Accordian = Accordion_1.default;
|
|
34
34
|
var AlertDialog_1 = __importDefault(require("./Components/AlertDialog/AlertDialog"));
|
|
@@ -60,6 +60,8 @@ var Editor_1 = __importDefault(require("./Components/Editor/Editor"));
|
|
|
60
60
|
exports.Editor = Editor_1.default;
|
|
61
61
|
var InputTextArea_1 = __importDefault(require("./Components/InputTextArea/InputTextArea"));
|
|
62
62
|
exports.InputTextArea = InputTextArea_1.default;
|
|
63
|
+
var KanbanBoard_1 = __importDefault(require("./Components/KanbanBoard/KanbanBoard"));
|
|
64
|
+
exports.KanbanBoard = KanbanBoard_1.default;
|
|
63
65
|
var Loading_1 = __importDefault(require("./Components/Loading/Loading"));
|
|
64
66
|
exports.Loading = Loading_1.default;
|
|
65
67
|
var Modal_1 = __importStar(require("./Components/Modal/Modal"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixelize-design-library",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@chakra-ui/react": "^2.8.2",
|
|
10
10
|
"@fontsource-variable/inter": "^5.1.0",
|
|
11
|
+
"@hello-pangea/dnd": "^18.0.1",
|
|
11
12
|
"framer-motion": "^11.2.2",
|
|
12
13
|
"jodit-react": "^4.1.2",
|
|
13
14
|
"lucide-react": "^0.487.0",
|