@dnb/eufemia 10.71.1 → 10.71.2
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 +7 -0
- package/cjs/components/tooltip/TooltipContainer.js +23 -7
- package/cjs/components/tooltip/TooltipContainer.js.map +1 -1
- package/cjs/shared/Eufemia.d.ts +1 -1
- package/cjs/shared/Eufemia.js +2 -2
- package/cjs/shared/Eufemia.js.map +1 -1
- package/cjs/style/core/scopes.scss +1 -1
- package/cjs/style/dnb-ui-basis.css +1 -1
- package/cjs/style/dnb-ui-basis.min.css +1 -1
- package/cjs/style/dnb-ui-body.css +1 -1
- package/cjs/style/dnb-ui-body.min.css +1 -1
- package/cjs/style/dnb-ui-core.css +1 -1
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/components/tooltip/TooltipContainer.js +23 -7
- package/components/tooltip/TooltipContainer.js.map +1 -1
- package/es/components/tooltip/TooltipContainer.js +23 -7
- package/es/components/tooltip/TooltipContainer.js.map +1 -1
- package/es/shared/Eufemia.d.ts +1 -1
- package/es/shared/Eufemia.js +2 -2
- package/es/shared/Eufemia.js.map +1 -1
- package/es/style/core/scopes.scss +1 -1
- package/es/style/dnb-ui-basis.css +1 -1
- package/es/style/dnb-ui-basis.min.css +1 -1
- package/es/style/dnb-ui-body.css +1 -1
- package/es/style/dnb-ui-body.min.css +1 -1
- package/es/style/dnb-ui-core.css +1 -1
- package/es/style/dnb-ui-core.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +1 -1
- package/esm/dnb-ui-extensions.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +1 -1
- package/package.json +1 -1
- package/shared/Eufemia.d.ts +1 -1
- package/shared/Eufemia.js +2 -2
- package/shared/Eufemia.js.map +1 -1
- package/style/core/scopes.scss +1 -1
- package/style/dnb-ui-basis.css +1 -1
- package/style/dnb-ui-basis.min.css +1 -1
- package/style/dnb-ui-body.css +1 -1
- package/style/dnb-ui-body.min.css +1 -1
- package/style/dnb-ui-core.css +1 -1
- package/style/dnb-ui-core.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +1 -1
- package/umd/dnb-ui-extensions.min.js +1 -1
- package/umd/dnb-ui-lib.min.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to @dnb/eufemia will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [10.71.2](https://github.com/dnbexperience/eufemia/compare/v10.71.1...v10.71.2) (2025-04-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **Tooltip:** improve alignment of tooltip with long texts ([#4970](https://github.com/dnbexperience/eufemia/issues/4970)) ([b728c6a](https://github.com/dnbexperience/eufemia/commit/b728c6aefe64d8f476bd80da167b43911676c2be))
|
|
12
|
+
|
|
6
13
|
## [10.71.1](https://github.com/dnbexperience/eufemia/compare/v10.71.0...v10.71.1) (2025-04-15)
|
|
7
14
|
|
|
8
15
|
|
|
@@ -33,6 +33,7 @@ function TooltipContainer(props) {
|
|
|
33
33
|
targetElement: target
|
|
34
34
|
} = props;
|
|
35
35
|
const [style, setStyle] = _react.default.useState(null);
|
|
36
|
+
const [arrowStyle, setArrowStyle] = _react.default.useState(null);
|
|
36
37
|
const [hover, setHover] = _react.default.useState(false);
|
|
37
38
|
const isActive = (0, _componentHelper.isTrue)(active) || hover;
|
|
38
39
|
const [wasActive, makeActive] = _react.default.useState(false);
|
|
@@ -83,6 +84,7 @@ function TooltipContainer(props) {
|
|
|
83
84
|
const offsetLeft = _react.default.useRef(0);
|
|
84
85
|
const offsetTop = _react.default.useRef(0);
|
|
85
86
|
_react.default.useLayoutEffect(() => {
|
|
87
|
+
var _stylesFromPosition$p, _stylesFromArrow$arro;
|
|
86
88
|
if (!isActive) {
|
|
87
89
|
if (wasActive) {
|
|
88
90
|
clearTimeout(debounceTimeout.current);
|
|
@@ -118,6 +120,10 @@ function TooltipContainer(props) {
|
|
|
118
120
|
const widthBased = scrollX + rect.left;
|
|
119
121
|
const left = (useMouseWhen && mousePos < targetBodySize.width ? mousePos : widthBased) - offsetLeft.current;
|
|
120
122
|
const style = _objectSpread({}, props.style);
|
|
123
|
+
const arrowStyle = {
|
|
124
|
+
top: null,
|
|
125
|
+
left: null
|
|
126
|
+
};
|
|
121
127
|
if (align === 'left') {
|
|
122
128
|
alignOffset = -targetBodySize.width / 2;
|
|
123
129
|
} else if (align === 'right') {
|
|
@@ -157,23 +163,32 @@ function TooltipContainer(props) {
|
|
|
157
163
|
style.top = top + targetBodySize.height / 2 - elementHeight + offset.current;
|
|
158
164
|
}
|
|
159
165
|
};
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
if (stylesFromArrow[arrow]) {
|
|
164
|
-
stylesFromArrow[arrow]();
|
|
165
|
-
}
|
|
166
|
+
(_stylesFromPosition$p = stylesFromPosition[position]) === null || _stylesFromPosition$p === void 0 ? void 0 : _stylesFromPosition$p.call(stylesFromPosition);
|
|
167
|
+
(_stylesFromArrow$arro = stylesFromArrow[arrow]) === null || _stylesFromArrow$arro === void 0 ? void 0 : _stylesFromArrow$arro.call(stylesFromArrow);
|
|
166
168
|
const rightOffset = parseFloat(String(style.left)) + elementWidth - window.innerWidth;
|
|
167
169
|
if (rightOffset > 0) {
|
|
168
170
|
style.left = window.innerWidth - elementWidth;
|
|
169
171
|
}
|
|
170
172
|
if (parseFloat(String(style.left)) < 0) {
|
|
171
173
|
style.left = 0;
|
|
174
|
+
if (position === 'top' || position === 'bottom') {
|
|
175
|
+
const arrowWidth = 16;
|
|
176
|
+
const arrowStyleBasisWidth = left - arrowWidth / 2;
|
|
177
|
+
if (align === 'left') {
|
|
178
|
+
arrowStyle.left = arrowStyleBasisWidth;
|
|
179
|
+
} else if (align === 'right') {
|
|
180
|
+
arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width;
|
|
181
|
+
} else {
|
|
182
|
+
arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width / 2;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
172
185
|
}
|
|
173
186
|
if (parseFloat(String(style.top)) < 0) {
|
|
174
187
|
style.top = 0;
|
|
188
|
+
arrowStyle.top = 0;
|
|
175
189
|
}
|
|
176
190
|
setStyle(style);
|
|
191
|
+
setArrowStyle(arrowStyle);
|
|
177
192
|
}, [active, arrow, position, children, renewStyles]);
|
|
178
193
|
const handleMouseEnter = () => {
|
|
179
194
|
if ((0, _componentHelper.isTrue)(active) && useHover !== false) {
|
|
@@ -199,7 +214,8 @@ function TooltipContainer(props) {
|
|
|
199
214
|
className: (0, _classnames.default)(attributes === null || attributes === void 0 ? void 0 : attributes.className, isActive ? 'dnb-tooltip--active' : wasActive && 'dnb-tooltip--hide', (0, _componentHelper.isTrue)(noAnimation) && 'dnb-tooltip--no-animation', (0, _componentHelper.isTrue)(fixedPosition) && 'dnb-tooltip--fixed'),
|
|
200
215
|
style: _objectSpread(_objectSpread({}, style), attributes.style)
|
|
201
216
|
}), arrow && _react.default.createElement("span", {
|
|
202
|
-
className: `dnb-tooltip__arrow dnb-tooltip__arrow__arrow--${arrow} dnb-tooltip__arrow__position--${position}
|
|
217
|
+
className: `dnb-tooltip__arrow dnb-tooltip__arrow__arrow--${arrow} dnb-tooltip__arrow__position--${position}`,
|
|
218
|
+
style: _objectSpread({}, arrowStyle)
|
|
203
219
|
}), _react.default.createElement("span", {
|
|
204
220
|
id: internalId,
|
|
205
221
|
className: "dnb-tooltip__content"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContainer.js","names":["_react","_interopRequireDefault","require","_componentHelper","_helpers","_classnames","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ownKeys","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","TooltipContainer","props","internalId","active","attributes","arrow","position","align","hideDelay","fixedPosition","noAnimation","skipPortal","useHover","children","targetElement","target","style","setStyle","React","useState","hover","setHover","isActive","isTrue","wasActive","makeActive","renewStyles","forceRerender","getBodySize","elementRef","useRef","offset","debounceTimeout","resizeObserver","document","width","height","body","getBoundingClientRect","clearTimers","clearTimeout","current","useLayoutEffect","addPositionObserver","ResizeObserver","setTimeout","observe","removePositionObserver","_resizeObserver$curre","disconnect","offsetLeft","offsetTop","element","window","alignOffset","elementWidth","offsetWidth","elementHeight","offsetHeight","rect","targetBodySize","getOffsetLeft","getOffsetTop","scrollY","undefined","pageYOffset","scrollX","pageXOffset","top","useMouseWhen","mousePos","left","widthBased","topHorizontal","leftVertical","stylesFromPosition","right","bottom","stylesFromArrow","rightOffset","parseFloat","innerWidth","handleMouseEnter","handleMouseLeave","handlePropagation","stopPropagation","createElement","role","ref","onMouseEnter","onMouseLeave","onMouseMove","onMouseDown","onTouchStart","className","classnames","id"],"sources":["../../../../src/components/tooltip/TooltipContainer.tsx"],"sourcesContent":["/**\n * Web Tooltip Component\n *\n */\n\nimport React from 'react'\nimport { isTrue } from '../../shared/component-helper'\nimport { getOffsetLeft, getOffsetTop } from '../../shared/helpers'\nimport classnames from 'classnames'\nimport { TooltipProps } from './types'\n\ntype TooltipContainerProps = {\n targetElement: HTMLElement\n style?: React.CSSProperties\n useHover?: boolean\n internalId?: string\n attributes?: Record<string, unknown> & { style: React.CSSProperties }\n}\n\nexport default function TooltipContainer(\n props: TooltipProps & TooltipContainerProps\n) {\n const {\n internalId,\n active,\n attributes,\n arrow,\n position,\n align,\n hideDelay,\n fixedPosition,\n noAnimation,\n skipPortal,\n useHover,\n children,\n targetElement: target,\n } = props\n\n const [style, setStyle] = React.useState(null)\n const [hover, setHover] = React.useState(false)\n const isActive = isTrue(active) || hover\n const [wasActive, makeActive] = React.useState(false)\n const [renewStyles, forceRerender] = React.useState(getBodySize)\n\n const elementRef = React.useRef<HTMLSpanElement>(null)\n const offset = React.useRef(16)\n const debounceTimeout = React.useRef<NodeJS.Timeout>()\n const resizeObserver = React.useRef<ResizeObserver>(null)\n\n function getBodySize() {\n if (!isActive || typeof document === 'undefined') {\n return 0 // stop here\n }\n\n const { width, height } = document.body.getBoundingClientRect()\n\n return width + height\n }\n\n const clearTimers = () => {\n clearTimeout(debounceTimeout.current)\n }\n\n React.useLayoutEffect(() => {\n const addPositionObserver = () => {\n if (resizeObserver.current || typeof document === 'undefined') {\n return // stop here\n }\n\n try {\n resizeObserver.current = new ResizeObserver(() => {\n clearTimers()\n debounceTimeout.current = setTimeout(\n () => forceRerender(getBodySize()),\n 100\n )\n })\n\n resizeObserver.current.observe(document.body)\n } catch (e) {\n //\n }\n }\n const removePositionObserver = () => {\n clearTimers()\n resizeObserver.current?.disconnect()\n }\n\n if (isActive) {\n makeActive(true)\n addPositionObserver()\n } else {\n removePositionObserver()\n }\n\n return removePositionObserver\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isActive])\n\n const offsetLeft = React.useRef(0)\n const offsetTop = React.useRef(0)\n\n React.useLayoutEffect(() => {\n if (!isActive) {\n /**\n * This \"resets\" the position between elements,\n * when not active. Else it will always first show on the older position.\n */\n if (wasActive) {\n clearTimeout(debounceTimeout.current)\n debounceTimeout.current = setTimeout(\n () => setStyle(null),\n hideDelay\n )\n }\n return // stop here\n }\n\n const element = elementRef?.current\n\n if (\n typeof window === 'undefined' ||\n !element ||\n !target?.getBoundingClientRect\n ) {\n return // stop here\n }\n\n let alignOffset = 0\n\n const elementWidth = element.offsetWidth\n const elementHeight = element.offsetHeight\n const rect = target.getBoundingClientRect()\n const targetBodySize = {\n width: target.offsetWidth,\n height: target.offsetHeight,\n }\n\n // fix for svg\n if (!target.offsetHeight) {\n targetBodySize.width = rect.width\n targetBodySize.height = rect.height\n }\n\n if (skipPortal && (!offsetLeft.current || !offsetTop.current)) {\n offsetLeft.current = getOffsetLeft(element) - offset.current\n offsetTop.current = getOffsetTop(element) - offset.current\n }\n\n const scrollY =\n window.scrollY !== undefined ? window.scrollY : window.pageYOffset\n const scrollX =\n window.scrollX !== undefined ? window.scrollX : window.pageXOffset\n const top =\n (isTrue(fixedPosition) ? 0 : scrollY) + rect.top - offsetTop.current\n\n // Use Mouse position when target is too wide\n const useMouseWhen = targetBodySize.width > 400\n const mousePos =\n getOffsetLeft(target) +\n rect.left / 2 +\n (element ? element.offsetWidth : 0)\n const widthBased = scrollX + rect.left\n const left =\n (useMouseWhen && mousePos < targetBodySize.width\n ? mousePos\n : widthBased) - offsetLeft.current\n\n const style = { ...props.style }\n\n if (align === 'left') {\n alignOffset = -targetBodySize.width / 2\n } else if (align === 'right') {\n alignOffset = targetBodySize.width / 2\n }\n\n const topHorizontal =\n top + targetBodySize.height / 2 - elementHeight / 2\n const leftVertical =\n left - elementWidth / 2 + targetBodySize.width / 2 + alignOffset\n\n const stylesFromPosition = {\n left: () => {\n style.top = topHorizontal\n style.left = left - elementWidth - offset.current\n },\n right: () => {\n style.top = topHorizontal\n style.left = left + targetBodySize.width + offset.current\n },\n top: () => {\n style.left = leftVertical\n style.top = top - elementHeight - offset.current\n },\n bottom: () => {\n style.left = leftVertical\n style.top = top + targetBodySize.height + offset.current\n },\n }\n\n const stylesFromArrow = {\n left: () => {\n style.left =\n left + targetBodySize.width / 2 - offset.current + alignOffset\n },\n right: () => {\n style.left =\n left -\n elementWidth +\n targetBodySize.width / 2 +\n offset.current +\n alignOffset\n },\n top: () => {\n style.top = top + targetBodySize.height / 2 - offset.current\n },\n bottom: () => {\n style.top =\n top + targetBodySize.height / 2 - elementHeight + offset.current\n },\n }\n\n if (stylesFromPosition[position]) {\n stylesFromPosition[position]()\n }\n if (stylesFromArrow[arrow]) {\n stylesFromArrow[arrow]()\n }\n\n const rightOffset =\n parseFloat(String(style.left)) + elementWidth - window.innerWidth\n if (rightOffset > 0) {\n style.left = window.innerWidth - elementWidth\n }\n\n if (parseFloat(String(style.left)) < 0) {\n style.left = 0\n }\n if (parseFloat(String(style.top)) < 0) {\n style.top = 0\n }\n\n setStyle(style)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active, arrow, position, children, renewStyles])\n\n const handleMouseEnter = () => {\n if (isTrue(active) && useHover !== false) {\n setHover(true)\n }\n }\n\n const handleMouseLeave = () => {\n if (useHover !== false) {\n setHover(false)\n }\n }\n\n /**\n * By stopping propagation, we allow the user to select text when Tooltip is used in the Slider component\n */\n const handlePropagation = (e: React.SyntheticEvent) =>\n e.stopPropagation()\n\n return (\n <span\n role=\"tooltip\"\n aria-hidden={target ? true : undefined} // make sure SR does not find it in the DOM, because we use \"aria-describedby\" for that\n ref={elementRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onMouseMove={handlePropagation}\n onMouseDown={handlePropagation}\n onTouchStart={handlePropagation}\n {...attributes}\n className={classnames(\n attributes?.className,\n isTrue(noAnimation) && 'dnb-tooltip--no-animation',\n isTrue(fixedPosition) && 'dnb-tooltip--fixed',\n isActive && 'dnb-tooltip--active',\n !isActive && wasActive && 'dnb-tooltip--hide'\n )}\n style={{ ...style, ...attributes.style }}\n >\n {arrow && (\n <span\n className={classnames(\n 'dnb-tooltip__arrow',\n `dnb-tooltip__arrow__arrow--${arrow}`,\n `dnb-tooltip__arrow__position--${position}`\n )}\n />\n )}\n\n <span id={internalId} className=\"dnb-tooltip__content\">\n {children}\n </span>\n </span>\n )\n}\n"],"mappings":";;;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG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AAW;IAChB4D,YAAY,EAAEP,gBAAiB;IAC/BQ,YAAY,EAAEP,gBAAiB;IAC/BQ,WAAW,EAAEP,iBAAkB;IAC/BQ,WAAW,EAAER,iBAAkB;IAC/BS,YAAY,EAAET;EAAkB,GAC5BhF,UAAU;IACd0F,SAAS,EAAE,IAAAC,mBAAU,EACnB3F,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAE0F,SAAS,EAGrBxE,QAAQ,GAAI,qBAAqB,GACpBE,SAAS,IAAI,mBAAmB,EAH7C,IAAAD,uBAAM,EAACb,WAAW,CAAC,IAAI,2BAA2B,EAClD,IAAAa,uBAAM,EAACd,aAAa,CAAC,IAAI,oBAG3B,CAAE;IACFO,KAAK,EAAAjC,aAAA,CAAAA,aAAA,KAAOiC,KAAK,GAAKZ,UAAU,CAACY,KAAK;EAAG,IAExCX,KAAK,IACJnD,MAAA,CAAAQ,OAAA,CAAA4H,aAAA;IACEQ,SAAS,mDAEuBzF,KAAK,kCACFC,QAAQ;EACzC,CACH,CACF,EAEDpD,MAAA,CAAAQ,OAAA,CAAA4H,aAAA;IAAMU,EAAE,EAAE9F,UAAW;IAAC4F,SAAS,EAAC;EAAsB,GACnDjF,QACG,CACF,CAAC;AAEX","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"TooltipContainer.js","names":["_react","_interopRequireDefault","require","_componentHelper","_helpers","_classnames","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","ownKeys","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","TooltipContainer","props","internalId","active","attributes","arrow","position","align","hideDelay","fixedPosition","noAnimation","skipPortal","useHover","children","targetElement","target","style","setStyle","React","useState","arrowStyle","setArrowStyle","hover","setHover","isActive","isTrue","wasActive","makeActive","renewStyles","forceRerender","getBodySize","elementRef","useRef","offset","debounceTimeout","resizeObserver","document","width","height","body","getBoundingClientRect","clearTimers","clearTimeout","current","useLayoutEffect","addPositionObserver","ResizeObserver","setTimeout","observe","removePositionObserver","_resizeObserver$curre","disconnect","offsetLeft","offsetTop","_stylesFromPosition$p","_stylesFromArrow$arro","element","window","alignOffset","elementWidth","offsetWidth","elementHeight","offsetHeight","rect","targetBodySize","getOffsetLeft","getOffsetTop","scrollY","undefined","pageYOffset","scrollX","pageXOffset","top","useMouseWhen","mousePos","left","widthBased","topHorizontal","leftVertical","stylesFromPosition","right","bottom","stylesFromArrow","rightOffset","parseFloat","innerWidth","arrowWidth","arrowStyleBasisWidth","handleMouseEnter","handleMouseLeave","handlePropagation","stopPropagation","createElement","role","ref","onMouseEnter","onMouseLeave","onMouseMove","onMouseDown","onTouchStart","className","classnames","id"],"sources":["../../../../src/components/tooltip/TooltipContainer.tsx"],"sourcesContent":["/**\n * Web Tooltip Component\n *\n */\n\nimport React from 'react'\nimport { isTrue } from '../../shared/component-helper'\nimport { getOffsetLeft, getOffsetTop } from '../../shared/helpers'\nimport classnames from 'classnames'\nimport { TooltipProps } from './types'\n\ntype TooltipContainerProps = {\n targetElement: HTMLElement\n style?: React.CSSProperties\n useHover?: boolean\n internalId?: string\n attributes?: Record<string, unknown> & { style: React.CSSProperties }\n}\n\nexport default function TooltipContainer(\n props: TooltipProps & TooltipContainerProps\n) {\n const {\n internalId,\n active,\n attributes,\n arrow,\n position,\n align,\n hideDelay,\n fixedPosition,\n noAnimation,\n skipPortal,\n useHover,\n children,\n targetElement: target,\n } = props\n\n const [style, setStyle] = React.useState(null)\n const [arrowStyle, setArrowStyle] = React.useState(null)\n const [hover, setHover] = React.useState(false)\n const isActive = isTrue(active) || hover\n const [wasActive, makeActive] = React.useState(false)\n const [renewStyles, forceRerender] = React.useState(getBodySize)\n\n const elementRef = React.useRef<HTMLSpanElement>(null)\n const offset = React.useRef(16)\n const debounceTimeout = React.useRef<NodeJS.Timeout>()\n const resizeObserver = React.useRef<ResizeObserver>(null)\n\n function getBodySize() {\n if (!isActive || typeof document === 'undefined') {\n return 0 // stop here\n }\n\n const { width, height } = document.body.getBoundingClientRect()\n\n return width + height\n }\n\n const clearTimers = () => {\n clearTimeout(debounceTimeout.current)\n }\n\n React.useLayoutEffect(() => {\n const addPositionObserver = () => {\n if (resizeObserver.current || typeof document === 'undefined') {\n return // stop here\n }\n\n try {\n resizeObserver.current = new ResizeObserver(() => {\n clearTimers()\n debounceTimeout.current = setTimeout(\n () => forceRerender(getBodySize()),\n 100\n )\n })\n\n resizeObserver.current.observe(document.body)\n } catch (e) {\n //\n }\n }\n const removePositionObserver = () => {\n clearTimers()\n resizeObserver.current?.disconnect()\n }\n\n if (isActive) {\n makeActive(true)\n addPositionObserver()\n } else {\n removePositionObserver()\n }\n\n return removePositionObserver\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isActive])\n\n const offsetLeft = React.useRef(0)\n const offsetTop = React.useRef(0)\n\n React.useLayoutEffect(() => {\n if (!isActive) {\n /**\n * This \"resets\" the position between elements,\n * when not active. Else it will always first show on the older position.\n */\n if (wasActive) {\n clearTimeout(debounceTimeout.current)\n debounceTimeout.current = setTimeout(\n () => setStyle(null),\n hideDelay\n )\n }\n return // stop here\n }\n\n const element = elementRef?.current\n\n if (\n typeof window === 'undefined' ||\n !element ||\n !target?.getBoundingClientRect\n ) {\n return // stop here\n }\n\n let alignOffset = 0\n\n const elementWidth = element.offsetWidth\n const elementHeight = element.offsetHeight\n const rect = target.getBoundingClientRect()\n const targetBodySize = {\n width: target.offsetWidth,\n height: target.offsetHeight,\n }\n\n // fix for svg\n if (!target.offsetHeight) {\n targetBodySize.width = rect.width\n targetBodySize.height = rect.height\n }\n\n if (skipPortal && (!offsetLeft.current || !offsetTop.current)) {\n offsetLeft.current = getOffsetLeft(element) - offset.current\n offsetTop.current = getOffsetTop(element) - offset.current\n }\n\n const scrollY =\n window.scrollY !== undefined ? window.scrollY : window.pageYOffset\n const scrollX =\n window.scrollX !== undefined ? window.scrollX : window.pageXOffset\n const top =\n (isTrue(fixedPosition) ? 0 : scrollY) + rect.top - offsetTop.current\n\n // Use Mouse position when target is too wide\n const useMouseWhen = targetBodySize.width > 400\n const mousePos =\n getOffsetLeft(target) +\n rect.left / 2 +\n (element ? element.offsetWidth : 0)\n const widthBased = scrollX + rect.left\n const left =\n (useMouseWhen && mousePos < targetBodySize.width\n ? mousePos\n : widthBased) - offsetLeft.current\n\n const style = { ...props.style }\n const arrowStyle = { top: null, left: null }\n\n if (align === 'left') {\n alignOffset = -targetBodySize.width / 2\n } else if (align === 'right') {\n alignOffset = targetBodySize.width / 2\n }\n\n const topHorizontal =\n top + targetBodySize.height / 2 - elementHeight / 2\n const leftVertical =\n left - elementWidth / 2 + targetBodySize.width / 2 + alignOffset\n\n const stylesFromPosition = {\n left: () => {\n style.top = topHorizontal\n style.left = left - elementWidth - offset.current\n },\n right: () => {\n style.top = topHorizontal\n style.left = left + targetBodySize.width + offset.current\n },\n top: () => {\n style.left = leftVertical\n style.top = top - elementHeight - offset.current\n },\n bottom: () => {\n style.left = leftVertical\n style.top = top + targetBodySize.height + offset.current\n },\n }\n\n const stylesFromArrow = {\n left: () => {\n style.left =\n left + targetBodySize.width / 2 - offset.current + alignOffset\n },\n right: () => {\n style.left =\n left -\n elementWidth +\n targetBodySize.width / 2 +\n offset.current +\n alignOffset\n },\n top: () => {\n style.top = top + targetBodySize.height / 2 - offset.current\n },\n bottom: () => {\n style.top =\n top + targetBodySize.height / 2 - elementHeight + offset.current\n },\n }\n\n stylesFromPosition[position]?.()\n stylesFromArrow[arrow]?.()\n\n const rightOffset =\n parseFloat(String(style.left)) + elementWidth - window.innerWidth\n if (rightOffset > 0) {\n style.left = window.innerWidth - elementWidth\n }\n if (parseFloat(String(style.left)) < 0) {\n style.left = 0\n if (position === 'top' || position === 'bottom') {\n const arrowWidth = 16 // 1rem\n const arrowStyleBasisWidth = left - arrowWidth / 2\n if (align === 'left') {\n arrowStyle.left = arrowStyleBasisWidth\n } else if (align === 'right') {\n arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width\n } else {\n arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width / 2\n }\n }\n }\n if (parseFloat(String(style.top)) < 0) {\n style.top = 0\n arrowStyle.top = 0\n }\n\n setStyle(style)\n setArrowStyle(arrowStyle)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active, arrow, position, children, renewStyles])\n\n const handleMouseEnter = () => {\n if (isTrue(active) && useHover !== false) {\n setHover(true)\n }\n }\n\n const handleMouseLeave = () => {\n if (useHover !== false) {\n setHover(false)\n }\n }\n\n /**\n * By stopping propagation, we allow the user to select text when Tooltip is used in the Slider component\n */\n const handlePropagation = (e: React.SyntheticEvent) =>\n e.stopPropagation()\n\n return (\n <span\n role=\"tooltip\"\n aria-hidden={target ? true : undefined} // make sure SR does not find it in the DOM, because we use \"aria-describedby\" for that\n ref={elementRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onMouseMove={handlePropagation}\n onMouseDown={handlePropagation}\n onTouchStart={handlePropagation}\n {...attributes}\n className={classnames(\n attributes?.className,\n isTrue(noAnimation) && 'dnb-tooltip--no-animation',\n isTrue(fixedPosition) && 'dnb-tooltip--fixed',\n isActive && 'dnb-tooltip--active',\n !isActive && wasActive && 'dnb-tooltip--hide'\n )}\n style={{ ...style, ...attributes.style }}\n >\n {arrow && (\n <span\n className={classnames(\n 'dnb-tooltip__arrow',\n `dnb-tooltip__arrow__arrow--${arrow}`,\n `dnb-tooltip__arrow__position--${position}`\n )}\n style={{ ...arrowStyle }}\n />\n )}\n\n <span id={internalId} className=\"dnb-tooltip__content\">\n {children}\n </span>\n </span>\n )\n}\n"],"mappings":";;;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,W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AAChB,aAAa,CAAC,IAAI,oBAG3B,CAAE;IACFO,KAAK,EAAAjC,aAAA,CAAAA,aAAA,KAAOiC,KAAK,GAAKZ,UAAU,CAACY,KAAK;EAAG,IAExCX,KAAK,IACJnD,MAAA,CAAAQ,OAAA,CAAAkI,aAAA;IACEQ,SAAS,mDAEuB/F,KAAK,kCACFC,QAAQ,EACzC;IACFU,KAAK,EAAAjC,aAAA,KAAOqC,UAAU;EAAG,CAC1B,CACF,EAEDlE,MAAA,CAAAQ,OAAA,CAAAkI,aAAA;IAAMU,EAAE,EAAEpG,UAAW;IAACkG,SAAS,EAAC;EAAsB,GACnDvF,QACG,CACF,CAAC;AAEX","ignoreList":[]}
|
package/cjs/shared/Eufemia.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "10.71.
|
|
1
|
+
export declare const version = "10.71.2";
|
|
2
2
|
export declare function init(): void;
|
package/cjs/shared/Eufemia.js
CHANGED
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.init = init;
|
|
7
7
|
exports.version = void 0;
|
|
8
|
-
const version = exports.version = '10.71.
|
|
8
|
+
const version = exports.version = '10.71.2';
|
|
9
9
|
function init() {
|
|
10
10
|
if (typeof window !== 'undefined') {
|
|
11
11
|
class Eufemia {
|
|
12
12
|
get version() {
|
|
13
|
-
return '10.71.
|
|
13
|
+
return '10.71.2';
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
window.Eufemia = new Eufemia();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Eufemia.js","names":["version","exports","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.71.
|
|
1
|
+
{"version":3,"file":"Eufemia.js","names":["version","exports","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.71.2'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.71.2'\n }\n }\n\n window.Eufemia = new Eufemia()\n }\n}\n"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,SAAS;AAEzB,SAASE,IAAIA,CAAA,EAAG;EACrB,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMC,OAAO,CAAC;MACZ,IAAIJ,OAAOA,CAAA,EAAG;QACZ,OAAO,SAAS;MAClB;IACF;IAEAG,MAAM,CAACC,OAAO,GAAG,IAAIA,OAAO,CAAC,CAAC;EAChC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{margin:0}.dnb-core-style{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.71.
|
|
1
|
+
@charset "UTF-8";html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{margin:0}.dnb-core-style{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.71.2";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr{height:0;overflow:visible}.dnb-core-style main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul{list-style:none}.dnb-core-style abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video{display:inline-block}.dnb-core-style audio:not([controls]){display:none;height:0}.dnb-core-style img{border-style:none}.dnb-core-style svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root){overflow:hidden}.dnb-core-style table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select{margin:0}.dnb-core-style button{overflow:visible;text-transform:none}.dnb-core-style input{overflow:visible;word-break:normal}.dnb-core-style legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress{display:inline-block;vertical-align:baseline}.dnb-core-style select{text-transform:none}.dnb-core-style textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio]{padding:0}.dnb-core-style input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details{display:block}.dnb-core-style summary{display:list-item}.dnb-core-style canvas{display:inline-block}.dnb-core-style template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea{touch-action:manipulation}.dnb-core-style [hidden]{display:none}.dnb-core-style [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:""}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.71.
|
|
1
|
+
html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.71.2";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}body :after,body :before{text-decoration:inherit;vertical-align:inherit}body hr{height:0;overflow:visible}body main{display:block}body nav ol,body nav ul{list-style:none}body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}body b,body strong{font-weight:bolder}body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}body audio,body video{display:inline-block}body audio:not([controls]){display:none;height:0}body img{border-style:none}body svg:not([fill]){fill:currentcolor}body svg:not(:root){overflow:hidden}body table{border-collapse:collapse}body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}body button,body figure,body input,body select{margin:0}body button{overflow:visible;text-transform:none}body input{overflow:visible;word-break:normal}body legend{color:inherit;display:table;max-width:100%;white-space:normal}body progress{display:inline-block;vertical-align:baseline}body select{text-transform:none}body textarea{overflow:auto;resize:vertical}body [type=checkbox],body [type=radio]{padding:0}body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}body ::input-placeholder{color:inherit;opacity:.54}body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}body ::-moz-focus-inner{border-style:none;padding:0}body details{display:block}body summary{display:list-item}body canvas{display:inline-block}body template{display:none}body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}body [hidden]{display:none}body [aria-busy=true]{cursor:progress}body [aria-controls]:not(input){cursor:pointer}body [aria-disabled=true],body [disabled]{cursor:not-allowed}body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{body{background-color:#fff;color:#000}}body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}.dnb-core-style,body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.71.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before,body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before,body :after,body :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr,body hr{height:0;overflow:visible}.dnb-core-style main,body main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul,body nav ol,body nav ul{list-style:none}.dnb-core-style abbr[title],body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong,body b,body strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp,body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection,body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video,body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video,body audio,body video{display:inline-block}.dnb-core-style audio:not([controls]),body audio:not([controls]){display:none;height:0}.dnb-core-style img,body img{border-style:none}.dnb-core-style svg:not([fill]),body svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root),body svg:not(:root){overflow:hidden}.dnb-core-style table,body table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea,body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select,body button,body figure,body input,body select{margin:0}.dnb-core-style button,body button{overflow:visible;text-transform:none}.dnb-core-style input,body input{overflow:visible;word-break:normal}.dnb-core-style legend,body legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress,body progress{display:inline-block;vertical-align:baseline}.dnb-core-style select,body select{text-transform:none}.dnb-core-style textarea,body textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio],body [type=checkbox],body [type=radio]{padding:0}.dnb-core-style input[type=search],body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button,body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder,body ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration,body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button,body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner,body ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details,body details{display:block}.dnb-core-style summary,body summary{display:list-item}.dnb-core-style canvas,body canvas{display:inline-block}.dnb-core-style template,body template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea,body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}.dnb-core-style [hidden],body [hidden]{display:none}.dnb-core-style [aria-busy=true],body [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input),body [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled],body [aria-disabled=true],body [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus),body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style,body{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme,body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:""}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
|
|
1
|
+
@charset "UTF-8";html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{padding:0;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}.dnb-core-style,body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.71.2";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before,body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before,body :after,body :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr,body hr{height:0;overflow:visible}.dnb-core-style main,body main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul,body nav ol,body nav ul{list-style:none}.dnb-core-style abbr[title],body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong,body b,body strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp,body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection,body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video,body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video,body audio,body video{display:inline-block}.dnb-core-style audio:not([controls]),body audio:not([controls]){display:none;height:0}.dnb-core-style img,body img{border-style:none}.dnb-core-style svg:not([fill]),body svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root),body svg:not(:root){overflow:hidden}.dnb-core-style table,body table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea,body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select,body button,body figure,body input,body select{margin:0}.dnb-core-style button,body button{overflow:visible;text-transform:none}.dnb-core-style input,body input{overflow:visible;word-break:normal}.dnb-core-style legend,body legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress,body progress{display:inline-block;vertical-align:baseline}.dnb-core-style select,body select{text-transform:none}.dnb-core-style textarea,body textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio],body [type=checkbox],body [type=radio]{padding:0}.dnb-core-style input[type=search],body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button,body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder,body ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration,body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button,body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner,body ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details,body details{display:block}.dnb-core-style summary,body summary{display:list-item}.dnb-core-style canvas,body canvas{display:inline-block}.dnb-core-style template,body template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea,body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}.dnb-core-style [hidden],body [hidden]{display:none}.dnb-core-style [aria-busy=true],body [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input),body [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled],body [aria-disabled=true],body [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus),body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style,body{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme,body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:""}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
|
|
@@ -24,6 +24,7 @@ export default function TooltipContainer(props) {
|
|
|
24
24
|
targetElement: target
|
|
25
25
|
} = props;
|
|
26
26
|
const [style, setStyle] = React.useState(null);
|
|
27
|
+
const [arrowStyle, setArrowStyle] = React.useState(null);
|
|
27
28
|
const [hover, setHover] = React.useState(false);
|
|
28
29
|
const isActive = isTrue(active) || hover;
|
|
29
30
|
const [wasActive, makeActive] = React.useState(false);
|
|
@@ -74,6 +75,7 @@ export default function TooltipContainer(props) {
|
|
|
74
75
|
const offsetLeft = React.useRef(0);
|
|
75
76
|
const offsetTop = React.useRef(0);
|
|
76
77
|
React.useLayoutEffect(() => {
|
|
78
|
+
var _stylesFromPosition$p, _stylesFromArrow$arro;
|
|
77
79
|
if (!isActive) {
|
|
78
80
|
if (wasActive) {
|
|
79
81
|
clearTimeout(debounceTimeout.current);
|
|
@@ -109,6 +111,10 @@ export default function TooltipContainer(props) {
|
|
|
109
111
|
const widthBased = scrollX + rect.left;
|
|
110
112
|
const left = (useMouseWhen && mousePos < targetBodySize.width ? mousePos : widthBased) - offsetLeft.current;
|
|
111
113
|
const style = _objectSpread({}, props.style);
|
|
114
|
+
const arrowStyle = {
|
|
115
|
+
top: null,
|
|
116
|
+
left: null
|
|
117
|
+
};
|
|
112
118
|
if (align === 'left') {
|
|
113
119
|
alignOffset = -targetBodySize.width / 2;
|
|
114
120
|
} else if (align === 'right') {
|
|
@@ -148,23 +154,32 @@ export default function TooltipContainer(props) {
|
|
|
148
154
|
style.top = top + targetBodySize.height / 2 - elementHeight + offset.current;
|
|
149
155
|
}
|
|
150
156
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
if (stylesFromArrow[arrow]) {
|
|
155
|
-
stylesFromArrow[arrow]();
|
|
156
|
-
}
|
|
157
|
+
(_stylesFromPosition$p = stylesFromPosition[position]) === null || _stylesFromPosition$p === void 0 ? void 0 : _stylesFromPosition$p.call(stylesFromPosition);
|
|
158
|
+
(_stylesFromArrow$arro = stylesFromArrow[arrow]) === null || _stylesFromArrow$arro === void 0 ? void 0 : _stylesFromArrow$arro.call(stylesFromArrow);
|
|
157
159
|
const rightOffset = parseFloat(String(style.left)) + elementWidth - window.innerWidth;
|
|
158
160
|
if (rightOffset > 0) {
|
|
159
161
|
style.left = window.innerWidth - elementWidth;
|
|
160
162
|
}
|
|
161
163
|
if (parseFloat(String(style.left)) < 0) {
|
|
162
164
|
style.left = 0;
|
|
165
|
+
if (position === 'top' || position === 'bottom') {
|
|
166
|
+
const arrowWidth = 16;
|
|
167
|
+
const arrowStyleBasisWidth = left - arrowWidth / 2;
|
|
168
|
+
if (align === 'left') {
|
|
169
|
+
arrowStyle.left = arrowStyleBasisWidth;
|
|
170
|
+
} else if (align === 'right') {
|
|
171
|
+
arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width;
|
|
172
|
+
} else {
|
|
173
|
+
arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width / 2;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
163
176
|
}
|
|
164
177
|
if (parseFloat(String(style.top)) < 0) {
|
|
165
178
|
style.top = 0;
|
|
179
|
+
arrowStyle.top = 0;
|
|
166
180
|
}
|
|
167
181
|
setStyle(style);
|
|
182
|
+
setArrowStyle(arrowStyle);
|
|
168
183
|
}, [active, arrow, position, children, renewStyles]);
|
|
169
184
|
const handleMouseEnter = () => {
|
|
170
185
|
if (isTrue(active) && useHover !== false) {
|
|
@@ -190,7 +205,8 @@ export default function TooltipContainer(props) {
|
|
|
190
205
|
className: classnames(attributes === null || attributes === void 0 ? void 0 : attributes.className, isActive ? 'dnb-tooltip--active' : wasActive && 'dnb-tooltip--hide', isTrue(noAnimation) && 'dnb-tooltip--no-animation', isTrue(fixedPosition) && 'dnb-tooltip--fixed'),
|
|
191
206
|
style: _objectSpread(_objectSpread({}, style), attributes.style)
|
|
192
207
|
}), arrow && React.createElement("span", {
|
|
193
|
-
className: `dnb-tooltip__arrow dnb-tooltip__arrow__arrow--${arrow} dnb-tooltip__arrow__position--${position}
|
|
208
|
+
className: `dnb-tooltip__arrow dnb-tooltip__arrow__arrow--${arrow} dnb-tooltip__arrow__position--${position}`,
|
|
209
|
+
style: _objectSpread({}, arrowStyle)
|
|
194
210
|
}), React.createElement("span", {
|
|
195
211
|
id: internalId,
|
|
196
212
|
className: "dnb-tooltip__content"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContainer.js","names":["React","isTrue","getOffsetLeft","getOffsetTop","classnames","TooltipContainer","props","internalId","active","attributes","arrow","position","align","hideDelay","fixedPosition","noAnimation","skipPortal","useHover","children","targetElement","target","style","setStyle","useState","hover","setHover","isActive","wasActive","makeActive","renewStyles","forceRerender","getBodySize","elementRef","useRef","offset","debounceTimeout","resizeObserver","document","width","height","body","getBoundingClientRect","clearTimers","clearTimeout","current","useLayoutEffect","addPositionObserver","ResizeObserver","setTimeout","observe","e","removePositionObserver","_resizeObserver$curre","disconnect","offsetLeft","offsetTop","element","window","alignOffset","elementWidth","offsetWidth","elementHeight","offsetHeight","rect","targetBodySize","scrollY","undefined","pageYOffset","scrollX","pageXOffset","top","useMouseWhen","mousePos","left","widthBased","_objectSpread","topHorizontal","leftVertical","stylesFromPosition","right","bottom","stylesFromArrow","rightOffset","parseFloat","String","innerWidth","handleMouseEnter","handleMouseLeave","handlePropagation","stopPropagation","createElement","_extends","role","ref","onMouseEnter","onMouseLeave","onMouseMove","onMouseDown","onTouchStart","className","id"],"sources":["../../../../src/components/tooltip/TooltipContainer.tsx"],"sourcesContent":["/**\n * Web Tooltip Component\n *\n */\n\nimport React from 'react'\nimport { isTrue } from '../../shared/component-helper'\nimport { getOffsetLeft, getOffsetTop } from '../../shared/helpers'\nimport classnames from 'classnames'\nimport { TooltipProps } from './types'\n\ntype TooltipContainerProps = {\n targetElement: HTMLElement\n style?: React.CSSProperties\n useHover?: boolean\n internalId?: string\n attributes?: Record<string, unknown> & { style: React.CSSProperties }\n}\n\nexport default function TooltipContainer(\n props: TooltipProps & TooltipContainerProps\n) {\n const {\n internalId,\n active,\n attributes,\n arrow,\n position,\n align,\n hideDelay,\n fixedPosition,\n noAnimation,\n skipPortal,\n useHover,\n children,\n targetElement: target,\n } = props\n\n const [style, setStyle] = React.useState(null)\n const [hover, setHover] = React.useState(false)\n const isActive = isTrue(active) || hover\n const [wasActive, makeActive] = React.useState(false)\n const [renewStyles, forceRerender] = React.useState(getBodySize)\n\n const elementRef = React.useRef<HTMLSpanElement>(null)\n const offset = React.useRef(16)\n const debounceTimeout = React.useRef<NodeJS.Timeout>()\n const resizeObserver = React.useRef<ResizeObserver>(null)\n\n function getBodySize() {\n if (!isActive || typeof document === 'undefined') {\n return 0 // stop here\n }\n\n const { width, height } = document.body.getBoundingClientRect()\n\n return width + height\n }\n\n const clearTimers = () => {\n clearTimeout(debounceTimeout.current)\n }\n\n React.useLayoutEffect(() => {\n const addPositionObserver = () => {\n if (resizeObserver.current || typeof document === 'undefined') {\n return // stop here\n }\n\n try {\n resizeObserver.current = new ResizeObserver(() => {\n clearTimers()\n debounceTimeout.current = setTimeout(\n () => forceRerender(getBodySize()),\n 100\n )\n })\n\n resizeObserver.current.observe(document.body)\n } catch (e) {\n //\n }\n }\n const removePositionObserver = () => {\n clearTimers()\n resizeObserver.current?.disconnect()\n }\n\n if (isActive) {\n makeActive(true)\n addPositionObserver()\n } else {\n removePositionObserver()\n }\n\n return removePositionObserver\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isActive])\n\n const offsetLeft = React.useRef(0)\n const offsetTop = React.useRef(0)\n\n React.useLayoutEffect(() => {\n if (!isActive) {\n /**\n * This \"resets\" the position between elements,\n * when not active. Else it will always first show on the older position.\n */\n if (wasActive) {\n clearTimeout(debounceTimeout.current)\n debounceTimeout.current = setTimeout(\n () => setStyle(null),\n hideDelay\n )\n }\n return // stop here\n }\n\n const element = elementRef?.current\n\n if (\n typeof window === 'undefined' ||\n !element ||\n !target?.getBoundingClientRect\n ) {\n return // stop here\n }\n\n let alignOffset = 0\n\n const elementWidth = element.offsetWidth\n const elementHeight = element.offsetHeight\n const rect = target.getBoundingClientRect()\n const targetBodySize = {\n width: target.offsetWidth,\n height: target.offsetHeight,\n }\n\n // fix for svg\n if (!target.offsetHeight) {\n targetBodySize.width = rect.width\n targetBodySize.height = rect.height\n }\n\n if (skipPortal && (!offsetLeft.current || !offsetTop.current)) {\n offsetLeft.current = getOffsetLeft(element) - offset.current\n offsetTop.current = getOffsetTop(element) - offset.current\n }\n\n const scrollY =\n window.scrollY !== undefined ? window.scrollY : window.pageYOffset\n const scrollX =\n window.scrollX !== undefined ? window.scrollX : window.pageXOffset\n const top =\n (isTrue(fixedPosition) ? 0 : scrollY) + rect.top - offsetTop.current\n\n // Use Mouse position when target is too wide\n const useMouseWhen = targetBodySize.width > 400\n const mousePos =\n getOffsetLeft(target) +\n rect.left / 2 +\n (element ? element.offsetWidth : 0)\n const widthBased = scrollX + rect.left\n const left =\n (useMouseWhen && mousePos < targetBodySize.width\n ? mousePos\n : widthBased) - offsetLeft.current\n\n const style = { ...props.style }\n\n if (align === 'left') {\n alignOffset = -targetBodySize.width / 2\n } else if (align === 'right') {\n alignOffset = targetBodySize.width / 2\n }\n\n const topHorizontal =\n top + targetBodySize.height / 2 - elementHeight / 2\n const leftVertical =\n left - elementWidth / 2 + targetBodySize.width / 2 + alignOffset\n\n const stylesFromPosition = {\n left: () => {\n style.top = topHorizontal\n style.left = left - elementWidth - offset.current\n },\n right: () => {\n style.top = topHorizontal\n style.left = left + targetBodySize.width + offset.current\n },\n top: () => {\n style.left = leftVertical\n style.top = top - elementHeight - offset.current\n },\n bottom: () => {\n style.left = leftVertical\n style.top = top + targetBodySize.height + offset.current\n },\n }\n\n const stylesFromArrow = {\n left: () => {\n style.left =\n left + targetBodySize.width / 2 - offset.current + alignOffset\n },\n right: () => {\n style.left =\n left -\n elementWidth +\n targetBodySize.width / 2 +\n offset.current +\n alignOffset\n },\n top: () => {\n style.top = top + targetBodySize.height / 2 - offset.current\n },\n bottom: () => {\n style.top =\n top + targetBodySize.height / 2 - elementHeight + offset.current\n },\n }\n\n if (stylesFromPosition[position]) {\n stylesFromPosition[position]()\n }\n if (stylesFromArrow[arrow]) {\n stylesFromArrow[arrow]()\n }\n\n const rightOffset =\n parseFloat(String(style.left)) + elementWidth - window.innerWidth\n if (rightOffset > 0) {\n style.left = window.innerWidth - elementWidth\n }\n\n if (parseFloat(String(style.left)) < 0) {\n style.left = 0\n }\n if (parseFloat(String(style.top)) < 0) {\n style.top = 0\n }\n\n setStyle(style)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active, arrow, position, children, renewStyles])\n\n const handleMouseEnter = () => {\n if (isTrue(active) && useHover !== false) {\n setHover(true)\n }\n }\n\n const handleMouseLeave = () => {\n if (useHover !== false) {\n setHover(false)\n }\n }\n\n /**\n * By stopping propagation, we allow the user to select text when Tooltip is used in the Slider component\n */\n const handlePropagation = (e: React.SyntheticEvent) =>\n e.stopPropagation()\n\n return (\n <span\n role=\"tooltip\"\n aria-hidden={target ? true : undefined} // make sure SR does not find it in the DOM, because we use \"aria-describedby\" for that\n ref={elementRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onMouseMove={handlePropagation}\n onMouseDown={handlePropagation}\n onTouchStart={handlePropagation}\n {...attributes}\n className={classnames(\n attributes?.className,\n isTrue(noAnimation) && 'dnb-tooltip--no-animation',\n isTrue(fixedPosition) && 'dnb-tooltip--fixed',\n isActive && 'dnb-tooltip--active',\n !isActive && wasActive && 'dnb-tooltip--hide'\n )}\n style={{ ...style, ...attributes.style }}\n >\n {arrow && (\n <span\n className={classnames(\n 'dnb-tooltip__arrow',\n `dnb-tooltip__arrow__arrow--${arrow}`,\n `dnb-tooltip__arrow__position--${position}`\n )}\n />\n )}\n\n <span id={internalId} className=\"dnb-tooltip__content\">\n {children}\n </span>\n </span>\n )\n}\n"],"mappings":";;;;;AAKA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,+BAA+B;AACtD,SAASC,aAAa,EAAEC,YAAY,QAAQ,sBAAsB;AAClE,OAAOC,UAAU,MAAM,YAAY;AAWnC,eAAe,SAASC,gBAAgBA,CACtCC,KAA2C,EAC3C;EACA,MAAM;IACJC,UAAU;IACVC,MAAM;IACNC,UAAU;IACVC,KAAK;IACLC,QAAQ;IACRC,KAAK;IACLC,SAAS;IACTC,aAAa;IACbC,WAAW;IACXC,UAAU;IACVC,QAAQ;IACRC,QAAQ;IACRC,aAAa,EAAEC;EACjB,CAAC,GAAGd,KAAK;EAET,MAAM,CAACe,KAAK,EAAEC,QAAQ,CAAC,GAAGtB,KAAK,CAACuB,QAAQ,CAAC,IAAI,CAAC;EAC9C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGzB,KAAK,CAACuB,QAAQ,CAAC,KAAK,CAAC;EAC/C,MAAMG,QAAQ,GAAGzB,MAAM,CAACO,MAAM,CAAC,IAAIgB,KAAK;EACxC,MAAM,CAACG,SAAS,EAAEC,UAAU,CAAC,GAAG5B,KAAK,CAACuB,QAAQ,CAAC,KAAK,CAAC;EACrD,MAAM,CAACM,WAAW,EAAEC,aAAa,CAAC,GAAG9B,KAAK,CAACuB,QAAQ,CAACQ,W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AA0F,aAAA;IACES,SAAS,mDAEuBzF,KAAK,kCACFC,QAAQ;EACzC,CACH,CACF,EAEDX,KAAA,CAAA0F,aAAA;IAAMU,EAAE,EAAE7F,UAAW;IAAC4F,SAAS,EAAC;EAAsB,GACnDjF,QACG,CACF,CAAC;AAEX","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"TooltipContainer.js","names":["React","isTrue","getOffsetLeft","getOffsetTop","classnames","TooltipContainer","props","internalId","active","attributes","arrow","position","align","hideDelay","fixedPosition","noAnimation","skipPortal","useHover","children","targetElement","target","style","setStyle","useState","arrowStyle","setArrowStyle","hover","setHover","isActive","wasActive","makeActive","renewStyles","forceRerender","getBodySize","elementRef","useRef","offset","debounceTimeout","resizeObserver","document","width","height","body","getBoundingClientRect","clearTimers","clearTimeout","current","useLayoutEffect","addPositionObserver","ResizeObserver","setTimeout","observe","e","removePositionObserver","_resizeObserver$curre","disconnect","offsetLeft","offsetTop","_stylesFromPosition$p","_stylesFromArrow$arro","element","window","alignOffset","elementWidth","offsetWidth","elementHeight","offsetHeight","rect","targetBodySize","scrollY","undefined","pageYOffset","scrollX","pageXOffset","top","useMouseWhen","mousePos","left","widthBased","_objectSpread","topHorizontal","leftVertical","stylesFromPosition","right","bottom","stylesFromArrow","call","rightOffset","parseFloat","String","innerWidth","arrowWidth","arrowStyleBasisWidth","handleMouseEnter","handleMouseLeave","handlePropagation","stopPropagation","createElement","_extends","role","ref","onMouseEnter","onMouseLeave","onMouseMove","onMouseDown","onTouchStart","className","id"],"sources":["../../../../src/components/tooltip/TooltipContainer.tsx"],"sourcesContent":["/**\n * Web Tooltip Component\n *\n */\n\nimport React from 'react'\nimport { isTrue } from '../../shared/component-helper'\nimport { getOffsetLeft, getOffsetTop } from '../../shared/helpers'\nimport classnames from 'classnames'\nimport { TooltipProps } from './types'\n\ntype TooltipContainerProps = {\n targetElement: HTMLElement\n style?: React.CSSProperties\n useHover?: boolean\n internalId?: string\n attributes?: Record<string, unknown> & { style: React.CSSProperties }\n}\n\nexport default function TooltipContainer(\n props: TooltipProps & TooltipContainerProps\n) {\n const {\n internalId,\n active,\n attributes,\n arrow,\n position,\n align,\n hideDelay,\n fixedPosition,\n noAnimation,\n skipPortal,\n useHover,\n children,\n targetElement: target,\n } = props\n\n const [style, setStyle] = React.useState(null)\n const [arrowStyle, setArrowStyle] = React.useState(null)\n const [hover, setHover] = React.useState(false)\n const isActive = isTrue(active) || hover\n const [wasActive, makeActive] = React.useState(false)\n const [renewStyles, forceRerender] = React.useState(getBodySize)\n\n const elementRef = React.useRef<HTMLSpanElement>(null)\n const offset = React.useRef(16)\n const debounceTimeout = React.useRef<NodeJS.Timeout>()\n const resizeObserver = React.useRef<ResizeObserver>(null)\n\n function getBodySize() {\n if (!isActive || typeof document === 'undefined') {\n return 0 // stop here\n }\n\n const { width, height } = document.body.getBoundingClientRect()\n\n return width + height\n }\n\n const clearTimers = () => {\n clearTimeout(debounceTimeout.current)\n }\n\n React.useLayoutEffect(() => {\n const addPositionObserver = () => {\n if (resizeObserver.current || typeof document === 'undefined') {\n return // stop here\n }\n\n try {\n resizeObserver.current = new ResizeObserver(() => {\n clearTimers()\n debounceTimeout.current = setTimeout(\n () => forceRerender(getBodySize()),\n 100\n )\n })\n\n resizeObserver.current.observe(document.body)\n } catch (e) {\n //\n }\n }\n const removePositionObserver = () => {\n clearTimers()\n resizeObserver.current?.disconnect()\n }\n\n if (isActive) {\n makeActive(true)\n addPositionObserver()\n } else {\n removePositionObserver()\n }\n\n return removePositionObserver\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isActive])\n\n const offsetLeft = React.useRef(0)\n const offsetTop = React.useRef(0)\n\n React.useLayoutEffect(() => {\n if (!isActive) {\n /**\n * This \"resets\" the position between elements,\n * when not active. Else it will always first show on the older position.\n */\n if (wasActive) {\n clearTimeout(debounceTimeout.current)\n debounceTimeout.current = setTimeout(\n () => setStyle(null),\n hideDelay\n )\n }\n return // stop here\n }\n\n const element = elementRef?.current\n\n if (\n typeof window === 'undefined' ||\n !element ||\n !target?.getBoundingClientRect\n ) {\n return // stop here\n }\n\n let alignOffset = 0\n\n const elementWidth = element.offsetWidth\n const elementHeight = element.offsetHeight\n const rect = target.getBoundingClientRect()\n const targetBodySize = {\n width: target.offsetWidth,\n height: target.offsetHeight,\n }\n\n // fix for svg\n if (!target.offsetHeight) {\n targetBodySize.width = rect.width\n targetBodySize.height = rect.height\n }\n\n if (skipPortal && (!offsetLeft.current || !offsetTop.current)) {\n offsetLeft.current = getOffsetLeft(element) - offset.current\n offsetTop.current = getOffsetTop(element) - offset.current\n }\n\n const scrollY =\n window.scrollY !== undefined ? window.scrollY : window.pageYOffset\n const scrollX =\n window.scrollX !== undefined ? window.scrollX : window.pageXOffset\n const top =\n (isTrue(fixedPosition) ? 0 : scrollY) + rect.top - offsetTop.current\n\n // Use Mouse position when target is too wide\n const useMouseWhen = targetBodySize.width > 400\n const mousePos =\n getOffsetLeft(target) +\n rect.left / 2 +\n (element ? element.offsetWidth : 0)\n const widthBased = scrollX + rect.left\n const left =\n (useMouseWhen && mousePos < targetBodySize.width\n ? mousePos\n : widthBased) - offsetLeft.current\n\n const style = { ...props.style }\n const arrowStyle = { top: null, left: null }\n\n if (align === 'left') {\n alignOffset = -targetBodySize.width / 2\n } else if (align === 'right') {\n alignOffset = targetBodySize.width / 2\n }\n\n const topHorizontal =\n top + targetBodySize.height / 2 - elementHeight / 2\n const leftVertical =\n left - elementWidth / 2 + targetBodySize.width / 2 + alignOffset\n\n const stylesFromPosition = {\n left: () => {\n style.top = topHorizontal\n style.left = left - elementWidth - offset.current\n },\n right: () => {\n style.top = topHorizontal\n style.left = left + targetBodySize.width + offset.current\n },\n top: () => {\n style.left = leftVertical\n style.top = top - elementHeight - offset.current\n },\n bottom: () => {\n style.left = leftVertical\n style.top = top + targetBodySize.height + offset.current\n },\n }\n\n const stylesFromArrow = {\n left: () => {\n style.left =\n left + targetBodySize.width / 2 - offset.current + alignOffset\n },\n right: () => {\n style.left =\n left -\n elementWidth +\n targetBodySize.width / 2 +\n offset.current +\n alignOffset\n },\n top: () => {\n style.top = top + targetBodySize.height / 2 - offset.current\n },\n bottom: () => {\n style.top =\n top + targetBodySize.height / 2 - elementHeight + offset.current\n },\n }\n\n stylesFromPosition[position]?.()\n stylesFromArrow[arrow]?.()\n\n const rightOffset =\n parseFloat(String(style.left)) + elementWidth - window.innerWidth\n if (rightOffset > 0) {\n style.left = window.innerWidth - elementWidth\n }\n if (parseFloat(String(style.left)) < 0) {\n style.left = 0\n if (position === 'top' || position === 'bottom') {\n const arrowWidth = 16 // 1rem\n const arrowStyleBasisWidth = left - arrowWidth / 2\n if (align === 'left') {\n arrowStyle.left = arrowStyleBasisWidth\n } else if (align === 'right') {\n arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width\n } else {\n arrowStyle.left = arrowStyleBasisWidth + targetBodySize.width / 2\n }\n }\n }\n if (parseFloat(String(style.top)) < 0) {\n style.top = 0\n arrowStyle.top = 0\n }\n\n setStyle(style)\n setArrowStyle(arrowStyle)\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active, arrow, position, children, renewStyles])\n\n const handleMouseEnter = () => {\n if (isTrue(active) && useHover !== false) {\n setHover(true)\n }\n }\n\n const handleMouseLeave = () => {\n if (useHover !== false) {\n setHover(false)\n }\n }\n\n /**\n * By stopping propagation, we allow the user to select text when Tooltip is used in the Slider component\n */\n const handlePropagation = (e: React.SyntheticEvent) =>\n e.stopPropagation()\n\n return (\n <span\n role=\"tooltip\"\n aria-hidden={target ? true : undefined} // make sure SR does not find it in the DOM, because we use \"aria-describedby\" for that\n ref={elementRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onMouseMove={handlePropagation}\n onMouseDown={handlePropagation}\n onTouchStart={handlePropagation}\n {...attributes}\n className={classnames(\n attributes?.className,\n isTrue(noAnimation) && 'dnb-tooltip--no-animation',\n isTrue(fixedPosition) && 'dnb-tooltip--fixed',\n isActive && 'dnb-tooltip--active',\n !isActive && wasActive && 'dnb-tooltip--hide'\n )}\n style={{ ...style, ...attributes.style }}\n >\n {arrow && (\n <span\n className={classnames(\n 'dnb-tooltip__arrow',\n `dnb-tooltip__arrow__arrow--${arrow}`,\n `dnb-tooltip__arrow__position--${position}`\n )}\n style={{ ...arrowStyle }}\n />\n )}\n\n <span id={internalId} className=\"dnb-tooltip__content\">\n {children}\n </span>\n </span>\n )\n}\n"],"mappings":";;;;;AAKA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAQ,+BAA+B;AACtD,SAASC,aAAa,EAAEC,YAAY,QAAQ,sBAAsB;AAClE,OAAOC,UAAU,MAAM,YAAY;AAWnC,eAAe,SAASC,gBAAgBA,CACtCC,KAA2C,EAC3C;EACA,MAAM;IACJC,UAAU;IACVC,MAAM;IACNC,UAAU;IACVC,KAAK;IACLC,QAAQ;IACRC,KAAK;IACLC,SAAS;IACTC,aAAa;IACbC,WAAW;IACXC,UAAU;IACVC,QAAQ;IACRC,QAAQ;IACRC,aAAa,EAAEC;EACjB,CAAC,GAAGd,KAAK;EAET,MAAM,CAACe,KAAK,EAAEC,QAAQ,CAAC,GAAGtB,KAAK,CAACuB,QAAQ,CAAC,IAAI,CAAC;EAC9C,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGzB,KAAK,CAACuB,QAAQ,CAAC,IAAI,CAAC;EACxD,MAAM,CAACG,KAAK,EAAEC,QAAQ,CAAC,GAAG3B,KAAK,CAACuB,QAAQ,CAAC,KAAK,CAAC;EAC/C,MAAMK,QAAQ,GAAG3B,MAAM,CAACO,MAAM,CAAC,IAAIkB,KAAK;EACxC,MAAM,CAACG,SAAS,EAAEC,UAAU,CAAC,GAAG9B,KAAK,CAACuB,QAAQ,CAAC,KAAK,CAAC;EACrD,MAAM,CAACQ,WAAW,EAAEC,aAAa,CAAC,GAAGhC,KAAK,CAACuB,QAAQ,CAACU,WAAW,CAAC;EAEhE,MAAMC,UAAU,GAAGlC,KAA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