@instructure/ui-drilldown 10.16.1-snapshot-0 → 10.16.1

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/es/Drilldown/DrilldownGroup/__new-tests__/DrilldownGroup.test.js +448 -325
  3. package/es/Drilldown/DrilldownGroup/index.js +0 -1
  4. package/es/Drilldown/DrilldownOption/__new-tests__/DrilldownOption.test.js +422 -309
  5. package/es/Drilldown/DrilldownOption/index.js +0 -1
  6. package/es/Drilldown/DrilldownPage/__new-tests__/DrilldownPage.test.js +201 -147
  7. package/es/Drilldown/DrilldownPage/index.js +0 -1
  8. package/es/Drilldown/DrilldownSeparator/__new-tests__/DrilldownSeparator.test.js +22 -17
  9. package/es/Drilldown/DrilldownSeparator/index.js +0 -1
  10. package/es/Drilldown/__examples__/Drilldown.examples.js +99 -82
  11. package/es/Drilldown/__new-tests__/Drilldown.test.js +533 -352
  12. package/es/Drilldown/index.js +144 -126
  13. package/lib/Drilldown/DrilldownGroup/__new-tests__/DrilldownGroup.test.js +463 -340
  14. package/lib/Drilldown/DrilldownGroup/index.js +0 -1
  15. package/lib/Drilldown/DrilldownOption/__new-tests__/DrilldownOption.test.js +448 -336
  16. package/lib/Drilldown/DrilldownOption/index.js +0 -1
  17. package/lib/Drilldown/DrilldownPage/__new-tests__/DrilldownPage.test.js +221 -167
  18. package/lib/Drilldown/DrilldownPage/index.js +0 -2
  19. package/lib/Drilldown/DrilldownSeparator/__new-tests__/DrilldownSeparator.test.js +25 -21
  20. package/lib/Drilldown/DrilldownSeparator/index.js +0 -1
  21. package/lib/Drilldown/__examples__/Drilldown.examples.js +99 -83
  22. package/lib/Drilldown/__new-tests__/Drilldown.test.js +568 -387
  23. package/lib/Drilldown/index.js +143 -126
  24. package/package.json +21 -21
  25. package/src/Drilldown/DrilldownGroup/__new-tests__/DrilldownGroup.test.tsx +0 -1
  26. package/src/Drilldown/DrilldownGroup/index.tsx +0 -1
  27. package/src/Drilldown/DrilldownOption/__new-tests__/DrilldownOption.test.tsx +1 -1
  28. package/src/Drilldown/DrilldownOption/index.tsx +0 -1
  29. package/src/Drilldown/DrilldownPage/__new-tests__/DrilldownPage.test.tsx +0 -1
  30. package/src/Drilldown/DrilldownPage/index.tsx +0 -1
  31. package/src/Drilldown/DrilldownSeparator/__new-tests__/DrilldownSeparator.test.tsx +0 -1
  32. package/src/Drilldown/DrilldownSeparator/index.tsx +0 -1
  33. package/src/Drilldown/__examples__/Drilldown.examples.tsx +0 -2
  34. package/src/Drilldown/__new-tests__/Drilldown.test.tsx +0 -1
  35. package/src/Drilldown/index.tsx +4 -6
  36. package/tsconfig.build.tsbuildinfo +1 -1
  37. package/types/Drilldown/DrilldownGroup/__new-tests__/DrilldownGroup.test.d.ts.map +1 -1
  38. package/types/Drilldown/DrilldownGroup/index.d.ts +0 -1
  39. package/types/Drilldown/DrilldownGroup/index.d.ts.map +1 -1
  40. package/types/Drilldown/DrilldownOption/index.d.ts +0 -1
  41. package/types/Drilldown/DrilldownOption/index.d.ts.map +1 -1
  42. package/types/Drilldown/DrilldownPage/__new-tests__/DrilldownPage.test.d.ts.map +1 -1
  43. package/types/Drilldown/DrilldownPage/index.d.ts +0 -1
  44. package/types/Drilldown/DrilldownPage/index.d.ts.map +1 -1
  45. package/types/Drilldown/DrilldownSeparator/__new-tests__/DrilldownSeparator.test.d.ts.map +1 -1
  46. package/types/Drilldown/DrilldownSeparator/index.d.ts +0 -1
  47. package/types/Drilldown/DrilldownSeparator/index.d.ts.map +1 -1
  48. package/types/Drilldown/__examples__/Drilldown.examples.d.ts.map +1 -1
  49. package/types/Drilldown/__new-tests__/Drilldown.test.d.ts.map +1 -1
  50. package/types/Drilldown/index.d.ts +7 -10
  51. package/types/Drilldown/index.d.ts.map +1 -1
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- var _react = _interopRequireDefault(require("react"));
5
- var _react2 = require("@testing-library/react");
4
+ var _react = require("@testing-library/react");
6
5
  var _vitest = require("vitest");
7
6
  var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
8
7
  require("@testing-library/jest-dom");
@@ -11,6 +10,7 @@ var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
11
10
  var _IconCheckSolid = require("@instructure/ui-icons/lib/IconCheckSolid.js");
12
11
  var _index = require("../index");
13
12
  var _Drilldown16 = _interopRequireDefault(require("../__examples__/Drilldown.examples"));
13
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
14
14
  var _Drilldown, _Drilldown2, _Drilldown3, _Drilldown4, _Drilldown5, _Drilldown6, _Drilldown7, _Drilldown8, _Drilldown9, _Drilldown$Page, _button, _Drilldown$Page2, _button2, _Drilldown$Page3, _Drilldown$Page4, _button3, _Drilldown$Page5, _button4, _Drilldown$Page6, _Drilldown$Page7, _button5, _Drilldown$Page8, _button6, _Drilldown$Page9, _Drilldown10, _button7, _Drilldown$Page10, _Drilldown11, _button8, _Drilldown$Page11, _button9, _Drilldown$Page12, _button10, _Drilldown$Page13, _Drilldown12, _button11, _Drilldown$Page14, _Drilldown13, _button12, _Drilldown$Page15, _button13, _Drilldown$Page16, _button14, _Drilldown$Page17, _button15, _Drilldown$Page18, _button16, _Drilldown$Page19, _button17, _Drilldown$Page20, _button18, _Drilldown$Page21, _button19, _Drilldown$Page22, _Drilldown14, _Drilldown15;
15
15
  /*
16
16
  * The MIT License (MIT)
@@ -54,20 +54,25 @@ describe('<Drilldown />', () => {
54
54
  });
55
55
  describe('rootPageId prop', () => {
56
56
  it('should set the initial page and render it', async () => {
57
- (0, _react2.render)(_Drilldown || (_Drilldown = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
58
- rootPageId: "page1"
59
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
60
- id: "page0"
61
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
62
- id: "option01"
63
- }, "Option-01")), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
64
- id: "page1"
65
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
66
- id: "option11"
67
- }, "Option-11")))));
68
- const drilldown = _react2.screen.getByRole('menu');
69
- const options = _react2.screen.getAllByRole('menuitem');
70
- const rootlessOption = _react2.screen.queryByText('Option-01');
57
+ (0, _react.render)(_Drilldown || (_Drilldown = (0, _jsxRuntime.jsxs)(_index.Drilldown, {
58
+ rootPageId: "page1",
59
+ children: [(0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
60
+ id: "page0",
61
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
62
+ id: "option01",
63
+ children: "Option-01"
64
+ })
65
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
66
+ id: "page1",
67
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
68
+ id: "option11",
69
+ children: "Option-11"
70
+ })
71
+ })]
72
+ })));
73
+ const drilldown = _react.screen.getByRole('menu');
74
+ const options = _react.screen.getAllByRole('menuitem');
75
+ const rootlessOption = _react.screen.queryByText('Option-01');
71
76
  expect(drilldown).toBeInTheDocument();
72
77
  expect(rootlessOption).not.toBeInTheDocument();
73
78
  expect(options.length).toBe(1);
@@ -77,14 +82,16 @@ describe('<Drilldown />', () => {
77
82
  });
78
83
  describe('children prop', () => {
79
84
  it('should not allow non-DrilldownPage children', async () => {
80
- (0, _react2.render)(_Drilldown2 || (_Drilldown2 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
81
- rootPageId: "page0"
82
- }, /*#__PURE__*/_react.default.createElement("div", {
83
- id: "testDiv"
84
- }, "DIV-child"))));
85
- const drilldown = _react2.screen.queryByRole('menu');
86
- const options = _react2.screen.queryAllByRole('menuitem');
87
- const notAllowedChild = _react2.screen.queryByText('DIV-child');
85
+ (0, _react.render)(_Drilldown2 || (_Drilldown2 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
86
+ rootPageId: "page0",
87
+ children: (0, _jsxRuntime.jsx)("div", {
88
+ id: "testDiv",
89
+ children: "DIV-child"
90
+ })
91
+ })));
92
+ const drilldown = _react.screen.queryByRole('menu');
93
+ const options = _react.screen.queryAllByRole('menuitem');
94
+ const notAllowedChild = _react.screen.queryByText('DIV-child');
88
95
  expect(drilldown).not.toBeInTheDocument();
89
96
  expect(options.length).toBe(0);
90
97
  expect(notAllowedChild).not.toBeInTheDocument();
@@ -92,50 +99,61 @@ describe('<Drilldown />', () => {
92
99
  });
93
100
  describe('id prop', () => {
94
101
  it('should put id attr on the drilldown', async () => {
95
- (0, _react2.render)(_Drilldown3 || (_Drilldown3 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
102
+ (0, _react.render)(_Drilldown3 || (_Drilldown3 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
96
103
  rootPageId: "page0",
97
- id: "testId"
98
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
99
- id: "page0"
100
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
101
- id: "option01"
102
- }, "Option")))));
103
- const drilldown = _react2.screen.getByRole('menu');
104
+ id: "testId",
105
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
106
+ id: "page0",
107
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
108
+ id: "option01",
109
+ children: "Option"
110
+ })
111
+ })
112
+ })));
113
+ const drilldown = _react.screen.getByRole('menu');
104
114
  expect(drilldown).toBeInTheDocument();
105
115
  expect(drilldown).toHaveAttribute('id', 'testId');
106
116
  });
107
117
  });
108
118
  describe('label prop', () => {
109
119
  it('should be added as aria-label', async () => {
110
- (0, _react2.render)(_Drilldown4 || (_Drilldown4 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
120
+ (0, _react.render)(_Drilldown4 || (_Drilldown4 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
111
121
  rootPageId: "page0",
112
- label: "testLabel"
113
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
114
- id: "page0"
115
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
116
- id: "option01"
117
- }, "Option")))));
118
- const drilldown = _react2.screen.getByRole('menu');
122
+ label: "testLabel",
123
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
124
+ id: "page0",
125
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
126
+ id: "option01",
127
+ children: "Option"
128
+ })
129
+ })
130
+ })));
131
+ const drilldown = _react.screen.getByRole('menu');
119
132
  expect(drilldown).toBeInTheDocument();
120
133
  expect(drilldown).toHaveAttribute('aria-label', 'testLabel');
121
134
  });
122
135
  });
123
136
  describe('disabled prop', () => {
124
137
  it('should disable all options', async () => {
125
- (0, _react2.render)(_Drilldown5 || (_Drilldown5 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
138
+ (0, _react.render)(_Drilldown5 || (_Drilldown5 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
126
139
  rootPageId: "page0",
127
- disabled: true
128
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
129
- id: "page0",
130
- renderActionLabel: "Action"
131
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
132
- id: "option01"
133
- }, "Option"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
134
- id: "option02"
135
- }, "Option"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
136
- id: "option03"
137
- }, "Option")))));
138
- const options = _react2.screen.getAllByRole('menuitem');
140
+ disabled: true,
141
+ children: (0, _jsxRuntime.jsxs)(_index.Drilldown.Page, {
142
+ id: "page0",
143
+ renderActionLabel: "Action",
144
+ children: [(0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
145
+ id: "option01",
146
+ children: "Option"
147
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
148
+ id: "option02",
149
+ children: "Option"
150
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
151
+ id: "option03",
152
+ children: "Option"
153
+ })]
154
+ })
155
+ })));
156
+ const options = _react.screen.getAllByRole('menuitem');
139
157
  expect(options.length).toBe(4); // header action + 3 options
140
158
 
141
159
  options.forEach(option => {
@@ -145,26 +163,32 @@ describe('<Drilldown />', () => {
145
163
  });
146
164
  describe('as prop', () => {
147
165
  it('should be "ul" by default', async () => {
148
- const _render = (0, _react2.render)(_Drilldown6 || (_Drilldown6 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
149
- rootPageId: "page0"
150
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
151
- id: "page0"
152
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
153
- id: "option01"
154
- }, "Option"))))),
166
+ const _render = (0, _react.render)(_Drilldown6 || (_Drilldown6 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
167
+ rootPageId: "page0",
168
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
169
+ id: "page0",
170
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
171
+ id: "option01",
172
+ children: "Option"
173
+ })
174
+ })
175
+ }))),
155
176
  container = _render.container;
156
177
  const drilldownList = container.querySelector('[class$="-options__list"]');
157
178
  expect(drilldownList === null || drilldownList === void 0 ? void 0 : drilldownList.tagName).toBe('UL');
158
179
  });
159
180
  it('should render as passed element', async () => {
160
- const _render2 = (0, _react2.render)(_Drilldown7 || (_Drilldown7 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
181
+ const _render2 = (0, _react.render)(_Drilldown7 || (_Drilldown7 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
161
182
  rootPageId: "page0",
162
- as: "ol"
163
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
164
- id: "page0"
165
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
166
- id: "option01"
167
- }, "Option"))))),
183
+ as: "ol",
184
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
185
+ id: "page0",
186
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
187
+ id: "option01",
188
+ children: "Option"
189
+ })
190
+ })
191
+ }))),
168
192
  container = _render2.container;
169
193
  const drilldownList = container.querySelector('[class$="-options__list"]');
170
194
  expect(drilldownList === null || drilldownList === void 0 ? void 0 : drilldownList.tagName).toBe('OL');
@@ -172,26 +196,32 @@ describe('<Drilldown />', () => {
172
196
  });
173
197
  describe('role prop', () => {
174
198
  it('should be "menu" by default', async () => {
175
- const _render3 = (0, _react2.render)(_Drilldown8 || (_Drilldown8 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
176
- rootPageId: "page0"
177
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
178
- id: "page0"
179
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
180
- id: "option01"
181
- }, "Option"))))),
199
+ const _render3 = (0, _react.render)(_Drilldown8 || (_Drilldown8 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
200
+ rootPageId: "page0",
201
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
202
+ id: "page0",
203
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
204
+ id: "option01",
205
+ children: "Option"
206
+ })
207
+ })
208
+ }))),
182
209
  container = _render3.container;
183
210
  const drilldown = container.querySelector('div[id^="Drilldown_"]');
184
211
  expect(drilldown).toHaveAttribute('role', 'menu');
185
212
  });
186
213
  it('should apply passed role', async () => {
187
- const _render4 = (0, _react2.render)(_Drilldown9 || (_Drilldown9 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
214
+ const _render4 = (0, _react.render)(_Drilldown9 || (_Drilldown9 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
188
215
  rootPageId: "page0",
189
- role: "list"
190
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
191
- id: "page0"
192
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
193
- id: "option01"
194
- }, "Option"))))),
216
+ role: "list",
217
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
218
+ id: "page0",
219
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
220
+ id: "option01",
221
+ children: "Option"
222
+ })
223
+ })
224
+ }))),
195
225
  container = _render4.container;
196
226
  const drilldown = container.querySelector('div[id^="Drilldown_"]');
197
227
  expect(drilldown).toHaveAttribute('role', 'list');
@@ -200,31 +230,39 @@ describe('<Drilldown />', () => {
200
230
  describe('elementRef prop (and ref static prop)', () => {
201
231
  it('should give back the drilldown element when there is no trigger', async () => {
202
232
  const elementRef = _vitest.vi.fn();
203
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
233
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
204
234
  rootPageId: "page0",
205
- elementRef: elementRef
206
- }, _Drilldown$Page || (_Drilldown$Page = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
207
- id: "page0"
208
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
209
- id: "option01"
210
- }, "Option")))));
211
- const drilldown = _react2.screen.getByRole('menu');
235
+ elementRef: elementRef,
236
+ children: _Drilldown$Page || (_Drilldown$Page = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
237
+ id: "page0",
238
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
239
+ id: "option01",
240
+ children: "Option"
241
+ })
242
+ }))
243
+ }));
244
+ const drilldown = _react.screen.getByRole('menu');
212
245
  expect(drilldown).toBeInTheDocument();
213
246
  expect(elementRef).toHaveBeenCalledWith(drilldown);
214
247
  });
215
248
  it('should give back the Popover root when drilldown has trigger and is closed', async () => {
216
249
  const elementRef = _vitest.vi.fn();
217
- const _render5 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
250
+ const _render5 = (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
218
251
  rootPageId: "page0",
219
252
  elementRef: elementRef,
220
- trigger: _button || (_button = /*#__PURE__*/_react.default.createElement("button", null, "Toggle"))
221
- }, _Drilldown$Page2 || (_Drilldown$Page2 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
222
- id: "page0"
223
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
224
- id: "option01"
225
- }, "Option"))))),
253
+ trigger: _button || (_button = (0, _jsxRuntime.jsx)("button", {
254
+ children: "Toggle"
255
+ })),
256
+ children: _Drilldown$Page2 || (_Drilldown$Page2 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
257
+ id: "page0",
258
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
259
+ id: "option01",
260
+ children: "Option"
261
+ })
262
+ }))
263
+ })),
226
264
  container = _render5.container;
227
- const trigger = _react2.screen.getByText('Toggle');
265
+ const trigger = _react.screen.getByText('Toggle');
228
266
  const positionId = trigger.getAttribute('data-position-target');
229
267
  const drilldownRoot = container.querySelector(`span[data-position="${positionId}"]`);
230
268
  expect(drilldownRoot).toBeInTheDocument();
@@ -232,18 +270,23 @@ describe('<Drilldown />', () => {
232
270
  });
233
271
  it('should give back the the Popover root when drilldown has trigger and is open', async () => {
234
272
  const elementRef = _vitest.vi.fn();
235
- const _render6 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
273
+ const _render6 = (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
236
274
  rootPageId: "page0",
237
275
  elementRef: elementRef,
238
- trigger: _button2 || (_button2 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
239
- defaultShow: true
240
- }, _Drilldown$Page3 || (_Drilldown$Page3 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
241
- id: "page0"
242
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
243
- id: "option01"
244
- }, "Option"))))),
276
+ trigger: _button2 || (_button2 = (0, _jsxRuntime.jsx)("button", {
277
+ children: "Toggle"
278
+ })),
279
+ defaultShow: true,
280
+ children: _Drilldown$Page3 || (_Drilldown$Page3 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
281
+ id: "page0",
282
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
283
+ id: "option01",
284
+ children: "Option"
285
+ })
286
+ }))
287
+ })),
245
288
  container = _render6.container;
246
- const trigger = _react2.screen.getByText('Toggle');
289
+ const trigger = _react.screen.getByText('Toggle');
247
290
  const positionId = trigger.getAttribute('data-position-target');
248
291
  const drilldownRoot = container.querySelector(`span[data-position="${positionId}"]`);
249
292
  expect(drilldownRoot).toBeInTheDocument();
@@ -253,72 +296,93 @@ describe('<Drilldown />', () => {
253
296
  describe('drilldownRef prop', () => {
254
297
  it('should give back the drilldown element when there is no trigger', async () => {
255
298
  const drilldownRef = _vitest.vi.fn();
256
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
299
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
257
300
  rootPageId: "page0",
258
- drilldownRef: drilldownRef
259
- }, _Drilldown$Page4 || (_Drilldown$Page4 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
260
- id: "page0"
261
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
262
- id: "option01"
263
- }, "Option")))));
264
- const drilldown = _react2.screen.getByRole('menu');
301
+ drilldownRef: drilldownRef,
302
+ children: _Drilldown$Page4 || (_Drilldown$Page4 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
303
+ id: "page0",
304
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
305
+ id: "option01",
306
+ children: "Option"
307
+ })
308
+ }))
309
+ }));
310
+ const drilldown = _react.screen.getByRole('menu');
265
311
  expect(drilldownRef).toHaveBeenCalledWith(drilldown);
266
312
  });
267
313
  it("shouldn't be called when drilldown has trigger and is closed", async () => {
268
314
  const drilldownRef = _vitest.vi.fn();
269
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
315
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
270
316
  rootPageId: "page0",
271
317
  drilldownRef: drilldownRef,
272
- trigger: _button3 || (_button3 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle"))
273
- }, _Drilldown$Page5 || (_Drilldown$Page5 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
274
- id: "page0"
275
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
276
- id: "option01"
277
- }, "Option")))));
318
+ trigger: _button3 || (_button3 = (0, _jsxRuntime.jsx)("button", {
319
+ children: "Toggle"
320
+ })),
321
+ children: _Drilldown$Page5 || (_Drilldown$Page5 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
322
+ id: "page0",
323
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
324
+ id: "option01",
325
+ children: "Option"
326
+ })
327
+ }))
328
+ }));
278
329
  expect(drilldownRef).not.toHaveBeenCalled();
279
330
  });
280
331
  it('should give back the drilldown element when drilldown has trigger and is open', async () => {
281
332
  const drilldownRef = _vitest.vi.fn();
282
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
333
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
283
334
  rootPageId: "page0",
284
335
  drilldownRef: drilldownRef,
285
- trigger: _button4 || (_button4 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
286
- defaultShow: true
287
- }, _Drilldown$Page6 || (_Drilldown$Page6 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
288
- id: "page0"
289
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
290
- id: "option01"
291
- }, "Option")))));
292
- const drilldown = _react2.screen.getByRole('menu');
336
+ trigger: _button4 || (_button4 = (0, _jsxRuntime.jsx)("button", {
337
+ children: "Toggle"
338
+ })),
339
+ defaultShow: true,
340
+ children: _Drilldown$Page6 || (_Drilldown$Page6 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
341
+ id: "page0",
342
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
343
+ id: "option01",
344
+ children: "Option"
345
+ })
346
+ }))
347
+ }));
348
+ const drilldown = _react.screen.getByRole('menu');
293
349
  expect(drilldownRef).toHaveBeenCalledWith(drilldown);
294
350
  });
295
351
  });
296
352
  describe('popoverRef prop', () => {
297
353
  it('should not be called when there is no trigger', async () => {
298
354
  const popoverRef = _vitest.vi.fn();
299
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
355
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
300
356
  rootPageId: "page0",
301
- popoverRef: popoverRef
302
- }, _Drilldown$Page7 || (_Drilldown$Page7 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
303
- id: "page0"
304
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
305
- id: "option01"
306
- }, "Option")))));
357
+ popoverRef: popoverRef,
358
+ children: _Drilldown$Page7 || (_Drilldown$Page7 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
359
+ id: "page0",
360
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
361
+ id: "option01",
362
+ children: "Option"
363
+ })
364
+ }))
365
+ }));
307
366
  expect(popoverRef).not.toHaveBeenCalled();
308
367
  });
309
368
  it('should give back the Popover component when drilldown has trigger and is closed', async () => {
310
369
  const popoverRef = _vitest.vi.fn();
311
- const _render7 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
370
+ const _render7 = (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
312
371
  rootPageId: "page0",
313
372
  popoverRef: popoverRef,
314
- trigger: _button5 || (_button5 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle"))
315
- }, _Drilldown$Page8 || (_Drilldown$Page8 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
316
- id: "page0"
317
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
318
- id: "option01"
319
- }, "Option"))))),
373
+ trigger: _button5 || (_button5 = (0, _jsxRuntime.jsx)("button", {
374
+ children: "Toggle"
375
+ })),
376
+ children: _Drilldown$Page8 || (_Drilldown$Page8 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
377
+ id: "page0",
378
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
379
+ id: "option01",
380
+ children: "Option"
381
+ })
382
+ }))
383
+ })),
320
384
  container = _render7.container;
321
- const trigger = _react2.screen.getByText('Toggle');
385
+ const trigger = _react.screen.getByText('Toggle');
322
386
  const positionId = trigger.getAttribute('data-position-target');
323
387
  const popoverRoot = container.querySelector(`span[data-position="${positionId}"]`);
324
388
  expect(popoverRoot).toBeInTheDocument();
@@ -329,18 +393,23 @@ describe('<Drilldown />', () => {
329
393
  });
330
394
  it('should give back the Popover component when drilldown has trigger and is open', async () => {
331
395
  const popoverRef = _vitest.vi.fn();
332
- const _render8 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
396
+ const _render8 = (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
333
397
  rootPageId: "page0",
334
398
  popoverRef: popoverRef,
335
- trigger: _button6 || (_button6 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
336
- defaultShow: true
337
- }, _Drilldown$Page9 || (_Drilldown$Page9 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
338
- id: "page0"
339
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
340
- id: "option01"
341
- }, "Option"))))),
399
+ trigger: _button6 || (_button6 = (0, _jsxRuntime.jsx)("button", {
400
+ children: "Toggle"
401
+ })),
402
+ defaultShow: true,
403
+ children: _Drilldown$Page9 || (_Drilldown$Page9 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
404
+ id: "page0",
405
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
406
+ id: "option01",
407
+ children: "Option"
408
+ })
409
+ }))
410
+ })),
342
411
  container = _render8.container;
343
- const trigger = _react2.screen.getByText('Toggle');
412
+ const trigger = _react.screen.getByText('Toggle');
344
413
  const positionId = trigger.getAttribute('data-position-target');
345
414
  const popoverRoot = container.querySelector(`span[data-position="${positionId}"]`);
346
415
  expect(popoverRoot).toBeInTheDocument();
@@ -353,20 +422,22 @@ describe('<Drilldown />', () => {
353
422
  describe('onSelect prop', () => {
354
423
  it('should fire when option is selected', async () => {
355
424
  const onSelect = _vitest.vi.fn();
356
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
425
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
357
426
  rootPageId: "page0",
358
- onSelect: onSelect
359
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
360
- id: "page0"
361
- }, data.map(option => /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
362
- id: option.id,
363
- value: option.id,
364
- key: option.id,
365
- "data-testid": option.id
366
- }, option.label)))));
367
- const option_1 = _react2.screen.getByTestId('opt_1');
427
+ onSelect: onSelect,
428
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
429
+ id: "page0",
430
+ children: data.map(option => (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
431
+ id: option.id,
432
+ value: option.id,
433
+ "data-testid": option.id,
434
+ children: option.label
435
+ }, option.id))
436
+ })
437
+ }));
438
+ const option_1 = _react.screen.getByTestId('opt_1');
368
439
  await _userEvent.default.click(option_1);
369
- await (0, _react2.waitFor)(() => {
440
+ await (0, _react.waitFor)(() => {
370
441
  expect(onSelect).toHaveBeenCalled();
371
442
  const args = onSelect.mock.calls[0][1];
372
443
  const event = onSelect.mock.calls[0][0];
@@ -382,86 +453,108 @@ describe('<Drilldown />', () => {
382
453
  });
383
454
  it('should not fire when drilldown is disabled', async () => {
384
455
  const onSelect = _vitest.vi.fn();
385
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
456
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
386
457
  rootPageId: "page0",
387
458
  onSelect: onSelect,
388
- disabled: true
389
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
390
- id: "page0"
391
- }, data.map(option => /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
392
- id: option.id,
393
- key: option.id,
394
- "data-testid": option.id
395
- }, option.label)))));
396
- const option_1 = _react2.screen.getByTestId('opt_1');
459
+ disabled: true,
460
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
461
+ id: "page0",
462
+ children: data.map(option => (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
463
+ id: option.id,
464
+ "data-testid": option.id,
465
+ children: option.label
466
+ }, option.id))
467
+ })
468
+ }));
469
+ const option_1 = _react.screen.getByTestId('opt_1');
397
470
  await _userEvent.default.click(option_1);
398
- await (0, _react2.waitFor)(() => {
471
+ await (0, _react.waitFor)(() => {
399
472
  expect(onSelect).not.toHaveBeenCalled();
400
473
  });
401
474
  });
402
475
  });
403
476
  describe('with a trigger', () => {
404
477
  it('should not show content by default', async () => {
405
- (0, _react2.render)(_Drilldown10 || (_Drilldown10 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
478
+ (0, _react.render)(_Drilldown10 || (_Drilldown10 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
406
479
  rootPageId: "page0",
407
- trigger: /*#__PURE__*/_react.default.createElement("button", null, "click me")
408
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
409
- id: "page0"
410
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
411
- id: "option0"
412
- }, "Option 0")))));
413
- const option_0 = _react2.screen.queryByText('Option 0');
480
+ trigger: (0, _jsxRuntime.jsx)("button", {
481
+ children: "click me"
482
+ }),
483
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
484
+ id: "page0",
485
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
486
+ id: "option0",
487
+ children: "Option 0"
488
+ })
489
+ })
490
+ })));
491
+ const option_0 = _react.screen.queryByText('Option 0');
414
492
  expect(option_0).not.toBeInTheDocument();
415
493
  });
416
494
  it('should render into a mountNode', async () => {
417
495
  const container = document.createElement('div');
418
496
  container.setAttribute('data-testid', 'container');
419
497
  document.body.appendChild(container);
420
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
498
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
421
499
  rootPageId: "page0",
422
500
  mountNode: container,
423
- trigger: _button7 || (_button7 = /*#__PURE__*/_react.default.createElement("button", null, "Options"))
424
- }, _Drilldown$Page10 || (_Drilldown$Page10 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
425
- id: "page0"
426
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
427
- id: "option0"
428
- }, "Option 0")))));
429
- const optionsContainer = _react2.screen.getByTestId('container');
430
- const trigger = _react2.screen.getByRole('button');
501
+ trigger: _button7 || (_button7 = (0, _jsxRuntime.jsx)("button", {
502
+ children: "Options"
503
+ })),
504
+ children: _Drilldown$Page10 || (_Drilldown$Page10 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
505
+ id: "page0",
506
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
507
+ id: "option0",
508
+ children: "Option 0"
509
+ })
510
+ }))
511
+ }));
512
+ const optionsContainer = _react.screen.getByTestId('container');
513
+ const trigger = _react.screen.getByRole('button');
431
514
  expect(optionsContainer).not.toHaveTextContent('Option 0');
432
515
  await _userEvent.default.click(trigger);
433
- await (0, _react2.waitFor)(() => {
434
- const updatedOptionsContainer = _react2.screen.getByTestId('container');
516
+ await (0, _react.waitFor)(() => {
517
+ const updatedOptionsContainer = _react.screen.getByTestId('container');
435
518
  expect(updatedOptionsContainer).toHaveTextContent('Option 0');
436
519
  });
437
520
  });
438
521
  it('should have an aria-haspopup attribute', async () => {
439
- (0, _react2.render)(_Drilldown11 || (_Drilldown11 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
522
+ (0, _react.render)(_Drilldown11 || (_Drilldown11 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
440
523
  rootPageId: "page0",
441
- trigger: /*#__PURE__*/_react.default.createElement("button", null, "Options")
442
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
443
- id: "page0"
444
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
445
- id: "option0"
446
- }, "Option 0")))));
447
- const trigger = _react2.screen.getByRole('button');
524
+ trigger: (0, _jsxRuntime.jsx)("button", {
525
+ children: "Options"
526
+ }),
527
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
528
+ id: "page0",
529
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
530
+ id: "option0",
531
+ children: "Option 0"
532
+ })
533
+ })
534
+ })));
535
+ const trigger = _react.screen.getByRole('button');
448
536
  expect(trigger).toHaveAttribute('aria-haspopup');
449
537
  });
450
538
  it('should call onToggle when Drilldown is opened', async () => {
451
539
  const onToggle = _vitest.vi.fn();
452
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
540
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
453
541
  rootPageId: "page0",
454
- trigger: _button8 || (_button8 = /*#__PURE__*/_react.default.createElement("button", null, "Options")),
542
+ trigger: _button8 || (_button8 = (0, _jsxRuntime.jsx)("button", {
543
+ children: "Options"
544
+ })),
455
545
  onToggle: onToggle,
456
- "data-testid": "drilldown"
457
- }, _Drilldown$Page11 || (_Drilldown$Page11 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
458
- id: "page0"
459
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
460
- id: "option0"
461
- }, "Option 0")))));
462
- const trigger = _react2.screen.getByRole('button');
546
+ "data-testid": "drilldown",
547
+ children: _Drilldown$Page11 || (_Drilldown$Page11 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
548
+ id: "page0",
549
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
550
+ id: "option0",
551
+ children: "Option 0"
552
+ })
553
+ }))
554
+ }));
555
+ const trigger = _react.screen.getByRole('button');
463
556
  await _userEvent.default.click(trigger);
464
- await (0, _react2.waitFor)(() => {
557
+ await (0, _react.waitFor)(() => {
465
558
  expect(onToggle).toHaveBeenCalled();
466
559
  const args = onToggle.mock.calls[0][1];
467
560
  expect(args).toHaveProperty('shown', true);
@@ -474,19 +567,24 @@ describe('<Drilldown />', () => {
474
567
  });
475
568
  it('should call onToggle when Drilldown is closed', async () => {
476
569
  const onToggle = _vitest.vi.fn();
477
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
570
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
478
571
  rootPageId: "page0",
479
- trigger: _button9 || (_button9 = /*#__PURE__*/_react.default.createElement("button", null, "Options")),
572
+ trigger: _button9 || (_button9 = (0, _jsxRuntime.jsx)("button", {
573
+ children: "Options"
574
+ })),
480
575
  onToggle: onToggle,
481
- defaultShow: true
482
- }, _Drilldown$Page12 || (_Drilldown$Page12 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
483
- id: "page0"
484
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
485
- id: "option0"
486
- }, "Option 0")))));
487
- const trigger = _react2.screen.getByRole('button');
576
+ defaultShow: true,
577
+ children: _Drilldown$Page12 || (_Drilldown$Page12 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
578
+ id: "page0",
579
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
580
+ id: "option0",
581
+ children: "Option 0"
582
+ })
583
+ }))
584
+ }));
585
+ const trigger = _react.screen.getByRole('button');
488
586
  await _userEvent.default.click(trigger);
489
- await (0, _react2.waitFor)(() => {
587
+ await (0, _react.waitFor)(() => {
490
588
  expect(onToggle).toHaveBeenCalled();
491
589
  const args = onToggle.mock.calls[0][1];
492
590
  expect(args).toHaveProperty('shown', false);
@@ -500,65 +598,85 @@ describe('<Drilldown />', () => {
500
598
  describe('placement prop', () => {
501
599
  it('should be passed to Popover', async () => {
502
600
  let popoverRef = null;
503
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
601
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
504
602
  rootPageId: "page0",
505
- trigger: _button10 || (_button10 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
603
+ trigger: _button10 || (_button10 = (0, _jsxRuntime.jsx)("button", {
604
+ children: "Toggle"
605
+ })),
506
606
  defaultShow: true,
507
607
  popoverRef: e => {
508
608
  popoverRef = e;
509
609
  },
510
- placement: 'top start'
511
- }, _Drilldown$Page13 || (_Drilldown$Page13 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
512
- id: "page0"
513
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
514
- id: "option01"
515
- }, "Option")))));
610
+ placement: 'top start',
611
+ children: _Drilldown$Page13 || (_Drilldown$Page13 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
612
+ id: "page0",
613
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
614
+ id: "option01",
615
+ children: "Option"
616
+ })
617
+ }))
618
+ }));
516
619
  const popoverProps = popoverRef.props;
517
620
  expect(popoverProps.placement).toBe('top start');
518
621
  });
519
622
  });
520
623
  describe('defaultShow prop', () => {
521
624
  it('should display Popover on render', async () => {
522
- (0, _react2.render)(_Drilldown12 || (_Drilldown12 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
625
+ (0, _react.render)(_Drilldown12 || (_Drilldown12 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
523
626
  rootPageId: "page0",
524
- trigger: /*#__PURE__*/_react.default.createElement("button", null, "Toggle"),
525
- defaultShow: true
526
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
527
- id: "page0"
528
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
529
- id: "option01"
530
- }, "Option")))));
531
- const popoverContent = _react2.screen.getByText('Option');
627
+ trigger: (0, _jsxRuntime.jsx)("button", {
628
+ children: "Toggle"
629
+ }),
630
+ defaultShow: true,
631
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
632
+ id: "page0",
633
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
634
+ id: "option01",
635
+ children: "Option"
636
+ })
637
+ })
638
+ })));
639
+ const popoverContent = _react.screen.getByText('Option');
532
640
  expect(popoverContent).toBeVisible();
533
641
  });
534
642
  });
535
643
  describe('show prop', () => {
536
644
  it('should display popover', async () => {
537
645
  const onToggle = _vitest.vi.fn();
538
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
646
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
539
647
  rootPageId: "page0",
540
- trigger: _button11 || (_button11 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
648
+ trigger: _button11 || (_button11 = (0, _jsxRuntime.jsx)("button", {
649
+ children: "Toggle"
650
+ })),
541
651
  show: true,
542
- onToggle: onToggle
543
- }, _Drilldown$Page14 || (_Drilldown$Page14 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
544
- id: "page0"
545
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
546
- id: "option01"
547
- }, "Option")))));
548
- const popoverContent = _react2.screen.getByText('Option');
652
+ onToggle: onToggle,
653
+ children: _Drilldown$Page14 || (_Drilldown$Page14 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
654
+ id: "page0",
655
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
656
+ id: "option01",
657
+ children: "Option"
658
+ })
659
+ }))
660
+ }));
661
+ const popoverContent = _react.screen.getByText('Option');
549
662
  expect(popoverContent).toBeVisible();
550
663
  });
551
664
  it('should give error if onToggle is not provided (controllable)', async () => {
552
- (0, _react2.render)(_Drilldown13 || (_Drilldown13 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
665
+ (0, _react.render)(_Drilldown13 || (_Drilldown13 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
553
666
  rootPageId: "page0",
554
- trigger: /*#__PURE__*/_react.default.createElement("button", null, "Toggle"),
555
- show: true
556
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
557
- id: "page0"
558
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
559
- id: "option01"
560
- }, "Option")))));
561
- const popoverContent = _react2.screen.getByText('Option');
667
+ trigger: (0, _jsxRuntime.jsx)("button", {
668
+ children: "Toggle"
669
+ }),
670
+ show: true,
671
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
672
+ id: "page0",
673
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
674
+ id: "option01",
675
+ children: "Option"
676
+ })
677
+ })
678
+ })));
679
+ const popoverContent = _react.screen.getByText('Option');
562
680
  expect(popoverContent).toBeVisible();
563
681
  expect(popoverContent).toBeVisible();
564
682
  expect(consoleErrorMock).toHaveBeenCalled();
@@ -568,18 +686,23 @@ describe('<Drilldown />', () => {
568
686
  it('should be passed to Popover', async () => {
569
687
  let popoverRef = null;
570
688
  const onFocus = _vitest.vi.fn();
571
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
689
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
572
690
  rootPageId: "page0",
573
- trigger: _button12 || (_button12 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
691
+ trigger: _button12 || (_button12 = (0, _jsxRuntime.jsx)("button", {
692
+ children: "Toggle"
693
+ })),
574
694
  popoverRef: e => {
575
695
  popoverRef = e;
576
696
  },
577
- onFocus: onFocus
578
- }, _Drilldown$Page15 || (_Drilldown$Page15 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
579
- id: "page0"
580
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
581
- id: "option01"
582
- }, "Option")))));
697
+ onFocus: onFocus,
698
+ children: _Drilldown$Page15 || (_Drilldown$Page15 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
699
+ id: "page0",
700
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
701
+ id: "option01",
702
+ children: "Option"
703
+ })
704
+ }))
705
+ }));
583
706
  const popoverProps = popoverRef.props;
584
707
  expect(popoverProps.onFocus).toEqual(onFocus);
585
708
  });
@@ -588,18 +711,23 @@ describe('<Drilldown />', () => {
588
711
  it('should be passed to Popover', async () => {
589
712
  let popoverRef = null;
590
713
  const onMouseOver = _vitest.vi.fn();
591
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
714
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
592
715
  rootPageId: "page0",
593
- trigger: _button13 || (_button13 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
716
+ trigger: _button13 || (_button13 = (0, _jsxRuntime.jsx)("button", {
717
+ children: "Toggle"
718
+ })),
594
719
  popoverRef: e => {
595
720
  popoverRef = e;
596
721
  },
597
- onMouseOver: onMouseOver
598
- }, _Drilldown$Page16 || (_Drilldown$Page16 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
599
- id: "page0"
600
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
601
- id: "option01"
602
- }, "Option")))));
722
+ onMouseOver: onMouseOver,
723
+ children: _Drilldown$Page16 || (_Drilldown$Page16 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
724
+ id: "page0",
725
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
726
+ id: "option01",
727
+ children: "Option"
728
+ })
729
+ }))
730
+ }));
603
731
  const popoverProps = popoverRef.props;
604
732
  expect(popoverProps.onMouseOver).toEqual(onMouseOver);
605
733
  });
@@ -607,18 +735,23 @@ describe('<Drilldown />', () => {
607
735
  describe('shouldContainFocus prop', () => {
608
736
  it('should be passed to Popover', async () => {
609
737
  let popoverRef = null;
610
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
738
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
611
739
  rootPageId: "page0",
612
- trigger: _button14 || (_button14 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
740
+ trigger: _button14 || (_button14 = (0, _jsxRuntime.jsx)("button", {
741
+ children: "Toggle"
742
+ })),
613
743
  popoverRef: e => {
614
744
  popoverRef = e;
615
745
  },
616
- shouldContainFocus: true
617
- }, _Drilldown$Page17 || (_Drilldown$Page17 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
618
- id: "page0"
619
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
620
- id: "option01"
621
- }, "Option")))));
746
+ shouldContainFocus: true,
747
+ children: _Drilldown$Page17 || (_Drilldown$Page17 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
748
+ id: "page0",
749
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
750
+ id: "option01",
751
+ children: "Option"
752
+ })
753
+ }))
754
+ }));
622
755
  const popoverProps = popoverRef.props;
623
756
  expect(popoverProps.shouldContainFocus).toEqual(true);
624
757
  });
@@ -626,18 +759,23 @@ describe('<Drilldown />', () => {
626
759
  describe('shouldReturnFocus prop', () => {
627
760
  it('should be passed to Popover', async () => {
628
761
  let popoverRef = null;
629
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
762
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
630
763
  rootPageId: "page0",
631
- trigger: _button15 || (_button15 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
764
+ trigger: _button15 || (_button15 = (0, _jsxRuntime.jsx)("button", {
765
+ children: "Toggle"
766
+ })),
632
767
  popoverRef: e => {
633
768
  popoverRef = e;
634
769
  },
635
- shouldReturnFocus: false
636
- }, _Drilldown$Page18 || (_Drilldown$Page18 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
637
- id: "page0"
638
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
639
- id: "option01"
640
- }, "Option")))));
770
+ shouldReturnFocus: false,
771
+ children: _Drilldown$Page18 || (_Drilldown$Page18 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
772
+ id: "page0",
773
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
774
+ id: "option01",
775
+ children: "Option"
776
+ })
777
+ }))
778
+ }));
641
779
  const popoverProps = popoverRef.props;
642
780
  expect(popoverProps.shouldReturnFocus).toEqual(false);
643
781
  });
@@ -645,18 +783,23 @@ describe('<Drilldown />', () => {
645
783
  describe('withArrow prop', () => {
646
784
  it('should be passed to Popover', async () => {
647
785
  let popoverRef = null;
648
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
786
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
649
787
  rootPageId: "page0",
650
- trigger: _button16 || (_button16 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
788
+ trigger: _button16 || (_button16 = (0, _jsxRuntime.jsx)("button", {
789
+ children: "Toggle"
790
+ })),
651
791
  popoverRef: e => {
652
792
  popoverRef = e;
653
793
  },
654
- withArrow: false
655
- }, _Drilldown$Page19 || (_Drilldown$Page19 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
656
- id: "page0"
657
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
658
- id: "option01"
659
- }, "Option")))));
794
+ withArrow: false,
795
+ children: _Drilldown$Page19 || (_Drilldown$Page19 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
796
+ id: "page0",
797
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
798
+ id: "option01",
799
+ children: "Option"
800
+ })
801
+ }))
802
+ }));
660
803
  const popoverProps = popoverRef.props;
661
804
  expect(popoverProps.withArrow).toEqual(false);
662
805
  });
@@ -664,18 +807,23 @@ describe('<Drilldown />', () => {
664
807
  describe('offsetX prop', () => {
665
808
  it('should be passed to Popover', async () => {
666
809
  let popoverRef = null;
667
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
810
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
668
811
  rootPageId: "page0",
669
- trigger: _button17 || (_button17 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
812
+ trigger: _button17 || (_button17 = (0, _jsxRuntime.jsx)("button", {
813
+ children: "Toggle"
814
+ })),
670
815
  popoverRef: e => {
671
816
  popoverRef = e;
672
817
  },
673
- offsetX: '2rem'
674
- }, _Drilldown$Page20 || (_Drilldown$Page20 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
675
- id: "page0"
676
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
677
- id: "option01"
678
- }, "Option")))));
818
+ offsetX: '2rem',
819
+ children: _Drilldown$Page20 || (_Drilldown$Page20 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
820
+ id: "page0",
821
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
822
+ id: "option01",
823
+ children: "Option"
824
+ })
825
+ }))
826
+ }));
679
827
  const popoverProps = popoverRef.props;
680
828
  expect(popoverProps.offsetX).toEqual('2rem');
681
829
  });
@@ -683,18 +831,23 @@ describe('<Drilldown />', () => {
683
831
  describe('offsetY prop', () => {
684
832
  it('should be passed to Popover', async () => {
685
833
  let popoverRef = null;
686
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
834
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
687
835
  rootPageId: "page0",
688
- trigger: _button18 || (_button18 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
836
+ trigger: _button18 || (_button18 = (0, _jsxRuntime.jsx)("button", {
837
+ children: "Toggle"
838
+ })),
689
839
  popoverRef: e => {
690
840
  popoverRef = e;
691
841
  },
692
- offsetY: '2rem'
693
- }, _Drilldown$Page21 || (_Drilldown$Page21 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
694
- id: "page0"
695
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
696
- id: "option01"
697
- }, "Option")))));
842
+ offsetY: '2rem',
843
+ children: _Drilldown$Page21 || (_Drilldown$Page21 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
844
+ id: "page0",
845
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
846
+ id: "option01",
847
+ children: "Option"
848
+ })
849
+ }))
850
+ }));
698
851
  const popoverProps = popoverRef.props;
699
852
  expect(popoverProps.offsetY).toEqual('2rem');
700
853
  });
@@ -702,80 +855,105 @@ describe('<Drilldown />', () => {
702
855
  describe('positionContainerDisplay prop', () => {
703
856
  it('should be passed to Popover', async () => {
704
857
  let popoverRef = null;
705
- (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.Drilldown, {
858
+ (0, _react.render)((0, _jsxRuntime.jsx)(_index.Drilldown, {
706
859
  rootPageId: "page0",
707
- trigger: _button19 || (_button19 = /*#__PURE__*/_react.default.createElement("button", null, "Toggle")),
860
+ trigger: _button19 || (_button19 = (0, _jsxRuntime.jsx)("button", {
861
+ children: "Toggle"
862
+ })),
708
863
  popoverRef: e => {
709
864
  popoverRef = e;
710
865
  },
711
- positionContainerDisplay: "block"
712
- }, _Drilldown$Page22 || (_Drilldown$Page22 = /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
713
- id: "page0"
714
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
715
- id: "option01"
716
- }, "Option")))));
866
+ positionContainerDisplay: "block",
867
+ children: _Drilldown$Page22 || (_Drilldown$Page22 = (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
868
+ id: "page0",
869
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
870
+ id: "option01",
871
+ children: "Option"
872
+ })
873
+ }))
874
+ }));
717
875
  const popoverProps = popoverRef.props;
718
876
  expect(popoverProps.positionContainerDisplay).toEqual('block');
719
877
  });
720
878
  });
721
879
  describe('for a11y', () => {
722
880
  it('should be accessible', async () => {
723
- const _render9 = (0, _react2.render)(_Drilldown14 || (_Drilldown14 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
724
- rootPageId: "page0"
725
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
726
- id: "page0",
727
- renderTitle: "Page Title",
728
- renderActionLabel: "Action Label"
729
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
730
- id: "item01"
731
- }, "Item1"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
732
- id: "item02",
733
- subPageId: "page1"
734
- }, "Item2"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
735
- id: "item03",
736
- description: "This is a description"
737
- }, "Item3"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
738
- id: "item04",
739
- renderLabelInfo: "After"
740
- }, "Item4"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
741
- id: "item05",
742
- disabled: true
743
- }, "Item5"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
744
- id: "item06",
745
- href: "/"
746
- }, "Item6"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
747
- id: "item07",
748
- renderBeforeLabel: /*#__PURE__*/_react.default.createElement(_IconCheckSolid.IconCheckSolid, null)
749
- }, "Item7"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
750
- id: "item08",
751
- renderAfterLabel: /*#__PURE__*/_react.default.createElement(_IconCheckSolid.IconCheckSolid, null)
752
- }, "Item8"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Separator, {
753
- id: "sep1"
754
- }), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Group, {
755
- id: "group1",
756
- renderGroupTitle: "Multi-select group",
757
- selectableType: "multiple"
758
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
759
- id: "groupItem11"
760
- }, "GroupItem"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
761
- id: "groupItem12"
762
- }, "GroupItem"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
763
- id: "groupItem13"
764
- }, "GroupItem")), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Group, {
765
- id: "group2",
766
- renderGroupTitle: "Single-select group",
767
- selectableType: "single"
768
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
769
- id: "groupItem21"
770
- }, "GroupItem"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
771
- id: "groupItem22"
772
- }, "GroupItem"), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
773
- id: "groupItem23"
774
- }, "GroupItem"))), /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
775
- id: "page1"
776
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
777
- id: "item11"
778
- }, "Item1"))))),
881
+ const _render9 = (0, _react.render)(_Drilldown14 || (_Drilldown14 = (0, _jsxRuntime.jsxs)(_index.Drilldown, {
882
+ rootPageId: "page0",
883
+ children: [(0, _jsxRuntime.jsxs)(_index.Drilldown.Page, {
884
+ id: "page0",
885
+ renderTitle: "Page Title",
886
+ renderActionLabel: "Action Label",
887
+ children: [(0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
888
+ id: "item01",
889
+ children: "Item1"
890
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
891
+ id: "item02",
892
+ subPageId: "page1",
893
+ children: "Item2"
894
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
895
+ id: "item03",
896
+ description: "This is a description",
897
+ children: "Item3"
898
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
899
+ id: "item04",
900
+ renderLabelInfo: "After",
901
+ children: "Item4"
902
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
903
+ id: "item05",
904
+ disabled: true,
905
+ children: "Item5"
906
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
907
+ id: "item06",
908
+ href: "/",
909
+ children: "Item6"
910
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
911
+ id: "item07",
912
+ renderBeforeLabel: (0, _jsxRuntime.jsx)(_IconCheckSolid.IconCheckSolid, {}),
913
+ children: "Item7"
914
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
915
+ id: "item08",
916
+ renderAfterLabel: (0, _jsxRuntime.jsx)(_IconCheckSolid.IconCheckSolid, {}),
917
+ children: "Item8"
918
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Separator, {
919
+ id: "sep1"
920
+ }), (0, _jsxRuntime.jsxs)(_index.Drilldown.Group, {
921
+ id: "group1",
922
+ renderGroupTitle: "Multi-select group",
923
+ selectableType: "multiple",
924
+ children: [(0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
925
+ id: "groupItem11",
926
+ children: "GroupItem"
927
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
928
+ id: "groupItem12",
929
+ children: "GroupItem"
930
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
931
+ id: "groupItem13",
932
+ children: "GroupItem"
933
+ })]
934
+ }), (0, _jsxRuntime.jsxs)(_index.Drilldown.Group, {
935
+ id: "group2",
936
+ renderGroupTitle: "Single-select group",
937
+ selectableType: "single",
938
+ children: [(0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
939
+ id: "groupItem21",
940
+ children: "GroupItem"
941
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
942
+ id: "groupItem22",
943
+ children: "GroupItem"
944
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
945
+ id: "groupItem23",
946
+ children: "GroupItem"
947
+ })]
948
+ })]
949
+ }), (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
950
+ id: "page1",
951
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
952
+ id: "item11",
953
+ children: "Item1"
954
+ })
955
+ })]
956
+ }))),
779
957
  container = _render9.container;
780
958
 
781
959
  // axe-check is more strict now, and expects "list" role to have "listitem" children, but we use "role='none'" children. After discussing it with the A11y team, we agreed to ignore this error because the screen readers can read the component perfectly.
@@ -787,14 +965,17 @@ describe('<Drilldown />', () => {
787
965
  expect(axeCheck).toBe(true);
788
966
  });
789
967
  it('should meet a11y standarts when drilldown is open', async () => {
790
- const _render10 = (0, _react2.render)(_Drilldown15 || (_Drilldown15 = /*#__PURE__*/_react.default.createElement(_index.Drilldown, {
968
+ const _render10 = (0, _react.render)(_Drilldown15 || (_Drilldown15 = (0, _jsxRuntime.jsx)(_index.Drilldown, {
791
969
  defaultShow: true,
792
- rootPageId: "page0"
793
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Page, {
794
- id: "page0"
795
- }, /*#__PURE__*/_react.default.createElement(_index.Drilldown.Option, {
796
- id: "option0"
797
- }, "Option 0"))))),
970
+ rootPageId: "page0",
971
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Page, {
972
+ id: "page0",
973
+ children: (0, _jsxRuntime.jsx)(_index.Drilldown.Option, {
974
+ id: "option0",
975
+ children: "Option 0"
976
+ })
977
+ })
978
+ }))),
798
979
  container = _render10.container;
799
980
  const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
800
981
  expect(axeCheck).toBe(true);
@@ -805,7 +986,7 @@ describe('<Drilldown />', () => {
805
986
  it.each(generatedComponents)('should be accessible with example: $description', async ({
806
987
  content
807
988
  }) => {
808
- const _render11 = (0, _react2.render)(content),
989
+ const _render11 = (0, _react.render)(content),
809
990
  container = _render11.container;
810
991
  const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container, {
811
992
  // axe-check is more strict now, and expects "list" role to have "listitem" children, but we use "role='none'" children. After discussing it with the A11y team, we agreed to ignore this error because the screen readers can read the component perfectly.