@krosoft/react 0.0.92 → 0.0.94
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/{AppSubTitle-CvJlatS9.js → AppSubTitle-ClfoCdaL.js} +1 -1
- package/dist/{AppTitle-LIQCjpo5.js → AppTitle-CdIKv3Uc.js} +19 -18
- package/dist/{AppVerticalTabs-BHrad7wu.js → AppVerticalTabs-asJym06s.js} +3 -3
- package/dist/{ConfirmationDialog-BlRXnFH5.js → ConfirmationDialog-CwM8I84X.js} +55 -54
- package/dist/DataTable-BB0h65b3.js +500 -0
- package/dist/{MetricCard-BGT2QRn0.js → MetricCard-DhTm-HB1.js} +7 -6
- package/dist/{SearchInput-DpOuKSIf.js → SearchInput-Jix7xgVv.js} +19 -18
- package/dist/{TableFilter-DFtN_-Bg.js → TableFilter-0SlGbGRV.js} +12 -11
- package/dist/{ThemeSelector-D9KTJAWz.js → ThemeSelector-Bzxc7UEq.js} +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/dialogs/index.js +2 -2
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/index.js +63 -64
- package/dist/components/core/inputs/index.js +1 -1
- package/dist/components/core/layouts/index.js +2 -2
- package/dist/components/core/table/DataTable.d.ts +1 -1
- package/dist/components/core/table/DataTable.d.ts.map +1 -1
- package/dist/components/core/table/index.js +8 -9
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +256 -255
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +54 -52
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/{select-D6_XPD6x.js → select-zzSnHs9S.js} +481 -456
- package/dist/toaster-DBg6ZSwC.js +134 -0
- package/dist/toggle-group-FWXeh1Cr.js +20235 -0
- package/dist/useDataTable-CQpx3zTg.js +91 -0
- package/package.json +8 -7
- package/dist/TableSettings-m2q3s0wU.js +0 -382
- package/dist/toaster-D6ND7OTk.js +0 -113
- package/dist/toggle-group-VJoGbVQm.js +0 -19987
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { e as m } from "./tooltip-CAu4DEhc.js";
|
|
4
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
import { c9 as g, ca as b, cb as v, cc as h, cd as w, ce as x, cf as y, b_ as T, bW as N, b$ as R, bZ as C, bY as $, c0 as P } from "./toggle-group-FWXeh1Cr.js";
|
|
6
|
+
import { c as n } from "./index-gWiv5-6R.js";
|
|
7
|
+
import { G as S } from "./grip-vertical-CJ07_87Y.js";
|
|
8
|
+
import { useTheme as A } from "next-themes";
|
|
9
|
+
import { u as j } from "./useToast-BFTk4lWz.js";
|
|
10
|
+
var z = [
|
|
11
|
+
"a",
|
|
12
|
+
"button",
|
|
13
|
+
"div",
|
|
14
|
+
"form",
|
|
15
|
+
"h2",
|
|
16
|
+
"h3",
|
|
17
|
+
"img",
|
|
18
|
+
"input",
|
|
19
|
+
"label",
|
|
20
|
+
"li",
|
|
21
|
+
"nav",
|
|
22
|
+
"ol",
|
|
23
|
+
"p",
|
|
24
|
+
"select",
|
|
25
|
+
"span",
|
|
26
|
+
"svg",
|
|
27
|
+
"ul"
|
|
28
|
+
], B = z.reduce((e, t) => {
|
|
29
|
+
const r = m(`Primitive.${t}`), o = c.forwardRef((s, i) => {
|
|
30
|
+
const { asChild: d, ...u } = s, f = d ? r : t;
|
|
31
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a(f, { ...u, ref: i });
|
|
32
|
+
});
|
|
33
|
+
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
34
|
+
}, {}), G = "AspectRatio", p = c.forwardRef(
|
|
35
|
+
(e, t) => {
|
|
36
|
+
const { ratio: r = 1 / 1, style: o, ...s } = e;
|
|
37
|
+
return /* @__PURE__ */ a(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
style: {
|
|
41
|
+
// ensures inner element is contained
|
|
42
|
+
position: "relative",
|
|
43
|
+
// ensures padding bottom trick maths works
|
|
44
|
+
width: "100%",
|
|
45
|
+
paddingBottom: `${100 / r}%`
|
|
46
|
+
},
|
|
47
|
+
"data-radix-aspect-ratio-wrapper": "",
|
|
48
|
+
children: /* @__PURE__ */ a(
|
|
49
|
+
B.div,
|
|
50
|
+
{
|
|
51
|
+
...s,
|
|
52
|
+
ref: t,
|
|
53
|
+
style: {
|
|
54
|
+
...o,
|
|
55
|
+
// ensures children expand in ratio
|
|
56
|
+
position: "absolute",
|
|
57
|
+
top: 0,
|
|
58
|
+
right: 0,
|
|
59
|
+
bottom: 0,
|
|
60
|
+
left: 0
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
p.displayName = G;
|
|
69
|
+
var k = p;
|
|
70
|
+
const U = k, W = g, Z = v, _ = b, q = ({ className: e, ...t }) => /* @__PURE__ */ a(x, { className: n("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", e), ...t }), F = h, I = ({
|
|
71
|
+
withHandle: e,
|
|
72
|
+
className: t,
|
|
73
|
+
...r
|
|
74
|
+
}) => /* @__PURE__ */ a(
|
|
75
|
+
w,
|
|
76
|
+
{
|
|
77
|
+
className: n(
|
|
78
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
79
|
+
t
|
|
80
|
+
),
|
|
81
|
+
...r,
|
|
82
|
+
children: e && /* @__PURE__ */ a("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ a(S, { className: "h-2.5 w-2.5" }) })
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
function J({ className: e, ...t }) {
|
|
86
|
+
return /* @__PURE__ */ a("div", { className: n("animate-pulse rounded-md bg-muted", e), ...t });
|
|
87
|
+
}
|
|
88
|
+
const K = ({ ...e }) => {
|
|
89
|
+
const { theme: t = "system" } = A();
|
|
90
|
+
return /* @__PURE__ */ a(
|
|
91
|
+
y,
|
|
92
|
+
{
|
|
93
|
+
theme: t,
|
|
94
|
+
className: "toaster group",
|
|
95
|
+
toastOptions: {
|
|
96
|
+
classNames: {
|
|
97
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
98
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
99
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
100
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
...e
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
function L() {
|
|
108
|
+
const { toasts: e } = j();
|
|
109
|
+
return /* @__PURE__ */ l(T, { children: [
|
|
110
|
+
e.map(function({ id: t, title: r, description: o, action: s, ...i }) {
|
|
111
|
+
return /* @__PURE__ */ l(N, { ...i, children: [
|
|
112
|
+
/* @__PURE__ */ l("div", { className: "grid gap-1", children: [
|
|
113
|
+
r && /* @__PURE__ */ a(R, { children: r }),
|
|
114
|
+
o && /* @__PURE__ */ a(C, { children: o })
|
|
115
|
+
] }),
|
|
116
|
+
s,
|
|
117
|
+
/* @__PURE__ */ a($, {})
|
|
118
|
+
] }, t);
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ a(P, {})
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
export {
|
|
124
|
+
U as A,
|
|
125
|
+
W as C,
|
|
126
|
+
I as R,
|
|
127
|
+
J as S,
|
|
128
|
+
K as T,
|
|
129
|
+
_ as a,
|
|
130
|
+
Z as b,
|
|
131
|
+
F as c,
|
|
132
|
+
q as d,
|
|
133
|
+
L as e
|
|
134
|
+
};
|