@shohojdhara/atomix 0.1.30 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (469) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +151 -39
  4. package/dist/atomix.css +13529 -0
  5. package/dist/atomix.min.css +15 -0
  6. package/dist/index.d.ts +6112 -1757
  7. package/dist/index.esm.js +16852 -8364
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +16892 -8369
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.min.js +1 -1
  12. package/dist/index.min.js.map +1 -1
  13. package/dist/themes/boomdevs.css +13241 -0
  14. package/dist/themes/boomdevs.min.css +353 -0
  15. package/dist/themes/esrar.css +15374 -0
  16. package/dist/themes/esrar.min.css +189 -0
  17. package/dist/themes/mashroom.css +28079 -0
  18. package/dist/themes/mashroom.min.css +403 -0
  19. package/dist/themes/shaj-default.css +14203 -0
  20. package/dist/themes/shaj-default.min.css +500 -0
  21. package/dist/themes/yabai.css +13711 -0
  22. package/dist/themes/yabai.min.css +189 -0
  23. package/package.json +126 -99
  24. package/src/components/Accordion/Accordion.stories.tsx +271 -0
  25. package/src/components/Accordion/Accordion.tsx +131 -0
  26. package/src/components/Accordion/index.ts +3 -0
  27. package/src/components/AtomixLogo/AtomixLogo.tsx +36 -0
  28. package/src/components/AtomixLogo/index.ts +3 -0
  29. package/src/components/AtomixLogo.tsx +40 -0
  30. package/src/components/Avatar/Avatar.stories.tsx +257 -0
  31. package/src/components/Avatar/Avatar.tsx +68 -0
  32. package/src/components/Avatar/AvatarGroup.tsx +73 -0
  33. package/src/components/Avatar/index.ts +3 -0
  34. package/src/components/Badge/Badge.stories.tsx +371 -0
  35. package/src/components/Badge/Badge.tsx +39 -0
  36. package/src/components/Badge/index.ts +3 -0
  37. package/src/components/Block/Block.stories.tsx +408 -0
  38. package/src/components/Block/Block.tsx +137 -0
  39. package/src/components/Block/index.ts +1 -0
  40. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +106 -0
  41. package/src/components/Breadcrumb/Breadcrumb.tsx +112 -0
  42. package/src/components/Breadcrumb/index.ts +3 -0
  43. package/src/components/Button/Button.stories.tsx +312 -0
  44. package/src/components/Button/Button.tsx +69 -0
  45. package/src/components/Button/index.ts +3 -0
  46. package/src/components/Callout/Callout.stories.tsx +588 -0
  47. package/src/components/Callout/Callout.tsx +78 -0
  48. package/src/components/Callout/index.ts +1 -0
  49. package/src/components/Card/Card.stories.tsx +105 -0
  50. package/src/components/Card/Card.tsx +69 -0
  51. package/src/components/Card/ElevationCard.tsx +47 -0
  52. package/src/components/Card/index.ts +15 -0
  53. package/src/components/Chart/AdvancedChart.tsx +624 -0
  54. package/src/components/Chart/AnimatedChart.tsx +206 -0
  55. package/src/components/Chart/AreaChart.tsx +27 -0
  56. package/src/components/Chart/BarChart.tsx +148 -0
  57. package/src/components/Chart/BubbleChart.tsx +411 -0
  58. package/src/components/Chart/CandlestickChart.tsx +765 -0
  59. package/src/components/Chart/Chart.stories.tsx +527 -0
  60. package/src/components/Chart/Chart.tsx +218 -0
  61. package/src/components/Chart/ChartRenderer.tsx +322 -0
  62. package/src/components/Chart/ChartToolbar.tsx +436 -0
  63. package/src/components/Chart/ChartTooltip.tsx +101 -0
  64. package/src/components/Chart/DonutChart.tsx +370 -0
  65. package/src/components/Chart/FunnelChart.tsx +393 -0
  66. package/src/components/Chart/GaugeChart.tsx +550 -0
  67. package/src/components/Chart/HeatmapChart.tsx +614 -0
  68. package/src/components/Chart/LineChart.tsx +172 -0
  69. package/src/components/Chart/LineChartNew.tsx +167 -0
  70. package/src/components/Chart/MultiAxisChart.tsx +498 -0
  71. package/src/components/Chart/PieChart.tsx +103 -0
  72. package/src/components/Chart/RadarChart.tsx +332 -0
  73. package/src/components/Chart/RealTimeChart.tsx +436 -0
  74. package/src/components/Chart/ScatterChart.tsx +152 -0
  75. package/src/components/Chart/TreemapChart.tsx +574 -0
  76. package/src/components/Chart/WaterfallChart.tsx +450 -0
  77. package/src/components/Chart/index.ts +119 -0
  78. package/src/components/Chart/types.ts +338 -0
  79. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +44 -0
  80. package/src/components/ColorModeToggle/ColorModeToggle.tsx +85 -0
  81. package/src/components/ColorModeToggle/index.ts +2 -0
  82. package/src/components/Countdown/Countdown.stories.tsx +46 -0
  83. package/src/components/Countdown/Countdown.tsx +90 -0
  84. package/src/components/Countdown/index.ts +2 -0
  85. package/src/components/DataTable/DataTable.stories.tsx +248 -0
  86. package/src/components/DataTable/DataTable.tsx +213 -0
  87. package/src/components/DataTable/index.ts +3 -0
  88. package/src/components/DatePicker/DatePicker.stories.tsx +364 -0
  89. package/src/components/DatePicker/DatePicker.tsx +504 -0
  90. package/src/components/DatePicker/index.ts +4 -0
  91. package/src/components/DatePicker/readme.md +106 -0
  92. package/src/components/DatePicker/types.ts +167 -0
  93. package/src/components/DatePicker/utils.ts +185 -0
  94. package/src/components/Dropdown/Dropdown.stories.tsx +358 -0
  95. package/src/components/Dropdown/Dropdown.tsx +352 -0
  96. package/src/components/Dropdown/index.ts +14 -0
  97. package/src/components/Dropdown/readme.md +151 -0
  98. package/src/components/EdgePanel/EdgePanel.stories.tsx +266 -0
  99. package/src/components/EdgePanel/EdgePanel.tsx +73 -0
  100. package/src/components/EdgePanel/index.ts +1 -0
  101. package/src/components/Form/Checkbox.stories.tsx +76 -0
  102. package/src/components/Form/Checkbox.tsx +69 -0
  103. package/src/components/Form/Form.stories.tsx +497 -0
  104. package/src/components/Form/Form.tsx +46 -0
  105. package/src/components/Form/FormGroup.stories.tsx +162 -0
  106. package/src/components/Form/FormGroup.tsx +53 -0
  107. package/src/components/Form/Input.stories.tsx +106 -0
  108. package/src/components/Form/Input.tsx +87 -0
  109. package/src/components/Form/Radio.stories.tsx +94 -0
  110. package/src/components/Form/Radio.tsx +65 -0
  111. package/src/components/Form/Select.stories.tsx +151 -0
  112. package/src/components/Form/Select.tsx +191 -0
  113. package/src/components/Form/Textarea.stories.tsx +123 -0
  114. package/src/components/Form/Textarea.tsx +78 -0
  115. package/src/components/Form/index.ts +7 -0
  116. package/src/components/Hero/Hero.stories.tsx +295 -0
  117. package/src/components/Hero/Hero.tsx +175 -0
  118. package/src/components/Hero/index.ts +6 -0
  119. package/src/components/Icon/Icon.tsx +87 -0
  120. package/src/components/Icon/index.ts +2 -0
  121. package/src/components/List/List.stories.tsx +122 -0
  122. package/src/components/List/List.tsx +35 -0
  123. package/src/components/List/ListGroup.tsx +35 -0
  124. package/src/components/List/index.ts +2 -0
  125. package/src/components/Messages/Messages.stories.tsx +160 -0
  126. package/src/components/Messages/Messages.tsx +172 -0
  127. package/src/components/Messages/index.ts +3 -0
  128. package/src/components/Modal/Modal.stories.tsx +284 -0
  129. package/src/components/Modal/Modal.tsx +198 -0
  130. package/src/components/Modal/README.md +169 -0
  131. package/src/components/Modal/index.ts +1 -0
  132. package/src/components/Navigation/Menu/MegaMenu.tsx +109 -0
  133. package/src/components/Navigation/Menu/Menu.stories.tsx +339 -0
  134. package/src/components/Navigation/Menu/Menu.tsx +111 -0
  135. package/src/components/Navigation/Nav/Nav.stories.tsx +456 -0
  136. package/src/components/Navigation/Nav/Nav.tsx +51 -0
  137. package/src/components/Navigation/Nav/NavDropdown.tsx +105 -0
  138. package/src/components/Navigation/Nav/NavItem.tsx +168 -0
  139. package/src/components/Navigation/Navbar/Navbar.stories.tsx +569 -0
  140. package/src/components/Navigation/Navbar/Navbar.tsx +150 -0
  141. package/src/components/Navigation/README.md +314 -0
  142. package/src/components/Navigation/SideMenu/SideMenu.README.md +494 -0
  143. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +609 -0
  144. package/src/components/Navigation/SideMenu/SideMenu.tsx +101 -0
  145. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +103 -0
  146. package/src/components/Navigation/SideMenu/SideMenuList.tsx +41 -0
  147. package/src/components/Navigation/index.ts +23 -0
  148. package/src/components/Pagination/Pagination.stories.tsx +188 -0
  149. package/src/components/Pagination/Pagination.tsx +162 -0
  150. package/src/components/Pagination/index.ts +1 -0
  151. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +397 -0
  152. package/src/components/PhotoViewer/PhotoViewer.tsx +246 -0
  153. package/src/components/PhotoViewer/PhotoViewerHeader.tsx +184 -0
  154. package/src/components/PhotoViewer/PhotoViewerImage.tsx +173 -0
  155. package/src/components/PhotoViewer/PhotoViewerInfo.tsx +91 -0
  156. package/src/components/PhotoViewer/PhotoViewerNavigation.tsx +85 -0
  157. package/src/components/PhotoViewer/PhotoViewerThumbnails.tsx +63 -0
  158. package/src/components/PhotoViewer/README.md +358 -0
  159. package/src/components/PhotoViewer/examples/ImageGallery.tsx +187 -0
  160. package/src/components/PhotoViewer/examples/SimpleGallery.tsx +73 -0
  161. package/src/components/PhotoViewer/examples/index.ts +2 -0
  162. package/src/components/PhotoViewer/index.ts +14 -0
  163. package/src/components/Popover/Popover.stories.tsx +143 -0
  164. package/src/components/Popover/Popover.tsx +137 -0
  165. package/src/components/Popover/index.ts +5 -0
  166. package/src/components/Popover/readme.md +120 -0
  167. package/src/components/ProductReview/ProductReview.stories.tsx +88 -0
  168. package/src/components/ProductReview/ProductReview.tsx +169 -0
  169. package/src/components/ProductReview/index.ts +3 -0
  170. package/src/components/Progress/Progress.stories.tsx +75 -0
  171. package/src/components/Progress/Progress.tsx +45 -0
  172. package/src/components/Progress/index.ts +1 -0
  173. package/src/components/Rating/Rating.stories.tsx +109 -0
  174. package/src/components/Rating/Rating.tsx +286 -0
  175. package/src/components/Rating/index.ts +6 -0
  176. package/src/components/River/River.stories.tsx +230 -0
  177. package/src/components/River/River.tsx +134 -0
  178. package/src/components/River/index.ts +2 -0
  179. package/src/components/SectionIntro/SectionIntro.stories.tsx +143 -0
  180. package/src/components/SectionIntro/SectionIntro.tsx +184 -0
  181. package/src/components/SectionIntro/index.ts +3 -0
  182. package/src/components/Slider/Slider.stories.tsx +241 -0
  183. package/src/components/Slider/Slider.tsx +225 -0
  184. package/src/components/Slider/index.ts +24 -0
  185. package/src/components/Spinner/Spinner.stories.tsx +65 -0
  186. package/src/components/Spinner/Spinner.tsx +36 -0
  187. package/src/components/Spinner/index.ts +2 -0
  188. package/src/components/Steps/Steps.stories.tsx +158 -0
  189. package/src/components/Steps/Steps.tsx +115 -0
  190. package/src/components/Steps/index.ts +3 -0
  191. package/src/components/Tab/Tab.stories.tsx +129 -0
  192. package/src/components/Tab/Tab.tsx +111 -0
  193. package/src/components/Tab/index.ts +2 -0
  194. package/src/components/Testimonial/Testimonial.stories.tsx +180 -0
  195. package/src/components/Testimonial/Testimonial.tsx +138 -0
  196. package/src/components/Testimonial/index.ts +3 -0
  197. package/src/components/Todo/Todo.stories.tsx +103 -0
  198. package/src/components/Todo/Todo.tsx +158 -0
  199. package/src/components/Todo/index.ts +1 -0
  200. package/src/components/Toggle/Toggle.stories.tsx +49 -0
  201. package/src/components/Toggle/Toggle.tsx +84 -0
  202. package/src/components/Toggle/index.ts +2 -0
  203. package/src/components/Tooltip/Tooltip.stories.tsx +115 -0
  204. package/src/components/Tooltip/Tooltip.tsx +150 -0
  205. package/src/components/Tooltip/index.ts +3 -0
  206. package/src/components/Upload/Upload.stories.tsx +220 -0
  207. package/src/components/Upload/Upload.tsx +354 -0
  208. package/src/components/Upload/index.ts +3 -0
  209. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +484 -0
  210. package/src/components/VideoPlayer/VideoPlayer.tsx +574 -0
  211. package/src/components/VideoPlayer/index.ts +7 -0
  212. package/src/components/index.ts +111 -0
  213. package/src/layouts/Grid/Container.tsx +58 -0
  214. package/src/layouts/Grid/Grid.stories.tsx +861 -0
  215. package/src/layouts/Grid/Grid.tsx +68 -0
  216. package/src/layouts/Grid/GridCol.tsx +161 -0
  217. package/src/layouts/Grid/README.md +108 -0
  218. package/src/layouts/Grid/Row.tsx +70 -0
  219. package/src/layouts/Grid/index.ts +8 -0
  220. package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +387 -0
  221. package/src/layouts/MasonryGrid/MasonryGrid.tsx +408 -0
  222. package/src/layouts/MasonryGrid/MasonryGridItem.tsx +44 -0
  223. package/src/layouts/MasonryGrid/README.md +117 -0
  224. package/src/layouts/MasonryGrid/index.ts +4 -0
  225. package/src/layouts/index.ts +7 -0
  226. package/src/lib/README.md +89 -0
  227. package/src/lib/composables/index.ts +63 -0
  228. package/src/lib/composables/useAccordion.ts +129 -0
  229. package/src/lib/composables/useAmbientMode.ts +90 -0
  230. package/src/lib/composables/useBadge.ts +42 -0
  231. package/src/lib/composables/useBarChart.ts +365 -0
  232. package/src/lib/composables/useBlock.ts +56 -0
  233. package/src/lib/composables/useBreadcrumb.ts +81 -0
  234. package/src/lib/composables/useButton.ts +59 -0
  235. package/src/lib/composables/useCallout.ts +55 -0
  236. package/src/lib/composables/useCard.ts +155 -0
  237. package/src/lib/composables/useChart.ts +1082 -0
  238. package/src/lib/composables/useChartAnalytics.ts +505 -0
  239. package/src/lib/composables/useChartData.ts +38 -0
  240. package/src/lib/composables/useChartExport.ts +392 -0
  241. package/src/lib/composables/useChartInteraction.ts +34 -0
  242. package/src/lib/composables/useChartInteractions.ts +123 -0
  243. package/src/lib/composables/useChartPerformance.ts +323 -0
  244. package/src/lib/composables/useChartScale.ts +48 -0
  245. package/src/lib/composables/useChartToolbar.ts +532 -0
  246. package/src/lib/composables/useCheckbox.ts +70 -0
  247. package/src/lib/composables/useDataTable.ts +208 -0
  248. package/src/lib/composables/useDatePicker.ts +564 -0
  249. package/src/lib/composables/useDropdown.ts +272 -0
  250. package/src/lib/composables/useEdgePanel.ts +261 -0
  251. package/src/lib/composables/useForm.ts +62 -0
  252. package/src/lib/composables/useFormGroup.ts +51 -0
  253. package/src/lib/composables/useHero.ts +250 -0
  254. package/src/lib/composables/useInput.ts +58 -0
  255. package/src/lib/composables/useLineChart.ts +319 -0
  256. package/src/lib/composables/useMessages.ts +77 -0
  257. package/src/lib/composables/useModal.ts +110 -0
  258. package/src/lib/composables/useNavbar.ts +288 -0
  259. package/src/lib/composables/usePagination.ts +101 -0
  260. package/src/lib/composables/usePhotoViewer.ts +937 -0
  261. package/src/lib/composables/usePieChart.ts +362 -0
  262. package/src/lib/composables/usePopover.ts +354 -0
  263. package/src/lib/composables/useProgress.ts +74 -0
  264. package/src/lib/composables/useRadio.ts +47 -0
  265. package/src/lib/composables/useRating.ts +174 -0
  266. package/src/lib/composables/useRiver.ts +205 -0
  267. package/src/lib/composables/useSelect.ts +52 -0
  268. package/src/lib/composables/useSideMenu.ts +197 -0
  269. package/src/lib/composables/useSlider.ts +339 -0
  270. package/src/lib/composables/useSpinner.ts +42 -0
  271. package/src/lib/composables/useTextarea.ts +55 -0
  272. package/src/lib/composables/useTodo.ts +141 -0
  273. package/src/lib/composables/useVideoPlayer.ts +398 -0
  274. package/src/lib/constants/components.ts +1433 -0
  275. package/src/lib/constants/index.ts +4 -0
  276. package/src/lib/index.ts +11 -0
  277. package/src/lib/types/components.ts +4750 -0
  278. package/src/lib/types/index.ts +2 -0
  279. package/src/lib/utils/dom.ts +41 -0
  280. package/src/lib/utils/icons.ts +74 -0
  281. package/src/lib/utils/index.ts +55 -0
  282. package/src/lib/utils/useForkRef.test.tsx +64 -0
  283. package/src/lib/utils/useForkRef.ts +36 -0
  284. package/src/lib/utils.test.ts +14 -0
  285. package/src/styles/01-settings/_index.scss +2 -0
  286. package/src/styles/01-settings/_settings.accordion.scss +7 -5
  287. package/src/styles/01-settings/_settings.animations.scss +0 -0
  288. package/src/styles/01-settings/_settings.avatar-group.scss +6 -3
  289. package/src/styles/01-settings/_settings.avatar.scss +2 -2
  290. package/src/styles/01-settings/_settings.badge.scss +15 -9
  291. package/src/styles/01-settings/_settings.block.scss +11 -0
  292. package/src/styles/01-settings/_settings.border-radius.scss +12 -9
  293. package/src/styles/01-settings/_settings.border.scss +4 -1
  294. package/src/styles/01-settings/_settings.box-shadow.scss +1 -1
  295. package/src/styles/01-settings/_settings.breadcrumb.scss +9 -8
  296. package/src/styles/01-settings/_settings.breakpoints.scss +0 -0
  297. package/src/styles/01-settings/_settings.btn-group.scss +4 -1
  298. package/src/styles/01-settings/_settings.button.scss +19 -21
  299. package/src/styles/01-settings/_settings.callout.scss +42 -24
  300. package/src/styles/01-settings/_settings.card.scss +12 -10
  301. package/src/styles/01-settings/_settings.chart.scss +199 -0
  302. package/src/styles/01-settings/_settings.checkbox-group.scss +0 -0
  303. package/src/styles/01-settings/_settings.checkbox.scss +0 -0
  304. package/src/styles/01-settings/_settings.color-mode.scss +0 -0
  305. package/src/styles/01-settings/_settings.colors.scss +20 -0
  306. package/src/styles/01-settings/_settings.config.scss +1 -1
  307. package/src/styles/01-settings/_settings.countdown.scss +0 -0
  308. package/src/styles/01-settings/_settings.data-table.scss +0 -0
  309. package/src/styles/01-settings/_settings.datepicker.scss +0 -0
  310. package/src/styles/01-settings/_settings.dropdown.scss +0 -0
  311. package/src/styles/01-settings/_settings.edge-panel.scss +0 -0
  312. package/src/styles/01-settings/_settings.fonts.scss +1 -1
  313. package/src/styles/01-settings/_settings.form-group.scss +0 -0
  314. package/src/styles/01-settings/_settings.form.scss +0 -0
  315. package/src/styles/01-settings/_settings.grid.scss +3 -3
  316. package/src/styles/01-settings/_settings.hero.scss +1 -1
  317. package/src/styles/01-settings/_settings.input.scss +1 -1
  318. package/src/styles/01-settings/_settings.link.scss +0 -0
  319. package/src/styles/01-settings/_settings.list-group.scss +0 -0
  320. package/src/styles/01-settings/_settings.list.scss +0 -0
  321. package/src/styles/01-settings/_settings.maps.scss +43 -8
  322. package/src/styles/01-settings/_settings.masonry-grid.scss +0 -0
  323. package/src/styles/01-settings/_settings.menu.scss +0 -0
  324. package/src/styles/01-settings/_settings.messages.scss +0 -0
  325. package/src/styles/01-settings/_settings.modal.scss +1 -1
  326. package/src/styles/01-settings/_settings.nav.scss +0 -0
  327. package/src/styles/01-settings/_settings.navbar.scss +0 -0
  328. package/src/styles/01-settings/_settings.pagination.scss +0 -0
  329. package/src/styles/01-settings/_settings.photoviewer.scss +89 -23
  330. package/src/styles/01-settings/_settings.popover.scss +0 -0
  331. package/src/styles/01-settings/_settings.position.scss +0 -0
  332. package/src/styles/01-settings/_settings.progress.scss +0 -0
  333. package/src/styles/01-settings/_settings.rating.scss +0 -0
  334. package/src/styles/01-settings/_settings.river.scss +0 -0
  335. package/src/styles/01-settings/_settings.sectionintro.scss +0 -0
  336. package/src/styles/01-settings/_settings.select.scss +0 -0
  337. package/src/styles/01-settings/_settings.side-menu.scss +0 -0
  338. package/src/styles/01-settings/_settings.skeleton.scss +0 -0
  339. package/src/styles/01-settings/_settings.slider.scss +59 -0
  340. package/src/styles/01-settings/_settings.spacing.scss +11 -3
  341. package/src/styles/01-settings/_settings.spinner.scss +0 -0
  342. package/src/styles/01-settings/_settings.steps.scss +1 -1
  343. package/src/styles/01-settings/_settings.tabs.scss +4 -4
  344. package/src/styles/01-settings/_settings.testimonials.scss +0 -0
  345. package/src/styles/01-settings/_settings.todo.scss +0 -0
  346. package/src/styles/01-settings/_settings.toggle.scss +1 -1
  347. package/src/styles/01-settings/_settings.tooltip.scss +0 -0
  348. package/src/styles/01-settings/_settings.typography.scss +2 -0
  349. package/src/styles/01-settings/_settings.upload.scss +0 -0
  350. package/src/styles/01-settings/_settings.video-player.scss +64 -0
  351. package/src/styles/01-settings/_settings.z-layers.scss +0 -0
  352. package/src/styles/02-tools/_index.scss +1 -0
  353. package/src/styles/02-tools/_tools.animations.scss +82 -0
  354. package/src/styles/02-tools/_tools.border-radius.scss +0 -0
  355. package/src/styles/02-tools/_tools.breakpoints.scss +0 -0
  356. package/src/styles/02-tools/_tools.button.scss +5 -0
  357. package/src/styles/02-tools/_tools.clearfix.scss +0 -0
  358. package/src/styles/02-tools/_tools.color-functions.scss +0 -0
  359. package/src/styles/02-tools/_tools.color-mode.scss +1 -1
  360. package/src/styles/02-tools/_tools.component.scss +479 -0
  361. package/src/styles/02-tools/_tools.event.scss +0 -0
  362. package/src/styles/02-tools/_tools.grid.scss +0 -0
  363. package/src/styles/02-tools/_tools.hidden-visually.scss +0 -0
  364. package/src/styles/02-tools/_tools.hidden.scss +0 -0
  365. package/src/styles/02-tools/_tools.map-loop.scss +0 -0
  366. package/src/styles/02-tools/_tools.media-queries.scss +0 -0
  367. package/src/styles/02-tools/_tools.object-fit.scss +0 -0
  368. package/src/styles/02-tools/_tools.placeholder.scss +0 -0
  369. package/src/styles/02-tools/_tools.rem.scss +5 -1
  370. package/src/styles/02-tools/_tools.size.scss +0 -0
  371. package/src/styles/02-tools/_tools.spacing.scss +0 -0
  372. package/src/styles/02-tools/_tools.to-rgb.scss +0 -0
  373. package/src/styles/02-tools/_tools.transition.scss +0 -0
  374. package/src/styles/02-tools/_tools.utilities.scss +0 -0
  375. package/src/styles/02-tools/_tools.utility-api.scss +23 -2
  376. package/src/styles/03-generic/_generic.fonts.scss +0 -0
  377. package/src/styles/03-generic/_generic.reset.scss +0 -0
  378. package/src/styles/03-generic/_generic.root.scss +5 -1
  379. package/src/styles/03-generic/_generic.selection.scss +0 -0
  380. package/src/styles/03-generic/_index.scss +0 -0
  381. package/src/styles/04-elements/_elements.all.scss +0 -0
  382. package/src/styles/04-elements/_elements.body.scss +0 -0
  383. package/src/styles/04-elements/_elements.heading.scss +0 -0
  384. package/src/styles/04-elements/_elements.html.scss +0 -0
  385. package/src/styles/04-elements/_elements.links.scss +0 -0
  386. package/src/styles/04-elements/_index.scss +0 -0
  387. package/src/styles/05-objects/_index.scss +1 -0
  388. package/src/styles/05-objects/_objects.block.scss +122 -0
  389. package/src/styles/05-objects/_objects.container.scss +14 -10
  390. package/src/styles/05-objects/_objects.grid.scss +0 -0
  391. package/src/styles/05-objects/_objects.masonry-grid.scss +0 -0
  392. package/src/styles/06-components/_components.accordion.scss +3 -1
  393. package/src/styles/06-components/_components.avatar-group.scss +0 -0
  394. package/src/styles/06-components/_components.avatar.scss +0 -0
  395. package/src/styles/06-components/_components.badge.scss +9 -9
  396. package/src/styles/06-components/_components.breadcrumb.scss +0 -0
  397. package/src/styles/06-components/_components.btn-group.scss +0 -0
  398. package/src/styles/06-components/_components.button.scss +0 -0
  399. package/src/styles/06-components/_components.callout.scss +2 -1
  400. package/src/styles/06-components/_components.card.scss +0 -1
  401. package/src/styles/06-components/_components.chart.scss +2102 -0
  402. package/src/styles/06-components/_components.checkbox-group.scss +0 -0
  403. package/src/styles/06-components/_components.checkbox.scss +0 -0
  404. package/src/styles/06-components/_components.color-mode-toggle.scss +0 -0
  405. package/src/styles/06-components/_components.countdown.scss +0 -0
  406. package/src/styles/06-components/_components.data-table.scss +0 -0
  407. package/src/styles/06-components/_components.datepicker.scss +0 -0
  408. package/src/styles/06-components/_components.dropdown.scss +0 -0
  409. package/src/styles/06-components/_components.edge-panel.scss +0 -0
  410. package/src/styles/06-components/_components.form-group.scss +0 -0
  411. package/src/styles/06-components/_components.form.scss +0 -0
  412. package/src/styles/06-components/_components.hero.scss +1 -0
  413. package/src/styles/06-components/_components.icon.scss +2 -2
  414. package/src/styles/06-components/_components.image-gallery.scss +0 -0
  415. package/src/styles/06-components/_components.input.scss +0 -0
  416. package/src/styles/06-components/_components.list-group.scss +0 -0
  417. package/src/styles/06-components/_components.list.scss +0 -0
  418. package/src/styles/06-components/_components.menu.scss +0 -0
  419. package/src/styles/06-components/_components.messages.scss +0 -0
  420. package/src/styles/06-components/_components.modal.scss +3 -0
  421. package/src/styles/06-components/_components.nav.scss +0 -0
  422. package/src/styles/06-components/_components.navbar.scss +0 -0
  423. package/src/styles/06-components/_components.pagination.scss +0 -0
  424. package/src/styles/06-components/_components.photoviewer.scss +603 -545
  425. package/src/styles/06-components/_components.popover.scss +0 -0
  426. package/src/styles/06-components/_components.product-review.scss +0 -0
  427. package/src/styles/06-components/_components.progress.scss +0 -0
  428. package/src/styles/06-components/_components.rating.scss +0 -0
  429. package/src/styles/06-components/_components.river.scss +0 -0
  430. package/src/styles/06-components/_components.sectionintro.scss +0 -0
  431. package/src/styles/06-components/_components.select.scss +0 -0
  432. package/src/styles/06-components/_components.side-menu.scss +0 -0
  433. package/src/styles/06-components/_components.skeleton.scss +0 -0
  434. package/src/styles/06-components/_components.slider.scss +273 -0
  435. package/src/styles/06-components/_components.spinner.scss +0 -0
  436. package/src/styles/06-components/_components.steps.scss +1 -0
  437. package/src/styles/06-components/_components.tabs.scss +0 -0
  438. package/src/styles/06-components/_components.testimonials.scss +0 -0
  439. package/src/styles/06-components/_components.todo.scss +0 -0
  440. package/src/styles/06-components/_components.toggle.scss +0 -0
  441. package/src/styles/06-components/_components.tooltip.scss +4 -9
  442. package/src/styles/06-components/_components.upload.scss +0 -0
  443. package/src/styles/06-components/_components.video-player.scss +623 -0
  444. package/src/styles/06-components/_index.scss +3 -0
  445. package/src/styles/06-components/old.chart.styles.scss +2819 -0
  446. package/src/styles/99-utilities/_index.scss +0 -0
  447. package/src/styles/99-utilities/_utilities.background.scss +0 -0
  448. package/src/styles/99-utilities/_utilities.border.scss +0 -0
  449. package/src/styles/99-utilities/_utilities.clearfix.scss +0 -0
  450. package/src/styles/99-utilities/_utilities.display.scss +0 -0
  451. package/src/styles/99-utilities/_utilities.flex.scss +0 -0
  452. package/src/styles/99-utilities/_utilities.link.scss +0 -0
  453. package/src/styles/99-utilities/_utilities.object-fit.scss +0 -0
  454. package/src/styles/99-utilities/_utilities.opacity.scss +0 -0
  455. package/src/styles/99-utilities/_utilities.overflow.scss +0 -0
  456. package/src/styles/99-utilities/_utilities.position.scss +0 -0
  457. package/src/styles/99-utilities/_utilities.scss +2 -1
  458. package/src/styles/99-utilities/_utilities.shadow.scss +0 -0
  459. package/src/styles/99-utilities/_utilities.sizes.scss +0 -0
  460. package/src/styles/99-utilities/_utilities.spacing.scss +0 -0
  461. package/src/styles/99-utilities/_utilities.text.scss +5 -0
  462. package/src/styles/99-utilities/_utilities.visibility.scss +0 -0
  463. package/src/styles/99-utilities/_utilities.visually-hidden.scss +0 -0
  464. package/src/styles/99-utilities/_utilities.z-index.scss +0 -0
  465. package/src/styles/css-modules.d.ts +0 -0
  466. package/src/styles/index.scss +0 -0
  467. package/dist/index.css +0 -15
  468. package/dist/index.esm.css +0 -15
  469. package/dist/index.min.css +0 -15
@@ -0,0 +1,588 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { useEffect, useState } from 'react';
3
+ import { Button } from '../Button/Button';
4
+ import { Callout } from './Callout';
5
+
6
+ const meta: Meta<typeof Callout> = {
7
+ title: 'Components/Callout',
8
+ component: Callout,
9
+ parameters: {
10
+ layout: 'padded',
11
+ docs: {
12
+ description: {
13
+ component:
14
+ 'Callout components are used to display important messages, notifications, or alerts to users. They can be used to provide feedback, warnings, errors, or general information.',
15
+ },
16
+ },
17
+ },
18
+ argTypes: {
19
+ variant: {
20
+ control: 'select',
21
+ options: ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'light', 'dark'],
22
+ description: 'The color variant of the callout',
23
+ table: {
24
+ defaultValue: { summary: 'primary' },
25
+ type: { summary: 'string' },
26
+ },
27
+ },
28
+ title: {
29
+ control: 'text',
30
+ description: 'The title of the callout',
31
+ table: {
32
+ type: { summary: 'ReactNode' },
33
+ },
34
+ },
35
+ children: {
36
+ control: 'text',
37
+ description: 'The content of the callout',
38
+ table: {
39
+ type: { summary: 'ReactNode' },
40
+ },
41
+ },
42
+ icon: {
43
+ control: 'boolean',
44
+ description: 'Optional icon to display in the callout',
45
+ table: {
46
+ type: { summary: 'ReactNode' },
47
+ },
48
+ },
49
+ oneLine: {
50
+ control: 'boolean',
51
+ description: 'Display the callout in one line',
52
+ table: {
53
+ defaultValue: { summary: 'false' },
54
+ type: { summary: 'boolean' },
55
+ },
56
+ },
57
+ toast: {
58
+ control: 'boolean',
59
+ description: 'Display the callout as a toast notification',
60
+ table: {
61
+ defaultValue: { summary: 'false' },
62
+ type: { summary: 'boolean' },
63
+ },
64
+ },
65
+
66
+ actions: {
67
+ control: false,
68
+ description: 'Optional action buttons to display in the callout',
69
+ table: {
70
+ type: { summary: 'ReactNode' },
71
+ },
72
+ },
73
+ className: {
74
+ control: 'text',
75
+ description: 'Additional CSS class names',
76
+ table: {
77
+ type: { summary: 'string' },
78
+ },
79
+ },
80
+ },
81
+ };
82
+
83
+ export default meta;
84
+ type Story = StoryObj<typeof Callout>;
85
+
86
+ // Icon components for different callout types
87
+ const InfoIcon = () => (
88
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
89
+ <path
90
+ d="M12 16V12M12 8H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"
91
+ stroke="currentColor"
92
+ strokeWidth="2"
93
+ strokeLinecap="round"
94
+ strokeLinejoin="round"
95
+ />
96
+ </svg>
97
+ );
98
+
99
+ const SuccessIcon = () => (
100
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
101
+ <path
102
+ d="M9 12L11 14L15 10M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z"
103
+ stroke="currentColor"
104
+ strokeWidth="2"
105
+ strokeLinecap="round"
106
+ strokeLinejoin="round"
107
+ />
108
+ </svg>
109
+ );
110
+
111
+ const WarningIcon = () => (
112
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
113
+ <path
114
+ d="M12 9V13M12 17H12.01M3.98069 8.00001C3.32275 9.15122 3 10.5502 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C10.5502 3 9.15122 3.32275 8.00001 3.98069"
115
+ stroke="currentColor"
116
+ strokeWidth="2"
117
+ strokeLinecap="round"
118
+ strokeLinejoin="round"
119
+ />
120
+ </svg>
121
+ );
122
+
123
+ const ErrorIcon = () => (
124
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
125
+ <path
126
+ d="M12 9V13M12 17H12.01M11.2926 3.05737C11.5093 3.01652 11.7321 3 11.9565 3C16.3908 3 20 6.60914 20 11.0435C20 11.2679 19.9835 11.4907 19.9426 11.7074C19.4862 15.0952 16.5609 17.7241 13 17.9711C12.6712 17.9903 12.3375 18 12 18C7.58172 18 4 14.4183 4 10C4 6.43913 6.62884 3.51375 10.0166 3.05736C10.2333 3.01652 10.4561 3 10.6805 3C10.9049 3 11.1277 3.01652 11.3444 3.05736L11.2926 3.05737Z"
127
+ stroke="currentColor"
128
+ strokeWidth="2"
129
+ strokeLinecap="round"
130
+ strokeLinejoin="round"
131
+ />
132
+ </svg>
133
+ );
134
+
135
+ // Basic variants
136
+ export const Default: Story = {
137
+ args: {
138
+ title: 'Information',
139
+ children: 'This is a default callout with some information.',
140
+ variant: 'primary',
141
+ icon: <InfoIcon />,
142
+ },
143
+ parameters: {
144
+ docs: {
145
+ description: {
146
+ story: 'The default callout with a title, content, and an icon.',
147
+ },
148
+ },
149
+ },
150
+ };
151
+
152
+ export const Success: Story = {
153
+ args: {
154
+ title: 'Success',
155
+ children: 'Your changes have been saved successfully.',
156
+ variant: 'success',
157
+ icon: <SuccessIcon />,
158
+ },
159
+ parameters: {
160
+ docs: {
161
+ description: {
162
+ story: 'Use success callouts to confirm that an action was completed successfully.',
163
+ },
164
+ },
165
+ },
166
+ };
167
+
168
+ export const Warning: Story = {
169
+ args: {
170
+ title: 'Warning',
171
+ children: 'Please review your information before proceeding.',
172
+ variant: 'warning',
173
+ icon: <WarningIcon />,
174
+ },
175
+ parameters: {
176
+ docs: {
177
+ description: {
178
+ story:
179
+ 'Warning callouts alert users to potential issues or important information they should be aware of.',
180
+ },
181
+ },
182
+ },
183
+ };
184
+
185
+ export const Error: Story = {
186
+ args: {
187
+ title: 'Error',
188
+ children: 'There was a problem processing your request.',
189
+ variant: 'error',
190
+ icon: <ErrorIcon />,
191
+ },
192
+ parameters: {
193
+ docs: {
194
+ description: {
195
+ story: 'Error callouts indicate that something went wrong and requires attention.',
196
+ },
197
+ },
198
+ },
199
+ };
200
+
201
+ // Layout variants
202
+ export const WithActions: Story = {
203
+ args: {
204
+ title: 'Update Available',
205
+ children: 'A new version is available. Would you like to update now?',
206
+ variant: 'info',
207
+ icon: <InfoIcon />,
208
+ actions: (
209
+ <>
210
+ <Button label="Update Now" variant="primary" size="sm" />
211
+ <Button label="Later" variant="outline-primary" size="sm" />
212
+ </>
213
+ ),
214
+ },
215
+ parameters: {
216
+ docs: {
217
+ description: {
218
+ story:
219
+ 'Callouts can include action buttons to allow users to respond directly to the message.',
220
+ },
221
+ },
222
+ },
223
+ };
224
+
225
+ export const Dismissible: Story = {
226
+ args: {
227
+ title: 'Notification',
228
+ children: 'This is a dismissible callout that can be closed.',
229
+ variant: 'primary',
230
+ icon: <InfoIcon />,
231
+ onClose: () => console.log('Callout closed'),
232
+ },
233
+ parameters: {
234
+ docs: {
235
+ description: {
236
+ story:
237
+ 'Dismissible callouts include a close button that allows users to remove the callout from view.',
238
+ },
239
+ },
240
+ },
241
+ };
242
+
243
+ export const OneLine: Story = {
244
+ args: {
245
+ title: 'Quick notification',
246
+ variant: 'info',
247
+ icon: <InfoIcon />,
248
+ oneLine: true,
249
+ },
250
+ parameters: {
251
+ docs: {
252
+ description: {
253
+ story:
254
+ 'One-line callouts are more compact and display the title and icon in a single line.',
255
+ },
256
+ },
257
+ },
258
+ };
259
+
260
+ export const Toast: Story = {
261
+ args: {
262
+ title: 'Toast Notification',
263
+ children: 'This callout is styled as a toast notification.',
264
+ variant: 'success',
265
+ icon: <SuccessIcon />,
266
+ toast: true,
267
+ onClose: () => console.log('Toast closed'),
268
+ },
269
+ parameters: {
270
+ docs: {
271
+ description: {
272
+ story:
273
+ 'Toast notifications are temporary messages that appear and disappear automatically.',
274
+ },
275
+ },
276
+ },
277
+ };
278
+
279
+ // Theme variants
280
+ export const Dark: Story = {
281
+ args: {
282
+ title: 'Dark Mode',
283
+ children: 'This is a dark variant of the callout component.',
284
+ variant: 'dark',
285
+ icon: <InfoIcon />,
286
+ },
287
+ parameters: {
288
+ docs: {
289
+ description: {
290
+ story:
291
+ 'Dark callouts are useful for dark-themed interfaces or for creating visual contrast.',
292
+ },
293
+ },
294
+ },
295
+ };
296
+
297
+ export const Light: Story = {
298
+ args: {
299
+ title: 'Light Mode',
300
+ children: 'This is a light variant of the callout component.',
301
+ variant: 'light',
302
+ icon: <InfoIcon />,
303
+ },
304
+ parameters: {
305
+ docs: {
306
+ description: {
307
+ story:
308
+ 'Light callouts are useful for light-themed interfaces or for creating visual contrast.',
309
+ },
310
+ },
311
+ },
312
+ };
313
+
314
+ // Interactive examples
315
+ const ToastDemoTemplate = () => {
316
+ const [toasts, setToasts] = useState<{ id: string; variant: string }[]>([]);
317
+
318
+ const addToast = (variant: string) => {
319
+ const id = Math.random().toString(36).substring(2, 9);
320
+ setToasts([...toasts, { id, variant }]);
321
+
322
+ // Auto-remove after 5 seconds
323
+ setTimeout(() => {
324
+ setToasts(current => current.filter(toast => toast.id !== id));
325
+ }, 5000);
326
+ };
327
+
328
+ const removeToast = (id: string) => {
329
+ setToasts(current => current.filter(toast => toast.id !== id));
330
+ };
331
+
332
+ const getIcon = (variant: string) => {
333
+ switch (variant) {
334
+ case 'success':
335
+ return <SuccessIcon />;
336
+ case 'warning':
337
+ return <WarningIcon />;
338
+ case 'error':
339
+ return <ErrorIcon />;
340
+ default:
341
+ return <InfoIcon />;
342
+ }
343
+ };
344
+
345
+ const getTitle = (variant: string) => {
346
+ switch (variant) {
347
+ case 'success':
348
+ return 'Success';
349
+ case 'warning':
350
+ return 'Warning';
351
+ case 'error':
352
+ return 'Error';
353
+ default:
354
+ return 'Information';
355
+ }
356
+ };
357
+
358
+ const getMessage = (variant: string) => {
359
+ switch (variant) {
360
+ case 'success':
361
+ return 'Operation completed successfully!';
362
+ case 'warning':
363
+ return 'Please review before continuing.';
364
+ case 'error':
365
+ return 'An error occurred. Please try again.';
366
+ default:
367
+ return 'This is an informational message.';
368
+ }
369
+ };
370
+
371
+ return (
372
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
373
+ <div style={{ display: 'flex', gap: '8px' }}>
374
+ <Button
375
+ label="Add Info Toast"
376
+ variant="primary"
377
+ size="sm"
378
+ onClick={() => addToast('info')}
379
+ />
380
+ <Button
381
+ label="Add Success Toast"
382
+ variant="success"
383
+ size="sm"
384
+ onClick={() => addToast('success')}
385
+ />
386
+ <Button
387
+ label="Add Warning Toast"
388
+ variant="warning"
389
+ size="sm"
390
+ onClick={() => addToast('warning')}
391
+ />
392
+ <Button
393
+ label="Add Error Toast"
394
+ variant="error"
395
+ size="sm"
396
+ onClick={() => addToast('error')}
397
+ />
398
+ </div>
399
+
400
+ <div
401
+ style={{
402
+ position: 'relative',
403
+ height: '300px',
404
+ border: '1px dashed #ccc',
405
+ borderRadius: '8px',
406
+ padding: '16px',
407
+ overflow: 'hidden',
408
+ }}
409
+ >
410
+ <div
411
+ style={{
412
+ position: 'absolute',
413
+ top: '16px',
414
+ right: '16px',
415
+ display: 'flex',
416
+ flexDirection: 'column',
417
+ gap: '8px',
418
+ maxWidth: '350px',
419
+ }}
420
+ >
421
+ {toasts.map(toast => (
422
+ <Callout
423
+ key={toast.id}
424
+ title={getTitle(toast.variant)}
425
+ variant={toast.variant as any}
426
+ icon={getIcon(toast.variant)}
427
+ toast={true}
428
+ onClose={() => removeToast(toast.id)}
429
+ >
430
+ {getMessage(toast.variant)}
431
+ </Callout>
432
+ ))}
433
+ </div>
434
+ {toasts.length === 0 && (
435
+ <div
436
+ style={{
437
+ display: 'flex',
438
+ height: '100%',
439
+ alignItems: 'center',
440
+ justifyContent: 'center',
441
+ color: '#666',
442
+ }}
443
+ >
444
+ Click a button above to show toast notifications here
445
+ </div>
446
+ )}
447
+ </div>
448
+ </div>
449
+ );
450
+ };
451
+
452
+ export const ToastDemo: Story = {
453
+ render: () => <ToastDemoTemplate />,
454
+ parameters: {
455
+ docs: {
456
+ description: {
457
+ story:
458
+ 'Interactive demo showing how toast notifications can be triggered and displayed in different variants.',
459
+ },
460
+ },
461
+ },
462
+ };
463
+
464
+ const AutoDismissTemplate = () => {
465
+ const [visible, setVisible] = useState(true);
466
+ const [countdown, setCountdown] = useState(5);
467
+
468
+ useEffect(() => {
469
+ if (!visible) return;
470
+
471
+ const timer = setInterval(() => {
472
+ setCountdown(prev => {
473
+ if (prev <= 1) {
474
+ clearInterval(timer);
475
+ setVisible(false);
476
+ return 0;
477
+ }
478
+ return prev - 1;
479
+ });
480
+ }, 1000);
481
+
482
+ return () => clearInterval(timer);
483
+ }, [visible]);
484
+
485
+ const resetCallout = () => {
486
+ setVisible(true);
487
+ setCountdown(5);
488
+ };
489
+
490
+ return (
491
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
492
+ {visible ? (
493
+ <Callout
494
+ title={`Auto-dismissing in ${countdown} seconds`}
495
+ variant="warning"
496
+ icon={<WarningIcon />}
497
+ onClose={() => setVisible(false)}
498
+ >
499
+ This callout will automatically dismiss after the countdown. You can also dismiss it
500
+ manually.
501
+ </Callout>
502
+ ) : (
503
+ <Button label="Show Auto-dismiss Callout" variant="primary" onClick={resetCallout} />
504
+ )}
505
+ </div>
506
+ );
507
+ };
508
+
509
+ export const AutoDismiss: Story = {
510
+ render: () => <AutoDismissTemplate />,
511
+ parameters: {
512
+ docs: {
513
+ description: {
514
+ story: 'Example of a callout that automatically dismisses after a countdown.',
515
+ },
516
+ },
517
+ },
518
+ };
519
+
520
+ const AllVariantsTemplate = () => {
521
+ const variants = ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'light', 'dark'];
522
+
523
+ const getIcon = (variant: string) => {
524
+ switch (variant) {
525
+ case 'success':
526
+ return <SuccessIcon />;
527
+ case 'warning':
528
+ return <WarningIcon />;
529
+ case 'error':
530
+ return <ErrorIcon />;
531
+ default:
532
+ return <InfoIcon />;
533
+ }
534
+ };
535
+
536
+ return (
537
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
538
+ {variants.map(variant => (
539
+ <Callout
540
+ key={variant}
541
+ title={`${variant.charAt(0).toUpperCase() + variant.slice(1)} Variant`}
542
+ variant={variant as any}
543
+ icon={getIcon(variant)}
544
+ >
545
+ This is an example of the {variant} callout variant.
546
+ </Callout>
547
+ ))}
548
+ </div>
549
+ );
550
+ };
551
+
552
+ export const AllVariants: Story = {
553
+ render: () => <AllVariantsTemplate />,
554
+ parameters: {
555
+ docs: {
556
+ description: {
557
+ story: 'Overview of all available callout color variants.',
558
+ },
559
+ },
560
+ },
561
+ };
562
+
563
+ const CalloutWithCustomContentTemplate = () => (
564
+ <Callout title="Custom Content Example" variant="primary" icon={<InfoIcon />}>
565
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
566
+ <p>Callouts can contain rich content including:</p>
567
+ <ul style={{ margin: 0, paddingLeft: '20px' }}>
568
+ <li>Lists of items</li>
569
+ <li>Formatted text</li>
570
+ <li>Custom components</li>
571
+ </ul>
572
+ <div style={{ backgroundColor: 'rgba(0,0,0,0.05)', padding: '8px', borderRadius: '4px' }}>
573
+ <code>This is a code example</code>
574
+ </div>
575
+ </div>
576
+ </Callout>
577
+ );
578
+
579
+ export const CustomContent: Story = {
580
+ render: () => <CalloutWithCustomContentTemplate />,
581
+ parameters: {
582
+ docs: {
583
+ description: {
584
+ story: 'Callouts can contain rich, custom content beyond simple text.',
585
+ },
586
+ },
587
+ },
588
+ };
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import { CalloutProps } from '../../lib/types/components';
3
+ import { useCallout } from '../../lib/composables/useCallout';
4
+ import { Icon } from '../Icon/Icon';
5
+
6
+ /**
7
+ * Callout component for displaying important messages, notifications, or alerts
8
+ */
9
+ export const Callout: React.FC<CalloutProps> = ({
10
+ title,
11
+ children,
12
+ icon,
13
+ variant = 'primary',
14
+ onClose,
15
+ actions,
16
+ oneLine = false,
17
+ toast = false,
18
+ className,
19
+ ...props
20
+ }) => {
21
+ const { generateCalloutClass, handleClose } = useCallout({
22
+ variant,
23
+ oneLine,
24
+ toast,
25
+ className,
26
+ });
27
+
28
+ // Determine appropriate ARIA attributes based on variant
29
+ const getAriaAttributes = () => {
30
+ const baseAttributes: Record<string, string> = {
31
+ role: 'region',
32
+ };
33
+
34
+ // For toast notifications or alerts, use appropriate role and live region
35
+ if (toast) {
36
+ baseAttributes.role = 'alert';
37
+ baseAttributes['aria-live'] = 'polite';
38
+ } else if (['warning', 'error'].includes(variant)) {
39
+ baseAttributes.role = 'alert';
40
+ baseAttributes['aria-live'] = 'assertive';
41
+ } else if (['info', 'success'].includes(variant)) {
42
+ baseAttributes.role = 'status';
43
+ baseAttributes['aria-live'] = 'polite';
44
+ }
45
+
46
+ return baseAttributes;
47
+ };
48
+
49
+ return (
50
+ <div
51
+ className={generateCalloutClass({ variant, oneLine, toast, className })}
52
+ {...getAriaAttributes()}
53
+ {...props}
54
+ >
55
+ <div className="c-callout__content">
56
+ {icon && <div className="c-callout__icon">{icon}</div>}
57
+ <div className="c-callout__message">
58
+ {title && <div className="c-callout__title">{title}</div>}
59
+ {children && <div className="c-callout__text">{children}</div>}
60
+ </div>
61
+ </div>
62
+
63
+ {actions && <div className="c-callout__actions">{actions}</div>}
64
+
65
+ {onClose && (
66
+ <button className="c-callout__close-btn" onClick={handleClose(onClose)} aria-label="Close">
67
+ <Icon name="X" size="md" />
68
+ </button>
69
+ )}
70
+ </div>
71
+ );
72
+ };
73
+
74
+ Callout.displayName = 'Callout';
75
+
76
+ export type { CalloutProps };
77
+
78
+ export default Callout;
@@ -0,0 +1 @@
1
+ export { Callout } from './Callout';