pixelize-design-library 1.1.19 → 1.1.21
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/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +6 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts +1 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +14 -14
- package/dist/Components/KaTable/CustomHeader.d.ts +1 -1
- package/dist/Components/KaTable/CustomHeader.js +23 -23
- package/dist/Components/KaTable/KaTable.d.ts +2 -1
- package/dist/Components/KaTable/KaTable.js +3 -2
- package/dist/Components/KaTable/KaTableProps.d.ts +2 -0
- package/dist/Components/KaTable/SelectionCell.js +9 -6
- package/dist/Components/KaTable/SelectionHeader.js +5 -4
- package/dist/Components/KaTable/useMergedChildComponents.d.ts +1 -1
- package/dist/Components/KaTable/useMergedChildComponents.js +29 -6
- package/dist/Components/MultiSelect/MultiSelect.js +6 -19
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +12 -10
- package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -1
- package/dist/Components/SelectSearch/SelectSearch.js +499 -28
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +6 -4
- package/dist/Components/ToolTip/ToolTip.d.ts +1 -1
- package/dist/Components/ToolTip/ToolTip.js +2 -2
- package/dist/Components/ToolTip/ToolTipProps.d.ts +1 -0
- package/dist/Pages/KaTableExample.js +27 -18
- package/dist/Pages/selectSearch.d.ts +2 -2
- package/dist/Pages/selectSearch.js +36 -9
- package/dist/Theme/Default/fonts.d.ts +35 -0
- package/dist/Theme/Default/fonts.js +37 -0
- package/package.json +1 -1
- package/dist/Pages/katable.d.ts +0 -3
- package/dist/Pages/katable.js +0 -194
|
@@ -41,6 +41,7 @@ var react_1 = __importStar(require("react"));
|
|
|
41
41
|
var KaTable_1 = __importDefault(require("../Components/KaTable/KaTable"));
|
|
42
42
|
var KaTable_2 = require("../Components/KaTable/KaTable");
|
|
43
43
|
var icons_1 = require("@chakra-ui/icons");
|
|
44
|
+
var react_2 = require("@chakra-ui/react");
|
|
44
45
|
var menuItems = [
|
|
45
46
|
{ label: "Sort", action: "Sort" },
|
|
46
47
|
{ label: "Hide column", action: "Hide column" },
|
|
@@ -88,6 +89,7 @@ var columns = [
|
|
|
88
89
|
title: "Column 2",
|
|
89
90
|
dataType: DataType.String,
|
|
90
91
|
width: 150,
|
|
92
|
+
// visible: false,
|
|
91
93
|
},
|
|
92
94
|
{
|
|
93
95
|
key: "column3",
|
|
@@ -176,28 +178,30 @@ var columns = [
|
|
|
176
178
|
var KaTableExample = function () {
|
|
177
179
|
var _a = (0, react_1.useState)(false), actionButtons = _a[0], setActionButtons = _a[1];
|
|
178
180
|
var _b = (0, react_1.useState)([]), selectedRows = _b[0], setSelectedRows = _b[1];
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
// const kaTableFormat = (props: any) => {
|
|
182
|
+
// if (props.column.dataType === DataType.Date) {
|
|
183
|
+
// return (
|
|
184
|
+
// props.value &&
|
|
185
|
+
// props.value.toLocaleDateString("en", {
|
|
186
|
+
// month: "2-digit",
|
|
187
|
+
// day: "2-digit",
|
|
188
|
+
// year: "numeric",
|
|
189
|
+
// })
|
|
190
|
+
// );
|
|
191
|
+
// }
|
|
192
|
+
// };
|
|
189
193
|
var EditButton = function (_a) {
|
|
190
194
|
var dispatch = _a.dispatch, rowKeyValue = _a.rowKeyValue;
|
|
191
195
|
return (react_1.default.createElement("div", { className: "edit-cell-button" },
|
|
192
196
|
react_1.default.createElement(icons_1.EditIcon, null),
|
|
193
197
|
react_1.default.createElement(icons_1.DeleteIcon, null)));
|
|
194
198
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
};
|
|
199
|
+
// const handleSortChange = (newSortState: any, columnName: any) => {
|
|
200
|
+
// console.log(`Sort state for ${columnName} changed to:`, newSortState);
|
|
201
|
+
// };
|
|
202
|
+
// const handleMenuItemClick = (action: any, columnName: any) => {
|
|
203
|
+
// console.log(`Menu item clicked for ${columnName}:`, action);
|
|
204
|
+
// };
|
|
201
205
|
var handleCheckSelect = (0, react_1.useCallback)(function (selectedRows) {
|
|
202
206
|
console.log("CB", selectedRows);
|
|
203
207
|
if (selectedRows.length !== 0) {
|
|
@@ -208,13 +212,18 @@ var KaTableExample = function () {
|
|
|
208
212
|
}
|
|
209
213
|
setSelectedRows(selectedRows);
|
|
210
214
|
}, []);
|
|
211
|
-
console.log(actionButtons, "actionButtons");
|
|
215
|
+
// console.log(actionButtons, "actionButtons");
|
|
216
|
+
var handleExample = function () {
|
|
217
|
+
setSelectedRows([]);
|
|
218
|
+
};
|
|
219
|
+
// console.log(selectedRows, "selectedRows");
|
|
212
220
|
return (react_1.default.createElement("div", null,
|
|
221
|
+
react_1.default.createElement(react_2.Button, { onClick: handleExample }, "click here"),
|
|
213
222
|
react_1.default.createElement(KaTable_1.default, { data: dataArray, columns: columns, checkSelect: true, onRowClick: function (rowKeyValue) {
|
|
214
223
|
console.log("Row clicked", rowKeyValue);
|
|
215
224
|
}, selected: selectedRows, onSelectionChange: function (selectedRows) {
|
|
216
225
|
handleCheckSelect(selectedRows);
|
|
217
|
-
}, menuItems: menuItems,
|
|
226
|
+
}, columnVisibility: true, menuItems: menuItems,
|
|
218
227
|
// onSortChange={handleSortChange}
|
|
219
228
|
// onMenuItemClick={handleMenuItemClick}
|
|
220
229
|
// format={kaTableFormat}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const SelectSearchs: () => React.JSX.Element;
|
|
3
|
+
export default SelectSearchs;
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var react_1 =
|
|
29
|
+
var react_1 = __importStar(require("react"));
|
|
7
30
|
var SelectSearch_1 = __importDefault(require("../Components/SelectSearch/SelectSearch"));
|
|
8
31
|
var fi_1 = require("react-icons/fi");
|
|
9
|
-
var
|
|
32
|
+
var SelectSearchs = function () {
|
|
33
|
+
var _a = (0, react_1.useState)("Option 1"), selectSearchText = _a[0], setSelectSearchText = _a[1];
|
|
34
|
+
var _b = (0, react_1.useState)(), selectedOption = _b[0], setSelectedOption = _b[1];
|
|
35
|
+
console.log("selectedOption", selectedOption);
|
|
10
36
|
return (react_1.default.createElement("div", null,
|
|
11
37
|
react_1.default.createElement(SelectSearch_1.default, { options: [
|
|
12
38
|
{ id: "1", label: "Option 1" },
|
|
@@ -16,12 +42,13 @@ var selectSearchs = function () {
|
|
|
16
42
|
label: "clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3clone 3",
|
|
17
43
|
},
|
|
18
44
|
], inputOnchange: function (value) {
|
|
45
|
+
setSelectSearchText(value.toString());
|
|
19
46
|
console.log(value);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
console.log();
|
|
23
|
-
}, name: "hai",
|
|
24
|
-
|
|
25
|
-
|
|
47
|
+
}, initialSelectedOption: { id: "1", label: "Option 1" }, onOptionSelect: function (data) {
|
|
48
|
+
// setSelectSearchText(label);
|
|
49
|
+
console.log("Selected option:", data);
|
|
50
|
+
}, name: "hai", label: "SelectSearch", searchQuery: selectSearchText, rightIcon: react_1.default.createElement(fi_1.FiUser, { color: "gray.300" }), isMultipleSelect: true, onOptionMultiSelect: function (data) {
|
|
51
|
+
setSelectedOption(data);
|
|
52
|
+
} })));
|
|
26
53
|
};
|
|
27
|
-
exports.default =
|
|
54
|
+
exports.default = SelectSearchs;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "@fontsource/ubuntu-sans";
|
|
2
|
+
declare const fontOptions: {
|
|
3
|
+
fonts: {
|
|
4
|
+
body: string;
|
|
5
|
+
heading: string;
|
|
6
|
+
mono: string;
|
|
7
|
+
};
|
|
8
|
+
fontSizes: {
|
|
9
|
+
xs: string;
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
"2xl": string;
|
|
15
|
+
"3xl": string;
|
|
16
|
+
"4xl": string;
|
|
17
|
+
"5xl": string;
|
|
18
|
+
"6xl": string;
|
|
19
|
+
"7xl": string;
|
|
20
|
+
"8xl": string;
|
|
21
|
+
"9xl": string;
|
|
22
|
+
};
|
|
23
|
+
fontWeights: {
|
|
24
|
+
hairline: number;
|
|
25
|
+
thin: number;
|
|
26
|
+
light: number;
|
|
27
|
+
normal: number;
|
|
28
|
+
medium: number;
|
|
29
|
+
semibold: number;
|
|
30
|
+
bold: number;
|
|
31
|
+
extrabold: number;
|
|
32
|
+
black: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default fontOptions;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
require("@fontsource/ubuntu-sans");
|
|
4
|
+
var fontOptions = {
|
|
5
|
+
fonts: {
|
|
6
|
+
body: "Ubuntu Sans, serif",
|
|
7
|
+
heading: "Ubuntu Sans, serif",
|
|
8
|
+
mono: "Ubuntu Sans, monospace",
|
|
9
|
+
},
|
|
10
|
+
fontSizes: {
|
|
11
|
+
xs: "0.75rem",
|
|
12
|
+
sm: "0.875rem",
|
|
13
|
+
md: "1rem",
|
|
14
|
+
lg: "1.125rem",
|
|
15
|
+
xl: "1.25rem",
|
|
16
|
+
"2xl": "1.5rem",
|
|
17
|
+
"3xl": "1.875rem",
|
|
18
|
+
"4xl": "2.25rem",
|
|
19
|
+
"5xl": "3rem",
|
|
20
|
+
"6xl": "3.75rem",
|
|
21
|
+
"7xl": "4.5rem",
|
|
22
|
+
"8xl": "6rem",
|
|
23
|
+
"9xl": "8rem",
|
|
24
|
+
},
|
|
25
|
+
fontWeights: {
|
|
26
|
+
hairline: 100,
|
|
27
|
+
thin: 200,
|
|
28
|
+
light: 300,
|
|
29
|
+
normal: 400,
|
|
30
|
+
medium: 500,
|
|
31
|
+
semibold: 600,
|
|
32
|
+
bold: 700,
|
|
33
|
+
extrabold: 800,
|
|
34
|
+
black: 900,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
exports.default = fontOptions;
|
package/package.json
CHANGED
package/dist/Pages/katable.d.ts
DELETED
package/dist/Pages/katable.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var react_1 = __importDefault(require("react"));
|
|
18
|
-
var KaTable_1 = __importDefault(require("../Components/KaTable/KaTable"));
|
|
19
|
-
var KaTable_2 = require("../Components/KaTable/KaTable");
|
|
20
|
-
var icons_1 = require("@chakra-ui/icons");
|
|
21
|
-
var katable = function () {
|
|
22
|
-
var DataType = KaTable_2.TableEnums.DataType;
|
|
23
|
-
var dataArray = Array(50)
|
|
24
|
-
.fill(undefined)
|
|
25
|
-
.map(function (_, index) { return ({
|
|
26
|
-
column1: index % 2 === 0,
|
|
27
|
-
column2: "column:2 row:".concat(index + 1),
|
|
28
|
-
column3: index + 5,
|
|
29
|
-
column4: index + 10,
|
|
30
|
-
column5: index + 15,
|
|
31
|
-
column6: index + 20,
|
|
32
|
-
column7: index + 25,
|
|
33
|
-
column8: index + 30,
|
|
34
|
-
column9: index + 35,
|
|
35
|
-
column10: index + 40,
|
|
36
|
-
column11: index + 45,
|
|
37
|
-
column12: index + 50,
|
|
38
|
-
column13: index + 55,
|
|
39
|
-
column14: index + 60,
|
|
40
|
-
column15: new Date(2022, 11, index),
|
|
41
|
-
id: index + 1,
|
|
42
|
-
}); });
|
|
43
|
-
var columns = [
|
|
44
|
-
{
|
|
45
|
-
key: "column1",
|
|
46
|
-
title: "Column 1",
|
|
47
|
-
dataType: DataType.Boolean,
|
|
48
|
-
width: 150,
|
|
49
|
-
columnFreeze: true,
|
|
50
|
-
customHeader: false,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
key: "column2",
|
|
54
|
-
title: "Column 2",
|
|
55
|
-
dataType: DataType.String,
|
|
56
|
-
width: 150,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: "column3",
|
|
60
|
-
title: "Column 3",
|
|
61
|
-
dataType: DataType.Number,
|
|
62
|
-
width: 150,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
key: "column4",
|
|
66
|
-
title: "Column 4",
|
|
67
|
-
dataType: DataType.Number,
|
|
68
|
-
width: 150,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
key: "column5",
|
|
72
|
-
title: "Column 5",
|
|
73
|
-
dataType: DataType.Number,
|
|
74
|
-
width: 150,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
key: "column6",
|
|
78
|
-
title: "Column 6",
|
|
79
|
-
dataType: DataType.Number,
|
|
80
|
-
width: 150,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: "column7",
|
|
84
|
-
title: "Column 7",
|
|
85
|
-
dataType: DataType.Number,
|
|
86
|
-
width: 150,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
key: "column8",
|
|
90
|
-
title: "Column 8",
|
|
91
|
-
dataType: DataType.Number,
|
|
92
|
-
width: 150,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: "column9",
|
|
96
|
-
title: "Column 9",
|
|
97
|
-
dataType: DataType.Number,
|
|
98
|
-
width: 150,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
key: "column10",
|
|
102
|
-
title: "Column 10",
|
|
103
|
-
dataType: DataType.Number,
|
|
104
|
-
width: 150,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
key: "column11",
|
|
108
|
-
title: "Column 11",
|
|
109
|
-
dataType: DataType.Number,
|
|
110
|
-
width: 150,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
key: "column12",
|
|
114
|
-
title: "Column 12",
|
|
115
|
-
dataType: DataType.Number,
|
|
116
|
-
width: 150,
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
key: "column13",
|
|
120
|
-
title: "Column 13",
|
|
121
|
-
dataType: DataType.Number,
|
|
122
|
-
width: 150,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
key: "column14",
|
|
126
|
-
title: "Column 14",
|
|
127
|
-
dataType: DataType.Number,
|
|
128
|
-
width: 150,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
key: "column15",
|
|
132
|
-
title: "Column 15",
|
|
133
|
-
dataType: DataType.Date,
|
|
134
|
-
width: 150,
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
key: "editColumn",
|
|
138
|
-
width: 80,
|
|
139
|
-
customHeader: false,
|
|
140
|
-
},
|
|
141
|
-
];
|
|
142
|
-
var kaTableFormat = function (props) {
|
|
143
|
-
if (props.column.dataType === DataType.Date) {
|
|
144
|
-
return (props.value &&
|
|
145
|
-
props.value.toLocaleDateString("en", {
|
|
146
|
-
month: "2-digit",
|
|
147
|
-
day: "2-digit",
|
|
148
|
-
year: "numeric",
|
|
149
|
-
}));
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
var EditButton = function (_a) {
|
|
153
|
-
var dispatch = _a.dispatch, rowKeyValue = _a.rowKeyValue;
|
|
154
|
-
return (react_1.default.createElement("div", { className: "edit-cell-button" },
|
|
155
|
-
react_1.default.createElement(icons_1.EditIcon, null),
|
|
156
|
-
react_1.default.createElement(icons_1.DeleteIcon, null)));
|
|
157
|
-
};
|
|
158
|
-
var handleSortChange = function (newSortState, columnName) {
|
|
159
|
-
console.log("Sort state for ".concat(columnName, " changed to:"), newSortState);
|
|
160
|
-
};
|
|
161
|
-
var handleMenuItemClick = function (action, columnName) {
|
|
162
|
-
console.log("Menu item clicked for ".concat(columnName, ":"), action);
|
|
163
|
-
};
|
|
164
|
-
var menuItems = [
|
|
165
|
-
{ label: "Sort", action: "Sort" },
|
|
166
|
-
{ label: "Hide column", action: "Hide column" },
|
|
167
|
-
{
|
|
168
|
-
label: "Filter",
|
|
169
|
-
submenu: [
|
|
170
|
-
{ label: "Filter by Date", action: "Filter by Date" },
|
|
171
|
-
{ label: "Filter by Name", action: "Filter by Name" },
|
|
172
|
-
{ label: "Filter by Status", action: "Filter by Status" },
|
|
173
|
-
],
|
|
174
|
-
},
|
|
175
|
-
];
|
|
176
|
-
return (react_1.default.createElement("div", null,
|
|
177
|
-
react_1.default.createElement(KaTable_1.default, { data: dataArray, columns: columns, checkSelect: true, onRowClick: function (rowKeyValue) {
|
|
178
|
-
console.log("Row clicked", rowKeyValue);
|
|
179
|
-
}, onSelectionChange: function (selectedRows) {
|
|
180
|
-
console.log("Selected rows:", selectedRows);
|
|
181
|
-
}, menuItems: menuItems, onSortChange: handleSortChange, onMenuItemClick: handleMenuItemClick, format: kaTableFormat, childComponents: {
|
|
182
|
-
cellText: {
|
|
183
|
-
content: function (props) {
|
|
184
|
-
if (props.column.key === "editColumn") {
|
|
185
|
-
return react_1.default.createElement(EditButton, __assign({}, props));
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
}, loading: {
|
|
190
|
-
enabled: false,
|
|
191
|
-
text: "Loading data",
|
|
192
|
-
} })));
|
|
193
|
-
};
|
|
194
|
-
exports.default = katable;
|