@candy.thieves/ui-kit-lumos 0.0.23 → 0.0.25

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 (602) hide show
  1. package/.github/pull_request_template.md +31 -0
  2. package/.github/workflows/deploy-storybook.yml +19 -0
  3. package/.github/workflows/publish.yml +33 -0
  4. package/.husky/commit-msg +1 -0
  5. package/.husky/pre-commit +3 -0
  6. package/.husky/pre-push +2 -0
  7. package/.husky/prepare-commit-msg +9 -0
  8. package/.prettierignore +5 -0
  9. package/.prettierrc.cjs +4 -0
  10. package/.storybook/main.d.ts +3 -0
  11. package/.storybook/main.ts +26 -0
  12. package/.storybook/manager.ts +6 -0
  13. package/.storybook/preview.d.ts +6 -0
  14. package/.storybook/preview.tsx +28 -0
  15. package/.storybook/theme.ts +17 -0
  16. package/.stylelintrc.cjs +3 -0
  17. package/AGENTS.md +80 -0
  18. package/agent-docs/architecture.md +31 -0
  19. package/agent-docs/execplans.md +33 -0
  20. package/agent-docs/frontend.md +99 -0
  21. package/commitlint.config.js +63 -0
  22. package/eslint.config.js +101 -0
  23. package/index.html +13 -0
  24. package/package.json +14 -8
  25. package/pnpm-workspace.yaml +4 -0
  26. package/src/assets/icons/ArrowBackOutline.tsx +33 -0
  27. package/src/assets/icons/ArrowForwardOutline.tsx +32 -0
  28. package/src/assets/icons/ArrowIosBack.tsx +32 -0
  29. package/src/assets/icons/ArrowIosBackOutline.tsx +32 -0
  30. package/src/assets/icons/ArrowIosDownOutline.tsx +34 -0
  31. package/src/assets/icons/ArrowIosForward.tsx +32 -0
  32. package/src/assets/icons/ArrowIosForwardOutline.tsx +32 -0
  33. package/src/assets/icons/ArrowIosUp.tsx +35 -0
  34. package/src/assets/icons/Block.tsx +31 -0
  35. package/src/assets/icons/BlockOutline.tsx +37 -0
  36. package/src/assets/icons/Bookmark.tsx +32 -0
  37. package/src/assets/icons/BookmarkOutline.tsx +32 -0
  38. package/src/assets/icons/Brave.tsx +26 -0
  39. package/src/assets/icons/Calendar.tsx +32 -0
  40. package/src/assets/icons/CalendarOutline.tsx +32 -0
  41. package/src/assets/icons/CheckmarkOutline.tsx +27 -0
  42. package/src/assets/icons/Close.tsx +27 -0
  43. package/src/assets/icons/CloseOutline.tsx +27 -0
  44. package/src/assets/icons/ColorPaletteOutline.tsx +36 -0
  45. package/src/assets/icons/Copy.tsx +32 -0
  46. package/src/assets/icons/CopyOutline.tsx +36 -0
  47. package/src/assets/icons/CreditCard.tsx +32 -0
  48. package/src/assets/icons/CreditCardOutline.tsx +32 -0
  49. package/src/assets/icons/DoneAllOutline.tsx +32 -0
  50. package/src/assets/icons/Edit.tsx +31 -0
  51. package/src/assets/icons/EditOutline.tsx +31 -0
  52. package/src/assets/icons/Email.tsx +32 -0
  53. package/src/assets/icons/EmailOutline.tsx +32 -0
  54. package/src/assets/icons/ErrorIcon.tsx +39 -0
  55. package/src/assets/icons/Expand.tsx +31 -0
  56. package/src/assets/icons/ExpandOutline.tsx +31 -0
  57. package/src/assets/icons/Explorer.tsx +26 -0
  58. package/src/assets/icons/Eye.tsx +32 -0
  59. package/src/assets/icons/EyeOff.tsx +36 -0
  60. package/src/assets/icons/EyeOffOutline.tsx +36 -0
  61. package/src/assets/icons/EyeOutline.tsx +34 -0
  62. package/src/assets/icons/Facebook.tsx +32 -0
  63. package/src/assets/icons/FileIcon.tsx +36 -0
  64. package/src/assets/icons/FillBell.tsx +48 -0
  65. package/src/assets/icons/Firefox.tsx +33 -0
  66. package/src/assets/icons/FlagEng.tsx +33 -0
  67. package/src/assets/icons/FlagRus.tsx +33 -0
  68. package/src/assets/icons/GithubRepo.tsx +32 -0
  69. package/src/assets/icons/Google.tsx +45 -0
  70. package/src/assets/icons/Heart.tsx +32 -0
  71. package/src/assets/icons/HeartOutline.tsx +32 -0
  72. package/src/assets/icons/Home.tsx +33 -0
  73. package/src/assets/icons/HomeOutline.tsx +27 -0
  74. package/src/assets/icons/Image.tsx +32 -0
  75. package/src/assets/icons/ImageOutline.tsx +32 -0
  76. package/src/assets/icons/Layers.tsx +41 -0
  77. package/src/assets/icons/LayersOutline.tsx +32 -0
  78. package/src/assets/icons/LogOut.tsx +31 -0
  79. package/src/assets/icons/LogOutOutline.tsx +31 -0
  80. package/src/assets/icons/Maximize.tsx +32 -0
  81. package/src/assets/icons/MaximizeOutline.tsx +34 -0
  82. package/src/assets/icons/MenuOutline.tsx +31 -0
  83. package/src/assets/icons/MessageCircle.tsx +32 -0
  84. package/src/assets/icons/MessageCircleOutline.tsx +36 -0
  85. package/src/assets/icons/Mic.tsx +32 -0
  86. package/src/assets/icons/MicOutline.tsx +36 -0
  87. package/src/assets/icons/MicrosoftEdge.tsx +112 -0
  88. package/src/assets/icons/MoreHorizontal.tsx +31 -0
  89. package/src/assets/icons/MoreHorizontalOutline.tsx +31 -0
  90. package/src/assets/icons/Opera.tsx +33 -0
  91. package/src/assets/icons/OutlineBell.tsx +72 -0
  92. package/src/assets/icons/Paid.tsx +37 -0
  93. package/src/assets/icons/PaperPlane.tsx +32 -0
  94. package/src/assets/icons/PaperPlaneOutline.tsx +32 -0
  95. package/src/assets/icons/PauseCircle.tsx +32 -0
  96. package/src/assets/icons/PauseCircleOutline.tsx +34 -0
  97. package/src/assets/icons/Paypal.tsx +72 -0
  98. package/src/assets/icons/Person.tsx +29 -0
  99. package/src/assets/icons/PersonAdd.tsx +31 -0
  100. package/src/assets/icons/PersonAddOutline.tsx +31 -0
  101. package/src/assets/icons/PersonOutline.tsx +31 -0
  102. package/src/assets/icons/PersonRemove.tsx +31 -0
  103. package/src/assets/icons/PersonRemoveOutline.tsx +31 -0
  104. package/src/assets/icons/Pin.tsx +32 -0
  105. package/src/assets/icons/PinOutline.tsx +34 -0
  106. package/src/assets/icons/PlayCircle.tsx +32 -0
  107. package/src/assets/icons/PlayCircleOutline.tsx +32 -0
  108. package/src/assets/icons/PlusCircle.tsx +32 -0
  109. package/src/assets/icons/PlusCircleOutline.tsx +30 -0
  110. package/src/assets/icons/PlusSquare.tsx +32 -0
  111. package/src/assets/icons/PlusSquareOutline.tsx +34 -0
  112. package/src/assets/icons/RadioButtonChecked.tsx +32 -0
  113. package/src/assets/icons/RadioButtonUnchecked.tsx +30 -0
  114. package/src/assets/icons/RecaptchaLogo.tsx +42 -0
  115. package/src/assets/icons/Safari.tsx +37 -0
  116. package/src/assets/icons/Search.tsx +32 -0
  117. package/src/assets/icons/SearchOutline.tsx +32 -0
  118. package/src/assets/icons/Sending.tsx +28 -0
  119. package/src/assets/icons/Settings.tsx +32 -0
  120. package/src/assets/icons/SettingsOutline.tsx +34 -0
  121. package/src/assets/icons/Stripe.tsx +40 -0
  122. package/src/assets/icons/Trash.tsx +32 -0
  123. package/src/assets/icons/TrashOutline.tsx +32 -0
  124. package/src/assets/icons/TrendingUp.tsx +32 -0
  125. package/src/assets/icons/TrendingUpOutline.tsx +32 -0
  126. package/src/assets/icons/UcBrowser.tsx +78 -0
  127. package/src/assets/icons/Yandex.tsx +36 -0
  128. package/src/assets/index.ts +104 -0
  129. package/src/assets/logo/Logo.tsx +55 -0
  130. package/src/components/Alert/Alert.module.scss +61 -0
  131. package/src/components/Alert/Alert.tsx +79 -0
  132. package/src/components/Alert/index.ts +1 -0
  133. package/src/components/AudioPlayer/AudioPlayer.module.scss +74 -0
  134. package/src/components/AudioPlayer/AudioPlayer.tsx +119 -0
  135. package/src/components/AudioPlayer/index.ts +1 -0
  136. package/src/components/Avatar/Avatar.module.scss +151 -0
  137. package/src/components/Avatar/Avatar.tsx +36 -0
  138. package/src/components/Avatar/AvatarBlock.tsx +43 -0
  139. package/src/components/Avatar/MainAvatar.tsx +65 -0
  140. package/src/components/Avatar/index.ts +3 -0
  141. package/src/components/Button/Button.module.scss +143 -0
  142. package/src/components/Button/Button.tsx +48 -0
  143. package/src/components/Button/ButtonLegacy.tsx +94 -0
  144. package/src/components/Button/index.ts +2 -0
  145. package/src/components/Cards/Cards.module.scss +11 -0
  146. package/src/components/Cards/Cards.tsx +21 -0
  147. package/src/components/Cards/index.ts +1 -0
  148. package/src/components/Carousel/Carousel.module.scss +97 -0
  149. package/src/components/Carousel/Carousel.tsx +64 -0
  150. package/src/components/Carousel/index.ts +1 -0
  151. package/src/components/Checkbox/Checkbox.module.scss +76 -0
  152. package/src/components/Checkbox/Checkbox.tsx +48 -0
  153. package/src/components/Checkbox/index.ts +1 -0
  154. package/src/components/CircularProgress/CircularProgress.module.scss +33 -0
  155. package/src/components/CircularProgress/CircularProgress.tsx +33 -0
  156. package/src/components/CircularProgress/index.ts +1 -0
  157. package/src/components/Input/Input.module.scss +105 -0
  158. package/src/components/Input/Input.tsx +79 -0
  159. package/src/components/Input/index.ts +1 -0
  160. package/src/components/LinearProgress/LinearProgress.module.scss +62 -0
  161. package/src/components/LinearProgress/LinearProgress.tsx +49 -0
  162. package/src/components/LinearProgress/index.ts +1 -0
  163. package/src/components/Menu/Menu.module.scss +48 -0
  164. package/src/components/Menu/Menu.tsx +51 -0
  165. package/src/components/Menu/index.ts +1 -0
  166. package/src/components/Message/AttachmentItem.tsx +19 -0
  167. package/src/components/Message/Message.module.scss +123 -0
  168. package/src/components/Message/Message.tsx +54 -0
  169. package/src/components/Message/MessageStatus.tsx +19 -0
  170. package/src/components/Message/ReplyPreview.tsx +19 -0
  171. package/src/components/Message/index.ts +2 -0
  172. package/src/components/Message/types.ts +49 -0
  173. package/src/components/Modal/Modal.module.scss +118 -0
  174. package/src/components/Modal/Modal.tsx +82 -0
  175. package/src/components/Modal/index.ts +1 -0
  176. package/src/components/PasswordInput/PasswordInput.module.scss +13 -0
  177. package/src/components/PasswordInput/PasswordInput.tsx +36 -0
  178. package/src/components/PasswordInput/index.ts +1 -0
  179. package/src/components/RadioGroup/RadioGroup.module.scss +95 -0
  180. package/src/components/RadioGroup/RadioGroup.tsx +64 -0
  181. package/src/components/RadioGroup/index.ts +1 -0
  182. package/src/components/ReadMore/ReadMore.module.scss +8 -0
  183. package/src/components/ReadMore/ReadMore.tsx +49 -0
  184. package/src/components/ReadMore/index.ts +1 -0
  185. package/src/components/Recaptcha/Recaptcha.module.scss +10 -0
  186. package/src/components/Recaptcha/Recaptcha.tsx +58 -0
  187. package/src/components/Recaptcha/index.ts +1 -0
  188. package/src/components/Scroll/Scroll.module.scss +58 -0
  189. package/src/components/Scroll/Scroll.tsx +47 -0
  190. package/src/components/Scroll/index.ts +1 -0
  191. package/src/components/SearchInput/SearchInput.tsx +17 -0
  192. package/src/components/SearchInput/index.ts +1 -0
  193. package/src/components/Select/Select.module.scss +160 -0
  194. package/src/components/Select/Select.tsx +262 -0
  195. package/src/components/Select/index.ts +1 -0
  196. package/src/components/Sidebar/Sidebar.module.scss +100 -0
  197. package/src/components/Sidebar/Sidebar.tsx +74 -0
  198. package/src/components/Sidebar/index.ts +1 -0
  199. package/src/components/Slider/Slider.module.scss +64 -0
  200. package/src/components/Slider/Slider.tsx +26 -0
  201. package/src/components/Slider/index.ts +1 -0
  202. package/src/components/Table/Table.module.scss +23 -0
  203. package/src/components/Table/Table.tsx +57 -0
  204. package/src/components/Table/index.ts +1 -0
  205. package/src/components/Tabs/Tabs.module.scss +78 -0
  206. package/src/components/Tabs/Tabs.tsx +57 -0
  207. package/src/components/Tabs/index.ts +1 -0
  208. package/src/components/TextArea/TextArea.module.scss +107 -0
  209. package/src/components/TextArea/TextArea.tsx +57 -0
  210. package/src/components/TextArea/index.ts +1 -0
  211. package/src/components/Tooltip/Tooltip.module.scss +11 -0
  212. package/src/components/Tooltip/Tooltip.tsx +43 -0
  213. package/src/components/Tooltip/index.ts +1 -0
  214. package/src/components/Typography/Typography.module.scss +29 -0
  215. package/src/components/Typography/Typography.tsx +135 -0
  216. package/src/components/Typography/index.ts +1 -0
  217. package/src/components/index.ts +27 -0
  218. package/{dist/types/components/types/index.d.ts → src/components/types/index.ts} +1 -1
  219. package/src/components/types/scroll.types.ts +11 -0
  220. package/src/constants/constants.ts +22 -0
  221. package/src/constants/index.ts +1 -0
  222. package/src/demo/TestMixins/TestMixins.module.scss +457 -0
  223. package/src/demo/TestMixins/TestMixins.tsx +107 -0
  224. package/src/demo/index.ts +1 -0
  225. package/src/hooks/index.ts +2 -0
  226. package/src/hooks/useScrollThumbs.ts +65 -0
  227. package/src/hooks/useThumbDrag.ts +90 -0
  228. package/src/index.ts +9 -0
  229. package/src/stories/Configure.mdx +183 -0
  230. package/src/stories/assets/icons/ArrowBackOutline.stories.ts +40 -0
  231. package/src/stories/assets/icons/ArrowForwardOutline.stories.ts +40 -0
  232. package/src/stories/assets/icons/ArrowIosBack.stories.ts +40 -0
  233. package/src/stories/assets/icons/ArrowIosBackOutline.stories.ts +40 -0
  234. package/src/stories/assets/icons/ArrowIosDownOutline.stories.ts +40 -0
  235. package/src/stories/assets/icons/ArrowIosForward.stories.ts +40 -0
  236. package/src/stories/assets/icons/ArrowIosForwardOutline.stories.ts +40 -0
  237. package/src/stories/assets/icons/ArrowIosUp.stories.ts +38 -0
  238. package/src/stories/assets/icons/Block.stories.ts +39 -0
  239. package/src/stories/assets/icons/BlockOutline.stories.ts +39 -0
  240. package/src/stories/assets/icons/Bookmark.stories.ts +39 -0
  241. package/src/stories/assets/icons/BookmarkOutline.stories.ts +40 -0
  242. package/src/stories/assets/icons/Brave.stories.ts +48 -0
  243. package/src/stories/assets/icons/Calendar.stories.ts +40 -0
  244. package/src/stories/assets/icons/CalendarOutline.stories.ts +39 -0
  245. package/src/stories/assets/icons/CheckmarkOutline.stories.ts +40 -0
  246. package/src/stories/assets/icons/Close.stories.ts +40 -0
  247. package/src/stories/assets/icons/CloseOutline.stories.ts +40 -0
  248. package/src/stories/assets/icons/ColorPaletteOutline.stories.ts +39 -0
  249. package/src/stories/assets/icons/Copy.stories.ts +38 -0
  250. package/src/stories/assets/icons/CopyOutline.stories.ts +39 -0
  251. package/src/stories/assets/icons/CreditCard.stories.ts +38 -0
  252. package/src/stories/assets/icons/CreditCardOutline.stories.ts +39 -0
  253. package/src/stories/assets/icons/DoneAllOutline.stories.ts +38 -0
  254. package/src/stories/assets/icons/Edit.stories.ts +39 -0
  255. package/src/stories/assets/icons/EditOutline.stories.ts +38 -0
  256. package/src/stories/assets/icons/Email.stories.ts +39 -0
  257. package/src/stories/assets/icons/EmailOutline.stories.ts +38 -0
  258. package/src/stories/assets/icons/ErrorIcon.stories.ts +40 -0
  259. package/src/stories/assets/icons/Expand.stories.ts +39 -0
  260. package/src/stories/assets/icons/ExpandOutline.stories.ts +38 -0
  261. package/src/stories/assets/icons/Explorer.stories.ts +47 -0
  262. package/src/stories/assets/icons/Eye.stories.ts +39 -0
  263. package/src/stories/assets/icons/EyeOff.stories.ts +38 -0
  264. package/src/stories/assets/icons/EyeOffOutline.stories.ts +39 -0
  265. package/src/stories/assets/icons/EyeOutline.stories.ts +38 -0
  266. package/src/stories/assets/icons/Facebook.stories.ts +37 -0
  267. package/src/stories/assets/icons/FileIcon.stories.ts +40 -0
  268. package/src/stories/assets/icons/FillBell.stories.ts +40 -0
  269. package/src/stories/assets/icons/Firefox.stories.ts +48 -0
  270. package/src/stories/assets/icons/FlagEng.stories.ts +37 -0
  271. package/src/stories/assets/icons/FlagRus.stories.ts +37 -0
  272. package/src/stories/assets/icons/GithubRepo.stories.ts +38 -0
  273. package/src/stories/assets/icons/Google.stories.ts +38 -0
  274. package/src/stories/assets/icons/Heart.stories.ts +39 -0
  275. package/src/stories/assets/icons/HeartOutline.stories.ts +38 -0
  276. package/src/stories/assets/icons/Home.stories.ts +40 -0
  277. package/src/stories/assets/icons/HomeOutline.stories.ts +40 -0
  278. package/src/stories/assets/icons/Icon.module.scss +4 -0
  279. package/src/stories/assets/icons/ImageIcon.stories.ts +39 -0
  280. package/src/stories/assets/icons/ImageOutline.stories.ts +38 -0
  281. package/src/stories/assets/icons/Layers.stories.ts +39 -0
  282. package/src/stories/assets/icons/LayersOutline.stories.ts +38 -0
  283. package/src/stories/assets/icons/LogOut.stories.ts +40 -0
  284. package/src/stories/assets/icons/LogOutOutline.stories.ts +40 -0
  285. package/src/stories/assets/icons/Maximize.stories.ts +39 -0
  286. package/src/stories/assets/icons/MaximizeOutline.stories.ts +39 -0
  287. package/src/stories/assets/icons/MenuOutline.stories.ts +39 -0
  288. package/src/stories/assets/icons/MessageCircle.stories.ts +38 -0
  289. package/src/stories/assets/icons/MessageCircleOutline.stories.ts +39 -0
  290. package/src/stories/assets/icons/Mic.stories.ts +38 -0
  291. package/src/stories/assets/icons/MicOutline.stories.ts +39 -0
  292. package/src/stories/assets/icons/MicrosoftEdge.stories.ts +47 -0
  293. package/src/stories/assets/icons/MoreHorizontal.stories.ts +40 -0
  294. package/src/stories/assets/icons/MoreHorizontalOutline.stories.ts +38 -0
  295. package/src/stories/assets/icons/Opera.stories.ts +47 -0
  296. package/src/stories/assets/icons/OutlineBell.stories.ts +58 -0
  297. package/src/stories/assets/icons/Paid.stories.ts +38 -0
  298. package/src/stories/assets/icons/PaperPlane.stories.ts +40 -0
  299. package/src/stories/assets/icons/PaperPlaneOutline.stories.ts +38 -0
  300. package/src/stories/assets/icons/PauseCircle.stories.ts +39 -0
  301. package/src/stories/assets/icons/PauseCircleOutline.stories.ts +38 -0
  302. package/src/stories/assets/icons/Paypal.stories.ts +16 -0
  303. package/src/stories/assets/icons/Person.stories.ts +39 -0
  304. package/src/stories/assets/icons/PersonAdd.stories.ts +38 -0
  305. package/src/stories/assets/icons/PersonAddOutline.stories.ts +39 -0
  306. package/src/stories/assets/icons/PersonOutline.stories.ts +39 -0
  307. package/src/stories/assets/icons/PersonRemove.stories.ts +38 -0
  308. package/src/stories/assets/icons/PersonRemoveOutline.stories.ts +39 -0
  309. package/src/stories/assets/icons/Pin.stories.ts +38 -0
  310. package/src/stories/assets/icons/PinOutline.stories.ts +39 -0
  311. package/src/stories/assets/icons/PlayCircle.stories.ts +38 -0
  312. package/src/stories/assets/icons/PlayCircleOutline.stories.ts +39 -0
  313. package/src/stories/assets/icons/PlusCircle.stories.ts +38 -0
  314. package/src/stories/assets/icons/PlusCircleOutline.stories.ts +39 -0
  315. package/src/stories/assets/icons/PlusSquare.stories.ts +38 -0
  316. package/src/stories/assets/icons/PlusSquareOutline.stories.ts +39 -0
  317. package/src/stories/assets/icons/RadioButtonChecked.stories.ts +38 -0
  318. package/src/stories/assets/icons/RadioButtonUnchecked.stories.ts +39 -0
  319. package/src/stories/assets/icons/RecaptchaLogo.stories.ts +36 -0
  320. package/src/stories/assets/icons/Safari.stories.ts +47 -0
  321. package/src/stories/assets/icons/Search.stories.ts +39 -0
  322. package/src/stories/assets/icons/SearchOutline.stories.ts +40 -0
  323. package/src/stories/assets/icons/Sending.stories.ts +40 -0
  324. package/src/stories/assets/icons/Settings.stories.ts +39 -0
  325. package/src/stories/assets/icons/SettingsOutline.stories.ts +40 -0
  326. package/src/stories/assets/icons/Stripe.stories.ts +38 -0
  327. package/src/stories/assets/icons/Trash.stories.ts +39 -0
  328. package/src/stories/assets/icons/TrashOutline.stories.ts +38 -0
  329. package/src/stories/assets/icons/TrendingUp.stories.ts +39 -0
  330. package/src/stories/assets/icons/TrendingUpOutline.stories.ts +38 -0
  331. package/src/stories/assets/icons/UcBrowser.stories.ts +48 -0
  332. package/src/stories/assets/icons/Yandex.stories.ts +47 -0
  333. package/src/stories/assets/logo/Logo.stories.ts +22 -0
  334. package/src/stories/components/Alert/Alert.stories.tsx +94 -0
  335. package/src/stories/components/Avatar/Avatar.stories.tsx +151 -0
  336. package/src/stories/components/Avatar/AvatarBlock.stories.tsx +301 -0
  337. package/src/stories/components/Avatar/MainAvatar.stories.tsx +200 -0
  338. package/src/stories/components/Button/Button.stories.tsx +99 -0
  339. package/src/stories/components/Button/ButtonLegacy.stories.tsx +99 -0
  340. package/src/stories/components/Cards/Cards.stories.tsx +185 -0
  341. package/src/stories/components/Carousel/Carousel.stories.tsx +89 -0
  342. package/src/stories/components/Carousel/CarouselWrapper.module.scss +7 -0
  343. package/src/stories/components/CheckBox/CheckBox.stories.tsx +92 -0
  344. package/src/stories/components/CircularProgress/CircularProgress.stories.tsx +66 -0
  345. package/src/stories/components/Input/Input.stories.tsx +88 -0
  346. package/src/stories/components/LinearProgress/LinearProgress.stories.tsx +137 -0
  347. package/src/stories/components/Menu/Menu.stories.tsx +100 -0
  348. package/src/stories/components/Message/Message.stories.tsx +311 -0
  349. package/src/stories/components/Modal/Modal.stories.module.scss +157 -0
  350. package/src/stories/components/Modal/Modal.stories.tsx +514 -0
  351. package/src/stories/components/PasswordInput/PasswordInput.stories.tsx +71 -0
  352. package/src/stories/components/RadioGroup/RadioGroup.stories.tsx +141 -0
  353. package/src/stories/components/ReadMore/ReadMore.stories.tsx +42 -0
  354. package/src/stories/components/Recaptcha/Recaptcha.stories.tsx +29 -0
  355. package/src/stories/components/Scroll/Scroll.stories.tsx +128 -0
  356. package/src/stories/components/SearchInput/SearchInput.stories.tsx +76 -0
  357. package/src/stories/components/Select/Select.stories.module.scss +6 -0
  358. package/src/stories/components/Select/Select.stories.tsx +147 -0
  359. package/src/stories/components/Sidebar/Sidebar.stories.tsx +126 -0
  360. package/src/stories/components/Slider/Slider.stories.tsx +58 -0
  361. package/src/stories/components/Table/Table.stories.tsx +108 -0
  362. package/src/stories/components/Tabs/Tabs.stories.tsx +75 -0
  363. package/src/stories/components/TestMixins/TestMixins.stories.tsx +16 -0
  364. package/src/stories/components/TextArea/TextArea.stories.tsx +100 -0
  365. package/src/stories/components/Tooltip/Tooltip.stories.tsx +54 -0
  366. package/src/stories/components/Typography/Typography.stories.tsx +314 -0
  367. package/src/stories/constants.ts +45 -0
  368. package/src/stories/palette/ColorPalette.module.scss +61 -0
  369. package/src/stories/palette/ColorPalette.stories.tsx +76 -0
  370. package/src/storybook-utils/assets/coloredIconMeta.ts +31 -0
  371. package/src/storybook-utils/assets/iconMeta.ts +40 -0
  372. package/src/storybook-utils/assets/logoMeta.ts +33 -0
  373. package/src/storybook-utils/components/ButtonMeta.ts +33 -0
  374. package/src/storybook-utils/index.ts +4 -0
  375. package/src/styles/_boilerplate.scss +37 -0
  376. package/src/styles/_colors.scss +46 -0
  377. package/src/styles/_mixins.scss +154 -0
  378. package/src/styles/_typography.scss +152 -0
  379. package/src/styles/index.scss +4 -0
  380. package/src/types/index.ts +1 -0
  381. package/src/types/types.ts +5 -0
  382. package/src/utils/ColorIconBase.tsx +26 -0
  383. package/src/utils/ColorIconBaseSmall.tsx +30 -0
  384. package/src/utils/IconBase.tsx +43 -0
  385. package/src/utils/formatTime.ts +6 -0
  386. package/src/utils/getFirstLetterCapitalized.ts +2 -0
  387. package/src/utils/getHorizontalMetrics.ts +12 -0
  388. package/src/utils/getNavItemClickHandler.ts +17 -0
  389. package/src/utils/getVerticalMetrics.ts +12 -0
  390. package/src/utils/index.ts +8 -0
  391. package/src/utils/isAudioAttachment.ts +7 -0
  392. package/src/utils/isThemeColor.ts +4 -0
  393. package/src/utils/truncateText.ts +15 -0
  394. package/tsconfig.app.json +32 -0
  395. package/tsconfig.build.json +16 -0
  396. package/tsconfig.json +7 -0
  397. package/tsconfig.node.json +23 -0
  398. package/vite-env.d.ts +20 -0
  399. package/vite.config.ts +67 -0
  400. package/vitest.shims.d.ts +1 -0
  401. package/dist/index.css +0 -2
  402. package/dist/index.js +0 -5614
  403. package/dist/index.js.map +0 -1
  404. package/dist/types/assets/icons/ArrowBackOutline.d.ts +0 -3
  405. package/dist/types/assets/icons/ArrowForwardOutline.d.ts +0 -3
  406. package/dist/types/assets/icons/ArrowIosBack.d.ts +0 -3
  407. package/dist/types/assets/icons/ArrowIosBackOutline.d.ts +0 -3
  408. package/dist/types/assets/icons/ArrowIosDownOutline.d.ts +0 -3
  409. package/dist/types/assets/icons/ArrowIosForward.d.ts +0 -3
  410. package/dist/types/assets/icons/ArrowIosForwardOutline.d.ts +0 -3
  411. package/dist/types/assets/icons/ArrowIosUp.d.ts +0 -3
  412. package/dist/types/assets/icons/Block.d.ts +0 -3
  413. package/dist/types/assets/icons/BlockOutline.d.ts +0 -3
  414. package/dist/types/assets/icons/Bookmark.d.ts +0 -3
  415. package/dist/types/assets/icons/BookmarkOutline.d.ts +0 -3
  416. package/dist/types/assets/icons/Brave.d.ts +0 -3
  417. package/dist/types/assets/icons/Calendar.d.ts +0 -3
  418. package/dist/types/assets/icons/CalendarOutline.d.ts +0 -3
  419. package/dist/types/assets/icons/CheckmarkOutline.d.ts +0 -3
  420. package/dist/types/assets/icons/Close.d.ts +0 -3
  421. package/dist/types/assets/icons/CloseOutline.d.ts +0 -3
  422. package/dist/types/assets/icons/ColorPaletteOutline.d.ts +0 -3
  423. package/dist/types/assets/icons/Copy.d.ts +0 -3
  424. package/dist/types/assets/icons/CopyOutline.d.ts +0 -3
  425. package/dist/types/assets/icons/CreditCard.d.ts +0 -3
  426. package/dist/types/assets/icons/CreditCardOutline.d.ts +0 -3
  427. package/dist/types/assets/icons/DoneAllOutline.d.ts +0 -3
  428. package/dist/types/assets/icons/Edit.d.ts +0 -3
  429. package/dist/types/assets/icons/EditOutline.d.ts +0 -3
  430. package/dist/types/assets/icons/Email.d.ts +0 -3
  431. package/dist/types/assets/icons/EmailOutline.d.ts +0 -3
  432. package/dist/types/assets/icons/ErrorIcon.d.ts +0 -3
  433. package/dist/types/assets/icons/Expand.d.ts +0 -3
  434. package/dist/types/assets/icons/ExpandOutline.d.ts +0 -3
  435. package/dist/types/assets/icons/Explorer.d.ts +0 -3
  436. package/dist/types/assets/icons/Eye.d.ts +0 -3
  437. package/dist/types/assets/icons/EyeOff.d.ts +0 -3
  438. package/dist/types/assets/icons/EyeOffOutline.d.ts +0 -3
  439. package/dist/types/assets/icons/EyeOutline.d.ts +0 -3
  440. package/dist/types/assets/icons/Facebook.d.ts +0 -3
  441. package/dist/types/assets/icons/FileIcon.d.ts +0 -3
  442. package/dist/types/assets/icons/FillBell.d.ts +0 -3
  443. package/dist/types/assets/icons/Firefox.d.ts +0 -3
  444. package/dist/types/assets/icons/FlagEng.d.ts +0 -3
  445. package/dist/types/assets/icons/FlagRus.d.ts +0 -3
  446. package/dist/types/assets/icons/GithubRepo.d.ts +0 -3
  447. package/dist/types/assets/icons/Google.d.ts +0 -3
  448. package/dist/types/assets/icons/Heart.d.ts +0 -3
  449. package/dist/types/assets/icons/HeartOutline.d.ts +0 -3
  450. package/dist/types/assets/icons/Home.d.ts +0 -3
  451. package/dist/types/assets/icons/HomeOutline.d.ts +0 -3
  452. package/dist/types/assets/icons/Image.d.ts +0 -3
  453. package/dist/types/assets/icons/ImageOutline.d.ts +0 -3
  454. package/dist/types/assets/icons/Layers.d.ts +0 -3
  455. package/dist/types/assets/icons/LayersOutline.d.ts +0 -3
  456. package/dist/types/assets/icons/LogOut.d.ts +0 -3
  457. package/dist/types/assets/icons/LogOutOutline.d.ts +0 -3
  458. package/dist/types/assets/icons/Maximize.d.ts +0 -3
  459. package/dist/types/assets/icons/MaximizeOutline.d.ts +0 -3
  460. package/dist/types/assets/icons/MenuOutline.d.ts +0 -3
  461. package/dist/types/assets/icons/MessageCircle.d.ts +0 -3
  462. package/dist/types/assets/icons/MessageCircleOutline.d.ts +0 -3
  463. package/dist/types/assets/icons/Mic.d.ts +0 -3
  464. package/dist/types/assets/icons/MicOutline.d.ts +0 -3
  465. package/dist/types/assets/icons/MicrosoftEdge.d.ts +0 -3
  466. package/dist/types/assets/icons/MoreHorizontal.d.ts +0 -3
  467. package/dist/types/assets/icons/MoreHorizontalOutline.d.ts +0 -3
  468. package/dist/types/assets/icons/Opera.d.ts +0 -3
  469. package/dist/types/assets/icons/OutlineBell.d.ts +0 -8
  470. package/dist/types/assets/icons/Paid.d.ts +0 -3
  471. package/dist/types/assets/icons/PaperPlane.d.ts +0 -3
  472. package/dist/types/assets/icons/PaperPlaneOutline.d.ts +0 -3
  473. package/dist/types/assets/icons/PauseCircle.d.ts +0 -3
  474. package/dist/types/assets/icons/PauseCircleOutline.d.ts +0 -3
  475. package/dist/types/assets/icons/Paypal.d.ts +0 -3
  476. package/dist/types/assets/icons/Person.d.ts +0 -3
  477. package/dist/types/assets/icons/PersonAdd.d.ts +0 -3
  478. package/dist/types/assets/icons/PersonAddOutline.d.ts +0 -3
  479. package/dist/types/assets/icons/PersonOutline.d.ts +0 -3
  480. package/dist/types/assets/icons/PersonRemove.d.ts +0 -3
  481. package/dist/types/assets/icons/PersonRemoveOutline.d.ts +0 -3
  482. package/dist/types/assets/icons/Pin.d.ts +0 -3
  483. package/dist/types/assets/icons/PinOutline.d.ts +0 -3
  484. package/dist/types/assets/icons/PlayCircle.d.ts +0 -3
  485. package/dist/types/assets/icons/PlayCircleOutline.d.ts +0 -3
  486. package/dist/types/assets/icons/PlusCircle.d.ts +0 -3
  487. package/dist/types/assets/icons/PlusCircleOutline.d.ts +0 -3
  488. package/dist/types/assets/icons/PlusSquare.d.ts +0 -3
  489. package/dist/types/assets/icons/PlusSquareOutline.d.ts +0 -3
  490. package/dist/types/assets/icons/RadioButtonChecked.d.ts +0 -3
  491. package/dist/types/assets/icons/RadioButtonUnchecked.d.ts +0 -3
  492. package/dist/types/assets/icons/RecaptchaLogo.d.ts +0 -3
  493. package/dist/types/assets/icons/Safari.d.ts +0 -3
  494. package/dist/types/assets/icons/Search.d.ts +0 -3
  495. package/dist/types/assets/icons/SearchOutline.d.ts +0 -3
  496. package/dist/types/assets/icons/Sending.d.ts +0 -3
  497. package/dist/types/assets/icons/Settings.d.ts +0 -3
  498. package/dist/types/assets/icons/SettingsOutline.d.ts +0 -3
  499. package/dist/types/assets/icons/Stripe.d.ts +0 -3
  500. package/dist/types/assets/icons/Trash.d.ts +0 -3
  501. package/dist/types/assets/icons/TrashOutline.d.ts +0 -3
  502. package/dist/types/assets/icons/TrendingUp.d.ts +0 -3
  503. package/dist/types/assets/icons/TrendingUpOutline.d.ts +0 -3
  504. package/dist/types/assets/icons/UcBrowser.d.ts +0 -3
  505. package/dist/types/assets/icons/Yandex.d.ts +0 -3
  506. package/dist/types/assets/index.d.ts +0 -103
  507. package/dist/types/assets/logo/Logo.d.ts +0 -10
  508. package/dist/types/components/Alert/Alert.d.ts +0 -14
  509. package/dist/types/components/Alert/index.d.ts +0 -1
  510. package/dist/types/components/AudioPlayer/AudioPlayer.d.ts +0 -6
  511. package/dist/types/components/AudioPlayer/index.d.ts +0 -1
  512. package/dist/types/components/Avatar/Avatar.d.ts +0 -17
  513. package/dist/types/components/Avatar/AvatarBlock.d.ts +0 -15
  514. package/dist/types/components/Avatar/MainAvatar.d.ts +0 -20
  515. package/dist/types/components/Avatar/index.d.ts +0 -3
  516. package/dist/types/components/Button/Button.d.ts +0 -19
  517. package/dist/types/components/Button/ButtonLegacy.d.ts +0 -41
  518. package/dist/types/components/Button/index.d.ts +0 -2
  519. package/dist/types/components/Cards/Cards.d.ts +0 -7
  520. package/dist/types/components/Cards/index.d.ts +0 -1
  521. package/dist/types/components/Carousel/Carousel.d.ts +0 -5
  522. package/dist/types/components/Carousel/index.d.ts +0 -1
  523. package/dist/types/components/Checkbox/Checkbox.d.ts +0 -10
  524. package/dist/types/components/Checkbox/index.d.ts +0 -1
  525. package/dist/types/components/CircularProgress/CircularProgress.d.ts +0 -10
  526. package/dist/types/components/CircularProgress/index.d.ts +0 -1
  527. package/dist/types/components/Input/Input.d.ts +0 -13
  528. package/dist/types/components/Input/index.d.ts +0 -1
  529. package/dist/types/components/LinearProgress/LinearProgress.d.ts +0 -14
  530. package/dist/types/components/LinearProgress/index.d.ts +0 -1
  531. package/dist/types/components/Menu/Menu.d.ts +0 -14
  532. package/dist/types/components/Menu/index.d.ts +0 -1
  533. package/dist/types/components/Message/AttachmentItem.d.ts +0 -2
  534. package/dist/types/components/Message/Message.d.ts +0 -2
  535. package/dist/types/components/Message/MessageStatus.d.ts +0 -2
  536. package/dist/types/components/Message/ReplyPreview.d.ts +0 -2
  537. package/dist/types/components/Message/index.d.ts +0 -2
  538. package/dist/types/components/Message/types.d.ts +0 -40
  539. package/dist/types/components/Modal/Modal.d.ts +0 -25
  540. package/dist/types/components/Modal/index.d.ts +0 -1
  541. package/dist/types/components/PasswordInput/PasswordInput.d.ts +0 -6
  542. package/dist/types/components/PasswordInput/index.d.ts +0 -1
  543. package/dist/types/components/RadioGroup/RadioGroup.d.ts +0 -15
  544. package/dist/types/components/RadioGroup/index.d.ts +0 -1
  545. package/dist/types/components/ReadMore/ReadMore.d.ts +0 -8
  546. package/dist/types/components/ReadMore/index.d.ts +0 -1
  547. package/dist/types/components/Recaptcha/Recaptcha.d.ts +0 -12
  548. package/dist/types/components/Recaptcha/index.d.ts +0 -1
  549. package/dist/types/components/Scroll/Scroll.d.ts +0 -6
  550. package/dist/types/components/Scroll/index.d.ts +0 -1
  551. package/dist/types/components/SearchInput/SearchInput.d.ts +0 -3
  552. package/dist/types/components/SearchInput/index.d.ts +0 -1
  553. package/dist/types/components/Select/Select.d.ts +0 -66
  554. package/dist/types/components/Select/index.d.ts +0 -1
  555. package/dist/types/components/Sidebar/Sidebar.d.ts +0 -18
  556. package/dist/types/components/Sidebar/index.d.ts +0 -1
  557. package/dist/types/components/Slider/Slider.d.ts +0 -4
  558. package/dist/types/components/Slider/index.d.ts +0 -1
  559. package/dist/types/components/Table/Table.d.ts +0 -6
  560. package/dist/types/components/Table/index.d.ts +0 -1
  561. package/dist/types/components/Tabs/Tabs.d.ts +0 -18
  562. package/dist/types/components/Tabs/index.d.ts +0 -1
  563. package/dist/types/components/TextArea/TextArea.d.ts +0 -11
  564. package/dist/types/components/TextArea/index.d.ts +0 -1
  565. package/dist/types/components/Tooltip/Tooltip.d.ts +0 -12
  566. package/dist/types/components/Tooltip/index.d.ts +0 -1
  567. package/dist/types/components/Typography/Typography.d.ts +0 -25
  568. package/dist/types/components/Typography/index.d.ts +0 -1
  569. package/dist/types/components/index.d.ts +0 -27
  570. package/dist/types/components/types/scroll.types.d.ts +0 -10
  571. package/dist/types/constants/constants.d.ts +0 -7
  572. package/dist/types/constants/index.d.ts +0 -1
  573. package/dist/types/demo/TestMixins/TestMixins.d.ts +0 -1
  574. package/dist/types/demo/index.d.ts +0 -1
  575. package/dist/types/hooks/index.d.ts +0 -2
  576. package/dist/types/hooks/useScrollThumbs.d.ts +0 -9
  577. package/dist/types/hooks/useThumbDrag.d.ts +0 -9
  578. package/dist/types/index.d.ts +0 -8
  579. package/dist/types/types/index.d.ts +0 -1
  580. package/dist/types/types/types.d.ts +0 -5
  581. package/dist/types/utils/ColorIconBase.d.ts +0 -7
  582. package/dist/types/utils/ColorIconBaseSmall.d.ts +0 -7
  583. package/dist/types/utils/IconBase.d.ts +0 -12
  584. package/dist/types/utils/formatTime.d.ts +0 -1
  585. package/dist/types/utils/getFirstLetterCapitalized.d.ts +0 -1
  586. package/dist/types/utils/getHorizontalMetrics.d.ts +0 -2
  587. package/dist/types/utils/getNavItemClickHandler.d.ts +0 -5
  588. package/dist/types/utils/getVerticalMetrics.d.ts +0 -2
  589. package/dist/types/utils/index.d.ts +0 -8
  590. package/dist/types/utils/isAudioAttachment.d.ts +0 -2
  591. package/dist/types/utils/isThemeColor.d.ts +0 -2
  592. package/dist/types/utils/truncateText.d.ts +0 -1
  593. /package/{dist → public}/favicon-dark-108.svg +0 -0
  594. /package/{dist → public}/favicon-dark-16.svg +0 -0
  595. /package/{dist → public}/favicon-dark-24.svg +0 -0
  596. /package/{dist → public}/favicon-dark-48.svg +0 -0
  597. /package/{dist → public}/favicon-dark-72.svg +0 -0
  598. /package/{dist → public}/favicon-light-108.svg +0 -0
  599. /package/{dist → public}/favicon-light-16.svg +0 -0
  600. /package/{dist → public}/favicon-light-24.svg +0 -0
  601. /package/{dist → public}/favicon-light-48.svg +0 -0
  602. /package/{dist → public}/favicon-light-72.svg +0 -0
@@ -0,0 +1,143 @@
1
+ @use '@/styles/mixins' as *;
2
+
3
+ .button {
4
+ all: unset;
5
+
6
+ cursor: pointer;
7
+
8
+ @include flex(inline-flex, none, none);
9
+
10
+ flex-direction: row;
11
+ gap: 0.625rem;
12
+ align-items: center;
13
+ justify-content: center;
14
+
15
+ box-sizing: border-box;
16
+ min-width: 8.375rem;
17
+ padding: 0.375rem 1.5rem;
18
+ border-radius: 2px;
19
+
20
+ color: var(--color-light-100);
21
+ text-align: center;
22
+
23
+ @include transition-basic(background-color, color);
24
+
25
+ &:disabled,
26
+ &[aria-disabled='true'] {
27
+ pointer-events: none;
28
+ cursor: initial;
29
+ }
30
+
31
+ &.fullWidth {
32
+ width: 100%;
33
+ }
34
+ }
35
+
36
+ a.button {
37
+ text-decoration: none;
38
+ }
39
+
40
+ .primary {
41
+ border: 2px solid transparent;
42
+ color: var(--color-light-100);
43
+ background-color: var(--color-accent-500);
44
+
45
+ &:active {
46
+ color: var(--color-light-500);
47
+ background-color: var(--color-accent-700);
48
+ }
49
+
50
+ &:hover {
51
+ color: var(--color-light-100);
52
+ background-color: var(--color-accent-100);
53
+ }
54
+
55
+ &:focus-visible {
56
+ border: 2px solid var(--color-accent-700);
57
+ color: var(--color-light-100);
58
+ background: var(--color-accent-500);
59
+ }
60
+
61
+ &:disabled,
62
+ &[aria-disabled='true'] {
63
+ color: var(--color-light-900);
64
+ background-color: var(--color-accent-900);
65
+ }
66
+ }
67
+
68
+ .secondary {
69
+ border: 1px solid transparent;
70
+ color: var(--color-light-100);
71
+ background-color: var(--color-dark-300);
72
+
73
+ &:active {
74
+ background-color: var(--color-secondary-active);
75
+ }
76
+
77
+ &:hover {
78
+ background-color: var(--color-dark-100);
79
+ }
80
+
81
+ &:focus-visible {
82
+ border: 1px solid var(--color-accent-300);
83
+ background: var(--color-dark-300);
84
+ }
85
+
86
+ &:disabled,
87
+ &[aria-disabled='true'] {
88
+ color: var(--color-light-900);
89
+ background-color: var(--color-dark-500);
90
+ }
91
+ }
92
+
93
+ .outlined {
94
+ border: 1px solid var(--color-accent-500);
95
+ color: var(--color-accent-500);
96
+ background-color: transparent;
97
+
98
+ &:active {
99
+ border: 1px solid var(--color-accent-700);
100
+ color: var(--color-accent-700);
101
+ }
102
+
103
+ &:hover {
104
+ border: 1px solid var(--color-accent-100);
105
+ color: var(--color-accent-100);
106
+ }
107
+
108
+ &:focus-visible {
109
+ color: var(--color-accent-700);
110
+ outline: 1px solid var(--color-accent-700);
111
+ }
112
+
113
+ &:disabled,
114
+ &[aria-disabled='true'] {
115
+ border-color: var(--color-accent-900);
116
+ color: var(--color-accent-900);
117
+ }
118
+ }
119
+
120
+ .text {
121
+ min-width: 6.25rem;
122
+ border: 2px solid transparent;
123
+ color: var(--color-accent-500);
124
+ background-color: transparent;
125
+
126
+ &:active {
127
+ color: var(--color-accent-700);
128
+ }
129
+
130
+ &:hover {
131
+ color: var(--color-accent-100);
132
+ }
133
+
134
+ &:focus-visible {
135
+ border: 2px solid var(--color-accent-700);
136
+ color: var(--color-accent-500);
137
+ }
138
+
139
+ &:disabled,
140
+ &[aria-disabled='true'] {
141
+ color: var(--color-accent-900);
142
+ }
143
+ }
@@ -0,0 +1,48 @@
1
+ 'use client'
2
+
3
+ import type { ComponentPropsWithRef, ElementType, ReactNode } from 'react'
4
+ import clsx from 'clsx'
5
+ import type { Variant } from '@/components/Button'
6
+ import s from './Button.module.scss'
7
+
8
+ /**
9
+ * A flexible and reusable button component that supports multiple variants (button, a, div, etc.),
10
+ * custom root components via the `as` prop, and full-width styling.
11
+ *
12
+ * Uses React 19's ref prop forwarding, allowing refs to be passed directly
13
+ * to the underlying DOM element or component.
14
+ *
15
+ * @typeParam C - The element type or component to render (defaults to 'button')
16
+ */
17
+
18
+ export type ButtonProps<T extends ElementType = 'button'> = {
19
+ as?: T
20
+ children: ReactNode
21
+ variant?: Variant
22
+ fullWidth?: boolean
23
+ disabled?: boolean
24
+ } & ComponentPropsWithRef<T>
25
+
26
+ export const Button = <C extends ElementType = 'button'>(
27
+ props: ButtonProps<C> & Omit<ComponentPropsWithRef<C>, keyof ButtonProps<C>>
28
+ ) => {
29
+ const {
30
+ ref,
31
+ as: Component = 'button',
32
+ variant = 'primary',
33
+ disabled = false,
34
+ fullWidth,
35
+ ...rest
36
+ } = props
37
+
38
+ const isLink = typeof Component === 'string' && Component.toLowerCase() === 'a'
39
+
40
+ return (
41
+ <Component
42
+ ref={ref}
43
+ className={clsx(s.button, 'typography-h3', s[variant], fullWidth && s.fullWidth)}
44
+ {...(isLink ? { 'aria-disabled': disabled } : { disabled })}
45
+ {...rest}
46
+ />
47
+ )
48
+ }
@@ -0,0 +1,94 @@
1
+ 'use client'
2
+
3
+ import clsx from 'clsx'
4
+ import {
5
+ type ComponentPropsWithoutRef,
6
+ type ComponentPropsWithRef,
7
+ type ElementType,
8
+ type PropsWithChildren,
9
+ type ReactElement,
10
+ } from 'react'
11
+ import { forwardRef } from 'react'
12
+ import s from './Button.module.scss'
13
+
14
+ export type Variant = 'outlined' | 'primary' | 'secondary' | 'text'
15
+
16
+ type PolymorphicRef<C extends ElementType> = ComponentPropsWithRef<C>['ref']
17
+
18
+ type AsProp<C extends ElementType> = {
19
+ as?: C
20
+ }
21
+
22
+ type PropsToOmit<C extends ElementType, P> = keyof (AsProp<C> & P)
23
+
24
+ /* eslint-disable @typescript-eslint/no-empty-object-type */
25
+ type PolymorphicComponentProp<C extends ElementType, Props = {}> = PropsWithChildren<
26
+ Props & AsProp<C>
27
+ > &
28
+ Omit<ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>
29
+
30
+ type PolymorphicComponentPropWithRef<C extends ElementType, Props = {}> = PolymorphicComponentProp<
31
+ C,
32
+ Props
33
+ > & { ref?: PolymorphicRef<C> }
34
+
35
+ export type ButtonLegacyProps<C extends ElementType> = PolymorphicComponentPropWithRef<
36
+ C,
37
+ {
38
+ variant?: Variant
39
+ fullWidth?: boolean
40
+ disabled?: boolean
41
+ }
42
+ >
43
+
44
+ export type ButtonLegacyComponent = (<C extends ElementType = 'button'>(
45
+ props: ButtonLegacyProps<C>
46
+ ) => null | ReactElement) & {
47
+ displayName?: string
48
+ }
49
+
50
+ /**
51
+ * A polymorphic button component that renders as any HTML element or custom component.
52
+ *
53
+ * **Ref Forwarding:**
54
+ * Uses React's `forwardRef` API for ref forwarding, which is the standard approach
55
+ * for ref handling in React versions below 19.
56
+ *
57
+ * **React 19 Compatibility:**
58
+ * This component uses `@ts-expect-error` because React's `forwardRef` doesn't
59
+ * preserve polymorphic generic parameters in React 19. In React 19, refs are
60
+ * passed directly via props, but the type definitions for `forwardRef` with
61
+ * generics are still evolving. The error is safely ignored as the component
62
+ * works correctly at runtime.
63
+ *
64
+ * @description
65
+ * A flexible and reusable button component that supports multiple variants (button, a, div, etc.),
66
+ * custom root components, and full-width styling.
67
+ *
68
+ * @typeParam C - The element type or component to render (defaults to 'button')
69
+ */
70
+
71
+ export const ButtonLegacy = forwardRef(
72
+ // @ts-expect-error React.forwardRef doesn't preserve polymorphic generic parameters in react 19
73
+ <C extends ElementType = 'button'>(props: ButtonLegacyProps<C>, ref?: PolymorphicRef<C>) => {
74
+ const {
75
+ variant = 'primary',
76
+ fullWidth,
77
+ as: Component = 'button',
78
+ disabled = false,
79
+ ...rest
80
+ } = props
81
+ const isLink = Component === 'a'
82
+
83
+ return (
84
+ <Component
85
+ className={clsx(s.button, 'typography-h3', s[variant], fullWidth && s.fullWidth)}
86
+ ref={ref}
87
+ {...(isLink ? { 'aria-disabled': disabled } : { disabled })}
88
+ {...rest}
89
+ />
90
+ )
91
+ }
92
+ ) as ButtonLegacyComponent
93
+
94
+ ButtonLegacy.displayName = 'ButtonLegacy'
@@ -0,0 +1,2 @@
1
+ export * from './Button'
2
+ export * from './ButtonLegacy'
@@ -0,0 +1,11 @@
1
+ .card {
2
+ overflow: hidden;
3
+ display: flex;
4
+ flex-direction: column;
5
+
6
+ box-sizing: border-box;
7
+ border: 1px solid var(--color-dark-300);
8
+ border-radius: 2px;
9
+
10
+ background-color: var(--color-dark-500);
11
+ }
@@ -0,0 +1,21 @@
1
+ 'use client'
2
+
3
+ import clsx from 'clsx'
4
+ import { type ComponentPropsWithoutRef, type ComponentRef, forwardRef, type ReactNode } from 'react'
5
+ import s from './Cards.module.scss'
6
+
7
+ export type CardsProps = {
8
+ children: ReactNode
9
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'children'>
10
+
11
+ export const Cards = forwardRef<ComponentRef<'div'>, CardsProps>(
12
+ ({ children, className, ...props }, ref) => {
13
+ return (
14
+ <div ref={ref} className={clsx(s.card, className)} {...props}>
15
+ {children}
16
+ </div>
17
+ )
18
+ }
19
+ )
20
+
21
+ Cards.displayName = 'Cards'
@@ -0,0 +1 @@
1
+ export * from './Cards'
@@ -0,0 +1,97 @@
1
+ @use '../../styles/mixins' as *;
2
+
3
+ .root {
4
+ position: relative;
5
+ overflow: hidden;
6
+ aspect-ratio: 30.5 / 31.5;
7
+ width: 100%;
8
+ }
9
+
10
+ .slideWrapper {
11
+ overflow: hidden;
12
+
13
+ @include width-height(100%);
14
+ }
15
+
16
+ .track {
17
+ display: flex;
18
+
19
+ @include width-height(100%);
20
+ @include transition-basic(transform);
21
+ }
22
+
23
+ .slide {
24
+ flex: 0 0 100%;
25
+
26
+ @include width-height(100%);
27
+ }
28
+
29
+ %round-control-base {
30
+ cursor: pointer;
31
+ border: none;
32
+
33
+ @include transition-basic(background);
34
+ }
35
+
36
+ .arrowButton {
37
+ @extend %round-control-base;
38
+
39
+ @include flex(flex, center, center);
40
+ @include width-height(3rem);
41
+
42
+ position: absolute;
43
+ z-index: 1;
44
+ top: 50%;
45
+ transform: translateY(-50%);
46
+
47
+ color: var(--color-light-100);
48
+
49
+ background: rgb(0 0 0 / 40%);
50
+
51
+ &:hover {
52
+ background: rgb(0 0 0 / 60%);
53
+ }
54
+ }
55
+
56
+ .prev {
57
+ left: 1rem;
58
+ }
59
+
60
+ .next {
61
+ right: 1rem;
62
+ }
63
+
64
+ .dots {
65
+ @include flex(flex, center, center);
66
+
67
+ position: absolute;
68
+ z-index: 1;
69
+ bottom: 0.75rem;
70
+ left: 50%;
71
+ transform: translateX(-50%);
72
+
73
+ gap: 0.5rem;
74
+
75
+ padding: 0.5rem;
76
+ border-radius: 0.1rem;
77
+
78
+ background: color-mix(in srgb, var(--color-dark-300) 40%, transparent);
79
+ }
80
+
81
+ .dot {
82
+ @extend %round-control-base;
83
+
84
+ @include width-height(0.5rem);
85
+
86
+ padding: 0;
87
+ border-radius: 50%;
88
+ background: var(--color-light-100);
89
+
90
+ &:hover {
91
+ background: color-mix(in srgb, var(--color-dark-300) 75%, transparent);
92
+ }
93
+ }
94
+
95
+ .dotActive {
96
+ background: var(--color-accent-500);
97
+ }
@@ -0,0 +1,64 @@
1
+ 'use client'
2
+
3
+ import type { ReactNode } from 'react'
4
+ import clsx from 'clsx'
5
+ import { useState } from 'react'
6
+ import { ArrowIosBack, ArrowIosForward } from '@/assets'
7
+ import { Button } from '@/components/Button'
8
+ import s from './Carousel.module.scss'
9
+
10
+ export type CarouselProps = {
11
+ slides: ReactNode[]
12
+ }
13
+
14
+ export const Carousel = ({ slides }: CarouselProps) => {
15
+ const [currentIndex, setCurrentIndex] = useState(0)
16
+
17
+ const handlePrev = () => {
18
+ setCurrentIndex(prev => (prev - 1 + slides.length) % slides.length)
19
+ }
20
+
21
+ const handleNext = () => {
22
+ setCurrentIndex(prev => (prev + 1) % slides.length)
23
+ }
24
+
25
+ if (!slides.length) {
26
+ return null
27
+ }
28
+
29
+ return (
30
+ <div className={s.root}>
31
+ <Button type={'button'} className={clsx(s.arrowButton, s.prev)} onClick={handlePrev}>
32
+ <ArrowIosBack />
33
+ </Button>
34
+
35
+ <div className={s.slideWrapper}>
36
+ <div className={s.track} style={{ transform: `translateX(-${currentIndex * 100}%)` }}>
37
+ {slides.map((slide, index) => (
38
+ <div key={index} className={s.slide}>
39
+ {slide}
40
+ </div>
41
+ ))}
42
+ </div>
43
+ </div>
44
+
45
+ <Button type={'button'} className={clsx(s.arrowButton, s.next)} onClick={handleNext}>
46
+ <ArrowIosForward />
47
+ </Button>
48
+
49
+ <div className={s.dots}>
50
+ {slides.map((_, index) => (
51
+ <Button
52
+ key={index}
53
+ type={'button'}
54
+ className={clsx(s.dot, index === currentIndex && s.dotActive)}
55
+ onClick={() => setCurrentIndex(index)}
56
+ aria-label={`Go to slide ${index + 1}`}
57
+ >
58
+ {null}
59
+ </Button>
60
+ ))}
61
+ </div>
62
+ </div>
63
+ )
64
+ }
@@ -0,0 +1 @@
1
+ export * from './Carousel'
@@ -0,0 +1,76 @@
1
+ @use '@/styles/mixins' as *;
2
+
3
+ .container {
4
+ display: inline-flex;
5
+ }
6
+
7
+ .label {
8
+ @include flex(flex, center, center);
9
+
10
+ cursor: pointer;
11
+ user-select: none;
12
+ gap: 0.5rem;
13
+ }
14
+
15
+ .buttonWrapper {
16
+ @include flex(flex, center, center);
17
+
18
+ @include width-height(36px);
19
+
20
+ flex-shrink: 0;
21
+ border-radius: 50%;
22
+
23
+ &:hover {
24
+ background-color: var(--color-dark-300);
25
+ }
26
+
27
+ &:focus-within {
28
+ background-color: var(--color-dark-500);
29
+ }
30
+
31
+ &:active {
32
+ background-color: var(--color-dark-100);
33
+ }
34
+
35
+ &:has(.root[data-disabled]) {
36
+ cursor: not-allowed;
37
+ background-color: transparent;
38
+ }
39
+ }
40
+
41
+ .root {
42
+ @include flex(flex, center, center);
43
+
44
+ @include width-height(18px);
45
+
46
+ cursor: pointer;
47
+
48
+ margin: 0;
49
+ padding: 0;
50
+ border: 2px solid var(--color-light-100);
51
+ border-radius: 2px;
52
+
53
+ appearance: none;
54
+ background: transparent;
55
+
56
+ &[data-state='checked'] {
57
+ background: white;
58
+ }
59
+
60
+ &[data-disabled] {
61
+ cursor: not-allowed;
62
+ opacity: 0.5;
63
+ }
64
+ }
65
+
66
+ .indicator {
67
+ @include flex(flex, center, center);
68
+
69
+ @include width-height(100%);
70
+
71
+ color: var(--color-dark-900);
72
+
73
+ svg {
74
+ transform: scale(1.3);
75
+ }
76
+ }
@@ -0,0 +1,48 @@
1
+ 'use client'
2
+
3
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react'
4
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox'
5
+ import clsx from 'clsx'
6
+ import { forwardRef, useId } from 'react'
7
+ import { CheckmarkOutline } from '@/assets'
8
+ import s from './Checkbox.module.scss'
9
+
10
+ export type CheckboxProps = Omit<
11
+ ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
12
+ 'onCheckedChange'
13
+ > & {
14
+ label?: ReactNode
15
+ onCheckedChange?: (checked: boolean) => void
16
+ }
17
+
18
+ export const Checkbox = forwardRef<
19
+ React.ComponentRef<typeof CheckboxPrimitive.Root>,
20
+ CheckboxProps
21
+ >(({ label, id, className, onCheckedChange, ...props }, ref) => {
22
+ const generatedId = useId()
23
+ const checkboxId = id ?? generatedId
24
+
25
+ return (
26
+ <div className={s.container}>
27
+ <label htmlFor={checkboxId} className={s.label}>
28
+ <span className={s.buttonWrapper}>
29
+ <CheckboxPrimitive.Root
30
+ ref={ref}
31
+ id={checkboxId}
32
+ className={clsx(s.root, className)}
33
+ onCheckedChange={checked => onCheckedChange?.(checked === true)}
34
+ {...props}
35
+ >
36
+ <CheckboxPrimitive.Indicator className={s.indicator}>
37
+ <CheckmarkOutline color={'var(--color-dark-900)'} />
38
+ </CheckboxPrimitive.Indicator>
39
+ </CheckboxPrimitive.Root>
40
+ </span>
41
+
42
+ {label && <span>{label}</span>}
43
+ </label>
44
+ </div>
45
+ )
46
+ })
47
+
48
+ Checkbox.displayName = 'Checkbox'
@@ -0,0 +1 @@
1
+ export * from './Checkbox'
@@ -0,0 +1,33 @@
1
+ @use '@/styles/mixins' as *;
2
+
3
+ .spinner {
4
+ display: inline-block;
5
+
6
+ border: 2px solid var(--color-light-900);
7
+ border-top-color: var(--color-accent-700);
8
+ border-radius: 50%;
9
+
10
+ animation: spin 0.9s linear infinite;
11
+ }
12
+
13
+ .sm {
14
+ @include width-height(1rem);
15
+ }
16
+
17
+ .md {
18
+ @include width-height(1.5rem);
19
+
20
+ border-width: 3px;
21
+ }
22
+
23
+ .lg {
24
+ @include width-height(2.5rem);
25
+
26
+ border-width: 4px;
27
+ }
28
+
29
+ @keyframes spin {
30
+ to {
31
+ transform: rotate(360deg);
32
+ }
33
+ }
@@ -0,0 +1,33 @@
1
+ 'use client'
2
+
3
+ import clsx from 'clsx'
4
+ import { type ComponentPropsWithoutRef, forwardRef } from 'react'
5
+ import type { ProgressSizeVariant, ProgressThemeColor } from '@/types'
6
+ import { COLOR_MAP } from '@/constants'
7
+ import { isThemeColor } from '@/utils'
8
+ import s from './CircularProgress.module.scss'
9
+
10
+ export type Props = {
11
+ size?: ProgressSizeVariant
12
+ color?: ProgressThemeColor | string
13
+ } & Omit<ComponentPropsWithoutRef<'span'>, 'aria-label' | 'aria-live' | 'role'>
14
+
15
+ export const CircularProgress = forwardRef<HTMLSpanElement, Props>(
16
+ ({ className, size = 'md', color = 'primary', style, ...props }, ref) => {
17
+ const borderTopColor = isThemeColor(color) ? COLOR_MAP[color] : color
18
+
19
+ return (
20
+ <span
21
+ ref={ref}
22
+ aria-label={'Loading'}
23
+ aria-live={'polite'}
24
+ role={'status'}
25
+ className={clsx(s.spinner, s[size], className)}
26
+ style={{ ...style, borderTopColor }}
27
+ {...props}
28
+ />
29
+ )
30
+ }
31
+ )
32
+
33
+ CircularProgress.displayName = 'CircularProgress'
@@ -0,0 +1 @@
1
+ export * from './CircularProgress'