@henriquepetrelli/hp-design-system 1.1.3 → 1.1.5

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.
@@ -1324,36 +1324,7 @@ const props = __props;
1324
1324
 
1325
1325
  const isDarkMode = ref(false);
1326
1326
 
1327
- const getCSSVariable = (name, fallback) => {
1328
- return (
1329
- getComputedStyle(document.documentElement).getPropertyValue(name).trim() ||
1330
- fallback
1331
- )
1332
- };
1333
-
1334
- const computedLightBackgroundColor = computed(() => {
1335
- return (
1336
- props.lightBackgroundColor ||
1337
- getCSSVariable('--color-background', '#96dcee')
1338
- )
1339
- });
1340
-
1341
- const computedLightBorderColor = computed(() => {
1342
- return props.lightBorderColor || getCSSVariable('--color-primary', '#72cce3')
1343
- });
1344
-
1345
- const computedDarkBackgroundColor = computed(() => {
1346
- return (
1347
- props.darkBackgroundColor || getCSSVariable('--color-background', '#1261a0')
1348
- )
1349
- });
1350
-
1351
- const computedDarkBorderColor = computed(() => {
1352
- return props.darkBorderColor || getCSSVariable('--color-primary', '#072f5f')
1353
- });
1354
-
1355
1327
  const toggleTheme = () => {
1356
- isDarkMode.value = !isDarkMode.value;
1357
1328
  if (isDarkMode.value) {
1358
1329
  document.documentElement.classList.remove('light');
1359
1330
  document.documentElement.classList.add('dark');
@@ -1366,6 +1337,7 @@ const toggleTheme = () => {
1366
1337
  };
1367
1338
 
1368
1339
  const handleKeydown = () => {
1340
+ isDarkMode.value = !isDarkMode.value;
1369
1341
  toggleTheme();
1370
1342
  };
1371
1343
 
@@ -1382,6 +1354,22 @@ onMounted(() => {
1382
1354
  document.documentElement.classList.add('light');
1383
1355
  }
1384
1356
  });
1357
+
1358
+ const computedLightBorderColor = computed(() => {
1359
+ return props.lightBorderColor || '#72cce3'
1360
+ });
1361
+
1362
+ const computedLightBackgroundColor = computed(() => {
1363
+ return props.lightBackgroundColor || '#96dcee'
1364
+ });
1365
+
1366
+ const computedDarkBorderColor = computed(() => {
1367
+ return props.darkBorderColor || '#072f5f'
1368
+ });
1369
+
1370
+ const computedDarkBackgroundColor = computed(() => {
1371
+ return props.darkBackgroundColor || '#1261a0'
1372
+ });
1385
1373
 
1386
1374
  return (_ctx, _cache) => {
1387
1375
  return (openBlock(), createElementBlock("div", _hoisted_1$4, [
@@ -1422,7 +1410,7 @@ return (_ctx, _cache) => {
1422
1410
  }
1423
1411
 
1424
1412
  };
1425
- const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-74ce4ef8"]]);
1413
+ const ThemeSwitcher = /*#__PURE__*/_export_sfc(_sfc_main$4, [['__scopeId',"data-v-08fdca46"]]);
1426
1414
 
1427
1415
  const _hoisted_1$3 = { class: "input__fieldset" };
1428
1416
  const _hoisted_2$3 = {