@emulsify/core 2.2.3 → 2.3.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/.storybook/preview.js +26 -0
- package/config/webpack/resolves.js +1 -0
- package/package.json +21 -21
package/.storybook/preview.js
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import { useEffect } from '@storybook/preview-api';
|
|
2
2
|
import Twig from 'twig';
|
|
3
3
|
import { setupTwig, fetchCSSFiles } from './utils.js';
|
|
4
|
+
import { getRules } from "axe-core";
|
|
4
5
|
|
|
5
6
|
// If in a Drupal project, it's recommended to import a symlinked version of drupal.js.
|
|
6
7
|
import './_drupal.js';
|
|
7
8
|
|
|
9
|
+
function enableRulesByTag(tags = []) {
|
|
10
|
+
const allRules = getRules();
|
|
11
|
+
return allRules.map(rule =>
|
|
12
|
+
tags.some(t => rule.tags.includes(t)) ? { id: rule.ruleId, enabled: true } : { id: rule.ruleId, enabled: false }
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const AxeRules = enableRulesByTag([
|
|
17
|
+
"wcag2a",
|
|
18
|
+
"wcag2aa",
|
|
19
|
+
"wcag21a",
|
|
20
|
+
"wcag21aa",
|
|
21
|
+
"wcag22aa",
|
|
22
|
+
"best-practice",
|
|
23
|
+
]);
|
|
24
|
+
|
|
8
25
|
export const decorators = [
|
|
9
26
|
(Story, { args }) => {
|
|
10
27
|
const { renderAs } = args || {};
|
|
@@ -22,4 +39,13 @@ fetchCSSFiles();
|
|
|
22
39
|
|
|
23
40
|
export const parameters = {
|
|
24
41
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
42
|
+
a11y: {
|
|
43
|
+
config: {
|
|
44
|
+
detailedReport: true,
|
|
45
|
+
detailedReportOptions: {
|
|
46
|
+
html: true,
|
|
47
|
+
},
|
|
48
|
+
rules: AxeRules,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
25
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emulsify/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Bundled tooling for Storybook development + Webpack Build",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component library",
|
|
@@ -46,21 +46,21 @@
|
|
|
46
46
|
"twatch": "jest --no-coverage --watch --verbose"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@babel/core": "^7.25.
|
|
50
|
-
"@babel/eslint-parser": "^7.25.
|
|
51
|
-
"@babel/preset-env": "^7.25.
|
|
49
|
+
"@babel/core": "^7.25.8",
|
|
50
|
+
"@babel/eslint-parser": "^7.25.8",
|
|
51
|
+
"@babel/preset-env": "^7.25.8",
|
|
52
52
|
"@emulsify/cli": "^1.11.0",
|
|
53
|
-
"@storybook/addon-a11y": "^8.3.
|
|
54
|
-
"@storybook/addon-actions": "^8.3.
|
|
55
|
-
"@storybook/addon-essentials": "^8.3.
|
|
56
|
-
"@storybook/addon-links": "^8.3.
|
|
53
|
+
"@storybook/addon-a11y": "^8.3.5",
|
|
54
|
+
"@storybook/addon-actions": "^8.3.5",
|
|
55
|
+
"@storybook/addon-essentials": "^8.3.5",
|
|
56
|
+
"@storybook/addon-links": "^8.3.5",
|
|
57
57
|
"@storybook/addon-styling-webpack": "^1.0.0",
|
|
58
|
-
"@storybook/addon-themes": "^8.3.
|
|
59
|
-
"@storybook/html": "^8.3.
|
|
60
|
-
"@storybook/html-webpack5": "^8.3.
|
|
61
|
-
"@storybook/manager-api": "^8.3.
|
|
62
|
-
"@storybook/preview-api": "^8.3.
|
|
63
|
-
"@storybook/theming": "^8.3.
|
|
58
|
+
"@storybook/addon-themes": "^8.3.5",
|
|
59
|
+
"@storybook/html": "^8.3.5",
|
|
60
|
+
"@storybook/html-webpack5": "^8.3.5",
|
|
61
|
+
"@storybook/manager-api": "^8.3.5",
|
|
62
|
+
"@storybook/preview-api": "^8.3.5",
|
|
63
|
+
"@storybook/theming": "^8.3.5",
|
|
64
64
|
"add-attributes-twig-extension": "^0.1.0",
|
|
65
65
|
"autoprefixer": "^10.4.20",
|
|
66
66
|
"babel-loader": "^9.2.1",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"image-minimizer-webpack-plugin": "^4.1.0",
|
|
89
89
|
"imagemin": "^9.0.0",
|
|
90
90
|
"imagemin-gifsicle": "^7.0.0",
|
|
91
|
-
"imagemin-jpegtran": "^
|
|
91
|
+
"imagemin-jpegtran": "^8.0.0",
|
|
92
92
|
"imagemin-optipng": "^8.0.0",
|
|
93
93
|
"jest": "^29.7.0",
|
|
94
94
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -106,11 +106,11 @@
|
|
|
106
106
|
"react": "^18.2.0",
|
|
107
107
|
"react-dom": "^18.2.0",
|
|
108
108
|
"regenerator-runtime": "^0.14.1",
|
|
109
|
-
"sass": "^1.
|
|
109
|
+
"sass": "^1.80.1",
|
|
110
110
|
"sass-loader": "^16.0.1",
|
|
111
111
|
"storybook": "^8.3.2",
|
|
112
|
-
"style-dictionary": "^4.1.
|
|
113
|
-
"stylelint": "^16.
|
|
112
|
+
"style-dictionary": "^4.1.3",
|
|
113
|
+
"stylelint": "^16.10.0",
|
|
114
114
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
115
115
|
"stylelint-prettier": "^5.0.0",
|
|
116
116
|
"stylelint-selector-bem-pattern": "^4.0.1",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"twig-drupal-filters": "^3.2.0",
|
|
121
121
|
"twig-testing-library": "^1.2.0",
|
|
122
122
|
"twigjs-loader": "^1.0.3",
|
|
123
|
-
"webpack": "^5.
|
|
123
|
+
"webpack": "^5.95.0",
|
|
124
124
|
"webpack-cli": "^5.1.4",
|
|
125
125
|
"webpack-merge": "^6.0.1",
|
|
126
126
|
"yaml": "^2.5.0"
|
|
@@ -131,11 +131,11 @@
|
|
|
131
131
|
"@semantic-release/changelog": "^6.0.2",
|
|
132
132
|
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
133
133
|
"@semantic-release/git": "^10.0.1",
|
|
134
|
-
"@semantic-release/github": "^
|
|
134
|
+
"@semantic-release/github": "^11.0.0",
|
|
135
135
|
"@semantic-release/release-notes-generator": "^14.0.0",
|
|
136
136
|
"husky": "^9.1.6",
|
|
137
137
|
"lint-staged": "^15.2.10",
|
|
138
|
-
"semantic-release": "^24.1.
|
|
138
|
+
"semantic-release": "^24.1.2"
|
|
139
139
|
},
|
|
140
140
|
"overrides": {
|
|
141
141
|
"graceful-fs": "^4.2.11"
|