@krosoft/react 0.0.11 → 0.0.12
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/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +58 -0
- package/dist/helpers/index.js +4 -2
- package/dist/hooks/index.js +1 -2
- package/dist/index-DxGGCUCL.js +2278 -0
- package/package.json +22 -5
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/tailwind.helper.js +0 -6
- package/dist/helpers/tailwind.helper.js.map +0 -1
- package/dist/hooks/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
9
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAkBlE,QAAA,MAAM,KAAK;;sHAEV,CAAC;AAGF,QAAA,MAAM,UAAU,uHAEd,CAAC;AAGH,QAAA,MAAM,gBAAgB,yHAEpB,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { c as k, a as c } from "../../index-DxGGCUCL.js";
|
|
4
|
+
const y = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, N = k, C = (e, a) => (t) => {
|
|
5
|
+
var s;
|
|
6
|
+
if ((a == null ? void 0 : a.variants) == null) return N(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
7
|
+
const { variants: m, defaultVariants: i } = a, x = Object.keys(m).map((r) => {
|
|
8
|
+
const l = t == null ? void 0 : t[r], d = i == null ? void 0 : i[r];
|
|
9
|
+
if (l === null) return null;
|
|
10
|
+
const n = y(l) || y(d);
|
|
11
|
+
return m[r][n];
|
|
12
|
+
}), f = t && Object.entries(t).reduce((r, l) => {
|
|
13
|
+
let [d, n] = l;
|
|
14
|
+
return n === void 0 || (r[d] = n), r;
|
|
15
|
+
}, {}), b = a == null || (s = a.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((r, l) => {
|
|
16
|
+
let { class: d, className: n, ...V } = l;
|
|
17
|
+
return Object.entries(V).every((A) => {
|
|
18
|
+
let [g, o] = A;
|
|
19
|
+
return Array.isArray(o) ? o.includes({
|
|
20
|
+
...i,
|
|
21
|
+
...f
|
|
22
|
+
}[g]) : {
|
|
23
|
+
...i,
|
|
24
|
+
...f
|
|
25
|
+
}[g] === o;
|
|
26
|
+
}) ? [
|
|
27
|
+
...r,
|
|
28
|
+
d,
|
|
29
|
+
n
|
|
30
|
+
] : r;
|
|
31
|
+
}, []);
|
|
32
|
+
return N(e, x, b, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
33
|
+
}, j = C(
|
|
34
|
+
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
35
|
+
{
|
|
36
|
+
variants: {
|
|
37
|
+
variant: {
|
|
38
|
+
default: "bg-background text-foreground",
|
|
39
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
), w = v.forwardRef(
|
|
47
|
+
({ className: e, variant: a, ...t }, s) => /* @__PURE__ */ u("div", { ref: s, role: "alert", className: c(j({ variant: a }), e), ...t })
|
|
48
|
+
);
|
|
49
|
+
w.displayName = "Alert";
|
|
50
|
+
const O = v.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ u("h5", { ref: t, className: c("mb-1 font-medium leading-none tracking-tight", e), ...a }));
|
|
51
|
+
O.displayName = "AlertTitle";
|
|
52
|
+
const R = v.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ u("div", { ref: t, className: c("text-sm [&_p]:leading-relaxed", e), ...a }));
|
|
53
|
+
R.displayName = "AlertDescription";
|
|
54
|
+
export {
|
|
55
|
+
w as Alert,
|
|
56
|
+
R as AlertDescription,
|
|
57
|
+
O as AlertTitle
|
|
58
|
+
};
|
package/dist/helpers/index.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
|