@osdk/react-components 0.1.0-beta.6 → 0.2.0-beta.1
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/README.md +2 -5
- package/build/browser/base-components/checkbox/Checkbox.js +32 -27
- package/build/browser/object-table/CellContextMenu.js +20 -23
- package/build/browser/object-table/LoadingCell.js +38 -0
- package/build/browser/object-table/LoadingCell.js.map +1 -0
- package/build/browser/object-table/LoadingRow.js +69 -0
- package/build/browser/object-table/LoadingRow.js.map +1 -0
- package/build/browser/object-table/LoadingStateTable.js +395 -0
- package/build/browser/object-table/LoadingStateTable.js.map +1 -0
- package/build/browser/object-table/NonIdealState.js +25 -0
- package/build/browser/object-table/NonIdealState.js.map +1 -0
- package/build/browser/object-table/ObjectTable.js +6 -5
- package/build/browser/object-table/ObjectTable.js.map +1 -1
- package/build/browser/object-table/ObjectTableApi.js.map +1 -1
- package/build/browser/object-table/Table.js +948 -45
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/TableBody.js +269 -34
- package/build/browser/object-table/TableBody.js.map +1 -1
- package/build/browser/object-table/TableCell.js +111 -31
- package/build/browser/object-table/TableCell.js.map +1 -1
- package/build/browser/object-table/TableHeader.js +215 -38
- package/build/browser/object-table/TableHeaderContent.js +18 -21
- package/build/browser/object-table/TableHeaderContent.js.map +1 -1
- package/build/browser/object-table/TableHeaderWithPopover.js +80 -66
- package/build/browser/object-table/TableRow.js +144 -26
- package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js +18 -20
- package/build/browser/object-table/hooks/__tests__/useObjectTableData.test.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnDefs.js +6 -2
- package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnPinning.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/browser/object-table/hooks/useObjectTableData.js +7 -6
- package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/browser/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/browser/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/browser/object-table/hooks/useTableSorting.js.map +1 -1
- package/build/browser/object-table/utils/getRowId.js.map +1 -1
- package/build/cjs/public/experimental.cjs +435 -264
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +114 -56
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +8 -11
- package/build/esm/base-components/checkbox/Checkbox.module.css +10 -3
- package/build/esm/object-table/CellContextMenu.module.css +1 -1
- package/build/{browser/object-table/CellContextMenu.module.css → esm/object-table/LoadingCell.js} +16 -3
- package/build/esm/object-table/LoadingCell.js.map +1 -0
- package/build/esm/object-table/LoadingCell.module.css +48 -0
- package/build/esm/object-table/LoadingRow.js +43 -0
- package/build/esm/object-table/LoadingRow.js.map +1 -0
- package/build/esm/object-table/LoadingStateTable.js +101 -0
- package/build/esm/object-table/LoadingStateTable.js.map +1 -0
- package/build/{browser/object-table/TableHeaderContent.module.css → esm/object-table/NonIdealState.js} +11 -13
- package/build/esm/object-table/NonIdealState.js.map +1 -0
- package/build/{browser/object-table/Table.module.css → esm/object-table/NonIdealState.module.css} +10 -4
- package/build/esm/object-table/ObjectTable.js +6 -5
- package/build/esm/object-table/ObjectTable.js.map +1 -1
- package/build/esm/object-table/ObjectTableApi.js.map +1 -1
- package/build/esm/object-table/Table.js +34 -13
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/Table.module.css +2 -2
- package/build/esm/object-table/TableBody.js +13 -2
- package/build/esm/object-table/TableBody.js.map +1 -1
- package/build/esm/object-table/TableCell.js.map +1 -1
- package/build/esm/object-table/TableCell.module.css +7 -8
- package/build/esm/object-table/TableHeader.module.css +15 -9
- package/build/esm/object-table/TableHeaderContent.js.map +1 -1
- package/build/esm/object-table/TableHeaderWithPopover.module.css +31 -26
- package/build/esm/object-table/TableRow.module.css +1 -1
- package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js +18 -20
- package/build/esm/object-table/hooks/__tests__/useObjectTableData.test.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnDefs.js +6 -2
- package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnPinning.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/esm/object-table/hooks/useObjectTableData.js +7 -6
- package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
- package/build/esm/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/esm/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/esm/object-table/hooks/useTableSorting.js.map +1 -1
- package/build/esm/object-table/utils/getRowId.js.map +1 -1
- package/build/types/object-table/LoadingCell.d.ts +4 -0
- package/build/types/object-table/LoadingCell.d.ts.map +1 -0
- package/build/types/object-table/LoadingRow.d.ts +11 -0
- package/build/types/object-table/LoadingRow.d.ts.map +1 -0
- package/build/types/object-table/LoadingStateTable.d.ts +11 -0
- package/build/types/object-table/LoadingStateTable.d.ts.map +1 -0
- package/build/types/object-table/NonIdealState.d.ts +6 -0
- package/build/types/object-table/NonIdealState.d.ts.map +1 -0
- package/build/types/object-table/ObjectTable.d.ts +4 -4
- package/build/types/object-table/ObjectTable.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +4 -8
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/Table.d.ts +2 -1
- package/build/types/object-table/Table.d.ts.map +1 -1
- package/build/types/object-table/TableBody.d.ts +4 -2
- package/build/types/object-table/TableBody.d.ts.map +1 -1
- package/build/types/object-table/TableHeaderContent.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnDefs.d.ts +3 -3
- package/build/types/object-table/hooks/useColumnDefs.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnPinning.d.ts +3 -3
- package/build/types/object-table/hooks/useColumnPinning.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnVisibility.d.ts +3 -3
- package/build/types/object-table/hooks/useColumnVisibility.d.ts.map +1 -1
- package/build/types/object-table/hooks/useObjectTableData.d.ts +6 -6
- package/build/types/object-table/hooks/useObjectTableData.d.ts.map +1 -1
- package/build/types/object-table/hooks/useRowSelection.d.ts +3 -3
- package/build/types/object-table/hooks/useRowSelection.d.ts.map +1 -1
- package/build/types/object-table/hooks/useSelectionColumn.d.ts +2 -2
- package/build/types/object-table/hooks/useSelectionColumn.d.ts.map +1 -1
- package/build/types/object-table/hooks/useTableSorting.d.ts +3 -3
- package/build/types/object-table/hooks/useTableSorting.d.ts.map +1 -1
- package/build/types/object-table/utils/getRowId.d.ts +3 -3
- package/build/types/object-table/utils/getRowId.d.ts.map +1 -1
- package/package.json +6 -6
- package/build/browser/base-components/checkbox/Checkbox.module.css +0 -72
- package/build/browser/object-table/TableBody.module.css +0 -20
- package/build/browser/object-table/TableCell.module.css +0 -63
- package/build/browser/object-table/TableHeader.module.css +0 -95
- package/build/browser/object-table/TableHeaderWithPopover.module.css +0 -105
- package/build/browser/object-table/TableRow.module.css +0 -60
package/README.md
CHANGED
|
@@ -9,11 +9,11 @@ Built on top of [@osdk/react](../react), these components use OSDK hooks interna
|
|
|
9
9
|
Run the command to install:
|
|
10
10
|
|
|
11
11
|
- @osdk/react-components - The unstyled components from this package
|
|
12
|
-
- @osdk/react - The react toolkit for data-handling
|
|
13
12
|
- @osdk/react-components-styles - The default styles for the components
|
|
13
|
+
- @osdk/react, @osdk/api, @osdk/client - The packages required for data-handling
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
npm install @osdk/react-components @osdk/react @osdk/react
|
|
16
|
+
npm install @osdk/react-components @osdk/react-components-styles @osdk/react @osdk/client @osdk/api
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
**Prerequisites:**
|
|
@@ -58,11 +58,8 @@ import { ObjectTable } from "@osdk/react-components";
|
|
|
58
58
|
import { $, Employee } from "@your-osdk-package";
|
|
59
59
|
|
|
60
60
|
function EmployeeDirectory() {
|
|
61
|
-
const employeeObjectSet = $(Employee).where({ department: "Engineering" });
|
|
62
|
-
|
|
63
61
|
return (
|
|
64
62
|
<ObjectTable
|
|
65
|
-
objectSet={employeeObjectSet}
|
|
66
63
|
objectType={Employee}
|
|
67
64
|
/>
|
|
68
65
|
);
|
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
|
|
1
|
+
// build/browser/base-components/checkbox/Checkbox.js
|
|
18
2
|
import { Checkbox as BaseUICheckbox } from "@base-ui/react/checkbox";
|
|
19
3
|
import { Minus, Tick } from "@blueprintjs/icons";
|
|
20
4
|
import classnames from "classnames";
|
|
21
5
|
import React from "react";
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
|
|
7
|
+
// build/browser/base-components/checkbox/Checkbox.module.css
|
|
8
|
+
var css = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkCheckboxRoot {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: calc(\n var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2\n );\n min-height: calc(\n var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2\n );\n padding: var(--osdk-checkbox-padding);\n box-sizing: border-box;\n cursor: pointer;\n border-radius: var(--osdk-surface-border-radius);\n border: var(--osdk-checkbox-border);\n\n &[data-unchecked] {\n background-color: var(--osdk-checkbox-bg);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-active);\n }\n }\n\n &[data-checked],\n &[data-indeterminate] {\n background-color: var(--osdk-checkbox-bg-checked);\n\n &:hover {\n background-color: var(--osdk-checkbox-bg-checked-hover);\n }\n\n &:active {\n background-color: var(--osdk-checkbox-bg-checked-active);\n }\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-visible-outline);\n outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));\n }\n}\n\n.osdkCheckboxIndicator {\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--osdk-checkbox-checked-foreground);\n width: var(--osdk-checkbox-icon-size);\n height: var(--osdk-checkbox-icon-size);\n\n &[data-unchecked] {\n display: none;\n }\n}\n';
|
|
9
|
+
if (typeof document !== "undefined") {
|
|
10
|
+
const style = document.createElement("style");
|
|
11
|
+
style.textContent = css;
|
|
12
|
+
document.head.appendChild(style);
|
|
13
|
+
}
|
|
14
|
+
var Checkbox_default = { "osdkCheckboxRoot": "osdkCheckboxRoot", "osdkCheckboxIndicator": "osdkCheckboxIndicator" };
|
|
15
|
+
|
|
16
|
+
// build/browser/base-components/checkbox/Checkbox.js
|
|
17
|
+
function _extends() {
|
|
18
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
19
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
20
|
+
var t = arguments[e];
|
|
21
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
22
|
+
}
|
|
23
|
+
return n;
|
|
24
|
+
}, _extends.apply(null, arguments);
|
|
25
|
+
}
|
|
26
|
+
function Checkbox({
|
|
24
27
|
indeterminate,
|
|
25
28
|
className,
|
|
26
29
|
indicatorProps,
|
|
27
30
|
...rest
|
|
28
31
|
}) {
|
|
29
|
-
return
|
|
30
|
-
className: classnames(
|
|
31
|
-
indeterminate
|
|
32
|
-
}, rest),
|
|
33
|
-
className: classnames(
|
|
34
|
-
}), indeterminate ?
|
|
32
|
+
return /* @__PURE__ */ React.createElement(BaseUICheckbox.Root, _extends({
|
|
33
|
+
className: classnames(Checkbox_default.osdkCheckboxRoot, className),
|
|
34
|
+
indeterminate
|
|
35
|
+
}, rest), /* @__PURE__ */ React.createElement(BaseUICheckbox.Indicator, _extends({}, indicatorProps, {
|
|
36
|
+
className: classnames(Checkbox_default.osdkCheckboxIndicator, indicatorProps?.className)
|
|
37
|
+
}), indeterminate ? /* @__PURE__ */ React.createElement(Minus, {
|
|
35
38
|
color: "currentColor"
|
|
36
|
-
}) :
|
|
39
|
+
}) : /* @__PURE__ */ React.createElement(Tick, {
|
|
37
40
|
color: "currentColor"
|
|
38
41
|
})));
|
|
39
42
|
}
|
|
40
|
-
|
|
43
|
+
export {
|
|
44
|
+
Checkbox
|
|
45
|
+
};
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
1
|
+
// build/browser/object-table/CellContextMenu.js
|
|
17
2
|
import React, { useEffect, useRef } from "react";
|
|
18
3
|
import { createPortal } from "react-dom";
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
|
|
5
|
+
// build/browser/object-table/CellContextMenu.module.css
|
|
6
|
+
var css = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkCellContextMenu {\n position: fixed;\n z-index: var(--osdk-surface-z-index-2);\n}\n';
|
|
7
|
+
if (typeof document !== "undefined") {
|
|
8
|
+
const style = document.createElement("style");
|
|
9
|
+
style.textContent = css;
|
|
10
|
+
document.head.appendChild(style);
|
|
11
|
+
}
|
|
12
|
+
var CellContextMenu_default = { "osdkCellContextMenu": "osdkCellContextMenu" };
|
|
13
|
+
|
|
14
|
+
// build/browser/object-table/CellContextMenu.js
|
|
15
|
+
function CellContextMenu({
|
|
21
16
|
cell,
|
|
22
17
|
position,
|
|
23
18
|
onClose,
|
|
@@ -25,7 +20,7 @@ export function CellContextMenu({
|
|
|
25
20
|
}) {
|
|
26
21
|
const ref = useRef(null);
|
|
27
22
|
useEffect(() => {
|
|
28
|
-
const handleClickOutside = event => {
|
|
23
|
+
const handleClickOutside = (event) => {
|
|
29
24
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
30
25
|
onClose();
|
|
31
26
|
}
|
|
@@ -35,9 +30,9 @@ export function CellContextMenu({
|
|
|
35
30
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
36
31
|
};
|
|
37
32
|
}, [onClose]);
|
|
38
|
-
return
|
|
39
|
-
ref
|
|
40
|
-
className:
|
|
33
|
+
return /* @__PURE__ */ createPortal(/* @__PURE__ */ React.createElement("div", {
|
|
34
|
+
ref,
|
|
35
|
+
className: CellContextMenu_default.osdkCellContextMenu,
|
|
41
36
|
style: {
|
|
42
37
|
left: position.left,
|
|
43
38
|
top: position.top,
|
|
@@ -45,4 +40,6 @@ export function CellContextMenu({
|
|
|
45
40
|
}
|
|
46
41
|
}, renderContent(cell.row.original, cell)), document.body);
|
|
47
42
|
}
|
|
48
|
-
|
|
43
|
+
export {
|
|
44
|
+
CellContextMenu
|
|
45
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// build/browser/object-table/LoadingCell.js
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
// build/browser/object-table/LoadingCell.module.css
|
|
6
|
+
var css = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkLoadingCell {\n height: var(--osdk-table-cell-fontSize);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n flex: 1;\n}\n\n/* Blueprint skeleton animation keyframes */\n@keyframes skeleton-glow {\n from {\n background: var(--osdk-table-skeleton-color-from);\n border-color: var(--osdk-table-skeleton-color-from);\n }\n\n to {\n background: var(--osdk-table-skeleton-color-to);\n border-color: var(--osdk-table-skeleton-color-to);\n }\n}\n\n.osdkCellSkeleton {\n animation: 1000ms linear infinite alternate skeleton-glow;\n background: var(--osdk-table-skeleton-color-from);\n background-clip: padding-box;\n border-color: var(--osdk-table-skeleton-color-from);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n border: 1px solid var(--osdk-table-skeleton-border-color);\n box-shadow: none;\n color: transparent;\n cursor: default;\n pointer-events: none;\n user-select: none;\n}\n';
|
|
7
|
+
if (typeof document !== "undefined") {
|
|
8
|
+
const style = document.createElement("style");
|
|
9
|
+
style.textContent = css;
|
|
10
|
+
document.head.appendChild(style);
|
|
11
|
+
}
|
|
12
|
+
var LoadingCell_default = { "osdkLoadingCell": "osdkLoadingCell", "osdkCellSkeleton": "osdkCellSkeleton" };
|
|
13
|
+
|
|
14
|
+
// build/browser/object-table/TableCell.module.css
|
|
15
|
+
var css2 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-size: var(--osdk-table-cell-fontSize);\n color: var(--osdk-table-cell-color);\n background-color: inherit;\n border-right: var(--osdk-table-cell-divider);\n\n &:first-child {\n border-left: var(--osdk-table-border);\n }\n\n &:last-child {\n border-right: var(--osdk-table-border);\n }\n}\n\n.osdkTableCell[data-pinned="left"],\n.osdkTableCell[data-pinned="right"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned="left"]:not(:has(~ [data-pinned="left"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned="right"]:not(:has(~ [data-pinned="right"]):nth-child(n+2)) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role="checkbox"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent:not(:has([role="checkbox"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n';
|
|
16
|
+
if (typeof document !== "undefined") {
|
|
17
|
+
const style = document.createElement("style");
|
|
18
|
+
style.textContent = css2;
|
|
19
|
+
document.head.appendChild(style);
|
|
20
|
+
}
|
|
21
|
+
var TableCell_default = { "osdkTableCell": "osdkTableCell", "osdkTableCellContent": "osdkTableCellContent" };
|
|
22
|
+
|
|
23
|
+
// build/browser/object-table/LoadingCell.js
|
|
24
|
+
function LoadingCell({
|
|
25
|
+
width
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ React.createElement("td", {
|
|
28
|
+
className: TableCell_default.osdkTableCell,
|
|
29
|
+
style: {
|
|
30
|
+
width
|
|
31
|
+
}
|
|
32
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
33
|
+
className: classNames(LoadingCell_default.osdkLoadingCell, LoadingCell_default.osdkCellSkeleton)
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
LoadingCell
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingCell.js","names":["classNames","React","styles","cellStyles","LoadingCell","width","createElement","className","osdkTableCell","style","osdkLoadingCell","osdkCellSkeleton"],"sources":["LoadingCell.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./LoadingCell.module.css\";\nimport cellStyles from \"./TableCell.module.css\";\n\nexport function LoadingCell({ width }: { width: number }): React.ReactElement {\n return (\n <td\n className={cellStyles.osdkTableCell}\n style={{ width }}\n >\n <div\n className={classNames(styles.osdkLoadingCell, styles.osdkCellSkeleton)}\n />\n </td>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,0BAA0B;AAC7C,OAAOC,UAAU,MAAM,wBAAwB;AAE/C,OAAO,SAASC,WAAWA,CAAC;EAAEC;AAAyB,CAAC,EAAsB;EAC5E,oBACEJ,KAAA,CAAAK,aAAA;IACEC,SAAS,EAAEJ,UAAU,CAACK,aAAc;IACpCC,KAAK,EAAE;MAAEJ;IAAM;EAAE,gBAEjBJ,KAAA,CAAAK,aAAA;IACEC,SAAS,EAAEP,UAAU,CAACE,MAAM,CAACQ,eAAe,EAAER,MAAM,CAACS,gBAAgB;EAAE,CACxE,CACC,CAAC;AAET","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// build/browser/object-table/LoadingRow.js
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
|
|
4
|
+
// build/browser/object-table/LoadingCell.js
|
|
5
|
+
import classNames from "classnames";
|
|
6
|
+
import React from "react";
|
|
7
|
+
var css = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkLoadingCell {\n height: var(--osdk-table-cell-fontSize);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n flex: 1;\n}\n\n/* Blueprint skeleton animation keyframes */\n@keyframes skeleton-glow {\n from {\n background: var(--osdk-table-skeleton-color-from);\n border-color: var(--osdk-table-skeleton-color-from);\n }\n\n to {\n background: var(--osdk-table-skeleton-color-to);\n border-color: var(--osdk-table-skeleton-color-to);\n }\n}\n\n.osdkCellSkeleton {\n animation: 1000ms linear infinite alternate skeleton-glow;\n background: var(--osdk-table-skeleton-color-from);\n background-clip: padding-box;\n border-color: var(--osdk-table-skeleton-color-from);\n border-radius: calc(var(--osdk-surface-border-radius) * 0.5);\n border: 1px solid var(--osdk-table-skeleton-border-color);\n box-shadow: none;\n color: transparent;\n cursor: default;\n pointer-events: none;\n user-select: none;\n}\n';
|
|
8
|
+
if (typeof document !== "undefined") {
|
|
9
|
+
const style = document.createElement("style");
|
|
10
|
+
style.textContent = css;
|
|
11
|
+
document.head.appendChild(style);
|
|
12
|
+
}
|
|
13
|
+
var LoadingCell_default = { "osdkLoadingCell": "osdkLoadingCell", "osdkCellSkeleton": "osdkCellSkeleton" };
|
|
14
|
+
var css2 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableCell {\n display: flex;\n align-items: center;\n text-align: left;\n position: relative;\n padding: var(--osdk-table-cell-padding);\n font-size: var(--osdk-table-cell-fontSize);\n color: var(--osdk-table-cell-color);\n background-color: inherit;\n border-right: var(--osdk-table-cell-divider);\n\n &:first-child {\n border-left: var(--osdk-table-border);\n }\n\n &:last-child {\n border-right: var(--osdk-table-border);\n }\n}\n\n.osdkTableCell[data-pinned="left"],\n.osdkTableCell[data-pinned="right"] {\n position: sticky;\n z-index: var(--osdk-surface-z-index-1);\n}\n\n/* Last left-pinned column - no left-pinned siblings after it */\n.osdkTableCell[data-pinned="left"]:not(:has(~ [data-pinned="left"])) {\n border-right: var(--osdk-table-pinned-column-border);\n}\n\n/* First right-pinned column - no right-pinned siblings before it */\n.osdkTableCell[data-pinned="right"]:not(:has(~ [data-pinned="right"]):nth-child(n+2)) {\n border-left: var(--osdk-table-pinned-column-border);\n}\n\n.osdkTableCell:has([role="checkbox"]) {\n justify-content: center;\n}\n\n.osdkTableCellContent:not(:has([role="checkbox"])) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: left;\n}\n';
|
|
15
|
+
if (typeof document !== "undefined") {
|
|
16
|
+
const style = document.createElement("style");
|
|
17
|
+
style.textContent = css2;
|
|
18
|
+
document.head.appendChild(style);
|
|
19
|
+
}
|
|
20
|
+
var TableCell_default = { "osdkTableCell": "osdkTableCell", "osdkTableCellContent": "osdkTableCellContent" };
|
|
21
|
+
function LoadingCell({
|
|
22
|
+
width
|
|
23
|
+
}) {
|
|
24
|
+
return /* @__PURE__ */ React.createElement("td", {
|
|
25
|
+
className: TableCell_default.osdkTableCell,
|
|
26
|
+
style: {
|
|
27
|
+
width
|
|
28
|
+
}
|
|
29
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
30
|
+
className: classNames(LoadingCell_default.osdkLoadingCell, LoadingCell_default.osdkCellSkeleton)
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// build/browser/object-table/TableRow.module.css
|
|
35
|
+
var css3 = '/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.osdkTableRow {\n position: absolute;\n display: flex;\n background-color: var(--osdk-table-row-bg-default);\n border-top: var(--osdk-table-row-divider);\n border-bottom: var(--osdk-table-border-width) solid transparent;\n\n &:last-child {\n border-bottom: var(--osdk-table-border);\n }\n\n /* Zebra rows */\n &:nth-child(even) {\n background-color: var(\n --osdk-table-row-bg-alternate,\n var(--osdk-table-row-bg-default)\n );\n }\n\n &:hover {\n z-index: 1;\n background-color: var(\n --osdk-table-row-bg-hover,\n var(--osdk-surface-background-color-default-hover)\n );\n border-top-color: var(--osdk-table-row-border-color-hover);\n border-bottom-color: var(--osdk-table-row-border-color-hover);\n }\n\n &[data-selected="true"] {\n z-index: 2;\n background-color: var(--osdk-table-row-bg-active);\n border-top-color: var(--osdk-table-row-border-color-active);\n border-bottom-color: var(--osdk-table-row-border-color-active);\n }\n\n &[data-selected="true"] + &[data-selected="true"] {\n border-top-color: transparent;\n }\n\n &[data-selected="true"]:has(+ &[data-selected="true"]) {\n border-bottom-color: transparent;\n }\n}\n';
|
|
36
|
+
if (typeof document !== "undefined") {
|
|
37
|
+
const style = document.createElement("style");
|
|
38
|
+
style.textContent = css3;
|
|
39
|
+
document.head.appendChild(style);
|
|
40
|
+
}
|
|
41
|
+
var TableRow_default = { "osdkTableRow": "osdkTableRow" };
|
|
42
|
+
|
|
43
|
+
// build/browser/object-table/LoadingRow.js
|
|
44
|
+
function LoadingRow({
|
|
45
|
+
headers,
|
|
46
|
+
columnCount,
|
|
47
|
+
translateY,
|
|
48
|
+
rowHeight = 40,
|
|
49
|
+
columnWidth = 80
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ React2.createElement("tr", {
|
|
52
|
+
className: TableRow_default.osdkTableRow,
|
|
53
|
+
style: {
|
|
54
|
+
height: `${rowHeight}px`,
|
|
55
|
+
transform: `translateY(${translateY}px)`
|
|
56
|
+
}
|
|
57
|
+
}, /* @__PURE__ */ React2.createElement(React2.Fragment, null, Array.from({
|
|
58
|
+
length: columnCount
|
|
59
|
+
}).map((_, index) => {
|
|
60
|
+
const width = headers.length > index ? headers[index].getSize() : columnWidth;
|
|
61
|
+
return /* @__PURE__ */ React2.createElement(LoadingCell, {
|
|
62
|
+
key: `loading-cell-${index}`,
|
|
63
|
+
width
|
|
64
|
+
});
|
|
65
|
+
})));
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
LoadingRow
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingRow.js","names":["React","LoadingCell","rowStyles","LoadingRow","headers","columnCount","translateY","rowHeight","columnWidth","createElement","className","osdkTableRow","style","height","transform","Fragment","Array","from","length","map","_","index","width","getSize","key"],"sources":["LoadingRow.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { HeaderGroup, RowData } from \"@tanstack/react-table\";\nimport React from \"react\";\nimport { LoadingCell } from \"./LoadingCell.js\";\nimport rowStyles from \"./TableRow.module.css\";\n\ninterface LoadingRowProps<TData extends RowData> {\n headers: HeaderGroup<TData>[\"headers\"];\n columnCount: number;\n translateY: number;\n rowHeight?: number;\n columnWidth?: number;\n}\n\nexport function LoadingRow<TData extends RowData>({\n headers,\n columnCount,\n translateY,\n rowHeight = 40,\n columnWidth = 80,\n}: LoadingRowProps<TData>): React.ReactElement {\n return (\n <tr\n className={rowStyles.osdkTableRow}\n style={{\n height: `${rowHeight}px`,\n transform: `translateY(${translateY}px)`,\n }}\n >\n {\n <>\n {Array.from({ length: columnCount }).map((_, index) => {\n const width = headers.length > index\n ? headers[index].getSize()\n : columnWidth;\n return <LoadingCell key={`loading-cell-${index}`} width={width} />;\n })}\n </>\n }\n </tr>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,OAAOC,SAAS,MAAM,uBAAuB;AAU7C,OAAO,SAASC,UAAUA,CAAwB;EAChDC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,SAAS,GAAG,EAAE;EACdC,WAAW,GAAG;AACQ,CAAC,EAAsB;EAC7C,oBACER,KAAA,CAAAS,aAAA;IACEC,SAAS,EAAER,SAAS,CAACS,YAAa;IAClCC,KAAK,EAAE;MACLC,MAAM,EAAE,GAAGN,SAAS,IAAI;MACxBO,SAAS,EAAE,cAAcR,UAAU;IACrC;EAAE,gBAGAN,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAe,QAAA,QACGC,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAEb;EAAY,CAAC,CAAC,CAACc,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,KAAK;IACrD,MAAMC,KAAK,GAAGlB,OAAO,CAACc,MAAM,GAAGG,KAAK,GAChCjB,OAAO,CAACiB,KAAK,CAAC,CAACE,OAAO,CAAC,CAAC,GACxBf,WAAW;IACf,oBAAOR,KAAA,CAAAS,aAAA,CAACR,WAAW;MAACuB,GAAG,EAAE,gBAAgBH,KAAK,EAAG;MAACC,KAAK,EAAEA;IAAM,CAAE,CAAC;EACpE,CAAC,CACD,CAEF,CAAC;AAET","ignoreList":[]}
|