@tetherto/dev-websites-core 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/README.md +81 -9
  2. package/dist/analytics/GtmLoader.d.mts +14 -0
  3. package/dist/analytics/GtmLoader.d.mts.map +1 -0
  4. package/dist/analytics/GtmLoader.mjs +30 -0
  5. package/dist/analytics/GtmLoader.mjs.map +1 -0
  6. package/dist/analytics/createTrackedLink.d.mts +46 -0
  7. package/dist/analytics/createTrackedLink.d.mts.map +1 -0
  8. package/dist/analytics/createTrackedLink.mjs +36 -0
  9. package/dist/analytics/createTrackedLink.mjs.map +1 -0
  10. package/dist/analytics/index.d.mts +3 -0
  11. package/dist/analytics/index.mjs +3 -0
  12. package/dist/cms/index.d.mts +2 -2
  13. package/dist/cms/index.mjs +2 -2
  14. package/dist/{cms-5bS91IRZ.mjs → cms.mjs} +2 -2
  15. package/dist/cms.mjs.map +1 -0
  16. package/dist/i18n/index.d.mts +1 -1
  17. package/dist/i18n/index.mjs +1 -1
  18. package/dist/{i18n-Dy3VrbBw.mjs → i18n.mjs} +1 -1
  19. package/dist/i18n.mjs.map +1 -0
  20. package/dist/index.d.mts +214 -6
  21. package/dist/index.d.mts.map +1 -0
  22. package/dist/index.mjs +6 -6
  23. package/dist/{index-D36IEwUg.d.mts → index2.d.mts} +1 -1
  24. package/dist/index2.d.mts.map +1 -0
  25. package/dist/{index-tTs9h9BS.d.mts → index3.d.mts} +2 -2
  26. package/dist/index3.d.mts.map +1 -0
  27. package/dist/{index-Dyi7DDoO.d.mts → index4.d.mts} +1 -1
  28. package/dist/index4.d.mts.map +1 -0
  29. package/dist/index5.d.mts +6 -0
  30. package/dist/{logger-BPURnavq.mjs → logger.mjs} +1 -1
  31. package/dist/logger.mjs.map +1 -0
  32. package/dist/{readMediaBuffer-1C3QTpkO.d.mts → readMediaBuffer.d.mts} +1 -1
  33. package/dist/readMediaBuffer.d.mts.map +1 -0
  34. package/dist/{readMediaBuffer-DWkTbYVn.mjs → readMediaBuffer.mjs} +2 -2
  35. package/dist/readMediaBuffer.mjs.map +1 -0
  36. package/dist/seo/index.d.mts +1 -1
  37. package/dist/seo/index.mjs +1 -1
  38. package/dist/{seo-e5XjgQ7l.mjs → seo.mjs} +3 -3
  39. package/dist/seo.mjs.map +1 -0
  40. package/dist/ui/a11y/focus.d.mts +6 -0
  41. package/dist/ui/a11y/focus.d.mts.map +1 -0
  42. package/dist/ui/a11y/focus.mjs +7 -0
  43. package/dist/ui/a11y/focus.mjs.map +1 -0
  44. package/dist/ui/a11y/index.d.mts +4 -0
  45. package/dist/ui/a11y/index.mjs +4 -0
  46. package/dist/ui/carousel/index.d.mts +3 -0
  47. package/dist/ui/carousel/index.mjs +3 -0
  48. package/dist/ui/components/Accordion/Accordion.d.mts +16 -0
  49. package/dist/ui/components/Accordion/Accordion.d.mts.map +1 -0
  50. package/dist/ui/components/Accordion/Accordion.mjs +51 -0
  51. package/dist/ui/components/Accordion/Accordion.mjs.map +1 -0
  52. package/dist/ui/components/Accordion/index.d.mts +2 -0
  53. package/dist/ui/components/Accordion/index.mjs +2 -0
  54. package/dist/ui/components/Avatar/Avatar.d.mts +9 -0
  55. package/dist/ui/components/Avatar/Avatar.d.mts.map +1 -0
  56. package/dist/ui/components/Avatar/Avatar.mjs +15 -0
  57. package/dist/ui/components/Avatar/Avatar.mjs.map +1 -0
  58. package/dist/ui/components/Avatar/index.d.mts +2 -0
  59. package/dist/ui/components/Avatar/index.mjs +2 -0
  60. package/dist/ui/components/Badge/Badge.d.mts +14 -0
  61. package/dist/ui/components/Badge/Badge.d.mts.map +1 -0
  62. package/dist/ui/components/Badge/Badge.mjs +30 -0
  63. package/dist/ui/components/Badge/Badge.mjs.map +1 -0
  64. package/dist/ui/components/Badge/index.d.mts +2 -0
  65. package/dist/ui/components/Badge/index.mjs +2 -0
  66. package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts +24 -0
  67. package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts.map +1 -0
  68. package/dist/ui/components/BadgeVersion/BadgeVersion.mjs +66 -0
  69. package/dist/ui/components/BadgeVersion/BadgeVersion.mjs.map +1 -0
  70. package/dist/ui/components/BadgeVersion/index.d.mts +2 -0
  71. package/dist/ui/components/BadgeVersion/index.mjs +2 -0
  72. package/dist/ui/components/Button/Button.d.mts +14 -0
  73. package/dist/ui/components/Button/Button.d.mts.map +1 -0
  74. package/dist/ui/components/Button/Button.mjs +48 -0
  75. package/dist/ui/components/Button/Button.mjs.map +1 -0
  76. package/dist/ui/components/Button/index.d.mts +2 -0
  77. package/dist/ui/components/Button/index.mjs +2 -0
  78. package/dist/ui/components/Card/Card.d.mts +14 -0
  79. package/dist/ui/components/Card/Card.d.mts.map +1 -0
  80. package/dist/ui/components/Card/Card.mjs +40 -0
  81. package/dist/ui/components/Card/Card.mjs.map +1 -0
  82. package/dist/ui/components/Card/index.d.mts +2 -0
  83. package/dist/ui/components/Card/index.mjs +2 -0
  84. package/dist/ui/components/Carousel/Carousel.d.mts +42 -0
  85. package/dist/ui/components/Carousel/Carousel.d.mts.map +1 -0
  86. package/dist/ui/components/Carousel/Carousel.mjs +164 -0
  87. package/dist/ui/components/Carousel/Carousel.mjs.map +1 -0
  88. package/dist/ui/components/Carousel/index.d.mts +2 -0
  89. package/dist/ui/components/Carousel/index.mjs +2 -0
  90. package/dist/ui/components/Checkbox/Checkbox.d.mts +8 -0
  91. package/dist/ui/components/Checkbox/Checkbox.d.mts.map +1 -0
  92. package/dist/ui/components/Checkbox/Checkbox.mjs +39 -0
  93. package/dist/ui/components/Checkbox/Checkbox.mjs.map +1 -0
  94. package/dist/ui/components/Checkbox/index.d.mts +2 -0
  95. package/dist/ui/components/Checkbox/index.mjs +2 -0
  96. package/dist/ui/components/CodeBlock/CodeBlock.d.mts +22 -0
  97. package/dist/ui/components/CodeBlock/CodeBlock.d.mts.map +1 -0
  98. package/dist/ui/components/CodeBlock/CodeBlock.mjs +66 -0
  99. package/dist/ui/components/CodeBlock/CodeBlock.mjs.map +1 -0
  100. package/dist/ui/components/CodeBlock/index.d.mts +2 -0
  101. package/dist/ui/components/CodeBlock/index.mjs +2 -0
  102. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts +19 -0
  103. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts.map +1 -0
  104. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs +59 -0
  105. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs.map +1 -0
  106. package/dist/ui/components/CodeBlockTabs/index.d.mts +2 -0
  107. package/dist/ui/components/CodeBlockTabs/index.mjs +2 -0
  108. package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts +13 -0
  109. package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts.map +1 -0
  110. package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs +55 -0
  111. package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
  112. package/dist/ui/components/CollapsibleSection/index.d.mts +2 -0
  113. package/dist/ui/components/CollapsibleSection/index.mjs +2 -0
  114. package/dist/ui/components/CopyButton/CopyButton.d.mts +12 -0
  115. package/dist/ui/components/CopyButton/CopyButton.d.mts.map +1 -0
  116. package/dist/ui/components/CopyButton/CopyButton.mjs +45 -0
  117. package/dist/ui/components/CopyButton/CopyButton.mjs.map +1 -0
  118. package/dist/ui/components/CopyButton/index.d.mts +2 -0
  119. package/dist/ui/components/CopyButton/index.mjs +2 -0
  120. package/dist/ui/components/Dialog/Dialog.d.mts +26 -0
  121. package/dist/ui/components/Dialog/Dialog.d.mts.map +1 -0
  122. package/dist/ui/components/Dialog/Dialog.mjs +79 -0
  123. package/dist/ui/components/Dialog/Dialog.mjs.map +1 -0
  124. package/dist/ui/components/Dialog/index.d.mts +2 -0
  125. package/dist/ui/components/Dialog/index.mjs +2 -0
  126. package/dist/ui/components/EmptyState/EmptyState.d.mts +18 -0
  127. package/dist/ui/components/EmptyState/EmptyState.d.mts.map +1 -0
  128. package/dist/ui/components/EmptyState/EmptyState.mjs +36 -0
  129. package/dist/ui/components/EmptyState/EmptyState.mjs.map +1 -0
  130. package/dist/ui/components/EmptyState/index.d.mts +2 -0
  131. package/dist/ui/components/EmptyState/index.mjs +2 -0
  132. package/dist/ui/components/FieldError/FieldError.d.mts +14 -0
  133. package/dist/ui/components/FieldError/FieldError.d.mts.map +1 -0
  134. package/dist/ui/components/FieldError/FieldError.mjs +19 -0
  135. package/dist/ui/components/FieldError/FieldError.mjs.map +1 -0
  136. package/dist/ui/components/FieldError/index.d.mts +2 -0
  137. package/dist/ui/components/FieldError/index.mjs +2 -0
  138. package/dist/ui/components/FormattedDate/FormattedDate.d.mts +15 -0
  139. package/dist/ui/components/FormattedDate/FormattedDate.d.mts.map +1 -0
  140. package/dist/ui/components/FormattedDate/FormattedDate.mjs +23 -0
  141. package/dist/ui/components/FormattedDate/FormattedDate.mjs.map +1 -0
  142. package/dist/ui/components/FormattedDate/index.d.mts +2 -0
  143. package/dist/ui/components/FormattedDate/index.mjs +2 -0
  144. package/dist/ui/components/IconButton/IconButton.d.mts +10 -0
  145. package/dist/ui/components/IconButton/IconButton.d.mts.map +1 -0
  146. package/dist/ui/components/IconButton/IconButton.mjs +19 -0
  147. package/dist/ui/components/IconButton/IconButton.mjs.map +1 -0
  148. package/dist/ui/components/IconButton/index.d.mts +2 -0
  149. package/dist/ui/components/IconButton/index.mjs +2 -0
  150. package/dist/ui/components/Input/Input.d.mts +12 -0
  151. package/dist/ui/components/Input/Input.d.mts.map +1 -0
  152. package/dist/ui/components/Input/Input.mjs +43 -0
  153. package/dist/ui/components/Input/Input.mjs.map +1 -0
  154. package/dist/ui/components/Input/index.d.mts +2 -0
  155. package/dist/ui/components/Input/index.mjs +2 -0
  156. package/dist/ui/components/Label/Label.d.mts +11 -0
  157. package/dist/ui/components/Label/Label.d.mts.map +1 -0
  158. package/dist/ui/components/Label/Label.mjs +18 -0
  159. package/dist/ui/components/Label/Label.mjs.map +1 -0
  160. package/dist/ui/components/Label/index.d.mts +2 -0
  161. package/dist/ui/components/Label/index.mjs +2 -0
  162. package/dist/ui/components/LazyVideo/LazyVideo.d.mts +23 -0
  163. package/dist/ui/components/LazyVideo/LazyVideo.d.mts.map +1 -0
  164. package/dist/ui/components/LazyVideo/LazyVideo.mjs +57 -0
  165. package/dist/ui/components/LazyVideo/LazyVideo.mjs.map +1 -0
  166. package/dist/ui/components/LazyVideo/index.d.mts +2 -0
  167. package/dist/ui/components/LazyVideo/index.mjs +2 -0
  168. package/dist/ui/components/Pagination/Pagination.d.mts +38 -0
  169. package/dist/ui/components/Pagination/Pagination.d.mts.map +1 -0
  170. package/dist/ui/components/Pagination/Pagination.mjs +110 -0
  171. package/dist/ui/components/Pagination/Pagination.mjs.map +1 -0
  172. package/dist/ui/components/Pagination/index.d.mts +2 -0
  173. package/dist/ui/components/Pagination/index.mjs +2 -0
  174. package/dist/ui/components/PaginationItem/PaginationItem.d.mts +15 -0
  175. package/dist/ui/components/PaginationItem/PaginationItem.d.mts.map +1 -0
  176. package/dist/ui/components/PaginationItem/PaginationItem.mjs +34 -0
  177. package/dist/ui/components/PaginationItem/PaginationItem.mjs.map +1 -0
  178. package/dist/ui/components/PaginationItem/index.d.mts +2 -0
  179. package/dist/ui/components/PaginationItem/index.mjs +2 -0
  180. package/dist/ui/components/PasswordInput/PasswordInput.d.mts +10 -0
  181. package/dist/ui/components/PasswordInput/PasswordInput.d.mts.map +1 -0
  182. package/dist/ui/components/PasswordInput/PasswordInput.mjs +39 -0
  183. package/dist/ui/components/PasswordInput/PasswordInput.mjs.map +1 -0
  184. package/dist/ui/components/PasswordInput/index.d.mts +2 -0
  185. package/dist/ui/components/PasswordInput/index.mjs +2 -0
  186. package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts +20 -0
  187. package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts.map +1 -0
  188. package/dist/ui/components/ProgressStepper/ProgressStepper.mjs +39 -0
  189. package/dist/ui/components/ProgressStepper/ProgressStepper.mjs.map +1 -0
  190. package/dist/ui/components/ProgressStepper/index.d.mts +2 -0
  191. package/dist/ui/components/ProgressStepper/index.mjs +2 -0
  192. package/dist/ui/components/Prose/Prose.d.mts +10 -0
  193. package/dist/ui/components/Prose/Prose.d.mts.map +1 -0
  194. package/dist/ui/components/Prose/Prose.mjs +19 -0
  195. package/dist/ui/components/Prose/Prose.mjs.map +1 -0
  196. package/dist/ui/components/Prose/index.d.mts +2 -0
  197. package/dist/ui/components/Prose/index.mjs +2 -0
  198. package/dist/ui/components/Radio/Radio.d.mts +8 -0
  199. package/dist/ui/components/Radio/Radio.d.mts.map +1 -0
  200. package/dist/ui/components/Radio/Radio.mjs +25 -0
  201. package/dist/ui/components/Radio/Radio.mjs.map +1 -0
  202. package/dist/ui/components/Radio/index.d.mts +2 -0
  203. package/dist/ui/components/Radio/index.mjs +2 -0
  204. package/dist/ui/components/Reveal/Reveal.d.mts +10 -0
  205. package/dist/ui/components/Reveal/Reveal.d.mts.map +1 -0
  206. package/dist/ui/components/Reveal/Reveal.mjs +18 -0
  207. package/dist/ui/components/Reveal/Reveal.mjs.map +1 -0
  208. package/dist/ui/components/Reveal/index.d.mts +2 -0
  209. package/dist/ui/components/Reveal/index.mjs +2 -0
  210. package/dist/ui/components/SearchInput/SearchInput.d.mts +15 -0
  211. package/dist/ui/components/SearchInput/SearchInput.d.mts.map +1 -0
  212. package/dist/ui/components/SearchInput/SearchInput.mjs +28 -0
  213. package/dist/ui/components/SearchInput/SearchInput.mjs.map +1 -0
  214. package/dist/ui/components/SearchInput/index.d.mts +2 -0
  215. package/dist/ui/components/SearchInput/index.mjs +2 -0
  216. package/dist/ui/components/Select/Select.d.mts +34 -0
  217. package/dist/ui/components/Select/Select.d.mts.map +1 -0
  218. package/dist/ui/components/Select/Select.mjs +167 -0
  219. package/dist/ui/components/Select/Select.mjs.map +1 -0
  220. package/dist/ui/components/Select/index.d.mts +2 -0
  221. package/dist/ui/components/Select/index.mjs +2 -0
  222. package/dist/ui/components/Sheet/Sheet.d.mts +19 -0
  223. package/dist/ui/components/Sheet/Sheet.d.mts.map +1 -0
  224. package/dist/ui/components/Sheet/Sheet.mjs +59 -0
  225. package/dist/ui/components/Sheet/Sheet.mjs.map +1 -0
  226. package/dist/ui/components/Sheet/index.d.mts +2 -0
  227. package/dist/ui/components/Sheet/index.mjs +2 -0
  228. package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts +10 -0
  229. package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts.map +1 -0
  230. package/dist/ui/components/StaggerReveal/StaggerReveal.mjs +31 -0
  231. package/dist/ui/components/StaggerReveal/StaggerReveal.mjs.map +1 -0
  232. package/dist/ui/components/StaggerReveal/index.d.mts +2 -0
  233. package/dist/ui/components/StaggerReveal/index.mjs +2 -0
  234. package/dist/ui/components/Stepper/Stepper.d.mts +15 -0
  235. package/dist/ui/components/Stepper/Stepper.d.mts.map +1 -0
  236. package/dist/ui/components/Stepper/Stepper.mjs +38 -0
  237. package/dist/ui/components/Stepper/Stepper.mjs.map +1 -0
  238. package/dist/ui/components/Stepper/index.d.mts +2 -0
  239. package/dist/ui/components/Stepper/index.mjs +2 -0
  240. package/dist/ui/components/Switch/Switch.d.mts +12 -0
  241. package/dist/ui/components/Switch/Switch.d.mts.map +1 -0
  242. package/dist/ui/components/Switch/Switch.mjs +34 -0
  243. package/dist/ui/components/Switch/Switch.mjs.map +1 -0
  244. package/dist/ui/components/Switch/index.d.mts +2 -0
  245. package/dist/ui/components/Switch/index.mjs +2 -0
  246. package/dist/ui/components/TextButton/TextButton.d.mts +9 -0
  247. package/dist/ui/components/TextButton/TextButton.d.mts.map +1 -0
  248. package/dist/ui/components/TextButton/TextButton.mjs +16 -0
  249. package/dist/ui/components/TextButton/TextButton.mjs.map +1 -0
  250. package/dist/ui/components/TextButton/index.d.mts +2 -0
  251. package/dist/ui/components/TextButton/index.mjs +2 -0
  252. package/dist/ui/components/Textarea/Textarea.d.mts +9 -0
  253. package/dist/ui/components/Textarea/Textarea.d.mts.map +1 -0
  254. package/dist/ui/components/Textarea/Textarea.mjs +27 -0
  255. package/dist/ui/components/Textarea/Textarea.mjs.map +1 -0
  256. package/dist/ui/components/Textarea/index.d.mts +2 -0
  257. package/dist/ui/components/Textarea/index.mjs +2 -0
  258. package/dist/ui/components/Toast/Toast.d.mts +20 -0
  259. package/dist/ui/components/Toast/Toast.d.mts.map +1 -0
  260. package/dist/ui/components/Toast/Toast.mjs +128 -0
  261. package/dist/ui/components/Toast/Toast.mjs.map +1 -0
  262. package/dist/ui/components/Toast/index.d.mts +2 -0
  263. package/dist/ui/components/Toast/index.mjs +2 -0
  264. package/dist/ui/components/Tooltip/Tooltip.d.mts +11 -0
  265. package/dist/ui/components/Tooltip/Tooltip.d.mts.map +1 -0
  266. package/dist/ui/components/Tooltip/Tooltip.mjs +20 -0
  267. package/dist/ui/components/Tooltip/Tooltip.mjs.map +1 -0
  268. package/dist/ui/components/Tooltip/index.d.mts +2 -0
  269. package/dist/ui/components/Tooltip/index.mjs +2 -0
  270. package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts +7 -0
  271. package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts.map +1 -0
  272. package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs +13 -0
  273. package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -0
  274. package/dist/ui/components/VisuallyHidden/index.d.mts +2 -0
  275. package/dist/ui/components/VisuallyHidden/index.mjs +2 -0
  276. package/dist/ui/hooks/index.d.mts +2 -0
  277. package/dist/ui/hooks/index.mjs +2 -0
  278. package/dist/ui/hooks/useInView.d.mts +13 -0
  279. package/dist/ui/hooks/useInView.d.mts.map +1 -0
  280. package/dist/ui/hooks/useInView.mjs +37 -0
  281. package/dist/ui/hooks/useInView.mjs.map +1 -0
  282. package/dist/ui/index.d.mts +81 -0
  283. package/dist/ui/index.mjs +40 -0
  284. package/dist/ui/theme/preset.d.mts +170 -0
  285. package/dist/ui/theme/preset.d.mts.map +1 -0
  286. package/dist/ui/theme/preset.mjs +143 -0
  287. package/dist/ui/theme/preset.mjs.map +1 -0
  288. package/dist/ui/utils/cn.d.mts +6 -0
  289. package/dist/ui/utils/cn.d.mts.map +1 -0
  290. package/dist/ui/utils/cn.mjs +42 -0
  291. package/dist/ui/utils/cn.mjs.map +1 -0
  292. package/dist/ui/utils/index.d.mts +2 -0
  293. package/dist/ui/utils/index.mjs +2 -0
  294. package/dist/utils/index.d.mts +1 -1
  295. package/dist/utils/index.mjs +2 -2
  296. package/dist/{utils-CVVQQltg.mjs → utils.mjs} +1 -1
  297. package/dist/utils.mjs.map +1 -0
  298. package/package.json +76 -7
  299. package/src/ui/theme/preset.css +53 -0
  300. package/src/ui/theme/preset.ts +131 -0
  301. package/src/ui/theme/theme.css +12 -0
  302. package/src/ui/theme/tokens.css +57 -0
  303. package/dist/cms-5bS91IRZ.mjs.map +0 -1
  304. package/dist/i18n-Dy3VrbBw.mjs.map +0 -1
  305. package/dist/index-9B8SfwdR.d.mts +0 -214
  306. package/dist/index-9B8SfwdR.d.mts.map +0 -1
  307. package/dist/index-D36IEwUg.d.mts.map +0 -1
  308. package/dist/index-Dyi7DDoO.d.mts.map +0 -1
  309. package/dist/index-tTs9h9BS.d.mts.map +0 -1
  310. package/dist/logger-BPURnavq.mjs.map +0 -1
  311. package/dist/readMediaBuffer-1C3QTpkO.d.mts.map +0 -1
  312. package/dist/readMediaBuffer-DWkTbYVn.mjs.map +0 -1
  313. package/dist/seo-e5XjgQ7l.mjs.map +0 -1
  314. package/dist/utils-CVVQQltg.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ import { Checkbox } from "./Checkbox.mjs";
2
+ export { Checkbox };
@@ -0,0 +1,22 @@
1
+ //#region src/ui/components/CodeBlock/CodeBlock.d.ts
2
+ type CodeBlockTheme = 'light' | 'dark';
3
+ type CodeBlockProps = {
4
+ code: string;
5
+ /** Pre-highlighted HTML (e.g. from shiki). When omitted, `code` is plain text. */
6
+ html?: string;
7
+ filename?: string | null;
8
+ theme?: CodeBlockTheme;
9
+ copyable?: boolean;
10
+ collapsible?: boolean;
11
+ className?: string;
12
+ /** Apps own i18n — pass translated aria labels. */
13
+ copyLabel: string;
14
+ copiedLabel: string;
15
+ expandLabel?: string;
16
+ collapseLabel?: string;
17
+ onCopied?: () => void;
18
+ };
19
+ declare function CodeBlock({ code, html, filename, theme, copyable, collapsible, className, copyLabel, copiedLabel, expandLabel, collapseLabel, onCopied }: CodeBlockProps): import("react").JSX.Element;
20
+ //#endregion
21
+ export { CodeBlock, CodeBlockProps, CodeBlockTheme };
22
+ //# sourceMappingURL=CodeBlock.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlock.d.mts","names":[],"sources":["../../../../src/ui/components/CodeBlock/CodeBlock.tsx"],"mappings":";KAOY;KAEA;EACV;;EAEA;EACA;EACA,QAAQ;EACR;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;iBAqBO,YACP,MACA,MACA,UACA,OACA,UACA,aACA,WACA,WACA,aACA,aACA,eACA,YACC,iCAAc,IAAA"}
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { CopyButton } from "../CopyButton/CopyButton.mjs";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useState } from "react";
6
+ //#region src/ui/components/CodeBlock/CodeBlock.tsx
7
+ const CONTAINER_CLASS = {
8
+ light: "border-border bg-foreground/5 text-foreground",
9
+ dark: "border-border bg-card text-secondary"
10
+ };
11
+ const COPY_BUTTON_CLASS = {
12
+ light: "border-border bg-foreground/5 hover:bg-foreground/10",
13
+ dark: "border-border bg-card-elevated hover:bg-card-elevated/80"
14
+ };
15
+ const GRADIENT_CLASS = {
16
+ light: "from-transparent to-background",
17
+ dark: "from-transparent to-card"
18
+ };
19
+ const COLLAPSED_MAX_HEIGHT = "max-h-40";
20
+ const PRE_STYLE = "m-0 whitespace-pre-wrap break-words font-mono text-sm leading-relaxed";
21
+ function CodeBlock({ code, html, filename, theme = "dark", copyable = true, collapsible = false, className, copyLabel, copiedLabel, expandLabel = "Show more", collapseLabel = "Show less", onCopied }) {
22
+ const [expanded, setExpanded] = useState(false);
23
+ const isCollapsed = collapsible && !expanded;
24
+ return /* @__PURE__ */ jsxs("div", {
25
+ className: cn("my-3 overflow-hidden rounded-card border", CONTAINER_CLASS[theme], className),
26
+ children: [filename ? /* @__PURE__ */ jsx("div", {
27
+ className: "border-b border-border-subtle px-4 py-2 font-mono text-sm text-secondary sm:px-5",
28
+ children: filename
29
+ }) : null, /* @__PURE__ */ jsxs("div", {
30
+ className: "relative",
31
+ children: [
32
+ /* @__PURE__ */ jsx("div", {
33
+ className: cn("p-5 sm:p-6", isCollapsed && COLLAPSED_MAX_HEIGHT, isCollapsed && "overflow-hidden", collapsible && "pb-16"),
34
+ children: html !== void 0 ? /* @__PURE__ */ jsx("div", {
35
+ className: PRE_STYLE,
36
+ dangerouslySetInnerHTML: { __html: html }
37
+ }) : /* @__PURE__ */ jsx("pre", {
38
+ className: PRE_STYLE,
39
+ children: /* @__PURE__ */ jsx("code", { children: code })
40
+ })
41
+ }),
42
+ isCollapsed ? /* @__PURE__ */ jsx("div", {
43
+ "aria-hidden": true,
44
+ className: cn("pointer-events-none absolute inset-x-0 bottom-12 h-16 bg-gradient-to-b", GRADIENT_CLASS[theme])
45
+ }) : null,
46
+ copyable ? /* @__PURE__ */ jsx(CopyButton, {
47
+ text: code,
48
+ "aria-label": copyLabel,
49
+ copiedAriaLabel: copiedLabel,
50
+ onCopied,
51
+ className: cn("absolute top-3 right-3 border", COPY_BUTTON_CLASS[theme])
52
+ }) : null,
53
+ collapsible ? /* @__PURE__ */ jsx("button", {
54
+ type: "button",
55
+ className: "absolute bottom-3 left-1/2 -translate-x-1/2 cursor-pointer rounded-btn border border-border bg-surface px-3 py-1.5 text-xs font-semibold text-foreground",
56
+ onClick: () => setExpanded((v) => !v),
57
+ children: expanded ? collapseLabel : expandLabel
58
+ }) : null
59
+ ]
60
+ })]
61
+ });
62
+ }
63
+ //#endregion
64
+ export { CodeBlock };
65
+
66
+ //# sourceMappingURL=CodeBlock.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlock.mjs","names":[],"sources":["../../../../src/ui/components/CodeBlock/CodeBlock.tsx"],"sourcesContent":["'use client'\n\nimport { useState } from 'react'\n\nimport { CopyButton } from '../CopyButton/CopyButton.js'\nimport { cn } from '../../utils/cn.js'\n\nexport type CodeBlockTheme = 'light' | 'dark'\n\nexport type CodeBlockProps = {\n code: string\n /** Pre-highlighted HTML (e.g. from shiki). When omitted, `code` is plain text. */\n html?: string\n filename?: string | null\n theme?: CodeBlockTheme\n copyable?: boolean\n collapsible?: boolean\n className?: string\n /** Apps own i18n — pass translated aria labels. */\n copyLabel: string\n copiedLabel: string\n expandLabel?: string\n collapseLabel?: string\n onCopied?: () => void\n}\n\nconst CONTAINER_CLASS: Record<CodeBlockTheme, string> = {\n light: 'border-border bg-foreground/5 text-foreground',\n dark: 'border-border bg-card text-secondary',\n}\n\nconst COPY_BUTTON_CLASS: Record<CodeBlockTheme, string> = {\n light: 'border-border bg-foreground/5 hover:bg-foreground/10',\n dark: 'border-border bg-card-elevated hover:bg-card-elevated/80',\n}\n\nconst GRADIENT_CLASS: Record<CodeBlockTheme, string> = {\n light: 'from-transparent to-background',\n dark: 'from-transparent to-card',\n}\n\nconst COLLAPSED_MAX_HEIGHT = 'max-h-40'\nconst PRE_STYLE = 'm-0 whitespace-pre-wrap break-words font-mono text-sm leading-relaxed'\n\nfunction CodeBlock({\n code,\n html,\n filename,\n theme = 'dark',\n copyable = true,\n collapsible = false,\n className,\n copyLabel,\n copiedLabel,\n expandLabel = 'Show more',\n collapseLabel = 'Show less',\n onCopied,\n}: CodeBlockProps) {\n const [expanded, setExpanded] = useState(false)\n const isCollapsed = collapsible && !expanded\n\n return (\n <div\n className={cn('my-3 overflow-hidden rounded-card border', CONTAINER_CLASS[theme], className)}\n >\n {filename ? (\n <div className=\"border-b border-border-subtle px-4 py-2 font-mono text-sm text-secondary sm:px-5\">\n {filename}\n </div>\n ) : null}\n <div className=\"relative\">\n <div\n className={cn(\n 'p-5 sm:p-6',\n isCollapsed && COLLAPSED_MAX_HEIGHT,\n isCollapsed && 'overflow-hidden',\n collapsible && 'pb-16'\n )}\n >\n {html !== undefined ? (\n <div className={PRE_STYLE} dangerouslySetInnerHTML={{ __html: html }} />\n ) : (\n <pre className={PRE_STYLE}>\n <code>{code}</code>\n </pre>\n )}\n </div>\n\n {isCollapsed ? (\n <div\n aria-hidden\n className={cn(\n 'pointer-events-none absolute inset-x-0 bottom-12 h-16 bg-gradient-to-b',\n GRADIENT_CLASS[theme]\n )}\n />\n ) : null}\n\n {copyable ? (\n <CopyButton\n text={code}\n aria-label={copyLabel}\n copiedAriaLabel={copiedLabel}\n onCopied={onCopied}\n className={cn('absolute top-3 right-3 border', COPY_BUTTON_CLASS[theme])}\n />\n ) : null}\n\n {collapsible ? (\n <button\n type=\"button\"\n className=\"absolute bottom-3 left-1/2 -translate-x-1/2 cursor-pointer rounded-btn border border-border bg-surface px-3 py-1.5 text-xs font-semibold text-foreground\"\n onClick={() => setExpanded((v) => !v)}\n >\n {expanded ? collapseLabel : expandLabel}\n </button>\n ) : null}\n </div>\n </div>\n )\n}\n\nexport { CodeBlock }\n"],"mappings":";;;;;;AA0BA,MAAM,kBAAkD;CACtD,OAAO;CACP,MAAM;AACR;AAEA,MAAM,oBAAoD;CACxD,OAAO;CACP,MAAM;AACR;AAEA,MAAM,iBAAiD;CACrD,OAAO;CACP,MAAM;AACR;AAEA,MAAM,uBAAuB;AAC7B,MAAM,YAAY;AAElB,SAAS,UAAU,EACjB,MACA,MACA,UACA,QAAQ,QACR,WAAW,MACX,cAAc,OACd,WACA,WACA,aACA,cAAc,aACd,gBAAgB,aAChB,YACiB;CACjB,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,cAAc,eAAe,CAAC;CAEpC,OACE,qBAAC,OAAD;EACE,WAAW,GAAG,4CAA4C,gBAAgB,QAAQ,SAAS;EAD7F,UAAA,CAGG,WACC,oBAAC,OAAD;GAAK,WAAU;GACZ,UAAA;EACE,CAAA,IACH,MACJ,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACE,oBAAC,OAAD;KACE,WAAW,GACT,cACA,eAAe,sBACf,eAAe,mBACf,eAAe,OACjB;KAEC,UAAA,SAAS,SACR,oBAAC,OAAD;MAAK,WAAW;MAAW,yBAAyB,EAAE,QAAQ,KAAK;KAAI,CAAA,IAEvE,oBAAC,OAAD;MAAK,WAAW;MACd,UAAA,oBAAC,QAAD,EAAA,UAAO,KAAW,CAAA;KACf,CAAA;IAEJ,CAAA;IAEJ,cACC,oBAAC,OAAD;KACE,eAAA;KACA,WAAW,GACT,0EACA,eAAe,MACjB;IACD,CAAA,IACC;IAEH,WACC,oBAAC,YAAD;KACE,MAAM;KACN,cAAY;KACZ,iBAAiB;KACP;KACV,WAAW,GAAG,iCAAiC,kBAAkB,MAAM;IACxE,CAAA,IACC;IAEH,cACC,oBAAC,UAAD;KACE,MAAK;KACL,WAAU;KACV,eAAe,aAAa,MAAM,CAAC,CAAC;KAEnC,UAAA,WAAW,gBAAgB;IACtB,CAAA,IACN;GACD;EACF,CAAA,CAAA;;AAET"}
@@ -0,0 +1,2 @@
1
+ import { CodeBlock, CodeBlockProps, CodeBlockTheme } from "./CodeBlock.mjs";
2
+ export { CodeBlock, type CodeBlockProps, type CodeBlockTheme };
@@ -0,0 +1,2 @@
1
+ import { CodeBlock } from "./CodeBlock.mjs";
2
+ export { CodeBlock };
@@ -0,0 +1,19 @@
1
+ //#region src/ui/components/CodeBlockTabs/CodeBlockTabs.d.ts
2
+ type CodeBlockTabsTheme = 'light' | 'dark';
3
+ type CodeBlockTab = {
4
+ id: string;
5
+ label: string;
6
+ /** Pre-highlighted HTML (e.g. from shiki). */
7
+ html: string;
8
+ };
9
+ type CodeBlockTabsProps = {
10
+ tabs: CodeBlockTab[];
11
+ className?: string;
12
+ theme?: CodeBlockTabsTheme;
13
+ /** Apps own i18n — aria-label for the tablist. */
14
+ tabsAriaLabel: string;
15
+ };
16
+ declare function CodeBlockTabs({ tabs, className, theme, tabsAriaLabel }: CodeBlockTabsProps): import("react").JSX.Element | null;
17
+ //#endregion
18
+ export { CodeBlockTab, CodeBlockTabs, CodeBlockTabsProps, CodeBlockTabsTheme };
19
+ //# sourceMappingURL=CodeBlockTabs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlockTabs.d.mts","names":[],"sources":["../../../../src/ui/components/CodeBlockTabs/CodeBlockTabs.tsx"],"mappings":";KAMY;KAEA;EACV;EACA;;EAEA;;KAGU;EACV,MAAM;EACN;EACA,QAAQ;;EAER;;iBAgBO,gBAAgB,MAAM,WAAW,OAAiB,iBAAiB,qCAAkB,IAAA"}
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useState } from "react";
5
+ //#region src/ui/components/CodeBlockTabs/CodeBlockTabs.tsx
6
+ const PRE_CLASS = "[&>pre]:m-0 [&>pre]:font-mono [&>pre]:text-[13px] [&>pre]:leading-[22px] [&>pre]:wrap-break-word [&>pre]:whitespace-pre-wrap";
7
+ const SHELL = {
8
+ light: "border-border bg-foreground/5",
9
+ dark: "border-border bg-surface-elevated"
10
+ };
11
+ const TAB_IDLE = {
12
+ light: "border-border text-muted hover:text-foreground",
13
+ dark: "border-border bg-card text-muted hover:text-foreground"
14
+ };
15
+ function CodeBlockTabs({ tabs, className, theme = "light", tabsAriaLabel }) {
16
+ const [active, setActive] = useState(0);
17
+ if (tabs.length === 0) return null;
18
+ return /* @__PURE__ */ jsxs("div", {
19
+ className: cn("flex flex-col gap-4 overflow-hidden rounded-card border p-5", SHELL[theme], className),
20
+ children: [/* @__PURE__ */ jsx("div", {
21
+ role: "tablist",
22
+ "aria-label": tabsAriaLabel,
23
+ className: "flex flex-wrap gap-2 print:hidden",
24
+ children: tabs.map((tab, idx) => {
25
+ const isActive = idx === active;
26
+ return /* @__PURE__ */ jsx("button", {
27
+ type: "button",
28
+ role: "tab",
29
+ id: `code-tab-${tab.id}`,
30
+ "aria-selected": isActive,
31
+ "aria-controls": `code-tab-panel-${tab.id}`,
32
+ onClick: () => setActive(idx),
33
+ className: cn("rounded-full border px-4 py-2 text-btn font-medium transition-colors", isActive ? "border-accent/30 bg-accent/12 text-accent" : TAB_IDLE[theme]),
34
+ children: tab.label
35
+ }, tab.id);
36
+ })
37
+ }), tabs.map((tab, idx) => {
38
+ const isActive = idx === active;
39
+ return /* @__PURE__ */ jsx("div", {
40
+ id: `code-tab-panel-${tab.id}`,
41
+ role: "tabpanel",
42
+ "aria-labelledby": `code-tab-${tab.id}`,
43
+ hidden: !isActive,
44
+ className: cn("overflow-hidden rounded-card border text-foreground", SHELL[theme], isActive ? "block" : "hidden print:block"),
45
+ children: /* @__PURE__ */ jsx("div", {
46
+ className: "overflow-x-auto px-[18px] py-4",
47
+ children: /* @__PURE__ */ jsx("div", {
48
+ className: PRE_CLASS,
49
+ dangerouslySetInnerHTML: { __html: tab.html }
50
+ })
51
+ })
52
+ }, tab.id);
53
+ })]
54
+ });
55
+ }
56
+ //#endregion
57
+ export { CodeBlockTabs };
58
+
59
+ //# sourceMappingURL=CodeBlockTabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeBlockTabs.mjs","names":[],"sources":["../../../../src/ui/components/CodeBlockTabs/CodeBlockTabs.tsx"],"sourcesContent":["'use client'\n\nimport { useState } from 'react'\n\nimport { cn } from '../../utils/cn.js'\n\nexport type CodeBlockTabsTheme = 'light' | 'dark'\n\nexport type CodeBlockTab = {\n id: string\n label: string\n /** Pre-highlighted HTML (e.g. from shiki). */\n html: string\n}\n\nexport type CodeBlockTabsProps = {\n tabs: CodeBlockTab[]\n className?: string\n theme?: CodeBlockTabsTheme\n /** Apps own i18n — aria-label for the tablist. */\n tabsAriaLabel: string\n}\n\nconst PRE_CLASS =\n '[&>pre]:m-0 [&>pre]:font-mono [&>pre]:text-[13px] [&>pre]:leading-[22px] [&>pre]:wrap-break-word [&>pre]:whitespace-pre-wrap'\n\nconst SHELL: Record<CodeBlockTabsTheme, string> = {\n light: 'border-border bg-foreground/5',\n dark: 'border-border bg-surface-elevated',\n}\n\nconst TAB_IDLE: Record<CodeBlockTabsTheme, string> = {\n light: 'border-border text-muted hover:text-foreground',\n dark: 'border-border bg-card text-muted hover:text-foreground',\n}\n\nfunction CodeBlockTabs({ tabs, className, theme = 'light', tabsAriaLabel }: CodeBlockTabsProps) {\n const [active, setActive] = useState(0)\n\n if (tabs.length === 0) return null\n\n return (\n <div\n className={cn(\n 'flex flex-col gap-4 overflow-hidden rounded-card border p-5',\n SHELL[theme],\n className\n )}\n >\n <div role=\"tablist\" aria-label={tabsAriaLabel} className=\"flex flex-wrap gap-2 print:hidden\">\n {tabs.map((tab, idx) => {\n const isActive = idx === active\n return (\n <button\n key={tab.id}\n type=\"button\"\n role=\"tab\"\n id={`code-tab-${tab.id}`}\n aria-selected={isActive}\n aria-controls={`code-tab-panel-${tab.id}`}\n onClick={() => setActive(idx)}\n className={cn(\n 'rounded-full border px-4 py-2 text-btn font-medium transition-colors',\n isActive ? 'border-accent/30 bg-accent/12 text-accent' : TAB_IDLE[theme]\n )}\n >\n {tab.label}\n </button>\n )\n })}\n </div>\n\n {tabs.map((tab, idx) => {\n const isActive = idx === active\n return (\n <div\n key={tab.id}\n id={`code-tab-panel-${tab.id}`}\n role=\"tabpanel\"\n aria-labelledby={`code-tab-${tab.id}`}\n hidden={!isActive}\n className={cn(\n 'overflow-hidden rounded-card border text-foreground',\n SHELL[theme],\n isActive ? 'block' : 'hidden print:block'\n )}\n >\n <div className=\"overflow-x-auto px-[18px] py-4\">\n <div className={PRE_CLASS} dangerouslySetInnerHTML={{ __html: tab.html }} />\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n\nexport { CodeBlockTabs }\n"],"mappings":";;;;;AAuBA,MAAM,YACJ;AAEF,MAAM,QAA4C;CAChD,OAAO;CACP,MAAM;AACR;AAEA,MAAM,WAA+C;CACnD,OAAO;CACP,MAAM;AACR;AAEA,SAAS,cAAc,EAAE,MAAM,WAAW,QAAQ,SAAS,iBAAqC;CAC9F,MAAM,CAAC,QAAQ,aAAa,SAAS,CAAC;CAEtC,IAAI,KAAK,WAAW,GAAG,OAAO;CAE9B,OACE,qBAAC,OAAD;EACE,WAAW,GACT,+DACA,MAAM,QACN,SACF;EALF,UAAA,CAOE,oBAAC,OAAD;GAAK,MAAK;GAAU,cAAY;GAAe,WAAU;GACtD,UAAA,KAAK,KAAK,KAAK,QAAQ;IACtB,MAAM,WAAW,QAAQ;IACzB,OACE,oBAAC,UAAD;KAEE,MAAK;KACL,MAAK;KACL,IAAI,YAAY,IAAI;KACpB,iBAAe;KACf,iBAAe,kBAAkB,IAAI;KACrC,eAAe,UAAU,GAAG;KAC5B,WAAW,GACT,wEACA,WAAW,8CAA8C,SAAS,MACpE;KAEC,UAAA,IAAI;IACC,GAbD,IAAI,EAaH;GAEZ,CAAC;EACE,CAAA,GAEJ,KAAK,KAAK,KAAK,QAAQ;GACtB,MAAM,WAAW,QAAQ;GACzB,OACE,oBAAC,OAAD;IAEE,IAAI,kBAAkB,IAAI;IAC1B,MAAK;IACL,mBAAiB,YAAY,IAAI;IACjC,QAAQ,CAAC;IACT,WAAW,GACT,uDACA,MAAM,QACN,WAAW,UAAU,oBACvB;IAEA,UAAA,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,OAAD;MAAK,WAAW;MAAW,yBAAyB,EAAE,QAAQ,IAAI,KAAK;KAAI,CAAA;IACxE,CAAA;GACF,GAdE,IAAI,EAcN;EAET,CAAC,CACE;;AAET"}
@@ -0,0 +1,2 @@
1
+ import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsProps, CodeBlockTabsTheme } from "./CodeBlockTabs.mjs";
2
+ export { type CodeBlockTab, CodeBlockTabs, type CodeBlockTabsProps, type CodeBlockTabsTheme };
@@ -0,0 +1,2 @@
1
+ import { CodeBlockTabs } from "./CodeBlockTabs.mjs";
2
+ export { CodeBlockTabs };
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/ui/components/CollapsibleSection/CollapsibleSection.d.ts
3
+ type CollapsibleSectionProps = {
4
+ collapsedHeight: number;
5
+ toggleLabel: string;
6
+ defaultOpen?: boolean;
7
+ className?: string;
8
+ children: ReactNode;
9
+ };
10
+ declare function CollapsibleSection({ collapsedHeight, toggleLabel, defaultOpen, className, children }: CollapsibleSectionProps): import("react").JSX.Element;
11
+ //#endregion
12
+ export { CollapsibleSection, CollapsibleSectionProps };
13
+ //# sourceMappingURL=CollapsibleSection.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleSection.d.mts","names":[],"sources":["../../../../src/ui/components/CollapsibleSection/CollapsibleSection.tsx"],"mappings":";;KASY;EACV;EACA;EACA;EACA;EACA,UAAU;;iBAwBH,qBACP,iBACA,aACA,aACA,WACA,YACC,0CAAuB,IAAA"}
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { Button } from "../Button/Button.mjs";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { useId, useState } from "react";
6
+ //#region src/ui/components/CollapsibleSection/CollapsibleSection.tsx
7
+ function ChevronDownIcon({ className }) {
8
+ return /* @__PURE__ */ jsx("svg", {
9
+ "aria-hidden": "true",
10
+ viewBox: "0 0 16 16",
11
+ width: "16",
12
+ height: "16",
13
+ fill: "none",
14
+ className,
15
+ children: /* @__PURE__ */ jsx("path", {
16
+ d: "M3.5 6 8 10.5 12.5 6",
17
+ stroke: "currentColor",
18
+ strokeWidth: "1.5",
19
+ strokeLinecap: "round",
20
+ strokeLinejoin: "round"
21
+ })
22
+ });
23
+ }
24
+ function CollapsibleSection({ collapsedHeight, toggleLabel, defaultOpen = false, className, children }) {
25
+ const [open, setOpen] = useState(defaultOpen);
26
+ const bodyId = useId();
27
+ return /* @__PURE__ */ jsxs("div", {
28
+ className: cn("flex flex-col gap-4", className),
29
+ children: [/* @__PURE__ */ jsxs("div", {
30
+ className: "relative",
31
+ children: [/* @__PURE__ */ jsx("div", {
32
+ id: bodyId,
33
+ className: "overflow-hidden",
34
+ style: !open ? { maxHeight: collapsedHeight } : void 0,
35
+ children
36
+ }), !open ? /* @__PURE__ */ jsx("div", {
37
+ "aria-hidden": "true",
38
+ className: "pointer-events-none absolute inset-x-0 bottom-0 h-40 bg-linear-to-b from-surface/0 to-surface"
39
+ }) : null]
40
+ }), /* @__PURE__ */ jsxs(Button, {
41
+ variant: "ghost",
42
+ size: "sm",
43
+ type: "button",
44
+ onClick: () => setOpen((value) => !value),
45
+ "aria-expanded": open,
46
+ "aria-controls": bodyId,
47
+ className: "gap-1.5 self-center",
48
+ children: [/* @__PURE__ */ jsx(ChevronDownIcon, { className: open ? "rotate-180" : void 0 }), toggleLabel]
49
+ })]
50
+ });
51
+ }
52
+ //#endregion
53
+ export { CollapsibleSection };
54
+
55
+ //# sourceMappingURL=CollapsibleSection.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapsibleSection.mjs","names":[],"sources":["../../../../src/ui/components/CollapsibleSection/CollapsibleSection.tsx"],"sourcesContent":["'use client'\n\nimport { useId, useState } from 'react'\n\nimport { Button } from '../Button/Button.js'\nimport { cn } from '../../utils/cn.js'\n\nimport type { ReactNode } from 'react'\n\nexport type CollapsibleSectionProps = {\n collapsedHeight: number\n toggleLabel: string\n defaultOpen?: boolean\n className?: string\n children: ReactNode\n}\n\nfunction ChevronDownIcon({ className }: { className?: string }) {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 16 16\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n className={className}\n >\n <path\n d=\"M3.5 6 8 10.5 12.5 6\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n\nfunction CollapsibleSection({\n collapsedHeight,\n toggleLabel,\n defaultOpen = false,\n className,\n children,\n}: CollapsibleSectionProps) {\n const [open, setOpen] = useState(defaultOpen)\n const bodyId = useId()\n\n return (\n <div className={cn('flex flex-col gap-4', className)}>\n <div className=\"relative\">\n <div\n id={bodyId}\n className=\"overflow-hidden\"\n style={!open ? { maxHeight: collapsedHeight } : undefined}\n >\n {children}\n </div>\n\n {!open ? (\n <div\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-x-0 bottom-0 h-40 bg-linear-to-b from-surface/0 to-surface\"\n />\n ) : null}\n </div>\n\n <Button\n variant=\"ghost\"\n size=\"sm\"\n type=\"button\"\n onClick={() => setOpen((value) => !value)}\n aria-expanded={open}\n aria-controls={bodyId}\n className=\"gap-1.5 self-center\"\n >\n <ChevronDownIcon className={open ? 'rotate-180' : undefined} />\n {toggleLabel}\n </Button>\n </div>\n )\n}\n\nexport { CollapsibleSection }\n"],"mappings":";;;;;;AAiBA,SAAS,gBAAgB,EAAE,aAAqC;CAC9D,OACE,oBAAC,OAAD;EACE,eAAY;EACZ,SAAQ;EACR,OAAM;EACN,QAAO;EACP,MAAK;EACM;EAEX,UAAA,oBAAC,QAAD;GACE,GAAE;GACF,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;EAChB,CAAA;CACE,CAAA;AAET;AAEA,SAAS,mBAAmB,EAC1B,iBACA,aACA,cAAc,OACd,WACA,YAC0B;CAC1B,MAAM,CAAC,MAAM,WAAW,SAAS,WAAW;CAC5C,MAAM,SAAS,MAAM;CAErB,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,uBAAuB,SAAS;EAAnD,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,OAAD;IACE,IAAI;IACJ,WAAU;IACV,OAAO,CAAC,OAAO,EAAE,WAAW,gBAAgB,IAAI;IAE/C;GACE,CAAA,GAEJ,CAAC,OACA,oBAAC,OAAD;IACE,eAAY;IACZ,WAAU;GACX,CAAA,IACC,IACD;EAEL,CAAA,GAAA,qBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,MAAK;GACL,eAAe,SAAS,UAAU,CAAC,KAAK;GACxC,iBAAe;GACf,iBAAe;GACf,WAAU;GAPZ,UAAA,CASE,oBAAC,iBAAD,EAAiB,WAAW,OAAO,eAAe,OAAY,CAAA,GAC7D,WACK;EACL,CAAA,CAAA;;AAET"}
@@ -0,0 +1,2 @@
1
+ import { CollapsibleSection, CollapsibleSectionProps } from "./CollapsibleSection.mjs";
2
+ export { CollapsibleSection, type CollapsibleSectionProps };
@@ -0,0 +1,2 @@
1
+ import { CollapsibleSection } from "./CollapsibleSection.mjs";
2
+ export { CollapsibleSection };
@@ -0,0 +1,12 @@
1
+ import { IconButtonProps } from "../IconButton/IconButton.mjs";
2
+ //#region src/ui/components/CopyButton/CopyButton.d.ts
3
+ type CopyButtonProps = Omit<IconButtonProps, 'children' | 'onClick' | 'value'> & {
4
+ text: string;
5
+ copiedAriaLabel?: string;
6
+ iconSize?: number;
7
+ onCopied?: () => void;
8
+ };
9
+ declare function CopyButton({ text, copiedAriaLabel, iconSize, className, 'aria-label': ariaLabel, onCopied, ...props }: CopyButtonProps): import("react").JSX.Element;
10
+ //#endregion
11
+ export { CopyButton, CopyButtonProps };
12
+ //# sourceMappingURL=CopyButton.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.d.mts","names":[],"sources":["../../../../src/ui/components/CopyButton/CopyButton.tsx"],"mappings":";;KAUY,kBAAkB,KAAK;EACjC;EACA;EACA;EACA;;iBAGO,aACP,MACA,iBACA,UACA,yBACc,WACd,aACG,SACF,kCAAe,IAAA"}
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { IconButton } from "../IconButton/IconButton.mjs";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { useEffect, useRef, useState } from "react";
6
+ import { MdCheck, MdContentCopy } from "react-icons/md";
7
+ //#region src/ui/components/CopyButton/CopyButton.tsx
8
+ const COPIED_DISPLAY_MS = 1500;
9
+ function CopyButton({ text, copiedAriaLabel, iconSize = 14, className, "aria-label": ariaLabel, onCopied, ...props }) {
10
+ const [copied, setCopied] = useState(false);
11
+ const timerRef = useRef(null);
12
+ useEffect(() => {
13
+ return () => {
14
+ if (timerRef.current) clearTimeout(timerRef.current);
15
+ };
16
+ }, []);
17
+ function handleCopy() {
18
+ if (typeof navigator === "undefined" || !navigator.clipboard) return;
19
+ navigator.clipboard.writeText(text).then(() => {
20
+ setCopied(true);
21
+ onCopied?.();
22
+ if (timerRef.current) clearTimeout(timerRef.current);
23
+ timerRef.current = setTimeout(() => setCopied(false), COPIED_DISPLAY_MS);
24
+ }).catch(() => {});
25
+ }
26
+ return /* @__PURE__ */ jsx(IconButton, {
27
+ type: "button",
28
+ ...props,
29
+ onClick: handleCopy,
30
+ "aria-label": copied && copiedAriaLabel ? copiedAriaLabel : ariaLabel,
31
+ className: cn("size-7", className),
32
+ children: copied ? /* @__PURE__ */ jsx(MdCheck, {
33
+ size: iconSize,
34
+ "aria-hidden": "true",
35
+ className: "text-success"
36
+ }) : /* @__PURE__ */ jsx(MdContentCopy, {
37
+ size: iconSize,
38
+ "aria-hidden": "true"
39
+ })
40
+ });
41
+ }
42
+ //#endregion
43
+ export { CopyButton };
44
+
45
+ //# sourceMappingURL=CopyButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.mjs","names":[],"sources":["../../../../src/ui/components/CopyButton/CopyButton.tsx"],"sourcesContent":["'use client'\n\nimport { useEffect, useRef, useState } from 'react'\nimport { MdCheck, MdContentCopy } from 'react-icons/md'\n\nimport { IconButton, type IconButtonProps } from '../IconButton/IconButton.js'\nimport { cn } from '../../utils/cn.js'\n\nconst COPIED_DISPLAY_MS = 1500\n\nexport type CopyButtonProps = Omit<IconButtonProps, 'children' | 'onClick' | 'value'> & {\n text: string\n copiedAriaLabel?: string\n iconSize?: number\n onCopied?: () => void\n}\n\nfunction CopyButton({\n text,\n copiedAriaLabel,\n iconSize = 14,\n className,\n 'aria-label': ariaLabel,\n onCopied,\n ...props\n}: CopyButtonProps) {\n const [copied, setCopied] = useState(false)\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n useEffect(() => {\n return () => {\n if (timerRef.current) clearTimeout(timerRef.current)\n }\n }, [])\n\n function handleCopy() {\n if (typeof navigator === 'undefined' || !navigator.clipboard) return\n navigator.clipboard\n .writeText(text)\n .then(() => {\n setCopied(true)\n onCopied?.()\n if (timerRef.current) clearTimeout(timerRef.current)\n timerRef.current = setTimeout(() => setCopied(false), COPIED_DISPLAY_MS)\n })\n .catch(() => {\n // Silent — caller's value remains visible for manual copy.\n })\n }\n\n return (\n <IconButton\n type=\"button\"\n {...props}\n onClick={handleCopy}\n aria-label={copied && copiedAriaLabel ? copiedAriaLabel : ariaLabel}\n className={cn('size-7', className)}\n >\n {copied ? (\n <MdCheck size={iconSize} aria-hidden=\"true\" className=\"text-success\" />\n ) : (\n <MdContentCopy size={iconSize} aria-hidden=\"true\" />\n )}\n </IconButton>\n )\n}\n\nexport { CopyButton }\n"],"mappings":";;;;;;;AAQA,MAAM,oBAAoB;AAS1B,SAAS,WAAW,EAClB,MACA,iBACA,WAAW,IACX,WACA,cAAc,WACd,UACA,GAAG,SACe;CAClB,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,WAAW,OAA6C,IAAI;CAElE,gBAAgB;EACd,aAAa;GACX,IAAI,SAAS,SAAS,aAAa,SAAS,OAAO;EACrD;CACF,GAAG,CAAC,CAAC;CAEL,SAAS,aAAa;EACpB,IAAI,OAAO,cAAc,eAAe,CAAC,UAAU,WAAW;EAC9D,UAAU,UACP,UAAU,IAAI,CAAC,CACf,WAAW;GACV,UAAU,IAAI;GACd,WAAW;GACX,IAAI,SAAS,SAAS,aAAa,SAAS,OAAO;GACnD,SAAS,UAAU,iBAAiB,UAAU,KAAK,GAAG,iBAAiB;EACzE,CAAC,CAAC,CACD,YAAY,CAEb,CAAC;CACL;CAEA,OACE,oBAAC,YAAD;EACE,MAAK;EACL,GAAI;EACJ,SAAS;EACT,cAAY,UAAU,kBAAkB,kBAAkB;EAC1D,WAAW,GAAG,UAAU,SAAS;EAEhC,UAAA,SACC,oBAAC,SAAD;GAAS,MAAM;GAAU,eAAY;GAAO,WAAU;EAAgB,CAAA,IAEtE,oBAAC,eAAD;GAAe,MAAM;GAAU,eAAY;EAAQ,CAAA;CAE3C,CAAA;AAEhB"}
@@ -0,0 +1,2 @@
1
+ import { CopyButton, CopyButtonProps } from "./CopyButton.mjs";
2
+ export { CopyButton, type CopyButtonProps };
@@ -0,0 +1,2 @@
1
+ import { CopyButton } from "./CopyButton.mjs";
2
+ export { CopyButton };
@@ -0,0 +1,26 @@
1
+ import { ComponentProps, HTMLAttributes } from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ //#region src/ui/components/Dialog/Dialog.d.ts
4
+ declare const Dialog: import("react").FC<DialogPrimitive.DialogProps>;
5
+ declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ declare const DialogPortal: import("react").FC<DialogPrimitive.DialogPortalProps>;
7
+ declare const DialogClose: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ declare const dialogFullscreenOnMobile: string;
9
+ type DialogOverlayProps = ComponentProps<typeof DialogPrimitive.Overlay>;
10
+ declare function DialogOverlay({ className, ...props }: DialogOverlayProps): import("react").JSX.Element;
11
+ type DialogContentProps = ComponentProps<typeof DialogPrimitive.Content> & {
12
+ closeLabel?: string;
13
+ showClose?: boolean;
14
+ closeClassName?: string;
15
+ };
16
+ declare function DialogContent({ className, children, closeLabel, showClose, closeClassName, ...props }: DialogContentProps): import("react").JSX.Element;
17
+ declare function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
18
+ declare function DialogBody({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
19
+ declare function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
20
+ type DialogTitleProps = ComponentProps<typeof DialogPrimitive.Title>;
21
+ declare function DialogTitle({ className, ...props }: DialogTitleProps): import("react").JSX.Element;
22
+ type DialogDescriptionProps = ComponentProps<typeof DialogPrimitive.Description>;
23
+ declare function DialogDescription({ className, ...props }: DialogDescriptionProps): import("react").JSX.Element;
24
+ //#endregion
25
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, DialogOverlayProps, DialogPortal, DialogTitle, DialogTitleProps, DialogTrigger, dialogFullscreenOnMobile };
26
+ //# sourceMappingURL=Dialog.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.mts","names":[],"sources":["../../../../src/ui/components/Dialog/Dialog.tsx"],"mappings":";;;cAQM,wBAAM,GAAA,gBAAA;cACN,+BAAa,0BAAA,gBAAA,qCAAA,cAAA;cACb,8BAAY,GAAA,gBAAA;cACZ,6BAAW,0BAAA,gBAAA,mCAAA,cAAA;cAEX;KAOM,qBAAqB,sBAAsB,gBAAgB;iBAE9D,gBAAgB,cAAc,SAAS,qCAAkB,IAAA;KAqBtD,qBAAqB,sBAAsB,gBAAgB;EACrE;EACA;EACA;;iBAGO,gBACP,WACA,UACA,YACA,WACA,mBACG,SACF,qCAAkB,IAAA;iBAqCZ,eAAe,cAAc,SAAS,eAAe,kCAAe,IAAA;iBAUpE,aAAa,cAAc,SAAS,wCAAqB,IAAA;iBAUzD,eAAe,cAAc,SAAS,eAAe,kCAAe,IAAA;KAajE,mBAAmB,sBAAsB,gBAAgB;iBAE5D,cAAc,cAAc,SAAS,mCAAgB,IAAA;KASlD,yBAAyB,sBAAsB,gBAAgB;iBAElE,oBAAoB,cAAc,SAAS,yCAAsB,IAAA"}
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
5
+ //#region src/ui/components/Dialog/Dialog.tsx
6
+ const Dialog = DialogPrimitive.Root;
7
+ const DialogTrigger = DialogPrimitive.Trigger;
8
+ const DialogPortal = DialogPrimitive.Portal;
9
+ const DialogClose = DialogPrimitive.Close;
10
+ const dialogFullscreenOnMobile = cn("max-md:top-0 max-md:right-0 max-md:bottom-0 max-md:left-0", "max-md:h-dvh max-md:max-h-none max-md:w-full max-md:max-w-none", "max-md:translate-x-0 max-md:translate-y-0", "max-md:rounded-none max-md:border-0");
11
+ function DialogOverlay({ className, ...props }) {
12
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
13
+ className: cn("fixed inset-0 z-50 bg-background/75 backdrop-blur-sm transition-opacity duration-150", "data-[state=closed]:opacity-0 data-[state=open]:opacity-100", className),
14
+ ...props
15
+ });
16
+ }
17
+ function CloseIcon() {
18
+ return /* @__PURE__ */ jsx("svg", {
19
+ "aria-hidden": "true",
20
+ viewBox: "0 0 14 14",
21
+ width: "14",
22
+ height: "14",
23
+ fill: "none",
24
+ children: /* @__PURE__ */ jsx("path", {
25
+ d: "M3 3l8 8M11 3l-8 8",
26
+ stroke: "currentColor",
27
+ strokeWidth: "1.5",
28
+ strokeLinecap: "round"
29
+ })
30
+ });
31
+ }
32
+ function DialogContent({ className, children, closeLabel = "Close", showClose = true, closeClassName, ...props }) {
33
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
34
+ className: cn("fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2", "flex max-h-[calc(100vh-2rem)] w-[calc(100vw-2rem)] max-w-md flex-col overflow-hidden", "rounded-card border border-border bg-surface text-foreground shadow-xl", "transition-opacity duration-150 data-[state=closed]:opacity-0 data-[state=open]:opacity-100", "focus:outline-none", className),
35
+ ...props,
36
+ children: [children, showClose ? /* @__PURE__ */ jsx(DialogPrimitive.Close, {
37
+ "aria-label": closeLabel,
38
+ className: cn("absolute top-6 right-5 inline-flex size-7 cursor-pointer items-center justify-center rounded-control", "border border-border text-secondary transition-colors", "hover:bg-card hover:text-foreground", "focus-visible:ring-1 focus-visible:ring-accent focus-visible:outline-none", "disabled:pointer-events-none disabled:cursor-not-allowed", closeClassName),
39
+ children: /* @__PURE__ */ jsx(CloseIcon, {})
40
+ }) : null]
41
+ })] });
42
+ }
43
+ function DialogHeader({ className, ...props }) {
44
+ return /* @__PURE__ */ jsx("div", {
45
+ "data-slot": "dialog-header",
46
+ className: cn("flex flex-col gap-1.5 px-5 pt-6 pr-14", className),
47
+ ...props
48
+ });
49
+ }
50
+ function DialogBody({ className, ...props }) {
51
+ return /* @__PURE__ */ jsx("div", {
52
+ "data-slot": "dialog-body",
53
+ className: cn("flex flex-col gap-3.5 overflow-y-auto px-5 py-5", className),
54
+ ...props
55
+ });
56
+ }
57
+ function DialogFooter({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx("div", {
59
+ "data-slot": "dialog-footer",
60
+ className: cn("flex flex-col-reverse gap-2 border-t border-border px-5 py-4 sm:flex-row sm:justify-between", className),
61
+ ...props
62
+ });
63
+ }
64
+ function DialogTitle({ className, ...props }) {
65
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
66
+ className: cn("text-lg font-semibold text-foreground", className),
67
+ ...props
68
+ });
69
+ }
70
+ function DialogDescription({ className, ...props }) {
71
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
72
+ className: cn("text-sm font-normal text-secondary", className),
73
+ ...props
74
+ });
75
+ }
76
+ //#endregion
77
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogFullscreenOnMobile };
78
+
79
+ //# sourceMappingURL=Dialog.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.mjs","names":[],"sources":["../../../../src/ui/components/Dialog/Dialog.tsx"],"sourcesContent":["'use client'\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\n\nimport { cn } from '../../utils/cn.js'\n\nimport type { ComponentProps, HTMLAttributes } from 'react'\n\nconst Dialog = DialogPrimitive.Root\nconst DialogTrigger = DialogPrimitive.Trigger\nconst DialogPortal = DialogPrimitive.Portal\nconst DialogClose = DialogPrimitive.Close\n\nconst dialogFullscreenOnMobile = cn(\n 'max-md:top-0 max-md:right-0 max-md:bottom-0 max-md:left-0',\n 'max-md:h-dvh max-md:max-h-none max-md:w-full max-md:max-w-none',\n 'max-md:translate-x-0 max-md:translate-y-0',\n 'max-md:rounded-none max-md:border-0'\n)\n\nexport type DialogOverlayProps = ComponentProps<typeof DialogPrimitive.Overlay>\n\nfunction DialogOverlay({ className, ...props }: DialogOverlayProps) {\n return (\n <DialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 bg-background/75 backdrop-blur-sm transition-opacity duration-150',\n 'data-[state=closed]:opacity-0 data-[state=open]:opacity-100',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CloseIcon() {\n return (\n <svg aria-hidden=\"true\" viewBox=\"0 0 14 14\" width=\"14\" height=\"14\" fill=\"none\">\n <path d=\"M3 3l8 8M11 3l-8 8\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n </svg>\n )\n}\n\nexport type DialogContentProps = ComponentProps<typeof DialogPrimitive.Content> & {\n closeLabel?: string\n showClose?: boolean\n closeClassName?: string\n}\n\nfunction DialogContent({\n className,\n children,\n closeLabel = 'Close',\n showClose = true,\n closeClassName,\n ...props\n}: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'flex max-h-[calc(100vh-2rem)] w-[calc(100vw-2rem)] max-w-md flex-col overflow-hidden',\n 'rounded-card border border-border bg-surface text-foreground shadow-xl',\n 'transition-opacity duration-150 data-[state=closed]:opacity-0 data-[state=open]:opacity-100',\n 'focus:outline-none',\n className\n )}\n {...props}\n >\n {children}\n\n {showClose ? (\n <DialogPrimitive.Close\n aria-label={closeLabel}\n className={cn(\n 'absolute top-6 right-5 inline-flex size-7 cursor-pointer items-center justify-center rounded-control',\n 'border border-border text-secondary transition-colors',\n 'hover:bg-card hover:text-foreground',\n 'focus-visible:ring-1 focus-visible:ring-accent focus-visible:outline-none',\n 'disabled:pointer-events-none disabled:cursor-not-allowed',\n closeClassName\n )}\n >\n <CloseIcon />\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('flex flex-col gap-1.5 px-5 pt-6 pr-14', className)}\n {...props}\n />\n )\n}\n\nfunction DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex flex-col gap-3.5 overflow-y-auto px-5 py-5', className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 border-t border-border px-5 py-4 sm:flex-row sm:justify-between',\n className\n )}\n {...props}\n />\n )\n}\n\nexport type DialogTitleProps = ComponentProps<typeof DialogPrimitive.Title>\n\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n )\n}\n\nexport type DialogDescriptionProps = ComponentProps<typeof DialogPrimitive.Description>\n\nfunction DialogDescription({ className, ...props }: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n className={cn('text-sm font-normal text-secondary', className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n DialogClose,\n dialogFullscreenOnMobile,\n}\n"],"mappings":";;;;;AAQA,MAAM,SAAS,gBAAgB;AAC/B,MAAM,gBAAgB,gBAAgB;AACtC,MAAM,eAAe,gBAAgB;AACrC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,2BAA2B,GAC/B,6DACA,kEACA,6CACA,qCACF;AAIA,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;CAClE,OACE,oBAAC,gBAAgB,SAAjB;EACE,WAAW,GACT,wFACA,+DACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY;CACnB,OACE,oBAAC,OAAD;EAAK,eAAY;EAAO,SAAQ;EAAY,OAAM;EAAK,QAAO;EAAK,MAAK;EACtE,UAAA,oBAAC,QAAD;GAAM,GAAE;GAAqB,QAAO;GAAe,aAAY;GAAM,eAAc;EAAS,CAAA;CACzF,CAAA;AAET;AAQA,SAAS,cAAc,EACrB,WACA,UACA,aAAa,SACb,YAAY,MACZ,gBACA,GAAG,SACkB;CACrB,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAAC,gBAAgB,SAAjB;EACE,WAAW,GACT,iEACA,wFACA,0EACA,+FACA,sBACA,SACF;EACA,GAAI;EATN,UAAA,CAWG,UAEA,YACC,oBAAC,gBAAgB,OAAjB;GACE,cAAY;GACZ,WAAW,GACT,wGACA,yDACA,uCACA,6EACA,4DACA,cACF;GAEA,UAAA,oBAAC,WAAD,CAAY,CAAA;EACS,CAAA,IACrB,IACmB;CACb,CAAA,CAAA,EAAA,CAAA;AAElB;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAyC;CAC7E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,yCAAyC,SAAS;EAChE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAgC;CAClE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,mDAAmD,SAAS;EAC1E,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAyC;CAC7E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,+FACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;CAC9D,OACE,oBAAC,gBAAgB,OAAjB;EACE,WAAW,GAAG,yCAAyC,SAAS;EAChE,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,oBAAC,gBAAgB,aAAjB;EACE,WAAW,GAAG,sCAAsC,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,2 @@
1
+ import { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, DialogOverlayProps, DialogPortal, DialogTitle, DialogTitleProps, DialogTrigger, dialogFullscreenOnMobile } from "./Dialog.mjs";
2
+ export { Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, dialogFullscreenOnMobile };
@@ -0,0 +1,2 @@
1
+ import { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogFullscreenOnMobile } from "./Dialog.mjs";
2
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogFullscreenOnMobile };
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ //#region src/ui/components/EmptyState/EmptyState.d.ts
4
+ declare const emptyStateVariants: (props?: ({
5
+ tone?: "dark" | "light" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type EmptyStateProps = Omit<HTMLAttributes<HTMLDivElement>, 'title'> & VariantProps<typeof emptyStateVariants> & {
8
+ icon?: ReactNode;
9
+ title: ReactNode;
10
+ description?: ReactNode;
11
+ actions?: ReactNode;
12
+ titleClassName?: string;
13
+ descriptionClassName?: string;
14
+ };
15
+ declare function EmptyState({ icon, title, description, actions, tone, className, titleClassName, descriptionClassName, ...props }: EmptyStateProps): import("react").JSX.Element;
16
+ //#endregion
17
+ export { EmptyState, EmptyStateProps, emptyStateVariants };
18
+ //# sourceMappingURL=EmptyState.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.d.mts","names":[],"sources":["../../../../src/ui/components/EmptyState/EmptyState.tsx"],"mappings":";;;cAMM,qBAAkB;;6CAavB;KAEW,kBAAkB,KAAK,eAAe,4BAChD,oBAAoB;EAClB,OAAO;EACP,OAAO;EACP,cAAc;EACd,UAAU;EACV;EACA;;iBAGK,aACP,MACA,OACA,aACA,SACA,MACA,WACA,gBACA,yBACG,SACF,kCAAe,IAAA"}
@@ -0,0 +1,36 @@
1
+ import { cn } from "../../utils/cn.mjs";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/ui/components/EmptyState/EmptyState.tsx
5
+ const emptyStateVariants = cva("flex w-full flex-col items-center justify-center gap-6 rounded-card px-10 py-20 text-center", {
6
+ variants: { tone: {
7
+ dark: "bg-card/40",
8
+ light: "bg-foreground/5"
9
+ } },
10
+ defaultVariants: { tone: "dark" }
11
+ });
12
+ function EmptyState({ icon, title, description, actions, tone, className, titleClassName, descriptionClassName, ...props }) {
13
+ return /* @__PURE__ */ jsxs("div", {
14
+ className: cn(emptyStateVariants({ tone }), className),
15
+ ...props,
16
+ children: [
17
+ icon,
18
+ /* @__PURE__ */ jsx("h2", {
19
+ className: cn("text-2xl font-semibold text-foreground", titleClassName),
20
+ children: title
21
+ }),
22
+ description ? /* @__PURE__ */ jsx("div", {
23
+ className: cn("max-w-[560px] text-base text-secondary", descriptionClassName),
24
+ children: description
25
+ }) : null,
26
+ actions ? /* @__PURE__ */ jsx("div", {
27
+ className: "flex flex-wrap items-center justify-center gap-3 pt-4",
28
+ children: actions
29
+ }) : null
30
+ ]
31
+ });
32
+ }
33
+ //#endregion
34
+ export { EmptyState, emptyStateVariants };
35
+
36
+ //# sourceMappingURL=EmptyState.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.mjs","names":[],"sources":["../../../../src/ui/components/EmptyState/EmptyState.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../../utils/cn.js'\n\nimport type { HTMLAttributes, ReactNode } from 'react'\n\nconst emptyStateVariants = cva(\n 'flex w-full flex-col items-center justify-center gap-6 rounded-card px-10 py-20 text-center',\n {\n variants: {\n tone: {\n dark: 'bg-card/40',\n light: 'bg-foreground/5',\n },\n },\n defaultVariants: {\n tone: 'dark',\n },\n }\n)\n\nexport type EmptyStateProps = Omit<HTMLAttributes<HTMLDivElement>, 'title'> &\n VariantProps<typeof emptyStateVariants> & {\n icon?: ReactNode\n title: ReactNode\n description?: ReactNode\n actions?: ReactNode\n titleClassName?: string\n descriptionClassName?: string\n }\n\nfunction EmptyState({\n icon,\n title,\n description,\n actions,\n tone,\n className,\n titleClassName,\n descriptionClassName,\n ...props\n}: EmptyStateProps) {\n return (\n <div className={cn(emptyStateVariants({ tone }), className)} {...props}>\n {icon}\n\n <h2 className={cn('text-2xl font-semibold text-foreground', titleClassName)}>{title}</h2>\n\n {description ? (\n <div className={cn('max-w-[560px] text-base text-secondary', descriptionClassName)}>\n {description}\n </div>\n ) : null}\n\n {actions ? (\n <div className=\"flex flex-wrap items-center justify-center gap-3 pt-4\">{actions}</div>\n ) : null}\n </div>\n )\n}\n\nexport { EmptyState, emptyStateVariants }\n"],"mappings":";;;;AAMA,MAAM,qBAAqB,IACzB,+FACA;CACE,UAAU,EACR,MAAM;EACJ,MAAM;EACN,OAAO;CACT,EACF;CACA,iBAAiB,EACf,MAAM,OACR;AACF,CACF;AAYA,SAAS,WAAW,EAClB,MACA,OACA,aACA,SACA,MACA,WACA,gBACA,sBACA,GAAG,SACe;CAClB,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,mBAAmB,EAAE,KAAK,CAAC,GAAG,SAAS;EAAG,GAAI;EAAjE,UAAA;GACG;GAED,oBAAC,MAAD;IAAI,WAAW,GAAG,0CAA0C,cAAc;IAAI,UAAA;GAAU,CAAA;GAEvF,cACC,oBAAC,OAAD;IAAK,WAAW,GAAG,0CAA0C,oBAAoB;IAC9E,UAAA;GACE,CAAA,IACH;GAEH,UACC,oBAAC,OAAD;IAAK,WAAU;IAAyD,UAAA;GAAa,CAAA,IACnF;EACD;;AAET"}
@@ -0,0 +1,2 @@
1
+ import { EmptyState, EmptyStateProps, emptyStateVariants } from "./EmptyState.mjs";
2
+ export { EmptyState, type EmptyStateProps, emptyStateVariants };
@@ -0,0 +1,2 @@
1
+ import { EmptyState, emptyStateVariants } from "./EmptyState.mjs";
2
+ export { EmptyState, emptyStateVariants };