@pingux/astro 1.0.0-alpha.8 → 1.1.0-alpha.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 (102) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/README.md +5 -0
  3. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  4. package/lib/cjs/components/AccordionItem/AccordionItem.js +3 -1
  5. package/lib/cjs/components/Button/Button.js +5 -24
  6. package/lib/cjs/components/Button/Button.stories.js +5 -11
  7. package/lib/cjs/components/Button/Button.test.js +0 -24
  8. package/lib/cjs/components/Chip/Chip.js +26 -10
  9. package/lib/cjs/components/Chip/Chip.stories.js +44 -5
  10. package/lib/cjs/components/Chip/Chip.test.js +9 -0
  11. package/lib/cjs/components/{DropdownField/index.js → Chip/ChipContext.js} +8 -7
  12. package/lib/cjs/components/IconButton/IconButton.js +17 -7
  13. package/lib/cjs/components/IconButton/IconButton.test.js +0 -1
  14. package/lib/cjs/components/ListItem/ListItem.stories.js +0 -2
  15. package/lib/cjs/components/ListView/ListView.js +4 -3
  16. package/lib/cjs/components/ListView/ListView.stories.js +580 -39
  17. package/lib/cjs/components/ListViewItem/ListViewItem.js +3 -6
  18. package/lib/cjs/components/MultivaluesField/MultivaluesField.js +1 -1
  19. package/lib/cjs/components/Stepper/Stepper.js +1 -0
  20. package/lib/cjs/components/Tab/Tab.js +5 -3
  21. package/lib/cjs/components/Tabs/Tabs.js +3 -0
  22. package/lib/cjs/components/Tabs/Tabs.stories.js +3 -4
  23. package/lib/cjs/components/Tabs/Tabs.test.js +44 -15
  24. package/lib/cjs/components/TextAreaField/TextAreaField.test.js +10 -0
  25. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +45 -2
  26. package/lib/cjs/index.js +48 -136
  27. package/lib/cjs/layouts/ListLayout.stories.js +2 -1
  28. package/lib/cjs/layouts/SchemaFormLayout.stories.js +2 -21
  29. package/lib/cjs/recipes/ArrayField.stories.js +3 -3
  30. package/lib/cjs/styles/forms/input.js +4 -0
  31. package/lib/cjs/styles/theme.js +0 -3
  32. package/lib/cjs/styles/variants/accordion.js +7 -9
  33. package/lib/cjs/styles/variants/boxes.js +22 -19
  34. package/lib/cjs/styles/variants/buttons.js +38 -29
  35. package/lib/cjs/styles/variants/variants.js +0 -3
  36. package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +4 -11
  37. package/lib/components/AccordionItem/AccordionItem.js +3 -1
  38. package/lib/components/Button/Button.js +7 -24
  39. package/lib/components/Button/Button.stories.js +5 -10
  40. package/lib/components/Button/Button.test.js +0 -20
  41. package/lib/components/Chip/Chip.js +25 -10
  42. package/lib/components/Chip/Chip.stories.js +41 -5
  43. package/lib/components/Chip/Chip.test.js +9 -0
  44. package/lib/components/Chip/ChipContext.js +3 -0
  45. package/lib/components/IconButton/IconButton.js +17 -9
  46. package/lib/components/IconButton/IconButton.test.js +0 -1
  47. package/lib/components/ListItem/ListItem.stories.js +0 -2
  48. package/lib/components/ListView/ListView.js +4 -3
  49. package/lib/components/ListView/ListView.stories.js +577 -39
  50. package/lib/components/ListViewItem/ListViewItem.js +3 -5
  51. package/lib/components/MultivaluesField/MultivaluesField.js +1 -1
  52. package/lib/components/Stepper/Stepper.js +1 -0
  53. package/lib/components/Tab/Tab.js +5 -3
  54. package/lib/components/Tabs/Tabs.js +3 -0
  55. package/lib/components/Tabs/Tabs.stories.js +3 -4
  56. package/lib/components/Tabs/Tabs.test.js +40 -15
  57. package/lib/components/TextAreaField/TextAreaField.test.js +8 -0
  58. package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +33 -1
  59. package/lib/index.js +0 -8
  60. package/lib/layouts/ListLayout.stories.js +2 -1
  61. package/lib/layouts/SchemaFormLayout.stories.js +2 -19
  62. package/lib/recipes/ArrayField.stories.js +3 -3
  63. package/lib/styles/forms/input.js +4 -0
  64. package/lib/styles/theme.js +0 -3
  65. package/lib/styles/variants/accordion.js +7 -9
  66. package/lib/styles/variants/boxes.js +21 -19
  67. package/lib/styles/variants/buttons.js +37 -29
  68. package/lib/styles/variants/variants.js +0 -2
  69. package/package.json +1 -1
  70. package/lib/cjs/components/Dropdown/Dropdown.js +0 -112
  71. package/lib/cjs/components/Dropdown/Dropdown.test.js +0 -80
  72. package/lib/cjs/components/Dropdown/index.js +0 -18
  73. package/lib/cjs/components/DropdownField/DropdownField.js +0 -187
  74. package/lib/cjs/components/DropdownField/DropdownField.stories.js +0 -278
  75. package/lib/cjs/components/DropdownField/DropdownField.test.js +0 -80
  76. package/lib/cjs/components/Panel/Panel.js +0 -101
  77. package/lib/cjs/components/Panel/Panel.stories.js +0 -57
  78. package/lib/cjs/components/Panel/Panel.test.js +0 -72
  79. package/lib/cjs/components/Panel/index.js +0 -18
  80. package/lib/cjs/components/Popover/Popover.js +0 -87
  81. package/lib/cjs/components/Popover/Popover.stories.js +0 -80
  82. package/lib/cjs/components/Popover/Popover.test.js +0 -91
  83. package/lib/cjs/components/Popover/index.js +0 -18
  84. package/lib/cjs/recipes/InputBoxWithLinkedChip.stories.js +0 -67
  85. package/lib/cjs/styles/variants/popover.js +0 -86
  86. package/lib/components/Dropdown/Dropdown.js +0 -90
  87. package/lib/components/Dropdown/Dropdown.test.js +0 -62
  88. package/lib/components/Dropdown/index.js +0 -1
  89. package/lib/components/DropdownField/DropdownField.js +0 -155
  90. package/lib/components/DropdownField/DropdownField.stories.js +0 -222
  91. package/lib/components/DropdownField/DropdownField.test.js +0 -60
  92. package/lib/components/DropdownField/index.js +0 -1
  93. package/lib/components/Panel/Panel.js +0 -71
  94. package/lib/components/Panel/Panel.stories.js +0 -35
  95. package/lib/components/Panel/Panel.test.js +0 -52
  96. package/lib/components/Panel/index.js +0 -1
  97. package/lib/components/Popover/Popover.js +0 -65
  98. package/lib/components/Popover/Popover.stories.js +0 -52
  99. package/lib/components/Popover/Popover.test.js +0 -75
  100. package/lib/components/Popover/index.js +0 -2
  101. package/lib/recipes/InputBoxWithLinkedChip.stories.js +0 -43
  102. package/lib/styles/variants/popover.js +0 -76
@@ -81,18 +81,19 @@ var collectionTypes = {
81
81
  exports.collectionTypes = collectionTypes;
82
82
 
83
83
  function useListLayout(state) {
84
+ var ROW_HEIGHT = 81;
84
85
  var collator = (0, _i18n.useCollator)({
85
86
  usage: 'search',
86
87
  sensitivity: 'base'
87
88
  });
88
89
  var layout = (0, _react.useMemo)(function () {
89
90
  return new _layout.ListLayout({
90
- estimatedRowHeight: 81,
91
+ estimatedRowHeight: ROW_HEIGHT,
91
92
  estimatedHeadingHeight: 26,
92
93
  paddingRight: 4,
93
94
  paddingLeft: 4,
94
- loaderHeight: 81,
95
- placeholderHeight: 81,
95
+ loaderHeight: ROW_HEIGHT,
96
+ placeholderHeight: ROW_HEIGHT,
96
97
  collator: collator
97
98
  });
98
99
  }, [collator]);
@@ -10,12 +10,18 @@ _Object$defineProperty(exports, "__esModule", {
10
10
 
11
11
  exports.MultipleSelection = exports.InfiniteLoadingList = exports.Default = exports["default"] = void 0;
12
12
 
13
+ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
14
+
13
15
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
14
16
 
17
+ var _slice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/slice"));
18
+
15
19
  var _setTimeout2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/set-timeout"));
16
20
 
17
21
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
18
22
 
23
+ var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
24
+
19
25
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
20
26
 
21
27
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
@@ -87,6 +93,455 @@ var items = [{
87
93
  name: 'Snake',
88
94
  id: '3'
89
95
  }];
96
+ var animals = [{
97
+ name: 'Aardvark'
98
+ }, {
99
+ name: 'Albatross'
100
+ }, {
101
+ name: 'Alligator'
102
+ }, {
103
+ name: 'Alpaca'
104
+ }, {
105
+ name: 'Ant'
106
+ }, {
107
+ name: 'Anteater'
108
+ }, {
109
+ name: 'Antelope'
110
+ }, {
111
+ name: 'Ape'
112
+ }, {
113
+ name: 'Armadillo'
114
+ }, {
115
+ name: 'Donkey'
116
+ }, {
117
+ name: 'Baboon'
118
+ }, {
119
+ name: 'Badger'
120
+ }, {
121
+ name: 'Barracuda'
122
+ }, {
123
+ name: 'Bat'
124
+ }, {
125
+ name: 'Bear'
126
+ }, {
127
+ name: 'Beaver'
128
+ }, {
129
+ name: 'Bee'
130
+ }, {
131
+ name: 'Bison'
132
+ }, {
133
+ name: 'Boar'
134
+ }, {
135
+ name: 'Buffalo'
136
+ }, {
137
+ name: 'Butterfly'
138
+ }, {
139
+ name: 'Camel'
140
+ }, {
141
+ name: 'Capybara'
142
+ }, {
143
+ name: 'Caribou'
144
+ }, {
145
+ name: 'Cassowary'
146
+ }, {
147
+ name: 'Cat'
148
+ }, {
149
+ name: 'Caterpillar'
150
+ }, {
151
+ name: 'Cattle'
152
+ }, {
153
+ name: 'Chamois'
154
+ }, {
155
+ name: 'Cheetah'
156
+ }, {
157
+ name: 'Chicken'
158
+ }, {
159
+ name: 'Chimpanzee'
160
+ }, {
161
+ name: 'Chinchilla'
162
+ }, {
163
+ name: 'Chough'
164
+ }, {
165
+ name: 'Clam'
166
+ }, {
167
+ name: 'Cobra'
168
+ }, {
169
+ name: 'Cockroach'
170
+ }, {
171
+ name: 'Cod'
172
+ }, {
173
+ name: 'Cormorant'
174
+ }, {
175
+ name: 'Coyote'
176
+ }, {
177
+ name: 'Crab'
178
+ }, {
179
+ name: 'Crane'
180
+ }, {
181
+ name: 'Crocodile'
182
+ }, {
183
+ name: 'Crow'
184
+ }, {
185
+ name: 'Curlew'
186
+ }, {
187
+ name: 'Deer'
188
+ }, {
189
+ name: 'Dinosaur'
190
+ }, {
191
+ name: 'Dog'
192
+ }, {
193
+ name: 'Dogfish'
194
+ }, {
195
+ name: 'Dolphin'
196
+ }, {
197
+ name: 'Dotterel'
198
+ }, {
199
+ name: 'Dove'
200
+ }, {
201
+ name: 'Dragonfly'
202
+ }, {
203
+ name: 'Duck'
204
+ }, {
205
+ name: 'Dugong'
206
+ }, {
207
+ name: 'Dunlin'
208
+ }, {
209
+ name: 'Eagle'
210
+ }, {
211
+ name: 'Echidna'
212
+ }, {
213
+ name: 'Eel'
214
+ }, {
215
+ name: 'Eland'
216
+ }, {
217
+ name: 'Elephant'
218
+ }, {
219
+ name: 'Elk'
220
+ }, {
221
+ name: 'Emu'
222
+ }, {
223
+ name: 'Falcon'
224
+ }, {
225
+ name: 'Ferret'
226
+ }, {
227
+ name: 'Finch'
228
+ }, {
229
+ name: 'Fish'
230
+ }, {
231
+ name: 'Flamingo'
232
+ }, {
233
+ name: 'Fly'
234
+ }, {
235
+ name: 'Fox'
236
+ }, {
237
+ name: 'Frog'
238
+ }, {
239
+ name: 'Gaur'
240
+ }, {
241
+ name: 'Gazelle'
242
+ }, {
243
+ name: 'Gerbil'
244
+ }, {
245
+ name: 'Giraffe'
246
+ }, {
247
+ name: 'Gnat'
248
+ }, {
249
+ name: 'Gnu'
250
+ }, {
251
+ name: 'Goat'
252
+ }, {
253
+ name: 'Goldfinch'
254
+ }, {
255
+ name: 'Goldfish'
256
+ }, {
257
+ name: 'Goose'
258
+ }, {
259
+ name: 'Gorilla'
260
+ }, {
261
+ name: 'Goshawk'
262
+ }, {
263
+ name: 'Grasshopper'
264
+ }, {
265
+ name: 'Grouse'
266
+ }, {
267
+ name: 'Guanaco'
268
+ }, {
269
+ name: 'Gull'
270
+ }, {
271
+ name: 'Hamster'
272
+ }, {
273
+ name: 'Hare'
274
+ }, {
275
+ name: 'Hawk'
276
+ }, {
277
+ name: 'Hedgehog'
278
+ }, {
279
+ name: 'Heron'
280
+ }, {
281
+ name: 'Herring'
282
+ }, {
283
+ name: 'Hippopotamus'
284
+ }, {
285
+ name: 'Hornet'
286
+ }, {
287
+ name: 'Horse'
288
+ }, {
289
+ name: 'Human'
290
+ }, {
291
+ name: 'Hummingbird'
292
+ }, {
293
+ name: 'Hyena'
294
+ }, {
295
+ name: 'Ibex'
296
+ }, {
297
+ name: 'Ibis'
298
+ }, {
299
+ name: 'Jackal'
300
+ }, {
301
+ name: 'Jaguar'
302
+ }, {
303
+ name: 'Jay'
304
+ }, {
305
+ name: 'Jellyfish'
306
+ }, {
307
+ name: 'Kangaroo'
308
+ }, {
309
+ name: 'Kingfisher'
310
+ }, {
311
+ name: 'Koala'
312
+ }, {
313
+ name: 'Kookabura'
314
+ }, {
315
+ name: 'Kouprey'
316
+ }, {
317
+ name: 'Kudu'
318
+ }, {
319
+ name: 'Lapwing'
320
+ }, {
321
+ name: 'Lark'
322
+ }, {
323
+ name: 'Lemur'
324
+ }, {
325
+ name: 'Leopard'
326
+ }, {
327
+ name: 'Lion'
328
+ }, {
329
+ name: 'Llama'
330
+ }, {
331
+ name: 'Lobster'
332
+ }, {
333
+ name: 'Locust'
334
+ }, {
335
+ name: 'Loris'
336
+ }, {
337
+ name: 'Louse'
338
+ }, {
339
+ name: 'Lyrebird'
340
+ }, {
341
+ name: 'Magpie'
342
+ }, {
343
+ name: 'Mallard'
344
+ }, {
345
+ name: 'Manatee'
346
+ }, {
347
+ name: 'Mandrill'
348
+ }, {
349
+ name: 'Mantis'
350
+ }, {
351
+ name: 'Marten'
352
+ }, {
353
+ name: 'Meerkat'
354
+ }, {
355
+ name: 'Mink'
356
+ }, {
357
+ name: 'Mole'
358
+ }, {
359
+ name: 'Mongoose'
360
+ }, {
361
+ name: 'Monkey'
362
+ }, {
363
+ name: 'Moose'
364
+ }, {
365
+ name: 'Mosquito'
366
+ }, {
367
+ name: 'Mouse'
368
+ }, {
369
+ name: 'Mule'
370
+ }, {
371
+ name: 'Narwhal'
372
+ }, {
373
+ name: 'Newt'
374
+ }, {
375
+ name: 'Nightingale'
376
+ }, {
377
+ name: 'Octopus'
378
+ }, {
379
+ name: 'Okapi'
380
+ }, {
381
+ name: 'Opossum'
382
+ }, {
383
+ name: 'Oryx'
384
+ }, {
385
+ name: 'Ostrich'
386
+ }, {
387
+ name: 'Otter'
388
+ }, {
389
+ name: 'Owl'
390
+ }, {
391
+ name: 'Oyster'
392
+ }, {
393
+ name: 'Panther'
394
+ }, {
395
+ name: 'Parrot'
396
+ }, {
397
+ name: 'Partridge'
398
+ }, {
399
+ name: 'Peafowl'
400
+ }, {
401
+ name: 'Pelican'
402
+ }, {
403
+ name: 'Penguin'
404
+ }, {
405
+ name: 'Pheasant'
406
+ }, {
407
+ name: 'Pig'
408
+ }, {
409
+ name: 'Pigeon'
410
+ }, {
411
+ name: 'Pony'
412
+ }, {
413
+ name: 'Porcupine'
414
+ }, {
415
+ name: 'Porpoise'
416
+ }, {
417
+ name: 'Quail'
418
+ }, {
419
+ name: 'Quelea'
420
+ }, {
421
+ name: 'Quetzal'
422
+ }, {
423
+ name: 'Rabbit'
424
+ }, {
425
+ name: 'Raccoon'
426
+ }, {
427
+ name: 'Rail'
428
+ }, {
429
+ name: 'Ram'
430
+ }, {
431
+ name: 'Rat'
432
+ }, {
433
+ name: 'Raven'
434
+ }, {
435
+ name: 'Red deer'
436
+ }, {
437
+ name: 'Red panda'
438
+ }, {
439
+ name: 'Reindeer'
440
+ }, {
441
+ name: 'Rhinoceros'
442
+ }, {
443
+ name: 'Rook'
444
+ }, {
445
+ name: 'Salamander'
446
+ }, {
447
+ name: 'Salmon'
448
+ }, {
449
+ name: 'Sand Dollar'
450
+ }, {
451
+ name: 'Sandpiper'
452
+ }, {
453
+ name: 'Sardine'
454
+ }, {
455
+ name: 'Scorpion'
456
+ }, {
457
+ name: 'Seahorse'
458
+ }, {
459
+ name: 'Seal'
460
+ }, {
461
+ name: 'Shark'
462
+ }, {
463
+ name: 'Sheep'
464
+ }, {
465
+ name: 'Shrew'
466
+ }, {
467
+ name: 'Skunk'
468
+ }, {
469
+ name: 'Snail'
470
+ }, {
471
+ name: 'Snake'
472
+ }, {
473
+ name: 'Sparrow'
474
+ }, {
475
+ name: 'Spider'
476
+ }, {
477
+ name: 'Spoonbill'
478
+ }, {
479
+ name: 'Squid'
480
+ }, {
481
+ name: 'Squirrel'
482
+ }, {
483
+ name: 'Starling'
484
+ }, {
485
+ name: 'Stingray'
486
+ }, {
487
+ name: 'Stinkbug'
488
+ }, {
489
+ name: 'Stork'
490
+ }, {
491
+ name: 'Swallow'
492
+ }, {
493
+ name: 'Swan'
494
+ }, {
495
+ name: 'Tapir'
496
+ }, {
497
+ name: 'Tarsier'
498
+ }, {
499
+ name: 'Termite'
500
+ }, {
501
+ name: 'Tiger'
502
+ }, {
503
+ name: 'Toad'
504
+ }, {
505
+ name: 'Trout'
506
+ }, {
507
+ name: 'Turkey'
508
+ }, {
509
+ name: 'Turtle'
510
+ }, {
511
+ name: 'Viper'
512
+ }, {
513
+ name: 'Vulture'
514
+ }, {
515
+ name: 'Wallaby'
516
+ }, {
517
+ name: 'Walrus'
518
+ }, {
519
+ name: 'Wasp'
520
+ }, {
521
+ name: 'Weasel'
522
+ }, {
523
+ name: 'Whale'
524
+ }, {
525
+ name: 'Wildcat'
526
+ }, {
527
+ name: 'Wolf'
528
+ }, {
529
+ name: 'Wolverine'
530
+ }, {
531
+ name: 'Wombat'
532
+ }, {
533
+ name: 'Woodcock'
534
+ }, {
535
+ name: 'Woodpecker'
536
+ }, {
537
+ name: 'Worm'
538
+ }, {
539
+ name: 'Wren'
540
+ }, {
541
+ name: 'Yak'
542
+ }, {
543
+ name: 'Zebra'
544
+ }];
90
545
  var props = {
91
546
  disabledKeys: ['Snake']
92
547
  };
@@ -163,61 +618,140 @@ var Default = function Default(_ref2) {
163
618
  exports.Default = Default;
164
619
 
165
620
  var InfiniteLoadingList = function InfiniteLoadingList() {
621
+ var getMockData = /*#__PURE__*/function () {
622
+ var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(signal, cursor) {
623
+ var pageNumber;
624
+ return _regenerator["default"].wrap(function _callee$(_context) {
625
+ while (1) {
626
+ switch (_context.prev = _context.next) {
627
+ case 0:
628
+ pageNumber = 1;
629
+
630
+ if (cursor) {
631
+ pageNumber = Number(cursor.substr((0, _indexOf["default"])(cursor).call(cursor, '-') + 1));
632
+ } // With this we will emulate load even with mocked API
633
+
634
+
635
+ _context.next = 4;
636
+ return new _promise["default"](function (resolve) {
637
+ return (0, _setTimeout2["default"])(resolve, cursor ? 2000 : 3000);
638
+ });
639
+
640
+ case 4:
641
+ return _context.abrupt("return", {
642
+ items: (0, _slice["default"])(animals).call(animals, (pageNumber - 1) * 10, pageNumber * 10),
643
+ cursor: "mock-".concat(pageNumber + 1)
644
+ });
645
+
646
+ case 5:
647
+ case "end":
648
+ return _context.stop();
649
+ }
650
+ }
651
+ }, _callee);
652
+ }));
653
+
654
+ return function getMockData(_x, _x2) {
655
+ return _ref3.apply(this, arguments);
656
+ };
657
+ }();
658
+
659
+ var fetchApiData = /*#__PURE__*/function () {
660
+ var _ref4 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(signal, cursor, filterText) {
661
+ var res, json;
662
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
663
+ while (1) {
664
+ switch (_context2.prev = _context2.next) {
665
+ case 0:
666
+ _context2.prev = 0;
667
+ _context2.next = 3;
668
+ return _promise["default"].race([// If no cursor is available, then we're loading the first page,
669
+ // filtering the results returned via a query string that
670
+ // mirrors the ComboBox input text.
671
+ // Otherwise, the cursor is the next URL to load,
672
+ // as returned from the previous page.
673
+ fetch(cursor || "https://swapi.dev/api/people/?search=".concat(filterText), {
674
+ signal: signal
675
+ }), new _promise["default"](function (_resolve, reject) {
676
+ return (0, _setTimeout2["default"])(function () {
677
+ return reject(new Error('timeout'));
678
+ }, 3000);
679
+ })]);
680
+
681
+ case 3:
682
+ res = _context2.sent;
683
+ _context2.next = 6;
684
+ return res.json();
685
+
686
+ case 6:
687
+ json = _context2.sent;
688
+ _context2.next = 9;
689
+ return new _promise["default"](function (resolve) {
690
+ return (0, _setTimeout2["default"])(resolve, cursor ? 2000 : 3000);
691
+ });
692
+
693
+ case 9:
694
+ return _context2.abrupt("return", {
695
+ items: json.results,
696
+ cursor: json.next
697
+ });
698
+
699
+ case 12:
700
+ _context2.prev = 12;
701
+ _context2.t0 = _context2["catch"](0);
702
+ return _context2.abrupt("return", getMockData());
703
+
704
+ case 15:
705
+ case "end":
706
+ return _context2.stop();
707
+ }
708
+ }
709
+ }, _callee2, null, [[0, 12]]);
710
+ }));
711
+
712
+ return function fetchApiData(_x3, _x4, _x5) {
713
+ return _ref4.apply(this, arguments);
714
+ };
715
+ }();
716
+
166
717
  var list = (0, _data.useAsyncList)({
167
- load: function load(_ref3) {
168
- return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
169
- var signal, cursor, filterText, res, json;
170
- return _regenerator["default"].wrap(function _callee$(_context) {
718
+ load: function load(_ref5) {
719
+ return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
720
+ var signal, cursor, filterText;
721
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
171
722
  while (1) {
172
- switch (_context.prev = _context.next) {
723
+ switch (_context3.prev = _context3.next) {
173
724
  case 0:
174
- signal = _ref3.signal, cursor = _ref3.cursor, filterText = _ref3.filterText;
725
+ signal = _ref5.signal, cursor = _ref5.cursor, filterText = _ref5.filterText;
175
726
 
176
727
  if (cursor) {
177
728
  // eslint-disable-next-line
178
- cursor = cursor.replace(/^http:\/\//i, 'https://');
179
- } // If no cursor is available, then we're loading the first page,
180
- // filtering the results returned via a query string that
181
- // mirrors the ComboBox input text.
182
- // Otherwise, the cursor is the next URL to load,
183
- // as returned from the previous page.
729
+ cursor = cursor.replace(/^http:\/\//i, "https://");
730
+ } // check if we are mocking pages
184
731
 
185
732
 
186
- _context.next = 4;
187
- return fetch(cursor || "https://swapi.dev/api/people/?search=".concat(filterText), {
188
- signal: signal
189
- });
733
+ if (!(cursor && (0, _includes["default"])(cursor).call(cursor, 'mock'))) {
734
+ _context3.next = 4;
735
+ break;
736
+ }
737
+
738
+ return _context3.abrupt("return", getMockData(signal, cursor, filterText));
190
739
 
191
740
  case 4:
192
- res = _context.sent;
193
- _context.next = 7;
194
- return res.json();
195
-
196
- case 7:
197
- json = _context.sent;
198
- _context.next = 10;
199
- return new _promise["default"](function (resolve) {
200
- return (0, _setTimeout2["default"])(resolve, cursor ? 2000 : 3000);
201
- });
202
-
203
- case 10:
204
- return _context.abrupt("return", {
205
- items: json.results,
206
- cursor: json.next
207
- });
208
-
209
- case 11:
741
+ return _context3.abrupt("return", fetchApiData(signal, cursor, filterText));
742
+
743
+ case 5:
210
744
  case "end":
211
- return _context.stop();
745
+ return _context3.stop();
212
746
  }
213
747
  }
214
- }, _callee);
748
+ }, _callee3);
215
749
  }))();
216
750
  }
217
751
  });
218
752
  return (0, _react2.jsx)(_Box["default"], {
219
753
  sx: {
220
- maxHeight: '600px'
754
+ maxHeight: '400px'
221
755
  }
222
756
  }, (0, _react2.jsx)(_["default"], (0, _extends2["default"])({}, actions, {
223
757
  items: list.items,
@@ -234,9 +768,16 @@ var InfiniteLoadingList = function InfiniteLoadingList() {
234
768
  };
235
769
 
236
770
  exports.InfiniteLoadingList = InfiniteLoadingList;
771
+ InfiniteLoadingList.parameters = {
772
+ docs: {
773
+ description: {
774
+ story: 'Note: Keep in mind the maxHeight may impact when the scroll callback is triggered. If you notice it\'s being called too often, try adjusting that value or loading more objects to prevent this behavior.'
775
+ }
776
+ }
777
+ };
237
778
 
238
- var MultipleSelection = function MultipleSelection(_ref4) {
239
- var args = (0, _extends2["default"])({}, _ref4);
779
+ var MultipleSelection = function MultipleSelection(_ref6) {
780
+ var args = (0, _extends2["default"])({}, _ref6);
240
781
  return (0, _react2.jsx)(_["default"], (0, _extends2["default"])({}, props, args, {
241
782
  items: items,
242
783
  selectionMode: "multiple"
@@ -32,8 +32,6 @@ var _ListViewContext = require("../ListView/ListViewContext");
32
32
 
33
33
  var _Box = _interopRequireDefault(require("../Box"));
34
34
 
35
- var _Separator = _interopRequireDefault(require("../Separator"));
36
-
37
35
  var _hooks = require("../../hooks");
38
36
 
39
37
  var _react2 = require("@emotion/react");
@@ -90,7 +88,8 @@ var ListViewItem = function ListViewItem(props) {
90
88
  var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
91
89
  isHovered: isHovered,
92
90
  isSelected: isSelected,
93
- isFocused: isDisabled ? false : isFocusVisible
91
+ isFocused: isDisabled ? false : isFocusVisible,
92
+ hasSeparator: hasSeparator
94
93
  }),
95
94
  classNames = _useStatusClasses.classNames;
96
95
 
@@ -111,9 +110,7 @@ var ListViewItem = function ListViewItem(props) {
111
110
  isSelected: isSelected,
112
111
  className: classNames,
113
112
  "data-id": dataId
114
- }, listItemProps), item.rendered)), hasSeparator && (0, _react2.jsx)(_Separator["default"], {
115
- m: "0px"
116
- }));
113
+ }, listItemProps), item.rendered)));
117
114
  };
118
115
 
119
116
  ListViewItem.propTypes = {