@ichaingo/theme-toggle 1.3.71 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAqClC"}
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 l, jsx as e } from "react/jsx-runtime";
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 m, Moon as u, Monitor as c } from "lucide-react";
5
- import { useTheme as d } from "@ichaingo/next-themes";
6
- import { useRouter as p } from "next/navigation";
7
- function y() {
8
- const { theme: r, setTheme: n } = d(), i = p(), t = (s) => {
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__ */ l("div", { className: "flex items-center gap-2", children: [
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(m, { className: "w-4 h-4" })
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(u, { className: "w-4 h-4" })
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(c, { className: "w-4 h-4" })
38
+ children: /* @__PURE__ */ e(m, { className: "w-4 h-4" })
42
39
  }
43
40
  )
44
41
  ] });
45
42
  }
46
43
  export {
47
- y as default
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.71",
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.71"
30
+ "@ichaingo/i18n": "1.3.73"
31
31
  }
32
32
  }