@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.
@@ -1423,18 +1423,16 @@ const props = __props;
1423
1423
 
1424
1424
  const emit = __emit;
1425
1425
 
1426
- const getStoredTheme = () => localStorage.getItem('theme');
1426
+ const getStoredTheme = () => localStorage.getItem('theme') || 'light';
1427
1427
  const isStoredDark = () => getStoredTheme() === 'dark';
1428
1428
 
1429
1429
  const isDarkMode = ref(isStoredDark());
1430
1430
 
1431
1431
  const applyTheme = (isDark) => {
1432
- const root = document.documentElement;
1432
+ const theme = isDark ? 'dark' : 'light';
1433
1433
 
1434
- root.classList.toggle('dark', isDark);
1435
- root.classList.remove('light'); // light é o default via :root
1436
-
1437
- localStorage.setItem('theme', isDark ? 'dark' : 'light');
1434
+ document.documentElement.setAttribute('data-theme', theme);
1435
+ localStorage.setItem('theme', theme);
1438
1436
  };
1439
1437
 
1440
1438
  const toggleTheme = () => {
@@ -1517,7 +1515,7 @@ return (_ctx, _cache) => {
1517
1515
  }
1518
1516
 
1519
1517
  };
1520
- const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-ed2b100c"]]);
1518
+ const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-f2c78aa3"]]);
1521
1519
 
1522
1520
  const _hoisted_1$3 = { class: "input__fieldset" };
1523
1521
  const _hoisted_2$3 = {