@pingux/astro 2.121.0-alpha.0 → 2.121.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 (105) hide show
  1. package/lib/cjs/components/Icon/Icon.js +13 -10
  2. package/lib/cjs/components/IconButton/IconButton.styles.d.ts +37 -0
  3. package/lib/cjs/components/IconButton/IconButton.styles.js +6 -1
  4. package/lib/cjs/components/IconWrapper/iconWrapperAttributes.js +1 -1
  5. package/lib/cjs/components/ListView/ListView.js +5 -0
  6. package/lib/cjs/components/ListView/ListView.stories.d.ts +3 -3
  7. package/lib/cjs/components/ListView/ListView.stories.js +27 -458
  8. package/lib/cjs/components/ListView/ListViewExpandableItem.js +1 -0
  9. package/lib/cjs/components/ListView/ListViewItem.js +4 -1
  10. package/lib/cjs/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.js → components/ListView/stories/ListView.chromatic.stories.js} +2 -2
  11. package/lib/cjs/components/ListView/stories/ListViewNextGenComponent.js +144 -0
  12. package/lib/cjs/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.js → components/ListView/stories/ListViewOnyxDark.stories.js} +3 -3
  13. package/lib/cjs/components/ListViewItem/ListViewItem.js +16 -5
  14. package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +40 -3
  15. package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +15 -1
  16. package/lib/cjs/components/ListViewItem/controls/ListViewItemEditButton.js +1 -1
  17. package/lib/cjs/components/ListViewItem/controls/ListViewItemMenu.js +9 -3
  18. package/lib/cjs/components/ListViewItem/controls/ListViewItemMenu.test.js +1 -0
  19. package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.js +5 -1
  20. package/lib/cjs/components/Pagination/Pagination.stories.js +3 -3
  21. package/lib/cjs/components/SearchField/SearchField.js +2 -8
  22. package/lib/cjs/hooks/useExpandableListViewItem/useExpandableListViewItem.js +9 -3
  23. package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
  24. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +4 -0
  25. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +4 -0
  26. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +1 -0
  27. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
  28. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/nextGenDarkModeOverride.js +2 -0
  29. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/listview.d.ts +58 -0
  30. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/{lsitview.js → listview.js} +37 -2
  31. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +15 -0
  32. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +23 -0
  33. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +34 -0
  34. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +4 -3
  35. package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +1 -0
  36. package/lib/cjs/styles/themes/astro/customProperties/icons.js +2 -1
  37. package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
  38. package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +4 -0
  39. package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.d.ts +4 -0
  40. package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.js +4 -0
  41. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
  42. package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +1 -0
  43. package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +2 -1
  44. package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +1 -0
  45. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +123 -18
  46. package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +24 -0
  47. package/lib/cjs/styles/themes/next-gen/variants/button.js +12 -1
  48. package/lib/cjs/styles/themes/next-gen/variants/listview.d.ts +79 -17
  49. package/lib/cjs/styles/themes/next-gen/variants/listview.js +89 -24
  50. package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +13 -1
  51. package/lib/cjs/styles/themes/next-gen/variants/text.js +16 -4
  52. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +82 -17
  53. package/lib/cjs/styles/themes/next-gen/variants/variants.js +8 -1
  54. package/lib/cjs/types/iconWrapper.d.ts +1 -1
  55. package/lib/cjs/utils/devUtils/constants/animals.js +449 -1
  56. package/lib/components/Icon/Icon.js +13 -10
  57. package/lib/components/IconButton/IconButton.styles.js +6 -1
  58. package/lib/components/IconWrapper/iconWrapperAttributes.js +1 -1
  59. package/lib/components/ListView/ListView.js +5 -0
  60. package/lib/components/ListView/ListView.stories.js +25 -455
  61. package/lib/components/ListView/ListViewExpandableItem.js +1 -0
  62. package/lib/components/ListView/ListViewItem.js +4 -1
  63. package/lib/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.js → components/ListView/stories/ListView.chromatic.stories.js} +2 -2
  64. package/lib/components/ListView/stories/ListViewNextGenComponent.js +130 -0
  65. package/lib/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.js → components/ListView/stories/ListViewOnyxDark.stories.js} +3 -3
  66. package/lib/components/ListViewItem/ListViewItem.js +18 -7
  67. package/lib/components/ListViewItem/ListViewItem.stories.js +40 -3
  68. package/lib/components/ListViewItem/ListViewItem.styles.js +15 -1
  69. package/lib/components/ListViewItem/controls/ListViewItemEditButton.js +1 -1
  70. package/lib/components/ListViewItem/controls/ListViewItemMenu.js +9 -3
  71. package/lib/components/ListViewItem/controls/ListViewItemMenu.test.js +1 -0
  72. package/lib/components/ListViewItem/controls/chart/ListViewItemChart.js +5 -1
  73. package/lib/components/Pagination/Pagination.stories.js +1 -1
  74. package/lib/components/SearchField/SearchField.js +2 -8
  75. package/lib/hooks/useExpandableListViewItem/useExpandableListViewItem.js +9 -3
  76. package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +4 -0
  77. package/lib/styles/themeOverrides/nextGenDarkMode/nextGenDarkModeOverride.js +2 -0
  78. package/lib/styles/themeOverrides/nextGenDarkMode/variants/listview.js +58 -0
  79. package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +15 -0
  80. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +2 -1
  81. package/lib/styles/themes/astro/customProperties/icons.js +2 -1
  82. package/lib/styles/themes/next-gen/colors/iconWrapper.js +4 -0
  83. package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
  84. package/lib/styles/themes/next-gen/customProperties/icons.js +2 -1
  85. package/lib/styles/themes/next-gen/variants/button.js +12 -1
  86. package/lib/styles/themes/next-gen/variants/listview.js +84 -22
  87. package/lib/styles/themes/next-gen/variants/text.js +16 -4
  88. package/lib/styles/themes/next-gen/variants/variants.js +9 -2
  89. package/lib/utils/devUtils/constants/animals.js +449 -1
  90. package/package.json +1 -1
  91. package/lib/cjs/recipes/NextGen/ListViewNextGen.stories.js +0 -23
  92. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/lsitview.d.ts +0 -24
  93. package/lib/cjs/styles/themes/next-gen/stories/ListViewItemNextGen.d.ts +0 -29
  94. package/lib/cjs/styles/themes/next-gen/stories/ListViewItemNextGen.js +0 -84
  95. package/lib/cjs/styles/themes/next-gen/stories/ListViewNextGenComponent.js +0 -67
  96. package/lib/cjs/styles/themes/next-gen/stories/NextGenListViewItem.stories.d.ts +0 -6
  97. package/lib/cjs/styles/themes/next-gen/stories/NextGenListViewItem.stories.js +0 -35
  98. package/lib/recipes/NextGen/ListViewNextGen.stories.js +0 -13
  99. package/lib/styles/themeOverrides/nextGenDarkMode/variants/lsitview.js +0 -24
  100. package/lib/styles/themes/next-gen/stories/ListViewItemNextGen.js +0 -75
  101. package/lib/styles/themes/next-gen/stories/ListViewNextGenComponent.js +0 -58
  102. package/lib/styles/themes/next-gen/stories/NextGenListViewItem.stories.js +0 -25
  103. /package/lib/cjs/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.d.ts → components/ListView/stories/ListView.chromatic.stories.d.ts} +0 -0
  104. /package/lib/cjs/{styles/themes/next-gen → components/ListView}/stories/ListViewNextGenComponent.d.ts +0 -0
  105. /package/lib/cjs/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.d.ts → components/ListView/stories/ListViewOnyxDark.stories.d.ts} +0 -0
@@ -31,12 +31,15 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
31
31
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context14, _context15; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context14 = ownKeys(Object(source), !0)).call(_context14, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context15 = ownKeys(Object(source))).call(_context15, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
32
32
  import React, { useRef, useState } from 'react';
33
33
  import { Item, useAsyncList } from 'react-stately';
34
+ import ClockTimeEightOutlineIcon from '@pingux/mdi-react/ClockTimeEightOutlineIcon';
35
+ import CogIcon from '@pingux/mdi-react/CogIcon';
34
36
  import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
35
37
  import { action } from '@storybook/addon-actions';
36
38
  import isChromatic from 'chromatic/isChromatic';
37
39
  import DocsLayout from '../../../.storybook/storybookDocsLayout';
38
40
  import { Box, Button, ListView, ListViewItem, ListViewItemChart, ListViewItemMenu, ListViewItemSwitchField, SearchField, Text } from '../..';
39
41
  import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
42
+ import animals from '../../utils/devUtils/constants/animals';
40
43
  import loadingStates from '../../utils/devUtils/constants/loadingStates';
41
44
  import { chartData } from '../ListViewItem/controls/chart/chartData';
42
45
  import ListViewReadme from './ListView.mdx';
@@ -66,464 +69,29 @@ var items = [{
66
69
  key: 'Aardvark',
67
70
  name: 'Aardvark',
68
71
  id: '1',
69
- hasSeparator: false
72
+ icon: CogIcon,
73
+ iconWrapperProps: {
74
+ size: 'sm',
75
+ color: 'blue'
76
+ }
70
77
  }, {
71
78
  key: 'Kangaroo',
72
79
  name: 'Kangaroo',
73
- id: '2'
80
+ id: '2',
81
+ icon: ClockTimeEightOutlineIcon,
82
+ iconWrapperProps: {
83
+ size: 'sm',
84
+ color: 'green'
85
+ }
74
86
  }, {
75
87
  key: 'Snake',
76
88
  name: 'Snake',
77
- id: '3'
78
- }];
79
- export var animals = [{
80
- name: 'Aardvark'
81
- }, {
82
- name: 'Albatross'
83
- }, {
84
- name: 'Alligator'
85
- }, {
86
- name: 'Alpaca'
87
- }, {
88
- name: 'Ant'
89
- }, {
90
- name: 'Anteater'
91
- }, {
92
- name: 'Antelope'
93
- }, {
94
- name: 'Ape'
95
- }, {
96
- name: 'Armadillo'
97
- }, {
98
- name: 'Donkey'
99
- }, {
100
- name: 'Baboon'
101
- }, {
102
- name: 'Badger'
103
- }, {
104
- name: 'Barracuda'
105
- }, {
106
- name: 'Bat'
107
- }, {
108
- name: 'Bear'
109
- }, {
110
- name: 'Beaver'
111
- }, {
112
- name: 'Bee'
113
- }, {
114
- name: 'Bison'
115
- }, {
116
- name: 'Boar'
117
- }, {
118
- name: 'Buffalo'
119
- }, {
120
- name: 'Butterfly'
121
- }, {
122
- name: 'Camel'
123
- }, {
124
- name: 'Capybara'
125
- }, {
126
- name: 'Caribou'
127
- }, {
128
- name: 'Cassowary'
129
- }, {
130
- name: 'Cat'
131
- }, {
132
- name: 'Caterpillar'
133
- }, {
134
- name: 'Cattle'
135
- }, {
136
- name: 'Chamois'
137
- }, {
138
- name: 'Cheetah'
139
- }, {
140
- name: 'Chicken'
141
- }, {
142
- name: 'Chimpanzee'
143
- }, {
144
- name: 'Chinchilla'
145
- }, {
146
- name: 'Chough'
147
- }, {
148
- name: 'Clam'
149
- }, {
150
- name: 'Cobra'
151
- }, {
152
- name: 'Cockroach'
153
- }, {
154
- name: 'Cod'
155
- }, {
156
- name: 'Cormorant'
157
- }, {
158
- name: 'Coyote'
159
- }, {
160
- name: 'Crab'
161
- }, {
162
- name: 'Crane'
163
- }, {
164
- name: 'Crocodile'
165
- }, {
166
- name: 'Crow'
167
- }, {
168
- name: 'Curlew'
169
- }, {
170
- name: 'Deer'
171
- }, {
172
- name: 'Dinosaur'
173
- }, {
174
- name: 'Dog'
175
- }, {
176
- name: 'Dogfish'
177
- }, {
178
- name: 'Dolphin'
179
- }, {
180
- name: 'Dotterel'
181
- }, {
182
- name: 'Dove'
183
- }, {
184
- name: 'Dragonfly'
185
- }, {
186
- name: 'Duck'
187
- }, {
188
- name: 'Dugong'
189
- }, {
190
- name: 'Dunlin'
191
- }, {
192
- name: 'Eagle'
193
- }, {
194
- name: 'Echidna'
195
- }, {
196
- name: 'Eel'
197
- }, {
198
- name: 'Eland'
199
- }, {
200
- name: 'Elephant'
201
- }, {
202
- name: 'Elk'
203
- }, {
204
- name: 'Emu'
205
- }, {
206
- name: 'Falcon'
207
- }, {
208
- name: 'Ferret'
209
- }, {
210
- name: 'Finch'
211
- }, {
212
- name: 'Fish'
213
- }, {
214
- name: 'Flamingo'
215
- }, {
216
- name: 'Fly'
217
- }, {
218
- name: 'Fox'
219
- }, {
220
- name: 'Frog'
221
- }, {
222
- name: 'Gaur'
223
- }, {
224
- name: 'Gazelle'
225
- }, {
226
- name: 'Gerbil'
227
- }, {
228
- name: 'Giraffe'
229
- }, {
230
- name: 'Gnat'
231
- }, {
232
- name: 'Gnu'
233
- }, {
234
- name: 'Goat'
235
- }, {
236
- name: 'Goldfinch'
237
- }, {
238
- name: 'Goldfish'
239
- }, {
240
- name: 'Goose'
241
- }, {
242
- name: 'Gorilla'
243
- }, {
244
- name: 'Goshawk'
245
- }, {
246
- name: 'Grasshopper'
247
- }, {
248
- name: 'Grouse'
249
- }, {
250
- name: 'Guanaco'
251
- }, {
252
- name: 'Gull'
253
- }, {
254
- name: 'Hamster'
255
- }, {
256
- name: 'Hare'
257
- }, {
258
- name: 'Hawk'
259
- }, {
260
- name: 'Hedgehog'
261
- }, {
262
- name: 'Heron'
263
- }, {
264
- name: 'Herring'
265
- }, {
266
- name: 'Hippopotamus'
267
- }, {
268
- name: 'Hornet'
269
- }, {
270
- name: 'Horse'
271
- }, {
272
- name: 'Human'
273
- }, {
274
- name: 'Hummingbird'
275
- }, {
276
- name: 'Hyena'
277
- }, {
278
- name: 'Ibex'
279
- }, {
280
- name: 'Ibis'
281
- }, {
282
- name: 'Jackal'
283
- }, {
284
- name: 'Jaguar'
285
- }, {
286
- name: 'Jay'
287
- }, {
288
- name: 'Jellyfish'
289
- }, {
290
- name: 'Kangaroo'
291
- }, {
292
- name: 'Kingfisher'
293
- }, {
294
- name: 'Koala'
295
- }, {
296
- name: 'Kookabura'
297
- }, {
298
- name: 'Kouprey'
299
- }, {
300
- name: 'Kudu'
301
- }, {
302
- name: 'Lapwing'
303
- }, {
304
- name: 'Lark'
305
- }, {
306
- name: 'Lemur'
307
- }, {
308
- name: 'Leopard'
309
- }, {
310
- name: 'Lion'
311
- }, {
312
- name: 'Llama'
313
- }, {
314
- name: 'Lobster'
315
- }, {
316
- name: 'Locust'
317
- }, {
318
- name: 'Loris'
319
- }, {
320
- name: 'Louse'
321
- }, {
322
- name: 'Lyrebird'
323
- }, {
324
- name: 'Magpie'
325
- }, {
326
- name: 'Mallard'
327
- }, {
328
- name: 'Manatee'
329
- }, {
330
- name: 'Mandrill'
331
- }, {
332
- name: 'Mantis'
333
- }, {
334
- name: 'Marten'
335
- }, {
336
- name: 'Meerkat'
337
- }, {
338
- name: 'Mink'
339
- }, {
340
- name: 'Mole'
341
- }, {
342
- name: 'Mongoose'
343
- }, {
344
- name: 'Monkey'
345
- }, {
346
- name: 'Moose'
347
- }, {
348
- name: 'Mosquito'
349
- }, {
350
- name: 'Mouse'
351
- }, {
352
- name: 'Mule'
353
- }, {
354
- name: 'Narwhal'
355
- }, {
356
- name: 'Newt'
357
- }, {
358
- name: 'Nightingale'
359
- }, {
360
- name: 'Octopus'
361
- }, {
362
- name: 'Okapi'
363
- }, {
364
- name: 'Opossum'
365
- }, {
366
- name: 'Oryx'
367
- }, {
368
- name: 'Ostrich'
369
- }, {
370
- name: 'Otter'
371
- }, {
372
- name: 'Owl'
373
- }, {
374
- name: 'Oyster'
375
- }, {
376
- name: 'Panther'
377
- }, {
378
- name: 'Parrot'
379
- }, {
380
- name: 'Partridge'
381
- }, {
382
- name: 'Peafowl'
383
- }, {
384
- name: 'Pelican'
385
- }, {
386
- name: 'Penguin'
387
- }, {
388
- name: 'Pheasant'
389
- }, {
390
- name: 'Pig'
391
- }, {
392
- name: 'Pigeon'
393
- }, {
394
- name: 'Pony'
395
- }, {
396
- name: 'Porcupine'
397
- }, {
398
- name: 'Porpoise'
399
- }, {
400
- name: 'Quail'
401
- }, {
402
- name: 'Quelea'
403
- }, {
404
- name: 'Quetzal'
405
- }, {
406
- name: 'Rabbit'
407
- }, {
408
- name: 'Raccoon'
409
- }, {
410
- name: 'Rail'
411
- }, {
412
- name: 'Ram'
413
- }, {
414
- name: 'Rat'
415
- }, {
416
- name: 'Raven'
417
- }, {
418
- name: 'Red deer'
419
- }, {
420
- name: 'Red panda'
421
- }, {
422
- name: 'Reindeer'
423
- }, {
424
- name: 'Rhinoceros'
425
- }, {
426
- name: 'Rook'
427
- }, {
428
- name: 'Salamander'
429
- }, {
430
- name: 'Salmon'
431
- }, {
432
- name: 'Sand Dollar'
433
- }, {
434
- name: 'Sandpiper'
435
- }, {
436
- name: 'Sardine'
437
- }, {
438
- name: 'Scorpion'
439
- }, {
440
- name: 'Seahorse'
441
- }, {
442
- name: 'Seal'
443
- }, {
444
- name: 'Shark'
445
- }, {
446
- name: 'Sheep'
447
- }, {
448
- name: 'Shrew'
449
- }, {
450
- name: 'Skunk'
451
- }, {
452
- name: 'Snail'
453
- }, {
454
- name: 'Snake'
455
- }, {
456
- name: 'Sparrow'
457
- }, {
458
- name: 'Spider'
459
- }, {
460
- name: 'Spoonbill'
461
- }, {
462
- name: 'Squid'
463
- }, {
464
- name: 'Squirrel'
465
- }, {
466
- name: 'Starling'
467
- }, {
468
- name: 'Stingray'
469
- }, {
470
- name: 'Stinkbug'
471
- }, {
472
- name: 'Stork'
473
- }, {
474
- name: 'Swallow'
475
- }, {
476
- name: 'Swan'
477
- }, {
478
- name: 'Tapir'
479
- }, {
480
- name: 'Tarsier'
481
- }, {
482
- name: 'Termite'
483
- }, {
484
- name: 'Tiger'
485
- }, {
486
- name: 'Toad'
487
- }, {
488
- name: 'Trout'
489
- }, {
490
- name: 'Turkey'
491
- }, {
492
- name: 'Turtle'
493
- }, {
494
- name: 'Viper'
495
- }, {
496
- name: 'Vulture'
497
- }, {
498
- name: 'Wallaby'
499
- }, {
500
- name: 'Walrus'
501
- }, {
502
- name: 'Wasp'
503
- }, {
504
- name: 'Weasel'
505
- }, {
506
- name: 'Whale'
507
- }, {
508
- name: 'Wildcat'
509
- }, {
510
- name: 'Wolf'
511
- }, {
512
- name: 'Wolverine'
513
- }, {
514
- name: 'Wombat'
515
- }, {
516
- name: 'Woodcock'
517
- }, {
518
- name: 'Woodpecker'
519
- }, {
520
- name: 'Worm'
521
- }, {
522
- name: 'Wren'
523
- }, {
524
- name: 'Yak'
525
- }, {
526
- name: 'Zebra'
89
+ id: '3',
90
+ icon: FormSelectIcon,
91
+ iconWrapperProps: {
92
+ size: 'sm',
93
+ color: 'indigo'
94
+ }
527
95
  }];
528
96
  var props = {
529
97
  disabledKeys: ['Snake']
@@ -579,11 +147,12 @@ export var Default = function Default(_ref) {
579
147
  }, ___EmotionJSX(ListViewItem, {
580
148
  data: {
581
149
  text: item.name,
582
- icon: FormSelectIcon
150
+ icon: item.icon
583
151
  },
584
152
  iconProps: {
585
153
  color: 'text.secondary'
586
- }
154
+ },
155
+ iconWrapperProps: item.iconWrapperProps
587
156
  }, ___EmotionJSX(Controls, null)));
588
157
  });
589
158
  };
@@ -630,7 +199,8 @@ export var ControlledExpandableItems = function ControlledExpandableItems(_ref3)
630
199
  return ___EmotionJSX(Box, null, ___EmotionJSX(Button, {
631
200
  onPress: function onPress() {
632
201
  expandAllKeys();
633
- }
202
+ },
203
+ mb: "lg"
634
204
  }, "Expand all"), ___EmotionJSX(ListView, _extends({}, props, args, {
635
205
  items: items,
636
206
  expandedKeys: expandedKeys,
@@ -65,6 +65,7 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
65
65
  ml: 'auto'
66
66
  },
67
67
  icon: isExpanded ? MenuUp : MenuDown,
68
+ variant: "listViewItem.expandIcon",
68
69
  title: {
69
70
  name: "".concat(key, " expand icon button")
70
71
  }
@@ -76,7 +76,9 @@ var ListViewItem = function ListViewItem(props) {
76
76
  isFocused: isDisabled ? false : isFocusVisible || isFocusVisibleWithin,
77
77
  hasSeparator: hasSeparator,
78
78
  hasInsetSeparator: hasInsetSeparator,
79
- isPressed: isPressed
79
+ isPressed: isPressed,
80
+ isFirstItem: item.index === 0,
81
+ isLastItem: item.index === state.collection.size - 1
80
82
  }),
81
83
  classNames = _useStatusClasses.classNames;
82
84
 
@@ -112,6 +114,7 @@ var ListViewItem = function ListViewItem(props) {
112
114
  };
113
115
  ListViewItem.propTypes = {
114
116
  item: PropTypes.shape({
117
+ index: PropTypes.number,
115
118
  key: PropTypes.string,
116
119
  rendered: PropTypes.node,
117
120
  props: PropTypes.shape({
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { AstroProvider, NextGenTheme } from '../../../..';
2
+ import { AstroProvider, NextGenTheme } from '../../..';
3
3
  import { ListViewNextGen } from './ListViewNextGenComponent';
4
4
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
5
  export default {
6
- title: 'Chromatic Only Onyx ListView'
6
+ title: 'Onyx ListView'
7
7
  };
8
8
  export var Default = function Default() {
9
9
  return ___EmotionJSX(AstroProvider, {
@@ -0,0 +1,130 @@
1
+ import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
2
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
3
+ import React, { useRef } from 'react';
4
+ import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
5
+ import TrashCanOutlineIcon from '@pingux/mdi-react/TrashCanOutlineIcon';
6
+ import { Box, Item, ListView, ListViewItem, ListViewItemChart, ListViewItemMenu, ListViewItemSwitchField, SearchField, Text } from '../../..';
7
+ import { chartData } from '../../ListViewItem/controls/chart/chartData';
8
+ import { jsx as ___EmotionJSX } from "@emotion/react";
9
+ var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
10
+ var items = _Array$from({
11
+ length: 10
12
+ }, function (_, index) {
13
+ var id = (index + 1).toString();
14
+ return {
15
+ key: "Animal".concat(id),
16
+ name: "Animal".concat(id),
17
+ id: id
18
+ };
19
+ });
20
+ var colors = ['cyan', 'orange', 'red', 'green', 'purple', 'yellow', 'teal', 'pink', 'yellow', 'green'];
21
+ var getColor = function getColor(index) {
22
+ var lastDigit = index % 10;
23
+ return colors[lastDigit];
24
+ };
25
+ export var ListViewNextGen = function ListViewNextGen() {
26
+ var chartContainerRef = useRef();
27
+ var Controls = function Controls() {
28
+ return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(ListViewItemSwitchField, null), ___EmotionJSX(ListViewItemMenu, null, ___EmotionJSX(Item, {
29
+ key: "enable"
30
+ }, "Enable user"), ___EmotionJSX(Item, {
31
+ key: "disable"
32
+ }, "Disable user"), ___EmotionJSX(Item, {
33
+ key: "delete"
34
+ }, "Delete user")));
35
+ };
36
+ return ___EmotionJSX(Box, {
37
+ backgroundColor: "background.base",
38
+ p: "lg"
39
+ }, ___EmotionJSX(Box, {
40
+ height: "400px",
41
+ mb: "xl"
42
+ }, ___EmotionJSX(Text, {
43
+ as: "h2",
44
+ mb: "md"
45
+ }, "ListView"), ___EmotionJSX(ListView, {
46
+ items: items,
47
+ selectionMode: "single"
48
+ }, _mapInstanceProperty(items).call(items, function (item, index) {
49
+ return ___EmotionJSX(Item, item, ___EmotionJSX(ListViewItem, {
50
+ data: {
51
+ icon: TrashCanOutlineIcon,
52
+ text: item.name,
53
+ subtext: loremText
54
+ },
55
+ iconWrapperProps: {
56
+ size: 'md',
57
+ color: getColor(index)
58
+ },
59
+ hasSeparator: false
60
+ }));
61
+ }))), ___EmotionJSX(Box, {
62
+ height: "400px",
63
+ mb: "xl"
64
+ }, ___EmotionJSX(Text, {
65
+ as: "h2",
66
+ mb: "md"
67
+ }, "ListView with Expanded Items"), ___EmotionJSX(ListView, {
68
+ items: items,
69
+ selectionMode: "expansion",
70
+ expandedKeys: ['Animal1']
71
+ }, function (item) {
72
+ return ___EmotionJSX(Item, {
73
+ key: item.name,
74
+ textValue: item.name
75
+ }, ___EmotionJSX(Box, {
76
+ isRow: true,
77
+ sx: {
78
+ alignItems: 'center'
79
+ }
80
+ }, ___EmotionJSX(Text, {
81
+ variant: "itemTitle"
82
+ }, item.name)), ___EmotionJSX(Box, {
83
+ sx: {
84
+ my: 'lg'
85
+ }
86
+ }, ___EmotionJSX(SearchField, {
87
+ value: "Animal1",
88
+ maxWidth: "400px",
89
+ "aria-label": "Search",
90
+ placeholder: "Search"
91
+ }), ___EmotionJSX(Text, {
92
+ sx: {
93
+ mt: 'md',
94
+ fontWeight: '1'
95
+ }
96
+ }, "Lorem ipsum dolor sit amet consectetur. Viverra nulla nec velit sollicitudin sed nisi mi gravida. Maecenas vestibulum pretium dictum dictum tempus. Sit et rutrum hendrerit facilisi turpis tellus elementum. Egestas consectetur in ac id. Sit aliquam et ut pellentesque in at blandit sed. Sapien morbi cras eleifend lectus.")));
97
+ })), ___EmotionJSX(Box, {
98
+ height: "400px"
99
+ }, ___EmotionJSX(Text, {
100
+ as: "h2",
101
+ mb: "md"
102
+ }, "ListView with Charts"), ___EmotionJSX(ListView, {
103
+ items: items
104
+ }, function (item) {
105
+ return ___EmotionJSX(Item, {
106
+ key: item.name
107
+ }, ___EmotionJSX(ListViewItem, {
108
+ ref: chartContainerRef,
109
+ data: {
110
+ text: item.name,
111
+ subtext: item.subtext,
112
+ icon: FormSelectIcon
113
+ },
114
+ iconProps: {
115
+ color: 'text.secondary'
116
+ }
117
+ }, ___EmotionJSX(ListViewItemChart, {
118
+ containerRef: chartContainerRef,
119
+ chartData: chartData,
120
+ chartDataKey: "fullData",
121
+ title: "Avg daily sign-ons:",
122
+ contentCount: "31",
123
+ contentCountLabel: "Past 7 days",
124
+ chartLabel: "12 wk trend",
125
+ trend: "+115.0%",
126
+ tooltipText: "See Contributing Data",
127
+ ariaLabel: item.name
128
+ }), ___EmotionJSX(Controls, null)));
129
+ })));
130
+ };
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { AstroProvider, NextGenDarkTheme } from '../../../..';
3
- import { ListViewNextGen } from '../../../themes/next-gen/stories/ListViewNextGenComponent';
2
+ import { AstroProvider, NextGenDarkTheme } from '../../..';
3
+ import { ListViewNextGen } from './ListViewNextGenComponent';
4
4
  import { jsx as ___EmotionJSX } from "@emotion/react";
5
5
  export default {
6
- title: 'Chromatic Only Onyx Dark ListView'
6
+ title: 'Onyx Dark ListView'
7
7
  };
8
8
  export var Default = function Default() {
9
9
  return ___EmotionJSX(AstroProvider, {