@12-apps/ui 1.0.0

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 (633) hide show
  1. package/components-catalog.md +806 -0
  2. package/components-guidelines.md +347 -0
  3. package/dist/index.cjs +2 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +2 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +1 -0
  8. package/dist/index.js.map +1 -0
  9. package/eslint.config.js +77 -0
  10. package/package.json +247 -0
  11. package/src/__tests__/package-wiring.test.ts +37 -0
  12. package/src/__tests__/setup.ts +1 -0
  13. package/src/__tests__/social-login-button.test.tsx +186 -0
  14. package/src/__tests__/user-avatar.test.tsx +195 -0
  15. package/src/button.tsx +22 -0
  16. package/src/components/command/__tests__/command.test.tsx +112 -0
  17. package/src/components/data-display/Alert/Alert.md +209 -0
  18. package/src/components/data-display/Alert/Alert.stories.tsx +561 -0
  19. package/src/components/data-display/Alert/Alert.test.stories.tsx +709 -0
  20. package/src/components/data-display/Alert/Alert.tsx +449 -0
  21. package/src/components/data-display/Alert/Alert.types.ts +79 -0
  22. package/src/components/data-display/Alert/index.ts +2 -0
  23. package/src/components/data-display/AlertDialog/AlertDialog.md +408 -0
  24. package/src/components/data-display/AlertDialog/AlertDialog.stories.tsx +360 -0
  25. package/src/components/data-display/AlertDialog/AlertDialog.test.stories.tsx +753 -0
  26. package/src/components/data-display/AlertDialog/AlertDialog.tsx +273 -0
  27. package/src/components/data-display/AlertDialog/AlertDialog.types.ts +74 -0
  28. package/src/components/data-display/AlertDialog/index.ts +2 -0
  29. package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.stories.tsx +230 -0
  30. package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.test.stories.tsx +270 -0
  31. package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.tsx +116 -0
  32. package/src/components/data-display/AsyncStateContainer/AsyncStateContainer.types.ts +70 -0
  33. package/src/components/data-display/AsyncStateContainer/index.ts +2 -0
  34. package/src/components/data-display/Avatar/Avatar.md +568 -0
  35. package/src/components/data-display/Avatar/Avatar.stories.tsx +718 -0
  36. package/src/components/data-display/Avatar/Avatar.test.stories.tsx +820 -0
  37. package/src/components/data-display/Avatar/Avatar.tsx +507 -0
  38. package/src/components/data-display/Avatar/Avatar.types.ts +88 -0
  39. package/src/components/data-display/Avatar/index.ts +2 -0
  40. package/src/components/data-display/Badge/Badge.md +469 -0
  41. package/src/components/data-display/Badge/Badge.stories.tsx +1136 -0
  42. package/src/components/data-display/Badge/Badge.test.stories.tsx +1193 -0
  43. package/src/components/data-display/Badge/Badge.tsx +606 -0
  44. package/src/components/data-display/Badge/Badge.types.ts +118 -0
  45. package/src/components/data-display/Badge/index.ts +2 -0
  46. package/src/components/data-display/Banner/Banner.stories.tsx +524 -0
  47. package/src/components/data-display/Banner/Banner.test.stories.tsx +503 -0
  48. package/src/components/data-display/Banner/Banner.tsx +350 -0
  49. package/src/components/data-display/Banner/Banner.types.ts +41 -0
  50. package/src/components/data-display/Banner/banner.md +141 -0
  51. package/src/components/data-display/Banner/index.ts +2 -0
  52. package/src/components/data-display/Carousel/Carousel.md +815 -0
  53. package/src/components/data-display/Carousel/Carousel.stories.tsx +607 -0
  54. package/src/components/data-display/Carousel/Carousel.test.stories.tsx +691 -0
  55. package/src/components/data-display/Carousel/Carousel.tsx +765 -0
  56. package/src/components/data-display/Carousel/Carousel.types.ts +79 -0
  57. package/src/components/data-display/Carousel/index.ts +8 -0
  58. package/src/components/data-display/Chart/Chart.md +352 -0
  59. package/src/components/data-display/Chart/Chart.stories.tsx +568 -0
  60. package/src/components/data-display/Chart/Chart.test.stories.tsx +174 -0
  61. package/src/components/data-display/Chart/Chart.tsx +520 -0
  62. package/src/components/data-display/Chart/Chart.types.ts +65 -0
  63. package/src/components/data-display/Chart/index.ts +2 -0
  64. package/src/components/data-display/Chip/Chip.stories.tsx +251 -0
  65. package/src/components/data-display/Chip/Chip.test.stories.tsx +263 -0
  66. package/src/components/data-display/Chip/Chip.tsx +134 -0
  67. package/src/components/data-display/Chip/Chip.types.ts +51 -0
  68. package/src/components/data-display/Chip/chip.md +395 -0
  69. package/src/components/data-display/Chip/index.ts +2 -0
  70. package/src/components/data-display/DataGrid/DataGrid.md +602 -0
  71. package/src/components/data-display/DataGrid/DataGrid.stories.tsx +515 -0
  72. package/src/components/data-display/DataGrid/DataGrid.test.stories.tsx +659 -0
  73. package/src/components/data-display/DataGrid/DataGrid.tsx +743 -0
  74. package/src/components/data-display/DataGrid/DataGrid.types.ts +171 -0
  75. package/src/components/data-display/DataGrid/index.ts +21 -0
  76. package/src/components/data-display/DateTimeDisplay/DateTimeDisplay.tsx +197 -0
  77. package/src/components/data-display/DateTimeDisplay/DateTimeDisplay.types.ts +46 -0
  78. package/src/components/data-display/DateTimeDisplay/index.ts +2 -0
  79. package/src/components/data-display/DescriptionItem/DescriptionItem.md +226 -0
  80. package/src/components/data-display/DescriptionItem/DescriptionItem.stories.tsx +254 -0
  81. package/src/components/data-display/DescriptionItem/DescriptionItem.tsx +100 -0
  82. package/src/components/data-display/DescriptionItem/DescriptionItem.types.ts +1 -0
  83. package/src/components/data-display/DescriptionItem/index.ts +2 -0
  84. package/src/components/data-display/EmptyState/EmptyState.md +265 -0
  85. package/src/components/data-display/EmptyState/EmptyState.stories.tsx +282 -0
  86. package/src/components/data-display/EmptyState/EmptyState.test.stories.tsx +441 -0
  87. package/src/components/data-display/EmptyState/EmptyState.tsx +180 -0
  88. package/src/components/data-display/EmptyState/EmptyState.types.ts +31 -0
  89. package/src/components/data-display/EmptyState/index.ts +2 -0
  90. package/src/components/data-display/ErrorState/ErrorState.stories.tsx +110 -0
  91. package/src/components/data-display/ErrorState/ErrorState.test.stories.tsx +133 -0
  92. package/src/components/data-display/ErrorState/ErrorState.tsx +118 -0
  93. package/src/components/data-display/ErrorState/ErrorState.types.ts +45 -0
  94. package/src/components/data-display/ErrorState/index.ts +2 -0
  95. package/src/components/data-display/HoverCard/HoverCard.md +389 -0
  96. package/src/components/data-display/HoverCard/HoverCard.stories.tsx +648 -0
  97. package/src/components/data-display/HoverCard/HoverCard.test.stories.tsx +929 -0
  98. package/src/components/data-display/HoverCard/HoverCard.tsx +657 -0
  99. package/src/components/data-display/HoverCard/HoverCard.types.ts +116 -0
  100. package/src/components/data-display/HoverCard/index.ts +2 -0
  101. package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.md +532 -0
  102. package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.stories.tsx +411 -0
  103. package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.tsx +245 -0
  104. package/src/components/data-display/InteractiveTooltip/InteractiveTooltip.types.ts +64 -0
  105. package/src/components/data-display/InteractiveTooltip/index.ts +2 -0
  106. package/src/components/data-display/LazyImage/LazyImage.md +356 -0
  107. package/src/components/data-display/LazyImage/LazyImage.stories.tsx +387 -0
  108. package/src/components/data-display/LazyImage/LazyImage.tsx +323 -0
  109. package/src/components/data-display/LazyImage/LazyImage.types.ts +205 -0
  110. package/src/components/data-display/LazyImage/index.ts +2 -0
  111. package/src/components/data-display/Lightbox/Lightbox.stories.tsx +315 -0
  112. package/src/components/data-display/Lightbox/Lightbox.test.stories.tsx +605 -0
  113. package/src/components/data-display/Lightbox/Lightbox.tsx +666 -0
  114. package/src/components/data-display/Lightbox/Lightbox.types.ts +49 -0
  115. package/src/components/data-display/Lightbox/index.ts +2 -0
  116. package/src/components/data-display/Lightbox/lightbox.md +298 -0
  117. package/src/components/data-display/LoadingState/LoadingState.stories.tsx +124 -0
  118. package/src/components/data-display/LoadingState/LoadingState.test.stories.tsx +99 -0
  119. package/src/components/data-display/LoadingState/LoadingState.tsx +103 -0
  120. package/src/components/data-display/LoadingState/LoadingState.types.ts +37 -0
  121. package/src/components/data-display/LoadingState/index.ts +2 -0
  122. package/src/components/data-display/MapPreview/MapPreview.md +154 -0
  123. package/src/components/data-display/MapPreview/MapPreview.stories.tsx +458 -0
  124. package/src/components/data-display/MapPreview/MapPreview.test.stories.tsx +390 -0
  125. package/src/components/data-display/MapPreview/MapPreview.tsx +922 -0
  126. package/src/components/data-display/MapPreview/MapPreview.types.ts +56 -0
  127. package/src/components/data-display/MapPreview/index.ts +2 -0
  128. package/src/components/data-display/Popover/Popover.md +245 -0
  129. package/src/components/data-display/Popover/Popover.stories.tsx +295 -0
  130. package/src/components/data-display/Popover/Popover.test.stories.tsx +1168 -0
  131. package/src/components/data-display/Popover/Popover.tsx +132 -0
  132. package/src/components/data-display/Popover/Popover.types.ts +33 -0
  133. package/src/components/data-display/Popover/index.ts +2 -0
  134. package/src/components/data-display/Progress/Progress.md +450 -0
  135. package/src/components/data-display/Progress/Progress.stories.tsx +481 -0
  136. package/src/components/data-display/Progress/Progress.test.stories.tsx +2070 -0
  137. package/src/components/data-display/Progress/Progress.tsx +332 -0
  138. package/src/components/data-display/Progress/Progress.types.ts +61 -0
  139. package/src/components/data-display/Progress/index.ts +2 -0
  140. package/src/components/data-display/SectionOnboarding/SectionOnboarding.md +108 -0
  141. package/src/components/data-display/SectionOnboarding/SectionOnboarding.stories.tsx +160 -0
  142. package/src/components/data-display/SectionOnboarding/SectionOnboarding.test.stories.tsx +190 -0
  143. package/src/components/data-display/SectionOnboarding/SectionOnboarding.tsx +224 -0
  144. package/src/components/data-display/SectionOnboarding/SectionOnboarding.types.ts +101 -0
  145. package/src/components/data-display/SectionOnboarding/index.ts +7 -0
  146. package/src/components/data-display/Sheet/Sheet.md +475 -0
  147. package/src/components/data-display/Sheet/Sheet.stories.tsx +883 -0
  148. package/src/components/data-display/Sheet/Sheet.test.stories.tsx +1101 -0
  149. package/src/components/data-display/Sheet/Sheet.tsx +978 -0
  150. package/src/components/data-display/Sheet/Sheet.types.ts +93 -0
  151. package/src/components/data-display/Sheet/index.ts +8 -0
  152. package/src/components/data-display/Stepper/Stepper.md +542 -0
  153. package/src/components/data-display/Stepper/Stepper.stories.tsx +540 -0
  154. package/src/components/data-display/Stepper/Stepper.test.stories.tsx +607 -0
  155. package/src/components/data-display/Stepper/Stepper.tsx +328 -0
  156. package/src/components/data-display/Stepper/Stepper.types.ts +97 -0
  157. package/src/components/data-display/Stepper/index.ts +2 -0
  158. package/src/components/data-display/Table/Table.md +243 -0
  159. package/src/components/data-display/Table/Table.stories.tsx +801 -0
  160. package/src/components/data-display/Table/Table.test.stories.tsx +369 -0
  161. package/src/components/data-display/Table/Table.tsx +831 -0
  162. package/src/components/data-display/Table/Table.types.ts +335 -0
  163. package/src/components/data-display/Table/index.ts +2 -0
  164. package/src/components/data-display/Timeline/Timeline.md +201 -0
  165. package/src/components/data-display/Timeline/Timeline.stories.tsx +444 -0
  166. package/src/components/data-display/Timeline/Timeline.test.stories.tsx +944 -0
  167. package/src/components/data-display/Timeline/Timeline.tsx +348 -0
  168. package/src/components/data-display/Timeline/Timeline.types.ts +26 -0
  169. package/src/components/data-display/Timeline/index.ts +2 -0
  170. package/src/components/data-display/TimingDiagram/TimingDiagram.md +162 -0
  171. package/src/components/data-display/TimingDiagram/TimingDiagram.stories.tsx +475 -0
  172. package/src/components/data-display/TimingDiagram/TimingDiagram.test.stories.tsx +734 -0
  173. package/src/components/data-display/TimingDiagram/TimingDiagram.tsx +399 -0
  174. package/src/components/data-display/TimingDiagram/TimingDiagram.types.ts +19 -0
  175. package/src/components/data-display/TimingDiagram/index.ts +2 -0
  176. package/src/components/data-display/Tooltip/Tooltip.md +397 -0
  177. package/src/components/data-display/Tooltip/Tooltip.stories.tsx +465 -0
  178. package/src/components/data-display/Tooltip/Tooltip.test.stories.tsx +1168 -0
  179. package/src/components/data-display/Tooltip/Tooltip.tsx +161 -0
  180. package/src/components/data-display/Tooltip/Tooltip.types.ts +33 -0
  181. package/src/components/data-display/Tooltip/index.ts +2 -0
  182. package/src/components/data-display/index.ts +29 -0
  183. package/src/components/feedback/Dialog/Dialog.md +527 -0
  184. package/src/components/feedback/Dialog/Dialog.stories.tsx +833 -0
  185. package/src/components/feedback/Dialog/Dialog.styles.ts +171 -0
  186. package/src/components/feedback/Dialog/Dialog.test.stories.tsx +955 -0
  187. package/src/components/feedback/Dialog/Dialog.tsx +256 -0
  188. package/src/components/feedback/Dialog/Dialog.types.ts +46 -0
  189. package/src/components/feedback/Dialog/index.ts +9 -0
  190. package/src/components/feedback/Modal/Modal.md +629 -0
  191. package/src/components/feedback/Modal/Modal.stories.tsx +765 -0
  192. package/src/components/feedback/Modal/Modal.test.stories.tsx +251 -0
  193. package/src/components/feedback/Modal/Modal.tsx +279 -0
  194. package/src/components/feedback/Modal/Modal.types.ts +26 -0
  195. package/src/components/feedback/Modal/index.ts +7 -0
  196. package/src/components/feedback/Sonner/Sonner.stories.tsx +698 -0
  197. package/src/components/feedback/Sonner/Sonner.test.stories.tsx +896 -0
  198. package/src/components/feedback/Sonner/Sonner.tsx +493 -0
  199. package/src/components/feedback/Sonner/Sonner.types.ts +65 -0
  200. package/src/components/feedback/Sonner/index.ts +8 -0
  201. package/src/components/feedback/StackedModal/StackedModal.md +273 -0
  202. package/src/components/feedback/StackedModal/StackedModal.stories.tsx +1785 -0
  203. package/src/components/feedback/StackedModal/StackedModal.test.stories.tsx +975 -0
  204. package/src/components/feedback/StackedModal/StackedModal.tsx +664 -0
  205. package/src/components/feedback/StackedModal/StackedModal.types.ts +70 -0
  206. package/src/components/feedback/StackedModal/index.ts +11 -0
  207. package/src/components/feedback/Toast/Toast.md +547 -0
  208. package/src/components/feedback/Toast/Toast.stories.tsx +548 -0
  209. package/src/components/feedback/Toast/Toast.test.stories.tsx +834 -0
  210. package/src/components/feedback/Toast/Toast.tsx +279 -0
  211. package/src/components/feedback/Toast/Toast.types.ts +59 -0
  212. package/src/components/feedback/Toast/index.ts +8 -0
  213. package/src/components/feedback/TutorialOverlay/TutorialOverlay.md +610 -0
  214. package/src/components/feedback/TutorialOverlay/TutorialOverlay.stories.tsx +691 -0
  215. package/src/components/feedback/TutorialOverlay/TutorialOverlay.test.stories.tsx +634 -0
  216. package/src/components/feedback/TutorialOverlay/TutorialOverlay.tsx +554 -0
  217. package/src/components/feedback/TutorialOverlay/TutorialOverlay.types.ts +30 -0
  218. package/src/components/feedback/TutorialOverlay/index.ts +2 -0
  219. package/src/components/feedback/index.ts +6 -0
  220. package/src/components/form/AddressAutocomplete/AddressAutocomplete.md +633 -0
  221. package/src/components/form/AddressAutocomplete/AddressAutocomplete.stories.tsx +663 -0
  222. package/src/components/form/AddressAutocomplete/AddressAutocomplete.test.stories.tsx +723 -0
  223. package/src/components/form/AddressAutocomplete/AddressAutocomplete.tsx +836 -0
  224. package/src/components/form/AddressAutocomplete/AddressAutocomplete.types.ts +37 -0
  225. package/src/components/form/AddressAutocomplete/index.ts +2 -0
  226. package/src/components/form/Autocomplete/Autocomplete.helpers.ts +115 -0
  227. package/src/components/form/Autocomplete/Autocomplete.keys.ts +134 -0
  228. package/src/components/form/Autocomplete/Autocomplete.parts.tsx +337 -0
  229. package/src/components/form/Autocomplete/Autocomplete.stories.tsx +715 -0
  230. package/src/components/form/Autocomplete/Autocomplete.test.stories.tsx +825 -0
  231. package/src/components/form/Autocomplete/Autocomplete.tsx +166 -0
  232. package/src/components/form/Autocomplete/Autocomplete.types.ts +116 -0
  233. package/src/components/form/Autocomplete/autocomplete.md +789 -0
  234. package/src/components/form/Autocomplete/index.ts +8 -0
  235. package/src/components/form/Autocomplete/useAutocomplete.ts +311 -0
  236. package/src/components/form/Button/Button.md +411 -0
  237. package/src/components/form/Button/Button.stories.tsx +362 -0
  238. package/src/components/form/Button/Button.test.stories.tsx +603 -0
  239. package/src/components/form/Button/Button.tsx +326 -0
  240. package/src/components/form/Button/Button.types.ts +74 -0
  241. package/src/components/form/Button/index.ts +2 -0
  242. package/src/components/form/Calendar/Calendar.md +807 -0
  243. package/src/components/form/Calendar/Calendar.stories.tsx +349 -0
  244. package/src/components/form/Calendar/Calendar.test.stories.tsx +465 -0
  245. package/src/components/form/Calendar/Calendar.tsx +571 -0
  246. package/src/components/form/Calendar/Calendar.types.ts +81 -0
  247. package/src/components/form/Calendar/index.ts +11 -0
  248. package/src/components/form/Checkbox/Checkbox.md +200 -0
  249. package/src/components/form/Checkbox/Checkbox.stories.tsx +265 -0
  250. package/src/components/form/Checkbox/Checkbox.test.stories.tsx +181 -0
  251. package/src/components/form/Checkbox/Checkbox.tsx +170 -0
  252. package/src/components/form/Checkbox/Checkbox.types.ts +20 -0
  253. package/src/components/form/Checkbox/index.ts +2 -0
  254. package/src/components/form/CodeEditor/CodeEditor.md +350 -0
  255. package/src/components/form/CodeEditor/CodeEditor.stories.tsx +871 -0
  256. package/src/components/form/CodeEditor/CodeEditor.test.stories.tsx +575 -0
  257. package/src/components/form/CodeEditor/CodeEditor.tsx +415 -0
  258. package/src/components/form/CodeEditor/CodeEditor.types.ts +38 -0
  259. package/src/components/form/CodeEditor/index.ts +2 -0
  260. package/src/components/form/Command/Command.md +468 -0
  261. package/src/components/form/Command/Command.stories.tsx +580 -0
  262. package/src/components/form/Command/Command.test.stories.tsx +215 -0
  263. package/src/components/form/Command/Command.tsx +545 -0
  264. package/src/components/form/Command/Command.types.ts +116 -0
  265. package/src/components/form/Command/index.ts +12 -0
  266. package/src/components/form/CreatableSelect/CreatableSelect.md +114 -0
  267. package/src/components/form/CreatableSelect/CreatableSelect.stories.tsx +112 -0
  268. package/src/components/form/CreatableSelect/CreatableSelect.test.stories.tsx +134 -0
  269. package/src/components/form/CreatableSelect/CreatableSelect.tsx +149 -0
  270. package/src/components/form/CreatableSelect/CreatableSelect.types.ts +37 -0
  271. package/src/components/form/CreatableSelect/index.ts +2 -0
  272. package/src/components/form/Form/Form.md +325 -0
  273. package/src/components/form/Form/Form.stories.tsx +687 -0
  274. package/src/components/form/Form/Form.test.stories.tsx +601 -0
  275. package/src/components/form/Form/Form.tsx +136 -0
  276. package/src/components/form/Form/Form.types.ts +42 -0
  277. package/src/components/form/Form/index.ts +8 -0
  278. package/src/components/form/Input/Input.md +252 -0
  279. package/src/components/form/Input/Input.stories.tsx +256 -0
  280. package/src/components/form/Input/Input.test.stories.tsx +1184 -0
  281. package/src/components/form/Input/Input.tsx +263 -0
  282. package/src/components/form/Input/Input.types.ts +24 -0
  283. package/src/components/form/Input/index.ts +2 -0
  284. package/src/components/form/InputOTP/InputOTP.md +419 -0
  285. package/src/components/form/InputOTP/InputOTP.stories.tsx +774 -0
  286. package/src/components/form/InputOTP/InputOTP.test.stories.tsx +596 -0
  287. package/src/components/form/InputOTP/InputOTP.tsx +231 -0
  288. package/src/components/form/InputOTP/InputOTP.types.ts +68 -0
  289. package/src/components/form/InputOTP/index.ts +2 -0
  290. package/src/components/form/Label/Label.md +426 -0
  291. package/src/components/form/Label/Label.stories.tsx +473 -0
  292. package/src/components/form/Label/Label.test.stories.tsx +909 -0
  293. package/src/components/form/Label/Label.tsx +367 -0
  294. package/src/components/form/Label/Label.types.ts +35 -0
  295. package/src/components/form/Label/index.ts +2 -0
  296. package/src/components/form/Menubar/Menubar.md +275 -0
  297. package/src/components/form/Menubar/Menubar.stories.tsx +472 -0
  298. package/src/components/form/Menubar/Menubar.test.stories.tsx +588 -0
  299. package/src/components/form/Menubar/Menubar.tsx +467 -0
  300. package/src/components/form/Menubar/Menubar.types.ts +71 -0
  301. package/src/components/form/Menubar/index.ts +8 -0
  302. package/src/components/form/PasswordStrength/PasswordStrength.md +139 -0
  303. package/src/components/form/PasswordStrength/PasswordStrength.stories.tsx +562 -0
  304. package/src/components/form/PasswordStrength/PasswordStrength.test.stories.tsx +327 -0
  305. package/src/components/form/PasswordStrength/PasswordStrength.tsx +419 -0
  306. package/src/components/form/PasswordStrength/PasswordStrength.types.ts +18 -0
  307. package/src/components/form/PasswordStrength/index.ts +2 -0
  308. package/src/components/form/PhoneInput/PhoneInput.md +578 -0
  309. package/src/components/form/PhoneInput/PhoneInput.stories.tsx +495 -0
  310. package/src/components/form/PhoneInput/PhoneInput.test.stories.tsx +666 -0
  311. package/src/components/form/PhoneInput/PhoneInput.tsx +376 -0
  312. package/src/components/form/PhoneInput/PhoneInput.types.ts +25 -0
  313. package/src/components/form/PhoneInput/index.ts +2 -0
  314. package/src/components/form/RadioGroup/RadioGroup.md +477 -0
  315. package/src/components/form/RadioGroup/RadioGroup.stories.tsx +518 -0
  316. package/src/components/form/RadioGroup/RadioGroup.test.stories.tsx +685 -0
  317. package/src/components/form/RadioGroup/RadioGroup.tsx +664 -0
  318. package/src/components/form/RadioGroup/RadioGroup.types.ts +82 -0
  319. package/src/components/form/RadioGroup/index.ts +2 -0
  320. package/src/components/form/RichTextEditor/RichTextEditor.md +710 -0
  321. package/src/components/form/RichTextEditor/RichTextEditor.stories.tsx +261 -0
  322. package/src/components/form/RichTextEditor/RichTextEditor.test.stories.tsx +498 -0
  323. package/src/components/form/RichTextEditor/RichTextEditor.tsx +468 -0
  324. package/src/components/form/RichTextEditor/RichTextEditor.types.ts +72 -0
  325. package/src/components/form/RichTextEditor/index.ts +2 -0
  326. package/src/components/form/SearchPalette/SearchPalette.md +69 -0
  327. package/src/components/form/SearchPalette/SearchPalette.parts.tsx +358 -0
  328. package/src/components/form/SearchPalette/SearchPalette.stories.tsx +135 -0
  329. package/src/components/form/SearchPalette/SearchPalette.tsx +141 -0
  330. package/src/components/form/SearchPalette/SearchPalette.types.ts +82 -0
  331. package/src/components/form/SearchPalette/index.ts +7 -0
  332. package/src/components/form/Select/Select.md +254 -0
  333. package/src/components/form/Select/Select.stories.tsx +364 -0
  334. package/src/components/form/Select/Select.test.stories.tsx +977 -0
  335. package/src/components/form/Select/Select.tsx +239 -0
  336. package/src/components/form/Select/Select.types.ts +57 -0
  337. package/src/components/form/Select/index.ts +2 -0
  338. package/src/components/form/Slider/Slider.md +326 -0
  339. package/src/components/form/Slider/Slider.stories.tsx +418 -0
  340. package/src/components/form/Slider/Slider.test.stories.tsx +1044 -0
  341. package/src/components/form/Slider/Slider.tsx +374 -0
  342. package/src/components/form/Slider/Slider.types.ts +113 -0
  343. package/src/components/form/Slider/index.ts +2 -0
  344. package/src/components/form/Switch/Switch.md +565 -0
  345. package/src/components/form/Switch/Switch.stories.tsx +697 -0
  346. package/src/components/form/Switch/Switch.test.stories.tsx +597 -0
  347. package/src/components/form/Switch/Switch.tsx +578 -0
  348. package/src/components/form/Switch/Switch.types.ts +130 -0
  349. package/src/components/form/Switch/index.ts +2 -0
  350. package/src/components/form/Textarea/Textarea.stories.tsx +473 -0
  351. package/src/components/form/Textarea/Textarea.test.stories.tsx +708 -0
  352. package/src/components/form/Textarea/Textarea.tsx +678 -0
  353. package/src/components/form/Textarea/Textarea.types.ts +84 -0
  354. package/src/components/form/Textarea/index.ts +2 -0
  355. package/src/components/form/Toggle/Toggle.md +234 -0
  356. package/src/components/form/Toggle/Toggle.stories.tsx +638 -0
  357. package/src/components/form/Toggle/Toggle.test.stories.tsx +1167 -0
  358. package/src/components/form/Toggle/Toggle.tsx +265 -0
  359. package/src/components/form/Toggle/Toggle.types.ts +79 -0
  360. package/src/components/form/Toggle/index.ts +2 -0
  361. package/src/components/form/ToggleGroup/ToggleGroup.md +329 -0
  362. package/src/components/form/ToggleGroup/ToggleGroup.stories.tsx +617 -0
  363. package/src/components/form/ToggleGroup/ToggleGroup.test.stories.tsx +918 -0
  364. package/src/components/form/ToggleGroup/ToggleGroup.tsx +129 -0
  365. package/src/components/form/ToggleGroup/ToggleGroup.types.ts +53 -0
  366. package/src/components/form/ToggleGroup/index.ts +2 -0
  367. package/src/components/form/UploadButton/UploadButton.md +44 -0
  368. package/src/components/form/UploadButton/UploadButton.stories.tsx +366 -0
  369. package/src/components/form/UploadButton/UploadButton.test.stories.tsx +454 -0
  370. package/src/components/form/UploadButton/UploadButton.tsx +312 -0
  371. package/src/components/form/UploadButton/UploadButton.types.ts +58 -0
  372. package/src/components/form/UploadButton/index.ts +2 -0
  373. package/src/components/form/index.ts +25 -0
  374. package/src/components/form/total-form/Fields/SelectField.tsx +57 -0
  375. package/src/components/form/total-form/Fields/TextField.tsx +58 -0
  376. package/src/components/form/total-form/Fields/index.ts +4 -0
  377. package/src/components/form/total-form/FormContainer.tsx +104 -0
  378. package/src/components/form/total-form/FormContext.tsx +38 -0
  379. package/src/components/form/total-form/FormErrorSnackbar.tsx +35 -0
  380. package/src/components/form/total-form/SubmitButton.tsx +27 -0
  381. package/src/components/form/total-form/index.ts +12 -0
  382. package/src/components/form/total-form/total-form.test.tsx +97 -0
  383. package/src/components/index.ts +7 -0
  384. package/src/components/layout/Accordion/Accordion.md +725 -0
  385. package/src/components/layout/Accordion/Accordion.stories.tsx +690 -0
  386. package/src/components/layout/Accordion/Accordion.test.stories.tsx +1362 -0
  387. package/src/components/layout/Accordion/Accordion.tsx +242 -0
  388. package/src/components/layout/Accordion/Accordion.types.ts +32 -0
  389. package/src/components/layout/Accordion/index.ts +8 -0
  390. package/src/components/layout/Card/Card.md +533 -0
  391. package/src/components/layout/Card/Card.stories.tsx +593 -0
  392. package/src/components/layout/Card/Card.test.stories.tsx +1134 -0
  393. package/src/components/layout/Card/Card.tsx +404 -0
  394. package/src/components/layout/Card/Card.types.ts +57 -0
  395. package/src/components/layout/Card/index.ts +8 -0
  396. package/src/components/layout/Collapsible/Collapsible.md +135 -0
  397. package/src/components/layout/Collapsible/Collapsible.stories.tsx +180 -0
  398. package/src/components/layout/Collapsible/Collapsible.test.stories.tsx +304 -0
  399. package/src/components/layout/Collapsible/Collapsible.tsx +198 -0
  400. package/src/components/layout/Collapsible/Collapsible.types.ts +35 -0
  401. package/src/components/layout/Collapsible/index.ts +6 -0
  402. package/src/components/layout/Container/Container.md +420 -0
  403. package/src/components/layout/Container/Container.stories.tsx +557 -0
  404. package/src/components/layout/Container/Container.test.stories.tsx +750 -0
  405. package/src/components/layout/Container/Container.tsx +72 -0
  406. package/src/components/layout/Container/Container.types.ts +11 -0
  407. package/src/components/layout/Container/index.ts +2 -0
  408. package/src/components/layout/ContentToolbar/ColumnsMenu.tsx +99 -0
  409. package/src/components/layout/ContentToolbar/ContentToolbar.md +75 -0
  410. package/src/components/layout/ContentToolbar/ContentToolbar.stories.tsx +129 -0
  411. package/src/components/layout/ContentToolbar/ContentToolbar.test.stories.tsx +251 -0
  412. package/src/components/layout/ContentToolbar/ContentToolbar.tsx +108 -0
  413. package/src/components/layout/ContentToolbar/ContentToolbar.types.ts +229 -0
  414. package/src/components/layout/ContentToolbar/FilterTrigger.tsx +71 -0
  415. package/src/components/layout/ContentToolbar/MultiSelectDropdown.tsx +297 -0
  416. package/src/components/layout/ContentToolbar/SavedViewsMenu.tsx +334 -0
  417. package/src/components/layout/ContentToolbar/SortByDropdown.tsx +213 -0
  418. package/src/components/layout/ContentToolbar/ViewSelector.tsx +98 -0
  419. package/src/components/layout/ContentToolbar/__tests__/ColumnsMenu.test.tsx +39 -0
  420. package/src/components/layout/ContentToolbar/__tests__/MultiSelectDropdown.test.tsx +110 -0
  421. package/src/components/layout/ContentToolbar/__tests__/SavedViewsMenu.test.tsx +99 -0
  422. package/src/components/layout/ContentToolbar/index.ts +24 -0
  423. package/src/components/layout/ContentToolbar/tests.md +42 -0
  424. package/src/components/layout/ContentToolbar/track.md +41 -0
  425. package/src/components/layout/Dashboard/Dashboard.md +71 -0
  426. package/src/components/layout/Dashboard/Dashboard.stories.tsx +104 -0
  427. package/src/components/layout/Dashboard/Dashboard.test.stories.tsx +164 -0
  428. package/src/components/layout/Dashboard/Dashboard.tsx +297 -0
  429. package/src/components/layout/Dashboard/Dashboard.types.ts +157 -0
  430. package/src/components/layout/Dashboard/DashboardContext.tsx +47 -0
  431. package/src/components/layout/Dashboard/DashboardParts.tsx +216 -0
  432. package/src/components/layout/Dashboard/index.ts +18 -0
  433. package/src/components/layout/Dashboard/tests.md +46 -0
  434. package/src/components/layout/Dashboard/track.md +50 -0
  435. package/src/components/layout/Drawer/Drawer.md +479 -0
  436. package/src/components/layout/Drawer/Drawer.stories.tsx +660 -0
  437. package/src/components/layout/Drawer/Drawer.test.stories.tsx +1339 -0
  438. package/src/components/layout/Drawer/Drawer.tsx +150 -0
  439. package/src/components/layout/Drawer/Drawer.types.ts +34 -0
  440. package/src/components/layout/Drawer/index.ts +2 -0
  441. package/src/components/layout/Resizable/Resizable.md +308 -0
  442. package/src/components/layout/Resizable/Resizable.stories.tsx +1039 -0
  443. package/src/components/layout/Resizable/Resizable.test.stories.tsx +750 -0
  444. package/src/components/layout/Resizable/Resizable.tsx +190 -0
  445. package/src/components/layout/Resizable/Resizable.types.ts +34 -0
  446. package/src/components/layout/Resizable/index.ts +2 -0
  447. package/src/components/layout/ScrollArea/ScrollArea.md +122 -0
  448. package/src/components/layout/ScrollArea/ScrollArea.stories.tsx +651 -0
  449. package/src/components/layout/ScrollArea/ScrollArea.test.stories.tsx +619 -0
  450. package/src/components/layout/ScrollArea/ScrollArea.tsx +449 -0
  451. package/src/components/layout/ScrollArea/ScrollArea.types.ts +80 -0
  452. package/src/components/layout/ScrollArea/index.ts +7 -0
  453. package/src/components/layout/Separator/Separator.stories.tsx +563 -0
  454. package/src/components/layout/Separator/Separator.test.stories.tsx +527 -0
  455. package/src/components/layout/Separator/Separator.tsx +187 -0
  456. package/src/components/layout/Separator/Separator.types.ts +17 -0
  457. package/src/components/layout/Separator/index.ts +2 -0
  458. package/src/components/layout/SettingsLayout/SettingsLayout.md +139 -0
  459. package/src/components/layout/SettingsLayout/SettingsLayout.parts.tsx +357 -0
  460. package/src/components/layout/SettingsLayout/SettingsLayout.stories.tsx +194 -0
  461. package/src/components/layout/SettingsLayout/SettingsLayout.test.stories.tsx +175 -0
  462. package/src/components/layout/SettingsLayout/SettingsLayout.tsx +69 -0
  463. package/src/components/layout/SettingsLayout/SettingsLayout.types.ts +61 -0
  464. package/src/components/layout/SettingsLayout/index.ts +6 -0
  465. package/src/components/layout/Sidebar/Sidebar.md +367 -0
  466. package/src/components/layout/Sidebar/Sidebar.stories.tsx +611 -0
  467. package/src/components/layout/Sidebar/Sidebar.test.stories.tsx +1326 -0
  468. package/src/components/layout/Sidebar/Sidebar.tsx +131 -0
  469. package/src/components/layout/Sidebar/Sidebar.types.ts +30 -0
  470. package/src/components/layout/Sidebar/index.ts +7 -0
  471. package/src/components/layout/Skeleton/Skeleton.md +240 -0
  472. package/src/components/layout/Skeleton/Skeleton.stories.tsx +689 -0
  473. package/src/components/layout/Skeleton/Skeleton.test.stories.tsx +521 -0
  474. package/src/components/layout/Skeleton/Skeleton.tsx +166 -0
  475. package/src/components/layout/Skeleton/Skeleton.types.ts +19 -0
  476. package/src/components/layout/Skeleton/index.ts +2 -0
  477. package/src/components/layout/Spacer/Spacer.md +84 -0
  478. package/src/components/layout/Spacer/Spacer.stories.tsx +502 -0
  479. package/src/components/layout/Spacer/Spacer.test.stories.tsx +472 -0
  480. package/src/components/layout/Spacer/Spacer.tsx +68 -0
  481. package/src/components/layout/Spacer/Spacer.types.ts +12 -0
  482. package/src/components/layout/Spacer/index.ts +2 -0
  483. package/src/components/layout/TableFilter/TableFilter.md +55 -0
  484. package/src/components/layout/TableFilter/TableFilter.stories.tsx +82 -0
  485. package/src/components/layout/TableFilter/TableFilter.test.stories.tsx +87 -0
  486. package/src/components/layout/TableFilter/TableFilter.tsx +383 -0
  487. package/src/components/layout/TableFilter/TableFilter.types.ts +87 -0
  488. package/src/components/layout/TableFilter/TableFilterContext.tsx +29 -0
  489. package/src/components/layout/TableFilter/index.ts +15 -0
  490. package/src/components/layout/TableFilter/tests.md +37 -0
  491. package/src/components/layout/TableFilter/track.md +36 -0
  492. package/src/components/layout/index.ts +14 -0
  493. package/src/components/navigation/Breadcrumbs/Breadcrumbs.md +558 -0
  494. package/src/components/navigation/Breadcrumbs/Breadcrumbs.stories.tsx +640 -0
  495. package/src/components/navigation/Breadcrumbs/Breadcrumbs.test.stories.tsx +1007 -0
  496. package/src/components/navigation/Breadcrumbs/Breadcrumbs.tsx +516 -0
  497. package/src/components/navigation/Breadcrumbs/Breadcrumbs.types.ts +132 -0
  498. package/src/components/navigation/Breadcrumbs/index.ts +2 -0
  499. package/src/components/navigation/CommandPalette/CommandPalette.md +201 -0
  500. package/src/components/navigation/CommandPalette/CommandPalette.stories.tsx +384 -0
  501. package/src/components/navigation/CommandPalette/CommandPalette.test.stories.tsx +437 -0
  502. package/src/components/navigation/CommandPalette/CommandPalette.tsx +434 -0
  503. package/src/components/navigation/CommandPalette/CommandPalette.types.ts +25 -0
  504. package/src/components/navigation/CommandPalette/index.ts +2 -0
  505. package/src/components/navigation/ContextMenu/ContextMenu.md +535 -0
  506. package/src/components/navigation/ContextMenu/ContextMenu.stories.tsx +611 -0
  507. package/src/components/navigation/ContextMenu/ContextMenu.test.stories.tsx +850 -0
  508. package/src/components/navigation/ContextMenu/ContextMenu.tsx +254 -0
  509. package/src/components/navigation/ContextMenu/ContextMenu.types.ts +96 -0
  510. package/src/components/navigation/ContextMenu/index.ts +2 -0
  511. package/src/components/navigation/DropdownMenu/DropdownMenu.md +514 -0
  512. package/src/components/navigation/DropdownMenu/DropdownMenu.stories.tsx +580 -0
  513. package/src/components/navigation/DropdownMenu/DropdownMenu.test.stories.tsx +660 -0
  514. package/src/components/navigation/DropdownMenu/DropdownMenu.tsx +305 -0
  515. package/src/components/navigation/DropdownMenu/DropdownMenu.types.ts +116 -0
  516. package/src/components/navigation/DropdownMenu/index.ts +2 -0
  517. package/src/components/navigation/NavigationMenu/NavigationMenu.md +580 -0
  518. package/src/components/navigation/NavigationMenu/NavigationMenu.tsx +874 -0
  519. package/src/components/navigation/NavigationMenu/NavigationMenu.types.ts +135 -0
  520. package/src/components/navigation/NavigationMenu/index.ts +2 -0
  521. package/src/components/navigation/NavigationMenu/stories/NavigationMenu.stories.tsx +518 -0
  522. package/src/components/navigation/NavigationMenu/stories/NavigationMenu.test.stories.tsx +931 -0
  523. package/src/components/navigation/NavigationMenu/stories/NavigationMenuHorizontal.stories.tsx +503 -0
  524. package/src/components/navigation/NavigationMenu/stories/NavigationMenuVertical.stories.tsx +455 -0
  525. package/src/components/navigation/Pagination/Pagination.md +699 -0
  526. package/src/components/navigation/Pagination/Pagination.stories.tsx +604 -0
  527. package/src/components/navigation/Pagination/Pagination.test.stories.tsx +520 -0
  528. package/src/components/navigation/Pagination/Pagination.tsx +356 -0
  529. package/src/components/navigation/Pagination/Pagination.types.ts +129 -0
  530. package/src/components/navigation/Pagination/index.ts +2 -0
  531. package/src/components/navigation/Tabs/Tabs.md +774 -0
  532. package/src/components/navigation/Tabs/Tabs.stories.tsx +1006 -0
  533. package/src/components/navigation/Tabs/Tabs.test.stories.tsx +1225 -0
  534. package/src/components/navigation/Tabs/Tabs.tsx +433 -0
  535. package/src/components/navigation/Tabs/Tabs.types.ts +239 -0
  536. package/src/components/navigation/Tabs/index.ts +2 -0
  537. package/src/components/navigation/index.ts +7 -0
  538. package/src/components/typography/Blockquote/Blockquote.md +130 -0
  539. package/src/components/typography/Blockquote/Blockquote.stories.tsx +359 -0
  540. package/src/components/typography/Blockquote/Blockquote.test.stories.tsx +432 -0
  541. package/src/components/typography/Blockquote/Blockquote.tsx +166 -0
  542. package/src/components/typography/Blockquote/Blockquote.types.ts +11 -0
  543. package/src/components/typography/Blockquote/index.ts +2 -0
  544. package/src/components/typography/Code/Code.md +182 -0
  545. package/src/components/typography/Code/Code.stories.tsx +686 -0
  546. package/src/components/typography/Code/Code.test.stories.tsx +703 -0
  547. package/src/components/typography/Code/Code.tsx +228 -0
  548. package/src/components/typography/Code/Code.types.ts +12 -0
  549. package/src/components/typography/Code/index.ts +2 -0
  550. package/src/components/typography/Heading/Heading.md +143 -0
  551. package/src/components/typography/Heading/Heading.stories.tsx +451 -0
  552. package/src/components/typography/Heading/Heading.test.stories.tsx +830 -0
  553. package/src/components/typography/Heading/Heading.tsx +178 -0
  554. package/src/components/typography/Heading/Heading.types.ts +11 -0
  555. package/src/components/typography/Heading/index.ts +2 -0
  556. package/src/components/typography/Paragraph/Paragraph.md +80 -0
  557. package/src/components/typography/Paragraph/Paragraph.stories.tsx +280 -0
  558. package/src/components/typography/Paragraph/Paragraph.test.stories.tsx +238 -0
  559. package/src/components/typography/Paragraph/Paragraph.tsx +99 -0
  560. package/src/components/typography/Paragraph/Paragraph.types.ts +10 -0
  561. package/src/components/typography/Paragraph/index.ts +2 -0
  562. package/src/components/typography/Text/Text.md +129 -0
  563. package/src/components/typography/Text/Text.stories.tsx +359 -0
  564. package/src/components/typography/Text/Text.test.stories.tsx +762 -0
  565. package/src/components/typography/Text/Text.tsx +159 -0
  566. package/src/components/typography/Text/Text.types.ts +15 -0
  567. package/src/components/typography/Text/index.ts +2 -0
  568. package/src/components/typography/index.ts +5 -0
  569. package/src/components/utility/AnimatedIcon/AnimatedIcon.md +359 -0
  570. package/src/components/utility/AnimatedIcon/AnimatedIcon.stories.tsx +947 -0
  571. package/src/components/utility/AnimatedIcon/AnimatedIcon.test.stories.tsx +596 -0
  572. package/src/components/utility/AnimatedIcon/AnimatedIcon.tsx +595 -0
  573. package/src/components/utility/AnimatedIcon/AnimatedIcon.types.ts +98 -0
  574. package/src/components/utility/AnimatedIcon/index.ts +2 -0
  575. package/src/components/utility/AspectRatio/AspectRatio.md +200 -0
  576. package/src/components/utility/AspectRatio/AspectRatio.stories.tsx +414 -0
  577. package/src/components/utility/AspectRatio/AspectRatio.test.stories.tsx +859 -0
  578. package/src/components/utility/AspectRatio/AspectRatio.tsx +76 -0
  579. package/src/components/utility/AspectRatio/AspectRatio.types.ts +13 -0
  580. package/src/components/utility/AspectRatio/index.ts +2 -0
  581. package/src/components/utility/InfiniteScroll/InfiniteScroll.md +531 -0
  582. package/src/components/utility/InfiniteScroll/InfiniteScroll.stories.tsx +620 -0
  583. package/src/components/utility/InfiniteScroll/InfiniteScroll.test.stories.tsx +358 -0
  584. package/src/components/utility/InfiniteScroll/InfiniteScroll.tsx +204 -0
  585. package/src/components/utility/InfiniteScroll/InfiniteScroll.types.ts +39 -0
  586. package/src/components/utility/InfiniteScroll/index.ts +6 -0
  587. package/src/components/utility/Portal/Portal.button-container.example.tsx +99 -0
  588. package/src/components/utility/Portal/Portal.md +593 -0
  589. package/src/components/utility/Portal/Portal.stories.tsx +340 -0
  590. package/src/components/utility/Portal/Portal.test.stories.tsx +2086 -0
  591. package/src/components/utility/Portal/Portal.tsx +39 -0
  592. package/src/components/utility/Portal/Portal.types.ts +7 -0
  593. package/src/components/utility/Portal/index.ts +2 -0
  594. package/src/components/utility/Transition/Transition.md +684 -0
  595. package/src/components/utility/Transition/Transition.stories.tsx +493 -0
  596. package/src/components/utility/Transition/Transition.test.stories.tsx +854 -0
  597. package/src/components/utility/Transition/Transition.tsx +140 -0
  598. package/src/components/utility/Transition/Transition.types.ts +14 -0
  599. package/src/components/utility/Transition/index.ts +6 -0
  600. package/src/components/utility/VirtualList/VirtualList.md +520 -0
  601. package/src/components/utility/VirtualList/VirtualList.stories.tsx +1073 -0
  602. package/src/components/utility/VirtualList/VirtualList.test.stories.tsx +1074 -0
  603. package/src/components/utility/VirtualList/VirtualList.tsx +369 -0
  604. package/src/components/utility/VirtualList/VirtualList.types.ts +56 -0
  605. package/src/components/utility/VirtualList/index.ts +7 -0
  606. package/src/components/utility/WorkflowStep/WorkflowStep.md +187 -0
  607. package/src/components/utility/WorkflowStep/WorkflowStep.stories.tsx +433 -0
  608. package/src/components/utility/WorkflowStep/WorkflowStep.test.stories.tsx +364 -0
  609. package/src/components/utility/WorkflowStep/WorkflowStep.tsx +506 -0
  610. package/src/components/utility/WorkflowStep/WorkflowStep.types.ts +133 -0
  611. package/src/components/utility/WorkflowStep/index.ts +13 -0
  612. package/src/components/utility/index.ts +7 -0
  613. package/src/index.ts +17 -0
  614. package/src/mui/AppBar.ts +2 -0
  615. package/src/mui/Box.ts +2 -0
  616. package/src/mui/CssBaseline.ts +2 -0
  617. package/src/mui/FormControl.ts +2 -0
  618. package/src/mui/FormControlLabel.ts +2 -0
  619. package/src/mui/Grid2.ts +2 -0
  620. package/src/mui/InputLabel.ts +2 -0
  621. package/src/mui/List.ts +2 -0
  622. package/src/mui/ListItem.ts +2 -0
  623. package/src/mui/ListItemButton.ts +2 -0
  624. package/src/mui/ListItemText.ts +2 -0
  625. package/src/mui/Stack.ts +2 -0
  626. package/src/mui/SvgIcon.ts +2 -0
  627. package/src/mui/Toolbar.ts +2 -0
  628. package/src/mui/styles.ts +2 -0
  629. package/src/mui/useMediaQuery.ts +1 -0
  630. package/src/social-login-button.tsx +199 -0
  631. package/src/user-avatar.tsx +102 -0
  632. package/src/utils/cn.ts +9 -0
  633. package/src/utils/index.ts +1 -0
@@ -0,0 +1,896 @@
1
+ import { Box,Button, Stack, TextField } from '@mui/material';
2
+ import type { Meta, StoryObj } from '@storybook/react-vite';
3
+ import React from 'react';
4
+ import { expect, userEvent, waitFor,within } from 'storybook/test';
5
+
6
+ import { SonnerProvider, useSonner } from './Sonner';
7
+
8
+ const meta: Meta<typeof SonnerProvider> = {
9
+ title: 'Feedback/Sonner/Tests',
10
+ component: SonnerProvider,
11
+ parameters: {
12
+ layout: 'padded',
13
+ docs: {
14
+ description: {
15
+ component: 'Comprehensive test stories for Sonner toast component',
16
+ },
17
+ },
18
+ },
19
+ tags: ['autodocs', 'test', 'component:Sonner'],
20
+ };
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+
25
+ // Test wrapper component with toast functionality
26
+ const TestWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (
27
+ <SonnerProvider>{children}</SonnerProvider>
28
+ );
29
+
30
+ // Basic interaction test component
31
+ const BasicInteractionTest: React.FC = () => {
32
+ const { toast, success, error, warning, info, loading, dismiss } = useSonner();
33
+
34
+ return (
35
+ <Stack spacing={2} data-testid="basic-interaction">
36
+ <Button data-testid="basic-toast-btn" onClick={() => toast('Basic toast message')}>
37
+ Basic Toast
38
+ </Button>
39
+ <Button data-testid="success-toast-btn" onClick={() => success('Success message')}>
40
+ Success Toast
41
+ </Button>
42
+ <Button data-testid="error-toast-btn" onClick={() => error('Error message')}>
43
+ Error Toast
44
+ </Button>
45
+ <Button data-testid="warning-toast-btn" onClick={() => warning('Warning message')}>
46
+ Warning Toast
47
+ </Button>
48
+ <Button data-testid="info-toast-btn" onClick={() => info('Info message')}>
49
+ Info Toast
50
+ </Button>
51
+ <Button data-testid="loading-toast-btn" onClick={() => loading('Loading...')}>
52
+ Loading Toast
53
+ </Button>
54
+ <Button data-testid="dismiss-all-btn" onClick={() => dismiss()}>
55
+ Dismiss All
56
+ </Button>
57
+ </Stack>
58
+ );
59
+ };
60
+
61
+ // Form interaction test component
62
+ const FormInteractionTest: React.FC = () => {
63
+ const { success, error } = useSonner();
64
+ const [value, setValue] = React.useState('');
65
+
66
+ const handleSubmit = () => {
67
+ if (value.trim()) {
68
+ success('Form submitted successfully!');
69
+ setValue('');
70
+ } else {
71
+ error('Please enter a value');
72
+ }
73
+ };
74
+
75
+ return (
76
+ <Box data-testid="form-interaction">
77
+ <Stack spacing={2}>
78
+ <TextField
79
+ data-testid="form-input"
80
+ value={value}
81
+ onChange={(e) => setValue(e.target.value)}
82
+ placeholder="Enter some text"
83
+ onKeyDown={(e) => e.key === 'Enter' && handleSubmit()}
84
+ />
85
+ <Button data-testid="submit-btn" onClick={handleSubmit}>
86
+ Submit
87
+ </Button>
88
+ </Stack>
89
+ </Box>
90
+ );
91
+ };
92
+
93
+ // Keyboard navigation test component
94
+ const KeyboardNavigationTest: React.FC = () => {
95
+ const { toast, dismiss } = useSonner();
96
+
97
+ React.useEffect(() => {
98
+ const handleKeyDown = (e: globalThis.KeyboardEvent) => {
99
+ if (e.key === 't' && e.ctrlKey) {
100
+ e.preventDefault();
101
+ toast('Triggered by Ctrl+T');
102
+ }
103
+ if (e.key === 'Escape') {
104
+ dismiss();
105
+ }
106
+ };
107
+
108
+ window.addEventListener('keydown', handleKeyDown);
109
+ return () => window.removeEventListener('keydown', handleKeyDown);
110
+ }, [toast, dismiss]);
111
+
112
+ return (
113
+ <Box data-testid="keyboard-navigation">
114
+ <Stack spacing={2}>
115
+ <Button data-testid="show-toast-btn" onClick={() => toast('Toast for keyboard test')}>
116
+ Show Toast
117
+ </Button>
118
+ <p>Press Ctrl+T to show toast, Esc to dismiss</p>
119
+ </Stack>
120
+ </Box>
121
+ );
122
+ };
123
+
124
+ // Screen reader test component
125
+ const ScreenReaderTest: React.FC = () => {
126
+ const { toast } = useSonner();
127
+
128
+ return (
129
+ <Box data-testid="screen-reader">
130
+ <Button
131
+ data-testid="accessible-toast-btn"
132
+ onClick={() => toast('Screen reader accessible toast')}
133
+ aria-label="Show accessible toast notification"
134
+ >
135
+ Accessible Toast
136
+ </Button>
137
+ </Box>
138
+ );
139
+ };
140
+
141
+ // Focus management test component
142
+ const FocusManagementTest: React.FC = () => {
143
+ const { toast } = useSonner();
144
+ const buttonRef = React.useRef<HTMLButtonElement>(null);
145
+
146
+ const handleToast = () => {
147
+ toast('Focus management test', {
148
+ action: {
149
+ label: 'Focus Button',
150
+ onClick: () => {
151
+ buttonRef.current?.focus();
152
+ },
153
+ },
154
+ });
155
+ };
156
+
157
+ return (
158
+ <Box data-testid="focus-management">
159
+ <Stack spacing={2}>
160
+ <Button data-testid="focus-toast-btn" onClick={handleToast}>
161
+ Show Toast with Action
162
+ </Button>
163
+ <Button ref={buttonRef} data-testid="focus-target-btn">
164
+ Focus Target
165
+ </Button>
166
+ </Stack>
167
+ </Box>
168
+ );
169
+ };
170
+
171
+ // Responsive design test component
172
+ const ResponsiveDesignTest: React.FC = () => {
173
+ const { toast } = useSonner();
174
+
175
+ return (
176
+ <Box data-testid="responsive-design">
177
+ <Button
178
+ data-testid="responsive-toast-btn"
179
+ onClick={() => toast('Responsive design test message that is quite long to test wrapping')}
180
+ >
181
+ Test Responsive Toast
182
+ </Button>
183
+ </Box>
184
+ );
185
+ };
186
+
187
+ // Theme variations test component
188
+ const ThemeVariationsTest: React.FC = () => {
189
+ const { toast } = useSonner();
190
+
191
+ return (
192
+ <Box data-testid="theme-variations">
193
+ <Stack spacing={2}>
194
+ <Button
195
+ data-testid="default-theme-btn"
196
+ onClick={() => toast('Default theme toast', { variant: 'default' })}
197
+ >
198
+ Default Theme
199
+ </Button>
200
+ <Button
201
+ data-testid="glass-theme-btn"
202
+ onClick={() => toast('Glass theme toast', { variant: 'glass' })}
203
+ >
204
+ Glass Theme
205
+ </Button>
206
+ <Button
207
+ data-testid="minimal-theme-btn"
208
+ onClick={() => toast('Minimal theme toast', { variant: 'minimal' })}
209
+ >
210
+ Minimal Theme
211
+ </Button>
212
+ </Stack>
213
+ </Box>
214
+ );
215
+ };
216
+
217
+ // Visual states test component
218
+ const VisualStatesTest: React.FC = () => {
219
+ const { toast, success, error } = useSonner();
220
+
221
+ return (
222
+ <Box data-testid="visual-states">
223
+ <Stack spacing={2}>
224
+ <Button
225
+ data-testid="persistent-toast-btn"
226
+ onClick={() => toast('Persistent toast', { persistent: true })}
227
+ >
228
+ Persistent Toast
229
+ </Button>
230
+ <Button
231
+ data-testid="important-toast-btn"
232
+ onClick={() => success('Important success', { important: true })}
233
+ >
234
+ Important Success
235
+ </Button>
236
+ <Button
237
+ data-testid="with-description-btn"
238
+ onClick={() =>
239
+ error('Error with description', {
240
+ description: 'This is a detailed description of the error',
241
+ })
242
+ }
243
+ >
244
+ With Description
245
+ </Button>
246
+ </Stack>
247
+ </Box>
248
+ );
249
+ };
250
+
251
+ // Performance test component
252
+ const PerformanceTest: React.FC = () => {
253
+ const { toast, dismiss } = useSonner();
254
+
255
+ const handleManyToasts = () => {
256
+ const startTime = Date.now();
257
+ for (let i = 0; i < 10; i++) {
258
+ toast(`Toast ${i + 1}`);
259
+ }
260
+ const endTime = Date.now();
261
+ window.setTimeout(() => {
262
+ toast(`Created 10 toasts in ${endTime - startTime}ms`);
263
+ }, 100);
264
+ };
265
+
266
+ return (
267
+ <Box data-testid="performance">
268
+ <Stack spacing={2}>
269
+ <Button data-testid="many-toasts-btn" onClick={handleManyToasts}>
270
+ Create Many Toasts
271
+ </Button>
272
+ <Button data-testid="clear-toasts-btn" onClick={() => dismiss()}>
273
+ Clear All
274
+ </Button>
275
+ </Stack>
276
+ </Box>
277
+ );
278
+ };
279
+
280
+ // Edge cases test component
281
+ const EdgeCasesTest: React.FC = () => {
282
+ const { toast, promise } = useSonner();
283
+
284
+ const handleEmptyToast = () => {
285
+ toast('');
286
+ };
287
+
288
+ const handleLongToast = () => {
289
+ toast(
290
+ 'This is a very long toast message that should test how the component handles extensive text content that might overflow or wrap to multiple lines in the toast notification container',
291
+ );
292
+ };
293
+
294
+ const handlePromiseToast = () => {
295
+ const testPromise = new Promise((resolve) => {
296
+ window.setTimeout(() => resolve('Success!'), 2000);
297
+ });
298
+
299
+ promise(testPromise, {
300
+ loading: 'Processing...',
301
+ success: 'Promise resolved!',
302
+ error: 'Promise failed!',
303
+ });
304
+ };
305
+
306
+ return (
307
+ <Box data-testid="edge-cases">
308
+ <Stack spacing={2}>
309
+ <Button data-testid="empty-toast-btn" onClick={handleEmptyToast}>
310
+ Empty Toast
311
+ </Button>
312
+ <Button data-testid="long-toast-btn" onClick={handleLongToast}>
313
+ Long Message
314
+ </Button>
315
+ <Button data-testid="promise-toast-btn" onClick={handlePromiseToast}>
316
+ Promise Toast
317
+ </Button>
318
+ </Stack>
319
+ </Box>
320
+ );
321
+ };
322
+
323
+ // Integration test component
324
+ const IntegrationTest: React.FC = () => {
325
+ const { toast, success, error, dismiss } = useSonner();
326
+ const [step, setStep] = React.useState(0);
327
+
328
+ const runIntegrationTest = async () => {
329
+ setStep(1);
330
+ toast('Step 1: Starting integration test');
331
+
332
+ window.setTimeout(() => {
333
+ setStep(2);
334
+ success('Step 2: First action completed');
335
+ }, 1000);
336
+
337
+ window.setTimeout(() => {
338
+ setStep(3);
339
+ error('Step 3: Simulated error occurred');
340
+ }, 2000);
341
+
342
+ window.setTimeout(() => {
343
+ setStep(4);
344
+ dismiss();
345
+ success('Step 4: Integration test completed');
346
+ setStep(0);
347
+ }, 3000);
348
+ };
349
+
350
+ return (
351
+ <Box data-testid="integration">
352
+ <Stack spacing={2}>
353
+ <Button data-testid="integration-test-btn" onClick={runIntegrationTest} disabled={step > 0}>
354
+ Run Integration Test {step > 0 && `(Step ${step}/4)`}
355
+ </Button>
356
+ </Stack>
357
+ </Box>
358
+ );
359
+ };
360
+
361
+ // Test stories
362
+ export const BasicInteraction: Story = {
363
+ render: () => (
364
+ <TestWrapper>
365
+ <BasicInteractionTest />
366
+ </TestWrapper>
367
+ ),
368
+ play: async ({ canvasElement, step }) => {
369
+ const canvas = within(canvasElement.ownerDocument.body);
370
+ const localCanvas = within(canvasElement);
371
+
372
+ await step('Test basic toast', async () => {
373
+ const basicBtn = localCanvas.getByTestId('basic-toast-btn');
374
+ await userEvent.click(basicBtn);
375
+
376
+ // Verify toast appears in the DOM
377
+ await waitFor(() => {
378
+ expect(canvas.getByText('Basic toast message')).toBeInTheDocument();
379
+ });
380
+ });
381
+
382
+ await step('Test success toast with icon', async () => {
383
+ const successBtn = localCanvas.getByTestId('success-toast-btn');
384
+ await userEvent.click(successBtn);
385
+
386
+ await waitFor(() => {
387
+ expect(canvas.getByText('Success message')).toBeInTheDocument();
388
+ // Check for success icon (CheckCircle)
389
+ const toasts = canvas.getAllByText(/Success message|Basic toast message/);
390
+ expect(toasts.length).toBeGreaterThan(0);
391
+ });
392
+ });
393
+
394
+ await step('Test error toast', async () => {
395
+ const errorBtn = localCanvas.getByTestId('error-toast-btn');
396
+ await userEvent.click(errorBtn);
397
+
398
+ await waitFor(() => {
399
+ expect(canvas.getByText('Error message')).toBeInTheDocument();
400
+ });
401
+ });
402
+
403
+ await step('Test dismiss all functionality', async () => {
404
+ const dismissBtn = localCanvas.getByTestId('dismiss-all-btn');
405
+ await userEvent.click(dismissBtn);
406
+
407
+ // Wait for toasts to disappear with animation
408
+ await waitFor(
409
+ () => {
410
+ expect(canvas.queryByText('Basic toast message')).not.toBeInTheDocument();
411
+ expect(canvas.queryByText('Success message')).not.toBeInTheDocument();
412
+ expect(canvas.queryByText('Error message')).not.toBeInTheDocument();
413
+ },
414
+ { timeout: 2000 },
415
+ );
416
+ });
417
+ },
418
+ };
419
+
420
+ export const FormInteraction: Story = {
421
+ render: () => (
422
+ <TestWrapper>
423
+ <FormInteractionTest />
424
+ </TestWrapper>
425
+ ),
426
+ play: async ({ canvasElement, step }) => {
427
+ const canvas = within(canvasElement.ownerDocument.body);
428
+ const localCanvas = within(canvasElement);
429
+
430
+ const submitBtn = localCanvas.getByTestId('submit-btn');
431
+
432
+ await step('Test empty submission - should show error toast', async () => {
433
+ await userEvent.click(submitBtn);
434
+
435
+ await waitFor(() => {
436
+ expect(canvas.getByText('Please enter a value')).toBeInTheDocument();
437
+ });
438
+
439
+ // Wait a bit for the error toast to be visible
440
+ await new Promise((resolve) => window.setTimeout(resolve, 500));
441
+ });
442
+
443
+ await step('Test valid submission - should show success toast', async () => {
444
+ // Find the actual MUI input element inside the TextField
445
+ const inputField = localCanvas.getByTestId('form-input');
446
+ const actualInput = inputField.querySelector('input');
447
+ expect(actualInput).not.toBeNull();
448
+
449
+ // Type directly in the input element
450
+ await userEvent.type(actualInput!, 'Test input');
451
+
452
+ // Wait for the form to be ready and submit
453
+ await new Promise(resolve => window.setTimeout(resolve, 100));
454
+ await userEvent.click(submitBtn);
455
+
456
+ // Check that success toast appears
457
+ await waitFor(() => {
458
+ expect(canvas.getByText('Form submitted successfully!')).toBeInTheDocument();
459
+ }, { timeout: 2000 });
460
+
461
+ // Verify input was cleared after successful submission
462
+ await waitFor(() => {
463
+ if (actualInput) {
464
+ expect(actualInput.value).toBe('');
465
+ }
466
+ });
467
+ });
468
+ },
469
+ };
470
+
471
+ export const KeyboardNavigation: Story = {
472
+ render: () => (
473
+ <TestWrapper>
474
+ <KeyboardNavigationTest />
475
+ </TestWrapper>
476
+ ),
477
+ play: async ({ canvasElement, step }) => {
478
+ const canvas = within(canvasElement.ownerDocument.body);
479
+ const localCanvas = within(canvasElement);
480
+
481
+ await step('Show toast and verify keyboard navigation', async () => {
482
+ const showBtn = localCanvas.getByTestId('show-toast-btn');
483
+ await userEvent.click(showBtn);
484
+
485
+ // Verify toast appears
486
+ await waitFor(() => {
487
+ expect(canvas.getByText('Toast for keyboard test')).toBeInTheDocument();
488
+ });
489
+
490
+ // Test Escape key dismissal
491
+ await userEvent.keyboard('{Escape}');
492
+
493
+ // Verify toast is dismissed
494
+ await waitFor(
495
+ () => {
496
+ expect(canvas.queryByText('Toast for keyboard test')).not.toBeInTheDocument();
497
+ },
498
+ { timeout: 1000 },
499
+ );
500
+ });
501
+ },
502
+ };
503
+
504
+ export const ScreenReader: Story = {
505
+ render: () => (
506
+ <TestWrapper>
507
+ <ScreenReaderTest />
508
+ </TestWrapper>
509
+ ),
510
+ play: async ({ canvasElement, step }) => {
511
+ const canvas = within(canvasElement.ownerDocument.body);
512
+ const localCanvas = within(canvasElement);
513
+
514
+ await step('Verify accessibility attributes and screen reader support', async () => {
515
+ const accessibleBtn = localCanvas.getByTestId('accessible-toast-btn');
516
+ expect(accessibleBtn).toHaveAttribute('aria-label', 'Show accessible toast notification');
517
+
518
+ await userEvent.click(accessibleBtn);
519
+
520
+ // Verify toast appears with proper ARIA attributes
521
+ await waitFor(() => {
522
+ const toast = canvas.getByText('Screen reader accessible toast');
523
+ expect(toast).toBeInTheDocument();
524
+ // Toast container should have proper role for screen readers
525
+ const toastContainer = toast.closest('[role="status"], [role="alert"]');
526
+ expect(toastContainer || toast.parentElement).toBeInTheDocument();
527
+ });
528
+ });
529
+ },
530
+ };
531
+
532
+ export const FocusManagement: Story = {
533
+ render: () => (
534
+ <TestWrapper>
535
+ <FocusManagementTest />
536
+ </TestWrapper>
537
+ ),
538
+ play: async ({ canvasElement, step }) => {
539
+ const canvas = within(canvasElement.ownerDocument.body);
540
+ const localCanvas = within(canvasElement);
541
+
542
+ await step('Test focus management with action buttons', async () => {
543
+ const focusBtn = localCanvas.getByTestId('focus-toast-btn');
544
+ const targetBtn = localCanvas.getByTestId('focus-target-btn');
545
+
546
+ await userEvent.click(focusBtn);
547
+
548
+ // Verify toast appears with action button
549
+ await waitFor(() => {
550
+ expect(canvas.getByText('Focus management test')).toBeInTheDocument();
551
+ expect(canvas.getByText('Focus Button')).toBeInTheDocument();
552
+ });
553
+
554
+ // Click the action button in the toast
555
+ const actionBtn = canvas.getByText('Focus Button');
556
+ await userEvent.click(actionBtn);
557
+
558
+ // Verify focus moved to target button
559
+ await waitFor(() => {
560
+ expect(targetBtn).toHaveFocus();
561
+ });
562
+ });
563
+ },
564
+ };
565
+
566
+ export const ResponsiveDesign: Story = {
567
+ render: () => (
568
+ <TestWrapper>
569
+ <ResponsiveDesignTest />
570
+ </TestWrapper>
571
+ ),
572
+ parameters: {
573
+ viewport: { defaultViewport: 'mobile1' },
574
+ },
575
+ play: async ({ canvasElement, step }) => {
576
+ const canvas = within(canvasElement.ownerDocument.body);
577
+ const localCanvas = within(canvasElement);
578
+
579
+ await step('Test responsive design and text wrapping', async () => {
580
+ const responsiveBtn = localCanvas.getByTestId('responsive-toast-btn');
581
+ await userEvent.click(responsiveBtn);
582
+
583
+ // Verify long text wraps properly
584
+ await waitFor(() => {
585
+ const toast = canvas.getByText(
586
+ 'Responsive design test message that is quite long to test wrapping',
587
+ );
588
+ expect(toast).toBeInTheDocument();
589
+
590
+ // Check toast has max width constraint
591
+ const toastContainer = toast.closest('[class*="MuiBox"]');
592
+ if (toastContainer) {
593
+ const styles = window.getComputedStyle(toastContainer);
594
+ const maxWidth = styles.maxWidth;
595
+ if (maxWidth && maxWidth !== 'none') {
596
+ const parsedWidth = parseInt(maxWidth);
597
+ if (!isNaN(parsedWidth)) {
598
+ expect(parsedWidth).toBeLessThanOrEqual(400);
599
+ }
600
+ }
601
+ }
602
+ });
603
+ });
604
+ },
605
+ };
606
+
607
+ export const ThemeVariations: Story = {
608
+ render: () => (
609
+ <TestWrapper>
610
+ <ThemeVariationsTest />
611
+ </TestWrapper>
612
+ ),
613
+ play: async ({ canvasElement, step }) => {
614
+ const canvas = within(canvasElement.ownerDocument.body);
615
+ const localCanvas = within(canvasElement);
616
+
617
+ await step('Test default theme', async () => {
618
+ const defaultBtn = localCanvas.getByTestId('default-theme-btn');
619
+ await userEvent.click(defaultBtn);
620
+
621
+ await waitFor(() => {
622
+ expect(canvas.getByText('Default theme toast')).toBeInTheDocument();
623
+ });
624
+ });
625
+
626
+ await step('Test glass theme with backdrop filter', async () => {
627
+ const glassBtn = localCanvas.getByTestId('glass-theme-btn');
628
+ await userEvent.click(glassBtn);
629
+
630
+ await waitFor(() => {
631
+ const glassToast = canvas.getByText('Glass theme toast');
632
+ expect(glassToast).toBeInTheDocument();
633
+ // Glass effect should have backdrop filter - check parent container with role
634
+ const toastContainer = glassToast.closest('[role="status"], [role="alert"]');
635
+ expect(toastContainer).toBeInTheDocument();
636
+
637
+ if (toastContainer) {
638
+ const styles = window.getComputedStyle(toastContainer);
639
+ const backdropFilter = styles.backdropFilter || (styles as CSSStyleDeclaration & Record<string, string>).webkitBackdropFilter;
640
+
641
+ // Glass variant should have glass characteristics - check multiple possible indicators
642
+ const hasBlur = backdropFilter && backdropFilter !== 'none' && backdropFilter.includes('blur');
643
+ const hasTransparentBg = styles.backgroundColor && (styles.backgroundColor.includes('rgba') ||
644
+ parseFloat(styles.opacity || '1') < 1);
645
+ const hasGlassBorder = styles.border && styles.border.includes('rgba');
646
+
647
+ // At least one glass effect should be present
648
+ const hasGlassEffect = hasBlur || hasTransparentBg || hasGlassBorder;
649
+ expect(hasGlassEffect).toBeTruthy();
650
+ }
651
+ });
652
+ });
653
+
654
+ await step('Test minimal theme and toast stacking', async () => {
655
+ const minimalBtn = localCanvas.getByTestId('minimal-theme-btn');
656
+ await userEvent.click(minimalBtn);
657
+
658
+ await waitFor(() => {
659
+ const minimalToast = canvas.getByText('Minimal theme toast');
660
+ expect(minimalToast).toBeInTheDocument();
661
+ });
662
+
663
+ // Verify multiple toasts are stacked
664
+ await waitFor(() => {
665
+ const allToasts = canvas.getAllByText(/theme toast/);
666
+ expect(allToasts.length).toBeGreaterThanOrEqual(3);
667
+ });
668
+ });
669
+ },
670
+ };
671
+
672
+ export const VisualStates: Story = {
673
+ render: () => (
674
+ <TestWrapper>
675
+ <VisualStatesTest />
676
+ </TestWrapper>
677
+ ),
678
+ play: async ({ canvasElement, step }) => {
679
+ const canvas = within(canvasElement.ownerDocument.body);
680
+ const localCanvas = within(canvasElement);
681
+
682
+ await step('Test persistent toast', async () => {
683
+ const persistentBtn = localCanvas.getByTestId('persistent-toast-btn');
684
+ await userEvent.click(persistentBtn);
685
+
686
+ await waitFor(() => {
687
+ expect(canvas.getByText('Persistent toast')).toBeInTheDocument();
688
+ });
689
+ });
690
+
691
+ await step('Test important toast styling', async () => {
692
+ const importantBtn = localCanvas.getByTestId('important-toast-btn');
693
+ await userEvent.click(importantBtn);
694
+
695
+ await waitFor(() => {
696
+ const importantToast = canvas.getByText('Important success');
697
+ expect(importantToast).toBeInTheDocument();
698
+ const styles = window.getComputedStyle(importantToast);
699
+ expect(parseInt(styles.fontWeight)).toBeGreaterThanOrEqual(600);
700
+ });
701
+ });
702
+
703
+ await step('Test toast with description', async () => {
704
+ const descriptionBtn = localCanvas.getByTestId('with-description-btn');
705
+ await userEvent.click(descriptionBtn);
706
+
707
+ await waitFor(() => {
708
+ expect(canvas.getByText('Error with description')).toBeInTheDocument();
709
+ expect(canvas.getByText('This is a detailed description of the error')).toBeInTheDocument();
710
+ });
711
+ });
712
+
713
+ await step('Verify persistent toast remains visible', async () => {
714
+ // Wait to verify persistent toast is still there after 2 seconds (reduced from 5 seconds)
715
+ await new Promise((resolve) => window.setTimeout(resolve, 2000));
716
+ expect(canvas.getByText('Persistent toast')).toBeInTheDocument();
717
+ });
718
+ },
719
+ };
720
+
721
+ export const Performance: Story = {
722
+ render: () => (
723
+ <TestWrapper>
724
+ <PerformanceTest />
725
+ </TestWrapper>
726
+ ),
727
+ play: async ({ canvasElement, step }) => {
728
+ const canvas = within(canvasElement.ownerDocument.body);
729
+ const localCanvas = within(canvasElement);
730
+
731
+ await step('Test performance with many toasts', async () => {
732
+ const manyToastsBtn = localCanvas.getByTestId('many-toasts-btn');
733
+ await userEvent.click(manyToastsBtn);
734
+
735
+ // Verify multiple toasts are created - check for any toast content
736
+ await waitFor(() => {
737
+ // Check for any of the created toasts (may be limited by max visible toasts)
738
+ const toastElements = canvasElement.ownerDocument.querySelectorAll('[role="status"], [role="alert"]');
739
+ expect(toastElements.length).toBeGreaterThan(0);
740
+ });
741
+
742
+ // Look for some of the toast messages that should exist
743
+ await waitFor(() => {
744
+ const hasToast1 = canvas.queryByText('Toast 1');
745
+ const hasToast10 = canvas.queryByText('Toast 10');
746
+ const hasToast5 = canvas.queryByText('Toast 5');
747
+ // At least one of the toasts should be visible
748
+ expect(hasToast1 || hasToast5 || hasToast10).toBeTruthy();
749
+ });
750
+
751
+ // Verify performance message appears (this is created after a timeout)
752
+ await waitFor(() => {
753
+ const perfMessage = canvas.queryByText(/Created 10 toasts in \d+ms/);
754
+ expect(perfMessage).toBeTruthy();
755
+ }, { timeout: 1000 });
756
+ });
757
+
758
+ await step('Clear all toasts and verify cleanup', async () => {
759
+ const clearBtn = localCanvas.getByTestId('clear-toasts-btn');
760
+ await userEvent.click(clearBtn);
761
+
762
+ // Verify all toasts are dismissed
763
+ await waitFor(
764
+ () => {
765
+ expect(canvas.queryByText('Toast 1')).not.toBeInTheDocument();
766
+ expect(canvas.queryByText('Toast 10')).not.toBeInTheDocument();
767
+ },
768
+ { timeout: 2000 },
769
+ );
770
+ });
771
+ },
772
+ };
773
+
774
+ export const EdgeCases: Story = {
775
+ render: () => (
776
+ <TestWrapper>
777
+ <EdgeCasesTest />
778
+ </TestWrapper>
779
+ ),
780
+ play: async ({ canvasElement, step }) => {
781
+ const canvas = within(canvasElement.ownerDocument.body);
782
+ const localCanvas = within(canvasElement);
783
+
784
+ await step('Test empty toast', async () => {
785
+ const emptyBtn = localCanvas.getByTestId('empty-toast-btn');
786
+ await userEvent.click(emptyBtn);
787
+
788
+ // Empty toast might not have text, check for toast container presence
789
+ await waitFor(() => {
790
+ // Check if any toast containers exist by looking for elements with Collapse class
791
+ const toastElements = canvasElement.ownerDocument.querySelectorAll('[class*="Collapse"]');
792
+ expect(toastElements.length).toBeGreaterThan(0);
793
+ });
794
+ });
795
+
796
+ await step('Test long message toast', async () => {
797
+ const longBtn = localCanvas.getByTestId('long-toast-btn');
798
+ await userEvent.click(longBtn);
799
+
800
+ await waitFor(() => {
801
+ const longToast = canvas.getByText(/This is a very long toast message/);
802
+ expect(longToast).toBeInTheDocument();
803
+ // Verify toast has proper text wrapping constraints
804
+ const toastContainer = longToast.closest('[role="status"], [role="alert"]');
805
+ if (toastContainer) {
806
+ const styles = window.getComputedStyle(toastContainer);
807
+ // Check that container has max width constraint for proper wrapping
808
+ const maxWidth = styles.maxWidth;
809
+ expect(maxWidth).toBeTruthy();
810
+ expect(maxWidth).not.toBe('none');
811
+ }
812
+ });
813
+ });
814
+
815
+ await step('Test promise toast lifecycle', async () => {
816
+ const promiseBtn = localCanvas.getByTestId('promise-toast-btn');
817
+ await userEvent.click(promiseBtn);
818
+
819
+ // First, loading toast should appear
820
+ await waitFor(() => {
821
+ expect(canvas.getByText('Processing...')).toBeInTheDocument();
822
+ });
823
+
824
+ // After 2 seconds, success toast should replace loading
825
+ await waitFor(
826
+ () => {
827
+ expect(canvas.queryByText('Processing...')).not.toBeInTheDocument();
828
+ expect(canvas.getByText('Promise resolved!')).toBeInTheDocument();
829
+ },
830
+ { timeout: 3000 },
831
+ );
832
+ });
833
+ },
834
+ };
835
+
836
+ export const Integration: Story = {
837
+ render: () => (
838
+ <TestWrapper>
839
+ <IntegrationTest />
840
+ </TestWrapper>
841
+ ),
842
+ play: async ({ canvasElement, step }) => {
843
+ const canvas = within(canvasElement.ownerDocument.body);
844
+ const localCanvas = within(canvasElement);
845
+
846
+ await step('Run multi-step integration test', async () => {
847
+ const integrationBtn = localCanvas.getByTestId('integration-test-btn');
848
+ await userEvent.click(integrationBtn);
849
+
850
+ // Step 1: Starting toast
851
+ await waitFor(() => {
852
+ expect(canvas.getByText('Step 1: Starting integration test')).toBeInTheDocument();
853
+ expect(integrationBtn).toHaveTextContent('Run Integration Test (Step 1/4)');
854
+ });
855
+
856
+ // Step 2: Success toast
857
+ await waitFor(
858
+ () => {
859
+ expect(canvas.getByText('Step 2: First action completed')).toBeInTheDocument();
860
+ expect(integrationBtn).toHaveTextContent('Run Integration Test (Step 2/4)');
861
+ },
862
+ { timeout: 2000 },
863
+ );
864
+
865
+ // Step 3: Error toast
866
+ await waitFor(
867
+ () => {
868
+ expect(canvas.getByText('Step 3: Simulated error occurred')).toBeInTheDocument();
869
+ expect(integrationBtn).toHaveTextContent('Run Integration Test (Step 3/4)');
870
+ },
871
+ { timeout: 3000 },
872
+ );
873
+
874
+ // Step 4: Completion - wait longer for all steps to complete
875
+ await waitFor(
876
+ () => {
877
+ // Button should be re-enabled after completion
878
+ expect(integrationBtn).not.toBeDisabled();
879
+ expect(integrationBtn).toHaveTextContent('Run Integration Test');
880
+ },
881
+ { timeout: 5000 },
882
+ );
883
+
884
+ // Check that final completion toast appeared (might be transient)
885
+ await waitFor(
886
+ () => {
887
+ const completionToast = canvas.queryByText('Step 4: Integration test completed');
888
+ // Test passes if either the toast is visible or the test has completed (button re-enabled)
889
+ const testCompleted = !integrationBtn.disabled && integrationBtn.textContent === 'Run Integration Test';
890
+ expect(completionToast || testCompleted).toBeTruthy();
891
+ },
892
+ { timeout: 1000 },
893
+ );
894
+ });
895
+ },
896
+ };