laif-ds 0.1.58 → 0.1.59
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/_virtual/index.js +5 -2
- package/dist/_virtual/index3.js +2 -5
- package/dist/components/ui/date-picker.js +44 -32
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -29
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/node_modules/cmdk/dist/index.js +2 -2
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.js +259 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.js +138 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/node_modules/vaul/dist/index.js +1 -1
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-dialog/dist/index.js +262 -0
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-focus-scope/dist/index.js +138 -0
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/vaul/node_modules/@radix-ui/react-slot/dist/index.js +51 -0
- package/package.json +28 -28
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { useComposedRefs as R } from "../../../../../@radix-ui/react-compose-refs/dist/index.js";
|
|
4
|
+
import { Primitive as M } from "../../react-primitive/dist/index.js";
|
|
5
|
+
import { useCallbackRef as y } from "../../../../../@radix-ui/react-use-callback-ref/dist/index.js";
|
|
6
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
7
|
+
var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
|
|
8
|
+
const {
|
|
9
|
+
loop: t = !1,
|
|
10
|
+
trapped: u = !1,
|
|
11
|
+
onMountAutoFocus: p,
|
|
12
|
+
onUnmountAutoFocus: L,
|
|
13
|
+
...g
|
|
14
|
+
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(n, (s) => U(s)), a = d.useRef({
|
|
15
|
+
paused: !1,
|
|
16
|
+
pause() {
|
|
17
|
+
this.paused = !0;
|
|
18
|
+
},
|
|
19
|
+
resume() {
|
|
20
|
+
this.paused = !1;
|
|
21
|
+
}
|
|
22
|
+
}).current;
|
|
23
|
+
d.useEffect(() => {
|
|
24
|
+
if (u) {
|
|
25
|
+
let s = function(i) {
|
|
26
|
+
if (a.paused || !o) return;
|
|
27
|
+
const c = i.target;
|
|
28
|
+
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
29
|
+
}, l = function(i) {
|
|
30
|
+
if (a.paused || !o) return;
|
|
31
|
+
const c = i.relatedTarget;
|
|
32
|
+
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
33
|
+
}, r = function(i) {
|
|
34
|
+
if (document.activeElement === document.body)
|
|
35
|
+
for (const h of i)
|
|
36
|
+
h.removedNodes.length > 0 && f(o);
|
|
37
|
+
};
|
|
38
|
+
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
39
|
+
const m = new MutationObserver(r);
|
|
40
|
+
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
41
|
+
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}, [u, o, a.paused]), d.useEffect(() => {
|
|
45
|
+
if (o) {
|
|
46
|
+
S.add(a);
|
|
47
|
+
const s = document.activeElement;
|
|
48
|
+
if (!o.contains(s)) {
|
|
49
|
+
const r = new CustomEvent(F, N);
|
|
50
|
+
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
51
|
+
}
|
|
52
|
+
return () => {
|
|
53
|
+
o.removeEventListener(F, E), setTimeout(() => {
|
|
54
|
+
const r = new CustomEvent(T, N);
|
|
55
|
+
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
|
56
|
+
}, 0);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}, [o, E, v, a]);
|
|
60
|
+
const P = d.useCallback(
|
|
61
|
+
(s) => {
|
|
62
|
+
if (!t && !u || a.paused) return;
|
|
63
|
+
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
64
|
+
if (l && r) {
|
|
65
|
+
const m = s.currentTarget, [i, c] = x(m);
|
|
66
|
+
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
[t, u, a.paused]
|
|
70
|
+
);
|
|
71
|
+
return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
72
|
+
});
|
|
73
|
+
k.displayName = K;
|
|
74
|
+
function w(e, { select: n = !1 } = {}) {
|
|
75
|
+
const t = document.activeElement;
|
|
76
|
+
for (const u of e)
|
|
77
|
+
if (f(u, { select: n }), document.activeElement !== t) return;
|
|
78
|
+
}
|
|
79
|
+
function x(e) {
|
|
80
|
+
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
|
81
|
+
return [t, u];
|
|
82
|
+
}
|
|
83
|
+
function I(e) {
|
|
84
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
85
|
+
acceptNode: (u) => {
|
|
86
|
+
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
87
|
+
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
91
|
+
return n;
|
|
92
|
+
}
|
|
93
|
+
function O(e, n) {
|
|
94
|
+
for (const t of e)
|
|
95
|
+
if (!D(t, { upTo: n })) return t;
|
|
96
|
+
}
|
|
97
|
+
function D(e, { upTo: n }) {
|
|
98
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
99
|
+
for (; e; ) {
|
|
100
|
+
if (n !== void 0 && e === n) return !1;
|
|
101
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
102
|
+
e = e.parentElement;
|
|
103
|
+
}
|
|
104
|
+
return !1;
|
|
105
|
+
}
|
|
106
|
+
function H(e) {
|
|
107
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
108
|
+
}
|
|
109
|
+
function f(e, { select: n = !1 } = {}) {
|
|
110
|
+
if (e && e.focus) {
|
|
111
|
+
const t = document.activeElement;
|
|
112
|
+
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
var S = V();
|
|
116
|
+
function V() {
|
|
117
|
+
let e = [];
|
|
118
|
+
return {
|
|
119
|
+
add(n) {
|
|
120
|
+
const t = e[0];
|
|
121
|
+
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
|
122
|
+
},
|
|
123
|
+
remove(n) {
|
|
124
|
+
var t;
|
|
125
|
+
e = C(e, n), (t = e[0]) == null || t.resume();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function C(e, n) {
|
|
130
|
+
const t = [...e], u = t.indexOf(n);
|
|
131
|
+
return u !== -1 && t.splice(u, 1), t;
|
|
132
|
+
}
|
|
133
|
+
function W(e) {
|
|
134
|
+
return e.filter((n) => n.tagName !== "A");
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
k as FocusScope
|
|
138
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import m from "react-dom";
|
|
4
|
+
import { Primitive as c } from "../../react-primitive/dist/index.js";
|
|
5
|
+
import { useLayoutEffect as u } from "../../../../../@radix-ui/react-use-layout-effect/dist/index.js";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
7
|
+
var p = "Portal", d = r.forwardRef((e, a) => {
|
|
8
|
+
var o;
|
|
9
|
+
const { container: i, ...n } = e, [s, f] = r.useState(!1);
|
|
10
|
+
u(() => f(!0), []);
|
|
11
|
+
const t = i || s && ((o = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : o.body);
|
|
12
|
+
return t ? m.createPortal(/* @__PURE__ */ l(c.div, { ...n, ref: a }), t) : null;
|
|
13
|
+
});
|
|
14
|
+
d.displayName = p;
|
|
15
|
+
export {
|
|
16
|
+
d as Portal
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import * as f from "react-dom";
|
|
4
|
+
import { createSlot as p } from "../../react-slot/dist/index.js";
|
|
5
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
+
var u = [
|
|
7
|
+
"a",
|
|
8
|
+
"button",
|
|
9
|
+
"div",
|
|
10
|
+
"form",
|
|
11
|
+
"h2",
|
|
12
|
+
"h3",
|
|
13
|
+
"img",
|
|
14
|
+
"input",
|
|
15
|
+
"label",
|
|
16
|
+
"li",
|
|
17
|
+
"nav",
|
|
18
|
+
"ol",
|
|
19
|
+
"p",
|
|
20
|
+
"select",
|
|
21
|
+
"span",
|
|
22
|
+
"svg",
|
|
23
|
+
"ul"
|
|
24
|
+
], h = u.reduce((t, i) => {
|
|
25
|
+
const e = p(`Primitive.${i}`), r = c.forwardRef((o, s) => {
|
|
26
|
+
const { asChild: m, ...a } = o, n = m ? e : i;
|
|
27
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: s });
|
|
28
|
+
});
|
|
29
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
30
|
+
}, {});
|
|
31
|
+
function w(t, i) {
|
|
32
|
+
t && f.flushSync(() => t.dispatchEvent(i));
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
h as Primitive,
|
|
36
|
+
w as dispatchDiscreteCustomEvent
|
|
37
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { useComposedRefs as m } from "../../../../../@radix-ui/react-compose-refs/dist/index.js";
|
|
4
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
+
// @__NO_SIDE_EFFECTS__
|
|
6
|
+
function V(r) {
|
|
7
|
+
const n = /* @__PURE__ */ y(r), l = o.forwardRef((t, e) => {
|
|
8
|
+
const { children: i, ...a } = t, c = o.Children.toArray(i), s = c.find(g);
|
|
9
|
+
if (s) {
|
|
10
|
+
const f = s.props.children, d = c.map((p) => p === s ? o.Children.count(f) > 1 ? o.Children.only(null) : o.isValidElement(f) ? f.props.children : null : p);
|
|
11
|
+
return /* @__PURE__ */ u(n, { ...a, ref: e, children: o.isValidElement(f) ? o.cloneElement(f, void 0, d) : null });
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ u(n, { ...a, ref: e, children: i });
|
|
14
|
+
});
|
|
15
|
+
return l.displayName = `${r}.Slot`, l;
|
|
16
|
+
}
|
|
17
|
+
// @__NO_SIDE_EFFECTS__
|
|
18
|
+
function y(r) {
|
|
19
|
+
const n = o.forwardRef((l, t) => {
|
|
20
|
+
const { children: e, ...i } = l, a = o.isValidElement(e) ? R(e) : void 0, c = m(a, t);
|
|
21
|
+
if (o.isValidElement(e)) {
|
|
22
|
+
const s = C(i, e.props);
|
|
23
|
+
return e.type !== o.Fragment && (s.ref = c), o.cloneElement(e, s);
|
|
24
|
+
}
|
|
25
|
+
return o.Children.count(e) > 1 ? o.Children.only(null) : null;
|
|
26
|
+
});
|
|
27
|
+
return n.displayName = `${r}.SlotClone`, n;
|
|
28
|
+
}
|
|
29
|
+
var E = Symbol("radix.slottable");
|
|
30
|
+
function g(r) {
|
|
31
|
+
return o.isValidElement(r) && typeof r.type == "function" && "__radixId" in r.type && r.type.__radixId === E;
|
|
32
|
+
}
|
|
33
|
+
function C(r, n) {
|
|
34
|
+
const l = { ...n };
|
|
35
|
+
for (const t in n) {
|
|
36
|
+
const e = r[t], i = n[t];
|
|
37
|
+
/^on[A-Z]/.test(t) ? e && i ? l[t] = (...c) => {
|
|
38
|
+
const s = i(...c);
|
|
39
|
+
return e(...c), s;
|
|
40
|
+
} : e && (l[t] = e) : t === "style" ? l[t] = { ...e, ...i } : t === "className" && (l[t] = [e, i].filter(Boolean).join(" "));
|
|
41
|
+
}
|
|
42
|
+
return { ...r, ...l };
|
|
43
|
+
}
|
|
44
|
+
function R(r) {
|
|
45
|
+
var t, e;
|
|
46
|
+
let n = (t = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : t.get, l = n && "isReactWarning" in n && n.isReactWarning;
|
|
47
|
+
return l ? r.ref : (n = (e = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : e.get, l = n && "isReactWarning" in n && n.isReactWarning, l ? r.props.ref : r.props.ref || r.ref);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
V as createSlot
|
|
51
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laif-ds",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.59",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -90,33 +90,33 @@
|
|
|
90
90
|
"@dnd-kit/core": "^6.3.1",
|
|
91
91
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
92
92
|
"@hookform/resolvers": "^5.0.1",
|
|
93
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
94
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
95
|
-
"@radix-ui/react-aspect-ratio": "^1.1.
|
|
96
|
-
"@radix-ui/react-avatar": "^1.1.
|
|
97
|
-
"@radix-ui/react-checkbox": "^1.
|
|
98
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
99
|
-
"@radix-ui/react-context-menu": "^2.2.
|
|
100
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
101
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
102
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
103
|
-
"@radix-ui/react-label": "^2.1.
|
|
104
|
-
"@radix-ui/react-menubar": "^1.1.
|
|
105
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
106
|
-
"@radix-ui/react-popover": "^1.1.
|
|
107
|
-
"@radix-ui/react-progress": "^1.1.
|
|
108
|
-
"@radix-ui/react-radio-group": "^1.
|
|
109
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
110
|
-
"@radix-ui/react-select": "^2.
|
|
111
|
-
"@radix-ui/react-separator": "^1.1.
|
|
112
|
-
"@radix-ui/react-slider": "^1.3.
|
|
113
|
-
"@radix-ui/react-slot": "^1.2.
|
|
114
|
-
"@radix-ui/react-switch": "^1.
|
|
115
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
116
|
-
"@radix-ui/react-toast": "^1.2.
|
|
117
|
-
"@radix-ui/react-toggle": "^1.1.
|
|
118
|
-
"@radix-ui/react-toggle-group": "^1.1.
|
|
119
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
93
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
94
|
+
"@radix-ui/react-alert-dialog": "^1.1.14",
|
|
95
|
+
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
96
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
97
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
98
|
+
"@radix-ui/react-collapsible": "^1.1.11",
|
|
99
|
+
"@radix-ui/react-context-menu": "^2.2.15",
|
|
100
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
101
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
102
|
+
"@radix-ui/react-hover-card": "^1.1.14",
|
|
103
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
104
|
+
"@radix-ui/react-menubar": "^1.1.15",
|
|
105
|
+
"@radix-ui/react-navigation-menu": "^1.2.13",
|
|
106
|
+
"@radix-ui/react-popover": "^1.1.14",
|
|
107
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
108
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
109
|
+
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
110
|
+
"@radix-ui/react-select": "^2.2.5",
|
|
111
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
112
|
+
"@radix-ui/react-slider": "^1.3.5",
|
|
113
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
114
|
+
"@radix-ui/react-switch": "^1.2.5",
|
|
115
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
116
|
+
"@radix-ui/react-toast": "^1.2.14",
|
|
117
|
+
"@radix-ui/react-toggle": "^1.1.9",
|
|
118
|
+
"@radix-ui/react-toggle-group": "^1.1.10",
|
|
119
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
120
120
|
"@tailwindcss/cli": "^4.1.4",
|
|
121
121
|
"@tailwindcss/vite": "^4.1.3",
|
|
122
122
|
"@tanstack/react-table": "^8.21.3",
|