@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,408 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Grid } from '../../layouts/Grid/Grid';
3
+ import GridCol from '../../layouts/Grid/GridCol';
4
+ import { Button } from '../Button/Button';
5
+ import { Card } from '../Card/Card';
6
+ import { Block } from './Block';
7
+
8
+ const meta: Meta<typeof Block> = {
9
+ title: 'Components/Block',
10
+ component: Block,
11
+ parameters: {
12
+ layout: 'fullscreen',
13
+ docs: {
14
+ description: {
15
+ component: `
16
+ The Block component is a flexible layout container designed for creating consistent section layouts.
17
+ It provides standardized spacing, background variants, and container behavior for organizing content
18
+ into distinct sections or blocks.
19
+
20
+ ## Key Features
21
+ - **Flexible spacing**: Multiple spacing sizes (xs, sm, md, lg, xl, none)
22
+ - **Background variants**: Transparent, subtle, muted, primary, secondary, accent
23
+ - **Container integration**: Built-in Container support for responsive layouts
24
+ - **Semantic HTML**: Configurable as section, div, article, aside, or main
25
+ - **Full-width support**: Option for edge-to-edge content
26
+
27
+ ## Usage Guidelines
28
+ Use Block components to:
29
+ - Create consistent section spacing across pages
30
+ - Group related content with appropriate backgrounds
31
+ - Build hero sections, content areas, and feature blocks
32
+ - Maintain visual hierarchy and rhythm in layouts
33
+ `,
34
+ },
35
+ },
36
+ },
37
+ argTypes: {
38
+ as: {
39
+ control: 'select',
40
+ options: ['section', 'div', 'article', 'aside', 'main'],
41
+ description: 'The HTML element to render as',
42
+ },
43
+ spacing: {
44
+ control: 'select',
45
+ options: ['xs', 'sm', 'md', 'lg', 'xl', 'none'],
46
+ description: 'Vertical padding size',
47
+ },
48
+ fullWidth: {
49
+ control: 'boolean',
50
+ description: 'Enable full-width content',
51
+ },
52
+ children: {
53
+ control: false,
54
+ description: 'Content to render within the block',
55
+ },
56
+ },
57
+ };
58
+
59
+ export default meta;
60
+ type Story = StoryObj<typeof meta>;
61
+
62
+ // Basic usage
63
+ export const Default: Story = {
64
+ args: {
65
+ children: (
66
+ <div>
67
+ <h2>Default Block Section</h2>
68
+ <p>
69
+ This is a basic block component with default settings (medium spacing, transparent
70
+ background).
71
+ </p>
72
+ <p>
73
+ Use Block components to create consistent section layouts throughout your application.
74
+ </p>
75
+ </div>
76
+ ),
77
+ },
78
+ };
79
+
80
+ // Spacing variants
81
+ export const SpacingVariants: Story = {
82
+ render: () => (
83
+ <div>
84
+ <Block background="primary" spacing="xs">
85
+ <h3>Extra Small Spacing</h3>
86
+ <p>This block has minimal vertical padding (xs).</p>
87
+ </Block>
88
+
89
+ <Block background="secondary" spacing="sm">
90
+ <h3>Small Spacing</h3>
91
+ <p>This block has small vertical padding (sm).</p>
92
+ </Block>
93
+
94
+ <Block background="tertiary" spacing="md">
95
+ <h3>Medium Spacing</h3>
96
+ <p>This block has medium vertical padding (md) - the default.</p>
97
+ </Block>
98
+
99
+ <Block background="brand" spacing="lg">
100
+ <h3>Large Spacing</h3>
101
+ <p>This block has large vertical padding (lg).</p>
102
+ </Block>
103
+
104
+ <Block background="success" spacing="xl">
105
+ <h3>Extra Large Spacing</h3>
106
+ <p>This block has extra large vertical padding (xl).</p>
107
+ </Block>
108
+ </div>
109
+ ),
110
+ };
111
+
112
+ // Full-width hero section
113
+ export const HeroSection: Story = {
114
+ render: () => (
115
+ <Block background="success" spacing="xl" fullWidth>
116
+ <div className="u-text-center">
117
+ <h1>Welcome to Our Platform</h1>
118
+ <p>Experience the power of modern web development with our comprehensive design system.</p>
119
+ <Button size="lg" variant="secondary">
120
+ Get Started
121
+ </Button>
122
+ </div>
123
+ </Block>
124
+ ),
125
+ };
126
+
127
+ // Content grid layout
128
+ export const ContentGrid: Story = {
129
+ render: () => (
130
+ <Block background="success" spacing="lg">
131
+ <h2 style={{ textAlign: 'center', marginBottom: '3rem' }}>Our Features</h2>
132
+ <Grid>
133
+ <GridCol xs={12} md={6} lg={4}>
134
+ <Card>
135
+ <h3>Responsive Design</h3>
136
+ <p>Fully responsive components that work seamlessly across all devices.</p>
137
+ </Card>
138
+ </GridCol>
139
+ <GridCol xs={12} md={6} lg={4}>
140
+ <Card>
141
+ <h3>TypeScript Support</h3>
142
+ <p>Built with TypeScript for enhanced developer experience and type safety.</p>
143
+ </Card>
144
+ </GridCol>
145
+ <GridCol xs={12} md={6} lg={4}>
146
+ <Card>
147
+ <h3>Accessibility First</h3>
148
+ <p>WCAG 2.1 AA compliant components for inclusive user experiences.</p>
149
+ </Card>
150
+ </GridCol>
151
+ </Grid>
152
+ </Block>
153
+ ),
154
+ };
155
+
156
+ // Article layout
157
+ export const ArticleLayout: Story = {
158
+ render: () => (
159
+ <div>
160
+ <Block as="article" background="success" spacing="lg" container={{ type: 'md' }}>
161
+ <header>
162
+ <h1>Building Modern Web Applications</h1>
163
+ <p>Published on March 15, 2024 • 5 min read</p>
164
+ </header>
165
+
166
+ <p>
167
+ In today's fast-paced digital landscape, building modern web applications requires a
168
+ thoughtful approach to design systems and component architecture. This article explores
169
+ best practices for creating scalable, maintainable, and user-friendly web experiences.
170
+ </p>
171
+
172
+ <h2>Key Principles</h2>
173
+ <p>
174
+ Modern web development is built on several key principles that ensure both developer
175
+ productivity and user satisfaction. These include responsive design, accessibility,
176
+ performance optimization, and maintainable code architecture.
177
+ </p>
178
+
179
+ <p>
180
+ By following established design systems like Atomix, development teams can focus on
181
+ delivering value rather than reinventing common patterns and components.
182
+ </p>
183
+ </Block>
184
+
185
+ <Block spacing="md" container={{ type: 'sm' }} background="secondary">
186
+ <h3>Ready to get started?</h3>
187
+ <p>Join thousands of developers building with our design system.</p>
188
+ <Button variant="primary">Start Building</Button>
189
+ </Block>
190
+ </div>
191
+ ),
192
+ };
193
+
194
+ // Stacked sections
195
+ export const StackedSections: Story = {
196
+ render: () => (
197
+ <div>
198
+ <Block background="brand" spacing="xl" fullWidth>
199
+ <h1 className="u-text-center">Page Header</h1>
200
+ </Block>
201
+
202
+ <Block background="success" spacing="lg">
203
+ <h2>Main Content</h2>
204
+ <p>This section contains the primary content of the page.</p>
205
+ </Block>
206
+
207
+ <Block background="warning" spacing="lg">
208
+ <h2>Secondary Content</h2>
209
+ <p>This section provides additional information or features.</p>
210
+ </Block>
211
+
212
+ <Block background="error" spacing="lg">
213
+ <h2>Related Content</h2>
214
+ <p>This section offers related articles or resources.</p>
215
+ </Block>
216
+
217
+ <Block background="info" spacing="xl" fullWidth>
218
+ <h2 className="u-text-center">Footer Section</h2>
219
+ </Block>
220
+ </div>
221
+ ),
222
+ };
223
+
224
+ // Playground for interactive testing
225
+ export const Playground: Story = {
226
+ args: {
227
+ as: 'section',
228
+ spacing: 'md',
229
+ background: 'transparent',
230
+ fullWidth: false,
231
+ children: (
232
+ <div>
233
+ <h2>Interactive Block</h2>
234
+ <p>Adjust the controls above to see how the Block component responds to different props.</p>
235
+ <p>This playground allows you to experiment with all available options.</p>
236
+ </div>
237
+ ),
238
+ },
239
+ };
240
+
241
+ // Background variants showcase
242
+ export const BackgroundVariants: Story = {
243
+ render: () => (
244
+ <div>
245
+ <Block background="primary" spacing="md">
246
+ <h3>Primary Background</h3>
247
+ <p>This block uses the primary background color from the design system.</p>
248
+ </Block>
249
+
250
+ <Block background="secondary" spacing="md">
251
+ <h3>Secondary Background</h3>
252
+ <p>This block uses the secondary background color from the design system.</p>
253
+ </Block>
254
+
255
+ <Block background="tertiary" spacing="md">
256
+ <h3>Tertiary Background</h3>
257
+ <p>This block uses the tertiary background color from the design system.</p>
258
+ </Block>
259
+
260
+ <Block background="invert" spacing="md">
261
+ <h3 className="u-text-error">Invert Background</h3>
262
+ <p className="u-text-error">
263
+ This block uses the invert background color from the design system.
264
+ </p>
265
+ </Block>
266
+
267
+ <Block background="brand" spacing="md">
268
+ <h3>Brand Background</h3>
269
+ <p>This block uses the brand background color from the design system.</p>
270
+ </Block>
271
+
272
+ <Block background="error" spacing="md">
273
+ <h3>Error Background</h3>
274
+ <p>This block uses the error background color from the design system.</p>
275
+ </Block>
276
+
277
+ <Block background="success" spacing="md">
278
+ <h3>Success Background</h3>
279
+ <p>This block uses the success background color from the design system.</p>
280
+ </Block>
281
+
282
+ <Block background="warning" spacing="md">
283
+ <h3>Warning Background</h3>
284
+ <p>This block uses the warning background color from the design system.</p>
285
+ </Block>
286
+
287
+ <Block background="info" spacing="md">
288
+ <h3>Info Background</h3>
289
+ <p>This block uses the info background color from the design system.</p>
290
+ </Block>
291
+
292
+ <Block background="light" spacing="md">
293
+ <h3>Light Background</h3>
294
+ <p>This block uses the light background color from the design system.</p>
295
+ </Block>
296
+ </div>
297
+ ),
298
+ };
299
+
300
+ // Content preview with various components and utility classes
301
+ export const ContentPreview: Story = {
302
+ render: () => (
303
+ <div>
304
+ <Block background="brand" spacing="lg" fullWidth>
305
+ <div className="u-text-center">
306
+ <h1 className=" u-mb-2">Welcome to Atomix Design System</h1>
307
+ <p className="u-mb-4" style={{ maxWidth: '600px', margin: '0 auto 2rem' }}>
308
+ A comprehensive design system with reusable components and consistent design patterns
309
+ </p>
310
+ <div className="u-mb-4">
311
+ <Button size="lg" variant="secondary" className="u-me-2">
312
+ Get Started
313
+ </Button>
314
+ <Button size="lg" variant="invert" className="u-ms-2">
315
+ Learn More
316
+ </Button>
317
+ </div>
318
+ </div>
319
+ </Block>
320
+
321
+ <Block spacing="lg">
322
+ <h2 className="u-text-center u-mb-4">Our Core Components</h2>
323
+ <Grid>
324
+ <GridCol xs={12} md={6} lg={4}>
325
+ <Card
326
+ title="Buttons"
327
+ text="Multiple variants and sizes for all use cases"
328
+ actions={
329
+ <div>
330
+ <Button variant="primary" size="sm" className="u-me-1">
331
+ Primary
332
+ </Button>
333
+ <Button variant="secondary" size="sm">
334
+ Secondary
335
+ </Button>
336
+ </div>
337
+ }
338
+ />
339
+ </GridCol>
340
+ <GridCol xs={12} md={6} lg={4}>
341
+ <Card
342
+ title="Cards"
343
+ text="Flexible content containers with multiple options"
344
+ actions={<Button variant="primary">View Details</Button>}
345
+ />
346
+ </GridCol>
347
+ <GridCol xs={12} md={6} lg={4}>
348
+ <Card
349
+ title="Blocks"
350
+ text="Layout containers with consistent spacing and backgrounds"
351
+ actions={<Button variant="primary">Learn More</Button>}
352
+ />
353
+ </GridCol>
354
+ </Grid>
355
+ </Block>
356
+
357
+ <Block background="secondary" spacing="lg">
358
+ <div className="u-text-center u-mb-4">
359
+ <h2>Design System Benefits</h2>
360
+ <p className="u-mb-0">Built with developers and designers in mind</p>
361
+ </div>
362
+ <Grid>
363
+ <GridCol xs={12} md={6} lg={3}>
364
+ <div className="u-text-center u-p-3">
365
+ <h3 className="u-fs-h4">Consistency</h3>
366
+ <p className="u-mb-0">Unified design language across all products</p>
367
+ </div>
368
+ </GridCol>
369
+ <GridCol xs={12} md={6} lg={3}>
370
+ <div className="u-text-center u-p-3">
371
+ <h3 className="u-fs-h4">Accessibility</h3>
372
+ <p className="u-mb-0">WCAG 2.1 AA compliant components</p>
373
+ </div>
374
+ </GridCol>
375
+ <GridCol xs={12} md={6} lg={3}>
376
+ <div className="u-text-center u-p-3">
377
+ <h3 className="u-fs-h4">Responsive</h3>
378
+ <p className="u-mb-0">Mobile-first approach for all devices</p>
379
+ </div>
380
+ </GridCol>
381
+ <GridCol xs={12} md={6} lg={3}>
382
+ <div className="u-text-center u-p-3">
383
+ <h3 className="u-fs-h4">Customizable</h3>
384
+ <p className="u-mb-0">Easily extend and modify components</p>
385
+ </div>
386
+ </GridCol>
387
+ </Grid>
388
+ </Block>
389
+
390
+ <Block spacing="xl">
391
+ <div className="u-d-flex u-flex-column u-align-items-center u-text-center">
392
+ <h2 className="u-mb-3">Ready to Get Started?</h2>
393
+ <p className="u-mb-4" style={{ maxWidth: '600px' }}>
394
+ Join thousands of developers and designers building with Atomix Design System
395
+ </p>
396
+ <div>
397
+ <Button size="lg" variant="primary" className="u-me-2">
398
+ Documentation
399
+ </Button>
400
+ <Button size="lg" variant="secondary" className="u-ms-2">
401
+ Examples
402
+ </Button>
403
+ </div>
404
+ </div>
405
+ </Block>
406
+ </div>
407
+ ),
408
+ };
@@ -0,0 +1,137 @@
1
+ import React, { forwardRef, HTMLAttributes, ReactNode } from 'react';
2
+ import { Container, ContainerProps } from '../../layouts/Grid/Container';
3
+ import { BLOCK } from '../../lib/constants/components';
4
+ import { useBlock } from '../../lib/composables/useBlock';
5
+
6
+ export interface BlockProps extends HTMLAttributes<HTMLElement> {
7
+ /**
8
+ * The content to be rendered within the block
9
+ */
10
+ children: ReactNode;
11
+ /**
12
+ * The HTML element to render as
13
+ * @default 'section'
14
+ */
15
+ as?: 'section' | 'div' | 'article' | 'aside' | 'main';
16
+ /**
17
+ * Spacing size for vertical padding
18
+ * @default 'md'
19
+ */
20
+ spacing?: (typeof BLOCK.SPACING.SIZES)[number];
21
+ /**
22
+ * Container configuration
23
+ */
24
+ container?: {
25
+ /**
26
+ * Container type for content width
27
+ * @default undefined
28
+ */
29
+ type?: ContainerProps['type'];
30
+ /**
31
+ * Additional container classes
32
+ */
33
+ className?: string;
34
+ };
35
+ /**
36
+ * Whether to enable full-width content
37
+ * @default false
38
+ */
39
+ fullWidth?: boolean;
40
+ /**
41
+ * Additional CSS class names
42
+ */
43
+ className?: string;
44
+ /**
45
+ * Custom styles object
46
+ */
47
+ style?: React.CSSProperties;
48
+ /**
49
+ * Background color variant
50
+ */
51
+ background?:
52
+ | 'primary'
53
+ | 'secondary'
54
+ | 'tertiary'
55
+ | 'invert'
56
+ | 'brand'
57
+ | 'error'
58
+ | 'success'
59
+ | 'warning'
60
+ | 'info'
61
+ | 'light';
62
+ }
63
+
64
+ /**
65
+ * Block component for creating structured section layouts.
66
+ * Provides consistent spacing, backgrounds, and container behavior for content sections.
67
+ *
68
+ * @example
69
+ * ```tsx
70
+ * // Basic usage
71
+ * <Block>
72
+ * <h2>Section Title</h2>
73
+ * <p>Section content goes here...</p>
74
+ * </Block>
75
+ *
76
+ * // With custom spacing and background
77
+ * <Block spacing="lg" background="subtle">
78
+ * <h2>Featured Section</h2>
79
+ * <p>This section has extra padding and a subtle background.</p>
80
+ * </Block>
81
+ *
82
+ * // Full-width with custom container
83
+ * <Block fullWidth background="primary">
84
+ * <Container type="lg">
85
+ * <h2>Hero Section</h2>
86
+ * <p>Full-width section with centered content.</p>
87
+ * </Container>
88
+ * </Block>
89
+ *
90
+ * // As article element
91
+ * <Block as="article" spacing="xl" background="accent">
92
+ * <h1>Blog Post</h1>
93
+ * <p>Article content...</p>
94
+ * </Block>
95
+ * ```
96
+ */
97
+ export const Block = forwardRef<HTMLDivElement, BlockProps>(
98
+ (
99
+ {
100
+ children,
101
+ as: Component = 'section',
102
+ spacing = 'md',
103
+ container = {},
104
+ fullWidth = false,
105
+ className = '',
106
+ style,
107
+ background = '',
108
+ ...props
109
+ },
110
+ ref
111
+ ) => {
112
+ const { generateBlockClass } = useBlock();
113
+
114
+ const blockClasses = generateBlockClass({
115
+ spacing,
116
+ background,
117
+ fullWidth,
118
+ className,
119
+ });
120
+
121
+ return (
122
+ <Component ref={ref} className={blockClasses} style={style} {...props}>
123
+ {fullWidth ? (
124
+ children
125
+ ) : (
126
+ <Container type={container.type} className={container.className}>
127
+ {children}
128
+ </Container>
129
+ )}
130
+ </Component>
131
+ );
132
+ }
133
+ );
134
+
135
+ Block.displayName = 'Block';
136
+
137
+ export default Block;
@@ -0,0 +1 @@
1
+ export { Block, default, type BlockProps } from './Block';
@@ -0,0 +1,106 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Icon } from '../Icon';
3
+ import { Breadcrumb } from './Breadcrumb';
4
+
5
+ const meta = {
6
+ title: 'Components/Breadcrumb',
7
+ component: Breadcrumb,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ items: { control: 'object' },
13
+ divider: { control: 'text' },
14
+ className: { control: 'text' },
15
+ ariaLabel: { control: 'text' },
16
+ },
17
+ } satisfies Meta<typeof Breadcrumb>;
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof meta>;
21
+
22
+ // Default Breadcrumb
23
+ export const Default: Story = {
24
+ args: {
25
+ items: [
26
+ { label: 'Home', href: '/' },
27
+ { label: 'Products', href: '/products' },
28
+ { label: 'Category', href: '/products/category' },
29
+ { label: 'Product Name', active: true },
30
+ ],
31
+ },
32
+ };
33
+
34
+ // Breadcrumb with Icons
35
+ export const WithIcons: Story = {
36
+ args: {
37
+ items: [
38
+ {
39
+ label: 'Home',
40
+ href: '/',
41
+ icon: <Icon name="House" size="sm" />,
42
+ },
43
+ {
44
+ label: 'Products',
45
+ href: '/products',
46
+ icon: <Icon name="Package" size="sm" />,
47
+ },
48
+ {
49
+ label: 'Category',
50
+ href: '/products/category',
51
+ icon: <Icon name="Folder" size="sm" />,
52
+ },
53
+ {
54
+ label: 'Product Name',
55
+ active: true,
56
+ icon: <Icon name="Tag" size="sm" />,
57
+ },
58
+ ],
59
+ },
60
+ };
61
+
62
+ // Breadcrumb with Custom Divider
63
+ export const CustomDivider: Story = {
64
+ args: {
65
+ items: [
66
+ { label: 'Home', href: '/' },
67
+ { label: 'Products', href: '/products' },
68
+ { label: 'Category', href: '/products/category' },
69
+ { label: 'Product Name', active: true },
70
+ ],
71
+ divider: '/',
72
+ },
73
+ };
74
+
75
+ // Breadcrumb with Click Handlers
76
+ export const WithClickHandlers: Story = {
77
+ args: {
78
+ items: [
79
+ {
80
+ label: 'Home',
81
+ href: '/',
82
+ onClick: e => {
83
+ e.preventDefault();
84
+ alert('Home clicked');
85
+ },
86
+ },
87
+ {
88
+ label: 'Products',
89
+ href: '/products',
90
+ onClick: e => {
91
+ e.preventDefault();
92
+ alert('Products clicked');
93
+ },
94
+ },
95
+ {
96
+ label: 'Category',
97
+ href: '/products/category',
98
+ onClick: e => {
99
+ e.preventDefault();
100
+ alert('Category clicked');
101
+ },
102
+ },
103
+ { label: 'Product Name', active: true },
104
+ ],
105
+ },
106
+ };