@adamosuiteservices/ui 2.20.2 → 2.20.3

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 (88) hide show
  1. package/dist/accordion-rounded.cjs +1 -1
  2. package/dist/accordion-rounded.js +1 -1
  3. package/dist/accordion.cjs +1 -1
  4. package/dist/accordion.js +1 -1
  5. package/dist/checkbox-BHStM029.cjs +24 -0
  6. package/dist/{checkbox-DPlUjwLi.js → checkbox-DX8b_6kG.js} +4 -3
  7. package/dist/checkbox.cjs +1 -1
  8. package/dist/checkbox.js +1 -1
  9. package/dist/collapsible.cjs +1 -1
  10. package/dist/collapsible.js +1 -1
  11. package/dist/{combobox-DylTjGrw.cjs → combobox-BURhN76t.cjs} +1 -1
  12. package/dist/{combobox-DG9u4g84.js → combobox-BrHVXnf2.js} +3 -3
  13. package/dist/combobox.cjs +1 -1
  14. package/dist/combobox.js +1 -1
  15. package/dist/context-menu.cjs +8 -8
  16. package/dist/context-menu.js +56 -55
  17. package/dist/date-picker-selector.cjs +1 -1
  18. package/dist/date-picker-selector.js +2 -2
  19. package/dist/dialog.cjs +1 -1
  20. package/dist/dialog.js +1 -1
  21. package/dist/dropdown-menu.cjs +9 -9
  22. package/dist/dropdown-menu.js +33 -32
  23. package/dist/full-screen-loader.cjs +4 -4
  24. package/dist/full-screen-loader.js +27 -24
  25. package/dist/hover-card.cjs +2 -2
  26. package/dist/hover-card.js +12 -11
  27. package/dist/index-1Io41IIt.cjs +1 -0
  28. package/dist/index-437EL2iq.js +52 -0
  29. package/dist/index-B695uy69.js +9 -0
  30. package/dist/index-BE-HFcQ8.cjs +1 -0
  31. package/dist/{index-BPOsnOxS.js → index-BM2A-WRV.js} +1 -1
  32. package/dist/index-BOnhen57.cjs +1 -0
  33. package/dist/{index-D_hmhfRp.js → index-BPnOqaWN.js} +9 -8
  34. package/dist/index-BqyOu62e.cjs +1 -0
  35. package/dist/index-C8aODXfJ.cjs +1 -0
  36. package/dist/index-CFB4VzSW.js +542 -0
  37. package/dist/index-CgAmFB15.cjs +1 -0
  38. package/dist/{index-B76LQ4E5.js → index-CinpJ0oP.js} +24 -23
  39. package/dist/{index-wujanfX3.js → index-Cpaqurwq.js} +191 -190
  40. package/dist/{index-B6gxHWt9.js → index-CwrPuu3I.js} +15 -14
  41. package/dist/index-D3xJARPa.cjs +1 -0
  42. package/dist/index-DSj2iNTW.js +137 -0
  43. package/dist/{index-Ce7JfyIP.js → index-DWrql5dh.js} +11 -10
  44. package/dist/{index-BIydBVaH.js → index-E5ek046p.js} +78 -76
  45. package/dist/{index-BaCYnOIG.cjs → index-L8BhH23Y.cjs} +1 -1
  46. package/dist/index-ZzRl2Lfu.cjs +5 -0
  47. package/dist/index-_TfuLupy.cjs +41 -0
  48. package/dist/index-cBJ7G45l.cjs +1 -0
  49. package/dist/popover-Dod16CM1.cjs +15 -0
  50. package/dist/{popover-DcQ18EVl.js → popover-tP2NoMYx.js} +84 -82
  51. package/dist/popover.cjs +1 -1
  52. package/dist/popover.js +1 -1
  53. package/dist/radio-group.cjs +3 -3
  54. package/dist/radio-group.js +10 -9
  55. package/dist/select.cjs +8 -8
  56. package/dist/select.js +21 -19
  57. package/dist/{sheet-Cp6JGhWC.cjs → sheet-DR1nAs9U.cjs} +1 -1
  58. package/dist/{sheet-hWerE8S1.js → sheet-UNggtdu3.js} +1 -1
  59. package/dist/sheet.cjs +1 -1
  60. package/dist/sheet.js +1 -1
  61. package/dist/sidebar.cjs +1 -1
  62. package/dist/sidebar.js +1 -1
  63. package/dist/slider.cjs +5 -5
  64. package/dist/slider.js +7 -6
  65. package/dist/switch.cjs +3 -3
  66. package/dist/switch.js +8 -7
  67. package/dist/tabs-underline.cjs +1 -1
  68. package/dist/tabs-underline.js +1 -1
  69. package/dist/tabs.cjs +1 -1
  70. package/dist/tabs.js +1 -1
  71. package/dist/toggle.cjs +2 -2
  72. package/dist/toggle.js +6 -5
  73. package/dist/tooltip.cjs +3 -3
  74. package/dist/tooltip.js +23 -22
  75. package/docs/components/layout/full-screen-loader.md +16 -5
  76. package/package.json +4 -2
  77. package/dist/checkbox-CIzBdqN7.cjs +0 -24
  78. package/dist/index-8iwAKZIp.cjs +0 -1
  79. package/dist/index-BWaO7kQK.cjs +0 -1
  80. package/dist/index-BnkHpTJs.cjs +0 -1
  81. package/dist/index-C0UREtMP.js +0 -59
  82. package/dist/index-C2P2kXMc.cjs +0 -41
  83. package/dist/index-CC6DBo2g.cjs +0 -1
  84. package/dist/index-CRWn-2fF.cjs +0 -1
  85. package/dist/index-Ca99LLZF.cjs +0 -5
  86. package/dist/index-e0gNU5O1.js +0 -675
  87. package/dist/index-i5lLg35-.cjs +0 -1
  88. package/dist/popover-cGp_rNLg.cjs +0 -15
@@ -1,14 +1,15 @@
1
1
  "use client";
2
2
  import * as s from "react";
3
- import { c as p, u as H } from "./index-C0UREtMP.js";
4
- import { c as V, u as z } from "./index-CmWhhuj7.js";
5
- import { u as q } from "./index-DLcqcWxM.js";
6
- import { c as J } from "./index-FxyLF8MY.js";
7
- import { u as Q } from "./index-Cv867SGx.js";
3
+ import { c as p } from "./index-B695uy69.js";
4
+ import { c as H, u as V } from "./index-CmWhhuj7.js";
5
+ import { u as z } from "./index-DLcqcWxM.js";
6
+ import { c as q } from "./index-FxyLF8MY.js";
7
+ import { u as J } from "./index-Cv867SGx.js";
8
8
  import { P as G } from "./index-BMWt1NBG.js";
9
- import { u as W } from "./index-0ioNhtNM.js";
9
+ import { u as Q } from "./index-0ioNhtNM.js";
10
+ import { u as W } from "./index-437EL2iq.js";
10
11
  import { j as d } from "./jsx-runtime-BzflLqGi.js";
11
- var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [y, N, Z] = V(I), [$, Ie] = J(
12
+ var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [y, N, Z] = H(I), [$, be] = q(
12
13
  I,
13
14
  [Z]
14
15
  ), [ee, oe] = $(I), O = s.forwardRef(
@@ -27,12 +28,12 @@ var te = s.forwardRef((e, r) => {
27
28
  onEntryFocus: m,
28
29
  preventScrollOnEntryFocus: a = !1,
29
30
  ...b
30
- } = e, F = s.useRef(null), g = q(r, F), R = z(w), [E, t] = H({
31
+ } = e, F = s.useRef(null), g = z(r, F), R = V(w), [E, t] = W({
31
32
  prop: v,
32
33
  defaultProp: C ?? null,
33
34
  onChange: S,
34
35
  caller: I
35
- }), [i, h] = s.useState(!1), u = W(m), l = N(c), x = s.useRef(!1), [k, P] = s.useState(0);
36
+ }), [i, h] = s.useState(!1), u = Q(m), l = N(c), x = s.useRef(!1), [k, P] = s.useState(0);
36
37
  return s.useEffect(() => {
37
38
  const n = F.current;
38
39
  if (n)
@@ -96,7 +97,7 @@ var te = s.forwardRef((e, r) => {
96
97
  tabStopId: w,
97
98
  children: v,
98
99
  ...C
99
- } = e, S = Q(), m = w || S, a = oe(K, c), b = a.currentTabStopId === m, F = N(c), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = a;
100
+ } = e, S = J(), m = w || S, a = oe(K, c), b = a.currentTabStopId === m, F = N(c), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = a;
100
101
  return s.useEffect(() => {
101
102
  if (o)
102
103
  return g(), () => R();
@@ -172,9 +173,9 @@ function M(e, r = !1) {
172
173
  function ce(e, r) {
173
174
  return e.map((c, o) => e[(r + o) % e.length]);
174
175
  }
175
- var be = O, Fe = j;
176
+ var Fe = O, ge = j;
176
177
  export {
177
- Fe as I,
178
- be as R,
179
- Ie as c
178
+ ge as I,
179
+ Fe as R,
180
+ be as c
180
181
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";const B=require("react"),m=require("./index-BqyOu62e.cjs"),P=require("./index-Da298sEl.cjs"),Y=require("./index-_XxjJPRD.cjs"),z=require("./index-cwZN7ZY3.cjs"),V=require("./index-WIv2ndLu.cjs"),D=require("./index-CocSS1YK.cjs"),J=require("./index-CzY-WZXL.cjs"),Q=require("./index-C8aODXfJ.cjs"),f=require("./jsx-runtime-BB_1_6y_.cjs");function W(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const c=W(B);var y="rovingFocusGroup.onEntryFocus",X={bubbles:!1,cancelable:!0},b="RovingFocusGroup",[j,G,Z]=P.createCollection(b),[ee,te]=z.createContextScope(b,[Z]),[oe,ne]=ee(b),N=c.forwardRef((e,o)=>f.jsxRuntimeExports.jsx(j.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsxRuntimeExports.jsx(j.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsxRuntimeExports.jsx(re,{...e,ref:o})})}));N.displayName=b;var re=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:n,orientation:t,loop:F=!1,dir:S,currentTabStopId:v,defaultCurrentTabStopId:T,onCurrentTabStopIdChange:w,onEntryFocus:p,preventScrollOnEntryFocus:u=!1,...I}=e,R=c.useRef(null),g=Y.useComposedRefs(o,R),x=P.useDirection(S),[E,r]=Q.useControllableState({prop:v,defaultProp:T??null,onChange:w,caller:b}),[a,C]=c.useState(!1),i=J.useCallbackRef(p),l=G(n),_=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]),f.jsxRuntimeExports.jsx(oe,{scope:n,orientation:t,dir:x,loop:F,currentTabStopId:E,onItemFocus:c.useCallback(s=>r(s),[r]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(s=>s+1),[]),onFocusableItemRemove:c.useCallback(()=>A(s=>s-1),[]),children:f.jsxRuntimeExports.jsx(D.Primitive.div,{tabIndex:a||k===0?-1:0,"data-orientation":t,...I,ref:g,style:{outline:"none",...e.style},onMouseDown:m.composeEventHandlers(e.onMouseDown,()=>{_.current=!0}),onFocus:m.composeEventHandlers(e.onFocus,s=>{const L=!_.current;if(s.target===s.currentTarget&&L&&!a){const O=new CustomEvent(y,X);if(s.currentTarget.dispatchEvent(O),!O.defaultPrevented){const h=l().filter(d=>d.focusable),U=h.find(d=>d.active),H=h.find(d=>d.id===E),$=[U,H,...h].filter(Boolean).map(d=>d.ref.current);M($,u)}}_.current=!1}),onBlur:m.composeEventHandlers(e.onBlur,()=>C(!1))})})}),q="RovingFocusGroupItem",K=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:n,focusable:t=!0,active:F=!1,tabStopId:S,children:v,...T}=e,w=V.useId(),p=S||w,u=ne(q,n),I=u.currentTabStopId===p,R=G(n),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:E}=u;return c.useEffect(()=>{if(t)return g(),()=>x()},[t,g,x]),f.jsxRuntimeExports.jsx(j.ItemSlot,{scope:n,id:p,focusable:t,active:F,children:f.jsxRuntimeExports.jsx(D.Primitive.span,{tabIndex:I?0:-1,"data-orientation":u.orientation,...T,ref:o,onMouseDown:m.composeEventHandlers(e.onMouseDown,r=>{t?u.onItemFocus(p):r.preventDefault()}),onFocus:m.composeEventHandlers(e.onFocus,()=>u.onItemFocus(p)),onKeyDown:m.composeEventHandlers(e.onKeyDown,r=>{if(r.key==="Tab"&&r.shiftKey){u.onItemShiftTab();return}if(r.target!==r.currentTarget)return;const a=ue(r,u.orientation,u.dir);if(a!==void 0){if(r.metaKey||r.ctrlKey||r.altKey||r.shiftKey)return;r.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(r.currentTarget);i=u.loop?ie(i,l+1):i.slice(l+1)}setTimeout(()=>M(i))}}),children:typeof v=="function"?v({isCurrentTabStop:I,hasTabStop:E!=null}):v})})});K.displayName=q;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,n){const t=ce(e.key,n);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return se[t]}function M(e,o=!1){const n=document.activeElement;for(const t of e)if(t===n||(t.focus({preventScroll:o}),document.activeElement!==n))return}function ie(e,o){return e.map((n,t)=>e[(o+t)%e.length])}var ae=N,le=K;exports.Item=le;exports.Root=ae;exports.createRovingFocusGroupScope=te;
@@ -0,0 +1,137 @@
1
+ "use client";
2
+ import * as d from "react";
3
+ import { u as A } from "./index-DLcqcWxM.js";
4
+ import { P as M } from "./index-BMWt1NBG.js";
5
+ import { u as y } from "./index-0ioNhtNM.js";
6
+ import { j as _ } from "./jsx-runtime-BzflLqGi.js";
7
+ var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, t) => {
8
+ const {
9
+ loop: n = !1,
10
+ trapped: u = !1,
11
+ onMountAutoFocus: p,
12
+ onUnmountAutoFocus: L,
13
+ ...g
14
+ } = e, [s, P] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), R = A(t, (o) => P(o)), a = d.useRef({
15
+ paused: !1,
16
+ pause() {
17
+ this.paused = !0;
18
+ },
19
+ resume() {
20
+ this.paused = !1;
21
+ }
22
+ }).current;
23
+ d.useEffect(() => {
24
+ if (u) {
25
+ let o = function(i) {
26
+ if (a.paused || !s) return;
27
+ const c = i.target;
28
+ s.contains(c) ? b.current = c : f(b.current, { select: !0 });
29
+ }, l = function(i) {
30
+ if (a.paused || !s) return;
31
+ const c = i.relatedTarget;
32
+ c !== null && (s.contains(c) || f(b.current, { select: !0 }));
33
+ }, r = function(i) {
34
+ if (document.activeElement === document.body)
35
+ for (const h of i)
36
+ h.removedNodes.length > 0 && f(s);
37
+ };
38
+ document.addEventListener("focusin", o), document.addEventListener("focusout", l);
39
+ const m = new MutationObserver(r);
40
+ return s && m.observe(s, { childList: !0, subtree: !0 }), () => {
41
+ document.removeEventListener("focusin", o), document.removeEventListener("focusout", l), m.disconnect();
42
+ };
43
+ }
44
+ }, [u, s, a.paused]), d.useEffect(() => {
45
+ if (s) {
46
+ O.add(a);
47
+ const o = document.activeElement;
48
+ if (!s.contains(o)) {
49
+ const r = new CustomEvent(F, N);
50
+ s.addEventListener(F, E), s.dispatchEvent(r), r.defaultPrevented || (w(V(I(s)), { select: !0 }), document.activeElement === o && f(s));
51
+ }
52
+ return () => {
53
+ s.removeEventListener(F, E), setTimeout(() => {
54
+ const r = new CustomEvent(T, N);
55
+ s.addEventListener(T, v), s.dispatchEvent(r), r.defaultPrevented || f(o ?? document.body, { select: !0 }), s.removeEventListener(T, v), O.remove(a);
56
+ }, 0);
57
+ };
58
+ }
59
+ }, [s, E, v, a]);
60
+ const U = d.useCallback(
61
+ (o) => {
62
+ if (!n && !u || a.paused) return;
63
+ const l = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, r = document.activeElement;
64
+ if (l && r) {
65
+ const m = o.currentTarget, [i, c] = x(m);
66
+ i && c ? !o.shiftKey && r === c ? (o.preventDefault(), n && f(i, { select: !0 })) : o.shiftKey && r === i && (o.preventDefault(), n && f(c, { select: !0 })) : r === m && o.preventDefault();
67
+ }
68
+ },
69
+ [n, u, a.paused]
70
+ );
71
+ return /* @__PURE__ */ _.jsx(M.div, { tabIndex: -1, ...g, ref: R, onKeyDown: U });
72
+ });
73
+ k.displayName = K;
74
+ function w(e, { select: t = !1 } = {}) {
75
+ const n = document.activeElement;
76
+ for (const u of e)
77
+ if (f(u, { select: t }), document.activeElement !== n) return;
78
+ }
79
+ function x(e) {
80
+ const t = I(e), n = S(t, e), u = S(t.reverse(), e);
81
+ return [n, u];
82
+ }
83
+ function I(e) {
84
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
85
+ acceptNode: (u) => {
86
+ const p = u.tagName === "INPUT" && u.type === "hidden";
87
+ return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
88
+ }
89
+ });
90
+ for (; n.nextNode(); ) t.push(n.currentNode);
91
+ return t;
92
+ }
93
+ function S(e, t) {
94
+ for (const n of e)
95
+ if (!D(n, { upTo: t })) return n;
96
+ }
97
+ function D(e, { upTo: t }) {
98
+ if (getComputedStyle(e).visibility === "hidden") return !0;
99
+ for (; e; ) {
100
+ if (t !== void 0 && e === t) return !1;
101
+ if (getComputedStyle(e).display === "none") return !0;
102
+ e = e.parentElement;
103
+ }
104
+ return !1;
105
+ }
106
+ function H(e) {
107
+ return e instanceof HTMLInputElement && "select" in e;
108
+ }
109
+ function f(e, { select: t = !1 } = {}) {
110
+ if (e && e.focus) {
111
+ const n = document.activeElement;
112
+ e.focus({ preventScroll: !0 }), e !== n && H(e) && t && e.select();
113
+ }
114
+ }
115
+ var O = j();
116
+ function j() {
117
+ let e = [];
118
+ return {
119
+ add(t) {
120
+ const n = e[0];
121
+ t !== n && n?.pause(), e = C(e, t), e.unshift(t);
122
+ },
123
+ remove(t) {
124
+ e = C(e, t), e[0]?.resume();
125
+ }
126
+ };
127
+ }
128
+ function C(e, t) {
129
+ const n = [...e], u = n.indexOf(t);
130
+ return u !== -1 && n.splice(u, 1), n;
131
+ }
132
+ function V(e) {
133
+ return e.filter((t) => t.tagName !== "A");
134
+ }
135
+ export {
136
+ k as F
137
+ };
@@ -1,14 +1,15 @@
1
1
  "use client";
2
2
  import * as o from "react";
3
- import { u as I, c as O } from "./index-C0UREtMP.js";
4
- import { c as S } from "./index-FxyLF8MY.js";
3
+ import { c as I } from "./index-B695uy69.js";
4
+ import { c as O } from "./index-FxyLF8MY.js";
5
+ import { u as S } from "./index-437EL2iq.js";
5
6
  import { u as D } from "./index-CCKe-Mpx.js";
6
7
  import { u as M } from "./index-DLcqcWxM.js";
7
8
  import { P as v } from "./index-BMWt1NBG.js";
8
9
  import { P as L } from "./index-CSFEzRxy.js";
9
10
  import { u as k } from "./index-Cv867SGx.js";
10
11
  import { j as c } from "./jsx-runtime-BzflLqGi.js";
11
- var f = "Collapsible", [F, V] = S(f), [B, g] = F(f), T = o.forwardRef(
12
+ var f = "Collapsible", [F, W] = O(f), [B, g] = F(f), T = o.forwardRef(
12
13
  (e, s) => {
13
14
  const {
14
15
  __scopeCollapsible: r,
@@ -17,7 +18,7 @@ var f = "Collapsible", [F, V] = S(f), [B, g] = F(f), T = o.forwardRef(
17
18
  disabled: l,
18
19
  onOpenChange: i,
19
20
  ...m
20
- } = e, [d, p] = I({
21
+ } = e, [d, p] = S({
21
22
  prop: a,
22
23
  defaultProp: t ?? !1,
23
24
  onChange: i,
@@ -59,7 +60,7 @@ var j = "CollapsibleTrigger", w = o.forwardRef(
59
60
  disabled: t.disabled,
60
61
  ...a,
61
62
  ref: s,
62
- onClick: O(e.onClick, t.onOpenToggle)
63
+ onClick: I(e.onClick, t.onOpenToggle)
63
64
  }
64
65
  );
65
66
  }
@@ -108,12 +109,12 @@ var G = o.forwardRef((e, s) => {
108
109
  function x(e) {
109
110
  return e ? "open" : "closed";
110
111
  }
111
- var W = T, X = w, Y = A;
112
+ var X = T, Y = w, Z = A;
112
113
  export {
113
- Y as C,
114
- W as R,
115
- X as T,
114
+ Z as C,
115
+ X as R,
116
+ Y as T,
116
117
  w as a,
117
118
  A as b,
118
- V as c
119
+ W as c
119
120
  };
@@ -1,34 +1,36 @@
1
1
  "use client";
2
2
  import * as a from "react";
3
- import { u as $, c as m } from "./index-C0UREtMP.js";
4
- import { c as B, u as y } from "./index-DLcqcWxM.js";
5
- import { c as H, a as Z } from "./index-FxyLF8MY.js";
3
+ import { c as m } from "./index-B695uy69.js";
4
+ import { c as $, u as y } from "./index-DLcqcWxM.js";
5
+ import { c as B, a as H } from "./index-FxyLF8MY.js";
6
6
  import { u as x } from "./index-Cv867SGx.js";
7
- import { D as q } from "./index-BPOsnOxS.js";
8
- import { h as K, R as U, u as Y, F as z } from "./index-e0gNU5O1.js";
9
- import { P as J } from "./index-CZWDxvEo.js";
7
+ import { u as Z } from "./index-437EL2iq.js";
8
+ import { D as q } from "./index-BM2A-WRV.js";
9
+ import { F as K } from "./index-DSj2iNTW.js";
10
+ import { P as U } from "./index-CZWDxvEo.js";
10
11
  import { P as h } from "./index-CSFEzRxy.js";
11
12
  import { P as D } from "./index-BMWt1NBG.js";
13
+ import { h as Y, R as z, u as J } from "./index-CFB4VzSW.js";
12
14
  import { j as i } from "./jsx-runtime-BzflLqGi.js";
13
15
  // @__NO_SIDE_EFFECTS__
14
16
  function Q(e) {
15
- const t = /* @__PURE__ */ X(e), n = a.forwardRef((r, o) => {
16
- const { children: s, ...c } = r, l = a.Children.toArray(s), u = l.find(te);
17
+ const t = /* @__PURE__ */ X(e), r = a.forwardRef((n, o) => {
18
+ const { children: s, ...c } = n, l = a.Children.toArray(s), u = l.find(te);
17
19
  if (u) {
18
20
  const d = u.props.children, g = l.map((v) => v === u ? a.Children.count(d) > 1 ? a.Children.only(null) : a.isValidElement(d) ? d.props.children : null : v);
19
21
  return /* @__PURE__ */ i.jsx(t, { ...c, ref: o, children: a.isValidElement(d) ? a.cloneElement(d, void 0, g) : null });
20
22
  }
21
23
  return /* @__PURE__ */ i.jsx(t, { ...c, ref: o, children: s });
22
24
  });
23
- return n.displayName = `${e}.Slot`, n;
25
+ return r.displayName = `${e}.Slot`, r;
24
26
  }
25
27
  // @__NO_SIDE_EFFECTS__
26
28
  function X(e) {
27
- const t = a.forwardRef((n, r) => {
28
- const { children: o, ...s } = n;
29
+ const t = a.forwardRef((r, n) => {
30
+ const { children: o, ...s } = r;
29
31
  if (a.isValidElement(o)) {
30
- const c = ne(o), l = oe(s, o.props);
31
- return o.type !== a.Fragment && (l.ref = r ? B(r, c) : c), a.cloneElement(o, l);
32
+ const c = re(o), l = oe(s, o.props);
33
+ return o.type !== a.Fragment && (l.ref = n ? $(n, c) : c), a.cloneElement(o, l);
32
34
  }
33
35
  return a.Children.count(o) > 1 ? a.Children.only(null) : null;
34
36
  });
@@ -39,36 +41,36 @@ function te(e) {
39
41
  return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ee;
40
42
  }
41
43
  function oe(e, t) {
42
- const n = { ...t };
43
- for (const r in t) {
44
- const o = e[r], s = t[r];
45
- /^on[A-Z]/.test(r) ? o && s ? n[r] = (...l) => {
44
+ const r = { ...t };
45
+ for (const n in t) {
46
+ const o = e[n], s = t[n];
47
+ /^on[A-Z]/.test(n) ? o && s ? r[n] = (...l) => {
46
48
  const u = s(...l);
47
49
  return o(...l), u;
48
- } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" "));
50
+ } : o && (r[n] = o) : n === "style" ? r[n] = { ...o, ...s } : n === "className" && (r[n] = [o, s].filter(Boolean).join(" "));
49
51
  }
50
- return { ...e, ...n };
52
+ return { ...e, ...r };
51
53
  }
52
- function ne(e) {
53
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
54
- return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
54
+ function re(e) {
55
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
56
+ return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
55
57
  }
56
- var R = "Dialog", [O] = H(R), [re, f] = O(R), N = (e) => {
58
+ var R = "Dialog", [O] = B(R), [ne, f] = O(R), N = (e) => {
57
59
  const {
58
60
  __scopeDialog: t,
59
- children: n,
60
- open: r,
61
+ children: r,
62
+ open: n,
61
63
  defaultOpen: o,
62
64
  onOpenChange: s,
63
65
  modal: c = !0
64
- } = e, l = a.useRef(null), u = a.useRef(null), [d, g] = $({
65
- prop: r,
66
+ } = e, l = a.useRef(null), u = a.useRef(null), [d, g] = Z({
67
+ prop: n,
66
68
  defaultProp: o ?? !1,
67
69
  onChange: s,
68
70
  caller: R
69
71
  });
70
72
  return /* @__PURE__ */ i.jsx(
71
- re,
73
+ ne,
72
74
  {
73
75
  scope: t,
74
76
  triggerRef: l,
@@ -80,14 +82,14 @@ var R = "Dialog", [O] = H(R), [re, f] = O(R), N = (e) => {
80
82
  onOpenChange: g,
81
83
  onOpenToggle: a.useCallback(() => g((v) => !v), [g]),
82
84
  modal: c,
83
- children: n
85
+ children: r
84
86
  }
85
87
  );
86
88
  };
87
89
  N.displayName = R;
88
90
  var I = "DialogTrigger", b = a.forwardRef(
89
91
  (e, t) => {
90
- const { __scopeDialog: n, ...r } = e, o = f(I, n), s = y(t, o.triggerRef);
92
+ const { __scopeDialog: r, ...n } = e, o = f(I, r), s = y(t, o.triggerRef);
91
93
  return /* @__PURE__ */ i.jsx(
92
94
  D.button,
93
95
  {
@@ -96,7 +98,7 @@ var I = "DialogTrigger", b = a.forwardRef(
96
98
  "aria-expanded": o.open,
97
99
  "aria-controls": o.contentId,
98
100
  "data-state": P(o.open),
99
- ...r,
101
+ ...n,
100
102
  ref: s,
101
103
  onClick: m(e.onClick, o.onOpenToggle)
102
104
  }
@@ -107,56 +109,56 @@ b.displayName = I;
107
109
  var E = "DialogPortal", [se, j] = O(E, {
108
110
  forceMount: void 0
109
111
  }), A = (e) => {
110
- const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = f(E, t);
111
- return /* @__PURE__ */ i.jsx(se, { scope: t, forceMount: n, children: a.Children.map(r, (c) => /* @__PURE__ */ i.jsx(h, { present: n || s.open, children: /* @__PURE__ */ i.jsx(J, { asChild: !0, container: o, children: c }) })) });
112
+ const { __scopeDialog: t, forceMount: r, children: n, container: o } = e, s = f(E, t);
113
+ return /* @__PURE__ */ i.jsx(se, { scope: t, forceMount: r, children: a.Children.map(n, (c) => /* @__PURE__ */ i.jsx(h, { present: r || s.open, children: /* @__PURE__ */ i.jsx(U, { asChild: !0, container: o, children: c }) })) });
112
114
  };
113
115
  A.displayName = E;
114
116
  var C = "DialogOverlay", T = a.forwardRef(
115
117
  (e, t) => {
116
- const n = j(C, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = f(C, e.__scopeDialog);
117
- return s.modal ? /* @__PURE__ */ i.jsx(h, { present: r || s.open, children: /* @__PURE__ */ i.jsx(ie, { ...o, ref: t }) }) : null;
118
+ const r = j(C, e.__scopeDialog), { forceMount: n = r.forceMount, ...o } = e, s = f(C, e.__scopeDialog);
119
+ return s.modal ? /* @__PURE__ */ i.jsx(h, { present: n || s.open, children: /* @__PURE__ */ i.jsx(ie, { ...o, ref: t }) }) : null;
118
120
  }
119
121
  );
120
122
  T.displayName = C;
121
123
  var ae = /* @__PURE__ */ Q("DialogOverlay.RemoveScroll"), ie = a.forwardRef(
122
124
  (e, t) => {
123
- const { __scopeDialog: n, ...r } = e, o = f(C, n);
125
+ const { __scopeDialog: r, ...n } = e, o = f(C, r);
124
126
  return (
125
127
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
126
128
  // ie. when `Overlay` and `Content` are siblings
127
- /* @__PURE__ */ i.jsx(U, { as: ae, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i.jsx(
129
+ /* @__PURE__ */ i.jsx(z, { as: ae, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i.jsx(
128
130
  D.div,
129
131
  {
130
132
  "data-state": P(o.open),
131
- ...r,
133
+ ...n,
132
134
  ref: t,
133
- style: { pointerEvents: "auto", ...r.style }
135
+ style: { pointerEvents: "auto", ...n.style }
134
136
  }
135
137
  ) })
136
138
  );
137
139
  }
138
140
  ), p = "DialogContent", S = a.forwardRef(
139
141
  (e, t) => {
140
- const n = j(p, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = f(p, e.__scopeDialog);
141
- return /* @__PURE__ */ i.jsx(h, { present: r || s.open, children: s.modal ? /* @__PURE__ */ i.jsx(le, { ...o, ref: t }) : /* @__PURE__ */ i.jsx(ce, { ...o, ref: t }) });
142
+ const r = j(p, e.__scopeDialog), { forceMount: n = r.forceMount, ...o } = e, s = f(p, e.__scopeDialog);
143
+ return /* @__PURE__ */ i.jsx(h, { present: n || s.open, children: s.modal ? /* @__PURE__ */ i.jsx(le, { ...o, ref: t }) : /* @__PURE__ */ i.jsx(ce, { ...o, ref: t }) });
142
144
  }
143
145
  );
144
146
  S.displayName = p;
145
147
  var le = a.forwardRef(
146
148
  (e, t) => {
147
- const n = f(p, e.__scopeDialog), r = a.useRef(null), o = y(t, n.contentRef, r);
149
+ const r = f(p, e.__scopeDialog), n = a.useRef(null), o = y(t, r.contentRef, n);
148
150
  return a.useEffect(() => {
149
- const s = r.current;
150
- if (s) return K(s);
151
+ const s = n.current;
152
+ if (s) return Y(s);
151
153
  }, []), /* @__PURE__ */ i.jsx(
152
154
  M,
153
155
  {
154
156
  ...e,
155
157
  ref: o,
156
- trapFocus: n.open,
158
+ trapFocus: r.open,
157
159
  disableOutsidePointerEvents: !0,
158
160
  onCloseAutoFocus: m(e.onCloseAutoFocus, (s) => {
159
- s.preventDefault(), n.triggerRef.current?.focus();
161
+ s.preventDefault(), r.triggerRef.current?.focus();
160
162
  }),
161
163
  onPointerDownOutside: m(e.onPointerDownOutside, (s) => {
162
164
  const c = s.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0;
@@ -171,7 +173,7 @@ var le = a.forwardRef(
171
173
  }
172
174
  ), ce = a.forwardRef(
173
175
  (e, t) => {
174
- const n = f(p, e.__scopeDialog), r = a.useRef(!1), o = a.useRef(!1);
176
+ const r = f(p, e.__scopeDialog), n = a.useRef(!1), o = a.useRef(!1);
175
177
  return /* @__PURE__ */ i.jsx(
176
178
  M,
177
179
  {
@@ -180,26 +182,26 @@ var le = a.forwardRef(
180
182
  trapFocus: !1,
181
183
  disableOutsidePointerEvents: !1,
182
184
  onCloseAutoFocus: (s) => {
183
- e.onCloseAutoFocus?.(s), s.defaultPrevented || (r.current || n.triggerRef.current?.focus(), s.preventDefault()), r.current = !1, o.current = !1;
185
+ e.onCloseAutoFocus?.(s), s.defaultPrevented || (n.current || r.triggerRef.current?.focus(), s.preventDefault()), n.current = !1, o.current = !1;
184
186
  },
185
187
  onInteractOutside: (s) => {
186
- e.onInteractOutside?.(s), s.defaultPrevented || (r.current = !0, s.detail.originalEvent.type === "pointerdown" && (o.current = !0));
188
+ e.onInteractOutside?.(s), s.defaultPrevented || (n.current = !0, s.detail.originalEvent.type === "pointerdown" && (o.current = !0));
187
189
  const c = s.target;
188
- n.triggerRef.current?.contains(c) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && o.current && s.preventDefault();
190
+ r.triggerRef.current?.contains(c) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && o.current && s.preventDefault();
189
191
  }
190
192
  }
191
193
  );
192
194
  }
193
195
  ), M = a.forwardRef(
194
196
  (e, t) => {
195
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...c } = e, l = f(p, n), u = a.useRef(null), d = y(t, u);
196
- return Y(), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
197
+ const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: o, onCloseAutoFocus: s, ...c } = e, l = f(p, r), u = a.useRef(null), d = y(t, u);
198
+ return J(), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
197
199
  /* @__PURE__ */ i.jsx(
198
- z,
200
+ K,
199
201
  {
200
202
  asChild: !0,
201
203
  loop: !0,
202
- trapped: r,
204
+ trapped: n,
203
205
  onMountAutoFocus: o,
204
206
  onUnmountAutoFocus: s,
205
207
  children: /* @__PURE__ */ i.jsx(
@@ -225,26 +227,26 @@ var le = a.forwardRef(
225
227
  }
226
228
  ), _ = "DialogTitle", w = a.forwardRef(
227
229
  (e, t) => {
228
- const { __scopeDialog: n, ...r } = e, o = f(_, n);
229
- return /* @__PURE__ */ i.jsx(D.h2, { id: o.titleId, ...r, ref: t });
230
+ const { __scopeDialog: r, ...n } = e, o = f(_, r);
231
+ return /* @__PURE__ */ i.jsx(D.h2, { id: o.titleId, ...n, ref: t });
230
232
  }
231
233
  );
232
234
  w.displayName = _;
233
235
  var F = "DialogDescription", W = a.forwardRef(
234
236
  (e, t) => {
235
- const { __scopeDialog: n, ...r } = e, o = f(F, n);
236
- return /* @__PURE__ */ i.jsx(D.p, { id: o.descriptionId, ...r, ref: t });
237
+ const { __scopeDialog: r, ...n } = e, o = f(F, r);
238
+ return /* @__PURE__ */ i.jsx(D.p, { id: o.descriptionId, ...n, ref: t });
237
239
  }
238
240
  );
239
241
  W.displayName = F;
240
242
  var L = "DialogClose", k = a.forwardRef(
241
243
  (e, t) => {
242
- const { __scopeDialog: n, ...r } = e, o = f(L, n);
244
+ const { __scopeDialog: r, ...n } = e, o = f(L, r);
243
245
  return /* @__PURE__ */ i.jsx(
244
246
  D.button,
245
247
  {
246
248
  type: "button",
247
- ...r,
249
+ ...n,
248
250
  ref: t,
249
251
  onClick: m(e.onClick, () => o.onOpenChange(!1))
250
252
  }
@@ -255,33 +257,33 @@ k.displayName = L;
255
257
  function P(e) {
256
258
  return e ? "open" : "closed";
257
259
  }
258
- var G = "DialogTitleWarning", [Ee, V] = Z(G, {
260
+ var G = "DialogTitleWarning", [Pe, V] = H(G, {
259
261
  contentName: p,
260
262
  titleName: _,
261
263
  docsSlug: "dialog"
262
264
  }), ue = ({ titleId: e }) => {
263
- const t = V(G), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
265
+ const t = V(G), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
264
266
 
265
267
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
266
268
 
267
269
  For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
268
270
  return a.useEffect(() => {
269
- e && (document.getElementById(e) || console.error(n));
270
- }, [n, e]), null;
271
+ e && (document.getElementById(e) || console.error(r));
272
+ }, [r, e]), null;
271
273
  }, fe = "DialogDescriptionWarning", de = ({ contentRef: e, descriptionId: t }) => {
272
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V(fe).contentName}}.`;
274
+ const n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V(fe).contentName}}.`;
273
275
  return a.useEffect(() => {
274
276
  const o = e.current?.getAttribute("aria-describedby");
275
- t && o && (document.getElementById(t) || console.warn(r));
276
- }, [r, e, t]), null;
277
- }, _e = N, Pe = b, Oe = A, Ne = T, Ie = S, be = w, je = W, Ae = k;
277
+ t && o && (document.getElementById(t) || console.warn(n));
278
+ }, [n, e, t]), null;
279
+ }, Oe = N, Ne = b, Ie = A, be = T, je = S, Ae = w, Te = W, Se = k;
278
280
  export {
279
- Ae as C,
280
- je as D,
281
- Ne as O,
282
- Oe as P,
283
- _e as R,
284
- Pe as T,
285
- Ie as a,
286
- be as b
281
+ Se as C,
282
+ Te as D,
283
+ be as O,
284
+ Ie as P,
285
+ Oe as R,
286
+ Ne as T,
287
+ je as a,
288
+ Ae as b
287
289
  };
@@ -1 +1 @@
1
- "use client";"use strict";const A=require("react"),p=require("./index-BWaO7kQK.cjs"),h=require("./index-CocSS1YK.cjs"),w=require("./index-_XxjJPRD.cjs"),m=require("./index-CzY-WZXL.cjs"),x=require("./jsx-runtime-BB_1_6y_.cjs");function q(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const o=q(A);function H(t,e=globalThis?.document){const n=m.useCallbackRef(t);o.useEffect(()=>{const s=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var U="DismissableLayer",b="dismissableLayer.update",z="dismissableLayer.pointerDownOutside",K="dismissableLayer.focusOutside",R,T=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B=o.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:c,onInteractOutside:f,onDismiss:d,...E}=t,a=o.useContext(T),[u,k]=o.useState(null),l=u?.ownerDocument??globalThis?.document,[,F]=o.useState({}),I=w.useComposedRefs(e,i=>k(i)),D=Array.from(a.layers),[N]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),W=D.indexOf(N),O=u?D.indexOf(u):-1,_=a.layersWithOutsidePointerEventsDisabled.size>0,P=O>=W,j=X(i=>{const v=i.target,L=[...a.branches].some(y=>y.contains(v));!P||L||(r?.(i),f?.(i),i.defaultPrevented||d?.())},l),C=Y(i=>{const v=i.target;[...a.branches].some(y=>y.contains(v))||(c?.(i),f?.(i),i.defaultPrevented||d?.())},l);return H(i=>{O===a.layers.size-1&&(s?.(i),!i.defaultPrevented&&d&&(i.preventDefault(),d()))},l),o.useEffect(()=>{if(u)return n&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(R=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(u)),a.layers.add(u),g(),()=>{n&&a.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=R)}},[u,l,n,a]),o.useEffect(()=>()=>{u&&(a.layers.delete(u),a.layersWithOutsidePointerEventsDisabled.delete(u),g())},[u,a]),o.useEffect(()=>{const i=()=>F({});return document.addEventListener(b,i),()=>document.removeEventListener(b,i)},[]),x.jsxRuntimeExports.jsx(h.Primitive.div,{...E,ref:I,style:{pointerEvents:_?P?"auto":"none":void 0,...t.style},onFocusCapture:p.composeEventHandlers(t.onFocusCapture,C.onFocusCapture),onBlurCapture:p.composeEventHandlers(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:p.composeEventHandlers(t.onPointerDownCapture,j.onPointerDownCapture)})});B.displayName=U;var M="DismissableLayerBranch",$=o.forwardRef((t,e)=>{const n=o.useContext(T),s=o.useRef(null),r=w.useComposedRefs(e,s);return o.useEffect(()=>{const c=s.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),x.jsxRuntimeExports.jsx(h.Primitive.div,{...t,ref:r})});$.displayName=M;function X(t,e=globalThis?.document){const n=m.useCallbackRef(t),s=o.useRef(!1),r=o.useRef(()=>{});return o.useEffect(()=>{const c=d=>{if(d.target&&!s.current){let E=function(){S(z,n,a,{discrete:!0})};const a={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=E,e.addEventListener("click",r.current,{once:!0})):E()}else e.removeEventListener("click",r.current);s.current=!1},f=window.setTimeout(()=>{e.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),e.removeEventListener("pointerdown",c),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function Y(t,e=globalThis?.document){const n=m.useCallbackRef(t),s=o.useRef(!1);return o.useEffect(()=>{const r=c=>{c.target&&!s.current&&S(K,n,{originalEvent:c},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function g(){const t=new CustomEvent(b);document.dispatchEvent(t)}function S(t,e,n,{discrete:s}){const r=n.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),s?h.dispatchDiscreteCustomEvent(r,c):r.dispatchEvent(c)}exports.DismissableLayer=B;
1
+ "use client";"use strict";const A=require("react"),p=require("./index-BqyOu62e.cjs"),h=require("./index-CocSS1YK.cjs"),w=require("./index-_XxjJPRD.cjs"),m=require("./index-CzY-WZXL.cjs"),x=require("./jsx-runtime-BB_1_6y_.cjs");function q(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const o=q(A);function H(t,e=globalThis?.document){const n=m.useCallbackRef(t);o.useEffect(()=>{const s=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var U="DismissableLayer",b="dismissableLayer.update",z="dismissableLayer.pointerDownOutside",K="dismissableLayer.focusOutside",R,T=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B=o.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:c,onInteractOutside:f,onDismiss:d,...E}=t,a=o.useContext(T),[u,k]=o.useState(null),l=u?.ownerDocument??globalThis?.document,[,F]=o.useState({}),I=w.useComposedRefs(e,i=>k(i)),D=Array.from(a.layers),[N]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),W=D.indexOf(N),O=u?D.indexOf(u):-1,_=a.layersWithOutsidePointerEventsDisabled.size>0,P=O>=W,j=X(i=>{const v=i.target,L=[...a.branches].some(y=>y.contains(v));!P||L||(r?.(i),f?.(i),i.defaultPrevented||d?.())},l),C=Y(i=>{const v=i.target;[...a.branches].some(y=>y.contains(v))||(c?.(i),f?.(i),i.defaultPrevented||d?.())},l);return H(i=>{O===a.layers.size-1&&(s?.(i),!i.defaultPrevented&&d&&(i.preventDefault(),d()))},l),o.useEffect(()=>{if(u)return n&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(R=l.body.style.pointerEvents,l.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(u)),a.layers.add(u),g(),()=>{n&&a.layersWithOutsidePointerEventsDisabled.size===1&&(l.body.style.pointerEvents=R)}},[u,l,n,a]),o.useEffect(()=>()=>{u&&(a.layers.delete(u),a.layersWithOutsidePointerEventsDisabled.delete(u),g())},[u,a]),o.useEffect(()=>{const i=()=>F({});return document.addEventListener(b,i),()=>document.removeEventListener(b,i)},[]),x.jsxRuntimeExports.jsx(h.Primitive.div,{...E,ref:I,style:{pointerEvents:_?P?"auto":"none":void 0,...t.style},onFocusCapture:p.composeEventHandlers(t.onFocusCapture,C.onFocusCapture),onBlurCapture:p.composeEventHandlers(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:p.composeEventHandlers(t.onPointerDownCapture,j.onPointerDownCapture)})});B.displayName=U;var M="DismissableLayerBranch",$=o.forwardRef((t,e)=>{const n=o.useContext(T),s=o.useRef(null),r=w.useComposedRefs(e,s);return o.useEffect(()=>{const c=s.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),x.jsxRuntimeExports.jsx(h.Primitive.div,{...t,ref:r})});$.displayName=M;function X(t,e=globalThis?.document){const n=m.useCallbackRef(t),s=o.useRef(!1),r=o.useRef(()=>{});return o.useEffect(()=>{const c=d=>{if(d.target&&!s.current){let E=function(){S(z,n,a,{discrete:!0})};const a={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=E,e.addEventListener("click",r.current,{once:!0})):E()}else e.removeEventListener("click",r.current);s.current=!1},f=window.setTimeout(()=>{e.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),e.removeEventListener("pointerdown",c),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function Y(t,e=globalThis?.document){const n=m.useCallbackRef(t),s=o.useRef(!1);return o.useEffect(()=>{const r=c=>{c.target&&!s.current&&S(K,n,{originalEvent:c},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function g(){const t=new CustomEvent(b);document.dispatchEvent(t)}function S(t,e,n,{discrete:s}){const r=n.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),s?h.dispatchDiscreteCustomEvent(r,c):r.dispatchEvent(c)}exports.DismissableLayer=B;
@@ -0,0 +1,5 @@
1
+ "use client";"use strict";const V=require("react"),x=require("./index-BqyOu62e.cjs"),v=require("./index-_XxjJPRD.cjs"),O=require("./index-cwZN7ZY3.cjs"),C=require("./index-WIv2ndLu.cjs"),B=require("./index-C8aODXfJ.cjs"),Z=require("./index-L8BhH23Y.cjs"),z=require("./index-CgAmFB15.cjs"),K=require("./index-CBuLZ39k.cjs"),j=require("./index-DE3jjVoC.cjs"),m=require("./index-CocSS1YK.cjs"),y=require("./index-_TfuLupy.cjs"),a=require("./jsx-runtime-BB_1_6y_.cjs");function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const i=U(V);function Y(e){const t=J(e),o=i.forwardRef((r,n)=>{const{children:s,...c}=r,l=i.Children.toArray(s),u=l.find(X);if(u){const p=u.props.children,g=l.map(R=>R===u?i.Children.count(p)>1?i.Children.only(null):i.isValidElement(p)?p.props.children:null:R);return a.jsxRuntimeExports.jsx(t,{...c,ref:n,children:i.isValidElement(p)?i.cloneElement(p,void 0,g):null})}return a.jsxRuntimeExports.jsx(t,{...c,ref:n,children:s})});return o.displayName=`${e}.Slot`,o}function J(e){const t=i.forwardRef((o,r)=>{const{children:n,...s}=o;if(i.isValidElement(n)){const c=te(n),l=ee(s,n.props);return n.type!==i.Fragment&&(l.ref=r?v.composeRefs(r,c):c),i.cloneElement(n,l)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Q=Symbol("radix.slottable");function X(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q}function ee(e,t){const o={...t};for(const r in t){const n=e[r],s=t[r];/^on[A-Z]/.test(r)?n&&s?o[r]=(...l)=>{const u=s(...l);return n(...l),u}:n&&(o[r]=n):r==="style"?o[r]={...n,...s}:r==="className"&&(o[r]=[n,s].filter(Boolean).join(" "))}return{...e,...o}}function te(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var D="Dialog",[I]=O.createContextScope(D),[oe,d]=I(D),N=e=>{const{__scopeDialog:t,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:c=!0}=e,l=i.useRef(null),u=i.useRef(null),[p,g]=B.useControllableState({prop:r,defaultProp:n??!1,onChange:s,caller:D});return a.jsxRuntimeExports.jsx(oe,{scope:t,triggerRef:l,contentRef:u,contentId:C.useId(),titleId:C.useId(),descriptionId:C.useId(),open:p,onOpenChange:g,onOpenToggle:i.useCallback(()=>g(R=>!R),[g]),modal:c,children:o})};N.displayName=D;var b="DialogTrigger",T=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(b,o),s=v.useComposedRefs(t,n.triggerRef);return a.jsxRuntimeExports.jsx(m.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":P(n.open),...r,ref:s,onClick:x.composeEventHandlers(e.onClick,n.onOpenToggle)})});T.displayName=b;var _="DialogPortal",[ne,A]=I(_,{forceMount:void 0}),S=e=>{const{__scopeDialog:t,forceMount:o,children:r,container:n}=e,s=d(_,t);return a.jsxRuntimeExports.jsx(ne,{scope:t,forceMount:o,children:i.Children.map(r,c=>a.jsxRuntimeExports.jsx(j.Presence,{present:o||s.open,children:a.jsxRuntimeExports.jsx(K.Portal,{asChild:!0,container:n,children:c})}))})};S.displayName=_;var E="DialogOverlay",M=i.forwardRef((e,t)=>{const o=A(E,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,s=d(E,e.__scopeDialog);return s.modal?a.jsxRuntimeExports.jsx(j.Presence,{present:r||s.open,children:a.jsxRuntimeExports.jsx(se,{...n,ref:t})}):null});M.displayName=E;var re=Y("DialogOverlay.RemoveScroll"),se=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(E,o);return a.jsxRuntimeExports.jsx(y.ReactRemoveScroll,{as:re,allowPinchZoom:!0,shards:[n.contentRef],children:a.jsxRuntimeExports.jsx(m.Primitive.div,{"data-state":P(n.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),f="DialogContent",w=i.forwardRef((e,t)=>{const o=A(f,e.__scopeDialog),{forceMount:r=o.forceMount,...n}=e,s=d(f,e.__scopeDialog);return a.jsxRuntimeExports.jsx(j.Presence,{present:r||s.open,children:s.modal?a.jsxRuntimeExports.jsx(ie,{...n,ref:t}):a.jsxRuntimeExports.jsx(ae,{...n,ref:t})})});w.displayName=f;var ie=i.forwardRef((e,t)=>{const o=d(f,e.__scopeDialog),r=i.useRef(null),n=v.useComposedRefs(t,o.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return y.hideOthers(s)},[]),a.jsxRuntimeExports.jsx(F,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x.composeEventHandlers(e.onCloseAutoFocus,s=>{s.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:x.composeEventHandlers(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0;(c.button===2||l)&&s.preventDefault()}),onFocusOutside:x.composeEventHandlers(e.onFocusOutside,s=>s.preventDefault())})}),ae=i.forwardRef((e,t)=>{const o=d(f,e.__scopeDialog),r=i.useRef(!1),n=i.useRef(!1);return a.jsxRuntimeExports.jsx(F,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const c=s.target;o.triggerRef.current?.contains(c)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),F=i.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,...c}=e,l=d(f,o),u=i.useRef(null),p=v.useComposedRefs(t,u);return y.useFocusGuards(),a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[a.jsxRuntimeExports.jsx(z.FocusScope,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:a.jsxRuntimeExports.jsx(Z.DismissableLayer,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":P(l.open),...c,ref:p,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxRuntimeExports.jsxs(a.jsxRuntimeExports.Fragment,{children:[a.jsxRuntimeExports.jsx(le,{titleId:l.titleId}),a.jsxRuntimeExports.jsx(ue,{contentRef:u,descriptionId:l.descriptionId})]})]})}),h="DialogTitle",W=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(h,o);return a.jsxRuntimeExports.jsx(m.Primitive.h2,{id:n.titleId,...r,ref:t})});W.displayName=h;var $="DialogDescription",q=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d($,o);return a.jsxRuntimeExports.jsx(m.Primitive.p,{id:n.descriptionId,...r,ref:t})});q.displayName=$;var L="DialogClose",k=i.forwardRef((e,t)=>{const{__scopeDialog:o,...r}=e,n=d(L,o);return a.jsxRuntimeExports.jsx(m.Primitive.button,{type:"button",...r,ref:t,onClick:x.composeEventHandlers(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=L;function P(e){return e?"open":"closed"}var G="DialogTitleWarning",[ve,H]=O.createContext2(G,{contentName:f,titleName:h,docsSlug:"dialog"}),le=({titleId:e})=>{const t=H(G),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
+
3
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
+
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ce="DialogDescriptionWarning",ue=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${H(ce).contentName}}.`;return i.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},de=N,pe=T,fe=S,ge=M,xe=w,me=W,Re=q,Ee=k;exports.Close=Ee;exports.Content=xe;exports.Description=Re;exports.Overlay=ge;exports.Portal=fe;exports.Root=de;exports.Title=me;exports.Trigger=pe;