@workday/canvas-kit-mcp 15.0.0-alpha.0023-next.0 → 15.0.0-alpha.0032-next.0
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/cli.js +71 -14549
- package/dist/cli.js.map +4 -4
- package/dist/index.js +69 -14456
- package/dist/index.js.map +4 -4
- package/dist/lib/upgrade-guides/14.0-UPGRADE-GUIDE.md +24 -13
- package/package.json +3 -3
|
@@ -651,29 +651,40 @@ instead.
|
|
|
651
651
|
Previously, the `usePopupStack` hook created a CSS class name that was passed to our Popups. We attached those theme styles to that class name. This allowed the theme to be available in our Popups. But it also created a cascade barrier that blocked the global theme from being applied to our Popup components.
|
|
652
652
|
Because we now use global CSS variables, we no longer need this class name to provide the global theme to Popups. But we have to remove this generated class name to allow the global theme to be applied to Popups.
|
|
653
653
|
|
|
654
|
-
|
|
655
|
-
|
|
654
|
+
If you want to have scoped theming where a part of your application needs different theming, you can
|
|
655
|
+
still do this via the `theme` prop.
|
|
656
656
|
|
|
657
|
-
**
|
|
657
|
+
> **Note:** Only the properties of the theme object that are changed will be forward to popups and
|
|
658
|
+
> modals. IE, if you change theme.palette.primary.main, only those tokens will change for popups and
|
|
659
|
+
> modals.
|
|
660
|
+
|
|
661
|
+
#### Scoped Theming vs Global Theming
|
|
662
|
+
|
|
663
|
+
**Only** use the `theme` prop on the `CanvasProvider` if you intentionally want to theme part of
|
|
664
|
+
your application that is different from global theming.
|
|
665
|
+
|
|
666
|
+
**Scoped Theming**
|
|
658
667
|
|
|
659
668
|
```tsx
|
|
660
|
-
|
|
661
|
-
<CanvasProvider theme={{canvas: {palette: {primary: {main: '
|
|
662
|
-
|
|
669
|
+
|
|
670
|
+
<CanvasProvider theme={{canvas: {palette: {primary: {main: 'teal'}}}}}>
|
|
671
|
+
{//part of your app to have different theme from the rest of your application}
|
|
663
672
|
</CanvasProvider>
|
|
664
673
|
```
|
|
665
674
|
|
|
666
|
-
**
|
|
675
|
+
> **Important:** Use the `theme` prop on the `CanvasProvider` if you intentionally want to theme
|
|
676
|
+
> part of your application that is different from global theming.
|
|
677
|
+
|
|
678
|
+
**Global Theming**
|
|
667
679
|
|
|
668
680
|
```tsx
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
}
|
|
681
|
+
import '@workday/canvas-tokens-web/css/base/_variables.css';
|
|
682
|
+
import '@workday/canvas-tokens-web/css/brand/_variables.css';
|
|
683
|
+
import '@workday/canvas-tokens-web/css/system/_variables.css';
|
|
673
684
|
|
|
674
685
|
<CanvasProvider>
|
|
675
|
-
<
|
|
676
|
-
</CanvasProvider
|
|
686
|
+
<App />
|
|
687
|
+
</CanvasProvider>;
|
|
677
688
|
```
|
|
678
689
|
### Search Form (Labs) 🚨
|
|
679
690
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-mcp",
|
|
3
|
-
"version": "15.0.0-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.0032-next.0",
|
|
4
4
|
"description": "MCP package for Canvas Kit",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build:copy": "tsx ./build/index.ts",
|
|
34
34
|
"build:types": "tsc --project tsconfig.build.json -d true --declarationDir dist/types --emitDeclarationOnly --pretty",
|
|
35
|
-
"build:mcp": "esbuild lib/index.ts --bundle --platform=node --outfile=dist/index.js --format=esm --sourcemap && esbuild lib/cli.ts --bundle --platform=node --outfile=dist/cli.js --format=esm --sourcemap",
|
|
35
|
+
"build:mcp": "esbuild lib/index.ts --bundle --platform=node --packages=external --outfile=dist/index.js --format=esm --sourcemap && esbuild lib/cli.ts --bundle --platform=node --packages=external --outfile=dist/cli.js --format=esm --sourcemap",
|
|
36
36
|
"build": "npm-run-all build:copy build:types build:mcp",
|
|
37
37
|
"clean": "rimraf dist && rimraf .build-info && mkdirp dist"
|
|
38
38
|
},
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"tsx": "^4.7.0",
|
|
54
54
|
"typescript": "5.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "f48e25e031c1287c7d5160ef76a8746fe726de1c"
|
|
57
57
|
}
|