pixelize-design-library 2.2.199 → 2.3.1-beta.10

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.
Files changed (163) hide show
  1. package/.claude/settings.local.json +44 -0
  2. package/coverage/clover.xml +638 -0
  3. package/coverage/coverage-final.json +20 -0
  4. package/coverage/lcov-report/Table/CompactSelect.tsx.html +379 -0
  5. package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +514 -0
  6. package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +373 -0
  7. package/coverage/lcov-report/Table/Components/Pagination.tsx.html +574 -0
  8. package/coverage/lcov-report/Table/Components/TableActions.tsx.html +574 -0
  9. package/coverage/lcov-report/Table/Components/TableBody.tsx.html +1027 -0
  10. package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +397 -0
  11. package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +1060 -0
  12. package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +361 -0
  13. package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +337 -0
  14. package/coverage/lcov-report/Table/Components/index.html +266 -0
  15. package/coverage/lcov-report/Table/Components/useDebounce.ts.html +178 -0
  16. package/coverage/lcov-report/Table/Components/useTable.ts.html +778 -0
  17. package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +1810 -0
  18. package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +178 -0
  19. package/coverage/lcov-report/Table/Table.tsx.html +1567 -0
  20. package/coverage/lcov-report/Table/TableProps.tsx.html +658 -0
  21. package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +619 -0
  22. package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +229 -0
  23. package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +532 -0
  24. package/coverage/lcov-report/Table/TableSettings/index.html +146 -0
  25. package/coverage/lcov-report/Table/TableToDo.tsx.html +973 -0
  26. package/coverage/lcov-report/Table/TextOperationControls.tsx.html +271 -0
  27. package/coverage/lcov-report/Table/filterTypes.ts.html +97 -0
  28. package/coverage/lcov-report/Table/index.html +176 -0
  29. package/coverage/lcov-report/base.css +224 -0
  30. package/coverage/lcov-report/block-navigation.js +87 -0
  31. package/coverage/lcov-report/favicon.png +0 -0
  32. package/coverage/lcov-report/index.html +146 -0
  33. package/coverage/lcov-report/prettify.css +1 -0
  34. package/coverage/lcov-report/prettify.js +2 -0
  35. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  36. package/coverage/lcov-report/sorter.js +210 -0
  37. package/coverage/lcov.info +1836 -0
  38. package/dist/Assets/defaultLogo.tsx +31 -0
  39. package/dist/Components/Accordion/Accordion.js +26 -5
  40. package/dist/Components/Button/Button.styles.js +44 -3
  41. package/dist/Components/Button/ButtonProps.d.ts +1 -1
  42. package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +2 -2
  43. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +50 -38
  44. package/dist/Components/Card/PaymentCard/PaymentCard.d.ts +1 -1
  45. package/dist/Components/Card/PaymentCard/PaymentCard.js +3 -3
  46. package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +0 -1
  47. package/dist/Components/Checkbox/Checkbox.js +2 -2
  48. package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
  49. package/dist/Components/Common/FormLabel.d.ts +2 -1
  50. package/dist/Components/Common/FormLabel.js +8 -9
  51. package/dist/Components/Common/fieldStyles.d.ts +22 -0
  52. package/dist/Components/Common/fieldStyles.js +42 -0
  53. package/dist/Components/DatePicker/CalendarPanel.d.ts +2 -0
  54. package/dist/Components/DatePicker/CalendarPanel.js +104 -65
  55. package/dist/Components/DatePicker/RangeDatePicker.js +37 -16
  56. package/dist/Components/DatePicker/SingleDatePicker.js +16 -16
  57. package/dist/Components/DatePicker/TimePicker.js +4 -4
  58. package/dist/Components/Input/Input/Input.d.ts +1 -1
  59. package/dist/Components/Input/Input/Input.js +5 -4
  60. package/dist/Components/Input/Input/InputProps.d.ts +2 -0
  61. package/dist/Components/Input/TextInput.styles.js +2 -1
  62. package/dist/Components/InputTextArea/InputTextArea.style.js +2 -1
  63. package/dist/Components/KanbanBoard/AccountCard.js +17 -14
  64. package/dist/Components/KanbanBoard/KanbanBoard.js +93 -78
  65. package/dist/Components/MultiSelect/MultiSelect.js +11 -12
  66. package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
  67. package/dist/Components/NavigationBar/NavigationBar.js +57 -30
  68. package/dist/Components/NavigationBar/NavigationBarProps.d.ts +1 -0
  69. package/dist/Components/NoteTextArea/NoteTextArea.js +44 -40
  70. package/dist/Components/NumberInput/NumberInput.styles.js +2 -1
  71. package/dist/Components/PinInput/PinInput.d.ts +1 -1
  72. package/dist/Components/PinInput/PinInput.js +3 -2
  73. package/dist/Components/PinInput/PinInputProps.d.ts +4 -0
  74. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +1 -1
  75. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +42 -24
  76. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +2 -0
  77. package/dist/Components/RadioButton/RadioButton.js +1 -1
  78. package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
  79. package/dist/Components/SearchSelect/SearchSelect.js +56 -24
  80. package/dist/Components/SearchSelect/SearchSelectProps.d.ts +2 -0
  81. package/dist/Components/Select/Select.styles.js +2 -1
  82. package/dist/Components/SelectSearch/SelectSearch.js +7 -4
  83. package/dist/Components/SideBar/SecondaryBar.js +20 -18
  84. package/dist/Components/SideBar/SideBar.d.ts +1 -1
  85. package/dist/Components/SideBar/SideBar.js +58 -43
  86. package/dist/Components/SideBar/SideBarProps.d.ts +14 -3
  87. package/dist/Components/SideBar/components/MenuItemBox.js +28 -24
  88. package/dist/Components/SideBar/components/MenuItems.js +16 -2
  89. package/dist/Components/SideBar/components/MenuPopoverContent.js +16 -16
  90. package/dist/Components/SideBar/components/OtherApps.js +16 -14
  91. package/dist/Components/Table/Table.d.ts +1 -1
  92. package/dist/Components/Table/Table.js +234 -38
  93. package/dist/Components/Table/TableProps.d.ts +42 -2
  94. package/dist/Components/Table/{Components → components}/TableActions.d.ts +2 -2
  95. package/dist/Components/Table/{Components → components}/TableActions.js +5 -4
  96. package/dist/Components/Table/{Components → components}/TableBody.d.ts +5 -1
  97. package/dist/Components/Table/components/TableBody.js +369 -0
  98. package/dist/Components/Table/components/TableGroupRow.d.ts +15 -0
  99. package/dist/Components/Table/components/TableGroupRow.js +27 -0
  100. package/dist/Components/Table/{Components → components}/TableHeader.js +18 -8
  101. package/dist/Components/Table/{LeftFilterPane.js → filters/LeftFilterPane.js} +3 -3
  102. package/dist/Components/Table/{Components → hooks}/useTable.d.ts +1 -1
  103. package/dist/Components/Table/{Components → hooks}/useTable.js +8 -7
  104. package/dist/Components/Table/settings/TableSettings.d.ts +11 -0
  105. package/dist/Components/Table/settings/TableSettings.js +165 -0
  106. package/dist/Components/Timeline/Timeline.d.ts +1 -1
  107. package/dist/Components/Timeline/Timeline.js +145 -78
  108. package/dist/Components/Toaster/Toaster.js +40 -20
  109. package/dist/Theme/Default/palette.d.ts +4 -0
  110. package/dist/Theme/Default/palette.js +3 -0
  111. package/dist/Theme/Emerald/palette.d.ts +4 -0
  112. package/dist/Theme/Emerald/palette.js +2 -1
  113. package/dist/Theme/Meadow/palette.d.ts +4 -0
  114. package/dist/Theme/Meadow/palette.js +2 -1
  115. package/dist/Theme/Radiant/palette.d.ts +4 -0
  116. package/dist/Theme/Radiant/palette.js +2 -1
  117. package/dist/Theme/Rosewood/palette.d.ts +4 -0
  118. package/dist/Theme/Rosewood/palette.js +2 -1
  119. package/dist/Theme/Skyline/palette.d.ts +4 -0
  120. package/dist/Theme/Skyline/palette.js +2 -1
  121. package/dist/Theme/Slate/palette.d.ts +4 -0
  122. package/dist/Theme/Slate/palette.js +2 -1
  123. package/dist/Theme/themeProps.d.ts +4 -0
  124. package/dist/Utils/table.d.ts +26 -0
  125. package/dist/Utils/table.js +142 -38
  126. package/package.json +2 -2
  127. package/dist/Components/Table/Components/TableBody.js +0 -201
  128. package/dist/Components/Table/TableSettings/TableFilters.d.ts +0 -10
  129. package/dist/Components/Table/TableSettings/TableFilters.js +0 -69
  130. package/dist/Components/Table/TableSettings/TableFilters.test.d.ts +0 -1
  131. package/dist/Components/Table/TableSettings/TableFilters.test.js +0 -109
  132. package/dist/Components/Table/TableSettings/TableSettings.d.ts +0 -8
  133. package/dist/Components/Table/TableSettings/TableSettings.js +0 -141
  134. package/dist/Components/Table/TableToDo.d.ts +0 -2
  135. package/dist/Components/Table/TableToDo.js +0 -291
  136. /package/dist/Components/Table/{Components → components}/HeaderActions.d.ts +0 -0
  137. /package/dist/Components/Table/{Components → components}/HeaderActions.js +0 -0
  138. /package/dist/Components/Table/{Components → components}/Pagination.d.ts +0 -0
  139. /package/dist/Components/Table/{Components → components}/Pagination.js +0 -0
  140. /package/dist/Components/Table/{Components → components}/TableBody.virtualize.test.d.ts +0 -0
  141. /package/dist/Components/Table/{Components → components}/TableBody.virtualize.test.js +0 -0
  142. /package/dist/Components/Table/{Components → components}/TableHeader.d.ts +0 -0
  143. /package/dist/Components/Table/{Components → components}/TableLoading.d.ts +0 -0
  144. /package/dist/Components/Table/{Components → components}/TableLoading.js +0 -0
  145. /package/dist/Components/Table/{Components → components}/TableSearch.d.ts +0 -0
  146. /package/dist/Components/Table/{Components → components}/TableSearch.js +0 -0
  147. /package/dist/Components/Table/{Components → filters}/ActiveFilters.d.ts +0 -0
  148. /package/dist/Components/Table/{Components → filters}/ActiveFilters.js +0 -0
  149. /package/dist/Components/Table/{CompactSelect.d.ts → filters/CompactSelect.d.ts} +0 -0
  150. /package/dist/Components/Table/{CompactSelect.js → filters/CompactSelect.js} +0 -0
  151. /package/dist/Components/Table/{LeftFilterPane.d.ts → filters/LeftFilterPane.d.ts} +0 -0
  152. /package/dist/Components/Table/{SelectOperationControls.d.ts → filters/SelectOperationControls.d.ts} +0 -0
  153. /package/dist/Components/Table/{SelectOperationControls.js → filters/SelectOperationControls.js} +0 -0
  154. /package/dist/Components/Table/{Components → filters}/TableFilters.d.ts +0 -0
  155. /package/dist/Components/Table/{Components → filters}/TableFilters.js +0 -0
  156. /package/dist/Components/Table/{TextOperationControls.d.ts → filters/TextOperationControls.d.ts} +0 -0
  157. /package/dist/Components/Table/{TextOperationControls.js → filters/TextOperationControls.js} +0 -0
  158. /package/dist/Components/Table/{Components → hooks}/useDebounce.d.ts +0 -0
  159. /package/dist/Components/Table/{Components → hooks}/useDebounce.js +0 -0
  160. /package/dist/Components/Table/{TableSettings → settings}/ManageColumns.d.ts +0 -0
  161. /package/dist/Components/Table/{TableSettings → settings}/ManageColumns.js +0 -0
  162. /package/dist/Components/Table/{TableSettings → settings}/ManageColumns.test.d.ts +0 -0
  163. /package/dist/Components/Table/{TableSettings → settings}/ManageColumns.test.js +0 -0
@@ -71,6 +71,9 @@ var Button_1 = __importDefault(require("../Button/Button"));
71
71
  /** Narrow rail width when a column is horizontally collapsed. */
72
72
  var COLLAPSED_KANBAN_COLUMN_WIDTH = "2.75rem";
73
73
  var KANBAN_CARD_GAP = 12;
74
+ // Top buffer above the first card so its border + hover lift aren't clipped by the
75
+ // scroll/virtualized list's top edge.
76
+ var KANBAN_LIST_TOP_PAD = 6;
74
77
  var KanbanRow = react_1.default.memo(function (_a) {
75
78
  var index = _a.index, style = _a.style, data = _a.data;
76
79
  var items = data.items, colId = data.colId, canDrag = data.canDrag, expanded = data.expanded, onDelete = data.onDelete, onOpen = data.onOpen, canDelete = data.canDelete, setSize = data.setSize, toggleExpand = data.toggleExpand;
@@ -79,7 +82,7 @@ var KanbanRow = react_1.default.memo(function (_a) {
79
82
  return react_1.default.createElement("div", { style: style });
80
83
  }
81
84
  return (react_1.default.createElement("div", { style: style },
82
- react_1.default.createElement("div", { style: { paddingBottom: KANBAN_CARD_GAP } },
85
+ react_1.default.createElement("div", { style: { paddingBottom: KANBAN_CARD_GAP, paddingTop: index === 0 ? KANBAN_LIST_TOP_PAD : 0 } },
83
86
  react_1.default.createElement(MeasuredItem_1.default, { index: index, setSize: function (i, h) { return setSize(i, h, colId); } },
84
87
  react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id, isDragDisabled: !canDrag }, function (provided) {
85
88
  var _a;
@@ -259,13 +262,14 @@ var KanbanBoard = function (_a) {
259
262
  return prev;
260
263
  return __assign(__assign({}, prev), (_a = {}, _a[key] = size, _a));
261
264
  });
265
+ // Only recompute from the row that changed downward (cheaper than resetting all).
262
266
  if (listRefs.current[colId]) {
263
- listRefs.current[colId].resetAfterIndex(0);
267
+ listRefs.current[colId].resetAfterIndex(index);
264
268
  }
265
269
  }, []);
266
270
  var getItemSize = (0, react_1.useCallback)(function (index, _items, colId) {
267
271
  var key = "".concat(colId, "-").concat(index);
268
- return (sizes[key] || DEFAULT_ITEM_HEIGHT) + KANBAN_CARD_GAP;
272
+ return (sizes[key] || DEFAULT_ITEM_HEIGHT) + KANBAN_CARD_GAP + (index === 0 ? KANBAN_LIST_TOP_PAD : 0);
269
273
  }, [sizes]);
270
274
  // Calculate container height
271
275
  (0, react_1.useEffect)(function () {
@@ -281,8 +285,9 @@ var KanbanBoard = function (_a) {
281
285
  window.removeEventListener("resize", calculateDimensions);
282
286
  };
283
287
  }, [isBoardLoading]);
284
- // toggle expand/collapse
285
- var toggleExpand = function (id, colId, index) {
288
+ // toggle expand/collapse — memoized so it doesn't bust `rowBaseProps`/itemData
289
+ // every render (which would re-render every virtualized row).
290
+ var toggleExpand = (0, react_1.useCallback)(function (id, colId, index) {
286
291
  setExpanded(function (prev) {
287
292
  var _a;
288
293
  var newExpanded = __assign(__assign({}, prev), (_a = {}, _a[id] = !prev[id], _a));
@@ -291,9 +296,9 @@ var KanbanBoard = function (_a) {
291
296
  }
292
297
  return newExpanded;
293
298
  });
294
- };
299
+ }, []);
295
300
  // drag handler
296
- var onDragEnd = function (result) {
301
+ var onDragEnd = (0, react_1.useCallback)(function (result) {
297
302
  var _a, _b;
298
303
  var source = result.source, destination = result.destination, type = result.type;
299
304
  if (!destination)
@@ -344,12 +349,12 @@ var KanbanBoard = function (_a) {
344
349
  toIndex: destination.index,
345
350
  });
346
351
  }
347
- };
348
- var handleColumnDelete = function (colId) {
352
+ }, [columns, onDrag, onColumnReorder]);
353
+ var handleColumnDelete = (0, react_1.useCallback)(function (colId) {
349
354
  var _a, _b;
350
355
  var columnIds = ((_b = (_a = columns[colId]) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.map(function (item) { return item.id; })) || [];
351
356
  onColumnDelete === null || onColumnDelete === void 0 ? void 0 : onColumnDelete(columnIds);
352
- };
357
+ }, [columns, onColumnDelete]);
353
358
  var rowBaseProps = (0, react_1.useMemo)(function () { return ({
354
359
  canDrag: canDrag,
355
360
  expanded: expanded,
@@ -359,6 +364,16 @@ var KanbanBoard = function (_a) {
359
364
  setSize: setSize,
360
365
  toggleExpand: toggleExpand,
361
366
  }); }, [canDrag, expanded, onDelete, onOpen, canDelete, setSize, toggleExpand]);
367
+ // Stable per-column itemData so unrelated board re-renders (e.g. column hover)
368
+ // don't change the reference react-window hands to every row → no row re-renders.
369
+ var itemDataByCol = (0, react_1.useMemo)(function () {
370
+ var map = {};
371
+ for (var _i = 0, _a = Object.entries(columns); _i < _a.length; _i++) {
372
+ var _b = _a[_i], colId = _b[0], column = _b[1];
373
+ map[colId] = __assign(__assign({}, rowBaseProps), { items: column.items, colId: colId });
374
+ }
375
+ return map;
376
+ }, [columns, rowBaseProps]);
362
377
  var renderColumnDroppable = function (colId, column, columnDragHandleProps, isColCollapsed) { return (react_1.default.createElement(dnd_1.Droppable, { droppableId: colId, key: colId, mode: virtualization ? "virtual" : "standard", renderClone: function (provided, _snapshot, rubric) {
363
378
  var _a;
364
379
  var item = column.items[rubric.source.index];
@@ -366,89 +381,89 @@ var KanbanBoard = function (_a) {
366
381
  return toggleExpand(item.id, colId, rubric.source.index);
367
382
  }, isDeletable: canDelete }))));
368
383
  } }, function (provided, snapshot) {
369
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
370
- return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.droppableProps, { width: isColCollapsed ? COLLAPSED_KANBAN_COLUMN_WIDTH : columnWidth, borderRadius: "0.5rem", borderWidth: "0.063rem", background: snapshot.isDraggingOver
384
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
385
+ return (react_1.default.createElement(react_2.Box, __assign({ ref: provided.innerRef }, provided.droppableProps, { width: isColCollapsed ? COLLAPSED_KANBAN_COLUMN_WIDTH : columnWidth, borderRadius: "0.75rem", background: snapshot.isDraggingOver
371
386
  ? (_a = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _a === void 0 ? void 0 : _a[50]
372
- : (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[100], border: "".concat(snapshot.isDraggingOver
373
- ? "0.5px dashed " + ((_c = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _c === void 0 ? void 0 : _c[300])
374
- : "0.125rem solid " + ((_d = colors.gray) === null || _d === void 0 ? void 0 : _d[200])), display: "flex", flexDirection: "column", flexShrink: 0, overflow: isColCollapsed ? "visible" : "hidden", height: "".concat(containerHeight - 60, "px"), transition: "width 0.2s ease", onMouseEnter: function () { return setHoveredColumn(colId); }, onMouseLeave: function () { return setHoveredColumn(null); } }),
387
+ : (_b = colors === null || colors === void 0 ? void 0 : colors.background) === null || _b === void 0 ? void 0 : _b[100], border: "0.063rem ".concat(snapshot.isDraggingOver ? "dashed" : "solid", " ").concat(snapshot.isDraggingOver
388
+ ? (_c = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _c === void 0 ? void 0 : _c[300]
389
+ : (_e = (_d = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _d === void 0 ? void 0 : _d[200]) !== null && _e !== void 0 ? _e : (_f = colors.gray) === null || _f === void 0 ? void 0 : _f[200]), transition: "background 0.15s ease, border-color 0.15s ease, width 0.2s ease", display: "flex", flexDirection: "column", flexShrink: 0, overflow: isColCollapsed ? "visible" : "hidden", height: "".concat(containerHeight - 60, "px"), onMouseEnter: function () { return setHoveredColumn(colId); }, onMouseLeave: function () { return setHoveredColumn(null); } }),
375
390
  isColCollapsed ? (react_1.default.createElement(react_2.Flex, { direction: "column", align: "stretch", flex: "1", width: "100%", minH: 0, overflow: "visible", position: "relative" },
376
- react_1.default.createElement(react_2.Flex, { as: "header", direction: "column", align: "center", flexShrink: 0, width: "100%", py: 3, px: 1, gap: 3, borderTop: "0.25rem solid", borderTopColor: (_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], bg: (_g = colors === null || colors === void 0 ? void 0 : colors.background) === null || _g === void 0 ? void 0 : _g[100], position: "relative", zIndex: 1 },
391
+ react_1.default.createElement(react_2.Flex, { as: "header", direction: "column", align: "center", flexShrink: 0, width: "100%", py: 3, px: 1, gap: 3, borderTop: "0.25rem solid", borderTopColor: (_g = column.color) !== null && _g !== void 0 ? _g : (_h = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _h === void 0 ? void 0 : _h[500], bg: (_j = colors === null || colors === void 0 ? void 0 : colors.background) === null || _j === void 0 ? void 0 : _j[100], position: "relative", zIndex: 1 },
377
392
  enableColumnReorder && columnDragHandleProps ? (react_1.default.createElement(react_2.Flex, __assign({ align: "center", justify: "center", flexShrink: 0, cursor: "grab" }, columnDragHandleProps),
378
- react_1.default.createElement(react_2.Box, { as: lucide_react_1.GripVertical, size: 14, color: (_h = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _h === void 0 ? void 0 : _h[400] }))) : null,
379
- enableColumnCollapse && (react_1.default.createElement(react_2.Flex, { flexShrink: 0, w: "100%", justify: "center", bg: (_j = colors === null || colors === void 0 ? void 0 : colors.background) === null || _j === void 0 ? void 0 : _j[100], position: "relative", zIndex: 3 },
393
+ react_1.default.createElement(react_2.Box, { as: lucide_react_1.GripVertical, size: 14, color: (_k = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _k === void 0 ? void 0 : _k[400] }))) : null,
394
+ enableColumnCollapse && (react_1.default.createElement(react_2.Flex, { flexShrink: 0, w: "100%", justify: "center", bg: (_l = colors === null || colors === void 0 ? void 0 : colors.background) === null || _l === void 0 ? void 0 : _l[100], position: "relative", zIndex: 3 },
380
395
  react_1.default.createElement(react_2.IconButton, { "aria-label": "Expand column", icon: react_1.default.createElement(lucide_react_1.ChevronRight, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", onClick: function () { return toggleColumnCollapsed(colId); } }))),
381
- react_1.default.createElement(react_2.Text, { as: "span", fontWeight: "700", fontSize: "0.75rem", color: (_k = colors === null || colors === void 0 ? void 0 : colors.text) === null || _k === void 0 ? void 0 : _k[700], sx: {
396
+ react_1.default.createElement(react_2.Text, { as: "span", fontWeight: "700", fontSize: "0.75rem", color: (_m = colors === null || colors === void 0 ? void 0 : colors.text) === null || _m === void 0 ? void 0 : _m[700], sx: {
382
397
  writingMode: "vertical-rl",
383
398
  textOrientation: "mixed",
384
399
  }, maxH: "".concat(Math.max(120, containerHeight - 200), "px"), overflow: "hidden", lineHeight: "1.2", title: column.title }, column.title),
385
- react_1.default.createElement(react_2.Badge, { minW: "1.25rem", h: "1.25rem", borderRadius: "999px", border: "1px solid", borderColor: (_l = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _l === void 0 ? void 0 : _l[300], display: "flex", backgroundColor: (_m = colors === null || colors === void 0 ? void 0 : colors.background) === null || _m === void 0 ? void 0 : _m[100], alignItems: "center", justifyContent: "center", color: (_o = colors === null || colors === void 0 ? void 0 : colors.text) === null || _o === void 0 ? void 0 : _o[900], fontWeight: 600, fontSize: "10px" }, (_p = column === null || column === void 0 ? void 0 : column.items) === null || _p === void 0 ? void 0 : _p.length)),
386
- column.customNode ? (react_1.default.createElement(react_2.Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: (_q = colors === null || colors === void 0 ? void 0 : colors.background) === null || _q === void 0 ? void 0 : _q[100], "aria-hidden": true })) : null,
387
- column.customNode ? (react_1.default.createElement(react_2.Box, { as: "section", "aria-label": "Column summary", flex: "1", minH: 0, w: "100%", overflow: "visible", py: 2, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", bg: (_r = colors === null || colors === void 0 ? void 0 : colors.background) === null || _r === void 0 ? void 0 : _r[100], position: "relative", zIndex: 2 },
400
+ react_1.default.createElement(react_2.Badge, { minW: "1.25rem", h: "1.25rem", borderRadius: "999px", border: "1px solid", borderColor: (_o = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _o === void 0 ? void 0 : _o[300], display: "flex", backgroundColor: (_p = colors === null || colors === void 0 ? void 0 : colors.background) === null || _p === void 0 ? void 0 : _p[100], alignItems: "center", justifyContent: "center", color: (_q = colors === null || colors === void 0 ? void 0 : colors.text) === null || _q === void 0 ? void 0 : _q[900], fontWeight: 600, fontSize: "10px" }, (_r = column === null || column === void 0 ? void 0 : column.items) === null || _r === void 0 ? void 0 : _r.length)),
401
+ column.customNode ? (react_1.default.createElement(react_2.Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: (_s = colors === null || colors === void 0 ? void 0 : colors.background) === null || _s === void 0 ? void 0 : _s[100], "aria-hidden": true })) : null,
402
+ column.customNode ? (react_1.default.createElement(react_2.Box, { as: "section", "aria-label": "Column summary", flex: "1", minH: 0, w: "100%", overflow: "visible", py: 2, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", bg: (_t = colors === null || colors === void 0 ? void 0 : colors.background) === null || _t === void 0 ? void 0 : _t[100], position: "relative", zIndex: 2 },
388
403
  react_1.default.createElement(react_2.Box, { position: "relative", transform: "rotate(90deg)", transformOrigin: "center center", marginTop: '1rem' },
389
- react_1.default.createElement(react_2.VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: (_s = colors === null || colors === void 0 ? void 0 : colors.text) === null || _s === void 0 ? void 0 : _s[600] }, column.customNode())))) : (react_1.default.createElement(react_2.Box, { flex: "1", minH: 0 })))) : (react_1.default.createElement(react_2.Flex, { width: "95%", h: !isColCollapsed && !!((_t = column.customNode) === null || _t === void 0 ? void 0 : _t.call(column)) ? "auto" : "2.75rem", borderRadius: "0.25rem", borderLeft: "0.188rem solid", borderLeftColor: (_u = column.color) !== null && _u !== void 0 ? _u : (_v = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _v === void 0 ? void 0 : _v[500], background: (_w = colors === null || colors === void 0 ? void 0 : colors.background) === null || _w === void 0 ? void 0 : _w[300], align: "center", px: 2, m: 2, flexShrink: 0, justifyContent: "space-between", position: "relative", gap: 2 },
390
- react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", gap: 2 },
391
- enableColumnReorder && columnDragHandleProps ? (react_1.default.createElement(react_2.Flex, __assign({ align: "center", justify: "center", flexShrink: 0, cursor: "grab" }, columnDragHandleProps),
392
- react_1.default.createElement(react_2.Box, { as: lucide_react_1.GripVertical, size: 14, color: (_x = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _x === void 0 ? void 0 : _x[400] }))) : null,
393
- react_1.default.createElement(react_2.Flex, { direction: "column", gap: 1, mt: !isColCollapsed && !!((_y = column.customNode) === null || _y === void 0 ? void 0 : _y.call(column)) ? "1" : "0" },
394
- react_1.default.createElement(react_2.Text, { as: "span", fontWeight: "600", fontSize: "0.875rem", color: (_z = colors === null || colors === void 0 ? void 0 : colors.text) === null || _z === void 0 ? void 0 : _z[700], noOfLines: 1, flex: "1", minW: 0 },
395
- react_1.default.createElement(OverflowTooltipText_1.default, { placement: "top" }, column.title)),
396
- !!((_0 = column.customNode) === null || _0 === void 0 ? void 0 : _0.call(column)) ? (react_1.default.createElement(react_2.Box, { as: "section", "aria-label": "Column summary", width: "95%", flexShrink: 0, fontSize: "xs", mb: 1, color: (_1 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _1 === void 0 ? void 0 : _1[600] }, column.customNode())) : null)),
404
+ react_1.default.createElement(react_2.VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: (_u = colors === null || colors === void 0 ? void 0 : colors.text) === null || _u === void 0 ? void 0 : _u[600] }, column.customNode())))) : (react_1.default.createElement(react_2.Box, { flex: "1", minH: 0 })))) : (react_1.default.createElement(react_2.Flex, { width: "100%", h: !isColCollapsed && !!((_v = column.customNode) === null || _v === void 0 ? void 0 : _v.call(column)) ? "auto" : "2.75rem", align: !isColCollapsed && !!((_w = column.customNode) === null || _w === void 0 ? void 0 : _w.call(column)) ? "flex-start" : "center", px: 3, py: 2, flexShrink: 0, justifyContent: "space-between", position: "relative", gap: 2, borderBottom: "0.063rem solid ".concat((_y = (_x = colors === null || colors === void 0 ? void 0 : colors.boxborder) === null || _x === void 0 ? void 0 : _x[100]) !== null && _y !== void 0 ? _y : (_z = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _z === void 0 ? void 0 : _z[100]) },
405
+ react_1.default.createElement(react_2.Flex, { direction: "column", gap: 1, minW: 0, flex: "1" },
406
+ react_1.default.createElement(react_2.Flex, { align: "center", gap: 2, minW: 0 },
407
+ react_1.default.createElement(react_2.Box, { boxSize: "0.625rem", borderRadius: "full", bg: (_0 = column.color) !== null && _0 !== void 0 ? _0 : (_1 = colors === null || colors === void 0 ? void 0 : colors.primary) === null || _1 === void 0 ? void 0 : _1[500], flexShrink: 0 }),
408
+ enableColumnReorder && columnDragHandleProps ? (react_1.default.createElement(react_2.Flex, __assign({ align: "center", justify: "center", flexShrink: 0, cursor: "grab" }, columnDragHandleProps),
409
+ react_1.default.createElement(react_2.Box, { as: lucide_react_1.GripVertical, size: 14, color: (_2 = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _2 === void 0 ? void 0 : _2[400] }))) : null,
410
+ react_1.default.createElement(react_2.Text, { as: "span", fontWeight: "600", fontSize: "0.875rem", color: (_3 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _3 === void 0 ? void 0 : _3[700], noOfLines: 1, minW: 0 },
411
+ react_1.default.createElement(OverflowTooltipText_1.default, { placement: "top" }, column.title))),
412
+ !!((_4 = column.customNode) === null || _4 === void 0 ? void 0 : _4.call(column)) ? (react_1.default.createElement(react_2.Box, { as: "section", "aria-label": "Column summary", width: "100%", flexShrink: 0, fontSize: "xs", color: (_5 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _5 === void 0 ? void 0 : _5[600] }, column.customNode())) : null),
397
413
  react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", gap: 2 },
398
- react_1.default.createElement(react_2.Badge, { minW: { base: "20px", sm: "22px", md: "24px" }, h: { base: "20px", sm: "22px", md: "24px" }, borderRadius: "999px", border: "1px solid", backgroundColor: (_2 = colors === null || colors === void 0 ? void 0 : colors.background) === null || _2 === void 0 ? void 0 : _2[100], borderColor: (_3 = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _3 === void 0 ? void 0 : _3[300], display: "flex", alignItems: "center", justifyContent: "center", color: (_4 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _4 === void 0 ? void 0 : _4[900], fontWeight: 600, fontSize: { base: "10px", sm: "11px", md: "12px" } }, (_5 = column === null || column === void 0 ? void 0 : column.items) === null || _5 === void 0 ? void 0 : _5.length),
414
+ react_1.default.createElement(react_2.Badge, { minW: "1.5rem", h: "1.5rem", px: 2, borderRadius: "999px", backgroundColor: (_6 = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _6 === void 0 ? void 0 : _6[100], display: "flex", alignItems: "center", justifyContent: "center", color: (_7 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _7 === void 0 ? void 0 : _7[700], fontWeight: 600, fontSize: "0.625rem" }, (_8 = column === null || column === void 0 ? void 0 : column.items) === null || _8 === void 0 ? void 0 : _8.length),
399
415
  enableColumnCollapse && (react_1.default.createElement(react_2.IconButton, { "aria-label": "Collapse column", icon: react_1.default.createElement(lucide_react_1.ChevronLeft, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", flexShrink: 0, onClick: function () { return toggleColumnCollapsed(colId); } })),
400
416
  canDelete &&
401
417
  hoveredColumn === colId &&
402
- column.items.length > 0 && (react_1.default.createElement(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: (_6 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _6 === void 0 ? void 0 : _6[600], _hover: { color: (_7 = colors === null || colors === void 0 ? void 0 : colors.red) === null || _7 === void 0 ? void 0 : _7[600] }, onClick: function () { return handleColumnDelete(colId); }, transition: "color 0.2s ease", flexShrink: 0 })),
418
+ column.items.length > 0 && (react_1.default.createElement(react_2.Box, { as: lucide_react_1.Trash2, size: 16, cursor: "pointer", color: (_9 = colors === null || colors === void 0 ? void 0 : colors.text) === null || _9 === void 0 ? void 0 : _9[600], _hover: { color: (_10 = colors === null || colors === void 0 ? void 0 : colors.red) === null || _10 === void 0 ? void 0 : _10[600] }, onClick: function () { return handleColumnDelete(colId); }, transition: "color 0.2s ease", flexShrink: 0 })),
403
419
  !(canDelete &&
404
420
  hoveredColumn === colId &&
405
421
  column.items.length > 0) && react_1.default.createElement(react_2.Box, { width: "16px", height: "16px", flexShrink: 0 })))),
406
- !isColCollapsed && (react_1.default.createElement(react_1.default.Fragment, null,
407
- react_1.default.createElement(react_2.Box, { px: 2, flex: "1", overflowY: "auto", width: "100%", sx: {
408
- overflowY: "auto",
409
- overflowX: "hidden",
410
- scrollbarWidth: "thin",
411
- scrollbarColor: "var(--chakra-colors-gray-300) transparent",
412
- "&::-webkit-scrollbar": {
413
- width: "6px !important",
414
- height: "6px !important",
415
- },
416
- "&::-webkit-scrollbar-track": {
417
- background: "gray.100",
418
- borderRadius: "3px",
419
- marginTop: "4px",
420
- marginBottom: "4px",
421
- },
422
- "&::-webkit-scrollbar-thumb": {
423
- background: "gray.300",
424
- borderRadius: "3px",
425
- border: "1px solid",
426
- borderColor: "gray.100",
427
- },
428
- "&::-webkit-scrollbar-thumb:hover": {
429
- background: "gray.400",
430
- },
431
- "&": {
432
- scrollbarGutter: "stable both-edges",
433
- },
434
- cursor: canDrag ? "grab" : "not-allowed",
435
- } },
436
- (noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && (react_1.default.createElement(NoItemsTemplate, { column: column, noItems: noItems, colors: colors })),
437
- virtualization ? (react_1.default.createElement(react_window_1.VariableSizeList, { ref: function (el) {
438
- if (el)
439
- listRefs.current[colId] = el;
440
- }, height: containerHeight - 150, itemCount: column.items.length +
441
- (snapshot.isUsingPlaceholder ? 1 : 0), itemSize: function (index) {
442
- return getItemSize(index, column.items, colId);
443
- }, width: "100%", itemData: __assign(__assign({}, rowBaseProps), { items: column.items, colId: colId }) }, KanbanRow)) : (react_1.default.createElement(react_2.Box, null,
444
- column.items.map(function (account, index) { return (react_1.default.createElement("div", { key: account.id, style: { paddingBottom: KANBAN_CARD_GAP } },
445
- react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id, isDragDisabled: !canDrag }, function (dragProvided) {
446
- var _a;
447
- return (react_1.default.createElement("div", __assign({ ref: dragProvided.innerRef }, dragProvided.draggableProps, dragProvided.dragHandleProps, { style: dragProvided.draggableProps.style }), (account === null || account === void 0 ? void 0 : account.customNode) ? (_a = account === null || account === void 0 ? void 0 : account.customNode) === null || _a === void 0 ? void 0 : _a.call(account) : (react_1.default.createElement(AccountCard_1.default, { account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () {
448
- return toggleExpand(account.id, colId, index);
449
- }, isDeletable: canDelete }))));
450
- }))); }),
451
- provided.placeholder)))))));
422
+ !isColCollapsed && (react_1.default.createElement(react_2.Box, { px: 2, flex: "1", overflowY: "auto", width: "100%", sx: {
423
+ overflowY: "auto",
424
+ overflowX: "hidden",
425
+ scrollbarWidth: "thin",
426
+ scrollbarColor: "var(--chakra-colors-gray-300) transparent",
427
+ "&::-webkit-scrollbar": {
428
+ width: "6px !important",
429
+ height: "6px !important",
430
+ },
431
+ "&::-webkit-scrollbar-track": {
432
+ background: "gray.100",
433
+ borderRadius: "3px",
434
+ marginTop: "4px",
435
+ marginBottom: "4px",
436
+ },
437
+ "&::-webkit-scrollbar-thumb": {
438
+ background: "gray.300",
439
+ borderRadius: "3px",
440
+ border: "1px solid",
441
+ borderColor: "gray.100",
442
+ },
443
+ "&::-webkit-scrollbar-thumb:hover": {
444
+ background: "gray.400",
445
+ },
446
+ "&": {
447
+ scrollbarGutter: "stable both-edges",
448
+ },
449
+ cursor: canDrag ? "grab" : "not-allowed",
450
+ } },
451
+ (noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && (react_1.default.createElement(NoItemsTemplate, { column: column, noItems: noItems, colors: colors })),
452
+ virtualization ? (react_1.default.createElement(react_window_1.VariableSizeList, { ref: function (el) {
453
+ if (el)
454
+ listRefs.current[colId] = el;
455
+ }, height: containerHeight - 150, itemCount: column.items.length +
456
+ (snapshot.isUsingPlaceholder ? 1 : 0), itemSize: function (index) {
457
+ return getItemSize(index, column.items, colId);
458
+ }, width: "100%", itemData: itemDataByCol[colId] }, KanbanRow)) : (react_1.default.createElement(react_2.Box, null,
459
+ column.items.map(function (account, index) { return (react_1.default.createElement("div", { key: account.id, style: { paddingBottom: KANBAN_CARD_GAP, paddingTop: index === 0 ? KANBAN_LIST_TOP_PAD : 0 } },
460
+ react_1.default.createElement(dnd_1.Draggable, { draggableId: account.id.toString(), index: index, key: account.id, isDragDisabled: !canDrag }, function (dragProvided) {
461
+ var _a;
462
+ return (react_1.default.createElement("div", __assign({ ref: dragProvided.innerRef }, dragProvided.draggableProps, dragProvided.dragHandleProps, { style: dragProvided.draggableProps.style }), (account === null || account === void 0 ? void 0 : account.customNode) ? (_a = account === null || account === void 0 ? void 0 : account.customNode) === null || _a === void 0 ? void 0 : _a.call(account) : (react_1.default.createElement(AccountCard_1.default, { account: account, index: index, onDelete: onDelete, onOpen: onOpen, isExpanded: expanded[account.id], onToggleExpand: function () {
463
+ return toggleExpand(account.id, colId, index);
464
+ }, isDeletable: canDelete }))));
465
+ }))); }),
466
+ provided.placeholder))))));
452
467
  })); };
453
468
  if (!canView)
454
469
  return null;
@@ -74,13 +74,13 @@ var generateUniqueId = (function () {
74
74
  };
75
75
  })();
76
76
  function MultiSelect(_a) {
77
- var _b, _c;
78
- var value = _a.value, onValueChange = _a.onValueChange, _d = _a.width, width = _d === void 0 ? "100%" : _d, _e = _a.label, label = _e === void 0 ? "label" : _e, _f = _a.isRequired, isRequired = _f === void 0 ? true : _f, _g = _a.isInformation, isInformation = _g === void 0 ? false : _g, _h = _a.informationMessage, informationMessage = _h === void 0 ? "" : _h, name = _a.name, id = _a.id, _j = _a.placeholderText, placeholderText = _j === void 0 ? "Type valid email and press enter" : _j, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _k = _a.size, size = _k === void 0 ? "md" : _k, inputStyle = _a.inputStyle, helperText = _a.helperText, error = _a.error, errorMessage = _a.errorMessage;
77
+ var _b, _c, _d, _e;
78
+ var value = _a.value, onValueChange = _a.onValueChange, _f = _a.width, width = _f === void 0 ? "100%" : _f, _g = _a.label, label = _g === void 0 ? "label" : _g, _h = _a.isRequired, isRequired = _h === void 0 ? true : _h, _j = _a.isInformation, isInformation = _j === void 0 ? false : _j, _k = _a.informationMessage, informationMessage = _k === void 0 ? "" : _k, name = _a.name, id = _a.id, _l = _a.placeholderText, placeholderText = _l === void 0 ? "Type valid email and press enter" : _l, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _m = _a.size, size = _m === void 0 ? "md" : _m, inputStyle = _a.inputStyle, helperText = _a.helperText, error = _a.error, errorMessage = _a.errorMessage;
79
79
  var theme = (0, useCustomTheme_1.useCustomTheme)();
80
80
  var s = (0, searchSelectSize_1.getSearchSelectSizeStyles)((size || "md"));
81
81
  var options = value;
82
- var _l = (0, react_1.useState)(""), inputValue = _l[0], setInputValue = _l[1];
83
- var _m = (0, react_1.useState)(""), localError = _m[0], setLocalError = _m[1];
82
+ var _o = (0, react_1.useState)(""), inputValue = _o[0], setInputValue = _o[1];
83
+ var _p = (0, react_1.useState)(""), localError = _p[0], setLocalError = _p[1];
84
84
  var inputRef = (0, react_1.useRef)(null);
85
85
  var handleInputChange = (0, react_1.useCallback)(function (e) {
86
86
  setInputValue(e.target.value);
@@ -112,16 +112,15 @@ function MultiSelect(_a) {
112
112
  }, [options, onValueChange]);
113
113
  return (react_1.default.createElement(react_2.Box, { width: width },
114
114
  label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })),
115
- react_1.default.createElement(react_2.Flex, { wrap: "wrap", gap: s.gap, align: "center", px: s.px, border: "1px solid", borderColor: error || localError
116
- ? theme.colors.red[500]
117
- : theme.colors.gray[300], borderRadius: "sm", bg: theme.colors.white, minH: s.minH, _focusWithin: {
115
+ react_1.default.createElement(react_2.Flex, { wrap: "wrap", gap: s.gap, align: "center", px: s.px, border: "0.063rem solid", borderColor: error || localError
116
+ ? theme.colors.semantic.error[500]
117
+ : (_b = theme.colors.boxborder) === null || _b === void 0 ? void 0 : _b[500], borderRadius: "0.5rem", bg: (_c = theme.colors.gray) === null || _c === void 0 ? void 0 : _c[50], minH: s.minH, transition: "border-color 0.2s, box-shadow 0.2s", _focusWithin: {
118
118
  borderColor: error || localError
119
- ? theme.colors.red[500]
119
+ ? theme.colors.semantic.error[500]
120
120
  : theme.colors.primary[500],
121
- boxShadow: "0 0 0 0.125rem" +
122
- (error || localError
123
- ? (_b = theme.colors.boxShadow) === null || _b === void 0 ? void 0 : _b.error
124
- : (_c = theme.colors.boxShadow) === null || _c === void 0 ? void 0 : _c.primary),
121
+ boxShadow: "0 0 0 0.125rem ".concat(error || localError
122
+ ? (_d = theme.colors.boxShadow) === null || _d === void 0 ? void 0 : _d.error
123
+ : (_e = theme.colors.boxShadow) === null || _e === void 0 ? void 0 : _e.primary),
125
124
  } },
126
125
  options.map(function (option) { return (react_1.default.createElement(Tag_1.default, { key: option.id, size: s.tagSize, colorScheme: "primary", label: option.label, onIconClick: function () { return handleRemove(option); }, icon: lucide_react_1.X })); }),
127
126
  react_1.default.createElement(react_2.Input, { ref: inputRef, type: "text", value: inputValue, isDisabled: isDisabled, isReadOnly: isReadOnly, id: id, name: name, size: size, variant: "unstyled", h: s.fieldHeight, minH: s.fieldHeight, fontSize: s.fieldFontSize, fontWeight: "500", color: theme.colors.gray[700], letterSpacing: "0.02em", flex: "1", minW: 0, style: __assign({ backgroundColor: "transparent" }, inputStyle), onChange: handleInputChange, onKeyDown: handleKeyDown, placeholder: options.length === 0 ? placeholderText : "" })),
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { NavbarProps } from "./NavigationBarProps";
3
- export default function NavBar({ userAvathar, userName, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText, sideBarToggole, onSideBarToggole, }: NavbarProps): React.JSX.Element;
3
+ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText, sideBarToggole, onSideBarToggole, }: NavbarProps): React.JSX.Element;
@@ -1,4 +1,15 @@
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
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
@@ -10,48 +21,64 @@ var useCustomTheme_1 = require("../../Theme/useCustomTheme");
10
21
  var lucide_react_1 = require("lucide-react");
11
22
  function NavBar(_a) {
12
23
  var _b, _c, _d, _e;
13
- var userAvathar = _a.userAvathar, userName = _a.userName, navMenu = _a.navMenu, moreIcon = _a.moreIcon, handleNavOnClick = _a.handleNavOnClick, handleLogout = _a.handleLogout, logoutText = _a.logoutText, navigationBarText = _a.navigationBarText, sideBarToggole = _a.sideBarToggole, onSideBarToggole = _a.onSideBarToggole;
24
+ var userAvathar = _a.userAvathar, userName = _a.userName, userRole = _a.userRole, navMenu = _a.navMenu, moreIcon = _a.moreIcon, handleNavOnClick = _a.handleNavOnClick, handleLogout = _a.handleLogout, logoutText = _a.logoutText, navigationBarText = _a.navigationBarText, sideBarToggole = _a.sideBarToggole, onSideBarToggole = _a.onSideBarToggole;
14
25
  var theme = (0, useCustomTheme_1.useCustomTheme)();
15
- return (react_1.default.createElement(react_2.Box, { bg: theme.colors.backgroundColor.light, px: 4, boxShadow: theme.shadows.sm },
26
+ // Shared rounded pill affordance for the bar's icon controls.
27
+ var iconButtonStyle = {
28
+ w: "1.75rem",
29
+ h: "1.75rem",
30
+ alignItems: "center",
31
+ justifyContent: "center",
32
+ borderRadius: "md",
33
+ cursor: "pointer",
34
+ transition: "background 0.15s",
35
+ _hover: { bg: "blackAlpha.50" },
36
+ };
37
+ // Light elevated pill item.
38
+ var menuItemStyle = {
39
+ bg: "transparent",
40
+ borderRadius: "7px",
41
+ mx: "0.375rem",
42
+ px: "0.625rem",
43
+ py: "0.5rem",
44
+ fontWeight: 500,
45
+ fontSize: "13px",
46
+ color: "gray.700",
47
+ gap: theme.space["2"],
48
+ transition: "background 0.12s",
49
+ _hover: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
50
+ _focus: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
51
+ _active: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
52
+ };
53
+ return (react_1.default.createElement(react_2.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: "blackAlpha.100" },
16
54
  react_1.default.createElement(react_2.Flex, { h: 16, alignItems: "center", justifyContent: "space-between" },
17
55
  react_1.default.createElement(react_2.Box, { display: "flex", gap: 1.5, alignItems: "center" },
18
- react_1.default.createElement(react_2.Box, { onClick: function () { return onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(); }, display: { base: "block", lg: "none", xl: "none", md: "none" } }, sideBarToggole ? (react_1.default.createElement(lucide_react_1.PanelLeftClose, { size: "1.25rem" })) : (react_1.default.createElement(lucide_react_1.PanelRightClose, { size: "1.25rem" }))),
19
- (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && (react_1.default.createElement(react_2.Box, { width: "1.5rem", height: "1.5rem", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", onClick: function () { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); } },
56
+ react_1.default.createElement(react_2.Box, __assign({ onClick: function () { return onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(); }, display: { base: "flex", lg: "none", xl: "none", md: "none" } }, iconButtonStyle), sideBarToggole ? (react_1.default.createElement(lucide_react_1.PanelLeftClose, { size: "1.25rem" })) : (react_1.default.createElement(lucide_react_1.PanelRightClose, { size: "1.25rem" }))),
57
+ (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && (react_1.default.createElement(react_2.Box, __assign({}, iconButtonStyle, { display: "flex", onClick: function () { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); } }),
20
58
  react_1.default.createElement(lucide_react_1.CircleArrowLeft, { size: "1.25rem", color: (_c = (_b = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c[500] }))),
21
59
  (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && (react_1.default.createElement(react_2.Text, { color: (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _d === void 0 ? void 0 : _d.secondary) === null || _e === void 0 ? void 0 : _e[500], fontSize: "1.25rem", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem" }, navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text))),
22
- react_1.default.createElement(react_2.Flex, null,
23
- react_1.default.createElement(react_2.Stack, { direction: "row", alignItems: "center", spacing: 7 },
60
+ react_1.default.createElement(react_2.Flex, { minW: 0, flexShrink: 1 },
61
+ react_1.default.createElement(react_2.Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0 },
62
+ moreIcon && (react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", minW: 0 }, moreIcon)),
24
63
  react_1.default.createElement(react_2.Menu, null,
25
- react_1.default.createElement(react_2.Box, { cursor: "pointer" }, moreIcon),
26
- react_1.default.createElement(react_2.MenuButton, { as: react_2.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0 },
64
+ react_1.default.createElement(react_2.MenuButton, { as: react_2.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0 },
27
65
  react_1.default.createElement(react_2.Avatar, { size: "sm", name: userName, src: userAvathar })),
28
- react_1.default.createElement(react_2.MenuList, { alignItems: "center", zIndex: 5, p: 0 },
66
+ react_1.default.createElement(react_2.MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem", bg: theme.colors.backgroundColor.light, border: "1px solid", borderColor: "blackAlpha.100", borderRadius: "0.75rem", boxShadow: "lg", color: "gray.700", overflow: "hidden" },
29
67
  react_1.default.createElement(react_2.Box, { display: "flex", flexDirection: "column", maxH: "90vh" },
30
- react_1.default.createElement(react_2.Center, { py: 4 },
68
+ react_1.default.createElement(react_2.Center, { pt: 4, pb: 2 },
31
69
  react_1.default.createElement(react_2.Avatar, { size: "xl", name: userName, src: userAvathar })),
32
- react_1.default.createElement(react_2.Center, null,
33
- react_1.default.createElement(react_2.Text, { fontWeight: 500 }, userName)),
34
- react_1.default.createElement(react_2.MenuDivider, null),
70
+ react_1.default.createElement(react_2.Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4 },
71
+ react_1.default.createElement(react_2.Text, { fontWeight: 600, fontSize: "14px", color: "gray.800", isTruncated: true, maxW: "100%" }, userName),
72
+ userRole && (react_1.default.createElement(react_2.Text, { fontSize: "11px", color: "gray.500", isTruncated: true, maxW: "100%" }, userRole))),
73
+ react_1.default.createElement(react_2.MenuDivider, { borderColor: "blackAlpha.100" }),
35
74
  react_1.default.createElement(react_2.Box, { flex: 1, overflowY: "auto" }, navMenu === null || navMenu === void 0 ? void 0 : navMenu.map(function (menu, idx) {
36
75
  var _a, _b, _c;
37
- return (react_1.default.createElement(react_2.MenuItem, { onClick: function () { return handleNavOnClick(menu.url); }, key: "".concat(String((_c = (_b = (_a = menu.id) !== null && _a !== void 0 ? _a : menu.url) !== null && _b !== void 0 ? _b : menu.title) !== null && _c !== void 0 ? _c : idx), "-").concat(idx), sx: {
38
- fontWeight: 500,
39
- gap: theme.space["2"],
40
- }, _focus: {
41
- backgroundColor: "transparent",
42
- }, _hover: {
43
- backgroundColor: theme.colors.primary["50"],
44
- } },
45
- menu.icon && react_1.default.createElement(react_2.Box, null, menu === null || menu === void 0 ? void 0 : menu.icon),
76
+ return (react_1.default.createElement(react_2.MenuItem, { onClick: function () { return handleNavOnClick(menu.url); }, key: "".concat(String((_c = (_b = (_a = menu.id) !== null && _a !== void 0 ? _a : menu.url) !== null && _b !== void 0 ? _b : menu.title) !== null && _c !== void 0 ? _c : idx), "-").concat(idx), sx: menuItemStyle },
77
+ menu.icon && (react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } } }, menu === null || menu === void 0 ? void 0 : menu.icon)),
46
78
  react_1.default.createElement(react_2.Box, null, menu.title)));
47
79
  })),
48
- react_1.default.createElement(react_2.MenuDivider, null),
49
- react_1.default.createElement(react_2.MenuItem, { onClick: handleLogout, sx: {
50
- fontWeight: 500,
51
- gap: theme.space["2"],
52
- }, _hover: {
53
- backgroundColor: theme.colors.primary["50"],
54
- } },
55
- react_1.default.createElement(react_2.Box, null, react_1.default.createElement(lucide_react_1.LogOut, { size: 16 })),
80
+ react_1.default.createElement(react_2.MenuDivider, { borderColor: "blackAlpha.100" }),
81
+ react_1.default.createElement(react_2.MenuItem, { onClick: handleLogout, sx: __assign(__assign({}, menuItemStyle), { color: "red.500", _hover: { bg: "red.50", color: "red.600" }, _focus: { bg: "red.50", color: "red.600" }, _active: { bg: "red.50", color: "red.600" } }) },
82
+ react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center" }, react_1.default.createElement(lucide_react_1.LogOut, { size: 16 })),
56
83
  react_1.default.createElement(react_2.Box, null, logoutText))))))))));
57
84
  }
@@ -1,6 +1,7 @@
1
1
  export type NavbarProps = {
2
2
  userAvathar: string;
3
3
  userName: string;
4
+ userRole?: string;
4
5
  navMenu: MenuProps[];
5
6
  moreIcon?: any;
6
7
  handleNavOnClick: (url: string) => void;