@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTable.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CustomTable/CustomTable.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,MAA+C,EAC/C,SAAc,EACd,YAAiB,EACjB,eAAuB,EACvB,WAAmB,EACnB,iBAAyB,EACzB,UAAU,EACV,eAAuB,EACvB,cAAc,EACd,iBAAiB,GAClB,EAAE,gBAAgB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"CustomTable.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CustomTable/CustomTable.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAgB,WAAW,CAAC,CAAC,EAAE,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,MAA+C,EAC/C,SAAc,EACd,YAAiB,EACjB,eAAuB,EACvB,WAAmB,EACnB,iBAAyB,EACzB,UAAU,EACV,eAAuB,EACvB,cAAc,EACd,iBAAiB,GAClB,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAuKrB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { Column } from './CustomTable.types';
|
|
3
3
|
export declare function alignClass(align?: 'left' | 'right' | 'center'): string;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Sticky right-pinned header cell for an `actions` column. Being sticky itself it no longer
|
|
6
|
+
* rides the sticky <thead>, so it needs its own `top-0` or it scrolls away with the rows.
|
|
7
|
+
*/
|
|
5
8
|
export declare function stickyActionsHeaderClass(): string;
|
|
6
9
|
/** Sticky right-pinned body cell for an `actions` column (opaque per alternating row). */
|
|
7
10
|
export declare function stickyActionsCellClass(isEven: boolean): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTable.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CustomTable/CustomTable.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAMtE;AAKD
|
|
1
|
+
{"version":3,"file":"CustomTable.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/CustomTable/CustomTable.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAMtE;AAKD;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED,0FAA0F;AAC1F,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAM9D;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS,CAItE"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -21316,9 +21316,12 @@ function alignClass(align) {
|
|
|
21316
21316
|
: '';
|
|
21317
21317
|
}
|
|
21318
21318
|
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]';
|
|
21319
|
-
/**
|
|
21319
|
+
/**
|
|
21320
|
+
* Sticky right-pinned header cell for an `actions` column. Being sticky itself it no longer
|
|
21321
|
+
* rides the sticky <thead>, so it needs its own `top-0` or it scrolls away with the rows.
|
|
21322
|
+
*/
|
|
21320
21323
|
function stickyActionsHeaderClass() {
|
|
21321
|
-
return cn(STICKY_ACTIONS_BASE, 'z-40 bg-table-header');
|
|
21324
|
+
return cn(STICKY_ACTIONS_BASE, 'top-0 z-40 bg-table-header');
|
|
21322
21325
|
}
|
|
21323
21326
|
/** Sticky right-pinned body cell for an `actions` column (opaque per alternating row). */
|
|
21324
21327
|
function stickyActionsCellClass(isEven) {
|
|
@@ -21346,7 +21349,7 @@ function CustomTable({ data, columns, expandable, rowKey = (row) => row.id, clas
|
|
|
21346
21349
|
? selectedIds.filter((id) => id !== key)
|
|
21347
21350
|
: [...selectedIds, key]);
|
|
21348
21351
|
};
|
|
21349
|
-
return (jsxRuntime.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: [jsxRuntime.jsx("div", { className: "overflow-auto flex-1 isolate", children: jsxRuntime.jsxs("table", { "data-slot": "table", className: "min-w-full w-full text-left text-sm", children: [jsxRuntime.jsx("thead", { className: "sticky top-0 z-
|
|
21352
|
+
return (jsxRuntime.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: [jsxRuntime.jsx("div", { className: "overflow-auto flex-1 isolate", children: jsxRuntime.jsxs("table", { "data-slot": "table", className: "min-w-full w-full text-left text-sm", children: [jsxRuntime.jsx("thead", { className: "sticky top-0 z-40 border-b border-border !bg-table-header", children: jsxRuntime.jsxs("tr", { children: [expandable && (jsxRuntime.jsx("th", { className: "h-12 w-[52px] min-w-[52px] whitespace-nowrap px-3 text-left align-middle text-secondary-foreground" })), enableSelection && (jsxRuntime.jsx("th", { className: "h-12 w-[52px] min-w-[52px] whitespace-nowrap px-3 text-left align-middle", children: jsxRuntime.jsx(Checkbox, { checked: allSelected
|
|
21350
21353
|
? true
|
|
21351
21354
|
: someSelected
|
|
21352
21355
|
? 'indeterminate'
|