@pfct/purple 1.11.1 → 1.12.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 (114) hide show
  1. package/dist/assets/index.css +2 -2
  2. package/dist/chunks/Accordion.CxDfMzK1.js +1 -0
  3. package/dist/chunks/{Accordion.BiAAJwmC.js → Accordion.D8caFIuT.js} +3 -2
  4. package/dist/chunks/{Divider.k5ROyG2W.js → Divider.CinbGPsa.js} +1 -1
  5. package/dist/chunks/{Divider.CfGqsPOG.js → Divider.KzhgrMYv.js} +1 -1
  6. package/dist/chunks/{Switch.clBBQjY3.js → Switch.2ZixJdlG.js} +1 -1
  7. package/dist/chunks/{Switch.G7d5HjrW.js → Switch.Cf71RNLF.js} +2 -2
  8. package/dist/chunks/{bottomSheet.CbP1N3-g.js → bottomSheet.B5OrcCXx.js} +1 -1
  9. package/dist/chunks/{bottomSheet.BHvPqq91.js → bottomSheet.CnYVp9RP.js} +1 -1
  10. package/dist/chunks/{checkbox.DzMsJDRY.js → checkbox.CYGNBSUO.js} +1 -1
  11. package/dist/chunks/{checkbox.DjHLBzFe.js → checkbox.Dzvj-4RV.js} +2 -2
  12. package/dist/chunks/{dist.BbBE9J18.js → dist.6jgaVidM.js} +8 -7
  13. package/dist/chunks/dist.BixLWWwb.js +71 -0
  14. package/dist/chunks/dist.BoEBrFAh.js +1 -0
  15. package/dist/chunks/dist.C4D-6Tcr.js +1 -0
  16. package/dist/chunks/{dist.D_s4kUUr.js → dist.CDZCWPu4.js} +1 -1
  17. package/dist/chunks/{dist.COetszRA.js → dist.CJY8LqRA.js} +1 -1
  18. package/dist/chunks/dist.CT8nUj9V.js +1 -0
  19. package/dist/chunks/{dist.Cz5xL5vI.js → dist.CpTw9rlm.js} +1 -1
  20. package/dist/chunks/dist.Crl6KTg_.js +21 -0
  21. package/dist/chunks/dist.CwWM0zXK.js +25 -0
  22. package/dist/chunks/dist.DPo6XlLq.js +145 -0
  23. package/dist/chunks/dist.DTByVKhF.js +193 -0
  24. package/dist/chunks/dist.Ds9VPbBd.js +194 -0
  25. package/dist/chunks/dist.DvmdOncE.js +1 -0
  26. package/dist/chunks/dist.ERrpPEZ4.js +1 -0
  27. package/dist/chunks/dist.OINbhiqU.js +1 -0
  28. package/dist/chunks/dist.Xtc44Blp.js +1 -0
  29. package/dist/chunks/dist.mhQdJ8f2.js +170 -0
  30. package/dist/chunks/drawer.BewJ2D_w.js +1545 -0
  31. package/dist/chunks/drawer.Cty9wtvs.js +7 -0
  32. package/dist/chunks/es2015.ByVyszJo.js +562 -0
  33. package/dist/chunks/es2015.DoCbPEnP.js +41 -0
  34. package/dist/chunks/tooltip.Dv33hiJ0.js +1 -0
  35. package/dist/chunks/{tooltip.Bh_x0SaP.js → tooltip.w3pAhl4A.js} +5 -4
  36. package/dist/components/Accordion/index.cjs.js +1 -1
  37. package/dist/components/Accordion/index.esm.js +1 -1
  38. package/dist/components/Control/Switch/index.cjs.js +1 -1
  39. package/dist/components/Control/Switch/index.esm.js +1 -1
  40. package/dist/components/Control/index.cjs.js +1 -1
  41. package/dist/components/Control/index.esm.js +2 -2
  42. package/dist/components/DatePicker/RangeDatePickerModal/index.cjs.js +1 -1
  43. package/dist/components/DatePicker/RangeDatePickerModal/index.esm.js +1 -1
  44. package/dist/components/DatePicker/SingleDatePickerModal/index.cjs.js +1 -1
  45. package/dist/components/DatePicker/SingleDatePickerModal/index.esm.js +1 -1
  46. package/dist/components/Divider/index.cjs.js +1 -1
  47. package/dist/components/Divider/index.esm.js +1 -1
  48. package/dist/components/LegacyModal/index.cjs.js +1 -1
  49. package/dist/components/LegacyModal/index.esm.js +4 -4
  50. package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
  51. package/dist/components/MiniButton/IconMiniButton/index.esm.js +1 -1
  52. package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
  53. package/dist/components/MiniButton/UnderLineMiniButton/index.esm.js +1 -1
  54. package/dist/components/Modal/index.cjs.js +1 -1
  55. package/dist/components/Modal/index.esm.js +10 -10
  56. package/dist/components/Pagination/index.cjs.js +1 -1
  57. package/dist/components/Pagination/index.esm.js +1 -1
  58. package/dist/components/SelectBox/index.cjs.js +1 -1
  59. package/dist/components/SelectBox/index.d.ts +6 -0
  60. package/dist/components/SelectBox/index.d.ts.map +1 -1
  61. package/dist/components/SelectBox/index.esm.js +42 -70
  62. package/dist/components/Tag/index.cjs.js +1 -1
  63. package/dist/components/Tag/index.esm.js +1 -1
  64. package/dist/components/Terms/index.cjs.js +1 -1
  65. package/dist/components/Terms/index.esm.js +3 -3
  66. package/dist/components/index.cjs.js +1 -1
  67. package/dist/components/index.d.ts +1 -0
  68. package/dist/components/index.d.ts.map +1 -1
  69. package/dist/components/index.esm.js +16 -15
  70. package/dist/components/ui/bottomSheet.cjs.js +1 -1
  71. package/dist/components/ui/bottomSheet.esm.js +1 -1
  72. package/dist/components/ui/button.cjs.js +1 -1
  73. package/dist/components/ui/button.esm.js +1 -1
  74. package/dist/components/ui/checkbox.cjs.js +1 -1
  75. package/dist/components/ui/checkbox.esm.js +1 -1
  76. package/dist/components/ui/dialog.cjs.js +1 -1
  77. package/dist/components/ui/dialog.esm.js +10 -10
  78. package/dist/components/ui/drawer.cjs.js +1 -1
  79. package/dist/components/ui/drawer.esm.js +1 -1
  80. package/dist/components/ui/impact-tooltip.cjs.js +1 -1
  81. package/dist/components/ui/impact-tooltip.esm.js +83 -2
  82. package/dist/components/ui/select.cjs.js +1 -0
  83. package/dist/components/ui/select.d.ts +52 -0
  84. package/dist/components/ui/select.d.ts.map +1 -0
  85. package/dist/components/ui/select.esm.js +182 -0
  86. package/dist/components/ui/tooltip.cjs.js +1 -1
  87. package/dist/components/ui/tooltip.esm.js +1 -1
  88. package/dist/components/ui/typography.cjs.js +1 -1
  89. package/dist/components/ui/typography.esm.js +1 -1
  90. package/dist/icons/src/aliases/prefixed.d.ts +2 -2
  91. package/dist/icons/src/aliases/prefixed.d.ts.map +1 -1
  92. package/dist/icons/src/aliases/suffixed.d.ts +3 -3
  93. package/dist/icons/src/aliases/suffixed.d.ts.map +1 -1
  94. package/dist/icons/src/icons/index.d.ts +1 -1
  95. package/dist/icons/src/icons/index.d.ts.map +1 -1
  96. package/dist/index.cjs.js +1 -1
  97. package/dist/index.esm.js +19 -18
  98. package/dist/library/List/BottomSheetItemList/index.cjs.js +1 -1
  99. package/dist/library/List/BottomSheetItemList/index.esm.js +1 -1
  100. package/package.json +5 -5
  101. package/dist/chunks/Accordion.ClCq_Ey8.js +0 -1
  102. package/dist/chunks/dist.CbqoUpiO.js +0 -5
  103. package/dist/chunks/dist.CrnGARhp.js +0 -1
  104. package/dist/chunks/dist.DXWLF1yO.js +0 -137
  105. package/dist/chunks/dist.DxuGUd9a.js +0 -93
  106. package/dist/chunks/dist.eT0KQJF1.js +0 -1
  107. package/dist/chunks/dist.o_suB-Ao.js +0 -217
  108. package/dist/chunks/drawer.CsTGeQfm.js +0 -987
  109. package/dist/chunks/drawer.Dl1NBBot.js +0 -3
  110. package/dist/chunks/es2015.DT_gWqJq.js +0 -705
  111. package/dist/chunks/es2015.YOXqRYz1.js +0 -41
  112. package/dist/chunks/impact-tooltip.CqzKZc1i.js +0 -268
  113. package/dist/chunks/impact-tooltip.MXdAL7_2.js +0 -1
  114. package/dist/chunks/tooltip.DXsV-PA7.js +0 -1
@@ -1 +0,0 @@
1
- const e=require("./chunk.CMqjfN_6.js");let t=require("react");t=e.t(t,1);function n(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function r(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return!r&&typeof i==`function`&&(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];typeof r==`function`?r():n(e[t],null)}}}}function i(...e){return t.useCallback(r(...e),e)}function a(e){let n=t.forwardRef((n,r)=>{let{children:a,...o}=n,s=null,c=!1,p=[];m(a)&&typeof v==`function`&&(a=v(a._payload)),t.Children.forEach(a,e=>{if(f(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;m(n)&&typeof v==`function`&&(n=v(n._payload)),s=l(t,n),p.push(s?.props?.children)}else p.push(e)}),s?s=t.cloneElement(s,void 0,p):!c&&t.Children.count(a)===1&&t.isValidElement(a)&&(s=a);let h=s?d(s):void 0,y=i(r,h);if(!s){if(a||a===0)throw Error(c?_(e):g(e));return a}let b=u(o,s.props??{});return s.type!==t.Fragment&&(b.ref=r?y:h),t.cloneElement(s,b)});return n.displayName=`${e}.Slot`,n}var o=a(`Slot`),s=Symbol.for(`radix.slottable`);function c(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=s,t}var l=(e,n)=>{if(`child`in e.props){let n=e.props.child;return t.isValidElement(n)?t.cloneElement(n,void 0,e.props.children(n.props.children)):null}return t.isValidElement(n)?n:null};function u(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function d(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;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)}function f(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===s}var p=Symbol.for(`react.lazy`);function m(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===p&&`_payload`in e&&h(e._payload)}function h(e){return typeof e==`object`&&!!e&&`then`in e}var g=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,_=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,v=t.use;Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -1,137 +0,0 @@
1
- import { n as e, r as t } from "./dist.CzNkwCpH.js";
2
- import { i as n } from "./dist.DxuGUd9a.js";
3
- import { n as r, t as i } from "./dist.D_s4kUUr.js";
4
- import * as a from "react";
5
- import { jsx as o } from "react/jsx-runtime";
6
- import * as s from "react-dom";
7
- //#region node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
8
- function c(e) {
9
- let t = a.useRef(e);
10
- return a.useEffect(() => {
11
- t.current = e;
12
- }), a.useMemo(() => ((...e) => t.current?.(...e)), []);
13
- }
14
- //#endregion
15
- //#region node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
16
- function l(e, t = globalThis?.document) {
17
- let n = c(e);
18
- a.useEffect(() => {
19
- let e = (e) => {
20
- e.key === "Escape" && n(e);
21
- };
22
- return t.addEventListener("keydown", e, { capture: !0 }), () => t.removeEventListener("keydown", e, { capture: !0 });
23
- }, [n, t]);
24
- }
25
- //#endregion
26
- //#region node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
27
- var u = "DismissableLayer", d = "dismissableLayer.update", f = "dismissableLayer.pointerDownOutside", p = "dismissableLayer.focusOutside", m, h = a.createContext({
28
- layers: /* @__PURE__ */ new Set(),
29
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
30
- branches: /* @__PURE__ */ new Set()
31
- }), g = a.forwardRef((e, r) => {
32
- let { disableOutsidePointerEvents: s = !1, onEscapeKeyDown: c, onPointerDownOutside: u, onFocusOutside: f, onInteractOutside: p, onDismiss: g, ..._ } = e, v = a.useContext(h), [S, C] = a.useState(null), w = S?.ownerDocument ?? globalThis?.document, [, T] = a.useState({}), E = n(r, (e) => C(e)), D = Array.from(v.layers), [O] = [...v.layersWithOutsidePointerEventsDisabled].slice(-1), k = D.indexOf(O), A = S ? D.indexOf(S) : -1, j = v.layersWithOutsidePointerEventsDisabled.size > 0, M = A >= k, N = y((e) => {
33
- let t = e.target, n = [...v.branches].some((e) => e.contains(t));
34
- !M || n || (u?.(e), p?.(e), e.defaultPrevented || g?.());
35
- }, w), P = b((e) => {
36
- let t = e.target;
37
- [...v.branches].some((e) => e.contains(t)) || (f?.(e), p?.(e), e.defaultPrevented || g?.());
38
- }, w);
39
- return l((e) => {
40
- A === v.layers.size - 1 && (c?.(e), !e.defaultPrevented && g && (e.preventDefault(), g()));
41
- }, w), a.useEffect(() => {
42
- if (S) return s && (v.layersWithOutsidePointerEventsDisabled.size === 0 && (m = w.body.style.pointerEvents, w.body.style.pointerEvents = "none"), v.layersWithOutsidePointerEventsDisabled.add(S)), v.layers.add(S), x(), () => {
43
- s && (v.layersWithOutsidePointerEventsDisabled.delete(S), v.layersWithOutsidePointerEventsDisabled.size === 0 && (w.body.style.pointerEvents = m));
44
- };
45
- }, [
46
- S,
47
- w,
48
- s,
49
- v
50
- ]), a.useEffect(() => () => {
51
- S && (v.layers.delete(S), v.layersWithOutsidePointerEventsDisabled.delete(S), x());
52
- }, [S, v]), a.useEffect(() => {
53
- let e = () => T({});
54
- return document.addEventListener(d, e), () => document.removeEventListener(d, e);
55
- }, []), /* @__PURE__ */ o(i.div, {
56
- ..._,
57
- ref: E,
58
- style: {
59
- pointerEvents: j ? M ? "auto" : "none" : void 0,
60
- ...e.style
61
- },
62
- onFocusCapture: t(e.onFocusCapture, P.onFocusCapture),
63
- onBlurCapture: t(e.onBlurCapture, P.onBlurCapture),
64
- onPointerDownCapture: t(e.onPointerDownCapture, N.onPointerDownCapture)
65
- });
66
- });
67
- g.displayName = u;
68
- var _ = "DismissableLayerBranch", v = a.forwardRef((e, t) => {
69
- let r = a.useContext(h), s = a.useRef(null), c = n(t, s);
70
- return a.useEffect(() => {
71
- let e = s.current;
72
- if (e) return r.branches.add(e), () => {
73
- r.branches.delete(e);
74
- };
75
- }, [r.branches]), /* @__PURE__ */ o(i.div, {
76
- ...e,
77
- ref: c
78
- });
79
- });
80
- v.displayName = _;
81
- function y(e, t = globalThis?.document) {
82
- let n = c(e), r = a.useRef(!1), i = a.useRef(() => {});
83
- return a.useEffect(() => {
84
- let e = (e) => {
85
- if (e.target && !r.current) {
86
- let r = function() {
87
- S(f, n, a, { discrete: !0 });
88
- }, a = { originalEvent: e };
89
- e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = r, t.addEventListener("click", i.current, { once: !0 })) : r();
90
- } else t.removeEventListener("click", i.current);
91
- r.current = !1;
92
- }, a = window.setTimeout(() => {
93
- t.addEventListener("pointerdown", e);
94
- }, 0);
95
- return () => {
96
- window.clearTimeout(a), t.removeEventListener("pointerdown", e), t.removeEventListener("click", i.current);
97
- };
98
- }, [t, n]), { onPointerDownCapture: () => r.current = !0 };
99
- }
100
- function b(e, t = globalThis?.document) {
101
- let n = c(e), r = a.useRef(!1);
102
- return a.useEffect(() => {
103
- let e = (e) => {
104
- e.target && !r.current && S(p, n, { originalEvent: e }, { discrete: !1 });
105
- };
106
- return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
107
- }, [t, n]), {
108
- onFocusCapture: () => r.current = !0,
109
- onBlurCapture: () => r.current = !1
110
- };
111
- }
112
- function x() {
113
- let e = new CustomEvent(d);
114
- document.dispatchEvent(e);
115
- }
116
- function S(e, t, n, { discrete: i }) {
117
- let a = n.originalEvent.target, o = new CustomEvent(e, {
118
- bubbles: !1,
119
- cancelable: !0,
120
- detail: n
121
- });
122
- t && a.addEventListener(e, t, { once: !0 }), i ? r(a, o) : a.dispatchEvent(o);
123
- }
124
- //#endregion
125
- //#region node_modules/@radix-ui/react-portal/dist/index.mjs
126
- var C = "Portal", w = a.forwardRef((t, n) => {
127
- let { container: r, ...c } = t, [l, u] = a.useState(!1);
128
- e(() => u(!0), []);
129
- let d = r || l && globalThis?.document?.body;
130
- return d ? s.createPortal(/* @__PURE__ */ o(i.div, {
131
- ...c,
132
- ref: n
133
- }), d) : null;
134
- });
135
- w.displayName = C;
136
- //#endregion
137
- export { g as n, c as r, w as t };
@@ -1,93 +0,0 @@
1
- import * as e from "react";
2
- //#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
3
- function t(e, t) {
4
- if (typeof e == "function") return e(t);
5
- e != null && (e.current = t);
6
- }
7
- function n(...e) {
8
- return (n) => {
9
- let r = !1, i = e.map((e) => {
10
- let i = t(e, n);
11
- return !r && typeof i == "function" && (r = !0), i;
12
- });
13
- if (r) return () => {
14
- for (let n = 0; n < i.length; n++) {
15
- let r = i[n];
16
- typeof r == "function" ? r() : t(e[n], null);
17
- }
18
- };
19
- };
20
- }
21
- function r(...t) {
22
- return e.useCallback(n(...t), t);
23
- }
24
- //#endregion
25
- //#region node_modules/@radix-ui/react-slot/dist/index.mjs
26
- // @__NO_SIDE_EFFECTS__
27
- function i(t) {
28
- let n = e.forwardRef((n, i) => {
29
- let { children: a, ...o } = n, s = null, f = !1, m = [];
30
- p(a) && typeof _ == "function" && (a = _(a._payload)), e.Children.forEach(a, (e) => {
31
- if (d(e)) {
32
- f = !0;
33
- let t = e, n = "child" in t.props ? t.props.child : t.props.children;
34
- p(n) && typeof _ == "function" && (n = _(n._payload)), s = c(t, n), m.push(s?.props?.children);
35
- } else m.push(e);
36
- }), s ? s = e.cloneElement(s, void 0, m) : !f && e.Children.count(a) === 1 && e.isValidElement(a) && (s = a);
37
- let v = s ? u(s) : void 0, y = r(i, v);
38
- if (!s) {
39
- if (a || a === 0) throw Error(f ? g(t) : h(t));
40
- return a;
41
- }
42
- let b = l(o, s.props ?? {});
43
- return s.type !== e.Fragment && (b.ref = i ? y : v), e.cloneElement(s, b);
44
- });
45
- return n.displayName = `${t}.Slot`, n;
46
- }
47
- var a = /* @__PURE__ */ i("Slot"), o = Symbol.for("radix.slottable");
48
- // @__NO_SIDE_EFFECTS__
49
- function s(e) {
50
- let t = (e) => "child" in e ? e.children(e.child) : e.children;
51
- return t.displayName = `${e}.Slottable`, t.__radixId = o, t;
52
- }
53
- var c = (t, n) => {
54
- if ("child" in t.props) {
55
- let n = t.props.child;
56
- return e.isValidElement(n) ? e.cloneElement(n, void 0, t.props.children(n.props.children)) : null;
57
- }
58
- return e.isValidElement(n) ? n : null;
59
- };
60
- function l(e, t) {
61
- let n = { ...t };
62
- for (let r in t) {
63
- let i = e[r], a = t[r];
64
- /^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
65
- let t = a(...e);
66
- return i(...e), t;
67
- } : i && (n[r] = i) : r === "style" ? n[r] = {
68
- ...i,
69
- ...a
70
- } : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
71
- }
72
- return {
73
- ...e,
74
- ...n
75
- };
76
- }
77
- function u(e) {
78
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
79
- 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);
80
- }
81
- function d(t) {
82
- return e.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === o;
83
- }
84
- var f = Symbol.for("react.lazy");
85
- function p(e) {
86
- return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === f && "_payload" in e && m(e._payload);
87
- }
88
- function m(e) {
89
- return typeof e == "object" && !!e && "then" in e;
90
- }
91
- var h = (e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, g = (e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, _ = e.use;
92
- //#endregion
93
- export { r as i, i as n, s as r, a as t };
@@ -1 +0,0 @@
1
- const e=require("./chunk.CMqjfN_6.js"),t=require("./dist.DTg4gm8w.js"),n=require("./dist.CrnGARhp.js"),r=require("./dist.Cz5xL5vI.js");let i=require("react");i=e.t(i,1);let a=require("react/jsx-runtime"),o=require("react-dom");o=e.t(o,1);function s(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>((...e)=>t.current?.(...e)),[])}function c(e,t=globalThis?.document){let n=s(e);i.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var l=`DismissableLayer`,u=`dismissableLayer.update`,d=`dismissableLayer.pointerDownOutside`,f=`dismissableLayer.focusOutside`,p,m=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),h=i.forwardRef((e,o)=>{let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:g,..._}=e,x=i.useContext(m),[S,C]=i.useState(null),w=S?.ownerDocument??globalThis?.document,[,T]=i.useState({}),E=n.i(o,e=>C(e)),D=Array.from(x.layers),[O]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),k=D.indexOf(O),A=S?D.indexOf(S):-1,j=x.layersWithOutsidePointerEventsDisabled.size>0,M=A>=k,N=v(e=>{let t=e.target,n=[...x.branches].some(e=>e.contains(t));!M||n||(d?.(e),h?.(e),e.defaultPrevented||g?.())},w),P=y(e=>{let t=e.target;[...x.branches].some(e=>e.contains(t))||(f?.(e),h?.(e),e.defaultPrevented||g?.())},w);return c(e=>{A===x.layers.size-1&&(l?.(e),!e.defaultPrevented&&g&&(e.preventDefault(),g()))},w),i.useEffect(()=>{if(S)return s&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(p=w.body.style.pointerEvents,w.body.style.pointerEvents=`none`),x.layersWithOutsidePointerEventsDisabled.add(S)),x.layers.add(S),b(),()=>{s&&(x.layersWithOutsidePointerEventsDisabled.delete(S),x.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=p))}},[S,w,s,x]),i.useEffect(()=>()=>{S&&(x.layers.delete(S),x.layersWithOutsidePointerEventsDisabled.delete(S),b())},[S,x]),i.useEffect(()=>{let e=()=>T({});return document.addEventListener(u,e),()=>document.removeEventListener(u,e)},[]),(0,a.jsx)(r.t.div,{..._,ref:E,style:{pointerEvents:j?M?`auto`:`none`:void 0,...e.style},onFocusCapture:t.r(e.onFocusCapture,P.onFocusCapture),onBlurCapture:t.r(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:t.r(e.onPointerDownCapture,N.onPointerDownCapture)})});h.displayName=l;var g=`DismissableLayerBranch`,_=i.forwardRef((e,t)=>{let o=i.useContext(m),s=i.useRef(null),c=n.i(t,s);return i.useEffect(()=>{let e=s.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),(0,a.jsx)(r.t.div,{...e,ref:c})});_.displayName=g;function v(e,t=globalThis?.document){let n=s(e),r=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){x(d,n,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,a.current),a.current=r,t.addEventListener(`click`,a.current,{once:!0})):r()}else t.removeEventListener(`click`,a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(i),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function y(e,t=globalThis?.document){let n=s(e),r=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!r.current&&x(f,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function b(){let e=new CustomEvent(u);document.dispatchEvent(e)}function x(e,t,n,{discrete:i}){let a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),i?r.n(a,o):a.dispatchEvent(o)}var S=`Portal`,C=i.forwardRef((e,n)=>{let{container:s,...c}=e,[l,u]=i.useState(!1);t.n(()=>u(!0),[]);let d=s||l&&globalThis?.document?.body;return d?o.createPortal((0,a.jsx)(r.t.div,{...c,ref:n}),d):null});C.displayName=S,Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return C}});
@@ -1,217 +0,0 @@
1
- import { a as e, i as t, r as n, t as r } from "./dist.CzNkwCpH.js";
2
- import { i, n as a } from "./dist.DxuGUd9a.js";
3
- import { t as o } from "./dist.D_s4kUUr.js";
4
- import { t as s } from "./dist.Ct4Usz2n.js";
5
- import { t as c } from "./dist.Cfck23KY.js";
6
- import { n as l, t as u } from "./dist.DXWLF1yO.js";
7
- import { i as d, n as f, r as p, t as m } from "./es2015.DT_gWqJq.js";
8
- import * as h from "react";
9
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
10
- //#region node_modules/@radix-ui/react-dialog/dist/index.mjs
11
- var y = "Dialog", [b, ee] = e(y), [x, S] = b(y), C = (e) => {
12
- let { __scopeDialog: t, children: n, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, l = h.useRef(null), u = h.useRef(null), [d, f] = r({
13
- prop: i,
14
- defaultProp: a ?? !1,
15
- onChange: o,
16
- caller: y
17
- });
18
- return /* @__PURE__ */ _(x, {
19
- scope: t,
20
- triggerRef: l,
21
- contentRef: u,
22
- contentId: c(),
23
- titleId: c(),
24
- descriptionId: c(),
25
- open: d,
26
- onOpenChange: f,
27
- onOpenToggle: h.useCallback(() => f((e) => !e), [f]),
28
- modal: s,
29
- children: n
30
- });
31
- };
32
- C.displayName = y;
33
- var w = "DialogTrigger", T = h.forwardRef((e, t) => {
34
- let { __scopeDialog: r, ...a } = e, s = S(w, r), c = i(t, s.triggerRef);
35
- return /* @__PURE__ */ _(o.button, {
36
- type: "button",
37
- "aria-haspopup": "dialog",
38
- "aria-expanded": s.open,
39
- "aria-controls": s.open ? s.contentId : void 0,
40
- "data-state": G(s.open),
41
- ...a,
42
- ref: c,
43
- onClick: n(e.onClick, s.onOpenToggle)
44
- });
45
- });
46
- T.displayName = w;
47
- var E = "DialogPortal", [D, O] = b(E, { forceMount: void 0 }), k = (e) => {
48
- let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = S(E, t);
49
- return /* @__PURE__ */ _(D, {
50
- scope: t,
51
- forceMount: n,
52
- children: h.Children.map(r, (e) => /* @__PURE__ */ _(s, {
53
- present: n || a.open,
54
- children: /* @__PURE__ */ _(u, {
55
- asChild: !0,
56
- container: i,
57
- children: e
58
- })
59
- }))
60
- });
61
- };
62
- k.displayName = E;
63
- var A = "DialogOverlay", j = h.forwardRef((e, t) => {
64
- let n = O(A, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = S(A, e.__scopeDialog);
65
- return a.modal ? /* @__PURE__ */ _(s, {
66
- present: r || a.open,
67
- children: /* @__PURE__ */ _(N, {
68
- ...i,
69
- ref: t
70
- })
71
- }) : null;
72
- });
73
- j.displayName = A;
74
- var M = a("DialogOverlay.RemoveScroll"), N = h.forwardRef((e, t) => {
75
- let { __scopeDialog: n, ...r } = e, i = S(A, n);
76
- return /* @__PURE__ */ _(f, {
77
- as: M,
78
- allowPinchZoom: !0,
79
- shards: [i.contentRef],
80
- children: /* @__PURE__ */ _(o.div, {
81
- "data-state": G(i.open),
82
- ...r,
83
- ref: t,
84
- style: {
85
- pointerEvents: "auto",
86
- ...r.style
87
- }
88
- })
89
- });
90
- }), P = "DialogContent", F = h.forwardRef((e, t) => {
91
- let n = O(P, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = S(P, e.__scopeDialog);
92
- return /* @__PURE__ */ _(s, {
93
- present: r || a.open,
94
- children: a.modal ? /* @__PURE__ */ _(I, {
95
- ...i,
96
- ref: t
97
- }) : /* @__PURE__ */ _(L, {
98
- ...i,
99
- ref: t
100
- })
101
- });
102
- });
103
- F.displayName = P;
104
- var I = h.forwardRef((e, t) => {
105
- let r = S(P, e.__scopeDialog), a = h.useRef(null), o = i(t, r.contentRef, a);
106
- return h.useEffect(() => {
107
- let e = a.current;
108
- if (e) return m(e);
109
- }, []), /* @__PURE__ */ _(R, {
110
- ...e,
111
- ref: o,
112
- trapFocus: r.open,
113
- disableOutsidePointerEvents: r.open,
114
- onCloseAutoFocus: n(e.onCloseAutoFocus, (e) => {
115
- e.preventDefault(), r.triggerRef.current?.focus();
116
- }),
117
- onPointerDownOutside: n(e.onPointerDownOutside, (e) => {
118
- let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
119
- (t.button === 2 || n) && e.preventDefault();
120
- }),
121
- onFocusOutside: n(e.onFocusOutside, (e) => e.preventDefault())
122
- });
123
- }), L = h.forwardRef((e, t) => {
124
- let n = S(P, e.__scopeDialog), r = h.useRef(!1), i = h.useRef(!1);
125
- return /* @__PURE__ */ _(R, {
126
- ...e,
127
- ref: t,
128
- trapFocus: !1,
129
- disableOutsidePointerEvents: !1,
130
- onCloseAutoFocus: (t) => {
131
- e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
132
- },
133
- onInteractOutside: (t) => {
134
- e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
135
- let a = t.target;
136
- n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
137
- }
138
- });
139
- }), R = h.forwardRef((e, t) => {
140
- let { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = e, c = S(P, n), u = h.useRef(null), f = i(t, u);
141
- return p(), /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, {
142
- asChild: !0,
143
- loop: !0,
144
- trapped: r,
145
- onMountAutoFocus: a,
146
- onUnmountAutoFocus: o,
147
- children: /* @__PURE__ */ _(l, {
148
- role: "dialog",
149
- id: c.contentId,
150
- "aria-describedby": c.descriptionId,
151
- "aria-labelledby": c.titleId,
152
- "data-state": G(c.open),
153
- ...s,
154
- ref: f,
155
- onDismiss: () => c.onOpenChange(!1)
156
- })
157
- }), /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(J, { titleId: c.titleId }), /* @__PURE__ */ _(X, {
158
- contentRef: u,
159
- descriptionId: c.descriptionId
160
- })] })] });
161
- }), z = "DialogTitle", B = h.forwardRef((e, t) => {
162
- let { __scopeDialog: n, ...r } = e, i = S(z, n);
163
- return /* @__PURE__ */ _(o.h2, {
164
- id: i.titleId,
165
- ...r,
166
- ref: t
167
- });
168
- });
169
- B.displayName = z;
170
- var V = "DialogDescription", H = h.forwardRef((e, t) => {
171
- let { __scopeDialog: n, ...r } = e, i = S(V, n);
172
- return /* @__PURE__ */ _(o.p, {
173
- id: i.descriptionId,
174
- ...r,
175
- ref: t
176
- });
177
- });
178
- H.displayName = V;
179
- var U = "DialogClose", W = h.forwardRef((e, t) => {
180
- let { __scopeDialog: r, ...i } = e, a = S(U, r);
181
- return /* @__PURE__ */ _(o.button, {
182
- type: "button",
183
- ...i,
184
- ref: t,
185
- onClick: n(e.onClick, () => a.onOpenChange(!1))
186
- });
187
- });
188
- W.displayName = U;
189
- function G(e) {
190
- return e ? "open" : "closed";
191
- }
192
- var K = "DialogTitleWarning", [te, q] = t(K, {
193
- contentName: P,
194
- titleName: z,
195
- docsSlug: "dialog"
196
- }), J = ({ titleId: e }) => {
197
- let t = q(K), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
198
-
199
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
200
-
201
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
202
- return h.useEffect(() => {
203
- e && (document.getElementById(e) || console.error(n));
204
- }, [n, e]), null;
205
- }, Y = "DialogDescriptionWarning", X = ({ contentRef: e, descriptionId: t }) => {
206
- let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${q(Y).contentName}}.`;
207
- return h.useEffect(() => {
208
- let r = e.current?.getAttribute("aria-describedby");
209
- t && r && (document.getElementById(t) || console.warn(n));
210
- }, [
211
- n,
212
- e,
213
- t
214
- ]), null;
215
- }, Z = C, Q = T, ne = k, $ = j, re = F, ie = B, ae = H, oe = W;
216
- //#endregion
217
- export { ne as a, Q as c, $ as i, re as n, Z as o, ae as r, ie as s, oe as t };