react-shadcn-kit 0.0.1 → 0.0.3
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/README.md +6 -6
- package/dist/assets/global.css +1 -1
- package/dist/atoms/chart.d.ts +12 -2
- package/dist/atoms/chart.js +35 -35
- package/dist/atoms/sidebar.d.ts +2 -1
- package/dist/atoms/sidebar.js +44 -42
- package/dist/config/blog-layout.config.js +19 -0
- package/dist/config/default-Sidebar.js +83 -0
- package/dist/config/default-layout.js +21 -0
- package/dist/config/default-navigation.js +3 -82
- package/dist/config/sidebar.config.js +11 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +348 -341
- package/dist/layouts/blog-layout.d.ts +7 -0
- package/dist/layouts/blog-layout.js +29 -0
- package/dist/layouts/default-layout.d.ts +7 -0
- package/dist/layouts/default-layout.js +54 -0
- package/dist/layouts/sidebar-scroll-layout.d.ts +8 -0
- package/dist/layouts/sidebar-scroll-layout.js +49 -0
- package/dist/molecules/theme-toggle.d.ts +9 -0
- package/dist/molecules/theme-toggle.js +30 -0
- package/dist/molecules/user-menu.d.ts +18 -0
- package/dist/molecules/user-menu.js +29 -0
- package/dist/{molecules → organisms}/app-navbar.d.ts +4 -2
- package/dist/organisms/app-navbar.js +89 -0
- package/dist/{molecules → organisms}/app-sidebar.d.ts +4 -1
- package/dist/organisms/app-sidebar.js +169 -0
- package/package.json +33 -10
- package/dist/molecules/app-navbar.js +0 -117
- package/dist/molecules/app-sidebar.js +0 -121
- package/dist/organisms/layout.d.ts +0 -3
- package/dist/organisms/layout.js +0 -16
package/dist/atoms/chart.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as s, jsxs as f, Fragment as P } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as v from "react";
|
|
3
3
|
import * as _ from "recharts";
|
|
4
4
|
import { cn as l } from "../lib/utils.js";
|
|
5
|
-
const T = { light: "", dark: ".dark" },
|
|
6
|
-
function
|
|
7
|
-
const c =
|
|
5
|
+
const T = { light: "", dark: ".dark" }, j = v.createContext(null);
|
|
6
|
+
function y() {
|
|
7
|
+
const c = v.useContext(j);
|
|
8
8
|
if (!c)
|
|
9
9
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
10
10
|
return c;
|
|
@@ -13,11 +13,11 @@ function K({
|
|
|
13
13
|
id: c,
|
|
14
14
|
className: e,
|
|
15
15
|
children: n,
|
|
16
|
-
config:
|
|
16
|
+
config: t,
|
|
17
17
|
...a
|
|
18
18
|
}) {
|
|
19
|
-
const d =
|
|
20
|
-
return /* @__PURE__ */ s(
|
|
19
|
+
const d = v.useId(), o = `chart-${c || d.replace(/:/g, "")}`;
|
|
20
|
+
return /* @__PURE__ */ s(j.Provider, { value: { config: t }, children: /* @__PURE__ */ f(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"data-slot": "chart",
|
|
@@ -28,23 +28,23 @@ function K({
|
|
|
28
28
|
),
|
|
29
29
|
...a,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */ s(I, { id: o, config:
|
|
31
|
+
/* @__PURE__ */ s(I, { id: o, config: t }),
|
|
32
32
|
/* @__PURE__ */ s(_.ResponsiveContainer, { children: n })
|
|
33
33
|
]
|
|
34
34
|
}
|
|
35
35
|
) });
|
|
36
36
|
}
|
|
37
37
|
const I = ({ id: c, config: e }) => {
|
|
38
|
-
const n = Object.entries(e).filter(([,
|
|
38
|
+
const n = Object.entries(e).filter(([, t]) => t.theme || t.color);
|
|
39
39
|
return n.length ? /* @__PURE__ */ s(
|
|
40
40
|
"style",
|
|
41
41
|
{
|
|
42
42
|
dangerouslySetInnerHTML: {
|
|
43
43
|
__html: Object.entries(T).map(
|
|
44
|
-
([
|
|
44
|
+
([t, a]) => `
|
|
45
45
|
${a} [data-chart=${c}] {
|
|
46
46
|
${n.map(([d, o]) => {
|
|
47
|
-
const i = o.theme?.[
|
|
47
|
+
const i = o.theme?.[t] || o.color;
|
|
48
48
|
return i ? ` --color-${d}: ${i};` : null;
|
|
49
49
|
}).join(`
|
|
50
50
|
`)}
|
|
@@ -60,7 +60,7 @@ function R({
|
|
|
60
60
|
active: c,
|
|
61
61
|
payload: e,
|
|
62
62
|
className: n,
|
|
63
|
-
indicator:
|
|
63
|
+
indicator: t = "dot",
|
|
64
64
|
hideLabel: a = !1,
|
|
65
65
|
hideIndicator: d = !1,
|
|
66
66
|
label: o,
|
|
@@ -69,17 +69,17 @@ function R({
|
|
|
69
69
|
formatter: k,
|
|
70
70
|
color: $,
|
|
71
71
|
nameKey: L,
|
|
72
|
-
labelKey:
|
|
72
|
+
labelKey: p
|
|
73
73
|
}) {
|
|
74
|
-
const { config: g } =
|
|
74
|
+
const { config: g } = y(), w = v.useMemo(() => {
|
|
75
75
|
if (a || !e?.length)
|
|
76
76
|
return null;
|
|
77
|
-
const [
|
|
77
|
+
const [r] = e, x = `${p || r?.dataKey || r?.name || "value"}`, b = C(g, r, x), h = !p && typeof o == "string" ? g[o]?.label || o : b?.label;
|
|
78
78
|
return i ? /* @__PURE__ */ s("div", { className: l("font-medium", u), children: i(h, e) }) : h ? /* @__PURE__ */ s("div", { className: l("font-medium", u), children: h }) : null;
|
|
79
|
-
}, [o, i, e, a, u, g,
|
|
79
|
+
}, [o, i, e, a, u, g, p]);
|
|
80
80
|
if (!c || !e?.length)
|
|
81
81
|
return null;
|
|
82
|
-
const m = e.length === 1 &&
|
|
82
|
+
const m = e.length === 1 && t !== "dot";
|
|
83
83
|
return /* @__PURE__ */ f(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
@@ -89,31 +89,31 @@ function R({
|
|
|
89
89
|
),
|
|
90
90
|
children: [
|
|
91
91
|
m ? null : w,
|
|
92
|
-
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: e.filter((
|
|
93
|
-
const b = `${L ||
|
|
92
|
+
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: e.filter((r) => r.type !== "none").map((r, x) => {
|
|
93
|
+
const b = `${L || r.name || r.dataKey || "value"}`, h = C(g, r, b), N = $ || r.payload?.fill || r.color;
|
|
94
94
|
return /* @__PURE__ */ s(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
className: l(
|
|
98
98
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
99
|
-
|
|
99
|
+
t === "dot" && "items-center"
|
|
100
100
|
),
|
|
101
|
-
children: k &&
|
|
101
|
+
children: k && r?.value !== void 0 && r.name ? k(r.value, r.name, r, x, e) : /* @__PURE__ */ f(P, { children: [
|
|
102
102
|
h?.icon ? /* @__PURE__ */ s(h.icon, {}) : !d && /* @__PURE__ */ s(
|
|
103
103
|
"div",
|
|
104
104
|
{
|
|
105
105
|
className: l(
|
|
106
106
|
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
107
107
|
{
|
|
108
|
-
"h-2.5 w-2.5":
|
|
109
|
-
"w-1":
|
|
110
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
111
|
-
"my-0.5": m &&
|
|
108
|
+
"h-2.5 w-2.5": t === "dot",
|
|
109
|
+
"w-1": t === "line",
|
|
110
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": t === "dashed",
|
|
111
|
+
"my-0.5": m && t === "dashed"
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
114
|
style: {
|
|
115
|
-
"--color-bg":
|
|
116
|
-
"--color-border":
|
|
115
|
+
"--color-bg": N,
|
|
116
|
+
"--color-border": N
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
),
|
|
@@ -127,15 +127,15 @@ function R({
|
|
|
127
127
|
children: [
|
|
128
128
|
/* @__PURE__ */ f("div", { className: "grid gap-1.5", children: [
|
|
129
129
|
m ? w : null,
|
|
130
|
-
/* @__PURE__ */ s("span", { className: "text-muted-foreground", children: h?.label ||
|
|
130
|
+
/* @__PURE__ */ s("span", { className: "text-muted-foreground", children: h?.label || r.name })
|
|
131
131
|
] }),
|
|
132
|
-
|
|
132
|
+
r.value && /* @__PURE__ */ s("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof r.value == "number" ? r.value.toLocaleString() : r.value })
|
|
133
133
|
]
|
|
134
134
|
}
|
|
135
135
|
)
|
|
136
136
|
] })
|
|
137
137
|
},
|
|
138
|
-
|
|
138
|
+
r.dataKey
|
|
139
139
|
);
|
|
140
140
|
}) })
|
|
141
141
|
]
|
|
@@ -147,16 +147,16 @@ function O({
|
|
|
147
147
|
className: c,
|
|
148
148
|
hideIcon: e = !1,
|
|
149
149
|
payload: n,
|
|
150
|
-
verticalAlign:
|
|
150
|
+
verticalAlign: t = "bottom",
|
|
151
151
|
nameKey: a
|
|
152
152
|
}) {
|
|
153
|
-
const { config: d } =
|
|
153
|
+
const { config: d } = y();
|
|
154
154
|
return n?.length ? /* @__PURE__ */ s(
|
|
155
155
|
"div",
|
|
156
156
|
{
|
|
157
157
|
className: l(
|
|
158
158
|
"flex items-center justify-center gap-4",
|
|
159
|
-
|
|
159
|
+
t === "top" ? "pb-3" : "pt-3",
|
|
160
160
|
c
|
|
161
161
|
),
|
|
162
162
|
children: n.filter((o) => o.type !== "none").map((o) => {
|
|
@@ -189,9 +189,9 @@ function O({
|
|
|
189
189
|
function C(c, e, n) {
|
|
190
190
|
if (typeof e != "object" || e === null)
|
|
191
191
|
return;
|
|
192
|
-
const
|
|
192
|
+
const t = "payload" in e && typeof e.payload == "object" && e.payload !== null ? e.payload : void 0;
|
|
193
193
|
let a = n;
|
|
194
|
-
return n in e && typeof e[n] == "string" ? a = e[n] :
|
|
194
|
+
return n in e && typeof e[n] == "string" ? a = e[n] : t && n in t && typeof t[n] == "string" && (a = t[n]), a in c ? c[a] : c[n];
|
|
195
195
|
}
|
|
196
196
|
export {
|
|
197
197
|
K as ChartContainer,
|
package/dist/atoms/sidebar.d.ts
CHANGED
|
@@ -19,10 +19,11 @@ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: se
|
|
|
19
19
|
open?: boolean;
|
|
20
20
|
onOpenChange?: (open: boolean) => void;
|
|
21
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<"div"> & {
|
|
22
|
+
declare function Sidebar({ side, variant, collapsible, className, children, scrollable, ...props }: React.ComponentProps<"div"> & {
|
|
23
23
|
side?: "left" | "right";
|
|
24
24
|
variant?: "sidebar" | "floating" | "inset";
|
|
25
25
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
26
|
+
scrollable?: boolean;
|
|
26
27
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
28
29
|
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/sidebar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { Slot as
|
|
3
|
+
import { Slot as v } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as M } from "class-variance-authority";
|
|
5
5
|
import { PanelLeftIcon as z } from "lucide-react";
|
|
6
6
|
import { useIsMobile as I } from "../hooks/use-mobile.js";
|
|
@@ -24,33 +24,33 @@ function de({
|
|
|
24
24
|
onOpenChange: i,
|
|
25
25
|
className: o,
|
|
26
26
|
style: n,
|
|
27
|
-
children:
|
|
28
|
-
...
|
|
27
|
+
children: p,
|
|
28
|
+
...b
|
|
29
29
|
}) {
|
|
30
|
-
const l = I(), [f,
|
|
30
|
+
const l = I(), [f, c] = s.useState(!1), [m, _] = s.useState(a), h = e ?? m, x = s.useCallback(
|
|
31
31
|
(d) => {
|
|
32
|
-
const
|
|
33
|
-
i ? i(
|
|
32
|
+
const u = typeof d == "function" ? d(h) : d;
|
|
33
|
+
i ? i(u) : _(u), document.cookie = `${W}=${u}; path=/; max-age=${$}`;
|
|
34
34
|
},
|
|
35
|
-
[i,
|
|
36
|
-
), w = s.useCallback(() => l ?
|
|
35
|
+
[i, h]
|
|
36
|
+
), w = s.useCallback(() => l ? c((d) => !d) : x((d) => !d), [l, x, c]);
|
|
37
37
|
s.useEffect(() => {
|
|
38
|
-
const d = (
|
|
39
|
-
|
|
38
|
+
const d = (u) => {
|
|
39
|
+
u.key === F && (u.metaKey || u.ctrlKey) && (u.preventDefault(), w());
|
|
40
40
|
};
|
|
41
41
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
42
42
|
}, [w]);
|
|
43
|
-
const N =
|
|
43
|
+
const N = h ? "expanded" : "collapsed", k = s.useMemo(
|
|
44
44
|
() => ({
|
|
45
45
|
state: N,
|
|
46
|
-
open:
|
|
46
|
+
open: h,
|
|
47
47
|
setOpen: x,
|
|
48
48
|
isMobile: l,
|
|
49
49
|
openMobile: f,
|
|
50
|
-
setOpenMobile:
|
|
50
|
+
setOpenMobile: c,
|
|
51
51
|
toggleSidebar: w
|
|
52
52
|
}),
|
|
53
|
-
[N,
|
|
53
|
+
[N, h, x, l, f, c, w]
|
|
54
54
|
);
|
|
55
55
|
return /* @__PURE__ */ t(C.Provider, { value: k, children: /* @__PURE__ */ t(L, { delayDuration: 0, children: /* @__PURE__ */ t(
|
|
56
56
|
"div",
|
|
@@ -65,8 +65,8 @@ function de({
|
|
|
65
65
|
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
66
66
|
o
|
|
67
67
|
),
|
|
68
|
-
...
|
|
69
|
-
children:
|
|
68
|
+
...b,
|
|
69
|
+
children: p
|
|
70
70
|
}
|
|
71
71
|
) }) });
|
|
72
72
|
}
|
|
@@ -76,9 +76,10 @@ function se({
|
|
|
76
76
|
collapsible: i = "offcanvas",
|
|
77
77
|
className: o,
|
|
78
78
|
children: n,
|
|
79
|
-
|
|
79
|
+
scrollable: p = !1,
|
|
80
|
+
...b
|
|
80
81
|
}) {
|
|
81
|
-
const { isMobile:
|
|
82
|
+
const { isMobile: l, state: f, openMobile: c, setOpenMobile: m } = S();
|
|
82
83
|
return i === "none" ? /* @__PURE__ */ t(
|
|
83
84
|
"div",
|
|
84
85
|
{
|
|
@@ -87,10 +88,10 @@ function se({
|
|
|
87
88
|
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
88
89
|
o
|
|
89
90
|
),
|
|
90
|
-
...
|
|
91
|
+
...b,
|
|
91
92
|
children: n
|
|
92
93
|
}
|
|
93
|
-
) :
|
|
94
|
+
) : l ? /* @__PURE__ */ t(B, { open: c, onOpenChange: m, ...b, children: /* @__PURE__ */ g(
|
|
94
95
|
A,
|
|
95
96
|
{
|
|
96
97
|
"data-sidebar": "sidebar",
|
|
@@ -102,19 +103,19 @@ function se({
|
|
|
102
103
|
},
|
|
103
104
|
side: a,
|
|
104
105
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ g(O, { className: "sr-only", children: [
|
|
106
107
|
/* @__PURE__ */ t(R, { children: "Sidebar" }),
|
|
107
108
|
/* @__PURE__ */ t(H, { children: "Displays the mobile sidebar." })
|
|
108
109
|
] }),
|
|
109
110
|
/* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col", children: n })
|
|
110
111
|
]
|
|
111
112
|
}
|
|
112
|
-
) }) : /* @__PURE__ */
|
|
113
|
+
) }) : /* @__PURE__ */ g(
|
|
113
114
|
"div",
|
|
114
115
|
{
|
|
115
116
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
116
|
-
"data-state":
|
|
117
|
-
"data-collapsible":
|
|
117
|
+
"data-state": f,
|
|
118
|
+
"data-collapsible": f === "collapsed" ? i : "",
|
|
118
119
|
"data-variant": e,
|
|
119
120
|
"data-side": a,
|
|
120
121
|
"data-slot": "sidebar",
|
|
@@ -136,13 +137,14 @@ function se({
|
|
|
136
137
|
{
|
|
137
138
|
"data-slot": "sidebar-container",
|
|
138
139
|
className: r(
|
|
139
|
-
"
|
|
140
|
+
"inset-y-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
141
|
+
p ? "relative h-full" : "fixed h-svh",
|
|
140
142
|
a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
141
143
|
// Adjust the padding for floating and inset variants.
|
|
142
144
|
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
143
145
|
o
|
|
144
146
|
),
|
|
145
|
-
...
|
|
147
|
+
...b,
|
|
146
148
|
children: /* @__PURE__ */ t(
|
|
147
149
|
"div",
|
|
148
150
|
{
|
|
@@ -160,7 +162,7 @@ function se({
|
|
|
160
162
|
}
|
|
161
163
|
function le({ className: a, onClick: e, ...i }) {
|
|
162
164
|
const { toggleSidebar: o } = S();
|
|
163
|
-
return /* @__PURE__ */
|
|
165
|
+
return /* @__PURE__ */ g(
|
|
164
166
|
E,
|
|
165
167
|
{
|
|
166
168
|
"data-sidebar": "trigger",
|
|
@@ -292,7 +294,7 @@ function ve({
|
|
|
292
294
|
...i
|
|
293
295
|
}) {
|
|
294
296
|
return /* @__PURE__ */ t(
|
|
295
|
-
e ?
|
|
297
|
+
e ? v : "div",
|
|
296
298
|
{
|
|
297
299
|
"data-slot": "sidebar-group-label",
|
|
298
300
|
"data-sidebar": "group-label",
|
|
@@ -311,7 +313,7 @@ function xe({
|
|
|
311
313
|
...i
|
|
312
314
|
}) {
|
|
313
315
|
return /* @__PURE__ */ t(
|
|
314
|
-
e ?
|
|
316
|
+
e ? v : "button",
|
|
315
317
|
{
|
|
316
318
|
"data-slot": "sidebar-group-action",
|
|
317
319
|
"data-sidebar": "group-action",
|
|
@@ -385,34 +387,34 @@ function ye({
|
|
|
385
387
|
variant: i = "default",
|
|
386
388
|
size: o = "default",
|
|
387
389
|
tooltip: n,
|
|
388
|
-
className:
|
|
389
|
-
...
|
|
390
|
+
className: p,
|
|
391
|
+
...b
|
|
390
392
|
}) {
|
|
391
|
-
const l = a ?
|
|
393
|
+
const l = a ? v : "button", { isMobile: f, state: c } = S(), m = /* @__PURE__ */ t(
|
|
392
394
|
l,
|
|
393
395
|
{
|
|
394
396
|
"data-slot": "sidebar-menu-button",
|
|
395
397
|
"data-sidebar": "menu-button",
|
|
396
398
|
"data-size": o,
|
|
397
399
|
"data-active": e,
|
|
398
|
-
className: r(U({ variant: i, size: o }),
|
|
399
|
-
...
|
|
400
|
+
className: r(U({ variant: i, size: o }), p),
|
|
401
|
+
...b
|
|
400
402
|
}
|
|
401
403
|
);
|
|
402
404
|
return n ? (typeof n == "string" && (n = {
|
|
403
405
|
children: n
|
|
404
|
-
}), /* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */ t(j, { asChild: !0, children:
|
|
406
|
+
}), /* @__PURE__ */ g(K, { children: [
|
|
407
|
+
/* @__PURE__ */ t(j, { asChild: !0, children: m }),
|
|
406
408
|
/* @__PURE__ */ t(
|
|
407
409
|
G,
|
|
408
410
|
{
|
|
409
411
|
side: "right",
|
|
410
412
|
align: "center",
|
|
411
|
-
hidden:
|
|
413
|
+
hidden: c !== "collapsed" || f,
|
|
412
414
|
...n
|
|
413
415
|
}
|
|
414
416
|
)
|
|
415
|
-
] })) :
|
|
417
|
+
] })) : m;
|
|
416
418
|
}
|
|
417
419
|
function Ce({
|
|
418
420
|
className: a,
|
|
@@ -421,7 +423,7 @@ function Ce({
|
|
|
421
423
|
...o
|
|
422
424
|
}) {
|
|
423
425
|
return /* @__PURE__ */ t(
|
|
424
|
-
e ?
|
|
426
|
+
e ? v : "button",
|
|
425
427
|
{
|
|
426
428
|
"data-slot": "sidebar-menu-action",
|
|
427
429
|
"data-sidebar": "menu-action",
|
|
@@ -467,7 +469,7 @@ function ke({
|
|
|
467
469
|
const [o, n] = s.useState("50%");
|
|
468
470
|
return s.useEffect(() => {
|
|
469
471
|
n(`${Math.floor(Math.random() * 40) + 50}%`);
|
|
470
|
-
}, []), /* @__PURE__ */
|
|
472
|
+
}, []), /* @__PURE__ */ g(
|
|
471
473
|
"div",
|
|
472
474
|
{
|
|
473
475
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -524,7 +526,7 @@ function Ie({
|
|
|
524
526
|
...n
|
|
525
527
|
}) {
|
|
526
528
|
return /* @__PURE__ */ t(
|
|
527
|
-
a ?
|
|
529
|
+
a ? v : "a",
|
|
528
530
|
{
|
|
529
531
|
"data-slot": "sidebar-menu-sub-button",
|
|
530
532
|
"data-sidebar": "menu-sub-button",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defaultSidebarConfig as i } from "./default-Sidebar.js";
|
|
2
|
+
const e = {
|
|
3
|
+
...i,
|
|
4
|
+
variant: "sidebar",
|
|
5
|
+
collapsible: "icon",
|
|
6
|
+
header: void 0,
|
|
7
|
+
// No header for blog layout
|
|
8
|
+
branding: {
|
|
9
|
+
...i.branding,
|
|
10
|
+
name: "My Blog"
|
|
11
|
+
},
|
|
12
|
+
style: {
|
|
13
|
+
"--sidebar-width": "18rem",
|
|
14
|
+
"--sidebar-width-mobile": "100%"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as blogLayoutConfig
|
|
19
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { LayoutDashboard as t, Users as e, Settings as a, BarChart as l, Folder as r } from "lucide-react";
|
|
2
|
+
const i = {
|
|
3
|
+
groups: [
|
|
4
|
+
{
|
|
5
|
+
label: "Platform",
|
|
6
|
+
items: [
|
|
7
|
+
{
|
|
8
|
+
label: "Dashboard",
|
|
9
|
+
href: "/dashboard",
|
|
10
|
+
icon: t,
|
|
11
|
+
isActive: !0
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: "Analytics",
|
|
15
|
+
href: "/analytics",
|
|
16
|
+
icon: l
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Settings",
|
|
20
|
+
href: "/settings",
|
|
21
|
+
icon: a,
|
|
22
|
+
items: [
|
|
23
|
+
{
|
|
24
|
+
label: "General",
|
|
25
|
+
href: "/settings/general"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "Security",
|
|
29
|
+
href: "/settings/security"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Projects",
|
|
37
|
+
items: [
|
|
38
|
+
{
|
|
39
|
+
label: "All Projects",
|
|
40
|
+
href: "/projects",
|
|
41
|
+
icon: r
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: "Team",
|
|
45
|
+
href: "/team",
|
|
46
|
+
icon: e
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
user: {
|
|
52
|
+
name: "John Doe",
|
|
53
|
+
email: "john@example.com",
|
|
54
|
+
avatar: "https://github.com/shadcn.png"
|
|
55
|
+
},
|
|
56
|
+
branding: {
|
|
57
|
+
name: "Acme Inc",
|
|
58
|
+
logo: t,
|
|
59
|
+
href: "/"
|
|
60
|
+
},
|
|
61
|
+
userMenuItems: [
|
|
62
|
+
{
|
|
63
|
+
label: "Profile",
|
|
64
|
+
href: "/profile",
|
|
65
|
+
icon: e
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: "Settings",
|
|
69
|
+
href: "/settings",
|
|
70
|
+
icon: a
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Log out",
|
|
74
|
+
href: "/logout",
|
|
75
|
+
icon: e
|
|
76
|
+
// Using Users as placeholder for LogOut since we need to import it
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
fixed: !0
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
i as defaultSidebarConfig
|
|
83
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
sidebar: {
|
|
3
|
+
visible: !0,
|
|
4
|
+
placement: "left",
|
|
5
|
+
color: "#fff",
|
|
6
|
+
transparent: !1,
|
|
7
|
+
hasBranding: !0,
|
|
8
|
+
width: "250px"
|
|
9
|
+
},
|
|
10
|
+
navbar: {
|
|
11
|
+
visible: !0,
|
|
12
|
+
height: "60px",
|
|
13
|
+
transparent: !1,
|
|
14
|
+
showBranding: !0,
|
|
15
|
+
position: "top",
|
|
16
|
+
shadow: !0
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
t as defaultLayoutConfig
|
|
21
|
+
};
|
|
@@ -1,83 +1,5 @@
|
|
|
1
|
-
import { Users as e, Settings as t
|
|
2
|
-
const
|
|
3
|
-
groups: [
|
|
4
|
-
{
|
|
5
|
-
label: "Platform",
|
|
6
|
-
items: [
|
|
7
|
-
{
|
|
8
|
-
label: "Dashboard",
|
|
9
|
-
href: "/dashboard",
|
|
10
|
-
icon: a,
|
|
11
|
-
isActive: !0
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
label: "Analytics",
|
|
15
|
-
href: "/analytics",
|
|
16
|
-
icon: o
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: "Settings",
|
|
20
|
-
href: "/settings",
|
|
21
|
-
icon: t,
|
|
22
|
-
items: [
|
|
23
|
-
{
|
|
24
|
-
label: "General",
|
|
25
|
-
href: "/settings/general"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
label: "Security",
|
|
29
|
-
href: "/settings/security"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: "Projects",
|
|
37
|
-
items: [
|
|
38
|
-
{
|
|
39
|
-
label: "All Projects",
|
|
40
|
-
href: "/projects",
|
|
41
|
-
icon: l
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: "Team",
|
|
45
|
-
href: "/team",
|
|
46
|
-
icon: e
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
user: {
|
|
52
|
-
name: "John Doe",
|
|
53
|
-
email: "john@example.com",
|
|
54
|
-
avatar: "https://github.com/shadcn.png"
|
|
55
|
-
},
|
|
56
|
-
branding: {
|
|
57
|
-
name: "Acme Inc",
|
|
58
|
-
logo: a,
|
|
59
|
-
href: "/"
|
|
60
|
-
},
|
|
61
|
-
userMenuItems: [
|
|
62
|
-
{
|
|
63
|
-
label: "Profile",
|
|
64
|
-
href: "/profile",
|
|
65
|
-
icon: e
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
label: "Settings",
|
|
69
|
-
href: "/settings",
|
|
70
|
-
icon: t
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
label: "Log out",
|
|
74
|
-
href: "/logout",
|
|
75
|
-
icon: e
|
|
76
|
-
// Using Users as placeholder for LogOut since we need to import it
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
fixed: !1
|
|
80
|
-
}, i = {
|
|
1
|
+
import { Users as e, Settings as t } from "lucide-react";
|
|
2
|
+
const a = {
|
|
81
3
|
items: [
|
|
82
4
|
{
|
|
83
5
|
label: "Overview",
|
|
@@ -131,6 +53,5 @@ const r = {
|
|
|
131
53
|
]
|
|
132
54
|
};
|
|
133
55
|
export {
|
|
134
|
-
|
|
135
|
-
r as defaultSidebarConfig
|
|
56
|
+
a as defaultNavbarConfig
|
|
136
57
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './organisms/app-sidebar';
|
|
2
|
+
export * from './organisms/app-navbar';
|
|
3
3
|
export * from './types/navigation';
|
|
4
4
|
export * from './config/default-navigation';
|
|
5
|
+
export * from './config/default-layout';
|
|
6
|
+
export { default as DefaultLayout } from './layouts/default-layout';
|
|
7
|
+
export { default as BlogLayout } from './layouts/blog-layout';
|
|
8
|
+
export { default as SidebarScrollLayout } from './layouts/sidebar-scroll-layout';
|
|
5
9
|
export * from './atoms/accordion';
|
|
6
10
|
export * from './atoms/alert-dialog';
|
|
7
11
|
export * from './atoms/alert';
|