@workday/canvas-kit-mcp 14.1.22 → 14.1.24

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.
@@ -656,29 +656,40 @@ our Popup components. Because we now use global CSS variables, we no longer need
656
656
  provide the global theme to Popups. But we have to remove this generated class name to allow the
657
657
  global theme to be applied to Popups.
658
658
 
659
- > **Important:** Passing a `theme` to the `CanvasProvider` **will not** theme components in Modals
660
- > and Dialogs. You can either pass a `className` or define CSS variables at the root.
659
+ If you want to have scoped theming where a part of your application needs different theming, you can
660
+ still do this via the `theme` prop.
661
661
 
662
- **Before in v13**
662
+ > **Note:** Only the properties of the theme object that are changed will be forward to popups and
663
+ > modals. IE, if you change theme.palette.primary.main, only those tokens will change for popups and
664
+ > modals.
665
+
666
+ #### Scoped Theming vs Global Theming
667
+
668
+ **Only** use the `theme` prop on the `CanvasProvider` if you intentionally want to theme part of
669
+ your application that is different from global theming.
670
+
671
+ **Scoped Theming**
663
672
 
664
673
  ```tsx
665
- // 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.
666
- <CanvasProvider theme={{canvas: {palette: {primary: {main: 'blue'}}}}}>
667
- <Modal>//... rest of modal code</Modal>
674
+
675
+ <CanvasProvider theme={{canvas: {palette: {primary: {main: 'teal'}}}}}>
676
+ {//part of your app to have different theme from the rest of your application}
668
677
  </CanvasProvider>
669
678
  ```
670
679
 
671
- **After in v14**
680
+ > **Important:** Use the `theme` prop on the `CanvasProvider` if you intentionally want to theme
681
+ > part of your application that is different from global theming.
682
+
683
+ **Global Theming**
672
684
 
673
685
  ```tsx
674
- // 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.
675
- :root {
676
- --cnvs-brand-primary-base: blue;
677
- }
686
+ import '@workday/canvas-tokens-web/css/base/_variables.css';
687
+ import '@workday/canvas-tokens-web/css/brand/_variables.css';
688
+ import '@workday/canvas-tokens-web/css/system/_variables.css';
678
689
 
679
690
  <CanvasProvider>
680
- <Modal>//... rest of modal code</Modal>
681
- </CanvasProvider>
691
+ <App />
692
+ </CanvasProvider>;
682
693
  ```
683
694
 
684
695
  ### Search Form (Labs) 🚨
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-mcp",
3
- "version": "14.1.22",
3
+ "version": "14.1.24",
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": "273b5b7c15dc99ca2a27321118c0103ac07b55d4"
56
+ "gitHead": "35bb7034fcd217a0f9afae7aa95aaf95853381fc"
57
57
  }