@poveste/controls 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{useKbd-DQM4Oqri.es.js → FieldRoot-BvWZYJBo.es.js} +13 -3
- package/dist/{HstColor-DHgxKTkm.es.js → HstColor-SVvuA8Gz.es.js} +54 -54
- package/dist/{HstDate-Ct5Jp_ZD.es.js → HstDate-ChfBXuBy.es.js} +1401 -1235
- package/dist/{HstJson-D83KEa9o.es.js → HstJson-D-kWKp2N.es.js} +2302 -2293
- package/dist/{HstWrapper-Bm5H3_to.es.js → HstWrapper-Cmp1NHo2.es.js} +475 -470
- package/dist/{PopoverTrigger-BVAfE9fE.es.js → PopoverTrigger-jwwWaiEH.es.js} +158 -144
- package/dist/THIRD_PARTY_NOTICES.md +3 -3
- package/dist/{VisuallyHiddenInput-0it-_FH2.es.js → VisuallyHiddenInput-je9d-WO7.es.js} +11 -11
- package/dist/components/HstCopyIcon.vue.d.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +681 -593
- package/dist/style-standalone.css +0 -62
- package/dist/{useLocale-Dr4PRYn1.es.js → useLocale-CxBCWkuJ.es.js} +3 -3
- package/package.json +15 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { computed as _, createBlock as v, createVNode as y, defineComponent as b, guardReactiveProps as
|
|
3
|
-
import { createGlobalState as
|
|
4
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
1
|
+
import { D as e, E as t, S as n, T as r, _ as i, a, b as o, c as s, f as c, g as l, h as u, i as d, k as f, l as p, m, o as ee, u as h, w as te, x as g, y as ne } from "./HstWrapper-Cmp1NHo2.es.js";
|
|
2
|
+
import { computed as _, createBlock as v, createVNode as y, defineComponent as b, guardReactiveProps as re, mergeProps as x, nextTick as S, normalizeProps as ie, onMounted as ae, onUnmounted as C, openBlock as w, reactive as oe, ref as T, renderSlot as E, resolveDynamicComponent as se, toRefs as ce, unref as D, watch as O, watchEffect as k, withCtx as A, withModifiers as j } from "@poveste/vendors/vue";
|
|
3
|
+
import { createGlobalState as le, createSharedComposable as ue, unrefElement as M, useEventListener as de, useVModel as fe } from "@poveste/vendors/vue-use";
|
|
4
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/shared/getActiveElement.js
|
|
5
5
|
function N() {
|
|
6
6
|
let e = document.activeElement;
|
|
7
7
|
if (e == null) return null;
|
|
@@ -9,41 +9,41 @@ function N() {
|
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
13
|
-
var
|
|
14
|
-
let
|
|
15
|
-
for (let e of
|
|
12
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/shared/useBodyScrollLock.js
|
|
13
|
+
var P = Symbol("useBodyScrollLock"), pe = ue(() => {
|
|
14
|
+
let n = T(/* @__PURE__ */ new Map()), i = T(), a = _(() => {
|
|
15
|
+
for (let e of n.value.values()) if (e) return !0;
|
|
16
16
|
return !1;
|
|
17
|
-
}),
|
|
18
|
-
document.body.style.paddingRight = "", document.body.style.marginRight = "",
|
|
17
|
+
}), s = e({ scrollBody: T(!0) }), c = null, l = () => {
|
|
18
|
+
document.body.style.paddingRight = "", document.body.style.marginRight = "", t(document, P), document.documentElement.style.removeProperty("--scrollbar-width"), document.body.style.overflow = i.value ?? "", g && c?.(), i.value = void 0;
|
|
19
19
|
};
|
|
20
|
-
return O(
|
|
21
|
-
if (!
|
|
20
|
+
return O(a, (e, t) => {
|
|
21
|
+
if (!o) return;
|
|
22
22
|
if (!e) {
|
|
23
|
-
t &&
|
|
23
|
+
t && l();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
let n = window.innerWidth - document.documentElement.clientWidth,
|
|
26
|
+
i.value === void 0 && (i.value = document.body.style.overflow);
|
|
27
|
+
let n = window.innerWidth - document.documentElement.clientWidth, u = {
|
|
28
28
|
padding: n,
|
|
29
29
|
margin: 0
|
|
30
|
-
},
|
|
31
|
-
padding:
|
|
32
|
-
margin:
|
|
33
|
-
},
|
|
30
|
+
}, d = s.scrollBody?.value ? typeof s.scrollBody.value == "object" ? ne({
|
|
31
|
+
padding: s.scrollBody.value.padding === !0 ? n : s.scrollBody.value.padding,
|
|
32
|
+
margin: s.scrollBody.value.margin === !0 ? n : s.scrollBody.value.margin
|
|
33
|
+
}, u) : u : {
|
|
34
34
|
padding: 0,
|
|
35
35
|
margin: 0
|
|
36
36
|
};
|
|
37
|
-
n > 0 && (document.body.style.paddingRight = typeof
|
|
38
|
-
|
|
37
|
+
n > 0 && (document.body.style.paddingRight = typeof d.padding == "number" ? `${d.padding}px` : String(d.padding), document.body.style.marginRight = typeof d.margin == "number" ? `${d.margin}px` : String(d.margin), document.documentElement.style.setProperty("--scrollbar-width", `${n}px`), document.body.style.overflow = "hidden"), g && (c = de(document, "touchmove", (e) => he(e), { passive: !1 })), S(() => {
|
|
38
|
+
a.value && (r(document, P), document.body.style.overflow = "hidden");
|
|
39
39
|
});
|
|
40
40
|
}, {
|
|
41
41
|
immediate: !0,
|
|
42
42
|
flush: "sync"
|
|
43
|
-
}),
|
|
43
|
+
}), n;
|
|
44
44
|
});
|
|
45
|
-
function
|
|
46
|
-
let t = Math.random().toString(36).substring(2, 7), n =
|
|
45
|
+
function me(e) {
|
|
46
|
+
let t = Math.random().toString(36).substring(2, 7), n = pe();
|
|
47
47
|
n.value.set(t, e ?? !1);
|
|
48
48
|
let r = _({
|
|
49
49
|
get: () => n.value.get(t) ?? !1,
|
|
@@ -53,41 +53,41 @@ function pe(e) {
|
|
|
53
53
|
n.value.delete(t);
|
|
54
54
|
}), r;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function F(e) {
|
|
57
57
|
let t = window.getComputedStyle(e);
|
|
58
58
|
if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight) return !0;
|
|
59
59
|
{
|
|
60
60
|
let t = e.parentNode;
|
|
61
|
-
return !(t instanceof Element) || t.tagName === "BODY" ? !1 :
|
|
61
|
+
return !(t instanceof Element) || t.tagName === "BODY" ? !1 : F(t);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function he(e) {
|
|
65
65
|
let t = e || window.event, n = t.target;
|
|
66
|
-
return n instanceof Element &&
|
|
66
|
+
return n instanceof Element && F(n) ? !1 : t.touches.length > 1 || (t.preventDefault && t.cancelable && t.preventDefault(), !1);
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
70
|
-
var
|
|
71
|
-
function
|
|
69
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/shared/useFocusGuards.js
|
|
70
|
+
var I = 0;
|
|
71
|
+
function L() {
|
|
72
72
|
k((e) => {
|
|
73
|
-
if (!
|
|
73
|
+
if (!o) return;
|
|
74
74
|
let t = document.querySelectorAll("[data-reka-focus-guard]");
|
|
75
|
-
document.body.insertAdjacentElement("afterbegin", t[0] ??
|
|
76
|
-
|
|
75
|
+
document.body.insertAdjacentElement("afterbegin", t[0] ?? R()), document.body.insertAdjacentElement("beforeend", t[1] ?? R()), I++, e(() => {
|
|
76
|
+
I === 1 && document.querySelectorAll("[data-reka-focus-guard]").forEach((e) => e.remove()), I--;
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function R() {
|
|
81
81
|
let e = document.createElement("span");
|
|
82
82
|
return e.setAttribute("data-reka-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
83
83
|
}
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
|
|
86
|
-
var
|
|
86
|
+
var ge = function(e) {
|
|
87
87
|
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
88
88
|
}, z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = {}, H = 0, U = function(e) {
|
|
89
89
|
return e && (e.host || U(e.parentNode));
|
|
90
|
-
},
|
|
90
|
+
}, _e = function(e, t) {
|
|
91
91
|
return t.map(function(t) {
|
|
92
92
|
if (e.contains(t)) return t;
|
|
93
93
|
var n = U(t);
|
|
@@ -95,8 +95,8 @@ var R = function(e) {
|
|
|
95
95
|
}).filter(function(e) {
|
|
96
96
|
return !!e;
|
|
97
97
|
});
|
|
98
|
-
},
|
|
99
|
-
var i =
|
|
98
|
+
}, ve = function(e, t, n, r) {
|
|
99
|
+
var i = _e(t, Array.isArray(e) ? e : [e]);
|
|
100
100
|
V[n] || (V[n] = /* @__PURE__ */ new WeakMap());
|
|
101
101
|
var a = V[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
|
|
102
102
|
e && !s.has(e) && (s.add(e), l(e.parentNode));
|
|
@@ -119,41 +119,41 @@ var R = function(e) {
|
|
|
119
119
|
z.set(e, t), a.set(e, i), t || (B.has(e) || e.removeAttribute(r), B.delete(e)), i || e.removeAttribute(n);
|
|
120
120
|
}), H--, H || (z = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = {});
|
|
121
121
|
};
|
|
122
|
-
},
|
|
122
|
+
}, ye = function(e, t, n) {
|
|
123
123
|
n === void 0 && (n = "data-aria-hidden");
|
|
124
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), i = t ||
|
|
125
|
-
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))),
|
|
124
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), i = t || ge(e);
|
|
125
|
+
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), ve(r, i, n, "aria-hidden")) : function() {
|
|
126
126
|
return null;
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
129
|
//#endregion
|
|
130
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
131
|
-
function
|
|
130
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/shared/useHideOthers.js
|
|
131
|
+
function be(e) {
|
|
132
132
|
let t;
|
|
133
133
|
O(() => M(e), (e) => {
|
|
134
134
|
let n = !1;
|
|
135
135
|
try {
|
|
136
136
|
n = !!e?.closest("[popover]:not(:popover-open)");
|
|
137
137
|
} catch {}
|
|
138
|
-
e && !n ? t =
|
|
139
|
-
}),
|
|
138
|
+
e && !n ? t = ye(e) : t && t();
|
|
139
|
+
}), C(() => {
|
|
140
140
|
t && t();
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
145
|
-
function
|
|
146
|
-
let e =
|
|
144
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/Primitive/usePrimitiveElement.js
|
|
145
|
+
function xe() {
|
|
146
|
+
let e = T();
|
|
147
147
|
return {
|
|
148
148
|
primitiveElement: e,
|
|
149
149
|
currentElement: _(() => ["#text", "#comment"].includes(e.value?.$el.nodeName) ? e.value?.$el.nextElementSibling : M(e))
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
//#endregion
|
|
153
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
154
|
-
var
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
153
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/FocusScope/stack.js
|
|
154
|
+
var Se = le(() => T([]));
|
|
155
|
+
function Ce() {
|
|
156
|
+
let e = Se();
|
|
157
157
|
return {
|
|
158
158
|
add(t) {
|
|
159
159
|
let n = e.value[0];
|
|
@@ -169,16 +169,24 @@ function W(e, t) {
|
|
|
169
169
|
return r !== -1 && n.splice(r, 1), n;
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
172
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/FocusScope/utils.js
|
|
173
173
|
var G = "focusScope.autoFocusOnMount", K = "focusScope.autoFocusOnUnmount", q = {
|
|
174
174
|
bubbles: !1,
|
|
175
175
|
cancelable: !0
|
|
176
176
|
};
|
|
177
|
-
function
|
|
177
|
+
function we(e, t) {
|
|
178
|
+
let n = t;
|
|
179
|
+
for (; n;) {
|
|
180
|
+
if (e.contains(n)) return !0;
|
|
181
|
+
n = n.getRootNode().host ?? null;
|
|
182
|
+
}
|
|
183
|
+
return !1;
|
|
184
|
+
}
|
|
185
|
+
function Te(e, { select: t = !1 } = {}) {
|
|
178
186
|
let n = N();
|
|
179
|
-
for (let r of e) if (
|
|
187
|
+
for (let r of e) if (X(r, { select: t }), N() !== n) return !0;
|
|
180
188
|
}
|
|
181
|
-
function
|
|
189
|
+
function Ee(e) {
|
|
182
190
|
let t = J(e);
|
|
183
191
|
return [Y(t, e), Y(t.reverse(), e)];
|
|
184
192
|
}
|
|
@@ -188,12 +196,12 @@ function J(e) {
|
|
|
188
196
|
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
189
197
|
} });
|
|
190
198
|
for (; n.nextNode();) t.push(n.currentNode);
|
|
191
|
-
return t;
|
|
199
|
+
return t.sort((e, t) => e.tabIndex === t.tabIndex ? 0 : e.tabIndex === 0 ? 1 : t.tabIndex === 0 ? -1 : e.tabIndex - t.tabIndex);
|
|
192
200
|
}
|
|
193
201
|
function Y(e, t) {
|
|
194
|
-
for (let n of e) if (!
|
|
202
|
+
for (let n of e) if (!De(n, { upTo: t })) return n;
|
|
195
203
|
}
|
|
196
|
-
function
|
|
204
|
+
function De(e, { upTo: t }) {
|
|
197
205
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
198
206
|
for (; e;) {
|
|
199
207
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -202,18 +210,18 @@ function X(e, { upTo: t }) {
|
|
|
202
210
|
}
|
|
203
211
|
return !1;
|
|
204
212
|
}
|
|
205
|
-
function
|
|
213
|
+
function Oe(e) {
|
|
206
214
|
return e instanceof HTMLInputElement && "select" in e;
|
|
207
215
|
}
|
|
208
|
-
function
|
|
216
|
+
function X(e, { select: t = !1 } = {}) {
|
|
209
217
|
if (e && e.focus) {
|
|
210
218
|
let n = N();
|
|
211
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
219
|
+
e.focus({ preventScroll: !0 }), e !== n && Oe(e) && t && e.select();
|
|
212
220
|
}
|
|
213
221
|
}
|
|
214
222
|
//#endregion
|
|
215
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.
|
|
216
|
-
var
|
|
223
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.11.0_vue@3.5.44_typescript@6.0.3_/node_modules/reka-ui/dist/FocusScope/FocusScope.js
|
|
224
|
+
var ke = /* @__PURE__ */ b({
|
|
217
225
|
__name: "FocusScope",
|
|
218
226
|
props: {
|
|
219
227
|
loop: {
|
|
@@ -242,7 +250,7 @@ var Te = /* @__PURE__ */ b({
|
|
|
242
250
|
},
|
|
243
251
|
emits: ["mountAutoFocus", "unmountAutoFocus"],
|
|
244
252
|
setup(e, { emit: t }) {
|
|
245
|
-
let n = e,
|
|
253
|
+
let n = e, r = t, { currentRef: a, currentElement: s } = i(), c = T(null), l = Ce(), u = /*#__PURE__*/ oe({
|
|
246
254
|
paused: !1,
|
|
247
255
|
pause() {
|
|
248
256
|
this.paused = !0;
|
|
@@ -252,53 +260,59 @@ var Te = /* @__PURE__ */ b({
|
|
|
252
260
|
}
|
|
253
261
|
});
|
|
254
262
|
k((e) => {
|
|
255
|
-
if (!
|
|
263
|
+
if (!o) return;
|
|
256
264
|
let t = s.value;
|
|
257
265
|
if (!n.trapped) return;
|
|
258
|
-
|
|
266
|
+
let r = t?.ownerDocument ?? document, i = t ? t.getRootNode() : r;
|
|
267
|
+
function a(e) {
|
|
259
268
|
if (u.paused || !t) return;
|
|
260
269
|
let n = e.target;
|
|
261
|
-
t.contains(n) ? c.value = n :
|
|
270
|
+
t.contains(n) ? c.value = n : X(c.value, { select: !0 });
|
|
262
271
|
}
|
|
263
|
-
function
|
|
272
|
+
function l(e) {
|
|
264
273
|
if (u.paused || !t) return;
|
|
265
274
|
let n = e.relatedTarget;
|
|
266
|
-
n !== null && (t.contains(n) ||
|
|
275
|
+
n !== null && (t.contains(n) || X(c.value, { select: !0 }));
|
|
267
276
|
}
|
|
268
|
-
function
|
|
277
|
+
function d(e) {
|
|
269
278
|
let n = c.value;
|
|
270
279
|
if (n === null || !e.some((e) => e.removedNodes.length > 0)) return;
|
|
271
280
|
let r = N();
|
|
272
|
-
r && t.contains(r) || t.contains(n) ||
|
|
281
|
+
r && t.contains(r) || t.contains(n) || X(t);
|
|
273
282
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
283
|
+
function f(e) {
|
|
284
|
+
if (u.paused || !t) return;
|
|
285
|
+
let n = e.composedPath()[0];
|
|
286
|
+
we(t, n) || X(c.value, { select: !0 });
|
|
287
|
+
}
|
|
288
|
+
i.addEventListener("focusin", a), i.addEventListener("focusout", l), i !== r && r.addEventListener("focusin", f);
|
|
289
|
+
let p = new MutationObserver(d);
|
|
290
|
+
t && p.observe(t, {
|
|
277
291
|
childList: !0,
|
|
278
292
|
subtree: !0
|
|
279
293
|
}), e(() => {
|
|
280
|
-
|
|
294
|
+
i.removeEventListener("focusin", a), i.removeEventListener("focusout", l), i !== r && r.removeEventListener("focusin", f), p.disconnect();
|
|
281
295
|
});
|
|
282
296
|
});
|
|
283
297
|
function d(e, t) {
|
|
284
|
-
let n = new CustomEvent(G, q),
|
|
285
|
-
e.addEventListener(G,
|
|
298
|
+
let n = new CustomEvent(G, q), i = (e) => r("mountAutoFocus", e);
|
|
299
|
+
e.addEventListener(G, i), e.dispatchEvent(n), e.removeEventListener(G, i), n.defaultPrevented || (Te(J(e), { select: !0 }), N() === t && X(e));
|
|
286
300
|
}
|
|
287
301
|
k(async (e) => {
|
|
288
302
|
let t = s.value;
|
|
289
303
|
if (await S(), !t) return;
|
|
290
304
|
n.present !== !1 && l.add(u);
|
|
291
|
-
let
|
|
292
|
-
!t.contains(
|
|
305
|
+
let i = N();
|
|
306
|
+
!t.contains(i) && n.present !== !1 && d(t, i), e(() => {
|
|
293
307
|
let e = new CustomEvent(K, q), n = (e) => {
|
|
294
|
-
|
|
308
|
+
r("unmountAutoFocus", e);
|
|
295
309
|
};
|
|
296
310
|
t.addEventListener(K, n), t.dispatchEvent(e), t.setAttribute("data-focus-scope-unmounting", ""), setTimeout(() => {
|
|
297
|
-
e.defaultPrevented ||
|
|
311
|
+
e.defaultPrevented || X(i ?? document.body, { select: !0 }), t.removeEventListener(K, n), l.remove(u), t.removeAttribute("data-focus-scope-unmounting");
|
|
298
312
|
}, 0);
|
|
299
313
|
});
|
|
300
314
|
}), O(() => n.present, async (e, t) => {
|
|
301
|
-
if (!
|
|
315
|
+
if (!o) return;
|
|
302
316
|
if (e === !1 && t === !0) {
|
|
303
317
|
l.remove(u);
|
|
304
318
|
return;
|
|
@@ -314,23 +328,23 @@ var Te = /* @__PURE__ */ b({
|
|
|
314
328
|
if (!n.loop && !n.trapped || u.paused) return;
|
|
315
329
|
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, r = N();
|
|
316
330
|
if (t && r) {
|
|
317
|
-
let t = e.currentTarget, [i, a] =
|
|
318
|
-
i && a ? !e.shiftKey && r === a ? (e.preventDefault(), n.loop &&
|
|
331
|
+
let t = e.currentTarget, [i, a] = Ee(t);
|
|
332
|
+
i && a ? !e.shiftKey && r === a ? (e.preventDefault(), n.loop && X(i, { select: !0 })) : e.shiftKey && r === i && (e.preventDefault(), n.loop && X(a, { select: !0 })) : r === t && e.preventDefault();
|
|
319
333
|
}
|
|
320
334
|
}
|
|
321
|
-
return (
|
|
335
|
+
return (t, n) => (w(), v(D(h), {
|
|
322
336
|
ref_key: "currentRef",
|
|
323
|
-
ref:
|
|
337
|
+
ref: a,
|
|
324
338
|
tabindex: "-1",
|
|
325
339
|
"as-child": e.asChild,
|
|
326
340
|
as: e.as,
|
|
327
341
|
onKeydown: f
|
|
328
342
|
}, {
|
|
329
|
-
default: A(() => [
|
|
343
|
+
default: A(() => [E(t.$slots, "default")]),
|
|
330
344
|
_: 3
|
|
331
345
|
}, 8, ["as-child", "as"]));
|
|
332
346
|
}
|
|
333
|
-
}), [
|
|
347
|
+
}), [Z, Q] = /*#__PURE__*/ f("PopoverRoot"), Ae = /* @__PURE__ */ b({
|
|
334
348
|
__name: "PopoverRoot",
|
|
335
349
|
props: {
|
|
336
350
|
defaultOpen: {
|
|
@@ -351,11 +365,11 @@ var Te = /* @__PURE__ */ b({
|
|
|
351
365
|
},
|
|
352
366
|
emits: ["update:open"],
|
|
353
367
|
setup(e, { emit: t }) {
|
|
354
|
-
let n = e, r = t, { modal: i } =
|
|
368
|
+
let n = e, r = t, { modal: i } = ce(n), a = fe(n, "open", r, {
|
|
355
369
|
defaultValue: n.defaultOpen,
|
|
356
370
|
passive: n.open === void 0
|
|
357
371
|
});
|
|
358
|
-
return
|
|
372
|
+
return Q({
|
|
359
373
|
contentId: "",
|
|
360
374
|
triggerId: "",
|
|
361
375
|
modal: i,
|
|
@@ -366,10 +380,10 @@ var Te = /* @__PURE__ */ b({
|
|
|
366
380
|
onOpenToggle: () => {
|
|
367
381
|
a.value = !a.value;
|
|
368
382
|
},
|
|
369
|
-
triggerElement:
|
|
370
|
-
hasCustomAnchor:
|
|
371
|
-
}), (e, t) => (
|
|
372
|
-
default: A(() => [
|
|
383
|
+
triggerElement: T(),
|
|
384
|
+
hasCustomAnchor: T(!1)
|
|
385
|
+
}), (e, t) => (w(), v(D(ee), null, {
|
|
386
|
+
default: A(() => [E(e.$slots, "default", {
|
|
373
387
|
open: D(a),
|
|
374
388
|
close: () => a.value = !1
|
|
375
389
|
})]),
|
|
@@ -484,29 +498,29 @@ var Te = /* @__PURE__ */ b({
|
|
|
484
498
|
"openAutoFocus",
|
|
485
499
|
"closeAutoFocus"
|
|
486
500
|
],
|
|
487
|
-
setup(e, { emit:
|
|
488
|
-
let
|
|
489
|
-
return
|
|
501
|
+
setup(e, { emit: t }) {
|
|
502
|
+
let r = e, a = t, o = l(n(r, "trapFocus", "disableOutsidePointerEvents")), { forwardRef: s } = i(), c = Z();
|
|
503
|
+
return L(), (t, n) => (w(), v(D(ke), {
|
|
490
504
|
"as-child": "",
|
|
491
505
|
loop: "",
|
|
492
506
|
trapped: e.trapFocus,
|
|
493
|
-
onMountAutoFocus:
|
|
494
|
-
onUnmountAutoFocus:
|
|
507
|
+
onMountAutoFocus: n[5] ||= (e) => a("openAutoFocus", e),
|
|
508
|
+
onUnmountAutoFocus: n[6] ||= (e) => a("closeAutoFocus", e)
|
|
495
509
|
}, {
|
|
496
|
-
default: A(() => [y(D(
|
|
510
|
+
default: A(() => [y(D(p), {
|
|
497
511
|
"as-child": "",
|
|
498
512
|
"disable-outside-pointer-events": e.disableOutsidePointerEvents,
|
|
499
|
-
onPointerDownOutside:
|
|
500
|
-
onInteractOutside:
|
|
501
|
-
onEscapeKeyDown:
|
|
502
|
-
onFocusOutside:
|
|
503
|
-
onDismiss:
|
|
513
|
+
onPointerDownOutside: n[0] ||= (e) => a("pointerDownOutside", e),
|
|
514
|
+
onInteractOutside: n[1] ||= (e) => a("interactOutside", e),
|
|
515
|
+
onEscapeKeyDown: n[2] ||= (e) => a("escapeKeyDown", e),
|
|
516
|
+
onFocusOutside: n[3] ||= (e) => a("focusOutside", e),
|
|
517
|
+
onDismiss: n[4] ||= (e) => D(c).onOpenChange(!1)
|
|
504
518
|
}, {
|
|
505
|
-
default: A(() => [y(D(
|
|
506
|
-
id: D(
|
|
519
|
+
default: A(() => [y(D(d), x(D(o), {
|
|
520
|
+
id: D(c).contentId,
|
|
507
521
|
ref: D(s),
|
|
508
|
-
"data-state": D(
|
|
509
|
-
"aria-labelledby": D(
|
|
522
|
+
"data-state": D(c).open.value ? "open" : "closed",
|
|
523
|
+
"aria-labelledby": D(c).triggerId,
|
|
510
524
|
style: {
|
|
511
525
|
"--reka-popover-content-transform-origin": "var(--reka-popper-transform-origin)",
|
|
512
526
|
"--reka-popover-content-available-width": "var(--reka-popper-available-width)",
|
|
@@ -516,7 +530,7 @@ var Te = /* @__PURE__ */ b({
|
|
|
516
530
|
},
|
|
517
531
|
role: "dialog"
|
|
518
532
|
}), {
|
|
519
|
-
default: A(() => [
|
|
533
|
+
default: A(() => [E(t.$slots, "default")]),
|
|
520
534
|
_: 3
|
|
521
535
|
}, 16, [
|
|
522
536
|
"id",
|
|
@@ -528,7 +542,7 @@ var Te = /* @__PURE__ */ b({
|
|
|
528
542
|
_: 3
|
|
529
543
|
}, 8, ["trapped"]));
|
|
530
544
|
}
|
|
531
|
-
}),
|
|
545
|
+
}), je = /* @__PURE__ */ b({
|
|
532
546
|
__name: "PopoverContentModal",
|
|
533
547
|
props: {
|
|
534
548
|
memoDependencies: {
|
|
@@ -633,28 +647,28 @@ var Te = /* @__PURE__ */ b({
|
|
|
633
647
|
"closeAutoFocus"
|
|
634
648
|
],
|
|
635
649
|
setup(e, { emit: t }) {
|
|
636
|
-
let n = e,
|
|
637
|
-
|
|
638
|
-
let s =
|
|
639
|
-
return
|
|
650
|
+
let n = e, r = t, a = Z(), o = T(!1);
|
|
651
|
+
me(!0);
|
|
652
|
+
let s = u(n, r), { forwardRef: c, currentElement: l } = i();
|
|
653
|
+
return be(l), (e, t) => (w(), v($, x(D(s), {
|
|
640
654
|
ref: D(c),
|
|
641
655
|
"trap-focus": D(a).open.value,
|
|
642
656
|
"disable-outside-pointer-events": "",
|
|
643
657
|
onCloseAutoFocus: t[0] ||= j((e) => {
|
|
644
|
-
|
|
658
|
+
r("closeAutoFocus", e), o.value || D(a).triggerElement.value?.focus();
|
|
645
659
|
}, ["prevent"]),
|
|
646
660
|
onPointerDownOutside: t[1] ||= (e) => {
|
|
647
|
-
|
|
648
|
-
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0,
|
|
649
|
-
o.value =
|
|
661
|
+
r("pointerDownOutside", e);
|
|
662
|
+
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, i = t.button === 2 || n;
|
|
663
|
+
o.value = i;
|
|
650
664
|
},
|
|
651
665
|
onFocusOutside: t[2] ||= j(() => {}, ["prevent"])
|
|
652
666
|
}), {
|
|
653
|
-
default: A(() => [
|
|
667
|
+
default: A(() => [E(e.$slots, "default")]),
|
|
654
668
|
_: 3
|
|
655
669
|
}, 16, ["trap-focus"]));
|
|
656
670
|
}
|
|
657
|
-
}),
|
|
671
|
+
}), Me = /* @__PURE__ */ b({
|
|
658
672
|
__name: "PopoverContentNonModal",
|
|
659
673
|
props: {
|
|
660
674
|
memoDependencies: {
|
|
@@ -759,8 +773,8 @@ var Te = /* @__PURE__ */ b({
|
|
|
759
773
|
"closeAutoFocus"
|
|
760
774
|
],
|
|
761
775
|
setup(e, { emit: t }) {
|
|
762
|
-
let n = e, r = t, i =
|
|
763
|
-
return (e, t) => (
|
|
776
|
+
let n = e, r = t, i = Z(), a = T(!1), o = T(!1), s = u(n, r);
|
|
777
|
+
return (e, t) => (w(), v($, x(D(s), {
|
|
764
778
|
"trap-focus": !1,
|
|
765
779
|
"disable-outside-pointer-events": !1,
|
|
766
780
|
onCloseAutoFocus: t[0] ||= (e) => {
|
|
@@ -772,11 +786,11 @@ var Te = /* @__PURE__ */ b({
|
|
|
772
786
|
D(i).triggerElement.value?.contains(t) && e.preventDefault(), e.detail.originalEvent.type === "focusin" && o.value && e.preventDefault();
|
|
773
787
|
}
|
|
774
788
|
}), {
|
|
775
|
-
default: A(() => [
|
|
789
|
+
default: A(() => [E(e.$slots, "default")]),
|
|
776
790
|
_: 3
|
|
777
791
|
}, 16));
|
|
778
792
|
}
|
|
779
|
-
}),
|
|
793
|
+
}), Ne = /* @__PURE__ */ b({
|
|
780
794
|
__name: "PopoverContent",
|
|
781
795
|
props: {
|
|
782
796
|
forceMount: {
|
|
@@ -885,19 +899,19 @@ var Te = /* @__PURE__ */ b({
|
|
|
885
899
|
"closeAutoFocus"
|
|
886
900
|
],
|
|
887
901
|
setup(e, { emit: t }) {
|
|
888
|
-
let n = e,
|
|
889
|
-
return a.contentId ||=
|
|
890
|
-
default: A(() => [D(a).modal.value ? (
|
|
891
|
-
default: A(() => [
|
|
902
|
+
let n = e, r = t, a = Z(), o = u(n, r), { forwardRef: s } = i();
|
|
903
|
+
return a.contentId ||= m(void 0, "reka-popover-content"), (t, n) => (w(), v(D(c), { present: e.forceMount || D(a).open.value }, {
|
|
904
|
+
default: A(() => [D(a).modal.value ? (w(), v(je, x({ key: 0 }, D(o), { ref: D(s) }), {
|
|
905
|
+
default: A(() => [E(t.$slots, "default")]),
|
|
892
906
|
_: 3
|
|
893
|
-
}, 16)) : (
|
|
894
|
-
default: A(() => [
|
|
907
|
+
}, 16)) : (w(), v(Me, x({ key: 1 }, D(o), { ref: D(s) }), {
|
|
908
|
+
default: A(() => [E(t.$slots, "default")]),
|
|
895
909
|
_: 3
|
|
896
910
|
}, 16))]),
|
|
897
911
|
_: 3
|
|
898
912
|
}, 8, ["present"]));
|
|
899
913
|
}
|
|
900
|
-
}),
|
|
914
|
+
}), Pe = /* @__PURE__ */ b({
|
|
901
915
|
__name: "PopoverPortal",
|
|
902
916
|
props: {
|
|
903
917
|
to: {
|
|
@@ -919,12 +933,12 @@ var Te = /* @__PURE__ */ b({
|
|
|
919
933
|
},
|
|
920
934
|
setup(e) {
|
|
921
935
|
let t = e;
|
|
922
|
-
return (e, n) => (
|
|
923
|
-
default: A(() => [
|
|
936
|
+
return (e, n) => (w(), v(D(s), ie(re(t)), {
|
|
937
|
+
default: A(() => [E(e.$slots, "default")]),
|
|
924
938
|
_: 3
|
|
925
939
|
}, 16));
|
|
926
940
|
}
|
|
927
|
-
}),
|
|
941
|
+
}), Fe = /* @__PURE__ */ b({
|
|
928
942
|
__name: "PopoverTrigger",
|
|
929
943
|
props: {
|
|
930
944
|
asChild: {
|
|
@@ -938,13 +952,13 @@ var Te = /* @__PURE__ */ b({
|
|
|
938
952
|
}
|
|
939
953
|
},
|
|
940
954
|
setup(e) {
|
|
941
|
-
let t = e, n =
|
|
942
|
-
return n.triggerId ||=
|
|
955
|
+
let t = e, n = Z(), { forwardRef: r, currentElement: o } = i();
|
|
956
|
+
return n.triggerId ||= m(void 0, "reka-popover-trigger"), n.contentId ||= m(void 0, "reka-popover-content"), ae(() => {
|
|
943
957
|
n.triggerElement.value = o.value;
|
|
944
|
-
}), (
|
|
945
|
-
default: A(() => [y(D(
|
|
958
|
+
}), (i, o) => (w(), v(se(D(n).hasCustomAnchor.value ? D(h) : D(a)), { "as-child": "" }, {
|
|
959
|
+
default: A(() => [y(D(h), {
|
|
946
960
|
id: D(n).triggerId,
|
|
947
|
-
ref: D(
|
|
961
|
+
ref: D(r),
|
|
948
962
|
type: e.as === "button" ? "button" : void 0,
|
|
949
963
|
"aria-haspopup": "dialog",
|
|
950
964
|
"aria-expanded": D(n).open.value,
|
|
@@ -954,7 +968,7 @@ var Te = /* @__PURE__ */ b({
|
|
|
954
968
|
"as-child": t.asChild,
|
|
955
969
|
onClick: D(n).onOpenToggle
|
|
956
970
|
}, {
|
|
957
|
-
default: A(() => [
|
|
971
|
+
default: A(() => [E(i.$slots, "default")]),
|
|
958
972
|
_: 3
|
|
959
973
|
}, 8, [
|
|
960
974
|
"id",
|
|
@@ -971,4 +985,4 @@ var Te = /* @__PURE__ */ b({
|
|
|
971
985
|
}
|
|
972
986
|
});
|
|
973
987
|
//#endregion
|
|
974
|
-
export {
|
|
988
|
+
export { Z as a, Ae as i, Pe as n, xe as o, Ne as r, N as s, Fe as t };
|
|
@@ -58,7 +58,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
58
58
|
THE SOFTWARE.
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
## @codemirror/language@6.
|
|
61
|
+
## @codemirror/language@6.13.1
|
|
62
62
|
|
|
63
63
|
Licence: MIT
|
|
64
64
|
|
|
@@ -170,7 +170,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
170
170
|
THE SOFTWARE.
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
## @codemirror/view@6.43.
|
|
173
|
+
## @codemirror/view@6.43.14
|
|
174
174
|
|
|
175
175
|
Licence: MIT
|
|
176
176
|
|
|
@@ -793,7 +793,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
793
793
|
SOFTWARE.
|
|
794
794
|
```
|
|
795
795
|
|
|
796
|
-
## reka-ui@2.
|
|
796
|
+
## reka-ui@2.11.0
|
|
797
797
|
|
|
798
798
|
Licence: MIT
|
|
799
799
|
|