@storybook/addon-interactions 6.4.0-beta.31 → 6.4.0-rc.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.
@@ -1,6 +1,28 @@
1
- import "core-js/modules/es.object.assign.js";
2
1
  import "core-js/modules/es.promise.js";
3
2
  import "core-js/modules/es.object.to-string.js";
3
+ import "core-js/modules/es.object.assign.js";
4
+ import "core-js/modules/es.symbol.js";
5
+ import "core-js/modules/es.symbol.description.js";
6
+ import "core-js/modules/es.symbol.iterator.js";
7
+ import "core-js/modules/es.string.iterator.js";
8
+ import "core-js/modules/es.array.iterator.js";
9
+ import "core-js/modules/web.dom-collections.iterator.js";
10
+ import "core-js/modules/es.array.slice.js";
11
+ import "core-js/modules/es.function.name.js";
12
+ import "core-js/modules/es.array.from.js";
13
+
14
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+
16
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
+
18
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
+
20
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21
+
22
+ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
23
+
24
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
+
4
26
  import "regenerator-runtime/runtime.js";
5
27
 
6
28
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -8,7 +30,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
8
30
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
9
31
 
10
32
  import { expect } from '@storybook/jest';
11
- import { within, waitFor, fireEvent, userEvent } from '@storybook/testing-library';
33
+ import { within, waitFor, fireEvent, userEvent, waitForElementToBeRemoved } from '@storybook/testing-library';
12
34
  import React from 'react';
13
35
  import { AccountForm } from './AccountForm';
14
36
  export default {
@@ -123,6 +145,134 @@ WaitFor.play = /*#__PURE__*/function () {
123
145
  };
124
146
  }();
125
147
 
148
+ export var WaitForElementToBeRemoved = function WaitForElementToBeRemoved() {
149
+ var _React$useState = React.useState(true),
150
+ _React$useState2 = _slicedToArray(_React$useState, 2),
151
+ isLoading = _React$useState2[0],
152
+ setIsLoading = _React$useState2[1];
153
+
154
+ React.useEffect(function () {
155
+ setTimeout(function () {
156
+ return setIsLoading(false);
157
+ }, 1500);
158
+ }, []);
159
+ return isLoading ? /*#__PURE__*/React.createElement("div", null, "Loading...") : /*#__PURE__*/React.createElement("button", {
160
+ type: "button"
161
+ }, "Loaded!");
162
+ };
163
+
164
+ WaitForElementToBeRemoved.play = /*#__PURE__*/function () {
165
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_ref6) {
166
+ var canvasElement, canvas, button;
167
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
168
+ while (1) {
169
+ switch (_context4.prev = _context4.next) {
170
+ case 0:
171
+ canvasElement = _ref6.canvasElement;
172
+ canvas = within(canvasElement);
173
+ _context4.t0 = waitForElementToBeRemoved;
174
+ _context4.next = 5;
175
+ return canvas.findByText('Loading...');
176
+
177
+ case 5:
178
+ _context4.t1 = _context4.sent;
179
+ _context4.t2 = {
180
+ timeout: 2000
181
+ };
182
+ _context4.next = 9;
183
+ return (0, _context4.t0)(_context4.t1, _context4.t2);
184
+
185
+ case 9:
186
+ _context4.next = 11;
187
+ return canvas.findByText('Loaded!');
188
+
189
+ case 11:
190
+ button = _context4.sent;
191
+ _context4.next = 14;
192
+ return expect(button).not.toBeNull();
193
+
194
+ case 14:
195
+ case "end":
196
+ return _context4.stop();
197
+ }
198
+ }
199
+ }, _callee4);
200
+ }));
201
+
202
+ return function (_x3) {
203
+ return _ref7.apply(this, arguments);
204
+ };
205
+ }();
206
+
207
+ export var WithLoaders = function WithLoaders(args, _ref8) {
208
+ var todo = _ref8.loaded.todo;
209
+ return /*#__PURE__*/React.createElement("button", {
210
+ type: "button",
211
+ onClick: args.onSubmit(todo.title)
212
+ }, "Todo: ", todo.title);
213
+ };
214
+ WithLoaders.loaders = [/*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
215
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
216
+ while (1) {
217
+ switch (_context5.prev = _context5.next) {
218
+ case 0:
219
+ _context5.next = 2;
220
+ return new Promise(function (resolve) {
221
+ return setTimeout(resolve, 2000);
222
+ });
223
+
224
+ case 2:
225
+ return _context5.abrupt("return", {
226
+ todo: {
227
+ userId: 1,
228
+ id: 1,
229
+ title: 'delectus aut autem',
230
+ completed: false
231
+ }
232
+ });
233
+
234
+ case 3:
235
+ case "end":
236
+ return _context5.stop();
237
+ }
238
+ }
239
+ }, _callee5);
240
+ }))];
241
+
242
+ WithLoaders.play = /*#__PURE__*/function () {
243
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(_ref10) {
244
+ var args, canvasElement, canvas, todoItem;
245
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
246
+ while (1) {
247
+ switch (_context6.prev = _context6.next) {
248
+ case 0:
249
+ args = _ref10.args, canvasElement = _ref10.canvasElement;
250
+ canvas = within(canvasElement);
251
+ _context6.next = 4;
252
+ return canvas.findByText('Todo: delectus aut autem');
253
+
254
+ case 4:
255
+ todoItem = _context6.sent;
256
+ _context6.next = 7;
257
+ return userEvent.click(todoItem);
258
+
259
+ case 7:
260
+ _context6.next = 9;
261
+ return expect(args.onSubmit).toHaveBeenCalledWith('delectus aut autem');
262
+
263
+ case 9:
264
+ case "end":
265
+ return _context6.stop();
266
+ }
267
+ }
268
+ }, _callee6);
269
+ }));
270
+
271
+ return function (_x4) {
272
+ return _ref11.apply(this, arguments);
273
+ };
274
+ }();
275
+
126
276
  export var Standard = {
127
277
  args: {
128
278
  passwordVerification: false
@@ -130,15 +280,15 @@ export var Standard = {
130
280
  };
131
281
  export var StandardEmailFilled = Object.assign({}, Standard, {
132
282
  play: function () {
133
- var _play = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_ref6) {
283
+ var _play = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref12) {
134
284
  var canvasElement, canvas;
135
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
285
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
136
286
  while (1) {
137
- switch (_context4.prev = _context4.next) {
287
+ switch (_context7.prev = _context7.next) {
138
288
  case 0:
139
- canvasElement = _ref6.canvasElement;
289
+ canvasElement = _ref12.canvasElement;
140
290
  canvas = within(canvasElement);
141
- _context4.next = 4;
291
+ _context7.next = 4;
142
292
  return fireEvent.change(canvas.getByTestId('email'), {
143
293
  target: {
144
294
  value: 'michael@chromatic.com'
@@ -147,13 +297,13 @@ export var StandardEmailFilled = Object.assign({}, Standard, {
147
297
 
148
298
  case 4:
149
299
  case "end":
150
- return _context4.stop();
300
+ return _context7.stop();
151
301
  }
152
302
  }
153
- }, _callee4);
303
+ }, _callee7);
154
304
  }));
155
305
 
156
- function play(_x3) {
306
+ function play(_x5) {
157
307
  return _play.apply(this, arguments);
158
308
  }
159
309
 
@@ -162,29 +312,29 @@ export var StandardEmailFilled = Object.assign({}, Standard, {
162
312
  });
163
313
  export var StandardEmailFailed = Object.assign({}, Standard, {
164
314
  play: function () {
165
- var _play2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_ref7) {
315
+ var _play2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(_ref13) {
166
316
  var args, canvasElement, canvas;
167
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
317
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
168
318
  while (1) {
169
- switch (_context5.prev = _context5.next) {
319
+ switch (_context8.prev = _context8.next) {
170
320
  case 0:
171
- args = _ref7.args, canvasElement = _ref7.canvasElement;
321
+ args = _ref13.args, canvasElement = _ref13.canvasElement;
172
322
  canvas = within(canvasElement);
173
- _context5.next = 4;
323
+ _context8.next = 4;
174
324
  return userEvent.type(canvas.getByTestId('email'), 'gert@chromatic');
175
325
 
176
326
  case 4:
177
- _context5.next = 6;
327
+ _context8.next = 6;
178
328
  return userEvent.type(canvas.getByTestId('password1'), 'supersecret');
179
329
 
180
330
  case 6:
181
- _context5.next = 8;
331
+ _context8.next = 8;
182
332
  return userEvent.click(canvas.getByRole('button', {
183
333
  name: /create account/i
184
334
  }));
185
335
 
186
336
  case 8:
187
- _context5.next = 10;
337
+ _context8.next = 10;
188
338
  return canvas.findByText('Please enter a correctly formatted email address');
189
339
 
190
340
  case 10:
@@ -192,13 +342,13 @@ export var StandardEmailFailed = Object.assign({}, Standard, {
192
342
 
193
343
  case 11:
194
344
  case "end":
195
- return _context5.stop();
345
+ return _context8.stop();
196
346
  }
197
347
  }
198
- }, _callee5);
348
+ }, _callee8);
199
349
  }));
200
350
 
201
- function play(_x4) {
351
+ function play(_x6) {
202
352
  return _play2.apply(this, arguments);
203
353
  }
204
354
 
@@ -207,37 +357,37 @@ export var StandardEmailFailed = Object.assign({}, Standard, {
207
357
  });
208
358
  export var StandardEmailSuccess = Object.assign({}, Standard, {
209
359
  play: function () {
210
- var _play3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref8) {
360
+ var _play3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(_ref14) {
211
361
  var args, canvasElement, canvas;
212
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
362
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
213
363
  while (1) {
214
- switch (_context7.prev = _context7.next) {
364
+ switch (_context10.prev = _context10.next) {
215
365
  case 0:
216
- args = _ref8.args, canvasElement = _ref8.canvasElement;
366
+ args = _ref14.args, canvasElement = _ref14.canvasElement;
217
367
  canvas = within(canvasElement);
218
- _context7.next = 4;
368
+ _context10.next = 4;
219
369
  return userEvent.type(canvas.getByTestId('email'), 'michael@chromatic.com');
220
370
 
221
371
  case 4:
222
- _context7.next = 6;
372
+ _context10.next = 6;
223
373
  return userEvent.type(canvas.getByTestId('password1'), 'testpasswordthatwontfail');
224
374
 
225
375
  case 6:
226
- _context7.next = 8;
376
+ _context10.next = 8;
227
377
  return userEvent.click(canvas.getByTestId('submit'));
228
378
 
229
379
  case 8:
230
- _context7.next = 10;
231
- return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
232
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
380
+ _context10.next = 10;
381
+ return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
382
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
233
383
  while (1) {
234
- switch (_context6.prev = _context6.next) {
384
+ switch (_context9.prev = _context9.next) {
235
385
  case 0:
236
- _context6.next = 2;
386
+ _context9.next = 2;
237
387
  return expect(args.onSubmit).toHaveBeenCalledTimes(1);
238
388
 
239
389
  case 2:
240
- _context6.next = 4;
390
+ _context9.next = 4;
241
391
  return expect(args.onSubmit).toHaveBeenCalledWith({
242
392
  email: 'michael@chromatic.com',
243
393
  password: 'testpasswordthatwontfail'
@@ -245,21 +395,21 @@ export var StandardEmailSuccess = Object.assign({}, Standard, {
245
395
 
246
396
  case 4:
247
397
  case "end":
248
- return _context6.stop();
398
+ return _context9.stop();
249
399
  }
250
400
  }
251
- }, _callee6);
401
+ }, _callee9);
252
402
  })));
253
403
 
254
404
  case 10:
255
405
  case "end":
256
- return _context7.stop();
406
+ return _context10.stop();
257
407
  }
258
408
  }
259
- }, _callee7);
409
+ }, _callee10);
260
410
  }));
261
411
 
262
- function play(_x5) {
412
+ function play(_x7) {
263
413
  return _play3.apply(this, arguments);
264
414
  }
265
415
 
@@ -268,33 +418,33 @@ export var StandardEmailSuccess = Object.assign({}, Standard, {
268
418
  });
269
419
  export var StandardPasswordFailed = Object.assign({}, Standard, {
270
420
  play: function () {
271
- var _play4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(context) {
421
+ var _play4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(context) {
272
422
  var canvas;
273
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
423
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
274
424
  while (1) {
275
- switch (_context8.prev = _context8.next) {
425
+ switch (_context11.prev = _context11.next) {
276
426
  case 0:
277
427
  canvas = within(context.canvasElement);
278
- _context8.next = 3;
428
+ _context11.next = 3;
279
429
  return StandardEmailFilled.play(context);
280
430
 
281
431
  case 3:
282
- _context8.next = 5;
432
+ _context11.next = 5;
283
433
  return userEvent.type(canvas.getByTestId('password1'), 'asdf');
284
434
 
285
435
  case 5:
286
- _context8.next = 7;
436
+ _context11.next = 7;
287
437
  return userEvent.click(canvas.getByTestId('submit'));
288
438
 
289
439
  case 7:
290
440
  case "end":
291
- return _context8.stop();
441
+ return _context11.stop();
292
442
  }
293
443
  }
294
- }, _callee8);
444
+ }, _callee11);
295
445
  }));
296
446
 
297
- function play(_x6) {
447
+ function play(_x8) {
298
448
  return _play4.apply(this, arguments);
299
449
  }
300
450
 
@@ -303,43 +453,43 @@ export var StandardPasswordFailed = Object.assign({}, Standard, {
303
453
  });
304
454
  export var StandardFailHover = Object.assign({}, StandardPasswordFailed, {
305
455
  play: function () {
306
- var _play5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(context) {
456
+ var _play5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(context) {
307
457
  var canvas;
308
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
458
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
309
459
  while (1) {
310
- switch (_context10.prev = _context10.next) {
460
+ switch (_context13.prev = _context13.next) {
311
461
  case 0:
312
462
  canvas = within(context.canvasElement);
313
- _context10.next = 3;
463
+ _context13.next = 3;
314
464
  return StandardPasswordFailed.play(context);
315
465
 
316
466
  case 3:
317
- _context10.next = 5;
318
- return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
319
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
467
+ _context13.next = 5;
468
+ return waitFor( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
469
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
320
470
  while (1) {
321
- switch (_context9.prev = _context9.next) {
471
+ switch (_context12.prev = _context12.next) {
322
472
  case 0:
323
- _context9.next = 2;
473
+ _context12.next = 2;
324
474
  return userEvent.hover(canvas.getByTestId('password-error-info'));
325
475
 
326
476
  case 2:
327
477
  case "end":
328
- return _context9.stop();
478
+ return _context12.stop();
329
479
  }
330
480
  }
331
- }, _callee9);
481
+ }, _callee12);
332
482
  })));
333
483
 
334
484
  case 5:
335
485
  case "end":
336
- return _context10.stop();
486
+ return _context13.stop();
337
487
  }
338
488
  }
339
- }, _callee10);
489
+ }, _callee13);
340
490
  }));
341
491
 
342
- function play(_x7) {
492
+ function play(_x9) {
343
493
  return _play5.apply(this, arguments);
344
494
  }
345
495
 
@@ -358,33 +508,33 @@ export var Verification = {
358
508
  };
359
509
  export var VerificationPasssword1 = Object.assign({}, Verification, {
360
510
  play: function () {
361
- var _play6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(context) {
511
+ var _play6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(context) {
362
512
  var canvas;
363
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
513
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
364
514
  while (1) {
365
- switch (_context11.prev = _context11.next) {
515
+ switch (_context14.prev = _context14.next) {
366
516
  case 0:
367
517
  canvas = within(context.canvasElement);
368
- _context11.next = 3;
518
+ _context14.next = 3;
369
519
  return StandardEmailFilled.play(context);
370
520
 
371
521
  case 3:
372
- _context11.next = 5;
522
+ _context14.next = 5;
373
523
  return userEvent.type(canvas.getByTestId('password1'), 'asdfasdf');
374
524
 
375
525
  case 5:
376
- _context11.next = 7;
526
+ _context14.next = 7;
377
527
  return userEvent.click(canvas.getByTestId('submit'));
378
528
 
379
529
  case 7:
380
530
  case "end":
381
- return _context11.stop();
531
+ return _context14.stop();
382
532
  }
383
533
  }
384
- }, _callee11);
534
+ }, _callee14);
385
535
  }));
386
536
 
387
- function play(_x8) {
537
+ function play(_x10) {
388
538
  return _play6.apply(this, arguments);
389
539
  }
390
540
 
@@ -393,37 +543,37 @@ export var VerificationPasssword1 = Object.assign({}, Verification, {
393
543
  });
394
544
  export var VerificationPasswordMismatch = Object.assign({}, Verification, {
395
545
  play: function () {
396
- var _play7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(context) {
546
+ var _play7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(context) {
397
547
  var canvas;
398
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
548
+ return regeneratorRuntime.wrap(function _callee15$(_context15) {
399
549
  while (1) {
400
- switch (_context12.prev = _context12.next) {
550
+ switch (_context15.prev = _context15.next) {
401
551
  case 0:
402
552
  canvas = within(context.canvasElement);
403
- _context12.next = 3;
553
+ _context15.next = 3;
404
554
  return StandardEmailFilled.play(context);
405
555
 
406
556
  case 3:
407
- _context12.next = 5;
557
+ _context15.next = 5;
408
558
  return userEvent.type(canvas.getByTestId('password1'), 'asdfasdf');
409
559
 
410
560
  case 5:
411
- _context12.next = 7;
561
+ _context15.next = 7;
412
562
  return userEvent.type(canvas.getByTestId('password2'), 'asdf1234');
413
563
 
414
564
  case 7:
415
- _context12.next = 9;
565
+ _context15.next = 9;
416
566
  return userEvent.click(canvas.getByTestId('submit'));
417
567
 
418
568
  case 9:
419
569
  case "end":
420
- return _context12.stop();
570
+ return _context15.stop();
421
571
  }
422
572
  }
423
- }, _callee12);
573
+ }, _callee15);
424
574
  }));
425
575
 
426
- function play(_x9) {
576
+ function play(_x11) {
427
577
  return _play7.apply(this, arguments);
428
578
  }
429
579
 
@@ -432,59 +582,59 @@ export var VerificationPasswordMismatch = Object.assign({}, Verification, {
432
582
  });
433
583
  export var VerificationSuccess = Object.assign({}, Verification, {
434
584
  play: function () {
435
- var _play8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(context) {
585
+ var _play8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(context) {
436
586
  var canvas;
437
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
587
+ return regeneratorRuntime.wrap(function _callee16$(_context16) {
438
588
  while (1) {
439
- switch (_context13.prev = _context13.next) {
589
+ switch (_context16.prev = _context16.next) {
440
590
  case 0:
441
591
  canvas = within(context.canvasElement);
442
- _context13.next = 3;
592
+ _context16.next = 3;
443
593
  return StandardEmailFilled.play(context);
444
594
 
445
595
  case 3:
446
- _context13.next = 5;
596
+ _context16.next = 5;
447
597
  return new Promise(function (resolve) {
448
598
  return setTimeout(resolve, 1000);
449
599
  });
450
600
 
451
601
  case 5:
452
- _context13.next = 7;
602
+ _context16.next = 7;
453
603
  return userEvent.type(canvas.getByTestId('password1'), 'helloyou', {
454
604
  delay: 50
455
605
  });
456
606
 
457
607
  case 7:
458
- _context13.next = 9;
608
+ _context16.next = 9;
459
609
  return new Promise(function (resolve) {
460
610
  return setTimeout(resolve, 1000);
461
611
  });
462
612
 
463
613
  case 9:
464
- _context13.next = 11;
614
+ _context16.next = 11;
465
615
  return userEvent.type(canvas.getByTestId('password2'), 'helloyou', {
466
616
  delay: 50
467
617
  });
468
618
 
469
619
  case 11:
470
- _context13.next = 13;
620
+ _context16.next = 13;
471
621
  return new Promise(function (resolve) {
472
622
  return setTimeout(resolve, 1000);
473
623
  });
474
624
 
475
625
  case 13:
476
- _context13.next = 15;
626
+ _context16.next = 15;
477
627
  return userEvent.click(canvas.getByTestId('submit'));
478
628
 
479
629
  case 15:
480
630
  case "end":
481
- return _context13.stop();
631
+ return _context16.stop();
482
632
  }
483
633
  }
484
- }, _callee13);
634
+ }, _callee16);
485
635
  }));
486
636
 
487
- function play(_x10) {
637
+ function play(_x12) {
488
638
  return _play8.apply(this, arguments);
489
639
  }
490
640
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Button, Icons, Separator, P, TooltipNote, WithTooltip, Bar } from '@storybook/components';
2
+ import { Button, IconButton, Icons, Separator, P, TooltipNote, WithTooltip, Bar } from '@storybook/components';
3
3
  import { CallStates } from '@storybook/instrumenter';
4
4
  import { styled } from '@storybook/theming';
5
5
  import { StatusBadge } from '../StatusBadge/StatusBadge';
@@ -37,16 +37,11 @@ var Note = styled(TooltipNote)(function (_ref3) {
37
37
  fontFamily: theme.typography.fonts.base
38
38
  };
39
39
  });
40
- export var StyledIconButton = styled(StyledButton)(function (_ref4) {
40
+ export var StyledIconButton = styled(IconButton)(function (_ref4) {
41
41
  var theme = _ref4.theme;
42
42
  return {
43
43
  color: theme.color.mediumdark,
44
- margin: '0 3px',
45
- '&:not(:disabled)': {
46
- '&:hover,&:focus-visible': {
47
- background: theme.background.hoverable
48
- }
49
- }
44
+ margin: '0 3px'
50
45
  };
51
46
  });
52
47
  var StyledSeparator = styled(Separator)({
@@ -113,7 +108,6 @@ export var Subnav = function Subnav(_ref6) {
113
108
  note: "Go to start"
114
109
  })
115
110
  }, /*#__PURE__*/React.createElement(RewindButton, {
116
- containsIcon: true,
117
111
  onClick: onStart,
118
112
  disabled: isDisabled || !hasPrevious
119
113
  }, /*#__PURE__*/React.createElement(Icons, {
@@ -126,7 +120,6 @@ export var Subnav = function Subnav(_ref6) {
126
120
  note: "Go back"
127
121
  })
128
122
  }, /*#__PURE__*/React.createElement(StyledIconButton, {
129
- containsIcon: true,
130
123
  onClick: onPrevious,
131
124
  disabled: isDisabled || !hasPrevious
132
125
  }, /*#__PURE__*/React.createElement(Icons, {
@@ -139,7 +132,6 @@ export var Subnav = function Subnav(_ref6) {
139
132
  note: "Go forward"
140
133
  })
141
134
  }, /*#__PURE__*/React.createElement(StyledIconButton, {
142
- containsIcon: true,
143
135
  onClick: onNext,
144
136
  disabled: isDisabled || !hasNext
145
137
  }, /*#__PURE__*/React.createElement(Icons, {
@@ -152,7 +144,6 @@ export var Subnav = function Subnav(_ref6) {
152
144
  note: "Go to end"
153
145
  })
154
146
  }, /*#__PURE__*/React.createElement(StyledIconButton, {
155
- containsIcon: true,
156
147
  onClick: onEnd,
157
148
  disabled: isDisabled || !hasNext
158
149
  }, /*#__PURE__*/React.createElement(Icons, {