@tydavidson/design-system 1.1.17 → 1.1.18
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/index.js +77 -274
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -274
- package/dist/index.mjs.map +1 -1
- package/dist/themes/index.js +73 -228
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/index.mjs +73 -228
- package/dist/themes/index.mjs.map +1 -1
- package/docs/theme-usage.md +191 -542
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var clsx = require('clsx');
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
5
3
|
var React2 = require('react');
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
7
|
-
var iconsReact = require('@tabler/icons-react');
|
8
4
|
var reactSlot = require('@radix-ui/react-slot');
|
9
5
|
var classVarianceAuthority = require('class-variance-authority');
|
6
|
+
var clsx = require('clsx');
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
10
9
|
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
10
|
+
var iconsReact = require('@tabler/icons-react');
|
11
11
|
var TogglePrimitive = require('@radix-ui/react-toggle');
|
12
12
|
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
13
13
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
@@ -47,15 +47,7 @@ var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
47
47
|
var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(CollapsiblePrimitive);
|
48
48
|
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
49
49
|
|
50
|
-
|
51
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
52
|
-
var __esm = (fn, res) => function __init() {
|
53
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
54
|
-
};
|
55
|
-
var __export = (target, all) => {
|
56
|
-
for (var name in all)
|
57
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
58
|
-
};
|
50
|
+
// src/components/ui/button.tsx
|
59
51
|
function cn(...inputs) {
|
60
52
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
61
53
|
}
|
@@ -71,213 +63,6 @@ function filterDOMProps(props, propNames) {
|
|
71
63
|
propNames.forEach((name) => delete result[name]);
|
72
64
|
return result;
|
73
65
|
}
|
74
|
-
var init_utils = __esm({
|
75
|
-
"src/lib/utils.ts"() {
|
76
|
-
}
|
77
|
-
});
|
78
|
-
function useThemeServer() {
|
79
|
-
return {
|
80
|
-
theme: "system",
|
81
|
-
setTheme: (theme) => {
|
82
|
-
},
|
83
|
-
resolvedTheme: "light",
|
84
|
-
isDark: false
|
85
|
-
};
|
86
|
-
}
|
87
|
-
function useTheme() {
|
88
|
-
const [themeData, setThemeData] = React2__namespace.useState({
|
89
|
-
theme: "system",
|
90
|
-
setTheme: (theme) => {
|
91
|
-
},
|
92
|
-
resolvedTheme: "light",
|
93
|
-
isDark: false
|
94
|
-
});
|
95
|
-
const [mounted, setMounted] = React2__namespace.useState(false);
|
96
|
-
React2__namespace.useEffect(() => {
|
97
|
-
if (typeof window === "undefined") return;
|
98
|
-
import('next-themes').then((nextThemes) => {
|
99
|
-
const themeManager = {
|
100
|
-
getTheme: () => {
|
101
|
-
if (typeof window !== "undefined") {
|
102
|
-
const savedTheme = localStorage.getItem("theme");
|
103
|
-
if (savedTheme) return savedTheme;
|
104
|
-
if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
105
|
-
return "dark";
|
106
|
-
}
|
107
|
-
}
|
108
|
-
return "light";
|
109
|
-
},
|
110
|
-
setTheme: (theme) => {
|
111
|
-
if (typeof window !== "undefined") {
|
112
|
-
localStorage.setItem("theme", theme);
|
113
|
-
document.documentElement.classList.toggle("dark", theme === "dark");
|
114
|
-
setThemeData((prev) => ({
|
115
|
-
...prev,
|
116
|
-
theme,
|
117
|
-
resolvedTheme: theme,
|
118
|
-
isDark: theme === "dark"
|
119
|
-
}));
|
120
|
-
}
|
121
|
-
}
|
122
|
-
};
|
123
|
-
const currentTheme = themeManager.getTheme();
|
124
|
-
const isDark = currentTheme === "dark";
|
125
|
-
setThemeData({
|
126
|
-
theme: currentTheme,
|
127
|
-
setTheme: themeManager.setTheme,
|
128
|
-
resolvedTheme: currentTheme,
|
129
|
-
isDark
|
130
|
-
});
|
131
|
-
setMounted(true);
|
132
|
-
});
|
133
|
-
}, []);
|
134
|
-
return themeData;
|
135
|
-
}
|
136
|
-
var init_theme_context = __esm({
|
137
|
-
"src/themes/theme-context.tsx"() {
|
138
|
-
"use client";
|
139
|
-
}
|
140
|
-
});
|
141
|
-
function ThemeToggle({
|
142
|
-
className,
|
143
|
-
variant = "icon",
|
144
|
-
size = "md",
|
145
|
-
...props
|
146
|
-
}) {
|
147
|
-
if (typeof window === "undefined") {
|
148
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
149
|
-
"button",
|
150
|
-
{
|
151
|
-
type: "button",
|
152
|
-
className: cn(
|
153
|
-
"inline-flex items-center justify-center rounded-md border border-input bg-background",
|
154
|
-
size === "sm" ? "h-8 w-8" : size === "lg" ? "h-12 w-12" : "h-10 w-10",
|
155
|
-
className
|
156
|
-
),
|
157
|
-
"aria-label": "Toggle theme",
|
158
|
-
...props,
|
159
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconSun, { size: size === "sm" ? 16 : size === "lg" ? 24 : 20, stroke: 1.5 })
|
160
|
-
}
|
161
|
-
);
|
162
|
-
}
|
163
|
-
const { theme, setTheme, resolvedTheme } = useTheme();
|
164
|
-
const [mounted, setMounted] = React2__namespace.useState(false);
|
165
|
-
React2__namespace.useEffect(() => {
|
166
|
-
setMounted(true);
|
167
|
-
}, []);
|
168
|
-
if (!mounted) {
|
169
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
170
|
-
"button",
|
171
|
-
{
|
172
|
-
type: "button",
|
173
|
-
className: cn(
|
174
|
-
"inline-flex items-center justify-center rounded-md border border-input bg-background",
|
175
|
-
size === "sm" ? "h-8 w-8" : size === "lg" ? "h-12 w-12" : "h-10 w-10",
|
176
|
-
className
|
177
|
-
),
|
178
|
-
"aria-label": "Toggle theme",
|
179
|
-
...props,
|
180
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconSun, { size: size === "sm" ? 16 : size === "lg" ? 24 : 20, stroke: 1.5 })
|
181
|
-
}
|
182
|
-
);
|
183
|
-
}
|
184
|
-
const toggleTheme = () => {
|
185
|
-
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
186
|
-
};
|
187
|
-
const iconSize = {
|
188
|
-
sm: 16,
|
189
|
-
md: 20,
|
190
|
-
lg: 24
|
191
|
-
};
|
192
|
-
const sizeClasses = {
|
193
|
-
sm: "h-8 w-8",
|
194
|
-
md: "h-10 w-10",
|
195
|
-
lg: "h-12 w-12"
|
196
|
-
};
|
197
|
-
const textSizeClasses = {
|
198
|
-
sm: "text-xs",
|
199
|
-
md: "text-sm",
|
200
|
-
lg: "text-base"
|
201
|
-
};
|
202
|
-
if (variant === "icon") {
|
203
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
204
|
-
"button",
|
205
|
-
{
|
206
|
-
type: "button",
|
207
|
-
onClick: toggleTheme,
|
208
|
-
className: cn(
|
209
|
-
"inline-flex items-center justify-center rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
210
|
-
sizeClasses[size],
|
211
|
-
className
|
212
|
-
),
|
213
|
-
"aria-label": "Toggle theme",
|
214
|
-
...props,
|
215
|
-
children: resolvedTheme === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconSun, { size: iconSize[size], stroke: 1.5 }) : /* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconMoon, { size: iconSize[size], stroke: 1.5 })
|
216
|
-
}
|
217
|
-
);
|
218
|
-
}
|
219
|
-
if (variant === "button") {
|
220
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
221
|
-
"button",
|
222
|
-
{
|
223
|
-
type: "button",
|
224
|
-
onClick: toggleTheme,
|
225
|
-
className: cn(
|
226
|
-
"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2",
|
227
|
-
textSizeClasses[size],
|
228
|
-
"hover:bg-accent hover:text-accent-foreground",
|
229
|
-
className
|
230
|
-
),
|
231
|
-
"aria-label": "Toggle theme",
|
232
|
-
...props,
|
233
|
-
children: resolvedTheme === "dark" ? "Light Mode" : "Dark Mode"
|
234
|
-
}
|
235
|
-
);
|
236
|
-
}
|
237
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
238
|
-
"button",
|
239
|
-
{
|
240
|
-
type: "button",
|
241
|
-
onClick: toggleTheme,
|
242
|
-
className: cn(
|
243
|
-
"inline-flex items-center justify-center rounded-md px-3 py-2 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
244
|
-
textSizeClasses[size],
|
245
|
-
resolvedTheme === "dark" ? "bg-accent text-accent-foreground hover:bg-accent/80" : "bg-muted text-muted-foreground hover:bg-muted/80",
|
246
|
-
className
|
247
|
-
),
|
248
|
-
"aria-label": "Toggle theme",
|
249
|
-
...props,
|
250
|
-
children: resolvedTheme === "dark" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center", children: [
|
251
|
-
/* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconSun, { size: iconSize[size], stroke: 1.5, className: "mr-2" }),
|
252
|
-
"Light"
|
253
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center", children: [
|
254
|
-
/* @__PURE__ */ jsxRuntime.jsx(iconsReact.IconMoon, { size: iconSize[size], stroke: 1.5, className: "mr-2" }),
|
255
|
-
"Dark"
|
256
|
-
] })
|
257
|
-
}
|
258
|
-
);
|
259
|
-
}
|
260
|
-
var init_theme_toggle = __esm({
|
261
|
-
"src/components/ui/theme-toggle/theme-toggle.tsx"() {
|
262
|
-
"use client";
|
263
|
-
init_theme_context();
|
264
|
-
init_utils();
|
265
|
-
}
|
266
|
-
});
|
267
|
-
|
268
|
-
// src/components/ui/theme-toggle/index.ts
|
269
|
-
var theme_toggle_exports = {};
|
270
|
-
__export(theme_toggle_exports, {
|
271
|
-
ThemeToggle: () => ThemeToggle
|
272
|
-
});
|
273
|
-
var init_theme_toggle2 = __esm({
|
274
|
-
"src/components/ui/theme-toggle/index.ts"() {
|
275
|
-
init_theme_toggle();
|
276
|
-
}
|
277
|
-
});
|
278
|
-
|
279
|
-
// src/components/ui/button.tsx
|
280
|
-
init_utils();
|
281
66
|
var buttonVariants = classVarianceAuthority.cva(
|
282
67
|
"float-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[4px] text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
283
68
|
{
|
@@ -382,9 +167,6 @@ var Button = React2__namespace.forwardRef(
|
|
382
167
|
}
|
383
168
|
);
|
384
169
|
Button.displayName = "Button";
|
385
|
-
|
386
|
-
// src/components/ui/dropdown-menu/dropdown-menu.tsx
|
387
|
-
init_utils();
|
388
170
|
var DropdownMenuRoot = DropdownMenuPrimitive__namespace.Root;
|
389
171
|
var DropdownMenuTrigger = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
390
172
|
DropdownMenuPrimitive__namespace.Trigger,
|
@@ -566,9 +348,6 @@ var DropdownMenu = {
|
|
566
348
|
SubContent: DropdownMenuSubContent,
|
567
349
|
SubTrigger: DropdownMenuSubTrigger
|
568
350
|
};
|
569
|
-
|
570
|
-
// src/components/typography/heading/heading.tsx
|
571
|
-
init_utils();
|
572
351
|
var Heading = React2__namespace.forwardRef(
|
573
352
|
({
|
574
353
|
level = 1,
|
@@ -637,9 +416,6 @@ var Heading = React2__namespace.forwardRef(
|
|
637
416
|
}
|
638
417
|
);
|
639
418
|
Heading.displayName = "Heading";
|
640
|
-
|
641
|
-
// src/components/typography/text/text.tsx
|
642
|
-
init_utils();
|
643
419
|
var Text = React2__namespace.forwardRef(
|
644
420
|
({
|
645
421
|
size = "md",
|
@@ -692,9 +468,6 @@ var Text = React2__namespace.forwardRef(
|
|
692
468
|
}
|
693
469
|
);
|
694
470
|
Text.displayName = "Text";
|
695
|
-
|
696
|
-
// src/components/ui/toggle.tsx
|
697
|
-
init_utils();
|
698
471
|
var Toggle = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
699
472
|
TogglePrimitive__namespace.Root,
|
700
473
|
{
|
@@ -707,9 +480,6 @@ var Toggle = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
707
480
|
}
|
708
481
|
));
|
709
482
|
Toggle.displayName = TogglePrimitive__namespace.Root.displayName;
|
710
|
-
|
711
|
-
// src/components/ui/toggle-group.tsx
|
712
|
-
init_utils();
|
713
483
|
var ToggleGroup = React2__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
714
484
|
ToggleGroupPrimitive__namespace.Root,
|
715
485
|
{
|
@@ -732,9 +502,6 @@ var ToggleGroupItem = React2__namespace.forwardRef(({ className, ...props }, ref
|
|
732
502
|
}
|
733
503
|
));
|
734
504
|
ToggleGroupItem.displayName = ToggleGroupPrimitive__namespace.Item.displayName;
|
735
|
-
|
736
|
-
// src/components/ui/slider.tsx
|
737
|
-
init_utils();
|
738
505
|
var Slider = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
739
506
|
SliderPrimitive__namespace.Root,
|
740
507
|
{
|
@@ -751,9 +518,6 @@ var Slider = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
751
518
|
}
|
752
519
|
));
|
753
520
|
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
754
|
-
|
755
|
-
// src/components/ui/popover.tsx
|
756
|
-
init_utils();
|
757
521
|
var Popover = PopoverPrimitive__namespace.Root;
|
758
522
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
759
523
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
@@ -771,9 +535,6 @@ var PopoverContent = React2__namespace.forwardRef(({ className, align = "center"
|
|
771
535
|
}
|
772
536
|
) }));
|
773
537
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
774
|
-
|
775
|
-
// src/components/ui/hover-card.tsx
|
776
|
-
init_utils();
|
777
538
|
var HoverCard = HoverCardPrimitive__namespace.Root;
|
778
539
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
779
540
|
var HoverCardContent = React2__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -790,9 +551,6 @@ var HoverCardContent = React2__namespace.forwardRef(({ className, align = "cente
|
|
790
551
|
}
|
791
552
|
));
|
792
553
|
HoverCardContent.displayName = HoverCardPrimitive__namespace.Content.displayName;
|
793
|
-
|
794
|
-
// src/components/ui/sheet.tsx
|
795
|
-
init_utils();
|
796
554
|
var Sheet = SheetPrimitive__namespace.Root;
|
797
555
|
var SheetTrigger = SheetPrimitive__namespace.Trigger;
|
798
556
|
var SheetClose = SheetPrimitive__namespace.Close;
|
@@ -886,12 +644,6 @@ var SheetDescription = React2__namespace.forwardRef(({ className, ...props }, re
|
|
886
644
|
}
|
887
645
|
));
|
888
646
|
SheetDescription.displayName = SheetPrimitive__namespace.Description.displayName;
|
889
|
-
|
890
|
-
// src/components/ui/command.tsx
|
891
|
-
init_utils();
|
892
|
-
|
893
|
-
// src/components/ui/dialog.tsx
|
894
|
-
init_utils();
|
895
647
|
var Dialog = SheetPrimitive__namespace.Root;
|
896
648
|
var DialogTrigger = SheetPrimitive__namespace.Trigger;
|
897
649
|
var DialogPortal = SheetPrimitive__namespace.Portal;
|
@@ -1079,9 +831,6 @@ CommandShortcut.displayName = "CommandShortcut";
|
|
1079
831
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
1080
832
|
var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
1081
833
|
var CollapsibleContent2 = CollapsiblePrimitive__namespace.CollapsibleContent;
|
1082
|
-
|
1083
|
-
// src/components/ui/context-menu.tsx
|
1084
|
-
init_utils();
|
1085
834
|
var ContextMenu = ContextMenuPrimitive__namespace.Root;
|
1086
835
|
var ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
|
1087
836
|
var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
|
@@ -1501,9 +1250,6 @@ var EmailFooter = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { styl
|
|
1501
1250
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "SoHo, New York" })
|
1502
1251
|
] })
|
1503
1252
|
] }) });
|
1504
|
-
|
1505
|
-
// src/components/ui/card.tsx
|
1506
|
-
init_utils();
|
1507
1253
|
var Card = React2__namespace.forwardRef(
|
1508
1254
|
({ className, variant = "default", ...props }, ref) => {
|
1509
1255
|
const variantClasses = {
|
@@ -1586,9 +1332,6 @@ var CardFooter = React2__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
1586
1332
|
}
|
1587
1333
|
));
|
1588
1334
|
CardFooter.displayName = "CardFooter";
|
1589
|
-
|
1590
|
-
// src/components/ui/input.tsx
|
1591
|
-
init_utils();
|
1592
1335
|
var Input = React2__namespace.forwardRef(
|
1593
1336
|
({ className, type, ...props }, ref) => {
|
1594
1337
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -1611,9 +1354,6 @@ var Input = React2__namespace.forwardRef(
|
|
1611
1354
|
);
|
1612
1355
|
Input.displayName = "Input";
|
1613
1356
|
|
1614
|
-
// src/index.ts
|
1615
|
-
init_utils();
|
1616
|
-
|
1617
1357
|
// src/tokens/colors.ts
|
1618
1358
|
var colors = {
|
1619
1359
|
// Base colors
|
@@ -1940,14 +1680,25 @@ function ClientThemeProvider({
|
|
1940
1680
|
}
|
1941
1681
|
function ClientThemeToggle(props) {
|
1942
1682
|
const [mounted, setMounted] = React2__namespace.useState(false);
|
1943
|
-
const [
|
1683
|
+
const [isDark, setIsDark] = React2__namespace.useState(false);
|
1944
1684
|
React2__namespace.useEffect(() => {
|
1945
1685
|
setMounted(true);
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1686
|
+
if (typeof window !== "undefined") {
|
1687
|
+
const savedTheme = localStorage.getItem("theme");
|
1688
|
+
const systemPrefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
1689
|
+
const currentTheme = savedTheme || (systemPrefersDark ? "dark" : "light");
|
1690
|
+
setIsDark(currentTheme === "dark");
|
1691
|
+
}
|
1949
1692
|
}, []);
|
1950
|
-
|
1693
|
+
const toggleTheme = () => {
|
1694
|
+
if (typeof window !== "undefined") {
|
1695
|
+
const newTheme = isDark ? "light" : "dark";
|
1696
|
+
localStorage.setItem("theme", newTheme);
|
1697
|
+
document.documentElement.classList.toggle("dark", newTheme === "dark");
|
1698
|
+
setIsDark(newTheme === "dark");
|
1699
|
+
}
|
1700
|
+
};
|
1701
|
+
if (!mounted) {
|
1951
1702
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
1952
1703
|
"button",
|
1953
1704
|
{
|
@@ -1982,11 +1733,63 @@ function ClientThemeToggle(props) {
|
|
1982
1733
|
}
|
1983
1734
|
);
|
1984
1735
|
}
|
1985
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
1736
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
1737
|
+
"button",
|
1738
|
+
{
|
1739
|
+
type: "button",
|
1740
|
+
onClick: toggleTheme,
|
1741
|
+
className: "inline-flex items-center justify-center rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground h-10 w-10",
|
1742
|
+
"aria-label": "Toggle theme",
|
1743
|
+
...props,
|
1744
|
+
children: isDark ? /* @__PURE__ */ jsxRuntime.jsxs(
|
1745
|
+
"svg",
|
1746
|
+
{
|
1747
|
+
width: "20",
|
1748
|
+
height: "20",
|
1749
|
+
viewBox: "0 0 24 24",
|
1750
|
+
fill: "none",
|
1751
|
+
stroke: "currentColor",
|
1752
|
+
strokeWidth: "2",
|
1753
|
+
strokeLinecap: "round",
|
1754
|
+
strokeLinejoin: "round",
|
1755
|
+
children: [
|
1756
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
1757
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2v2" }),
|
1758
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 20v2" }),
|
1759
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m4.93 4.93 1.41 1.41" }),
|
1760
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m17.66 17.66 1.41 1.41" }),
|
1761
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 12h2" }),
|
1762
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 12h2" }),
|
1763
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6.34 17.66-1.41 1.41" }),
|
1764
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m19.07 4.93-1.41 1.41" })
|
1765
|
+
]
|
1766
|
+
}
|
1767
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
1768
|
+
"svg",
|
1769
|
+
{
|
1770
|
+
width: "20",
|
1771
|
+
height: "20",
|
1772
|
+
viewBox: "0 0 24 24",
|
1773
|
+
fill: "none",
|
1774
|
+
stroke: "currentColor",
|
1775
|
+
strokeWidth: "2",
|
1776
|
+
strokeLinecap: "round",
|
1777
|
+
strokeLinejoin: "round",
|
1778
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" })
|
1779
|
+
}
|
1780
|
+
)
|
1781
|
+
}
|
1782
|
+
);
|
1783
|
+
}
|
1784
|
+
function useThemeServer() {
|
1785
|
+
return {
|
1786
|
+
theme: "system",
|
1787
|
+
setTheme: (theme) => {
|
1788
|
+
},
|
1789
|
+
resolvedTheme: "light",
|
1790
|
+
isDark: false
|
1791
|
+
};
|
1986
1792
|
}
|
1987
|
-
|
1988
|
-
// src/themes/index.ts
|
1989
|
-
init_theme_context();
|
1990
1793
|
|
1991
1794
|
// src/lib/theme-utils.ts
|
1992
1795
|
var mapColorToShadcnVariant = (color) => {
|