@bookjane2/bookjane-design-library 9.0.9 → 9.0.10
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/lib/components/BKJTextArea/BKJTextArea.d.ts.map +1 -1
- package/lib/components/BKJTextArea/BKJTextArea.js +17 -2
- package/lib/components/BKJTextArea/BKJTextArea.js.map +1 -1
- package/lib/components/BKJTextArea/BKJTextArea.stories.d.ts +4 -0
- package/lib/components/BKJTextArea/BKJTextArea.stories.d.ts.map +1 -1
- package/lib/components/BKJTextArea/BKJTextArea.stories.js +22 -2
- package/lib/components/BKJTextArea/BKJTextArea.stories.js.map +1 -1
- package/lib/components/BKJTextArea/BKJTextArea.styled.d.ts.map +1 -1
- package/lib/components/BKJTextArea/BKJTextArea.styled.js +2 -1
- package/lib/components/BKJTextArea/BKJTextArea.styled.js.map +1 -1
- package/lib/components/BKJTextArea/BKJTextArea.test.d.ts +2 -0
- package/lib/components/BKJTextArea/BKJTextArea.test.d.ts.map +1 -0
- package/lib/components/BKJTextArea/BKJTextArea.test.js +117 -0
- package/lib/components/BKJTextArea/BKJTextArea.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BKJTextArea.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,EAAE,EAA0C,MAAM,OAAO,CAAC;AAWhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAuF5C,CAAC"}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useTextField } from '@react-aria/textfield';
|
|
3
|
+
import { forwardRef, Fragment, useRef, useState } from 'react';
|
|
4
|
+
import { isBoolean, isFormValidationErrorDisplayed } from '../../common.types.js';
|
|
5
|
+
import { mergeRefs } from '../BKJSelect/utils/mergeRefs.js';
|
|
3
6
|
import { Input, InputErrorMessage, InputLabel, RequiredAsterisk, TextInputWrapper, WordCount, } from './BKJTextArea.styled.js';
|
|
4
7
|
export const BKJTextArea = forwardRef((props, ref) => {
|
|
5
8
|
const { label, error, maxLength = 500, required, disabled, onChange, className, width, height, ...rest } = props;
|
|
9
|
+
const innerRef = useRef({});
|
|
10
|
+
const hasStringyError = isFormValidationErrorDisplayed(error) && !isBoolean(error);
|
|
11
|
+
const { labelProps, inputProps, errorMessageProps } = useTextField({
|
|
12
|
+
label: label || 'Text area',
|
|
13
|
+
isRequired: required,
|
|
14
|
+
isDisabled: disabled,
|
|
15
|
+
inputElementType: 'textarea',
|
|
16
|
+
errorMessage: hasStringyError ? error : undefined,
|
|
17
|
+
validationState: isFormValidationErrorDisplayed(error) ? 'invalid' : 'valid',
|
|
18
|
+
}, innerRef);
|
|
6
19
|
const [charCount, setCharCount] = useState(props.value ? props.value.toLocaleString().length : 0);
|
|
7
20
|
const countChars = (e) => {
|
|
8
21
|
const text = e.target.value;
|
|
@@ -13,6 +26,8 @@ export const BKJTextArea = forwardRef((props, ref) => {
|
|
|
13
26
|
onChange(e);
|
|
14
27
|
countChars(e);
|
|
15
28
|
};
|
|
16
|
-
return (_jsxs(TextInputWrapper, { className: className, children: [label && (_jsxs(InputLabel, { disabled: disabled, children: [label, " ", required && _jsx(RequiredAsterisk, { children: "\u00A0*" })] })), _jsx(Input, { ref: ref, error: !!error, onChange: handleChange, maxLength: maxLength, disabled: disabled, width: width, height: height, ...rest }), _jsxs(WordCount, { disabled: disabled, error: error ? (Array.isArray(error) ? !!error.length : !!error) : false, children: [`${charCount}/${maxLength}`,
|
|
29
|
+
return (_jsxs(TextInputWrapper, { className: className, children: [label && (_jsxs(InputLabel, { ...labelProps, disabled: disabled, children: [label, " ", required && _jsx(RequiredAsterisk, { children: "\u00A0*" })] })), _jsx(Input, { ...inputProps, ref: mergeRefs([innerRef, ref]), error: !!error, onChange: handleChange, maxLength: maxLength, disabled: disabled, width: width, height: height, value: props.value, ...rest }), _jsxs(WordCount, { disabled: disabled, error: error ? (Array.isArray(error) ? !!error.length : !!error) : false, children: [`${charCount}/${maxLength}`, hasStringyError && (_jsx(InputErrorMessage, { ...errorMessageProps, children: Array.isArray(error)
|
|
30
|
+
? error.map((err, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("br", {}), err] }, `${err}-${i}`)))
|
|
31
|
+
: error }))] })] }));
|
|
17
32
|
});
|
|
18
33
|
//# sourceMappingURL=BKJTextArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJTextArea.js","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmB,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BKJTextArea.js","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAmB,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EACL,KAAK,EACL,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,GACV,MAAM,sBAAsB,CAAC;AAG9B,MAAM,CAAC,MAAM,WAAW,GAA0B,UAAU,CAG1D,CAAC,KAAK,EAAE,GAAG,EAAe,EAAE;IAC5B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const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextAreaProps>;
|
|
47
|
+
export declare const WithError: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextAreaProps>;
|
|
48
|
+
export declare const WithArrayError: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextAreaProps>;
|
|
49
|
+
export declare const Required: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextAreaProps>;
|
|
50
|
+
export declare const Disabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, IBKJTextAreaProps>;
|
|
47
51
|
export default Setup;
|
|
48
52
|
//# sourceMappingURL=BKJTextArea.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJTextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BKJTextArea.stories.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CV,CAAC;AAQF,eAAO,MAAM,OAAO,6GAAoB,CAAC;AAUzC,eAAO,MAAM,SAAS,6GAAoB,CAAC;AAO3C,eAAO,MAAM,cAAc,6GAAoB,CAAC;AAOhD,eAAO,MAAM,QAAQ,6GAAoB,CAAC;AAO1C,eAAO,MAAM,QAAQ,6GAAoB,CAAC;AAO1C,eAAe,KAAK,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BKJTextArea } from '../index.js';
|
|
3
|
+
import { BKJTheme, BKJThemeProvider } from '../../providers/index.js';
|
|
4
4
|
const Setup = {
|
|
5
5
|
title: 'Input Elements/BKJTextArea',
|
|
6
6
|
component: BKJTextArea,
|
|
@@ -54,5 +54,25 @@ Default.args = {
|
|
|
54
54
|
width: '',
|
|
55
55
|
height: '',
|
|
56
56
|
};
|
|
57
|
+
export const WithError = Template.bind({});
|
|
58
|
+
WithError.args = {
|
|
59
|
+
...Default.args,
|
|
60
|
+
error: 'This field is required',
|
|
61
|
+
};
|
|
62
|
+
export const WithArrayError = Template.bind({});
|
|
63
|
+
WithArrayError.args = {
|
|
64
|
+
...Default.args,
|
|
65
|
+
error: ['Must not be empty', 'Must be at least 10 characters'],
|
|
66
|
+
};
|
|
67
|
+
export const Required = Template.bind({});
|
|
68
|
+
Required.args = {
|
|
69
|
+
...Default.args,
|
|
70
|
+
required: true,
|
|
71
|
+
};
|
|
72
|
+
export const Disabled = Template.bind({});
|
|
73
|
+
Disabled.args = {
|
|
74
|
+
...Default.args,
|
|
75
|
+
disabled: true,
|
|
76
|
+
};
|
|
57
77
|
export default Setup;
|
|
58
78
|
//# sourceMappingURL=BKJTextArea.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJTextArea.stories.js","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BKJTextArea.stories.js","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,KAAK,GAAG;IACZ,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,WAAW;IAEtB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,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C,IAAI,GAAG;IACpB,GAAG,OAAO,CAAC,IAAI;IACf,KAAK,EAAE,CAAC,mBAAmB,EAAE,gCAAgC,CAAC;CAC/D,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE1C,QAAQ,CAAC,IAAI,GAAG;IACd,GAAG,OAAO,CAAC,IAAI;IACf,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE1C,QAAQ,CAAC,IAAI,GAAG;IACd,GAAG,OAAO,CAAC,IAAI;IACf,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJTextArea.styled.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.styled.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,UAAU,6PAEtB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;mBAE5B,CAAC;AAEF,eAAO,MAAM,KAAK,kFAmBjB,CAAC;AAEF,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,gQAerB,CAAC;AAEF,eAAO,MAAM,gBAAgB,6NAE5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"BKJTextArea.styled.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.styled.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,UAAU,6PAEtB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;mBAE5B,CAAC;AAEF,eAAO,MAAM,KAAK,kFAmBjB,CAAC;AAEF,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,SAAS,gQAerB,CAAC;AAEF,eAAO,MAAM,gBAAgB,6NAE5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,+NAO7B,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const RequiredAsterisk = styled(InputLabel) `
|
|
|
7
7
|
${InputRequiredAsteriskCSS}
|
|
8
8
|
`;
|
|
9
9
|
export const Input = styled.textarea `
|
|
10
|
-
${InputBaseCSS}
|
|
10
|
+
${InputBaseCSS};
|
|
11
11
|
padding: 10px 12px;
|
|
12
12
|
height: 120px;
|
|
13
13
|
resize: none;
|
|
@@ -44,6 +44,7 @@ export const TextInputWrapper = styled.div `
|
|
|
44
44
|
export const InputErrorMessage = styled.span `
|
|
45
45
|
${({ theme }) => theme.fonts.PoppinsText};
|
|
46
46
|
font-size: 14px;
|
|
47
|
+
padding-left: 5px;
|
|
47
48
|
line-height: 21px;
|
|
48
49
|
margin-top: 8px;
|
|
49
50
|
color: ${({ theme }) => theme.colors.ErrorDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BKJTextArea.styled.js","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.styled.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGnG,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAiB;IACnD,aAAa;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IAC9C,wBAAwB;CAC3B,CAAC;AAEF,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KACnC;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;IACtC,eAAe;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAA;IACxC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW;;;;;WAK/B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY;CAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BKJTextArea.test.d.ts","sourceRoot":"","sources":["../../../src/components/BKJTextArea/BKJTextArea.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { screen } from '@testing-library/react';
|
|
3
|
+
import { renderAndCheckA11y, renderWithTheme } from '../../test-utils/index.js';
|
|
4
|
+
import { BKJThemeProvider } from '../../providers/BKJThemeProvider/index.js';
|
|
5
|
+
import { BKJTextArea } from '../index.js';
|
|
6
|
+
const noop = () => { };
|
|
7
|
+
describe('BKJTextArea', () => {
|
|
8
|
+
describe('Accessibility', () => {
|
|
9
|
+
it('default (labelled) has no a11y violations', async () => {
|
|
10
|
+
const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextArea, { label: "Notes", onChange: noop }));
|
|
11
|
+
expect(axeResults).toHaveNoViolations();
|
|
12
|
+
});
|
|
13
|
+
it('required has no a11y violations', async () => {
|
|
14
|
+
const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextArea, { label: "Notes", required: true, onChange: noop }));
|
|
15
|
+
expect(axeResults).toHaveNoViolations();
|
|
16
|
+
});
|
|
17
|
+
it('with string error has no a11y violations', async () => {
|
|
18
|
+
const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextArea, { label: "Notes", error: "This field is required", onChange: noop }));
|
|
19
|
+
expect(axeResults).toHaveNoViolations();
|
|
20
|
+
});
|
|
21
|
+
it('with array of errors has no a11y violations', async () => {
|
|
22
|
+
const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextArea, { label: "Notes", error: ['Must not be empty', 'Must be at least 10 characters'], onChange: noop }));
|
|
23
|
+
expect(axeResults).toHaveNoViolations();
|
|
24
|
+
});
|
|
25
|
+
it('disabled has no a11y violations', async () => {
|
|
26
|
+
const { axeResults } = await renderAndCheckA11y(_jsx(BKJTextArea, { label: "Notes", disabled: true, onChange: noop }));
|
|
27
|
+
expect(axeResults).toHaveNoViolations();
|
|
28
|
+
});
|
|
29
|
+
it('renders a single error element when error is an array of strings', () => {
|
|
30
|
+
const { container } = renderWithTheme(_jsx(BKJTextArea, { label: "Notes", error: ['Must not be empty', 'Must be at least 10 characters'], onChange: noop }));
|
|
31
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
32
|
+
const describedBy = textarea.getAttribute('aria-describedby');
|
|
33
|
+
expect(describedBy).toBeTruthy();
|
|
34
|
+
const errorIds = (describedBy ?? '').split(/\s+/).filter(Boolean);
|
|
35
|
+
errorIds.forEach((id) => {
|
|
36
|
+
const matches = container.querySelectorAll(`[id="${id}"]`);
|
|
37
|
+
expect(matches.length).toBe(1);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
it('does not render an error element when error is boolean true', () => {
|
|
41
|
+
renderWithTheme(_jsx(BKJTextArea, { label: "Notes", error: true, onChange: noop }));
|
|
42
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
43
|
+
expect(textarea).toHaveAttribute('aria-invalid', 'true');
|
|
44
|
+
const describedBy = textarea.getAttribute('aria-describedby');
|
|
45
|
+
if (describedBy) {
|
|
46
|
+
const referenced = describedBy
|
|
47
|
+
.split(/\s+/)
|
|
48
|
+
.filter(Boolean)
|
|
49
|
+
.map((id) => document.getElementById(id))
|
|
50
|
+
.filter((el) => el !== null);
|
|
51
|
+
referenced.forEach((el) => {
|
|
52
|
+
expect(el.textContent?.trim().length ?? 0).toBeGreaterThan(0);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe('ARIA attributes', () => {
|
|
58
|
+
it('label htmlFor matches textarea id', () => {
|
|
59
|
+
const { container } = renderWithTheme(_jsx(BKJTextArea, { label: "Notes", onChange: noop }));
|
|
60
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
61
|
+
const textareaId = textarea.getAttribute('id');
|
|
62
|
+
expect(textareaId).toBeTruthy();
|
|
63
|
+
const label = container.querySelector('label');
|
|
64
|
+
expect(label).not.toBeNull();
|
|
65
|
+
expect(label.getAttribute('for')).toBe(textareaId);
|
|
66
|
+
});
|
|
67
|
+
it('textarea has aria-invalid="true" when error is a string', () => {
|
|
68
|
+
renderWithTheme(_jsx(BKJTextArea, { label: "Notes", error: "Required", onChange: noop }));
|
|
69
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
70
|
+
expect(textarea).toHaveAttribute('aria-invalid', 'true');
|
|
71
|
+
});
|
|
72
|
+
it('textarea aria-describedby references the error element id when error is a string', () => {
|
|
73
|
+
renderWithTheme(_jsx(BKJTextArea, { label: "Notes", error: "Required", onChange: noop }));
|
|
74
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
75
|
+
const describedBy = textarea.getAttribute('aria-describedby');
|
|
76
|
+
expect(describedBy).toBeTruthy();
|
|
77
|
+
const errorEl = document.getElementById(describedBy.split(/\s+/)[0]);
|
|
78
|
+
expect(errorEl).not.toBeNull();
|
|
79
|
+
expect(errorEl.textContent).toContain('Required');
|
|
80
|
+
});
|
|
81
|
+
it('textarea has no aria-invalid when error is falsy', () => {
|
|
82
|
+
renderWithTheme(_jsx(BKJTextArea, { label: "Notes", onChange: noop }));
|
|
83
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
84
|
+
expect(textarea).not.toHaveAttribute('aria-invalid', 'true');
|
|
85
|
+
});
|
|
86
|
+
it('textarea has aria-required="true" when required is true', () => {
|
|
87
|
+
renderWithTheme(_jsx(BKJTextArea, { label: "Notes", required: true, onChange: noop }));
|
|
88
|
+
const textarea = screen.getByRole('textbox', { name: /Notes/ });
|
|
89
|
+
expect(textarea).toHaveAttribute('aria-required', 'true');
|
|
90
|
+
});
|
|
91
|
+
it('textarea has no aria-required when required is absent', () => {
|
|
92
|
+
renderWithTheme(_jsx(BKJTextArea, { label: "Notes", onChange: noop }));
|
|
93
|
+
const textarea = screen.getByRole('textbox', { name: 'Notes' });
|
|
94
|
+
expect(textarea).not.toHaveAttribute('aria-required');
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
describe('State transitions', () => {
|
|
98
|
+
it('clears aria-invalid and error linkage when string error is cleared', () => {
|
|
99
|
+
const { rerender } = renderWithTheme(_jsx(BKJTextArea, { label: "Notes", error: "Required", onChange: noop }));
|
|
100
|
+
const textareaWithError = screen.getByRole('textbox', { name: 'Notes' });
|
|
101
|
+
expect(textareaWithError).toHaveAttribute('aria-invalid', 'true');
|
|
102
|
+
const describedByWithError = textareaWithError.getAttribute('aria-describedby');
|
|
103
|
+
expect(describedByWithError).toBeTruthy();
|
|
104
|
+
rerender(_jsx(BKJThemeProvider, { children: _jsx(BKJTextArea, { label: "Notes", onChange: noop }) }));
|
|
105
|
+
const textareaCleared = screen.getByRole('textbox', { name: 'Notes' });
|
|
106
|
+
expect(textareaCleared).not.toHaveAttribute('aria-invalid', 'true');
|
|
107
|
+
const describedByCleared = textareaCleared.getAttribute('aria-describedby');
|
|
108
|
+
if (describedByCleared) {
|
|
109
|
+
const referencedIds = describedByCleared.split(/\s+/).filter(Boolean);
|
|
110
|
+
referencedIds.forEach((id) => {
|
|
111
|
+
expect(document.getElementById(id)).not.toBeNull();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=BKJT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