@skyux/core 12.1.0 → 12.2.0

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.
@@ -4110,29 +4110,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4110
4110
  }] });
4111
4111
 
4112
4112
  const CLS_VIEWKEEPER_FIXED = 'sky-viewkeeper-fixed';
4113
+ const CLS_VIEWKEEPER_FIXED_NOT_LAST = 'sky-viewkeeper-fixed-not-last';
4114
+ const CLS_VIEWKEEPER_BOUNDARY = 'sky-viewkeeper-boundary';
4113
4115
  const EVT_AFTER_VIEWKEEPER_SYNC = 'afterViewkeeperSync';
4114
- let styleEl;
4115
4116
  let nextIdIndex;
4116
- function ensureStyleEl() {
4117
- if (!styleEl) {
4118
- styleEl = document.createElement('style');
4119
- const css = document.createTextNode(`
4120
- .${CLS_VIEWKEEPER_FIXED} {
4121
- position: fixed !important;
4122
- z-index: 999;
4123
- opacity: 0.95;
4124
- overflow: hidden;
4125
- }
4126
-
4127
- .sky-theme-modern .${CLS_VIEWKEEPER_FIXED} {
4128
- box-shadow: 0px 1px 8px -1px rgba(0, 0, 0, 0.3);
4129
- opacity: initial;
4130
- }
4131
- `);
4132
- styleEl.appendChild(css);
4133
- document.head.appendChild(styleEl);
4134
- }
4135
- }
4136
4117
  function nextId() {
4137
4118
  nextIdIndex = (nextIdIndex || 0) + 1;
4138
4119
  return 'viewkeeper-' + nextIdIndex;
@@ -4225,7 +4206,7 @@ class SkyViewkeeper {
4225
4206
  window.addEventListener('scroll', this.#syncElPositionHandler, true);
4226
4207
  window.addEventListener('resize', this.#syncElPositionHandler);
4227
4208
  window.addEventListener('orientationchange', this.#syncElPositionHandler);
4228
- ensureStyleEl();
4209
+ this.#boundaryEl.classList.add(CLS_VIEWKEEPER_BOUNDARY);
4229
4210
  this.syncElPosition(el, boundaryEl);
4230
4211
  }
4231
4212
  syncElPosition(el, boundaryEl) {
@@ -4240,9 +4221,11 @@ class SkyViewkeeper {
4240
4221
  if (this.#needsUpdating(doFixEl, fixedStyles)) {
4241
4222
  if (doFixEl) {
4242
4223
  this.#fixEl(el, boundaryInfo, fixedStyles);
4224
+ this.#verticalOffsetEl?.classList.add(CLS_VIEWKEEPER_FIXED_NOT_LAST);
4243
4225
  }
4244
4226
  else {
4245
4227
  this.#unfixEl(el);
4228
+ this.#verticalOffsetEl?.classList.remove(CLS_VIEWKEEPER_FIXED_NOT_LAST);
4246
4229
  }
4247
4230
  }
4248
4231
  const evt = createCustomEvent(EVT_AFTER_VIEWKEEPER_SYNC);
@@ -4259,8 +4242,10 @@ class SkyViewkeeper {
4259
4242
  }
4260
4243
  if (this.#verticalOffsetEl) {
4261
4244
  this.#verticalOffsetEl.removeEventListener(EVT_AFTER_VIEWKEEPER_SYNC, this.#syncElPositionHandler);
4245
+ this.#verticalOffsetEl.classList.remove(CLS_VIEWKEEPER_FIXED_NOT_LAST);
4262
4246
  }
4263
4247
  this.#spacerResizeObserver?.disconnect();
4248
+ this.#boundaryEl?.classList.remove(CLS_VIEWKEEPER_BOUNDARY);
4264
4249
  this.#el =
4265
4250
  this.#boundaryEl =
4266
4251
  this.#verticalOffsetEl =
@@ -4612,7 +4597,7 @@ class Version {
4612
4597
  /**
4613
4598
  * Represents the version of @skyux/core.
4614
4599
  */
4615
- const VERSION = new Version('12.1.0');
4600
+ const VERSION = new Version('12.2.0');
4616
4601
 
4617
4602
  /**
4618
4603
  * Generated bundle index. Do not edit.