tembro 2.0.1 → 2.0.2
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/CHANGELOG.md +8 -0
- package/dist/components/layout/app-sidebar.cjs +1 -1
- package/dist/components/layout/app-sidebar.d.ts +19 -1
- package/dist/components/layout/app-sidebar.js +253 -126
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +134 -134
- package/dist/showcase/package-meta.cjs +1 -1
- package/dist/showcase/package-meta.d.ts +3 -3
- package/dist/showcase/package-meta.js +1 -1
- package/dist/showcase/premium/app-shell/showcase.cjs +1 -1
- package/dist/showcase/premium/app-shell/showcase.js +5 -1
- package/dist/showcase/premium/app-sidebar/showcase.cjs +1 -1
- package/dist/showcase/premium/app-sidebar/showcase.js +91 -70
- package/dist/showcase/site-data.cjs +1 -1
- package/dist/showcase/site-data.js +1 -1
- package/dist/showcase/tembro-registry.json.cjs +1 -1
- package/dist/showcase/tembro-registry.json.js +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +1 -1
- package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +259 -21
- package/packages/cli/vendor/src/showcase/package-meta.ts +2 -2
- package/packages/cli/vendor/src/showcase/premium/app-shell/showcase.tsx +5 -1
- package/packages/cli/vendor/src/showcase/premium/app-sidebar/showcase.tsx +18 -4
- package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -1
- package/registry.json +1 -1
|
@@ -1,171 +1,192 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { cn as e } from "../../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../../../components/ui/button/index.js";
|
|
3
|
+
import { Badge as n } from "../../../components/ui/badge/index.js";
|
|
4
|
+
import { AppSidebar as r } from "../../../components/layout/app-sidebar.js";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { BarChart3Icon as a, CreditCardIcon as o, FolderIcon as s, HomeIcon as c, SettingsIcon as l } from "lucide-react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
8
|
//#region src/showcase/premium/app-sidebar/showcase.tsx
|
|
8
|
-
var
|
|
9
|
+
var f = [
|
|
9
10
|
{
|
|
10
11
|
key: "overview",
|
|
11
12
|
label: "Overview",
|
|
12
13
|
href: "/overview",
|
|
13
|
-
icon: /* @__PURE__ */
|
|
14
|
+
icon: /* @__PURE__ */ u(c, { className: "size-4" })
|
|
14
15
|
},
|
|
15
16
|
{
|
|
16
17
|
key: "projects",
|
|
17
18
|
label: "Projects",
|
|
18
19
|
href: "/projects",
|
|
19
|
-
icon: /* @__PURE__ */
|
|
20
|
+
icon: /* @__PURE__ */ u(s, { className: "size-4" }),
|
|
20
21
|
badge: "8"
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
24
|
key: "reports",
|
|
24
25
|
label: "Reports",
|
|
25
26
|
href: "/reports",
|
|
26
|
-
icon: /* @__PURE__ */
|
|
27
|
+
icon: /* @__PURE__ */ u(a, { className: "size-4" })
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
30
|
key: "billing",
|
|
30
31
|
label: "Billing",
|
|
31
32
|
href: "/billing",
|
|
32
|
-
icon: /* @__PURE__ */
|
|
33
|
+
icon: /* @__PURE__ */ u(o, { className: "size-4" }),
|
|
33
34
|
badge: "2"
|
|
34
35
|
},
|
|
35
36
|
{
|
|
36
37
|
key: "settings",
|
|
37
38
|
label: "Settings",
|
|
38
39
|
href: "/settings",
|
|
39
|
-
icon: /* @__PURE__ */ l
|
|
40
|
+
icon: /* @__PURE__ */ u(l, { className: "size-4" }),
|
|
40
41
|
disabled: !0
|
|
41
42
|
}
|
|
42
|
-
],
|
|
43
|
-
function
|
|
44
|
-
let [
|
|
43
|
+
], p = "rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5";
|
|
44
|
+
function m({ mode: a }) {
|
|
45
|
+
let [o, s] = i.useState("overview"), [c, l] = i.useState(a === "playground"), [m, h] = i.useState("desktop"), g = i.useMemo(() => f.map((e) => ({
|
|
45
46
|
...e,
|
|
46
|
-
active: e.key ===
|
|
47
|
-
onSelect: () =>
|
|
48
|
-
})), [
|
|
49
|
-
return /* @__PURE__ */
|
|
47
|
+
active: e.key === o,
|
|
48
|
+
onSelect: () => s(e.key)
|
|
49
|
+
})), [o]), _ = f.find((e) => e.key === o), v = m === "mobile";
|
|
50
|
+
return /* @__PURE__ */ d("div", {
|
|
50
51
|
className: "space-y-5",
|
|
51
52
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ u("section", {
|
|
53
54
|
className: "rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ d("div", {
|
|
55
56
|
className: "flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ d("div", {
|
|
57
58
|
className: "max-w-xl",
|
|
58
59
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ u("p", {
|
|
60
61
|
className: "text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted",
|
|
61
62
|
children: "Navigation shell"
|
|
62
63
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ u("h3", {
|
|
64
65
|
className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
|
|
65
66
|
children: "Sidebar should feel install-ready on its own"
|
|
66
67
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ u("p", {
|
|
68
69
|
className: "mt-3 max-w-lg text-sm leading-6 aui-text-muted",
|
|
69
70
|
children: "This preview keeps the focus on one reusable sidebar surface: identity, route items, badges, disabled states and collapsed behavior."
|
|
70
71
|
})
|
|
71
72
|
]
|
|
72
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ d("div", {
|
|
73
74
|
className: "flex flex-wrap gap-2",
|
|
74
75
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ u(n, {
|
|
76
77
|
variant: "outline",
|
|
77
78
|
className: "rounded-full",
|
|
78
79
|
children: "Header slot"
|
|
79
80
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ u(n, {
|
|
81
82
|
variant: "outline",
|
|
82
83
|
className: "rounded-full",
|
|
83
84
|
children: "Badges"
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ u(n, {
|
|
86
87
|
variant: "outline",
|
|
87
88
|
className: "rounded-full",
|
|
88
|
-
children: "
|
|
89
|
+
children: "Mobile drawer"
|
|
89
90
|
})
|
|
90
91
|
]
|
|
91
92
|
})]
|
|
92
93
|
})
|
|
93
94
|
}),
|
|
94
|
-
|
|
95
|
+
a === "playground" ? /* @__PURE__ */ d("div", {
|
|
95
96
|
className: "flex flex-wrap gap-3",
|
|
96
|
-
children: [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ u(t, {
|
|
99
|
+
size: "sm",
|
|
100
|
+
variant: c ? "outline" : "default",
|
|
101
|
+
onClick: () => l((e) => !e),
|
|
102
|
+
children: c ? "Expand sidebar" : "Collapse sidebar"
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ u(t, {
|
|
105
|
+
size: "sm",
|
|
106
|
+
variant: "outline",
|
|
107
|
+
onClick: () => s("reports"),
|
|
108
|
+
children: "Jump to reports"
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ u(t, {
|
|
111
|
+
size: "sm",
|
|
112
|
+
variant: v ? "default" : "outline",
|
|
113
|
+
onClick: () => h("mobile"),
|
|
114
|
+
children: "Mobile drawer"
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ u(t, {
|
|
117
|
+
size: "sm",
|
|
118
|
+
variant: v ? "outline" : "default",
|
|
119
|
+
onClick: () => h("desktop"),
|
|
120
|
+
children: "Desktop rail"
|
|
121
|
+
})
|
|
122
|
+
]
|
|
107
123
|
}) : null,
|
|
108
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ d("div", {
|
|
109
125
|
className: "grid gap-4 xl:grid-cols-[320px_minmax(0,1fr)]",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
-
className:
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
collapsed:
|
|
114
|
-
items:
|
|
115
|
-
|
|
126
|
+
children: [/* @__PURE__ */ u("section", {
|
|
127
|
+
className: e(p, v && "mx-auto w-full max-w-[420px]"),
|
|
128
|
+
children: /* @__PURE__ */ u(r, {
|
|
129
|
+
collapsed: c,
|
|
130
|
+
items: g,
|
|
131
|
+
responsive: !0,
|
|
132
|
+
mobileBreakpoint: v ? 1e4 : 0,
|
|
133
|
+
mobileTitle: "Workspace navigation",
|
|
134
|
+
mobileDescription: "Open routes, check badges, and move between sections from one compact drawer.",
|
|
135
|
+
mobileToggleLabel: "Open workspace menu",
|
|
136
|
+
header: /* @__PURE__ */ u("div", {
|
|
116
137
|
className: "px-3 py-2 text-sm font-semibold",
|
|
117
138
|
children: "Azamat Workspace"
|
|
118
139
|
}),
|
|
119
|
-
footer: /* @__PURE__ */
|
|
140
|
+
footer: /* @__PURE__ */ u("div", {
|
|
120
141
|
className: "aui-text-muted px-3 py-2 text-xs",
|
|
121
142
|
children: "Starter plan • 3 editors"
|
|
122
143
|
}),
|
|
123
144
|
className: "min-h-[440px] rounded-[22px] border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface)]"
|
|
124
145
|
})
|
|
125
|
-
}), /* @__PURE__ */
|
|
126
|
-
className:
|
|
146
|
+
}), /* @__PURE__ */ d("section", {
|
|
147
|
+
className: p,
|
|
127
148
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ u("p", {
|
|
129
150
|
className: "text-sm font-medium aui-text-muted",
|
|
130
151
|
children: "Current route"
|
|
131
152
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ u("p", {
|
|
133
154
|
className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
|
|
134
|
-
children:
|
|
155
|
+
children: _?.label ?? "Overview"
|
|
135
156
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ u("p", {
|
|
137
158
|
className: "mt-2 max-w-xl text-sm leading-6 aui-text-muted",
|
|
138
159
|
children: "Start with the sidebar itself as a stable navigation contract. Only after this feels right should the app introduce a bigger shell, page header, or route-level statistics around it."
|
|
139
160
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ d("div", {
|
|
141
162
|
className: "mt-6 grid gap-3 sm:grid-cols-3",
|
|
142
163
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ d("div", {
|
|
144
165
|
className: "rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ u("p", {
|
|
146
167
|
className: "text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
147
|
-
children: "
|
|
148
|
-
}), /* @__PURE__ */
|
|
168
|
+
children: "Shell"
|
|
169
|
+
}), /* @__PURE__ */ u("p", {
|
|
149
170
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
150
|
-
children:
|
|
171
|
+
children: v ? "Mobile drawer" : c ? "Collapsed" : "Expanded"
|
|
151
172
|
})]
|
|
152
173
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ d("div", {
|
|
154
175
|
className: "rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ u("p", {
|
|
156
177
|
className: "text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
157
178
|
children: "Visible items"
|
|
158
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ u("p", {
|
|
159
180
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
160
|
-
children:
|
|
181
|
+
children: g.length
|
|
161
182
|
})]
|
|
162
183
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ d("div", {
|
|
164
185
|
className: "rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ u("p", {
|
|
166
187
|
className: "text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted",
|
|
167
188
|
children: "Disabled"
|
|
168
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ u("p", {
|
|
169
190
|
className: "mt-2 text-lg font-semibold aui-text-strong",
|
|
170
191
|
children: "1 route"
|
|
171
192
|
})]
|
|
@@ -179,4 +200,4 @@ function p({ mode: i }) {
|
|
|
179
200
|
});
|
|
180
201
|
}
|
|
181
202
|
//#endregion
|
|
182
|
-
export {
|
|
203
|
+
export { m as AppSidebarShowcase };
|