ics-ui-kit 0.1.0-alpha.12 → 0.1.0-alpha.13
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.
- package/dist/Button-DQtBfU9y.js +57 -0
- package/dist/Button-DQtBfU9y.js.map +1 -0
- package/dist/{Button-DhfE69q0.js → ButtonBase-BEM8SNmT.js} +27 -56
- package/dist/ButtonBase-BEM8SNmT.js.map +1 -0
- package/dist/CarouselItem-pSHe0ufN.js +1500 -0
- package/dist/CarouselItem-pSHe0ufN.js.map +1 -0
- package/dist/CheckboxField-i_-dPpFM.js +370 -0
- package/dist/CheckboxField-i_-dPpFM.js.map +1 -0
- package/dist/Divider-C0Ss5GJT.js +47 -0
- package/dist/{Divider-D3NvaU8c.js.map → Divider-C0Ss5GJT.js.map} +1 -1
- package/dist/Field-3XJNFTql.js +78 -0
- package/dist/Field-3XJNFTql.js.map +1 -0
- package/dist/FieldLabel-CAbVan3E.js +97 -0
- package/dist/FieldLabel-CAbVan3E.js.map +1 -0
- package/dist/FormBody-4HptEjhb.js +103 -0
- package/dist/FormBody-4HptEjhb.js.map +1 -0
- package/dist/{IconButton-BUPs2kEo.js → IconButton-BkBsOIf5.js} +15 -15
- package/dist/{IconButton-BUPs2kEo.js.map → IconButton-BkBsOIf5.js.map} +1 -1
- package/dist/ImagePlaceholder-CNAKQWTh.js +45 -0
- package/dist/ImagePlaceholder-CNAKQWTh.js.map +1 -0
- package/dist/ImagePreview-DHi7A8md.js +156 -0
- package/dist/ImagePreview-DHi7A8md.js.map +1 -0
- package/dist/ImageUploader-46sxdmt5.js +123 -0
- package/dist/ImageUploader-46sxdmt5.js.map +1 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js +179 -0
- package/dist/IsolatedStylesWrapper-WgaoHh7y.js.map +1 -0
- package/dist/Modal-D33MSQot.js +125 -0
- package/dist/Modal-D33MSQot.js.map +1 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js +636 -0
- package/dist/ScrollShadowContainer-ByNH68Kg.js.map +1 -0
- package/dist/Toggle-7AlEmn8A.js +104 -0
- package/dist/Toggle-7AlEmn8A.js.map +1 -0
- package/dist/ToggleGroup-CT453MNp.js +200 -0
- package/dist/ToggleGroup-CT453MNp.js.map +1 -0
- package/dist/Tooltip-C4BbGF2_.js +372 -0
- package/dist/Tooltip-C4BbGF2_.js.map +1 -0
- package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-LhQum_e3.js} +676 -425
- package/dist/bundle-mjs-LhQum_e3.js.map +1 -0
- package/dist/check-C-TqZgvb.js.map +1 -1
- package/dist/chevron-right-CobOebzi.js.map +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button/icon-button/IconButton.stories.d.ts +330 -2
- package/dist/components/button/loading-button/LoadingButton.d.ts +249 -0
- package/dist/components/button/loading-button/LoadingButton.stories.d.ts +219 -0
- package/dist/components/button.js +6 -5
- package/dist/components/button.js.map +1 -1
- package/dist/components/carousel.js +65 -1532
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/divider/content-divider/ContentDivider.d.ts +14 -0
- package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider.js +45 -2
- package/dist/components/divider.js.map +1 -1
- package/dist/components/drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts +3 -0
- package/dist/components/drawer.js +450 -447
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown.js +37 -33
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +2 -2
- package/dist/components/empty-state.js +1 -1
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/field/Field.d.ts +35 -0
- package/dist/components/field.js +1 -1
- package/dist/components/form/components/form-header/FormHeader.d.ts +2 -2
- package/dist/components/form.js +289 -288
- package/dist/components/form.js.map +1 -1
- package/dist/components/gallery/Gallery.d.ts +21 -0
- package/dist/components/gallery/Gallery.stories.d.ts +26 -0
- package/dist/components/gallery/index.d.ts +1 -0
- package/dist/components/gallery.d.ts +2 -0
- package/dist/components/gallery.js +130 -0
- package/dist/components/gallery.js.map +1 -0
- package/dist/components/icon-tooltip/IconTooltip.d.ts +2 -1
- package/dist/components/image-placeholder.js +2 -42
- package/dist/components/image-placeholder.js.map +1 -1
- package/dist/components/image-preview/ImagePreview.d.ts +6 -6
- package/dist/components/image-preview.js +2 -136
- package/dist/components/image-preview.js.map +1 -1
- package/dist/components/image-uploader.js +2 -118
- package/dist/components/image-uploader.js.map +1 -1
- package/dist/components/input/file-input/FileInput.d.ts +3 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +176 -195
- package/dist/components/input.js.map +1 -1
- package/dist/components/isolated-styles-wrapper/IsolatedStylesWrapper.d.ts +1 -1
- package/dist/components/label/Label.stories.d.ts +0 -2
- package/dist/components/label/field-label/FieldLabel.d.ts +11 -0
- package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
- package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
- package/dist/components/label.js +1 -1
- package/dist/components/loading/Loading.d.ts +4 -4
- package/dist/components/loading.js +2 -2
- package/dist/components/loading.js.map +1 -1
- package/dist/components/modal.js +12 -122
- package/dist/components/modal.js.map +1 -1
- package/dist/components/option-group.js +1 -1
- package/dist/components/popover.js +34 -31
- package/dist/components/popover.js.map +1 -1
- package/dist/components/scheduler.js +11 -11
- package/dist/components/scheduler.js.map +1 -1
- package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +1 -0
- package/dist/components/scroll-shadow-container.js +1 -1
- package/dist/components/select.js +487 -519
- package/dist/components/select.js.map +1 -1
- package/dist/components/shortcut/Shortcut.d.ts +14 -14
- package/dist/components/shortcut/Shortcut.stories.d.ts +7 -7
- package/dist/components/shortcut.js +16 -16
- package/dist/components/shortcut.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -0
- package/dist/components/skeleton/Skeleton.stories.d.ts +7 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +33 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.js +147 -126
- package/dist/components/switch.js.map +1 -1
- package/dist/components/tabs.js +9 -8
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag.js +3 -3
- package/dist/components/toast.js +4 -4
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +8 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/createLucideIcon-DgrNxRV5.js.map +1 -1
- package/dist/design-tokens.source.json +1 -1
- package/dist/download-CVOGyQ0e.js.map +1 -1
- package/dist/downloadFile-yZV-aaO2.js +15 -0
- package/dist/downloadFile-yZV-aaO2.js.map +1 -0
- package/dist/index-B6K06mzp.js +67 -0
- package/dist/index-B6K06mzp.js.map +1 -0
- package/dist/index-BCZIl2rL.js +68 -0
- package/dist/index-BCZIl2rL.js.map +1 -0
- package/dist/index-BZPx6jYI.js.map +1 -1
- package/dist/index-Bj6ZBhqh.js +105 -0
- package/dist/index-Bj6ZBhqh.js.map +1 -0
- package/dist/index-ByaXH_ih.js.map +1 -1
- package/dist/index-CACw01gt.js +702 -0
- package/dist/index-CACw01gt.js.map +1 -0
- package/dist/index-COBL2CQB.js +14 -0
- package/dist/index-COBL2CQB.js.map +1 -0
- package/dist/index-CR-odn5-.js.map +1 -1
- package/dist/{index-BjbwEU_d.js → index-ClwWa5fz.js} +20 -20
- package/dist/index-ClwWa5fz.js.map +1 -0
- package/dist/{index-DwbC6luJ.js → index-Cx4x7Bv2.js} +52 -50
- package/dist/index-Cx4x7Bv2.js.map +1 -0
- package/dist/index-CzNelU6n.js +55 -0
- package/dist/index-CzNelU6n.js.map +1 -0
- package/dist/index-DBsc8nMF.js +43 -0
- package/dist/index-DBsc8nMF.js.map +1 -0
- package/dist/index-Mbnk_gHS.js +102 -0
- package/dist/index-Mbnk_gHS.js.map +1 -0
- package/dist/index-bhXb51Q1.js +215 -0
- package/dist/index-bhXb51Q1.js.map +1 -0
- package/dist/index-n71RB2rx.js +1592 -0
- package/dist/index-n71RB2rx.js.map +1 -0
- package/dist/index-rKs9bXHr.js +7 -0
- package/dist/index-rKs9bXHr.js.map +1 -0
- package/dist/lib/utils/file/downloadFile.d.ts +2 -0
- package/dist/lib/utils/image/imageConverter.d.ts +23 -0
- package/dist/styles-scoped.css +72 -18
- package/dist/styles.css +72 -18
- package/dist/{utils-DGzAmwok.js → utils-BK4mPzkB.js} +2 -2
- package/dist/utils-BK4mPzkB.js.map +1 -0
- package/dist/x-JgjNP5oH.js.map +1 -1
- package/package.json +1 -1
- package/dist/Button-DhfE69q0.js.map +0 -1
- package/dist/CheckboxField-CL1Tc7P4.js +0 -257
- package/dist/CheckboxField-CL1Tc7P4.js.map +0 -1
- package/dist/Divider-D3NvaU8c.js +0 -46
- package/dist/Field-COOo8o9f.js +0 -80
- package/dist/Field-COOo8o9f.js.map +0 -1
- package/dist/FieldLabel-BGxT_RaE.js +0 -64
- package/dist/FieldLabel-BGxT_RaE.js.map +0 -1
- package/dist/FormBody-DM52shm4.js +0 -101
- package/dist/FormBody-DM52shm4.js.map +0 -1
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js +0 -555
- package/dist/IsolatedStylesWrapper-B_Qu75eR.js.map +0 -1
- package/dist/ScrollShadowContainer-DSKr3_fV.js +0 -690
- package/dist/ScrollShadowContainer-DSKr3_fV.js.map +0 -1
- package/dist/Toggle-BuYtICWv.js +0 -129
- package/dist/Toggle-BuYtICWv.js.map +0 -1
- package/dist/ToggleGroup-CMyUAz04.js +0 -467
- package/dist/ToggleGroup-CMyUAz04.js.map +0 -1
- package/dist/bundle-mjs-D6wdQkGI.js.map +0 -1
- package/dist/floating-ui.react-dom-CWfR7VfF.js +0 -1346
- package/dist/floating-ui.react-dom-CWfR7VfF.js.map +0 -1
- package/dist/index-0WznJ1QS.js +0 -276
- package/dist/index-0WznJ1QS.js.map +0 -1
- package/dist/index-BjbwEU_d.js.map +0 -1
- package/dist/index-BqriTm0o.js +0 -47
- package/dist/index-BqriTm0o.js.map +0 -1
- package/dist/index-C6bvrqL8.js +0 -563
- package/dist/index-C6bvrqL8.js.map +0 -1
- package/dist/index-C6t9z3on.js +0 -97
- package/dist/index-C6t9z3on.js.map +0 -1
- package/dist/index-CaQG3DzJ.js +0 -64
- package/dist/index-CaQG3DzJ.js.map +0 -1
- package/dist/index-ChTGHCkY.js +0 -255
- package/dist/index-ChTGHCkY.js.map +0 -1
- package/dist/index-D808y1pT.js +0 -178
- package/dist/index-D808y1pT.js.map +0 -1
- package/dist/index-DE3fiSzl.js +0 -28
- package/dist/index-DE3fiSzl.js.map +0 -1
- package/dist/index-DPws5oAn.js +0 -90
- package/dist/index-DPws5oAn.js.map +0 -1
- package/dist/index-DeUgDpdG.js +0 -80
- package/dist/index-DeUgDpdG.js.map +0 -1
- package/dist/index-DvquTpxI.js +0 -140
- package/dist/index-DvquTpxI.js.map +0 -1
- package/dist/index-DwbC6luJ.js.map +0 -1
- package/dist/index-Ncxt32Wo.js +0 -174
- package/dist/index-Ncxt32Wo.js.map +0 -1
- package/dist/index-U7y6nBZR.js +0 -179
- package/dist/index-U7y6nBZR.js.map +0 -1
- package/dist/index-pysSAa5G.js +0 -57
- package/dist/index-pysSAa5G.js.map +0 -1
- package/dist/tooltip-DI3_ZKNk.js +0 -365
- package/dist/tooltip-DI3_ZKNk.js.map +0 -1
- package/dist/utils-DGzAmwok.js.map +0 -1
- /package/dist/components/{ui/tooltip.d.ts → tooltip/Tooltip.d.ts} +0 -0
package/dist/index-DvquTpxI.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
var B = Object.defineProperty, L = Object.defineProperties;
|
|
2
|
-
var O = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var C = Object.getOwnPropertySymbols;
|
|
4
|
-
var w = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var $ = (t, e, n) => e in t ? B(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, h = (t, e) => {
|
|
6
|
-
for (var n in e || (e = {}))
|
|
7
|
-
w.call(e, n) && $(t, n, e[n]);
|
|
8
|
-
if (C)
|
|
9
|
-
for (var n of C(e))
|
|
10
|
-
_.call(e, n) && $(t, n, e[n]);
|
|
11
|
-
return t;
|
|
12
|
-
}, y = (t, e) => L(t, O(e));
|
|
13
|
-
var P = (t, e) => {
|
|
14
|
-
var n = {};
|
|
15
|
-
for (var o in t)
|
|
16
|
-
w.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
|
|
17
|
-
if (t != null && C)
|
|
18
|
-
for (var o of C(t))
|
|
19
|
-
e.indexOf(o) < 0 && _.call(t, o) && (n[o] = t[o]);
|
|
20
|
-
return n;
|
|
21
|
-
};
|
|
22
|
-
import * as u from "react";
|
|
23
|
-
import { jsx as M } from "react/jsx-runtime";
|
|
24
|
-
function g(t, e) {
|
|
25
|
-
const n = u.createContext(e), o = (c) => {
|
|
26
|
-
const f = c, { children: r } = f, i = P(f, ["children"]), a = u.useMemo(() => i, Object.values(i));
|
|
27
|
-
return /* @__PURE__ */ M(n.Provider, { value: a, children: r });
|
|
28
|
-
};
|
|
29
|
-
o.displayName = t + "Provider";
|
|
30
|
-
function s(c) {
|
|
31
|
-
const r = u.useContext(n);
|
|
32
|
-
if (r) return r;
|
|
33
|
-
if (e !== void 0) return e;
|
|
34
|
-
throw new Error(`\`${c}\` must be used within \`${t}\``);
|
|
35
|
-
}
|
|
36
|
-
return [o, s];
|
|
37
|
-
}
|
|
38
|
-
function q(t, e = []) {
|
|
39
|
-
let n = [];
|
|
40
|
-
function o(c, r) {
|
|
41
|
-
const i = u.createContext(r), a = n.length;
|
|
42
|
-
n = [...n, r];
|
|
43
|
-
const f = (l) => {
|
|
44
|
-
var b;
|
|
45
|
-
const p = l, { scope: d, children: v } = p, x = P(p, ["scope", "children"]), m = ((b = d == null ? void 0 : d[t]) == null ? void 0 : b[a]) || i, j = u.useMemo(() => x, Object.values(x));
|
|
46
|
-
return /* @__PURE__ */ M(m.Provider, { value: j, children: v });
|
|
47
|
-
};
|
|
48
|
-
f.displayName = c + "Provider";
|
|
49
|
-
function S(l, d) {
|
|
50
|
-
var m;
|
|
51
|
-
const v = ((m = d == null ? void 0 : d[t]) == null ? void 0 : m[a]) || i, x = u.useContext(v);
|
|
52
|
-
if (x) return x;
|
|
53
|
-
if (r !== void 0) return r;
|
|
54
|
-
throw new Error(`\`${l}\` must be used within \`${c}\``);
|
|
55
|
-
}
|
|
56
|
-
return [f, S];
|
|
57
|
-
}
|
|
58
|
-
const s = () => {
|
|
59
|
-
const c = n.map((r) => u.createContext(r));
|
|
60
|
-
return function(i) {
|
|
61
|
-
const a = (i == null ? void 0 : i[t]) || c;
|
|
62
|
-
return u.useMemo(
|
|
63
|
-
() => ({ [`__scope${t}`]: y(h({}, i), { [t]: a }) }),
|
|
64
|
-
[i, a]
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
return s.scopeName = t, [o, U(s, ...e)];
|
|
69
|
-
}
|
|
70
|
-
function U(...t) {
|
|
71
|
-
const e = t[0];
|
|
72
|
-
if (t.length === 1) return e;
|
|
73
|
-
const n = () => {
|
|
74
|
-
const o = t.map((s) => ({
|
|
75
|
-
useScope: s(),
|
|
76
|
-
scopeName: s.scopeName
|
|
77
|
-
}));
|
|
78
|
-
return function(c) {
|
|
79
|
-
const r = o.reduce((i, { useScope: a, scopeName: f }) => {
|
|
80
|
-
const l = a(c)[`__scope${f}`];
|
|
81
|
-
return h(h({}, i), l);
|
|
82
|
-
}, {});
|
|
83
|
-
return u.useMemo(() => ({ [`__scope${e.scopeName}`]: r }), [r]);
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
return n.scopeName = e.scopeName, n;
|
|
87
|
-
}
|
|
88
|
-
function z(t, e, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
89
|
-
return function(s) {
|
|
90
|
-
if (t == null || t(s), n === !1 || !s.defaultPrevented)
|
|
91
|
-
return e == null ? void 0 : e(s);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function R(t) {
|
|
95
|
-
const e = u.useRef(t);
|
|
96
|
-
return u.useEffect(() => {
|
|
97
|
-
e.current = t;
|
|
98
|
-
}), u.useMemo(() => (...n) => {
|
|
99
|
-
var o;
|
|
100
|
-
return (o = e.current) == null ? void 0 : o.call(e, ...n);
|
|
101
|
-
}, []);
|
|
102
|
-
}
|
|
103
|
-
function A({
|
|
104
|
-
prop: t,
|
|
105
|
-
defaultProp: e,
|
|
106
|
-
onChange: n = () => {
|
|
107
|
-
}
|
|
108
|
-
}) {
|
|
109
|
-
const [o, s] = k({ defaultProp: e, onChange: n }), c = t !== void 0, r = c ? t : o, i = R(n), a = u.useCallback(
|
|
110
|
-
(f) => {
|
|
111
|
-
if (c) {
|
|
112
|
-
const l = typeof f == "function" ? f(t) : f;
|
|
113
|
-
l !== t && i(l);
|
|
114
|
-
} else
|
|
115
|
-
s(f);
|
|
116
|
-
},
|
|
117
|
-
[c, t, s, i]
|
|
118
|
-
);
|
|
119
|
-
return [r, a];
|
|
120
|
-
}
|
|
121
|
-
function k({
|
|
122
|
-
defaultProp: t,
|
|
123
|
-
onChange: e
|
|
124
|
-
}) {
|
|
125
|
-
const n = u.useState(t), [o] = n, s = u.useRef(o), c = R(e);
|
|
126
|
-
return u.useEffect(() => {
|
|
127
|
-
s.current !== o && (c(o), s.current = o);
|
|
128
|
-
}, [o, s, c]), n;
|
|
129
|
-
}
|
|
130
|
-
var D = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
131
|
-
};
|
|
132
|
-
export {
|
|
133
|
-
z as a,
|
|
134
|
-
g as b,
|
|
135
|
-
q as c,
|
|
136
|
-
D as d,
|
|
137
|
-
R as e,
|
|
138
|
-
A as u
|
|
139
|
-
};
|
|
140
|
-
//# sourceMappingURL=index-DvquTpxI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DvquTpxI.js","sources":["../node_modules/.pnpm/@radix-ui+react-context@1.1_24cc9c2a91080c4413e39aee56d33915/node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/.pnpm/@radix-ui+primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-callbac_96f2c10b05d4c3ebb3d3c184583f444f/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-control_45493d4ae05abfd13e08e09a63fe99b6/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-layout-_eaf61b1029795404ffff0f405bdf1e09/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/useLayoutEffect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext2","rootComponentName","defaultContext","Context","React","Provider","props","_a","children","context","__objRest","value","jsx","useContext2","consumerName","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","BaseContext","index","scope","_b","createScope","scopeContexts","contexts","__spreadProps","__spreadValues","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","useCallbackRef","callback","callbackRef","args","useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","useUncontrolledState","isControlled","handleChange","setValue","nextValue","value2","uncontrolledState","prevValueRef","useLayoutEffect2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,SAASA,EAAeC,GAAmBC,GAAgB;AACzD,QAAMC,IAAUC,EAAM,cAAcF,CAAc,GAC5CG,IAAW,CAACC,MAAU;AAC1B,UAAiCC,IAAAD,GAAzB,YAAAE,MAAyBD,GAAZE,IAAAC,EAAYH,GAAZ,CAAb,cACFI,IAAQP,EAAM,QAAQ,MAAMK,GAAS,OAAO,OAAOA,CAAO,CAAC;AACjE,WAAuB,gBAAAG,EAAIT,EAAQ,UAAU,EAAE,OAAAQ,GAAO,UAAAH,EAAQ,CAAE;AAAA,EACjE;AACD,EAAAH,EAAS,cAAcJ,IAAoB;AAC3C,WAASY,EAAYC,GAAc;AACjC,UAAML,IAAUL,EAAM,WAAWD,CAAO;AACxC,QAAIM,EAAS,QAAOA;AACpB,QAAIP,MAAmB,OAAQ,QAAOA;AACtC,UAAM,IAAI,MAAM,KAAKY,CAAY,4BAA4Bb,CAAiB,IAAI;AAAA,EACtF;AACE,SAAO,CAACI,GAAUQ,CAAW;AAC/B;AACA,SAASE,EAAmBC,GAAWC,IAAyB,IAAI;AAClE,MAAIC,IAAkB,CAAE;AACxB,WAASC,EAAelB,GAAmBC,GAAgB;AACzD,UAAMkB,IAAchB,EAAM,cAAcF,CAAc,GAChDmB,IAAQH,EAAgB;AAC9B,IAAAA,IAAkB,CAAC,GAAGA,GAAiBhB,CAA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,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAqB,EAAE,aAAAJ,GAAa,UAAAC,GAAU,GACxFI,IAAeN,MAAS,QACxBtC,IAAQ4C,IAAeN,IAAOG,GAC9BI,IAAeZ,EAAeO,CAAQ,GACtCM,IAAWrD,EAAM;AAAA,IACrB,CAACsD,MAAc;AACb,UAAIH,GAAc;AAEhB,cAAMI,IAAS,OAAOD,KAAc,aADrBA,EACyCT,CAAI,IAAIS;AAChE,QAAIC,MAAWV,KAAMO,EAAaG,CAAM;AAAA,MAChD;AACQ,QAAAN,EAAoBK,CAAS;AAAA,IAEhC;AAAA,IACD,CAACH,GAAcN,GAAMI,GAAqBG,CAAY;AAAA,EACvD;AACD,SAAO,CAAC7C,GAAO8C,CAAQ;AACzB;AACA,SAASH,EAAqB;AAAA,EAC5B,aAAAJ;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAMS,IAAoBxD,EAAM,SAAS8C,CAAW,GAC9C,CAACvC,CAAK,IAAIiD,GACVC,IAAezD,EAAM,OAAOO,CAAK,GACjC6C,IAAeZ,EAAeO,CAAQ;AAC5C,SAAA/C,EAAM,UAAU,MAAM;AACpB,IAAIyD,EAAa,YAAYlD,MAC3B6C,EAAa7C,CAAK,GAClBkD,EAAa,UAAUlD;AAAA,EAE1B,GAAE,CAACA,GAAOkD,GAAcL,CAAY,CAAC,GAC/BI;AACT;ACxCG,IAACE,IAA2B,iCAAY,WAAY1D,EAAM,kBAAkB,MAAM;AACrF;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DwbC6luJ.js","sources":["../node_modules/.pnpm/@radix-ui+react-dialog@1.1._9c68fc1e41043c6870820af0b058a498/node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","contentRef","open","setOpen","useControllableState","jsx","useId","prevOpen","TRIGGER_NAME","DialogTrigger","forwardedRef","_a","triggerProps","__objRest","context","composedTriggerRef","useComposedRefs","Primitive","__spreadProps","__spreadValues","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","DialogPortal","forceMount","container","child","Presence","PortalPrimitive","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","Slot","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","content","hideOthers","DialogContentImpl","event","originalEvent","ctrlLeftClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","_b","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","DismissableLayer","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","DESCRIPTION_NAME","DialogDescription","descriptionProps","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","titleId","titleWarningContext","MESSAGE","DESCRIPTION_WARNING_NAME","descriptionId","describedById","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAIA,IAAc,UACd,CAACC,GAAqBC,EAAiB,IAAIC,GAAmBH,CAAW,GACzE,CAACI,IAAgBC,CAAgB,IAAIJ,EAAoBD,CAAW,GACpEM,IAAS,CAACC,MAAU;AACtB,QAAM;AAAA,IACJ,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMN,GACEO,IAAaC,EAAM,OAAO,IAAI,GAC9BC,IAAaD,EAAM,OAAO,IAAI,GAC9B,CAACE,IAAO,IAAOC,CAAO,IAAIC,GAAqB;AAAA,IACnD,MAAMT;AAAA,IACN,aAAaC;AAAA,IACb,UAAUC;AAAA,EACd,CAAG;AACD,SAAuB,gBAAAQ;AAAA,IACrBhB;AAAA,IACA;AAAA,MACE,OAAOI;AAAA,MACP,YAAAM;AAAA,MACA,YAAAE;AAAA,MACA,WAAWK,EAAO;AAAA,MAClB,SAASA,EAAO;AAAA,MAChB,eAAeA,EAAO;AAAA,MACtB,MAAAJ;AAAA,MACA,cAAcC;AAAA,MACd,cAAcH,EAAM,YAAY,MAAMG,EAAQ,CAACI,MAAa,CAACA,CAAQ,GAAG,CAACJ,CAAO,CAAC;AAAA,MACjF,OAAAL;AAAA,MACA,UAAAJ;AAAA,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AS;AAAA;AAAA,4BAE1EA,EAAoB,SAAS;AAAA;AAAA,4EAEmBA,EAAoB,QAAQ;AACtG,SAAA9E,EAAM,UAAU,MAAM;AACpB,IAAI6E,MACe,SAAS,eAAeA,CAAO,KACjC,QAAQ,MAAME,CAAO;AAAA,EAE1C,GAAK,CAACA,GAASF,CAAO,CAAC,GACd;AACT,GACIG,KAA2B,4BAC3BjB,KAAqB,CAAC,EAAE,YAAA9D,GAAY,eAAAgF,QAAoB;AAE1D,QAAMF,IAAU,6EADkBJ,EAAkBK,EAAwB,EAC2C,WAAW;AAClI,SAAAhF,EAAM,UAAU,MAAM;;AACpB,UAAMkF,KAAgBvE,IAAAV,EAAW,YAAX,gBAAAU,EAAoB,aAAa;AACvD,IAAIsE,KAAiBC,MACI,SAAS,eAAeD,CAAa,KACvC,QAAQ,KAAKF,CAAO;AAAA,EAE5C,GAAE,CAACA,GAAS9E,GAAYgF,CAAa,CAAC,GAChC;AACT,GACIE,KAAO5F,GACP6F,KAAU3E,GACV4E,KAAS5D,GACT6D,KAAUtD,GACVuD,KAAUhD,GACViD,KAAQvB,GACRwB,KAAcrB,GACdsB,KAAQnB;","x_google_ignoreList":[0]}
|
package/dist/index-Ncxt32Wo.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
var w = Object.defineProperty, T = Object.defineProperties;
|
|
2
|
-
var I = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var E = Object.getOwnPropertySymbols;
|
|
4
|
-
var R = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var O = (n, e, t) => e in n ? w(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, m = (n, e) => {
|
|
6
|
-
for (var t in e || (e = {}))
|
|
7
|
-
R.call(e, t) && O(n, t, e[t]);
|
|
8
|
-
if (E)
|
|
9
|
-
for (var t of E(e))
|
|
10
|
-
P.call(e, t) && O(n, t, e[t]);
|
|
11
|
-
return n;
|
|
12
|
-
}, y = (n, e) => T(n, I(e));
|
|
13
|
-
var v = (n, e) => {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var r in n)
|
|
16
|
-
R.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
17
|
-
if (n != null && E)
|
|
18
|
-
for (var r of E(n))
|
|
19
|
-
e.indexOf(r) < 0 && P.call(n, r) && (t[r] = n[r]);
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
import * as o from "react";
|
|
23
|
-
import * as b from "react-dom";
|
|
24
|
-
import { b as D, u as U } from "./index-BqriTm0o.js";
|
|
25
|
-
import { jsx as h } from "react/jsx-runtime";
|
|
26
|
-
import { u as S } from "./index-DeUgDpdG.js";
|
|
27
|
-
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function W(n) {
|
|
29
|
-
const e = /* @__PURE__ */ _(n), t = o.forwardRef((r, i) => {
|
|
30
|
-
const a = r, { children: c } = a, l = v(a, ["children"]), u = o.Children.toArray(c), s = u.find(F);
|
|
31
|
-
if (s) {
|
|
32
|
-
const f = s.props.children, p = u.map((d) => d === s ? o.Children.count(f) > 1 ? o.Children.only(null) : o.isValidElement(f) ? f.props.children : null : d);
|
|
33
|
-
return /* @__PURE__ */ h(e, y(m({}, l), { ref: i, children: o.isValidElement(f) ? o.cloneElement(f, void 0, p) : null }));
|
|
34
|
-
}
|
|
35
|
-
return /* @__PURE__ */ h(e, y(m({}, l), { ref: i, children: c }));
|
|
36
|
-
});
|
|
37
|
-
return t.displayName = `${n}.Slot`, t;
|
|
38
|
-
}
|
|
39
|
-
// @__NO_SIDE_EFFECTS__
|
|
40
|
-
function _(n) {
|
|
41
|
-
const e = o.forwardRef((t, r) => {
|
|
42
|
-
const l = t, { children: i } = l, c = v(l, ["children"]);
|
|
43
|
-
if (o.isValidElement(i)) {
|
|
44
|
-
const u = j(i), s = V(c, i.props);
|
|
45
|
-
return i.type !== o.Fragment && (s.ref = r ? D(r, u) : u), o.cloneElement(i, s);
|
|
46
|
-
}
|
|
47
|
-
return o.Children.count(i) > 1 ? o.Children.only(null) : null;
|
|
48
|
-
});
|
|
49
|
-
return e.displayName = `${n}.SlotClone`, e;
|
|
50
|
-
}
|
|
51
|
-
var L = Symbol("radix.slottable");
|
|
52
|
-
function F(n) {
|
|
53
|
-
return o.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === L;
|
|
54
|
-
}
|
|
55
|
-
function V(n, e) {
|
|
56
|
-
const t = m({}, e);
|
|
57
|
-
for (const r in e) {
|
|
58
|
-
const i = n[r], c = e[r];
|
|
59
|
-
/^on[A-Z]/.test(r) ? i && c ? t[r] = (...u) => {
|
|
60
|
-
const s = c(...u);
|
|
61
|
-
return i(...u), s;
|
|
62
|
-
} : i && (t[r] = i) : r === "style" ? t[r] = m(m({}, i), c) : r === "className" && (t[r] = [i, c].filter(Boolean).join(" "));
|
|
63
|
-
}
|
|
64
|
-
return m(m({}, n), t);
|
|
65
|
-
}
|
|
66
|
-
function j(n) {
|
|
67
|
-
var r, i;
|
|
68
|
-
let e = (r = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : r.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
69
|
-
return t ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
70
|
-
}
|
|
71
|
-
var x = [
|
|
72
|
-
"a",
|
|
73
|
-
"button",
|
|
74
|
-
"div",
|
|
75
|
-
"form",
|
|
76
|
-
"h2",
|
|
77
|
-
"h3",
|
|
78
|
-
"img",
|
|
79
|
-
"input",
|
|
80
|
-
"label",
|
|
81
|
-
"li",
|
|
82
|
-
"nav",
|
|
83
|
-
"ol",
|
|
84
|
-
"p",
|
|
85
|
-
"select",
|
|
86
|
-
"span",
|
|
87
|
-
"svg",
|
|
88
|
-
"ul"
|
|
89
|
-
], K = x.reduce((n, e) => {
|
|
90
|
-
const t = /* @__PURE__ */ W(`Primitive.${e}`), r = o.forwardRef((i, c) => {
|
|
91
|
-
const a = i, { asChild: l } = a, u = v(a, ["asChild"]), s = l ? t : e;
|
|
92
|
-
return typeof window != "undefined" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ h(s, y(m({}, u), { ref: c }));
|
|
93
|
-
});
|
|
94
|
-
return r.displayName = `Primitive.${e}`, y(m({}, n), { [e]: r });
|
|
95
|
-
}, {});
|
|
96
|
-
function Q(n, e) {
|
|
97
|
-
n && b.flushSync(() => n.dispatchEvent(e));
|
|
98
|
-
}
|
|
99
|
-
function $(n, e) {
|
|
100
|
-
return o.useReducer((t, r) => {
|
|
101
|
-
const i = e[t][r];
|
|
102
|
-
return i != null ? i : t;
|
|
103
|
-
}, n);
|
|
104
|
-
}
|
|
105
|
-
var B = (n) => {
|
|
106
|
-
const { present: e, children: t } = n, r = H(e), i = typeof t == "function" ? t({ present: r.isPresent }) : o.Children.only(t), c = U(r.ref, k(i));
|
|
107
|
-
return typeof t == "function" || r.isPresent ? o.cloneElement(i, { ref: c }) : null;
|
|
108
|
-
};
|
|
109
|
-
B.displayName = "Presence";
|
|
110
|
-
function H(n) {
|
|
111
|
-
const [e, t] = o.useState(), r = o.useRef(null), i = o.useRef(n), c = o.useRef("none"), l = n ? "mounted" : "unmounted", [u, s] = $(l, {
|
|
112
|
-
mounted: {
|
|
113
|
-
UNMOUNT: "unmounted",
|
|
114
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
115
|
-
},
|
|
116
|
-
unmountSuspended: {
|
|
117
|
-
MOUNT: "mounted",
|
|
118
|
-
ANIMATION_END: "unmounted"
|
|
119
|
-
},
|
|
120
|
-
unmounted: {
|
|
121
|
-
MOUNT: "mounted"
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
return o.useEffect(() => {
|
|
125
|
-
const a = A(r.current);
|
|
126
|
-
c.current = u === "mounted" ? a : "none";
|
|
127
|
-
}, [u]), S(() => {
|
|
128
|
-
const a = r.current, f = i.current;
|
|
129
|
-
if (f !== n) {
|
|
130
|
-
const d = c.current, N = A(a);
|
|
131
|
-
n ? s("MOUNT") : N === "none" || (a == null ? void 0 : a.display) === "none" ? s("UNMOUNT") : s(f && d !== N ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
|
|
132
|
-
}
|
|
133
|
-
}, [n, s]), S(() => {
|
|
134
|
-
var a;
|
|
135
|
-
if (e) {
|
|
136
|
-
let f;
|
|
137
|
-
const p = (a = e.ownerDocument.defaultView) != null ? a : window, d = (g) => {
|
|
138
|
-
const C = A(r.current).includes(g.animationName);
|
|
139
|
-
if (g.target === e && C && (s("ANIMATION_END"), !i.current)) {
|
|
140
|
-
const M = e.style.animationFillMode;
|
|
141
|
-
e.style.animationFillMode = "forwards", f = p.setTimeout(() => {
|
|
142
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = M);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}, N = (g) => {
|
|
146
|
-
g.target === e && (c.current = A(r.current));
|
|
147
|
-
};
|
|
148
|
-
return e.addEventListener("animationstart", N), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
149
|
-
p.clearTimeout(f), e.removeEventListener("animationstart", N), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
150
|
-
};
|
|
151
|
-
} else
|
|
152
|
-
s("ANIMATION_END");
|
|
153
|
-
}, [e, s]), {
|
|
154
|
-
isPresent: ["mounted", "unmountSuspended"].includes(u),
|
|
155
|
-
ref: o.useCallback((a) => {
|
|
156
|
-
r.current = a ? getComputedStyle(a) : null, t(a);
|
|
157
|
-
}, [])
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
function A(n) {
|
|
161
|
-
return (n == null ? void 0 : n.animationName) || "none";
|
|
162
|
-
}
|
|
163
|
-
function k(n) {
|
|
164
|
-
var r, i;
|
|
165
|
-
let e = (r = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : r.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
166
|
-
return t ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
167
|
-
}
|
|
168
|
-
export {
|
|
169
|
-
K as P,
|
|
170
|
-
B as a,
|
|
171
|
-
W as c,
|
|
172
|
-
Q as d
|
|
173
|
-
};
|
|
174
|
-
//# sourceMappingURL=index-Ncxt32Wo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-Ncxt32Wo.js","sources":["../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.20_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-primitive@2_868872ee2f7b02bce6298bfa81c302de/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-presence@1._ccfef2e98a5edac10148295b683a4f5b/node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","_a","children","slotProps","__objRest","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","__spreadProps","__spreadValues","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn","_b","NODES","Primitive","primitive","node","Slot","Node","asChild","primitiveProps","Comp","dispatchDiscreteCustomEvent","target","event","ReactDOM","useStateMachine","initialState","machine","state","nextState","Presence","present","presence","usePresence","React2","ref","useComposedRefs","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","node2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAmCC,IAAAF,GAA3B,YAAAG,MAA2BD,GAAdE,IAAAC,EAAcH,GAAd,CAAb,cACFI,IAAgBP,EAAM,SAAS,QAAQI,CAAQ,GAC/CI,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRR,EAAM,SAAS,MAAMU,CAAU,IAAI,IAAUV,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeU,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuB,gBAAAC,EAAIhB,GAAWiB,EAAAC,EAAA,IAAKV,IAAL,EAAgB,KAAKH,GAAc,UAAUF,EAAM,eAAeU,CAAU,IAAIV,EAAM,aAAaU,GAAY,QAAQC,CAAW,IAAI,OAAM;AAAA,IACxL;AACI,WAAuB,gBAAAE,EAAIhB,GAAWiB,EAAAC,EAAA,IAAKV,IAAL,EAAg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BAAkBsC,CAAoB,GAC5DtC,EAAK,iBAAiB,mBAAmBmC,CAAkB,GAC3DnC,EAAK,iBAAiB,gBAAgBmC,CAAkB,GACjD,MAAM;AACX,QAAAD,EAAY,aAAaD,CAAS,GAClCjC,EAAK,oBAAoB,kBAAkBsC,CAAoB,GAC/DtC,EAAK,oBAAoB,mBAAmBmC,CAAkB,GAC9DnC,EAAK,oBAAoB,gBAAgBmC,CAAkB;AAAA,MAC5D;AAAA,IACP;AACM,MAAAT,EAAK,eAAe;AAAA,EAE1B,GAAK,CAAC1B,GAAM0B,CAAI,CAAC,GACR;AAAA,IACL,WAAW,CAAC,WAAW,kBAAkB,EAAE,SAASb,CAAK;AAAA,IACzD,KAAKM,EAAO,YAAY,CAACoB,MAAU;AACjC,MAAAhB,EAAU,UAAUgB,IAAQ,iBAAiBA,CAAK,IAAI,MACtDjB,EAAQiB,CAAK;AAAA,IACnB,GAAO,CAAE,CAAA;AAAA,EACN;AACH;AACA,SAASX,EAAiBE,GAAQ;AAChC,UAAOA,KAAA,gBAAAA,EAAQ,kBAAiB;AAClC;AACA,SAASjD,EAAcY,GAAS;;AAC9B,MAAIC,KAAS3B,IAAA,OAAO,yBAAyB0B,EAAQ,OAAO,KAAK,MAApD,gBAAA1B,EAAuD,KAChE4B,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIC,IACKF,EAAQ,OAEjBC,KAASE,IAAA,OAAO,yBAAyBH,GAAS,KAAK,MAA9C,gBAAAG,EAAiD,KAC1DD,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDC,IACKF,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0,1,2]}
|
package/dist/index-U7y6nBZR.js
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
var q = Object.defineProperty, G = Object.defineProperties;
|
|
2
|
-
var J = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var h = Object.getOwnPropertySymbols;
|
|
4
|
-
var N = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var A = (t, e, s) => e in t ? q(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, E = (t, e) => {
|
|
6
|
-
for (var s in e || (e = {}))
|
|
7
|
-
N.call(e, s) && A(t, s, e[s]);
|
|
8
|
-
if (h)
|
|
9
|
-
for (var s of h(e))
|
|
10
|
-
F.call(e, s) && A(t, s, e[s]);
|
|
11
|
-
return t;
|
|
12
|
-
}, p = (t, e) => G(t, J(e));
|
|
13
|
-
var b = (t, e) => {
|
|
14
|
-
var s = {};
|
|
15
|
-
for (var n in t)
|
|
16
|
-
N.call(t, n) && e.indexOf(n) < 0 && (s[n] = t[n]);
|
|
17
|
-
if (t != null && h)
|
|
18
|
-
for (var n of h(t))
|
|
19
|
-
e.indexOf(n) < 0 && F.call(t, n) && (s[n] = t[n]);
|
|
20
|
-
return s;
|
|
21
|
-
};
|
|
22
|
-
import * as i from "react";
|
|
23
|
-
import { d as k, e as L, a as P } from "./index-DvquTpxI.js";
|
|
24
|
-
import { P as C, d as Q } from "./index-pysSAa5G.js";
|
|
25
|
-
import { u as I } from "./index-DPws5oAn.js";
|
|
26
|
-
import { jsx as O } from "react/jsx-runtime";
|
|
27
|
-
import V from "react-dom";
|
|
28
|
-
var Z = i.useId || (() => {
|
|
29
|
-
}), ee = 0;
|
|
30
|
-
function me(t) {
|
|
31
|
-
const [e, s] = i.useState(Z());
|
|
32
|
-
return k(() => {
|
|
33
|
-
s((n) => n != null ? n : String(ee++));
|
|
34
|
-
}, [t]), t || (e ? `radix-${e}` : "");
|
|
35
|
-
}
|
|
36
|
-
function te(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
37
|
-
const s = L(t);
|
|
38
|
-
i.useEffect(() => {
|
|
39
|
-
const n = (r) => {
|
|
40
|
-
r.key === "Escape" && s(r);
|
|
41
|
-
};
|
|
42
|
-
return e.addEventListener("keydown", n, { capture: !0 }), () => e.removeEventListener("keydown", n, { capture: !0 });
|
|
43
|
-
}, [s, e]);
|
|
44
|
-
}
|
|
45
|
-
var se = "DismissableLayer", D = "dismissableLayer.update", ne = "dismissableLayer.pointerDownOutside", re = "dismissableLayer.focusOutside", W, M = i.createContext({
|
|
46
|
-
layers: /* @__PURE__ */ new Set(),
|
|
47
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
48
|
-
branches: /* @__PURE__ */ new Set()
|
|
49
|
-
}), ie = i.forwardRef(
|
|
50
|
-
(t, e) => {
|
|
51
|
-
var x;
|
|
52
|
-
const S = t, {
|
|
53
|
-
disableOutsidePointerEvents: s = !1,
|
|
54
|
-
onEscapeKeyDown: n,
|
|
55
|
-
onPointerDownOutside: r,
|
|
56
|
-
onFocusOutside: o,
|
|
57
|
-
onInteractOutside: l,
|
|
58
|
-
onDismiss: c
|
|
59
|
-
} = S, f = b(S, [
|
|
60
|
-
"disableOutsidePointerEvents",
|
|
61
|
-
"onEscapeKeyDown",
|
|
62
|
-
"onPointerDownOutside",
|
|
63
|
-
"onFocusOutside",
|
|
64
|
-
"onInteractOutside",
|
|
65
|
-
"onDismiss"
|
|
66
|
-
]), u = i.useContext(M), [d, z] = i.useState(null), v = (x = d == null ? void 0 : d.ownerDocument) != null ? x : globalThis == null ? void 0 : globalThis.document, [, H] = i.useState({}), K = I(e, (a) => z(a)), g = Array.from(u.layers), [j] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), X = g.indexOf(j), R = d ? g.indexOf(d) : -1, Y = u.layersWithOutsidePointerEventsDisabled.size > 0, w = R >= X, $ = ue((a) => {
|
|
67
|
-
const y = a.target, B = [...u.branches].some((m) => m.contains(y));
|
|
68
|
-
!w || B || (r == null || r(a), l == null || l(a), a.defaultPrevented || c == null || c());
|
|
69
|
-
}, v), T = ce((a) => {
|
|
70
|
-
const y = a.target;
|
|
71
|
-
[...u.branches].some((m) => m.contains(y)) || (o == null || o(a), l == null || l(a), a.defaultPrevented || c == null || c());
|
|
72
|
-
}, v);
|
|
73
|
-
return te((a) => {
|
|
74
|
-
R === u.layers.size - 1 && (n == null || n(a), !a.defaultPrevented && c && (a.preventDefault(), c()));
|
|
75
|
-
}, v), i.useEffect(() => {
|
|
76
|
-
if (d)
|
|
77
|
-
return s && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (W = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), _(), () => {
|
|
78
|
-
s && u.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = W);
|
|
79
|
-
};
|
|
80
|
-
}, [d, v, s, u]), i.useEffect(() => () => {
|
|
81
|
-
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), _());
|
|
82
|
-
}, [d, u]), i.useEffect(() => {
|
|
83
|
-
const a = () => H({});
|
|
84
|
-
return document.addEventListener(D, a), () => document.removeEventListener(D, a);
|
|
85
|
-
}, []), /* @__PURE__ */ O(
|
|
86
|
-
C.div,
|
|
87
|
-
p(E({}, f), {
|
|
88
|
-
ref: K,
|
|
89
|
-
style: E({
|
|
90
|
-
pointerEvents: Y ? w ? "auto" : "none" : void 0
|
|
91
|
-
}, t.style),
|
|
92
|
-
onFocusCapture: P(t.onFocusCapture, T.onFocusCapture),
|
|
93
|
-
onBlurCapture: P(t.onBlurCapture, T.onBlurCapture),
|
|
94
|
-
onPointerDownCapture: P(
|
|
95
|
-
t.onPointerDownCapture,
|
|
96
|
-
$.onPointerDownCapture
|
|
97
|
-
)
|
|
98
|
-
})
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
ie.displayName = se;
|
|
103
|
-
var oe = "DismissableLayerBranch", ae = i.forwardRef((t, e) => {
|
|
104
|
-
const s = i.useContext(M), n = i.useRef(null), r = I(e, n);
|
|
105
|
-
return i.useEffect(() => {
|
|
106
|
-
const o = n.current;
|
|
107
|
-
if (o)
|
|
108
|
-
return s.branches.add(o), () => {
|
|
109
|
-
s.branches.delete(o);
|
|
110
|
-
};
|
|
111
|
-
}, [s.branches]), /* @__PURE__ */ O(C.div, p(E({}, t), { ref: r }));
|
|
112
|
-
});
|
|
113
|
-
ae.displayName = oe;
|
|
114
|
-
function ue(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
115
|
-
const s = L(t), n = i.useRef(!1), r = i.useRef(() => {
|
|
116
|
-
});
|
|
117
|
-
return i.useEffect(() => {
|
|
118
|
-
const o = (c) => {
|
|
119
|
-
if (c.target && !n.current) {
|
|
120
|
-
let f = function() {
|
|
121
|
-
U(
|
|
122
|
-
ne,
|
|
123
|
-
s,
|
|
124
|
-
u,
|
|
125
|
-
{ discrete: !0 }
|
|
126
|
-
);
|
|
127
|
-
};
|
|
128
|
-
const u = { originalEvent: c };
|
|
129
|
-
c.pointerType === "touch" ? (e.removeEventListener("click", r.current), r.current = f, e.addEventListener("click", r.current, { once: !0 })) : f();
|
|
130
|
-
} else
|
|
131
|
-
e.removeEventListener("click", r.current);
|
|
132
|
-
n.current = !1;
|
|
133
|
-
}, l = window.setTimeout(() => {
|
|
134
|
-
e.addEventListener("pointerdown", o);
|
|
135
|
-
}, 0);
|
|
136
|
-
return () => {
|
|
137
|
-
window.clearTimeout(l), e.removeEventListener("pointerdown", o), e.removeEventListener("click", r.current);
|
|
138
|
-
};
|
|
139
|
-
}, [e, s]), {
|
|
140
|
-
// ensures we check React component tree (not just DOM tree)
|
|
141
|
-
onPointerDownCapture: () => n.current = !0
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function ce(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
145
|
-
const s = L(t), n = i.useRef(!1);
|
|
146
|
-
return i.useEffect(() => {
|
|
147
|
-
const r = (o) => {
|
|
148
|
-
o.target && !n.current && U(re, s, { originalEvent: o }, {
|
|
149
|
-
discrete: !1
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
return e.addEventListener("focusin", r), () => e.removeEventListener("focusin", r);
|
|
153
|
-
}, [e, s]), {
|
|
154
|
-
onFocusCapture: () => n.current = !0,
|
|
155
|
-
onBlurCapture: () => n.current = !1
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function _() {
|
|
159
|
-
const t = new CustomEvent(D);
|
|
160
|
-
document.dispatchEvent(t);
|
|
161
|
-
}
|
|
162
|
-
function U(t, e, s, { discrete: n }) {
|
|
163
|
-
const r = s.originalEvent.target, o = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: s });
|
|
164
|
-
e && r.addEventListener(t, e, { once: !0 }), n ? Q(r, o) : r.dispatchEvent(o);
|
|
165
|
-
}
|
|
166
|
-
var de = "Portal", le = i.forwardRef((t, e) => {
|
|
167
|
-
var f;
|
|
168
|
-
const c = t, { container: s } = c, n = b(c, ["container"]), [r, o] = i.useState(!1);
|
|
169
|
-
k(() => o(!0), []);
|
|
170
|
-
const l = s || r && ((f = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : f.body);
|
|
171
|
-
return l ? V.createPortal(/* @__PURE__ */ O(C.div, p(E({}, n), { ref: e })), l) : null;
|
|
172
|
-
});
|
|
173
|
-
le.displayName = de;
|
|
174
|
-
export {
|
|
175
|
-
ie as D,
|
|
176
|
-
le as P,
|
|
177
|
-
me as u
|
|
178
|
-
};
|
|
179
|
-
//# sourceMappingURL=index-U7y6nBZR.js.map
|