@krosoft/react 0.0.11 → 0.0.13
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/core/index.d.ts +2 -0
- package/dist/components/core/index.d.ts.map +1 -0
- package/dist/components/core/states/ErrorState.d.ts +6 -0
- package/dist/components/core/states/ErrorState.d.ts.map +1 -0
- package/dist/components/core/states/index.d.ts +2 -0
- package/dist/components/core/states/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -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/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +79 -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 +36 -8
- 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/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorState.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/ErrorState.tsx"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,GAAI,aAAa,eAAe,KAAG,KAAK,CAAC,GAAG,CAAC,OAOnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/core/states/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,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,10 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
10
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,QAAA,MAAM,aAAa;;8EAelB,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAE/G,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAE1D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,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;AAC9D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { c as k, a as u } from "../../index-DxGGCUCL.js";
|
|
4
|
+
const b = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, y = k, x = (t, r) => (e) => {
|
|
5
|
+
var i;
|
|
6
|
+
if ((r == null ? void 0 : r.variants) == null) return y(t, e == null ? void 0 : e.class, e == null ? void 0 : e.className);
|
|
7
|
+
const { variants: f, defaultVariants: o } = r, N = Object.keys(f).map((a) => {
|
|
8
|
+
const n = e == null ? void 0 : e[a], d = o == null ? void 0 : o[a];
|
|
9
|
+
if (n === null) return null;
|
|
10
|
+
const s = b(n) || b(d);
|
|
11
|
+
return f[a][s];
|
|
12
|
+
}), m = e && Object.entries(e).reduce((a, n) => {
|
|
13
|
+
let [d, s] = n;
|
|
14
|
+
return s === void 0 || (a[d] = s), a;
|
|
15
|
+
}, {}), V = r == null || (i = r.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((a, n) => {
|
|
16
|
+
let { class: d, className: s, ...A } = n;
|
|
17
|
+
return Object.entries(A).every((h) => {
|
|
18
|
+
let [g, c] = h;
|
|
19
|
+
return Array.isArray(c) ? c.includes({
|
|
20
|
+
...o,
|
|
21
|
+
...m
|
|
22
|
+
}[g]) : {
|
|
23
|
+
...o,
|
|
24
|
+
...m
|
|
25
|
+
}[g] === c;
|
|
26
|
+
}) ? [
|
|
27
|
+
...a,
|
|
28
|
+
d,
|
|
29
|
+
s
|
|
30
|
+
] : a;
|
|
31
|
+
}, []);
|
|
32
|
+
return y(t, N, V, e == null ? void 0 : e.class, e == null ? void 0 : e.className);
|
|
33
|
+
}, C = x(
|
|
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
|
+
), j = v.forwardRef(
|
|
47
|
+
({ className: t, variant: r, ...e }, i) => /* @__PURE__ */ l("div", { ref: i, role: "alert", className: u(C({ variant: r }), t), ...e })
|
|
48
|
+
);
|
|
49
|
+
j.displayName = "Alert";
|
|
50
|
+
const w = v.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ l("h5", { ref: e, className: u("mb-1 font-medium leading-none tracking-tight", t), ...r }));
|
|
51
|
+
w.displayName = "AlertTitle";
|
|
52
|
+
const O = v.forwardRef(({ className: t, ...r }, e) => /* @__PURE__ */ l("div", { ref: e, className: u("text-sm [&_p]:leading-relaxed", t), ...r }));
|
|
53
|
+
O.displayName = "AlertDescription";
|
|
54
|
+
const R = x(
|
|
55
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
56
|
+
{
|
|
57
|
+
variants: {
|
|
58
|
+
variant: {
|
|
59
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
60
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
61
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
62
|
+
outline: "text-foreground"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
variant: "default"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
function D({ className: t, variant: r, ...e }) {
|
|
71
|
+
return /* @__PURE__ */ l("div", { className: u(R({ variant: r }), t), ...e });
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
j as Alert,
|
|
75
|
+
O as AlertDescription,
|
|
76
|
+
w as AlertTitle,
|
|
77
|
+
D as Badge,
|
|
78
|
+
R as badgeVariants
|
|
79
|
+
};
|
package/dist/helpers/index.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
|