@beeq/core 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beeq/beeq.esm.js +1 -1
- package/dist/beeq/index.esm.js +1 -1
- package/dist/beeq/index.esm.js.map +1 -1
- package/dist/beeq/p-923da026.entry.js +6 -0
- package/dist/beeq/p-923da026.entry.js.map +1 -0
- package/dist/beeq/p-DXYHHeJY.js +6 -0
- package/dist/beeq/p-DXYHHeJY.js.map +1 -0
- package/dist/beeq/{p-2fd6ea70.entry.js → p-d4fa3abb.entry.js} +2 -2
- package/dist/beeq/p-d4fa3abb.entry.js.map +1 -0
- package/dist/beeq/p-seEHHqwi.js +6 -0
- package/dist/beeq/p-seEHHqwi.js.map +1 -0
- package/dist/beeq/svg/.icons-meta.json +1 -1
- package/dist/beeq.html-custom-data.json +74 -74
- package/dist/cjs/beeq.cjs.js +1 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +12 -6
- package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +76 -14
- package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-CfLTYjba.js → index-CVDzXB4K.js} +213 -189
- package/dist/cjs/index-CVDzXB4K.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/isPopoverSupported-CfD5YIXR.js +18 -0
- package/dist/cjs/isPopoverSupported-CfD5YIXR.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/empty-state/scss/bq-empty-state.css +1 -1
- package/dist/collection/components/icon/svg/.icons-meta.json +1 -1
- package/dist/collection/components/panel/bq-panel.js +11 -5
- package/dist/collection/components/panel/bq-panel.js.map +1 -1
- package/dist/collection/components/progress/scss/bq-progress.css +1 -1
- package/dist/collection/components/side-menu-item/scss/bq-side-menu-item.css +1 -1
- package/dist/collection/components/slider/scss/bq-slider.css +1 -1
- package/dist/collection/components/tooltip/bq-tooltip.js +74 -13
- package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
- package/dist/collection/components/tooltip/scss/bq-tooltip.css +1 -1
- package/dist/collection/services/interfaces/floating-ui.js.map +1 -1
- package/dist/collection/services/libraries/floating-ui/index.js +93 -64
- package/dist/collection/services/libraries/floating-ui/index.js.map +1 -1
- package/dist/collection/shared/test-utils/setProperties.js +1 -1
- package/dist/collection/shared/test-utils/setProperties.js.map +1 -1
- package/dist/collection/shared/utils/index.js +1 -0
- package/dist/collection/shared/utils/index.js.map +1 -1
- package/dist/collection/shared/utils/isPopoverSupported.js +12 -0
- package/dist/collection/shared/utils/isPopoverSupported.js.map +1 -0
- package/dist/components/bq-date-picker.js +1 -1
- package/dist/components/bq-dropdown.js +1 -1
- package/dist/components/bq-empty-state.js +1 -1
- package/dist/components/bq-empty-state.js.map +1 -1
- package/dist/components/bq-panel.js +1 -1
- package/dist/components/bq-progress.js +1 -1
- package/dist/components/bq-progress.js.map +1 -1
- package/dist/components/bq-select.js +1 -1
- package/dist/components/bq-side-menu-item.js +1 -1
- package/dist/components/bq-side-menu-item.js.map +1 -1
- package/dist/components/bq-slider.js +1 -1
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/bq-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-B4jdbg-4.js +6 -0
- package/dist/components/p-B4jdbg-4.js.map +1 -0
- package/dist/components/p-DXYHHeJY.js +6 -0
- package/dist/components/p-DXYHHeJY.js.map +1 -0
- package/dist/components/{p-BS8hIETL.js → p-_I8PqzzU.js} +2 -2
- package/dist/components/{p-iyX-PhkX.js → p-c6L-z8md.js} +2 -2
- package/dist/components/p-c6L-z8md.js.map +1 -0
- package/dist/custom-elements.json +776 -736
- package/dist/esm/beeq.js +1 -1
- package/dist/esm/bq-dropdown_2.entry.js +12 -6
- package/dist/esm/bq-dropdown_2.entry.js.map +1 -1
- package/dist/esm/bq-tooltip.entry.js +76 -14
- package/dist/esm/bq-tooltip.entry.js.map +1 -1
- package/dist/esm/{index-CSAZnAFf.js → index-DXYHHeJY.js} +213 -189
- package/dist/esm/index-DXYHHeJY.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/isPopoverSupported-seEHHqwi.js +16 -0
- package/dist/esm/isPopoverSupported-seEHHqwi.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +304 -205
- package/dist/hydrate/index.mjs +304 -205
- package/dist/types/components/panel/bq-panel.d.ts +1 -0
- package/dist/types/components/tooltip/bq-tooltip.d.ts +14 -0
- package/dist/types/services/interfaces/floating-ui.d.ts +1 -1
- package/dist/types/services/libraries/floating-ui/index.d.ts +37 -14
- package/dist/types/shared/test-utils/setProperties.d.ts +1 -1
- package/dist/types/shared/utils/index.d.ts +1 -0
- package/dist/types/shared/utils/isPopoverSupported.d.ts +2 -0
- package/package.json +3 -3
- package/dist/beeq/p-2fd6ea70.entry.js.map +0 -1
- package/dist/beeq/p-CSAZnAFf.js +0 -6
- package/dist/beeq/p-CSAZnAFf.js.map +0 -1
- package/dist/beeq/p-a55354ee.entry.js +0 -6
- package/dist/beeq/p-a55354ee.entry.js.map +0 -1
- package/dist/cjs/index-CfLTYjba.js.map +0 -1
- package/dist/components/p-CSAZnAFf.js +0 -6
- package/dist/components/p-CSAZnAFf.js.map +0 -1
- package/dist/components/p-Dd3v3b2E.js +0 -6
- package/dist/components/p-Dd3v3b2E.js.map +0 -1
- package/dist/components/p-iyX-PhkX.js.map +0 -1
- package/dist/esm/index-CSAZnAFf.js.map +0 -1
- /package/dist/components/{p-BS8hIETL.js.map → p-_I8PqzzU.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { h } from "@stencil/core";
|
|
6
6
|
import { FloatingUI } from "../../services/libraries";
|
|
7
|
-
import { isEventTargetChildOfElement } from "../../shared/utils";
|
|
7
|
+
import { isEventTargetChildOfElement, isPopoverSupported } from "../../shared/utils";
|
|
8
8
|
/**
|
|
9
9
|
* The Tooltip component is a small pop-up box that appears when a user hovers over or clicks on an element, providing additional information or context.
|
|
10
10
|
*
|
|
@@ -57,6 +57,16 @@ export class BqTooltip {
|
|
|
57
57
|
panel;
|
|
58
58
|
arrow;
|
|
59
59
|
floatingUI;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the runtime supports the HTML Popover API. When `true`, the
|
|
62
|
+
* panel is promoted to the browser top layer via `showPopover()`, which
|
|
63
|
+
* bypasses containing blocks created by ancestor `transform`, `filter`,
|
|
64
|
+
* `contain`, `will-change`, etc. When `false`, the panel remains a
|
|
65
|
+
* regular `position: fixed` element in the shadow root, which still
|
|
66
|
+
* covers the common case but is subject to those containing-block
|
|
67
|
+
* quirks.
|
|
68
|
+
*/
|
|
69
|
+
supportsPopover = isPopoverSupported();
|
|
60
70
|
// Reference to host HTML element
|
|
61
71
|
// ===================================
|
|
62
72
|
el;
|
|
@@ -91,12 +101,21 @@ export class BqTooltip {
|
|
|
91
101
|
}
|
|
92
102
|
await this.show();
|
|
93
103
|
}
|
|
104
|
+
handleAlwaysVisibleChange() {
|
|
105
|
+
if (this.alwaysVisible || this.visible) {
|
|
106
|
+
this.showTooltip();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this.hideTooltip();
|
|
110
|
+
}
|
|
94
111
|
handleFloatingUIOptionsChange() {
|
|
95
|
-
this.floatingUI
|
|
112
|
+
this.floatingUI?.configure({
|
|
113
|
+
...(!this.hideArrow && { arrow: this.arrow }),
|
|
96
114
|
placement: this.placement,
|
|
97
115
|
distance: this.distance,
|
|
98
116
|
sameWidth: this.sameWidth,
|
|
99
|
-
strategy:
|
|
117
|
+
strategy: this.floatingStrategy,
|
|
118
|
+
skidding: 0,
|
|
100
119
|
});
|
|
101
120
|
}
|
|
102
121
|
// Events section
|
|
@@ -116,17 +135,49 @@ export class BqTooltip {
|
|
|
116
135
|
// Ordered by their natural call order
|
|
117
136
|
// =====================================
|
|
118
137
|
componentDidLoad() {
|
|
138
|
+
// Promote the panel to the top layer when the Popover API is available.
|
|
139
|
+
// This escapes containing blocks created by ancestor `transform`,
|
|
140
|
+
// `filter`, `contain`, `will-change`, etc., which is the root cause of
|
|
141
|
+
// scroll-related tooltip drift inside virtualised or transformed
|
|
142
|
+
// containers (e.g. tall tables, dialogs). We use `manual` mode so BEEQ
|
|
143
|
+
// keeps full control of show/hide semantics (delegated close, focus,
|
|
144
|
+
// Escape) instead of the browser's `auto` light-dismiss behaviour.
|
|
145
|
+
if (this.supportsPopover) {
|
|
146
|
+
this.panel.popover = 'manual';
|
|
147
|
+
}
|
|
119
148
|
this.floatingUI = new FloatingUI(this.trigger, this.panel, {
|
|
120
149
|
...(!this.hideArrow && { arrow: this.arrow }),
|
|
121
150
|
placement: this.placement,
|
|
122
151
|
distance: this.distance,
|
|
123
152
|
sameWidth: this.sameWidth,
|
|
124
|
-
strategy:
|
|
153
|
+
strategy: this.floatingStrategy,
|
|
125
154
|
skidding: 0,
|
|
126
155
|
});
|
|
156
|
+
// Honour the initial `visible` / `always-visible` props. Stencil's
|
|
157
|
+
// `@Watch('visible')` does not fire for the initial value, so components
|
|
158
|
+
// rendered with `visible` already true (or `always-visible`) would
|
|
159
|
+
// otherwise stay hidden — in the Popover path because `showPopover()`
|
|
160
|
+
// is only called from `show()`, and in the fallback path because the
|
|
161
|
+
// panel's `hidden` attribute reflects the state at first render but
|
|
162
|
+
// Floating UI would not have run a first positioning pass. Calling
|
|
163
|
+
// `showTooltip()` here guarantees a consistent first paint.
|
|
164
|
+
if (this.visible || this.alwaysVisible) {
|
|
165
|
+
this.showTooltip();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
componentDidRender() {
|
|
169
|
+
const arrow = this.hideArrow ? null : this.arrow;
|
|
170
|
+
if (!this.floatingUI || this.floatingUI.options.arrow === arrow)
|
|
171
|
+
return;
|
|
172
|
+
this.floatingUI.configure({ arrow });
|
|
173
|
+
}
|
|
174
|
+
connectedCallback() {
|
|
175
|
+
if (!this.floatingUI || (!this.visible && !this.alwaysVisible))
|
|
176
|
+
return;
|
|
177
|
+
this.showTooltip();
|
|
127
178
|
}
|
|
128
179
|
disconnectedCallback() {
|
|
129
|
-
this.floatingUI?.
|
|
180
|
+
this.floatingUI?.stop();
|
|
130
181
|
}
|
|
131
182
|
// Listeners
|
|
132
183
|
// ==============
|
|
@@ -220,13 +271,23 @@ export class BqTooltip {
|
|
|
220
271
|
showTooltip = () => {
|
|
221
272
|
if (!this.panel)
|
|
222
273
|
return;
|
|
223
|
-
this.
|
|
274
|
+
if (this.supportsPopover && !this.panel.matches(':popover-open')) {
|
|
275
|
+
this.panel.showPopover();
|
|
276
|
+
}
|
|
277
|
+
this.floatingUI?.start();
|
|
224
278
|
};
|
|
225
279
|
hideTooltip = () => {
|
|
226
280
|
if (!this.panel)
|
|
227
281
|
return;
|
|
282
|
+
this.floatingUI?.stop();
|
|
283
|
+
if (this.supportsPopover && this.panel.matches(':popover-open')) {
|
|
284
|
+
this.panel.hidePopover();
|
|
285
|
+
}
|
|
228
286
|
this.visible = false;
|
|
229
287
|
};
|
|
288
|
+
get floatingStrategy() {
|
|
289
|
+
return this.supportsPopover ? 'absolute' : 'fixed';
|
|
290
|
+
}
|
|
230
291
|
get isHidden() {
|
|
231
292
|
return !this.visible && !this.alwaysVisible;
|
|
232
293
|
}
|
|
@@ -234,13 +295,13 @@ export class BqTooltip {
|
|
|
234
295
|
// Always the last one in the class.
|
|
235
296
|
// ===================================
|
|
236
297
|
render() {
|
|
237
|
-
return (h("div", { key: '
|
|
298
|
+
return (h("div", { key: 'ee9c0ef2273ac7fe6dfb0be9133309e2c667d0d4', class: "bq-tooltip relative", part: "base" }, h("div", { key: '659ef342fc16bb17fcd31ecec65d227716ec19d6', class: "bq-tooltip--trigger", onClick: this.handleTriggerOnClick, onFocusin: this.handleTriggerFocusin, onFocusout: this.handleTriggerFocusout, onMouseEnter: this.handleTriggerMouseOver, onMouseLeave: this.handleTriggerMouseLeave, part: "trigger", ref: (el) => {
|
|
238
299
|
this.trigger = el;
|
|
239
|
-
} }, h("slot", { key: '
|
|
300
|
+
} }, h("slot", { key: 'ca06aec8248f0697046e955496aeea7f576b668c', name: "trigger" })), h("div", { key: 'e0c6aeb17ef8389ee2b94bf539fe18b75e2b3efe', "aria-hidden": String(this.isHidden), class: "bq-tooltip--panel", hidden: this.supportsPopover ? undefined : this.isHidden, part: "panel", ref: (el) => {
|
|
240
301
|
this.panel = el;
|
|
241
|
-
}, role: "tooltip" }, !this.hideArrow && (h("div", { key: '
|
|
302
|
+
}, role: "tooltip" }, !this.hideArrow && (h("div", { key: 'b8a15a30ca88f460c957e99ed28492e967070d39', class: "bq-tooltip--arrow", ref: (el) => {
|
|
242
303
|
this.arrow = el;
|
|
243
|
-
} })), h("slot", { key: '
|
|
304
|
+
} })), h("slot", { key: 'da5bc5041f93451b355f383add0a72891168b79d' }))));
|
|
244
305
|
}
|
|
245
306
|
static get is() { return "bq-tooltip"; }
|
|
246
307
|
static get encapsulation() { return "shadow"; }
|
|
@@ -552,10 +613,10 @@ export class BqTooltip {
|
|
|
552
613
|
"propName": "visible",
|
|
553
614
|
"methodName": "handleVisibleChange"
|
|
554
615
|
}, {
|
|
555
|
-
"propName": "
|
|
556
|
-
"methodName": "
|
|
616
|
+
"propName": "alwaysVisible",
|
|
617
|
+
"methodName": "handleAlwaysVisibleChange"
|
|
557
618
|
}, {
|
|
558
|
-
"propName": "
|
|
619
|
+
"propName": "distance",
|
|
559
620
|
"methodName": "handleFloatingUIOptionsChange"
|
|
560
621
|
}, {
|
|
561
622
|
"propName": "placement",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-tooltip.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/tooltip/bq-tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,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J,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, h, Listen, Method, Prop, Watch } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { FloatingUI } from '../../services/libraries';\nimport { isEventTargetChildOfElement } from '../../shared/utils';\n\n/**\n * The Tooltip component is a small pop-up box that appears when a user hovers over or clicks on an element, providing additional information or context.\n *\n * @example How to use it\n * ```html\n * <bq-tooltip visible>\n * Yuhu! I'm a tooltip 🙃\n * <bq-button slot=\"trigger\">Hover me!</bq-button>\n * </bq-tooltip>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/64c562-tooltip\n * @status stable\n *\n * @attr {boolean} always-visible - If true, the tooltip will always be visible\n * @attr {number} distance - Distance between trigger element and tooltip\n * @attr {boolean} hide-arrow - If true, the arrow on the tooltip content won't be shown\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\"} placement - Defines the position of the tooltip\n * @attr {boolean} same-width - Whether the tooltip should have the same width as the trigger element (applicable only for content shorter than the trigger element)\n * @attr {\"click\" | \"hover\"} display-on - Set the action when the tooltip should be displayed, on hover (default) or click\n * @attr {boolean} visible - Indicates whether or not the tooltip is visible when the component is first rendered, and when interacting with the trigger\n *\n * @method show - Shows the tooltip\n * @method hide - Hides the tooltip\n *\n * @slot trigger - The element which displays tooltip on hover\n * @slot - The tooltip content\n *\n * @part base - The component wrapper container inside the shadow DOM\n * @part trigger - The `<div>` container that holds the element which displays tooltip on hover\n * @part panel - The `<div>` container that holds the tooltip content\n *\n * @cssprop --bq-tooltip--background-color - Tooltip background color\n * @cssprop --bq-tooltip--box-shadow - Tooltip box shadow\n * @cssprop --bq-tooltip--font-size - Tooltip font size\n * @cssprop --bq-tooltip--line-height - Tooltip line height\n * @cssprop --bq-tooltip--text-color - Tooltip text color\n * @cssprop --bq-tooltip--paddingX - Tooltip horizontal padding\n * @cssprop --bq-tooltip--paddingY - Tooltip vertical padding\n * @cssprop --bq-tooltip--border-color - Tooltip border color\n * @cssprop --bq-tooltip--border-radius - Tooltip border radius\n * @cssprop --bq-tooltip--border-style - Tooltip border style\n * @cssprop --bq-tooltip--border-width - Tooltip border width\n * @cssprop --bq-tooltip--z-index: Tooltip z-index\n */\n@Component({\n tag: 'bq-tooltip',\n styleUrl: './scss/bq-tooltip.scss',\n shadow: true,\n})\nexport class BqTooltip {\n // Own Properties\n // ====================\n private trigger: HTMLElement;\n private panel: HTMLElement;\n private arrow: HTMLElement;\n private floatingUI: FloatingUI;\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqTooltipElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the tooltip will always be visible */\n @Prop() alwaysVisible?: boolean = false;\n\n /** Distance between trigger element and tooltip */\n @Prop({ reflect: true }) distance?: number = 10;\n\n /** If true, the arrow on the tooltip content won't be shown */\n @Prop({ reflect: true }) hideArrow?: boolean = false;\n\n /* Defines the position of the tooltip */\n @Prop({ reflect: true }) placement?: Placement = 'top';\n\n /** Whether the tooltip should have the same width as the trigger element\n * (applicable only for content shorter than the trigger element) */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Set the action when the tooltip should be displayed, on hover (default) or click */\n @Prop({ reflect: true }) displayOn: 'click' | 'hover' = 'hover';\n\n /**\n * Indicates whether or not the tooltip is visible when the component is first rendered,\n * and when interacting with the trigger\n */\n @Prop({ reflect: true, mutable: true }) visible? = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('visible')\n async handleVisibleChange() {\n if (!this.visible && !this.alwaysVisible) {\n return await this.hide();\n }\n\n await this.show();\n }\n\n @Watch('distance')\n @Watch('hideArrow')\n @Watch('placement')\n @Watch('sameWidth')\n handleFloatingUIOptionsChange() {\n this.floatingUI.init({\n placement: this.placement,\n distance: this.distance,\n sameWidth: this.sameWidth,\n strategy: 'fixed',\n });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Emitted when the tooltip trigger is clicked */\n @Event() bqClick: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is focused in */\n @Event() bqFocusIn: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is focused out */\n @Event() bqFocusOut: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is hovered in */\n @Event() bqHoverIn: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is hovered out */\n @Event() bqHoverOut: EventEmitter<HTMLBqTooltipElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.floatingUI = new FloatingUI(this.trigger, this.panel, {\n ...(!this.hideArrow && { arrow: this.arrow }),\n placement: this.placement,\n distance: this.distance,\n sameWidth: this.sameWidth,\n strategy: 'absolute',\n skidding: 0,\n });\n }\n\n disconnectedCallback() {\n this.floatingUI?.destroy();\n }\n\n // Listeners\n // ==============\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible || this.displayOn !== 'click') return;\n // Hide tooltip when the user presses the escape key, but only if the displayOn is click and the tooltip is visible\n if (event.key !== 'Escape') return;\n\n this.hide();\n }\n\n @Listen('mousedown', { target: 'document' })\n handleDocumentMouseDown(event: MouseEvent) {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible) return;\n // Hide tooltip when the user clicks outside of the tooltip, but only if the displayOn is click and the tooltip is visible\n if (isEventTargetChildOfElement(event, this.el)) return;\n\n this.hide();\n }\n\n @Listen('scroll', { target: 'document', passive: true, capture: true })\n handleDocumentScroll() {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible) return;\n // Hide tooltip when the user scrolls, but only if the the tooltip is visible\n this.hide();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Shows the tooltip */\n @Method()\n async show() {\n this.visible = true;\n this.showTooltip();\n }\n\n /** Hides the tooltip */\n @Method()\n async hide() {\n if (this.alwaysVisible) return;\n\n this.visible = false;\n this.hideTooltip();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleTriggerMouseOver = async () => {\n if (this.displayOn !== 'hover') return;\n\n const hoverEvent = this.bqHoverIn.emit(this.el);\n if (hoverEvent.defaultPrevented) return;\n\n await this.show();\n };\n\n private handleTriggerMouseLeave = async () => {\n if (this.displayOn !== 'hover') return;\n\n const hoverEvent = this.bqHoverOut.emit(this.el);\n if (hoverEvent.defaultPrevented) return;\n\n await this.hide();\n };\n\n private handleTriggerOnClick = async () => {\n if (this.displayOn !== 'click') return;\n\n const clickEvent = this.bqClick.emit(this.el);\n if (clickEvent.defaultPrevented) return;\n\n await (this.visible ? this.hide() : this.show());\n };\n\n private handleTriggerFocusin = async () => {\n if (this.visible || this.displayOn === 'click') return;\n\n const focusEvent = this.bqFocusIn.emit(this.el);\n if (focusEvent.defaultPrevented) return;\n\n await this.show();\n };\n\n private handleTriggerFocusout = async () => {\n if (!this.visible || this.displayOn === 'click') return;\n\n const focusEvent = this.bqFocusOut.emit(this.el);\n if (focusEvent.defaultPrevented) return;\n\n await this.hide();\n };\n\n private showTooltip = () => {\n if (!this.panel) return;\n this.floatingUI?.update();\n };\n\n private hideTooltip = () => {\n if (!this.panel) return;\n this.visible = false;\n };\n\n private get isHidden() {\n return !this.visible && !this.alwaysVisible;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-tooltip relative\" part=\"base\">\n {/* TRIGGER */}\n {/**\n * NOTE: We could use a native HTML button as trigger container, but it causes issues with\n * certain interactive elements inside the trigger slot (e.g., buttons, links, inputs...).\n * This is because nested interactive elements are not allowed inside a button.\n * Also, that will force the user to focus twice to reach the inner interactive element.\n */}\n {/** biome-ignore lint/a11y/noStaticElementInteractions: bypass the \"Static Elements should not be interactive.\" rule */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: bypass the \"Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.\" rule */}\n <div\n class=\"bq-tooltip--trigger\"\n onClick={this.handleTriggerOnClick}\n onFocusin={this.handleTriggerFocusin}\n onFocusout={this.handleTriggerFocusout}\n onMouseEnter={this.handleTriggerMouseOver}\n onMouseLeave={this.handleTriggerMouseLeave}\n part=\"trigger\"\n ref={(el: HTMLDivElement) => {\n this.trigger = el;\n }}\n >\n <slot name=\"trigger\" />\n </div>\n {/* PANEL */}\n <div\n aria-hidden={this.isHidden}\n class=\"bq-tooltip--panel\"\n hidden={this.isHidden}\n part=\"panel\"\n ref={(el: HTMLDivElement) => {\n this.panel = el;\n }}\n role=\"tooltip\"\n >\n {!this.hideArrow && (\n <div\n class=\"bq-tooltip--arrow\"\n ref={(el: HTMLDivElement) => {\n this.arrow = el;\n }}\n />\n )}\n <slot />\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bq-tooltip.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/components/tooltip/bq-tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,M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B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;gBACpB,CAAC;gBAED,6DAAM,IAAI,EAAC,SAAS,GAAG,CACnB;YAUN,2EACe,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAClC,KAAK,EAAC,mBAAmB,EACzB,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EACxD,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,CAAC,EAAkB,EAAE,EAAE;oBAC1B,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBAClB,CAAC,EACD,IAAI,EAAC,SAAS;gBAEb,CAAC,IAAI,CAAC,SAAS,IAAI,CAClB,4DACE,KAAK,EAAC,mBAAmB,EACzB,GAAG,EAAE,CAAC,EAAkB,EAAE,EAAE;wBAC1B,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;oBAClB,CAAC,GACD,CACH;gBACD,8DAAQ,CACJ,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, h, Listen, Method, Prop, Watch } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { FloatingUI } from '../../services/libraries';\nimport { isEventTargetChildOfElement, isPopoverSupported } from '../../shared/utils';\n\n/**\n * The Tooltip component is a small pop-up box that appears when a user hovers over or clicks on an element, providing additional information or context.\n *\n * @example How to use it\n * ```html\n * <bq-tooltip visible>\n * Yuhu! I'm a tooltip 🙃\n * <bq-button slot=\"trigger\">Hover me!</bq-button>\n * </bq-tooltip>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/64c562-tooltip\n * @status stable\n *\n * @attr {boolean} always-visible - If true, the tooltip will always be visible\n * @attr {number} distance - Distance between trigger element and tooltip\n * @attr {boolean} hide-arrow - If true, the arrow on the tooltip content won't be shown\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\"} placement - Defines the position of the tooltip\n * @attr {boolean} same-width - Whether the tooltip should have the same width as the trigger element (applicable only for content shorter than the trigger element)\n * @attr {\"click\" | \"hover\"} display-on - Set the action when the tooltip should be displayed, on hover (default) or click\n * @attr {boolean} visible - Indicates whether or not the tooltip is visible when the component is first rendered, and when interacting with the trigger\n *\n * @method show - Shows the tooltip\n * @method hide - Hides the tooltip\n *\n * @slot trigger - The element which displays tooltip on hover\n * @slot - The tooltip content\n *\n * @part base - The component wrapper container inside the shadow DOM\n * @part trigger - The `<div>` container that holds the element which displays tooltip on hover\n * @part panel - The `<div>` container that holds the tooltip content\n *\n * @cssprop --bq-tooltip--background-color - Tooltip background color\n * @cssprop --bq-tooltip--box-shadow - Tooltip box shadow\n * @cssprop --bq-tooltip--font-size - Tooltip font size\n * @cssprop --bq-tooltip--line-height - Tooltip line height\n * @cssprop --bq-tooltip--text-color - Tooltip text color\n * @cssprop --bq-tooltip--paddingX - Tooltip horizontal padding\n * @cssprop --bq-tooltip--paddingY - Tooltip vertical padding\n * @cssprop --bq-tooltip--border-color - Tooltip border color\n * @cssprop --bq-tooltip--border-radius - Tooltip border radius\n * @cssprop --bq-tooltip--border-style - Tooltip border style\n * @cssprop --bq-tooltip--border-width - Tooltip border width\n * @cssprop --bq-tooltip--z-index: Tooltip z-index\n */\n@Component({\n tag: 'bq-tooltip',\n styleUrl: './scss/bq-tooltip.scss',\n shadow: true,\n})\nexport class BqTooltip {\n // Own Properties\n // ====================\n private trigger: HTMLElement;\n private panel: HTMLElement;\n private arrow: HTMLElement;\n private floatingUI: FloatingUI;\n /**\n * Whether the runtime supports the HTML Popover API. When `true`, the\n * panel is promoted to the browser top layer via `showPopover()`, which\n * bypasses containing blocks created by ancestor `transform`, `filter`,\n * `contain`, `will-change`, etc. When `false`, the panel remains a\n * regular `position: fixed` element in the shadow root, which still\n * covers the common case but is subject to those containing-block\n * quirks.\n */\n private readonly supportsPopover = isPopoverSupported();\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqTooltipElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the tooltip will always be visible */\n @Prop() alwaysVisible?: boolean = false;\n\n /** Distance between trigger element and tooltip */\n @Prop({ reflect: true }) distance?: number = 10;\n\n /** If true, the arrow on the tooltip content won't be shown */\n @Prop({ reflect: true }) hideArrow?: boolean = false;\n\n /* Defines the position of the tooltip */\n @Prop({ reflect: true }) placement?: Placement = 'top';\n\n /** Whether the tooltip should have the same width as the trigger element\n * (applicable only for content shorter than the trigger element) */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Set the action when the tooltip should be displayed, on hover (default) or click */\n @Prop({ reflect: true }) displayOn: 'click' | 'hover' = 'hover';\n\n /**\n * Indicates whether or not the tooltip is visible when the component is first rendered,\n * and when interacting with the trigger\n */\n @Prop({ reflect: true, mutable: true }) visible? = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('visible')\n async handleVisibleChange() {\n if (!this.visible && !this.alwaysVisible) {\n return await this.hide();\n }\n\n await this.show();\n }\n\n @Watch('alwaysVisible')\n handleAlwaysVisibleChange() {\n if (this.alwaysVisible || this.visible) {\n this.showTooltip();\n return;\n }\n this.hideTooltip();\n }\n\n @Watch('distance')\n @Watch('placement')\n @Watch('sameWidth')\n handleFloatingUIOptionsChange() {\n this.floatingUI?.configure({\n ...(!this.hideArrow && { arrow: this.arrow }),\n placement: this.placement,\n distance: this.distance,\n sameWidth: this.sameWidth,\n strategy: this.floatingStrategy,\n skidding: 0,\n });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Emitted when the tooltip trigger is clicked */\n @Event() bqClick: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is focused in */\n @Event() bqFocusIn: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is focused out */\n @Event() bqFocusOut: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is hovered in */\n @Event() bqHoverIn: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is hovered out */\n @Event() bqHoverOut: EventEmitter<HTMLBqTooltipElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n // Promote the panel to the top layer when the Popover API is available.\n // This escapes containing blocks created by ancestor `transform`,\n // `filter`, `contain`, `will-change`, etc., which is the root cause of\n // scroll-related tooltip drift inside virtualised or transformed\n // containers (e.g. tall tables, dialogs). We use `manual` mode so BEEQ\n // keeps full control of show/hide semantics (delegated close, focus,\n // Escape) instead of the browser's `auto` light-dismiss behaviour.\n if (this.supportsPopover) {\n this.panel.popover = 'manual';\n }\n\n this.floatingUI = new FloatingUI(this.trigger, this.panel, {\n ...(!this.hideArrow && { arrow: this.arrow }),\n placement: this.placement,\n distance: this.distance,\n sameWidth: this.sameWidth,\n strategy: this.floatingStrategy,\n skidding: 0,\n });\n\n // Honour the initial `visible` / `always-visible` props. Stencil's\n // `@Watch('visible')` does not fire for the initial value, so components\n // rendered with `visible` already true (or `always-visible`) would\n // otherwise stay hidden — in the Popover path because `showPopover()`\n // is only called from `show()`, and in the fallback path because the\n // panel's `hidden` attribute reflects the state at first render but\n // Floating UI would not have run a first positioning pass. Calling\n // `showTooltip()` here guarantees a consistent first paint.\n if (this.visible || this.alwaysVisible) {\n this.showTooltip();\n }\n }\n\n componentDidRender() {\n const arrow = this.hideArrow ? null : this.arrow;\n if (!this.floatingUI || this.floatingUI.options.arrow === arrow) return;\n this.floatingUI.configure({ arrow });\n }\n\n connectedCallback() {\n if (!this.floatingUI || (!this.visible && !this.alwaysVisible)) return;\n this.showTooltip();\n }\n\n disconnectedCallback() {\n this.floatingUI?.stop();\n }\n\n // Listeners\n // ==============\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible || this.displayOn !== 'click') return;\n // Hide tooltip when the user presses the escape key, but only if the displayOn is click and the tooltip is visible\n if (event.key !== 'Escape') return;\n\n this.hide();\n }\n\n @Listen('mousedown', { target: 'document' })\n handleDocumentMouseDown(event: MouseEvent) {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible) return;\n // Hide tooltip when the user clicks outside of the tooltip, but only if the displayOn is click and the tooltip is visible\n if (isEventTargetChildOfElement(event, this.el)) return;\n\n this.hide();\n }\n\n @Listen('scroll', { target: 'document', passive: true, capture: true })\n handleDocumentScroll() {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible) return;\n // Hide tooltip when the user scrolls, but only if the the tooltip is visible\n this.hide();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Shows the tooltip */\n @Method()\n async show() {\n this.visible = true;\n this.showTooltip();\n }\n\n /** Hides the tooltip */\n @Method()\n async hide() {\n if (this.alwaysVisible) return;\n\n this.visible = false;\n this.hideTooltip();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleTriggerMouseOver = async () => {\n if (this.displayOn !== 'hover') return;\n\n const hoverEvent = this.bqHoverIn.emit(this.el);\n if (hoverEvent.defaultPrevented) return;\n\n await this.show();\n };\n\n private handleTriggerMouseLeave = async () => {\n if (this.displayOn !== 'hover') return;\n\n const hoverEvent = this.bqHoverOut.emit(this.el);\n if (hoverEvent.defaultPrevented) return;\n\n await this.hide();\n };\n\n private handleTriggerOnClick = async () => {\n if (this.displayOn !== 'click') return;\n\n const clickEvent = this.bqClick.emit(this.el);\n if (clickEvent.defaultPrevented) return;\n\n await (this.visible ? this.hide() : this.show());\n };\n\n private handleTriggerFocusin = async () => {\n if (this.visible || this.displayOn === 'click') return;\n\n const focusEvent = this.bqFocusIn.emit(this.el);\n if (focusEvent.defaultPrevented) return;\n\n await this.show();\n };\n\n private handleTriggerFocusout = async () => {\n if (!this.visible || this.displayOn === 'click') return;\n\n const focusEvent = this.bqFocusOut.emit(this.el);\n if (focusEvent.defaultPrevented) return;\n\n await this.hide();\n };\n\n private showTooltip = () => {\n if (!this.panel) return;\n if (this.supportsPopover && !this.panel.matches(':popover-open')) {\n this.panel.showPopover();\n }\n this.floatingUI?.start();\n };\n\n private hideTooltip = () => {\n if (!this.panel) return;\n this.floatingUI?.stop();\n if (this.supportsPopover && this.panel.matches(':popover-open')) {\n this.panel.hidePopover();\n }\n this.visible = false;\n };\n\n private get floatingStrategy(): 'absolute' | 'fixed' {\n return this.supportsPopover ? 'absolute' : 'fixed';\n }\n\n private get isHidden() {\n return !this.visible && !this.alwaysVisible;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-tooltip relative\" part=\"base\">\n {/* TRIGGER */}\n {/**\n * NOTE: We could use a native HTML button as trigger container, but it causes issues with\n * certain interactive elements inside the trigger slot (e.g., buttons, links, inputs...).\n * This is because nested interactive elements are not allowed inside a button.\n * Also, that will force the user to focus twice to reach the inner interactive element.\n */}\n {/** biome-ignore lint/a11y/noStaticElementInteractions: bypass the \"Static Elements should not be interactive.\" rule */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: bypass the \"Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.\" rule */}\n <div\n class=\"bq-tooltip--trigger\"\n onClick={this.handleTriggerOnClick}\n onFocusin={this.handleTriggerFocusin}\n onFocusout={this.handleTriggerFocusout}\n onMouseEnter={this.handleTriggerMouseOver}\n onMouseLeave={this.handleTriggerMouseLeave}\n part=\"trigger\"\n ref={(el: HTMLDivElement) => {\n this.trigger = el;\n }}\n >\n <slot name=\"trigger\" />\n </div>\n {/* PANEL */}\n {/*\n * When the Popover API is supported, visibility is driven imperatively\n * via `showPopover()` / `hidePopover()`. Setting `hidden={true}` in that\n * mode would force `display: none`, which makes `showPopover()` throw\n * an `InvalidStateError`. In the fallback path we keep the `hidden`\n * attribute so consumers without the Popover API keep the original\n * visibility behaviour.\n */}\n <div\n aria-hidden={String(this.isHidden)}\n class=\"bq-tooltip--panel\"\n hidden={this.supportsPopover ? undefined : this.isHidden}\n part=\"panel\"\n ref={(el: HTMLDivElement) => {\n this.panel = el;\n }}\n role=\"tooltip\"\n >\n {!this.hideArrow && (\n <div\n class=\"bq-tooltip--arrow\"\n ref={(el: HTMLDivElement) => {\n this.arrow = el;\n }}\n />\n )}\n <slot />\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.bq-tooltip--arrow:before,.rotate-45,.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.bq-tooltip--panel,.shadow-\[shadow\:--bq-tooltip--box-shadow\]{--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}::backdrop,:root{--bq-blue-100:#e7f0fd;--bq-blue-200:#d0e2fb;--bq-blue-300:#a1c5f7;--bq-blue-400:#73a8f3;--bq-blue-500:#448bef;--bq-blue-600:#156eeb;--bq-blue-700:#1158bc;--bq-blue-800:#0d428d;--bq-blue-900:#082c5e;--bq-blue-1000:#04162f;--bq-corai-100:#fff2f2;--bq-corai-200:#ffe6e6;--bq-corai-300:#ffccce;--bq-corai-400:#ffb3b5;--bq-corai-500:#ff999d;--bq-corai-600:#ff8084;--bq-corai-700:#cc666a;--bq-corai-800:#994d4f;--bq-corai-900:#663335;--bq-corai-1000:#331a1a;--bq-cyan-100:#e8f7fb;--bq-cyan-200:#d2f0f8;--bq-cyan-300:#a5e1f1;--bq-cyan-400:#78d1e9;--bq-cyan-500:#4bc2e2;--bq-cyan-600:#1eb3db;--bq-cyan-700:#188faf;--bq-cyan-800:#126b83;--bq-cyan-900:#0c4858;--bq-cyan-1000:#06242c;--bq-gold-100:#fbf4ec;--bq-gold-200:#f7e9da;--bq-gold-300:#f0d3b6;--bq-gold-400:#e8bc91;--bq-gold-500:#e1a66d;--bq-gold-600:#d99048;--bq-gold-700:#ae733a;--bq-gold-800:#82562b;--bq-gold-900:#573a1d;--bq-gold-1000:#2b1d0e;--bq-green-100:#e8f8ef;--bq-green-200:#d2f1e0;--bq-green-300:#a5e3c1;--bq-green-400:#78d5a1;--bq-green-500:#4bc782;--bq-green-600:#1eb963;--bq-green-700:#18944f;--bq-green-800:#126f3b;--bq-green-900:#0c4a28;--bq-green-1000:#062514;--bq-grey-100:#f1f2f4;--bq-grey-200:#e7e8eb;--bq-grey-300:#caccd2;--bq-grey-400:#a6aab3;--bq-grey-50:#f6f6f8;--bq-grey-500:#898e99;--bq-grey-600:#646a77;--bq-grey-700:#3f4350;--bq-grey-800:#2a2c35;--bq-grey-900:#1c1d23;--bq-grey-950:#15161a;--bq-grey-1000:#0d0e11;--bq-indigo-100:#edecfc;--bq-indigo-200:#dcdafa;--bq-indigo-300:#b9b5f5;--bq-indigo-400:#9590ef;--bq-indigo-500:#726bea;--bq-indigo-600:#4f46e5;--bq-indigo-700:#3f38b7;--bq-indigo-800:#2f2a89;--bq-indigo-900:#201c5c;--bq-indigo-1000:#100e2e;--bq-iris-100:#e9f0ff;--bq-iris-200:#d6e0ff;--bq-iris-300:#b2c0fe;--bq-iris-400:#8691f8;--bq-iris-500:#6061ee;--bq-iris-600:#4f46e5;--bq-iris-700:#413abd;--bq-iris-800:#332e95;--bq-iris-900:#26216d;--bq-iris-1000:#181545;--bq-lime-100:#f5fae8;--bq-lime-200:#ecf6d2;--bq-lime-300:#d9eda5;--bq-lime-400:#c5e379;--bq-lime-500:#b2da4c;--bq-lime-600:#9fd11f;--bq-lime-700:#7fa719;--bq-lime-800:#5f7d13;--bq-lime-900:#40540c;--bq-lime-1000:#202a06;--bq-magenta-100:#fce7f4;--bq-magenta-200:#f9cfea;--bq-magenta-300:#f39fd6;--bq-magenta-400:#ee6fbf;--bq-magenta-500:#e83fab;--bq-magenta-600:#de1395;--bq-magenta-700:#b20f77;--bq-magenta-800:#850c59;--bq-magenta-900:#58083c;--bq-magenta-1000:#2c041e;--bq-neutral-white:#fbfbfc;--bq-neutral-black:#060708;--bq-orange-100:#fbf0e9;--bq-orange-200:#f8e1d4;--bq-orange-300:#f1c2a8;--bq-orange-400:#eaa47d;--bq-orange-500:#e38551;--bq-orange-600:#dc6726;--bq-orange-700:#b0521e;--bq-orange-800:#843e17;--bq-orange-900:#58290f;--bq-orange-1000:#2c1508;--bq-purple-100:#efebf8;--bq-purple-200:#e0d7f2;--bq-purple-300:#c1afe5;--bq-purple-400:#a388d8;--bq-purple-500:#8460cb;--bq-purple-600:#6538be;--bq-purple-700:#512d98;--bq-purple-800:#3d2272;--bq-purple-900:#28164c;--bq-purple-1000:#140b26;--bq-red-100:#fce7ea;--bq-red-200:#f9d1d5;--bq-red-300:#f3a2ac;--bq-red-400:#ed7482;--bq-red-500:#e74559;--bq-red-600:#e1172f;--bq-red-700:#b41226;--bq-red-800:#870e1c;--bq-red-900:#5a0913;--bq-red-1000:#2d0509;--bq-sky-100:#eff4fb;--bq-sky-200:#dfeaf8;--bq-sky-300:#bfd5f1;--bq-sky-400:#9ec1e9;--bq-sky-500:#7eace2;--bq-sky-600:#5e97db;--bq-sky-700:#4b79af;--bq-sky-800:#385b83;--bq-sky-900:#263c58;--bq-sky-1000:#131e2c;--bq-teal-100:#e5f7f5;--bq-teal-200:#ccf0eb;--bq-teal-300:#99e1d8;--bq-teal-400:#66d2c4;--bq-teal-500:#33c3b1;--bq-teal-600:#00b49d;--bq-teal-700:#00907e;--bq-teal-800:#006c5e;--bq-teal-900:#00483f;--bq-teal-1000:#00241f;--bq-volcano-100:#feede7;--bq-volcano-200:#fddbd1;--bq-volcano-300:#fbb8a3;--bq-volcano-400:#fa9474;--bq-volcano-500:#f87146;--bq-volcano-600:#f64d18;--bq-volcano-700:#c53e13;--bq-volcano-800:#942e0e;--bq-volcano-900:#621f0a;--bq-volcano-1000:#310f05;--bq-yellow-100:#fefbe7;--bq-yellow-200:#fcf6d0;--bq-yellow-300:#faeea0;--bq-yellow-400:#f7e571;--bq-yellow-500:#f5dd41;--bq-yellow-600:#f2d412;--bq-yellow-700:#c2aa0e;--bq-yellow-800:#917f0b;--bq-yellow-900:#615507;--bq-yellow-1000:#302a04;--bq-endava-grey-50:#f7f7f8;--bq-endava-grey-100:#e4e6e7;--bq-endava-grey-200:#b5babe;--bq-endava-grey-300:#949ca1;--bq-endava-grey-400:#737d84;--bq-endava-grey-500:#525f67;--bq-endava-grey-600:#30404b;--bq-endava-grey-700:#2b3942;--bq-endava-grey-800:#263139;--bq-endava-grey-900:#192b37;--bq-endava-grey-950:#151b1e;--bq-endava-grey-1000:#0f1316;--bq-endava-neutral-white:#fafbfb;--bq-endava-neutral-black:#060708;--bq-endava-orange-100:#fef3f1;--bq-endava-orange-200:#fbd6d1;--bq-endava-orange-300:#fab7af;--bq-endava-orange-400:#fa988b;--bq-endava-orange-500:#fc7866;--bq-endava-orange-600:#ff5640;--bq-endava-orange-700:#ce4a39;--bq-endava-orange-800:#a03d30;--bq-endava-orange-900:#722e25;--bq-endava-orange-1000:#471e19}*,:after,:before{box-sizing:border-box}*{font:inherit;margin:0}ol[role=list],ul[role=list]{list-style-type:none}html{text-size-adjust:none;font-family:var(--bq-font-family);font-size:var(--bq-font-size--m)}html:focus-within{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--bq-background--primary);color:var(--bq-text--primary);line-height:var(--bq-font-line-height--regular);min-height:100vb;text-rendering:optimizeSpeed}a:not([class]){text-decoration-skip-ink:auto}canvas,img,picture,svg,video{display:block;max-width:100%}button,input,select,textarea{font:inherit}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto;transition-duration:.01ms!important}}:where(:root){--bq-white:#fff;--bq-black:#060708;--bq-neutral-50:var(--bq-grey-50);--bq-neutral-100:var(--bq-grey-100);--bq-neutral-200:var(--bq-grey-200);--bq-neutral-300:var(--bq-grey-300);--bq-neutral-400:var(--bq-grey-400);--bq-neutral-500:var(--bq-grey-500);--bq-neutral-600:var(--bq-grey-600);--bq-neutral-700:var(--bq-grey-700);--bq-neutral-800:var(--bq-grey-800);--bq-neutral-900:var(--bq-grey-900);--bq-neutral-950:var(--bq-grey-950);--bq-neutral-1000:var(--bq-grey-1000);--bq-brand-light:var(--bq-iris-100);--bq-brand:var(--bq-iris-600);--bq-brand-dark:var(--bq-iris-1000);--bq-accent-light:var(--bq-purple-100);--bq-accent:var(--bq-purple-600);--bq-accent-dark:var(--bq-purple-1000);--bq-success-light:var(--bq-teal-100);--bq-success:var(--bq-teal-600);--bq-success-dark:var(--bq-teal-1000);--bq-danger-light:var(--bq-red-100);--bq-danger:var(--bq-red-600);--bq-danger-dark:var(--bq-red-1000);--bq-warning-light:var(--bq-gold-100);--bq-warning:var(--bq-gold-600);--bq-warning-dark:var(--bq-gold-1000);--bq-info-light:var(--bq-iris-100);--bq-info:var(--bq-iris-600);--bq-info-dark:var(--bq-iris-1000);--bq-focus:var(--bq-iris-600);--bq-data-01:var(--bq-brand);--bq-data-02:var(--bq-purple-600);--bq-data-03:var(--bq-magenta-600);--bq-data-04:var(--bq-cyan-600);--bq-data-05:var(--bq-teal-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-yellow-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-blue-600);--bq-data-10:var(--bq-grey-600);--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white);--bq-radius--none:0;--bq-radius--xs2:0.125rem;--bq-radius--xs:0.25rem;--bq-radius--s:0.5rem;--bq-radius--m:0.75rem;--bq-radius--l:1.5rem;--bq-radius--full:9999px;--bq-box-shadow--xs:0 2px 0 rgba(0,0,0,.016);--bq-box-shadow--s:0 8px 24px rgba(0,0,0,.04);--bq-box-shadow--m:0 10px 48px -16px rgba(0,0,0,.12);--bq-box-shadow--l:0 20px 58px -16px rgba(0,0,0,.16);--bq-font-family:"Outfit",sans-serif;--bq-font-size--xs:0.75rem;--bq-font-size--s:0.875rem;--bq-font-size--m:1rem;--bq-font-size--l:1.125rem;--bq-font-size--xl:1.5rem;--bq-font-size--xxl:2rem;--bq-font-size--xxl2:2.5rem;--bq-font-size--xxl3:3rem;--bq-font-size--xxl4:3.5rem;--bq-font-size--xxl5:4rem;--bq-font-weight--thin:100;--bq-font-weight--light:300;--bq-font-weight--regular:400;--bq-font-weight--medium:500;--bq-font-weight--semibold:600;--bq-font-weight--bold:700;--bq-font-line-height--small:1.2;--bq-font-line-height--regular:1.5;--bq-font-line-height--large:1.5;--bq-spacing-xs3:0.125rem;--bq-spacing-xs2:0.25rem;--bq-spacing-xs:0.5rem;--bq-spacing-s:0.75rem;--bq-spacing-m:1rem;--bq-spacing-l:1.5rem;--bq-spacing-xl:2rem;--bq-spacing-xxl:2.5rem;--bq-spacing-xxl2:3.5rem;--bq-spacing-xxl3:4rem;--bq-spacing-xxl4:4.5rem;--bq-stroke-s:1px;--bq-stroke-m:2px;--bq-stroke-l:3px}.beeq:not([bq-mode]),.light,:root:not([bq-theme]):not([bq-mode]),:root[bq-theme=beeq]:not([bq-mode]),[bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--alt:var(--bq-white);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-light);--bq-hover:#bcbfc5;--bq-active:#444546}.dark,[bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-950);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-dark);--bq-hover:#444546;--bq-active:#1f2026}:where(.endava),:where([bq-theme=endava]){--bq-font-family:"Poppins",sans-serif;--bq-white:#fafbfb;--bq-black:#030406;--bq-neutral-50:var(--bq-endava-grey-50);--bq-neutral-100:var(--bq-endava-grey-100);--bq-neutral-200:var(--bq-endava-grey-200);--bq-neutral-300:var(--bq-endava-grey-300);--bq-neutral-400:var(--bq-endava-grey-400);--bq-neutral-500:var(--bq-endava-grey-500);--bq-neutral-600:var(--bq-endava-grey-600);--bq-neutral-700:var(--bq-endava-grey-700);--bq-neutral-800:var(--bq-endava-grey-800);--bq-neutral-900:var(--bq-endava-grey-900);--bq-neutral-950:var(--bq-endava-grey-950);--bq-neutral-1000:var(--bq-endava-grey-1000);--bq-brand-light:var(--bq-endava-orange-100);--bq-brand:var(--bq-endava-orange-600);--bq-brand-dark:var(--bq-endava-orange-1000);--bq-accent-light:var(--bq-endava-orange-100);--bq-accent:var(--bq-endava-orange-600);--bq-accent-dark:var(--bq-endava-orange-1000);--bq-success-light:var(--bq-green-100);--bq-success:var(--bq-green-600);--bq-success-dark:var(--bq-green-1000);--bq-danger-light:var(--bq-corai-100);--bq-danger:var(--bq-corai-600);--bq-danger-dark:var(--bq-corai-1000);--bq-warning-light:var(--bq-yellow-100);--bq-warning:var(--bq-yellow-600);--bq-warning-dark:var(--bq-yellow-1000);--bq-info-light:var(--bq-blue-100);--bq-info:var(--bq-blue-600);--bq-info-dark:var(--bq-blue-1000);--bq-focus:var(--bq-endava-orange-600);--bq-data-01:var(--bq-brand);--bq-data-02:#af0cd8;--bq-data-03:#0ca8d8;--bq-data-04:var(--bq-teal-600);--bq-data-05:var(--bq-yellow-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-blue-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-purple-600);--bq-data-10:#394b56;--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white)}.endava.light,.endava:not([bq-mode]),[bq-theme=endava]:not([bq-mode]),[bq-theme=endava][bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--brand-alt:var(--bq-brand-light);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--brand:var(--bq-brand);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-light);--bq-hover:#444546;--bq-active:#1f2026}.endava.dark,[bq-theme=endava][bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-900);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--brand-alt:var(--bq-brand-dark);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-neutral-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-dark);--bq-hover:#444546;--bq-active:#1f2026}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.start-0{inset-inline-start:0}.-z-\[1\]{z-index:-1}.z-\[--bq-tooltip--z-index\]{z-index:var(--bq-tooltip--z-index)}.box-border{box-sizing:border-box}.rotate-45{--tw-rotate:45deg}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rounded-\[--bq-tooltip--border-radius\]{border-radius:var(--bq-tooltip--border-radius)}.border-\[length\:--bq-tooltip--border-width\]{border-width:var(--bq-tooltip--border-width)}.border-\[color\:--bq-tooltip--border-color\]{border-color:var(--bq-tooltip--border-color)}.bg-\[--bq-tooltip--background-color\]{background-color:var(--bq-tooltip--background-color)}.text-\[length\:--bq-tooltip--font-size\]{font-size:var(--bq-tooltip--font-size)}.leading-\[--bq-tooltip--line-height\]{line-height:var(--bq-tooltip--line-height)}.text-\[color\:--bq-tooltip--text-color\]{color:var(--bq-tooltip--text-color)}.shadow-\[shadow\:--bq-tooltip--box-shadow\]{--tw-shadow:var(--bq-tooltip--box-shadow);--tw-shadow-colored:var(--bq-tooltip--box-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.content-empty{--tw-content:"";content:var(--tw-content)}.bs-2{block-size:.5rem}.is-2{inline-size:.5rem}.is-\[--bq-tooltip--width\]{inline-size:var(--bq-tooltip--width)}.max-is-\[--bq-tooltip--max-width\]{max-inline-size:var(--bq-tooltip--max-width)}.p-b-\[--bq-tooltip--paddingY\]{padding-block:var(--bq-tooltip--paddingY)}.p-i-\[--bq-tooltip--paddingX\]{padding-inline:var(--bq-tooltip--paddingX)}.inset-bs-0{inset-block-start:0}@-webkit-keyframes fade-in{0%{opacity:0}}@keyframes fade-in{0%{opacity:0}}@-webkit-keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}:host{--bq-tooltip--background-color:var(--bq-ui--inverse);--bq-tooltip--box-shadow:var(--bq-box-shadow--m);--bq-tooltip--font-size:var(--bq-font-size--m);--bq-tooltip--line-height:var(--bq-font-line-height--regular);--bq-tooltip--text-color:var(--bq-text--inverse);--bq-tooltip--paddingX:var(--bq-spacing-xs);--bq-tooltip--paddingY:var(--bq-spacing-xs2);--bq-tooltip--border-color:transparent;--bq-tooltip--border-radius:var(--bq-radius--s);--bq-tooltip--border-style:none;--bq-tooltip--border-width:unset;--bq-tooltip--max-width:320px;--bq-tooltip--width:max-content;--bq-tooltip--z-index:10}.bq-tooltip--panel{--tw-shadow:var(--bq-tooltip--box-shadow);--tw-shadow-colored:var(--bq-tooltip--box-shadow);-webkit-animation:fade-in .3s ease 0s;animation:fade-in .3s ease 0s;background-color:var(--bq-tooltip--background-color);border-color:var(--bq-tooltip--border-color);border-radius:var(--bq-tooltip--border-radius);border-width:var(--bq-tooltip--border-width);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-sizing:border-box;color:var(--bq-tooltip--text-color);font-size:var(--bq-tooltip--font-size);inline-size:var(--bq-tooltip--width);line-height:var(--bq-tooltip--line-height);max-inline-size:var(--bq-tooltip--max-width);padding-block:var(--bq-tooltip--paddingY);padding-inline:var(--bq-tooltip--paddingX);pointer-events:none;position:fixed;z-index:var(--bq-tooltip--z-index)}.bq-tooltip--arrow,.bq-tooltip--arrow:before{block-size:.5rem;inline-size:.5rem;position:absolute;z-index:-1}.bq-tooltip--arrow:before{--tw-rotate:45deg;--tw-content:"";background-color:var(--bq-tooltip--background-color);content:var(--tw-content);inset-block-start:0;inset-inline-start:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.visible{visibility:visible}.static{position:static}.relative{position:relative}.hidden{display:none}
|
|
1
|
+
.bq-tooltip--arrow:before,.rotate-45,.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.bq-tooltip--panel,.shadow-\[shadow\:--bq-tooltip--box-shadow\]{--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}::backdrop,:root{--bq-blue-100:#e7f0fd;--bq-blue-200:#d0e2fb;--bq-blue-300:#a1c5f7;--bq-blue-400:#73a8f3;--bq-blue-500:#448bef;--bq-blue-600:#156eeb;--bq-blue-700:#1158bc;--bq-blue-800:#0d428d;--bq-blue-900:#082c5e;--bq-blue-1000:#04162f;--bq-corai-100:#fff2f2;--bq-corai-200:#ffe6e6;--bq-corai-300:#ffccce;--bq-corai-400:#ffb3b5;--bq-corai-500:#ff999d;--bq-corai-600:#ff8084;--bq-corai-700:#cc666a;--bq-corai-800:#994d4f;--bq-corai-900:#663335;--bq-corai-1000:#331a1a;--bq-cyan-100:#e8f7fb;--bq-cyan-200:#d2f0f8;--bq-cyan-300:#a5e1f1;--bq-cyan-400:#78d1e9;--bq-cyan-500:#4bc2e2;--bq-cyan-600:#1eb3db;--bq-cyan-700:#188faf;--bq-cyan-800:#126b83;--bq-cyan-900:#0c4858;--bq-cyan-1000:#06242c;--bq-gold-100:#fbf4ec;--bq-gold-200:#f7e9da;--bq-gold-300:#f0d3b6;--bq-gold-400:#e8bc91;--bq-gold-500:#e1a66d;--bq-gold-600:#d99048;--bq-gold-700:#ae733a;--bq-gold-800:#82562b;--bq-gold-900:#573a1d;--bq-gold-1000:#2b1d0e;--bq-green-100:#e8f8ef;--bq-green-200:#d2f1e0;--bq-green-300:#a5e3c1;--bq-green-400:#78d5a1;--bq-green-500:#4bc782;--bq-green-600:#1eb963;--bq-green-700:#18944f;--bq-green-800:#126f3b;--bq-green-900:#0c4a28;--bq-green-1000:#062514;--bq-grey-100:#f1f2f4;--bq-grey-200:#e7e8eb;--bq-grey-300:#caccd2;--bq-grey-400:#a6aab3;--bq-grey-50:#f6f6f8;--bq-grey-500:#898e99;--bq-grey-600:#646a77;--bq-grey-700:#3f4350;--bq-grey-800:#2a2c35;--bq-grey-900:#1c1d23;--bq-grey-950:#15161a;--bq-grey-1000:#0d0e11;--bq-indigo-100:#edecfc;--bq-indigo-200:#dcdafa;--bq-indigo-300:#b9b5f5;--bq-indigo-400:#9590ef;--bq-indigo-500:#726bea;--bq-indigo-600:#4f46e5;--bq-indigo-700:#3f38b7;--bq-indigo-800:#2f2a89;--bq-indigo-900:#201c5c;--bq-indigo-1000:#100e2e;--bq-iris-100:#e9f0ff;--bq-iris-200:#d6e0ff;--bq-iris-300:#b2c0fe;--bq-iris-400:#8691f8;--bq-iris-500:#6061ee;--bq-iris-600:#4f46e5;--bq-iris-700:#413abd;--bq-iris-800:#332e95;--bq-iris-900:#26216d;--bq-iris-1000:#181545;--bq-lime-100:#f5fae8;--bq-lime-200:#ecf6d2;--bq-lime-300:#d9eda5;--bq-lime-400:#c5e379;--bq-lime-500:#b2da4c;--bq-lime-600:#9fd11f;--bq-lime-700:#7fa719;--bq-lime-800:#5f7d13;--bq-lime-900:#40540c;--bq-lime-1000:#202a06;--bq-magenta-100:#fce7f4;--bq-magenta-200:#f9cfea;--bq-magenta-300:#f39fd6;--bq-magenta-400:#ee6fbf;--bq-magenta-500:#e83fab;--bq-magenta-600:#de1395;--bq-magenta-700:#b20f77;--bq-magenta-800:#850c59;--bq-magenta-900:#58083c;--bq-magenta-1000:#2c041e;--bq-neutral-white:#fbfbfc;--bq-neutral-black:#060708;--bq-orange-100:#fbf0e9;--bq-orange-200:#f8e1d4;--bq-orange-300:#f1c2a8;--bq-orange-400:#eaa47d;--bq-orange-500:#e38551;--bq-orange-600:#dc6726;--bq-orange-700:#b0521e;--bq-orange-800:#843e17;--bq-orange-900:#58290f;--bq-orange-1000:#2c1508;--bq-purple-100:#efebf8;--bq-purple-200:#e0d7f2;--bq-purple-300:#c1afe5;--bq-purple-400:#a388d8;--bq-purple-500:#8460cb;--bq-purple-600:#6538be;--bq-purple-700:#512d98;--bq-purple-800:#3d2272;--bq-purple-900:#28164c;--bq-purple-1000:#140b26;--bq-red-100:#fce7ea;--bq-red-200:#f9d1d5;--bq-red-300:#f3a2ac;--bq-red-400:#ed7482;--bq-red-500:#e74559;--bq-red-600:#e1172f;--bq-red-700:#b41226;--bq-red-800:#870e1c;--bq-red-900:#5a0913;--bq-red-1000:#2d0509;--bq-sky-100:#eff4fb;--bq-sky-200:#dfeaf8;--bq-sky-300:#bfd5f1;--bq-sky-400:#9ec1e9;--bq-sky-500:#7eace2;--bq-sky-600:#5e97db;--bq-sky-700:#4b79af;--bq-sky-800:#385b83;--bq-sky-900:#263c58;--bq-sky-1000:#131e2c;--bq-teal-100:#e5f7f5;--bq-teal-200:#ccf0eb;--bq-teal-300:#99e1d8;--bq-teal-400:#66d2c4;--bq-teal-500:#33c3b1;--bq-teal-600:#00b49d;--bq-teal-700:#00907e;--bq-teal-800:#006c5e;--bq-teal-900:#00483f;--bq-teal-1000:#00241f;--bq-volcano-100:#feede7;--bq-volcano-200:#fddbd1;--bq-volcano-300:#fbb8a3;--bq-volcano-400:#fa9474;--bq-volcano-500:#f87146;--bq-volcano-600:#f64d18;--bq-volcano-700:#c53e13;--bq-volcano-800:#942e0e;--bq-volcano-900:#621f0a;--bq-volcano-1000:#310f05;--bq-yellow-100:#fefbe7;--bq-yellow-200:#fcf6d0;--bq-yellow-300:#faeea0;--bq-yellow-400:#f7e571;--bq-yellow-500:#f5dd41;--bq-yellow-600:#f2d412;--bq-yellow-700:#c2aa0e;--bq-yellow-800:#917f0b;--bq-yellow-900:#615507;--bq-yellow-1000:#302a04;--bq-endava-grey-50:#f7f7f8;--bq-endava-grey-100:#e4e6e7;--bq-endava-grey-200:#b5babe;--bq-endava-grey-300:#949ca1;--bq-endava-grey-400:#737d84;--bq-endava-grey-500:#525f67;--bq-endava-grey-600:#30404b;--bq-endava-grey-700:#2b3942;--bq-endava-grey-800:#263139;--bq-endava-grey-900:#192b37;--bq-endava-grey-950:#151b1e;--bq-endava-grey-1000:#0f1316;--bq-endava-neutral-white:#fafbfb;--bq-endava-neutral-black:#060708;--bq-endava-orange-100:#fef3f1;--bq-endava-orange-200:#fbd6d1;--bq-endava-orange-300:#fab7af;--bq-endava-orange-400:#fa988b;--bq-endava-orange-500:#fc7866;--bq-endava-orange-600:#ff5640;--bq-endava-orange-700:#ce4a39;--bq-endava-orange-800:#a03d30;--bq-endava-orange-900:#722e25;--bq-endava-orange-1000:#471e19}*,:after,:before{box-sizing:border-box}*{font:inherit;margin:0}ol[role=list],ul[role=list]{list-style-type:none}html{text-size-adjust:none;font-family:var(--bq-font-family);font-size:var(--bq-font-size--m)}html:focus-within{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--bq-background--primary);color:var(--bq-text--primary);line-height:var(--bq-font-line-height--regular);min-height:100vb;text-rendering:optimizeSpeed}a:not([class]){text-decoration-skip-ink:auto}canvas,img,picture,svg,video{display:block;max-width:100%}button,input,select,textarea{font:inherit}h1,h2,h3,h4,h5,h6,p{overflow-wrap:break-word}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto;transition-duration:.01ms!important}}:where(:root){--bq-white:#fff;--bq-black:#060708;--bq-neutral-50:var(--bq-grey-50);--bq-neutral-100:var(--bq-grey-100);--bq-neutral-200:var(--bq-grey-200);--bq-neutral-300:var(--bq-grey-300);--bq-neutral-400:var(--bq-grey-400);--bq-neutral-500:var(--bq-grey-500);--bq-neutral-600:var(--bq-grey-600);--bq-neutral-700:var(--bq-grey-700);--bq-neutral-800:var(--bq-grey-800);--bq-neutral-900:var(--bq-grey-900);--bq-neutral-950:var(--bq-grey-950);--bq-neutral-1000:var(--bq-grey-1000);--bq-brand-light:var(--bq-iris-100);--bq-brand:var(--bq-iris-600);--bq-brand-dark:var(--bq-iris-1000);--bq-accent-light:var(--bq-purple-100);--bq-accent:var(--bq-purple-600);--bq-accent-dark:var(--bq-purple-1000);--bq-success-light:var(--bq-teal-100);--bq-success:var(--bq-teal-600);--bq-success-dark:var(--bq-teal-1000);--bq-danger-light:var(--bq-red-100);--bq-danger:var(--bq-red-600);--bq-danger-dark:var(--bq-red-1000);--bq-warning-light:var(--bq-gold-100);--bq-warning:var(--bq-gold-600);--bq-warning-dark:var(--bq-gold-1000);--bq-info-light:var(--bq-iris-100);--bq-info:var(--bq-iris-600);--bq-info-dark:var(--bq-iris-1000);--bq-focus:var(--bq-iris-600);--bq-data-01:var(--bq-brand);--bq-data-02:var(--bq-purple-600);--bq-data-03:var(--bq-magenta-600);--bq-data-04:var(--bq-cyan-600);--bq-data-05:var(--bq-teal-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-yellow-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-blue-600);--bq-data-10:var(--bq-grey-600);--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white);--bq-radius--none:0;--bq-radius--xs2:0.125rem;--bq-radius--xs:0.25rem;--bq-radius--s:0.5rem;--bq-radius--m:0.75rem;--bq-radius--l:1.5rem;--bq-radius--full:9999px;--bq-box-shadow--xs:0 2px 0 rgba(0,0,0,.016);--bq-box-shadow--s:0 8px 24px rgba(0,0,0,.04);--bq-box-shadow--m:0 10px 48px -16px rgba(0,0,0,.12);--bq-box-shadow--l:0 20px 58px -16px rgba(0,0,0,.16);--bq-font-family:"Outfit",sans-serif;--bq-font-size--xs:0.75rem;--bq-font-size--s:0.875rem;--bq-font-size--m:1rem;--bq-font-size--l:1.125rem;--bq-font-size--xl:1.5rem;--bq-font-size--xxl:2rem;--bq-font-size--xxl2:2.5rem;--bq-font-size--xxl3:3rem;--bq-font-size--xxl4:3.5rem;--bq-font-size--xxl5:4rem;--bq-font-weight--thin:100;--bq-font-weight--light:300;--bq-font-weight--regular:400;--bq-font-weight--medium:500;--bq-font-weight--semibold:600;--bq-font-weight--bold:700;--bq-font-line-height--small:1.2;--bq-font-line-height--regular:1.5;--bq-font-line-height--large:1.5;--bq-spacing-xs3:0.125rem;--bq-spacing-xs2:0.25rem;--bq-spacing-xs:0.5rem;--bq-spacing-s:0.75rem;--bq-spacing-m:1rem;--bq-spacing-l:1.5rem;--bq-spacing-xl:2rem;--bq-spacing-xxl:2.5rem;--bq-spacing-xxl2:3.5rem;--bq-spacing-xxl3:4rem;--bq-spacing-xxl4:4.5rem;--bq-stroke-s:1px;--bq-stroke-m:2px;--bq-stroke-l:3px}.beeq:not([bq-mode]),.light,:root:not([bq-theme]):not([bq-mode]),:root[bq-theme=beeq]:not([bq-mode]),[bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--alt:var(--bq-white);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-light);--bq-hover:#bcbfc5;--bq-active:#444546}.dark,[bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-950);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-brand);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-brand);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-brand);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-brand);--bq-ui--info-alt:var(--bq-brand-dark);--bq-hover:#444546;--bq-active:#1f2026}:where(.endava),:where([bq-theme=endava]){--bq-font-family:"Poppins",sans-serif;--bq-white:#fafbfb;--bq-black:#030406;--bq-neutral-50:var(--bq-endava-grey-50);--bq-neutral-100:var(--bq-endava-grey-100);--bq-neutral-200:var(--bq-endava-grey-200);--bq-neutral-300:var(--bq-endava-grey-300);--bq-neutral-400:var(--bq-endava-grey-400);--bq-neutral-500:var(--bq-endava-grey-500);--bq-neutral-600:var(--bq-endava-grey-600);--bq-neutral-700:var(--bq-endava-grey-700);--bq-neutral-800:var(--bq-endava-grey-800);--bq-neutral-900:var(--bq-endava-grey-900);--bq-neutral-950:var(--bq-endava-grey-950);--bq-neutral-1000:var(--bq-endava-grey-1000);--bq-brand-light:var(--bq-endava-orange-100);--bq-brand:var(--bq-endava-orange-600);--bq-brand-dark:var(--bq-endava-orange-1000);--bq-accent-light:var(--bq-endava-orange-100);--bq-accent:var(--bq-endava-orange-600);--bq-accent-dark:var(--bq-endava-orange-1000);--bq-success-light:var(--bq-green-100);--bq-success:var(--bq-green-600);--bq-success-dark:var(--bq-green-1000);--bq-danger-light:var(--bq-corai-100);--bq-danger:var(--bq-corai-600);--bq-danger-dark:var(--bq-corai-1000);--bq-warning-light:var(--bq-yellow-100);--bq-warning:var(--bq-yellow-600);--bq-warning-dark:var(--bq-yellow-1000);--bq-info-light:var(--bq-blue-100);--bq-info:var(--bq-blue-600);--bq-info-dark:var(--bq-blue-1000);--bq-focus:var(--bq-endava-orange-600);--bq-data-01:var(--bq-brand);--bq-data-02:#af0cd8;--bq-data-03:#0ca8d8;--bq-data-04:var(--bq-teal-600);--bq-data-05:var(--bq-yellow-600);--bq-data-06:var(--bq-orange-600);--bq-data-07:var(--bq-blue-600);--bq-data-08:var(--bq-red-600);--bq-data-09:var(--bq-purple-600);--bq-data-10:#394b56;--bq-data-11:var(--bq-black);--bq-data-12:var(--bq-white)}.endava.light,.endava:not([bq-mode]),[bq-theme=endava]:not([bq-mode]),[bq-theme=endava][bq-mode=light]{--bq-background--primary:var(--bq-white);--bq-background--secondary:var(--bq-neutral-100);--bq-background--tertiary:var(--bq-neutral-200);--bq-background--alt:var(--bq-neutral-300);--bq-background--inverse:var(--bq-neutral-900);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-800);--bq-icon--secondary:var(--bq-neutral-600);--bq-icon--inverse:var(--bq-neutral-50);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-200);--bq-stroke--secondary:var(--bq-neutral-600);--bq-stroke--tertiary:var(--bq-neutral-900);--bq-stroke--inverse:var(--bq-white);--bq-stroke--brand:var(--bq-brand);--bq-stroke--alt:var(--bq-neutral-50);--bq-stroke--brand-alt:var(--bq-brand-light);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-800);--bq-text--secondary:var(--bq-neutral-600);--bq-text--inverse:var(--bq-neutral-50);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-white);--bq-ui--secondary:var(--bq-neutral-100);--bq-ui--tertiary:var(--bq-neutral-500);--bq-ui--inverse:var(--bq-neutral-900);--bq-ui--alt:var(--bq-neutral-50);--bq-ui--brand-alt:var(--bq-brand-light);--bq-ui--brand:var(--bq-brand);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-light);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-light);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-light);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-light);--bq-hover:#444546;--bq-active:#1f2026}.endava.dark,[bq-theme=endava][bq-mode=dark]{--bq-background--primary:var(--bq-neutral-1000);--bq-background--secondary:var(--bq-neutral-900);--bq-background--tertiary:var(--bq-neutral-800);--bq-background--alt:var(--bq-neutral-700);--bq-background--inverse:var(--bq-neutral-600);--bq-background--brand:var(--bq-brand);--bq-background--overlay:var(--bq-neutral-900);--bq-icon--primary:var(--bq-neutral-100);--bq-icon--secondary:var(--bq-neutral-400);--bq-icon--inverse:var(--bq-neutral-800);--bq-icon--brand:var(--bq-brand);--bq-icon--alt:var(--bq-white);--bq-icon--info:var(--bq-info);--bq-icon--success:var(--bq-success);--bq-icon--warning:var(--bq-warning);--bq-icon--danger:var(--bq-danger);--bq-stroke--primary:var(--bq-neutral-900);--bq-stroke--secondary:var(--bq-neutral-700);--bq-stroke--tertiary:var(--bq-neutral-400);--bq-stroke--inverse:var(--bq-neutral-950);--bq-stroke--brand:var(--bq-brand);--bq-stroke--brand-alt:var(--bq-brand-dark);--bq-stroke--alt:var(--bq-neutral-1000);--bq-stroke--success:var(--bq-success);--bq-stroke--warning:var(--bq-warning);--bq-stroke--danger:var(--bq-danger);--bq-stroke--info:var(--bq-info);--bq-text--primary:var(--bq-neutral-100);--bq-text--secondary:var(--bq-neutral-400);--bq-text--inverse:var(--bq-neutral-800);--bq-text--brand:var(--bq-brand);--bq-text--alt:var(--bq-neutral-white);--bq-text--info:var(--bq-info);--bq-text--success:var(--bq-success);--bq-text--warning:var(--bq-warning);--bq-text--danger:var(--bq-danger);--bq-ui--primary:var(--bq-neutral-900);--bq-ui--secondary:var(--bq-neutral-950);--bq-ui--tertiary:var(--bq-neutral-700);--bq-ui--inverse:var(--bq-neutral-100);--bq-ui--brand:var(--bq-brand);--bq-ui--brand-alt:var(--bq-brand-dark);--bq-ui--alt:var(--bq-neutral-950);--bq-ui--success:var(--bq-success);--bq-ui--success-alt:var(--bq-success-dark);--bq-ui--warning:var(--bq-warning);--bq-ui--warning-alt:var(--bq-warning-dark);--bq-ui--danger:var(--bq-danger);--bq-ui--danger-alt:var(--bq-danger-dark);--bq-ui--info:var(--bq-info);--bq-ui--info-alt:var(--bq-info-dark);--bq-hover:#444546;--bq-active:#1f2026}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.inset-\[unset\]{inset:unset}.start-0{inset-inline-start:0}.-z-\[1\]{z-index:-1}.z-\[--bq-tooltip--z-index\]{z-index:var(--bq-tooltip--z-index)}.m-0{margin:0}.box-border{box-sizing:border-box}.rotate-45{--tw-rotate:45deg}.rotate-45,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.overflow-visible{overflow:visible}.rounded-\[--bq-tooltip--border-radius\]{border-radius:var(--bq-tooltip--border-radius)}.border-\[length\:--bq-tooltip--border-width\]{border-width:var(--bq-tooltip--border-width)}.border-\[color\:--bq-tooltip--border-color\]{border-color:var(--bq-tooltip--border-color)}.bg-\[--bq-tooltip--background-color\]{background-color:var(--bq-tooltip--background-color)}.text-\[length\:--bq-tooltip--font-size\]{font-size:var(--bq-tooltip--font-size)}.leading-\[--bq-tooltip--line-height\]{line-height:var(--bq-tooltip--line-height)}.text-\[color\:--bq-tooltip--text-color\]{color:var(--bq-tooltip--text-color)}.shadow-\[shadow\:--bq-tooltip--box-shadow\]{--tw-shadow:var(--bq-tooltip--box-shadow);--tw-shadow-colored:var(--bq-tooltip--box-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.content-empty{--tw-content:"";content:var(--tw-content)}.bs-2{block-size:.5rem}.is-2{inline-size:.5rem}.is-\[--bq-tooltip--width\]{inline-size:var(--bq-tooltip--width)}.max-is-\[--bq-tooltip--max-width\]{max-inline-size:var(--bq-tooltip--max-width)}.p-b-\[--bq-tooltip--paddingY\]{padding-block:var(--bq-tooltip--paddingY)}.p-i-\[--bq-tooltip--paddingX\]{padding-inline:var(--bq-tooltip--paddingX)}.inset-bs-0{inset-block-start:0}@-webkit-keyframes fade-in{0%{opacity:0}}@keyframes fade-in{0%{opacity:0}}@-webkit-keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@keyframes slide-in{0%{-webkit-transform:translateY(10px);transform:translateY(10px)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}:host{--bq-tooltip--background-color:var(--bq-ui--inverse);--bq-tooltip--box-shadow:var(--bq-box-shadow--m);--bq-tooltip--font-size:var(--bq-font-size--m);--bq-tooltip--line-height:var(--bq-font-line-height--regular);--bq-tooltip--text-color:var(--bq-text--inverse);--bq-tooltip--paddingX:var(--bq-spacing-xs);--bq-tooltip--paddingY:var(--bq-spacing-xs2);--bq-tooltip--border-color:transparent;--bq-tooltip--border-radius:var(--bq-radius--s);--bq-tooltip--border-style:none;--bq-tooltip--border-width:unset;--bq-tooltip--max-width:320px;--bq-tooltip--width:max-content;--bq-tooltip--z-index:10}.bq-tooltip--panel{--tw-shadow:var(--bq-tooltip--box-shadow);--tw-shadow-colored:var(--bq-tooltip--box-shadow);-webkit-animation:fade-in .3s ease 0s;animation:fade-in .3s ease 0s;background-color:var(--bq-tooltip--background-color);border-color:var(--bq-tooltip--border-color);border-radius:var(--bq-tooltip--border-radius);border-style:var(--bq-tooltip--border-style);border-width:var(--bq-tooltip--border-width);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-sizing:border-box;color:var(--bq-tooltip--text-color);font-size:var(--bq-tooltip--font-size);inline-size:var(--bq-tooltip--width);line-height:var(--bq-tooltip--line-height);max-inline-size:var(--bq-tooltip--max-width);padding-block:var(--bq-tooltip--paddingY);padding-inline:var(--bq-tooltip--paddingX);pointer-events:none;position:fixed;z-index:var(--bq-tooltip--z-index)}.bq-tooltip--panel[popover]{inset:unset;margin:0;overflow:visible;position:absolute}.bq-tooltip--arrow,.bq-tooltip--arrow:before{block-size:.5rem;inline-size:.5rem;position:absolute;z-index:-1}.bq-tooltip--arrow:before{--tw-rotate:45deg;--tw-content:"";background-color:var(--bq-tooltip--background-color);content:var(--tw-content);inset-block-start:0;inset-inline-start:0}.bq-tooltip--arrow:before,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}.filter{--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.visible{visibility:visible}.static{position:static}.relative{position:relative}.hidden{display:none}.focus{outline:var(--bq-ring-width,2px) solid var(--bq-ring-color-focus,var(--bq-focus));outline-offset:var(--bq-ring-offset-width,1px)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-ui.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/services/interfaces/floating-ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { Placement, Strategy } from '@floating-ui/core';\n\nexport interface FloatingUIOptions {\n distance?: number;\n placement?: Placement;\n arrow?: HTMLElement;\n strategy: Strategy;\n sameWidth?: boolean;\n skidding?: number;\n onPositionChange?: (placement: Placement) => void;\n}\n\nexport type { Placement };\n"]}
|
|
1
|
+
{"version":3,"file":"floating-ui.js","sourceRoot":"","sources":["../../../../../../packages/beeq/src/services/interfaces/floating-ui.ts"],"names":[],"mappings":"","sourcesContent":["import type { Placement, Strategy } from '@floating-ui/core';\n\nexport interface FloatingUIOptions {\n distance?: number;\n placement?: Placement;\n arrow?: HTMLElement | null;\n strategy: Strategy;\n sameWidth?: boolean;\n skidding?: number;\n onPositionChange?: (placement: Placement) => void;\n}\n\nexport type { Placement };\n"]}
|
|
@@ -3,11 +3,28 @@
|
|
|
3
3
|
* © https://beeq.design - Apache 2 License.
|
|
4
4
|
*/
|
|
5
5
|
import { arrow, autoUpdate, computePosition, flip, hide, offset, shift, size, } from "@floating-ui/dom";
|
|
6
|
+
const STATIC_SIDE_BY_PLACEMENT = {
|
|
7
|
+
top: 'bottom',
|
|
8
|
+
right: 'left',
|
|
9
|
+
bottom: 'top',
|
|
10
|
+
left: 'right',
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Thin wrapper around Floating UI that owns the shared middleware pipeline
|
|
14
|
+
* and ensures each instance has at most one `autoUpdate` subscription.
|
|
15
|
+
*
|
|
16
|
+
* Lifecycle:
|
|
17
|
+
* - `start()` starts position tracking and performs an initial reposition.
|
|
18
|
+
* - `stop()` stops tracking and invalidates pending positioning results.
|
|
19
|
+
* - `reposition()` computes and applies the position once.
|
|
20
|
+
* - `configure(options)` updates options and repositions only when active.
|
|
21
|
+
*/
|
|
6
22
|
export class FloatingUI {
|
|
7
23
|
panel;
|
|
8
24
|
trigger;
|
|
9
25
|
options;
|
|
10
|
-
|
|
26
|
+
cleanup;
|
|
27
|
+
repositionId = 0;
|
|
11
28
|
constructor(trigger, panel, options) {
|
|
12
29
|
this.trigger = trigger;
|
|
13
30
|
this.panel = panel;
|
|
@@ -18,74 +35,92 @@ export class FloatingUI {
|
|
|
18
35
|
sameWidth: false,
|
|
19
36
|
...options,
|
|
20
37
|
};
|
|
21
|
-
this.init(options);
|
|
22
38
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Merges new options into the current configuration. Active instances
|
|
41
|
+
* reposition without recreating their `autoUpdate` subscription; stopped
|
|
42
|
+
* instances apply the options the next time they start.
|
|
43
|
+
*/
|
|
44
|
+
configure(options) {
|
|
45
|
+
Object.assign(this.options, options);
|
|
46
|
+
this.repositionId += 1;
|
|
47
|
+
if (options.sameWidth === false) {
|
|
48
|
+
this.panel.style.width = '';
|
|
49
|
+
}
|
|
50
|
+
if (!this.cleanup)
|
|
51
|
+
return;
|
|
52
|
+
void this.reposition();
|
|
26
53
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
shift(),
|
|
37
|
-
size(this.options.sameWidth && {
|
|
38
|
-
apply({ rects, elements }) {
|
|
39
|
-
Object.assign(elements.floating.style, {
|
|
40
|
-
width: `${rects.reference.width}px`,
|
|
41
|
-
});
|
|
42
|
-
},
|
|
43
|
-
}),
|
|
44
|
-
arrow({ element: this.options.arrow || null }),
|
|
45
|
-
this.positionChange(),
|
|
46
|
-
hide(),
|
|
47
|
-
],
|
|
48
|
-
});
|
|
49
|
-
this.applyPanelPosition(x, y);
|
|
50
|
-
this.applyArrowPosition(placement, middlewareData);
|
|
51
|
-
this.applyVisibility(middlewareData);
|
|
52
|
-
})();
|
|
53
|
-
});
|
|
54
|
+
/**
|
|
55
|
+
* Opens the `autoUpdate` subscription so the panel keeps tracking the
|
|
56
|
+
* trigger through scroll, resize, layout and ancestor changes. No-op if
|
|
57
|
+
* the subscription is already running.
|
|
58
|
+
*/
|
|
59
|
+
start() {
|
|
60
|
+
if (this.cleanup)
|
|
61
|
+
return;
|
|
62
|
+
this.cleanup = autoUpdate(this.trigger, this.panel, () => void this.reposition());
|
|
54
63
|
}
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Tears down the `autoUpdate` subscription. Idempotent — safe to call
|
|
66
|
+
* multiple times, and before the first `start()`.
|
|
67
|
+
*/
|
|
68
|
+
stop() {
|
|
69
|
+
this.repositionId += 1;
|
|
70
|
+
if (!this.cleanup)
|
|
57
71
|
return;
|
|
58
|
-
this.
|
|
72
|
+
this.cleanup();
|
|
73
|
+
this.cleanup = undefined;
|
|
59
74
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Runs a single Floating UI `computePosition` pass and applies the
|
|
77
|
+
* resulting styles to the panel (and the arrow, if configured).
|
|
78
|
+
*/
|
|
79
|
+
async reposition() {
|
|
80
|
+
const repositionId = ++this.repositionId;
|
|
81
|
+
const { arrow: arrowElement, distance, onPositionChange, placement: configuredPlacement, sameWidth, skidding, strategy, } = this.options;
|
|
82
|
+
const { x, y, placement, middlewareData } = await computePosition(this.trigger, this.panel, {
|
|
83
|
+
placement: configuredPlacement,
|
|
84
|
+
strategy,
|
|
85
|
+
middleware: [
|
|
86
|
+
offset({ mainAxis: distance, crossAxis: skidding }),
|
|
87
|
+
flip(),
|
|
88
|
+
shift(),
|
|
89
|
+
size({
|
|
90
|
+
apply: ({ rects, elements }) => {
|
|
91
|
+
if (repositionId !== this.repositionId || !elements.floating.isConnected)
|
|
92
|
+
return;
|
|
93
|
+
elements.floating.style.width = sameWidth ? `${rects.reference.width}px` : '';
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
...(arrowElement ? [arrow({ element: arrowElement })] : []),
|
|
97
|
+
hide(),
|
|
98
|
+
],
|
|
99
|
+
});
|
|
100
|
+
if (repositionId !== this.repositionId || !this.panel.isConnected)
|
|
101
|
+
return;
|
|
102
|
+
this.applyPanelPosition(x, y);
|
|
103
|
+
this.applyArrowPosition(arrowElement, placement, middlewareData);
|
|
104
|
+
this.applyVisibility(middlewareData);
|
|
105
|
+
onPositionChange?.(placement);
|
|
70
106
|
}
|
|
71
107
|
applyPanelPosition(x, y) {
|
|
108
|
+
const dpr = window.devicePixelRatio || 1;
|
|
109
|
+
const roundedX = Math.round(x * dpr) / dpr;
|
|
110
|
+
const roundedY = Math.round(y * dpr) / dpr;
|
|
72
111
|
Object.assign(this.panel.style, {
|
|
73
112
|
top: '0',
|
|
74
113
|
left: '0',
|
|
75
|
-
transform: `translate(${
|
|
114
|
+
transform: `translate(${roundedX}px, ${roundedY}px)`,
|
|
76
115
|
});
|
|
77
116
|
}
|
|
78
|
-
applyArrowPosition(placement, middlewareData) {
|
|
79
|
-
if (!
|
|
117
|
+
applyArrowPosition(arrowElement, placement, middlewareData) {
|
|
118
|
+
if (!arrowElement)
|
|
80
119
|
return;
|
|
81
|
-
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
bottom: 'top',
|
|
86
|
-
left: 'right',
|
|
87
|
-
}[placement.split('-')[0]];
|
|
88
|
-
Object.assign(this.options.arrow.style, {
|
|
120
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow ?? {};
|
|
121
|
+
const basePlacement = placement.split('-')[0];
|
|
122
|
+
const staticSide = STATIC_SIDE_BY_PLACEMENT[basePlacement];
|
|
123
|
+
Object.assign(arrowElement.style, {
|
|
89
124
|
left: arrowX != null ? `${arrowX}px` : '',
|
|
90
125
|
top: arrowY != null ? `${arrowY}px` : '',
|
|
91
126
|
right: '',
|
|
@@ -94,14 +129,8 @@ export class FloatingUI {
|
|
|
94
129
|
});
|
|
95
130
|
}
|
|
96
131
|
applyVisibility(middlewareData) {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
visibility: referenceHidden ? 'hidden' : 'visible',
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
roundByDPR(value) {
|
|
103
|
-
const dpr = window.devicePixelRatio || 1;
|
|
104
|
-
return Math.round(value * dpr) / dpr;
|
|
132
|
+
const referenceHidden = middlewareData.hide?.referenceHidden;
|
|
133
|
+
this.panel.style.visibility = referenceHidden ? 'hidden' : 'visible';
|
|
105
134
|
}
|
|
106
135
|
}
|
|
107
136
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/beeq/src/services/libraries/floating-ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,UAAU,EACV,eAAe,EACf,IAAI,EACJ,IAAI,EAEJ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/beeq/src/services/libraries/floating-ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,UAAU,EACV,eAAe,EACf,IAAI,EACJ,IAAI,EAEJ,MAAM,EAGN,KAAK,EACL,IAAI,GACL,MAAM,kBAAkB,CAAC;AAI1B,MAAM,wBAAwB,GAAG;IAC/B,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,OAAO;CACL,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,OAAO,UAAU;IACZ,KAAK,CAAc;IACnB,OAAO,CAAmB;IAC1B,OAAO,CAAoB;IAC5B,OAAO,CAA2B;IAClC,YAAY,GAAG,CAAC,CAAC;IAEzB,YAAY,OAAyB,EAAE,KAAkB,EAAE,OAA2B;QACpF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG;YACb,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,QAAQ;YACnB,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,KAAK;YAChB,GAAG,OAAO;SACX,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAmC;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC;QAEvB,IAAI,OAAO,C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G,EAAE,GAAG;YACR,IAAI,EAAE,GAAG;YACT,SAAS,EAAE,aAAa,QAAQ,OAAO,QAAQ,KAAK;SACrD,CAAC,CAAC;IACL,CAAC;IAEO,kBAAkB,CACxB,YAA4C,EAC5C,SAAoB,EACpB,cAA8B;QAE9B,IAAI,CAAC,YAAY;YAAE,OAAO;QAE1B,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC,KAAK,IAAI,EAAE,CAAC;QAC5D,MAAM,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAA0C,CAAC;QACvF,MAAM,UAAU,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;QAE3D,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE;YAChC,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE;YACzC,GAAG,EAAE,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE;YACxC,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,CAAC,UAAU,CAAC,EAAE,MAAM;SACrB,CAAC,CAAC;IACL,CAAC;IAEO,eAAe,CAAC,cAA8B;QACpD,MAAM,eAAe,GAAG,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC;QAC7D,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,CAAC;CACF","sourcesContent":["import {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n hide,\n type MiddlewareData,\n offset,\n type Placement,\n type ReferenceElement,\n shift,\n size,\n} from '@floating-ui/dom';\n\nimport type { FloatingUIOptions } from '../../interfaces';\n\nconst STATIC_SIDE_BY_PLACEMENT = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n} as const;\n\n/**\n * Thin wrapper around Floating UI that owns the shared middleware pipeline\n * and ensures each instance has at most one `autoUpdate` subscription.\n *\n * Lifecycle:\n * - `start()` starts position tracking and performs an initial reposition.\n * - `stop()` stops tracking and invalidates pending positioning results.\n * - `reposition()` computes and applies the position once.\n * - `configure(options)` updates options and repositions only when active.\n */\nexport class FloatingUI {\n readonly panel: HTMLElement;\n readonly trigger: ReferenceElement;\n readonly options: FloatingUIOptions;\n private cleanup: (() => void) | undefined;\n private repositionId = 0;\n\n constructor(trigger: ReferenceElement, panel: HTMLElement, options?: FloatingUIOptions) {\n this.trigger = trigger;\n this.panel = panel;\n this.options = {\n distance: 20,\n placement: 'bottom',\n strategy: 'absolute',\n sameWidth: false,\n ...options,\n };\n }\n\n /**\n * Merges new options into the current configuration. Active instances\n * reposition without recreating their `autoUpdate` subscription; stopped\n * instances apply the options the next time they start.\n */\n configure(options: Partial<FloatingUIOptions>): void {\n Object.assign(this.options, options);\n this.repositionId += 1;\n\n if (options.sameWidth === false) {\n this.panel.style.width = '';\n }\n if (!this.cleanup) return;\n\n void this.reposition();\n }\n\n /**\n * Opens the `autoUpdate` subscription so the panel keeps tracking the\n * trigger through scroll, resize, layout and ancestor changes. No-op if\n * the subscription is already running.\n */\n start(): void {\n if (this.cleanup) return;\n\n this.cleanup = autoUpdate(this.trigger, this.panel, () => void this.reposition());\n }\n\n /**\n * Tears down the `autoUpdate` subscription. Idempotent — safe to call\n * multiple times, and before the first `start()`.\n */\n stop(): void {\n this.repositionId += 1;\n if (!this.cleanup) return;\n\n this.cleanup();\n this.cleanup = undefined;\n }\n\n /**\n * Runs a single Floating UI `computePosition` pass and applies the\n * resulting styles to the panel (and the arrow, if configured).\n */\n async reposition(): Promise<void> {\n const repositionId = ++this.repositionId;\n const {\n arrow: arrowElement,\n distance,\n onPositionChange,\n placement: configuredPlacement,\n sameWidth,\n skidding,\n strategy,\n } = this.options;\n const { x, y, placement, middlewareData } = await computePosition(this.trigger, this.panel, {\n placement: configuredPlacement,\n strategy,\n middleware: [\n offset({ mainAxis: distance, crossAxis: skidding }),\n flip(),\n shift(),\n size({\n apply: ({ rects, elements }) => {\n if (repositionId !== this.repositionId || !elements.floating.isConnected) return;\n elements.floating.style.width = sameWidth ? `${rects.reference.width}px` : '';\n },\n }),\n ...(arrowElement ? [arrow({ element: arrowElement })] : []),\n hide(),\n ],\n });\n\n if (repositionId !== this.repositionId || !this.panel.isConnected) return;\n\n this.applyPanelPosition(x, y);\n this.applyArrowPosition(arrowElement, placement, middlewareData);\n this.applyVisibility(middlewareData);\n\n onPositionChange?.(placement);\n }\n\n private applyPanelPosition(x: number, y: number): void {\n const dpr = window.devicePixelRatio || 1;\n const roundedX = Math.round(x * dpr) / dpr;\n const roundedY = Math.round(y * dpr) / dpr;\n\n Object.assign(this.panel.style, {\n top: '0',\n left: '0',\n transform: `translate(${roundedX}px, ${roundedY}px)`,\n });\n }\n\n private applyArrowPosition(\n arrowElement: HTMLElement | null | undefined,\n placement: Placement,\n middlewareData: MiddlewareData,\n ): void {\n if (!arrowElement) return;\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow ?? {};\n const basePlacement = placement.split('-')[0] as keyof typeof STATIC_SIDE_BY_PLACEMENT;\n const staticSide = STATIC_SIDE_BY_PLACEMENT[basePlacement];\n\n Object.assign(arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n right: '',\n bottom: '',\n [staticSide]: '-4px',\n });\n }\n\n private applyVisibility(middlewareData: MiddlewareData): void {\n const referenceHidden = middlewareData.hide?.referenceHidden;\n this.panel.style.visibility = referenceHidden ? 'hidden' : 'visible';\n }\n}\n"]}
|