@limetech/lime-elements 37.61.1 → 37.61.3

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/limel-form.cjs.entry.js +19 -3
  3. package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
  4. package/dist/cjs/limel-icon_2.cjs.entry.js +17 -15
  5. package/dist/cjs/limel-icon_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
  8. package/dist/collection/components/form/templates/array-field-collapsible-item.js +19 -3
  9. package/dist/collection/components/form/templates/array-field-collapsible-item.js.map +1 -1
  10. package/dist/collection/components/info-tile/info-tile.js +1 -1
  11. package/dist/collection/components/info-tile/info-tile.js.map +1 -1
  12. package/dist/collection/components/portal/portal.js +17 -15
  13. package/dist/collection/components/portal/portal.js.map +1 -1
  14. package/dist/esm/limel-form.entry.js +19 -3
  15. package/dist/esm/limel-form.entry.js.map +1 -1
  16. package/dist/esm/limel-icon_2.entry.js +17 -15
  17. package/dist/esm/limel-icon_2.entry.js.map +1 -1
  18. package/dist/esm/limel-info-tile.entry.js +1 -1
  19. package/dist/esm/limel-info-tile.entry.js.map +1 -1
  20. package/dist/lime-elements/lime-elements.css +1 -1
  21. package/dist/lime-elements/lime-elements.esm.js +1 -1
  22. package/dist/lime-elements/p-5862b851.entry.js +2 -0
  23. package/dist/lime-elements/p-5862b851.entry.js.map +1 -0
  24. package/dist/lime-elements/{p-c93ece44.entry.js → p-66bea69a.entry.js} +2 -2
  25. package/dist/lime-elements/p-66bea69a.entry.js.map +1 -0
  26. package/dist/lime-elements/{p-9bb104b1.entry.js → p-b852d3f5.entry.js} +2 -2
  27. package/dist/lime-elements/{p-9bb104b1.entry.js.map → p-b852d3f5.entry.js.map} +1 -1
  28. package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +4 -1
  29. package/dist/types/components/portal/portal.d.ts +3 -1
  30. package/package.json +1 -1
  31. package/dist/lime-elements/p-c93ece44.entry.js.map +0 -1
  32. package/dist/lime-elements/p-d7c6ba55.entry.js +0 -2
  33. package/dist/lime-elements/p-d7c6ba55.entry.js.map +0 -1
@@ -1996,6 +1996,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
1996
1996
 
1997
1997
  const portalCss = ":host(limel-portal){display:block;position:absolute;top:0;bottom:0;width:100%;pointer-events:none}:host([hidden]){display:none}slot{display:none}";
1998
1998
 
1999
+ const IS_VISIBLE_CLASS = 'is-visible';
1999
2000
  const Portal = class {
2000
2001
  constructor(hostRef) {
2001
2002
  index.registerInstance(this, hostRef);
@@ -2073,8 +2074,6 @@ const Portal = class {
2073
2074
  this.container = document.createElement('div');
2074
2075
  this.container.setAttribute('id', this.containerId);
2075
2076
  this.container.setAttribute('class', 'limel-portal--container');
2076
- this.container.style.fontFamily =
2077
- 'var(--limel-portal-font-family, inherit)';
2078
2077
  Object.assign(this.container, {
2079
2078
  portalSource: this.host,
2080
2079
  });
@@ -2101,19 +2100,21 @@ const Portal = class {
2101
2100
  this.container.parentElement.removeChild(this.container);
2102
2101
  }
2103
2102
  hideContainer() {
2104
- this.container.style.opacity = '0';
2103
+ if (!this.container) {
2104
+ return;
2105
+ }
2106
+ this.container.classList.remove(IS_VISIBLE_CLASS);
2105
2107
  }
2106
2108
  showContainer() {
2107
- this.container.style.opacity = '1';
2109
+ this.container.classList.add(IS_VISIBLE_CLASS);
2108
2110
  }
2109
2111
  styleContainer() {
2112
+ this.setContainerWidth();
2113
+ this.setContainerHeight();
2114
+ this.setContainerStyles();
2115
+ }
2116
+ setContainerWidth() {
2110
2117
  const hostWidth = this.host.getBoundingClientRect().width;
2111
- if (this.visible) {
2112
- this.container.style.display = 'block';
2113
- }
2114
- else {
2115
- this.container.style.display = 'none';
2116
- }
2117
2118
  if (this.inheritParentWidth) {
2118
2119
  const containerWidth = this.getContentWidth(this.container);
2119
2120
  let width = containerWidth;
@@ -2122,10 +2123,6 @@ const Portal = class {
2122
2123
  }
2123
2124
  this.container.style.width = `${width}px`;
2124
2125
  }
2125
- this.ensureContainerFitsInViewPort();
2126
- Object.keys(this.containerStyle).forEach((property) => {
2127
- this.container.style[property] = this.containerStyle[property];
2128
- });
2129
2126
  }
2130
2127
  getContentWidth(element) {
2131
2128
  if (!element) {
@@ -2138,6 +2135,11 @@ const Portal = class {
2138
2135
  const elementContent = element.querySelector('*');
2139
2136
  return this.getContentWidth(elementContent);
2140
2137
  }
2138
+ setContainerStyles() {
2139
+ Object.keys(this.containerStyle).forEach((property) => {
2140
+ this.container.style[property] = this.containerStyle[property];
2141
+ });
2142
+ }
2141
2143
  createPopper() {
2142
2144
  const config = this.createPopperConfig();
2143
2145
  this.popperInstance = createPopper(this.anchor || this.host, this.container, config);
@@ -2197,7 +2199,7 @@ const Portal = class {
2197
2199
  };
2198
2200
  return flipPlacements[direction];
2199
2201
  }
2200
- ensureContainerFitsInViewPort() {
2202
+ setContainerHeight() {
2201
2203
  const viewHeight = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);
2202
2204
  const { top, bottom } = this.host.getBoundingClientRect();
2203
2205
  const spaceAboveTopOfSurface = Math.max(top, 0);