@pingux/astro 2.46.0-alpha.3 → 2.46.0-alpha.5
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/cjs/components/AccordionGroup/AccordionGroup.mdx +7 -1
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.d.ts +1 -0
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +16 -2
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +29 -9
- package/lib/cjs/components/AccordionItem/AccordionItem.d.ts +3 -0
- package/lib/cjs/components/AccordionItem/AccordionItem.js +5 -2
- package/lib/cjs/components/TreeView/TreeView.stories.js +14 -0
- package/lib/cjs/components/TreeView/TreeViewRow.js +9 -3
- package/lib/cjs/types/item.d.ts +3 -0
- package/lib/components/AccordionGroup/AccordionGroup.mdx +7 -1
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +14 -1
- package/lib/components/AccordionGroup/AccordionGroup.test.js +30 -10
- package/lib/components/AccordionItem/AccordionItem.js +5 -2
- package/lib/components/TreeView/TreeView.stories.js +14 -0
- package/lib/components/TreeView/TreeViewRow.js +9 -3
- package/package.json +1 -1
@@ -10,6 +10,7 @@ Accordions should be used:
|
|
10
10
|
- To organize related information.
|
11
11
|
- To shorten pages and reduce scrolling when it’s not crucial that users review the content.
|
12
12
|
- When white space is at a minimum and content cannot be displayed all at once.
|
13
|
+
- With Slots props to insert extra UI elements next to headings.
|
13
14
|
|
14
15
|
Accordions should not have focusable items as children.
|
15
16
|
|
@@ -35,9 +36,14 @@ These keys provide additional functionality to the component.
|
|
35
36
|
| Tab | Moves focus to the next focusable component. All focusable components in the accordion are included in the page tab sequence.|
|
36
37
|
| Shift + Tab | Moves focus to the previous focusable component. All focusable components in the accordion are included in the page tab sequence. |
|
37
38
|
|
39
|
+
#### Slots
|
40
|
+
|
41
|
+
The slots prop has been provided for added flexibility. Use the **`postHeading`** slot to add helpHint or icon elements next to the heading
|
42
|
+
section. Keep in mind that this component is best suited for specific designs necessitates its use.
|
43
|
+
|
38
44
|
#### Screen readers
|
39
45
|
|
40
46
|
This component uses the following attributes to assist screen readers:
|
41
47
|
- The accordion header button uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
|
42
48
|
- When expanded, the **`aria-controls`** attribute is added to the button pointing to the content. The button uses **`aria-label`** to provide an accessible name.
|
43
|
-
- The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.
|
49
|
+
- The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.
|
@@ -8,7 +8,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
8
8
|
_Object$defineProperty(exports, "__esModule", {
|
9
9
|
value: true
|
10
10
|
});
|
11
|
-
exports["default"] = exports.UncontrolledExpanded = exports.Multiple = exports.LabelWithBadge = exports.DisabledState = exports.DifferentLevels = exports.Default = exports.CustomPresentation = exports.ControlledExpanded = void 0;
|
11
|
+
exports["default"] = exports.UncontrolledExpanded = exports.Multiple = exports.LabelWithBadge = exports.DisabledState = exports.DifferentLevels = exports.Default = exports.CustomPresentation = exports.ControlledExpanded = exports.AccordionWithSlot = void 0;
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
@@ -318,4 +318,18 @@ var LabelWithBadge = function LabelWithBadge(args) {
|
|
318
318
|
"data-id": "accordionItem"
|
319
319
|
}, (0, _react2.jsx)(_index.Text, null, "Render me!")));
|
320
320
|
};
|
321
|
-
exports.LabelWithBadge = LabelWithBadge;
|
321
|
+
exports.LabelWithBadge = LabelWithBadge;
|
322
|
+
var AccordionWithSlot = function AccordionWithSlot(args) {
|
323
|
+
return (0, _react2.jsx)(_index.AccordionGroup, (0, _extends2["default"])({
|
324
|
+
labelHeadingTag: "h3"
|
325
|
+
}, args), (0, _react2.jsx)(_reactStately.Item, {
|
326
|
+
key: "accordionKey",
|
327
|
+
textValue: "accordionKey",
|
328
|
+
label: "Accordion Label",
|
329
|
+
"data-id": "accordionItem",
|
330
|
+
slots: {
|
331
|
+
postHeading: (0, _react2.jsx)(_index.HelpHint, null, " Text of the popover right here...")
|
332
|
+
}
|
333
|
+
}, (0, _react2.jsx)(_index.Text, null, "Render me!")));
|
334
|
+
};
|
335
|
+
exports.AccordionWithSlot = AccordionWithSlot;
|
@@ -41,17 +41,20 @@ var getComponent = function getComponent() {
|
|
41
41
|
key: "first",
|
42
42
|
textValue: "Duplicate",
|
43
43
|
"data-id": "first",
|
44
|
-
label: "Accordion item"
|
44
|
+
label: "Accordion item",
|
45
|
+
"data-testid": "first"
|
45
46
|
}, (0, _react2.jsx)(_Text["default"], null, "Render me!")), (0, _react2.jsx)(_reactStately.Item, {
|
46
47
|
key: "second",
|
47
48
|
textValue: "Duplicate",
|
48
49
|
"data-id": "second",
|
49
|
-
label: "Accordion item"
|
50
|
+
label: "Accordion item",
|
51
|
+
"data-testid": "second"
|
50
52
|
}, (0, _react2.jsx)(_Text["default"], null, "Render me!")), (0, _react2.jsx)(_reactStately.Item, {
|
51
53
|
key: "third",
|
52
54
|
textValue: "Duplicate",
|
53
55
|
"data-id": "third",
|
54
|
-
label: "Accordion item"
|
56
|
+
label: "Accordion item",
|
57
|
+
"data-testid": "third"
|
55
58
|
}, (0, _react2.jsx)(_index.TextField, {
|
56
59
|
role: "form",
|
57
60
|
label: "Example Label",
|
@@ -161,6 +164,15 @@ var getComponentWithMultipleAccordion = function getComponentWithMultipleAccordi
|
|
161
164
|
"data-id": "connection-configuration-custom-form"
|
162
165
|
}, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_Text["default"], null, "other text1"), (0, _react2.jsx)(_Text["default"], null, "another text1")))))));
|
163
166
|
};
|
167
|
+
var getComponentWithSlot = function getComponentWithSlot(props) {
|
168
|
+
return (0, _testWrapper.render)((0, _react2.jsx)(_["default"], (0, _extends2["default"])({}, defaultProps, props), (0, _react2.jsx)(_reactStately.Item, {
|
169
|
+
key: "first",
|
170
|
+
textValue: "Duplicate",
|
171
|
+
"data-id": "first",
|
172
|
+
label: "Accordion item",
|
173
|
+
slots: props.slots
|
174
|
+
}, (0, _react2.jsx)(_Text["default"], null, "Render me!"))));
|
175
|
+
};
|
164
176
|
test('button press uses callback', function () {
|
165
177
|
var onPress = jest.fn();
|
166
178
|
getComponent({
|
@@ -274,10 +286,8 @@ test('disabled keys prop disables an accordion item', function () {
|
|
274
286
|
getComponent({
|
275
287
|
disabledKeys: ['first']
|
276
288
|
});
|
277
|
-
var
|
278
|
-
|
279
|
-
var parentElement = selectedItem.parentElement;
|
280
|
-
expect(parentElement).toHaveClass('is-disabled');
|
289
|
+
var button = _testWrapper.screen.getByTestId('first');
|
290
|
+
expect(button).toHaveClass('is-disabled');
|
281
291
|
});
|
282
292
|
test('default expanded keys expands an accordion item', function () {
|
283
293
|
getComponent({
|
@@ -316,10 +326,10 @@ test('able to click a textfield that is the rendered child of an accordion', fun
|
|
316
326
|
});
|
317
327
|
test('Item accepts a data-id and the data-id can be found in the DOM', function () {
|
318
328
|
getComponent();
|
319
|
-
var buttons = _testWrapper.screen.
|
329
|
+
var buttons = _testWrapper.screen.getAllByText('Accordion item');
|
320
330
|
var selectedItem = buttons[0];
|
321
331
|
var parentElement = selectedItem.parentElement;
|
322
|
-
expect(parentElement).toHaveAttribute('data-
|
332
|
+
expect(parentElement).toHaveAttribute('data-key', 'first');
|
323
333
|
});
|
324
334
|
test('items do not automatically expand if wrapped in an open OverlayPanel', function () {
|
325
335
|
getComponentInOverlayPanel();
|
@@ -404,4 +414,14 @@ test('when labelHeadingTag is uppercase, the label is rendered', function () {
|
|
404
414
|
_testWrapper.screen.getAllByRole('heading', {
|
405
415
|
level: getLabelHeadingLevel(h4Tag)
|
406
416
|
});
|
417
|
+
});
|
418
|
+
test('renders Accordion component with slot', function () {
|
419
|
+
getComponentWithSlot({
|
420
|
+
slots: {
|
421
|
+
postHeading: (0, _react2.jsx)(_index.HelpHint, {
|
422
|
+
"data-testid": "helpHint"
|
423
|
+
}, "Text of the popover right here...")
|
424
|
+
}
|
425
|
+
});
|
426
|
+
expect(_testWrapper.screen.getByTestId('helpHint')).toBeInTheDocument();
|
407
427
|
});
|
@@ -31,6 +31,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
31
31
|
var validHeadingTags = ['h1', 'h2', 'h3', 'h4'];
|
32
32
|
exports.validHeadingTags = validHeadingTags;
|
33
33
|
var AccordionItem = function AccordionItem(props) {
|
34
|
+
var _item$props$slots, _item$props$slots2;
|
34
35
|
var className = props.className,
|
35
36
|
item = props.item,
|
36
37
|
labelHeadingTag = props.labelHeadingTag;
|
@@ -81,7 +82,9 @@ var AccordionItem = function AccordionItem(props) {
|
|
81
82
|
return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
82
83
|
variant: "accordion.accordion",
|
83
84
|
className: itemClasses
|
84
|
-
}, others, containerProps), (0, _react2.jsx)(
|
85
|
+
}, others, containerProps), (0, _react2.jsx)(_index.Box, {
|
86
|
+
isRow: true
|
87
|
+
}, (0, _react2.jsx)(_themeUi.Button, (0, _extends2["default"])({
|
85
88
|
"aria-label": ariaLabel,
|
86
89
|
ref: buttonRef,
|
87
90
|
sx: {
|
@@ -104,7 +107,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
104
107
|
title: {
|
105
108
|
name: isOpen ? 'Menu Up Icon' : 'Menu Down Icon'
|
106
109
|
}
|
107
|
-
}))), isOpen && (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
110
|
+
}))), ((_item$props$slots = item.props.slots) === null || _item$props$slots === void 0 ? void 0 : _item$props$slots.postHeading) && ((_item$props$slots2 = item.props.slots) === null || _item$props$slots2 === void 0 ? void 0 : _item$props$slots2.postHeading)), isOpen && (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
108
111
|
variant: "accordion.body"
|
109
112
|
}, accordionRegionProps, regionProps, {
|
110
113
|
className: itemClasses
|
@@ -46,6 +46,20 @@ var _default = {
|
|
46
46
|
source: {
|
47
47
|
type: 'code'
|
48
48
|
}
|
49
|
+
},
|
50
|
+
a11y: {
|
51
|
+
config: {
|
52
|
+
rules: [
|
53
|
+
/* Turned off since dynamic parent and children getting added on treegrid role
|
54
|
+
* and design specs */
|
55
|
+
{
|
56
|
+
id: 'aria-required-parent',
|
57
|
+
enabled: false
|
58
|
+
}, {
|
59
|
+
id: 'aria-required-children',
|
60
|
+
enabled: false
|
61
|
+
}]
|
62
|
+
}
|
49
63
|
}
|
50
64
|
}
|
51
65
|
};
|
@@ -200,7 +200,9 @@ var TreeViewRow = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
200
200
|
toggledIcon: _MenuDownIcon["default"],
|
201
201
|
iconProps: {
|
202
202
|
size: 25,
|
203
|
-
title:
|
203
|
+
title: {
|
204
|
+
name: "".concat(title, " expand or collapse button")
|
205
|
+
}
|
204
206
|
},
|
205
207
|
buttonProps: _objectSpread({
|
206
208
|
'aria-label': "".concat(title, " expand or collapse button"),
|
@@ -222,7 +224,9 @@ var TreeViewRow = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
222
224
|
color: "focus",
|
223
225
|
icon: mainIcon,
|
224
226
|
size: 25,
|
225
|
-
title:
|
227
|
+
title: {
|
228
|
+
name: 'folder icon'
|
229
|
+
},
|
226
230
|
alt: "folder icon"
|
227
231
|
}), (0, _react2.jsx)(_index.Text, {
|
228
232
|
className: classNames
|
@@ -230,7 +234,9 @@ var TreeViewRow = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
230
234
|
icon: lastIcon,
|
231
235
|
size: 15,
|
232
236
|
color: "accent.80",
|
233
|
-
title:
|
237
|
+
title: {
|
238
|
+
name: 'lock icon'
|
239
|
+
},
|
234
240
|
alt: "lock icon"
|
235
241
|
})));
|
236
242
|
});
|
package/lib/cjs/types/item.d.ts
CHANGED
@@ -10,6 +10,7 @@ Accordions should be used:
|
|
10
10
|
- To organize related information.
|
11
11
|
- To shorten pages and reduce scrolling when it’s not crucial that users review the content.
|
12
12
|
- When white space is at a minimum and content cannot be displayed all at once.
|
13
|
+
- With Slots props to insert extra UI elements next to headings.
|
13
14
|
|
14
15
|
Accordions should not have focusable items as children.
|
15
16
|
|
@@ -35,9 +36,14 @@ These keys provide additional functionality to the component.
|
|
35
36
|
| Tab | Moves focus to the next focusable component. All focusable components in the accordion are included in the page tab sequence.|
|
36
37
|
| Shift + Tab | Moves focus to the previous focusable component. All focusable components in the accordion are included in the page tab sequence. |
|
37
38
|
|
39
|
+
#### Slots
|
40
|
+
|
41
|
+
The slots prop has been provided for added flexibility. Use the **`postHeading`** slot to add helpHint or icon elements next to the heading
|
42
|
+
section. Keep in mind that this component is best suited for specific designs necessitates its use.
|
43
|
+
|
38
44
|
#### Screen readers
|
39
45
|
|
40
46
|
This component uses the following attributes to assist screen readers:
|
41
47
|
- The accordion header button uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
|
42
48
|
- When expanded, the **`aria-controls`** attribute is added to the button pointing to the content. The button uses **`aria-label`** to provide an accessible name.
|
43
|
-
- The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.
|
49
|
+
- The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
4
4
|
import { Item } from 'react-stately';
|
5
5
|
import { withDesign } from 'storybook-addon-designs';
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
|
-
import { AccordionGroup, Badge, Box, Button, Text, TextField } from '../../index';
|
7
|
+
import { AccordionGroup, Badge, Box, Button, HelpHint, Text, TextField } from '../../index';
|
8
8
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
9
9
|
import { validHeadingTags } from '../AccordionItem/AccordionItem';
|
10
10
|
import AccordionReadme from './AccordionGroup';
|
@@ -296,4 +296,17 @@ export var LabelWithBadge = function LabelWithBadge(args) {
|
|
296
296
|
}))),
|
297
297
|
"data-id": "accordionItem"
|
298
298
|
}, ___EmotionJSX(Text, null, "Render me!")));
|
299
|
+
};
|
300
|
+
export var AccordionWithSlot = function AccordionWithSlot(args) {
|
301
|
+
return ___EmotionJSX(AccordionGroup, _extends({
|
302
|
+
labelHeadingTag: "h3"
|
303
|
+
}, args), ___EmotionJSX(Item, {
|
304
|
+
key: "accordionKey",
|
305
|
+
textValue: "accordionKey",
|
306
|
+
label: "Accordion Label",
|
307
|
+
"data-id": "accordionItem",
|
308
|
+
slots: {
|
309
|
+
postHeading: ___EmotionJSX(HelpHint, null, " Text of the popover right here...")
|
310
|
+
}
|
311
|
+
}, ___EmotionJSX(Text, null, "Render me!")));
|
299
312
|
};
|
@@ -4,7 +4,7 @@ import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instan
|
|
4
4
|
import React from 'react';
|
5
5
|
import { Item } from 'react-stately';
|
6
6
|
import userEvent from '@testing-library/user-event';
|
7
|
-
import { Box, Button, Menu, OverlayPanel, PopoverMenu, TextField } from '../../index';
|
7
|
+
import { Box, Button, HelpHint, Menu, OverlayPanel, PopoverMenu, TextField } from '../../index';
|
8
8
|
import { act, fireEvent, render, screen } from '../../utils/testUtils/testWrapper';
|
9
9
|
import { universalComponentTests } from '../../utils/testUtils/universalComponentTest';
|
10
10
|
import { validHeadingTags } from '../AccordionItem/AccordionItem';
|
@@ -38,17 +38,20 @@ var getComponent = function getComponent() {
|
|
38
38
|
key: "first",
|
39
39
|
textValue: "Duplicate",
|
40
40
|
"data-id": "first",
|
41
|
-
label: "Accordion item"
|
41
|
+
label: "Accordion item",
|
42
|
+
"data-testid": "first"
|
42
43
|
}, ___EmotionJSX(Text, null, "Render me!")), ___EmotionJSX(Item, {
|
43
44
|
key: "second",
|
44
45
|
textValue: "Duplicate",
|
45
46
|
"data-id": "second",
|
46
|
-
label: "Accordion item"
|
47
|
+
label: "Accordion item",
|
48
|
+
"data-testid": "second"
|
47
49
|
}, ___EmotionJSX(Text, null, "Render me!")), ___EmotionJSX(Item, {
|
48
50
|
key: "third",
|
49
51
|
textValue: "Duplicate",
|
50
52
|
"data-id": "third",
|
51
|
-
label: "Accordion item"
|
53
|
+
label: "Accordion item",
|
54
|
+
"data-testid": "third"
|
52
55
|
}, ___EmotionJSX(TextField, {
|
53
56
|
role: "form",
|
54
57
|
label: "Example Label",
|
@@ -158,6 +161,15 @@ var getComponentWithMultipleAccordion = function getComponentWithMultipleAccordi
|
|
158
161
|
"data-id": "connection-configuration-custom-form"
|
159
162
|
}, ___EmotionJSX(Box, null, ___EmotionJSX(Text, null, "other text1"), ___EmotionJSX(Text, null, "another text1")))))));
|
160
163
|
};
|
164
|
+
var getComponentWithSlot = function getComponentWithSlot(props) {
|
165
|
+
return render(___EmotionJSX(AccordionGroup, _extends({}, defaultProps, props), ___EmotionJSX(Item, {
|
166
|
+
key: "first",
|
167
|
+
textValue: "Duplicate",
|
168
|
+
"data-id": "first",
|
169
|
+
label: "Accordion item",
|
170
|
+
slots: props.slots
|
171
|
+
}, ___EmotionJSX(Text, null, "Render me!"))));
|
172
|
+
};
|
161
173
|
test('button press uses callback', function () {
|
162
174
|
var onPress = jest.fn();
|
163
175
|
getComponent({
|
@@ -271,10 +283,8 @@ test('disabled keys prop disables an accordion item', function () {
|
|
271
283
|
getComponent({
|
272
284
|
disabledKeys: ['first']
|
273
285
|
});
|
274
|
-
var
|
275
|
-
|
276
|
-
var parentElement = selectedItem.parentElement;
|
277
|
-
expect(parentElement).toHaveClass('is-disabled');
|
286
|
+
var button = screen.getByTestId('first');
|
287
|
+
expect(button).toHaveClass('is-disabled');
|
278
288
|
});
|
279
289
|
test('default expanded keys expands an accordion item', function () {
|
280
290
|
getComponent({
|
@@ -313,10 +323,10 @@ test('able to click a textfield that is the rendered child of an accordion', fun
|
|
313
323
|
});
|
314
324
|
test('Item accepts a data-id and the data-id can be found in the DOM', function () {
|
315
325
|
getComponent();
|
316
|
-
var buttons = screen.
|
326
|
+
var buttons = screen.getAllByText('Accordion item');
|
317
327
|
var selectedItem = buttons[0];
|
318
328
|
var parentElement = selectedItem.parentElement;
|
319
|
-
expect(parentElement).toHaveAttribute('data-
|
329
|
+
expect(parentElement).toHaveAttribute('data-key', 'first');
|
320
330
|
});
|
321
331
|
test('items do not automatically expand if wrapped in an open OverlayPanel', function () {
|
322
332
|
getComponentInOverlayPanel();
|
@@ -401,4 +411,14 @@ test('when labelHeadingTag is uppercase, the label is rendered', function () {
|
|
401
411
|
screen.getAllByRole('heading', {
|
402
412
|
level: getLabelHeadingLevel(h4Tag)
|
403
413
|
});
|
414
|
+
});
|
415
|
+
test('renders Accordion component with slot', function () {
|
416
|
+
getComponentWithSlot({
|
417
|
+
slots: {
|
418
|
+
postHeading: ___EmotionJSX(HelpHint, {
|
419
|
+
"data-testid": "helpHint"
|
420
|
+
}, "Text of the popover right here...")
|
421
|
+
}
|
422
|
+
});
|
423
|
+
expect(screen.getByTestId('helpHint')).toBeInTheDocument();
|
404
424
|
});
|
@@ -20,6 +20,7 @@ import { hoveredState } from '../AccordionGroup/Accordion.styles';
|
|
20
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
21
21
|
export var validHeadingTags = ['h1', 'h2', 'h3', 'h4'];
|
22
22
|
var AccordionItem = function AccordionItem(props) {
|
23
|
+
var _item$props$slots, _item$props$slots2;
|
23
24
|
var className = props.className,
|
24
25
|
item = props.item,
|
25
26
|
labelHeadingTag = props.labelHeadingTag;
|
@@ -70,7 +71,9 @@ var AccordionItem = function AccordionItem(props) {
|
|
70
71
|
return ___EmotionJSX(Box, _extends({
|
71
72
|
variant: "accordion.accordion",
|
72
73
|
className: itemClasses
|
73
|
-
}, others, containerProps), ___EmotionJSX(
|
74
|
+
}, others, containerProps), ___EmotionJSX(Box, {
|
75
|
+
isRow: true
|
76
|
+
}, ___EmotionJSX(ThemeUIButton, _extends({
|
74
77
|
"aria-label": ariaLabel,
|
75
78
|
ref: buttonRef,
|
76
79
|
sx: {
|
@@ -93,7 +96,7 @@ var AccordionItem = function AccordionItem(props) {
|
|
93
96
|
title: {
|
94
97
|
name: isOpen ? 'Menu Up Icon' : 'Menu Down Icon'
|
95
98
|
}
|
96
|
-
}))), isOpen && ___EmotionJSX(Box, _extends({
|
99
|
+
}))), ((_item$props$slots = item.props.slots) === null || _item$props$slots === void 0 ? void 0 : _item$props$slots.postHeading) && ((_item$props$slots2 = item.props.slots) === null || _item$props$slots2 === void 0 ? void 0 : _item$props$slots2.postHeading)), isOpen && ___EmotionJSX(Box, _extends({
|
97
100
|
variant: "accordion.body"
|
98
101
|
}, accordionRegionProps, regionProps, {
|
99
102
|
className: itemClasses
|
@@ -33,6 +33,20 @@ export default {
|
|
33
33
|
source: {
|
34
34
|
type: 'code'
|
35
35
|
}
|
36
|
+
},
|
37
|
+
a11y: {
|
38
|
+
config: {
|
39
|
+
rules: [
|
40
|
+
/* Turned off since dynamic parent and children getting added on treegrid role
|
41
|
+
* and design specs */
|
42
|
+
{
|
43
|
+
id: 'aria-required-parent',
|
44
|
+
enabled: false
|
45
|
+
}, {
|
46
|
+
id: 'aria-required-children',
|
47
|
+
enabled: false
|
48
|
+
}]
|
49
|
+
}
|
36
50
|
}
|
37
51
|
}
|
38
52
|
};
|
@@ -189,7 +189,9 @@ var TreeViewRow = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
189
189
|
toggledIcon: MenuDownIcon,
|
190
190
|
iconProps: {
|
191
191
|
size: 25,
|
192
|
-
title:
|
192
|
+
title: {
|
193
|
+
name: "".concat(title, " expand or collapse button")
|
194
|
+
}
|
193
195
|
},
|
194
196
|
buttonProps: _objectSpread({
|
195
197
|
'aria-label': "".concat(title, " expand or collapse button"),
|
@@ -211,7 +213,9 @@ var TreeViewRow = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
211
213
|
color: "focus",
|
212
214
|
icon: mainIcon,
|
213
215
|
size: 25,
|
214
|
-
title:
|
216
|
+
title: {
|
217
|
+
name: 'folder icon'
|
218
|
+
},
|
215
219
|
alt: "folder icon"
|
216
220
|
}), ___EmotionJSX(Text, {
|
217
221
|
className: classNames
|
@@ -219,7 +223,9 @@ var TreeViewRow = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
219
223
|
icon: lastIcon,
|
220
224
|
size: 15,
|
221
225
|
color: "accent.80",
|
222
|
-
title:
|
226
|
+
title: {
|
227
|
+
name: 'lock icon'
|
228
|
+
},
|
223
229
|
alt: "lock icon"
|
224
230
|
})));
|
225
231
|
});
|