Skip to content

Commit faf3b0c

Browse files
Merge branch 'develop' into feature/reusableRuleBlocks-CMEM-1590
2 parents a4b4122 + 6ac22fa commit faf3b0c

29 files changed

Lines changed: 1042 additions & 1742 deletions

File tree

.github/workflows/push-tagged-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
- uses: actions/setup-node@main
3838
with:
3939
node-version: "lts/krypton"
40-
registry-url: "https://registry.npmjs.org"
4140
- name: Set name vars
4241
id: info-vars
4342
run: |
@@ -68,6 +67,11 @@ jobs:
6867
token: ${{ secrets.GITHUB_TOKEN }}
6968
projectToken: ${{ secrets.chromaticToken }}
7069
exitZeroOnChanges: true
70+
- uses: actions/setup-node@main
71+
with:
72+
node-version: "lts/krypton"
73+
registry-url: "https://registry.npmjs.org"
74+
package-manager-cache: false
7175
- name: Publish npm package
7276
run: yarn publish --access public
7377
env:

.storybook/main.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
const sass = require("sass");
22
const path = require("path");
33
const sassRenderSyncConfig = require("./../scripts/sassConfig");
4+
const { silenceDeprecations } = require("../scripts/sassDeprecationConfig");
45

56
module.exports = {
67
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
78
addons: [
89
"@storybook/addon-links",
9-
"@storybook/addon-essentials",
10-
"@storybook/addon-jest",
10+
"@storybook/addon-docs",
11+
"@storybook/addon-a11y",
1112
{
1213
name: "@storybook/preset-scss",
1314
options: {
1415
sassLoaderOptions: {
1516
implementation: sass,
16-
sassOptions: sassRenderSyncConfig,
17+
sassOptions: {...sassRenderSyncConfig, silenceDeprecations},
1718
},
1819
},
1920
},
@@ -98,7 +99,4 @@ module.exports = {
9899
};
99100
return config;
100101
},
101-
docs: {
102-
autodocs: true,
103-
},
104102
};

.storybook/preview.js

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,24 @@
1-
import { withTests } from "@storybook/addon-jest";
2-
31
import "./styles.scss";
42

5-
const getJestResults = () => {
6-
try {
7-
return require("../.jest-test-results.json");
8-
} catch (err) {
9-
return {};
10-
}
11-
};
12-
13-
const jestResults = getJestResults();
14-
15-
export const decorators = [
16-
withTests({
17-
results: jestResults,
18-
}),
19-
];
20-
213
export const parameters = {
224
options: {
235
storySort: {
246
order: ["Configuration", "Components", "Forms", "Extensions", "CMEM", "*"],
257
},
268
},
27-
actions: {
28-
argTypesRegex: "^on[A-Z].*",
29-
},
309
controls: {
3110
matchers: {
3211
color: /(background|color)$/i,
3312
date: /Date$/,
3413
},
3514
},
3615
};
16+
17+
const preview = {
18+
// Enables auto-generated documentation for all stories
19+
// @see https://storybook.js.org/docs/writing-docs/autodocs
20+
tags: ['autodocs'],
21+
parameters,
22+
};
23+
24+
export default preview;

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
3232
- **React and its types were updated to v18, so you may hit incompatibilities if you run it with React 16 or 17.**
3333
- `color` library was upgraded from v4 to v5, so the types changed
3434
- if you forward properties then they cannot have `Color` as type, use `ColorLike`
35+
- `@blueprintjs/core` library was updated to v6
36+
- you may need to update class names in your tests (the new prefix is `bp6-`)
37+
- `Toaster.create` is now an async function
3538
- `<MultiSelect />`
3639
- by default, if no searchPredicate or searchListPredicate is defined, the filtering is done via case-insensitive multi-word filtering.
3740

blueprint/toaster/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
export { Toaster as default } from "@blueprintjs/core";
1+
import { OverlayToaster } from "@blueprintjs/core";
2+
3+
/**
4+
* `OverlayToaster` from BlueprintJS, we still serve it as `Toaster`.
5+
* @deprecated (v27) will be completely removed.
6+
*/
7+
const Toaster = OverlayToaster;
8+
export { Toaster };
9+
export default Toaster;

package.json

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@
6868
"autolint:all": "yarn autolint:scripts && yarn autolint:styles && yarn autolint:prettier"
6969
},
7070
"dependencies": {
71-
"@blueprintjs/colors": "^5.1.11",
72-
"@blueprintjs/core": "^5.19.1",
73-
"@blueprintjs/select": "^5.3.21",
71+
"@blueprintjs/colors": "^5.1.16",
72+
"@blueprintjs/core": "6.8.1",
73+
"@blueprintjs/select": "6.1.1",
7474
"@carbon/icons": "^11.80.0",
7575
"@carbon/react": "^1.107.1",
7676
"@codemirror/lang-html": "^6.4.11",
@@ -120,16 +120,15 @@
120120
"@eslint/compat": "^2.1.0",
121121
"@eslint/eslintrc": "^3.3.5",
122122
"@eslint/js": "^10.0.1",
123-
"@storybook/addon-actions": "^8.6.14",
124-
"@storybook/addon-essentials": "^8.6.18",
125-
"@storybook/addon-jest": "^8.6.14",
126-
"@storybook/addon-links": "^8.6.14",
127-
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
128-
"@storybook/cli": "^8.6.18",
123+
"@storybook/addon-a11y": "^10.4.0",
124+
"@storybook/addon-docs": "^10.4.0",
125+
"@storybook/addon-links": "^10.4.0",
126+
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
127+
"@storybook/cli": "^10.4.0",
129128
"@storybook/preset-scss": "^1.0.3",
130-
"@storybook/react": "^8.6.18",
131-
"@storybook/react-webpack5": "^8.6.18",
132-
"@storybook/test": "^8.6.18",
129+
"@storybook/react": "^10.4.0",
130+
"@storybook/react-webpack5": "^10.4.0",
131+
"@testing-library/dom": "^10.4.1",
133132
"@testing-library/jest-dom": "^6.9.1",
134133
"@testing-library/react": "^16.3.2",
135134
"@types/he": "^1.2.3",
@@ -143,7 +142,7 @@
143142
"@typescript-eslint/eslint-plugin": "^8.59.3",
144143
"@typescript-eslint/parser": "^8.59.3",
145144
"babel-jest": "^30.4.1",
146-
"chromatic": "^13.3.4",
145+
"chromatic": "^16.10.1",
147146
"eslint": "^10.3.0",
148147
"eslint-plugin-react": "^7.37.5",
149148
"eslint-plugin-react-hooks": "^7.1.1",
@@ -164,7 +163,7 @@
164163
"rimraf": "^6.1.3",
165164
"sass": "^1.99.0",
166165
"sass-loader": "^16.0.8",
167-
"storybook": "^8.6.18",
166+
"storybook": "^10.4.0",
168167
"stylelint": "^17.11.0",
169168
"stylelint-config-recess-order": "^7.7.0",
170169
"stylelint-config-standard-scss": "^17.0.0",
@@ -176,17 +175,16 @@
176175
"yargs": "^18.0.0"
177176
},
178177
"peerDependencies": {
179-
"@blueprintjs/core": ">=5",
178+
"@blueprintjs/core": ">=6",
180179
"react": ">=18"
181180
},
182181
"resolutions": {
183-
"node-sass-package-importer/**/postcss": "^8.5.6",
182+
"**/@blueprintjs/core": "6.8.1",
183+
"node-sass-package-importer/**/postcss": "^8.5.10",
184184
"hast-util-from-parse5": "8.0.0",
185-
"**/lodash": "^4.18.0",
185+
"**/lodash": "^4.18.1",
186186
"**/minimatch": "^3.1.4",
187-
"**/tar": "^7.5.11",
188-
"**/fast-uri": "^3.1.2",
189-
"**/serialize-javascript": "^7.0.3"
187+
"**/serialize-javascript": "^7.0.5"
190188
},
191189
"husky": {
192190
"hooks": {

scripts/compile-sass.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import * as sass from "sass";
33
import yargs from "yargs";
44

55
import sassRenderSyncConfig from "./sassConfig";
6+
import { silenceDeprecations } from "./sassDeprecationConfig"
67

78
const args = yargs(process.argv.slice(2)).argv as any;
89

910
const styles = sass.renderSync({
1011
importer: tildeImporter(),
1112
...sassRenderSyncConfig,
12-
silenceDeprecations: ["import", "legacy-js-api"],
13+
silenceDeprecations: silenceDeprecations as sass.DeprecationOrId[],
1314
file: "src/index.scss",
1415
includePaths: ["node_modules"], // Carbon does not use tilde import syntax
1516
});

scripts/sassDeprecationConfig.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
silenceDeprecations: ["import", "legacy-js-api"],
3+
}

src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
Position,
88
} from "react-flow-renderer";
99
import { Meta, StoryFn } from "@storybook/react";
10-
import { fn } from "@storybook/test";
10+
import { fn } from "storybook/test";
1111
import {
1212
Background as BackgroundV12,
1313
BackgroundVariant as BackgroundVariantV12,

src/common/scss/_color-functions.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@
9292
}
9393

9494
@if $alpha > 0 {
95-
@return eccgui-color-mix($color 100% * $alpha, transparent);
95+
@if math.is-unitless($alpha) {
96+
$alpha: 100% * $alpha;
97+
}
98+
99+
@return eccgui-color-mix($color $alpha, transparent);
96100
} @else {
97101
// workaround: we need to prevent `0%` because it will reduced to `0` by some CSS minifiers and leads to invalid color-mix values
98102
@return eccgui-color-mix($color, transparent 100%);
@@ -102,6 +106,8 @@
102106
$debug-rgba-values: "yes";
103107

104108
/**
109+
* Overwrite SCSS built-in rgba function
110+
* TODO: we need to check if this is future proof, maybe this behaviour is not planned by Dart Sass library.
105111
* Split between rgba(red, green, blue, alpha) and rgba(color, alpha).
106112
*/
107113
@function rgba($r, $g, $b: "undefined", $a: 1) {
@@ -113,15 +119,14 @@ $debug-rgba-values: "yes";
113119
} @else {
114120
// rgba(r, g, b, a) is used -> rgb(r g b / a)
115121
// @see https://developer.mozilla.org/de/docs/Web/CSS/color_value/rgb
116-
$color-new-notation: rgb(#{$r} #{$g} #{$b} / #{$a});
122+
$color-new-notation: #{"rgb(" + $r + " " + $g + " " + $b + " / " + $a + ")"};
117123

118124
@return $color-new-notation;
119125
}
120126
}
121127

122128
/**
123-
* Overwrite SCSS built-in rgba function to support colors by custom properties and CSS color methods.
124-
* TODO: we need to check if this is future proof, maybe this bahaviour is not planned by Dart Sass library.
129+
* Support colors by custom properties and CSS color methods.
125130
*/
126131
@function rgba-extended($color, $alpha) {
127132
@if meta.type-of($color) == "color" {

0 commit comments

Comments
 (0)