daleui 0.0.2 → 0.0.5
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/README.md +43 -0
- package/dist/check-DEVerfH5.js +72 -0
- package/dist/components/Box/Box.d.ts +34 -0
- package/dist/components/Box/Box.js +34 -0
- package/dist/components/Button/Button.d.ts +37 -0
- package/dist/components/Button/Button.js +367 -0
- package/dist/components/Card/Card.d.ts +68 -0
- package/dist/components/Card/Card.js +132 -0
- package/dist/components/Checkbox/Checkbox.d.ts +34 -0
- package/dist/components/Checkbox/Checkbox.js +657 -0
- package/dist/components/Flex/Flex.d.ts +361 -0
- package/dist/components/Flex/Flex.js +65 -0
- package/dist/components/HStack/HStack.d.ts +23 -0
- package/dist/components/HStack/HStack.js +35 -0
- package/dist/components/Heading/Heading.d.ts +33 -0
- package/dist/components/Heading/Heading.js +67 -0
- package/dist/components/Icon/Icon.d.ts +20 -0
- package/dist/components/Icon/Icon.js +325 -0
- package/dist/components/Label/Label.d.ts +35 -0
- package/dist/components/Label/Label.js +74 -0
- package/dist/components/Link/Link.d.ts +33 -0
- package/dist/components/Link/Link.js +176 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +17 -0
- package/dist/components/PasswordInput/PasswordInput.js +151 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +82 -0
- package/dist/components/RadioGroup/RadioGroup.js +713 -0
- package/dist/components/Select/Select.d.ts +39 -0
- package/dist/components/Select/Select.js +222 -0
- package/dist/components/Tag/Tag.d.ts +26 -0
- package/dist/components/Tag/Tag.js +189 -0
- package/dist/components/Text/Text.d.ts +22 -0
- package/dist/components/Text/Text.js +115 -0
- package/dist/components/TextInput/TextInput.d.ts +21 -0
- package/dist/components/TextInput/TextInput.js +106 -0
- package/dist/components/VStack/VStack.d.ts +23 -0
- package/dist/components/VStack/VStack.js +35 -0
- package/dist/css-QiVVeZaw.js +212 -0
- package/dist/cva-BrKodHDH.js +57 -0
- package/dist/cx-DN21T1EH.js +9 -0
- package/dist/hstack-cCrHxysi.js +43 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +37 -0
- package/dist/tokens/colors.d.ts +4 -0
- package/dist/tokens/iconography.d.ts +45 -0
- package/dist/tokens/spacing.d.ts +42 -0
- package/dist/tokens/typography.d.ts +312 -0
- package/dist/use-locale-context-DYXE7B4r.js +775 -0
- package/package.json +62 -39
- package/styled-system/css/conditions.mjs +36 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.mjs +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.mjs +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.mjs +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.mjs +46 -0
- package/styled-system/helpers.mjs +316 -0
- package/styled-system/patterns/aspect-ratio.d.ts +20 -0
- package/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/styled-system/patterns/bleed.d.ts +21 -0
- package/styled-system/patterns/bleed.mjs +24 -0
- package/styled-system/patterns/box.d.ts +20 -0
- package/styled-system/patterns/box.mjs +15 -0
- package/styled-system/patterns/center.d.ts +20 -0
- package/styled-system/patterns/center.mjs +21 -0
- package/styled-system/patterns/circle.d.ts +20 -0
- package/styled-system/patterns/circle.mjs +25 -0
- package/styled-system/patterns/container.d.ts +20 -0
- package/styled-system/patterns/container.mjs +21 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.mjs +21 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.mjs +25 -0
- package/styled-system/patterns/flex.d.ts +26 -0
- package/styled-system/patterns/flex.mjs +26 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.mjs +52 -0
- package/styled-system/patterns/grid-item.d.ts +25 -0
- package/styled-system/patterns/grid-item.mjs +25 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.mjs +27 -0
- package/styled-system/patterns/hstack.d.ts +21 -0
- package/styled-system/patterns/hstack.mjs +24 -0
- package/styled-system/patterns/index.d.ts +21 -0
- package/styled-system/patterns/index.mjs +20 -0
- package/styled-system/patterns/link-overlay.d.ts +20 -0
- package/styled-system/patterns/link-overlay.mjs +24 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.mjs +21 -0
- package/styled-system/patterns/square.d.ts +20 -0
- package/styled-system/patterns/square.mjs +24 -0
- package/styled-system/patterns/stack.d.ts +23 -0
- package/styled-system/patterns/stack.mjs +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/styled-system/patterns/visually-hidden.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +21 -0
- package/styled-system/patterns/vstack.mjs +24 -0
- package/styled-system/patterns/wrap.d.ts +24 -0
- package/styled-system/patterns/wrap.mjs +25 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.mjs +3176 -0
- package/styled-system/tokens/tokens.d.ts +63 -0
- package/styled-system/types/composition.d.ts +224 -0
- package/styled-system/types/conditions.d.ts +310 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +20 -0
- package/styled-system/types/index.d.ts +7 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +265 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +7504 -0
- package/styled-system/types/system-types.d.ts +269 -0
- package/.github/CODEOWNERS +0 -1
- package/.github/FUNDING.yml +0 -1
- package/.github/workflows/automation.yml +0 -13
- package/.github/workflows/chromatic.yml +0 -19
- package/.github/workflows/deployment.yml +0 -32
- package/.github/workflows/integration.yml +0 -15
- package/.github/workflows/storybook-tests.yml +0 -17
- package/.storybook/main.ts +0 -18
- package/.storybook/preview.ts +0 -29
- package/.storybook/test-runner.ts +0 -33
- package/bun.lock +0 -2099
- package/chromatic.config.json +0 -5
- package/eslint.config.js +0 -28
- package/index.html +0 -13
- package/panda.config.ts +0 -61
- package/postcss.config.cjs +0 -5
- package/public/logo.svg +0 -9
- package/src/App.tsx +0 -67
- package/src/assets/Discord.svg +0 -1
- package/src/assets/GitHub.svg +0 -1
- package/src/assets/LinkedIn.svg +0 -1
- package/src/assets/Medium.svg +0 -1
- package/src/assets/YouTube.svg +0 -1
- package/src/components/Button/Button.stories.tsx +0 -115
- package/src/components/Button/Button.test.tsx +0 -108
- package/src/components/Button/Button.tsx +0 -245
- package/src/components/Button/index.tsx +0 -1
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -129
- package/src/components/Checkbox/Checkbox.test.tsx +0 -169
- package/src/components/Checkbox/Checkbox.tsx +0 -190
- package/src/components/Heading/Heading.stories.tsx +0 -72
- package/src/components/Heading/Heading.test.tsx +0 -55
- package/src/components/Heading/Heading.tsx +0 -73
- package/src/components/Heading/index.tsx +0 -1
- package/src/components/Icon/Icon.stories.tsx +0 -106
- package/src/components/Icon/Icon.test.tsx +0 -44
- package/src/components/Icon/Icon.tsx +0 -116
- package/src/components/Icon/index.tsx +0 -1
- package/src/components/Text/Text.stories.tsx +0 -65
- package/src/components/Text/Text.test.tsx +0 -54
- package/src/components/Text/Text.tsx +0 -93
- package/src/components/Text/index.tsx +0 -1
- package/src/index.css +0 -2
- package/src/main.tsx +0 -10
- package/src/setupTests.tsx +0 -5
- package/src/styles/globalCss.ts +0 -43
- package/src/tokens/colors.mdx +0 -100
- package/src/tokens/colors.ts +0 -288
- package/src/tokens/iconography.mdx +0 -15
- package/src/tokens/iconography.tsx +0 -54
- package/src/tokens/typography.mdx +0 -38
- package/src/tokens/typography.ts +0 -132
- package/src/vite-env.d.ts +0 -2
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -22
- package/vite.config.ts +0 -16
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
import { createContext as Ce, useContext as Ne, useMemo as Te, useRef as b, useLayoutEffect as Re, useEffect as z, useState as ae, memo as Ae, forwardRef as Oe, createElement as Me, isValidElement as Fe, Children as je, cloneElement as De } from "react";
|
|
2
|
+
import { flushSync as oe } from "react-dom";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
function $e(e) {
|
|
5
|
+
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
6
|
+
}
|
|
7
|
+
var Ve = (e) => e != null && typeof e == "object", K = (e) => typeof e == "string", $ = (e) => typeof e == "function", ve = (e, t) => Object.prototype.hasOwnProperty.call(e, t), _e = (e) => Object.prototype.toString.call(e), ge = Function.prototype.toString, We = ge.call(Object), Ie = (e) => {
|
|
8
|
+
if (!Ve(e) || _e(e) != "[object Object]" || Be(e)) return !1;
|
|
9
|
+
const t = Object.getPrototypeOf(e);
|
|
10
|
+
if (t === null) return !0;
|
|
11
|
+
const n = ve(t, "constructor") && t.constructor;
|
|
12
|
+
return typeof n == "function" && n instanceof n && ge.call(n) == We;
|
|
13
|
+
}, Ke = (e) => typeof e == "object" && e !== null && "$$typeof" in e && "props" in e, ze = (e) => typeof e == "object" && e !== null && "__v_isVNode" in e, Be = (e) => Ke(e) || ze(e), He = (e) => e(), qe = (...e) => (...t) => {
|
|
14
|
+
e.forEach(function(n) {
|
|
15
|
+
n?.(...t);
|
|
16
|
+
});
|
|
17
|
+
}, zt = (e) => typeof e == "number" ? `${e}px` : e;
|
|
18
|
+
function me(e) {
|
|
19
|
+
if (!Ie(e) || e === void 0) return e;
|
|
20
|
+
const t = Reflect.ownKeys(e).filter((r) => typeof r == "string"), n = {};
|
|
21
|
+
for (const r of t) {
|
|
22
|
+
const o = e[r];
|
|
23
|
+
o !== void 0 && (n[r] = me(o));
|
|
24
|
+
}
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
function fe(...e) {
|
|
28
|
+
const t = e.length === 1 ? e[0] : e[1];
|
|
29
|
+
(e.length !== 2 || e[0]) && process.env.NODE_ENV !== "production" && console.warn(t);
|
|
30
|
+
}
|
|
31
|
+
function Ue(e, t) {
|
|
32
|
+
if (e == null) throw new Error(t());
|
|
33
|
+
}
|
|
34
|
+
function Ge(e, t) {
|
|
35
|
+
return `${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`;
|
|
36
|
+
}
|
|
37
|
+
function ye(e = {}) {
|
|
38
|
+
const {
|
|
39
|
+
name: t,
|
|
40
|
+
strict: n = !0,
|
|
41
|
+
hookName: r = "useContext",
|
|
42
|
+
providerName: o = "Provider",
|
|
43
|
+
errorMessage: u,
|
|
44
|
+
defaultValue: d
|
|
45
|
+
} = e, i = Ce(d);
|
|
46
|
+
i.displayName = t;
|
|
47
|
+
function l() {
|
|
48
|
+
const a = Ne(i);
|
|
49
|
+
if (!a && n) {
|
|
50
|
+
const m = new Error(u ?? Ge(r, o));
|
|
51
|
+
throw m.name = "ContextError", ve(Error, "captureStackTrace") && $(Error.captureStackTrace) && Error.captureStackTrace(m, l), m;
|
|
52
|
+
}
|
|
53
|
+
return a;
|
|
54
|
+
}
|
|
55
|
+
return [i.Provider, l, i];
|
|
56
|
+
}
|
|
57
|
+
var Y = (...e) => (t) => e.reduce((n, r) => r(n), t), W = () => {
|
|
58
|
+
}, U = (e) => typeof e == "object" && e !== null, Bt = (e) => e ? "" : void 0, Ze = 1, Je = 9, Xe = 11, te = (e) => U(e) && e.nodeType === Ze && typeof e.nodeName == "string", Ee = (e) => U(e) && e.nodeType === Je, Ye = (e) => U(e) && e === e.window, Qe = (e) => U(e) && e.nodeType !== void 0, be = (e) => Qe(e) && e.nodeType === Xe && "host" in e;
|
|
59
|
+
function we(e) {
|
|
60
|
+
if (!e) return !1;
|
|
61
|
+
const t = e.getRootNode();
|
|
62
|
+
return he(t) === e;
|
|
63
|
+
}
|
|
64
|
+
function et(e, t) {
|
|
65
|
+
if (!e || !t || !te(e) || !te(t)) return !1;
|
|
66
|
+
const n = t.getRootNode?.();
|
|
67
|
+
if (e === t || e.contains(t)) return !0;
|
|
68
|
+
if (n && be(n)) {
|
|
69
|
+
let r = t;
|
|
70
|
+
for (; r; ) {
|
|
71
|
+
if (e === r) return !0;
|
|
72
|
+
r = r.parentNode || r.host;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return !1;
|
|
76
|
+
}
|
|
77
|
+
function G(e) {
|
|
78
|
+
return Ee(e) ? e : Ye(e) ? e.document : e?.ownerDocument ?? document;
|
|
79
|
+
}
|
|
80
|
+
function P(e) {
|
|
81
|
+
return be(e) ? P(e.host) : Ee(e) ? e.defaultView ?? window : te(e) ? e.ownerDocument?.defaultView ?? window : window;
|
|
82
|
+
}
|
|
83
|
+
function he(e) {
|
|
84
|
+
let t = e.activeElement;
|
|
85
|
+
for (; t?.shadowRoot; ) {
|
|
86
|
+
const n = t.shadowRoot.activeElement;
|
|
87
|
+
if (!n || n === t) break;
|
|
88
|
+
t = n;
|
|
89
|
+
}
|
|
90
|
+
return t;
|
|
91
|
+
}
|
|
92
|
+
var se = () => typeof document < "u";
|
|
93
|
+
function tt() {
|
|
94
|
+
return navigator.userAgentData?.platform ?? navigator.platform;
|
|
95
|
+
}
|
|
96
|
+
function nt() {
|
|
97
|
+
const e = navigator.userAgentData;
|
|
98
|
+
return e && Array.isArray(e.brands) ? e.brands.map(({ brand: t, version: n }) => `${t}/${n}`).join(" ") : navigator.userAgent;
|
|
99
|
+
}
|
|
100
|
+
var ie = (e) => se() && e.test(tt()), rt = (e) => se() && e.test(nt()), ot = (e) => se() && e.test(navigator.vendor), st = () => ie(/^iPhone/i), it = () => ie(/^iPad/i) || ce() && navigator.maxTouchPoints > 1, ct = () => st() || it(), ut = () => ce() || ct(), ce = () => ie(/^Mac/i), Ht = () => ut() && ot(/apple/i), at = () => rt(/Android/i);
|
|
101
|
+
function ft(e) {
|
|
102
|
+
return e.composedPath?.() ?? e.nativeEvent?.composedPath?.();
|
|
103
|
+
}
|
|
104
|
+
function ue(e) {
|
|
105
|
+
return ft(e)?.[0] ?? e.target;
|
|
106
|
+
}
|
|
107
|
+
function dt(e) {
|
|
108
|
+
return e.pointerType === "" && e.isTrusted ? !0 : at() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
109
|
+
}
|
|
110
|
+
var qt = (e) => e.button === 0, lt = (e) => "touches" in e && e.touches.length > 0;
|
|
111
|
+
function pt(e, t = "client") {
|
|
112
|
+
const n = lt(e) ? e.touches[0] || e.changedTouches[0] : e;
|
|
113
|
+
return { x: n[`${t}X`], y: n[`${t}Y`] };
|
|
114
|
+
}
|
|
115
|
+
var T = (e, t, n, r) => {
|
|
116
|
+
const o = typeof e == "function" ? e() : e;
|
|
117
|
+
return o?.addEventListener(t, n, r), () => {
|
|
118
|
+
o?.removeEventListener(t, n, r);
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
function vt(e, t) {
|
|
122
|
+
const { type: n = "HTMLInputElement", property: r = "value" } = t, o = P(e)[n].prototype;
|
|
123
|
+
return Object.getOwnPropertyDescriptor(o, r) ?? {};
|
|
124
|
+
}
|
|
125
|
+
function gt(e, t) {
|
|
126
|
+
if (!e) return;
|
|
127
|
+
vt(e, { type: "HTMLInputElement", property: "checked" }).set?.call(e, t), t ? e.setAttribute("checked", "") : e.removeAttribute("checked");
|
|
128
|
+
}
|
|
129
|
+
function Ut(e, t) {
|
|
130
|
+
const { checked: n, bubbles: r = !0 } = t;
|
|
131
|
+
if (!e) return;
|
|
132
|
+
const o = P(e);
|
|
133
|
+
e instanceof o.HTMLInputElement && (gt(e, n), e.dispatchEvent(new o.Event("click", { bubbles: r })));
|
|
134
|
+
}
|
|
135
|
+
function mt(e) {
|
|
136
|
+
return yt(e) ? e.form : e.closest("form");
|
|
137
|
+
}
|
|
138
|
+
function yt(e) {
|
|
139
|
+
return e.matches("textarea, input, select, button");
|
|
140
|
+
}
|
|
141
|
+
function Et(e, t) {
|
|
142
|
+
if (!e) return;
|
|
143
|
+
const n = mt(e), r = (o) => {
|
|
144
|
+
o.defaultPrevented || t();
|
|
145
|
+
};
|
|
146
|
+
return n?.addEventListener("reset", r, { passive: !0 }), () => n?.removeEventListener("reset", r);
|
|
147
|
+
}
|
|
148
|
+
function bt(e, t) {
|
|
149
|
+
const n = e?.closest("fieldset");
|
|
150
|
+
if (!n) return;
|
|
151
|
+
t(n.disabled);
|
|
152
|
+
const r = P(n), o = new r.MutationObserver(() => t(n.disabled));
|
|
153
|
+
return o.observe(n, {
|
|
154
|
+
attributes: !0,
|
|
155
|
+
attributeFilter: ["disabled"]
|
|
156
|
+
}), () => o.disconnect();
|
|
157
|
+
}
|
|
158
|
+
function Gt(e, t) {
|
|
159
|
+
if (!e) return;
|
|
160
|
+
const { onFieldsetDisabledChange: n, onFormReset: r } = t, o = [Et(e, r), bt(e, n)];
|
|
161
|
+
return () => o.forEach((u) => u?.());
|
|
162
|
+
}
|
|
163
|
+
function Zt(e) {
|
|
164
|
+
const {
|
|
165
|
+
pointerNode: t,
|
|
166
|
+
keyboardNode: n = t,
|
|
167
|
+
onPress: r,
|
|
168
|
+
onPressStart: o,
|
|
169
|
+
onPressEnd: u,
|
|
170
|
+
isValidKey: d = (y) => y.key === "Enter"
|
|
171
|
+
} = e;
|
|
172
|
+
if (!t) return W;
|
|
173
|
+
const i = P(t);
|
|
174
|
+
let l = W, a = W, m = W;
|
|
175
|
+
const f = (y) => ({
|
|
176
|
+
point: pt(y),
|
|
177
|
+
event: y
|
|
178
|
+
});
|
|
179
|
+
function E(y) {
|
|
180
|
+
o?.(f(y));
|
|
181
|
+
}
|
|
182
|
+
function w(y) {
|
|
183
|
+
u?.(f(y));
|
|
184
|
+
}
|
|
185
|
+
const O = T(t, "pointerdown", (y) => {
|
|
186
|
+
a();
|
|
187
|
+
const M = T(i, "pointerup", (v) => {
|
|
188
|
+
const F = ue(v);
|
|
189
|
+
et(t, F) ? r?.(f(v)) : u?.(f(v));
|
|
190
|
+
}, { passive: !r, once: !0 }), x = T(i, "pointercancel", w, {
|
|
191
|
+
passive: !u,
|
|
192
|
+
once: !0
|
|
193
|
+
});
|
|
194
|
+
a = Y(M, x), we(n) && y.pointerType === "mouse" && y.preventDefault(), E(y);
|
|
195
|
+
}, { passive: !o }), k = T(n, "focus", S);
|
|
196
|
+
l = Y(O, k);
|
|
197
|
+
function S() {
|
|
198
|
+
const y = (v) => {
|
|
199
|
+
if (!d(v)) return;
|
|
200
|
+
const F = (X) => {
|
|
201
|
+
if (!d(X)) return;
|
|
202
|
+
const _ = new i.PointerEvent("pointerup"), s = f(_);
|
|
203
|
+
r?.(s), u?.(s);
|
|
204
|
+
};
|
|
205
|
+
a(), a = T(n, "keyup", F);
|
|
206
|
+
const N = new i.PointerEvent("pointerdown");
|
|
207
|
+
E(N);
|
|
208
|
+
}, V = () => {
|
|
209
|
+
const v = new i.PointerEvent("pointercancel");
|
|
210
|
+
w(v);
|
|
211
|
+
}, M = T(n, "keydown", y), x = T(n, "blur", V);
|
|
212
|
+
m = Y(M, x);
|
|
213
|
+
}
|
|
214
|
+
return () => {
|
|
215
|
+
l(), a(), m();
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function Jt(e, t) {
|
|
219
|
+
return Array.from(e?.querySelectorAll(t) ?? []);
|
|
220
|
+
}
|
|
221
|
+
function wt(e) {
|
|
222
|
+
const t = /* @__PURE__ */ new WeakMap();
|
|
223
|
+
let n;
|
|
224
|
+
const r = /* @__PURE__ */ new WeakMap(), o = (i) => n || (n = new i.ResizeObserver((l) => {
|
|
225
|
+
for (const a of l) {
|
|
226
|
+
r.set(a.target, a);
|
|
227
|
+
const m = t.get(a.target);
|
|
228
|
+
if (m)
|
|
229
|
+
for (const f of m)
|
|
230
|
+
f(a);
|
|
231
|
+
}
|
|
232
|
+
}), n);
|
|
233
|
+
return {
|
|
234
|
+
observe: (i, l) => {
|
|
235
|
+
let a = t.get(i) || /* @__PURE__ */ new Set();
|
|
236
|
+
a.add(l), t.set(i, a);
|
|
237
|
+
const m = P(i);
|
|
238
|
+
return o(m).observe(i, e), () => {
|
|
239
|
+
const f = t.get(i);
|
|
240
|
+
f && (f.delete(l), f.size === 0 && (t.delete(i), o(m).unobserve(i)));
|
|
241
|
+
};
|
|
242
|
+
},
|
|
243
|
+
unobserve: (i) => {
|
|
244
|
+
t.delete(i), n?.unobserve(i);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
var Xt = /* @__PURE__ */ wt({
|
|
249
|
+
box: "border-box"
|
|
250
|
+
}), Yt = {
|
|
251
|
+
border: "0",
|
|
252
|
+
clip: "rect(0 0 0 0)",
|
|
253
|
+
height: "1px",
|
|
254
|
+
margin: "-1px",
|
|
255
|
+
overflow: "hidden",
|
|
256
|
+
padding: "0",
|
|
257
|
+
position: "absolute",
|
|
258
|
+
width: "1px",
|
|
259
|
+
whiteSpace: "nowrap",
|
|
260
|
+
wordWrap: "normal"
|
|
261
|
+
}, ht = (...e) => e.map((t) => t?.trim?.()).filter(Boolean).join(" "), Lt = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g, de = (e) => {
|
|
262
|
+
const t = {};
|
|
263
|
+
let n;
|
|
264
|
+
for (; n = Lt.exec(e); )
|
|
265
|
+
t[n[1]] = n[2];
|
|
266
|
+
return t;
|
|
267
|
+
}, Pt = (e, t) => {
|
|
268
|
+
if (K(e)) {
|
|
269
|
+
if (K(t)) return `${e};${t}`;
|
|
270
|
+
e = de(e);
|
|
271
|
+
} else K(t) && (t = de(t));
|
|
272
|
+
return Object.assign({}, e ?? {}, t ?? {});
|
|
273
|
+
};
|
|
274
|
+
function kt(...e) {
|
|
275
|
+
let t = {};
|
|
276
|
+
for (let n of e) {
|
|
277
|
+
if (!n) continue;
|
|
278
|
+
for (let o in t) {
|
|
279
|
+
if (o.startsWith("on") && typeof t[o] == "function" && typeof n[o] == "function") {
|
|
280
|
+
t[o] = qe(n[o], t[o]);
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
if (o === "className" || o === "class") {
|
|
284
|
+
t[o] = ht(t[o], n[o]);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (o === "style") {
|
|
288
|
+
t[o] = Pt(t[o], n[o]);
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
t[o] = n[o] !== void 0 ? n[o] : t[o];
|
|
292
|
+
}
|
|
293
|
+
for (let o in n)
|
|
294
|
+
t[o] === void 0 && (t[o] = n[o]);
|
|
295
|
+
const r = Object.getOwnPropertySymbols(n);
|
|
296
|
+
for (let o of r)
|
|
297
|
+
t[o] = n[o];
|
|
298
|
+
}
|
|
299
|
+
return t;
|
|
300
|
+
}
|
|
301
|
+
function Qt() {
|
|
302
|
+
return {
|
|
303
|
+
and: (...e) => function(n) {
|
|
304
|
+
return e.every((r) => n.guard(r));
|
|
305
|
+
},
|
|
306
|
+
or: (...e) => function(n) {
|
|
307
|
+
return e.some((r) => n.guard(r));
|
|
308
|
+
},
|
|
309
|
+
not: (e) => function(n) {
|
|
310
|
+
return !n.guard(e);
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function en(e) {
|
|
315
|
+
return e;
|
|
316
|
+
}
|
|
317
|
+
var D = /* @__PURE__ */ ((e) => (e.NotStarted = "Not Started", e.Started = "Started", e.Stopped = "Stopped", e))(D || {}), Q = "__init__";
|
|
318
|
+
function St(e) {
|
|
319
|
+
const t = () => e.getRootNode?.() ?? document, n = () => G(t());
|
|
320
|
+
return {
|
|
321
|
+
...e,
|
|
322
|
+
getRootNode: t,
|
|
323
|
+
getDoc: n,
|
|
324
|
+
getWin: () => n().defaultView ?? window,
|
|
325
|
+
getActiveElement: () => he(t()),
|
|
326
|
+
isActiveElement: we,
|
|
327
|
+
getById: (d) => t().getElementById(d)
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function xt(e) {
|
|
331
|
+
return new Proxy({}, {
|
|
332
|
+
get(t, n) {
|
|
333
|
+
return n === "style" ? (r) => e({ style: r }).style : e;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
var tn = () => (e) => Array.from(new Set(e)), Le = typeof globalThis.document < "u" ? Re : z;
|
|
338
|
+
function B(e) {
|
|
339
|
+
const t = e().value ?? e().defaultValue, n = e().isEqual ?? Object.is, [r] = ae(t), [o, u] = ae(r), d = e().value !== void 0, i = b(o);
|
|
340
|
+
i.current = d ? e().value : o;
|
|
341
|
+
const l = b(i.current);
|
|
342
|
+
Le(() => {
|
|
343
|
+
l.current = i.current;
|
|
344
|
+
}, [o, e().value]);
|
|
345
|
+
const a = (f) => {
|
|
346
|
+
const E = l.current, w = $(f) ? f(E) : f;
|
|
347
|
+
e().debug && console.log(`[bindable > ${e().debug}] setValue`, { next: w, prev: E }), d || u(w), n(w, E) || e().onChange?.(w, E);
|
|
348
|
+
};
|
|
349
|
+
function m() {
|
|
350
|
+
return d ? e().value : o;
|
|
351
|
+
}
|
|
352
|
+
return {
|
|
353
|
+
initial: r,
|
|
354
|
+
ref: i,
|
|
355
|
+
get: m,
|
|
356
|
+
set(f) {
|
|
357
|
+
(e().sync ? oe : He)(() => a(f));
|
|
358
|
+
},
|
|
359
|
+
invoke(f, E) {
|
|
360
|
+
e().onChange?.(f, E);
|
|
361
|
+
},
|
|
362
|
+
hash(f) {
|
|
363
|
+
return e().hash?.(f) ?? String(f);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
B.cleanup = (e) => {
|
|
368
|
+
z(() => e, []);
|
|
369
|
+
};
|
|
370
|
+
B.ref = (e) => {
|
|
371
|
+
const t = b(e);
|
|
372
|
+
return {
|
|
373
|
+
get: () => t.current,
|
|
374
|
+
set: (n) => {
|
|
375
|
+
t.current = n;
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
function Ct(e) {
|
|
380
|
+
const t = b(e);
|
|
381
|
+
return {
|
|
382
|
+
get(n) {
|
|
383
|
+
return t.current[n];
|
|
384
|
+
},
|
|
385
|
+
set(n, r) {
|
|
386
|
+
t.current[n] = r;
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
var Nt = (e, t) => {
|
|
391
|
+
const n = b(!1), r = b(!1);
|
|
392
|
+
z(() => {
|
|
393
|
+
if (n.current && r.current) return t();
|
|
394
|
+
r.current = !0;
|
|
395
|
+
}, [...(e ?? []).map((o) => typeof o == "function" ? o() : o)]), z(() => (n.current = !0, () => {
|
|
396
|
+
n.current = !1;
|
|
397
|
+
}), []);
|
|
398
|
+
};
|
|
399
|
+
function nn(e, t = {}) {
|
|
400
|
+
const n = Te(() => {
|
|
401
|
+
const { id: s, ids: c, getRootNode: g } = t;
|
|
402
|
+
return St({ id: s, ids: c, getRootNode: g });
|
|
403
|
+
}, [t]), r = (...s) => {
|
|
404
|
+
e.debug && console.log(...s);
|
|
405
|
+
}, o = e.props?.({ props: me(t), scope: n }) ?? t, u = Tt(o), d = e.context?.({
|
|
406
|
+
prop: u,
|
|
407
|
+
bindable: B,
|
|
408
|
+
scope: n,
|
|
409
|
+
flush: le,
|
|
410
|
+
getContext() {
|
|
411
|
+
return l;
|
|
412
|
+
},
|
|
413
|
+
getComputed() {
|
|
414
|
+
return x;
|
|
415
|
+
},
|
|
416
|
+
getRefs() {
|
|
417
|
+
return O;
|
|
418
|
+
},
|
|
419
|
+
getEvent() {
|
|
420
|
+
return w();
|
|
421
|
+
}
|
|
422
|
+
}), i = Pe(d), l = {
|
|
423
|
+
get(s) {
|
|
424
|
+
return i.current?.[s].ref.current;
|
|
425
|
+
},
|
|
426
|
+
set(s, c) {
|
|
427
|
+
i.current?.[s].set(c);
|
|
428
|
+
},
|
|
429
|
+
initial(s) {
|
|
430
|
+
return i.current?.[s].initial;
|
|
431
|
+
},
|
|
432
|
+
hash(s) {
|
|
433
|
+
const c = i.current?.[s].get();
|
|
434
|
+
return i.current?.[s].hash(c);
|
|
435
|
+
}
|
|
436
|
+
}, a = b(/* @__PURE__ */ new Map()), m = b(null), f = b(null), E = b({ type: "" }), w = () => ({
|
|
437
|
+
...E.current,
|
|
438
|
+
current() {
|
|
439
|
+
return E.current;
|
|
440
|
+
},
|
|
441
|
+
previous() {
|
|
442
|
+
return f.current;
|
|
443
|
+
}
|
|
444
|
+
}), J = () => ({
|
|
445
|
+
...v,
|
|
446
|
+
matches(...s) {
|
|
447
|
+
return s.includes(v.ref.current);
|
|
448
|
+
},
|
|
449
|
+
hasTag(s) {
|
|
450
|
+
return !!e.states[v.ref.current]?.tags?.includes(s);
|
|
451
|
+
}
|
|
452
|
+
}), O = Ct(e.refs?.({ prop: u, context: l }) ?? {}), k = () => ({
|
|
453
|
+
state: J(),
|
|
454
|
+
context: l,
|
|
455
|
+
event: w(),
|
|
456
|
+
prop: u,
|
|
457
|
+
send: _,
|
|
458
|
+
action: S,
|
|
459
|
+
guard: y,
|
|
460
|
+
track: Nt,
|
|
461
|
+
refs: O,
|
|
462
|
+
computed: x,
|
|
463
|
+
flush: le,
|
|
464
|
+
scope: n,
|
|
465
|
+
choose: M
|
|
466
|
+
}), S = (s) => {
|
|
467
|
+
const c = $(s) ? s(k()) : s;
|
|
468
|
+
if (!c) return;
|
|
469
|
+
const g = c.map((p) => {
|
|
470
|
+
const h = e.implementations?.actions?.[p];
|
|
471
|
+
return h || fe(`[zag-js] No implementation found for action "${JSON.stringify(p)}"`), h;
|
|
472
|
+
});
|
|
473
|
+
for (const p of g)
|
|
474
|
+
p?.(k());
|
|
475
|
+
}, y = (s) => $(s) ? s(k()) : e.implementations?.guards?.[s](k()), V = (s) => {
|
|
476
|
+
const c = $(s) ? s(k()) : s;
|
|
477
|
+
if (!c) return;
|
|
478
|
+
const g = c.map((h) => {
|
|
479
|
+
const C = e.implementations?.effects?.[h];
|
|
480
|
+
return C || fe(`[zag-js] No implementation found for effect "${JSON.stringify(h)}"`), C;
|
|
481
|
+
}), p = [];
|
|
482
|
+
for (const h of g) {
|
|
483
|
+
const C = h?.(k());
|
|
484
|
+
C && p.push(C);
|
|
485
|
+
}
|
|
486
|
+
return () => p.forEach((h) => h?.());
|
|
487
|
+
}, M = (s) => $e(s).find((c) => {
|
|
488
|
+
let g = !c.guard;
|
|
489
|
+
return K(c.guard) ? g = !!y(c.guard) : $(c.guard) && (g = c.guard(k())), g;
|
|
490
|
+
}), x = (s) => {
|
|
491
|
+
Ue(e.computed, () => "[zag-js] No computed object found on machine");
|
|
492
|
+
const c = e.computed[s];
|
|
493
|
+
return c({
|
|
494
|
+
context: l,
|
|
495
|
+
event: w(),
|
|
496
|
+
prop: u,
|
|
497
|
+
refs: O,
|
|
498
|
+
scope: n,
|
|
499
|
+
computed: x
|
|
500
|
+
});
|
|
501
|
+
}, v = B(() => ({
|
|
502
|
+
defaultValue: e.initialState({ prop: u }),
|
|
503
|
+
onChange(s, c) {
|
|
504
|
+
c && (a.current.get(c)?.(), a.current.delete(c)), c && S(e.states[c]?.exit), S(m.current?.actions);
|
|
505
|
+
const g = V(e.states[s]?.effects);
|
|
506
|
+
if (g && a.current.set(s, g), c === Q) {
|
|
507
|
+
S(e.entry);
|
|
508
|
+
const p = V(e.effects);
|
|
509
|
+
p && a.current.set(Q, p);
|
|
510
|
+
}
|
|
511
|
+
S(e.states[s]?.entry);
|
|
512
|
+
}
|
|
513
|
+
})), F = b(void 0), N = b(D.NotStarted);
|
|
514
|
+
Le(() => {
|
|
515
|
+
queueMicrotask(() => {
|
|
516
|
+
const g = N.current === D.Started;
|
|
517
|
+
N.current = D.Started, r(g ? "rehydrating..." : "initializing...");
|
|
518
|
+
const p = F.current ?? v.initial;
|
|
519
|
+
v.invoke(p, g ? v.get() : Q);
|
|
520
|
+
});
|
|
521
|
+
const s = a.current, c = v.ref.current;
|
|
522
|
+
return () => {
|
|
523
|
+
r("unmounting..."), F.current = c, N.current = D.Stopped, s.forEach((g) => g?.()), a.current = /* @__PURE__ */ new Map(), m.current = null, queueMicrotask(() => {
|
|
524
|
+
S(e.exit);
|
|
525
|
+
});
|
|
526
|
+
};
|
|
527
|
+
}, []);
|
|
528
|
+
const X = () => "ref" in v ? v.ref.current : v.get(), _ = (s) => {
|
|
529
|
+
queueMicrotask(() => {
|
|
530
|
+
if (N.current !== D.Started) return;
|
|
531
|
+
f.current = E.current, E.current = s;
|
|
532
|
+
let c = X();
|
|
533
|
+
const g = (
|
|
534
|
+
// @ts-ignore
|
|
535
|
+
e.states[c].on?.[s.type] ?? // @ts-ignore
|
|
536
|
+
e.on?.[s.type]
|
|
537
|
+
), p = M(g);
|
|
538
|
+
if (!p) return;
|
|
539
|
+
m.current = p;
|
|
540
|
+
const h = p.target ?? c;
|
|
541
|
+
r("transition", s.type, p.target || c, `(${p.actions})`);
|
|
542
|
+
const C = h !== c;
|
|
543
|
+
C ? oe(() => v.set(h)) : p.reenter && !C ? v.invoke(c, c) : S(p.actions ?? []);
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
return e.watch?.(k()), {
|
|
547
|
+
state: J(),
|
|
548
|
+
send: _,
|
|
549
|
+
context: l,
|
|
550
|
+
prop: u,
|
|
551
|
+
scope: n,
|
|
552
|
+
refs: O,
|
|
553
|
+
computed: x,
|
|
554
|
+
event: w(),
|
|
555
|
+
getStatus: () => N.current
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
function Pe(e) {
|
|
559
|
+
const t = b(e);
|
|
560
|
+
return t.current = e, t;
|
|
561
|
+
}
|
|
562
|
+
function Tt(e) {
|
|
563
|
+
const t = Pe(e);
|
|
564
|
+
return function(r) {
|
|
565
|
+
return t.current[r];
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
function le(e) {
|
|
569
|
+
queueMicrotask(() => {
|
|
570
|
+
oe(() => e());
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
var rn = xt((e) => e);
|
|
574
|
+
function Rt(...e) {
|
|
575
|
+
return (t) => {
|
|
576
|
+
const n = [];
|
|
577
|
+
for (const r of e)
|
|
578
|
+
if (typeof r == "function") {
|
|
579
|
+
const o = r(t);
|
|
580
|
+
typeof o == "function" && n.push(o);
|
|
581
|
+
} else r && (r.current = t);
|
|
582
|
+
if (n.length)
|
|
583
|
+
return () => {
|
|
584
|
+
for (const r of n)
|
|
585
|
+
r();
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
function At(e) {
|
|
590
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
591
|
+
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);
|
|
592
|
+
}
|
|
593
|
+
const ee = (e) => {
|
|
594
|
+
const t = Ae(
|
|
595
|
+
Oe((n, r) => {
|
|
596
|
+
const { asChild: o, children: u, ...d } = n;
|
|
597
|
+
if (!o)
|
|
598
|
+
return Me(e, { ...d, ref: r }, u);
|
|
599
|
+
if (!Fe(u))
|
|
600
|
+
return null;
|
|
601
|
+
const i = je.only(u), l = At(i);
|
|
602
|
+
return De(i, {
|
|
603
|
+
...kt(d, i.props),
|
|
604
|
+
ref: r ? Rt(r, l) : l
|
|
605
|
+
});
|
|
606
|
+
})
|
|
607
|
+
);
|
|
608
|
+
return t.displayName = e.displayName || e.name, t;
|
|
609
|
+
}, Ot = () => {
|
|
610
|
+
const e = /* @__PURE__ */ new Map();
|
|
611
|
+
return new Proxy(ee, {
|
|
612
|
+
apply(t, n, r) {
|
|
613
|
+
return ee(r[0]);
|
|
614
|
+
},
|
|
615
|
+
get(t, n) {
|
|
616
|
+
const r = n;
|
|
617
|
+
return e.has(r) || e.set(r, ee(r)), e.get(r);
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
}, on = Ot(), sn = () => (e, t) => t.reduce(
|
|
621
|
+
(n, r) => {
|
|
622
|
+
const [o, u] = n, d = r;
|
|
623
|
+
return u[d] !== void 0 && (o[d] = u[d]), delete u[d], [o, u];
|
|
624
|
+
},
|
|
625
|
+
[{}, { ...e }]
|
|
626
|
+
);
|
|
627
|
+
var I = (e, t = []) => ({
|
|
628
|
+
parts: (...n) => {
|
|
629
|
+
if (Mt(t))
|
|
630
|
+
return I(e, n);
|
|
631
|
+
throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
|
|
632
|
+
},
|
|
633
|
+
extendWith: (...n) => I(e, [...t, ...n]),
|
|
634
|
+
omit: (...n) => I(e, t.filter((r) => !n.includes(r))),
|
|
635
|
+
rename: (n) => I(n, t),
|
|
636
|
+
keys: () => t,
|
|
637
|
+
build: () => [...new Set(t)].reduce(
|
|
638
|
+
(n, r) => Object.assign(n, {
|
|
639
|
+
[r]: {
|
|
640
|
+
selector: [
|
|
641
|
+
`&[data-scope="${j(e)}"][data-part="${j(r)}"]`,
|
|
642
|
+
`& [data-scope="${j(e)}"][data-part="${j(r)}"]`
|
|
643
|
+
].join(", "),
|
|
644
|
+
attrs: { "data-scope": j(e), "data-part": j(r) }
|
|
645
|
+
}
|
|
646
|
+
}),
|
|
647
|
+
{}
|
|
648
|
+
)
|
|
649
|
+
}), j = (e) => e.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Mt = (e) => e.length === 0;
|
|
650
|
+
function Ft(e) {
|
|
651
|
+
return !(e.metaKey || !ce() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
652
|
+
}
|
|
653
|
+
var jt = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]);
|
|
654
|
+
function Dt(e, t, n) {
|
|
655
|
+
const r = n ? ue(n) : null, o = P(r);
|
|
656
|
+
return e = e || r instanceof o.HTMLInputElement && !jt.has(r?.type) || r instanceof o.HTMLTextAreaElement || r instanceof o.HTMLElement && r.isContentEditable, !(e && t === "keyboard" && n instanceof o.KeyboardEvent && !Reflect.has($t, n.key));
|
|
657
|
+
}
|
|
658
|
+
var A = null, ne = /* @__PURE__ */ new Set(), H = /* @__PURE__ */ new Map(), R = !1, re = !1, $t = {
|
|
659
|
+
Tab: !0,
|
|
660
|
+
Escape: !0
|
|
661
|
+
};
|
|
662
|
+
function Z(e, t) {
|
|
663
|
+
for (let n of ne)
|
|
664
|
+
n(e, t);
|
|
665
|
+
}
|
|
666
|
+
function q(e) {
|
|
667
|
+
R = !0, Ft(e) && (A = "keyboard", Z("keyboard", e));
|
|
668
|
+
}
|
|
669
|
+
function L(e) {
|
|
670
|
+
A = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (R = !0, Z("pointer", e));
|
|
671
|
+
}
|
|
672
|
+
function ke(e) {
|
|
673
|
+
dt(e) && (R = !0, A = "virtual");
|
|
674
|
+
}
|
|
675
|
+
function Se(e) {
|
|
676
|
+
const t = ue(e);
|
|
677
|
+
t === P(t) || t === G(t) || (!R && !re && (A = "virtual", Z("virtual", e)), R = !1, re = !1);
|
|
678
|
+
}
|
|
679
|
+
function xe() {
|
|
680
|
+
R = !1, re = !0;
|
|
681
|
+
}
|
|
682
|
+
function Vt(e) {
|
|
683
|
+
if (typeof window > "u" || H.get(P(e)))
|
|
684
|
+
return;
|
|
685
|
+
const t = P(e), n = G(e);
|
|
686
|
+
let r = t.HTMLElement.prototype.focus;
|
|
687
|
+
function o() {
|
|
688
|
+
A = "virtual", Z("virtual", null), R = !0, r.apply(this, arguments);
|
|
689
|
+
}
|
|
690
|
+
try {
|
|
691
|
+
Object.defineProperty(t.HTMLElement.prototype, "focus", {
|
|
692
|
+
configurable: !0,
|
|
693
|
+
value: o
|
|
694
|
+
});
|
|
695
|
+
} catch {
|
|
696
|
+
}
|
|
697
|
+
n.addEventListener("keydown", q, !0), n.addEventListener("keyup", q, !0), n.addEventListener("click", ke, !0), t.addEventListener("focus", Se, !0), t.addEventListener("blur", xe, !1), typeof t.PointerEvent < "u" ? (n.addEventListener("pointerdown", L, !0), n.addEventListener("pointermove", L, !0), n.addEventListener("pointerup", L, !0)) : (n.addEventListener("mousedown", L, !0), n.addEventListener("mousemove", L, !0), n.addEventListener("mouseup", L, !0)), t.addEventListener(
|
|
698
|
+
"beforeunload",
|
|
699
|
+
() => {
|
|
700
|
+
_t(e);
|
|
701
|
+
},
|
|
702
|
+
{ once: !0 }
|
|
703
|
+
), H.set(t, { focus: r });
|
|
704
|
+
}
|
|
705
|
+
var _t = (e, t) => {
|
|
706
|
+
const n = P(e), r = G(e), o = H.get(n);
|
|
707
|
+
if (o) {
|
|
708
|
+
try {
|
|
709
|
+
Object.defineProperty(n.HTMLElement.prototype, "focus", {
|
|
710
|
+
configurable: !0,
|
|
711
|
+
value: o.focus
|
|
712
|
+
});
|
|
713
|
+
} catch {
|
|
714
|
+
}
|
|
715
|
+
r.removeEventListener("keydown", q, !0), r.removeEventListener("keyup", q, !0), r.removeEventListener("click", ke, !0), n.removeEventListener("focus", Se, !0), n.removeEventListener("blur", xe, !1), typeof n.PointerEvent < "u" ? (r.removeEventListener("pointerdown", L, !0), r.removeEventListener("pointermove", L, !0), r.removeEventListener("pointerup", L, !0)) : (r.removeEventListener("mousedown", L, !0), r.removeEventListener("mousemove", L, !0), r.removeEventListener("mouseup", L, !0)), H.delete(n);
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
function pe() {
|
|
719
|
+
return A === "keyboard";
|
|
720
|
+
}
|
|
721
|
+
function cn(e = {}) {
|
|
722
|
+
const { isTextInput: t, autoFocus: n, onChange: r, root: o } = e;
|
|
723
|
+
Vt(o), r?.({ isFocusVisible: n || pe(), modality: A });
|
|
724
|
+
const u = (d, i) => {
|
|
725
|
+
Dt(!!t, d, i) && r?.({ isFocusVisible: pe(), modality: d });
|
|
726
|
+
};
|
|
727
|
+
return ne.add(u), () => {
|
|
728
|
+
ne.delete(u);
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
const [un, an] = ye({
|
|
732
|
+
name: "EnvironmentContext",
|
|
733
|
+
hookName: "useEnvironmentContext",
|
|
734
|
+
providerName: "<EnvironmentProvider />",
|
|
735
|
+
strict: !1,
|
|
736
|
+
defaultValue: {
|
|
737
|
+
getRootNode: () => document,
|
|
738
|
+
getDocument: () => document,
|
|
739
|
+
getWindow: () => window
|
|
740
|
+
}
|
|
741
|
+
}), [fn, dn] = ye({
|
|
742
|
+
name: "LocaleContext",
|
|
743
|
+
hookName: "useLocaleContext",
|
|
744
|
+
providerName: "<LocaleProvider />",
|
|
745
|
+
strict: !1,
|
|
746
|
+
defaultValue: { dir: "ltr", locale: "en-US" }
|
|
747
|
+
});
|
|
748
|
+
export {
|
|
749
|
+
on as a,
|
|
750
|
+
I as b,
|
|
751
|
+
ye as c,
|
|
752
|
+
Bt as d,
|
|
753
|
+
tn as e,
|
|
754
|
+
en as f,
|
|
755
|
+
ue as g,
|
|
756
|
+
Qt as h,
|
|
757
|
+
pe as i,
|
|
758
|
+
Ut as j,
|
|
759
|
+
cn as k,
|
|
760
|
+
Zt as l,
|
|
761
|
+
kt as m,
|
|
762
|
+
dn as n,
|
|
763
|
+
nn as o,
|
|
764
|
+
rn as p,
|
|
765
|
+
sn as q,
|
|
766
|
+
zt as r,
|
|
767
|
+
gt as s,
|
|
768
|
+
Gt as t,
|
|
769
|
+
an as u,
|
|
770
|
+
Yt as v,
|
|
771
|
+
Ht as w,
|
|
772
|
+
qt as x,
|
|
773
|
+
Xt as y,
|
|
774
|
+
Jt as z
|
|
775
|
+
};
|