react-marketing-ui 0.0.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 (318) hide show
  1. package/README.md +34 -0
  2. package/dist/accordion.d.cts +21 -0
  3. package/dist/accordion.d.ts +21 -0
  4. package/dist/accordion.d.ts.map +1 -0
  5. package/dist/accordion.js +230 -0
  6. package/dist/accordion.js.map +1 -0
  7. package/dist/accordion.mjs +4 -0
  8. package/dist/accordion.mjs.map +1 -0
  9. package/dist/action-swap.d.cts +23 -0
  10. package/dist/action-swap.d.ts +23 -0
  11. package/dist/action-swap.d.ts.map +1 -0
  12. package/dist/action-swap.js +81 -0
  13. package/dist/action-swap.js.map +1 -0
  14. package/dist/action-swap.mjs +5 -0
  15. package/dist/action-swap.mjs.map +1 -0
  16. package/dist/animated-beam.d.cts +24 -0
  17. package/dist/animated-beam.d.ts +24 -0
  18. package/dist/animated-beam.d.ts.map +1 -0
  19. package/dist/animated-beam.js +130 -0
  20. package/dist/animated-beam.js.map +1 -0
  21. package/dist/animated-beam.mjs +4 -0
  22. package/dist/animated-beam.mjs.map +1 -0
  23. package/dist/button.d.cts +55 -0
  24. package/dist/button.d.ts +55 -0
  25. package/dist/button.d.ts.map +1 -0
  26. package/dist/button.js +119 -0
  27. package/dist/button.js.map +1 -0
  28. package/dist/button.mjs +4 -0
  29. package/dist/button.mjs.map +1 -0
  30. package/dist/card.d.cts +20 -0
  31. package/dist/card.d.ts +20 -0
  32. package/dist/card.d.ts.map +1 -0
  33. package/dist/card.js +146 -0
  34. package/dist/card.js.map +1 -0
  35. package/dist/card.mjs +5 -0
  36. package/dist/card.mjs.map +1 -0
  37. package/dist/chunk-3SB6HUBA.mjs +31 -0
  38. package/dist/chunk-3SB6HUBA.mjs.map +1 -0
  39. package/dist/chunk-4PBVBXGY.mjs +84 -0
  40. package/dist/chunk-4PBVBXGY.mjs.map +1 -0
  41. package/dist/chunk-4VCFWVSJ.mjs +42 -0
  42. package/dist/chunk-4VCFWVSJ.mjs.map +1 -0
  43. package/dist/chunk-5QQAPGR2.mjs +109 -0
  44. package/dist/chunk-5QQAPGR2.mjs.map +1 -0
  45. package/dist/chunk-6MB4UKRX.mjs +19 -0
  46. package/dist/chunk-6MB4UKRX.mjs.map +1 -0
  47. package/dist/chunk-6T5LR34O.mjs +45 -0
  48. package/dist/chunk-6T5LR34O.mjs.map +1 -0
  49. package/dist/chunk-AYLCYDUM.mjs +275 -0
  50. package/dist/chunk-AYLCYDUM.mjs.map +1 -0
  51. package/dist/chunk-AYY7D2RJ.mjs +112 -0
  52. package/dist/chunk-AYY7D2RJ.mjs.map +1 -0
  53. package/dist/chunk-CTZEI2YS.mjs +324 -0
  54. package/dist/chunk-CTZEI2YS.mjs.map +1 -0
  55. package/dist/chunk-DA3I3Y5O.mjs +71 -0
  56. package/dist/chunk-DA3I3Y5O.mjs.map +1 -0
  57. package/dist/chunk-EYHT2EWJ.mjs +18 -0
  58. package/dist/chunk-EYHT2EWJ.mjs.map +1 -0
  59. package/dist/chunk-IHLGCS63.mjs +36 -0
  60. package/dist/chunk-IHLGCS63.mjs.map +1 -0
  61. package/dist/chunk-JVXJ6SFX.mjs +38 -0
  62. package/dist/chunk-JVXJ6SFX.mjs.map +1 -0
  63. package/dist/chunk-KBHYXLRG.mjs +13 -0
  64. package/dist/chunk-KBHYXLRG.mjs.map +1 -0
  65. package/dist/chunk-KMXUQYR3.mjs +74 -0
  66. package/dist/chunk-KMXUQYR3.mjs.map +1 -0
  67. package/dist/chunk-KNPOZ34H.mjs +88 -0
  68. package/dist/chunk-KNPOZ34H.mjs.map +1 -0
  69. package/dist/chunk-KRNWCJ4D.mjs +219 -0
  70. package/dist/chunk-KRNWCJ4D.mjs.map +1 -0
  71. package/dist/chunk-M5MESV26.mjs +124 -0
  72. package/dist/chunk-M5MESV26.mjs.map +1 -0
  73. package/dist/chunk-MJYBPJBA.mjs +115 -0
  74. package/dist/chunk-MJYBPJBA.mjs.map +1 -0
  75. package/dist/chunk-NNHPQ67J.mjs +10 -0
  76. package/dist/chunk-NNHPQ67J.mjs.map +1 -0
  77. package/dist/chunk-OCZFHVVD.mjs +71 -0
  78. package/dist/chunk-OCZFHVVD.mjs.map +1 -0
  79. package/dist/chunk-QAWSH567.mjs +19 -0
  80. package/dist/chunk-QAWSH567.mjs.map +1 -0
  81. package/dist/chunk-R2E2J42H.mjs +38 -0
  82. package/dist/chunk-R2E2J42H.mjs.map +1 -0
  83. package/dist/chunk-TPGLLSYV.mjs +65 -0
  84. package/dist/chunk-TPGLLSYV.mjs.map +1 -0
  85. package/dist/chunk-VJENJHXJ.mjs +72 -0
  86. package/dist/chunk-VJENJHXJ.mjs.map +1 -0
  87. package/dist/chunk-W22G7XHR.mjs +104 -0
  88. package/dist/chunk-W22G7XHR.mjs.map +1 -0
  89. package/dist/chunk-WDR5VPZJ.mjs +79 -0
  90. package/dist/chunk-WDR5VPZJ.mjs.map +1 -0
  91. package/dist/chunk-WLUGKBH7.mjs +37 -0
  92. package/dist/chunk-WLUGKBH7.mjs.map +1 -0
  93. package/dist/chunk-WYJYLDUA.mjs +84 -0
  94. package/dist/chunk-WYJYLDUA.mjs.map +1 -0
  95. package/dist/chunk-XZEDZVXT.mjs +38 -0
  96. package/dist/chunk-XZEDZVXT.mjs.map +1 -0
  97. package/dist/chunk-YKGP5JIL.mjs +328 -0
  98. package/dist/chunk-YKGP5JIL.mjs.map +1 -0
  99. package/dist/chunk-YM3U2OBE.mjs +99 -0
  100. package/dist/chunk-YM3U2OBE.mjs.map +1 -0
  101. package/dist/dia-text-reveal.css +18 -0
  102. package/dist/dia-text-reveal.css.map +1 -0
  103. package/dist/dia-text-reveal.d.cts +37 -0
  104. package/dist/dia-text-reveal.d.ts +37 -0
  105. package/dist/dia-text-reveal.d.ts.map +1 -0
  106. package/dist/dia-text-reveal.js +334 -0
  107. package/dist/dia-text-reveal.js.map +1 -0
  108. package/dist/dia-text-reveal.lines.d.cts +23 -0
  109. package/dist/dia-text-reveal.lines.d.ts +23 -0
  110. package/dist/dia-text-reveal.lines.d.ts.map +1 -0
  111. package/dist/dia-text-reveal.mjs +4 -0
  112. package/dist/dia-text-reveal.mjs.map +1 -0
  113. package/dist/dia-text-reveal.sweep.d.cts +49 -0
  114. package/dist/dia-text-reveal.sweep.d.ts +49 -0
  115. package/dist/dia-text-reveal.sweep.d.ts.map +1 -0
  116. package/dist/dia-text-reveal.utils.d.cts +3 -0
  117. package/dist/dia-text-reveal.utils.d.ts +3 -0
  118. package/dist/dia-text-reveal.utils.d.ts.map +1 -0
  119. package/dist/elevated-input.d.cts +11 -0
  120. package/dist/elevated-input.d.ts +11 -0
  121. package/dist/elevated-input.d.ts.map +1 -0
  122. package/dist/elevated-input.js +52 -0
  123. package/dist/elevated-input.js.map +1 -0
  124. package/dist/elevated-input.mjs +4 -0
  125. package/dist/elevated-input.mjs.map +1 -0
  126. package/dist/fade-in.d.cts +43 -0
  127. package/dist/fade-in.d.ts +43 -0
  128. package/dist/fade-in.d.ts.map +1 -0
  129. package/dist/fade-in.js +89 -0
  130. package/dist/fade-in.js.map +1 -0
  131. package/dist/fade-in.mjs +4 -0
  132. package/dist/fade-in.mjs.map +1 -0
  133. package/dist/feature-card.d.cts +23 -0
  134. package/dist/feature-card.d.ts +23 -0
  135. package/dist/feature-card.d.ts.map +1 -0
  136. package/dist/feature-card.js +38 -0
  137. package/dist/feature-card.js.map +1 -0
  138. package/dist/feature-card.mjs +4 -0
  139. package/dist/feature-card.mjs.map +1 -0
  140. package/dist/flowchart-parts.d.cts +61 -0
  141. package/dist/flowchart-parts.d.ts +61 -0
  142. package/dist/flowchart-parts.d.ts.map +1 -0
  143. package/dist/flowchart-parts.js +102 -0
  144. package/dist/flowchart-parts.js.map +1 -0
  145. package/dist/flowchart-parts.mjs +4 -0
  146. package/dist/flowchart-parts.mjs.map +1 -0
  147. package/dist/glossy-button.d.cts +21 -0
  148. package/dist/glossy-button.d.ts +21 -0
  149. package/dist/glossy-button.d.ts.map +1 -0
  150. package/dist/glossy-button.js +87 -0
  151. package/dist/glossy-button.js.map +1 -0
  152. package/dist/glossy-button.mjs +4 -0
  153. package/dist/glossy-button.mjs.map +1 -0
  154. package/dist/grainient.css +9 -0
  155. package/dist/grainient.css.map +1 -0
  156. package/dist/grainient.d.cts +5 -0
  157. package/dist/grainient.d.ts +5 -0
  158. package/dist/grainient.d.ts.map +1 -0
  159. package/dist/grainient.js +330 -0
  160. package/dist/grainient.js.map +1 -0
  161. package/dist/grainient.mjs +4 -0
  162. package/dist/grainient.mjs.map +1 -0
  163. package/dist/grainient.shader.d.cts +9 -0
  164. package/dist/grainient.shader.d.ts +9 -0
  165. package/dist/grainient.shader.d.ts.map +1 -0
  166. package/dist/grainient.types.d.cts +30 -0
  167. package/dist/grainient.types.d.ts +30 -0
  168. package/dist/grainient.types.d.ts.map +1 -0
  169. package/dist/highlighter.d.cts +47 -0
  170. package/dist/highlighter.d.ts +47 -0
  171. package/dist/highlighter.d.ts.map +1 -0
  172. package/dist/highlighter.js +125 -0
  173. package/dist/highlighter.js.map +1 -0
  174. package/dist/highlighter.mjs +5 -0
  175. package/dist/highlighter.mjs.map +1 -0
  176. package/dist/index.css +27 -0
  177. package/dist/index.css.map +1 -0
  178. package/dist/index.d.cts +56 -0
  179. package/dist/index.d.ts +56 -0
  180. package/dist/index.d.ts.map +1 -0
  181. package/dist/index.js +2723 -0
  182. package/dist/index.js.map +1 -0
  183. package/dist/index.mjs +34 -0
  184. package/dist/index.mjs.map +1 -0
  185. package/dist/input.d.cts +15 -0
  186. package/dist/input.d.ts +15 -0
  187. package/dist/input.d.ts.map +1 -0
  188. package/dist/input.js +110 -0
  189. package/dist/input.js.map +1 -0
  190. package/dist/input.mjs +4 -0
  191. package/dist/input.mjs.map +1 -0
  192. package/dist/lib/breakpoints.d.cts +36 -0
  193. package/dist/lib/breakpoints.d.ts +36 -0
  194. package/dist/lib/breakpoints.d.ts.map +1 -0
  195. package/dist/lib/breakpoints.js +41 -0
  196. package/dist/lib/breakpoints.js.map +1 -0
  197. package/dist/lib/breakpoints.mjs +3 -0
  198. package/dist/lib/breakpoints.mjs.map +1 -0
  199. package/dist/lib/cn.js +24 -0
  200. package/dist/lib/cn.js.map +1 -0
  201. package/dist/lib/cn.mjs +3 -0
  202. package/dist/lib/cn.mjs.map +1 -0
  203. package/dist/lib/ease.d.cts +19 -0
  204. package/dist/lib/ease.d.ts +19 -0
  205. package/dist/lib/ease.d.ts.map +1 -0
  206. package/dist/lib/ease.js +16 -0
  207. package/dist/lib/ease.js.map +1 -0
  208. package/dist/lib/ease.mjs +3 -0
  209. package/dist/lib/ease.mjs.map +1 -0
  210. package/dist/lib/surface.d.cts +14 -0
  211. package/dist/lib/surface.d.ts +14 -0
  212. package/dist/lib/surface.d.ts.map +1 -0
  213. package/dist/lib/surface.js +40 -0
  214. package/dist/lib/surface.js.map +1 -0
  215. package/dist/lib/surface.mjs +3 -0
  216. package/dist/lib/surface.mjs.map +1 -0
  217. package/dist/lib/use-media-query.d.cts +9 -0
  218. package/dist/lib/use-media-query.d.ts +9 -0
  219. package/dist/lib/use-media-query.d.ts.map +1 -0
  220. package/dist/lib/use-media-query.js +19 -0
  221. package/dist/lib/use-media-query.js.map +1 -0
  222. package/dist/lib/use-media-query.mjs +3 -0
  223. package/dist/lib/use-media-query.mjs.map +1 -0
  224. package/dist/lib/utils.d.cts +25 -0
  225. package/dist/lib/utils.d.ts +25 -0
  226. package/dist/lib/utils.d.ts.map +1 -0
  227. package/dist/liquid-metal.d.cts +24 -0
  228. package/dist/liquid-metal.d.ts +24 -0
  229. package/dist/liquid-metal.d.ts.map +1 -0
  230. package/dist/liquid-metal.js +43 -0
  231. package/dist/liquid-metal.js.map +1 -0
  232. package/dist/liquid-metal.mjs +4 -0
  233. package/dist/liquid-metal.mjs.map +1 -0
  234. package/dist/navigation-menu-icons.d.cts +5 -0
  235. package/dist/navigation-menu-icons.d.ts +5 -0
  236. package/dist/navigation-menu-icons.d.ts.map +1 -0
  237. package/dist/navigation-menu-icons.js +42 -0
  238. package/dist/navigation-menu-icons.js.map +1 -0
  239. package/dist/navigation-menu-icons.mjs +3 -0
  240. package/dist/navigation-menu-icons.mjs.map +1 -0
  241. package/dist/navigation-menu-styles.d.cts +45 -0
  242. package/dist/navigation-menu-styles.d.ts +45 -0
  243. package/dist/navigation-menu-styles.d.ts.map +1 -0
  244. package/dist/navigation-menu-styles.js +16 -0
  245. package/dist/navigation-menu-styles.js.map +1 -0
  246. package/dist/navigation-menu-styles.mjs +3 -0
  247. package/dist/navigation-menu-styles.mjs.map +1 -0
  248. package/dist/navigation-menu.d.cts +18 -0
  249. package/dist/navigation-menu.d.ts +18 -0
  250. package/dist/navigation-menu.d.ts.map +1 -0
  251. package/dist/navigation-menu.js +367 -0
  252. package/dist/navigation-menu.js.map +1 -0
  253. package/dist/navigation-menu.mjs +7 -0
  254. package/dist/navigation-menu.mjs.map +1 -0
  255. package/dist/password-input.d.cts +6 -0
  256. package/dist/password-input.d.ts +6 -0
  257. package/dist/password-input.d.ts.map +1 -0
  258. package/dist/password-input.js +174 -0
  259. package/dist/password-input.js.map +1 -0
  260. package/dist/password-input.mjs +5 -0
  261. package/dist/password-input.mjs.map +1 -0
  262. package/dist/rainbow-button.d.cts +16 -0
  263. package/dist/rainbow-button.d.ts +16 -0
  264. package/dist/rainbow-button.d.ts.map +1 -0
  265. package/dist/rainbow-button.js +49 -0
  266. package/dist/rainbow-button.js.map +1 -0
  267. package/dist/rainbow-button.mjs +4 -0
  268. package/dist/rainbow-button.mjs.map +1 -0
  269. package/dist/range-slider.d.cts +20 -0
  270. package/dist/range-slider.d.ts +20 -0
  271. package/dist/range-slider.d.ts.map +1 -0
  272. package/dist/range-slider.js +85 -0
  273. package/dist/range-slider.js.map +1 -0
  274. package/dist/range-slider.mjs +3 -0
  275. package/dist/range-slider.mjs.map +1 -0
  276. package/dist/rolling-badge.d.cts +11 -0
  277. package/dist/rolling-badge.d.ts +11 -0
  278. package/dist/rolling-badge.d.ts.map +1 -0
  279. package/dist/rolling-badge.js +71 -0
  280. package/dist/rolling-badge.js.map +1 -0
  281. package/dist/rolling-badge.mjs +4 -0
  282. package/dist/rolling-badge.mjs.map +1 -0
  283. package/dist/savings-badge.d.cts +10 -0
  284. package/dist/savings-badge.d.ts +10 -0
  285. package/dist/savings-badge.d.ts.map +1 -0
  286. package/dist/savings-badge.js +26 -0
  287. package/dist/savings-badge.js.map +1 -0
  288. package/dist/savings-badge.mjs +4 -0
  289. package/dist/savings-badge.mjs.map +1 -0
  290. package/dist/shine-border.d.cts +15 -0
  291. package/dist/shine-border.d.ts +15 -0
  292. package/dist/shine-border.d.ts.map +1 -0
  293. package/dist/shine-border.js +47 -0
  294. package/dist/shine-border.js.map +1 -0
  295. package/dist/shine-border.mjs +4 -0
  296. package/dist/shine-border.mjs.map +1 -0
  297. package/dist/sparkles-text.d.cts +22 -0
  298. package/dist/sparkles-text.d.ts +22 -0
  299. package/dist/sparkles-text.d.ts.map +1 -0
  300. package/dist/sparkles-text.js +87 -0
  301. package/dist/sparkles-text.js.map +1 -0
  302. package/dist/sparkles-text.mjs +5 -0
  303. package/dist/sparkles-text.mjs.map +1 -0
  304. package/dist/tabs.d.cts +16 -0
  305. package/dist/tabs.d.ts +16 -0
  306. package/dist/tabs.d.ts.map +1 -0
  307. package/dist/tabs.js +121 -0
  308. package/dist/tabs.js.map +1 -0
  309. package/dist/tabs.mjs +4 -0
  310. package/dist/tabs.mjs.map +1 -0
  311. package/dist/theme-toggle.d.cts +10 -0
  312. package/dist/theme-toggle.d.ts +10 -0
  313. package/dist/theme-toggle.d.ts.map +1 -0
  314. package/dist/theme-toggle.js +251 -0
  315. package/dist/theme-toggle.js.map +1 -0
  316. package/dist/theme-toggle.mjs +7 -0
  317. package/dist/theme-toggle.mjs.map +1 -0
  318. package/package.json +428 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,34 @@
1
+ export { ArrowLeft, ArrowRight, FlowDiamond, FlowNode, FlowPill, JoinArrow, SplitArrow, TurnDown } from './chunk-KNPOZ34H.mjs';
2
+ export { NavigationMenu, NavigationMenuArrow, NavigationMenuBackdrop, NavigationMenuContent, NavigationMenuIcon, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPortal, NavigationMenuSub, NavigationMenuSubTrigger, NavigationMenuTrigger, NavigationMenuViewport } from './chunk-AYLCYDUM.mjs';
3
+ export { navigationMenuSubTriggerStyle, navigationMenuTriggerStyle } from './chunk-KBHYXLRG.mjs';
4
+ export { ArrowSvg, ChevronDownIcon, ChevronRightIcon } from './chunk-JVXJ6SFX.mjs';
5
+ export { BREAKPOINTS, getBreakpoint, onBreakpointChange, useBreakpoint } from './chunk-IHLGCS63.mjs';
6
+ export { PasswordInput } from './chunk-VJENJHXJ.mjs';
7
+ export { Input } from './chunk-W22G7XHR.mjs';
8
+ export { RangeSlider } from './chunk-4PBVBXGY.mjs';
9
+ export { SavingsBadge } from './chunk-6MB4UKRX.mjs';
10
+ export { ThemeToggle } from './chunk-KMXUQYR3.mjs';
11
+ export { Button } from './chunk-AYY7D2RJ.mjs';
12
+ export { ActionSwapRollIcon, ActionSwapRollText } from './chunk-DA3I3Y5O.mjs';
13
+ export { grainient_default as Grainient } from './chunk-CTZEI2YS.mjs';
14
+ export { DiaTextReveal } from './chunk-YKGP5JIL.mjs';
15
+ export { Accordion, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger } from './chunk-KRNWCJ4D.mjs';
16
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './chunk-YM3U2OBE.mjs';
17
+ export { solidSurface } from './chunk-XZEDZVXT.mjs';
18
+ export { AnimatedBeam } from './chunk-M5MESV26.mjs';
19
+ export { GlossyButton, glossyButtonVariants } from './chunk-WDR5VPZJ.mjs';
20
+ export { FeatureCard } from './chunk-3SB6HUBA.mjs';
21
+ export { RollingBadge } from './chunk-TPGLLSYV.mjs';
22
+ export { ElevatedInput } from './chunk-6T5LR34O.mjs';
23
+ export { SparklesText } from './chunk-OCZFHVVD.mjs';
24
+ export { RainbowButton, rainbowButtonVariants } from './chunk-4VCFWVSJ.mjs';
25
+ export { ShineBorder } from './chunk-R2E2J42H.mjs';
26
+ export { LiquidMetal } from './chunk-WLUGKBH7.mjs';
27
+ export { Tabs } from './chunk-MJYBPJBA.mjs';
28
+ export { Highlighter } from './chunk-5QQAPGR2.mjs';
29
+ import './chunk-EYHT2EWJ.mjs';
30
+ export { cn, hasKey, noop, validCssVars } from './chunk-QAWSH567.mjs';
31
+ export { FadeIn, Stagger, StaggerItem } from './chunk-WYJYLDUA.mjs';
32
+ export { EASE_OUT, EASE_OUT_CSS, SPRING_SWAP, easeOut, easeOutBack } from './chunk-NNHPQ67J.mjs';
33
+ //# sourceMappingURL=index.mjs.map
34
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,15 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ export type InputProps = {
3
+ label?: string;
4
+ error?: string | boolean;
5
+ hint?: string;
6
+ leftAdornment?: ReactNode;
7
+ rightAdornment?: ReactNode;
8
+ size?: 'sm' | 'md' | 'lg';
9
+ shape?: 'rounded' | 'pill';
10
+ className?: string;
11
+ inputClassName?: string;
12
+ inputType?: InputHTMLAttributes<HTMLInputElement>['type'];
13
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>;
14
+ export declare function Input({ label, error, hint, leftAdornment, rightAdornment, size, shape, className, inputClassName, inputType, id: idProp, onFocus, onBlur, disabled, autoFocus, ...inputProps }: InputProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ export type InputProps = {
3
+ label?: string;
4
+ error?: string | boolean;
5
+ hint?: string;
6
+ leftAdornment?: ReactNode;
7
+ rightAdornment?: ReactNode;
8
+ size?: 'sm' | 'md' | 'lg';
9
+ shape?: 'rounded' | 'pill';
10
+ className?: string;
11
+ inputClassName?: string;
12
+ inputType?: InputHTMLAttributes<HTMLInputElement>['type'];
13
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>;
14
+ export declare function Input({ label, error, hint, leftAdornment, rightAdornment, size, shape, className, inputClassName, inputType, id: idProp, onFocus, onBlur, disabled, autoFocus, ...inputProps }: InputProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAgClF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;CAC3D,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEjE,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,KAAK,EACL,IAAI,EACJ,aAAa,EACb,cAAc,EACd,IAAW,EACX,KAAiB,EACjB,SAAS,EACT,cAAc,EACd,SAAkB,EAClB,EAAE,EAAE,MAAM,EACV,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,EACT,GAAG,UAAU,EACd,EAAE,UAAU,+BAyEZ"}
package/dist/input.js ADDED
@@ -0,0 +1,110 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var clsx = require('clsx');
5
+ var tailwindMerge = require('tailwind-merge');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function cn(...inputs) {
9
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
10
+ }
11
+ var FIELD_BORDER = {
12
+ idle: "border-(--color-border)",
13
+ focused: "border-(--color-foreground)/40",
14
+ error: "border-(--color-destructive)"
15
+ };
16
+ var FIELD_HEIGHT = {
17
+ sm: "h-8",
18
+ md: "h-9",
19
+ lg: "h-11"
20
+ };
21
+ var FIELD_SHAPE = {
22
+ rounded: "rounded-lg",
23
+ pill: "rounded-full"
24
+ };
25
+ var INPUT_SIZE = {
26
+ sm: "text-xs",
27
+ md: "text-sm",
28
+ lg: "text-base"
29
+ };
30
+ var INPUT_PAD = {
31
+ sm: "px-2.5",
32
+ md: "px-3",
33
+ lg: "px-3.5"
34
+ };
35
+ function Input({
36
+ label,
37
+ error,
38
+ hint,
39
+ leftAdornment,
40
+ rightAdornment,
41
+ size = "md",
42
+ shape = "rounded",
43
+ className,
44
+ inputClassName,
45
+ inputType = "text",
46
+ id: idProp,
47
+ onFocus,
48
+ onBlur,
49
+ disabled,
50
+ autoFocus,
51
+ ...inputProps
52
+ }) {
53
+ const autoId = react.useId();
54
+ const id = idProp ?? autoId;
55
+ const [focused, setFocused] = react.useState(false);
56
+ const hasError = Boolean(error);
57
+ const errorMessage = typeof error === "string" ? error : null;
58
+ const state = hasError ? "error" : focused ? "focused" : "idle";
59
+ const hasLeft = Boolean(leftAdornment);
60
+ const hasRight = Boolean(rightAdornment);
61
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [
62
+ label ? /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "px-1 font-medium text-(--color-foreground) text-sm", children: label }) : null,
63
+ /* @__PURE__ */ jsxRuntime.jsxs(
64
+ "div",
65
+ {
66
+ className: cn(
67
+ "relative flex flex-row items-center overflow-hidden border",
68
+ FIELD_BORDER[state],
69
+ FIELD_HEIGHT[size],
70
+ FIELD_SHAPE[shape],
71
+ disabled && "opacity-60"
72
+ ),
73
+ children: [
74
+ hasLeft ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute top-0 bottom-0 left-3 z-10 flex items-center justify-center", children: leftAdornment }) : null,
75
+ /* @__PURE__ */ jsxRuntime.jsx(
76
+ "input",
77
+ {
78
+ id,
79
+ type: inputType,
80
+ disabled,
81
+ autoFocus,
82
+ onFocus: (event_) => {
83
+ setFocused(true);
84
+ onFocus?.(event_);
85
+ },
86
+ onBlur: (event_) => {
87
+ setFocused(false);
88
+ onBlur?.(event_);
89
+ },
90
+ className: cn(
91
+ "h-full min-w-0 flex-1 bg-transparent text-(--color-foreground) outline-none",
92
+ INPUT_SIZE[size],
93
+ hasLeft ? "pl-10" : INPUT_PAD[size],
94
+ hasRight ? "pr-10" : INPUT_PAD[size],
95
+ inputClassName
96
+ ),
97
+ ...inputProps
98
+ }
99
+ ),
100
+ hasRight ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute top-0 right-3 bottom-0 z-10 flex items-center justify-center", children: rightAdornment }) : null
101
+ ]
102
+ }
103
+ ),
104
+ errorMessage ? /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "px-1 text-(--color-destructive) text-xs", children: errorMessage }) : hint ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-(--color-muted-foreground) text-xs", children: hint }) : null
105
+ ] });
106
+ }
107
+
108
+ exports.Input = Input;
109
+ //# sourceMappingURL=input.js.map
110
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/components/input.tsx"],"names":["twMerge","clsx","useId","useState","jsxs","jsx"],"mappings":"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","file":"input.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n","'use client';\n\nimport { type InputHTMLAttributes, type ReactNode, useId, useState } from 'react';\nimport { cn } from '../lib/utils.js';\n\nconst FIELD_BORDER: Record<string, string> = {\n idle: 'border-(--color-border)',\n focused: 'border-(--color-foreground)/40',\n error: 'border-(--color-destructive)',\n};\n\nconst FIELD_HEIGHT: Record<string, string> = {\n sm: 'h-8',\n md: 'h-9',\n lg: 'h-11',\n};\n\nconst FIELD_SHAPE: Record<string, string> = {\n rounded: 'rounded-lg',\n pill: 'rounded-full',\n};\n\nconst INPUT_SIZE: Record<string, string> = {\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-base',\n};\n\nconst INPUT_PAD: Record<string, string> = {\n sm: 'px-2.5',\n md: 'px-3',\n lg: 'px-3.5',\n};\n\nexport type InputProps = {\n label?: string;\n error?: string | boolean;\n hint?: string;\n leftAdornment?: ReactNode;\n rightAdornment?: ReactNode;\n size?: 'sm' | 'md' | 'lg';\n shape?: 'rounded' | 'pill';\n className?: string;\n inputClassName?: string;\n inputType?: InputHTMLAttributes<HTMLInputElement>['type'];\n} & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>;\n\nexport function Input({\n label,\n error,\n hint,\n leftAdornment,\n rightAdornment,\n size = 'md',\n shape = 'rounded',\n className,\n inputClassName,\n inputType = 'text',\n id: idProp,\n onFocus,\n onBlur,\n disabled,\n autoFocus,\n ...inputProps\n}: InputProps) {\n const autoId = useId();\n const id = idProp ?? autoId;\n const [focused, setFocused] = useState(false);\n const hasError = Boolean(error);\n const errorMessage = typeof error === 'string' ? error : null;\n const state = hasError ? 'error' : focused ? 'focused' : 'idle';\n const hasLeft = Boolean(leftAdornment);\n const hasRight = Boolean(rightAdornment);\n\n return (\n <div className={cn('flex flex-col gap-1.5', className)}>\n {label ? (\n <label htmlFor={id} className=\"px-1 font-medium text-(--color-foreground) text-sm\">\n {label}\n </label>\n ) : null}\n\n <div\n className={cn(\n 'relative flex flex-row items-center overflow-hidden border',\n FIELD_BORDER[state],\n FIELD_HEIGHT[size],\n FIELD_SHAPE[shape],\n disabled && 'opacity-60',\n )}\n >\n {hasLeft ? (\n <div className=\"pointer-events-none absolute top-0 bottom-0 left-3 z-10 flex items-center justify-center\">\n {leftAdornment}\n </div>\n ) : null}\n\n <input\n id={id}\n type={inputType}\n disabled={disabled}\n // biome-ignore lint/a11y/noAutofocus: forwarded HTML attribute — callers decide whether to autofocus\n autoFocus={autoFocus}\n onFocus={(event_) => {\n setFocused(true);\n onFocus?.(event_);\n }}\n onBlur={(event_) => {\n setFocused(false);\n onBlur?.(event_);\n }}\n className={cn(\n 'h-full min-w-0 flex-1 bg-transparent text-(--color-foreground) outline-none',\n INPUT_SIZE[size],\n hasLeft ? 'pl-10' : INPUT_PAD[size],\n hasRight ? 'pr-10' : INPUT_PAD[size],\n inputClassName,\n )}\n {...inputProps}\n />\n\n {hasRight ? (\n <div className=\"pointer-events-none absolute top-0 right-3 bottom-0 z-10 flex items-center justify-center\">\n {rightAdornment}\n </div>\n ) : null}\n </div>\n\n {errorMessage ? (\n <p role=\"alert\" className=\"px-1 text-(--color-destructive) text-xs\">\n {errorMessage}\n </p>\n ) : hint ? (\n <p className=\"px-1 text-(--color-muted-foreground) text-xs\">{hint}</p>\n ) : null}\n </div>\n );\n}\n"]}
package/dist/input.mjs ADDED
@@ -0,0 +1,4 @@
1
+ export { Input } from './chunk-W22G7XHR.mjs';
2
+ import './chunk-QAWSH567.mjs';
3
+ //# sourceMappingURL=input.mjs.map
4
+ //# sourceMappingURL=input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"input.mjs"}
@@ -0,0 +1,36 @@
1
+ /** Site breakpoints — `md` is 50rem here, not Tailwind's default 48rem. */
2
+ export declare const BREAKPOINTS: readonly [readonly ["xs", 30], readonly ["sm", 40], readonly ["md", 50], readonly ["lg", 64], readonly ["xl", 80], readonly ["2xl", 96]];
3
+ /** `'base'` is the implicit below-`xs` band — the widths no `min-width` query claims. */
4
+ export type Breakpoint = 'base' | (typeof BREAKPOINTS)[number][0];
5
+ /**
6
+ * The current breakpoint, read straight from `matchMedia`. Use this over
7
+ * `useBreakpoint` inside effects that need the *live* band: through the
8
+ * hydration pass the rendered value is still the server's `'base'`, which is a
9
+ * change away from the truth and will read as one.
10
+ */
11
+ export declare function getBreakpoint(): Breakpoint;
12
+ /**
13
+ * Call `listener` whenever the viewport crosses a breakpoint. Returns the
14
+ * unsubscribe.
15
+ *
16
+ * The imperative counterpart to `useBreakpoint`, for work that has to land in
17
+ * the *same frame* as the layout change. Media-query change events fire during
18
+ * the rendering steps, before `requestAnimationFrame` and before paint, so a
19
+ * listener that writes to the DOM here is painted with the new layout rather
20
+ * than one frame behind it. Going through React state instead costs a render
21
+ * round-trip — the scheduler runs the update in a later task, and the layout
22
+ * effect lands after the browser has already painted.
23
+ */
24
+ export declare function onBreakpointChange(listener: () => void): () => void;
25
+ /**
26
+ * The widest breakpoint the viewport currently satisfies, re-rendering only when
27
+ * it crosses from one band into another — not on every pixel of a resize.
28
+ *
29
+ * This is for work that has to be *redone* when the layout changes shape, like
30
+ * re-measuring something positioned against text that the gutters just moved. It
31
+ * is not for choosing what to render: the exported HTML has to be correct at
32
+ * every width before JS runs, so layout belongs in CSS breakpoints, and this
33
+ * returns `'base'` during SSR and the first client paint regardless of viewport.
34
+ */
35
+ export declare function useBreakpoint(): Breakpoint;
36
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1,36 @@
1
+ /** Site breakpoints — `md` is 50rem here, not Tailwind's default 48rem. */
2
+ export declare const BREAKPOINTS: readonly [readonly ["xs", 30], readonly ["sm", 40], readonly ["md", 50], readonly ["lg", 64], readonly ["xl", 80], readonly ["2xl", 96]];
3
+ /** `'base'` is the implicit below-`xs` band — the widths no `min-width` query claims. */
4
+ export type Breakpoint = 'base' | (typeof BREAKPOINTS)[number][0];
5
+ /**
6
+ * The current breakpoint, read straight from `matchMedia`. Use this over
7
+ * `useBreakpoint` inside effects that need the *live* band: through the
8
+ * hydration pass the rendered value is still the server's `'base'`, which is a
9
+ * change away from the truth and will read as one.
10
+ */
11
+ export declare function getBreakpoint(): Breakpoint;
12
+ /**
13
+ * Call `listener` whenever the viewport crosses a breakpoint. Returns the
14
+ * unsubscribe.
15
+ *
16
+ * The imperative counterpart to `useBreakpoint`, for work that has to land in
17
+ * the *same frame* as the layout change. Media-query change events fire during
18
+ * the rendering steps, before `requestAnimationFrame` and before paint, so a
19
+ * listener that writes to the DOM here is painted with the new layout rather
20
+ * than one frame behind it. Going through React state instead costs a render
21
+ * round-trip — the scheduler runs the update in a later task, and the layout
22
+ * effect lands after the browser has already painted.
23
+ */
24
+ export declare function onBreakpointChange(listener: () => void): () => void;
25
+ /**
26
+ * The widest breakpoint the viewport currently satisfies, re-rendering only when
27
+ * it crosses from one band into another — not on every pixel of a resize.
28
+ *
29
+ * This is for work that has to be *redone* when the layout changes shape, like
30
+ * re-measuring something positioned against text that the gutters just moved. It
31
+ * is not for choosing what to render: the exported HTML has to be correct at
32
+ * every width before JS runs, so layout belongs in CSS breakpoints, and this
33
+ * returns `'base'` during SSR and the first client paint regardless of viewport.
34
+ */
35
+ export declare function useBreakpoint(): Breakpoint;
36
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.d.ts","sourceRoot":"","sources":["../../src/lib/breakpoints.ts"],"names":[],"mappings":"AAEA,2EAA2E;AAC3E,eAAO,MAAM,WAAW,0IAOd,CAAC;AAEX,yFAAyF;AACzF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAM1C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAMnE;AAMD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAG1C"}
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // src/lib/breakpoints.ts
6
+ var BREAKPOINTS = [
7
+ ["xs", 30],
8
+ ["sm", 40],
9
+ ["md", 50],
10
+ ["lg", 64],
11
+ ["xl", 80],
12
+ ["2xl", 96]
13
+ ];
14
+ function getBreakpoint() {
15
+ let current = "base";
16
+ for (const [name, rem] of BREAKPOINTS) {
17
+ if (globalThis.matchMedia(`(min-width: ${rem}rem)`).matches) current = name;
18
+ }
19
+ return current;
20
+ }
21
+ function onBreakpointChange(listener) {
22
+ const queries = BREAKPOINTS.map(([, rem]) => globalThis.matchMedia(`(min-width: ${rem}rem)`));
23
+ for (const query of queries) query.addEventListener("change", listener);
24
+ return () => {
25
+ for (const query of queries) query.removeEventListener("change", listener);
26
+ };
27
+ }
28
+ function getBreakpointServer() {
29
+ return "base";
30
+ }
31
+ function useBreakpoint() {
32
+ const subscribe = react.useCallback(onBreakpointChange, []);
33
+ return react.useSyncExternalStore(subscribe, getBreakpoint, getBreakpointServer);
34
+ }
35
+
36
+ exports.BREAKPOINTS = BREAKPOINTS;
37
+ exports.getBreakpoint = getBreakpoint;
38
+ exports.onBreakpointChange = onBreakpointChange;
39
+ exports.useBreakpoint = useBreakpoint;
40
+ //# sourceMappingURL=breakpoints.js.map
41
+ //# sourceMappingURL=breakpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/breakpoints.ts"],"names":["useCallback","useSyncExternalStore"],"mappings":";;;;;AAGO,IAAM,WAAA,GAAc;AAAA,EACzB,CAAC,MAAM,EAAE,CAAA;AAAA,EACT,CAAC,MAAM,EAAE,CAAA;AAAA,EACT,CAAC,MAAM,EAAE,CAAA;AAAA,EACT,CAAC,MAAM,EAAE,CAAA;AAAA,EACT,CAAC,MAAM,EAAE,CAAA;AAAA,EACT,CAAC,OAAO,EAAE;AACZ;AAWO,SAAS,aAAA,GAA4B;AAC1C,EAAA,IAAI,OAAA,GAAsB,MAAA;AAC1B,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,GAAG,CAAA,IAAK,WAAA,EAAa;AACrC,IAAA,IAAI,WAAW,UAAA,CAAW,CAAA,YAAA,EAAe,GAAG,CAAA,IAAA,CAAM,CAAA,CAAE,SAAS,OAAA,GAAU,IAAA;AAAA,EACzE;AACA,EAAA,OAAO,OAAA;AACT;AAcO,SAAS,mBAAmB,QAAA,EAAkC;AACnE,EAAA,MAAM,OAAA,GAAU,WAAA,CAAY,GAAA,CAAI,CAAC,GAAG,GAAG,CAAA,KAAM,UAAA,CAAW,UAAA,CAAW,CAAA,YAAA,EAAe,GAAG,MAAM,CAAC,CAAA;AAC5F,EAAA,KAAA,MAAW,KAAA,IAAS,OAAA,EAAS,KAAA,CAAM,gBAAA,CAAiB,UAAU,QAAQ,CAAA;AACtE,EAAA,OAAO,MAAM;AACX,IAAA,KAAA,MAAW,KAAA,IAAS,OAAA,EAAS,KAAA,CAAM,mBAAA,CAAoB,UAAU,QAAQ,CAAA;AAAA,EAC3E,CAAA;AACF;AAEA,SAAS,mBAAA,GAAkC;AACzC,EAAA,OAAO,MAAA;AACT;AAYO,SAAS,aAAA,GAA4B;AAC1C,EAAA,MAAM,SAAA,GAAYA,iBAAA,CAAY,kBAAA,EAAoB,EAAE,CAAA;AACpD,EAAA,OAAOC,0BAAA,CAAqB,SAAA,EAAW,aAAA,EAAe,mBAAmB,CAAA;AAC3E","file":"breakpoints.js","sourcesContent":["import { useCallback, useSyncExternalStore } from 'react';\n\n/** Site breakpoints — `md` is 50rem here, not Tailwind's default 48rem. */\nexport const BREAKPOINTS = [\n ['xs', 30],\n ['sm', 40],\n ['md', 50],\n ['lg', 64],\n ['xl', 80],\n ['2xl', 96],\n] as const;\n\n/** `'base'` is the implicit below-`xs` band — the widths no `min-width` query claims. */\nexport type Breakpoint = 'base' | (typeof BREAKPOINTS)[number][0];\n\n/**\n * The current breakpoint, read straight from `matchMedia`. Use this over\n * `useBreakpoint` inside effects that need the *live* band: through the\n * hydration pass the rendered value is still the server's `'base'`, which is a\n * change away from the truth and will read as one.\n */\nexport function getBreakpoint(): Breakpoint {\n let current: Breakpoint = 'base';\n for (const [name, rem] of BREAKPOINTS) {\n if (globalThis.matchMedia(`(min-width: ${rem}rem)`).matches) current = name;\n }\n return current;\n}\n\n/**\n * Call `listener` whenever the viewport crosses a breakpoint. Returns the\n * unsubscribe.\n *\n * The imperative counterpart to `useBreakpoint`, for work that has to land in\n * the *same frame* as the layout change. Media-query change events fire during\n * the rendering steps, before `requestAnimationFrame` and before paint, so a\n * listener that writes to the DOM here is painted with the new layout rather\n * than one frame behind it. Going through React state instead costs a render\n * round-trip — the scheduler runs the update in a later task, and the layout\n * effect lands after the browser has already painted.\n */\nexport function onBreakpointChange(listener: () => void): () => void {\n const queries = BREAKPOINTS.map(([, rem]) => globalThis.matchMedia(`(min-width: ${rem}rem)`));\n for (const query of queries) query.addEventListener('change', listener);\n return () => {\n for (const query of queries) query.removeEventListener('change', listener);\n };\n}\n\nfunction getBreakpointServer(): Breakpoint {\n return 'base';\n}\n\n/**\n * The widest breakpoint the viewport currently satisfies, re-rendering only when\n * it crosses from one band into another — not on every pixel of a resize.\n *\n * This is for work that has to be *redone* when the layout changes shape, like\n * re-measuring something positioned against text that the gutters just moved. It\n * is not for choosing what to render: the exported HTML has to be correct at\n * every width before JS runs, so layout belongs in CSS breakpoints, and this\n * returns `'base'` during SSR and the first client paint regardless of viewport.\n */\nexport function useBreakpoint(): Breakpoint {\n const subscribe = useCallback(onBreakpointChange, []);\n return useSyncExternalStore(subscribe, getBreakpoint, getBreakpointServer);\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { BREAKPOINTS, getBreakpoint, onBreakpointChange, useBreakpoint } from '../chunk-IHLGCS63.mjs';
2
+ //# sourceMappingURL=breakpoints.mjs.map
3
+ //# sourceMappingURL=breakpoints.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"breakpoints.mjs"}
package/dist/lib/cn.js ADDED
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var clsx = require('clsx');
4
+ var tailwindMerge = require('tailwind-merge');
5
+
6
+ // src/lib/utils.ts
7
+ function cn(...inputs) {
8
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
9
+ }
10
+ function validCssVars(style) {
11
+ return style;
12
+ }
13
+ function hasKey(key, obj) {
14
+ return obj !== null && typeof obj === "object" && Object.hasOwn(obj, key);
15
+ }
16
+ function noop() {
17
+ }
18
+
19
+ exports.cn = cn;
20
+ exports.hasKey = hasKey;
21
+ exports.noop = noop;
22
+ exports.validCssVars = validCssVars;
23
+ //# sourceMappingURL=cn.js.map
24
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts"],"names":["twMerge","clsx"],"mappings":";;;;;;AAIO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;AAiBO,SAAS,aAAa,KAAA,EAA6C;AACxE,EAAA,OAAO,KAAA;AACT;AAMO,SAAS,MAAA,CAA8B,KAAQ,GAAA,EAAyC;AAC7F,EAAA,OAAO,GAAA,KAAQ,QAAQ,OAAO,GAAA,KAAQ,YAAY,MAAA,CAAO,MAAA,CAAO,KAAK,GAAG,CAAA;AAC1E;AAEO,SAAS,IAAA,GAAa;AAE7B","file":"cn.js","sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport type { CSSProperties } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * A style object that may carry CSS custom properties (CSS variables)\n * such as `--duration`. React's `CSSProperties` intentionally drops\n * its index signature, so custom properties are not accepted without help.\n */\nexport type CSSPropertiesWithVars = CSSProperties & Record<`--${string}`, string | number>;\n\n/**\n * Builds a {@link CSSProperties} value that also allows CSS custom properties,\n * so `style` props can be written without an `as React.CSSProperties` cast while\n * still type-checking both the known style keys and the custom-property values.\n *\n * @example\n * <div style={validCssVars({ '--duration': '0.35s', color: 'red' })} />\n */\nexport function validCssVars(style: CSSPropertiesWithVars): CSSProperties {\n return style;\n}\n\n/**\n * Narrows a union to the member(s) that declare `key` — a type-guard\n * replacement for the `in` operator's discriminated-union narrowing.\n */\nexport function hasKey<K extends PropertyKey>(key: K, obj: unknown): obj is Record<K, unknown> {\n return obj !== null && typeof obj === 'object' && Object.hasOwn(obj, key);\n}\n\nexport function noop(): void {\n // intentional no-op\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { cn, hasKey, noop, validCssVars } from '../chunk-QAWSH567.mjs';
2
+ //# sourceMappingURL=cn.mjs.map
3
+ //# sourceMappingURL=cn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"cn.mjs"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Easing curves shared across landing-ui components.
3
+ */
4
+ /** Smooth deceleration — matches the former CSS `ease-out-expo`. */
5
+ export declare const easeOut: readonly [0.22, 1, 0.36, 1];
6
+ /** Gentle overshoot — bounce-like settle for spring alternatives. */
7
+ export declare const easeOutBack: readonly [0.34, 1.56, 0.64, 1];
8
+ /** Strong ease-out — the default `ease-out` reads weak at these durations. */
9
+ export declare const EASE_OUT: readonly [0.16, 1, 0.3, 1];
10
+ /** CSS string form of {@link EASE_OUT} for inline style transitions. */
11
+ export declare const EASE_OUT_CSS = "cubic-bezier(0.16, 1, 0.3, 1)";
12
+ /** Content swaps — label/icon slots trading places inside a control. */
13
+ export declare const SPRING_SWAP: {
14
+ readonly type: "spring";
15
+ readonly stiffness: 460;
16
+ readonly damping: 30;
17
+ readonly mass: 0.55;
18
+ };
19
+ //# sourceMappingURL=ease.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Easing curves shared across landing-ui components.
3
+ */
4
+ /** Smooth deceleration — matches the former CSS `ease-out-expo`. */
5
+ export declare const easeOut: readonly [0.22, 1, 0.36, 1];
6
+ /** Gentle overshoot — bounce-like settle for spring alternatives. */
7
+ export declare const easeOutBack: readonly [0.34, 1.56, 0.64, 1];
8
+ /** Strong ease-out — the default `ease-out` reads weak at these durations. */
9
+ export declare const EASE_OUT: readonly [0.16, 1, 0.3, 1];
10
+ /** CSS string form of {@link EASE_OUT} for inline style transitions. */
11
+ export declare const EASE_OUT_CSS = "cubic-bezier(0.16, 1, 0.3, 1)";
12
+ /** Content swaps — label/icon slots trading places inside a control. */
13
+ export declare const SPRING_SWAP: {
14
+ readonly type: "spring";
15
+ readonly stiffness: 460;
16
+ readonly damping: 30;
17
+ readonly mass: 0.55;
18
+ };
19
+ //# sourceMappingURL=ease.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ease.d.ts","sourceRoot":"","sources":["../../src/lib/ease.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,oEAAoE;AACpE,eAAO,MAAM,OAAO,6BAA8B,CAAC;AAEnD,qEAAqE;AACrE,eAAO,MAAM,WAAW,gCAAiC,CAAC;AAM1D,8EAA8E;AAC9E,eAAO,MAAM,QAAQ,4BAA6B,CAAC;AAEnD,wEAAwE;AACxE,eAAO,MAAM,YAAY,kCAAkC,CAAC;AAE5D,wEAAwE;AACxE,eAAO,MAAM,WAAW;;;;;CAAuE,CAAC"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ // src/lib/ease.ts
4
+ var easeOut = [0.22, 1, 0.36, 1];
5
+ var easeOutBack = [0.34, 1.56, 0.64, 1];
6
+ var EASE_OUT = [0.16, 1, 0.3, 1];
7
+ var EASE_OUT_CSS = "cubic-bezier(0.16, 1, 0.3, 1)";
8
+ var SPRING_SWAP = { type: "spring", stiffness: 460, damping: 30, mass: 0.55 };
9
+
10
+ exports.EASE_OUT = EASE_OUT;
11
+ exports.EASE_OUT_CSS = EASE_OUT_CSS;
12
+ exports.SPRING_SWAP = SPRING_SWAP;
13
+ exports.easeOut = easeOut;
14
+ exports.easeOutBack = easeOutBack;
15
+ //# sourceMappingURL=ease.js.map
16
+ //# sourceMappingURL=ease.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/ease.ts"],"names":[],"mappings":";;;AAKO,IAAM,OAAA,GAAU,CAAC,IAAA,EAAM,CAAA,EAAG,MAAM,CAAC;AAGjC,IAAM,WAAA,GAAc,CAAC,IAAA,EAAM,IAAA,EAAM,MAAM,CAAC;AAOxC,IAAM,QAAA,GAAW,CAAC,IAAA,EAAM,CAAA,EAAG,KAAK,CAAC;AAGjC,IAAM,YAAA,GAAe;AAGrB,IAAM,WAAA,GAAc,EAAE,IAAA,EAAM,QAAA,EAAU,WAAW,GAAA,EAAK,OAAA,EAAS,EAAA,EAAI,IAAA,EAAM,IAAA","file":"ease.js","sourcesContent":["/**\n * Easing curves shared across landing-ui components.\n */\n\n/** Smooth deceleration — matches the former CSS `ease-out-expo`. */\nexport const easeOut = [0.22, 1, 0.36, 1] as const;\n\n/** Gentle overshoot — bounce-like settle for spring alternatives. */\nexport const easeOutBack = [0.34, 1.56, 0.64, 1] as const;\n\n// ── Content-swap tokens (action-swap) ─────────────────────────────────────\n// Values mirror beui.dev's `lib/ease.ts` so vendored action-swap primitives\n// keep their upstream timing.\n\n/** Strong ease-out — the default `ease-out` reads weak at these durations. */\nexport const EASE_OUT = [0.16, 1, 0.3, 1] as const;\n\n/** CSS string form of {@link EASE_OUT} for inline style transitions. */\nexport const EASE_OUT_CSS = 'cubic-bezier(0.16, 1, 0.3, 1)';\n\n/** Content swaps — label/icon slots trading places inside a control. */\nexport const SPRING_SWAP = { type: 'spring', stiffness: 460, damping: 30, mass: 0.55 } as const;\n"]}
@@ -0,0 +1,3 @@
1
+ export { EASE_OUT, EASE_OUT_CSS, SPRING_SWAP, easeOut, easeOutBack } from '../chunk-NNHPQ67J.mjs';
2
+ //# sourceMappingURL=ease.mjs.map
3
+ //# sourceMappingURL=ease.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"ease.mjs"}
@@ -0,0 +1,14 @@
1
+ export type SurfaceLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
2
+ /**
3
+ * Elevation for a free-floating surface: background, elevation variable, and the drop shadow with
4
+ * its rim inset painted in the same `box-shadow` — which leaves `::after` free for other purposes.
5
+ *
6
+ * Suits containers with no opaque children near their edges. A child painted over the rim (a sticky
7
+ * label, a pinned input, a dialog header) covers it, since nothing re-paints the rim above the
8
+ * children.
9
+ *
10
+ * When `level !== shadowLevel` the rim color tracks `shadowLevel` — the two cannot be controlled
11
+ * independently.
12
+ */
13
+ export declare function solidSurface(level: SurfaceLevel, shadowLevel?: SurfaceLevel): string;
14
+ //# sourceMappingURL=surface.d.ts.map
@@ -0,0 +1,14 @@
1
+ export type SurfaceLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
2
+ /**
3
+ * Elevation for a free-floating surface: background, elevation variable, and the drop shadow with
4
+ * its rim inset painted in the same `box-shadow` — which leaves `::after` free for other purposes.
5
+ *
6
+ * Suits containers with no opaque children near their edges. A child painted over the rim (a sticky
7
+ * label, a pinned input, a dialog header) covers it, since nothing re-paints the rim above the
8
+ * children.
9
+ *
10
+ * When `level !== shadowLevel` the rim color tracks `shadowLevel` — the two cannot be controlled
11
+ * independently.
12
+ */
13
+ export declare function solidSurface(level: SurfaceLevel, shadowLevel?: SurfaceLevel): string;
14
+ //# sourceMappingURL=surface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../src/lib/surface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAuCzD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,GAAE,YAAoB,GAAG,MAAM,CAE3F"}
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ // src/lib/surface.ts
4
+ var SURFACE_BG = {
5
+ 1: "bg-surface-1",
6
+ 2: "bg-surface-2",
7
+ 3: "bg-surface-3",
8
+ 4: "bg-surface-4",
9
+ 5: "bg-surface-5",
10
+ 6: "bg-surface-6",
11
+ 7: "bg-surface-7",
12
+ 8: "bg-surface-8"
13
+ };
14
+ var SURFACE_VAR = {
15
+ 1: "[--popup-surface:var(--surface-1)]",
16
+ 2: "[--popup-surface:var(--surface-2)]",
17
+ 3: "[--popup-surface:var(--surface-3)]",
18
+ 4: "[--popup-surface:var(--surface-4)]",
19
+ 5: "[--popup-surface:var(--surface-5)]",
20
+ 6: "[--popup-surface:var(--surface-6)]",
21
+ 7: "[--popup-surface:var(--surface-7)]",
22
+ 8: "[--popup-surface:var(--surface-8)]"
23
+ };
24
+ var SURFACE_SHADOW_COMBINED = {
25
+ 1: "shadow-elevated-1",
26
+ 2: "shadow-elevated-2",
27
+ 3: "shadow-elevated-3",
28
+ 4: "shadow-elevated-4",
29
+ 5: "shadow-elevated-5",
30
+ 6: "shadow-elevated-6",
31
+ 7: "shadow-elevated-7",
32
+ 8: "shadow-elevated-8"
33
+ };
34
+ function solidSurface(level, shadowLevel = level) {
35
+ return `${SURFACE_BG[level]} ${SURFACE_SHADOW_COMBINED[shadowLevel]} ${SURFACE_VAR[level]}`;
36
+ }
37
+
38
+ exports.solidSurface = solidSurface;
39
+ //# sourceMappingURL=surface.js.map
40
+ //# sourceMappingURL=surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/surface.ts"],"names":[],"mappings":";;;AAEA,IAAM,UAAA,GAA2C;AAAA,EAC/C,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG,cAAA;AAAA,EACH,CAAA,EAAG;AACL,CAAA;AAEA,IAAM,WAAA,GAA4C;AAAA,EAChD,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG,oCAAA;AAAA,EACH,CAAA,EAAG;AACL,CAAA;AAMA,IAAM,uBAAA,GAAwD;AAAA,EAC5D,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG,mBAAA;AAAA,EACH,CAAA,EAAG;AACL,CAAA;AAaO,SAAS,YAAA,CAAa,KAAA,EAAqB,WAAA,GAA4B,KAAA,EAAe;AAC3F,EAAA,OAAO,CAAA,EAAG,UAAA,CAAW,KAAK,CAAC,CAAA,CAAA,EAAI,uBAAA,CAAwB,WAAW,CAAC,CAAA,CAAA,EAAI,WAAA,CAAY,KAAK,CAAC,CAAA,CAAA;AAC3F","file":"surface.js","sourcesContent":["export type SurfaceLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n\nconst SURFACE_BG: Record<SurfaceLevel, string> = {\n 1: 'bg-surface-1',\n 2: 'bg-surface-2',\n 3: 'bg-surface-3',\n 4: 'bg-surface-4',\n 5: 'bg-surface-5',\n 6: 'bg-surface-6',\n 7: 'bg-surface-7',\n 8: 'bg-surface-8',\n};\n\nconst SURFACE_VAR: Record<SurfaceLevel, string> = {\n 1: '[--popup-surface:var(--surface-1)]',\n 2: '[--popup-surface:var(--surface-2)]',\n 3: '[--popup-surface:var(--surface-3)]',\n 4: '[--popup-surface:var(--surface-4)]',\n 5: '[--popup-surface:var(--surface-5)]',\n 6: '[--popup-surface:var(--surface-6)]',\n 7: '[--popup-surface:var(--surface-7)]',\n 8: '[--popup-surface:var(--surface-8)]',\n};\n\n/**\n * Drops + rim insets in a single `box-shadow` (no `::after`). Used by `solidSurface()`.\n * Literal Tailwind classes so the scanner picks them up.\n */\nconst SURFACE_SHADOW_COMBINED: Record<SurfaceLevel, string> = {\n 1: 'shadow-elevated-1',\n 2: 'shadow-elevated-2',\n 3: 'shadow-elevated-3',\n 4: 'shadow-elevated-4',\n 5: 'shadow-elevated-5',\n 6: 'shadow-elevated-6',\n 7: 'shadow-elevated-7',\n 8: 'shadow-elevated-8',\n};\n\n/**\n * Elevation for a free-floating surface: background, elevation variable, and the drop shadow with\n * its rim inset painted in the same `box-shadow` — which leaves `::after` free for other purposes.\n *\n * Suits containers with no opaque children near their edges. A child painted over the rim (a sticky\n * label, a pinned input, a dialog header) covers it, since nothing re-paints the rim above the\n * children.\n *\n * When `level !== shadowLevel` the rim color tracks `shadowLevel` — the two cannot be controlled\n * independently.\n */\nexport function solidSurface(level: SurfaceLevel, shadowLevel: SurfaceLevel = level): string {\n return `${SURFACE_BG[level]} ${SURFACE_SHADOW_COMBINED[shadowLevel]} ${SURFACE_VAR[level]}`;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { solidSurface } from '../chunk-XZEDZVXT.mjs';
2
+ //# sourceMappingURL=surface.mjs.map
3
+ //# sourceMappingURL=surface.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"surface.mjs"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tracks a CSS media query, returning `true` when it matches.
3
+ *
4
+ * The default return before hydration is `false`; pass `defaultState`
5
+ * to set a different initial value (e.g. `true` for dark-mode queries
6
+ * whose SSR default is dark).
7
+ */
8
+ export declare function useMediaQuery(query: string, defaultState?: boolean): boolean;
9
+ //# sourceMappingURL=use-media-query.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tracks a CSS media query, returning `true` when it matches.
3
+ *
4
+ * The default return before hydration is `false`; pass `defaultState`
5
+ * to set a different initial value (e.g. `true` for dark-mode queries
6
+ * whose SSR default is dark).
7
+ */
8
+ export declare function useMediaQuery(query: string, defaultState?: boolean): boolean;
9
+ //# sourceMappingURL=use-media-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-media-query.d.ts","sourceRoot":"","sources":["../../src/lib/use-media-query.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO,CAc1E"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ function useMediaQuery(query, defaultState = false) {
6
+ const [matches, setMatches] = react.useState(defaultState);
7
+ react.useEffect(() => {
8
+ const mql = globalThis.matchMedia(query);
9
+ setMatches(mql.matches);
10
+ const onChange = (e) => setMatches(e.matches);
11
+ mql.addEventListener("change", onChange);
12
+ return () => mql.removeEventListener("change", onChange);
13
+ }, [query]);
14
+ return matches;
15
+ }
16
+
17
+ exports.useMediaQuery = useMediaQuery;
18
+ //# sourceMappingURL=use-media-query.js.map
19
+ //# sourceMappingURL=use-media-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/use-media-query.ts"],"names":["useState","useEffect"],"mappings":";;;;AAWO,SAAS,aAAA,CAAc,KAAA,EAAe,YAAA,GAAe,KAAA,EAAgB;AAC1E,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAIA,eAAS,YAAY,CAAA;AAGnD,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,MAAM,GAAA,GAAM,UAAA,CAAW,UAAA,CAAW,KAAK,CAAA;AACvC,IAAA,UAAA,CAAW,IAAI,OAAO,CAAA;AAEtB,IAAA,MAAM,QAAA,GAAW,CAAC,CAAA,KAA2B,UAAA,CAAW,EAAE,OAAO,CAAA;AACjE,IAAA,GAAA,CAAI,gBAAA,CAAiB,UAAU,QAAQ,CAAA;AACvC,IAAA,OAAO,MAAM,GAAA,CAAI,mBAAA,CAAoB,QAAA,EAAU,QAAQ,CAAA;AAAA,EACzD,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AAEV,EAAA,OAAO,OAAA;AACT","file":"use-media-query.js","sourcesContent":["'use client';\n\nimport { useEffect, useState } from 'react';\n\n/**\n * Tracks a CSS media query, returning `true` when it matches.\n *\n * The default return before hydration is `false`; pass `defaultState`\n * to set a different initial value (e.g. `true` for dark-mode queries\n * whose SSR default is dark).\n */\nexport function useMediaQuery(query: string, defaultState = false): boolean {\n const [matches, setMatches] = useState(defaultState);\n\n // biome-ignore lint/plugin: subscribes to a matchMedia listener — an imperative side effect with no derived-state equivalent.\n useEffect(() => {\n const mql = globalThis.matchMedia(query);\n setMatches(mql.matches);\n\n const onChange = (e: MediaQueryListEvent) => setMatches(e.matches);\n mql.addEventListener('change', onChange);\n return () => mql.removeEventListener('change', onChange);\n }, [query]);\n\n return matches;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { useMediaQuery } from '../chunk-EYHT2EWJ.mjs';
2
+ //# sourceMappingURL=use-media-query.mjs.map
3
+ //# sourceMappingURL=use-media-query.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"use-media-query.mjs"}