shadcn-theme-menu 1.1.47 → 1.1.48
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 +16 -10
- package/dist/sidebar-user-menu.js +2 -2
- package/package.json +3 -2
- package/src/sidebar-user-menu.tsx +7 -0
- package/src/themes-shadcn.css +12 -12
package/README.md
CHANGED
|
@@ -5,24 +5,24 @@
|
|
|
5
5
|
<img src="https://img.shields.io/discord/1110227955554209923.svg?label=Chat&logo=Discord&colorB=7289da&style=flat"
|
|
6
6
|
alt="Join Discord" />
|
|
7
7
|
</a>
|
|
8
|
-
<a href="https://github.com/OpenSourceAGI/
|
|
9
|
-
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/OpenSourceAGI/
|
|
10
|
-
<a href="https://github.com/OpenSourceAGI/
|
|
8
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions">
|
|
9
|
+
<img alt="GitHub Stars" src="https://img.shields.io/github/stars/OpenSourceAGI/dev-tools-starter-agent" /></a>
|
|
10
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions">
|
|
11
11
|
<img alt="GitHub Discussions"
|
|
12
|
-
src="https://img.shields.io/github/discussions/OpenSourceAGI/
|
|
12
|
+
src="https://img.shields.io/github/discussions/OpenSourceAGI/dev-tools-starter-agent" />
|
|
13
13
|
</a>
|
|
14
14
|
<br />
|
|
15
|
-
<a href="https://github.com/OpenSourceAGI/
|
|
16
|
-
<img src="https://img.shields.io/github/commit-activity/m/OpenSourceAGI/
|
|
15
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/pulse" alt="Activity">
|
|
16
|
+
<img src="https://img.shields.io/github/commit-activity/m/OpenSourceAGI/dev-tools-starter-agent" />
|
|
17
17
|
</a>
|
|
18
|
-
<img src="https://img.shields.io/github/last-commit/OpenSourceAGI/
|
|
18
|
+
<img src="https://img.shields.io/github/last-commit/OpenSourceAGI/dev-tools-starter-agent.svg" alt="GitHub last commit" />
|
|
19
19
|
<br />
|
|
20
20
|
<img src="https://img.shields.io/badge/Next.js-16-black" alt="Next.js" />
|
|
21
21
|
<a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request">
|
|
22
22
|
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"
|
|
23
23
|
alt="PRs Welcome" />
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://codespaces.new/OpenSourceAGI/
|
|
25
|
+
<a href="https://codespaces.new/OpenSourceAGI/dev-tools-starter-agent">
|
|
26
26
|
<img src="https://github.com/codespaces/badge.svg" width="150" height="20" />
|
|
27
27
|
</a>
|
|
28
28
|
</p>
|
|
@@ -227,7 +227,10 @@ import type { ThemeProviderProps } from "shadcn-theme-menu";
|
|
|
227
227
|
|
|
228
228
|
## Demo
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
An interactive page in [`demo/`](./demo) exercises every export against this
|
|
231
|
+
package's source — the theme gallery, the per-theme fonts, all four switchers
|
|
232
|
+
wired to their callbacks, injected `Button`/`DropdownMenu` primitives, and the
|
|
233
|
+
shadcn dashboard block re-themed end to end.
|
|
231
234
|
|
|
232
235
|
```bash
|
|
233
236
|
pnpm demo
|
|
@@ -238,9 +241,12 @@ Or manually:
|
|
|
238
241
|
```bash
|
|
239
242
|
cd demo
|
|
240
243
|
pnpm install
|
|
241
|
-
pnpm dev
|
|
244
|
+
pnpm dev # http://localhost:3001
|
|
242
245
|
```
|
|
243
246
|
|
|
247
|
+
See [`demo/README.md`](./demo/README.md) for what each section covers and for
|
|
248
|
+
the Vite/Tailwind wiring that lets a demo consume the package from source.
|
|
249
|
+
|
|
244
250
|
---
|
|
245
251
|
|
|
246
252
|
[](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
|
|
@@ -29,7 +29,7 @@ function A({ user: y, onSignOut: A } = {}) {
|
|
|
29
29
|
}, B = () => {
|
|
30
30
|
I && (d.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${M}`), L(null));
|
|
31
31
|
}, V = j.name?.split(" ").map((e) => e[0]).join("").toUpperCase().substring(0, 2) || "GU";
|
|
32
|
-
return /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b(h, { children: /* @__PURE__ */ x(e, {
|
|
32
|
+
return P ? /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b(h, { children: /* @__PURE__ */ x(e, {
|
|
33
33
|
onOpenChange: (e) => !e && B(),
|
|
34
34
|
children: [/* @__PURE__ */ b(c, {
|
|
35
35
|
asChild: !0,
|
|
@@ -143,7 +143,7 @@ function A({ user: y, onSignOut: A } = {}) {
|
|
|
143
143
|
})
|
|
144
144
|
]
|
|
145
145
|
})]
|
|
146
|
-
}) }) });
|
|
146
|
+
}) }) }) : null;
|
|
147
147
|
}
|
|
148
148
|
//#endregion
|
|
149
149
|
export { A as SidebarUserMenu };
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-theme-menu",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.48",
|
|
4
4
|
"description": "A collection of beautiful shadcn/ui theme components with dynamic theme switching and animations",
|
|
5
5
|
"author": "vtempest",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/OpenSourceAGI/dev-tools-starter-agent
|
|
9
|
+
"url": "git+https://github.com/OpenSourceAGI/dev-tools-starter-agent.git",
|
|
10
|
+
"directory": "packages/shadcn-theme-menu"
|
|
10
11
|
},
|
|
11
12
|
"homepage": "https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/shadcn-theme-menu",
|
|
12
13
|
"main": "./dist/index.js",
|
|
@@ -86,6 +86,13 @@ export function SidebarUserMenu({ user: userProp, onSignOut }: SidebarUserMenuPr
|
|
|
86
86
|
.toUpperCase()
|
|
87
87
|
.substring(0, 2) || "GU"
|
|
88
88
|
|
|
89
|
+
// The stored color theme is only readable on the client, so — like every other
|
|
90
|
+
// switcher in this package — hold the menu back until after mount rather than
|
|
91
|
+
// render a checkmark the server could not have known about.
|
|
92
|
+
if (!mounted) {
|
|
93
|
+
return null
|
|
94
|
+
}
|
|
95
|
+
|
|
89
96
|
return (
|
|
90
97
|
<SidebarMenu>
|
|
91
98
|
<SidebarMenuItem>
|
package/src/themes-shadcn.css
CHANGED
|
@@ -81,7 +81,7 @@ html[class*="theme-"] body {
|
|
|
81
81
|
--sidebar-border: #e5e7eb;
|
|
82
82
|
--sidebar-ring: #3b82f6;
|
|
83
83
|
--font-sans: Inter, sans-serif;
|
|
84
|
-
--font-serif: Source Serif 4, serif;
|
|
84
|
+
--font-serif: "Source Serif 4", serif;
|
|
85
85
|
--font-mono: JetBrains Mono, monospace;
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -120,7 +120,7 @@ html[class*="theme-"] body {
|
|
|
120
120
|
--sidebar-border: #404040;
|
|
121
121
|
--sidebar-ring: #3b82f6;
|
|
122
122
|
--font-sans: Inter, sans-serif;
|
|
123
|
-
--font-serif: Source Serif 4, serif;
|
|
123
|
+
--font-serif: "Source Serif 4", serif;
|
|
124
124
|
--font-mono: JetBrains Mono, monospace;
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -1010,7 +1010,7 @@ html[class*="theme-"] body {
|
|
|
1010
1010
|
--sidebar-border: #e5e0d4;
|
|
1011
1011
|
--sidebar-ring: #9db18c;
|
|
1012
1012
|
--font-sans: Merriweather, serif;
|
|
1013
|
-
--font-serif: Source Serif 4, serif;
|
|
1013
|
+
--font-serif: "Source Serif 4", serif;
|
|
1014
1014
|
--font-mono: JetBrains Mono, monospace;
|
|
1015
1015
|
--radius: 0.425rem;
|
|
1016
1016
|
--shadow-color: hsl(88 22% 35% / 0.15);
|
|
@@ -1055,7 +1055,7 @@ html[class*="theme-"] body {
|
|
|
1055
1055
|
--sidebar-border: #5a5345;
|
|
1056
1056
|
--sidebar-ring: #8a9f7b;
|
|
1057
1057
|
--font-sans: Merriweather, serif;
|
|
1058
|
-
--font-serif: Source Serif 4, serif;
|
|
1058
|
+
--font-serif: "Source Serif 4", serif;
|
|
1059
1059
|
--font-mono: JetBrains Mono, monospace;
|
|
1060
1060
|
}
|
|
1061
1061
|
|
|
@@ -1177,7 +1177,7 @@ html[class*="theme-"] body {
|
|
|
1177
1177
|
--sidebar-border: #e5e7eb;
|
|
1178
1178
|
--sidebar-ring: #e05d38;
|
|
1179
1179
|
--font-sans: Inter, sans-serif;
|
|
1180
|
-
--font-serif: Source Serif 4, serif;
|
|
1180
|
+
--font-serif: "Source Serif 4", serif;
|
|
1181
1181
|
--font-mono: JetBrains Mono, monospace;
|
|
1182
1182
|
--radius: 0.75rem;
|
|
1183
1183
|
--shadow-color: hsl(0 0% 0%);
|
|
@@ -1222,7 +1222,7 @@ html[class*="theme-"] body {
|
|
|
1222
1222
|
--sidebar-border: #3d4354;
|
|
1223
1223
|
--sidebar-ring: #e05d38;
|
|
1224
1224
|
--font-sans: Inter, sans-serif;
|
|
1225
|
-
--font-serif: Source Serif 4, serif;
|
|
1225
|
+
--font-serif: "Source Serif 4", serif;
|
|
1226
1226
|
--font-mono: JetBrains Mono, monospace;
|
|
1227
1227
|
}
|
|
1228
1228
|
|
|
@@ -1590,7 +1590,7 @@ html[class*="theme-"] body {
|
|
|
1590
1590
|
--sidebar-border: #e5e7eb;
|
|
1591
1591
|
--sidebar-ring: #f59e0b;
|
|
1592
1592
|
--font-sans: Inter, sans-serif;
|
|
1593
|
-
--font-serif: Source Serif 4, serif;
|
|
1593
|
+
--font-serif: "Source Serif 4", serif;
|
|
1594
1594
|
--font-mono: JetBrains Mono, monospace;
|
|
1595
1595
|
--radius: 0.375rem;
|
|
1596
1596
|
--shadow-color: hsl(0 0% 0%);
|
|
@@ -1637,7 +1637,7 @@ html[class*="theme-"] body {
|
|
|
1637
1637
|
--sidebar-border: #404040;
|
|
1638
1638
|
--sidebar-ring: #f59e0b;
|
|
1639
1639
|
--font-sans: Inter, sans-serif;
|
|
1640
|
-
--font-serif: Source Serif 4, serif;
|
|
1640
|
+
--font-serif: "Source Serif 4", serif;
|
|
1641
1641
|
--font-mono: JetBrains Mono, monospace;
|
|
1642
1642
|
}
|
|
1643
1643
|
|
|
@@ -2094,7 +2094,7 @@ html[class*="theme-"] body {
|
|
|
2094
2094
|
--sidebar-border: #e9d8fd;
|
|
2095
2095
|
--sidebar-ring: #a78bfa;
|
|
2096
2096
|
--font-sans: Open Sans, sans-serif;
|
|
2097
|
-
--font-serif: Source Serif 4, serif;
|
|
2097
|
+
--font-serif: "Source Serif 4", serif;
|
|
2098
2098
|
--font-mono: IBM Plex Mono, monospace;
|
|
2099
2099
|
--shadow-color: hsl(0 0% 0%);
|
|
2100
2100
|
--shadow-opacity: 0.08;
|
|
@@ -2139,7 +2139,7 @@ html[class*="theme-"] body {
|
|
|
2139
2139
|
--sidebar-border: #3f324a;
|
|
2140
2140
|
--sidebar-ring: #c0aafd;
|
|
2141
2141
|
--font-sans: Open Sans, sans-serif;
|
|
2142
|
-
--font-serif: Source Serif 4, serif;
|
|
2142
|
+
--font-serif: "Source Serif 4", serif;
|
|
2143
2143
|
--font-mono: IBM Plex Mono, monospace;
|
|
2144
2144
|
}
|
|
2145
2145
|
|
|
@@ -2660,7 +2660,7 @@ html[class*="theme-"] body {
|
|
|
2660
2660
|
--sidebar-border: #d4d4d4;
|
|
2661
2661
|
--sidebar-ring: #34a85a;
|
|
2662
2662
|
--font-sans: Plus Jakarta Sans, sans-serif;
|
|
2663
|
-
--font-serif: Source Serif 4, serif;
|
|
2663
|
+
--font-serif: "Source Serif 4", serif;
|
|
2664
2664
|
--font-mono: JetBrains Mono, monospace;
|
|
2665
2665
|
}
|
|
2666
2666
|
|
|
@@ -2699,7 +2699,7 @@ html[class*="theme-"] body {
|
|
|
2699
2699
|
--sidebar-border: #444444;
|
|
2700
2700
|
--sidebar-ring: #34a85a;
|
|
2701
2701
|
--font-sans: Plus Jakarta Sans, sans-serif;
|
|
2702
|
-
--font-serif: Source Serif 4, serif;
|
|
2702
|
+
--font-serif: "Source Serif 4", serif;
|
|
2703
2703
|
--font-mono: JetBrains Mono, monospace;
|
|
2704
2704
|
}
|
|
2705
2705
|
|