@limetech/lime-elements 37.61.2 → 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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/limel-icon_2.cjs.entry.js +17 -15
- package/dist/cjs/limel-icon_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js.map +1 -1
- package/dist/collection/components/portal/portal.js +17 -15
- package/dist/collection/components/portal/portal.js.map +1 -1
- package/dist/esm/limel-icon_2.entry.js +17 -15
- package/dist/esm/limel-icon_2.entry.js.map +1 -1
- package/dist/esm/limel-info-tile.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.css +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-5862b851.entry.js +2 -0
- package/dist/lime-elements/p-5862b851.entry.js.map +1 -0
- package/dist/lime-elements/{p-9bb104b1.entry.js → p-b852d3f5.entry.js} +2 -2
- package/dist/lime-elements/{p-9bb104b1.entry.js.map → p-b852d3f5.entry.js.map} +1 -1
- package/dist/types/components/portal/portal.d.ts +3 -1
- package/package.json +1 -1
- package/dist/lime-elements/p-d7c6ba55.entry.js +0 -2
- package/dist/lime-elements/p-d7c6ba55.entry.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [37.61.3](https://github.com/Lundalogik/lime-elements/compare/v37.61.2...v37.61.3) (2024-09-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **info-tile:** improve accessibility while loading ([66a54f5](https://github.com/Lundalogik/lime-elements/commit/66a54f5d71d513f4ee2dbd9ee36051595cd25c61))
|
|
8
|
+
|
|
1
9
|
## [37.61.2](https://github.com/Lundalogik/lime-elements/compare/v37.61.1...v37.61.2) (2024-09-19)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -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
|
|
2103
|
+
if (!this.container) {
|
|
2104
|
+
return;
|
|
2105
|
+
}
|
|
2106
|
+
this.container.classList.remove(IS_VISIBLE_CLASS);
|
|
2105
2107
|
}
|
|
2106
2108
|
showContainer() {
|
|
2107
|
-
this.container.
|
|
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
|
-
|
|
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);
|