@tetherto/dev-websites-core 0.2.1 → 0.3.0

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 (304) hide show
  1. package/README.md +62 -9
  2. package/dist/cms/index.d.mts +2 -2
  3. package/dist/cms/index.mjs +2 -2
  4. package/dist/{cms-5bS91IRZ.mjs → cms.mjs} +2 -2
  5. package/dist/cms.mjs.map +1 -0
  6. package/dist/i18n/index.d.mts +1 -1
  7. package/dist/i18n/index.mjs +1 -1
  8. package/dist/{i18n-Dy3VrbBw.mjs → i18n.mjs} +1 -1
  9. package/dist/i18n.mjs.map +1 -0
  10. package/dist/index.d.mts +214 -6
  11. package/dist/index.d.mts.map +1 -0
  12. package/dist/index.mjs +6 -6
  13. package/dist/{index-D36IEwUg.d.mts → index2.d.mts} +1 -1
  14. package/dist/index2.d.mts.map +1 -0
  15. package/dist/{index-tTs9h9BS.d.mts → index3.d.mts} +2 -2
  16. package/dist/index3.d.mts.map +1 -0
  17. package/dist/{index-Dyi7DDoO.d.mts → index4.d.mts} +1 -1
  18. package/dist/index4.d.mts.map +1 -0
  19. package/dist/index5.d.mts +6 -0
  20. package/dist/{logger-BPURnavq.mjs → logger.mjs} +1 -1
  21. package/dist/logger.mjs.map +1 -0
  22. package/dist/{readMediaBuffer-1C3QTpkO.d.mts → readMediaBuffer.d.mts} +1 -1
  23. package/dist/readMediaBuffer.d.mts.map +1 -0
  24. package/dist/{readMediaBuffer-DWkTbYVn.mjs → readMediaBuffer.mjs} +2 -2
  25. package/dist/readMediaBuffer.mjs.map +1 -0
  26. package/dist/seo/index.d.mts +1 -1
  27. package/dist/seo/index.mjs +1 -1
  28. package/dist/{seo-e5XjgQ7l.mjs → seo.mjs} +3 -3
  29. package/dist/seo.mjs.map +1 -0
  30. package/dist/ui/a11y/focus.d.mts +6 -0
  31. package/dist/ui/a11y/focus.d.mts.map +1 -0
  32. package/dist/ui/a11y/focus.mjs +7 -0
  33. package/dist/ui/a11y/focus.mjs.map +1 -0
  34. package/dist/ui/a11y/index.d.mts +4 -0
  35. package/dist/ui/a11y/index.mjs +4 -0
  36. package/dist/ui/carousel/index.d.mts +3 -0
  37. package/dist/ui/carousel/index.mjs +3 -0
  38. package/dist/ui/components/Accordion/Accordion.d.mts +16 -0
  39. package/dist/ui/components/Accordion/Accordion.d.mts.map +1 -0
  40. package/dist/ui/components/Accordion/Accordion.mjs +51 -0
  41. package/dist/ui/components/Accordion/Accordion.mjs.map +1 -0
  42. package/dist/ui/components/Accordion/index.d.mts +2 -0
  43. package/dist/ui/components/Accordion/index.mjs +2 -0
  44. package/dist/ui/components/Avatar/Avatar.d.mts +9 -0
  45. package/dist/ui/components/Avatar/Avatar.d.mts.map +1 -0
  46. package/dist/ui/components/Avatar/Avatar.mjs +15 -0
  47. package/dist/ui/components/Avatar/Avatar.mjs.map +1 -0
  48. package/dist/ui/components/Avatar/index.d.mts +2 -0
  49. package/dist/ui/components/Avatar/index.mjs +2 -0
  50. package/dist/ui/components/Badge/Badge.d.mts +14 -0
  51. package/dist/ui/components/Badge/Badge.d.mts.map +1 -0
  52. package/dist/ui/components/Badge/Badge.mjs +30 -0
  53. package/dist/ui/components/Badge/Badge.mjs.map +1 -0
  54. package/dist/ui/components/Badge/index.d.mts +2 -0
  55. package/dist/ui/components/Badge/index.mjs +2 -0
  56. package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts +24 -0
  57. package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts.map +1 -0
  58. package/dist/ui/components/BadgeVersion/BadgeVersion.mjs +66 -0
  59. package/dist/ui/components/BadgeVersion/BadgeVersion.mjs.map +1 -0
  60. package/dist/ui/components/BadgeVersion/index.d.mts +2 -0
  61. package/dist/ui/components/BadgeVersion/index.mjs +2 -0
  62. package/dist/ui/components/Button/Button.d.mts +14 -0
  63. package/dist/ui/components/Button/Button.d.mts.map +1 -0
  64. package/dist/ui/components/Button/Button.mjs +48 -0
  65. package/dist/ui/components/Button/Button.mjs.map +1 -0
  66. package/dist/ui/components/Button/index.d.mts +2 -0
  67. package/dist/ui/components/Button/index.mjs +2 -0
  68. package/dist/ui/components/Card/Card.d.mts +14 -0
  69. package/dist/ui/components/Card/Card.d.mts.map +1 -0
  70. package/dist/ui/components/Card/Card.mjs +40 -0
  71. package/dist/ui/components/Card/Card.mjs.map +1 -0
  72. package/dist/ui/components/Card/index.d.mts +2 -0
  73. package/dist/ui/components/Card/index.mjs +2 -0
  74. package/dist/ui/components/Carousel/Carousel.d.mts +42 -0
  75. package/dist/ui/components/Carousel/Carousel.d.mts.map +1 -0
  76. package/dist/ui/components/Carousel/Carousel.mjs +164 -0
  77. package/dist/ui/components/Carousel/Carousel.mjs.map +1 -0
  78. package/dist/ui/components/Carousel/index.d.mts +2 -0
  79. package/dist/ui/components/Carousel/index.mjs +2 -0
  80. package/dist/ui/components/Checkbox/Checkbox.d.mts +8 -0
  81. package/dist/ui/components/Checkbox/Checkbox.d.mts.map +1 -0
  82. package/dist/ui/components/Checkbox/Checkbox.mjs +39 -0
  83. package/dist/ui/components/Checkbox/Checkbox.mjs.map +1 -0
  84. package/dist/ui/components/Checkbox/index.d.mts +2 -0
  85. package/dist/ui/components/Checkbox/index.mjs +2 -0
  86. package/dist/ui/components/CodeBlock/CodeBlock.d.mts +22 -0
  87. package/dist/ui/components/CodeBlock/CodeBlock.d.mts.map +1 -0
  88. package/dist/ui/components/CodeBlock/CodeBlock.mjs +66 -0
  89. package/dist/ui/components/CodeBlock/CodeBlock.mjs.map +1 -0
  90. package/dist/ui/components/CodeBlock/index.d.mts +2 -0
  91. package/dist/ui/components/CodeBlock/index.mjs +2 -0
  92. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts +19 -0
  93. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts.map +1 -0
  94. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs +59 -0
  95. package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs.map +1 -0
  96. package/dist/ui/components/CodeBlockTabs/index.d.mts +2 -0
  97. package/dist/ui/components/CodeBlockTabs/index.mjs +2 -0
  98. package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts +13 -0
  99. package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts.map +1 -0
  100. package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs +55 -0
  101. package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
  102. package/dist/ui/components/CollapsibleSection/index.d.mts +2 -0
  103. package/dist/ui/components/CollapsibleSection/index.mjs +2 -0
  104. package/dist/ui/components/CopyButton/CopyButton.d.mts +12 -0
  105. package/dist/ui/components/CopyButton/CopyButton.d.mts.map +1 -0
  106. package/dist/ui/components/CopyButton/CopyButton.mjs +45 -0
  107. package/dist/ui/components/CopyButton/CopyButton.mjs.map +1 -0
  108. package/dist/ui/components/CopyButton/index.d.mts +2 -0
  109. package/dist/ui/components/CopyButton/index.mjs +2 -0
  110. package/dist/ui/components/Dialog/Dialog.d.mts +26 -0
  111. package/dist/ui/components/Dialog/Dialog.d.mts.map +1 -0
  112. package/dist/ui/components/Dialog/Dialog.mjs +79 -0
  113. package/dist/ui/components/Dialog/Dialog.mjs.map +1 -0
  114. package/dist/ui/components/Dialog/index.d.mts +2 -0
  115. package/dist/ui/components/Dialog/index.mjs +2 -0
  116. package/dist/ui/components/EmptyState/EmptyState.d.mts +18 -0
  117. package/dist/ui/components/EmptyState/EmptyState.d.mts.map +1 -0
  118. package/dist/ui/components/EmptyState/EmptyState.mjs +36 -0
  119. package/dist/ui/components/EmptyState/EmptyState.mjs.map +1 -0
  120. package/dist/ui/components/EmptyState/index.d.mts +2 -0
  121. package/dist/ui/components/EmptyState/index.mjs +2 -0
  122. package/dist/ui/components/FieldError/FieldError.d.mts +14 -0
  123. package/dist/ui/components/FieldError/FieldError.d.mts.map +1 -0
  124. package/dist/ui/components/FieldError/FieldError.mjs +19 -0
  125. package/dist/ui/components/FieldError/FieldError.mjs.map +1 -0
  126. package/dist/ui/components/FieldError/index.d.mts +2 -0
  127. package/dist/ui/components/FieldError/index.mjs +2 -0
  128. package/dist/ui/components/FormattedDate/FormattedDate.d.mts +15 -0
  129. package/dist/ui/components/FormattedDate/FormattedDate.d.mts.map +1 -0
  130. package/dist/ui/components/FormattedDate/FormattedDate.mjs +23 -0
  131. package/dist/ui/components/FormattedDate/FormattedDate.mjs.map +1 -0
  132. package/dist/ui/components/FormattedDate/index.d.mts +2 -0
  133. package/dist/ui/components/FormattedDate/index.mjs +2 -0
  134. package/dist/ui/components/IconButton/IconButton.d.mts +10 -0
  135. package/dist/ui/components/IconButton/IconButton.d.mts.map +1 -0
  136. package/dist/ui/components/IconButton/IconButton.mjs +19 -0
  137. package/dist/ui/components/IconButton/IconButton.mjs.map +1 -0
  138. package/dist/ui/components/IconButton/index.d.mts +2 -0
  139. package/dist/ui/components/IconButton/index.mjs +2 -0
  140. package/dist/ui/components/Input/Input.d.mts +12 -0
  141. package/dist/ui/components/Input/Input.d.mts.map +1 -0
  142. package/dist/ui/components/Input/Input.mjs +43 -0
  143. package/dist/ui/components/Input/Input.mjs.map +1 -0
  144. package/dist/ui/components/Input/index.d.mts +2 -0
  145. package/dist/ui/components/Input/index.mjs +2 -0
  146. package/dist/ui/components/Label/Label.d.mts +11 -0
  147. package/dist/ui/components/Label/Label.d.mts.map +1 -0
  148. package/dist/ui/components/Label/Label.mjs +18 -0
  149. package/dist/ui/components/Label/Label.mjs.map +1 -0
  150. package/dist/ui/components/Label/index.d.mts +2 -0
  151. package/dist/ui/components/Label/index.mjs +2 -0
  152. package/dist/ui/components/LazyVideo/LazyVideo.d.mts +23 -0
  153. package/dist/ui/components/LazyVideo/LazyVideo.d.mts.map +1 -0
  154. package/dist/ui/components/LazyVideo/LazyVideo.mjs +57 -0
  155. package/dist/ui/components/LazyVideo/LazyVideo.mjs.map +1 -0
  156. package/dist/ui/components/LazyVideo/index.d.mts +2 -0
  157. package/dist/ui/components/LazyVideo/index.mjs +2 -0
  158. package/dist/ui/components/Pagination/Pagination.d.mts +38 -0
  159. package/dist/ui/components/Pagination/Pagination.d.mts.map +1 -0
  160. package/dist/ui/components/Pagination/Pagination.mjs +110 -0
  161. package/dist/ui/components/Pagination/Pagination.mjs.map +1 -0
  162. package/dist/ui/components/Pagination/index.d.mts +2 -0
  163. package/dist/ui/components/Pagination/index.mjs +2 -0
  164. package/dist/ui/components/PaginationItem/PaginationItem.d.mts +15 -0
  165. package/dist/ui/components/PaginationItem/PaginationItem.d.mts.map +1 -0
  166. package/dist/ui/components/PaginationItem/PaginationItem.mjs +34 -0
  167. package/dist/ui/components/PaginationItem/PaginationItem.mjs.map +1 -0
  168. package/dist/ui/components/PaginationItem/index.d.mts +2 -0
  169. package/dist/ui/components/PaginationItem/index.mjs +2 -0
  170. package/dist/ui/components/PasswordInput/PasswordInput.d.mts +10 -0
  171. package/dist/ui/components/PasswordInput/PasswordInput.d.mts.map +1 -0
  172. package/dist/ui/components/PasswordInput/PasswordInput.mjs +39 -0
  173. package/dist/ui/components/PasswordInput/PasswordInput.mjs.map +1 -0
  174. package/dist/ui/components/PasswordInput/index.d.mts +2 -0
  175. package/dist/ui/components/PasswordInput/index.mjs +2 -0
  176. package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts +20 -0
  177. package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts.map +1 -0
  178. package/dist/ui/components/ProgressStepper/ProgressStepper.mjs +39 -0
  179. package/dist/ui/components/ProgressStepper/ProgressStepper.mjs.map +1 -0
  180. package/dist/ui/components/ProgressStepper/index.d.mts +2 -0
  181. package/dist/ui/components/ProgressStepper/index.mjs +2 -0
  182. package/dist/ui/components/Prose/Prose.d.mts +10 -0
  183. package/dist/ui/components/Prose/Prose.d.mts.map +1 -0
  184. package/dist/ui/components/Prose/Prose.mjs +19 -0
  185. package/dist/ui/components/Prose/Prose.mjs.map +1 -0
  186. package/dist/ui/components/Prose/index.d.mts +2 -0
  187. package/dist/ui/components/Prose/index.mjs +2 -0
  188. package/dist/ui/components/Radio/Radio.d.mts +8 -0
  189. package/dist/ui/components/Radio/Radio.d.mts.map +1 -0
  190. package/dist/ui/components/Radio/Radio.mjs +25 -0
  191. package/dist/ui/components/Radio/Radio.mjs.map +1 -0
  192. package/dist/ui/components/Radio/index.d.mts +2 -0
  193. package/dist/ui/components/Radio/index.mjs +2 -0
  194. package/dist/ui/components/Reveal/Reveal.d.mts +10 -0
  195. package/dist/ui/components/Reveal/Reveal.d.mts.map +1 -0
  196. package/dist/ui/components/Reveal/Reveal.mjs +18 -0
  197. package/dist/ui/components/Reveal/Reveal.mjs.map +1 -0
  198. package/dist/ui/components/Reveal/index.d.mts +2 -0
  199. package/dist/ui/components/Reveal/index.mjs +2 -0
  200. package/dist/ui/components/SearchInput/SearchInput.d.mts +15 -0
  201. package/dist/ui/components/SearchInput/SearchInput.d.mts.map +1 -0
  202. package/dist/ui/components/SearchInput/SearchInput.mjs +28 -0
  203. package/dist/ui/components/SearchInput/SearchInput.mjs.map +1 -0
  204. package/dist/ui/components/SearchInput/index.d.mts +2 -0
  205. package/dist/ui/components/SearchInput/index.mjs +2 -0
  206. package/dist/ui/components/Select/Select.d.mts +34 -0
  207. package/dist/ui/components/Select/Select.d.mts.map +1 -0
  208. package/dist/ui/components/Select/Select.mjs +167 -0
  209. package/dist/ui/components/Select/Select.mjs.map +1 -0
  210. package/dist/ui/components/Select/index.d.mts +2 -0
  211. package/dist/ui/components/Select/index.mjs +2 -0
  212. package/dist/ui/components/Sheet/Sheet.d.mts +19 -0
  213. package/dist/ui/components/Sheet/Sheet.d.mts.map +1 -0
  214. package/dist/ui/components/Sheet/Sheet.mjs +59 -0
  215. package/dist/ui/components/Sheet/Sheet.mjs.map +1 -0
  216. package/dist/ui/components/Sheet/index.d.mts +2 -0
  217. package/dist/ui/components/Sheet/index.mjs +2 -0
  218. package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts +10 -0
  219. package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts.map +1 -0
  220. package/dist/ui/components/StaggerReveal/StaggerReveal.mjs +31 -0
  221. package/dist/ui/components/StaggerReveal/StaggerReveal.mjs.map +1 -0
  222. package/dist/ui/components/StaggerReveal/index.d.mts +2 -0
  223. package/dist/ui/components/StaggerReveal/index.mjs +2 -0
  224. package/dist/ui/components/Stepper/Stepper.d.mts +15 -0
  225. package/dist/ui/components/Stepper/Stepper.d.mts.map +1 -0
  226. package/dist/ui/components/Stepper/Stepper.mjs +38 -0
  227. package/dist/ui/components/Stepper/Stepper.mjs.map +1 -0
  228. package/dist/ui/components/Stepper/index.d.mts +2 -0
  229. package/dist/ui/components/Stepper/index.mjs +2 -0
  230. package/dist/ui/components/Switch/Switch.d.mts +12 -0
  231. package/dist/ui/components/Switch/Switch.d.mts.map +1 -0
  232. package/dist/ui/components/Switch/Switch.mjs +34 -0
  233. package/dist/ui/components/Switch/Switch.mjs.map +1 -0
  234. package/dist/ui/components/Switch/index.d.mts +2 -0
  235. package/dist/ui/components/Switch/index.mjs +2 -0
  236. package/dist/ui/components/TextButton/TextButton.d.mts +9 -0
  237. package/dist/ui/components/TextButton/TextButton.d.mts.map +1 -0
  238. package/dist/ui/components/TextButton/TextButton.mjs +16 -0
  239. package/dist/ui/components/TextButton/TextButton.mjs.map +1 -0
  240. package/dist/ui/components/TextButton/index.d.mts +2 -0
  241. package/dist/ui/components/TextButton/index.mjs +2 -0
  242. package/dist/ui/components/Textarea/Textarea.d.mts +9 -0
  243. package/dist/ui/components/Textarea/Textarea.d.mts.map +1 -0
  244. package/dist/ui/components/Textarea/Textarea.mjs +27 -0
  245. package/dist/ui/components/Textarea/Textarea.mjs.map +1 -0
  246. package/dist/ui/components/Textarea/index.d.mts +2 -0
  247. package/dist/ui/components/Textarea/index.mjs +2 -0
  248. package/dist/ui/components/Toast/Toast.d.mts +20 -0
  249. package/dist/ui/components/Toast/Toast.d.mts.map +1 -0
  250. package/dist/ui/components/Toast/Toast.mjs +128 -0
  251. package/dist/ui/components/Toast/Toast.mjs.map +1 -0
  252. package/dist/ui/components/Toast/index.d.mts +2 -0
  253. package/dist/ui/components/Toast/index.mjs +2 -0
  254. package/dist/ui/components/Tooltip/Tooltip.d.mts +11 -0
  255. package/dist/ui/components/Tooltip/Tooltip.d.mts.map +1 -0
  256. package/dist/ui/components/Tooltip/Tooltip.mjs +20 -0
  257. package/dist/ui/components/Tooltip/Tooltip.mjs.map +1 -0
  258. package/dist/ui/components/Tooltip/index.d.mts +2 -0
  259. package/dist/ui/components/Tooltip/index.mjs +2 -0
  260. package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts +7 -0
  261. package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts.map +1 -0
  262. package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs +13 -0
  263. package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -0
  264. package/dist/ui/components/VisuallyHidden/index.d.mts +2 -0
  265. package/dist/ui/components/VisuallyHidden/index.mjs +2 -0
  266. package/dist/ui/hooks/index.d.mts +2 -0
  267. package/dist/ui/hooks/index.mjs +2 -0
  268. package/dist/ui/hooks/useInView.d.mts +13 -0
  269. package/dist/ui/hooks/useInView.d.mts.map +1 -0
  270. package/dist/ui/hooks/useInView.mjs +37 -0
  271. package/dist/ui/hooks/useInView.mjs.map +1 -0
  272. package/dist/ui/index.d.mts +81 -0
  273. package/dist/ui/index.mjs +40 -0
  274. package/dist/ui/theme/preset.d.mts +170 -0
  275. package/dist/ui/theme/preset.d.mts.map +1 -0
  276. package/dist/ui/theme/preset.mjs +143 -0
  277. package/dist/ui/theme/preset.mjs.map +1 -0
  278. package/dist/ui/utils/cn.d.mts +6 -0
  279. package/dist/ui/utils/cn.d.mts.map +1 -0
  280. package/dist/ui/utils/cn.mjs +42 -0
  281. package/dist/ui/utils/cn.mjs.map +1 -0
  282. package/dist/ui/utils/index.d.mts +2 -0
  283. package/dist/ui/utils/index.mjs +2 -0
  284. package/dist/utils/index.d.mts +1 -1
  285. package/dist/utils/index.mjs +2 -2
  286. package/dist/{utils-CVVQQltg.mjs → utils.mjs} +1 -1
  287. package/dist/utils.mjs.map +1 -0
  288. package/package.json +66 -7
  289. package/src/ui/theme/preset.css +53 -0
  290. package/src/ui/theme/preset.ts +131 -0
  291. package/src/ui/theme/theme.css +12 -0
  292. package/src/ui/theme/tokens.css +57 -0
  293. package/dist/cms-5bS91IRZ.mjs.map +0 -1
  294. package/dist/i18n-Dy3VrbBw.mjs.map +0 -1
  295. package/dist/index-9B8SfwdR.d.mts +0 -214
  296. package/dist/index-9B8SfwdR.d.mts.map +0 -1
  297. package/dist/index-D36IEwUg.d.mts.map +0 -1
  298. package/dist/index-Dyi7DDoO.d.mts.map +0 -1
  299. package/dist/index-tTs9h9BS.d.mts.map +0 -1
  300. package/dist/logger-BPURnavq.mjs.map +0 -1
  301. package/dist/readMediaBuffer-1C3QTpkO.d.mts.map +0 -1
  302. package/dist/readMediaBuffer-DWkTbYVn.mjs.map +0 -1
  303. package/dist/seo-e5XjgQ7l.mjs.map +0 -1
  304. package/dist/utils-CVVQQltg.mjs.map +0 -1
@@ -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 };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/ui/components/FieldError/FieldError.d.ts
3
+ type FieldErrorProps = {
4
+ id?: string;
5
+ children?: ReactNode;
6
+ className?: string;
7
+ };
8
+ /**
9
+ * Presentational field error. Apps wire react-hook-form (or other) and pass the message.
10
+ */
11
+ declare function FieldError({ id, children, className }: FieldErrorProps): import("react").JSX.Element | null;
12
+ //#endregion
13
+ export { FieldError, FieldErrorProps };
14
+ //# sourceMappingURL=FieldError.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldError.d.mts","names":[],"sources":["../../../../src/ui/components/FieldError/FieldError.tsx"],"mappings":";;KAIY;EACV;EACA,WAAW;EACX;;;;;iBAMO,aAAa,IAAI,UAAU,aAAa,kCAAe,IAAA"}
@@ -0,0 +1,19 @@
1
+ import { cn } from "../../utils/cn.mjs";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/ui/components/FieldError/FieldError.tsx
4
+ /**
5
+ * Presentational field error. Apps wire react-hook-form (or other) and pass the message.
6
+ */
7
+ function FieldError({ id, children, className }) {
8
+ if (!children) return null;
9
+ return /* @__PURE__ */ jsx("p", {
10
+ id,
11
+ "data-slot": "field-error",
12
+ className: cn("text-xs text-destructive", className),
13
+ children
14
+ });
15
+ }
16
+ //#endregion
17
+ export { FieldError };
18
+
19
+ //# sourceMappingURL=FieldError.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldError.mjs","names":[],"sources":["../../../../src/ui/components/FieldError/FieldError.tsx"],"sourcesContent":["import { cn } from '../../utils/cn.js'\n\nimport type { ReactNode } from 'react'\n\nexport type FieldErrorProps = {\n id?: string\n children?: ReactNode\n className?: string\n}\n\n/**\n * Presentational field error. Apps wire react-hook-form (or other) and pass the message.\n */\nfunction FieldError({ id, children, className }: FieldErrorProps) {\n if (!children) return null\n\n return (\n <p id={id} data-slot=\"field-error\" className={cn('text-xs text-destructive', className)}>\n {children}\n </p>\n )\n}\n\nexport { FieldError }\n"],"mappings":";;;;;;AAaA,SAAS,WAAW,EAAE,IAAI,UAAU,aAA8B;CAChE,IAAI,CAAC,UAAU,OAAO;CAEtB,OACE,oBAAC,KAAD;EAAO;EAAI,aAAU;EAAc,WAAW,GAAG,4BAA4B,SAAS;EACnF;CACA,CAAA;AAEP"}
@@ -0,0 +1,2 @@
1
+ import { FieldError, FieldErrorProps } from "./FieldError.mjs";
2
+ export { FieldError, type FieldErrorProps };
@@ -0,0 +1,2 @@
1
+ import { FieldError } from "./FieldError.mjs";
2
+ export { FieldError };
@@ -0,0 +1,15 @@
1
+ //#region src/ui/components/FormattedDate/FormattedDate.d.ts
2
+ type FormatDateOptions = {
3
+ month?: 'short' | 'long';
4
+ };
5
+ type FormattedDateProps = {
6
+ iso: string | null | undefined;
7
+ locale: string;
8
+ className?: string;
9
+ month?: FormatDateOptions['month'];
10
+ };
11
+ declare function formatDate(iso: string | null | undefined, locale: string, options?: FormatDateOptions): string;
12
+ declare function FormattedDate({ iso, locale, className, month }: FormattedDateProps): import("react").JSX.Element | null;
13
+ //#endregion
14
+ export { FormatDateOptions, FormattedDate, FormattedDateProps, formatDate };
15
+ //# sourceMappingURL=FormattedDate.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormattedDate.d.mts","names":[],"sources":["../../../../src/ui/components/FormattedDate/FormattedDate.tsx"],"mappings":";KAEY;EACV;;KAGU;EACV;EACA;EACA;EACA,QAAQ;;iBAGD,WACP,gCACA,gBACA,UAAU;iBAUH,gBAAgB,KAAK,QAAQ,WAAW,SAAS,qCAAkB,IAAA"}
@@ -0,0 +1,23 @@
1
+ import { cn } from "../../utils/cn.mjs";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/ui/components/FormattedDate/FormattedDate.tsx
4
+ function formatDate(iso, locale, options) {
5
+ if (!iso) return "";
6
+ return new Date(iso).toLocaleDateString(locale, {
7
+ year: "numeric",
8
+ month: options?.month ?? "long",
9
+ day: "numeric"
10
+ });
11
+ }
12
+ function FormattedDate({ iso, locale, className, month }) {
13
+ if (!iso) return null;
14
+ return /* @__PURE__ */ jsx("time", {
15
+ dateTime: iso,
16
+ className: cn(className),
17
+ children: formatDate(iso, locale, { month })
18
+ });
19
+ }
20
+ //#endregion
21
+ export { FormattedDate, formatDate };
22
+
23
+ //# sourceMappingURL=FormattedDate.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormattedDate.mjs","names":[],"sources":["../../../../src/ui/components/FormattedDate/FormattedDate.tsx"],"sourcesContent":["import { cn } from '../../utils/cn.js'\n\nexport type FormatDateOptions = {\n month?: 'short' | 'long'\n}\n\nexport type FormattedDateProps = {\n iso: string | null | undefined\n locale: string\n className?: string\n month?: FormatDateOptions['month']\n}\n\nfunction formatDate(\n iso: string | null | undefined,\n locale: string,\n options?: FormatDateOptions\n): string {\n if (!iso) return ''\n return new Date(iso).toLocaleDateString(locale, {\n year: 'numeric',\n month: options?.month ?? 'long',\n day: 'numeric',\n })\n}\n\nfunction FormattedDate({ iso, locale, className, month }: FormattedDateProps) {\n if (!iso) return null\n\n return (\n <time dateTime={iso} className={cn(className)}>\n {formatDate(iso, locale, { month })}\n </time>\n )\n}\n\nexport { FormattedDate, formatDate }\n"],"mappings":";;;AAaA,SAAS,WACP,KACA,QACA,SACQ;CACR,IAAI,CAAC,KAAK,OAAO;CACjB,OAAO,IAAI,KAAK,GAAG,CAAC,CAAC,mBAAmB,QAAQ;EAC9C,MAAM;EACN,OAAO,SAAS,SAAS;EACzB,KAAK;CACP,CAAC;AACH;AAEA,SAAS,cAAc,EAAE,KAAK,QAAQ,WAAW,SAA6B;CAC5E,IAAI,CAAC,KAAK,OAAO;CAEjB,OACE,oBAAC,QAAD;EAAM,UAAU;EAAK,WAAW,GAAG,SAAS;EACzC,UAAA,WAAW,KAAK,QAAQ,EAAE,MAAM,CAAC;CAC9B,CAAA;AAEV"}
@@ -0,0 +1,2 @@
1
+ import { FormatDateOptions, FormattedDate, FormattedDateProps, formatDate } from "./FormattedDate.mjs";
2
+ export { type FormatDateOptions, FormattedDate, type FormattedDateProps, formatDate };
@@ -0,0 +1,2 @@
1
+ import { FormattedDate, formatDate } from "./FormattedDate.mjs";
2
+ export { FormattedDate, formatDate };
@@ -0,0 +1,10 @@
1
+ import { ComponentProps } from "react";
2
+ import { Primitive } from "@radix-ui/react-primitive";
3
+ //#region src/ui/components/IconButton/IconButton.d.ts
4
+ type IconButtonProps = ComponentProps<typeof Primitive.button> & {
5
+ asChild?: boolean;
6
+ };
7
+ declare function IconButton({ className, asChild, ...props }: IconButtonProps): import("react").JSX.Element;
8
+ //#endregion
9
+ export { IconButton, IconButtonProps };
10
+ //# sourceMappingURL=IconButton.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.mts","names":[],"sources":["../../../../src/ui/components/IconButton/IconButton.tsx"],"mappings":";;;KAUY,kBAAkB,sBAAsB,UAAU;EAC5D;;iBAGO,aAAa,WAAW,YAAoB,SAAS,kCAAe,IAAA"}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { focusRingClassName } from "../../a11y/focus.mjs";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+ import { Primitive } from "@radix-ui/react-primitive";
7
+ //#region src/ui/components/IconButton/IconButton.tsx
8
+ function IconButton({ className, asChild = false, ...props }) {
9
+ const Comp = asChild ? Slot : Primitive.button;
10
+ return /* @__PURE__ */ jsx(Comp, {
11
+ "data-slot": "icon-button",
12
+ className: cn("inline-flex h-10 w-10 items-center justify-center rounded-btn text-foreground transition-colors outline-none hover:bg-foreground/5 focus:bg-foreground/5 disabled:pointer-events-none disabled:opacity-50", focusRingClassName, className),
13
+ ...props
14
+ });
15
+ }
16
+ //#endregion
17
+ export { IconButton };
18
+
19
+ //# sourceMappingURL=IconButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.mjs","names":[],"sources":["../../../../src/ui/components/IconButton/IconButton.tsx"],"sourcesContent":["'use client'\n\nimport { Primitive } from '@radix-ui/react-primitive'\nimport { Slot } from '@radix-ui/react-slot'\n\nimport { focusRingClassName } from '../../a11y/focus.js'\nimport { cn } from '../../utils/cn.js'\n\nimport type { ComponentProps } from 'react'\n\nexport type IconButtonProps = ComponentProps<typeof Primitive.button> & {\n asChild?: boolean\n}\n\nfunction IconButton({ className, asChild = false, ...props }: IconButtonProps) {\n const Comp = asChild ? Slot : Primitive.button\n\n return (\n <Comp\n data-slot=\"icon-button\"\n className={cn(\n 'inline-flex h-10 w-10 items-center justify-center rounded-btn text-foreground transition-colors outline-none hover:bg-foreground/5 focus:bg-foreground/5 disabled:pointer-events-none disabled:opacity-50',\n focusRingClassName,\n className\n )}\n {...props}\n />\n )\n}\n\nexport { IconButton }\n"],"mappings":";;;;;;;AAcA,SAAS,WAAW,EAAE,WAAW,UAAU,OAAO,GAAG,SAA0B;CAC7E,MAAM,OAAO,UAAU,OAAO,UAAU;CAExC,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,6MACA,oBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,2 @@
1
+ import { IconButton, IconButtonProps } from "./IconButton.mjs";
2
+ export { IconButton, type IconButtonProps };
@@ -0,0 +1,2 @@
1
+ import { IconButton } from "./IconButton.mjs";
2
+ export { IconButton };
@@ -0,0 +1,12 @@
1
+ import { ComponentProps, ReactNode } from "react";
2
+ import { Primitive } from "@radix-ui/react-primitive";
3
+ //#region src/ui/components/Input/Input.d.ts
4
+ type InputProps = Omit<ComponentProps<typeof Primitive.input>, 'children'> & {
5
+ error?: boolean | string;
6
+ leftIcon?: ReactNode;
7
+ rightIcon?: ReactNode;
8
+ };
9
+ declare function Input({ className, error, leftIcon, rightIcon, id, ref, ...props }: InputProps): import("react").JSX.Element;
10
+ //#endregion
11
+ export { Input, InputProps };
12
+ //# sourceMappingURL=Input.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.mts","names":[],"sources":["../../../../src/ui/components/Input/Input.tsx"],"mappings":";;;KAQY,aAAa,KAAK,sBAAsB,UAAU;EAC5D;EACA,WAAW;EACX,YAAY;;iBAGL,QAAQ,WAAW,OAAO,UAAU,WAAW,IAAI,QAAQ,SAAS,6BAAU,IAAA"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { cn } from "../../utils/cn.mjs";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Primitive } from "@radix-ui/react-primitive";
5
+ //#region src/ui/components/Input/Input.tsx
6
+ function Input({ className, error, leftIcon, rightIcon, id, ref, ...props }) {
7
+ const errorId = id ? `${id}-error` : void 0;
8
+ const hasError = Boolean(error);
9
+ return /* @__PURE__ */ jsxs("div", {
10
+ className: "flex w-full flex-col gap-1",
11
+ children: [/* @__PURE__ */ jsxs("div", {
12
+ className: "relative flex items-center",
13
+ children: [
14
+ leftIcon ? /* @__PURE__ */ jsx("span", {
15
+ "aria-hidden": "true",
16
+ className: "pointer-events-none absolute left-4 flex items-center",
17
+ children: leftIcon
18
+ }) : null,
19
+ /* @__PURE__ */ jsx(Primitive.input, {
20
+ ref,
21
+ id,
22
+ "data-slot": "input",
23
+ "aria-invalid": hasError || void 0,
24
+ "aria-describedby": hasError && errorId ? errorId : void 0,
25
+ className: cn("h-11 w-full rounded-btn border border-border-subtle bg-background px-3.5 text-sm text-foreground", "placeholder:text-muted", "transition-colors hover:border-border", "focus-visible:border-accent focus-visible:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", hasError && "border-destructive focus-visible:border-destructive", leftIcon && "pl-11", rightIcon && "pr-11", className),
26
+ ...props
27
+ }),
28
+ rightIcon ? /* @__PURE__ */ jsx("span", {
29
+ className: "absolute right-3.5 flex items-center",
30
+ children: rightIcon
31
+ }) : null
32
+ ]
33
+ }), typeof error === "string" ? /* @__PURE__ */ jsx("p", {
34
+ id: errorId,
35
+ className: "text-xs text-destructive",
36
+ children: error
37
+ }) : null]
38
+ });
39
+ }
40
+ //#endregion
41
+ export { Input };
42
+
43
+ //# sourceMappingURL=Input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.mjs","names":[],"sources":["../../../../src/ui/components/Input/Input.tsx"],"sourcesContent":["'use client'\n\nimport { Primitive } from '@radix-ui/react-primitive'\n\nimport { cn } from '../../utils/cn.js'\n\nimport type { ComponentProps, ReactNode } from 'react'\n\nexport type InputProps = Omit<ComponentProps<typeof Primitive.input>, 'children'> & {\n error?: boolean | string\n leftIcon?: ReactNode\n rightIcon?: ReactNode\n}\n\nfunction Input({ className, error, leftIcon, rightIcon, id, ref, ...props }: InputProps) {\n const errorId = id ? `${id}-error` : undefined\n const hasError = Boolean(error)\n\n return (\n <div className=\"flex w-full flex-col gap-1\">\n <div className=\"relative flex items-center\">\n {leftIcon ? (\n <span\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-4 flex items-center\"\n >\n {leftIcon}\n </span>\n ) : null}\n\n <Primitive.input\n ref={ref}\n id={id}\n data-slot=\"input\"\n aria-invalid={hasError || undefined}\n aria-describedby={hasError && errorId ? errorId : undefined}\n className={cn(\n 'h-11 w-full rounded-btn border border-border-subtle bg-background px-3.5 text-sm text-foreground',\n 'placeholder:text-muted',\n 'transition-colors hover:border-border',\n 'focus-visible:border-accent focus-visible:outline-none',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n hasError && 'border-destructive focus-visible:border-destructive',\n leftIcon && 'pl-11',\n rightIcon && 'pr-11',\n className\n )}\n {...props}\n />\n\n {rightIcon ? (\n <span className=\"absolute right-3.5 flex items-center\">{rightIcon}</span>\n ) : null}\n </div>\n\n {typeof error === 'string' ? (\n <p id={errorId} className=\"text-xs text-destructive\">\n {error}\n </p>\n ) : null}\n </div>\n )\n}\n\nexport { Input }\n"],"mappings":";;;;;AAcA,SAAS,MAAM,EAAE,WAAW,OAAO,UAAU,WAAW,IAAI,KAAK,GAAG,SAAqB;CACvF,MAAM,UAAU,KAAK,GAAG,GAAG,UAAU;CACrC,MAAM,WAAW,QAAQ,KAAK;CAE9B,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,WACC,oBAAC,QAAD;KACE,eAAY;KACZ,WAAU;KAET,UAAA;IACG,CAAA,IACJ;IAEJ,oBAAC,UAAU,OAAX;KACO;KACD;KACJ,aAAU;KACV,gBAAc,YAAY;KAC1B,oBAAkB,YAAY,UAAU,UAAU;KAClD,WAAW,GACT,oGACA,0BACA,yCACA,0DACA,mDACA,YAAY,uDACZ,YAAY,SACZ,aAAa,SACb,SACF;KACA,GAAI;IACL,CAAA;IAEA,YACC,oBAAC,QAAD;KAAM,WAAU;KAAwC,UAAA;IAAgB,CAAA,IACtE;GACD;EAEJ,CAAA,GAAA,OAAO,UAAU,WAChB,oBAAC,KAAD;GAAG,IAAI;GAAS,WAAU;GACvB,UAAA;EACA,CAAA,IACD,IACD;;AAET"}
@@ -0,0 +1,2 @@
1
+ import { Input, InputProps } from "./Input.mjs";
2
+ export { Input, type InputProps };
@@ -0,0 +1,2 @@
1
+ import { Input } from "./Input.mjs";
2
+ export { Input };