@serendie/ui 1.0.0 → 2.0.0-dev.202507172231
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/assets/checkboxIndeterminate.svg.js +5 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Chart/SerendieChartProps.d.ts +40 -0
- package/dist/components/Chart/SerendieChartProps.js +127 -0
- package/dist/components/Chart/SerendieChartTheme.d.ts +2 -0
- package/dist/components/Chart/SerendieChartTheme.js +150 -0
- package/dist/components/Chart/chartData.d.ts +29 -0
- package/dist/components/Chart/index.d.ts +3 -0
- package/dist/components/Chart/index.js +15 -0
- package/dist/components/CheckBox/CheckBox.js +36 -35
- package/dist/components/ChoiceBox/ChoiceBox.js +45 -39
- package/dist/components/DataTable/DataTableComponent.d.ts +23 -0
- package/dist/components/DataTable/DataTableComponent.js +52 -0
- package/dist/components/DataTable/createColumnHelper.d.ts +2 -0
- package/dist/components/DataTable/createColumnHelper.js +5 -0
- package/dist/components/DataTable/index.d.ts +19 -0
- package/dist/components/DataTable/index.js +28 -0
- package/dist/components/DataTable/table/BodyCell.d.ts +55 -0
- package/dist/components/DataTable/table/BodyCell.js +127 -0
- package/dist/components/DataTable/table/BodyCheckbox.d.ts +4 -0
- package/dist/components/DataTable/table/BodyCheckbox.js +22 -0
- package/dist/components/DataTable/table/HeaderCell.d.ts +8 -0
- package/dist/components/DataTable/table/HeaderCell.js +79 -0
- package/dist/components/DataTable/table/HeaderCheckbox.d.ts +2 -0
- package/dist/components/DataTable/table/HeaderCheckbox.js +26 -0
- package/dist/components/DataTable/table/HeaderRow.d.ts +11 -0
- package/dist/components/DataTable/table/HeaderRow.js +40 -0
- package/dist/components/DataTable/table/Root.d.ts +5 -0
- package/dist/components/DataTable/table/Root.js +34 -0
- package/dist/components/DataTable/table/Row.d.ts +5 -0
- package/dist/components/DataTable/table/Row.js +90 -0
- package/dist/components/DataTable/table/Tbody.d.ts +1 -0
- package/dist/components/DataTable/table/Tbody.js +7 -0
- package/dist/components/DataTable/table/Thead.d.ts +1 -0
- package/dist/components/DataTable/table/Thead.js +7 -0
- package/dist/components/DataTable/table/Tr.d.ts +1 -0
- package/dist/components/DataTable/table/Tr.js +27 -0
- package/dist/components/DataTable/table/index.d.ts +10 -0
- package/dist/components/DataTable/table/index.js +22 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +4 -2
- package/dist/components/Search/Search.js +34 -33
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.js +47 -41
- package/dist/components/Tabs/TabItem.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +109 -92
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
- package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
- package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
- package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +100 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1741 -0
- package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
- package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
- package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
- package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
- package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
- package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
- package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +462 -255
- package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
- package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
- package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
- package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
- package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
- package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
- package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
- package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
- package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
- package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
- package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
- package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
- package/dist/styled-system/tokens/index.js +4758 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/getToken.js +4 -4
- package/dist/utils/colors.d.ts +1 -0
- package/dist/utils/colors.js +12 -0
- package/package.json +10 -4
- package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
- package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
- package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
- package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
- package/dist/node_modules/@zag-js/store/dist/index.js +0 -170
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
- package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
- package/dist/node_modules/klona/full/index.js +0 -21
- package/dist/node_modules/proxy-compare/dist/index.js +0 -109
- package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var u, i = /* @__PURE__ */ new Map(), p = (t) => t.getBoundingClientRect();
|
|
2
|
-
function v(t, e) {
|
|
3
|
-
const { scope: l = "rect", getRect: r = p, onChange: o } = e, s = E({ scope: l, getRect: r }), n = i.get(t);
|
|
4
|
-
return n ? (n.callbacks.push(o), o(r(t))) : (i.set(t, {
|
|
5
|
-
rect: {},
|
|
6
|
-
callbacks: [o]
|
|
7
|
-
}), i.size === 1 && (u = requestAnimationFrame(s))), function() {
|
|
8
|
-
const c = i.get(t);
|
|
9
|
-
if (!c) return;
|
|
10
|
-
const f = c.callbacks.indexOf(o);
|
|
11
|
-
f > -1 && c.callbacks.splice(f, 1), c.callbacks.length === 0 && (i.delete(t), i.size === 0 && cancelAnimationFrame(u));
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function E(t) {
|
|
15
|
-
const { scope: e, getRect: l } = t, r = m(e);
|
|
16
|
-
return function o() {
|
|
17
|
-
const s = [];
|
|
18
|
-
i.forEach((n, a) => {
|
|
19
|
-
const c = l(a);
|
|
20
|
-
r(n.rect, c) || (n.rect = c, s.push(n));
|
|
21
|
-
}), s.forEach((n) => {
|
|
22
|
-
n.callbacks.forEach((a) => a(n.rect));
|
|
23
|
-
}), u = requestAnimationFrame(o);
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
var g = (t, e) => t.width === e.width && t.height === e.height, h = (t, e) => t.top === e.top && t.left === e.left, d = (t, e) => g(t, e) && h(t, e);
|
|
27
|
-
function m(t) {
|
|
28
|
-
return t === "size" ? g : t === "position" ? h : d;
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
v as trackElementRect
|
|
32
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var i = (t) => t.ownerDocument.defaultView || window;
|
|
2
|
-
function c(t, n) {
|
|
3
|
-
const { type: e = "HTMLInputElement", property: r = "value" } = n, o = i(t)[e].prototype;
|
|
4
|
-
return Object.getOwnPropertyDescriptor(o, r) ?? {};
|
|
5
|
-
}
|
|
6
|
-
function u(t, n) {
|
|
7
|
-
var r;
|
|
8
|
-
(r = c(t, { type: "HTMLInputElement", property: "checked" }).set) == null || r.call(t, n), n ? t.setAttribute("checked", "") : t.removeAttribute("checked");
|
|
9
|
-
}
|
|
10
|
-
function b(t, n) {
|
|
11
|
-
const { checked: e, bubbles: r = !0 } = n;
|
|
12
|
-
if (!t) return;
|
|
13
|
-
const o = i(t);
|
|
14
|
-
t instanceof o.HTMLInputElement && (u(t, e), t.dispatchEvent(new o.Event("click", { bubbles: r })));
|
|
15
|
-
}
|
|
16
|
-
function d(t) {
|
|
17
|
-
return f(t) ? t.form : t.closest("form");
|
|
18
|
-
}
|
|
19
|
-
function f(t) {
|
|
20
|
-
return t.matches("textarea, input, select, button");
|
|
21
|
-
}
|
|
22
|
-
function p(t, n) {
|
|
23
|
-
if (!t) return;
|
|
24
|
-
const e = d(t);
|
|
25
|
-
return e == null || e.addEventListener("reset", n, { passive: !0 }), () => {
|
|
26
|
-
e == null || e.removeEventListener("reset", n);
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
function a(t, n) {
|
|
30
|
-
const e = t == null ? void 0 : t.closest("fieldset");
|
|
31
|
-
if (!e) return;
|
|
32
|
-
n(e.disabled);
|
|
33
|
-
const r = e.ownerDocument.defaultView || window, o = new r.MutationObserver(() => n(e.disabled));
|
|
34
|
-
return o.observe(e, {
|
|
35
|
-
attributes: !0,
|
|
36
|
-
attributeFilter: ["disabled"]
|
|
37
|
-
}), () => o.disconnect();
|
|
38
|
-
}
|
|
39
|
-
function m(t, n) {
|
|
40
|
-
if (!t) return;
|
|
41
|
-
const { onFieldsetDisabledChange: e, onFormReset: r } = n, o = [p(t, r), a(t, e)];
|
|
42
|
-
return () => {
|
|
43
|
-
o.forEach((s) => s == null ? void 0 : s());
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
b as dispatchInputCheckedEvent,
|
|
48
|
-
d as getClosestForm,
|
|
49
|
-
u as setElementChecked,
|
|
50
|
-
m as trackFormControl
|
|
51
|
-
};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { markToTrack as W, getUntracked as $ } from "../../../proxy-compare/dist/index.js";
|
|
2
|
-
function q() {
|
|
3
|
-
if (typeof globalThis < "u") return globalThis;
|
|
4
|
-
if (typeof self < "u") return self;
|
|
5
|
-
if (typeof window < "u") return window;
|
|
6
|
-
if (typeof global < "u") return global;
|
|
7
|
-
}
|
|
8
|
-
function N(e, c) {
|
|
9
|
-
const f = q();
|
|
10
|
-
return f ? (f[e] || (f[e] = c()), f[e]) : c();
|
|
11
|
-
}
|
|
12
|
-
var A = () => process.env.NODE_ENV !== "production", v = (e) => typeof e == "object" && e !== null, O = N("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap()), S = N("__zag__refSet", () => /* @__PURE__ */ new WeakSet()), B = (e) => typeof e == "object" && e !== null && "$$typeof" in e, k = (e) => typeof e == "object" && e !== null && "__v_isVNode" in e, J = (e) => typeof e == "object" && e !== null && "nodeType" in e && typeof e.nodeName == "string", Q = (e) => B(e) || k(e) || J(e), X = (e = Object.is, c = (t, h) => new Proxy(t, h), f = (t) => v(t) && !S.has(t) && (Array.isArray(t) || !(Symbol.iterator in t)) && !Q(t) && !(t instanceof WeakMap) && !(t instanceof WeakSet) && !(t instanceof Error) && !(t instanceof Number) && !(t instanceof Date) && !(t instanceof String) && !(t instanceof RegExp) && !(t instanceof ArrayBuffer), y = (t) => {
|
|
13
|
-
switch (t.status) {
|
|
14
|
-
case "fulfilled":
|
|
15
|
-
return t.value;
|
|
16
|
-
case "rejected":
|
|
17
|
-
throw t.reason;
|
|
18
|
-
default:
|
|
19
|
-
throw t;
|
|
20
|
-
}
|
|
21
|
-
}, i = /* @__PURE__ */ new WeakMap(), u = (t, h, p = y) => {
|
|
22
|
-
const d = i.get(t);
|
|
23
|
-
if ((d == null ? void 0 : d[0]) === h)
|
|
24
|
-
return d[1];
|
|
25
|
-
const a = Array.isArray(t) ? [] : Object.create(Object.getPrototypeOf(t));
|
|
26
|
-
return W(a, !0), i.set(t, [h, a]), Reflect.ownKeys(t).forEach((E) => {
|
|
27
|
-
const w = Reflect.get(t, E);
|
|
28
|
-
S.has(w) ? (W(w, !1), a[E] = w) : w instanceof Promise ? Object.defineProperty(a, E, {
|
|
29
|
-
get() {
|
|
30
|
-
return p(w);
|
|
31
|
-
}
|
|
32
|
-
}) : O.has(w) ? a[E] = F(w, p) : a[E] = w;
|
|
33
|
-
}), Object.freeze(a);
|
|
34
|
-
}, g = /* @__PURE__ */ new WeakMap(), l = [1, 1], m = (t) => {
|
|
35
|
-
if (!v(t))
|
|
36
|
-
throw new Error("object required");
|
|
37
|
-
const h = g.get(t);
|
|
38
|
-
if (h)
|
|
39
|
-
return h;
|
|
40
|
-
let p = l[0];
|
|
41
|
-
const d = /* @__PURE__ */ new Set(), a = (s, r = ++l[0]) => {
|
|
42
|
-
p !== r && (p = r, d.forEach((n) => n(s, r)));
|
|
43
|
-
};
|
|
44
|
-
let E = l[1];
|
|
45
|
-
const w = (s = ++l[1]) => (E !== s && !d.size && (E = s, b.forEach(([r]) => {
|
|
46
|
-
const n = r[1](s);
|
|
47
|
-
n > p && (p = n);
|
|
48
|
-
})), p), z = (s) => (r, n) => {
|
|
49
|
-
const o = [...r];
|
|
50
|
-
o[1] = [s, ...o[1]], a(o, n);
|
|
51
|
-
}, b = /* @__PURE__ */ new Map(), G = (s, r) => {
|
|
52
|
-
if (A() && b.has(s))
|
|
53
|
-
throw new Error("prop listener already exists");
|
|
54
|
-
if (d.size) {
|
|
55
|
-
const n = r[3](z(s));
|
|
56
|
-
b.set(s, [r, n]);
|
|
57
|
-
} else
|
|
58
|
-
b.set(s, [r]);
|
|
59
|
-
}, D = (s) => {
|
|
60
|
-
var n;
|
|
61
|
-
const r = b.get(s);
|
|
62
|
-
r && (b.delete(s), (n = r[1]) == null || n.call(r));
|
|
63
|
-
}, K = (s) => (d.add(s), d.size === 1 && b.forEach(([n, o], P) => {
|
|
64
|
-
if (A() && o)
|
|
65
|
-
throw new Error("remove already exists");
|
|
66
|
-
const _ = n[3](z(P));
|
|
67
|
-
b.set(P, [n, _]);
|
|
68
|
-
}), () => {
|
|
69
|
-
d.delete(s), d.size === 0 && b.forEach(([n, o], P) => {
|
|
70
|
-
o && (o(), b.set(P, [n]));
|
|
71
|
-
});
|
|
72
|
-
}), M = Array.isArray(t) ? [] : Object.create(Object.getPrototypeOf(t)), R = c(M, {
|
|
73
|
-
deleteProperty(s, r) {
|
|
74
|
-
const n = Reflect.get(s, r);
|
|
75
|
-
D(r);
|
|
76
|
-
const o = Reflect.deleteProperty(s, r);
|
|
77
|
-
return o && a(["delete", [r], n]), o;
|
|
78
|
-
},
|
|
79
|
-
set(s, r, n, o) {
|
|
80
|
-
var V;
|
|
81
|
-
const P = Reflect.has(s, r), _ = Reflect.get(s, r, o);
|
|
82
|
-
if (P && (e(_, n) || g.has(n) && e(_, g.get(n))))
|
|
83
|
-
return !0;
|
|
84
|
-
D(r), v(n) && (n = $(n) || n);
|
|
85
|
-
let L = n;
|
|
86
|
-
if (!((V = Object.getOwnPropertyDescriptor(s, r)) != null && V.set)) if (n instanceof Promise)
|
|
87
|
-
n.then((j) => {
|
|
88
|
-
Object.assign(n, { status: "fulfilled", value: j }), a(["resolve", [r], j]);
|
|
89
|
-
}).catch((j) => {
|
|
90
|
-
Object.assign(n, { status: "rejected", reason: j }), a(["reject", [r], j]);
|
|
91
|
-
});
|
|
92
|
-
else {
|
|
93
|
-
!O.has(n) && f(n) && (L = T(n));
|
|
94
|
-
const j = !S.has(L) && O.get(L);
|
|
95
|
-
j && G(r, j);
|
|
96
|
-
}
|
|
97
|
-
return Reflect.set(s, r, L, o), a(["set", [r], n, _]), !0;
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
g.set(t, R);
|
|
101
|
-
const U = [M, w, u, K];
|
|
102
|
-
return O.set(R, U), Reflect.ownKeys(t).forEach((s) => {
|
|
103
|
-
const r = Object.getOwnPropertyDescriptor(t, s);
|
|
104
|
-
r.get || r.set ? Object.defineProperty(M, s, r) : R[s] = t[s];
|
|
105
|
-
}), R;
|
|
106
|
-
}) => [
|
|
107
|
-
// public functions
|
|
108
|
-
m,
|
|
109
|
-
// shared state
|
|
110
|
-
O,
|
|
111
|
-
S,
|
|
112
|
-
// internal things
|
|
113
|
-
e,
|
|
114
|
-
c,
|
|
115
|
-
f,
|
|
116
|
-
y,
|
|
117
|
-
i,
|
|
118
|
-
u,
|
|
119
|
-
g,
|
|
120
|
-
l
|
|
121
|
-
], [Y] = X();
|
|
122
|
-
function T(e = {}) {
|
|
123
|
-
return Y(e);
|
|
124
|
-
}
|
|
125
|
-
function H(e, c, f) {
|
|
126
|
-
const y = O.get(e);
|
|
127
|
-
A() && !y && console.warn("Please use proxy object");
|
|
128
|
-
let i;
|
|
129
|
-
const u = [], g = y[3];
|
|
130
|
-
let l = !1;
|
|
131
|
-
const t = g((h) => {
|
|
132
|
-
if (u.push(h), f) {
|
|
133
|
-
c(u.splice(0));
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
i || (i = Promise.resolve().then(() => {
|
|
137
|
-
i = void 0, l && c(u.splice(0));
|
|
138
|
-
}));
|
|
139
|
-
});
|
|
140
|
-
return l = !0, () => {
|
|
141
|
-
l = !1, t();
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function F(e, c) {
|
|
145
|
-
const f = O.get(e);
|
|
146
|
-
A() && !f && console.warn("Please use proxy object");
|
|
147
|
-
const [y, i, u] = f;
|
|
148
|
-
return u(y, i(), c);
|
|
149
|
-
}
|
|
150
|
-
function C(e) {
|
|
151
|
-
return S.add(e), e;
|
|
152
|
-
}
|
|
153
|
-
function x(e, c) {
|
|
154
|
-
Object.keys(c).forEach((i) => {
|
|
155
|
-
if (Object.getOwnPropertyDescriptor(e, i))
|
|
156
|
-
throw new Error("object property already defined");
|
|
157
|
-
const u = c[i], { get: g, set: l } = typeof u == "function" ? { get: u } : u, m = {};
|
|
158
|
-
m.get = () => g(F(y)), l && (m.set = (t) => l(y, t)), Object.defineProperty(e, i, m);
|
|
159
|
-
});
|
|
160
|
-
const y = T(e);
|
|
161
|
-
return y;
|
|
162
|
-
}
|
|
163
|
-
export {
|
|
164
|
-
N as makeGlobal,
|
|
165
|
-
T as proxy,
|
|
166
|
-
x as proxyWithComputed,
|
|
167
|
-
C as ref,
|
|
168
|
-
F as snapshot,
|
|
169
|
-
H as subscribe
|
|
170
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var S = function(r) {
|
|
2
|
-
if (typeof document > "u")
|
|
3
|
-
return null;
|
|
4
|
-
var u = Array.isArray(r) ? r[0] : r;
|
|
5
|
-
return u.ownerDocument.body;
|
|
6
|
-
}, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
|
7
|
-
return r && (r.host || W(r.parentNode));
|
|
8
|
-
}, D = function(r, u) {
|
|
9
|
-
return u.map(function(e) {
|
|
10
|
-
if (r.contains(e))
|
|
11
|
-
return e;
|
|
12
|
-
var n = W(e);
|
|
13
|
-
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
|
14
|
-
}).filter(function(e) {
|
|
15
|
-
return !!e;
|
|
16
|
-
});
|
|
17
|
-
}, E = function(r, u, e, n) {
|
|
18
|
-
var i = D(u, Array.isArray(r) ? r : [r]);
|
|
19
|
-
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
|
20
|
-
var o = p[e], l = [], s = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
|
21
|
-
!t || s.has(t) || (s.add(t), y(t.parentNode));
|
|
22
|
-
};
|
|
23
|
-
i.forEach(y);
|
|
24
|
-
var A = function(t) {
|
|
25
|
-
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
|
26
|
-
if (s.has(a))
|
|
27
|
-
A(a);
|
|
28
|
-
else
|
|
29
|
-
try {
|
|
30
|
-
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (o.get(a) || 0) + 1;
|
|
31
|
-
f.set(a, d), o.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
|
32
|
-
} catch (k) {
|
|
33
|
-
console.error("aria-hidden: cannot operate on ", a, k);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
return A(u), s.clear(), h++, function() {
|
|
38
|
-
l.forEach(function(t) {
|
|
39
|
-
var a = f.get(t) - 1, c = o.get(t) - 1;
|
|
40
|
-
f.set(t, a), o.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
|
41
|
-
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
|
42
|
-
};
|
|
43
|
-
}, C = function(r, u, e) {
|
|
44
|
-
e === void 0 && (e = "data-aria-hidden");
|
|
45
|
-
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
|
46
|
-
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live]"))), E(n, i, e, "aria-hidden")) : function() {
|
|
47
|
-
return null;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
C as hideOthers
|
|
52
|
-
};
|