@ttt-productions/ui-core 0.11.33 → 0.11.35

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 (238) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/index.d.ts +2 -2
  3. package/dist/browser/index.d.ts.map +1 -1
  4. package/dist/browser/index.js +1 -2
  5. package/dist/browser/index.js.map +1 -1
  6. package/dist/browser/reload-recovery-watch.d.ts +2 -6
  7. package/dist/browser/reload-recovery-watch.d.ts.map +1 -1
  8. package/dist/browser/reload-recovery-watch.js +5 -10
  9. package/dist/browser/reload-recovery-watch.js.map +1 -1
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +3 -4
  13. package/dist/index.js.map +1 -1
  14. package/dist/lib/format-numbers.d.ts +0 -6
  15. package/dist/lib/format-numbers.d.ts.map +1 -1
  16. package/dist/lib/format-numbers.js +2 -8
  17. package/dist/lib/format-numbers.js.map +1 -1
  18. package/dist/lib/reload-recovery.d.ts +1 -9
  19. package/dist/lib/reload-recovery.d.ts.map +1 -1
  20. package/dist/lib/reload-recovery.js +14 -24
  21. package/dist/lib/reload-recovery.js.map +1 -1
  22. package/dist/lib/utils.d.ts +0 -3
  23. package/dist/lib/utils.d.ts.map +1 -1
  24. package/dist/lib/utils.js +0 -3
  25. package/dist/lib/utils.js.map +1 -1
  26. package/dist/react/components/accordion.d.ts +2 -2
  27. package/dist/react/components/accordion.d.ts.map +1 -1
  28. package/dist/react/components/accordion.js +8 -8
  29. package/dist/react/components/accordion.js.map +1 -1
  30. package/dist/react/components/action-row.d.ts +2 -9
  31. package/dist/react/components/action-row.d.ts.map +1 -1
  32. package/dist/react/components/action-row.js +7 -11
  33. package/dist/react/components/action-row.js.map +1 -1
  34. package/dist/react/components/alert-dialog.d.ts +2 -2
  35. package/dist/react/components/alert-dialog.d.ts.map +1 -1
  36. package/dist/react/components/alert-dialog.js +15 -15
  37. package/dist/react/components/alert-dialog.js.map +1 -1
  38. package/dist/react/components/alert.d.ts +2 -2
  39. package/dist/react/components/alert.d.ts.map +1 -1
  40. package/dist/react/components/alert.js +12 -12
  41. package/dist/react/components/alert.js.map +1 -1
  42. package/dist/react/components/avatar.d.ts +2 -2
  43. package/dist/react/components/avatar.d.ts.map +1 -1
  44. package/dist/react/components/avatar.js +7 -7
  45. package/dist/react/components/avatar.js.map +1 -1
  46. package/dist/react/components/badge.d.ts +2 -2
  47. package/dist/react/components/badge.d.ts.map +1 -1
  48. package/dist/react/components/badge.js +9 -9
  49. package/dist/react/components/badge.js.map +1 -1
  50. package/dist/react/components/button.d.ts +2 -12
  51. package/dist/react/components/button.d.ts.map +1 -1
  52. package/dist/react/components/button.js +30 -35
  53. package/dist/react/components/button.js.map +1 -1
  54. package/dist/react/components/card.d.ts +1 -1
  55. package/dist/react/components/card.d.ts.map +1 -1
  56. package/dist/react/components/card.js +15 -15
  57. package/dist/react/components/card.js.map +1 -1
  58. package/dist/react/components/checkbox.d.ts +2 -2
  59. package/dist/react/components/checkbox.d.ts.map +1 -1
  60. package/dist/react/components/checkbox.js +6 -6
  61. package/dist/react/components/checkbox.js.map +1 -1
  62. package/dist/react/components/collapsible.d.ts +1 -1
  63. package/dist/react/components/collapsible.d.ts.map +1 -1
  64. package/dist/react/components/collapsible.js +2 -2
  65. package/dist/react/components/collapsible.js.map +1 -1
  66. package/dist/react/components/consequence-dialog.d.ts +1 -48
  67. package/dist/react/components/consequence-dialog.d.ts.map +1 -1
  68. package/dist/react/components/consequence-dialog.js +7 -23
  69. package/dist/react/components/consequence-dialog.js.map +1 -1
  70. package/dist/react/components/date-picker.d.ts +1 -18
  71. package/dist/react/components/date-picker.d.ts.map +1 -1
  72. package/dist/react/components/date-picker.js +102 -98
  73. package/dist/react/components/date-picker.js.map +1 -1
  74. package/dist/react/components/date-time-picker.d.ts +1 -24
  75. package/dist/react/components/date-time-picker.d.ts.map +1 -1
  76. package/dist/react/components/date-time-picker.js +20 -37
  77. package/dist/react/components/date-time-picker.js.map +1 -1
  78. package/dist/react/components/dialog.d.ts +2 -2
  79. package/dist/react/components/dialog.d.ts.map +1 -1
  80. package/dist/react/components/dialog.js +14 -14
  81. package/dist/react/components/dialog.js.map +1 -1
  82. package/dist/react/components/dropdown-menu.d.ts +2 -10
  83. package/dist/react/components/dropdown-menu.d.ts.map +1 -1
  84. package/dist/react/components/dropdown-menu.js +24 -20
  85. package/dist/react/components/dropdown-menu.js.map +1 -1
  86. package/dist/react/components/end-of-list-indicator.d.ts +1 -1
  87. package/dist/react/components/end-of-list-indicator.js +3 -3
  88. package/dist/react/components/end-of-list-indicator.js.map +1 -1
  89. package/dist/react/components/form.d.ts +3 -3
  90. package/dist/react/components/form.d.ts.map +1 -1
  91. package/dist/react/components/form.js +17 -17
  92. package/dist/react/components/form.js.map +1 -1
  93. package/dist/react/components/format-control.d.ts +7 -20
  94. package/dist/react/components/format-control.d.ts.map +1 -1
  95. package/dist/react/components/format-control.js +18 -22
  96. package/dist/react/components/format-control.js.map +1 -1
  97. package/dist/react/components/input.d.ts +10 -27
  98. package/dist/react/components/input.d.ts.map +1 -1
  99. package/dist/react/components/input.js +11 -9
  100. package/dist/react/components/input.js.map +1 -1
  101. package/dist/react/components/label.d.ts +3 -3
  102. package/dist/react/components/label.d.ts.map +1 -1
  103. package/dist/react/components/label.js +6 -6
  104. package/dist/react/components/label.js.map +1 -1
  105. package/dist/react/components/layout/screen-adaptive-view.d.ts +2 -9
  106. package/dist/react/components/layout/screen-adaptive-view.d.ts.map +1 -1
  107. package/dist/react/components/layout/screen-adaptive-view.js +40 -37
  108. package/dist/react/components/layout/screen-adaptive-view.js.map +1 -1
  109. package/dist/react/components/list-pagination.d.ts +1 -31
  110. package/dist/react/components/list-pagination.d.ts.map +1 -1
  111. package/dist/react/components/list-pagination.js +10 -37
  112. package/dist/react/components/list-pagination.js.map +1 -1
  113. package/dist/react/components/menubar.d.ts +2 -2
  114. package/dist/react/components/menubar.d.ts.map +1 -1
  115. package/dist/react/components/menubar.js +17 -17
  116. package/dist/react/components/menubar.js.map +1 -1
  117. package/dist/react/components/opener-focus.d.ts +2 -8
  118. package/dist/react/components/opener-focus.d.ts.map +1 -1
  119. package/dist/react/components/opener-focus.js +4 -10
  120. package/dist/react/components/opener-focus.js.map +1 -1
  121. package/dist/react/components/pending-guard.d.ts +1 -7
  122. package/dist/react/components/pending-guard.d.ts.map +1 -1
  123. package/dist/react/components/pending-guard.js +1 -7
  124. package/dist/react/components/pending-guard.js.map +1 -1
  125. package/dist/react/components/popover.d.ts +2 -2
  126. package/dist/react/components/popover.d.ts.map +1 -1
  127. package/dist/react/components/popover.js +5 -5
  128. package/dist/react/components/popover.js.map +1 -1
  129. package/dist/react/components/progress.d.ts +2 -2
  130. package/dist/react/components/progress.d.ts.map +1 -1
  131. package/dist/react/components/progress.js +5 -5
  132. package/dist/react/components/progress.js.map +1 -1
  133. package/dist/react/components/radio-group.d.ts +2 -2
  134. package/dist/react/components/radio-group.d.ts.map +1 -1
  135. package/dist/react/components/radio-group.js +7 -7
  136. package/dist/react/components/radio-group.js.map +1 -1
  137. package/dist/react/components/relative-time.d.ts +1 -9
  138. package/dist/react/components/relative-time.d.ts.map +1 -1
  139. package/dist/react/components/relative-time.js +8 -11
  140. package/dist/react/components/relative-time.js.map +1 -1
  141. package/dist/react/components/reload-recovery-notice.d.ts +3 -17
  142. package/dist/react/components/reload-recovery-notice.d.ts.map +1 -1
  143. package/dist/react/components/reload-recovery-notice.js +7 -12
  144. package/dist/react/components/reload-recovery-notice.js.map +1 -1
  145. package/dist/react/components/scroll-area.d.ts +2 -2
  146. package/dist/react/components/scroll-area.d.ts.map +1 -1
  147. package/dist/react/components/scroll-area.js +6 -8
  148. package/dist/react/components/scroll-area.js.map +1 -1
  149. package/dist/react/components/scroll-to-top-button.d.ts +6 -30
  150. package/dist/react/components/scroll-to-top-button.d.ts.map +1 -1
  151. package/dist/react/components/scroll-to-top-button.js +9 -9
  152. package/dist/react/components/scroll-to-top-button.js.map +1 -1
  153. package/dist/react/components/search-dropdown.d.ts +0 -53
  154. package/dist/react/components/search-dropdown.d.ts.map +1 -1
  155. package/dist/react/components/search-dropdown.js +10 -39
  156. package/dist/react/components/search-dropdown.js.map +1 -1
  157. package/dist/react/components/select.d.ts +2 -9
  158. package/dist/react/components/select.d.ts.map +1 -1
  159. package/dist/react/components/select.js +19 -21
  160. package/dist/react/components/select.js.map +1 -1
  161. package/dist/react/components/separator.d.ts +2 -2
  162. package/dist/react/components/separator.d.ts.map +1 -1
  163. package/dist/react/components/separator.js +5 -5
  164. package/dist/react/components/separator.js.map +1 -1
  165. package/dist/react/components/sheet.d.ts +3 -3
  166. package/dist/react/components/sheet.d.ts.map +1 -1
  167. package/dist/react/components/sheet.js +21 -21
  168. package/dist/react/components/sheet.js.map +1 -1
  169. package/dist/react/components/show-more-toggle.d.ts +2 -18
  170. package/dist/react/components/show-more-toggle.d.ts.map +1 -1
  171. package/dist/react/components/show-more-toggle.js +6 -11
  172. package/dist/react/components/show-more-toggle.js.map +1 -1
  173. package/dist/react/components/skeleton.d.ts +1 -1
  174. package/dist/react/components/skeleton.d.ts.map +1 -1
  175. package/dist/react/components/skeleton.js +3 -3
  176. package/dist/react/components/skeleton.js.map +1 -1
  177. package/dist/react/components/slider.d.ts +2 -2
  178. package/dist/react/components/slider.d.ts.map +1 -1
  179. package/dist/react/components/slider.js +5 -5
  180. package/dist/react/components/slider.js.map +1 -1
  181. package/dist/react/components/spinner.d.ts +1 -15
  182. package/dist/react/components/spinner.d.ts.map +1 -1
  183. package/dist/react/components/spinner.js +10 -18
  184. package/dist/react/components/spinner.js.map +1 -1
  185. package/dist/react/components/switch.d.ts +2 -9
  186. package/dist/react/components/switch.d.ts.map +1 -1
  187. package/dist/react/components/switch.js +13 -10
  188. package/dist/react/components/switch.js.map +1 -1
  189. package/dist/react/components/table.d.ts +2 -12
  190. package/dist/react/components/table.d.ts.map +1 -1
  191. package/dist/react/components/table.js +24 -30
  192. package/dist/react/components/table.js.map +1 -1
  193. package/dist/react/components/tabs.d.ts +2 -2
  194. package/dist/react/components/tabs.d.ts.map +1 -1
  195. package/dist/react/components/tabs.js +7 -7
  196. package/dist/react/components/tabs.js.map +1 -1
  197. package/dist/react/components/textarea.d.ts +5 -16
  198. package/dist/react/components/textarea.d.ts.map +1 -1
  199. package/dist/react/components/textarea.js +11 -9
  200. package/dist/react/components/textarea.js.map +1 -1
  201. package/dist/react/components/toast.d.ts +4 -8
  202. package/dist/react/components/toast.d.ts.map +1 -1
  203. package/dist/react/components/toast.js +26 -47
  204. package/dist/react/components/toast.js.map +1 -1
  205. package/dist/react/components/toaster.d.ts.map +1 -1
  206. package/dist/react/components/toaster.js +5 -5
  207. package/dist/react/components/toaster.js.map +1 -1
  208. package/dist/react/components/tooltip.d.ts +2 -2
  209. package/dist/react/components/tooltip.d.ts.map +1 -1
  210. package/dist/react/components/tooltip.js +5 -5
  211. package/dist/react/components/tooltip.js.map +1 -1
  212. package/dist/react/hooks/use-async-action.d.ts +1 -21
  213. package/dist/react/hooks/use-async-action.d.ts.map +1 -1
  214. package/dist/react/hooks/use-async-action.js +3 -11
  215. package/dist/react/hooks/use-async-action.js.map +1 -1
  216. package/dist/react/hooks/use-cursor-page.d.ts +1 -63
  217. package/dist/react/hooks/use-cursor-page.d.ts.map +1 -1
  218. package/dist/react/hooks/use-cursor-page.js +3 -39
  219. package/dist/react/hooks/use-cursor-page.js.map +1 -1
  220. package/dist/react/hooks/use-media-query.js +5 -5
  221. package/dist/react/hooks/use-media-query.js.map +1 -1
  222. package/dist/react/hooks/use-paged-list.d.ts +0 -43
  223. package/dist/react/hooks/use-paged-list.d.ts.map +1 -1
  224. package/dist/react/hooks/use-paged-list.js +2 -17
  225. package/dist/react/hooks/use-paged-list.js.map +1 -1
  226. package/dist/react/hooks/use-return-scroll.d.ts +1 -10
  227. package/dist/react/hooks/use-return-scroll.d.ts.map +1 -1
  228. package/dist/react/hooks/use-return-scroll.js +13 -45
  229. package/dist/react/hooks/use-return-scroll.js.map +1 -1
  230. package/dist/react/hooks/use-toast.d.ts +3 -11
  231. package/dist/react/hooks/use-toast.d.ts.map +1 -1
  232. package/dist/react/hooks/use-toast.js +18 -21
  233. package/dist/react/hooks/use-toast.js.map +1 -1
  234. package/dist/react/index.d.ts +74 -74
  235. package/dist/react/index.d.ts.map +1 -1
  236. package/dist/react/index.js +51 -57
  237. package/dist/react/index.js.map +1 -1
  238. package/package.json +8 -6
@@ -1 +1 @@
1
- {"version":3,"file":"screen-adaptive-view.js","sourceRoot":"","sources":["../../../../src/react/components/layout/screen-adaptive-view.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAuC/D,SAAS,UAAU,CAAC,GAA+B;IACjD,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,MAAM;YACT,OAAO,mBAAmB,CAAC;QAC7B,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,KAAK,IAAI;YACP,OAAO,iBAAiB,CAAC;QAC3B,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC;QAC5B,KAAK,KAAK;YACR,OAAO,kBAAkB,CAAC;QAC5B,KAAK,MAAM;YACT,OAAO,mBAAmB,CAAC;QAC7B;YACE,OAAO,kBAAkB,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,cAAc,GACU;IACxB,MAAM,IAAI,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAElD,kEAAkE;IAClE,uDAAuD;IACvD,MAAM,aAAa,GACjB,CAAC,IAAI,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC;QACrD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,CAAC,IAAI,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,CAAC;YACvD,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,CAAC;IAEjB,MAAM,SAAS,GACb,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAEtF,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,YACnD,cAAK,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,EAAE,cAAc,CAAC,YACnE,aAAa,GACV,GACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../../../lib/utils.js\";\nimport { useMediaQuery } from \"../../hooks/use-media-query.js\";\n\nexport type MaxWidthOption =\n | \"none\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\"\n | \"5xl\"\n | \"6xl\"\n | \"7xl\"\n | \"full\";\n\nexport interface ScreenAdaptiveViewProps {\n /** Default content (mobile + base) */\n children: React.ReactNode;\n\n /** Optional content to use on lg and up */\n lgContent?: React.ReactNode;\n\n /** Optional content to use on xl and up */\n xlContent?: React.ReactNode;\n\n /** Max width applied at lg (>=1024px) */\n lgMaxWidth?: MaxWidthOption;\n\n /** Max width applied at xl (>=1280px) */\n xlMaxWidth?: MaxWidthOption;\n\n /** App-only escape hatch (try to avoid) */\n className?: string;\n\n /** App-only escape hatch (try to avoid) */\n innerClassName?: string;\n}\n\nfunction widthClass(opt: MaxWidthOption | undefined) {\n switch (opt) {\n case \"none\":\n return \"screen-max-w-none\";\n case \"sm\":\n return \"screen-max-w-sm\";\n case \"md\":\n return \"screen-max-w-md\";\n case \"lg\":\n return \"screen-max-w-lg\";\n case \"xl\":\n return \"screen-max-w-xl\";\n case \"2xl\":\n return \"screen-max-w-2xl\";\n case \"3xl\":\n return \"screen-max-w-3xl\";\n case \"4xl\":\n return \"screen-max-w-4xl\";\n case \"5xl\":\n return \"screen-max-w-5xl\";\n case \"6xl\":\n return \"screen-max-w-6xl\";\n case \"7xl\":\n return \"screen-max-w-7xl\";\n case \"full\":\n return \"screen-max-w-full\";\n default:\n return \"screen-max-w-6xl\";\n }\n}\n\nexport function ScreenAdaptiveView({\n children,\n lgContent,\n xlContent,\n lgMaxWidth = \"4xl\",\n xlMaxWidth = \"6xl\",\n className,\n innerClassName,\n}: ScreenAdaptiveViewProps) {\n const isLg = useMediaQuery(\"(min-width: 1024px)\");\n const isXl = useMediaQuery(\"(min-width: 1280px)\");\n\n // SSR-safe default: render base children as mobile (no max-width)\n // After hydration, swaps to lg/xl content if provided.\n const contentToShow =\n (isXl && xlContent !== undefined && xlContent !== null)\n ? xlContent\n : (isLg && lgContent !== undefined && lgContent !== null)\n ? lgContent\n : children;\n\n const sizeClass =\n isXl ? widthClass(xlMaxWidth) : isLg ? widthClass(lgMaxWidth) : \"screen-max-w-full\";\n\n return (\n <div className={cn(\"screen-adaptive-root\", className)}>\n <div className={cn(\"screen-adaptive-inner\", sizeClass, innerClassName)}>\n {contentToShow}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"screen-adaptive-view.js","sourceRoot":"","sources":["../../../../src/react/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IAAI,SAAS,KAAK,IAAI;YACrD,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,QAAQ,CAAC;IAEjB,MAAM,SAAS,GAAG,IAAI;QACpB,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;QACxB,CAAC,CAAC,IAAI;YACJ,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;YACxB,CAAC,CAAC,mBAAmB,CAAC;IAE1B,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,YACnD,cAAK,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,EAAE,cAAc,CAAC,YAAG,aAAa,GAAO,GACzF,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../../lib/utils.js';\nimport { useMediaQuery } from '../../hooks/use-media-query.js';\n\nexport type MaxWidthOption =\n 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';\n\nexport interface ScreenAdaptiveViewProps {\n children: React.ReactNode;\n\n lgContent?: React.ReactNode;\n\n xlContent?: React.ReactNode;\n\n lgMaxWidth?: MaxWidthOption;\n\n xlMaxWidth?: MaxWidthOption;\n\n className?: string;\n\n innerClassName?: string;\n}\n\nfunction widthClass(opt: MaxWidthOption | undefined) {\n switch (opt) {\n case 'none':\n return 'screen-max-w-none';\n case 'sm':\n return 'screen-max-w-sm';\n case 'md':\n return 'screen-max-w-md';\n case 'lg':\n return 'screen-max-w-lg';\n case 'xl':\n return 'screen-max-w-xl';\n case '2xl':\n return 'screen-max-w-2xl';\n case '3xl':\n return 'screen-max-w-3xl';\n case '4xl':\n return 'screen-max-w-4xl';\n case '5xl':\n return 'screen-max-w-5xl';\n case '6xl':\n return 'screen-max-w-6xl';\n case '7xl':\n return 'screen-max-w-7xl';\n case 'full':\n return 'screen-max-w-full';\n default:\n return 'screen-max-w-6xl';\n }\n}\n\nexport function ScreenAdaptiveView({\n children,\n lgContent,\n xlContent,\n lgMaxWidth = '4xl',\n xlMaxWidth = '6xl',\n className,\n innerClassName,\n}: ScreenAdaptiveViewProps) {\n const isLg = useMediaQuery('(min-width: 1024px)');\n const isXl = useMediaQuery('(min-width: 1280px)');\n\n // SSR-safe: base children render until hydration, then lg/xl content swaps in.\n const contentToShow =\n isXl && xlContent !== undefined && xlContent !== null\n ? xlContent\n : isLg && lgContent !== undefined && lgContent !== null\n ? lgContent\n : children;\n\n const sizeClass = isXl\n ? widthClass(xlMaxWidth)\n : isLg\n ? widthClass(lgMaxWidth)\n : 'screen-max-w-full';\n\n return (\n <div className={cn('screen-adaptive-root', className)}>\n <div className={cn('screen-adaptive-inner', sizeClass, innerClassName)}>{contentToShow}</div>\n </div>\n );\n}\n"]}
@@ -1,38 +1,8 @@
1
- import type { ListPaginationState } from "../hooks/use-paged-list.js";
1
+ import type { ListPaginationState } from '../hooks/use-paged-list.js';
2
2
  export interface ListPaginationProps {
3
- /**
4
- * Page state from `usePagedList` (known total),
5
- * `useCursorPage().paginationFor(hasMore)` (unknown total), or any
6
- * caller-owned state of the same shape.
7
- */
8
3
  pagination: ListPaginationState;
9
- /**
10
- * Makes BOTH controls unavailable while the next page is in flight, without hiding
11
- * the row. Server-paged surfaces pass their query's `isFetching`; a slice-paged
12
- * list has nothing to wait for and omits it.
13
- */
14
4
  busy?: boolean;
15
- /** Optional extra classes. Merged with the component's own classes. */
16
5
  className?: string;
17
6
  }
18
- /**
19
- * The ONE Previous / counter / Next control for paginated lists, in both
20
- * flavors. Pair it with the hook that owns the page state (`usePagedList` for a
21
- * client-side slice, `useCursorPage` — or the caller's own query state — for a
22
- * cursor feed; a cursor feed passes `pager.paginationFor(hasMore)`, which binds
23
- * the query's answer to these controls); this component owns only the controls,
24
- * so every paginated list reads and behaves the same (ENG-002, FRONTEND-001).
25
- *
26
- * The counter follows the flavor: a known `totalPages` reads "2 of 5", an
27
- * omitted one reads "Page 2". Everything else is identical in both flavors —
28
- * which is exactly why there is one component and not two.
29
- *
30
- * It renders NOTHING when neither direction is available, so no call site
31
- * repeats a `totalPages > 1` / `page > 1 || hasMore` guard. An unavailable control
32
- * — an edge, or either control while a page loads — is `aria-disabled` and ignores
33
- * activation (announced, and inert), but is never natively disabled: the control the
34
- * user just pressed keeps focus when it becomes unavailable (FRONTEND-203). The
35
- * counter is a `status` live region so a page change is announced to screen readers.
36
- */
37
7
  export declare function ListPagination({ pagination, busy, className }: ListPaginationProps): import("react").JSX.Element | null;
38
8
  //# sourceMappingURL=list-pagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-pagination.d.ts","sourceRoot":"","sources":["../../../src/react/components/list-pagination.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,UAAU,EAAE,mBAAmB,CAAC;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,IAAY,EAAE,SAAS,EAAE,EAAE,mBAAmB,sCAgE1F"}
1
+ {"version":3,"file":"list-pagination.d.ts","sourceRoot":"","sources":["../../../src/react/components/list-pagination.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,IAAY,EAAE,SAAS,EAAE,EAAE,mBAAmB,sCAwD1F"}
@@ -1,32 +1,11 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState } from "react";
4
- import { ChevronLeft, ChevronRight } from "lucide-react";
5
- import { Button } from "./button.js";
6
- import { cn } from "../../lib/utils.js";
7
- /**
8
- * The ONE Previous / counter / Next control for paginated lists, in both
9
- * flavors. Pair it with the hook that owns the page state (`usePagedList` for a
10
- * client-side slice, `useCursorPage` — or the caller's own query state — for a
11
- * cursor feed; a cursor feed passes `pager.paginationFor(hasMore)`, which binds
12
- * the query's answer to these controls); this component owns only the controls,
13
- * so every paginated list reads and behaves the same (ENG-002, FRONTEND-001).
14
- *
15
- * The counter follows the flavor: a known `totalPages` reads "2 of 5", an
16
- * omitted one reads "Page 2". Everything else is identical in both flavors —
17
- * which is exactly why there is one component and not two.
18
- *
19
- * It renders NOTHING when neither direction is available, so no call site
20
- * repeats a `totalPages > 1` / `page > 1 || hasMore` guard. An unavailable control
21
- * — an edge, or either control while a page loads — is `aria-disabled` and ignores
22
- * activation (announced, and inert), but is never natively disabled: the control the
23
- * user just pressed keeps focus when it becomes unavailable (FRONTEND-203). The
24
- * counter is a `status` live region so a page change is announced to screen readers.
25
- */
3
+ import { useState } from 'react';
4
+ import { ChevronLeft, ChevronRight } from 'lucide-react';
5
+ import { Button } from './button.js';
6
+ import { cn } from '../../lib/utils.js';
26
7
  export function ListPagination({ pagination, busy = false, className }) {
27
8
  const { currentPage, totalPages, canPreviousPage, canNextPage, goToPreviousPage, goToNextPage } = pagination;
28
- // The control that started the in-flight page shows the spinner. Cleared when `busy`
29
- // ends — a render-phase adjustment, so there is no effect and no stale frame.
30
9
  const [clicked, setClicked] = useState(null);
31
10
  const [wasBusy, setWasBusy] = useState(busy);
32
11
  if (busy !== wasBusy) {
@@ -34,27 +13,21 @@ export function ListPagination({ pagination, busy = false, className }) {
34
13
  if (!busy)
35
14
  setClicked(null);
36
15
  }
37
- const previousPending = busy && clicked === "previous";
38
- const nextPending = busy && clicked === "next";
16
+ const previousPending = busy && clicked === 'previous';
17
+ const nextPending = busy && clicked === 'next';
39
18
  const previousUnavailable = busy || !canPreviousPage;
40
19
  const nextUnavailable = busy || !canNextPage;
41
- // One visibility rule for both flavors. For a known total this is exactly
42
- // `totalPages > 1`: page state is clamped into `1..totalPages`, so a
43
- // single-page list has no reachable neighbour in either direction, and a
44
- // multi-page list always has one. For a cursor feed it is the hand-rolled
45
- // `page > 1 || hasMore`. `busy` deliberately does not hide the row — the
46
- // controls grey out in place instead of vanishing mid-fetch.
47
20
  if (!canPreviousPage && !canNextPage)
48
21
  return null;
49
- return (_jsxs("div", { className: cn("flex w-full items-center justify-between gap-4 mt-4", className), children: [_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => {
22
+ return (_jsxs("div", { className: cn('flex w-full items-center justify-between gap-4 mt-4', className), children: [_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => {
50
23
  if (previousUnavailable)
51
24
  return;
52
- setClicked("previous");
25
+ setClicked('previous');
53
26
  goToPreviousPage();
54
27
  }, "aria-disabled": previousUnavailable || undefined, pending: previousPending, icon: _jsx(ChevronLeft, { className: "icon-xs" }), className: "h-11 min-w-11", children: "Previous" }), _jsx("span", { className: "text-counter", role: "status", children: totalPages === undefined ? `Page ${currentPage}` : `${currentPage} of ${totalPages}` }), _jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: () => {
55
28
  if (nextUnavailable)
56
29
  return;
57
- setClicked("next");
30
+ setClicked('next');
58
31
  goToNextPage();
59
32
  }, "aria-disabled": nextUnavailable || undefined, pending: nextPending, className: "h-11 min-w-11", children: ["Next", nextPending ? null : _jsx(ChevronRight, { className: "icon-xs" })] })] }));
60
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"list-pagination.js","sourceRoot":"","sources":["../../../src/react/components/list-pagination.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAA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,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,mBAAmB;wBAAE,OAAO;oBAChC,UAAU,CAAC,UAAU,CAAC,CAAC;oBACvB,gBAAgB,EAAE,CAAC;gBACrB,CAAC,mBACc,mBAAmB,IAAI,SAAS,EAC/C,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,KAAC,WAAW,IAAC,SAAS,EAAC,SAAS,GAAG,EACzC,SAAS,EAAC,eAAe,yBAGlB,EACT,eAAM,SAAS,EAAC,cAAc,EAAC,IAAI,EAAC,QAAQ,YACzC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,OAAO,UAAU,EAAE,GAChF,EACP,MAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,eAAe;wBAAE,OAAO;oBAC5B,UAAU,CAAC,MAAM,CAAC,CAAC;oBACnB,YAAY,EAAE,CAAC;gBACjB,CAAC,mBACc,eAAe,IAAI,SAAS,EAC3C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,eAAe,qBAGxB,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,SAAS,EAAC,SAAS,GAAG,IACnD,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport { cn } from \"../../lib/utils.js\";\nimport type { ListPaginationState } from \"../hooks/use-paged-list.js\";\n\nexport interface ListPaginationProps {\n /**\n * Page state from `usePagedList` (known total),\n * `useCursorPage().paginationFor(hasMore)` (unknown total), or any\n * caller-owned state of the same shape.\n */\n pagination: ListPaginationState;\n /**\n * Makes BOTH controls unavailable while the next page is in flight, without hiding\n * the row. Server-paged surfaces pass their query's `isFetching`; a slice-paged\n * list has nothing to wait for and omits it.\n */\n busy?: boolean;\n /** Optional extra classes. Merged with the component's own classes. */\n className?: string;\n}\n\n/**\n * The ONE Previous / counter / Next control for paginated lists, in both\n * flavors. Pair it with the hook that owns the page state (`usePagedList` for a\n * client-side slice, `useCursorPage` — or the caller's own query state — for a\n * cursor feed; a cursor feed passes `pager.paginationFor(hasMore)`, which binds\n * the query's answer to these controls); this component owns only the controls,\n * so every paginated list reads and behaves the same (ENG-002, FRONTEND-001).\n *\n * The counter follows the flavor: a known `totalPages` reads \"2 of 5\", an\n * omitted one reads \"Page 2\". Everything else is identical in both flavors —\n * which is exactly why there is one component and not two.\n *\n * It renders NOTHING when neither direction is available, so no call site\n * repeats a `totalPages > 1` / `page > 1 || hasMore` guard. An unavailable control\n * — an edge, or either control while a page loads — is `aria-disabled` and ignores\n * activation (announced, and inert), but is never natively disabled: the control the\n * user just pressed keeps focus when it becomes unavailable (FRONTEND-203). The\n * counter is a `status` live region so a page change is announced to screen readers.\n */\nexport function ListPagination({ pagination, busy = false, className }: ListPaginationProps) {\n const { currentPage, totalPages, canPreviousPage, canNextPage, goToPreviousPage, goToNextPage } =\n pagination;\n\n // The control that started the in-flight page shows the spinner. Cleared when `busy`\n // ends — a render-phase adjustment, so there is no effect and no stale frame.\n const [clicked, setClicked] = useState<\"previous\" | \"next\" | null>(null);\n const [wasBusy, setWasBusy] = useState(busy);\n if (busy !== wasBusy) {\n setWasBusy(busy);\n if (!busy) setClicked(null);\n }\n const previousPending = busy && clicked === \"previous\";\n const nextPending = busy && clicked === \"next\";\n const previousUnavailable = busy || !canPreviousPage;\n const nextUnavailable = busy || !canNextPage;\n\n // One visibility rule for both flavors. For a known total this is exactly\n // `totalPages > 1`: page state is clamped into `1..totalPages`, so a\n // single-page list has no reachable neighbour in either direction, and a\n // multi-page list always has one. For a cursor feed it is the hand-rolled\n // `page > 1 || hasMore`. `busy` deliberately does not hide the row — the\n // controls grey out in place instead of vanishing mid-fetch.\n if (!canPreviousPage && !canNextPage) return null;\n\n return (\n <div className={cn(\"flex w-full items-center justify-between gap-4 mt-4\", className)}>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (previousUnavailable) return;\n setClicked(\"previous\");\n goToPreviousPage();\n }}\n aria-disabled={previousUnavailable || undefined}\n pending={previousPending}\n icon={<ChevronLeft className=\"icon-xs\" />}\n className=\"h-11 min-w-11\"\n >\n Previous\n </Button>\n <span className=\"text-counter\" role=\"status\">\n {totalPages === undefined ? `Page ${currentPage}` : `${currentPage} of ${totalPages}`}\n </span>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (nextUnavailable) return;\n setClicked(\"next\");\n goToNextPage();\n }}\n aria-disabled={nextUnavailable || undefined}\n pending={nextPending}\n className=\"h-11 min-w-11\"\n >\n Next\n {nextPending ? null : <ChevronRight className=\"icon-xs\" />}\n </Button>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"list-pagination.js","sourceRoot":"","sources":["../../../src/react/components/list-pagination.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AASxC,MAAM,UAAU,cAAc,CAAC,EAAE,UAAU,EAAE,IAAI,GAAG,KAAK,EAAE,SAAS,EAAuB;IACzF,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAC7F,UAAU,CAAC;IAEb,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA6B,IAAI,CAAC,CAAC;IACzE,MAAM,CAAC,OAAO,EAAE,UAA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oBACZ,IAAI,eAAe;wBAAE,OAAO;oBAC5B,UAAU,CAAC,MAAM,CAAC,CAAC;oBACnB,YAAY,EAAE,CAAC;gBACjB,CAAC,mBACc,eAAe,IAAI,SAAS,EAC3C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,eAAe,qBAGxB,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,SAAS,EAAC,SAAS,GAAG,IACnD,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { Button } from './button.js';\nimport { cn } from '../../lib/utils.js';\nimport type { ListPaginationState } from '../hooks/use-paged-list.js';\n\nexport interface ListPaginationProps {\n pagination: ListPaginationState;\n busy?: boolean;\n className?: string;\n}\n\nexport function ListPagination({ pagination, busy = false, className }: ListPaginationProps) {\n const { currentPage, totalPages, canPreviousPage, canNextPage, goToPreviousPage, goToNextPage } =\n pagination;\n\n const [clicked, setClicked] = useState<'previous' | 'next' | null>(null);\n const [wasBusy, setWasBusy] = useState(busy);\n if (busy !== wasBusy) {\n setWasBusy(busy);\n if (!busy) setClicked(null);\n }\n const previousPending = busy && clicked === 'previous';\n const nextPending = busy && clicked === 'next';\n const previousUnavailable = busy || !canPreviousPage;\n const nextUnavailable = busy || !canNextPage;\n\n if (!canPreviousPage && !canNextPage) return null;\n\n return (\n <div className={cn('flex w-full items-center justify-between gap-4 mt-4', className)}>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (previousUnavailable) return;\n setClicked('previous');\n goToPreviousPage();\n }}\n aria-disabled={previousUnavailable || undefined}\n pending={previousPending}\n icon={<ChevronLeft className=\"icon-xs\" />}\n className=\"h-11 min-w-11\"\n >\n Previous\n </Button>\n <span className=\"text-counter\" role=\"status\">\n {totalPages === undefined ? `Page ${currentPage}` : `${currentPage} of ${totalPages}`}\n </span>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n if (nextUnavailable) return;\n setClicked('next');\n goToNextPage();\n }}\n aria-disabled={nextUnavailable || undefined}\n pending={nextPending}\n className=\"h-11 min-w-11\"\n >\n Next\n {nextPending ? null : <ChevronRight className=\"icon-xs\" />}\n </Button>\n </div>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
1
+ import * as React from 'react';
2
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
3
3
  declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
4
4
  declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
5
5
  declare function MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/react/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAK3D,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAEpF;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAEtF;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,qBAExF;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,qBAEhG;AAED,iBAAS,UAAU,CA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CAAC,qBAEtF;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,qBAExF;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,qBAEhG;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,GAAG,CAAC,qBAElF;AAED,QAAA,MAAM,OAAO,yJAYX,CAAC;AAGH,QAAA,MAAM,cAAc,sKAYlB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAE0D,OAAO;wCActF,CAAC;AAGH,QAAA,MAAM,iBAAiB,mKAYrB,CAAC;AAGH,QAAA,MAAM,cAAc,gKAiBlB,CAAC;AAGH,QAAA,MAAM,WAAW;YAE0D,OAAO;wCAWhF,CAAC;AAGH,QAAA,MAAM,mBAAmB,qKAoBvB,CAAC;AAGH,QAAA,MAAM,gBAAgB,kKAmBpB,CAAC;AAGH,QAAA,MAAM,YAAY;YAE0D,OAAO;wCAOjF,CAAC;AAGH,QAAA,MAAM,gBAAgB,kKASpB,CAAC;AAGH,QAAA,MAAM,eAAe;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAKtF,CAAC;AAGF,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,CAAC"}
@@ -1,9 +1,9 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
5
- import { Check, ChevronRight, Circle } from "lucide-react";
6
- import { cn } from "../../lib/utils.js";
3
+ import * as React from 'react';
4
+ import * as MenubarPrimitive from '@radix-ui/react-menubar';
5
+ import { Check, ChevronRight, Circle } from 'lucide-react';
6
+ import { cn } from '../../lib/utils.js';
7
7
  function MenubarMenu({ ...props }) {
8
8
  return _jsx(MenubarPrimitive.Menu, { ...props });
9
9
  }
@@ -19,27 +19,27 @@ function MenubarRadioGroup({ ...props }) {
19
19
  function MenubarSub({ ...props }) {
20
20
  return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
21
21
  }
22
- const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn("flex h-10 items-center space-x-1 rounded-md border bg-background p-1", className), ...props })));
22
+ const Menubar = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Root, { ref: ref, className: cn('flex h-10 items-center space-x-1 rounded-md border bg-background p-1', className), ...props })));
23
23
  Menubar.displayName = MenubarPrimitive.Root.displayName;
24
- const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Trigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props })));
24
+ const MenubarTrigger = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Trigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', className), ...props })));
25
25
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
26
- const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(MenubarPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
26
+ const MenubarSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(MenubarPrimitive.SubTrigger, { ref: ref, className: cn('flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
27
27
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
28
- const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props })));
28
+ const MenubarSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
29
29
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
30
- const MenubarContent = React.forwardRef(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { ref: ref, align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
30
+ const MenubarContent = React.forwardRef(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref) => (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { ref: ref, align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn('z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props }) })));
31
31
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
32
- const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
32
+ const MenubarItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props })));
33
33
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
34
- const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(MenubarPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
34
+ const MenubarCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(MenubarPrimitive.CheckboxItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
35
35
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
36
- const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(MenubarPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
36
+ const MenubarRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(MenubarPrimitive.RadioItem, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
37
37
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
38
- const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })));
38
+ const MenubarLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(MenubarPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));
39
39
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
40
- const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
40
+ const MenubarSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(MenubarPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props })));
41
41
  MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
42
- const MenubarShortcut = ({ className, ...props }) => (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
43
- MenubarShortcut.displayname = "MenubarShortcut";
42
+ const MenubarShortcut = ({ className, ...props }) => (_jsx("span", { className: cn('ml-auto text-xs tracking-widest text-muted-foreground', className), ...props }));
43
+ MenubarShortcut.displayname = 'MenubarShortcut';
44
44
  export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
45
45
  //# sourceMappingURL=menubar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.js","sourceRoot":"","sources":["../../../src/react/components/menubar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,SAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAsD;IACnF,OAAO,KAAC,gBAAgB,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AAC7C,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAuD;IACrF,OAAO,KAAC,gBAAgB,CAAC,KAAK,OAAK,KAAK,GAAI,CAAA;AAC9C,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAwD;IACvF,OAAO,KAAC,gBAAgB,CAAC,MAAM,OAAK,KAAK,GAAI,CAAA;AAC/C,CAAC;AAED,SAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAA4D;IAC/F,OAAO,KAAC,gBAAgB,CAAC,UAAU,OAAK,KAAK,GAAI,CAAA;AACnD,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAqD;IACjF,OAAO,KAAC,gBAAgB,CAAC,GAAG,iBAAW,aAAa,KAAK,KAAK,GAAI,CAAA;AACpE,CAAC;AAED,MAAM,OAAO,GAAG,KAAK,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,CAAC,WAAW,CAAA;AAE7D,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,gBAAgB,CAAC,SAAS,IACzB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAA;AACF,gBAAgB,CAAC,WAAW,GAAG,gBAAgB,CAAC,SAAS,CAAC,WAAW,CAAA;AAErE,MAAM,eAAe,GAAG,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EAC8B,EAAE,EAAE,CAAC,CAC3C,eAAM,SAAS,EAAE,EAAE,CAAC,uDAAuD,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACvG,CAAA;AACD,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />\n}\n\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />\n}\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\"flex h-10 items-center space-x-1 rounded-md border bg-background p-1\", className)}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n))\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)} {...props} />\n)\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"]}
1
+ {"version":3,"file":"menubar.js","sourceRoot":"","sources":["../../../src/react/components/menubar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AA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H,CAAC;AACF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as MenubarPrimitive from '@radix-ui/react-menubar';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '../../lib/utils.js';\n\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu {...props} />;\n}\n\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group {...props} />;\n}\n\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal {...props} />;\n}\n\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup {...props} />;\n}\n\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-10 items-center space-x-1 rounded-md border bg-background p-1',\n className,\n )}\n {...props}\n />\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-xs px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n className,\n )}\n {...props}\n />\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n));\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}\n {...props}\n />\n);\nMenubarShortcut.displayname = 'MenubarShortcut';\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n};\n"]}
@@ -2,13 +2,7 @@ interface OpenerFocusHandlers {
2
2
  onOpenAutoFocus?: (event: Event) => void;
3
3
  onCloseAutoFocus?: (event: Event) => void;
4
4
  }
5
- /**
6
- * Focus returns to the element that held it when an overlay opened, as the overlay closes. Radix's
7
- * modal content hands close focus to its trigger only, so an overlay opened from state — no trigger —
8
- * would leave focus on the page. The opener is recorded as Radix starts its open focus, before focus
9
- * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`
10
- * it has chosen the destination, and when the opener has left the page Radix's own return runs.
11
- */
12
- export declare function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus }: OpenerFocusHandlers): Required<OpenerFocusHandlers>;
5
+ /** Radix's modal content returns close focus only to its trigger, so an overlay opened from state records its opener. */
6
+ export declare function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus, }: OpenerFocusHandlers): Required<OpenerFocusHandlers>;
13
7
  export {};
14
8
  //# sourceMappingURL=opener-focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opener-focus.d.ts","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IACxC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAC1C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,EAAE,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAiBxH"}
1
+ {"version":3,"file":"opener-focus.d.ts","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAC3C;AAED,yHAAyH;AACzH,wBAAgB,cAAc,CAAC,EAC7B,eAAe,EACf,gBAAgB,GACjB,EAAE,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAiBrD"}
@@ -1,13 +1,7 @@
1
- "use client";
2
- import * as React from "react";
3
- /**
4
- * Focus returns to the element that held it when an overlay opened, as the overlay closes. Radix's
5
- * modal content hands close focus to its trigger only, so an overlay opened from state — no trigger —
6
- * would leave focus on the page. The opener is recorded as Radix starts its open focus, before focus
7
- * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`
8
- * it has chosen the destination, and when the opener has left the page Radix's own return runs.
9
- */
10
- export function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus }) {
1
+ 'use client';
2
+ import * as React from 'react';
3
+ /** Radix's modal content returns close focus only to its trigger, so an overlay opened from state records its opener. */
4
+ export function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus, }) {
11
5
  const opener = React.useRef(null);
12
6
  return {
13
7
  onOpenAutoFocus: (event) => {
@@ -1 +1 @@
1
- {"version":3,"file":"opener-focus.js","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAuB;IACvF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAqB,IAAI,CAAC,CAAA;IACrD,OAAO;QACL,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAA;YACrC,MAAM,CAAC,OAAO,GAAG,MAAM,YAAY,WAAW,IAAI,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;YAC1F,eAAe,EAAE,CAAC,KAAK,CAAC,CAAA;QAC1B,CAAC;QACD,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE;YAC1B,gBAAgB,EAAE,CAAC,KAAK,CAAC,CAAA;YACzB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAA;YAC7B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;YACrB,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,WAAW;gBAAE,OAAM;YAC1D,KAAK,CAAC,cAAc,EAAE,CAAA;YACtB,MAAM,CAAC,KAAK,EAAE,CAAA;QAChB,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\ninterface OpenerFocusHandlers {\n onOpenAutoFocus?: (event: Event) => void\n onCloseAutoFocus?: (event: Event) => void\n}\n\n/**\n * Focus returns to the element that held it when an overlay opened, as the overlay closes. Radix's\n * modal content hands close focus to its trigger only, so an overlay opened from state — no trigger —\n * would leave focus on the page. The opener is recorded as Radix starts its open focus, before focus\n * moves inside. The caller's own `onCloseAutoFocus` runs first; when it calls `event.preventDefault()`\n * it has chosen the destination, and when the opener has left the page Radix's own return runs.\n */\nexport function useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus }: OpenerFocusHandlers): Required<OpenerFocusHandlers> {\n const opener = React.useRef<HTMLElement | null>(null)\n return {\n onOpenAutoFocus: (event) => {\n const active = document.activeElement\n opener.current = active instanceof HTMLElement && active !== document.body ? active : null\n onOpenAutoFocus?.(event)\n },\n onCloseAutoFocus: (event) => {\n onCloseAutoFocus?.(event)\n const target = opener.current\n opener.current = null\n if (event.defaultPrevented || !target?.isConnected) return\n event.preventDefault()\n target.focus()\n },\n }\n}\n"]}
1
+ {"version":3,"file":"opener-focus.js","sourceRoot":"","sources":["../../../src/react/components/opener-focus.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,yHAAyH;AACzH,MAAM,UAAU,cAAc,CAAC,EAC7B,eAAe,EACf,gBAAgB,GACI;IACpB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAqB,IAAI,CAAC,CAAC;IACtD,OAAO;QACL,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC;YACtC,MAAM,CAAC,OAAO,GAAG,MAAM,YAAY,WAAW,IAAI,MAAM,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAC3F,eAAe,EAAE,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE;YAC1B,gBAAgB,EAAE,CAAC,KAAK,CAAC,CAAC;YAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;YAC9B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;YACtB,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,WAAW;gBAAE,OAAO;YAC3D,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\ninterface OpenerFocusHandlers {\n onOpenAutoFocus?: (event: Event) => void;\n onCloseAutoFocus?: (event: Event) => void;\n}\n\n/** Radix's modal content returns close focus only to its trigger, so an overlay opened from state records its opener. */\nexport function useOpenerFocus({\n onOpenAutoFocus,\n onCloseAutoFocus,\n}: OpenerFocusHandlers): Required<OpenerFocusHandlers> {\n const opener = React.useRef<HTMLElement | null>(null);\n return {\n onOpenAutoFocus: (event) => {\n const active = document.activeElement;\n opener.current = active instanceof HTMLElement && active !== document.body ? active : null;\n onOpenAutoFocus?.(event);\n },\n onCloseAutoFocus: (event) => {\n onCloseAutoFocus?.(event);\n const target = opener.current;\n opener.current = null;\n if (event.defaultPrevented || !target?.isConnected) return;\n event.preventDefault();\n target.focus();\n },\n };\n}\n"]}
@@ -1,10 +1,4 @@
1
- import type * as React from "react";
2
- /** Cancels an event and stops it in the capture phase, before any handler on the control runs. */
1
+ import type * as React from 'react';
3
2
  export declare function blockEvent(event: React.SyntheticEvent): void;
4
- /**
5
- * Stops the keys that act on a pending control — Space, Enter, ArrowUp, ArrowDown (which open a
6
- * trigger) and a single printable character (a trigger's typeahead) — and lets every other key
7
- * through, so Tab, Escape, function keys, and shortcuts behave as usual.
8
- */
9
3
  export declare function blockActivationKey(event: React.KeyboardEvent): void;
10
4
  //# sourceMappingURL=pending-guard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pending-guard.d.ts","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,kGAAkG;AAClG,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,QAGrD;AAID;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,QAG5D"}
1
+ {"version":3,"file":"pending-guard.d.ts","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,QAGrD;AAID,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,QAG5D"}
@@ -1,14 +1,8 @@
1
- /** Cancels an event and stops it in the capture phase, before any handler on the control runs. */
2
1
  export function blockEvent(event) {
3
2
  event.preventDefault();
4
3
  event.stopPropagation();
5
4
  }
6
- const ACTIVATION_KEYS = new Set([" ", "Enter", "ArrowUp", "ArrowDown"]);
7
- /**
8
- * Stops the keys that act on a pending control — Space, Enter, ArrowUp, ArrowDown (which open a
9
- * trigger) and a single printable character (a trigger's typeahead) — and lets every other key
10
- * through, so Tab, Escape, function keys, and shortcuts behave as usual.
11
- */
5
+ const ACTIVATION_KEYS = new Set([' ', 'Enter', 'ArrowUp', 'ArrowDown']);
12
6
  export function blockActivationKey(event) {
13
7
  if (event.ctrlKey || event.metaKey || event.altKey)
14
8
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"pending-guard.js","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAEA,kGAAkG;AAClG,MAAM,UAAU,UAAU,CAAC,KAA2B;IACpD,KAAK,CAAC,cAAc,EAAE,CAAA;IACtB,KAAK,CAAC,eAAe,EAAE,CAAA;AACzB,CAAC;AAED,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAEvE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA0B;IAC3D,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM;QAAE,OAAM;IAC1D,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,UAAU,CAAC,KAAK,CAAC,CAAA;AACjF,CAAC","sourcesContent":["import type * as React from \"react\"\n\n/** Cancels an event and stops it in the capture phase, before any handler on the control runs. */\nexport function blockEvent(event: React.SyntheticEvent) {\n event.preventDefault()\n event.stopPropagation()\n}\n\nconst ACTIVATION_KEYS = new Set([\" \", \"Enter\", \"ArrowUp\", \"ArrowDown\"])\n\n/**\n * Stops the keys that act on a pending control — Space, Enter, ArrowUp, ArrowDown (which open a\n * trigger) and a single printable character (a trigger's typeahead) — and lets every other key\n * through, so Tab, Escape, function keys, and shortcuts behave as usual.\n */\nexport function blockActivationKey(event: React.KeyboardEvent) {\n if (event.ctrlKey || event.metaKey || event.altKey) return\n if (ACTIVATION_KEYS.has(event.key) || event.key.length === 1) blockEvent(event)\n}\n"]}
1
+ {"version":3,"file":"pending-guard.js","sourceRoot":"","sources":["../../../src/react/components/pending-guard.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,UAAU,CAAC,KAA2B;IACpD,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAExE,MAAM,UAAU,kBAAkB,CAAC,KAA0B;IAC3D,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO;IAC3D,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,UAAU,CAAC,KAAK,CAAC,CAAC;AAClF,CAAC","sourcesContent":["import type * as React from 'react';\n\nexport function blockEvent(event: React.SyntheticEvent) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst ACTIVATION_KEYS = new Set([' ', 'Enter', 'ArrowUp', 'ArrowDown']);\n\nexport function blockActivationKey(event: React.KeyboardEvent) {\n if (event.ctrlKey || event.metaKey || event.altKey) return;\n if (ACTIVATION_KEYS.has(event.key) || event.key.length === 1) blockEvent(event);\n}\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as PopoverPrimitive from "@radix-ui/react-popover";
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
  declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
4
  declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,QAAA,MAAM,OAAO,yCAAwB,CAAA;AACrC,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAC/C,QAAA,MAAM,aAAa,4GAA0B,CAAA;AAE7C,QAAA,MAAM,cAAc,gKAgBlB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAI5D,QAAA,MAAM,OAAO,yCAAwB,CAAC;AACtC,QAAA,MAAM,cAAc,gHAA2B,CAAC;AAChD,QAAA,MAAM,aAAa,4GAA0B,CAAC;AAE9C,QAAA,MAAM,cAAc,gKAgBlB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
@@ -1,12 +1,12 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
- import { cn } from "../../lib/utils.js";
3
+ import * as React from 'react';
4
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
5
+ import { cn } from '../../lib/utils.js';
6
6
  const Popover = PopoverPrimitive.Root;
7
7
  const PopoverTrigger = PopoverPrimitive.Trigger;
8
8
  const PopoverAnchor = PopoverPrimitive.Anchor;
9
- const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
9
+ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn('z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props }) })));
10
10
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
11
11
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
12
12
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAA;AACrC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAA;AAC/C,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAA;AAE7C,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,4eAA4e,EAC5e,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAA;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAA;AAEjE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"../../lib/utils.js\"\n\nconst Popover = PopoverPrimitive.Root\nconst PopoverTrigger = PopoverPrimitive.Trigger\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n"]}
1
+ {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/react/components/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AACtC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAChD,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AAE9C,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACpE,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,OAAO,IACvB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,4eAA4e,EAC5e,SAAS,CACV,KACG,KAAK,GACT,GACsB,CAC3B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '../../lib/utils.js';\n\nconst Popover = PopoverPrimitive.Root;\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 w-72 rounded-md border !bg-card p-4 text-popover-foreground elevation-popover outline-hidden duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as ProgressPrimitive from "@radix-ui/react-progress";
1
+ import * as React from 'react';
2
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
3
3
  interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {
4
4
  indicatorClassName?: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAG7D,UAAU,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC;IAC3F,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,QAAA,MAAM,QAAQ,sFAab,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAG9D,UAAU,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC;IAC3F,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,QAAQ,sFAgBb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,9 +1,9 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as ProgressPrimitive from "@radix-ui/react-progress";
5
- import { cn } from "../../lib/utils.js";
6
- const Progress = React.forwardRef(({ className, value, indicatorClassName, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: cn("h-full w-full flex-1 bg-primary transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]", indicatorClassName), style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
3
+ import * as React from 'react';
4
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
5
+ import { cn } from '../../lib/utils.js';
6
+ const Progress = React.forwardRef(({ className, value, indicatorClassName, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: cn('h-full w-full flex-1 bg-primary transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]', indicatorClassName), style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
7
7
  Progress.displayName = ProgressPrimitive.Root.displayName;
8
8
  export { Progress };
9
9
  //# sourceMappingURL=progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAMvC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3D,KAAC,iBAAiB,CAAC,IAAI,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,KACrF,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,IAC1B,SAAS,EAAE,EAAE,CAAC,8GAA8G,EAAE,kBAAkB,CAAC,EACjJ,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,GAC3D,GACqB,CAC1B,CACF,CAAA;AACD,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAA;AAEzD,OAAO,EAAE,QAAQ,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\"\nimport { cn } from \"../../lib/utils.js\"\n\ninterface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n indicatorClassName?: string\n}\n\nconst Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value, indicatorClassName, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\"relative h-4 w-full overflow-hidden rounded-full bg-secondary\", className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\"h-full w-full flex-1 bg-primary transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]\", indicatorClassName)}\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n)\nProgress.displayName = ProgressPrimitive.Root.displayName\n\nexport { Progress }\n"]}
1
+ {"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/react/components/progress.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAMxC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3D,KAAC,iBAAiB,CAAC,IAAI,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+DAA+D,EAAE,SAAS,CAAC,KACrF,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,IAC1B,SAAS,EAAE,EAAE,CACX,8GAA8G,EAC9G,kBAAkB,CACnB,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,GAAG,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,GAC3D,GACqB,CAC1B,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cn } from '../../lib/utils.js';\n\ninterface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n indicatorClassName?: string;\n}\n\nconst Progress = React.forwardRef<React.ElementRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value, indicatorClassName, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\n 'h-full w-full flex-1 bg-primary transition-transform duration-[var(--motion-base)] ease-[var(--motion-ease)]',\n indicatorClassName,\n )}\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n ),\n);\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
3
  declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
4
  declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
5
  export { RadioGroup, RadioGroupItem };
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/react/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAKlE,QAAA,MAAM,UAAU,+JAKd,CAAA;AAGF,QAAA,MAAM,cAAc,yKAgBlB,CAAA;AAGF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/react/components/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAKnE,QAAA,MAAM,UAAU,+JAKd,CAAC;AAGH,QAAA,MAAM,cAAc,yKAgBlB,CAAC;AAGH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}