@regardio/react 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +133 -0
  3. package/dist/components/background-slideshow.d.ts +22 -0
  4. package/dist/components/background-slideshow.d.ts.map +1 -0
  5. package/dist/components/background-slideshow.js +76 -0
  6. package/dist/components/blurry-gradient.d.ts +9 -0
  7. package/dist/components/blurry-gradient.d.ts.map +1 -0
  8. package/dist/components/blurry-gradient.js +6 -0
  9. package/dist/components/box.d.ts +17 -0
  10. package/dist/components/box.d.ts.map +1 -0
  11. package/dist/components/box.js +25 -0
  12. package/dist/components/carousel.d.ts +26 -0
  13. package/dist/components/carousel.d.ts.map +1 -0
  14. package/dist/components/carousel.js +87 -0
  15. package/dist/components/countdown.d.ts +2 -0
  16. package/dist/components/countdown.d.ts.map +1 -0
  17. package/dist/components/countdown.js +48 -0
  18. package/dist/components/definition-list.d.ts +40 -0
  19. package/dist/components/definition-list.d.ts.map +1 -0
  20. package/dist/components/definition-list.js +57 -0
  21. package/dist/components/generic-error.d.ts +23 -0
  22. package/dist/components/generic-error.d.ts.map +1 -0
  23. package/dist/components/generic-error.js +39 -0
  24. package/dist/components/heading.d.ts +24 -0
  25. package/dist/components/heading.d.ts.map +1 -0
  26. package/dist/components/heading.js +29 -0
  27. package/dist/components/highlight.d.ts +16 -0
  28. package/dist/components/highlight.d.ts.map +1 -0
  29. package/dist/components/highlight.js +19 -0
  30. package/dist/components/icon-button.d.ts +6 -0
  31. package/dist/components/icon-button.d.ts.map +1 -0
  32. package/dist/components/icon-button.js +6 -0
  33. package/dist/components/if.d.ts +8 -0
  34. package/dist/components/if.d.ts.map +1 -0
  35. package/dist/components/if.js +16 -0
  36. package/dist/components/iframe.d.ts +8 -0
  37. package/dist/components/iframe.d.ts.map +1 -0
  38. package/dist/components/iframe.js +3 -0
  39. package/dist/components/item.d.ts +67 -0
  40. package/dist/components/item.d.ts.map +1 -0
  41. package/dist/components/item.js +309 -0
  42. package/dist/components/leaflet-map.d.ts +33 -0
  43. package/dist/components/leaflet-map.d.ts.map +1 -0
  44. package/dist/components/leaflet-map.js +195 -0
  45. package/dist/components/link.d.ts +41 -0
  46. package/dist/components/link.d.ts.map +1 -0
  47. package/dist/components/link.js +111 -0
  48. package/dist/components/link.test.d.ts +2 -0
  49. package/dist/components/link.test.d.ts.map +1 -0
  50. package/dist/components/link.test.js +204 -0
  51. package/dist/components/list-item.d.ts +16 -0
  52. package/dist/components/list-item.d.ts.map +1 -0
  53. package/dist/components/list-item.js +19 -0
  54. package/dist/components/maptiler-map.d.ts +26 -0
  55. package/dist/components/maptiler-map.d.ts.map +1 -0
  56. package/dist/components/maptiler-map.js +116 -0
  57. package/dist/components/markdown-container.d.ts +20 -0
  58. package/dist/components/markdown-container.d.ts.map +1 -0
  59. package/dist/components/markdown-container.js +93 -0
  60. package/dist/components/password-input.d.ts +9 -0
  61. package/dist/components/password-input.d.ts.map +1 -0
  62. package/dist/components/password-input.js +13 -0
  63. package/dist/components/picture.d.ts +26 -0
  64. package/dist/components/picture.d.ts.map +1 -0
  65. package/dist/components/picture.js +36 -0
  66. package/dist/components/protected-email.d.ts +9 -0
  67. package/dist/components/protected-email.d.ts.map +1 -0
  68. package/dist/components/protected-email.js +16 -0
  69. package/dist/components/text.d.ts +17 -0
  70. package/dist/components/text.d.ts.map +1 -0
  71. package/dist/components/text.js +27 -0
  72. package/dist/components/unordered-list.d.ts +16 -0
  73. package/dist/components/unordered-list.d.ts.map +1 -0
  74. package/dist/components/unordered-list.js +21 -0
  75. package/dist/hooks/use-current-route-data.d.ts +2 -0
  76. package/dist/hooks/use-current-route-data.d.ts.map +1 -0
  77. package/dist/hooks/use-current-route-data.js +12 -0
  78. package/dist/hooks/use-focus-search.d.ts +3 -0
  79. package/dist/hooks/use-focus-search.d.ts.map +1 -0
  80. package/dist/hooks/use-focus-search.js +15 -0
  81. package/dist/hooks/use-matches-data.d.ts +2 -0
  82. package/dist/hooks/use-matches-data.d.ts.map +1 -0
  83. package/dist/hooks/use-matches-data.js +11 -0
  84. package/dist/hooks/use-media-query.d.ts +2 -0
  85. package/dist/hooks/use-media-query.d.ts.map +1 -0
  86. package/dist/hooks/use-media-query.js +16 -0
  87. package/dist/hooks/use-mobile.d.ts +2 -0
  88. package/dist/hooks/use-mobile.d.ts.map +1 -0
  89. package/dist/hooks/use-mobile.js +15 -0
  90. package/dist/hooks/use-nonce.d.ts +5 -0
  91. package/dist/hooks/use-nonce.d.ts.map +1 -0
  92. package/dist/hooks/use-nonce.js +9 -0
  93. package/dist/hooks/use-nonce.test.d.ts +2 -0
  94. package/dist/hooks/use-nonce.test.d.ts.map +1 -0
  95. package/dist/hooks/use-nonce.test.js +27 -0
  96. package/dist/hooks/use-orientation.d.ts +3 -0
  97. package/dist/hooks/use-orientation.d.ts.map +1 -0
  98. package/dist/hooks/use-orientation.js +25 -0
  99. package/dist/hooks/use-user.d.ts +15 -0
  100. package/dist/hooks/use-user.d.ts.map +1 -0
  101. package/dist/hooks/use-user.js +17 -0
  102. package/dist/shadcn/accordion.d.ts +25 -0
  103. package/dist/shadcn/accordion.d.ts.map +1 -0
  104. package/dist/shadcn/accordion.js +45 -0
  105. package/dist/shadcn/alert-dialog.d.ts +73 -0
  106. package/dist/shadcn/alert-dialog.d.ts.map +1 -0
  107. package/dist/shadcn/alert-dialog.js +93 -0
  108. package/dist/shadcn/alert.d.ts +34 -0
  109. package/dist/shadcn/alert.d.ts.map +1 -0
  110. package/dist/shadcn/alert.js +42 -0
  111. package/dist/shadcn/aspect-ratio.d.ts +6 -0
  112. package/dist/shadcn/aspect-ratio.d.ts.map +1 -0
  113. package/dist/shadcn/aspect-ratio.js +7 -0
  114. package/dist/shadcn/avatar.d.ts +16 -0
  115. package/dist/shadcn/avatar.d.ts.map +1 -0
  116. package/dist/shadcn/avatar.js +27 -0
  117. package/dist/shadcn/badge.d.ts +29 -0
  118. package/dist/shadcn/badge.d.ts.map +1 -0
  119. package/dist/shadcn/badge.js +29 -0
  120. package/dist/shadcn/breadcrumb.d.ts +42 -0
  121. package/dist/shadcn/breadcrumb.d.ts.map +1 -0
  122. package/dist/shadcn/breadcrumb.js +74 -0
  123. package/dist/shadcn/button.d.ts +38 -0
  124. package/dist/shadcn/button.d.ts.map +1 -0
  125. package/dist/shadcn/button.js +38 -0
  126. package/dist/shadcn/calendar.d.ts +23 -0
  127. package/dist/shadcn/calendar.d.ts.map +1 -0
  128. package/dist/shadcn/calendar.js +163 -0
  129. package/dist/shadcn/card.d.ts +31 -0
  130. package/dist/shadcn/card.d.ts.map +1 -0
  131. package/dist/shadcn/card.js +55 -0
  132. package/dist/shadcn/carousel.d.ts +51 -0
  133. package/dist/shadcn/carousel.d.ts.map +1 -0
  134. package/dist/shadcn/carousel.js +161 -0
  135. package/dist/shadcn/chart.d.ts +103 -0
  136. package/dist/shadcn/chart.d.ts.map +1 -0
  137. package/dist/shadcn/chart.js +248 -0
  138. package/dist/shadcn/checkbox.d.ts +8 -0
  139. package/dist/shadcn/checkbox.d.ts.map +1 -0
  140. package/dist/shadcn/checkbox.js +22 -0
  141. package/dist/shadcn/collapsible.d.ts +16 -0
  142. package/dist/shadcn/collapsible.d.ts.map +1 -0
  143. package/dist/shadcn/collapsible.js +19 -0
  144. package/dist/shadcn/command.d.ts +61 -0
  145. package/dist/shadcn/command.d.ts.map +1 -0
  146. package/dist/shadcn/command.js +123 -0
  147. package/dist/shadcn/context-menu.d.ts +107 -0
  148. package/dist/shadcn/context-menu.d.ts.map +1 -0
  149. package/dist/shadcn/context-menu.js +151 -0
  150. package/dist/shadcn/dialog.d.ts +57 -0
  151. package/dist/shadcn/dialog.d.ts.map +1 -0
  152. package/dist/shadcn/dialog.js +96 -0
  153. package/dist/shadcn/drawer.d.ts +54 -0
  154. package/dist/shadcn/drawer.d.ts.map +1 -0
  155. package/dist/shadcn/drawer.js +96 -0
  156. package/dist/shadcn/dropdown-menu.d.ts +110 -0
  157. package/dist/shadcn/dropdown-menu.d.ts.map +1 -0
  158. package/dist/shadcn/dropdown-menu.js +152 -0
  159. package/dist/shadcn/form.d.ts +59 -0
  160. package/dist/shadcn/form.d.ts.map +1 -0
  161. package/dist/shadcn/form.js +99 -0
  162. package/dist/shadcn/hover-card.d.ts +20 -0
  163. package/dist/shadcn/hover-card.d.ts.map +1 -0
  164. package/dist/shadcn/hover-card.js +26 -0
  165. package/dist/shadcn/input-otp.d.ts +25 -0
  166. package/dist/shadcn/input-otp.d.ts.map +1 -0
  167. package/dist/shadcn/input-otp.js +54 -0
  168. package/dist/shadcn/input.d.ts +14 -0
  169. package/dist/shadcn/input.d.ts.map +1 -0
  170. package/dist/shadcn/input.js +48 -0
  171. package/dist/shadcn/label.d.ts +8 -0
  172. package/dist/shadcn/label.d.ts.map +1 -0
  173. package/dist/shadcn/label.js +16 -0
  174. package/dist/shadcn/menubar.d.ts +108 -0
  175. package/dist/shadcn/menubar.d.ts.map +1 -0
  176. package/dist/shadcn/menubar.js +174 -0
  177. package/dist/shadcn/navigation-menu.d.ts +79 -0
  178. package/dist/shadcn/navigation-menu.d.ts.map +1 -0
  179. package/dist/shadcn/navigation-menu.js +108 -0
  180. package/dist/shadcn/pagination.d.ts +45 -0
  181. package/dist/shadcn/pagination.d.ts.map +1 -0
  182. package/dist/shadcn/pagination.js +83 -0
  183. package/dist/shadcn/popover.d.ts +19 -0
  184. package/dist/shadcn/popover.d.ts.map +1 -0
  185. package/dist/shadcn/popover.js +29 -0
  186. package/dist/shadcn/progress.d.ts +9 -0
  187. package/dist/shadcn/progress.d.ts.map +1 -0
  188. package/dist/shadcn/progress.js +17 -0
  189. package/dist/shadcn/radio-group.d.ts +12 -0
  190. package/dist/shadcn/radio-group.d.ts.map +1 -0
  191. package/dist/shadcn/radio-group.js +32 -0
  192. package/dist/shadcn/resizable.d.ts +20 -0
  193. package/dist/shadcn/resizable.d.ts.map +1 -0
  194. package/dist/shadcn/resizable.js +32 -0
  195. package/dist/shadcn/scroll-area.d.ts +16 -0
  196. package/dist/shadcn/scroll-area.d.ts.map +1 -0
  197. package/dist/shadcn/scroll-area.js +40 -0
  198. package/dist/shadcn/select.d.ts +63 -0
  199. package/dist/shadcn/select.d.ts.map +1 -0
  200. package/dist/shadcn/select.js +120 -0
  201. package/dist/shadcn/separator.d.ts +10 -0
  202. package/dist/shadcn/separator.d.ts.map +1 -0
  203. package/dist/shadcn/separator.js +18 -0
  204. package/dist/shadcn/sheet.d.ts +48 -0
  205. package/dist/shadcn/sheet.d.ts.map +1 -0
  206. package/dist/shadcn/sheet.js +99 -0
  207. package/dist/shadcn/sidebar.d.ts +200 -0
  208. package/dist/shadcn/sidebar.d.ts.map +1 -0
  209. package/dist/shadcn/sidebar.js +528 -0
  210. package/dist/shadcn/skeleton.d.ts +6 -0
  211. package/dist/shadcn/skeleton.d.ts.map +1 -0
  212. package/dist/shadcn/skeleton.js +11 -0
  213. package/dist/shadcn/slider.d.ts +12 -0
  214. package/dist/shadcn/slider.d.ts.map +1 -0
  215. package/dist/shadcn/slider.js +50 -0
  216. package/dist/shadcn/sonner.d.ts +7 -0
  217. package/dist/shadcn/sonner.d.ts.map +1 -0
  218. package/dist/shadcn/sonner.js +20 -0
  219. package/dist/shadcn/switch.d.ts +8 -0
  220. package/dist/shadcn/switch.d.ts.map +1 -0
  221. package/dist/shadcn/switch.js +22 -0
  222. package/dist/shadcn/table.d.ts +35 -0
  223. package/dist/shadcn/table.d.ts.map +1 -0
  224. package/dist/shadcn/table.js +73 -0
  225. package/dist/shadcn/tabs.d.ts +20 -0
  226. package/dist/shadcn/tabs.d.ts.map +1 -0
  227. package/dist/shadcn/tabs.js +40 -0
  228. package/dist/shadcn/textarea.d.ts +7 -0
  229. package/dist/shadcn/textarea.d.ts.map +1 -0
  230. package/dist/shadcn/textarea.js +14 -0
  231. package/dist/shadcn/toggle-group.d.ts +22 -0
  232. package/dist/shadcn/toggle-group.d.ts.map +1 -0
  233. package/dist/shadcn/toggle-group.js +43 -0
  234. package/dist/shadcn/toggle.d.ts +29 -0
  235. package/dist/shadcn/toggle.d.ts.map +1 -0
  236. package/dist/shadcn/toggle.js +31 -0
  237. package/dist/shadcn/tooltip.d.ts +20 -0
  238. package/dist/shadcn/tooltip.d.ts.map +1 -0
  239. package/dist/shadcn/tooltip.js +40 -0
  240. package/dist/stories/BackgroundSlideshow.stories.d.ts +9 -0
  241. package/dist/stories/BackgroundSlideshow.stories.d.ts.map +1 -0
  242. package/dist/stories/BackgroundSlideshow.stories.js +60 -0
  243. package/dist/stories/BlurryGradient.stories.d.ts +11 -0
  244. package/dist/stories/BlurryGradient.stories.d.ts.map +1 -0
  245. package/dist/stories/BlurryGradient.stories.js +53 -0
  246. package/dist/stories/Box.stories.d.ts +13 -0
  247. package/dist/stories/Box.stories.d.ts.map +1 -0
  248. package/dist/stories/Box.stories.js +50 -0
  249. package/dist/stories/Carousel.stories.d.ts +9 -0
  250. package/dist/stories/Carousel.stories.d.ts.map +1 -0
  251. package/dist/stories/Carousel.stories.js +30 -0
  252. package/dist/stories/Countdown.stories.d.ts +7 -0
  253. package/dist/stories/Countdown.stories.d.ts.map +1 -0
  254. package/dist/stories/Countdown.stories.js +11 -0
  255. package/dist/stories/DefinitionList.stories.d.ts +9 -0
  256. package/dist/stories/DefinitionList.stories.d.ts.map +1 -0
  257. package/dist/stories/DefinitionList.stories.js +20 -0
  258. package/dist/stories/GenericError.stories.d.ts +9 -0
  259. package/dist/stories/GenericError.stories.d.ts.map +1 -0
  260. package/dist/stories/GenericError.stories.js +39 -0
  261. package/dist/stories/Heading.stories.d.ts +15 -0
  262. package/dist/stories/Heading.stories.d.ts.map +1 -0
  263. package/dist/stories/Heading.stories.js +61 -0
  264. package/dist/stories/Highlight.stories.d.ts +8 -0
  265. package/dist/stories/Highlight.stories.d.ts.map +1 -0
  266. package/dist/stories/Highlight.stories.js +19 -0
  267. package/dist/stories/IconButton.stories.d.ts +10 -0
  268. package/dist/stories/IconButton.stories.d.ts.map +1 -0
  269. package/dist/stories/IconButton.stories.js +32 -0
  270. package/dist/stories/If.stories.d.ts +13 -0
  271. package/dist/stories/If.stories.d.ts.map +1 -0
  272. package/dist/stories/If.stories.js +54 -0
  273. package/dist/stories/Iframe.stories.d.ts +8 -0
  274. package/dist/stories/Iframe.stories.d.ts.map +1 -0
  275. package/dist/stories/Iframe.stories.js +23 -0
  276. package/dist/stories/Item.stories.d.ts +10 -0
  277. package/dist/stories/Item.stories.d.ts.map +1 -0
  278. package/dist/stories/Item.stories.js +32 -0
  279. package/dist/stories/Link.stories.d.ts +10 -0
  280. package/dist/stories/Link.stories.d.ts.map +1 -0
  281. package/dist/stories/Link.stories.js +36 -0
  282. package/dist/stories/ListItem.stories.d.ts +9 -0
  283. package/dist/stories/ListItem.stories.d.ts.map +1 -0
  284. package/dist/stories/ListItem.stories.js +25 -0
  285. package/dist/stories/MarkdownContainer.stories.d.ts +11 -0
  286. package/dist/stories/MarkdownContainer.stories.d.ts.map +1 -0
  287. package/dist/stories/MarkdownContainer.stories.js +66 -0
  288. package/dist/stories/PasswordInput.stories.d.ts +9 -0
  289. package/dist/stories/PasswordInput.stories.d.ts.map +1 -0
  290. package/dist/stories/PasswordInput.stories.js +27 -0
  291. package/dist/stories/Picture.stories.d.ts +10 -0
  292. package/dist/stories/Picture.stories.d.ts.map +1 -0
  293. package/dist/stories/Picture.stories.js +46 -0
  294. package/dist/stories/ProtectedEmail.stories.d.ts +10 -0
  295. package/dist/stories/ProtectedEmail.stories.d.ts.map +1 -0
  296. package/dist/stories/ProtectedEmail.stories.js +34 -0
  297. package/dist/stories/Text.stories.d.ts +10 -0
  298. package/dist/stories/Text.stories.d.ts.map +1 -0
  299. package/dist/stories/Text.stories.js +31 -0
  300. package/dist/stories/UnorderedList.stories.d.ts +10 -0
  301. package/dist/stories/UnorderedList.stories.d.ts.map +1 -0
  302. package/dist/stories/UnorderedList.stories.js +24 -0
  303. package/dist/test-setup.d.ts +2 -0
  304. package/dist/test-setup.d.ts.map +1 -0
  305. package/dist/test-setup.js +1 -0
  306. package/dist/utils/author.d.ts +9 -0
  307. package/dist/utils/author.d.ts.map +1 -0
  308. package/dist/utils/author.js +37 -0
  309. package/dist/utils/author.test.d.ts +2 -0
  310. package/dist/utils/author.test.d.ts.map +1 -0
  311. package/dist/utils/author.test.js +46 -0
  312. package/dist/utils/cn.d.ts +5 -0
  313. package/dist/utils/cn.d.ts.map +1 -0
  314. package/dist/utils/cn.js +10 -0
  315. package/dist/utils/cn.test.d.ts +2 -0
  316. package/dist/utils/cn.test.d.ts.map +1 -0
  317. package/dist/utils/cn.test.js +33 -0
  318. package/dist/utils/is-route-active.d.ts +3 -0
  319. package/dist/utils/is-route-active.d.ts.map +1 -0
  320. package/dist/utils/is-route-active.js +54 -0
  321. package/dist/utils/is-route-active.test.d.ts +2 -0
  322. package/dist/utils/is-route-active.test.d.ts.map +1 -0
  323. package/dist/utils/is-route-active.test.js +61 -0
  324. package/dist/utils/locale.d.ts +22 -0
  325. package/dist/utils/locale.d.ts.map +1 -0
  326. package/dist/utils/locale.js +25 -0
  327. package/dist/utils/locale.test.d.ts +2 -0
  328. package/dist/utils/locale.test.d.ts.map +1 -0
  329. package/dist/utils/locale.test.js +99 -0
  330. package/dist/utils/text.d.ts +7 -0
  331. package/dist/utils/text.d.ts.map +1 -0
  332. package/dist/utils/text.js +102 -0
  333. package/dist/utils/text.test.d.ts +2 -0
  334. package/dist/utils/text.test.d.ts.map +1 -0
  335. package/dist/utils/text.test.js +122 -0
  336. package/package.json +117 -0
  337. package/src/components/background-slideshow.tsx +172 -0
  338. package/src/components/blurry-gradient.tsx +97 -0
  339. package/src/components/box.tsx +45 -0
  340. package/src/components/carousel.tsx +197 -0
  341. package/src/components/countdown.tsx +82 -0
  342. package/src/components/definition-list.tsx +90 -0
  343. package/src/components/generic-error.tsx +104 -0
  344. package/src/components/heading.tsx +60 -0
  345. package/src/components/highlight.tsx +53 -0
  346. package/src/components/icon-button.tsx +20 -0
  347. package/src/components/if.tsx +29 -0
  348. package/src/components/iframe.tsx +19 -0
  349. package/src/components/item.tsx +340 -0
  350. package/src/components/leaflet-map.tsx +294 -0
  351. package/src/components/link.test.tsx +387 -0
  352. package/src/components/link.tsx +206 -0
  353. package/src/components/list-item.tsx +30 -0
  354. package/src/components/maptiler-map.tsx +181 -0
  355. package/src/components/markdown-container.tsx +153 -0
  356. package/src/components/password-input.tsx +49 -0
  357. package/src/components/picture.tsx +107 -0
  358. package/src/components/protected-email.tsx +49 -0
  359. package/src/components/text.tsx +38 -0
  360. package/src/components/unordered-list.tsx +32 -0
  361. package/src/hooks/use-current-route-data.ts +18 -0
  362. package/src/hooks/use-focus-search.ts +20 -0
  363. package/src/hooks/use-matches-data.ts +19 -0
  364. package/src/hooks/use-media-query.ts +33 -0
  365. package/src/hooks/use-mobile.ts +19 -0
  366. package/src/hooks/use-nonce.test.ts +35 -0
  367. package/src/hooks/use-nonce.ts +20 -0
  368. package/src/hooks/use-orientation.ts +48 -0
  369. package/src/hooks/use-user.tsx +72 -0
  370. package/src/stories/BackgroundSlideshow.stories.tsx +68 -0
  371. package/src/stories/BlurryGradient.stories.tsx +62 -0
  372. package/src/stories/Box.stories.tsx +83 -0
  373. package/src/stories/Carousel.stories.tsx +95 -0
  374. package/src/stories/Countdown.stories.tsx +16 -0
  375. package/src/stories/DefinitionList.stories.tsx +51 -0
  376. package/src/stories/GenericError.stories.tsx +58 -0
  377. package/src/stories/Heading.stories.tsx +82 -0
  378. package/src/stories/Highlight.stories.tsx +28 -0
  379. package/src/stories/IconButton.stories.tsx +90 -0
  380. package/src/stories/If.stories.tsx +72 -0
  381. package/src/stories/Iframe.stories.tsx +29 -0
  382. package/src/stories/Item.stories.tsx +79 -0
  383. package/src/stories/Link.stories.tsx +58 -0
  384. package/src/stories/ListItem.stories.tsx +37 -0
  385. package/src/stories/MarkdownContainer.stories.tsx +76 -0
  386. package/src/stories/PasswordInput.stories.tsx +34 -0
  387. package/src/stories/Picture.stories.tsx +54 -0
  388. package/src/stories/ProtectedEmail.stories.tsx +57 -0
  389. package/src/stories/Text.stories.tsx +44 -0
  390. package/src/stories/UnorderedList.stories.tsx +73 -0
  391. package/src/styles/storybook.css +1 -0
  392. package/src/styles/tailwind.css +7 -0
  393. package/src/test-setup.ts +1 -0
  394. package/src/utils/author.test.ts +54 -0
  395. package/src/utils/author.tsx +73 -0
  396. package/src/utils/cn.test.ts +48 -0
  397. package/src/utils/cn.ts +14 -0
  398. package/src/utils/is-route-active.test.ts +80 -0
  399. package/src/utils/is-route-active.ts +100 -0
  400. package/src/utils/locale.test.ts +148 -0
  401. package/src/utils/locale.ts +127 -0
  402. package/src/utils/text.test.ts +152 -0
  403. package/src/utils/text.tsx +209 -0
  404. package/src/vite-env.d.ts +1 -0
@@ -0,0 +1,83 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Box } from '../components/box';
3
+
4
+ const meta: Meta<typeof Box> = {
5
+ component: Box,
6
+ parameters: {
7
+ layout: 'padded',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/Box',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof Box>;
15
+
16
+ export const Default: Story = {
17
+ args: {
18
+ children: 'Default Box',
19
+ },
20
+ };
21
+
22
+ export const Container: Story = {
23
+ args: {
24
+ children: 'Container Box',
25
+ variant: 'container',
26
+ },
27
+ };
28
+
29
+ export const Flex: Story = {
30
+ args: {
31
+ children: (
32
+ <>
33
+ <span>Flex Item 1</span>
34
+ <span>Flex Item 2</span>
35
+ <span>Flex Item 3</span>
36
+ </>
37
+ ),
38
+ variant: 'flex',
39
+ },
40
+ };
41
+
42
+ export const Grid: Story = {
43
+ args: {
44
+ children: (
45
+ <>
46
+ <div>Grid Item 1</div>
47
+ <div>Grid Item 2</div>
48
+ <div>Grid Item 3</div>
49
+ </>
50
+ ),
51
+ variant: 'grid',
52
+ },
53
+ };
54
+
55
+ export const Code: Story = {
56
+ args: {
57
+ children: "const example = 'code block';",
58
+ variant: 'code',
59
+ },
60
+ };
61
+
62
+ export const AsSection: Story = {
63
+ args: {
64
+ as: 'section',
65
+ children: 'This is rendered as a section element',
66
+ variant: 'section',
67
+ },
68
+ };
69
+
70
+ export const AllVariants: Story = {
71
+ render: () => (
72
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '16px' }}>
73
+ <Box variant="primary">Primary (default)</Box>
74
+ <Box variant="container">Container</Box>
75
+ <Box variant="flex">Flex</Box>
76
+ <Box variant="grid">Grid</Box>
77
+ <Box variant="code">Code</Box>
78
+ <Box variant="section">Section</Box>
79
+ <Box variant="aside">Aside</Box>
80
+ <Box variant="main">Main</Box>
81
+ </div>
82
+ ),
83
+ };
@@ -0,0 +1,95 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import {
3
+ Carousel,
4
+ CarouselContent,
5
+ CarouselItem,
6
+ CarouselNext,
7
+ CarouselPrevious,
8
+ } from '../components/carousel';
9
+
10
+ const meta: Meta<typeof Carousel> = {
11
+ component: Carousel,
12
+ parameters: {
13
+ layout: 'padded',
14
+ },
15
+ tags: ['autodocs'],
16
+ title: 'Components/Carousel',
17
+ };
18
+
19
+ export default meta;
20
+ type Story = StoryObj<typeof Carousel>;
21
+
22
+ const SlideCard = ({ children }: { children: React.ReactNode }) => (
23
+ <div
24
+ style={{
25
+ alignItems: 'center',
26
+ background: '#f0f0f0',
27
+ border: '1px solid #ddd',
28
+ borderRadius: '8px',
29
+ display: 'flex',
30
+ height: '200px',
31
+ justifyContent: 'center',
32
+ width: '300px',
33
+ }}
34
+ >
35
+ {children}
36
+ </div>
37
+ );
38
+
39
+ export const Default: Story = {
40
+ render: () => (
41
+ <Carousel className="w-full max-w-md">
42
+ <CarouselContent className="gap-4">
43
+ <CarouselItem>
44
+ <SlideCard>Slide 1</SlideCard>
45
+ </CarouselItem>
46
+ <CarouselItem>
47
+ <SlideCard>Slide 2</SlideCard>
48
+ </CarouselItem>
49
+ <CarouselItem>
50
+ <SlideCard>Slide 3</SlideCard>
51
+ </CarouselItem>
52
+ </CarouselContent>
53
+ </Carousel>
54
+ ),
55
+ };
56
+
57
+ export const WithControls: Story = {
58
+ render: () => (
59
+ <Carousel className="w-full max-w-md">
60
+ <CarouselContent className="gap-4">
61
+ <CarouselItem>
62
+ <SlideCard>Slide 1</SlideCard>
63
+ </CarouselItem>
64
+ <CarouselItem>
65
+ <SlideCard>Slide 2</SlideCard>
66
+ </CarouselItem>
67
+ <CarouselItem>
68
+ <SlideCard>Slide 3</SlideCard>
69
+ </CarouselItem>
70
+ </CarouselContent>
71
+ <div className="flex justify-center gap-4 mt-4">
72
+ <CarouselPrevious className="px-4 py-2 bg-gray-200 rounded">Previous</CarouselPrevious>
73
+ <CarouselNext className="px-4 py-2 bg-gray-200 rounded">Next</CarouselNext>
74
+ </div>
75
+ </Carousel>
76
+ ),
77
+ };
78
+
79
+ export const ManySlides: Story = {
80
+ render: () => (
81
+ <Carousel className="w-full max-w-md">
82
+ <CarouselContent className="gap-4">
83
+ {[1, 2, 3, 4, 5, 6].map((i) => (
84
+ <CarouselItem key={i}>
85
+ <SlideCard>Slide {i}</SlideCard>
86
+ </CarouselItem>
87
+ ))}
88
+ </CarouselContent>
89
+ <div className="flex justify-center gap-4 mt-4">
90
+ <CarouselPrevious className="px-4 py-2 bg-gray-200 rounded">←</CarouselPrevious>
91
+ <CarouselNext className="px-4 py-2 bg-gray-200 rounded">→</CarouselNext>
92
+ </div>
93
+ </Carousel>
94
+ ),
95
+ };
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Countdown } from '../components/countdown';
3
+
4
+ const meta: Meta<typeof Countdown> = {
5
+ component: Countdown,
6
+ parameters: {
7
+ layout: 'centered',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/Countdown',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof Countdown>;
15
+
16
+ export const Default: Story = {};
@@ -0,0 +1,51 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Dd, DefinitionList, Dt } from '../components/definition-list';
3
+
4
+ const meta: Meta<typeof DefinitionList> = {
5
+ component: DefinitionList,
6
+ parameters: {
7
+ layout: 'padded',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/DefinitionList',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof DefinitionList>;
15
+
16
+ export const Default: Story = {
17
+ render: () => (
18
+ <DefinitionList>
19
+ <Dt>Term 1</Dt>
20
+ <Dd>Definition for term 1</Dd>
21
+ <Dt>Term 2</Dt>
22
+ <Dd>Definition for term 2</Dd>
23
+ <Dt>Term 3</Dt>
24
+ <Dd>Definition for term 3</Dd>
25
+ </DefinitionList>
26
+ ),
27
+ };
28
+
29
+ export const Unstyled: Story = {
30
+ render: () => (
31
+ <DefinitionList variant="unstyled">
32
+ <Dt>Term 1</Dt>
33
+ <Dd>Definition for term 1</Dd>
34
+ <Dt>Term 2</Dt>
35
+ <Dd>Definition for term 2</Dd>
36
+ </DefinitionList>
37
+ ),
38
+ };
39
+
40
+ export const ContactInfo: Story = {
41
+ render: () => (
42
+ <DefinitionList>
43
+ <Dt>Email</Dt>
44
+ <Dd>contact@example.com</Dd>
45
+ <Dt>Phone</Dt>
46
+ <Dd>+1 234 567 890</Dd>
47
+ <Dt>Address</Dt>
48
+ <Dd>123 Main Street, City, Country</Dd>
49
+ </DefinitionList>
50
+ ),
51
+ };
@@ -0,0 +1,58 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { createMemoryRouter, RouterProvider } from 'react-router';
3
+ import { GenericError, getErrorDescriptor } from '../components/generic-error';
4
+
5
+ const meta: Meta<typeof GenericError> = {
6
+ component: GenericError,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ tags: ['autodocs'],
11
+ title: 'Components/GenericError',
12
+ };
13
+
14
+ export default meta;
15
+ type Story = StoryObj<typeof GenericError>;
16
+
17
+ const ErrorWrapper = ({ status }: { status: number }) => {
18
+ const router = createMemoryRouter(
19
+ [
20
+ {
21
+ element: <GenericError />,
22
+ errorElement: <GenericError />,
23
+ loader: () => {
24
+ throw new Response('Not Found', { status, statusText: 'Not Found' });
25
+ },
26
+ path: '/',
27
+ },
28
+ ],
29
+ { initialEntries: ['/'] },
30
+ );
31
+
32
+ return <RouterProvider router={router} />;
33
+ };
34
+
35
+ export const Error404: Story = {
36
+ render: () => <ErrorWrapper status={404} />,
37
+ };
38
+
39
+ export const Error500: Story = {
40
+ render: () => <ErrorWrapper status={500} />,
41
+ };
42
+
43
+ export const GetErrorDescriptorDemo: Story = {
44
+ render: () => {
45
+ const httpError = getErrorDescriptor(new Response('Not Found', { status: 404 }));
46
+ const runtimeError = getErrorDescriptor(new Error('Something went wrong'));
47
+ const unknownError = getErrorDescriptor('unknown');
48
+
49
+ return (
50
+ <div style={{ padding: '24px' }}>
51
+ <h3>Error Descriptor Examples</h3>
52
+ <pre style={{ background: '#f5f5f5', padding: '16px' }}>
53
+ {JSON.stringify({ httpError, runtimeError, unknownError }, null, 2)}
54
+ </pre>
55
+ </div>
56
+ );
57
+ },
58
+ };
@@ -0,0 +1,82 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Heading } from '../components/heading';
3
+
4
+ const meta: Meta<typeof Heading> = {
5
+ component: Heading,
6
+ parameters: {
7
+ layout: 'padded',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/Heading',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof Heading>;
15
+
16
+ export const Default: Story = {
17
+ args: {
18
+ children: 'Default Heading',
19
+ },
20
+ };
21
+
22
+ export const Level1: Story = {
23
+ args: {
24
+ children: 'Heading Level 1',
25
+ level: 1,
26
+ },
27
+ };
28
+
29
+ export const Level2: Story = {
30
+ args: {
31
+ children: 'Heading Level 2',
32
+ level: 2,
33
+ },
34
+ };
35
+
36
+ export const Level3: Story = {
37
+ args: {
38
+ children: 'Heading Level 3',
39
+ level: 3,
40
+ },
41
+ };
42
+
43
+ export const Level4: Story = {
44
+ args: {
45
+ children: 'Heading Level 4',
46
+ level: 4,
47
+ },
48
+ };
49
+
50
+ export const Level5: Story = {
51
+ args: {
52
+ children: 'Heading Level 5',
53
+ level: 5,
54
+ },
55
+ };
56
+
57
+ export const Level6: Story = {
58
+ args: {
59
+ children: 'Heading Level 6',
60
+ level: 6,
61
+ },
62
+ };
63
+
64
+ export const WithGermanText: Story = {
65
+ args: {
66
+ children: 'Größe und Maße',
67
+ level: 2,
68
+ },
69
+ };
70
+
71
+ export const AllLevels: Story = {
72
+ render: () => (
73
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
74
+ <Heading level={1}>Heading Level 1</Heading>
75
+ <Heading level={2}>Heading Level 2</Heading>
76
+ <Heading level={3}>Heading Level 3</Heading>
77
+ <Heading level={4}>Heading Level 4</Heading>
78
+ <Heading level={5}>Heading Level 5</Heading>
79
+ <Heading level={6}>Heading Level 6</Heading>
80
+ </div>
81
+ ),
82
+ };
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Highlight } from '../components/highlight';
3
+
4
+ const meta: Meta<typeof Highlight> = {
5
+ component: Highlight,
6
+ parameters: {
7
+ layout: 'padded',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/Highlight',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof Highlight>;
15
+
16
+ export const Default: Story = {
17
+ args: {
18
+ children: 'Highlighted text',
19
+ },
20
+ };
21
+
22
+ export const InParagraph: Story = {
23
+ render: () => (
24
+ <p>
25
+ This is a paragraph with <Highlight>highlighted text</Highlight> in the middle.
26
+ </p>
27
+ ),
28
+ };
@@ -0,0 +1,90 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { IconButton } from '../components/icon-button';
3
+
4
+ const meta: Meta<typeof IconButton> = {
5
+ component: IconButton,
6
+ parameters: {
7
+ layout: 'centered',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/IconButton',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof IconButton>;
15
+
16
+ const PlusIcon = () => (
17
+ <svg
18
+ fill="none"
19
+ height="24"
20
+ stroke="currentColor"
21
+ strokeWidth="2"
22
+ viewBox="0 0 24 24"
23
+ width="24"
24
+ >
25
+ <line
26
+ x1="12"
27
+ x2="12"
28
+ y1="5"
29
+ y2="19"
30
+ />
31
+ <line
32
+ x1="5"
33
+ x2="19"
34
+ y1="12"
35
+ y2="12"
36
+ />
37
+ </svg>
38
+ );
39
+
40
+ const CloseIcon = () => (
41
+ <svg
42
+ fill="none"
43
+ height="24"
44
+ stroke="currentColor"
45
+ strokeWidth="2"
46
+ viewBox="0 0 24 24"
47
+ width="24"
48
+ >
49
+ <line
50
+ x1="18"
51
+ x2="6"
52
+ y1="6"
53
+ y2="18"
54
+ />
55
+ <line
56
+ x1="6"
57
+ x2="18"
58
+ y1="6"
59
+ y2="18"
60
+ />
61
+ </svg>
62
+ );
63
+
64
+ export const Default: Story = {
65
+ args: {
66
+ icon: <PlusIcon />,
67
+ },
68
+ };
69
+
70
+ export const Close: Story = {
71
+ args: {
72
+ icon: <CloseIcon />,
73
+ },
74
+ };
75
+
76
+ export const WithCustomClass: Story = {
77
+ args: {
78
+ className: 'p-2 bg-gray-100 rounded hover:bg-gray-200',
79
+ icon: <PlusIcon />,
80
+ },
81
+ };
82
+
83
+ export const AllIcons: Story = {
84
+ render: () => (
85
+ <div style={{ display: 'flex', gap: '16px' }}>
86
+ <IconButton icon={<PlusIcon />} />
87
+ <IconButton icon={<CloseIcon />} />
88
+ </div>
89
+ ),
90
+ };
@@ -0,0 +1,72 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { If } from '../components/if';
3
+
4
+ const meta: Meta<typeof If> = {
5
+ component: If,
6
+ parameters: {
7
+ layout: 'padded',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/If',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof If>;
15
+
16
+ export const TrueCondition: Story = {
17
+ args: {
18
+ children: <p>This content is shown because condition is true</p>,
19
+ condition: true,
20
+ },
21
+ };
22
+
23
+ export const FalseCondition: Story = {
24
+ args: {
25
+ children: <p>This content is hidden</p>,
26
+ condition: false,
27
+ },
28
+ };
29
+
30
+ export const WithFallback: Story = {
31
+ args: {
32
+ children: <p>Primary content</p>,
33
+ condition: false,
34
+ fallback: <p>Fallback content shown when condition is false</p>,
35
+ },
36
+ };
37
+
38
+ export const WithValue: Story = {
39
+ render: () => (
40
+ <If condition={{ age: 30, name: 'John' }}>
41
+ {(user) => (
42
+ <p>
43
+ User: {user.name}, Age: {user.age}
44
+ </p>
45
+ )}
46
+ </If>
47
+ ),
48
+ };
49
+
50
+ export const NullCondition: Story = {
51
+ args: {
52
+ children: <p>This won't show</p>,
53
+ condition: null,
54
+ fallback: <p>Condition was null</p>,
55
+ },
56
+ };
57
+
58
+ export const ZeroCondition: Story = {
59
+ args: {
60
+ children: <p>This won't show</p>,
61
+ condition: 0,
62
+ fallback: <p>Condition was 0 (falsy)</p>,
63
+ },
64
+ };
65
+
66
+ export const EmptyStringCondition: Story = {
67
+ args: {
68
+ children: <p>This won't show</p>,
69
+ condition: '',
70
+ fallback: <p>Condition was empty string (falsy)</p>,
71
+ },
72
+ };
@@ -0,0 +1,29 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Iframe } from '../components/iframe';
3
+
4
+ const meta: Meta<typeof Iframe> = {
5
+ component: Iframe,
6
+ parameters: {
7
+ layout: 'padded',
8
+ },
9
+ tags: ['autodocs'],
10
+ title: 'Components/Iframe',
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryObj<typeof Iframe>;
15
+
16
+ export const YouTubeVideo: Story = {
17
+ args: {
18
+ src: 'https://www.youtube.com/embed/dQw4w9WgXcQ',
19
+ title: 'YouTube Video',
20
+ },
21
+ };
22
+
23
+ export const WithCustomClass: Story = {
24
+ args: {
25
+ className: 'rounded-lg shadow-lg',
26
+ src: 'https://www.youtube.com/embed/dQw4w9WgXcQ',
27
+ title: 'Styled YouTube Video',
28
+ },
29
+ };
@@ -0,0 +1,79 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { MemoryRouter } from 'react-router';
3
+ import { Item } from '../components/item';
4
+
5
+ const meta: Meta<typeof Item> = {
6
+ component: Item,
7
+ decorators: [
8
+ (Story) => (
9
+ <MemoryRouter>
10
+ <Story />
11
+ </MemoryRouter>
12
+ ),
13
+ ],
14
+ parameters: {
15
+ layout: 'padded',
16
+ },
17
+ tags: ['autodocs'],
18
+ title: 'Components/Item',
19
+ };
20
+
21
+ export default meta;
22
+ type Story = StoryObj<typeof Item>;
23
+
24
+ export const Default: Story = {
25
+ args: {
26
+ children: <div className="p-4">Item content</div>,
27
+ },
28
+ };
29
+
30
+ export const WithLink: Story = {
31
+ args: {
32
+ children: <div className="p-4">Clickable item</div>,
33
+ link: '/example',
34
+ },
35
+ };
36
+
37
+ export const WidthVariants: Story = {
38
+ render: () => (
39
+ <div className="grid grid-cols-12 gap-4">
40
+ <Item width="xs">
41
+ <div className="p-2 bg-gray-100">XS</div>
42
+ </Item>
43
+ <Item width="sm">
44
+ <div className="p-2 bg-gray-100">SM</div>
45
+ </Item>
46
+ <Item width="md">
47
+ <div className="p-2 bg-gray-100">MD</div>
48
+ </Item>
49
+ <Item width="lg">
50
+ <div className="p-2 bg-gray-100">LG</div>
51
+ </Item>
52
+ <Item width="full">
53
+ <div className="p-2 bg-gray-100">Full</div>
54
+ </Item>
55
+ </div>
56
+ ),
57
+ };
58
+
59
+ export const ThemeColors: Story = {
60
+ render: () => (
61
+ <div style={{ display: 'flex', flexWrap: 'wrap', gap: '8px' }}>
62
+ <Item themeColor="blue">
63
+ <div className="p-4">Blue</div>
64
+ </Item>
65
+ <Item themeColor="green">
66
+ <div className="p-4">Green</div>
67
+ </Item>
68
+ <Item themeColor="red">
69
+ <div className="p-4">Red</div>
70
+ </Item>
71
+ <Item themeColor="orange">
72
+ <div className="p-4">Orange</div>
73
+ </Item>
74
+ <Item themeColor="purple">
75
+ <div className="p-4">Purple</div>
76
+ </Item>
77
+ </div>
78
+ ),
79
+ };