@gv-tech/ui-web 2.20.0 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/dist/accordion-Be1vGv6M.js +1 -0
  2. package/dist/accordion-DXnU0LgU.mjs +221 -0
  3. package/dist/accordion.cjs +1 -1
  4. package/dist/accordion.mjs +3 -259
  5. package/dist/alert-dialog-BXRY0Ghq.js +7 -0
  6. package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
  7. package/dist/alert-dialog.cjs +1 -7
  8. package/dist/alert-dialog.mjs +4 -171
  9. package/dist/alert.cjs +1 -1
  10. package/dist/alert.mjs +35 -32
  11. package/dist/aspect-ratio-BP5HarYZ.js +1 -0
  12. package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
  13. package/dist/aspect-ratio.cjs +1 -1
  14. package/dist/aspect-ratio.mjs +3 -43
  15. package/dist/avatar-klFl8Sqa.js +1 -0
  16. package/dist/avatar-vGm9JN1a.mjs +184 -0
  17. package/dist/avatar.cjs +1 -1
  18. package/dist/avatar.mjs +3 -205
  19. package/dist/badge.cjs +1 -1
  20. package/dist/badge.mjs +21 -24
  21. package/dist/breadcrumb.cjs +1 -1
  22. package/dist/breadcrumb.mjs +60 -68
  23. package/dist/button.cjs +1 -1
  24. package/dist/button.mjs +40 -40
  25. package/dist/calendar-aIuSXzs7.js +1 -0
  26. package/dist/calendar-oitID53a.mjs +3154 -0
  27. package/dist/calendar.cjs +1 -1
  28. package/dist/calendar.mjs +4 -2976
  29. package/dist/card.cjs +1 -1
  30. package/dist/card.mjs +42 -32
  31. package/dist/carousel-BjTSkVh9.js +1 -0
  32. package/dist/carousel-CENzZCXN.mjs +1178 -0
  33. package/dist/carousel.cjs +1 -1
  34. package/dist/carousel.mjs +4 -1403
  35. package/dist/chart.cjs +4 -4
  36. package/dist/chart.d.ts +3 -35
  37. package/dist/chart.mjs +123 -182
  38. package/dist/checkbox-Bwq7mXA2.mjs +170 -0
  39. package/dist/checkbox-DzEO1q4R.js +1 -0
  40. package/dist/checkbox.cjs +1 -1
  41. package/dist/checkbox.mjs +3 -258
  42. package/dist/collapsible.cjs +1 -1
  43. package/dist/collapsible.mjs +6 -7
  44. package/dist/command-D7hksKY6.js +1 -0
  45. package/dist/command-Ws_iF1hM.mjs +531 -0
  46. package/dist/command.cjs +1 -1
  47. package/dist/command.mjs +3 -396
  48. package/dist/context-menu-DJbgNJ7N.js +1 -0
  49. package/dist/context-menu-fu39gePi.mjs +292 -0
  50. package/dist/context-menu.cjs +1 -1
  51. package/dist/context-menu.mjs +3 -328
  52. package/dist/dialog.cjs +1 -1
  53. package/dist/dialog.mjs +50 -66
  54. package/dist/dist-0FXx-pUX.js +1 -0
  55. package/dist/dist-4A0ut6a8.mjs +10 -0
  56. package/dist/dist-ALQAoSGx.mjs +10 -0
  57. package/dist/dist-B4N_7Tps.js +1 -0
  58. package/dist/dist-B5776DvK.js +5 -0
  59. package/dist/dist-B57mzJP3.mjs +28 -0
  60. package/dist/dist-B5VmV2K7.js +1 -0
  61. package/dist/dist-BBRD-Qfb.js +1 -0
  62. package/dist/dist-BC_VB6JL.mjs +25 -0
  63. package/dist/dist-BKFtvTm8.mjs +6 -0
  64. package/dist/dist-BUS_s_6N.js +1 -0
  65. package/dist/dist-BVKPqhkg.js +1 -0
  66. package/dist/dist-Ba7mQG9D.mjs +117 -0
  67. package/dist/dist-BeFCyPgD.js +1 -0
  68. package/dist/dist-Bf4P28CV.js +1 -0
  69. package/dist/dist-BfFVoFJN.js +1 -0
  70. package/dist/dist-BhtQH_6Z.js +1 -0
  71. package/dist/dist-BmjFh8i_.mjs +5 -0
  72. package/dist/dist-BrCTkQXt.mjs +62 -0
  73. package/dist/dist-BxmpAHsT.mjs +219 -0
  74. package/dist/dist-C2ArLRnq.js +1 -0
  75. package/dist/dist-C2pRTcV_.mjs +62 -0
  76. package/dist/dist-C9wnUiS4.mjs +27 -0
  77. package/dist/dist-CIRItnqs.js +1 -0
  78. package/dist/dist-CL1DhkaL.js +1 -0
  79. package/dist/dist-CRe7xawr.js +1 -0
  80. package/dist/dist-CUFjt0cI.js +1 -0
  81. package/dist/dist-CaaGWewc.mjs +557 -0
  82. package/dist/dist-Ci2whnVp.js +1 -0
  83. package/dist/dist-CmBtqW5f.js +1 -0
  84. package/dist/dist-CsEsK2jW.js +1 -0
  85. package/dist/dist-CscAxhT8.js +1 -0
  86. package/dist/dist-CvtF5JdF.mjs +95 -0
  87. package/dist/dist-Cvwtowos.mjs +77 -0
  88. package/dist/dist-D2f83VMO.mjs +73 -0
  89. package/dist/dist-Dh_jWJh-.mjs +11 -0
  90. package/dist/dist-DikyKBU3.mjs +12 -0
  91. package/dist/dist-DmmUjo_P.js +1 -0
  92. package/dist/dist-DqvQ5UFr.mjs +38 -0
  93. package/dist/dist-FGQAMrhH.mjs +29 -0
  94. package/dist/dist-Jtk3jeb9.mjs +18 -0
  95. package/dist/dist-Kqk0oQYU.js +1 -0
  96. package/dist/dist-VI9bl_Wk.mjs +45 -0
  97. package/dist/dist-Z7lEV5Nx.mjs +1282 -0
  98. package/dist/dist-_Osar3kp.js +1 -0
  99. package/dist/dist-bDoR0CBU.mjs +112 -0
  100. package/dist/dist-cRjbOZRf.js +1 -0
  101. package/dist/dist-d_pecHgw.mjs +66 -0
  102. package/dist/dist-r36zVVcK.js +1 -0
  103. package/dist/dist-sRlXdzvf.mjs +152 -0
  104. package/dist/drawer.cjs +1 -1
  105. package/dist/drawer.mjs +48 -54
  106. package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
  107. package/dist/dropdown-menu-uGMnmGL-.js +1 -0
  108. package/dist/dropdown-menu.cjs +1 -1
  109. package/dist/dropdown-menu.mjs +3 -316
  110. package/dist/es2015-Cx0gpR1a.js +41 -0
  111. package/dist/es2015-a1b8kENC.mjs +701 -0
  112. package/dist/form.cjs +1 -1
  113. package/dist/form.mjs +76 -67
  114. package/dist/hover-card-DdIYJP-Q.mjs +167 -0
  115. package/dist/hover-card-Ua-2KlY-.js +1 -0
  116. package/dist/hover-card.cjs +1 -1
  117. package/dist/hover-card.mjs +3 -188
  118. package/dist/index.cjs +1 -1
  119. package/dist/index.d.ts +3 -35
  120. package/dist/index.mjs +56 -296
  121. package/dist/input.cjs +1 -1
  122. package/dist/input.mjs +14 -19
  123. package/dist/jsx-runtime-CN3qjQQx.js +6 -0
  124. package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
  125. package/dist/label-8YSUv4kt.js +1 -0
  126. package/dist/label-Bur66PVg.mjs +22 -0
  127. package/dist/label.cjs +1 -1
  128. package/dist/label.mjs +3 -22
  129. package/dist/menubar-Bq1Sfbf5.js +1 -0
  130. package/dist/menubar-D2fY6zkQ.mjs +410 -0
  131. package/dist/menubar.cjs +1 -1
  132. package/dist/menubar.mjs +3 -473
  133. package/dist/navigation-menu-BuOakbgA.mjs +602 -0
  134. package/dist/navigation-menu-so6EvLAY.js +1 -0
  135. package/dist/navigation-menu.cjs +1 -1
  136. package/dist/navigation-menu.mjs +3 -673
  137. package/dist/pagination.cjs +1 -1
  138. package/dist/pagination.mjs +63 -68
  139. package/dist/popover-BUADXRkO.mjs +201 -0
  140. package/dist/popover-nBrSPqHk.js +1 -0
  141. package/dist/popover.cjs +1 -1
  142. package/dist/popover.mjs +3 -242
  143. package/dist/progress-BTApMbqg.js +6 -0
  144. package/dist/progress-BbN-RNvs.mjs +81 -0
  145. package/dist/progress.cjs +1 -6
  146. package/dist/progress.mjs +3 -99
  147. package/dist/radio-group-C5oprOrt.mjs +193 -0
  148. package/dist/radio-group-FDXr6VLM.js +1 -0
  149. package/dist/radio-group.cjs +1 -1
  150. package/dist/radio-group.mjs +3 -253
  151. package/dist/resizable-ChdgCzzx.mjs +1534 -0
  152. package/dist/resizable-ztiFzq_y.js +1 -0
  153. package/dist/resizable.cjs +1 -1
  154. package/dist/resizable.mjs +3 -1990
  155. package/dist/scroll-area-3o0-cc3n.mjs +520 -0
  156. package/dist/scroll-area-DXZqIKXN.js +1 -0
  157. package/dist/scroll-area.cjs +1 -1
  158. package/dist/scroll-area.mjs +3 -546
  159. package/dist/scroll-to-top.cjs +1 -1
  160. package/dist/scroll-to-top.mjs +71 -84
  161. package/dist/search.cjs +1 -1
  162. package/dist/search.mjs +53 -63
  163. package/dist/select-B2qM503G.mjs +744 -0
  164. package/dist/select-BHCeW-MD.js +1 -0
  165. package/dist/select.cjs +1 -1
  166. package/dist/select.mjs +3 -908
  167. package/dist/separator-BZJ-SDvg.js +1 -0
  168. package/dist/separator-DJ_IwKUQ.mjs +31 -0
  169. package/dist/separator.cjs +1 -1
  170. package/dist/separator.mjs +3 -35
  171. package/dist/sheet.cjs +1 -1
  172. package/dist/sheet.mjs +59 -66
  173. package/dist/skeleton.cjs +1 -1
  174. package/dist/skeleton.mjs +13 -7
  175. package/dist/slider-CJJPQ0fH.mjs +366 -0
  176. package/dist/slider-DHccqrW2.js +1 -0
  177. package/dist/slider.cjs +1 -1
  178. package/dist/slider.mjs +3 -442
  179. package/dist/sonner.cjs +1 -1
  180. package/dist/sonner.mjs +21 -24
  181. package/dist/support-fab.cjs +1 -1
  182. package/dist/support-fab.mjs +81 -117
  183. package/dist/switch-BbcAUYjl.mjs +103 -0
  184. package/dist/switch-DZfRzgWs.js +1 -0
  185. package/dist/switch.cjs +1 -1
  186. package/dist/switch.mjs +3 -149
  187. package/dist/table-of-contents.cjs +1 -1
  188. package/dist/table-of-contents.mjs +159 -155
  189. package/dist/table.cjs +1 -1
  190. package/dist/table.mjs +58 -57
  191. package/dist/tabs-BEy0IIV0.js +1 -0
  192. package/dist/tabs-DqAKyl9T.mjs +136 -0
  193. package/dist/tabs.cjs +1 -1
  194. package/dist/tabs.mjs +3 -195
  195. package/dist/text.cjs +1 -1
  196. package/dist/text.mjs +41 -42
  197. package/dist/textarea.cjs +1 -1
  198. package/dist/textarea.mjs +12 -17
  199. package/dist/theme-provider.cjs +1 -1
  200. package/dist/theme-provider.mjs +15 -7
  201. package/dist/theme-toggle-DKQmD-FO.js +1 -0
  202. package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
  203. package/dist/theme-toggle.cjs +1 -1
  204. package/dist/theme-toggle.mjs +3 -8
  205. package/dist/toast-C84Cpidq.js +1 -0
  206. package/dist/toast-CQbUslcw.mjs +427 -0
  207. package/dist/toast.cjs +1 -1
  208. package/dist/toast.mjs +3 -494
  209. package/dist/toaster-BpcpNRz1.js +1 -0
  210. package/dist/toaster-i6giQYiq.mjs +126 -0
  211. package/dist/toaster.cjs +1 -1
  212. package/dist/toaster.mjs +3 -6
  213. package/dist/toggle-group-B2S7fkhA.mjs +155 -0
  214. package/dist/toggle-group-BNn6MNiJ.js +1 -0
  215. package/dist/toggle-group.cjs +1 -1
  216. package/dist/toggle-group.mjs +3 -170
  217. package/dist/toggle.cjs +1 -1
  218. package/dist/toggle.mjs +19 -14
  219. package/dist/tooltip-CElrNodA.js +1 -0
  220. package/dist/tooltip-oKfTBTbv.mjs +364 -0
  221. package/dist/tooltip.cjs +1 -1
  222. package/dist/tooltip.mjs +3 -342
  223. package/dist/utils-BxDanjP7.js +1 -0
  224. package/dist/utils-yc5uc46c.mjs +11 -0
  225. package/package.json +2 -2
  226. package/src/chart.tsx +7 -7
  227. package/src/setupTests.ts +5 -4
  228. package/dist/index-0ioNhtNM.mjs +0 -10
  229. package/dist/index-3j-XAIXT.mjs +0 -55
  230. package/dist/index-B2XtpfGY.js +0 -1
  231. package/dist/index-B39Lzq0v.js +0 -1
  232. package/dist/index-B7n6fy75.js +0 -1
  233. package/dist/index-B8dxbSWX.js +0 -41
  234. package/dist/index-BGIK9FQF.js +0 -1
  235. package/dist/index-BZPx6jYI.mjs +0 -8
  236. package/dist/index-BoNjHhm4.js +0 -1
  237. package/dist/index-BtZvtDmp.js +0 -1
  238. package/dist/index-Bv7qrYW6.mjs +0 -180
  239. package/dist/index-ByiPJW53.js +0 -5
  240. package/dist/index-C0dlIQIi.js +0 -1
  241. package/dist/index-C1qb0595.mjs +0 -27
  242. package/dist/index-C7HEunrh.mjs +0 -15
  243. package/dist/index-C8ni3LLa.js +0 -1
  244. package/dist/index-CCKe-Mpx.mjs +0 -6
  245. package/dist/index-CD6_IrA-.mjs +0 -10
  246. package/dist/index-CRyCZJLa.mjs +0 -677
  247. package/dist/index-CVx1AgNG.mjs +0 -615
  248. package/dist/index-Ce5TOFAK.js +0 -1
  249. package/dist/index-CeSLNJ60.mjs +0 -32
  250. package/dist/index-CefEQe_4.js +0 -1
  251. package/dist/index-Cj5hzyBi.js +0 -1
  252. package/dist/index-Cjj_rUPu.js +0 -1
  253. package/dist/index-Cl3G0jzM.js +0 -1
  254. package/dist/index-CwfE56Ep.mjs +0 -1545
  255. package/dist/index-CwyAfCwY.js +0 -1
  256. package/dist/index-CzY-WZXL.js +0 -1
  257. package/dist/index-D2HnlO3y.js +0 -1
  258. package/dist/index-DFdF7K7v.mjs +0 -50
  259. package/dist/index-DIsg7zU7.js +0 -1
  260. package/dist/index-DKN_vhyX.mjs +0 -32
  261. package/dist/index-DLcqcWxM.mjs +0 -29
  262. package/dist/index-DSxf1gN6.mjs +0 -118
  263. package/dist/index-DYxWvftI.js +0 -1
  264. package/dist/index-DaILh3TV.mjs +0 -32
  265. package/dist/index-Dfzl8TxY.mjs +0 -136
  266. package/dist/index-Dko2XdTk.js +0 -1
  267. package/dist/index-DlY82G31.mjs +0 -245
  268. package/dist/index-DnFcfnA9.mjs +0 -13
  269. package/dist/index-IZ2gq03c.mjs +0 -68
  270. package/dist/index-K9FzbxYw.mjs +0 -93
  271. package/dist/index-Le8p9oP4.mjs +0 -60
  272. package/dist/index-MQ0c3ZX_.js +0 -1
  273. package/dist/index-_XxjJPRD.js +0 -1
  274. package/dist/index-_wdrnYim.js +0 -1
  275. package/dist/index-jv3B4mTd.js +0 -1
  276. package/dist/index-kaM0u2Q1.js +0 -1
  277. package/dist/index-p6xVFRb4.mjs +0 -52
  278. package/dist/index-rKs9bXHr.mjs +0 -6
  279. package/dist/index-vuPgkS0V.mjs +0 -70
  280. package/dist/jsx-runtime-nZSsnGb7.js +0 -6
  281. package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
  282. package/dist/theme-toggle-DXQGNfCe.js +0 -1
  283. package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
  284. package/dist/toaster-C_S9hnXa.js +0 -1
  285. package/dist/toaster-k5DnQSsh.mjs +0 -118
  286. package/dist/utils-DY6fhrgS.mjs +0 -12
  287. package/dist/utils-cdbZV8DZ.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";const u=require("react"),l=require("react-dom"),f=require("./index-BtZvtDmp.js"),d=require("./index-MQ0c3ZX_.js"),p=require("./jsx-runtime-nZSsnGb7.js");function m(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=m(u);var P="Portal",c=a.forwardRef((e,r)=>{const{container:t,...n}=e,[s,i]=a.useState(!1);d.useLayoutEffect2(()=>i(!0),[]);const o=t||s&&globalThis?.document?.body;return o?l.createPortal(p.jsxRuntimeExports.jsx(f.Primitive.div,{...n,ref:r}),o):null});c.displayName=P;exports.Portal=c;
@@ -1 +0,0 @@
1
- "use strict";const u=require("react");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const n=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,n.get?n:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const r=a(u);function o(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...c)=>t.current?.(...c),[])}exports.useCallbackRef=o;
@@ -1 +0,0 @@
1
- "use strict";const b=require("react"),v=require("./jsx-runtime-nZSsnGb7.js");function j(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=j(b);function P(e,o){const t=i.createContext(o),s=c=>{const{children:n,...r}=c,u=i.useMemo(()=>r,Object.values(r));return v.jsxRuntimeExports.jsx(t.Provider,{value:u,children:n})};s.displayName=e+"Provider";function a(c){const n=i.useContext(t);if(n)return n;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,a]}function _(e,o=[]){let t=[];function s(c,n){const r=i.createContext(n),u=t.length;t=[...t,n];const d=p=>{const{scope:f,children:l,...x}=p,C=f?.[e]?.[u]||r,S=i.useMemo(()=>x,Object.values(x));return v.jsxRuntimeExports.jsx(C.Provider,{value:S,children:l})};d.displayName=c+"Provider";function m(p,f){const l=f?.[e]?.[u]||r,x=i.useContext(l);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[d,m]}const a=()=>{const c=t.map(n=>i.createContext(n));return function(r){const u=r?.[e]||c;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:u}}),[r,u])}};return a.scopeName=e,[s,h(a,...o)]}function h(...e){const o=e[0];if(e.length===1)return o;const t=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const n=s.reduce((r,{useScope:u,scopeName:d})=>{const p=u(c)[`__scope${d}`];return{...r,...p}},{});return i.useMemo(()=>({[`__scope${o.scopeName}`]:n}),[n])}};return t.scopeName=o.scopeName,t}exports.createContext2=P;exports.createContextScope=_;
@@ -1,50 +0,0 @@
1
- import r from "react";
2
- import { c as y } from "./index-IZ2gq03c.mjs";
3
- import { u as S } from "./index-DLcqcWxM.mjs";
4
- import { a as M } from "./index-K9FzbxYw.mjs";
5
- import { j as d } from "./jsx-runtime-tc70JA_2.mjs";
6
- function D(s) {
7
- const m = s + "CollectionProvider", [A, E] = y(m), [N, a] = A(
8
- m,
9
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
- ), p = (c) => {
11
- const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
12
- return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
13
- };
14
- p.displayName = m;
15
- const f = s + "CollectionSlot", _ = M(f), C = r.forwardRef(
16
- (c, e) => {
17
- const { scope: l, children: o } = c, t = a(f, l), n = S(e, t.collectionRef);
18
- return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
19
- }
20
- );
21
- C.displayName = f;
22
- const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
23
- (c, e) => {
24
- const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = a(u, l);
25
- return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => {
26
- i.itemMap.delete(n);
27
- })), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
28
- }
29
- );
30
- x.displayName = u;
31
- function O(c) {
32
- const e = a(s + "CollectionConsumer", c);
33
- return r.useCallback(() => {
34
- const o = e.collectionRef.current;
35
- if (!o) return [];
36
- const t = Array.from(o.querySelectorAll(`[${R}]`));
37
- return Array.from(e.itemMap.values()).sort(
38
- (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
39
- );
40
- }, [e.collectionRef, e.itemMap]);
41
- }
42
- return [
43
- { Provider: p, Slot: C, ItemSlot: x },
44
- O,
45
- E
46
- ];
47
- }
48
- export {
49
- D as c
50
- };
@@ -1 +0,0 @@
1
- "use strict";const H=require("react"),d=require("./index-BtZvtDmp.js"),$=require("./index-BGIK9FQF.js"),B=require("./index-_XxjJPRD.js"),Y=require("./index-D2HnlO3y.js"),z=require("./index-CefEQe_4.js"),V=require("./index-CzY-WZXL.js"),J=require("./index-Ce5TOFAK.js"),Q=require("./index-Dko2XdTk.js"),p=require("./jsx-runtime-nZSsnGb7.js");function W(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const c=W(H);var y="rovingFocusGroup.onEntryFocus",X={bubbles:!1,cancelable:!0},b="RovingFocusGroup",[j,P,Z]=$.createCollection(b),[ee,te]=Y.createContextScope(b,[Z]),[oe,re]=ee(b),D=c.forwardRef((e,o)=>p.jsxRuntimeExports.jsx(j.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsxRuntimeExports.jsx(j.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsxRuntimeExports.jsx(ne,{...e,ref:o})})}));D.displayName=b;var ne=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:r,orientation:t,loop:F=!1,dir:S,currentTabStopId:v,defaultCurrentTabStopId:T,onCurrentTabStopIdChange:w,onEntryFocus:m,preventScrollOnEntryFocus:u=!1,...I}=e,R=c.useRef(null),g=B.useComposedRefs(o,R),x=Q.useDirection(S),[E,n]=J.useControllableState({prop:v,defaultProp:T??null,onChange:w,caller:b}),[a,C]=c.useState(!1),i=V.useCallbackRef(m),l=P(r),_=c.useRef(!1),[K,A]=c.useState(0);return c.useEffect(()=>{const s=R.current;if(s)return s.addEventListener(y,i),()=>s.removeEventListener(y,i)},[i]),p.jsxRuntimeExports.jsx(oe,{scope:r,orientation:t,dir:x,loop:F,currentTabStopId:E,onItemFocus:c.useCallback(s=>n(s),[n]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(s=>s+1),[]),onFocusableItemRemove:c.useCallback(()=>A(s=>s-1),[]),children:p.jsxRuntimeExports.jsx(d.Primitive.div,{tabIndex:a||K===0?-1:0,"data-orientation":t,...I,ref:g,style:{outline:"none",...e.style},onMouseDown:d.composeEventHandlers(e.onMouseDown,()=>{_.current=!0}),onFocus:d.composeEventHandlers(e.onFocus,s=>{const M=!_.current;if(s.target===s.currentTarget&&M&&!a){const O=new CustomEvent(y,X);if(s.currentTarget.dispatchEvent(O),!O.defaultPrevented){const h=l().filter(f=>f.focusable),k=h.find(f=>f.active),L=h.find(f=>f.id===E),U=[k,L,...h].filter(Boolean).map(f=>f.ref.current);q(U,u)}}_.current=!1}),onBlur:d.composeEventHandlers(e.onBlur,()=>C(!1))})})}),G="RovingFocusGroupItem",N=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:r,focusable:t=!0,active:F=!1,tabStopId:S,children:v,...T}=e,w=z.useId(),m=S||w,u=re(G,r),I=u.currentTabStopId===m,R=P(r),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:E}=u;return c.useEffect(()=>{if(t)return g(),()=>x()},[t,g,x]),p.jsxRuntimeExports.jsx(j.ItemSlot,{scope:r,id:m,focusable:t,active:F,children:p.jsxRuntimeExports.jsx(d.Primitive.span,{tabIndex:I?0:-1,"data-orientation":u.orientation,...T,ref:o,onMouseDown:d.composeEventHandlers(e.onMouseDown,n=>{t?u.onItemFocus(m):n.preventDefault()}),onFocus:d.composeEventHandlers(e.onFocus,()=>u.onItemFocus(m)),onKeyDown:d.composeEventHandlers(e.onKeyDown,n=>{if(n.key==="Tab"&&n.shiftKey){u.onItemShiftTab();return}if(n.target!==n.currentTarget)return;const a=ue(n,u.orientation,u.dir);if(a!==void 0){if(n.metaKey||n.ctrlKey||n.altKey||n.shiftKey)return;n.preventDefault();let i=R().filter(l=>l.focusable).map(l=>l.ref.current);if(a==="last")i.reverse();else if(a==="prev"||a==="next"){a==="prev"&&i.reverse();const l=i.indexOf(n.currentTarget);i=u.loop?ie(i,l+1):i.slice(l+1)}setTimeout(()=>q(i))}}),children:typeof v=="function"?v({isCurrentTabStop:I,hasTabStop:E!=null}):v})})});N.displayName=G;var se={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ce(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ue(e,o,r){const t=ce(e.key,r);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return se[t]}function q(e,o=!1){const r=document.activeElement;for(const t of e)if(t===r||(t.focus({preventScroll:o}),document.activeElement!==r))return}function ie(e,o){return e.map((r,t)=>e[(o+t)%e.length])}var ae=D,le=N;exports.Item=le;exports.Root=ae;exports.createRovingFocusGroupScope=te;
@@ -1,32 +0,0 @@
1
- import * as i from "react";
2
- import { P as o } from "./index-K9FzbxYw.mjs";
3
- import { j as t } from "./jsx-runtime-tc70JA_2.mjs";
4
- var s = Object.freeze({
5
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
6
- position: "absolute",
7
- border: 0,
8
- width: 1,
9
- height: 1,
10
- padding: 0,
11
- margin: -1,
12
- overflow: "hidden",
13
- clip: "rect(0, 0, 0, 0)",
14
- whiteSpace: "nowrap",
15
- wordWrap: "normal"
16
- }), d = "VisuallyHidden", a = i.forwardRef(
17
- (r, e) => /* @__PURE__ */ t.jsx(
18
- o.span,
19
- {
20
- ...r,
21
- ref: e,
22
- style: { ...s, ...r.style }
23
- }
24
- )
25
- );
26
- a.displayName = d;
27
- var n = a;
28
- export {
29
- n as R,
30
- s as V,
31
- a
32
- };
@@ -1,29 +0,0 @@
1
- import * as l from "react";
2
- function s(n, o) {
3
- if (typeof n == "function")
4
- return n(o);
5
- n != null && (n.current = o);
6
- }
7
- function f(...n) {
8
- return (o) => {
9
- let u = !1;
10
- const c = n.map((t) => {
11
- const e = s(t, o);
12
- return !u && typeof e == "function" && (u = !0), e;
13
- });
14
- if (u)
15
- return () => {
16
- for (let t = 0; t < c.length; t++) {
17
- const e = c[t];
18
- typeof e == "function" ? e() : s(n[t], null);
19
- }
20
- };
21
- };
22
- }
23
- function i(...n) {
24
- return l.useCallback(f(...n), n);
25
- }
26
- export {
27
- f as c,
28
- i as u
29
- };
@@ -1,118 +0,0 @@
1
- import * as o from "react";
2
- import { P as v, c as I } from "./index-K9FzbxYw.mjs";
3
- import { c as O } from "./index-IZ2gq03c.mjs";
4
- import { u as S } from "./index-p6xVFRb4.mjs";
5
- import { u as D } from "./index-CCKe-Mpx.mjs";
6
- import { u as M } from "./index-DLcqcWxM.mjs";
7
- import { P as L } from "./index-vuPgkS0V.mjs";
8
- import { u as k } from "./index-DnFcfnA9.mjs";
9
- import { j as c } from "./jsx-runtime-tc70JA_2.mjs";
10
- var f = "Collapsible", [F, V] = O(f), [B, g] = F(f), T = o.forwardRef(
11
- (e, s) => {
12
- const {
13
- __scopeCollapsible: r,
14
- open: a,
15
- defaultOpen: t,
16
- disabled: l,
17
- onOpenChange: i,
18
- ...m
19
- } = e, [d, p] = S({
20
- prop: a,
21
- defaultProp: t ?? !1,
22
- onChange: i,
23
- caller: f
24
- });
25
- return /* @__PURE__ */ c.jsx(
26
- B,
27
- {
28
- scope: r,
29
- disabled: l,
30
- contentId: k(),
31
- open: d,
32
- onOpenToggle: o.useCallback(() => p((C) => !C), [p]),
33
- children: /* @__PURE__ */ c.jsx(
34
- v.div,
35
- {
36
- "data-state": x(d),
37
- "data-disabled": l ? "" : void 0,
38
- ...m,
39
- ref: s
40
- }
41
- )
42
- }
43
- );
44
- }
45
- );
46
- T.displayName = f;
47
- var j = "CollapsibleTrigger", w = o.forwardRef(
48
- (e, s) => {
49
- const { __scopeCollapsible: r, ...a } = e, t = g(j, r);
50
- return /* @__PURE__ */ c.jsx(
51
- v.button,
52
- {
53
- type: "button",
54
- "aria-controls": t.contentId,
55
- "aria-expanded": t.open || !1,
56
- "data-state": x(t.open),
57
- "data-disabled": t.disabled ? "" : void 0,
58
- disabled: t.disabled,
59
- ...a,
60
- ref: s,
61
- onClick: I(e.onClick, t.onOpenToggle)
62
- }
63
- );
64
- }
65
- );
66
- w.displayName = j;
67
- var R = "CollapsibleContent", A = o.forwardRef(
68
- (e, s) => {
69
- const { forceMount: r, ...a } = e, t = g(R, e.__scopeCollapsible);
70
- return /* @__PURE__ */ c.jsx(L, { present: r || t.open, children: ({ present: l }) => /* @__PURE__ */ c.jsx(G, { ...a, ref: s, present: l }) });
71
- }
72
- );
73
- A.displayName = R;
74
- var G = o.forwardRef((e, s) => {
75
- const { __scopeCollapsible: r, present: a, children: t, ...l } = e, i = g(R, r), [m, d] = o.useState(a), p = o.useRef(null), C = M(s, p), h = o.useRef(0), P = h.current, y = o.useRef(0), N = y.current, b = i.open || m, _ = o.useRef(b), u = o.useRef(void 0);
76
- return o.useEffect(() => {
77
- const n = requestAnimationFrame(() => _.current = !1);
78
- return () => cancelAnimationFrame(n);
79
- }, []), D(() => {
80
- const n = p.current;
81
- if (n) {
82
- u.current = u.current || {
83
- transitionDuration: n.style.transitionDuration,
84
- animationName: n.style.animationName
85
- }, n.style.transitionDuration = "0s", n.style.animationName = "none";
86
- const E = n.getBoundingClientRect();
87
- h.current = E.height, y.current = E.width, _.current || (n.style.transitionDuration = u.current.transitionDuration, n.style.animationName = u.current.animationName), d(a);
88
- }
89
- }, [i.open, a]), /* @__PURE__ */ c.jsx(
90
- v.div,
91
- {
92
- "data-state": x(i.open),
93
- "data-disabled": i.disabled ? "" : void 0,
94
- id: i.contentId,
95
- hidden: !b,
96
- ...l,
97
- ref: C,
98
- style: {
99
- "--radix-collapsible-content-height": P ? `${P}px` : void 0,
100
- "--radix-collapsible-content-width": N ? `${N}px` : void 0,
101
- ...e.style
102
- },
103
- children: b && t
104
- }
105
- );
106
- });
107
- function x(e) {
108
- return e ? "open" : "closed";
109
- }
110
- var W = T, X = w, Y = A;
111
- export {
112
- A as C,
113
- W as R,
114
- X as T,
115
- w as a,
116
- Y as b,
117
- V as c
118
- };
@@ -1 +0,0 @@
1
- "use strict";const c=require("react");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,u.get?u:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=o(c);function s(e){const r=n.useRef({value:e,previous:e});return n.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}exports.usePrevious=s;
@@ -1,32 +0,0 @@
1
- import * as n from "react";
2
- import "react-dom";
3
- import { c as f } from "./index-Le8p9oP4.mjs";
4
- import { j as l } from "./jsx-runtime-tc70JA_2.mjs";
5
- var u = [
6
- "a",
7
- "button",
8
- "div",
9
- "form",
10
- "h2",
11
- "h3",
12
- "img",
13
- "input",
14
- "label",
15
- "li",
16
- "nav",
17
- "ol",
18
- "p",
19
- "select",
20
- "span",
21
- "svg",
22
- "ul"
23
- ], w = u.reduce((t, i) => {
24
- const o = f(`Primitive.${i}`), r = n.forwardRef((e, a) => {
25
- const { asChild: m, ...s } = e, p = m ? o : i;
26
- return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l.jsx(p, { ...s, ref: a });
27
- });
28
- return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
- }, {});
30
- export {
31
- w as P
32
- };
@@ -1,136 +0,0 @@
1
- import * as i from "react";
2
- import { P as R, c as h, d as j } from "./index-K9FzbxYw.mjs";
3
- import { u as g } from "./index-DLcqcWxM.mjs";
4
- import { u as m } from "./index-0ioNhtNM.mjs";
5
- import { j as x } from "./jsx-runtime-tc70JA_2.mjs";
6
- function z(n, e = globalThis?.document) {
7
- const t = m(n);
8
- i.useEffect(() => {
9
- const o = (s) => {
10
- s.key === "Escape" && t(s);
11
- };
12
- return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
13
- }, [t, e]);
14
- }
15
- var H = "DismissableLayer", p = "dismissableLayer.update", K = "dismissableLayer.pointerDownOutside", M = "dismissableLayer.focusOutside", C, B = i.createContext({
16
- layers: /* @__PURE__ */ new Set(),
17
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
18
- branches: /* @__PURE__ */ new Set()
19
- }), T = i.forwardRef(
20
- (n, e) => {
21
- const {
22
- disableOutsidePointerEvents: t = !1,
23
- onEscapeKeyDown: o,
24
- onPointerDownOutside: s,
25
- onFocusOutside: c,
26
- onInteractOutside: f,
27
- onDismiss: d,
28
- ...E
29
- } = n, a = i.useContext(B), [u, S] = i.useState(null), l = u?.ownerDocument ?? globalThis?.document, [, W] = i.useState({}), k = g(e, (r) => S(r)), b = Array.from(a.layers), [A] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), N = b.indexOf(A), D = u ? b.indexOf(u) : -1, _ = a.layersWithOutsidePointerEventsDisabled.size > 0, P = D >= N, U = Y((r) => {
30
- const v = r.target, L = [...a.branches].some((y) => y.contains(v));
31
- !P || L || (s?.(r), f?.(r), r.defaultPrevented || d?.());
32
- }, l), O = q((r) => {
33
- const v = r.target;
34
- [...a.branches].some((y) => y.contains(v)) || (c?.(r), f?.(r), r.defaultPrevented || d?.());
35
- }, l);
36
- return z((r) => {
37
- D === a.layers.size - 1 && (o?.(r), !r.defaultPrevented && d && (r.preventDefault(), d()));
38
- }, l), i.useEffect(() => {
39
- if (u)
40
- return t && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (C = l.body.style.pointerEvents, l.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(u)), a.layers.add(u), w(), () => {
41
- t && a.layersWithOutsidePointerEventsDisabled.size === 1 && (l.body.style.pointerEvents = C);
42
- };
43
- }, [u, l, t, a]), i.useEffect(() => () => {
44
- u && (a.layers.delete(u), a.layersWithOutsidePointerEventsDisabled.delete(u), w());
45
- }, [u, a]), i.useEffect(() => {
46
- const r = () => W({});
47
- return document.addEventListener(p, r), () => document.removeEventListener(p, r);
48
- }, []), /* @__PURE__ */ x.jsx(
49
- R.div,
50
- {
51
- ...E,
52
- ref: k,
53
- style: {
54
- pointerEvents: _ ? P ? "auto" : "none" : void 0,
55
- ...n.style
56
- },
57
- onFocusCapture: h(n.onFocusCapture, O.onFocusCapture),
58
- onBlurCapture: h(n.onBlurCapture, O.onBlurCapture),
59
- onPointerDownCapture: h(
60
- n.onPointerDownCapture,
61
- U.onPointerDownCapture
62
- )
63
- }
64
- );
65
- }
66
- );
67
- T.displayName = H;
68
- var X = "DismissableLayerBranch", F = i.forwardRef((n, e) => {
69
- const t = i.useContext(B), o = i.useRef(null), s = g(e, o);
70
- return i.useEffect(() => {
71
- const c = o.current;
72
- if (c)
73
- return t.branches.add(c), () => {
74
- t.branches.delete(c);
75
- };
76
- }, [t.branches]), /* @__PURE__ */ x.jsx(R.div, { ...n, ref: s });
77
- });
78
- F.displayName = X;
79
- function Y(n, e = globalThis?.document) {
80
- const t = m(n), o = i.useRef(!1), s = i.useRef(() => {
81
- });
82
- return i.useEffect(() => {
83
- const c = (d) => {
84
- if (d.target && !o.current) {
85
- let E = function() {
86
- I(
87
- K,
88
- t,
89
- a,
90
- { discrete: !0 }
91
- );
92
- };
93
- const a = { originalEvent: d };
94
- d.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
95
- } else
96
- e.removeEventListener("click", s.current);
97
- o.current = !1;
98
- }, f = window.setTimeout(() => {
99
- e.addEventListener("pointerdown", c);
100
- }, 0);
101
- return () => {
102
- window.clearTimeout(f), e.removeEventListener("pointerdown", c), e.removeEventListener("click", s.current);
103
- };
104
- }, [e, t]), {
105
- // ensures we check React component tree (not just DOM tree)
106
- onPointerDownCapture: () => o.current = !0
107
- };
108
- }
109
- function q(n, e = globalThis?.document) {
110
- const t = m(n), o = i.useRef(!1);
111
- return i.useEffect(() => {
112
- const s = (c) => {
113
- c.target && !o.current && I(M, t, { originalEvent: c }, {
114
- discrete: !1
115
- });
116
- };
117
- return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
118
- }, [e, t]), {
119
- onFocusCapture: () => o.current = !0,
120
- onBlurCapture: () => o.current = !1
121
- };
122
- }
123
- function w() {
124
- const n = new CustomEvent(p);
125
- document.dispatchEvent(n);
126
- }
127
- function I(n, e, t, { discrete: o }) {
128
- const s = t.originalEvent.target, c = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
129
- e && s.addEventListener(n, e, { once: !0 }), o ? j(s, c) : s.dispatchEvent(c);
130
- }
131
- var Z = T, $ = F;
132
- export {
133
- $ as B,
134
- T as D,
135
- Z as R
136
- };
@@ -1 +0,0 @@
1
- "use strict";const c=require("react");require("./jsx-runtime-nZSsnGb7.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const o=i(c);var u=o.createContext(void 0);function a(e){const t=o.useContext(u);return e||t||"ltr"}exports.useDirection=a;
@@ -1,245 +0,0 @@
1
- import * as i from "react";
2
- import { P as p, c as g, a as B } from "./index-K9FzbxYw.mjs";
3
- import { u as R } from "./index-DLcqcWxM.mjs";
4
- import { a as H, c as V } from "./index-IZ2gq03c.mjs";
5
- import { u as C } from "./index-DnFcfnA9.mjs";
6
- import { u as q } from "./index-p6xVFRb4.mjs";
7
- import { D as K } from "./index-Dfzl8TxY.mjs";
8
- import { R as U, h as Y, u as Z, F as z } from "./index-CRyCZJLa.mjs";
9
- import { P as J } from "./index-C7HEunrh.mjs";
10
- import { P as _ } from "./index-vuPgkS0V.mjs";
11
- import { j as s } from "./jsx-runtime-tc70JA_2.mjs";
12
- var D = "Dialog", [y, ve] = V(D), [Q, u] = y(D), N = (e) => {
13
- const {
14
- __scopeDialog: t,
15
- children: n,
16
- open: a,
17
- defaultOpen: r,
18
- onOpenChange: o,
19
- modal: l = !0
20
- } = e, c = i.useRef(null), f = i.useRef(null), [v, x] = q({
21
- prop: a,
22
- defaultProp: r ?? !1,
23
- onChange: o,
24
- caller: D
25
- });
26
- return /* @__PURE__ */ s.jsx(
27
- Q,
28
- {
29
- scope: t,
30
- triggerRef: c,
31
- contentRef: f,
32
- contentId: C(),
33
- titleId: C(),
34
- descriptionId: C(),
35
- open: v,
36
- onOpenChange: x,
37
- onOpenToggle: i.useCallback(() => x(($) => !$), [x]),
38
- modal: l,
39
- children: n
40
- }
41
- );
42
- };
43
- N.displayName = D;
44
- var O = "DialogTrigger", I = i.forwardRef(
45
- (e, t) => {
46
- const { __scopeDialog: n, ...a } = e, r = u(O, n), o = R(t, r.triggerRef);
47
- return /* @__PURE__ */ s.jsx(
48
- p.button,
49
- {
50
- type: "button",
51
- "aria-haspopup": "dialog",
52
- "aria-expanded": r.open,
53
- "aria-controls": r.contentId,
54
- "data-state": P(r.open),
55
- ...a,
56
- ref: o,
57
- onClick: g(e.onClick, r.onOpenToggle)
58
- }
59
- );
60
- }
61
- );
62
- I.displayName = O;
63
- var h = "DialogPortal", [X, A] = y(h, {
64
- forceMount: void 0
65
- }), T = (e) => {
66
- const { __scopeDialog: t, forceMount: n, children: a, container: r } = e, o = u(h, t);
67
- return /* @__PURE__ */ s.jsx(X, { scope: t, forceMount: n, children: i.Children.map(a, (l) => /* @__PURE__ */ s.jsx(_, { present: n || o.open, children: /* @__PURE__ */ s.jsx(J, { asChild: !0, container: r, children: l }) })) });
68
- };
69
- T.displayName = h;
70
- var m = "DialogOverlay", j = i.forwardRef(
71
- (e, t) => {
72
- const n = A(m, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(m, e.__scopeDialog);
73
- return o.modal ? /* @__PURE__ */ s.jsx(_, { present: a || o.open, children: /* @__PURE__ */ s.jsx(oe, { ...r, ref: t }) }) : null;
74
- }
75
- );
76
- j.displayName = m;
77
- var ee = B("DialogOverlay.RemoveScroll"), oe = i.forwardRef(
78
- (e, t) => {
79
- const { __scopeDialog: n, ...a } = e, r = u(m, n);
80
- return (
81
- // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
82
- // ie. when `Overlay` and `Content` are siblings
83
- /* @__PURE__ */ s.jsx(U, { as: ee, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ s.jsx(
84
- p.div,
85
- {
86
- "data-state": P(r.open),
87
- ...a,
88
- ref: t,
89
- style: { pointerEvents: "auto", ...a.style }
90
- }
91
- ) })
92
- );
93
- }
94
- ), d = "DialogContent", b = i.forwardRef(
95
- (e, t) => {
96
- const n = A(d, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(d, e.__scopeDialog);
97
- return /* @__PURE__ */ s.jsx(_, { present: a || o.open, children: o.modal ? /* @__PURE__ */ s.jsx(te, { ...r, ref: t }) : /* @__PURE__ */ s.jsx(re, { ...r, ref: t }) });
98
- }
99
- );
100
- b.displayName = d;
101
- var te = i.forwardRef(
102
- (e, t) => {
103
- const n = u(d, e.__scopeDialog), a = i.useRef(null), r = R(t, n.contentRef, a);
104
- return i.useEffect(() => {
105
- const o = a.current;
106
- if (o) return Y(o);
107
- }, []), /* @__PURE__ */ s.jsx(
108
- M,
109
- {
110
- ...e,
111
- ref: r,
112
- trapFocus: n.open,
113
- disableOutsidePointerEvents: !0,
114
- onCloseAutoFocus: g(e.onCloseAutoFocus, (o) => {
115
- o.preventDefault(), n.triggerRef.current?.focus();
116
- }),
117
- onPointerDownOutside: g(e.onPointerDownOutside, (o) => {
118
- const l = o.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
119
- (l.button === 2 || c) && o.preventDefault();
120
- }),
121
- onFocusOutside: g(
122
- e.onFocusOutside,
123
- (o) => o.preventDefault()
124
- )
125
- }
126
- );
127
- }
128
- ), re = i.forwardRef(
129
- (e, t) => {
130
- const n = u(d, e.__scopeDialog), a = i.useRef(!1), r = i.useRef(!1);
131
- return /* @__PURE__ */ s.jsx(
132
- M,
133
- {
134
- ...e,
135
- ref: t,
136
- trapFocus: !1,
137
- disableOutsidePointerEvents: !1,
138
- onCloseAutoFocus: (o) => {
139
- e.onCloseAutoFocus?.(o), o.defaultPrevented || (a.current || n.triggerRef.current?.focus(), o.preventDefault()), a.current = !1, r.current = !1;
140
- },
141
- onInteractOutside: (o) => {
142
- e.onInteractOutside?.(o), o.defaultPrevented || (a.current = !0, o.detail.originalEvent.type === "pointerdown" && (r.current = !0));
143
- const l = o.target;
144
- n.triggerRef.current?.contains(l) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
145
- }
146
- }
147
- );
148
- }
149
- ), M = i.forwardRef(
150
- (e, t) => {
151
- const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: o, ...l } = e, c = u(d, n), f = i.useRef(null), v = R(t, f);
152
- return Z(), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
153
- /* @__PURE__ */ s.jsx(
154
- z,
155
- {
156
- asChild: !0,
157
- loop: !0,
158
- trapped: a,
159
- onMountAutoFocus: r,
160
- onUnmountAutoFocus: o,
161
- children: /* @__PURE__ */ s.jsx(
162
- K,
163
- {
164
- role: "dialog",
165
- id: c.contentId,
166
- "aria-describedby": c.descriptionId,
167
- "aria-labelledby": c.titleId,
168
- "data-state": P(c.open),
169
- ...l,
170
- ref: v,
171
- onDismiss: () => c.onOpenChange(!1)
172
- }
173
- )
174
- }
175
- ),
176
- /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
177
- /* @__PURE__ */ s.jsx(ne, { titleId: c.titleId }),
178
- /* @__PURE__ */ s.jsx(se, { contentRef: f, descriptionId: c.descriptionId })
179
- ] })
180
- ] });
181
- }
182
- ), E = "DialogTitle", F = i.forwardRef(
183
- (e, t) => {
184
- const { __scopeDialog: n, ...a } = e, r = u(E, n);
185
- return /* @__PURE__ */ s.jsx(p.h2, { id: r.titleId, ...a, ref: t });
186
- }
187
- );
188
- F.displayName = E;
189
- var w = "DialogDescription", S = i.forwardRef(
190
- (e, t) => {
191
- const { __scopeDialog: n, ...a } = e, r = u(w, n);
192
- return /* @__PURE__ */ s.jsx(p.p, { id: r.descriptionId, ...a, ref: t });
193
- }
194
- );
195
- S.displayName = w;
196
- var W = "DialogClose", k = i.forwardRef(
197
- (e, t) => {
198
- const { __scopeDialog: n, ...a } = e, r = u(W, n);
199
- return /* @__PURE__ */ s.jsx(
200
- p.button,
201
- {
202
- type: "button",
203
- ...a,
204
- ref: t,
205
- onClick: g(e.onClick, () => r.onOpenChange(!1))
206
- }
207
- );
208
- }
209
- );
210
- k.displayName = W;
211
- function P(e) {
212
- return e ? "open" : "closed";
213
- }
214
- var G = "DialogTitleWarning", [xe, L] = H(G, {
215
- contentName: d,
216
- titleName: E,
217
- docsSlug: "dialog"
218
- }), ne = ({ titleId: e }) => {
219
- const t = L(G), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
220
-
221
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
222
-
223
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
224
- return i.useEffect(() => {
225
- e && (document.getElementById(e) || console.error(n));
226
- }, [n, e]), null;
227
- }, ae = "DialogDescriptionWarning", se = ({ contentRef: e, descriptionId: t }) => {
228
- const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${L(ae).contentName}}.`;
229
- return i.useEffect(() => {
230
- const r = e.current?.getAttribute("aria-describedby");
231
- t && r && (document.getElementById(t) || console.warn(a));
232
- }, [a, e, t]), null;
233
- }, Ce = N, Re = I, _e = T, he = j, Ee = b, Pe = F, ye = S, Ne = k;
234
- export {
235
- Ee as C,
236
- ye as D,
237
- he as O,
238
- _e as P,
239
- Ce as R,
240
- Pe as T,
241
- xe as W,
242
- Ne as a,
243
- Re as b,
244
- ve as c
245
- };