@ichaingo/theme-toggle 1.3.72 → 1.3.73
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.d.ts.map +1 -1
- package/dist/index.js +11 -14
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAiClC"}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { twMerge as o } from "tailwind-merge";
|
|
4
|
-
import { Sun as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
n(s);
|
|
10
|
-
const a = new URL(window.location.href);
|
|
11
|
-
a.searchParams.set("theme", s), i.replace(a.toString());
|
|
4
|
+
import { Sun as n, Moon as l, Monitor as m } from "lucide-react";
|
|
5
|
+
import { useTheme as u } from "@ichaingo/next-themes";
|
|
6
|
+
function g() {
|
|
7
|
+
const { theme: r, setTheme: s } = u(), t = (a) => {
|
|
8
|
+
s(a);
|
|
12
9
|
};
|
|
13
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
14
11
|
/* @__PURE__ */ e(
|
|
15
12
|
"button",
|
|
16
13
|
{
|
|
@@ -18,7 +15,7 @@ function y() {
|
|
|
18
15
|
className: o("p-1 cursor-pointer rounded-full", r === "light" ? "bg-primary text-white" : "bg-module"),
|
|
19
16
|
"aria-label": "Light mode",
|
|
20
17
|
suppressHydrationWarning: !0,
|
|
21
|
-
children: /* @__PURE__ */ e(
|
|
18
|
+
children: /* @__PURE__ */ e(n, { className: "w-4 h-4" })
|
|
22
19
|
}
|
|
23
20
|
),
|
|
24
21
|
/* @__PURE__ */ e(
|
|
@@ -28,7 +25,7 @@ function y() {
|
|
|
28
25
|
className: o("p-1 cursor-pointer rounded-full", r === "dark" ? "bg-primary text-white" : "bg-module"),
|
|
29
26
|
"aria-label": "Dark mode",
|
|
30
27
|
suppressHydrationWarning: !0,
|
|
31
|
-
children: /* @__PURE__ */ e(
|
|
28
|
+
children: /* @__PURE__ */ e(l, { className: "w-4 h-4" })
|
|
32
29
|
}
|
|
33
30
|
),
|
|
34
31
|
/* @__PURE__ */ e(
|
|
@@ -38,11 +35,11 @@ function y() {
|
|
|
38
35
|
className: o("p-1 cursor-pointer rounded-full", r === "system" ? "bg-primary text-white" : "bg-module"),
|
|
39
36
|
"aria-label": "System preference",
|
|
40
37
|
suppressHydrationWarning: !0,
|
|
41
|
-
children: /* @__PURE__ */ e(
|
|
38
|
+
children: /* @__PURE__ */ e(m, { className: "w-4 h-4" })
|
|
42
39
|
}
|
|
43
40
|
)
|
|
44
41
|
] });
|
|
45
42
|
}
|
|
46
43
|
export {
|
|
47
|
-
|
|
44
|
+
g as default
|
|
48
45
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichaingo/theme-toggle",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.73",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
"lucide-react": "^0.539.0",
|
|
28
28
|
"@ichaingo/next-themes": "^0.4.11",
|
|
29
29
|
"next": "^15.1.6",
|
|
30
|
-
"@ichaingo/i18n": "1.3.
|
|
30
|
+
"@ichaingo/i18n": "1.3.73"
|
|
31
31
|
}
|
|
32
32
|
}
|