@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,230 @@
1
+ import React from 'react';
2
+ import { StoryFn, Meta } from '@storybook/react';
3
+ import { River } from './River';
4
+ import type { RiverProps } from './River';
5
+
6
+ export default {
7
+ title: 'Components/River',
8
+ component: River,
9
+ argTypes: {
10
+ center: {
11
+ control: { type: 'boolean' },
12
+ defaultValue: false,
13
+ },
14
+ breakout: {
15
+ control: { type: 'boolean' },
16
+ defaultValue: false,
17
+ },
18
+ reverse: {
19
+ control: { type: 'boolean' },
20
+ defaultValue: false,
21
+ },
22
+ backgroundImageSrc: {
23
+ control: { type: 'text' },
24
+ description: 'Background image source URL',
25
+ },
26
+ showOverlay: {
27
+ control: { type: 'boolean' },
28
+ defaultValue: true,
29
+ description: 'Show background overlay',
30
+ },
31
+ contentWidth: {
32
+ control: { type: 'text' },
33
+ description: 'Custom width for the river content (e.g., "800px", "50%")',
34
+ },
35
+ },
36
+ } as Meta<typeof River>;
37
+
38
+ const Template: StoryFn<typeof River> = args => (
39
+ <div style={{ padding: '0', maxWidth: '100%' }}>
40
+ <River {...args} />
41
+ </div>
42
+ );
43
+
44
+ // Default river (image left, content right)
45
+ export const Default = Template.bind({});
46
+ Default.args = {
47
+ title: 'Streamline Your Workflow',
48
+ text: 'Our platform provides a comprehensive suite of tools to optimize your workflow and increase productivity. With intuitive interfaces and powerful features, you can accomplish more in less time.',
49
+ actions: (
50
+ <a href="#" className="c-btn c-btn--primary">
51
+ Get Started
52
+ </a>
53
+ ),
54
+ imageSrc: 'https://unsplash.it/g/500/300',
55
+ imageAlt: 'Workflow diagram',
56
+ };
57
+
58
+ // Reverse layout (content left, image right)
59
+ export const Reverse = Template.bind({});
60
+ Reverse.args = {
61
+ ...Default.args,
62
+ title: 'Data-Driven Insights',
63
+ text: 'Harness the power of analytics to make informed decisions. Our advanced data visualization tools help you understand trends and identify opportunities for growth.',
64
+ reverse: true,
65
+ };
66
+
67
+ // Center layout (content centered)
68
+ export const Centered = Template.bind({});
69
+ Centered.args = {
70
+ ...Default.args,
71
+ title: 'Award-Winning Support',
72
+ text: 'Our dedicated team of experts is available around the clock to provide assistance and ensure your success. Experience the highest level of customer service.',
73
+ center: true,
74
+ };
75
+
76
+ // Breakout layout (full width)
77
+ export const Breakout = Template.bind({});
78
+ Breakout.args = {
79
+ ...Default.args,
80
+ title: 'Scale With Confidence',
81
+ text: "Our robust infrastructure adapts to your needs, whether you're a small business or a global enterprise. Grow your operations without worrying about technical limitations.",
82
+ breakout: true,
83
+ };
84
+
85
+ // Multi-paragraph text
86
+ export const MultiParagraph = Template.bind({});
87
+ MultiParagraph.args = {
88
+ ...Default.args,
89
+ title: 'Revolutionize Your Approach',
90
+ text: [
91
+ 'Our innovative solutions are designed to transform how you work, making complex tasks simple and intuitive.',
92
+ "By focusing on user experience and practical functionality, we've created tools that adapt to your workflow rather than forcing you to adapt to them.",
93
+ 'Experience the difference that thoughtful design and powerful technology can make in your daily operations.',
94
+ ],
95
+ actions: (
96
+ <a href="#" className="c-btn c-btn--primary">
97
+ Learn More
98
+ </a>
99
+ ),
100
+ };
101
+
102
+ // Content columns
103
+ export const ContentColumns = Template.bind({});
104
+ ContentColumns.args = {
105
+ contentColumns: [
106
+ {
107
+ type: 'title',
108
+ content: <h2 className="c-river__title">Flexible Content Layout</h2>,
109
+ },
110
+ {
111
+ type: 'text',
112
+ content: (
113
+ <div>
114
+ <p className="c-river__text">
115
+ Use content columns to create custom layouts with different types of content. This
116
+ approach gives you more control over the structure and presentation of your information.
117
+ </p>
118
+ <p className="c-river__text">
119
+ Perfect for featuring important statistics, quotes, or highlighting key information
120
+ alongside your main content.
121
+ </p>
122
+ </div>
123
+ ),
124
+ },
125
+ ],
126
+ actions: (
127
+ <a href="#" className="c-btn c-btn--primary">
128
+ Explore Options
129
+ </a>
130
+ ),
131
+ imageSrc: 'https://unsplash.it/g/500/300',
132
+ };
133
+
134
+ // Custom title styling
135
+ export const CustomTitle = Template.bind({});
136
+ CustomTitle.args = {
137
+ title: <h1 className="c-river__title u-text-gradient">Custom Title with Gradient</h1>,
138
+ text: 'The sun had set, leaving the sky painted in shades of orange and pink as the stars twinkled above. The air was filled with the sound of crickets and the rustle of leaves in the gentle breeze.',
139
+ actions: (
140
+ <a href="#" className="c-btn u-pl-0">
141
+ Text Link <i className="icon-lux-circle"></i>
142
+ </a>
143
+ ),
144
+ imageSrc: 'https://unsplash.it/g/712/196',
145
+ imageAlt: 'Image',
146
+ };
147
+
148
+ // With background image
149
+ export const WithBackgroundAndContent = Template.bind({});
150
+ WithBackgroundAndContent.args = {
151
+ title: 'Build Faster Applications',
152
+ text: 'Our component library is designed for developers who want to create beautiful interfaces with minimal effort. With built-in TypeScript support and comprehensive documentation, you can focus on building features, not fighting with UI.',
153
+ actions: (
154
+ <a href="#" className="c-btn c-btn--light">
155
+ View Documentation
156
+ </a>
157
+ ),
158
+ imageSrc: 'https://unsplash.it/g/500/300',
159
+ backgroundImageSrc: 'https://unsplash.it/g/1920/600',
160
+ showOverlay: true,
161
+ };
162
+
163
+ // With custom content width
164
+ export const CustomContentWidth = Template.bind({});
165
+ CustomContentWidth.args = {
166
+ title: 'Powerful Developer Experience',
167
+ text: 'Our River component gives you complete control over your content layout. Customize content width, background images, and layouts to create engaging sections that convert visitors into customers.',
168
+ actions: (
169
+ <a href="#" className="c-btn c-btn--primary">
170
+ Explore API
171
+ </a>
172
+ ),
173
+ imageSrc: 'https://unsplash.it/g/500/300',
174
+ contentWidth: '800px',
175
+ };
176
+
177
+ // Multiple Rivers layout example
178
+ const MultipeRiversExample: React.FC = () => {
179
+ return (
180
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '40px' }}>
181
+ <River
182
+ title="Component-Driven Development"
183
+ text="Build your UI from the ground up using our composable components. Each component is designed to work seamlessly with the rest of the library."
184
+ actions={
185
+ <a href="#" className="c-btn c-btn--primary">
186
+ Get Started
187
+ </a>
188
+ }
189
+ imageSrc="https://unsplash.it/g/712/196"
190
+ />
191
+
192
+ <River
193
+ title="TypeScript First"
194
+ text="Every component includes full TypeScript definitions, giving you complete type safety and excellent IDE integration."
195
+ actions={
196
+ <a href="#" className="c-btn c-btn--primary">
197
+ Read Docs
198
+ </a>
199
+ }
200
+ imageSrc="https://unsplash.it/g/712/196"
201
+ reverse={true}
202
+ />
203
+
204
+ <River
205
+ title="Flexible Layouts"
206
+ text="Create engaging content sections with various layout options. Center, reverse, or breakout - all with simple props."
207
+ actions={
208
+ <a href="#" className="c-btn c-btn--primary">
209
+ See Examples
210
+ </a>
211
+ }
212
+ imageSrc="https://unsplash.it/g/1920/320"
213
+ center={true}
214
+ />
215
+
216
+ <River
217
+ title="Pixel-Perfect Design"
218
+ text="Our components follow a consistent design system, ensuring your application looks professional across all pages and states."
219
+ actions={
220
+ <a href="#" className="c-btn c-btn--light">
221
+ View Design System
222
+ </a>
223
+ }
224
+ backgroundImageSrc="https://unsplash.it/g/1920/600"
225
+ />
226
+ </div>
227
+ );
228
+ };
229
+
230
+ export const MultipleRivers: StoryFn<typeof River> = () => <MultipeRiversExample />;
@@ -0,0 +1,134 @@
1
+ import React from 'react';
2
+ import { RIVER } from '../../lib/constants/components';
3
+ import { useRiver, RiverProps } from '../../lib/composables/useRiver';
4
+
5
+ /**
6
+ * River component for displaying content with image sections
7
+ */
8
+ export const River: React.FC<RiverProps> = ({
9
+ title,
10
+ text,
11
+ actions,
12
+ imageSrc,
13
+ imageAlt = 'Image',
14
+ center = false,
15
+ breakout = false,
16
+ reverse = false,
17
+ contentColumns,
18
+ backgroundImageSrc,
19
+ showOverlay = true,
20
+ contentWidth,
21
+ className = '',
22
+ }) => {
23
+ const {
24
+ generateRiverClassNames,
25
+ generateContentClass,
26
+ generateVisualClass,
27
+ hasBackgroundImage,
28
+ hasForegroundImage,
29
+ textContent,
30
+ } = useRiver({
31
+ title,
32
+ text,
33
+ imageSrc,
34
+ imageAlt,
35
+ center,
36
+ breakout,
37
+ reverse,
38
+ backgroundImageSrc,
39
+ showOverlay,
40
+ contentWidth,
41
+ });
42
+
43
+ // Create custom style for river element with content width if provided
44
+ const riverStyle: React.CSSProperties | undefined = contentWidth
45
+ ? ({
46
+ [RIVER.ATTRIBUTES.CONTENT_WIDTH]: contentWidth,
47
+ } as React.CSSProperties)
48
+ : undefined;
49
+
50
+ const renderBackground = () => {
51
+ if (!hasBackgroundImage) return null;
52
+
53
+ return (
54
+ <div className={RIVER.SELECTORS.BG.replace('.', '')}>
55
+ <img
56
+ src={backgroundImageSrc}
57
+ alt="Background"
58
+ className={RIVER.SELECTORS.BG_IMAGE.replace('.', '')}
59
+ />
60
+ {showOverlay && <div className={RIVER.SELECTORS.OVERLAY.replace('.', '')}></div>}
61
+ </div>
62
+ );
63
+ };
64
+
65
+ const renderContent = () => (
66
+ <div className={generateContentClass()}>
67
+ {title && <h2 className={RIVER.SELECTORS.TITLE.replace('.', '')}>{title}</h2>}
68
+ {textContent.map((paragraph, index) => (
69
+ <p key={index} className={RIVER.SELECTORS.TEXT.replace('.', '')}>
70
+ {paragraph}
71
+ </p>
72
+ ))}
73
+ {actions && <div className={RIVER.SELECTORS.ACTIONS.replace('.', '')}>{actions}</div>}
74
+ </div>
75
+ );
76
+
77
+ const renderImage = () => {
78
+ if (!hasForegroundImage) return null;
79
+
80
+ return (
81
+ <div className={generateVisualClass()}>
82
+ <div className={RIVER.SELECTORS.IMAGE_WRAPPER.replace('.', '')}>
83
+ <img src={imageSrc} alt={imageAlt} className={RIVER.SELECTORS.IMAGE.replace('.', '')} />
84
+ </div>
85
+ </div>
86
+ );
87
+ };
88
+
89
+ // Render with content columns (advanced layout)
90
+ if (contentColumns && contentColumns.length > 0) {
91
+ return (
92
+ <div className={generateRiverClassNames(className)} style={riverStyle}>
93
+ {renderBackground()}
94
+ <div className={`${RIVER.SELECTORS.CONTAINER.replace('.', '')} o-container`}>
95
+ <div className={RIVER.SELECTORS.ROW.replace('.', '')}>
96
+ {!reverse && renderImage()}
97
+ <div className={generateContentClass()}>
98
+ {contentColumns.map((column, index) => (
99
+ <div
100
+ key={index}
101
+ className={`${RIVER.SELECTORS.CONTENT_COL.replace('.', '')} ${RIVER.SELECTORS[`CONTENT_COL_${column.type.toUpperCase()}` as keyof typeof RIVER.SELECTORS].replace('.', '')}`}
102
+ >
103
+ {column.content}
104
+ </div>
105
+ ))}
106
+ {actions && <div className={RIVER.SELECTORS.ACTIONS.replace('.', '')}>{actions}</div>}
107
+ </div>
108
+ {reverse && renderImage()}
109
+ </div>
110
+ </div>
111
+ </div>
112
+ );
113
+ }
114
+
115
+ // Render with standard layout
116
+ return (
117
+ <div className={generateRiverClassNames(className)} style={riverStyle}>
118
+ {renderBackground()}
119
+ <div className={`${RIVER.SELECTORS.CONTAINER.replace('.', '')} o-container`}>
120
+ <div className={RIVER.SELECTORS.ROW.replace('.', '')}>
121
+ {!reverse && renderImage()}
122
+ {renderContent()}
123
+ {reverse && renderImage()}
124
+ </div>
125
+ </div>
126
+ </div>
127
+ );
128
+ };
129
+
130
+ export type { RiverProps };
131
+
132
+ River.displayName = 'River';
133
+
134
+ export default River;
@@ -0,0 +1,2 @@
1
+ export { River } from './River';
2
+ export type { RiverProps } from './River';
@@ -0,0 +1,143 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Button } from '../Button';
3
+ import { SectionIntro } from './SectionIntro';
4
+
5
+ const meta: Meta<typeof SectionIntro> = {
6
+ title: 'Components/SectionIntro',
7
+ component: SectionIntro,
8
+ parameters: {
9
+ layout: 'padded',
10
+ },
11
+ argTypes: {
12
+ title: { control: 'text' },
13
+ label: { control: 'text' },
14
+ text: { control: 'text' },
15
+ alignment: {
16
+ control: { type: 'select' },
17
+ options: ['left', 'center', 'right'],
18
+ },
19
+ size: {
20
+ control: { type: 'select' },
21
+ options: ['sm', 'md', 'lg'],
22
+ },
23
+ skeleton: { control: 'boolean' },
24
+ showOverlay: { control: 'boolean' },
25
+ actions: { control: false },
26
+ backgroundImageSrc: { control: 'text' },
27
+ imageSrc: { control: 'text' },
28
+ imageAlt: { control: 'text' },
29
+ },
30
+ };
31
+
32
+ export default meta;
33
+ type Story = StoryObj<typeof SectionIntro>;
34
+
35
+ // Default SectionIntro
36
+ export const Default: Story = {
37
+ args: {
38
+ title: 'Our Mission',
39
+ label: 'About Us',
40
+ text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
41
+ alignment: 'left',
42
+ size: 'md',
43
+ },
44
+ };
45
+
46
+ // Left-aligned with actions
47
+ export const WithActions: Story = {
48
+ args: {
49
+ ...Default.args,
50
+ actions: (
51
+ <div className="u-flex u-gap-md">
52
+ <Button label="Learn More" />
53
+ <Button label="Contact Us" variant="secondary" />
54
+ </div>
55
+ ),
56
+ },
57
+ };
58
+
59
+ // Center-aligned
60
+ export const Centered: Story = {
61
+ args: {
62
+ ...Default.args,
63
+ alignment: 'center',
64
+ text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
65
+ },
66
+ };
67
+
68
+ // Right-aligned
69
+ export const RightAligned: Story = {
70
+ args: {
71
+ ...Default.args,
72
+ alignment: 'right',
73
+ text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
74
+ },
75
+ };
76
+
77
+ // With background image
78
+ export const WithBackground: Story = {
79
+ args: {
80
+ ...Default.args,
81
+ backgroundImageSrc:
82
+ 'https://images.unsplash.com/photo-1557682250-33bd709cbe85?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
83
+ showOverlay: true,
84
+ alignment: 'center',
85
+ title: 'Discover Our Vision',
86
+ label: 'About Us',
87
+ text: 'We are dedicated to creating beautiful, functional, and accessible components that help developers build amazing websites and applications.',
88
+ },
89
+ };
90
+
91
+ // With image
92
+ export const WithImage: Story = {
93
+ args: {
94
+ ...Default.args,
95
+ imageSrc:
96
+ 'https://images.unsplash.com/photo-1581291518633-83b4ebd1d83e?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
97
+ imageAlt: 'Team collaboration',
98
+ },
99
+ };
100
+
101
+ // Small size
102
+ export const Small: Story = {
103
+ args: {
104
+ ...Default.args,
105
+ size: 'sm',
106
+ },
107
+ };
108
+
109
+ // Large size
110
+ export const Large: Story = {
111
+ args: {
112
+ ...Default.args,
113
+ size: 'lg',
114
+ },
115
+ };
116
+
117
+ // Skeleton loading state
118
+ export const Skeleton: Story = {
119
+ args: {
120
+ ...Default.args,
121
+ skeleton: true,
122
+ },
123
+ };
124
+
125
+ // Full example with all features
126
+ export const FullExample: Story = {
127
+ args: {
128
+ title: 'Building the Future Together',
129
+ label: 'Our Vision',
130
+ text: 'We believe in creating technology that empowers people to achieve more. Our components are designed with accessibility, performance, and developer experience in mind.',
131
+ alignment: 'center',
132
+ size: 'lg',
133
+ backgroundImageSrc:
134
+ 'https://images.unsplash.com/photo-1579546929518-9e396f3cc809?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80',
135
+ showOverlay: true,
136
+ actions: (
137
+ <div className="u-flex u-gap-md u-justify-center">
138
+ <Button label="Get Started" size="lg" />
139
+ <Button label="Learn More" size="lg" variant="secondary" />
140
+ </div>
141
+ ),
142
+ },
143
+ };
@@ -0,0 +1,184 @@
1
+ import React, { ReactNode, useEffect, useRef } from 'react';
2
+ import { SECTION_INTRO } from '../../lib/constants/components';
3
+
4
+ export interface SectionIntroProps {
5
+ /**
6
+ * The section title
7
+ */
8
+ title: ReactNode;
9
+
10
+ /**
11
+ * Optional subtitle or overline text
12
+ */
13
+ /**
14
+ * Optional label text (equivalent to subtitle in the UI)
15
+ */
16
+ label?: ReactNode;
17
+
18
+ /**
19
+ * Optional description text
20
+ */
21
+ /**
22
+ * Optional text content
23
+ */
24
+ text?: ReactNode;
25
+
26
+ /**
27
+ * Optional call to action elements
28
+ */
29
+ actions?: ReactNode;
30
+
31
+ /**
32
+ * Alignment of the content
33
+ */
34
+ alignment?: 'left' | 'center' | 'right';
35
+
36
+ /**
37
+ * Optional background image URL
38
+ */
39
+ backgroundImageSrc?: string;
40
+
41
+ /**
42
+ * Whether to show an overlay on the background
43
+ */
44
+ showOverlay?: boolean;
45
+
46
+ /**
47
+ * Optional foreground image URL
48
+ */
49
+ imageSrc?: string;
50
+
51
+ /**
52
+ * Alternative text for the image
53
+ */
54
+ imageAlt?: string;
55
+
56
+ /**
57
+ * Size variant
58
+ */
59
+ size?: 'sm' | 'md' | 'lg';
60
+
61
+ /**
62
+ * Whether to show a skeleton loading state
63
+ */
64
+ skeleton?: boolean;
65
+
66
+ /**
67
+ * Additional CSS class
68
+ */
69
+ className?: string;
70
+ }
71
+
72
+ /**
73
+ * SectionIntro component for introducing content sections with titles, descriptions, and optional imagery
74
+ */
75
+ export const SectionIntro: React.FC<SectionIntroProps> = ({
76
+ title,
77
+ label,
78
+ text,
79
+ actions,
80
+ alignment = 'left',
81
+ backgroundImageSrc,
82
+ showOverlay = false,
83
+ imageSrc,
84
+ imageAlt = 'Section image',
85
+ size = 'md',
86
+ skeleton = false,
87
+ className = '',
88
+ }) => {
89
+ const sectionIntroRef = useRef<HTMLDivElement>(null);
90
+ const sectionIntroInstance = useRef<any>(null);
91
+
92
+ useEffect(() => {
93
+ // Only run on client-side
94
+ if (typeof window === 'undefined' || !sectionIntroRef.current) return undefined;
95
+
96
+ // Cleanup on unmount
97
+ return () => {
98
+ if (sectionIntroInstance.current) {
99
+ sectionIntroInstance.current.destroy();
100
+ }
101
+ };
102
+ }, [alignment, backgroundImageSrc, showOverlay, size, skeleton]);
103
+
104
+ // Determine CSS classes
105
+ const sectionIntroClasses = [
106
+ 'c-sectionintro',
107
+ alignment === 'center' ? SECTION_INTRO.CLASSES.CENTER : '',
108
+ size === 'sm' ? SECTION_INTRO.CLASSES.SMALL : '',
109
+ size === 'lg' ? SECTION_INTRO.CLASSES.LARGE : '',
110
+ backgroundImageSrc ? 'c-sectionintro--has-bg' : '',
111
+ className,
112
+ ]
113
+ .filter(Boolean)
114
+ .join(' ');
115
+
116
+ // Render skeleton version
117
+ if (skeleton) {
118
+ return (
119
+ <div className={sectionIntroClasses} ref={sectionIntroRef}>
120
+ <div className="c-sectionintro__container">
121
+ {label && (
122
+ <div className="c-sectionintro__label">
123
+ <span className="c-skeleton u-w-25"></span>
124
+ </div>
125
+ )}
126
+ <div className="c-sectionintro__title">
127
+ <span className="c-skeleton"></span>
128
+ </div>
129
+ {text && (
130
+ <div className="c-sectionintro__text">
131
+ <span className="c-skeleton"></span>
132
+ <span className="c-skeleton"></span>
133
+ <span className="c-skeleton u-w-75"></span>
134
+ </div>
135
+ )}
136
+ {actions && (
137
+ <div className="c-sectionintro__actions">
138
+ <span className="c-skeleton u-w-25"></span>
139
+ </div>
140
+ )}
141
+ {imageSrc && (
142
+ <div className="c-sectionintro__image-wrapper">
143
+ <div className="c-sectionintro__image c-skeleton"></div>
144
+ </div>
145
+ )}
146
+ </div>
147
+ </div>
148
+ );
149
+ }
150
+
151
+ // Render background if provided
152
+ const renderBackground = () => {
153
+ if (!backgroundImageSrc) return null;
154
+
155
+ return (
156
+ <div className="c-sectionintro__bg">
157
+ <img src={backgroundImageSrc} alt="Background" className="c-sectionintro__bg-image" />
158
+ {showOverlay && <div className="c-sectionintro__overlay"></div>}
159
+ </div>
160
+ );
161
+ };
162
+
163
+ // Render normal version
164
+ return (
165
+ <div className={sectionIntroClasses} ref={sectionIntroRef}>
166
+ {renderBackground()}
167
+ <div className="c-sectionintro__container o-container">
168
+ {label && <div className="c-sectionintro__label">{label}</div>}
169
+ <h2 className="c-sectionintro__title">{title}</h2>
170
+ {text && <div className="c-sectionintro__text">{text}</div>}
171
+ {actions && <div className="c-sectionintro__actions">{actions}</div>}
172
+ {imageSrc && (
173
+ <div className="c-sectionintro__image-wrapper">
174
+ <img src={imageSrc} alt={imageAlt} className="c-sectionintro__image" />
175
+ </div>
176
+ )}
177
+ </div>
178
+ </div>
179
+ );
180
+ };
181
+
182
+ SectionIntro.displayName = 'SectionIntro';
183
+
184
+ export default SectionIntro;
@@ -0,0 +1,3 @@
1
+ export { SectionIntro } from './SectionIntro';
2
+ export type { SectionIntroProps } from './SectionIntro';
3
+ export { default } from './SectionIntro';