@storybook/addon-a11y 11.0.0-alpha.8 → 11.0.0-alpha.9

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.
@@ -147,9 +147,19 @@ var vitestMatchersExtended = !1, decorators = [withVisionSimulator], afterEach =
147
147
  viewMode
148
148
  }) => {
149
149
  let a11yParameter = parameters2.a11y, a11yGlobals = globals.a11y, shouldRunEnvironmentIndependent = !!!globals.ghostStories && a11yParameter?.disable !== !0 && a11yParameter?.test !== "off" && a11yGlobals?.manual !== !0, getMode = () => a11yParameter?.test === "todo" ? "warning" : "failed";
150
- if (shouldRunEnvironmentIndependent && viewMode === "story")
150
+ if (shouldRunEnvironmentIndependent && viewMode === "story") {
151
+ let isStandalone = getIsVitestStandaloneRun();
151
152
  try {
152
- let result = await run(a11yParameter, storyId);
153
+ let result = await run(
154
+ isStandalone ? {
155
+ ...a11yParameter,
156
+ options: {
157
+ ...a11yParameter?.options,
158
+ resultTypes: a11yParameter?.options?.resultTypes ?? ["violations", "incomplete"]
159
+ }
160
+ } : a11yParameter,
161
+ storyId
162
+ );
153
163
  if (result) {
154
164
  let hasViolations = (result?.violations.length ?? 0) > 0;
155
165
  if (reporting.addReport({
@@ -157,7 +167,7 @@ var vitestMatchersExtended = !1, decorators = [withVisionSimulator], afterEach =
157
167
  version: 1,
158
168
  result,
159
169
  status: hasViolations ? getMode() : "passed"
160
- }), getIsVitestStandaloneRun() && hasViolations && getMode() === "failed") {
170
+ }), isStandalone && hasViolations && getMode() === "failed") {
161
171
  if (!vitestMatchersExtended) {
162
172
  let { toHaveNoViolations } = await import("./matchers-JIUQ3HVY.js");
163
173
  expect.extend({ toHaveNoViolations }), vitestMatchersExtended = !0;
@@ -173,9 +183,10 @@ var vitestMatchersExtended = !1, decorators = [withVisionSimulator], afterEach =
173
183
  error: e
174
184
  },
175
185
  status: "failed"
176
- }), getIsVitestStandaloneRun())
186
+ }), isStandalone)
177
187
  throw e;
178
188
  }
189
+ }
179
190
  }, initialGlobals = {
180
191
  a11y: {
181
192
  manual: !1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  preview_exports
3
- } from "./_browser-chunks/chunk-5WURYCET.js";
3
+ } from "./_browser-chunks/chunk-QBKJ62VS.js";
4
4
  import {
5
5
  PARAM_KEY
6
6
  } from "./_browser-chunks/chunk-QB47YQRA.js";
package/dist/manager.js CHANGED
@@ -21,7 +21,7 @@ import { addons, types, useAddonState as useAddonState2, useStorybookApi as useS
21
21
  import React6, { useMemo as useMemo3 } from "react";
22
22
  import { Badge as Badge2, Button as Button4 } from "storybook/internal/components";
23
23
  import { SyncIcon as SyncIcon2 } from "@storybook/icons";
24
- import { styled as styled5 } from "storybook/theming";
24
+ import { styled as styled5 } from "storybook/theming/emotion";
25
25
 
26
26
  // src/types.ts
27
27
  var RuleType = {
@@ -62,7 +62,8 @@ import {
62
62
  useStorybookApi,
63
63
  useStorybookState
64
64
  } from "storybook/manager-api";
65
- import { convert, themes } from "storybook/theming";
65
+ import { themes } from "storybook/theming";
66
+ import { convert } from "storybook/theming/emotion";
66
67
 
67
68
  // src/AccessibilityRuleMaps.ts
68
69
  var axeRuleMapping_wcag_2_0_a_aa = {
@@ -889,7 +890,7 @@ var unhighlightedSelectors = ["html", "body", "main"], SELECTED_HIGHLIGHT_ID = `
889
890
  import React3 from "react";
890
891
  import { Badge, Button as Button2, EmptyTabContent } from "storybook/internal/components";
891
892
  import { ChevronSmallDownIcon } from "@storybook/icons";
892
- import { styled as styled2 } from "storybook/theming";
893
+ import { styled as styled2 } from "storybook/theming/emotion";
893
894
 
894
895
  // src/components/Report/Details.tsx
895
896
  import React2, { Fragment, useCallback as useCallback2, useState as useState3 } from "react";
@@ -1733,7 +1734,7 @@ function $69cb30bb0017df05$var$makeContentId(baseId, value) {
1733
1734
  var $69cb30bb0017df05$export$be92b6f5f03c0fe9 = $69cb30bb0017df05$export$b2539bed5023c21c, $69cb30bb0017df05$export$54c2e3dc7acea9f5 = $69cb30bb0017df05$export$9712d22edc0d78c1, $69cb30bb0017df05$export$41fb9f06171c75f4 = $69cb30bb0017df05$export$8114b9fdfdf9f3ba, $69cb30bb0017df05$export$7c6e2c02157bb7d2 = $69cb30bb0017df05$export$bd905d70e8fd2ebb;
1734
1735
 
1735
1736
  // src/components/Report/Details.tsx
1736
- import { styled } from "storybook/theming";
1737
+ import { styled } from "storybook/theming/emotion";
1737
1738
  var StyledSyntaxHighlighter = styled(SyntaxHighlighter)(
1738
1739
  ({ theme: theme2 }) => ({
1739
1740
  fontSize: theme2.typography.size.s1
@@ -1949,7 +1950,7 @@ var impactStatus = {
1949
1950
  import * as React4 from "react";
1950
1951
  import { Button as Button3, TabsView } from "storybook/internal/components";
1951
1952
  import { CollapseIcon, ExpandAltIcon, EyeCloseIcon, EyeIcon, SyncIcon } from "@storybook/icons";
1952
- import { styled as styled3, useTheme } from "storybook/theming";
1953
+ import { styled as styled3, useTheme } from "storybook/theming/emotion";
1953
1954
  var Container = styled3.div({
1954
1955
  width: "100%",
1955
1956
  position: "relative",
@@ -2021,7 +2022,7 @@ var Container = styled3.div({
2021
2022
  import React5, { useMemo as useMemo2 } from "react";
2022
2023
  import { Link as Link2 } from "storybook/internal/components";
2023
2024
  import { useStorybookApi as useStorybookApi2 } from "storybook/manager-api";
2024
- import { styled as styled4 } from "storybook/theming";
2025
+ import { styled as styled4 } from "storybook/theming/emotion";
2025
2026
  var Wrapper3 = styled4.div(({ theme: { color, typography, background } }) => ({
2026
2027
  textAlign: "start",
2027
2028
  padding: "11px 15px",
@@ -2174,7 +2175,7 @@ import React7 from "react";
2174
2175
  import { Select } from "storybook/internal/components";
2175
2176
  import { AccessibilityIcon } from "@storybook/icons";
2176
2177
  import { useGlobals as useGlobals2 } from "storybook/manager-api";
2177
- import { styled as styled6 } from "storybook/theming";
2178
+ import { styled as styled6 } from "storybook/theming/emotion";
2178
2179
  var Hidden = styled6.div({
2179
2180
  "&, & svg": {
2180
2181
  position: "absolute",
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_o329vdbjzbf from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_o329vdbjzbf from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_o329vdbjzbf from "node:module";
1
+ import CJS_COMPAT_NODE_URL_uok9bt4l7t from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_uok9bt4l7t from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_uok9bt4l7t from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_o329vdbjzbf.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_o329vdbjzbf.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_o329vdbjzbf.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_uok9bt4l7t.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_uok9bt4l7t.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_uok9bt4l7t.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
@@ -3,7 +3,7 @@ import {
3
3
  decorators,
4
4
  initialGlobals,
5
5
  parameters
6
- } from "./_browser-chunks/chunk-5WURYCET.js";
6
+ } from "./_browser-chunks/chunk-QBKJ62VS.js";
7
7
  import "./_browser-chunks/chunk-QB47YQRA.js";
8
8
  import "./_browser-chunks/chunk-4BE7D4DS.js";
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-a11y",
3
- "version": "11.0.0-alpha.8",
3
+ "version": "11.0.0-alpha.9",
4
4
  "description": "Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards",
5
5
  "keywords": [
6
6
  "a11y",
@@ -72,7 +72,7 @@
72
72
  "vitest-axe": "^0.1.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "storybook": "^11.0.0-alpha.8"
75
+ "storybook": "^11.0.0-alpha.9"
76
76
  },
77
77
  "publishConfig": {
78
78
  "access": "public"