@shohojdhara/atomix 0.1.16 → 0.1.18

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 (525) hide show
  1. package/CONTRIBUTING.md +151 -0
  2. package/NEXTJS_INTEGRATION.md +358 -0
  3. package/README.md +168 -119
  4. package/babel.config.js +58 -0
  5. package/css.d.ts +10 -0
  6. package/dist/css/atomix.css +1 -2
  7. package/dist/js/194.js +1 -2
  8. package/dist/js/244.js +1 -0
  9. package/dist/js/atomix.react.cjs.js +1 -0
  10. package/dist/js/atomix.react.esm.js +1 -2
  11. package/dist/js/atomix.react.umd.js +1 -2
  12. package/dist/js/chunks/cjs/202.9d3b1ef1eaa0d5c8a309.js +1 -0
  13. package/dist/js/chunks/cjs/308.6ea9685ea38ead4120d0.js +1 -0
  14. package/dist/js/chunks/cjs/54.73db6922594e421ba6b1.js +1 -0
  15. package/dist/js/chunks/cjs/619.51feecaadcab819780d4.js +1 -0
  16. package/dist/js/chunks/cjs/690.90f6d11164081cbcbc4d.js +1 -0
  17. package/dist/js/chunks/cjs/894.24877561df336a8dfd14.js +1 -0
  18. package/dist/js/chunks/cjs/897.6c2a71fae95338890de7.js +1 -0
  19. package/dist/js/chunks/esm/{202.ff48d27672233280e021.js → 202.82aa7b3244e53c9edb72.js} +1 -2
  20. package/dist/js/chunks/esm/{308.f873332126eba90e5c62.js → 308.27e1e4005705ae320432.js} +1 -2
  21. package/dist/js/chunks/esm/{54.4db919e5e4e5cc6d7c72.js → 54.ece1fd6964f98d4d994f.js} +1 -2
  22. package/dist/js/chunks/esm/{619.afc5a718eff77fa423b5.js → 619.ebeb0298432a066ac05c.js} +1 -2
  23. package/dist/js/chunks/esm/{690.a9e968c7497d61e56cdc.js → 690.c5f412cc979b55740359.js} +1 -2
  24. package/dist/js/chunks/esm/{894.f1091a4a8758c26d29e4.js → 894.3604ddc9367d75191198.js} +1 -2
  25. package/dist/js/chunks/esm/{897.561a50f7d043d42169da.js → 897.a4aab2fad9401693eb12.js} +1 -2
  26. package/dist/js/chunks/umd/{202.dac7605cc555b6bda542.js → 202.5017dd0403d696bf1644.js} +1 -2
  27. package/dist/js/chunks/umd/{308.6709979849dcbdb90c9b.js → 308.4bc14b9d7b16b6ee0ab8.js} +1 -2
  28. package/dist/js/chunks/umd/{54.403470e1f7d0ef4424a7.js → 54.7fdfb4a031989470a70d.js} +1 -2
  29. package/dist/js/chunks/umd/{619.fa05ea98c10270eb64c5.js → 619.84a0c35ecee695250085.js} +1 -2
  30. package/dist/js/chunks/umd/{690.aa7054d1c53e5402c2d6.js → 690.d7041094a34a4a434be2.js} +1 -2
  31. package/dist/js/chunks/umd/{894.3e1eaf0a2aadf4434390.js → 894.c127ee4e9513c22ee97d.js} +1 -2
  32. package/dist/js/chunks/umd/{897.554ea37be4453698c167.js → 897.26932ac837a39fc91907.js} +1 -2
  33. package/dist/types/components/Badge/index.d.ts +3 -3
  34. package/dist/types/components/{Navbar → Navigation/Menu}/MegaMenu.d.ts +1 -1
  35. package/dist/types/components/{Navbar → Navigation/Menu}/Menu.d.ts +1 -1
  36. package/dist/types/components/Navigation/Nav/Nav.d.ts +20 -0
  37. package/dist/types/components/{Navbar → Navigation/Nav}/NavDropdown.d.ts +1 -1
  38. package/dist/types/components/Navigation/Nav/NavItem.d.ts +33 -0
  39. package/dist/types/components/Navigation/Navbar/Navbar.d.ts +19 -0
  40. package/dist/types/components/Navigation/SideMenu/SideMenu.d.ts +20 -0
  41. package/dist/types/components/Navigation/SideMenu/SideMenuItem.d.ts +30 -0
  42. package/dist/types/components/Navigation/SideMenu/SideMenuList.d.ts +17 -0
  43. package/dist/types/components/Navigation/index.d.ts +10 -0
  44. package/dist/types/components/PhotoViewer/PhotoViewer.d.ts +2 -2
  45. package/dist/types/components/PhotoViewer/PhotoViewerHeader.d.ts +2 -2
  46. package/dist/types/components/Tab/index.d.ts +2 -2
  47. package/dist/types/components/Toggle/index.d.ts +2 -2
  48. package/dist/types/components/Tooltip/index.d.ts +3 -3
  49. package/dist/types/components/index.d.ts +1 -1
  50. package/dist/types/lib/composables/index.d.ts +1 -0
  51. package/dist/types/lib/composables/useDatePicker.d.ts +1 -1
  52. package/dist/types/lib/composables/useDropdown.d.ts +1 -1
  53. package/dist/types/lib/composables/useModal.d.ts +1 -1
  54. package/dist/types/lib/composables/usePhotoViewer.d.ts +1 -1
  55. package/dist/types/lib/composables/useRating.d.ts +1 -1
  56. package/dist/types/lib/composables/useSideMenu.d.ts +28 -0
  57. package/dist/types/lib/constants/components.d.ts +72 -0
  58. package/dist/types/lib/types/components.d.ts +103 -0
  59. package/examples/nextjs-example.tsx +271 -0
  60. package/implementation-guide.md +505 -0
  61. package/next.config.js +69 -0
  62. package/package.json +80 -42
  63. package/postcss.config.js +28 -0
  64. package/src/Introduction.mdx +3 -5
  65. package/src/assets/fonts/HelveticaNeue/stylesheet.css +140 -127
  66. package/src/components/Accordion/Accordion.stories.tsx +58 -45
  67. package/src/components/Accordion/Accordion.tsx +14 -4
  68. package/src/components/Accordion/scripts/accordionInteractions.ts +9 -9
  69. package/src/components/Accordion/scripts/bundle.ts +1 -1
  70. package/src/components/Accordion/scripts/index.ts +3 -3
  71. package/src/components/AtomixLogo.tsx +13 -19
  72. package/src/components/Avatar/Avatar.stories.tsx +24 -21
  73. package/src/components/Avatar/Avatar.tsx +5 -8
  74. package/src/components/Avatar/AvatarGroup.tsx +11 -11
  75. package/src/components/Avatar/index.ts +1 -1
  76. package/src/components/Avatar/scripts/index.ts +66 -71
  77. package/src/components/Badge/Badge.stories.tsx +51 -21
  78. package/src/components/Badge/Badge.tsx +14 -12
  79. package/src/components/Badge/index.ts +3 -3
  80. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +40 -40
  81. package/src/components/Breadcrumb/Breadcrumb.tsx +19 -26
  82. package/src/components/Breadcrumb/index.ts +1 -1
  83. package/src/components/Breadcrumb/scripts/breadcrumb.ts +36 -34
  84. package/src/components/Breadcrumb/scripts/index.ts +1 -1
  85. package/src/components/Breadcrumb/scripts/types.ts +9 -9
  86. package/src/components/Button/Button.stories.tsx +36 -12
  87. package/src/components/Button/Button.tsx +52 -39
  88. package/src/components/Button/index.ts +1 -1
  89. package/src/components/Button/scripts/buttonInteractions.ts +9 -9
  90. package/src/components/Button/scripts/index.ts +1 -1
  91. package/src/components/Callout/Callout.stories.tsx +207 -114
  92. package/src/components/Callout/Callout.tsx +12 -12
  93. package/src/components/Callout/index.ts +1 -1
  94. package/src/components/Callout/scripts/CalloutInteractions.ts +58 -48
  95. package/src/components/Callout/scripts/bundle.ts +2 -2
  96. package/src/components/Callout/scripts/index.ts +19 -15
  97. package/src/components/Card/Card.stories.tsx +2 -2
  98. package/src/components/Card/Card.tsx +49 -72
  99. package/src/components/Card/ElevationCard.tsx +4 -8
  100. package/src/components/Card/index.ts +1 -1
  101. package/src/components/Card/scripts/bundle.ts +7 -7
  102. package/src/components/Card/scripts/cardInteractions.ts +24 -24
  103. package/src/components/Card/scripts/index.ts +25 -26
  104. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +6 -3
  105. package/src/components/ColorModeToggle/ColorModeToggle.tsx +12 -15
  106. package/src/components/ColorModeToggle/index.ts +1 -1
  107. package/src/components/Countdown/Countdown.stories.tsx +6 -2
  108. package/src/components/Countdown/Countdown.tsx +56 -48
  109. package/src/components/Countdown/index.ts +1 -1
  110. package/src/components/Countdown/scripts/index.ts +33 -28
  111. package/src/components/DataTable/DataTable.stories.tsx +23 -18
  112. package/src/components/DataTable/DataTable.tsx +39 -39
  113. package/src/components/DataTable/index.ts +1 -1
  114. package/src/components/DataTable/scripts/bundle.ts +8 -3
  115. package/src/components/DataTable/scripts/index.ts +182 -164
  116. package/src/components/DatePicker/DatePicker.stories.tsx +136 -148
  117. package/src/components/DatePicker/DatePicker.tsx +461 -420
  118. package/src/components/DatePicker/scripts/bundle.ts +12 -7
  119. package/src/components/DatePicker/scripts/componentInteractions.ts +76 -46
  120. package/src/components/DatePicker/scripts/index.ts +176 -156
  121. package/src/components/DatePicker/types.ts +32 -32
  122. package/src/components/DatePicker/utils.ts +41 -30
  123. package/src/components/Dropdown/Dropdown.stories.tsx +85 -55
  124. package/src/components/Dropdown/Dropdown.tsx +97 -88
  125. package/src/components/Dropdown/index.ts +5 -10
  126. package/src/components/Dropdown/scripts/bundle.ts +10 -10
  127. package/src/components/Dropdown/scripts/componentInteractions.ts +10 -2
  128. package/src/components/Dropdown/scripts/index.ts +122 -117
  129. package/src/components/EdgePanel/EdgePanel.stories.tsx +142 -58
  130. package/src/components/EdgePanel/EdgePanel.tsx +7 -13
  131. package/src/components/EdgePanel/index.ts +1 -1
  132. package/src/components/EdgePanel/scripts/bundle.ts +5 -5
  133. package/src/components/EdgePanel/scripts/edgePanelInteractions.ts +26 -26
  134. package/src/components/EdgePanel/scripts/index.ts +53 -53
  135. package/src/components/Form/Checkbox.stories.tsx +2 -2
  136. package/src/components/Form/Checkbox.tsx +13 -7
  137. package/src/components/Form/Form.stories.tsx +144 -218
  138. package/src/components/Form/Form.tsx +6 -6
  139. package/src/components/Form/FormGroup.stories.tsx +21 -38
  140. package/src/components/Form/FormGroup.tsx +18 -20
  141. package/src/components/Form/Input.stories.tsx +1 -1
  142. package/src/components/Form/Input.tsx +18 -8
  143. package/src/components/Form/Radio.stories.tsx +12 -25
  144. package/src/components/Form/Radio.tsx +11 -6
  145. package/src/components/Form/Select.stories.tsx +6 -6
  146. package/src/components/Form/Select.tsx +31 -33
  147. package/src/components/Form/Textarea.stories.tsx +7 -2
  148. package/src/components/Form/Textarea.tsx +17 -8
  149. package/src/components/Form/index.ts +1 -1
  150. package/src/components/Hero/Hero.stories.tsx +44 -42
  151. package/src/components/Hero/Hero.tsx +28 -38
  152. package/src/components/Hero/index.ts +1 -1
  153. package/src/components/Hero/scripts/bundle.ts +6 -6
  154. package/src/components/Hero/scripts/heroInteractions.ts +24 -29
  155. package/src/components/Hero/scripts/index.ts +16 -17
  156. package/src/components/Icon/Icon.tsx +16 -18
  157. package/src/components/Icon/index.ts +1 -1
  158. package/src/components/List/List.stories.tsx +1 -3
  159. package/src/components/List/List.tsx +6 -10
  160. package/src/components/List/ListGroup.tsx +1 -1
  161. package/src/components/List/index.ts +1 -1
  162. package/src/components/Messages/Messages.stories.tsx +30 -29
  163. package/src/components/Messages/Messages.tsx +60 -55
  164. package/src/components/Messages/index.ts +1 -1
  165. package/src/components/Messages/scripts/bundle.ts +1 -6
  166. package/src/components/Messages/scripts/componentInteractions.ts +32 -37
  167. package/src/components/Messages/scripts/index.ts +61 -55
  168. package/src/components/Modal/Modal.stories.tsx +77 -53
  169. package/src/components/Modal/Modal.tsx +63 -62
  170. package/src/components/Modal/index.ts +1 -1
  171. package/src/components/Modal/scripts/bundle.ts +3 -3
  172. package/src/components/Modal/scripts/index.ts +96 -84
  173. package/src/components/Modal/scripts/modalInteractions.ts +16 -14
  174. package/src/components/{Navbar → Navigation/Menu}/MegaMenu.tsx +50 -59
  175. package/src/components/Navigation/Menu/Menu.stories.tsx +340 -0
  176. package/src/components/Navigation/Menu/Menu.tsx +110 -0
  177. package/src/components/Navigation/Nav/Nav.stories.tsx +458 -0
  178. package/src/components/Navigation/Nav/Nav.tsx +50 -0
  179. package/src/components/Navigation/Nav/NavDropdown.tsx +105 -0
  180. package/src/components/Navigation/Nav/NavItem.tsx +159 -0
  181. package/src/components/{Navbar → Navigation/Navbar}/Navbar.stories.tsx +198 -104
  182. package/src/components/Navigation/Navbar/Navbar.tsx +150 -0
  183. package/src/components/Navigation/README.md +314 -0
  184. package/src/components/Navigation/SideMenu/SideMenu.README.md +494 -0
  185. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +618 -0
  186. package/src/components/Navigation/SideMenu/SideMenu.tsx +101 -0
  187. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +95 -0
  188. package/src/components/Navigation/SideMenu/SideMenuList.tsx +41 -0
  189. package/src/components/Navigation/index.ts +23 -0
  190. package/src/components/Navigation/scripts/NavbarInteractions.ts +171 -0
  191. package/src/components/Navigation/scripts/SideMenu.ts +319 -0
  192. package/src/components/Navigation/scripts/SideMenuBundle.ts +69 -0
  193. package/src/components/Navigation/scripts/SideMenuInteractions.ts +250 -0
  194. package/src/components/Navigation/scripts/bundle.ts +58 -0
  195. package/src/components/Navigation/scripts/index.ts +248 -0
  196. package/src/components/Pagination/Pagination.stories.tsx +34 -33
  197. package/src/components/Pagination/Pagination.tsx +25 -35
  198. package/src/components/Pagination/index.ts +1 -1
  199. package/src/components/Pagination/scripts/index.ts +42 -37
  200. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +48 -48
  201. package/src/components/PhotoViewer/PhotoViewer.tsx +29 -46
  202. package/src/components/PhotoViewer/PhotoViewerHeader.tsx +20 -26
  203. package/src/components/PhotoViewer/PhotoViewerImage.tsx +19 -17
  204. package/src/components/PhotoViewer/PhotoViewerInfo.tsx +13 -5
  205. package/src/components/PhotoViewer/PhotoViewerNavigation.tsx +5 -5
  206. package/src/components/PhotoViewer/PhotoViewerThumbnails.tsx +31 -30
  207. package/src/components/PhotoViewer/examples/ImageGallery.tsx +27 -37
  208. package/src/components/PhotoViewer/examples/SimpleGallery.tsx +19 -13
  209. package/src/components/PhotoViewer/examples/index.ts +1 -1
  210. package/src/components/PhotoViewer/index.ts +1 -1
  211. package/src/components/PhotoViewer/scripts/PhotoViewerInteractions.ts +43 -33
  212. package/src/components/PhotoViewer/scripts/bundle.ts +14 -14
  213. package/src/components/PhotoViewer/scripts/index.ts +173 -129
  214. package/src/components/Popover/Popover.stories.tsx +11 -12
  215. package/src/components/Popover/Popover.tsx +36 -36
  216. package/src/components/Popover/index.ts +1 -1
  217. package/src/components/Popover/scripts/bundle.ts +1 -1
  218. package/src/components/Popover/scripts/componentInteractions.ts +34 -46
  219. package/src/components/Popover/scripts/index.ts +64 -53
  220. package/src/components/ProductReview/ProductReview.stories.tsx +10 -8
  221. package/src/components/ProductReview/ProductReview.tsx +28 -32
  222. package/src/components/ProductReview/scripts/componentInteractions.ts +20 -20
  223. package/src/components/Progress/Progress.tsx +36 -34
  224. package/src/components/Progress/scripts/bundle.ts +7 -2
  225. package/src/components/Progress/scripts/componentInteractions.ts +29 -23
  226. package/src/components/Progress/scripts/index.ts +45 -39
  227. package/src/components/Rating/Rating.stories.tsx +3 -16
  228. package/src/components/Rating/Rating.tsx +250 -231
  229. package/src/components/Rating/scripts/bundle.ts +11 -6
  230. package/src/components/Rating/scripts/index.ts +85 -80
  231. package/src/components/Rating/scripts/ratingInteractions.ts +27 -24
  232. package/src/components/River/River.stories.tsx +70 -24
  233. package/src/components/River/River.tsx +28 -38
  234. package/src/components/River/index.ts +1 -1
  235. package/src/components/River/scripts/index.ts +11 -12
  236. package/src/components/SectionIntro/SectionIntro.stories.tsx +12 -9
  237. package/src/components/SectionIntro/SectionIntro.tsx +25 -31
  238. package/src/components/SectionIntro/scripts/componentInteractions.ts +1 -1
  239. package/src/components/SectionIntro/scripts/index.ts +30 -16
  240. package/src/components/Spinner/Spinner.stories.tsx +5 -7
  241. package/src/components/Spinner/Spinner.tsx +11 -6
  242. package/src/components/Spinner/index.ts +2 -2
  243. package/src/components/Steps/Steps.stories.tsx +44 -48
  244. package/src/components/Steps/Steps.tsx +20 -20
  245. package/src/components/Steps/index.ts +1 -1
  246. package/src/components/Steps/scripts/index.ts +9 -9
  247. package/src/components/Tab/Tab.stories.tsx +14 -6
  248. package/src/components/Tab/Tab.tsx +16 -18
  249. package/src/components/Tab/index.ts +2 -2
  250. package/src/components/Tab/scripts/index.ts +13 -13
  251. package/src/components/Testimonial/Testimonial.stories.tsx +54 -51
  252. package/src/components/Testimonial/Testimonial.tsx +18 -19
  253. package/src/components/Testimonial/index.ts +1 -1
  254. package/src/components/Testimonial/scripts/index.ts +19 -8
  255. package/src/components/Todo/Todo.stories.tsx +7 -24
  256. package/src/components/Todo/Todo.tsx +35 -46
  257. package/src/components/Todo/index.ts +1 -1
  258. package/src/components/Todo/scripts/bundle.ts +1 -1
  259. package/src/components/Todo/scripts/index.ts +99 -81
  260. package/src/components/Todo/scripts/todoInteractions.ts +12 -12
  261. package/src/components/Todo/scripts/types.ts +3 -3
  262. package/src/components/Toggle/Toggle.stories.tsx +2 -2
  263. package/src/components/Toggle/Toggle.tsx +18 -18
  264. package/src/components/Toggle/index.ts +2 -2
  265. package/src/components/Toggle/scripts/bundle.ts +7 -2
  266. package/src/components/Toggle/scripts/index.ts +14 -10
  267. package/src/components/Toggle/scripts/toggleInteractions.ts +11 -14
  268. package/src/components/Tooltip/Tooltip.stories.tsx +13 -6
  269. package/src/components/Tooltip/Tooltip.tsx +25 -15
  270. package/src/components/Tooltip/index.ts +3 -3
  271. package/src/components/Tooltip/scripts/bundle.ts +0 -1
  272. package/src/components/Tooltip/scripts/index.ts +44 -41
  273. package/src/components/Tooltip/scripts/tooltipInteractions.ts +22 -22
  274. package/src/components/Upload/Upload.stories.tsx +28 -34
  275. package/src/components/Upload/Upload.tsx +86 -71
  276. package/src/components/Upload/index.ts +1 -1
  277. package/src/components/Upload/scripts/index.ts +58 -43
  278. package/src/components/index.ts +5 -6
  279. package/src/design-tokens/BoxShadow/BoxShadow.stories.tsx +13 -10
  280. package/src/design-tokens/Colors/colors.scss +10 -7
  281. package/src/design-tokens/Colors/colors.stories.tsx +46 -59
  282. package/src/design-tokens/Spacing/Spacing.scss +7 -5
  283. package/src/design-tokens/Spacing/Spacing.stories.tsx +19 -18
  284. package/src/design-tokens/Typography/Typography.scss +88 -25
  285. package/src/design-tokens/Typography/Typography.stories.tsx +22 -25
  286. package/src/docs/implementation-guide.mdx +2 -2
  287. package/src/htmlComponentsEntry.ts +23 -23
  288. package/src/index.ts +1 -1
  289. package/src/layouts/Grid/Container.tsx +6 -10
  290. package/src/layouts/Grid/Grid.stories.tsx +72 -34
  291. package/src/layouts/Grid/Grid.tsx +6 -13
  292. package/src/layouts/Grid/GridCol.tsx +29 -26
  293. package/src/layouts/Grid/Row.tsx +6 -13
  294. package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +79 -72
  295. package/src/layouts/MasonryGrid/MasonryGrid.tsx +23 -25
  296. package/src/layouts/MasonryGrid/MasonryGridItem.tsx +4 -12
  297. package/src/layouts/index.ts +3 -4
  298. package/src/lib/composables/index.ts +3 -3
  299. package/src/lib/composables/useAccordion.ts +15 -6
  300. package/src/lib/composables/useBadge.ts +3 -3
  301. package/src/lib/composables/useBreadcrumb.ts +6 -12
  302. package/src/lib/composables/useButton.ts +3 -3
  303. package/src/lib/composables/useCallout.ts +3 -3
  304. package/src/lib/composables/useCard.ts +50 -28
  305. package/src/lib/composables/useCheckbox.ts +7 -7
  306. package/src/lib/composables/useDataTable.ts +61 -57
  307. package/src/lib/composables/useDatePicker.ts +255 -231
  308. package/src/lib/composables/useDropdown.ts +90 -75
  309. package/src/lib/composables/useEdgePanel.ts +50 -47
  310. package/src/lib/composables/useForm.ts +4 -7
  311. package/src/lib/composables/useFormGroup.ts +11 -12
  312. package/src/lib/composables/useHero.ts +36 -38
  313. package/src/lib/composables/useInput.ts +9 -10
  314. package/src/lib/composables/useMessages.ts +12 -14
  315. package/src/lib/composables/useModal.ts +37 -34
  316. package/src/lib/composables/useNavbar.ts +33 -22
  317. package/src/lib/composables/usePagination.ts +3 -10
  318. package/src/lib/composables/usePhotoViewer.ts +625 -578
  319. package/src/lib/composables/usePopover.ts +68 -62
  320. package/src/lib/composables/useProgress.ts +9 -12
  321. package/src/lib/composables/useRadio.ts +4 -4
  322. package/src/lib/composables/useRating.ts +82 -70
  323. package/src/lib/composables/useRiver.ts +28 -31
  324. package/src/lib/composables/useSelect.ts +7 -8
  325. package/src/lib/composables/useSideMenu.ts +197 -0
  326. package/src/lib/composables/useSpinner.ts +3 -3
  327. package/src/lib/composables/useTextarea.ts +8 -9
  328. package/src/lib/composables/useTodo.ts +14 -18
  329. package/src/lib/constants/components.ts +191 -118
  330. package/src/lib/constants/index.ts +1 -1
  331. package/src/lib/types/components.ts +454 -324
  332. package/src/lib/utils/dom.ts +2 -6
  333. package/src/lib/utils/icons.ts +20 -12
  334. package/src/lib/utils/index.ts +2 -2
  335. package/src/lib/utils/useForkRef.ts +1 -2
  336. package/src/styles/01-settings/_index.scss +59 -59
  337. package/src/styles/01-settings/_settings.accordion.scss +21 -21
  338. package/src/styles/01-settings/_settings.animations.scss +2 -2
  339. package/src/styles/01-settings/_settings.avatar-group.scss +14 -14
  340. package/src/styles/01-settings/_settings.avatar.scss +31 -31
  341. package/src/styles/01-settings/_settings.badge.scss +11 -11
  342. package/src/styles/01-settings/_settings.border-radius.scss +10 -9
  343. package/src/styles/01-settings/_settings.border.scss +7 -7
  344. package/src/styles/01-settings/_settings.box-shadow.scss +24 -12
  345. package/src/styles/01-settings/_settings.breadcrumb.scss +18 -18
  346. package/src/styles/01-settings/_settings.btn-group.scss +1 -1
  347. package/src/styles/01-settings/_settings.button.scss +63 -49
  348. package/src/styles/01-settings/_settings.callout.scss +27 -7
  349. package/src/styles/01-settings/_settings.card.scss +27 -30
  350. package/src/styles/01-settings/_settings.checkbox-group.scss +2 -3
  351. package/src/styles/01-settings/_settings.checkbox.scss +17 -18
  352. package/src/styles/01-settings/_settings.color-mode.scss +1 -1
  353. package/src/styles/01-settings/_settings.colors.scss +197 -214
  354. package/src/styles/01-settings/_settings.config.scss +1 -3
  355. package/src/styles/01-settings/_settings.countdown.scss +14 -14
  356. package/src/styles/01-settings/_settings.data-table.scss +6 -6
  357. package/src/styles/01-settings/_settings.datepicker.scss +40 -42
  358. package/src/styles/01-settings/_settings.dropdown.scss +30 -30
  359. package/src/styles/01-settings/_settings.edge-panel.scss +16 -16
  360. package/src/styles/01-settings/_settings.fonts.scss +14 -12
  361. package/src/styles/01-settings/_settings.form-group.scss +10 -10
  362. package/src/styles/01-settings/_settings.form.scss +3 -3
  363. package/src/styles/01-settings/_settings.grid.scss +1 -1
  364. package/src/styles/01-settings/_settings.hero.scss +23 -23
  365. package/src/styles/01-settings/_settings.input.scss +32 -32
  366. package/src/styles/01-settings/_settings.link.scss +6 -6
  367. package/src/styles/01-settings/_settings.list-group.scss +12 -12
  368. package/src/styles/01-settings/_settings.list.scss +2 -2
  369. package/src/styles/01-settings/_settings.maps.scss +183 -188
  370. package/src/styles/01-settings/_settings.masonry-grid.scss +2 -2
  371. package/src/styles/01-settings/_settings.menu.scss +35 -38
  372. package/src/styles/01-settings/_settings.messages.scss +71 -77
  373. package/src/styles/01-settings/_settings.modal.scss +24 -24
  374. package/src/styles/01-settings/_settings.nav.scss +15 -15
  375. package/src/styles/01-settings/_settings.navbar.scss +39 -12
  376. package/src/styles/01-settings/_settings.pagination.scss +21 -21
  377. package/src/styles/01-settings/_settings.photoviewer.scss +1 -1
  378. package/src/styles/01-settings/_settings.popover.scss +3 -3
  379. package/src/styles/01-settings/_settings.position.scss +2 -2
  380. package/src/styles/01-settings/_settings.progress.scss +15 -18
  381. package/src/styles/01-settings/_settings.rating.scss +7 -7
  382. package/src/styles/01-settings/_settings.river.scss +25 -25
  383. package/src/styles/01-settings/_settings.sectionintro.scss +15 -16
  384. package/src/styles/01-settings/_settings.select.scss +31 -31
  385. package/src/styles/01-settings/_settings.side-menu.scss +64 -16
  386. package/src/styles/01-settings/_settings.skeleton.scss +12 -12
  387. package/src/styles/01-settings/_settings.spacing.scss +62 -33
  388. package/src/styles/01-settings/_settings.spinner.scss +10 -10
  389. package/src/styles/01-settings/_settings.steps.scss +22 -22
  390. package/src/styles/01-settings/_settings.tabs.scss +25 -25
  391. package/src/styles/01-settings/_settings.testimonials.scss +17 -19
  392. package/src/styles/01-settings/_settings.todo.scss +1 -1
  393. package/src/styles/01-settings/_settings.toggle.scss +26 -26
  394. package/src/styles/01-settings/_settings.tooltip.scss +15 -15
  395. package/src/styles/01-settings/_settings.typography.scss +65 -48
  396. package/src/styles/01-settings/_settings.upload.scss +70 -77
  397. package/src/styles/01-settings/_settings.z-layers.scss +1 -1
  398. package/src/styles/02-tools/_index.scss +19 -19
  399. package/src/styles/02-tools/_tools.animations.scss +4 -4
  400. package/src/styles/02-tools/_tools.border-radius.scss +4 -5
  401. package/src/styles/02-tools/_tools.breakpoints.scss +33 -34
  402. package/src/styles/02-tools/_tools.button.scss +49 -25
  403. package/src/styles/02-tools/_tools.color-mode.scss +11 -11
  404. package/src/styles/02-tools/_tools.event.scss +1 -1
  405. package/src/styles/02-tools/_tools.hidden-visually.scss +1 -1
  406. package/src/styles/02-tools/_tools.hidden.scss +1 -1
  407. package/src/styles/02-tools/_tools.map-loop.scss +9 -9
  408. package/src/styles/02-tools/_tools.media-queries.scss +5 -3
  409. package/src/styles/02-tools/_tools.object-fit.scss +3 -3
  410. package/src/styles/02-tools/_tools.placeholder.scss +0 -1
  411. package/src/styles/02-tools/_tools.rem.scss +1 -1
  412. package/src/styles/02-tools/_tools.spacing.scss +8 -34
  413. package/src/styles/02-tools/_tools.to-rgb.scss +3 -3
  414. package/src/styles/02-tools/_tools.transition.scss +1 -1
  415. package/src/styles/02-tools/_tools.utility-api.scss +29 -14
  416. package/src/styles/03-generic/_generic.fonts.scss +0 -1
  417. package/src/styles/03-generic/_generic.reset.scss +13 -8
  418. package/src/styles/03-generic/_generic.root.scss +5 -5
  419. package/src/styles/03-generic/_index.scss +4 -4
  420. package/src/styles/04-elements/_elements.all.scss +2 -2
  421. package/src/styles/04-elements/_elements.body.scss +1 -2
  422. package/src/styles/04-elements/_elements.heading.scss +37 -21
  423. package/src/styles/04-elements/_elements.links.scss +0 -1
  424. package/src/styles/04-elements/_index.scss +5 -5
  425. package/src/styles/05-objects/_index.scss +3 -3
  426. package/src/styles/05-objects/_objects.container.scss +5 -4
  427. package/src/styles/05-objects/_objects.grid.scss +12 -12
  428. package/src/styles/05-objects/_objects.masonry-grid.scss +80 -74
  429. package/src/styles/06-components/_components.accordion.scss +12 -6
  430. package/src/styles/06-components/_components.avatar-group.scss +9 -8
  431. package/src/styles/06-components/_components.avatar.scss +78 -77
  432. package/src/styles/06-components/_components.badge.scss +48 -48
  433. package/src/styles/06-components/_components.breadcrumb.scss +57 -58
  434. package/src/styles/06-components/_components.btn-group.scss +22 -22
  435. package/src/styles/06-components/_components.button.scss +118 -110
  436. package/src/styles/06-components/_components.callout.scss +21 -15
  437. package/src/styles/06-components/_components.card.scss +6 -10
  438. package/src/styles/06-components/_components.checkbox-group.scss +9 -10
  439. package/src/styles/06-components/_components.checkbox.scss +10 -17
  440. package/src/styles/06-components/_components.color-mode-toggle.scss +6 -6
  441. package/src/styles/06-components/_components.countdown.scss +53 -54
  442. package/src/styles/06-components/_components.data-table.scss +40 -36
  443. package/src/styles/06-components/_components.datepicker.scss +95 -73
  444. package/src/styles/06-components/_components.dropdown.scss +15 -9
  445. package/src/styles/06-components/_components.edge-panel.scss +87 -46
  446. package/src/styles/06-components/_components.form-group.scss +5 -4
  447. package/src/styles/06-components/_components.hero.scss +128 -132
  448. package/src/styles/06-components/_components.icon.scss +16 -16
  449. package/src/styles/06-components/_components.image-gallery.scss +9 -7
  450. package/src/styles/06-components/_components.input.scss +18 -16
  451. package/src/styles/06-components/_components.list-group.scss +52 -51
  452. package/src/styles/06-components/_components.list.scss +15 -15
  453. package/src/styles/06-components/_components.menu.scss +225 -220
  454. package/src/styles/06-components/_components.messages.scss +45 -32
  455. package/src/styles/06-components/_components.modal.scss +0 -1
  456. package/src/styles/06-components/_components.nav.scss +56 -11
  457. package/src/styles/06-components/_components.navbar.scss +278 -202
  458. package/src/styles/06-components/_components.pagination.scss +7 -6
  459. package/src/styles/06-components/_components.photoviewer.scss +121 -116
  460. package/src/styles/06-components/_components.popover.scss +10 -10
  461. package/src/styles/06-components/_components.product-review.scss +3 -3
  462. package/src/styles/06-components/_components.progress.scss +32 -35
  463. package/src/styles/06-components/_components.rating.scss +9 -8
  464. package/src/styles/06-components/_components.river.scss +4 -2
  465. package/src/styles/06-components/_components.sectionintro.scss +19 -26
  466. package/src/styles/06-components/_components.select.scss +7 -8
  467. package/src/styles/06-components/_components.side-menu.scss +154 -28
  468. package/src/styles/06-components/_components.skeleton.scss +0 -1
  469. package/src/styles/06-components/_components.spinner.scss +2 -4
  470. package/src/styles/06-components/_components.steps.scss +76 -77
  471. package/src/styles/06-components/_components.tabs.scss +17 -12
  472. package/src/styles/06-components/_components.testimonials.scss +49 -52
  473. package/src/styles/06-components/_components.todo.scss +26 -26
  474. package/src/styles/06-components/_components.tooltip.scss +114 -115
  475. package/src/styles/06-components/_components.upload.scss +8 -18
  476. package/src/styles/06-components/_index.scss +48 -48
  477. package/src/styles/99-utilities/_index.scss +18 -18
  478. package/src/styles/99-utilities/_utilities.background.scss +13 -13
  479. package/src/styles/99-utilities/_utilities.border.scss +30 -30
  480. package/src/styles/99-utilities/_utilities.clearfix.scss +1 -1
  481. package/src/styles/99-utilities/_utilities.display.scss +5 -4
  482. package/src/styles/99-utilities/_utilities.flex.scss +19 -19
  483. package/src/styles/99-utilities/_utilities.link.scss +52 -35
  484. package/src/styles/99-utilities/_utilities.object-fit.scss +3 -3
  485. package/src/styles/99-utilities/_utilities.opacity.scss +6 -6
  486. package/src/styles/99-utilities/_utilities.overflow.scss +4 -4
  487. package/src/styles/99-utilities/_utilities.position.scss +8 -8
  488. package/src/styles/99-utilities/_utilities.shadow.scss +13 -13
  489. package/src/styles/99-utilities/_utilities.sizes.scss +17 -17
  490. package/src/styles/99-utilities/_utilities.spacing.scss +72 -37
  491. package/src/styles/99-utilities/_utilities.text.scss +15 -15
  492. package/src/styles/99-utilities/_utilities.visibility.scss +8 -8
  493. package/src/styles/99-utilities/_utilities.visually-hidden.scss +1 -1
  494. package/src/styles/99-utilities/_utilities.z-index.scss +2 -2
  495. package/tsconfig.json +74 -0
  496. package/webpack.config.js +463 -0
  497. package/NPM_PUBLISHING.md +0 -221
  498. package/dist/css/atomix.css.map +0 -1
  499. package/dist/js/194.js.map +0 -1
  500. package/dist/js/atomix.react.esm.js.map +0 -1
  501. package/dist/js/atomix.react.umd.js.map +0 -1
  502. package/dist/js/chunks/esm/202.ff48d27672233280e021.js.map +0 -1
  503. package/dist/js/chunks/esm/308.f873332126eba90e5c62.js.map +0 -1
  504. package/dist/js/chunks/esm/54.4db919e5e4e5cc6d7c72.js.map +0 -1
  505. package/dist/js/chunks/esm/619.afc5a718eff77fa423b5.js.map +0 -1
  506. package/dist/js/chunks/esm/690.a9e968c7497d61e56cdc.js.map +0 -1
  507. package/dist/js/chunks/esm/894.f1091a4a8758c26d29e4.js.map +0 -1
  508. package/dist/js/chunks/esm/897.561a50f7d043d42169da.js.map +0 -1
  509. package/dist/js/chunks/umd/202.dac7605cc555b6bda542.js.map +0 -1
  510. package/dist/js/chunks/umd/308.6709979849dcbdb90c9b.js.map +0 -1
  511. package/dist/js/chunks/umd/54.403470e1f7d0ef4424a7.js.map +0 -1
  512. package/dist/js/chunks/umd/619.fa05ea98c10270eb64c5.js.map +0 -1
  513. package/dist/js/chunks/umd/690.aa7054d1c53e5402c2d6.js.map +0 -1
  514. package/dist/js/chunks/umd/894.3e1eaf0a2aadf4434390.js.map +0 -1
  515. package/dist/js/chunks/umd/897.554ea37be4453698c167.js.map +0 -1
  516. package/dist/types/components/Navbar/Nav.d.ts +0 -5
  517. package/dist/types/components/Navbar/NavItem.d.ts +0 -5
  518. package/dist/types/components/Navbar/Navbar.d.ts +0 -5
  519. package/dist/types/components/Navbar/index.d.ts +0 -6
  520. package/src/components/Navbar/Menu.tsx +0 -122
  521. package/src/components/Navbar/Nav.tsx +0 -35
  522. package/src/components/Navbar/NavDropdown.tsx +0 -108
  523. package/src/components/Navbar/NavItem.tsx +0 -128
  524. package/src/components/Navbar/Navbar.tsx +0 -124
  525. package/src/components/Navbar/index.ts +0 -6
@@ -1,3 +1,3 @@
1
1
  export { Button } from './Button';
2
2
  export { default } from './Button';
3
- export type { ButtonProps } from './Button';
3
+ export type { ButtonProps } from './Button';
@@ -7,13 +7,13 @@ import { addClass, removeClass } from '../../../lib/utils/dom';
7
7
  */
8
8
  export function applyHoverEffect(button: HTMLButtonElement): void {
9
9
  const hoverClass = 'is-hovered';
10
-
10
+
11
11
  button.addEventListener('mouseenter', () => {
12
12
  if (!button.disabled) {
13
13
  addClass(button, hoverClass);
14
14
  }
15
15
  });
16
-
16
+
17
17
  button.addEventListener('mouseleave', () => {
18
18
  removeClass(button, hoverClass);
19
19
  });
@@ -25,17 +25,17 @@ export function applyHoverEffect(button: HTMLButtonElement): void {
25
25
  */
26
26
  export function applyActiveEffect(button: HTMLButtonElement): void {
27
27
  const activeClass = 'is-active';
28
-
28
+
29
29
  button.addEventListener('mousedown', () => {
30
30
  if (!button.disabled) {
31
31
  addClass(button, activeClass);
32
32
  }
33
33
  });
34
-
34
+
35
35
  button.addEventListener('mouseup', () => {
36
36
  removeClass(button, activeClass);
37
37
  });
38
-
38
+
39
39
  button.addEventListener('mouseleave', () => {
40
40
  removeClass(button, activeClass);
41
41
  });
@@ -56,18 +56,18 @@ export function initializeButton(
56
56
  ): void {
57
57
  const { onClick, enableHoverEffect = true, enableActiveEffect = true } = options || {};
58
58
  const { handleClick } = useButton();
59
-
59
+
60
60
  // Set up click handler with disabled state check
61
61
  if (onClick) {
62
62
  button.addEventListener('click', handleClick(onClick));
63
63
  }
64
-
64
+
65
65
  // Apply interaction effects
66
66
  if (enableHoverEffect) {
67
67
  applyHoverEffect(button);
68
68
  }
69
-
69
+
70
70
  if (enableActiveEffect) {
71
71
  applyActiveEffect(button);
72
72
  }
73
- }
73
+ }
@@ -1 +1 @@
1
- export * from './buttonInteractions';
1
+ export * from './buttonInteractions';
@@ -11,9 +11,10 @@ const meta: Meta<typeof Callout> = {
11
11
  layout: 'padded',
12
12
  docs: {
13
13
  description: {
14
- component: 'Callout components are used to display important messages, notifications, or alerts to users. They can be used to provide feedback, warnings, errors, or general information.'
15
- }
16
- }
14
+ component:
15
+ 'Callout components are used to display important messages, notifications, or alerts to users. They can be used to provide feedback, warnings, errors, or general information.',
16
+ },
17
+ },
17
18
  },
18
19
  argTypes: {
19
20
  variant: {
@@ -92,25 +93,49 @@ type Story = StoryObj<typeof Callout>;
92
93
  // Icon components for different callout types
93
94
  const InfoIcon = () => (
94
95
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
95
- <path d="M12 16V12M12 8H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
96
+ <path
97
+ d="M12 16V12M12 8H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"
98
+ stroke="currentColor"
99
+ strokeWidth="2"
100
+ strokeLinecap="round"
101
+ strokeLinejoin="round"
102
+ />
96
103
  </svg>
97
104
  );
98
105
 
99
106
  const SuccessIcon = () => (
100
107
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
101
- <path d="M9 12L11 14L15 10M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
108
+ <path
109
+ d="M9 12L11 14L15 10M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z"
110
+ stroke="currentColor"
111
+ strokeWidth="2"
112
+ strokeLinecap="round"
113
+ strokeLinejoin="round"
114
+ />
102
115
  </svg>
103
116
  );
104
117
 
105
118
  const WarningIcon = () => (
106
119
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
107
- <path d="M12 9V13M12 17H12.01M3.98069 8.00001C3.32275 9.15122 3 10.5502 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C10.5502 3 9.15122 3.32275 8.00001 3.98069" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
120
+ <path
121
+ d="M12 9V13M12 17H12.01M3.98069 8.00001C3.32275 9.15122 3 10.5502 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C10.5502 3 9.15122 3.32275 8.00001 3.98069"
122
+ stroke="currentColor"
123
+ strokeWidth="2"
124
+ strokeLinecap="round"
125
+ strokeLinejoin="round"
126
+ />
108
127
  </svg>
109
128
  );
110
129
 
111
130
  const ErrorIcon = () => (
112
131
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
113
- <path d="M12 9V13M12 17H12.01M11.2926 3.05737C11.5093 3.01652 11.7321 3 11.9565 3C16.3908 3 20 6.60914 20 11.0435C20 11.2679 19.9835 11.4907 19.9426 11.7074C19.4862 15.0952 16.5609 17.7241 13 17.9711C12.6712 17.9903 12.3375 18 12 18C7.58172 18 4 14.4183 4 10C4 6.43913 6.62884 3.51375 10.0166 3.05736C10.2333 3.01652 10.4561 3 10.6805 3C10.9049 3 11.1277 3.01652 11.3444 3.05736L11.2926 3.05737Z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
132
+ <path
133
+ d="M12 9V13M12 17H12.01M11.2926 3.05737C11.5093 3.01652 11.7321 3 11.9565 3C16.3908 3 20 6.60914 20 11.0435C20 11.2679 19.9835 11.4907 19.9426 11.7074C19.4862 15.0952 16.5609 17.7241 13 17.9711C12.6712 17.9903 12.3375 18 12 18C7.58172 18 4 14.4183 4 10C4 6.43913 6.62884 3.51375 10.0166 3.05736C10.2333 3.01652 10.4561 3 10.6805 3C10.9049 3 11.1277 3.01652 11.3444 3.05736L11.2926 3.05737Z"
134
+ stroke="currentColor"
135
+ strokeWidth="2"
136
+ strokeLinecap="round"
137
+ strokeLinejoin="round"
138
+ />
114
139
  </svg>
115
140
  );
116
141
 
@@ -125,10 +150,10 @@ export const Default: Story = {
125
150
  parameters: {
126
151
  docs: {
127
152
  description: {
128
- story: 'The default callout with a title, content, and an icon.'
129
- }
130
- }
131
- }
153
+ story: 'The default callout with a title, content, and an icon.',
154
+ },
155
+ },
156
+ },
132
157
  };
133
158
 
134
159
  export const Success: Story = {
@@ -141,10 +166,10 @@ export const Success: Story = {
141
166
  parameters: {
142
167
  docs: {
143
168
  description: {
144
- story: 'Use success callouts to confirm that an action was completed successfully.'
145
- }
146
- }
147
- }
169
+ story: 'Use success callouts to confirm that an action was completed successfully.',
170
+ },
171
+ },
172
+ },
148
173
  };
149
174
 
150
175
  export const Warning: Story = {
@@ -157,10 +182,11 @@ export const Warning: Story = {
157
182
  parameters: {
158
183
  docs: {
159
184
  description: {
160
- story: 'Warning callouts alert users to potential issues or important information they should be aware of.'
161
- }
162
- }
163
- }
185
+ story:
186
+ 'Warning callouts alert users to potential issues or important information they should be aware of.',
187
+ },
188
+ },
189
+ },
164
190
  };
165
191
 
166
192
  export const Error: Story = {
@@ -173,10 +199,10 @@ export const Error: Story = {
173
199
  parameters: {
174
200
  docs: {
175
201
  description: {
176
- story: 'Error callouts indicate that something went wrong and requires attention.'
177
- }
178
- }
179
- }
202
+ story: 'Error callouts indicate that something went wrong and requires attention.',
203
+ },
204
+ },
205
+ },
180
206
  };
181
207
 
182
208
  // Layout variants
@@ -196,10 +222,11 @@ export const WithActions: Story = {
196
222
  parameters: {
197
223
  docs: {
198
224
  description: {
199
- story: 'Callouts can include action buttons to allow users to respond directly to the message.'
200
- }
201
- }
202
- }
225
+ story:
226
+ 'Callouts can include action buttons to allow users to respond directly to the message.',
227
+ },
228
+ },
229
+ },
203
230
  };
204
231
 
205
232
  export const Dismissible: Story = {
@@ -213,10 +240,11 @@ export const Dismissible: Story = {
213
240
  parameters: {
214
241
  docs: {
215
242
  description: {
216
- story: 'Dismissible callouts include a close button that allows users to remove the callout from view.'
217
- }
218
- }
219
- }
243
+ story:
244
+ 'Dismissible callouts include a close button that allows users to remove the callout from view.',
245
+ },
246
+ },
247
+ },
220
248
  };
221
249
 
222
250
  export const OneLine: Story = {
@@ -229,10 +257,11 @@ export const OneLine: Story = {
229
257
  parameters: {
230
258
  docs: {
231
259
  description: {
232
- story: 'One-line callouts are more compact and display the title and icon in a single line.'
233
- }
234
- }
235
- }
260
+ story:
261
+ 'One-line callouts are more compact and display the title and icon in a single line.',
262
+ },
263
+ },
264
+ },
236
265
  };
237
266
 
238
267
  export const Toast: Story = {
@@ -247,10 +276,11 @@ export const Toast: Story = {
247
276
  parameters: {
248
277
  docs: {
249
278
  description: {
250
- story: 'Toast notifications are temporary messages that appear and disappear automatically.'
251
- }
252
- }
253
- }
279
+ story:
280
+ 'Toast notifications are temporary messages that appear and disappear automatically.',
281
+ },
282
+ },
283
+ },
254
284
  };
255
285
 
256
286
  // Theme variants
@@ -264,10 +294,11 @@ export const Dark: Story = {
264
294
  parameters: {
265
295
  docs: {
266
296
  description: {
267
- story: 'Dark callouts are useful for dark-themed interfaces or for creating visual contrast.'
268
- }
269
- }
270
- }
297
+ story:
298
+ 'Dark callouts are useful for dark-themed interfaces or for creating visual contrast.',
299
+ },
300
+ },
301
+ },
271
302
  };
272
303
 
273
304
  export const Light: Story = {
@@ -280,68 +311,120 @@ export const Light: Story = {
280
311
  parameters: {
281
312
  docs: {
282
313
  description: {
283
- story: 'Light callouts are useful for light-themed interfaces or for creating visual contrast.'
284
- }
285
- }
286
- }
314
+ story:
315
+ 'Light callouts are useful for light-themed interfaces or for creating visual contrast.',
316
+ },
317
+ },
318
+ },
287
319
  };
288
320
 
289
321
  // Interactive examples
290
322
  const ToastDemoTemplate = () => {
291
- const [toasts, setToasts] = useState<{id: string, variant: string}[]>([]);
292
-
323
+ const [toasts, setToasts] = useState<{ id: string; variant: string }[]>([]);
324
+
293
325
  const addToast = (variant: string) => {
294
326
  const id = Math.random().toString(36).substring(2, 9);
295
- setToasts([...toasts, {id, variant}]);
296
-
327
+ setToasts([...toasts, { id, variant }]);
328
+
297
329
  // Auto-remove after 5 seconds
298
330
  setTimeout(() => {
299
331
  setToasts(current => current.filter(toast => toast.id !== id));
300
332
  }, 5000);
301
333
  };
302
-
334
+
303
335
  const removeToast = (id: string) => {
304
336
  setToasts(current => current.filter(toast => toast.id !== id));
305
337
  };
306
-
338
+
307
339
  const getIcon = (variant: string) => {
308
- switch(variant) {
309
- case 'success': return <SuccessIcon />;
310
- case 'warning': return <WarningIcon />;
311
- case 'error': return <ErrorIcon />;
312
- default: return <InfoIcon />;
340
+ switch (variant) {
341
+ case 'success':
342
+ return <SuccessIcon />;
343
+ case 'warning':
344
+ return <WarningIcon />;
345
+ case 'error':
346
+ return <ErrorIcon />;
347
+ default:
348
+ return <InfoIcon />;
313
349
  }
314
350
  };
315
-
351
+
316
352
  const getTitle = (variant: string) => {
317
- switch(variant) {
318
- case 'success': return 'Success';
319
- case 'warning': return 'Warning';
320
- case 'error': return 'Error';
321
- default: return 'Information';
353
+ switch (variant) {
354
+ case 'success':
355
+ return 'Success';
356
+ case 'warning':
357
+ return 'Warning';
358
+ case 'error':
359
+ return 'Error';
360
+ default:
361
+ return 'Information';
322
362
  }
323
363
  };
324
-
364
+
325
365
  const getMessage = (variant: string) => {
326
- switch(variant) {
327
- case 'success': return 'Operation completed successfully!';
328
- case 'warning': return 'Please review before continuing.';
329
- case 'error': return 'An error occurred. Please try again.';
330
- default: return 'This is an informational message.';
366
+ switch (variant) {
367
+ case 'success':
368
+ return 'Operation completed successfully!';
369
+ case 'warning':
370
+ return 'Please review before continuing.';
371
+ case 'error':
372
+ return 'An error occurred. Please try again.';
373
+ default:
374
+ return 'This is an informational message.';
331
375
  }
332
376
  };
333
-
377
+
334
378
  return (
335
379
  <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
336
380
  <div style={{ display: 'flex', gap: '8px' }}>
337
- <Button label="Add Info Toast" variant="primary" size="sm" onClick={() => addToast('info')} />
338
- <Button label="Add Success Toast" variant="success" size="sm" onClick={() => addToast('success')} />
339
- <Button label="Add Warning Toast" variant="warning" size="sm" onClick={() => addToast('warning')} />
340
- <Button label="Add Error Toast" variant="error" size="sm" onClick={() => addToast('error')} />
381
+ <Button
382
+ label="Add Info Toast"
383
+ variant="primary"
384
+ size="sm"
385
+ onClick={() => addToast('info')}
386
+ />
387
+ <Button
388
+ label="Add Success Toast"
389
+ variant="success"
390
+ size="sm"
391
+ onClick={() => addToast('success')}
392
+ />
393
+ <Button
394
+ label="Add Warning Toast"
395
+ variant="warning"
396
+ size="sm"
397
+ onClick={() => addToast('warning')}
398
+ />
399
+ <Button
400
+ label="Add Error Toast"
401
+ variant="error"
402
+ size="sm"
403
+ onClick={() => addToast('error')}
404
+ />
341
405
  </div>
342
-
343
- <div style={{ position: 'relative', height: '300px', border: '1px dashed #ccc', borderRadius: '8px', padding: '16px', overflow: 'hidden' }}>
344
- <div style={{ position: 'absolute', top: '16px', right: '16px', display: 'flex', flexDirection: 'column', gap: '8px', maxWidth: '350px' }}>
406
+
407
+ <div
408
+ style={{
409
+ position: 'relative',
410
+ height: '300px',
411
+ border: '1px dashed #ccc',
412
+ borderRadius: '8px',
413
+ padding: '16px',
414
+ overflow: 'hidden',
415
+ }}
416
+ >
417
+ <div
418
+ style={{
419
+ position: 'absolute',
420
+ top: '16px',
421
+ right: '16px',
422
+ display: 'flex',
423
+ flexDirection: 'column',
424
+ gap: '8px',
425
+ maxWidth: '350px',
426
+ }}
427
+ >
345
428
  {toasts.map(toast => (
346
429
  <Callout
347
430
  key={toast.id}
@@ -356,7 +439,15 @@ const ToastDemoTemplate = () => {
356
439
  ))}
357
440
  </div>
358
441
  {toasts.length === 0 && (
359
- <div style={{ display: 'flex', height: '100%', alignItems: 'center', justifyContent: 'center', color: '#666' }}>
442
+ <div
443
+ style={{
444
+ display: 'flex',
445
+ height: '100%',
446
+ alignItems: 'center',
447
+ justifyContent: 'center',
448
+ color: '#666',
449
+ }}
450
+ >
360
451
  Click a button above to show toast notifications here
361
452
  </div>
362
453
  )}
@@ -370,19 +461,20 @@ export const ToastDemo: Story = {
370
461
  parameters: {
371
462
  docs: {
372
463
  description: {
373
- story: 'Interactive demo showing how toast notifications can be triggered and displayed in different variants.'
374
- }
375
- }
376
- }
464
+ story:
465
+ 'Interactive demo showing how toast notifications can be triggered and displayed in different variants.',
466
+ },
467
+ },
468
+ },
377
469
  };
378
470
 
379
471
  const AutoDismissTemplate = () => {
380
472
  const [visible, setVisible] = useState(true);
381
473
  const [countdown, setCountdown] = useState(5);
382
-
474
+
383
475
  useEffect(() => {
384
476
  if (!visible) return;
385
-
477
+
386
478
  const timer = setInterval(() => {
387
479
  setCountdown(prev => {
388
480
  if (prev <= 1) {
@@ -393,15 +485,15 @@ const AutoDismissTemplate = () => {
393
485
  return prev - 1;
394
486
  });
395
487
  }, 1000);
396
-
488
+
397
489
  return () => clearInterval(timer);
398
490
  }, [visible]);
399
-
491
+
400
492
  const resetCallout = () => {
401
493
  setVisible(true);
402
494
  setCountdown(5);
403
495
  };
404
-
496
+
405
497
  return (
406
498
  <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
407
499
  {visible ? (
@@ -411,7 +503,8 @@ const AutoDismissTemplate = () => {
411
503
  icon={<WarningIcon />}
412
504
  onClose={() => setVisible(false)}
413
505
  >
414
- This callout will automatically dismiss after the countdown. You can also dismiss it manually.
506
+ This callout will automatically dismiss after the countdown. You can also dismiss it
507
+ manually.
415
508
  </Callout>
416
509
  ) : (
417
510
  <Button label="Show Auto-dismiss Callout" variant="primary" onClick={resetCallout} />
@@ -425,24 +518,28 @@ export const AutoDismiss: Story = {
425
518
  parameters: {
426
519
  docs: {
427
520
  description: {
428
- story: 'Example of a callout that automatically dismisses after a countdown.'
429
- }
430
- }
431
- }
521
+ story: 'Example of a callout that automatically dismisses after a countdown.',
522
+ },
523
+ },
524
+ },
432
525
  };
433
526
 
434
527
  const AllVariantsTemplate = () => {
435
528
  const variants = ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'light', 'dark'];
436
-
529
+
437
530
  const getIcon = (variant: string) => {
438
- switch(variant) {
439
- case 'success': return <SuccessIcon />;
440
- case 'warning': return <WarningIcon />;
441
- case 'error': return <ErrorIcon />;
442
- default: return <InfoIcon />;
531
+ switch (variant) {
532
+ case 'success':
533
+ return <SuccessIcon />;
534
+ case 'warning':
535
+ return <WarningIcon />;
536
+ case 'error':
537
+ return <ErrorIcon />;
538
+ default:
539
+ return <InfoIcon />;
443
540
  }
444
541
  };
445
-
542
+
446
543
  return (
447
544
  <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
448
545
  {variants.map(variant => (
@@ -464,18 +561,14 @@ export const AllVariants: Story = {
464
561
  parameters: {
465
562
  docs: {
466
563
  description: {
467
- story: 'Overview of all available callout color variants.'
468
- }
469
- }
470
- }
564
+ story: 'Overview of all available callout color variants.',
565
+ },
566
+ },
567
+ },
471
568
  };
472
569
 
473
570
  const CalloutWithCustomContentTemplate = () => (
474
- <Callout
475
- title="Custom Content Example"
476
- variant="primary"
477
- icon={<InfoIcon />}
478
- >
571
+ <Callout title="Custom Content Example" variant="primary" icon={<InfoIcon />}>
479
572
  <div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
480
573
  <p>Callouts can contain rich content including:</p>
481
574
  <ul style={{ margin: 0, paddingLeft: '20px' }}>
@@ -495,8 +588,8 @@ export const CustomContent: Story = {
495
588
  parameters: {
496
589
  docs: {
497
590
  description: {
498
- story: 'Callouts can contain rich, custom content beyond simple text.'
499
- }
500
- }
501
- }
502
- };
591
+ story: 'Callouts can contain rich, custom content beyond simple text.',
592
+ },
593
+ },
594
+ },
595
+ };
@@ -22,7 +22,7 @@ export const Callout: React.FC<CalloutProps> = ({
22
22
  variant,
23
23
  oneLine,
24
24
  toast,
25
- className
25
+ className,
26
26
  });
27
27
 
28
28
  // Determine appropriate ARIA attributes based on variant
@@ -30,7 +30,7 @@ export const Callout: React.FC<CalloutProps> = ({
30
30
  const baseAttributes: Record<string, string> = {
31
31
  role: 'region',
32
32
  };
33
-
33
+
34
34
  // For toast notifications or alerts, use appropriate role and live region
35
35
  if (toast) {
36
36
  baseAttributes.role = 'alert';
@@ -42,12 +42,16 @@ export const Callout: React.FC<CalloutProps> = ({
42
42
  baseAttributes.role = 'status';
43
43
  baseAttributes['aria-live'] = 'polite';
44
44
  }
45
-
45
+
46
46
  return baseAttributes;
47
47
  };
48
48
 
49
49
  return (
50
- <div className={generateCalloutClass({ variant, oneLine, toast, className })} {...getAriaAttributes()} {...props}>
50
+ <div
51
+ className={generateCalloutClass({ variant, oneLine, toast, className })}
52
+ {...getAriaAttributes()}
53
+ {...props}
54
+ >
51
55
  <div className="c-callout__content">
52
56
  {icon && <div className="c-callout__icon">{icon}</div>}
53
57
  <div className="c-callout__message">
@@ -55,15 +59,11 @@ export const Callout: React.FC<CalloutProps> = ({
55
59
  {children && <div className="c-callout__text">{children}</div>}
56
60
  </div>
57
61
  </div>
58
-
62
+
59
63
  {actions && <div className="c-callout__actions">{actions}</div>}
60
-
64
+
61
65
  {onClose && (
62
- <button
63
- className="c-callout__close-btn"
64
- onClick={handleClose(onClose)}
65
- aria-label="Close"
66
- >
66
+ <button className="c-callout__close-btn" onClick={handleClose(onClose)} aria-label="Close">
67
67
  <Icon name="X" size="md" />
68
68
  </button>
69
69
  )}
@@ -75,4 +75,4 @@ Callout.displayName = 'Callout';
75
75
 
76
76
  export type { CalloutProps };
77
77
 
78
- export default Callout;
78
+ export default Callout;
@@ -1 +1 @@
1
- export { Callout } from './Callout';
1
+ export { Callout } from './Callout';