@osdk/react-components 0.2.0-beta.1 → 0.2.0-beta.2
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/CHANGELOG.md +14 -0
- package/README.md +21 -5
- package/build/browser/base-components/checkbox/Checkbox.js +27 -32
- package/build/browser/base-components/checkbox/Checkbox.module.css +79 -0
- package/build/browser/base-components/checkbox/Checkbox.module.css.js +7 -0
- package/build/browser/object-table/CellContextMenu.js +23 -20
- package/build/browser/object-table/CellContextMenu.module.css +20 -0
- package/build/browser/object-table/CellContextMenu.module.css.js +6 -0
- package/build/browser/object-table/LoadingCell.js +24 -29
- package/build/browser/object-table/LoadingCell.module.css +48 -0
- package/build/browser/object-table/LoadingCell.module.css.js +8 -0
- package/build/browser/object-table/LoadingRow.js +24 -50
- package/build/browser/object-table/LoadingStateTable.js +46 -340
- package/build/browser/object-table/NonIdealState.js +23 -20
- package/build/browser/object-table/NonIdealState.module.css +28 -0
- package/build/browser/object-table/NonIdealState.module.css.js +7 -0
- package/build/browser/object-table/Table.js +51 -933
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/Table.module.css +22 -0
- package/build/browser/object-table/Table.module.css.js +6 -0
- package/build/browser/object-table/TableBody.js +36 -260
- package/build/browser/object-table/TableBody.module.css +20 -0
- package/build/browser/object-table/TableBody.module.css.js +6 -0
- package/build/browser/object-table/TableCell.js +31 -111
- package/build/browser/object-table/TableCell.module.css +62 -0
- package/build/browser/object-table/TableCell.module.css.js +7 -0
- package/build/browser/object-table/TableHeader.js +38 -215
- package/build/browser/object-table/TableHeader.module.css +101 -0
- package/build/browser/object-table/TableHeader.module.css.js +10 -0
- package/build/browser/object-table/TableHeaderContent.js +21 -18
- package/build/browser/object-table/TableHeaderContent.module.css +30 -0
- package/build/browser/object-table/TableHeaderContent.module.css.js +6 -0
- package/build/browser/object-table/TableHeaderWithPopover.js +66 -80
- package/build/browser/object-table/TableHeaderWithPopover.module.css +110 -0
- package/build/browser/object-table/TableHeaderWithPopover.module.css.js +15 -0
- package/build/browser/object-table/TableRow.js +26 -144
- package/build/browser/object-table/TableRow.module.css +60 -0
- package/build/browser/object-table/TableRow.module.css.js +6 -0
- package/build/browser/styles.css +615 -0
- package/build/cjs/public/experimental.cjs +5 -5
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/esm/object-table/Table.js +5 -5
- package/build/esm/object-table/Table.js.map +1 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @osdk/react-components
|
|
2
2
|
|
|
3
|
+
## 0.2.0-beta.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5ad3ba1: Fix conflicting dependencies and add docs
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [26cec61]
|
|
12
|
+
- Updated dependencies [0d174a2]
|
|
13
|
+
- @osdk/client@2.8.0-beta.3
|
|
14
|
+
- @osdk/react@0.10.0-beta.2
|
|
15
|
+
- @osdk/api@2.8.0-beta.3
|
|
16
|
+
|
|
3
17
|
## 0.1.0-beta.6
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -10,29 +10,45 @@ Run the command to install:
|
|
|
10
10
|
|
|
11
11
|
- @osdk/react-components - The unstyled components from this package
|
|
12
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
13
|
|
|
15
14
|
```sh
|
|
16
|
-
npm install @osdk/react-components @osdk/react-components-styles
|
|
15
|
+
npm install @osdk/react-components @osdk/react-components-styles
|
|
17
16
|
```
|
|
18
17
|
|
|
18
|
+
**Peer Dependencies:**
|
|
19
|
+
|
|
20
|
+
The following peer dependencies are required:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install react react-dom classnames @osdk/react @osdk/client @osdk/api
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- `react` and `react-dom` - React 17, 18, or 19
|
|
27
|
+
- `classnames` - Utility for conditionally joining CSS class names
|
|
28
|
+
- `@osdk/react`, `@osdk/api`, `@osdk/client` - The packages required for data-handling
|
|
29
|
+
|
|
30
|
+
For TypeScript users, also install `@types/react`.
|
|
31
|
+
|
|
19
32
|
**Prerequisites:**
|
|
20
33
|
|
|
21
|
-
- React 18
|
|
22
34
|
- A configured OSDK client
|
|
23
35
|
- An OsdkProvider wrapping your application
|
|
24
36
|
|
|
25
37
|
## Setup
|
|
26
38
|
|
|
27
|
-
Add this to your application
|
|
39
|
+
Add this to your application's entry css file (e.g., `index.css` or `index.scss`):
|
|
28
40
|
|
|
29
41
|
```css
|
|
30
42
|
/* index.css */
|
|
43
|
+
@import "@osdk/react-components/styles.css";
|
|
44
|
+
|
|
31
45
|
.root {
|
|
32
46
|
isolation: isolate;
|
|
33
47
|
}
|
|
34
48
|
```
|
|
35
49
|
|
|
50
|
+
The `.root` isolation is required for Base UI portals. See https://base-ui.com/react/overview/quick-start#portals
|
|
51
|
+
|
|
36
52
|
## Components
|
|
37
53
|
|
|
38
54
|
> **Note:** This package is under active development. Not all components listed below are available yet.
|
|
@@ -54,7 +70,7 @@ See `@osdk/react-components-styles` README on how to apply custom themes and sty
|
|
|
54
70
|
### Object Table
|
|
55
71
|
|
|
56
72
|
```ts
|
|
57
|
-
import { ObjectTable } from "@osdk/react-components";
|
|
73
|
+
import { ObjectTable } from "@osdk/react-components/experimental";
|
|
58
74
|
import { $, Employee } from "@your-osdk-package";
|
|
59
75
|
|
|
60
76
|
function EmployeeDirectory() {
|
|
@@ -1,45 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
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
|
+
|
|
2
18
|
import { Checkbox as BaseUICheckbox } from "@base-ui/react/checkbox";
|
|
3
19
|
import { Minus, Tick } from "@blueprintjs/icons";
|
|
4
20
|
import classnames from "classnames";
|
|
5
21
|
import React from "react";
|
|
6
|
-
|
|
7
|
-
|
|
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({
|
|
22
|
+
import styles from "./Checkbox.module.css.js";
|
|
23
|
+
export function Checkbox({
|
|
27
24
|
indeterminate,
|
|
28
25
|
className,
|
|
29
26
|
indicatorProps,
|
|
30
27
|
...rest
|
|
31
28
|
}) {
|
|
32
|
-
return
|
|
33
|
-
className: classnames(
|
|
34
|
-
indeterminate
|
|
35
|
-
}, rest),
|
|
36
|
-
className: classnames(
|
|
37
|
-
}), indeterminate ?
|
|
29
|
+
return /*#__PURE__*/React.createElement(BaseUICheckbox.Root, _extends({
|
|
30
|
+
className: classnames(styles.osdkCheckboxRoot, className),
|
|
31
|
+
indeterminate: indeterminate
|
|
32
|
+
}, rest), /*#__PURE__*/React.createElement(BaseUICheckbox.Indicator, _extends({}, indicatorProps, {
|
|
33
|
+
className: classnames(styles.osdkCheckboxIndicator, indicatorProps?.className)
|
|
34
|
+
}), indeterminate ? /*#__PURE__*/React.createElement(Minus, {
|
|
38
35
|
color: "currentColor"
|
|
39
|
-
}) :
|
|
36
|
+
}) : /*#__PURE__*/React.createElement(Tick, {
|
|
40
37
|
color: "currentColor"
|
|
41
38
|
})));
|
|
42
39
|
}
|
|
43
|
-
|
|
44
|
-
Checkbox
|
|
45
|
-
};
|
|
40
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
|
|
17
|
+
.osdkCheckboxRoot {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
min-width: calc(
|
|
22
|
+
var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2
|
|
23
|
+
);
|
|
24
|
+
min-height: calc(
|
|
25
|
+
var(--osdk-checkbox-icon-size) + var(--osdk-checkbox-padding) * 2
|
|
26
|
+
);
|
|
27
|
+
padding: var(--osdk-checkbox-padding);
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
31
|
+
border: var(--osdk-checkbox-border);
|
|
32
|
+
|
|
33
|
+
&[data-unchecked] {
|
|
34
|
+
background-color: var(--osdk-checkbox-bg);
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background-color: var(--osdk-checkbox-bg-hover);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:active {
|
|
41
|
+
background-color: var(--osdk-checkbox-bg-active);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&[data-checked],
|
|
46
|
+
&[data-indeterminate] {
|
|
47
|
+
background-color: var(--osdk-checkbox-bg-checked);
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
background-color: var(--osdk-checkbox-bg-checked-hover);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:active {
|
|
54
|
+
background-color: var(--osdk-checkbox-bg-checked-active);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:focus {
|
|
59
|
+
outline: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:focus-visible {
|
|
63
|
+
outline: var(--osdk-focus-visible-outline);
|
|
64
|
+
outline-offset: calc(-1 * var(--osdk-focus-visible-outline-offset));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.osdkCheckboxIndicator {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
color: var(--osdk-checkbox-checked-foreground);
|
|
73
|
+
width: var(--osdk-checkbox-icon-size);
|
|
74
|
+
height: var(--osdk-checkbox-icon-size);
|
|
75
|
+
|
|
76
|
+
&[data-unchecked] {
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
|
|
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
|
+
|
|
2
17
|
import React, { useEffect, useRef } from "react";
|
|
3
18
|
import { createPortal } from "react-dom";
|
|
4
|
-
|
|
5
|
-
|
|
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({
|
|
19
|
+
import styles from "./CellContextMenu.module.css.js";
|
|
20
|
+
export function CellContextMenu({
|
|
16
21
|
cell,
|
|
17
22
|
position,
|
|
18
23
|
onClose,
|
|
@@ -20,7 +25,7 @@ function CellContextMenu({
|
|
|
20
25
|
}) {
|
|
21
26
|
const ref = useRef(null);
|
|
22
27
|
useEffect(() => {
|
|
23
|
-
const handleClickOutside =
|
|
28
|
+
const handleClickOutside = event => {
|
|
24
29
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
25
30
|
onClose();
|
|
26
31
|
}
|
|
@@ -30,9 +35,9 @@ function CellContextMenu({
|
|
|
30
35
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
31
36
|
};
|
|
32
37
|
}, [onClose]);
|
|
33
|
-
return
|
|
34
|
-
ref,
|
|
35
|
-
className:
|
|
38
|
+
return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", {
|
|
39
|
+
ref: ref,
|
|
40
|
+
className: styles.osdkCellContextMenu,
|
|
36
41
|
style: {
|
|
37
42
|
left: position.left,
|
|
38
43
|
top: position.top,
|
|
@@ -40,6 +45,4 @@ function CellContextMenu({
|
|
|
40
45
|
}
|
|
41
46
|
}, renderContent(cell.row.original, cell)), document.body);
|
|
42
47
|
}
|
|
43
|
-
|
|
44
|
-
CellContextMenu
|
|
45
|
-
};
|
|
48
|
+
//# sourceMappingURL=CellContextMenu.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
|
|
17
|
+
.osdkCellContextMenu {
|
|
18
|
+
position: fixed;
|
|
19
|
+
z-index: var(--osdk-surface-z-index-2);
|
|
20
|
+
}
|
|
@@ -1,38 +1,33 @@
|
|
|
1
|
-
|
|
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
|
+
|
|
2
17
|
import classNames from "classnames";
|
|
3
18
|
import React from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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({
|
|
19
|
+
import styles from "./LoadingCell.module.css.js";
|
|
20
|
+
import cellStyles from "./TableCell.module.css.js";
|
|
21
|
+
export function LoadingCell({
|
|
25
22
|
width
|
|
26
23
|
}) {
|
|
27
|
-
return
|
|
28
|
-
className:
|
|
24
|
+
return /*#__PURE__*/React.createElement("td", {
|
|
25
|
+
className: cellStyles.osdkTableCell,
|
|
29
26
|
style: {
|
|
30
27
|
width
|
|
31
28
|
}
|
|
32
|
-
},
|
|
33
|
-
className: classNames(
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: classNames(styles.osdkLoadingCell, styles.osdkCellSkeleton)
|
|
34
31
|
}));
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
LoadingCell
|
|
38
|
-
};
|
|
33
|
+
//# sourceMappingURL=LoadingCell.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
|
|
17
|
+
.osdkLoadingCell {
|
|
18
|
+
height: var(--osdk-table-cell-fontSize);
|
|
19
|
+
border-radius: calc(var(--osdk-surface-border-radius) * 0.5);
|
|
20
|
+
flex: 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Blueprint skeleton animation keyframes */
|
|
24
|
+
@keyframes skeleton-glow {
|
|
25
|
+
from {
|
|
26
|
+
background: var(--osdk-table-skeleton-color-from);
|
|
27
|
+
border-color: var(--osdk-table-skeleton-color-from);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
to {
|
|
31
|
+
background: var(--osdk-table-skeleton-color-to);
|
|
32
|
+
border-color: var(--osdk-table-skeleton-color-to);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.osdkCellSkeleton {
|
|
37
|
+
animation: 1000ms linear infinite alternate skeleton-glow;
|
|
38
|
+
background: var(--osdk-table-skeleton-color-from);
|
|
39
|
+
background-clip: padding-box;
|
|
40
|
+
border-color: var(--osdk-table-skeleton-color-from);
|
|
41
|
+
border-radius: calc(var(--osdk-surface-border-radius) * 0.5);
|
|
42
|
+
border: 1px solid var(--osdk-table-skeleton-border-color);
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
color: transparent;
|
|
45
|
+
cursor: default;
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
user-select: none;
|
|
48
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// CSS Module proxy for LoadingCell.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"osdkLoadingCell": "LoadingCell-module__osdkLoadingCell___XLlRWu8h",
|
|
4
|
+
"osdkCellSkeleton": "LoadingCell-module__osdkCellSkeleton___LJKGtJS1",
|
|
5
|
+
"skeleton-glow": "LoadingCell-module__skeleton-glow___pznGbRk6"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default styles;
|
|
@@ -1,69 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
*/
|
|
3
16
|
|
|
4
|
-
// build/browser/object-table/LoadingCell.js
|
|
5
|
-
import classNames from "classnames";
|
|
6
17
|
import React from "react";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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({
|
|
18
|
+
import { LoadingCell } from "./LoadingCell.js";
|
|
19
|
+
import rowStyles from "./TableRow.module.css.js";
|
|
20
|
+
export function LoadingRow({
|
|
45
21
|
headers,
|
|
46
22
|
columnCount,
|
|
47
23
|
translateY,
|
|
48
24
|
rowHeight = 40,
|
|
49
25
|
columnWidth = 80
|
|
50
26
|
}) {
|
|
51
|
-
return
|
|
52
|
-
className:
|
|
27
|
+
return /*#__PURE__*/React.createElement("tr", {
|
|
28
|
+
className: rowStyles.osdkTableRow,
|
|
53
29
|
style: {
|
|
54
30
|
height: `${rowHeight}px`,
|
|
55
31
|
transform: `translateY(${translateY}px)`
|
|
56
32
|
}
|
|
57
|
-
},
|
|
33
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, Array.from({
|
|
58
34
|
length: columnCount
|
|
59
35
|
}).map((_, index) => {
|
|
60
36
|
const width = headers.length > index ? headers[index].getSize() : columnWidth;
|
|
61
|
-
return
|
|
37
|
+
return /*#__PURE__*/React.createElement(LoadingCell, {
|
|
62
38
|
key: `loading-cell-${index}`,
|
|
63
|
-
width
|
|
39
|
+
width: width
|
|
64
40
|
});
|
|
65
41
|
})));
|
|
66
42
|
}
|
|
67
|
-
|
|
68
|
-
LoadingRow
|
|
69
|
-
};
|
|
43
|
+
//# sourceMappingURL=LoadingRow.js.map
|