@caratlogic/design-system 0.1.28 → 0.1.29
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/molecules/CustomTable/CustomTable.d.ts.map +1 -1
- package/dist/components/molecules/CustomTable/CustomTable.utils.d.ts +4 -1
- package/dist/components/molecules/CustomTable/CustomTable.utils.d.ts.map +1 -1
- package/dist/index.cjs.js +6 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -21286,9 +21286,12 @@ function alignClass(align) {
|
|
|
21286
21286
|
: '';
|
|
21287
21287
|
}
|
|
21288
21288
|
const STICKY_ACTIONS_BASE = 'sticky !right-0 w-[92px] min-w-[92px] max-w-[92px] px-2 text-center before:pointer-events-none before:absolute before:left-0 before:top-0 before:h-full before:w-px before:bg-border before:content-[""] shadow-[-3px_0_6px_-3px_#00000014]';
|
|
21289
|
-
/**
|
|
21289
|
+
/**
|
|
21290
|
+
* Sticky right-pinned header cell for an `actions` column. Being sticky itself it no longer
|
|
21291
|
+
* rides the sticky <thead>, so it needs its own `top-0` or it scrolls away with the rows.
|
|
21292
|
+
*/
|
|
21290
21293
|
function stickyActionsHeaderClass() {
|
|
21291
|
-
return cn(STICKY_ACTIONS_BASE, 'z-40 bg-table-header');
|
|
21294
|
+
return cn(STICKY_ACTIONS_BASE, 'top-0 z-40 bg-table-header');
|
|
21292
21295
|
}
|
|
21293
21296
|
/** Sticky right-pinned body cell for an `actions` column (opaque per alternating row). */
|
|
21294
21297
|
function stickyActionsCellClass(isEven) {
|
|
@@ -21316,7 +21319,7 @@ function CustomTable({ data, columns, expandable, rowKey = (row) => row.id, clas
|
|
|
21316
21319
|
? selectedIds.filter((id) => id !== key)
|
|
21317
21320
|
: [...selectedIds, key]);
|
|
21318
21321
|
};
|
|
21319
|
-
return (jsxs("div", { className: `h-full w-full flex flex-col overflow-hidden rounded-lg border border-border bg-card ${className}`, "data-slot": "table-container", children: [jsx("div", { className: "overflow-auto flex-1 isolate", children: jsxs("table", { "data-slot": "table", className: "min-w-full w-full text-left text-sm", children: [jsx("thead", { className: "sticky top-0 z-
|
|
21322
|
+
return (jsxs("div", { className: `h-full w-full flex flex-col overflow-hidden rounded-lg border border-border bg-card ${className}`, "data-slot": "table-container", children: [jsx("div", { className: "overflow-auto flex-1 isolate", children: jsxs("table", { "data-slot": "table", className: "min-w-full w-full text-left text-sm", children: [jsx("thead", { className: "sticky top-0 z-40 border-b border-border !bg-table-header", children: jsxs("tr", { children: [expandable && (jsx("th", { className: "h-12 w-[52px] min-w-[52px] whitespace-nowrap px-3 text-left align-middle text-secondary-foreground" })), enableSelection && (jsx("th", { className: "h-12 w-[52px] min-w-[52px] whitespace-nowrap px-3 text-left align-middle", children: jsx(Checkbox, { checked: allSelected
|
|
21320
21323
|
? true
|
|
21321
21324
|
: someSelected
|
|
21322
21325
|
? 'indeterminate'
|