@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.
@@ -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
- > **Important:** Passing a `theme` to the `CanvasProvider` **will not** theme components in Modals
655
- > and Dialogs. You can either pass a `className` or define CSS variables at the root.
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
- **Before in v13**
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
- // When passing a theme to the Canvas Provider, the `usePopupStack` would grab the theme and generate a class to forward the theme to Modals and Dialogs. This would create a cascade barrier for any CSS variables deinfed at the root.
661
- <CanvasProvider theme={{canvas: {palette: {primary: {main: 'blue'}}}}}>
662
- <Modal>//... rest of modal code</Modal>
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
- **After in v14**
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
- // If you wish to still theme you application and Modals, you can either define the CSS variables at the root level of your application or define a className and pass it to the CanvasProvider.
670
- :root {
671
- --cnvs-brand-primary-base: blue;
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
- <Modal>//... rest of modal code</Modal>
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.0023-next.0",
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": "13b3abf5b4752be5738a78f3c37e31b6252077dc"
56
+ "gitHead": "f48e25e031c1287c7d5160ef76a8746fe726de1c"
57
57
  }