laif-ds 0.1.35 → 0.1.37
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 -7
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/components/ui/checkbox.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
- package/dist/components/ui/message-input.js +1 -1
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
- package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
- package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
- package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
- package/dist/index.d.ts +30 -4
- package/dist/index.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
- package/dist/node_modules/classnames/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/property-information/lib/html.js +9 -9
- package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
- package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/dist/components/ui/data-cross-table.js +0 -216
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
|
@@ -5,7 +5,7 @@ import "../../../../_virtual/isString.js";
|
|
|
5
5
|
import f from "../../../../_virtual/isFunction.js";
|
|
6
6
|
import s from "../../../../_virtual/isObject.js";
|
|
7
7
|
import { isValidElement as d } from "react";
|
|
8
|
-
import "../../../../_virtual/
|
|
8
|
+
import "../../../../_virtual/index3.js";
|
|
9
9
|
import { SVGElementPropKeys as m, EventKeys as p, FilteredElementKeyMap as o } from "./types.js";
|
|
10
10
|
var h = function(i) {
|
|
11
11
|
return typeof i == "string" ? i : i ? i.displayName || i.name || "Component" : "";
|
|
@@ -963,21 +963,21 @@ const f = (e) => {
|
|
|
963
963
|
* @see https://tailwindcss.com/docs/height
|
|
964
964
|
*/
|
|
965
965
|
h: [{
|
|
966
|
-
h: ["screen", ...R()]
|
|
966
|
+
h: ["screen", "lh", ...R()]
|
|
967
967
|
}],
|
|
968
968
|
/**
|
|
969
969
|
* Min-Height
|
|
970
970
|
* @see https://tailwindcss.com/docs/min-height
|
|
971
971
|
*/
|
|
972
972
|
"min-h": [{
|
|
973
|
-
"min-h": ["screen", "none", ...R()]
|
|
973
|
+
"min-h": ["screen", "lh", "none", ...R()]
|
|
974
974
|
}],
|
|
975
975
|
/**
|
|
976
976
|
* Max-Height
|
|
977
977
|
* @see https://tailwindcss.com/docs/max-height
|
|
978
978
|
*/
|
|
979
979
|
"max-h": [{
|
|
980
|
-
"max-h": ["screen", ...R()]
|
|
980
|
+
"max-h": ["screen", "lh", ...R()]
|
|
981
981
|
}],
|
|
982
982
|
// ------------------
|
|
983
983
|
// --- Typography ---
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { bail as P } from "../../bail/index.js";
|
|
3
|
-
import y from "../../../_virtual/
|
|
3
|
+
import y from "../../../_virtual/index6.js";
|
|
4
4
|
import z from "../../is-plain-obj/index.js";
|
|
5
5
|
import { CallableInstance as C } from "./callable-instance.js";
|
|
6
6
|
import { trough as A } from "../../trough/lib/index.js";
|
package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exports as s } from "../../../_virtual/use-sync-external-store-shim.development.js";
|
|
3
|
+
import h from "react";
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* use-sync-external-store-shim.development.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var l;
|
|
14
|
+
function A() {
|
|
15
|
+
return l ? s : (l = 1, process.env.NODE_ENV !== "production" && function() {
|
|
16
|
+
function d(e, t) {
|
|
17
|
+
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
18
|
+
}
|
|
19
|
+
function S(e, t) {
|
|
20
|
+
f || o.startTransition === void 0 || (f = !0, console.error(
|
|
21
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
22
|
+
));
|
|
23
|
+
var r = t();
|
|
24
|
+
if (!c) {
|
|
25
|
+
var u = t();
|
|
26
|
+
_(r, u) || (console.error(
|
|
27
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
28
|
+
), c = !0);
|
|
29
|
+
}
|
|
30
|
+
u = p({
|
|
31
|
+
inst: { value: r, getSnapshot: t }
|
|
32
|
+
});
|
|
33
|
+
var n = u[0].inst, i = u[1];
|
|
34
|
+
return L(
|
|
35
|
+
function() {
|
|
36
|
+
n.value = r, n.getSnapshot = t, a(n) && i({ inst: n });
|
|
37
|
+
},
|
|
38
|
+
[e, r, t]
|
|
39
|
+
), E(
|
|
40
|
+
function() {
|
|
41
|
+
return a(n) && i({ inst: n }), e(function() {
|
|
42
|
+
a(n) && i({ inst: n });
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
[e]
|
|
46
|
+
), y(r), r;
|
|
47
|
+
}
|
|
48
|
+
function a(e) {
|
|
49
|
+
var t = e.getSnapshot;
|
|
50
|
+
e = e.value;
|
|
51
|
+
try {
|
|
52
|
+
var r = t();
|
|
53
|
+
return !_(e, r);
|
|
54
|
+
} catch {
|
|
55
|
+
return !0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function O(e, t) {
|
|
59
|
+
return t();
|
|
60
|
+
}
|
|
61
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
62
|
+
var o = h, _ = typeof Object.is == "function" ? Object.is : d, p = o.useState, E = o.useEffect, L = o.useLayoutEffect, y = o.useDebugValue, f = !1, c = !1, v = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? O : S;
|
|
63
|
+
s.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : v, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
64
|
+
}(), s);
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
A as __require
|
|
68
|
+
};
|
package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exports as i } from "../../../_virtual/use-sync-external-store-shim.production.js";
|
|
3
|
+
import h from "react";
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* use-sync-external-store-shim.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var s;
|
|
14
|
+
function x() {
|
|
15
|
+
if (s) return i;
|
|
16
|
+
s = 1;
|
|
17
|
+
var u = h;
|
|
18
|
+
function f(e, t) {
|
|
19
|
+
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
20
|
+
}
|
|
21
|
+
var S = typeof Object.is == "function" ? Object.is : f, d = u.useState, l = u.useEffect, p = u.useLayoutEffect, E = u.useDebugValue;
|
|
22
|
+
function v(e, t) {
|
|
23
|
+
var r = t(), a = d({ inst: { value: r, getSnapshot: t } }), n = a[0].inst, c = a[1];
|
|
24
|
+
return p(
|
|
25
|
+
function() {
|
|
26
|
+
n.value = r, n.getSnapshot = t, o(n) && c({ inst: n });
|
|
27
|
+
},
|
|
28
|
+
[e, r, t]
|
|
29
|
+
), l(
|
|
30
|
+
function() {
|
|
31
|
+
return o(n) && c({ inst: n }), e(function() {
|
|
32
|
+
o(n) && c({ inst: n });
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
[e]
|
|
36
|
+
), E(r), r;
|
|
37
|
+
}
|
|
38
|
+
function o(e) {
|
|
39
|
+
var t = e.getSnapshot;
|
|
40
|
+
e = e.value;
|
|
41
|
+
try {
|
|
42
|
+
var r = t();
|
|
43
|
+
return !S(e, r);
|
|
44
|
+
} catch {
|
|
45
|
+
return !0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function y(e, t) {
|
|
49
|
+
return t();
|
|
50
|
+
}
|
|
51
|
+
var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : v;
|
|
52
|
+
return i.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : m, i;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
x as __require
|
|
56
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __module as e } from "../../../_virtual/index2.js";
|
|
3
|
+
import { __require as i } from "../cjs/use-sync-external-store-shim.production.js";
|
|
4
|
+
import { __require as o } from "../cjs/use-sync-external-store-shim.development.js";
|
|
5
|
+
var r;
|
|
6
|
+
function m() {
|
|
7
|
+
return r ? e.exports : (r = 1, process.env.NODE_ENV === "production" ? e.exports = i() : e.exports = o(), e.exports);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
m as __require
|
|
11
|
+
};
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "tailwindcss";@import "tw-animate-css"
|
|
1
|
+
@import "tailwindcss";@import "tw-animate-css";:root{--d-radius:6px;--d-background:#fafafa;--d-foreground:#2e2e2e;--d-card:#fafafa;--d-card-foreground:#2e2e2e;--d-popover:#fafafa;--d-popover-foreground:#2e2e2e;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#f5f5f5;--d-secondary-foreground:#2e2e2e;--d-muted:#e0e0e0;--d-muted-foreground:#7a7a7a;--d-accent:#e0e0e0;--d-accent-foreground:#2e2e2e;--d-destructive:#ec2842;--d-destructive-foreground:#85202d;--d-border:#e0e0e0;--d-input:#e0e0e0;--d-ring:#64c2d1;--d-chart-1:#64c2d1;--d-chart-2:#39f283;--d-chart-3:orange;--d-chart-4:orange;--d-chart-5:#eb576a;--d-sidebar:#f5f5f5;--d-sidebar-foreground:#2e2e2e;--d-sidebar-primary:#64c2d1;--d-sidebar-primary-foreground:#1f1f1f;--d-sidebar-accent:#e0e0e066;--d-sidebar-accent-foreground:#2e2e2e;--d-sidebar-border:#e0e0e0;--d-sidebar-ring:#64c2d1}.dark{--d-radius:6px;--d-background:#1f1f1f;--d-foreground:#e0e0e0;--d-card:#1f1f1f;--d-card-foreground:#e0e0e0;--d-popover:#1f1f1f;--d-popover-foreground:#e0e0e0;--d-primary:#64c2d1;--d-primary-foreground:#1f1f1f;--d-secondary:#2e2e2e;--d-secondary-foreground:#e0e0e0;--d-muted:#474747;--d-muted-foreground:#7a7a7a;--d-accent:#474747;--d-accent-foreground:#e0e0e0;--d-destructive:#85202d;--d-destructive-foreground:#e0e0e0;--d-border:#2e2e2e;--d-input:#2e2e2e;--d-ring:#64c2d1;--d-chart-1:#64c2d1;--d-chart-2:#39f283;--d-chart-3:orange;--d-chart-4:orange;--d-chart-5:#eb576a;--d-sidebar:#141414;--d-sidebar-foreground:#e0e0e0;--d-sidebar-primary:#64c2d1;--d-sidebar-primary-foreground:#1f1f1f;--d-sidebar-accent:#47474766;--d-sidebar-accent-foreground:#e0e0e0;--d-sidebar-border:#2e2e2e;--d-sidebar-ring:#64c2d1}.tangerine{--d-background:oklch(0.26 0.03 262.67);--d-foreground:oklch(0.92 0 0);--d-card:oklch(0.31 0.03 268.64);--d-card-foreground:oklch(0.92 0 0);--d-popover:oklch(0.29 0.02 268.4);--d-popover-foreground:oklch(0.92 0 0);--d-primary:oklch(0.64 0.17 36.44);--d-primary-foreground:oklch(1 0 0);--d-secondary:oklch(0.31 0.03 266.71);--d-secondary-foreground:oklch(0.92 0 0);--d-muted:oklch(0.31 0.03 266.71);--d-muted-foreground:oklch(0.72 0 0);--d-accent:oklch(0.34 0.06 267.59);--d-accent-foreground:oklch(0.88 0.06 254.13);--d-destructive:oklch(0.64 0.21 25.33);--d-destructive-foreground:oklch(1 0 0);--d-border:oklch(0.38 0.03 269.73);--d-input:oklch(0.38 0.03 269.73);--d-ring:oklch(0.64 0.17 36.44);--d-chart-1:oklch(0.72 0.06 248.68);--d-chart-2:oklch(0.77 0.09 34.19);--d-chart-3:oklch(0.58 0.08 254.16);--d-chart-4:oklch(0.5 0.08 259.49);--d-chart-5:oklch(0.42 0.1 264.03);--d-sidebar:oklch(0.31 0.03 267.74);--d-sidebar-foreground:oklch(0.92 0 0);--d-sidebar-primary:oklch(0.64 0.17 36.44);--d-sidebar-primary-foreground:oklch(1 0 0);--d-sidebar-accent:oklch(0.34 0.06 267.59);--d-sidebar-accent-foreground:oklch(0.88 0.06 254.13);--d-sidebar-border:oklch(0.38 0.03 269.73);--d-sidebar-ring:oklch(0.64 0.17 36.44);--d-font-sans:Inter,sans-serif;--d-font-serif:Source Serif 4,serif;--d-font-mono:JetBrains Mono,monospace;--d-radius:0.75rem;--d-shadow-2xs:0px 1px 3px 0px #0000000d;--d-shadow-xs:0px 1px 3px 0px #0000000d;--d-shadow-sm:0px 1px 3px 0px #0000001a,0px 1px 2px -1px #0000001a;--d-shadow:0px 1px 3px 0px #0000001a,0px 1px 2px -1px #0000001a;--d-shadow-md:0px 1px 3px 0px #0000001a,0px 2px 4px -1px #0000001a;--d-shadow-lg:0px 1px 3px 0px #0000001a,0px 4px 6px -1px #0000001a;--d-shadow-xl:0px 1px 3px 0px #0000001a,0px 8px 10px -1px #0000001a;--d-shadow-2xl:0px 1px 3px 0px #00000040}.claymorphism{--d-background:#1e1b18;--d-foreground:#e2e8f0;--d-card:#2c2825;--d-card-foreground:#e2e8f0;--d-popover:#2c2825;--d-popover-foreground:#e2e8f0;--d-primary:#818cf8;--d-primary-foreground:#1e1b18;--d-secondary:#3a3633;--d-secondary-foreground:#d1d5db;--d-muted:#2c2825;--d-muted-foreground:#9ca3af;--d-accent:#484441;--d-accent-foreground:#d1d5db;--d-destructive:#ef4444;--d-destructive-foreground:#1e1b18;--d-border:#3a3633;--d-input:#3a3633;--d-ring:#818cf8;--d-chart-1:#818cf8;--d-chart-2:#6366f1;--d-chart-3:#4f46e5;--d-chart-4:#4338ca;--d-chart-5:#3730a3;--d-sidebar:#3a3633;--d-sidebar-foreground:#e2e8f0;--d-sidebar-primary:#818cf8;--d-sidebar-primary-foreground:#1e1b18;--d-sidebar-accent:#484441;--d-sidebar-accent-foreground:#d1d5db;--d-sidebar-border:#3a3633;--d-sidebar-ring:#818cf8;--d-font-sans:Plus Jakarta Sans,sans-serif;--d-font-serif:Lora,serif;--d-font-mono:Roboto Mono,monospace;--d-radius:1.25rem;--d-shadow-2xs:2px 2px 10px 4px #00000017;--d-shadow-xs:2px 2px 10px 4px #00000017;--d-shadow-sm:2px 2px 10px 4px #0000002e,2px 1px 2px 3px #0000002e;--d-shadow:2px 2px 10px 4px #0000002e,2px 1px 2px 3px #0000002e;--d-shadow-md:2px 2px 10px 4px #0000002e,2px 2px 4px 3px #0000002e;--d-shadow-lg:2px 2px 10px 4px #0000002e,2px 4px 6px 3px #0000002e;--d-shadow-xl:2px 2px 10px 4px #0000002e,2px 8px 10px 3px #0000002e;--d-shadow-2xl:2px 2px 10px 4px #00000073}@theme inline{--radius-d-sm:calc(var(--d-radius) - 4px);--radius-d-md:calc(var(--d-radius) - 2px);--radius-d-lg:var(--d-radius);--radius-d-xl:calc(var(--d-radius) + 4px);--color-d-background:var(--d-background);--color-d-foreground:var(--d-foreground);--color-d-card:var(--d-card);--color-d-card-foreground:var(--d-card-foreground);--color-d-popover:var(--d-popover);--color-d-popover-foreground:var(--d-popover-foreground);--color-d-primary:var(--d-primary);--color-d-primary-foreground:var(--d-primary-foreground);--color-d-secondary:var(--d-secondary);--color-d-secondary-foreground:var(--d-secondary-foreground);--color-d-muted:var(--d-muted);--color-d-muted-foreground:var(--d-muted-foreground);--color-d-accent:var(--d-accent);--color-d-accent-foreground:var(--d-accent-foreground);--color-d-destructive:var(--d-destructive);--color-d-border:var(--d-border);--color-d-input:var(--d-input);--color-d-ring:var(--d-ring);--color-d-chart-1:var(--d-chart-1);--color-d-chart-2:var(--d-chart-2);--color-d-chart-3:var(--d-chart-3);--color-d-chart-4:var(--d-chart-4);--color-d-chart-5:var(--d-chart-5);--color-d-sidebar:var(--d-sidebar);--color-d-sidebar-foreground:var(--d-sidebar-foreground);--color-d-sidebar-primary:var(--d-sidebar-primary);--color-d-sidebar-primary-foreground:var(--d-sidebar-primary-foreground);--color-d-sidebar-accent:var(--d-sidebar-accent);--color-d-sidebar-accent-foreground:var(--d-sidebar-accent-foreground);--color-d-sidebar-border:var(--d-sidebar-border);--color-d-sidebar-ring:var(--d-sidebar-ring)}*{border-color:var(--d-border);outline-color:color-mix(in oklab,var(--d-ring) 50%,#0000)}body{background-color:var(--d-background);color:var(--d-foreground)}
|
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.37",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
"@tailwindcss/cli": "^4.1.4",
|
|
121
121
|
"@tailwindcss/vite": "^4.1.3",
|
|
122
122
|
"@tanstack/react-table": "^8.21.3",
|
|
123
|
+
"@tanstack/react-virtual": "^3.13.8",
|
|
123
124
|
"class-variance-authority": "^0.7.1",
|
|
124
125
|
"classnames": "^2.5.1",
|
|
125
126
|
"clsx": "^2.1.1",
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { useState as C, useMemo as S } from "react";
|
|
4
|
-
import { useReactTable as P, flexRender as V } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
5
|
-
import { TableSkeleton as U } from "./table-skeleton.js";
|
|
6
|
-
import { Button as j } from "./button.js";
|
|
7
|
-
import { TooltipProvider as q, Tooltip as G, TooltipTrigger as J, TooltipContent as K } from "./tooltip.js";
|
|
8
|
-
import { TableRow as T, TableCell as A, Table as Q, TableHeader as X, TableHead as Y, TableBody as Z } from "./table.js";
|
|
9
|
-
import { getSortedRowModel as _, getCoreRowModel as W } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
10
|
-
function v({
|
|
11
|
-
text: c,
|
|
12
|
-
maxLength: a,
|
|
13
|
-
className: h = ""
|
|
14
|
-
}) {
|
|
15
|
-
return !c || c.length <= a ? /* @__PURE__ */ o("div", { className: h, children: c }) : /* @__PURE__ */ o(q, { children: /* @__PURE__ */ b(G, { children: [
|
|
16
|
-
/* @__PURE__ */ o(J, { asChild: !0, children: /* @__PURE__ */ b("div", { className: `truncate ${h} cursor-pointer`, children: [
|
|
17
|
-
c.substring(0, a),
|
|
18
|
-
"..."
|
|
19
|
-
] }) }),
|
|
20
|
-
/* @__PURE__ */ o(K, { children: /* @__PURE__ */ o("p", { children: c }) })
|
|
21
|
-
] }) });
|
|
22
|
-
}
|
|
23
|
-
function ie({
|
|
24
|
-
crossTableData: c,
|
|
25
|
-
filterable: a = !1,
|
|
26
|
-
loading: h = !1,
|
|
27
|
-
emptyComponent: D,
|
|
28
|
-
className: N,
|
|
29
|
-
notFoundMessage: M = "Nessun risultato trovato.",
|
|
30
|
-
cornerHeaderFrom: x = "Da",
|
|
31
|
-
cornerHeaderTo: w = "A",
|
|
32
|
-
maxHeaderLength: g = 15,
|
|
33
|
-
minWidthCell: R = 160
|
|
34
|
-
}) {
|
|
35
|
-
const [L, $] = C([]), { headerTop: d, headerLeft: m, data: f } = c, [p, I] = C(null), [y, k] = C(!0), B = (n) => n && typeof n == "object" && "value" in n ? n.value : n, u = S(() => {
|
|
36
|
-
if (!p) return d;
|
|
37
|
-
const n = m.indexOf(p);
|
|
38
|
-
if (n === -1) return d;
|
|
39
|
-
const r = d.map((e, t) => {
|
|
40
|
-
var i;
|
|
41
|
-
const s = ((i = f[n]) == null ? void 0 : i[t]) ?? null, l = B(s);
|
|
42
|
-
return { header: e, value: l };
|
|
43
|
-
});
|
|
44
|
-
return r.sort((e, t) => {
|
|
45
|
-
if (typeof e.value == "number" && typeof t.value == "number")
|
|
46
|
-
return y ? e.value - t.value : t.value - e.value;
|
|
47
|
-
const s = String(e.value ?? ""), l = String(t.value ?? "");
|
|
48
|
-
return y ? s.localeCompare(l) : l.localeCompare(s);
|
|
49
|
-
}), r.map((e) => e.header);
|
|
50
|
-
}, [d, m, f, p, y]), F = S(() => {
|
|
51
|
-
const n = [
|
|
52
|
-
{
|
|
53
|
-
id: "cross-header",
|
|
54
|
-
header: () => /* @__PURE__ */ b("div", { className: "relative", children: [
|
|
55
|
-
/* @__PURE__ */ o("div", { className: "absolute top-0 left-2 text-xs", children: x }),
|
|
56
|
-
/* @__PURE__ */ o("div", { className: "absolute right-2 bottom-0 text-xs", children: w })
|
|
57
|
-
] }),
|
|
58
|
-
accessorFn: (r) => r.item,
|
|
59
|
-
cell: (r) => {
|
|
60
|
-
const e = r.getValue();
|
|
61
|
-
if (!a)
|
|
62
|
-
return /* @__PURE__ */ o(
|
|
63
|
-
v,
|
|
64
|
-
{
|
|
65
|
-
text: e,
|
|
66
|
-
maxLength: g,
|
|
67
|
-
className: "text-left"
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
const t = p === e;
|
|
71
|
-
return /* @__PURE__ */ o(
|
|
72
|
-
j,
|
|
73
|
-
{
|
|
74
|
-
variant: "ghost",
|
|
75
|
-
size: "sm",
|
|
76
|
-
iconLeft: "ArrowLeftRight",
|
|
77
|
-
className: "text-right",
|
|
78
|
-
onClick: () => {
|
|
79
|
-
a && (t ? k((s) => !s) : (I(e), k(!0)));
|
|
80
|
-
},
|
|
81
|
-
children: /* @__PURE__ */ o(v, { text: e, maxLength: g })
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
];
|
|
87
|
-
return u.forEach((r) => {
|
|
88
|
-
n.push({
|
|
89
|
-
id: r,
|
|
90
|
-
accessorFn: (e) => e[r],
|
|
91
|
-
header: ({ column: e }) => a ? /* @__PURE__ */ o(
|
|
92
|
-
j,
|
|
93
|
-
{
|
|
94
|
-
variant: "ghost",
|
|
95
|
-
size: "sm",
|
|
96
|
-
iconLeft: "ArrowUpDown",
|
|
97
|
-
onClick: a ? () => e.toggleSorting(e.getIsSorted() === "asc") : void 0,
|
|
98
|
-
children: /* @__PURE__ */ o(v, { text: r, maxLength: g })
|
|
99
|
-
}
|
|
100
|
-
) : /* @__PURE__ */ o(
|
|
101
|
-
v,
|
|
102
|
-
{
|
|
103
|
-
text: r,
|
|
104
|
-
maxLength: g,
|
|
105
|
-
className: "font-medium"
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
sortingFn: (e, t, s) => {
|
|
109
|
-
let l = e.getValue(s), i = t.getValue(s);
|
|
110
|
-
return l == null && i == null ? 0 : l == null ? 1 : i == null ? -1 : (l && typeof l == "object" && "value" in l && (l = l.value), i && typeof i == "object" && "value" in i && (i = i.value), typeof l == "number" && typeof i == "number" ? l - i : String(l).localeCompare(String(i)));
|
|
111
|
-
},
|
|
112
|
-
//NOTE Cell is responsible for rendering the cell of his column
|
|
113
|
-
cell: (e) => {
|
|
114
|
-
const t = e.getValue();
|
|
115
|
-
return t ? t.render ? t.render(t.fromId, t.toId, t.id) : /* @__PURE__ */ o("div", { children: t.value }) : null;
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
}), n;
|
|
119
|
-
}, [
|
|
120
|
-
u,
|
|
121
|
-
x,
|
|
122
|
-
w,
|
|
123
|
-
p,
|
|
124
|
-
a
|
|
125
|
-
]), E = S(() => m.map((n, r) => {
|
|
126
|
-
const e = { item: n };
|
|
127
|
-
return u.forEach((t) => {
|
|
128
|
-
var l;
|
|
129
|
-
const s = d.indexOf(t);
|
|
130
|
-
e[t] = s !== -1 ? ((l = f[r]) == null ? void 0 : l[s]) ?? null : null;
|
|
131
|
-
}), e;
|
|
132
|
-
}), [m, u, f, d]), z = P({
|
|
133
|
-
data: E,
|
|
134
|
-
columns: F,
|
|
135
|
-
state: { sorting: L },
|
|
136
|
-
onSortingChange: $,
|
|
137
|
-
getCoreRowModel: W(),
|
|
138
|
-
getSortedRowModel: _()
|
|
139
|
-
});
|
|
140
|
-
if (!f || f.length === 0)
|
|
141
|
-
return /* @__PURE__ */ o(T, { children: /* @__PURE__ */ o(A, { colSpan: u.length + 1, children: D || M }) });
|
|
142
|
-
if (h)
|
|
143
|
-
return /* @__PURE__ */ o(
|
|
144
|
-
U,
|
|
145
|
-
{
|
|
146
|
-
headerRow: u,
|
|
147
|
-
rowCount: m.length || 5,
|
|
148
|
-
columnCount: u.length || 5,
|
|
149
|
-
className: N,
|
|
150
|
-
cornerHeaderFrom: x,
|
|
151
|
-
cornerHeaderTo: w
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
const O = (n) => {
|
|
155
|
-
const r = n.column.id === "cross-header", e = r, t = ["bg-d-secondary"];
|
|
156
|
-
r || t.push("border-r"), r && t.push("sticky left-0"), t.push("sticky top-0 z-20"), e ? t.push("z-40") : r && t.push("z-30");
|
|
157
|
-
let s = "none";
|
|
158
|
-
return r && (s = "inset -1px 0 0 0 var(--d-border), 0 1px 0 0 var(--d-border)"), {
|
|
159
|
-
className: t.join(" "),
|
|
160
|
-
style: { boxShadow: s, width: `${R}px` }
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
return /* @__PURE__ */ o("div", { className: `w-[900px] ${N || ""}`, children: /* @__PURE__ */ o("div", { className: "max-h-[600px] overflow-auto rounded-md border", children: /* @__PURE__ */ b(Q, { className: "relative w-full table-fixed border-collapse", children: [
|
|
164
|
-
/* @__PURE__ */ o(
|
|
165
|
-
X,
|
|
166
|
-
{
|
|
167
|
-
className: "bg-d-secondary sticky top-0 z-20",
|
|
168
|
-
style: { boxShadow: "0 1px 0 0 var(--d-border)" },
|
|
169
|
-
children: z.getHeaderGroups().map((n) => /* @__PURE__ */ o(
|
|
170
|
-
T,
|
|
171
|
-
{
|
|
172
|
-
className: "bg-d-secondary sticky top-0 z-20",
|
|
173
|
-
children: n.headers.map((r) => {
|
|
174
|
-
const e = O(r);
|
|
175
|
-
return /* @__PURE__ */ o(
|
|
176
|
-
Y,
|
|
177
|
-
{
|
|
178
|
-
className: e.className,
|
|
179
|
-
style: e.style,
|
|
180
|
-
children: r.isPlaceholder ? null : V(
|
|
181
|
-
r.column.columnDef.header,
|
|
182
|
-
r.getContext()
|
|
183
|
-
)
|
|
184
|
-
},
|
|
185
|
-
r.id
|
|
186
|
-
);
|
|
187
|
-
})
|
|
188
|
-
},
|
|
189
|
-
n.id
|
|
190
|
-
))
|
|
191
|
-
}
|
|
192
|
-
),
|
|
193
|
-
/* @__PURE__ */ o(Z, { children: z.getRowModel().rows.map((n) => /* @__PURE__ */ o(T, { children: n.getVisibleCells().map((r, e) => {
|
|
194
|
-
const t = e === 0, s = r.getValue(), l = t ? "var(--d-secondary)" : (s == null ? void 0 : s.color) || "transparent";
|
|
195
|
-
return /* @__PURE__ */ o(
|
|
196
|
-
A,
|
|
197
|
-
{
|
|
198
|
-
className: `text-center ${t ? "sticky left-0 z-10" : "border-r"}`,
|
|
199
|
-
style: {
|
|
200
|
-
boxShadow: t ? "inset -1px 0 0 0 var(--d-border)" : "none",
|
|
201
|
-
backgroundColor: l,
|
|
202
|
-
width: `${R}px`
|
|
203
|
-
},
|
|
204
|
-
children: V(
|
|
205
|
-
r.column.columnDef.cell,
|
|
206
|
-
r.getContext()
|
|
207
|
-
)
|
|
208
|
-
},
|
|
209
|
-
r.id
|
|
210
|
-
);
|
|
211
|
-
}) }, n.id)) })
|
|
212
|
-
] }) }) });
|
|
213
|
-
}
|
|
214
|
-
export {
|
|
215
|
-
ie as DataCrossTable
|
|
216
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import * as m from "react";
|
|
3
|
-
import { Primitive as p } from "../../react-primitive/dist/index.js";
|
|
4
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
-
var v = "Arrow", e = m.forwardRef((r, i) => {
|
|
6
|
-
const { children: t, width: a = 10, height: s = 5, ...n } = r;
|
|
7
|
-
return /* @__PURE__ */ o(
|
|
8
|
-
p.svg,
|
|
9
|
-
{
|
|
10
|
-
...n,
|
|
11
|
-
ref: i,
|
|
12
|
-
width: a,
|
|
13
|
-
height: s,
|
|
14
|
-
viewBox: "0 0 30 10",
|
|
15
|
-
preserveAspectRatio: "none",
|
|
16
|
-
children: r.asChild ? t : /* @__PURE__ */ o("polygon", { points: "0,0 30,0 15,10" })
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
e.displayName = v;
|
|
21
|
-
var f = e;
|
|
22
|
-
export {
|
|
23
|
-
e as Arrow,
|
|
24
|
-
f as Root
|
|
25
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import r from "react";
|
|
3
|
-
import { createContextScope as y } from "../../../../../react-context/dist/index.js";
|
|
4
|
-
import { useComposedRefs as M } from "../../../../../react-compose-refs/dist/index.js";
|
|
5
|
-
import { createSlot as x } from "../../../../../react-slot/dist/index.js";
|
|
6
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
7
|
-
function g(s) {
|
|
8
|
-
const m = s + "CollectionProvider", [A, N] = y(m), [_, f] = A(
|
|
9
|
-
m,
|
|
10
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
11
|
-
), p = (c) => {
|
|
12
|
-
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
13
|
-
return /* @__PURE__ */ d(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
14
|
-
};
|
|
15
|
-
p.displayName = m;
|
|
16
|
-
const u = s + "CollectionSlot", E = x(u), C = r.forwardRef(
|
|
17
|
-
(c, e) => {
|
|
18
|
-
const { scope: l, children: o } = c, t = f(u, l), n = M(e, t.collectionRef);
|
|
19
|
-
return /* @__PURE__ */ d(E, { ref: n, children: o });
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
C.displayName = u;
|
|
23
|
-
const a = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(a), I = r.forwardRef(
|
|
24
|
-
(c, e) => {
|
|
25
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = f(a, l);
|
|
26
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d(T, { [R]: "", ref: S, children: o });
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
I.displayName = a;
|
|
30
|
-
function O(c) {
|
|
31
|
-
const e = f(s + "CollectionConsumer", c);
|
|
32
|
-
return r.useCallback(() => {
|
|
33
|
-
const o = e.collectionRef.current;
|
|
34
|
-
if (!o) return [];
|
|
35
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
36
|
-
return Array.from(e.itemMap.values()).sort(
|
|
37
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
38
|
-
);
|
|
39
|
-
}, [e.collectionRef, e.itemMap]);
|
|
40
|
-
}
|
|
41
|
-
return [
|
|
42
|
-
{ Provider: p, Slot: C, ItemSlot: I },
|
|
43
|
-
O,
|
|
44
|
-
N
|
|
45
|
-
];
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
g as createCollection
|
|
49
|
-
};
|