@navservice/core 1.43.0 → 1.44.0
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/build/es/index.browser.js +9 -0
- package/build/es/utils/_hooks.d.ts +1 -0
- package/build/es/utils/index.d.ts +1 -0
- package/build/es/utils.js +9 -0
- package/build/lib/index.browser.cjs +9 -0
- package/build/lib/utils/_hooks.d.ts +1 -0
- package/build/lib/utils/index.d.ts +1 -0
- package/build/lib/utils.cjs +9 -0
- package/package.json +1 -1
|
@@ -618,6 +618,15 @@ class _hooks {
|
|
|
618
618
|
}, []);
|
|
619
619
|
return isMobile;
|
|
620
620
|
}
|
|
621
|
+
use_dark_mode() {
|
|
622
|
+
if ("dark" === localStorage.getItem("theme")) {
|
|
623
|
+
document.documentElement.classList.add("dark");
|
|
624
|
+
localStorage.setItem("theme", "dark");
|
|
625
|
+
} else {
|
|
626
|
+
document.documentElement.classList.remove("dark");
|
|
627
|
+
localStorage.setItem("theme", "light");
|
|
628
|
+
}
|
|
629
|
+
}
|
|
621
630
|
}
|
|
622
631
|
const utils_hooks = new _hooks;
|
|
623
632
|
const utils = {
|
package/build/es/utils.js
CHANGED
|
@@ -456,6 +456,15 @@ class _hooks {
|
|
|
456
456
|
}, []);
|
|
457
457
|
return isMobile;
|
|
458
458
|
}
|
|
459
|
+
use_dark_mode() {
|
|
460
|
+
if ("dark" === localStorage.getItem("theme")) {
|
|
461
|
+
document.documentElement.classList.add("dark");
|
|
462
|
+
localStorage.setItem("theme", "dark");
|
|
463
|
+
} else {
|
|
464
|
+
document.documentElement.classList.remove("dark");
|
|
465
|
+
localStorage.setItem("theme", "light");
|
|
466
|
+
}
|
|
467
|
+
}
|
|
459
468
|
}
|
|
460
469
|
const utils_hooks = new _hooks;
|
|
461
470
|
const utils = {
|
|
@@ -631,6 +631,15 @@ class _hooks {
|
|
|
631
631
|
}, []);
|
|
632
632
|
return isMobile;
|
|
633
633
|
}
|
|
634
|
+
use_dark_mode() {
|
|
635
|
+
if (localStorage.getItem("theme") === "dark") {
|
|
636
|
+
document.documentElement.classList.add("dark");
|
|
637
|
+
localStorage.setItem("theme", "dark");
|
|
638
|
+
} else {
|
|
639
|
+
document.documentElement.classList.remove("dark");
|
|
640
|
+
localStorage.setItem("theme", "light");
|
|
641
|
+
}
|
|
642
|
+
}
|
|
634
643
|
}
|
|
635
644
|
/* export default */ const utils_hooks = (new _hooks);
|
|
636
645
|
|
package/build/lib/utils.cjs
CHANGED
|
@@ -696,6 +696,15 @@ class _hooks {
|
|
|
696
696
|
}, []);
|
|
697
697
|
return isMobile;
|
|
698
698
|
}
|
|
699
|
+
use_dark_mode() {
|
|
700
|
+
if (localStorage.getItem("theme") === "dark") {
|
|
701
|
+
document.documentElement.classList.add("dark");
|
|
702
|
+
localStorage.setItem("theme", "dark");
|
|
703
|
+
} else {
|
|
704
|
+
document.documentElement.classList.remove("dark");
|
|
705
|
+
localStorage.setItem("theme", "light");
|
|
706
|
+
}
|
|
707
|
+
}
|
|
699
708
|
}
|
|
700
709
|
/* export default */ const utils_hooks = (new _hooks);
|
|
701
710
|
|