@bookjane2/bookjane-design-library 8.3.3 → 8.3.4

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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BKJButton.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BKJButton.test.d.ts","sourceRoot":"","sources":["../../../src/components/BKJButton/BKJButton.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { renderAndCheckA11y } from '../../test-utils/index.js';
3
+ import { BKJButton } from './BKJButton.js';
4
+ describe('BKJButton', () => {
5
+ describe('Accessibility', () => {
6
+ it('should have no accessibility violations', async () => {
7
+ const { axeResults } = await renderAndCheckA11y(_jsx(BKJButton, { variant: "PurpleSolid", children: "Click me" }));
8
+ expect(axeResults).toHaveNoViolations();
9
+ });
10
+ });
11
+ });
12
+ //# sourceMappingURL=BKJButton.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BKJButton.test.js","sourceRoot":"","sources":["../../../src/components/BKJButton/BKJButton.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;YACvD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,kBAAkB,CAC7C,KAAC,SAAS,IAAC,OAAO,EAAC,aAAa,yBAAqB,CACtD,CAAC;YACF,MAAM,CAAC,UAAU,CAAC,CAAC,kBAAkB,EAAE,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shared test utilities for the BookJane Design Library.
3
+ *
4
+ * Provides helpers that wrap components in BKJThemeProvider and run
5
+ * axe-core accessibility checks, eliminating per-file boilerplate.
6
+ *
7
+ * Usage:
8
+ * import { renderAndCheckA11y } from '../test-utils/index.js';
9
+ *
10
+ * it('should have no accessibility violations', async () => {
11
+ * const { axeResults } = await renderAndCheckA11y(<BKJButton>Click me</BKJButton>);
12
+ * expect(axeResults).toHaveNoViolations();
13
+ * });
14
+ */
15
+ import { ReactElement } from 'react';
16
+ import { RenderResult } from '@testing-library/react';
17
+ import { AxeResults } from 'axe-core';
18
+ /**
19
+ * Renders a component wrapped in BKJThemeProvider.
20
+ * Use this for standard interaction tests that don't need axe checks.
21
+ */
22
+ export declare const renderWithTheme: (ui: ReactElement) => RenderResult;
23
+ /**
24
+ * Renders a component wrapped in BKJThemeProvider and runs axe-core
25
+ * accessibility checks on the result.
26
+ *
27
+ * @param ui - React element to render and check
28
+ * @returns Object containing the render result and axe results
29
+ */
30
+ export declare const renderAndCheckA11y: (ui: ReactElement) => Promise<{
31
+ renderResult: RenderResult;
32
+ axeResults: AxeResults;
33
+ }>;
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-utils/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAU,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,IAAI,YAAY,KAAG,YAElD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,IAAI,YAAY,KACf,OAAO,CAAC;IAAE,YAAY,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,CAIhE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render } from '@testing-library/react';
3
+ import { axe } from 'jest-axe';
4
+ import { BKJThemeProvider } from '../providers/BKJThemeProvider/index.js';
5
+ /**
6
+ * Renders a component wrapped in BKJThemeProvider.
7
+ * Use this for standard interaction tests that don't need axe checks.
8
+ */
9
+ export const renderWithTheme = (ui) => {
10
+ return render(_jsx(BKJThemeProvider, { children: ui }));
11
+ };
12
+ /**
13
+ * Renders a component wrapped in BKJThemeProvider and runs axe-core
14
+ * accessibility checks on the result.
15
+ *
16
+ * @param ui - React element to render and check
17
+ * @returns Object containing the render result and axe results
18
+ */
19
+ export const renderAndCheckA11y = async (ui) => {
20
+ const renderResult = renderWithTheme(ui);
21
+ const axeResults = await axe(renderResult.container);
22
+ return { renderResult, axeResults };
23
+ };
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-utils/index.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,MAAM,EAAgB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAgB,EAAgB,EAAE;IAChE,OAAO,MAAM,CAAC,KAAC,gBAAgB,cAAE,EAAE,GAAoB,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,EAAgB,EACiD,EAAE;IACnE,MAAM,YAAY,GAAG,eAAe,CAAC,EAAE,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACrD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AACtC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookjane2/bookjane-design-library",
3
- "version": "8.3.3",
3
+ "version": "8.3.4",
4
4
  "main": "./lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "engines": {