vrembem 3.0.0 → 3.0.1

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.
@@ -602,6 +602,10 @@
602
602
  return json ? JSON.parse(json) : {};
603
603
  }
604
604
 
605
+ function getPrefix() {
606
+ return getComputedStyle(document.body).getPropertyValue('--vrembem-variable-prefix').trim();
607
+ }
608
+
605
609
  function localStore(key, enable) {
606
610
  if (enable === void 0) {
607
611
  enable = true;
@@ -750,6 +754,7 @@
750
754
  Collection: Collection,
751
755
  FocusTrap: FocusTrap,
752
756
  getConfig: getConfig$1,
757
+ getPrefix: getPrefix,
753
758
  localStore: localStore,
754
759
  teleport: teleport,
755
760
  openTransition: openTransition,
@@ -998,26 +1003,23 @@
998
1003
  }
999
1004
  };
1000
1005
 
1006
+ function L() {
1007
+ return getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix").trim();
1008
+ }
1009
+
1001
1010
  function getBreakpoint(drawer) {
1002
- var prefix = getVariablePrefix();
1011
+ var prefix = L();
1003
1012
  var bp = drawer.getAttribute("data-" + this.settings.dataBreakpoint);
1004
1013
 
1005
1014
  if (this.settings.breakpoints && this.settings.breakpoints[bp]) {
1006
1015
  return this.settings.breakpoints[bp];
1007
- } else if (getComputedStyle(document.body).getPropertyValue(prefix + bp)) {
1008
- return getComputedStyle(document.body).getPropertyValue(prefix + bp);
1016
+ } else if (getComputedStyle(document.body).getPropertyValue("--" + prefix + "breakpoint-" + bp).trim()) {
1017
+ return getComputedStyle(document.body).getPropertyValue("--" + prefix + "breakpoint-" + bp).trim();
1009
1018
  } else {
1010
1019
  return bp;
1011
1020
  }
1012
1021
  }
1013
1022
 
1014
- function getVariablePrefix() {
1015
- var prefix = '--';
1016
- prefix += getComputedStyle(document.body).getPropertyValue('--vrembem-variable-prefix');
1017
- prefix += 'breakpoint-';
1018
- return prefix;
1019
- }
1020
-
1021
1023
  function getDrawer(query) {
1022
1024
  // Get the entry from collection.
1023
1025
  var entry = typeof query === 'string' ? this.get(query) : this.get(query.id); // Return entry if it was resolved, otherwise throw error.
@@ -2311,7 +2313,7 @@
2311
2313
 
2312
2314
  for (var prop in config) {
2313
2315
  // Get the CSS variable property values.
2314
- var prefix = getComputedStyle(document.body).getPropertyValue('--vrembem-variable-prefix');
2316
+ var prefix = L();
2315
2317
  var value = styles.getPropertyValue("--" + prefix + "popover-" + prop).trim(); // If a value was found, replace the default in config obj.
2316
2318
 
2317
2319
  if (value) {