@storybook/addon-a11y 10.2.0-alpha.1 → 10.2.0-alpha.2
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/_browser-chunks/{chunk-CQ2APV2R.js → chunk-KJORJJOQ.js} +1 -1
- package/dist/_browser-chunks/{matchers-DMFSMG2O.js → matchers-5TDFFDYO.js} +6 -6
- package/dist/index.js +1 -1
- package/dist/manager.js +21 -21
- package/dist/postinstall.js +6 -6
- package/dist/preview.js +1 -1
- package/package.json +2 -6
|
@@ -128,7 +128,7 @@ var vitestMatchersExtended = !1, afterEach = async ({
|
|
|
128
128
|
status: hasViolations ? getMode() : "passed"
|
|
129
129
|
}), getIsVitestStandaloneRun() && hasViolations && getMode() === "failed") {
|
|
130
130
|
if (!vitestMatchersExtended) {
|
|
131
|
-
let { toHaveNoViolations } = await import("./matchers-
|
|
131
|
+
let { toHaveNoViolations } = await import("./matchers-5TDFFDYO.js");
|
|
132
132
|
expect.extend({ toHaveNoViolations }), vitestMatchersExtended = !0;
|
|
133
133
|
}
|
|
134
134
|
expect(result).toHaveNoViolations();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./chunk-4BE7D4DS.js";
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// ../../../node_modules/vitest-axe/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
4
4
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles = {
|
|
5
5
|
modifier: {
|
|
6
6
|
reset: [0, 0],
|
|
@@ -140,7 +140,7 @@ function assembleStyles() {
|
|
|
140
140
|
}
|
|
141
141
|
var ansiStyles = assembleStyles(), ansi_styles_default = ansiStyles;
|
|
142
142
|
|
|
143
|
-
//
|
|
143
|
+
// ../../../node_modules/vitest-axe/node_modules/chalk/source/vendor/supports-color/browser.js
|
|
144
144
|
var level = (() => {
|
|
145
145
|
if (!("navigator" in globalThis))
|
|
146
146
|
return 0;
|
|
@@ -160,7 +160,7 @@ var level = (() => {
|
|
|
160
160
|
stderr: colorSupport
|
|
161
161
|
}, browser_default = supportsColor;
|
|
162
162
|
|
|
163
|
-
//
|
|
163
|
+
// ../../../node_modules/vitest-axe/node_modules/chalk/source/utilities.js
|
|
164
164
|
function stringReplaceAll(string, substring, replacer) {
|
|
165
165
|
let index = string.indexOf(substring);
|
|
166
166
|
if (index === -1)
|
|
@@ -183,7 +183,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
183
183
|
return returnValue += string.slice(endIndex), returnValue;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
//
|
|
186
|
+
// ../../../node_modules/vitest-axe/node_modules/chalk/source/index.js
|
|
187
187
|
var { stdout: stdoutColor, stderr: stderrColor } = browser_default, GENERATOR = Symbol("GENERATOR"), STYLER = Symbol("STYLER"), IS_EMPTY = Symbol("IS_EMPTY"), levelMapping = [
|
|
188
188
|
"ansi",
|
|
189
189
|
"ansi",
|
|
@@ -280,7 +280,7 @@ Object.defineProperties(createChalk.prototype, styles2);
|
|
|
280
280
|
var chalk = createChalk(), chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
281
281
|
var source_default = chalk;
|
|
282
282
|
|
|
283
|
-
//
|
|
283
|
+
// ../../../node_modules/vitest-axe/dist/chunk-X4FZIUYL.js
|
|
284
284
|
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJS = (cb, mod) => function() {
|
|
285
285
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
286
286
|
}, __copyProps = (to, from, except, desc) => {
|
|
@@ -1232,7 +1232,7 @@ function matcherHint(matcherName, received = "received", expected = "expected",
|
|
|
1232
1232
|
return !isDirectExpectCall && received !== "" && (hint += DIM_COLOR(`${dimString}(`) + receivedColor(received), dimString = ")"), promise !== "" && (hint += DIM_COLOR(`${dimString}.`) + promise, dimString = ""), isNot && (hint += `${DIM_COLOR(`${dimString}.`)}not`, dimString = ""), matcherName.includes(".") ? dimString += matcherName : (hint += DIM_COLOR(`${dimString}.`) + matcherName, dimString = ""), expected === "" ? dimString += "()" : (hint += DIM_COLOR(`${dimString}(`) + expectedColor(expected), secondArgument && (hint += DIM_COLOR(", ") + secondArgumentColor(secondArgument)), dimString = ")"), comment !== "" && (dimString += ` // ${comment}`), dimString !== "" && (hint += DIM_COLOR(dimString)), hint;
|
|
1233
1233
|
}
|
|
1234
1234
|
|
|
1235
|
-
//
|
|
1235
|
+
// ../../../node_modules/vitest-axe/dist/matchers.js
|
|
1236
1236
|
function toHaveNoViolations(results) {
|
|
1237
1237
|
if (typeof results.violations > "u")
|
|
1238
1238
|
throw new Error("No violations found in aXe results object");
|
package/dist/index.js
CHANGED
package/dist/manager.js
CHANGED
|
@@ -871,7 +871,7 @@ import React2, { Fragment, useCallback as useCallback2, useState as useState3 }
|
|
|
871
871
|
import { Button, Link, SyntaxHighlighter } from "storybook/internal/components";
|
|
872
872
|
import { CheckIcon, CopyIcon, LocationIcon } from "@storybook/icons";
|
|
873
873
|
|
|
874
|
-
//
|
|
874
|
+
// ../../../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
875
875
|
function _extends() {
|
|
876
876
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
877
877
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -882,17 +882,17 @@ function _extends() {
|
|
|
882
882
|
}, _extends.apply(null, arguments);
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
//
|
|
885
|
+
// ../../../node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
886
886
|
import { forwardRef as $1IHzk$forwardRef, createElement as $1IHzk$createElement, useRef as $1IHzk$useRef, useEffect as $1IHzk$useEffect } from "react";
|
|
887
887
|
|
|
888
|
-
//
|
|
888
|
+
// ../../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
889
889
|
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = !0 } = {}) {
|
|
890
890
|
return function(event) {
|
|
891
891
|
if (originalEventHandler?.(event), checkForDefaultPrevented === !1 || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
|
|
895
|
-
//
|
|
895
|
+
// ../../../node_modules/@radix-ui/react-context/dist/index.mjs
|
|
896
896
|
import { createContext as $3bkAK$createContext, useMemo as $3bkAK$useMemo, createElement as $3bkAK$createElement, useContext as $3bkAK$useContext } from "react";
|
|
897
897
|
function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
898
898
|
let defaultContexts = [];
|
|
@@ -976,13 +976,13 @@ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
|
976
976
|
return createScope1.scopeName = baseScope.scopeName, createScope1;
|
|
977
977
|
}
|
|
978
978
|
|
|
979
|
-
//
|
|
979
|
+
// ../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
980
980
|
import { forwardRef as $98Iye$forwardRef, createElement as $98Iye$createElement, useRef as $98Iye$useRef, useState as $98Iye$useState, useEffect as $98Iye$useEffect, useCallback as $98Iye$useCallback } from "react";
|
|
981
981
|
|
|
982
|
-
//
|
|
982
|
+
// ../../../node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
983
983
|
import $6vYhU$react from "react";
|
|
984
984
|
|
|
985
|
-
//
|
|
985
|
+
// ../../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
986
986
|
import { useCallback as $3vqmr$useCallback } from "react";
|
|
987
987
|
function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
988
988
|
typeof ref == "function" ? ref(value) : ref != null && (ref.current = value);
|
|
@@ -996,7 +996,7 @@ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
|
996
996
|
return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
997
997
|
}
|
|
998
998
|
|
|
999
|
-
//
|
|
999
|
+
// ../../../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
1000
1000
|
import { forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment } from "react";
|
|
1001
1001
|
var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = $9IrjX$forwardRef((props, forwardedRef) => {
|
|
1002
1002
|
let { children, ...slotProps } = props, childrenArray = $9IrjX$Children.toArray(children), slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
@@ -1045,7 +1045,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
|
-
//
|
|
1048
|
+
// ../../../node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
1049
1049
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
1050
1050
|
let PROVIDER_NAME = name + "CollectionProvider", [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME), [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
1051
1051
|
collectionRef: {
|
|
@@ -1110,15 +1110,15 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
1110
1110
|
];
|
|
1111
1111
|
}
|
|
1112
1112
|
|
|
1113
|
-
//
|
|
1113
|
+
// ../../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1114
1114
|
import * as $2AODx$react from "react";
|
|
1115
1115
|
|
|
1116
|
-
//
|
|
1116
|
+
// ../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
1117
1117
|
import { useLayoutEffect as $dxlwH$useLayoutEffect } from "react";
|
|
1118
1118
|
var $9f79659886946c16$export$e5c5a5f917a5871c = globalThis?.document ? $dxlwH$useLayoutEffect : () => {
|
|
1119
1119
|
};
|
|
1120
1120
|
|
|
1121
|
-
//
|
|
1121
|
+
// ../../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1122
1122
|
var $1746a345f3d73bb7$var$useReactId = $2AODx$react.useId || (() => {
|
|
1123
1123
|
}), $1746a345f3d73bb7$var$count = 0;
|
|
1124
1124
|
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
@@ -1132,11 +1132,11 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
|
1132
1132
|
]), deterministicId || (id ? `radix-${id}` : "");
|
|
1133
1133
|
}
|
|
1134
1134
|
|
|
1135
|
-
//
|
|
1135
|
+
// ../../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1136
1136
|
import { forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement } from "react";
|
|
1137
1137
|
import { flushSync as $4q5Fq$flushSync } from "react-dom";
|
|
1138
1138
|
|
|
1139
|
-
//
|
|
1139
|
+
// ../../../node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
1140
1140
|
import { forwardRef as $9IrjX$forwardRef2, Children as $9IrjX$Children2, isValidElement as $9IrjX$isValidElement2, createElement as $9IrjX$createElement2, cloneElement as $9IrjX$cloneElement2, Fragment as $9IrjX$Fragment2 } from "react";
|
|
1141
1141
|
var $5e63c961fc1ce211$export$8c6ed5c666ac13602 = $9IrjX$forwardRef2((props, forwardedRef) => {
|
|
1142
1142
|
let { children, ...slotProps } = props, childrenArray = $9IrjX$Children2.toArray(children), slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable2);
|
|
@@ -1185,7 +1185,7 @@ function $5e63c961fc1ce211$var$mergeProps2(slotProps, childProps) {
|
|
|
1185
1185
|
};
|
|
1186
1186
|
}
|
|
1187
1187
|
|
|
1188
|
-
//
|
|
1188
|
+
// ../../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
1189
1189
|
var $8927f6f2acc4f386$var$NODES = [
|
|
1190
1190
|
"a",
|
|
1191
1191
|
"button",
|
|
@@ -1218,7 +1218,7 @@ var $8927f6f2acc4f386$var$NODES = [
|
|
|
1218
1218
|
};
|
|
1219
1219
|
}, {});
|
|
1220
1220
|
|
|
1221
|
-
//
|
|
1221
|
+
// ../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
1222
1222
|
import { useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo } from "react";
|
|
1223
1223
|
function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
1224
1224
|
let callbackRef = $lwiWj$useRef(callback);
|
|
@@ -1233,7 +1233,7 @@ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
|
1233
1233
|
);
|
|
1234
1234
|
}
|
|
1235
1235
|
|
|
1236
|
-
//
|
|
1236
|
+
// ../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
1237
1237
|
import { useCallback as $bnPw9$useCallback, useState as $bnPw9$useState, useRef as $bnPw9$useRef, useEffect as $bnPw9$useEffect } from "react";
|
|
1238
1238
|
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop, defaultProp, onChange = () => {
|
|
1239
1239
|
} }) {
|
|
@@ -1267,7 +1267,7 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
|
|
|
1267
1267
|
]), uncontrolledState;
|
|
1268
1268
|
}
|
|
1269
1269
|
|
|
1270
|
-
//
|
|
1270
|
+
// ../../../node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
1271
1271
|
import { createContext as $7Gjcd$createContext, createElement as $7Gjcd$createElement, useContext as $7Gjcd$useContext } from "react";
|
|
1272
1272
|
var $f631663db3294ace$var$DirectionContext = $7Gjcd$createContext(void 0);
|
|
1273
1273
|
function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
@@ -1275,7 +1275,7 @@ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
|
1275
1275
|
return localDir || globalDir || "ltr";
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
|
-
//
|
|
1278
|
+
// ../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
1279
1279
|
var $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus", $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
1280
1280
|
bubbles: !1,
|
|
1281
1281
|
cancelable: !0
|
|
@@ -1463,7 +1463,7 @@ function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
var $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338, $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
|
|
1465
1465
|
|
|
1466
|
-
//
|
|
1466
|
+
// ../../../node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
1467
1467
|
import { Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer } from "react";
|
|
1468
1468
|
import { flushSync as $iqq3r$flushSync } from "react-dom";
|
|
1469
1469
|
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
|
|
@@ -1541,7 +1541,7 @@ function $921a889cee6df7e8$var$getAnimationName(styles) {
|
|
|
1541
1541
|
return styles?.animationName || "none";
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
1544
|
-
//
|
|
1544
|
+
// ../../../node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
1545
1545
|
var $69cb30bb0017df05$var$TABS_NAME = "Tabs", [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($69cb30bb0017df05$var$TABS_NAME, [
|
|
1546
1546
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
1547
1547
|
]), $69cb30bb0017df05$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4(), [$69cb30bb0017df05$var$TabsProvider, $69cb30bb0017df05$var$useTabsContext] = $69cb30bb0017df05$var$createTabsContext($69cb30bb0017df05$var$TABS_NAME), $69cb30bb0017df05$export$b2539bed5023c21c = $1IHzk$forwardRef((props, forwardedRef) => {
|
package/dist/postinstall.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_bmef9otzihm from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_bmef9otzihm from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_bmef9otzihm from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_bmef9otzihm.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bmef9otzihm.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_bmef9otzihm.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preview.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-a11y",
|
|
3
|
-
"version": "10.2.0-alpha.
|
|
3
|
+
"version": "10.2.0-alpha.2",
|
|
4
4
|
"description": "Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"a11y",
|
|
@@ -54,10 +54,6 @@
|
|
|
54
54
|
"*.d.ts",
|
|
55
55
|
"!src/**/*"
|
|
56
56
|
],
|
|
57
|
-
"scripts": {
|
|
58
|
-
"check": "jiti ../../../scripts/check/check-package.ts",
|
|
59
|
-
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
60
|
-
},
|
|
61
57
|
"dependencies": {
|
|
62
58
|
"@storybook/global": "^5.0.0",
|
|
63
59
|
"axe-core": "^4.2.0"
|
|
@@ -74,7 +70,7 @@
|
|
|
74
70
|
"vitest-axe": "^0.1.0"
|
|
75
71
|
},
|
|
76
72
|
"peerDependencies": {
|
|
77
|
-
"storybook": "^10.2.0-alpha.
|
|
73
|
+
"storybook": "^10.2.0-alpha.2"
|
|
78
74
|
},
|
|
79
75
|
"publishConfig": {
|
|
80
76
|
"access": "public"
|