@henriquepetrelli/hp-design-system 1.1.19 → 1.1.20
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.
|
@@ -1427,18 +1427,16 @@
|
|
|
1427
1427
|
|
|
1428
1428
|
const emit = __emit;
|
|
1429
1429
|
|
|
1430
|
-
const getStoredTheme = () => localStorage.getItem('theme');
|
|
1430
|
+
const getStoredTheme = () => localStorage.getItem('theme') || 'light';
|
|
1431
1431
|
const isStoredDark = () => getStoredTheme() === 'dark';
|
|
1432
1432
|
|
|
1433
1433
|
const isDarkMode = vue.ref(isStoredDark());
|
|
1434
1434
|
|
|
1435
1435
|
const applyTheme = (isDark) => {
|
|
1436
|
-
const
|
|
1436
|
+
const theme = isDark ? 'dark' : 'light';
|
|
1437
1437
|
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
localStorage.setItem('theme', isDark ? 'dark' : 'light');
|
|
1438
|
+
document.documentElement.setAttribute('data-theme', theme);
|
|
1439
|
+
localStorage.setItem('theme', theme);
|
|
1442
1440
|
};
|
|
1443
1441
|
|
|
1444
1442
|
const toggleTheme = () => {
|
|
@@ -1521,7 +1519,7 @@
|
|
|
1521
1519
|
}
|
|
1522
1520
|
|
|
1523
1521
|
};
|
|
1524
|
-
const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-
|
|
1522
|
+
const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-f2c78aa3"]]);
|
|
1525
1523
|
|
|
1526
1524
|
const _hoisted_1$3 = { class: "input__fieldset" };
|
|
1527
1525
|
const _hoisted_2$3 = {
|