@henriquepetrelli/hp-design-system 1.1.14 → 1.1.15

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,7 +1423,7 @@ const props = __props;
1423
1423
 
1424
1424
  const emit = __emit;
1425
1425
 
1426
- const isDarkMode = ref(false);
1426
+ const isDarkMode = ref(localStorage.getItem('theme') === 'dark');
1427
1427
 
1428
1428
  const applyTheme = (isDark) => {
1429
1429
  document.documentElement.classList.toggle('dark', isDark);
@@ -1442,13 +1442,6 @@ const handleKeydown = () => {
1442
1442
  };
1443
1443
 
1444
1444
  onMounted(() => {
1445
- const savedTheme =
1446
- localStorage.getItem('theme') ||
1447
- (window.matchMedia('(prefers-color-scheme: dark)').matches
1448
- ? 'dark'
1449
- : 'light');
1450
-
1451
- isDarkMode.value = savedTheme === 'dark';
1452
1445
  applyTheme(isDarkMode.value);
1453
1446
  });
1454
1447
 
@@ -1514,7 +1507,7 @@ return (_ctx, _cache) => {
1514
1507
  }
1515
1508
 
1516
1509
  };
1517
- const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-699fb0fe"]]);
1510
+ const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-e4250caa"]]);
1518
1511
 
1519
1512
  const _hoisted_1$3 = { class: "input__fieldset" };
1520
1513
  const _hoisted_2$3 = {