pixelize-design-library 2.2.129 → 2.2.130

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.
@@ -172,11 +172,11 @@ var KanbanBoard = function (_a) {
172
172
  };
173
173
  var NoItemsTemplate = function (_a) {
174
174
  var _b;
175
- var colId = _a.colId;
175
+ var column = _a.column;
176
176
  return (react_1.default.createElement(react_2.Box, null,
177
177
  react_1.default.createElement(react_2.Flex, { flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 2 },
178
178
  react_1.default.createElement(react_2.Text, { fontSize: "sm", color: (_b = colors === null || colors === void 0 ? void 0 : colors.text) === null || _b === void 0 ? void 0 : _b[600], textAlign: "center", mt: 4 }, (noItems === null || noItems === void 0 ? void 0 : noItems.text) || "No items in this column"),
179
- react_1.default.createElement(Button_1.default, { onClick: function () { var _a; return (_a = noItems === null || noItems === void 0 ? void 0 : noItems.onClick) === null || _a === void 0 ? void 0 : _a.call(noItems, colId); }, size: "xs" }, (noItems === null || noItems === void 0 ? void 0 : noItems.buttonText) || "Add Item"))));
179
+ react_1.default.createElement(Button_1.default, { onClick: function () { var _a; return (_a = noItems === null || noItems === void 0 ? void 0 : noItems.onClick) === null || _a === void 0 ? void 0 : _a.call(noItems, column); }, size: "xs" }, (noItems === null || noItems === void 0 ? void 0 : noItems.buttonText) || "Add Item"))));
180
180
  };
181
181
  if (!canView)
182
182
  return null;
@@ -233,7 +233,6 @@ var KanbanBoard = function (_a) {
233
233
  react_1.default.createElement(OverflowTooltipText_1.default, { placement: "top" }, column.title)),
234
234
  canDelete && hoveredColumn === colId && column.items.length > 0 && (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 handleColumnDelete(colId); }, transition: "color 0.2s ease" })),
235
235
  !(canDelete && hoveredColumn === colId && column.items.length > 0) && (react_1.default.createElement(react_2.Box, { width: "16px", height: "16px" }))),
236
- (noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && react_1.default.createElement(NoItemsTemplate, { colId: colId }),
237
236
  react_1.default.createElement(react_2.Box, { px: 2,
238
237
  // pb={2}
239
238
  flex: "1", overflowY: "auto", width: "100%",
@@ -270,20 +269,22 @@ var KanbanBoard = function (_a) {
270
269
  scrollbarGutter: "stable both-edges",
271
270
  },
272
271
  cursor: canDrag ? "grab" : "not-allowed",
273
- } }, virtualization ? (react_1.default.createElement(react_window_1.VariableSizeList, { ref: function (el) {
274
- if (el)
275
- listRefs.current[colId] = el;
276
- }, height: containerHeight - 150, itemCount: column.items.length, itemSize: function (index) { return getItemSize(index, column.items, colId); }, width: "100%", itemData: {
277
- items: column.items,
278
- colId: colId,
279
- placeholder: provided.placeholder,
280
- } }, Row)) : (react_1.default.createElement(react_2.Box, null,
281
- column.items.map(function (account, index) { return (react_1.default.createElement("div", { key: account.id, style: { marginBottom: 12 } },
282
- react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id, isDragDisabled: !canDrag }, function (provided) { return (react_1.default.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
283
- react_1.default.createElement(AccountCard_1.default, { account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () {
284
- return toggleExpand(account.id, colId, index);
285
- }, isDeletable: canDelete }))); }))); }),
286
- provided.placeholder)))));
272
+ } },
273
+ (noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && react_1.default.createElement(NoItemsTemplate, { column: column }),
274
+ virtualization ? (react_1.default.createElement(react_window_1.VariableSizeList, { ref: function (el) {
275
+ if (el)
276
+ listRefs.current[colId] = el;
277
+ }, height: containerHeight - 150, itemCount: column.items.length, itemSize: function (index) { return getItemSize(index, column.items, colId); }, width: "100%", itemData: {
278
+ items: column.items,
279
+ colId: colId,
280
+ placeholder: provided.placeholder,
281
+ } }, Row)) : (react_1.default.createElement(react_2.Box, null,
282
+ column.items.map(function (account, index) { return (react_1.default.createElement("div", { key: account.id, style: { marginBottom: 12 } },
283
+ react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id, isDragDisabled: !canDrag }, function (provided) { return (react_1.default.createElement("div", __assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: provided.draggableProps.style }),
284
+ react_1.default.createElement(AccountCard_1.default, { account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () {
285
+ return toggleExpand(account.id, colId, index);
286
+ }, isDeletable: canDelete }))); }))); }),
287
+ provided.placeholder)))));
287
288
  }));
288
289
  }))))));
289
290
  };
@@ -49,6 +49,6 @@ export type KanbanBoardProps = {
49
49
  isVisible?: boolean;
50
50
  text?: string;
51
51
  buttonText?: string;
52
- onClick?: (columnId: string) => void;
52
+ onClick?: (column: ColumnType) => void;
53
53
  };
54
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.2.129",
3
+ "version": "2.2.130",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",