@dxc-technology/halstack-react 0.0.0-8b133ff → 0.0.0-8b61ced

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 (212) hide show
  1. package/HalstackContext.d.ts +4 -2
  2. package/HalstackContext.js +109 -58
  3. package/accordion/Accordion.js +122 -103
  4. package/accordion/Accordion.stories.tsx +2 -3
  5. package/accordion/Accordion.test.js +9 -10
  6. package/accordion/types.d.ts +5 -4
  7. package/accordion-group/AccordionGroup.js +2 -21
  8. package/accordion-group/AccordionGroup.stories.tsx +27 -1
  9. package/accordion-group/AccordionGroup.test.js +20 -45
  10. package/accordion-group/types.d.ts +10 -3
  11. package/alert/Alert.js +5 -2
  12. package/badge/Badge.d.ts +1 -1
  13. package/badge/Badge.js +5 -3
  14. package/badge/types.d.ts +1 -0
  15. package/bleed/Bleed.js +1 -34
  16. package/bleed/Bleed.stories.tsx +94 -95
  17. package/bleed/types.d.ts +1 -1
  18. package/box/Box.js +23 -33
  19. package/box/types.d.ts +1 -0
  20. package/bulleted-list/BulletedList.d.ts +7 -0
  21. package/bulleted-list/BulletedList.js +123 -0
  22. package/bulleted-list/BulletedList.stories.tsx +200 -0
  23. package/bulleted-list/types.d.ts +11 -0
  24. package/{list → bulleted-list}/types.js +0 -0
  25. package/button/Button.js +46 -62
  26. package/button/Button.stories.tsx +9 -0
  27. package/button/types.d.ts +7 -7
  28. package/card/Card.js +34 -36
  29. package/card/types.d.ts +1 -0
  30. package/checkbox/Checkbox.d.ts +2 -2
  31. package/checkbox/Checkbox.js +95 -99
  32. package/checkbox/Checkbox.stories.tsx +79 -59
  33. package/checkbox/Checkbox.test.js +93 -16
  34. package/checkbox/types.d.ts +6 -2
  35. package/chip/types.d.ts +1 -1
  36. package/common/variables.js +237 -97
  37. package/date-input/Calendar.d.ts +4 -0
  38. package/date-input/Calendar.js +258 -0
  39. package/date-input/DateInput.js +81 -223
  40. package/date-input/DateInput.stories.tsx +30 -17
  41. package/date-input/DateInput.test.js +411 -138
  42. package/date-input/DatePicker.d.ts +4 -0
  43. package/date-input/DatePicker.js +160 -0
  44. package/date-input/YearPicker.d.ts +4 -0
  45. package/date-input/YearPicker.js +115 -0
  46. package/date-input/types.d.ts +53 -0
  47. package/dialog/Dialog.js +52 -28
  48. package/dialog/Dialog.stories.tsx +57 -2
  49. package/dialog/Dialog.test.js +34 -4
  50. package/dialog/types.d.ts +3 -2
  51. package/dropdown/Dropdown.d.ts +1 -1
  52. package/dropdown/Dropdown.js +247 -247
  53. package/dropdown/Dropdown.stories.tsx +126 -63
  54. package/dropdown/Dropdown.test.js +504 -108
  55. package/dropdown/DropdownMenu.d.ts +4 -0
  56. package/dropdown/DropdownMenu.js +80 -0
  57. package/dropdown/DropdownMenuItem.d.ts +4 -0
  58. package/dropdown/DropdownMenuItem.js +92 -0
  59. package/dropdown/types.d.ts +25 -5
  60. package/file-input/FileInput.d.ts +2 -2
  61. package/file-input/FileInput.js +183 -222
  62. package/file-input/FileInput.stories.tsx +38 -10
  63. package/file-input/FileInput.test.js +53 -12
  64. package/file-input/FileItem.d.ts +4 -14
  65. package/file-input/FileItem.js +43 -66
  66. package/file-input/types.d.ts +17 -0
  67. package/flex/Flex.d.ts +4 -0
  68. package/flex/Flex.js +69 -0
  69. package/flex/Flex.stories.tsx +103 -0
  70. package/flex/types.d.ts +32 -0
  71. package/{radio → flex}/types.js +0 -0
  72. package/footer/Footer.js +7 -5
  73. package/footer/Footer.stories.tsx +8 -1
  74. package/footer/Icons.js +1 -1
  75. package/footer/types.d.ts +2 -1
  76. package/header/Header.js +80 -75
  77. package/header/Header.stories.tsx +4 -4
  78. package/header/Icons.js +2 -2
  79. package/header/types.d.ts +3 -2
  80. package/inset/Inset.js +1 -34
  81. package/inset/Inset.stories.tsx +36 -36
  82. package/inset/types.d.ts +1 -1
  83. package/layout/ApplicationLayout.d.ts +16 -6
  84. package/layout/ApplicationLayout.js +70 -117
  85. package/layout/ApplicationLayout.stories.tsx +84 -93
  86. package/layout/Icons.d.ts +5 -0
  87. package/layout/Icons.js +13 -2
  88. package/layout/SidenavContext.d.ts +5 -0
  89. package/layout/SidenavContext.js +19 -0
  90. package/layout/types.d.ts +18 -33
  91. package/link/Link.d.ts +3 -2
  92. package/link/Link.js +58 -71
  93. package/link/Link.stories.tsx +95 -53
  94. package/link/Link.test.js +7 -15
  95. package/link/types.d.ts +7 -23
  96. package/main.d.ts +7 -10
  97. package/main.js +38 -56
  98. package/number-input/NumberInput.test.js +43 -7
  99. package/number-input/types.d.ts +1 -1
  100. package/package.json +16 -19
  101. package/paginator/Paginator.js +17 -38
  102. package/paginator/Paginator.test.js +43 -1
  103. package/paragraph/Paragraph.d.ts +6 -0
  104. package/paragraph/Paragraph.js +38 -0
  105. package/paragraph/Paragraph.stories.tsx +44 -0
  106. package/password-input/PasswordInput.js +7 -4
  107. package/password-input/PasswordInput.test.js +14 -14
  108. package/password-input/types.d.ts +1 -1
  109. package/progress-bar/ProgressBar.d.ts +2 -2
  110. package/progress-bar/ProgressBar.js +57 -51
  111. package/progress-bar/ProgressBar.stories.jsx +13 -11
  112. package/progress-bar/ProgressBar.test.js +67 -22
  113. package/progress-bar/types.d.ts +3 -4
  114. package/quick-nav/QuickNav.js +75 -22
  115. package/quick-nav/QuickNav.stories.tsx +131 -26
  116. package/quick-nav/types.d.ts +4 -4
  117. package/radio-group/Radio.d.ts +1 -1
  118. package/radio-group/Radio.js +43 -28
  119. package/radio-group/RadioGroup.js +30 -27
  120. package/radio-group/RadioGroup.stories.tsx +1 -0
  121. package/radio-group/RadioGroup.test.js +123 -96
  122. package/radio-group/types.d.ts +2 -2
  123. package/resultsetTable/Icons.d.ts +7 -0
  124. package/resultsetTable/Icons.js +51 -0
  125. package/resultsetTable/ResultsetTable.js +48 -107
  126. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  127. package/resultsetTable/ResultsetTable.test.js +65 -41
  128. package/resultsetTable/types.d.ts +2 -2
  129. package/select/Listbox.d.ts +1 -1
  130. package/select/Listbox.js +58 -8
  131. package/select/Select.js +80 -90
  132. package/select/Select.stories.tsx +147 -105
  133. package/select/Select.test.js +425 -249
  134. package/select/types.d.ts +2 -5
  135. package/sidenav/Sidenav.d.ts +6 -5
  136. package/sidenav/Sidenav.js +184 -52
  137. package/sidenav/Sidenav.stories.tsx +154 -156
  138. package/sidenav/Sidenav.test.js +25 -37
  139. package/sidenav/types.d.ts +50 -27
  140. package/slider/Slider.d.ts +2 -2
  141. package/slider/Slider.js +120 -95
  142. package/slider/Slider.stories.tsx +7 -1
  143. package/slider/Slider.test.js +121 -21
  144. package/slider/types.d.ts +6 -2
  145. package/spinner/Spinner.js +3 -3
  146. package/switch/Switch.d.ts +2 -2
  147. package/switch/Switch.js +138 -68
  148. package/switch/Switch.stories.tsx +8 -30
  149. package/switch/Switch.test.js +144 -17
  150. package/switch/types.d.ts +6 -2
  151. package/table/Table.js +1 -1
  152. package/table/Table.test.js +1 -1
  153. package/tabs/Tab.d.ts +4 -0
  154. package/tabs/Tab.js +135 -0
  155. package/tabs/Tabs.js +360 -104
  156. package/tabs/Tabs.stories.tsx +74 -7
  157. package/tabs/Tabs.test.js +217 -6
  158. package/tabs/types.d.ts +15 -5
  159. package/tabs-nav/NavTabs.d.ts +8 -0
  160. package/tabs-nav/NavTabs.js +125 -0
  161. package/tabs-nav/NavTabs.stories.tsx +170 -0
  162. package/tabs-nav/NavTabs.test.js +82 -0
  163. package/tabs-nav/Tab.d.ts +4 -0
  164. package/tabs-nav/Tab.js +130 -0
  165. package/tabs-nav/types.d.ts +53 -0
  166. package/{row → tabs-nav}/types.js +0 -0
  167. package/tag/Tag.js +1 -1
  168. package/tag/types.d.ts +1 -1
  169. package/text-input/Icons.d.ts +8 -0
  170. package/text-input/Icons.js +60 -0
  171. package/text-input/Suggestion.d.ts +4 -0
  172. package/text-input/Suggestion.js +84 -0
  173. package/text-input/Suggestions.d.ts +4 -0
  174. package/text-input/Suggestions.js +134 -0
  175. package/text-input/TextInput.js +211 -330
  176. package/text-input/TextInput.stories.tsx +194 -182
  177. package/text-input/TextInput.test.js +738 -726
  178. package/text-input/types.d.ts +33 -2
  179. package/textarea/Textarea.js +10 -19
  180. package/textarea/types.d.ts +1 -1
  181. package/toggle-group/types.d.ts +1 -1
  182. package/typography/Typography.d.ts +4 -0
  183. package/typography/Typography.js +131 -0
  184. package/typography/Typography.stories.tsx +198 -0
  185. package/typography/types.d.ts +18 -0
  186. package/{stack → typography}/types.js +0 -0
  187. package/useTranslatedLabels.d.ts +2 -0
  188. package/useTranslatedLabels.js +20 -0
  189. package/wizard/Wizard.js +36 -41
  190. package/wizard/Wizard.stories.tsx +20 -1
  191. package/wizard/types.d.ts +5 -4
  192. package/common/RequiredComponent.js +0 -32
  193. package/list/List.d.ts +0 -4
  194. package/list/List.js +0 -47
  195. package/list/List.stories.tsx +0 -95
  196. package/list/types.d.ts +0 -7
  197. package/radio/Radio.d.ts +0 -4
  198. package/radio/Radio.js +0 -173
  199. package/radio/Radio.stories.tsx +0 -192
  200. package/radio/Radio.test.js +0 -71
  201. package/radio/types.d.ts +0 -54
  202. package/row/Row.d.ts +0 -3
  203. package/row/Row.js +0 -127
  204. package/row/Row.stories.tsx +0 -237
  205. package/row/types.d.ts +0 -28
  206. package/stack/Stack.d.ts +0 -3
  207. package/stack/Stack.js +0 -97
  208. package/stack/Stack.stories.tsx +0 -164
  209. package/stack/types.d.ts +0 -24
  210. package/text/Text.d.ts +0 -7
  211. package/text/Text.js +0 -30
  212. package/text/Text.stories.tsx +0 -19
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
-
3
- import { userEvent, within, waitFor } from "@storybook/testing-library";
4
- import { fireEvent } from "@testing-library/react";
5
-
2
+ import { userEvent, within } from "@storybook/testing-library";
6
3
  import Title from "../../.storybook/components/Title";
7
4
  import ExampleContainer from "../../.storybook/components/ExampleContainer";
8
-
9
5
  import DxcSelect from "./Select";
6
+ import Listbox from "./Listbox";
7
+ import DxcButton from "../button/Button";
8
+ import DxcCheckbox from "../checkbox/Checkbox";
10
9
 
11
10
  export default {
12
11
  title: "Select",
@@ -340,7 +339,7 @@ const Select = () => (
340
339
  <DxcSelect label="Label" options={single_options} multiple defaultValue={["1", "2", "3", "4"]} />
341
340
  <Title title="Value with ellipsis" theme="light" level={4} />
342
341
  <DxcSelect label="Label" options={optionsWithEllipsisMedium} defaultValue="1" size="medium" />
343
- <Title title="Option with ellipsis" theme="light" level={4} />
342
+ <Title title="Options with ellipsis" theme="light" level={4} />
344
343
  <DxcSelect
345
344
  label="Label"
346
345
  placeholder="Choose an option"
@@ -351,16 +350,104 @@ const Select = () => (
351
350
  </ExampleContainer>
352
351
  </>
353
352
  );
354
- export const Chromatic = Select.bind({});
355
- Chromatic.play = async ({ canvasElement }) => {
356
- const canvas = within(canvasElement);
357
- await userEvent.click(canvas.getAllByRole("combobox")[24]);
358
- };
359
- const DefaultSelect = () => (
360
- <ExampleContainer expanded>
361
- <Title title="Default select" theme="light" level={4} />
362
- <DxcSelect label="Select label" options={single_options} optional placeholder="Choose an option" />
363
- </ExampleContainer>
353
+ const SelectListbox = () => (
354
+ <>
355
+ <Title title="Listbox" theme="light" level={2} />
356
+ <Title title="Default with opened listbox" theme="light" level={3} />
357
+ <ExampleContainer>
358
+ <div style={{ display: "flex", gap: "30px", flexDirection: "column", marginBottom: "80px" }}>
359
+ <DxcSelect label="Label" options={single_options} optional placeholder="Choose an option" />
360
+ <DxcCheckbox
361
+ label="You understand the selection and give your consent"
362
+ onChange={() => {}}
363
+ labelPosition="after"
364
+ />
365
+ <DxcButton label="Submit" onClick={() => {}} size="medium" />
366
+ </div>
367
+ </ExampleContainer>
368
+ <Title title="Listbox option states" theme="light" level={3} />
369
+ <ExampleContainer pseudoState="pseudo-hover">
370
+ <Title title="Hovered option" theme="light" level={4} />
371
+ <Listbox
372
+ id="x"
373
+ currentValue=""
374
+ options={one_option}
375
+ visualFocusIndex={-1}
376
+ lastOptionIndex={0}
377
+ multiple={false}
378
+ optional={false}
379
+ optionalItem={{ label: "Empty", value: "" }}
380
+ searchable={false}
381
+ handleOptionOnClick={() => {}}
382
+ getSelectWidth={() => 360}
383
+ />
384
+ </ExampleContainer>
385
+ <ExampleContainer pseudoState="pseudo-active">
386
+ <Title title="Active option" theme="light" level={4} />
387
+ <Listbox
388
+ id="x"
389
+ currentValue=""
390
+ options={one_option}
391
+ visualFocusIndex={-1}
392
+ lastOptionIndex={0}
393
+ multiple={false}
394
+ optional={false}
395
+ optionalItem={{ label: "Empty", value: "" }}
396
+ searchable={false}
397
+ handleOptionOnClick={() => {}}
398
+ getSelectWidth={() => 360}
399
+
400
+ />
401
+ </ExampleContainer>
402
+ <ExampleContainer>
403
+ <Title title="Focused option" theme="light" level={4} />
404
+ <Listbox
405
+ id="x"
406
+ currentValue=""
407
+ options={one_option}
408
+ visualFocusIndex={0}
409
+ lastOptionIndex={0}
410
+ multiple={false}
411
+ optional={false}
412
+ optionalItem={{ label: "Empty", value: "" }}
413
+ searchable={false}
414
+ handleOptionOnClick={() => {}}
415
+ getSelectWidth={() => 360}
416
+ />
417
+ </ExampleContainer>
418
+ <ExampleContainer pseudoState="pseudo-hover">
419
+ <Title title="Hovered selected option" theme="light" level={4} />
420
+ <Listbox
421
+ id="x"
422
+ currentValue="1"
423
+ options={single_options}
424
+ visualFocusIndex={-1}
425
+ lastOptionIndex={3}
426
+ multiple={false}
427
+ optional={false}
428
+ optionalItem={{ label: "Empty", value: "" }}
429
+ searchable={false}
430
+ handleOptionOnClick={() => {}}
431
+ getSelectWidth={() => 360}
432
+ />
433
+ </ExampleContainer>
434
+ <ExampleContainer pseudoState="pseudo-active">
435
+ <Title title="Active selected option" theme="light" level={4} />
436
+ <Listbox
437
+ id="x"
438
+ currentValue="2"
439
+ options={single_options}
440
+ visualFocusIndex={0}
441
+ lastOptionIndex={3}
442
+ multiple={false}
443
+ optional={false}
444
+ optionalItem={{ label: "Empty", value: "" }}
445
+ searchable={false}
446
+ handleOptionOnClick={() => {}}
447
+ getSelectWidth={() => 360}
448
+ />
449
+ </ExampleContainer>
450
+ </>
364
451
  );
365
452
  const SearchableSelect = () => (
366
453
  <ExampleContainer expanded>
@@ -368,13 +455,18 @@ const SearchableSelect = () => (
368
455
  <DxcSelect label="Select Label" searchable options={single_options} placeholder="Choose an option" />
369
456
  </ExampleContainer>
370
457
  );
371
- const SearchableWithValue = () => (
458
+ const SearchValue = () => (
372
459
  <ExampleContainer expanded>
373
460
  <Title title="Searchable select with value" theme="light" level={4} />
374
- <DxcSelect label="Select Label" searchable defaultValue="1" options={single_options} placeholder="Choose an option" />
461
+ <DxcSelect
462
+ label="Select Label"
463
+ searchable
464
+ defaultValue="1"
465
+ options={single_options}
466
+ placeholder="Choose an option"
467
+ />
375
468
  </ExampleContainer>
376
469
  );
377
-
378
470
  const MultipleSelect = () => (
379
471
  <>
380
472
  <ExampleContainer expanded>
@@ -398,7 +490,13 @@ const DefaultGroupedOptionsSelect = () => (
398
490
  const MultipleGroupedOptionsSelect = () => (
399
491
  <ExampleContainer expanded>
400
492
  <Title title="Grouped options multiple select" theme="light" level={4} />
401
- <DxcSelect label="Label" options={group_options} defaultValue={["0", "2"]} multiple placeholder="Choose an option" />
493
+ <DxcSelect
494
+ label="Label"
495
+ options={group_options}
496
+ defaultValue={["0", "2"]}
497
+ multiple
498
+ placeholder="Choose an option"
499
+ />
402
500
  </ExampleContainer>
403
501
  );
404
502
  const RescaledIcons = () => (
@@ -431,36 +529,7 @@ const MultipleGroupedOptionsSelectWithIcons = () => (
431
529
  />
432
530
  </ExampleContainer>
433
531
  );
434
- const OnlyOneOptionHovered = () => (
435
- <ExampleContainer pseudoState="pseudo-hover" expanded>
436
- <Title title="Hovered Option" theme="light" level={4} />
437
- <DxcSelect label="Hovered" options={one_option} placeholder="Choose an option" />
438
- </ExampleContainer>
439
- );
440
- const OnlyOneOptionFocused = () => (
441
- <ExampleContainer pseudoState="pseudo-focus" expanded>
442
- <Title title="Focused Option" theme="light" level={4} />
443
- <DxcSelect label="Focused" options={one_option} placeholder="Choose an option" />
444
- </ExampleContainer>
445
- );
446
- const OnlyOneOptionActived = () => (
447
- <ExampleContainer pseudoState="pseudo-active" expanded>
448
- <Title title="Actived Option" theme="light" level={4} />
449
- <DxcSelect label="Actived" options={one_option} placeholder="Choose an option" />
450
- </ExampleContainer>
451
- );
452
- const SelectedOptionHovered = () => (
453
- <ExampleContainer pseudoState="pseudo-hover" expanded>
454
- <Title title="Hovered Selected Option" theme="light" level={4} />
455
- <DxcSelect label="Hovered" defaultValue="1" options={one_option} placeholder="Choose an option" />
456
- </ExampleContainer>
457
- );
458
- const SelectedOptionActived = () => (
459
- <ExampleContainer pseudoState="pseudo-active" expanded>
460
- <Title title="Actived Selected Option" theme="light" level={4} />
461
- <DxcSelect label="Actived" defaultValue="1" options={one_option} placeholder="Choose an option" />
462
- </ExampleContainer>
463
- );
532
+
464
533
  const MultipleSearchable = () => (
465
534
  <ExampleContainer expanded>
466
535
  <Title title="Searchable multiple select with value" theme="light" level={4} />
@@ -474,28 +543,34 @@ const MultipleSearchable = () => (
474
543
  />
475
544
  </ExampleContainer>
476
545
  );
477
- export const OptionsDisplayed = DefaultSelect.bind({});
478
- OptionsDisplayed.play = async ({ canvasElement }) => {
546
+
547
+ export const Chromatic = Select.bind({});
548
+ Chromatic.play = async ({ canvasElement }) => {
549
+ const canvas = within(canvasElement);
550
+ await userEvent.click(canvas.getAllByRole("combobox")[24]);
551
+ };
552
+
553
+ export const ListboxStates = SelectListbox.bind({});
554
+ ListboxStates.play = async ({ canvasElement }) => {
479
555
  const canvas = within(canvasElement);
480
556
  const select = canvas.getByRole("combobox");
481
557
  await userEvent.click(select);
482
558
  };
559
+
483
560
  export const Searchable = SearchableSelect.bind({});
484
561
  Searchable.play = async ({ canvasElement }) => {
485
562
  const canvas = within(canvasElement);
486
- await userEvent.click(canvas.getByRole("combobox"));
487
- await waitFor(async () => {
488
- userEvent.type(canvas.getByRole("combobox"), "r");
489
- });
563
+ await userEvent.type(canvas.getByRole("combobox"), "r");
490
564
  };
491
- export const SelectSearchableWithValue = SearchableWithValue.bind({});
492
- SelectSearchableWithValue.play = async ({ canvasElement }) => {
565
+
566
+ export const SearchableWithValue = SearchValue.bind({});
567
+ SearchableWithValue.play = async ({ canvasElement }) => {
493
568
  const canvas = within(canvasElement);
494
569
  await userEvent.click(canvas.getByRole("combobox"));
495
570
  };
496
571
 
497
- export const SelectMultipleSearchableWithValue = MultipleSearchable.bind({});
498
- SelectMultipleSearchableWithValue.play = async ({ canvasElement }) => {
572
+ export const MultipleSearchableWithValue = MultipleSearchable.bind({});
573
+ MultipleSearchableWithValue.play = async ({ canvasElement }) => {
499
574
  const canvas = within(canvasElement);
500
575
  await userEvent.click(canvas.getAllByRole("combobox")[0]);
501
576
  };
@@ -507,75 +582,42 @@ GroupOptionsDisplayed.play = async ({ canvasElement }) => {
507
582
  await userEvent.click(select);
508
583
  };
509
584
 
510
- export const SelectMultipleOptionsDisplayed = MultipleSelect.bind({});
511
- SelectMultipleOptionsDisplayed.play = async ({ canvasElement }) => {
585
+ export const MultipleOptionsDisplayed = MultipleSelect.bind({});
586
+ MultipleOptionsDisplayed.play = async ({ canvasElement }) => {
512
587
  const canvas = within(canvasElement);
513
588
  await userEvent.click(canvas.getAllByRole("combobox")[0]);
514
589
  };
515
590
 
516
- export const SelectMultipleGroupedOptionsDisplayed = MultipleGroupedOptionsSelect.bind({});
517
- SelectMultipleGroupedOptionsDisplayed.play = async ({ canvasElement }) => {
518
- const canvas = within(canvasElement);
519
- const select = canvas.getByRole("combobox");
520
- await userEvent.click(select);
521
- };
522
- export const SelectWithIconsDisplayed = SelectWithIcons.bind({});
523
- SelectWithIconsDisplayed.play = async ({ canvasElement }) => {
591
+ export const MultipleGroupedOptionsDisplayed = MultipleGroupedOptionsSelect.bind({});
592
+ MultipleGroupedOptionsDisplayed.play = async ({ canvasElement }) => {
524
593
  const canvas = within(canvasElement);
525
594
  const select = canvas.getByRole("combobox");
526
595
  await userEvent.click(select);
527
596
  };
528
597
 
529
- export const SelectWithRescaledIconsDisplayed = RescaledIcons.bind({});
530
- SelectWithRescaledIconsDisplayed.play = async ({ canvasElement }) => {
531
- const canvas = within(canvasElement);
532
- const select = canvas.getByRole("combobox");
533
- await userEvent.click(select);
534
- };
535
- export const SelectMultipleWithIconsDisplayed = SelectMultipleWithIcons.bind({});
536
- SelectMultipleWithIconsDisplayed.play = async ({ canvasElement }) => {
598
+ export const WithIconsDisplayed = SelectWithIcons.bind({});
599
+ WithIconsDisplayed.play = async ({ canvasElement }) => {
537
600
  const canvas = within(canvasElement);
538
601
  const select = canvas.getByRole("combobox");
539
602
  await userEvent.click(select);
540
603
  };
541
604
 
542
- export const SelectMultipleGroupedWithIconsDisplayed = MultipleGroupedOptionsSelectWithIcons.bind({});
543
- SelectMultipleGroupedWithIconsDisplayed.play = async ({ canvasElement }) => {
605
+ export const WithRescaledIconsDisplayed = RescaledIcons.bind({});
606
+ WithRescaledIconsDisplayed.play = async ({ canvasElement }) => {
544
607
  const canvas = within(canvasElement);
545
608
  const select = canvas.getByRole("combobox");
546
609
  await userEvent.click(select);
547
610
  };
548
611
 
549
- export const OptionHovered = OnlyOneOptionHovered.bind({});
550
- OptionHovered.play = async ({ canvasElement }) => {
612
+ export const MultipleWithIconsDisplayed = SelectMultipleWithIcons.bind({});
613
+ MultipleWithIconsDisplayed.play = async ({ canvasElement }) => {
551
614
  const canvas = within(canvasElement);
552
615
  const select = canvas.getByRole("combobox");
553
616
  await userEvent.click(select);
554
617
  };
555
618
 
556
- export const OptionFocused = OnlyOneOptionFocused.bind({});
557
- OptionFocused.play = async ({ canvasElement }) => {
558
- const canvas = within(canvasElement);
559
- const select = canvas.getByRole("combobox");
560
- await userEvent.click(select);
561
- await waitFor(async () => {
562
- fireEvent.keyDown(select, { key: "ArrowDown", code: "ArrowDown", keyCode: 40, charCode: 40 });
563
- });
564
- };
565
- export const OptionActived = OnlyOneOptionActived.bind({});
566
- OptionActived.play = async ({ canvasElement }) => {
567
- const canvas = within(canvasElement);
568
- const select = canvas.getByRole("combobox");
569
- await userEvent.click(select);
570
- };
571
- export const OptionSelectedHovered = SelectedOptionHovered.bind({});
572
- OptionSelectedHovered.play = async ({ canvasElement }) => {
573
- const canvas = within(canvasElement);
574
- const select = canvas.getByRole("combobox");
575
- await userEvent.click(select);
576
- };
577
- export const OptionSelectedActived = SelectedOptionActived.bind({});
578
- OptionSelectedActived.play = async ({ canvasElement }) => {
619
+ export const MultipleGroupedWithIconsDisplayed = MultipleGroupedOptionsSelectWithIcons.bind({});
620
+ MultipleGroupedWithIconsDisplayed.play = async ({ canvasElement }) => {
579
621
  const canvas = within(canvasElement);
580
622
  const select = canvas.getByRole("combobox");
581
623
  await userEvent.click(select);