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.
@@ -1,171 +1,192 @@
1
- import { Button as e } from "../../../components/ui/button/index.js";
2
- import { Badge as t } from "../../../components/ui/badge/index.js";
3
- import { AppSidebar as n } from "../../../components/layout/app-sidebar.js";
4
- import * as r from "react";
5
- import { BarChart3Icon as i, CreditCardIcon as a, FolderIcon as o, HomeIcon as s, SettingsIcon as c } from "lucide-react";
6
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
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 d = [
9
+ var f = [
9
10
  {
10
11
  key: "overview",
11
12
  label: "Overview",
12
13
  href: "/overview",
13
- icon: /* @__PURE__ */ l(s, { className: "size-4" })
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__ */ l(o, { className: "size-4" }),
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__ */ l(i, { className: "size-4" })
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__ */ l(a, { className: "size-4" }),
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(c, { className: "size-4" }),
40
+ icon: /* @__PURE__ */ u(l, { className: "size-4" }),
40
41
  disabled: !0
41
42
  }
42
- ], f = "rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5";
43
- function p({ mode: i }) {
44
- let [a, o] = r.useState("overview"), [s, c] = r.useState(i === "playground"), p = r.useMemo(() => d.map((e) => ({
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 === a,
47
- onSelect: () => o(e.key)
48
- })), [a]), m = d.find((e) => e.key === a);
49
- return /* @__PURE__ */ u("div", {
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__ */ l("section", {
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__ */ u("div", {
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__ */ u("div", {
57
+ children: [/* @__PURE__ */ d("div", {
57
58
  className: "max-w-xl",
58
59
  children: [
59
- /* @__PURE__ */ l("p", {
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__ */ l("h3", {
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__ */ l("p", {
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__ */ u("div", {
73
+ }), /* @__PURE__ */ d("div", {
73
74
  className: "flex flex-wrap gap-2",
74
75
  children: [
75
- /* @__PURE__ */ l(t, {
76
+ /* @__PURE__ */ u(n, {
76
77
  variant: "outline",
77
78
  className: "rounded-full",
78
79
  children: "Header slot"
79
80
  }),
80
- /* @__PURE__ */ l(t, {
81
+ /* @__PURE__ */ u(n, {
81
82
  variant: "outline",
82
83
  className: "rounded-full",
83
84
  children: "Badges"
84
85
  }),
85
- /* @__PURE__ */ l(t, {
86
+ /* @__PURE__ */ u(n, {
86
87
  variant: "outline",
87
88
  className: "rounded-full",
88
- children: "Collapsed rail"
89
+ children: "Mobile drawer"
89
90
  })
90
91
  ]
91
92
  })]
92
93
  })
93
94
  }),
94
- i === "playground" ? /* @__PURE__ */ u("div", {
95
+ a === "playground" ? /* @__PURE__ */ d("div", {
95
96
  className: "flex flex-wrap gap-3",
96
- children: [/* @__PURE__ */ l(e, {
97
- size: "sm",
98
- variant: s ? "outline" : "default",
99
- onClick: () => c((e) => !e),
100
- children: s ? "Expand sidebar" : "Collapse sidebar"
101
- }), /* @__PURE__ */ l(e, {
102
- size: "sm",
103
- variant: "outline",
104
- onClick: () => o("reports"),
105
- children: "Jump to reports"
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__ */ u("div", {
124
+ /* @__PURE__ */ d("div", {
109
125
  className: "grid gap-4 xl:grid-cols-[320px_minmax(0,1fr)]",
110
- children: [/* @__PURE__ */ l("section", {
111
- className: f,
112
- children: /* @__PURE__ */ l(n, {
113
- collapsed: s,
114
- items: p,
115
- header: /* @__PURE__ */ l("div", {
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__ */ l("div", {
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__ */ u("section", {
126
- className: f,
146
+ }), /* @__PURE__ */ d("section", {
147
+ className: p,
127
148
  children: [
128
- /* @__PURE__ */ l("p", {
149
+ /* @__PURE__ */ u("p", {
129
150
  className: "text-sm font-medium aui-text-muted",
130
151
  children: "Current route"
131
152
  }),
132
- /* @__PURE__ */ l("p", {
153
+ /* @__PURE__ */ u("p", {
133
154
  className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
134
- children: m?.label ?? "Overview"
155
+ children: _?.label ?? "Overview"
135
156
  }),
136
- /* @__PURE__ */ l("p", {
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__ */ u("div", {
161
+ /* @__PURE__ */ d("div", {
141
162
  className: "mt-6 grid gap-3 sm:grid-cols-3",
142
163
  children: [
143
- /* @__PURE__ */ u("div", {
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__ */ l("p", {
166
+ children: [/* @__PURE__ */ u("p", {
146
167
  className: "text-[11px] font-semibold uppercase tracking-[0.24em] aui-text-muted",
147
- children: "Mode"
148
- }), /* @__PURE__ */ l("p", {
168
+ children: "Shell"
169
+ }), /* @__PURE__ */ u("p", {
149
170
  className: "mt-2 text-lg font-semibold aui-text-strong",
150
- children: s ? "Collapsed" : "Expanded"
171
+ children: v ? "Mobile drawer" : c ? "Collapsed" : "Expanded"
151
172
  })]
152
173
  }),
153
- /* @__PURE__ */ u("div", {
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__ */ l("p", {
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__ */ l("p", {
179
+ }), /* @__PURE__ */ u("p", {
159
180
  className: "mt-2 text-lg font-semibold aui-text-strong",
160
- children: p.length
181
+ children: g.length
161
182
  })]
162
183
  }),
163
- /* @__PURE__ */ u("div", {
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__ */ l("p", {
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__ */ l("p", {
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 { p as AppSidebarShowcase };
203
+ export { m as AppSidebarShowcase };