@shohojdhara/atomix 0.1.30 → 0.2.2

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 (481) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +128 -43
  4. package/dist/atomix.css +15025 -0
  5. package/dist/atomix.min.css +15 -0
  6. package/dist/index.d.ts +6459 -1748
  7. package/dist/index.esm.js +17559 -8364
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +17603 -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 +14677 -0
  14. package/dist/themes/boomdevs.min.css +405 -0
  15. package/dist/themes/esrar.css +16870 -0
  16. package/dist/themes/esrar.min.css +189 -0
  17. package/dist/themes/mashroom.css +29578 -0
  18. package/dist/themes/mashroom.min.css +403 -0
  19. package/dist/themes/shaj-default.css +15702 -0
  20. package/dist/themes/shaj-default.min.css +500 -0
  21. package/dist/themes/yabai.css +15207 -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/Footer/Footer.stories.tsx +388 -0
  102. package/src/components/Footer/Footer.tsx +197 -0
  103. package/src/components/Footer/FooterLink.tsx +72 -0
  104. package/src/components/Footer/FooterSection.tsx +87 -0
  105. package/src/components/Footer/FooterSocialLink.tsx +117 -0
  106. package/src/components/Footer/README.md +261 -0
  107. package/src/components/Footer/index.ts +13 -0
  108. package/src/components/Form/Checkbox.stories.tsx +76 -0
  109. package/src/components/Form/Checkbox.tsx +69 -0
  110. package/src/components/Form/Form.stories.tsx +497 -0
  111. package/src/components/Form/Form.tsx +46 -0
  112. package/src/components/Form/FormGroup.stories.tsx +162 -0
  113. package/src/components/Form/FormGroup.tsx +53 -0
  114. package/src/components/Form/Input.stories.tsx +106 -0
  115. package/src/components/Form/Input.tsx +87 -0
  116. package/src/components/Form/Radio.stories.tsx +94 -0
  117. package/src/components/Form/Radio.tsx +65 -0
  118. package/src/components/Form/Select.stories.tsx +151 -0
  119. package/src/components/Form/Select.tsx +191 -0
  120. package/src/components/Form/Textarea.stories.tsx +123 -0
  121. package/src/components/Form/Textarea.tsx +78 -0
  122. package/src/components/Form/index.ts +7 -0
  123. package/src/components/Hero/Hero.stories.tsx +295 -0
  124. package/src/components/Hero/Hero.tsx +175 -0
  125. package/src/components/Hero/index.ts +6 -0
  126. package/src/components/Icon/Icon.tsx +87 -0
  127. package/src/components/Icon/index.ts +2 -0
  128. package/src/components/List/List.stories.tsx +122 -0
  129. package/src/components/List/List.tsx +35 -0
  130. package/src/components/List/ListGroup.tsx +35 -0
  131. package/src/components/List/index.ts +2 -0
  132. package/src/components/Messages/Messages.stories.tsx +160 -0
  133. package/src/components/Messages/Messages.tsx +172 -0
  134. package/src/components/Messages/index.ts +3 -0
  135. package/src/components/Modal/Modal.stories.tsx +284 -0
  136. package/src/components/Modal/Modal.tsx +198 -0
  137. package/src/components/Modal/README.md +169 -0
  138. package/src/components/Modal/index.ts +1 -0
  139. package/src/components/Navigation/Menu/MegaMenu.tsx +109 -0
  140. package/src/components/Navigation/Menu/Menu.stories.tsx +339 -0
  141. package/src/components/Navigation/Menu/Menu.tsx +111 -0
  142. package/src/components/Navigation/Nav/Nav.stories.tsx +456 -0
  143. package/src/components/Navigation/Nav/Nav.tsx +51 -0
  144. package/src/components/Navigation/Nav/NavDropdown.tsx +105 -0
  145. package/src/components/Navigation/Nav/NavItem.tsx +168 -0
  146. package/src/components/Navigation/Navbar/Navbar.stories.tsx +569 -0
  147. package/src/components/Navigation/Navbar/Navbar.tsx +150 -0
  148. package/src/components/Navigation/README.md +314 -0
  149. package/src/components/Navigation/SideMenu/SideMenu.README.md +494 -0
  150. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +609 -0
  151. package/src/components/Navigation/SideMenu/SideMenu.tsx +101 -0
  152. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +103 -0
  153. package/src/components/Navigation/SideMenu/SideMenuList.tsx +41 -0
  154. package/src/components/Navigation/index.ts +23 -0
  155. package/src/components/Pagination/Pagination.stories.tsx +188 -0
  156. package/src/components/Pagination/Pagination.tsx +162 -0
  157. package/src/components/Pagination/index.ts +1 -0
  158. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +397 -0
  159. package/src/components/PhotoViewer/PhotoViewer.tsx +246 -0
  160. package/src/components/PhotoViewer/PhotoViewerHeader.tsx +184 -0
  161. package/src/components/PhotoViewer/PhotoViewerImage.tsx +173 -0
  162. package/src/components/PhotoViewer/PhotoViewerInfo.tsx +91 -0
  163. package/src/components/PhotoViewer/PhotoViewerNavigation.tsx +85 -0
  164. package/src/components/PhotoViewer/PhotoViewerThumbnails.tsx +63 -0
  165. package/src/components/PhotoViewer/README.md +358 -0
  166. package/src/components/PhotoViewer/examples/ImageGallery.tsx +187 -0
  167. package/src/components/PhotoViewer/examples/SimpleGallery.tsx +73 -0
  168. package/src/components/PhotoViewer/examples/index.ts +2 -0
  169. package/src/components/PhotoViewer/index.ts +14 -0
  170. package/src/components/Popover/Popover.stories.tsx +143 -0
  171. package/src/components/Popover/Popover.tsx +137 -0
  172. package/src/components/Popover/index.ts +5 -0
  173. package/src/components/Popover/readme.md +120 -0
  174. package/src/components/ProductReview/ProductReview.stories.tsx +88 -0
  175. package/src/components/ProductReview/ProductReview.tsx +169 -0
  176. package/src/components/ProductReview/index.ts +3 -0
  177. package/src/components/Progress/Progress.stories.tsx +75 -0
  178. package/src/components/Progress/Progress.tsx +45 -0
  179. package/src/components/Progress/index.ts +1 -0
  180. package/src/components/Rating/Rating.stories.tsx +109 -0
  181. package/src/components/Rating/Rating.tsx +286 -0
  182. package/src/components/Rating/index.ts +6 -0
  183. package/src/components/River/River.stories.tsx +230 -0
  184. package/src/components/River/River.tsx +134 -0
  185. package/src/components/River/index.ts +2 -0
  186. package/src/components/SectionIntro/SectionIntro.stories.tsx +143 -0
  187. package/src/components/SectionIntro/SectionIntro.tsx +182 -0
  188. package/src/components/SectionIntro/index.ts +3 -0
  189. package/src/components/Slider/Slider.stories.tsx +825 -0
  190. package/src/components/Slider/Slider.tsx +227 -0
  191. package/src/components/Slider/index.ts +24 -0
  192. package/src/components/Spinner/Spinner.stories.tsx +65 -0
  193. package/src/components/Spinner/Spinner.tsx +36 -0
  194. package/src/components/Spinner/index.ts +2 -0
  195. package/src/components/Steps/Steps.stories.tsx +158 -0
  196. package/src/components/Steps/Steps.tsx +115 -0
  197. package/src/components/Steps/index.ts +3 -0
  198. package/src/components/Tab/Tab.stories.tsx +129 -0
  199. package/src/components/Tab/Tab.tsx +111 -0
  200. package/src/components/Tab/index.ts +2 -0
  201. package/src/components/Testimonial/Testimonial.stories.tsx +180 -0
  202. package/src/components/Testimonial/Testimonial.tsx +138 -0
  203. package/src/components/Testimonial/index.ts +3 -0
  204. package/src/components/Todo/Todo.stories.tsx +103 -0
  205. package/src/components/Todo/Todo.tsx +158 -0
  206. package/src/components/Todo/index.ts +1 -0
  207. package/src/components/Toggle/Toggle.stories.tsx +49 -0
  208. package/src/components/Toggle/Toggle.tsx +84 -0
  209. package/src/components/Toggle/index.ts +2 -0
  210. package/src/components/Tooltip/Tooltip.stories.tsx +115 -0
  211. package/src/components/Tooltip/Tooltip.tsx +150 -0
  212. package/src/components/Tooltip/index.ts +3 -0
  213. package/src/components/Upload/Upload.stories.tsx +220 -0
  214. package/src/components/Upload/Upload.tsx +354 -0
  215. package/src/components/Upload/index.ts +3 -0
  216. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +484 -0
  217. package/src/components/VideoPlayer/VideoPlayer.tsx +574 -0
  218. package/src/components/VideoPlayer/index.ts +7 -0
  219. package/src/components/index.ts +124 -0
  220. package/src/layouts/Grid/Container.tsx +58 -0
  221. package/src/layouts/Grid/Grid.stories.tsx +928 -0
  222. package/src/layouts/Grid/Grid.tsx +68 -0
  223. package/src/layouts/Grid/GridCol.tsx +161 -0
  224. package/src/layouts/Grid/README.md +108 -0
  225. package/src/layouts/Grid/Row.tsx +70 -0
  226. package/src/layouts/Grid/index.ts +8 -0
  227. package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +387 -0
  228. package/src/layouts/MasonryGrid/MasonryGrid.tsx +408 -0
  229. package/src/layouts/MasonryGrid/MasonryGridItem.tsx +44 -0
  230. package/src/layouts/MasonryGrid/README.md +117 -0
  231. package/src/layouts/MasonryGrid/index.ts +4 -0
  232. package/src/layouts/index.ts +7 -0
  233. package/src/lib/README.md +89 -0
  234. package/src/lib/composables/index.ts +63 -0
  235. package/src/lib/composables/useAccordion.ts +129 -0
  236. package/src/lib/composables/useAmbientMode.ts +90 -0
  237. package/src/lib/composables/useBadge.ts +42 -0
  238. package/src/lib/composables/useBarChart.ts +365 -0
  239. package/src/lib/composables/useBlock.ts +56 -0
  240. package/src/lib/composables/useBreadcrumb.ts +81 -0
  241. package/src/lib/composables/useButton.ts +59 -0
  242. package/src/lib/composables/useCallout.ts +55 -0
  243. package/src/lib/composables/useCard.ts +155 -0
  244. package/src/lib/composables/useChart.ts +1082 -0
  245. package/src/lib/composables/useChartAnalytics.ts +505 -0
  246. package/src/lib/composables/useChartData.ts +38 -0
  247. package/src/lib/composables/useChartExport.ts +392 -0
  248. package/src/lib/composables/useChartInteraction.ts +34 -0
  249. package/src/lib/composables/useChartInteractions.ts +123 -0
  250. package/src/lib/composables/useChartPerformance.ts +323 -0
  251. package/src/lib/composables/useChartScale.ts +48 -0
  252. package/src/lib/composables/useChartToolbar.ts +532 -0
  253. package/src/lib/composables/useCheckbox.ts +70 -0
  254. package/src/lib/composables/useDataTable.ts +208 -0
  255. package/src/lib/composables/useDatePicker.ts +564 -0
  256. package/src/lib/composables/useDropdown.ts +272 -0
  257. package/src/lib/composables/useEdgePanel.ts +261 -0
  258. package/src/lib/composables/useFooter.ts +85 -0
  259. package/src/lib/composables/useForm.ts +62 -0
  260. package/src/lib/composables/useFormGroup.ts +51 -0
  261. package/src/lib/composables/useHero.ts +250 -0
  262. package/src/lib/composables/useInput.ts +58 -0
  263. package/src/lib/composables/useLineChart.ts +319 -0
  264. package/src/lib/composables/useMessages.ts +77 -0
  265. package/src/lib/composables/useModal.ts +110 -0
  266. package/src/lib/composables/useNavbar.ts +288 -0
  267. package/src/lib/composables/usePagination.ts +101 -0
  268. package/src/lib/composables/usePhotoViewer.ts +937 -0
  269. package/src/lib/composables/usePieChart.ts +362 -0
  270. package/src/lib/composables/usePopover.ts +354 -0
  271. package/src/lib/composables/useProgress.ts +74 -0
  272. package/src/lib/composables/useRadio.ts +47 -0
  273. package/src/lib/composables/useRating.ts +174 -0
  274. package/src/lib/composables/useRiver.ts +205 -0
  275. package/src/lib/composables/useSelect.ts +52 -0
  276. package/src/lib/composables/useSideMenu.ts +197 -0
  277. package/src/lib/composables/useSlider.ts +526 -0
  278. package/src/lib/composables/useSpinner.ts +42 -0
  279. package/src/lib/composables/useTextarea.ts +55 -0
  280. package/src/lib/composables/useTodo.ts +141 -0
  281. package/src/lib/composables/useVideoPlayer.ts +398 -0
  282. package/src/lib/constants/components.ts +1518 -0
  283. package/src/lib/constants/index.ts +4 -0
  284. package/src/lib/index.ts +11 -0
  285. package/src/lib/types/components.ts +5020 -0
  286. package/src/lib/types/index.ts +2 -0
  287. package/src/lib/utils/dom.ts +41 -0
  288. package/src/lib/utils/icons.ts +74 -0
  289. package/src/lib/utils/index.ts +55 -0
  290. package/src/lib/utils/useForkRef.test.tsx +64 -0
  291. package/src/lib/utils/useForkRef.ts +36 -0
  292. package/src/lib/utils.test.ts +14 -0
  293. package/src/styles/01-settings/_index.scss +3 -0
  294. package/src/styles/01-settings/_settings.accordion.scss +22 -19
  295. package/src/styles/01-settings/_settings.animations.scss +5 -5
  296. package/src/styles/01-settings/_settings.avatar-group.scss +7 -4
  297. package/src/styles/01-settings/_settings.avatar.scss +19 -20
  298. package/src/styles/01-settings/_settings.background.scss +9 -0
  299. package/src/styles/01-settings/_settings.badge.scss +15 -9
  300. package/src/styles/01-settings/_settings.block.scss +11 -0
  301. package/src/styles/01-settings/_settings.border-radius.scss +12 -9
  302. package/src/styles/01-settings/_settings.border.scss +4 -1
  303. package/src/styles/01-settings/_settings.box-shadow.scss +1 -1
  304. package/src/styles/01-settings/_settings.breadcrumb.scss +16 -9
  305. package/src/styles/01-settings/_settings.breakpoints.scss +0 -0
  306. package/src/styles/01-settings/_settings.btn-group.scss +4 -1
  307. package/src/styles/01-settings/_settings.button.scss +19 -21
  308. package/src/styles/01-settings/_settings.callout.scss +42 -24
  309. package/src/styles/01-settings/_settings.card.scss +13 -11
  310. package/src/styles/01-settings/_settings.chart.scss +199 -0
  311. package/src/styles/01-settings/_settings.checkbox-group.scss +5 -2
  312. package/src/styles/01-settings/_settings.checkbox.scss +10 -4
  313. package/src/styles/01-settings/_settings.color-mode.scss +0 -0
  314. package/src/styles/01-settings/_settings.colors.scss +20 -0
  315. package/src/styles/01-settings/_settings.config.scss +1 -1
  316. package/src/styles/01-settings/_settings.countdown.scss +6 -4
  317. package/src/styles/01-settings/_settings.data-table.scss +0 -0
  318. package/src/styles/01-settings/_settings.datepicker.scss +0 -0
  319. package/src/styles/01-settings/_settings.dropdown.scss +9 -7
  320. package/src/styles/01-settings/_settings.edge-panel.scss +3 -2
  321. package/src/styles/01-settings/_settings.fonts.scss +1 -1
  322. package/src/styles/01-settings/_settings.footer.scss +125 -0
  323. package/src/styles/01-settings/_settings.form-group.scss +3 -1
  324. package/src/styles/01-settings/_settings.form.scss +4 -2
  325. package/src/styles/01-settings/_settings.grid.scss +3 -3
  326. package/src/styles/01-settings/_settings.hero.scss +10 -8
  327. package/src/styles/01-settings/_settings.input.scss +9 -7
  328. package/src/styles/01-settings/_settings.link.scss +0 -0
  329. package/src/styles/01-settings/_settings.list-group.scss +4 -2
  330. package/src/styles/01-settings/_settings.list.scss +4 -2
  331. package/src/styles/01-settings/_settings.maps.scss +43 -8
  332. package/src/styles/01-settings/_settings.masonry-grid.scss +0 -0
  333. package/src/styles/01-settings/_settings.menu.scss +10 -8
  334. package/src/styles/01-settings/_settings.messages.scss +19 -17
  335. package/src/styles/01-settings/_settings.modal.scss +7 -5
  336. package/src/styles/01-settings/_settings.nav.scss +6 -4
  337. package/src/styles/01-settings/_settings.navbar.scss +8 -5
  338. package/src/styles/01-settings/_settings.pagination.scss +5 -3
  339. package/src/styles/01-settings/_settings.photoviewer.scss +89 -23
  340. package/src/styles/01-settings/_settings.popover.scss +6 -4
  341. package/src/styles/01-settings/_settings.position.scss +0 -0
  342. package/src/styles/01-settings/_settings.progress.scss +0 -0
  343. package/src/styles/01-settings/_settings.rating.scss +5 -3
  344. package/src/styles/01-settings/_settings.river.scss +8 -6
  345. package/src/styles/01-settings/_settings.sectionintro.scss +8 -6
  346. package/src/styles/01-settings/_settings.select.scss +7 -5
  347. package/src/styles/01-settings/_settings.side-menu.scss +15 -13
  348. package/src/styles/01-settings/_settings.skeleton.scss +0 -0
  349. package/src/styles/01-settings/_settings.slider.scss +59 -0
  350. package/src/styles/01-settings/_settings.spacing.scss +15 -3
  351. package/src/styles/01-settings/_settings.spinner.scss +0 -0
  352. package/src/styles/01-settings/_settings.steps.scss +8 -6
  353. package/src/styles/01-settings/_settings.tabs.scss +11 -9
  354. package/src/styles/01-settings/_settings.testimonials.scss +6 -4
  355. package/src/styles/01-settings/_settings.todo.scss +0 -0
  356. package/src/styles/01-settings/_settings.toggle.scss +4 -2
  357. package/src/styles/01-settings/_settings.tooltip.scss +5 -3
  358. package/src/styles/01-settings/_settings.typography.scss +2 -0
  359. package/src/styles/01-settings/_settings.upload.scss +22 -20
  360. package/src/styles/01-settings/_settings.video-player.scss +64 -0
  361. package/src/styles/01-settings/_settings.z-layers.scss +0 -0
  362. package/src/styles/02-tools/_index.scss +1 -0
  363. package/src/styles/02-tools/_tools.animations.scss +82 -0
  364. package/src/styles/02-tools/_tools.background.scss +85 -0
  365. package/src/styles/02-tools/_tools.border-radius.scss +0 -0
  366. package/src/styles/02-tools/_tools.breakpoints.scss +0 -0
  367. package/src/styles/02-tools/_tools.button.scss +5 -0
  368. package/src/styles/02-tools/_tools.clearfix.scss +0 -0
  369. package/src/styles/02-tools/_tools.color-functions.scss +0 -0
  370. package/src/styles/02-tools/_tools.color-mode.scss +1 -1
  371. package/src/styles/02-tools/_tools.component.scss +479 -0
  372. package/src/styles/02-tools/_tools.event.scss +0 -0
  373. package/src/styles/02-tools/_tools.grid.scss +0 -0
  374. package/src/styles/02-tools/_tools.hidden-visually.scss +0 -0
  375. package/src/styles/02-tools/_tools.hidden.scss +0 -0
  376. package/src/styles/02-tools/_tools.map-loop.scss +0 -0
  377. package/src/styles/02-tools/_tools.media-queries.scss +0 -0
  378. package/src/styles/02-tools/_tools.object-fit.scss +0 -0
  379. package/src/styles/02-tools/_tools.placeholder.scss +0 -0
  380. package/src/styles/02-tools/_tools.rem.scss +19 -2
  381. package/src/styles/02-tools/_tools.size.scss +0 -0
  382. package/src/styles/02-tools/_tools.spacing.scss +0 -0
  383. package/src/styles/02-tools/_tools.to-rgb.scss +0 -0
  384. package/src/styles/02-tools/_tools.transition.scss +0 -0
  385. package/src/styles/02-tools/_tools.utilities.scss +0 -0
  386. package/src/styles/02-tools/_tools.utility-api.scss +55 -28
  387. package/src/styles/03-generic/_generic.fonts.scss +0 -0
  388. package/src/styles/03-generic/_generic.reset.scss +0 -0
  389. package/src/styles/03-generic/_generic.root.scss +19 -3
  390. package/src/styles/03-generic/_generic.selection.scss +0 -0
  391. package/src/styles/03-generic/_index.scss +0 -0
  392. package/src/styles/04-elements/_elements.all.scss +0 -0
  393. package/src/styles/04-elements/_elements.body.scss +24 -0
  394. package/src/styles/04-elements/_elements.heading.scss +0 -0
  395. package/src/styles/04-elements/_elements.html.scss +0 -0
  396. package/src/styles/04-elements/_elements.links.scss +0 -0
  397. package/src/styles/04-elements/_index.scss +0 -0
  398. package/src/styles/05-objects/_index.scss +1 -0
  399. package/src/styles/05-objects/_objects.block.scss +122 -0
  400. package/src/styles/05-objects/_objects.container.scss +14 -10
  401. package/src/styles/05-objects/_objects.grid.scss +0 -0
  402. package/src/styles/05-objects/_objects.masonry-grid.scss +0 -0
  403. package/src/styles/06-components/_components.accordion.scss +10 -4
  404. package/src/styles/06-components/_components.avatar-group.scss +2 -1
  405. package/src/styles/06-components/_components.avatar.scss +2 -1
  406. package/src/styles/06-components/_components.badge.scss +11 -10
  407. package/src/styles/06-components/_components.breadcrumb.scss +2 -1
  408. package/src/styles/06-components/_components.btn-group.scss +0 -0
  409. package/src/styles/06-components/_components.button.scss +4 -3
  410. package/src/styles/06-components/_components.callout.scss +5 -3
  411. package/src/styles/06-components/_components.card.scss +4 -3
  412. package/src/styles/06-components/_components.chart.scss +2103 -0
  413. package/src/styles/06-components/_components.checkbox-group.scss +0 -0
  414. package/src/styles/06-components/_components.checkbox.scss +2 -1
  415. package/src/styles/06-components/_components.color-mode-toggle.scss +3 -2
  416. package/src/styles/06-components/_components.countdown.scss +2 -1
  417. package/src/styles/06-components/_components.data-table.scss +7 -6
  418. package/src/styles/06-components/_components.datepicker.scss +2 -1
  419. package/src/styles/06-components/_components.dropdown.scss +4 -3
  420. package/src/styles/06-components/_components.edge-panel.scss +4 -3
  421. package/src/styles/06-components/_components.footer.scss +825 -0
  422. package/src/styles/06-components/_components.form-group.scss +1 -0
  423. package/src/styles/06-components/_components.form.scss +0 -0
  424. package/src/styles/06-components/_components.hero.scss +4 -2
  425. package/src/styles/06-components/_components.icon.scss +2 -2
  426. package/src/styles/06-components/_components.image-gallery.scss +1 -0
  427. package/src/styles/06-components/_components.input.scss +2 -1
  428. package/src/styles/06-components/_components.list-group.scss +3 -2
  429. package/src/styles/06-components/_components.list.scss +2 -1
  430. package/src/styles/06-components/_components.menu.scss +5 -4
  431. package/src/styles/06-components/_components.messages.scss +8 -7
  432. package/src/styles/06-components/_components.modal.scss +6 -2
  433. package/src/styles/06-components/_components.nav.scss +6 -5
  434. package/src/styles/06-components/_components.navbar.scss +4 -3
  435. package/src/styles/06-components/_components.pagination.scss +2 -1
  436. package/src/styles/06-components/_components.photoviewer.scss +604 -545
  437. package/src/styles/06-components/_components.popover.scss +3 -2
  438. package/src/styles/06-components/_components.product-review.scss +3 -2
  439. package/src/styles/06-components/_components.progress.scss +3 -2
  440. package/src/styles/06-components/_components.rating.scss +0 -0
  441. package/src/styles/06-components/_components.river.scss +3 -2
  442. package/src/styles/06-components/_components.sectionintro.scss +2 -1
  443. package/src/styles/06-components/_components.select.scss +5 -4
  444. package/src/styles/06-components/_components.side-menu.scss +8 -7
  445. package/src/styles/06-components/_components.skeleton.scss +3 -2
  446. package/src/styles/06-components/_components.slider.scss +274 -0
  447. package/src/styles/06-components/_components.spinner.scss +1 -0
  448. package/src/styles/06-components/_components.steps.scss +4 -2
  449. package/src/styles/06-components/_components.tabs.scss +4 -3
  450. package/src/styles/06-components/_components.testimonials.scss +2 -1
  451. package/src/styles/06-components/_components.todo.scss +3 -2
  452. package/src/styles/06-components/_components.toggle.scss +5 -4
  453. package/src/styles/06-components/_components.tooltip.scss +7 -11
  454. package/src/styles/06-components/_components.upload.scss +4 -3
  455. package/src/styles/06-components/_components.video-player.scss +624 -0
  456. package/src/styles/06-components/_index.scss +4 -0
  457. package/src/styles/06-components/old.chart.styles.scss +2819 -0
  458. package/src/styles/99-utilities/_index.scss +0 -0
  459. package/src/styles/99-utilities/_utilities.background.scss +0 -0
  460. package/src/styles/99-utilities/_utilities.border.scss +0 -0
  461. package/src/styles/99-utilities/_utilities.clearfix.scss +0 -0
  462. package/src/styles/99-utilities/_utilities.display.scss +0 -0
  463. package/src/styles/99-utilities/_utilities.flex.scss +0 -0
  464. package/src/styles/99-utilities/_utilities.link.scss +0 -0
  465. package/src/styles/99-utilities/_utilities.object-fit.scss +0 -0
  466. package/src/styles/99-utilities/_utilities.opacity.scss +0 -0
  467. package/src/styles/99-utilities/_utilities.overflow.scss +0 -0
  468. package/src/styles/99-utilities/_utilities.position.scss +0 -0
  469. package/src/styles/99-utilities/_utilities.scss +2 -1
  470. package/src/styles/99-utilities/_utilities.shadow.scss +0 -0
  471. package/src/styles/99-utilities/_utilities.sizes.scss +0 -0
  472. package/src/styles/99-utilities/_utilities.spacing.scss +0 -0
  473. package/src/styles/99-utilities/_utilities.text.scss +5 -0
  474. package/src/styles/99-utilities/_utilities.visibility.scss +0 -0
  475. package/src/styles/99-utilities/_utilities.visually-hidden.scss +0 -0
  476. package/src/styles/99-utilities/_utilities.z-index.scss +0 -0
  477. package/src/styles/css-modules.d.ts +0 -0
  478. package/src/styles/index.scss +0 -0
  479. package/dist/index.css +0 -15
  480. package/dist/index.esm.css +0 -15
  481. package/dist/index.min.css +0 -15
@@ -0,0 +1,129 @@
1
+ import React from 'react';
2
+ import { StoryFn, Meta } from '@storybook/react';
3
+ import { fn } from '@storybook/test';
4
+ import { Tab } from './Tab';
5
+
6
+ export default {
7
+ title: 'Components/Tab',
8
+ component: Tab,
9
+ argTypes: {
10
+ activeIndex: {
11
+ control: { type: 'number' },
12
+ defaultValue: 0,
13
+ },
14
+ },
15
+ } as Meta<typeof Tab>;
16
+
17
+ const Template: StoryFn<typeof Tab> = args => (
18
+ <div style={{ maxWidth: '600px', margin: '0 auto', padding: '30px' }}>
19
+ <Tab {...args} />
20
+ </div>
21
+ );
22
+
23
+ export const Default = Template.bind({});
24
+ Default.args = {
25
+ items: [
26
+ {
27
+ label: 'Tab 1',
28
+ content: <p>This is the content for Tab 1. Default tab content.</p>,
29
+ },
30
+ {
31
+ label: 'Tab 2',
32
+ content: <p>This is the content for Tab 2. It contains different information.</p>,
33
+ },
34
+ {
35
+ label: 'Tab 3',
36
+ content: <p>This is the content for Tab 3. Another unique content section.</p>,
37
+ },
38
+ ],
39
+ activeIndex: 0,
40
+ };
41
+
42
+ export const WithDifferentActiveTab = Template.bind({});
43
+ WithDifferentActiveTab.args = {
44
+ items: [
45
+ {
46
+ label: 'Tab 1',
47
+ content: <p>This is the content for Tab 1.</p>,
48
+ },
49
+ {
50
+ label: 'Tab 2',
51
+ content: <p>This is the content for Tab 2. It's initially active.</p>,
52
+ },
53
+ {
54
+ label: 'Tab 3',
55
+ content: <p>This is the content for Tab 3.</p>,
56
+ },
57
+ ],
58
+ activeIndex: 1,
59
+ };
60
+
61
+ export const WithRichContent = Template.bind({});
62
+ WithRichContent.args = {
63
+ items: [
64
+ {
65
+ label: 'Features',
66
+ content: (
67
+ <div>
68
+ <h3>Key Features</h3>
69
+ <ul>
70
+ <li>Responsive design</li>
71
+ <li>Accessible navigation</li>
72
+ <li>Smooth transitions</li>
73
+ </ul>
74
+ </div>
75
+ ),
76
+ },
77
+ {
78
+ label: 'Specifications',
79
+ content: (
80
+ <div>
81
+ <h3>Technical Specifications</h3>
82
+ <table style={{ width: '100%', borderCollapse: 'collapse' }}>
83
+ <thead>
84
+ <tr>
85
+ <th style={{ border: '1px solid #ddd', padding: '8px', textAlign: 'left' }}>
86
+ Property
87
+ </th>
88
+ <th style={{ border: '1px solid #ddd', padding: '8px', textAlign: 'left' }}>
89
+ Value
90
+ </th>
91
+ </tr>
92
+ </thead>
93
+ <tbody>
94
+ <tr>
95
+ <td style={{ border: '1px solid #ddd', padding: '8px' }}>Size</td>
96
+ <td style={{ border: '1px solid #ddd', padding: '8px' }}>Medium</td>
97
+ </tr>
98
+ <tr>
99
+ <td style={{ border: '1px solid #ddd', padding: '8px' }}>Material</td>
100
+ <td style={{ border: '1px solid #ddd', padding: '8px' }}>Aluminum</td>
101
+ </tr>
102
+ </tbody>
103
+ </table>
104
+ </div>
105
+ ),
106
+ },
107
+ {
108
+ label: 'Reviews',
109
+ content: (
110
+ <div>
111
+ <h3>Customer Reviews</h3>
112
+ <div style={{ padding: '10px', marginBottom: '10px', backgroundColor: '#f9f9f9' }}>
113
+ <p style={{ marginBottom: '5px' }}>
114
+ <strong>John D.</strong> ★★★★★
115
+ </p>
116
+ <p>Great product, highly recommended!</p>
117
+ </div>
118
+ <div style={{ padding: '10px', backgroundColor: '#f9f9f9' }}>
119
+ <p style={{ marginBottom: '5px' }}>
120
+ <strong>Sarah T.</strong> ★★★★☆
121
+ </p>
122
+ <p>Very good quality and fast shipping.</p>
123
+ </div>
124
+ </div>
125
+ ),
126
+ },
127
+ ],
128
+ activeIndex: 0,
129
+ };
@@ -0,0 +1,111 @@
1
+ import React, { useState, ReactNode } from 'react';
2
+ import { TAB } from '../../lib/constants/components';
3
+
4
+ export interface TabItemProps {
5
+ /**
6
+ * Label for the tab
7
+ */
8
+ label: string;
9
+
10
+ /**
11
+ * Content of the tab panel
12
+ */
13
+ content: ReactNode;
14
+
15
+ /**
16
+ * Whether the tab is initially active
17
+ */
18
+ isActive?: boolean;
19
+
20
+ /**
21
+ * Additional CSS class for the tab
22
+ */
23
+ className?: string;
24
+ }
25
+
26
+ export interface TabProps {
27
+ /**
28
+ * Array of tab items
29
+ */
30
+ items: TabItemProps[];
31
+
32
+ /**
33
+ * Initial active tab index
34
+ */
35
+ activeIndex?: number;
36
+
37
+ /**
38
+ * Callback when tab changes
39
+ */
40
+ onTabChange?: (index: number) => void;
41
+
42
+ /**
43
+ * Additional CSS class for the tab component
44
+ */
45
+ className?: string;
46
+ }
47
+
48
+ /**
49
+ * Tab component for switching between different content panels
50
+ */
51
+ export const Tab: React.FC<TabProps> = ({
52
+ items,
53
+ activeIndex = TAB.DEFAULTS.ACTIVE_INDEX,
54
+ onTabChange,
55
+ className = '',
56
+ }) => {
57
+ const [currentTab, setCurrentTab] = useState(activeIndex);
58
+
59
+ // Handle tab change
60
+ const handleTabClick = (index: number) => {
61
+ setCurrentTab(index);
62
+ if (onTabChange) {
63
+ onTabChange(index);
64
+ }
65
+ };
66
+
67
+ return (
68
+ <div className={`c-tabs js-atomix-tab ${className}`}>
69
+ <ul className="c-tabs__nav">
70
+ {items.map((item, index) => (
71
+ <li className="c-tabs__nav-item" key={`tab-nav-${index}`}>
72
+ <button
73
+ className={`c-tabs__nav-btn ${index === currentTab ? TAB.CLASSES.ACTIVE : ''}`}
74
+ onClick={() => handleTabClick(index)}
75
+ data-tabindex={index}
76
+ role="tab"
77
+ aria-selected={index === currentTab}
78
+ aria-controls={`tab-panel-${index}`}
79
+ >
80
+ {item.label}
81
+ </button>
82
+ </li>
83
+ ))}
84
+ </ul>
85
+ <div className="c-tabs__panels">
86
+ {items.map((item, index) => (
87
+ <div
88
+ className={`c-tabs__panel ${index === currentTab ? TAB.CLASSES.ACTIVE : ''}`}
89
+ key={`tab-panel-${index}`}
90
+ data-tabindex={index}
91
+ id={`tab-panel-${index}`}
92
+ role="tabpanel"
93
+ aria-labelledby={`tab-nav-${index}`}
94
+ style={{
95
+ height: index === currentTab ? 'auto' : '0px',
96
+ opacity: index === currentTab ? 1 : 0,
97
+ overflow: 'hidden',
98
+ transition: 'height 0.3s ease, opacity 0.3s ease',
99
+ }}
100
+ >
101
+ <div className="c-tabs__panel-body">{item.content}</div>
102
+ </div>
103
+ ))}
104
+ </div>
105
+ </div>
106
+ );
107
+ };
108
+
109
+ Tab.displayName = 'Tab';
110
+
111
+ export default Tab;
@@ -0,0 +1,2 @@
1
+ export { Tab } from './Tab';
2
+ export type { TabProps, TabItemProps } from './Tab';
@@ -0,0 +1,180 @@
1
+ import React from 'react';
2
+ import { StoryFn, Meta } from '@storybook/react';
3
+ import { Testimonial } from './Testimonial';
4
+ import type { TestimonialProps } from './Testimonial';
5
+
6
+ export default {
7
+ title: 'Components/Testimonial',
8
+ component: Testimonial,
9
+ argTypes: {
10
+ size: {
11
+ control: { type: 'select', options: ['', 'sm', 'lg'] },
12
+ defaultValue: '',
13
+ },
14
+ skeleton: {
15
+ control: { type: 'boolean' },
16
+ defaultValue: false,
17
+ },
18
+ },
19
+ } as Meta<typeof Testimonial>;
20
+
21
+ const Template: StoryFn<typeof Testimonial> = args => (
22
+ <div style={{ padding: '30px' }}>
23
+ <Testimonial {...args} />
24
+ </div>
25
+ );
26
+
27
+ // Default testimonial
28
+ export const Default = Template.bind({});
29
+ Default.args = {
30
+ quote:
31
+ 'The intuitive interface, seamless syncing across devices, and helpful features have made me more productive than ever before.',
32
+ author: {
33
+ name: 'Emily Rodriguez',
34
+ role: 'Software Engineer, Acme',
35
+ avatarSrc:
36
+ 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
37
+ avatarAlt: 'Emily Rodriguez',
38
+ },
39
+ size: '',
40
+ };
41
+
42
+ // Large testimonial
43
+ export const Large = Template.bind({});
44
+ Large.args = {
45
+ quote:
46
+ 'The intuitive interface, seamless syncing across devices, and helpful features have made me more productive than ever before.',
47
+ author: {
48
+ name: 'Emily Rodriguez',
49
+ role: 'Software Engineer, Acme',
50
+ avatarSrc:
51
+ 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
52
+ avatarAlt: 'Emily Rodriguez',
53
+ },
54
+ size: 'lg',
55
+ };
56
+
57
+ // Small testimonial
58
+ export const Small = Template.bind({});
59
+ Small.args = {
60
+ quote:
61
+ 'The intuitive interface, seamless syncing across devices, and helpful features have made me more productive than ever before.',
62
+ author: {
63
+ name: 'Emily Rodriguez',
64
+ role: 'Software Engineer, Acme',
65
+ avatarSrc:
66
+ 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
67
+ avatarAlt: 'Emily Rodriguez',
68
+ },
69
+ size: 'sm',
70
+ };
71
+
72
+ // Skeleton loading state
73
+ export const Skeleton = Template.bind({});
74
+ Skeleton.args = {
75
+ skeleton: true,
76
+ size: '',
77
+ };
78
+
79
+ // Large skeleton
80
+ export const LargeSkeleton = Template.bind({});
81
+ LargeSkeleton.args = {
82
+ skeleton: true,
83
+ size: 'lg',
84
+ };
85
+
86
+ // With rich content in quote
87
+ export const RichContent = Template.bind({});
88
+ RichContent.args = {
89
+ quote: (
90
+ <>
91
+ <p>"I feel more in charge of my schedule and less overwhelmed. Highly recommended for</p>
92
+ <p>professionals and anyone aiming to enhance their productivity."</p>
93
+ </>
94
+ ),
95
+ author: {
96
+ name: 'John Smith',
97
+ role: 'Product Manager, XYZ Corp',
98
+ avatarSrc:
99
+ 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3',
100
+ avatarAlt: 'John Smith',
101
+ },
102
+ };
103
+
104
+ // Grid of testimonials
105
+ const TestimonialGrid: React.FC = () => {
106
+ return (
107
+ <div className="o-container">
108
+ <div className="o-grid">
109
+ <div className="o-grid__col o-grid__col--4">
110
+ <Testimonial
111
+ size="sm"
112
+ quote="The intuitive interface, seamless syncing across devices, and helpful features have made me more productive than ever before."
113
+ author={{
114
+ name: 'Emily Rodriguez',
115
+ role: 'Software Engineer, Acme',
116
+ avatarSrc:
117
+ 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
118
+ avatarAlt: 'Emily Rodriguez',
119
+ }}
120
+ />
121
+ </div>
122
+ <div className="o-grid__col o-grid__col--4">
123
+ <Testimonial
124
+ size="sm"
125
+ quote="I feel more in charge of my schedule and less overwhelmed. Highly recommended for professionals and anyone aiming to enhance their productivity."
126
+ author={{
127
+ name: 'John Smith',
128
+ role: 'Product Manager, XYZ Corp',
129
+ avatarSrc:
130
+ 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3',
131
+ avatarAlt: 'John Smith',
132
+ }}
133
+ />
134
+ </div>
135
+ <div className="o-grid__col o-grid__col--4">
136
+ <Testimonial
137
+ size="sm"
138
+ quote="I've tried numerous productivity apps in the past, but this one truly stands out. It strikes the perfect balance between simplicity and functionality."
139
+ author={{
140
+ name: 'Sarah Johnson',
141
+ role: 'Marketing Director, ABC Inc',
142
+ avatarSrc:
143
+ 'https://images.unsplash.com/photo-1544005313-94ddf0286df2?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3',
144
+ avatarAlt: 'Sarah Johnson',
145
+ }}
146
+ />
147
+ </div>
148
+ </div>
149
+ </div>
150
+ );
151
+ };
152
+
153
+ export const TestimonialGridLayout: StoryFn<typeof Testimonial> = () => <TestimonialGrid />;
154
+
155
+ // Testimonial with image
156
+ const TestimonialWithImage: React.FC = () => {
157
+ return (
158
+ <div className="o-container">
159
+ <div className="o-grid u-align-items-center">
160
+ <div className="o-grid__col o-grid__col--6">
161
+ <Testimonial
162
+ quote="The intuitive interface, seamless syncing across devices, and helpful features have made me more productive than ever before."
163
+ author={{
164
+ name: 'Emily Rodriguez',
165
+ role: 'Software Engineer, Acme',
166
+ avatarSrc:
167
+ 'https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
168
+ avatarAlt: 'Emily Rodriguez',
169
+ }}
170
+ />
171
+ </div>
172
+ <div className="o-grid__col o-grid__col--6">
173
+ <img src="https://unsplash.it/g/727/250" alt="Image" className="c-river__image" />
174
+ </div>
175
+ </div>
176
+ </div>
177
+ );
178
+ };
179
+
180
+ export const WithImage: StoryFn<typeof Testimonial> = () => <TestimonialWithImage />;
@@ -0,0 +1,138 @@
1
+ import React, { ReactNode, useEffect, useRef } from 'react';
2
+ import { TESTIMONIAL } from '../../lib/constants/components';
3
+
4
+ export interface TestimonialAuthor {
5
+ /**
6
+ * The author's name
7
+ */
8
+ name: string;
9
+
10
+ /**
11
+ * The author's role or title
12
+ */
13
+ role: string;
14
+
15
+ /**
16
+ * The URL to the author's avatar image
17
+ */
18
+ avatarSrc?: string;
19
+
20
+ /**
21
+ * Alternative text for the avatar image
22
+ */
23
+ avatarAlt?: string;
24
+ }
25
+
26
+ export interface TestimonialProps {
27
+ /**
28
+ * The testimonial quote text or content
29
+ */
30
+ quote: ReactNode;
31
+
32
+ /**
33
+ * Author information
34
+ */
35
+ author?: TestimonialAuthor;
36
+
37
+ /**
38
+ * Size variant
39
+ */
40
+ size?: 'sm' | 'lg' | '';
41
+
42
+ /**
43
+ * Whether to show a skeleton loading state
44
+ */
45
+ skeleton?: boolean;
46
+
47
+ /**
48
+ * Additional CSS class
49
+ */
50
+ className?: string;
51
+ }
52
+
53
+ /**
54
+ * Testimonial component for displaying customer quotes and feedback
55
+ */
56
+ export const Testimonial: React.FC<TestimonialProps> = ({
57
+ quote,
58
+ author,
59
+ size = '',
60
+ skeleton = false,
61
+ className = '',
62
+ }) => {
63
+ const testimonialRef = useRef<HTMLDivElement>(null);
64
+ const testimonialInstance = useRef<any>(null);
65
+
66
+ useEffect(() => {
67
+ // Only run on client-side
68
+ if (typeof window === 'undefined' || !testimonialRef.current) return undefined;
69
+
70
+ // Cleanup on unmount
71
+ return () => {
72
+ if (testimonialInstance.current) {
73
+ testimonialInstance.current.destroy();
74
+ }
75
+ };
76
+ }, [size, skeleton]);
77
+
78
+ // Determine CSS classes
79
+ const testimonialClasses = [
80
+ 'c-testimonial',
81
+ size === 'sm' ? TESTIMONIAL.CLASSES.SMALL : '',
82
+ size === 'lg' ? TESTIMONIAL.CLASSES.LARGE : '',
83
+ className,
84
+ ]
85
+ .filter(Boolean)
86
+ .join(' ');
87
+
88
+ // Render skeleton version
89
+ if (skeleton) {
90
+ return (
91
+ <div className={testimonialClasses} ref={testimonialRef}>
92
+ <blockquote className="c-testimonial__quote">
93
+ <span className="c-skeleton"></span>
94
+ <span className="c-skeleton"></span>
95
+ <span className="c-skeleton u-w-75"></span>
96
+ <span className="c-skeleton u-w-25"></span>
97
+ </blockquote>
98
+ <div className="c-testimonial__author">
99
+ <span className="c-testimonial__author-avatar c-avatar c-avatar--xxl c-avatar--circle c-skeleton"></span>
100
+ <div className="c-testimonial__info u-w-75">
101
+ <p className="c-testimonial__author-name">
102
+ <span className="c-skeleton u-w-25"></span>
103
+ </p>
104
+ <p className="c-testimonial__author-role">
105
+ <span className="c-skeleton u-w-25"></span>
106
+ </p>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ );
111
+ }
112
+
113
+ // Render normal version
114
+ return (
115
+ <div className={testimonialClasses} ref={testimonialRef}>
116
+ <blockquote className="c-testimonial__quote">{quote}</blockquote>
117
+ {author && (
118
+ <div className="c-testimonial__author">
119
+ {author.avatarSrc && (
120
+ <img
121
+ src={author.avatarSrc}
122
+ alt={author.avatarAlt || ''}
123
+ className="c-testimonial__author-avatar c-avatar c-avatar--xxl c-avatar--circle"
124
+ />
125
+ )}
126
+ <div className="c-testimonial__info">
127
+ <p className="c-testimonial__author-name">{author.name}</p>
128
+ <p className="c-testimonial__author-role">{author.role}</p>
129
+ </div>
130
+ </div>
131
+ )}
132
+ </div>
133
+ );
134
+ };
135
+
136
+ Testimonial.displayName = 'Testimonial';
137
+
138
+ export default Testimonial;
@@ -0,0 +1,3 @@
1
+ export { Testimonial } from './Testimonial';
2
+ export type { TestimonialProps, TestimonialAuthor } from './Testimonial';
3
+ export { default } from './Testimonial';
@@ -0,0 +1,103 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { generateUUID } from '../../lib/utils';
3
+ import { Todo } from './Todo';
4
+
5
+ const meta: Meta<typeof Todo> = {
6
+ title: 'Components/Todo',
7
+ component: Todo,
8
+ parameters: {
9
+ layout: 'centered',
10
+ },
11
+ argTypes: {
12
+ items: { control: 'object' },
13
+ title: { control: 'text' },
14
+
15
+ size: {
16
+ control: { type: 'select' },
17
+ options: ['sm', 'md', 'lg'],
18
+ },
19
+ placeholder: { control: 'text' },
20
+ showCompleted: { control: 'boolean' },
21
+ className: { control: 'text' },
22
+ disabled: { control: 'boolean' },
23
+ },
24
+ };
25
+
26
+ export default meta;
27
+ type Story = StoryObj<typeof Todo>;
28
+
29
+ export const Default: Story = {
30
+ args: {
31
+ items: [
32
+ { id: '1', text: 'Learn React', completed: true },
33
+ { id: '2', text: 'Build a todo app', completed: false },
34
+ { id: '3', text: 'Deploy to production', completed: false },
35
+ ],
36
+ title: 'Todo List',
37
+ placeholder: 'Add a new task',
38
+ size: 'md',
39
+ showCompleted: true,
40
+ disabled: false,
41
+ },
42
+ };
43
+
44
+ export const WithManyItems: Story = {
45
+ args: {
46
+ items: [
47
+ { id: generateUUID(), text: 'Complete project documentation', completed: false },
48
+ { id: generateUUID(), text: 'Review pull requests', completed: true },
49
+ { id: generateUUID(), text: 'Update dependencies', completed: false },
50
+ { id: generateUUID(), text: 'Write unit tests', completed: false },
51
+ { id: generateUUID(), text: 'Fix accessibility issues', completed: true },
52
+ ],
53
+ title: 'Project Tasks',
54
+ showCompleted: true,
55
+ },
56
+ };
57
+
58
+ export const Small: Story = {
59
+ args: {
60
+ ...Default.args,
61
+ size: 'sm',
62
+ },
63
+ };
64
+
65
+ export const Large: Story = {
66
+ args: {
67
+ ...Default.args,
68
+ size: 'lg',
69
+ },
70
+ };
71
+
72
+ export const HideCompleted: Story = {
73
+ args: {
74
+ items: [
75
+ { id: generateUUID(), text: 'Learn React', completed: true },
76
+ { id: generateUUID(), text: 'Build a todo app', completed: false },
77
+ { id: generateUUID(), text: 'Deploy to production', completed: false },
78
+ ],
79
+ showCompleted: false,
80
+ title: 'Active Tasks',
81
+ },
82
+ };
83
+
84
+ export const Disabled: Story = {
85
+ args: {
86
+ ...Default.args,
87
+ disabled: true,
88
+ },
89
+ };
90
+
91
+ export const CustomTitle: Story = {
92
+ args: {
93
+ ...Default.args,
94
+ title: 'My Custom Todo List',
95
+ },
96
+ };
97
+
98
+ export const NoTitle: Story = {
99
+ args: {
100
+ ...Default.args,
101
+ title: '',
102
+ },
103
+ };