@cjlapao/ui-kit 0.2.18 → 0.2.20
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/index.cjs +20 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +20 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18488,7 +18488,7 @@ var Combobox = import_react181.default.forwardRef(
|
|
|
18488
18488
|
id: listId,
|
|
18489
18489
|
role: "listbox",
|
|
18490
18490
|
"aria-label": rest["aria-label"] ?? placeholder ?? "Options",
|
|
18491
|
-
className: "py-1",
|
|
18491
|
+
className: "px-1 py-1",
|
|
18492
18492
|
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
|
|
18493
18493
|
"li",
|
|
18494
18494
|
{
|
|
@@ -18531,7 +18531,7 @@ var Combobox = import_react181.default.forwardRef(
|
|
|
18531
18531
|
setActiveIndex(index);
|
|
18532
18532
|
},
|
|
18533
18533
|
className: (0, import_classnames37.default)(
|
|
18534
|
-
"flex items-center gap-2",
|
|
18534
|
+
"flex items-center gap-2 rounded-[2px]",
|
|
18535
18535
|
rowClass,
|
|
18536
18536
|
option.disabled ? "cursor-not-allowed opacity-50" : (0, import_classnames37.default)("cursor-pointer", toneClasses.hover),
|
|
18537
18537
|
// The cursor wash only paints when the keyboard
|
|
@@ -44481,7 +44481,8 @@ var SideMenu = ({
|
|
|
44481
44481
|
};
|
|
44482
44482
|
const tokens = getSideMenuItemTokens(link.color || color);
|
|
44483
44483
|
const hangingSpinner = Boolean(link.loading && !link.icon && depth > 0 && !contentCollapsed2);
|
|
44484
|
-
const
|
|
44484
|
+
const rowStateClasses = selfActive ? `${tokens.bg} ${tokens.text} shadow-sm` : childActive ? tokens.text : `${idle.text} ${tokens.hoverBg} ${tokens.hoverText}`;
|
|
44485
|
+
const rowClasses = `group relative flex items-center ${contentCollapsed2 ? "" : `rounded-lg transition-all duration-150 ${indentClass(depth)} ${rowStateClasses}`}`;
|
|
44485
44486
|
return /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)("div", { children: [
|
|
44486
44487
|
/* @__PURE__ */ (0, import_jsx_runtime260.jsxs)("div", { className: rowClasses, children: [
|
|
44487
44488
|
/* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
|
|
@@ -44496,7 +44497,7 @@ var SideMenu = ({
|
|
|
44496
44497
|
"aria-current": selfActive ? "page" : void 0,
|
|
44497
44498
|
"aria-busy": link.loading || void 0,
|
|
44498
44499
|
title: contentCollapsed2 ? link.label : void 0,
|
|
44499
|
-
className: `flex min-w-0 flex-1 items-center gap-3 py-2.5 text-sm font-medium ${contentCollapsed2 ?
|
|
44500
|
+
className: `flex min-w-0 flex-1 items-center gap-3 py-2.5 text-sm font-medium ${contentCollapsed2 ? `w-full justify-center rounded-lg transition-all duration-150 ${indentClass(0)} ${rowStateClasses}` : ""}`,
|
|
44500
44501
|
children: [
|
|
44501
44502
|
(link.icon || link.loading || contentCollapsed2) && /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
|
|
44502
44503
|
"div",
|
|
@@ -71790,7 +71791,7 @@ var TaskBoardColumn = ({
|
|
|
71790
71791
|
index = 0,
|
|
71791
71792
|
onToggle
|
|
71792
71793
|
}) => {
|
|
71793
|
-
const { surface, text: text2, color,
|
|
71794
|
+
const { surface, text: text2, color, columnWidth, wellSurface, columnCornerClass, onAddCard, draggingColumnId, boardMaxItems, dropTarget } = useTaskBoard();
|
|
71794
71795
|
const refused = Boolean(dropTarget && !dropTarget.valid && dropTarget.bucket === bucketKey(column.id, null));
|
|
71795
71796
|
const max = effectiveMaxItems(column, boardMaxItems);
|
|
71796
71797
|
const full = max !== void 0 && count >= max;
|
|
@@ -71851,7 +71852,7 @@ var TaskBoardColumn = ({
|
|
|
71851
71852
|
"data-collapsed": column.collapsed ? "true" : void 0,
|
|
71852
71853
|
"data-wip": wip,
|
|
71853
71854
|
"data-drop-zone": column.collapsed ? void 0 : true,
|
|
71854
|
-
style: { width: column.collapsed ? COLLAPSED_WIDTH :
|
|
71855
|
+
style: { width: column.collapsed ? COLLAPSED_WIDTH : columnWidth },
|
|
71855
71856
|
className: (0, import_classnames132.default)(
|
|
71856
71857
|
"relative flex min-h-40 shrink-0 flex-col overflow-hidden border-t-[3px]",
|
|
71857
71858
|
columnCornerClass,
|
|
@@ -71896,7 +71897,7 @@ var TaskBoardColumn = ({
|
|
|
71896
71897
|
"data-column-body": true,
|
|
71897
71898
|
"aria-hidden": column.collapsed || void 0,
|
|
71898
71899
|
inert: column.collapsed,
|
|
71899
|
-
style: { width:
|
|
71900
|
+
style: { width: columnWidth },
|
|
71900
71901
|
className: (0, import_classnames132.default)(
|
|
71901
71902
|
"flex min-h-0 flex-1 flex-col transition-opacity duration-200 motion-reduce:transition-none",
|
|
71902
71903
|
column.collapsed && "opacity-0"
|
|
@@ -71927,7 +71928,7 @@ var TaskBoardColumn = ({
|
|
|
71927
71928
|
horizontal: false,
|
|
71928
71929
|
tabIndex: -1,
|
|
71929
71930
|
className: "min-h-0 flex-1",
|
|
71930
|
-
contentClassName: "px-2 pb-2",
|
|
71931
|
+
contentClassName: "px-2 pt-1 pb-2",
|
|
71931
71932
|
children: /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
71932
71933
|
TaskBoardBucket,
|
|
71933
71934
|
{
|
|
@@ -72046,12 +72047,15 @@ var TaskBoardLaneGrid = ({
|
|
|
72046
72047
|
onToggleColumn,
|
|
72047
72048
|
onAddColumn
|
|
72048
72049
|
}) => {
|
|
72049
|
-
const { surface, text: text2, color,
|
|
72050
|
+
const { surface, text: text2, color, columnWidth, stickySurface, draggingColumnId, boardMaxItems } = useTaskBoard();
|
|
72050
72051
|
const fullColumns = new Set(columns.filter((c) => columnAtMax(cards, c, boardMaxItems)).map((c) => c.id));
|
|
72051
72052
|
const trigger = getSurfaceTriggerTokens(color);
|
|
72052
72053
|
const template = [
|
|
72053
72054
|
`${LANE_LABEL_WIDTH}px`,
|
|
72054
|
-
...columns.map((c) =>
|
|
72055
|
+
...columns.map((c) => {
|
|
72056
|
+
const width = c.collapsed ? COLLAPSED_WIDTH : columnWidth;
|
|
72057
|
+
return typeof width === "number" ? `${width}px` : width;
|
|
72058
|
+
}),
|
|
72055
72059
|
...onAddColumn ? [`${ADD_COLUMN_WIDTH}px`] : []
|
|
72056
72060
|
].join(" ");
|
|
72057
72061
|
const cellBorder = (0, import_classnames134.default)("border-b border-r", surface.divider);
|
|
@@ -73237,6 +73241,7 @@ var TaskBoardBody = (props) => {
|
|
|
73237
73241
|
emptyState,
|
|
73238
73242
|
color = "blue",
|
|
73239
73243
|
size = "md",
|
|
73244
|
+
columnWidth = "auto",
|
|
73240
73245
|
labels,
|
|
73241
73246
|
columnCorner = "rounded-md",
|
|
73242
73247
|
surfaceVariant
|
|
@@ -73245,6 +73250,8 @@ var TaskBoardBody = (props) => {
|
|
|
73245
73250
|
const text2 = useTaskBoardText(labels);
|
|
73246
73251
|
const { locale } = useKitEngine();
|
|
73247
73252
|
const sizeTokens12 = TASKBOARD_SIZES[size] ?? TASKBOARD_SIZES.md;
|
|
73253
|
+
const normalizedColumnWidth = typeof columnWidth === "string" ? columnWidth.trim() : columnWidth;
|
|
73254
|
+
const resolvedColumnWidth = normalizedColumnWidth === "auto" || normalizedColumnWidth === "" || typeof normalizedColumnWidth === "number" && (!Number.isFinite(normalizedColumnWidth) || normalizedColumnWidth <= 0) ? sizeTokens12.columnWidth : normalizedColumnWidth;
|
|
73248
73255
|
const wellSurface = surface.translucent ? GLASS_WELL : SOLID_WELL;
|
|
73249
73256
|
const columnCornerClass = getSurfaceCornerClass(columnCorner);
|
|
73250
73257
|
const rootRef = (0, import_react306.useRef)(null);
|
|
@@ -73332,6 +73339,7 @@ var TaskBoardBody = (props) => {
|
|
|
73332
73339
|
surface,
|
|
73333
73340
|
color,
|
|
73334
73341
|
size: sizeTokens12,
|
|
73342
|
+
columnWidth: resolvedColumnWidth,
|
|
73335
73343
|
cardLayout,
|
|
73336
73344
|
priorities: new Map((priorities ?? []).map((p) => [p.id, p])),
|
|
73337
73345
|
locale,
|
|
@@ -73361,7 +73369,7 @@ var TaskBoardBody = (props) => {
|
|
|
73361
73369
|
cardProps: (card, slot) => ({ ...isEditable ? cardHandlers(card, slot) : {}, ...keyboardProps(card, slot) }),
|
|
73362
73370
|
dropTarget: drag?.to && !drag.valid ? { bucket: bucketKey(drag.to.column, drag.to.lane), index: drag.to.index, valid: false } : null
|
|
73363
73371
|
}),
|
|
73364
|
-
[text2, surface, color, sizeTokens12, cardLayout, priorities, locale, isEditable, renderCard, onCardOpen, onCardContextMenu, onAddCard, wellSurface, columnCornerClass, columnEditing, columnDrag.gripProps, columnDrag.drag, editColumn, columns, maxItems, selected, drag, pending, cardHandlers, keyboardProps, heldPeer, notice]
|
|
73372
|
+
[text2, surface, color, sizeTokens12, resolvedColumnWidth, cardLayout, priorities, locale, isEditable, renderCard, onCardOpen, onCardContextMenu, onAddCard, wellSurface, columnCornerClass, columnEditing, columnDrag.gripProps, columnDrag.drag, editColumn, columns, maxItems, selected, drag, pending, cardHandlers, keyboardProps, heldPeer, notice]
|
|
73365
73373
|
);
|
|
73366
73374
|
const buckets = (0, import_react306.useMemo)(() => bucketCards(previewCards, columns, viewLanes), [previewCards, columns, viewLanes]);
|
|
73367
73375
|
const draggedCard = drag ? cards.find((c) => c.id === drag.cardId) : void 0;
|
|
@@ -73375,7 +73383,7 @@ var TaskBoardBody = (props) => {
|
|
|
73375
73383
|
TaskBoardSkeleton,
|
|
73376
73384
|
{
|
|
73377
73385
|
columns: columns.length || 4,
|
|
73378
|
-
columnWidth:
|
|
73386
|
+
columnWidth: resolvedColumnWidth,
|
|
73379
73387
|
wellSurface,
|
|
73380
73388
|
cornerClass: columnCornerClass
|
|
73381
73389
|
}
|