@osdk/react-components 0.28.0 → 0.29.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3
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 +16 -0
- package/build/browser/pdf-viewer/PdfViewer.js +6 -2
- package/build/browser/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/browser/pdf-viewer/types.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-D565X4TE.cjs → chunk-3E5LLOPP.cjs} +3 -3
- package/build/cjs/chunk-3E5LLOPP.cjs.map +1 -0
- package/build/cjs/chunk-54NO7SXL.cjs +11 -0
- package/build/cjs/{chunk-U4NJ4WIE.cjs.map → chunk-54NO7SXL.cjs.map} +1 -1
- package/build/cjs/{chunk-Z6RGIOQU.cjs → chunk-CDUWYFG4.cjs} +4 -4
- package/build/cjs/{chunk-Z6RGIOQU.cjs.map → chunk-CDUWYFG4.cjs.map} +1 -1
- package/build/cjs/{chunk-HLWTO3SQ.cjs → chunk-DVBKL7PU.cjs} +7 -7
- package/build/cjs/{chunk-HLWTO3SQ.cjs.map → chunk-DVBKL7PU.cjs.map} +1 -1
- package/build/cjs/{chunk-FWZS3WQ4.cjs → chunk-EZ56QDIG.cjs} +7 -3
- package/build/cjs/chunk-EZ56QDIG.cjs.map +1 -0
- package/build/cjs/chunk-IBRBXU2L.cjs +11 -0
- package/build/cjs/{chunk-Q2AQ5TDJ.cjs.map → chunk-IBRBXU2L.cjs.map} +1 -1
- package/build/cjs/{chunk-SWTUJIGW.cjs → chunk-K57WAAJ5.cjs} +4 -4
- package/build/cjs/{chunk-SWTUJIGW.cjs.map → chunk-K57WAAJ5.cjs.map} +1 -1
- package/build/cjs/chunk-LHQT74FJ.cjs +11 -0
- package/build/cjs/{chunk-MIC4N6XX.cjs.map → chunk-LHQT74FJ.cjs.map} +1 -1
- package/build/cjs/{chunk-KBZCABK4.cjs → chunk-TQHAIZUS.cjs} +4 -4
- package/build/cjs/{chunk-KBZCABK4.cjs.map → chunk-TQHAIZUS.cjs.map} +1 -1
- package/build/cjs/{chunk-OJ4Q6LJ6.cjs → chunk-V3KT6B2W.cjs} +4 -4
- package/build/cjs/{chunk-OJ4Q6LJ6.cjs.map → chunk-V3KT6B2W.cjs.map} +1 -1
- package/build/cjs/{chunk-7JOXWTUY.cjs → chunk-VFLRVA47.cjs} +24 -24
- package/build/cjs/{chunk-7JOXWTUY.cjs.map → chunk-VFLRVA47.cjs.map} +1 -1
- package/build/cjs/{chunk-C2V2GXW4.cjs → chunk-VV5QJPGW.cjs} +4 -4
- package/build/cjs/{chunk-C2V2GXW4.cjs.map → chunk-VV5QJPGW.cjs.map} +1 -1
- package/build/cjs/{chunk-GYFDR655.cjs → chunk-WZSTQLHR.cjs} +4 -4
- package/build/cjs/{chunk-GYFDR655.cjs.map → chunk-WZSTQLHR.cjs.map} +1 -1
- package/build/cjs/chunk-Z3PQLRB2.cjs +11 -0
- package/build/cjs/{chunk-S4PGPP6D.cjs.map → chunk-Z3PQLRB2.cjs.map} +1 -1
- package/build/cjs/chunk-ZJMZKUK4.cjs +11 -0
- package/build/cjs/{chunk-NNRUPDXI.cjs.map → chunk-ZJMZKUK4.cjs.map} +1 -1
- package/build/cjs/public/experimental/action-form.cjs +4 -4
- package/build/cjs/public/experimental/cbac-picker.cjs +11 -11
- package/build/cjs/public/experimental/document-viewer.cjs +5 -5
- package/build/cjs/public/experimental/document-viewer.d.cts +1 -1
- package/build/cjs/public/experimental/email-viewer.cjs +3 -3
- package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
- package/build/cjs/public/experimental/filter-list.cjs +15 -15
- package/build/cjs/public/experimental/image-viewer.cjs +3 -3
- package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
- package/build/cjs/public/experimental/object-table.cjs +8 -8
- package/build/cjs/public/experimental/pdf-viewer.cjs +25 -25
- package/build/cjs/public/experimental/pdf-viewer.d.cts +2 -2
- package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
- package/build/cjs/public/experimental/video-viewer.cjs +3 -3
- package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
- package/build/cjs/public/experimental.cjs +76 -76
- package/build/cjs/public/experimental.d.cts +1 -1
- package/build/cjs/{types-Cg_LdKf-.d.cts → types-cSnAM4mt.d.cts} +5 -0
- package/build/esm/pdf-viewer/PdfViewer.js +6 -2
- package/build/esm/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/esm/pdf-viewer/types.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -1
- package/build/types/pdf-viewer/types.d.ts +5 -0
- package/build/types/pdf-viewer/types.d.ts.map +1 -1
- package/docs/Prerequisites.md +10 -21
- package/docs/StylingOverview.md +10 -7
- package/package.json +7 -7
- package/build/cjs/chunk-D565X4TE.cjs.map +0 -1
- package/build/cjs/chunk-FWZS3WQ4.cjs.map +0 -1
- package/build/cjs/chunk-MIC4N6XX.cjs +0 -11
- package/build/cjs/chunk-NNRUPDXI.cjs +0 -11
- package/build/cjs/chunk-Q2AQ5TDJ.cjs +0 -11
- package/build/cjs/chunk-S4PGPP6D.cjs +0 -11
- package/build/cjs/chunk-U4NJ4WIE.cjs +0 -11
package/docs/Prerequisites.md
CHANGED
|
@@ -4,31 +4,28 @@ sidebar_position: 1
|
|
|
4
4
|
|
|
5
5
|
# Prerequisites
|
|
6
6
|
|
|
7
|
-
Setup required before using `@osdk/react-components
|
|
7
|
+
Setup required before using `@osdk/react-components`.
|
|
8
8
|
|
|
9
9
|
## Install dependencies
|
|
10
10
|
|
|
11
11
|
> **Tip:** If your tooling already installs dependencies, skip this step.
|
|
12
12
|
|
|
13
|
-
Use whichever package manager your project uses
|
|
13
|
+
Use whichever package manager your project uses:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# npm
|
|
17
|
-
npm install @osdk/api
|
|
17
|
+
npm install @osdk/api @osdk/client @osdk/react
|
|
18
18
|
npm install @osdk/react-components
|
|
19
|
-
npm install @osdk/cbac-components # if using CBAC components
|
|
20
19
|
npm install react react-dom classnames
|
|
21
20
|
|
|
22
21
|
# pnpm
|
|
23
|
-
pnpm add @osdk/api
|
|
22
|
+
pnpm add @osdk/api @osdk/client @osdk/react
|
|
24
23
|
pnpm add @osdk/react-components
|
|
25
|
-
pnpm add @osdk/cbac-components # if using CBAC components
|
|
26
24
|
pnpm add react react-dom classnames
|
|
27
25
|
|
|
28
26
|
# yarn
|
|
29
|
-
yarn add @osdk/api
|
|
27
|
+
yarn add @osdk/api @osdk/client @osdk/react
|
|
30
28
|
yarn add @osdk/react-components
|
|
31
|
-
yarn add @osdk/cbac-components # if using CBAC components
|
|
32
29
|
yarn add react react-dom classnames
|
|
33
30
|
```
|
|
34
31
|
|
|
@@ -71,35 +68,28 @@ Apply this to your root element. See the [Base UI docs](https://base-ui.com/reac
|
|
|
71
68
|
|
|
72
69
|
### Layers
|
|
73
70
|
|
|
74
|
-
|
|
71
|
+
Import the component styles into a CSS [`@layer`](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer) in your application's entry CSS file (e.g., `index.css`). Using a layer keeps the cascade predictable: later layers always win when styles conflict, regardless of selector specificity, so your own styles and theme overrides take precedence over the defaults.
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
| ----------------- | ---------------------------------------------------------- |
|
|
78
|
-
| `osdk.tokens` | Design tokens (colors, spacing, typography) — the defaults |
|
|
79
|
-
| `osdk.components` | Component structural styles (layout, borders, sizing) |
|
|
80
|
-
|
|
81
|
-
Later layers always win when styles conflict, regardless of selector specificity.
|
|
73
|
+
The examples below import the styles into a layer named `osdk.components`; declare any of your own layers after it to override.
|
|
82
74
|
|
|
83
75
|
#### Without Tailwind
|
|
84
76
|
|
|
85
77
|
```css
|
|
86
78
|
/* index.css */
|
|
87
|
-
@layer osdk.components
|
|
79
|
+
@layer osdk.components;
|
|
88
80
|
|
|
89
81
|
@import "@osdk/react-components/styles.css" layer(osdk.components);
|
|
90
|
-
@import "@osdk/cbac-components/styles.css" layer(cbac.components); /* only needed if using CBAC components */
|
|
91
82
|
```
|
|
92
83
|
|
|
93
84
|
#### With Tailwind CSS v4
|
|
94
85
|
|
|
95
86
|
```css
|
|
96
87
|
/* index.css */
|
|
97
|
-
@layer tailwind, osdk.components
|
|
88
|
+
@layer tailwind, osdk.components;
|
|
98
89
|
|
|
99
90
|
@import "tailwindcss" layer(tailwind);
|
|
100
91
|
|
|
101
92
|
@import "@osdk/react-components/styles.css" layer(osdk.components);
|
|
102
|
-
@import "@osdk/cbac-components/styles.css" layer(cbac.components); /* only needed if using CBAC components */
|
|
103
93
|
```
|
|
104
94
|
|
|
105
95
|
#### Custom theme overrides
|
|
@@ -110,7 +100,6 @@ Add a custom layer after the OSDK layers to override any token:
|
|
|
110
100
|
@layer osdk.components, user.brand;
|
|
111
101
|
|
|
112
102
|
@import "@osdk/react-components/styles.css" layer(osdk.components);
|
|
113
|
-
@import "@osdk/cbac-components/styles.css" layer(cbac.components); /* only needed if using CBAC components */
|
|
114
103
|
@import "./user-brand.css" layer(user.brand);
|
|
115
104
|
```
|
|
116
105
|
|
|
@@ -119,7 +108,7 @@ Add a custom layer after the OSDK layers to override any token:
|
|
|
119
108
|
All components resolve their visual properties through CSS custom properties. There are two scopes of tokens you can target when theming:
|
|
120
109
|
|
|
121
110
|
- **OSDK tokens (`--osdk-*`)** — every visual property used inside OSDK components resolves through a token prefixed with `--osdk-` (e.g. `--osdk-table-header-bg`, `--osdk-form-section-padding`). Override these to theme **OSDK components only**, leaving other Blueprint components in your app untouched.
|
|
122
|
-
- **Blueprint tokens (`--bp-*`)** — the underlying Blueprint design tokens that `--osdk-*` tokens map to. Override these for consistent theming across **both Blueprint and OSDK components**.
|
|
111
|
+
- **Blueprint tokens (`--bp-*`)** — the underlying Blueprint design tokens that most `--osdk-*` tokens map to. Override these for consistent theming across **both Blueprint and OSDK components**. (A few `--osdk-*` tokens hold raw values rather than mapping to a `--bp-*` token — override those `--osdk-*` tokens directly.)
|
|
123
112
|
|
|
124
113
|
Per-component references list the `--osdk-*` variables each component exposes — see, for example, [ObjectTable › Theming](./ObjectTable.md#theming). The full catalog of variables lives in [CSSVariables.md](./CSSVariables.md).
|
|
125
114
|
|
package/docs/StylingOverview.md
CHANGED
|
@@ -28,9 +28,9 @@ inherited from `@blueprintjs/core`.
|
|
|
28
28
|
|
|
29
29
|
### Layer 2: OSDK Tokens
|
|
30
30
|
|
|
31
|
-
OSDK tokens (`--osdk-*`) map to Blueprint tokens by default
|
|
32
|
-
|
|
33
|
-
your app.
|
|
31
|
+
Most OSDK tokens (`--osdk-*`) map to Blueprint tokens by default; a few hold
|
|
32
|
+
raw values instead (e.g. opacities and cursors). Override these to theme OSDK
|
|
33
|
+
components **without** affecting other Blueprint components in your app.
|
|
34
34
|
|
|
35
35
|
```css
|
|
36
36
|
:root {
|
|
@@ -121,10 +121,13 @@ design-system provider), pass `theme` instead of `defaultTheme`:
|
|
|
121
121
|
| `--osdk-*` | Theme only OSDK components, leave Blueprint unchanged |
|
|
122
122
|
| `--osdk-<component>-*` | Customize a single component |
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
Most `--osdk-*` tokens map to a `--bp-*` token by default (a handful — e.g.
|
|
125
|
+
`--osdk-disabled-opacity`, `--osdk-drag-handle-cursor` — hold raw values
|
|
126
|
+
instead). If your app uses Blueprint components alongside OSDK components and
|
|
127
|
+
you want a consistent look, override the `--bp-*` tokens; for `--osdk-*` tokens
|
|
128
|
+
with no `--bp-*` backing, override the `--osdk-*` token directly. If you only
|
|
129
|
+
want to restyle OSDK components without affecting Blueprint, override the
|
|
130
|
+
`--osdk-*` tokens.
|
|
128
131
|
|
|
129
132
|
## Custom Themes
|
|
130
133
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -193,9 +193,9 @@
|
|
|
193
193
|
"xlsx-republish": "0.20.3"
|
|
194
194
|
},
|
|
195
195
|
"peerDependencies": {
|
|
196
|
-
"@osdk/api": "
|
|
197
|
-
"@osdk/client": "
|
|
198
|
-
"@osdk/react": "
|
|
196
|
+
"@osdk/api": ">=2.32.0-beta.0",
|
|
197
|
+
"@osdk/client": ">=2.32.0-beta.0",
|
|
198
|
+
"@osdk/react": ">=2.32.0-beta.0",
|
|
199
199
|
"@types/react": "^17 || ^18 || ^19",
|
|
200
200
|
"classnames": "^2.0.0",
|
|
201
201
|
"react": "^17 || ^18 || ^19",
|
|
@@ -213,11 +213,11 @@
|
|
|
213
213
|
"react": "^18.3.1",
|
|
214
214
|
"react-dom": "^18.3.1",
|
|
215
215
|
"typescript": "~5.5.4",
|
|
216
|
-
"@osdk/
|
|
217
|
-
"@osdk/
|
|
216
|
+
"@osdk/api": "2.32.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3",
|
|
217
|
+
"@osdk/client": "2.32.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3",
|
|
218
218
|
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
219
219
|
"@osdk/monorepo.tsconfig": "~0.7.0",
|
|
220
|
-
"@osdk/react": "2.
|
|
220
|
+
"@osdk/react": "2.32.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3"
|
|
221
221
|
},
|
|
222
222
|
"publishConfig": {
|
|
223
223
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/UserAgent.ts","../../src/util/withOsdkMetrics.ts"],"names":["useRegisterUserAgent","React"],"mappings":";;;;;;;;;;;;AAgBA,IAAM,kBAAA,GAAqB,yBAAyB,QAA2B,CAAA,CAAA;AACxE,SAAS,mBAAmB,aAAA,EAAe;AAChD,EAAA,OAAO,CAAA,EAAG,kBAAkB,CAAA,CAAA,EAAI,aAAa,CAAA,CAAA;AAC/C;;;ACKO,SAAS,eAAA,CAAgB,WAAW,IAAA,EAAM;AAC/C,EAAA,MAAM,UAAU,CAAA,KAAA,KAAS;AACvB,IAAAA,0BAAA,CAAqB,kBAAA,CAAmB,IAAI,CAAC,CAAA;AAC7C,IAAA,uBAAoBC,sBAAA,CAAM,aAAA,CAAc,SAAA,EAAW,KAAK,CAAA;AAAA,EAC1D,CAAA;AACA,EAAA,OAAA,CAAQ,WAAA,GAAc,mBAAmB,IAAI,CAAA,CAAA,CAAA;AAC7C,EAAA,OAAO,OAAA;AACT","file":"chunk-D565X4TE.cjs","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\nconst PACKAGE_USER_AGENT = `osdk-react-components/${process.env.PACKAGE_VERSION}`;\nexport function componentUserAgent(componentName) {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}","/*\n * Copyright 2026 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 { useRegisterUserAgent } from \"@osdk/react\";\nimport React from \"react\";\nimport { componentUserAgent } from \"./UserAgent.js\";\n\n// `any` is required: FunctionComponent defaults to FunctionComponent<{}> which\n// rejects components with required props. A generic P parameter doesn't help\n// because TS can't infer both P and C simultaneously from a single argument.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withOsdkMetrics(Component, name) {\n const Wrapped = props => {\n useRegisterUserAgent(componentUserAgent(name));\n return /*#__PURE__*/React.createElement(Component, props);\n };\n Wrapped.displayName = `withOsdkMetrics(${name})`;\n return Wrapped;\n}"]}
|