@beeq/core 1.8.0-beta.11 → 1.8.0-beta.13
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/{p-42fd96c3.entry.js → p-01050fbd.entry.js} +2 -2
- package/dist/beeq/{p-7bc123c9.entry.js → p-2951eb56.entry.js} +2 -2
- package/dist/beeq/{p-e8410587.entry.js → p-9a7ddcd2.entry.js} +2 -2
- package/dist/beeq/{p-b71d2d9a.entry.js → p-fc0af6bb.entry.js} +2 -2
- package/dist/cjs/bq-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +1 -1
- package/dist/cjs/bq-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +1 -1
- package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
- package/dist/collection/components/dialog/scss/bq-dialog.css +1 -1
- package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
- package/dist/collection/components/select/scss/bq-select.css +1 -1
- package/dist/components/bq-accordion-group.js +1 -114
- package/dist/components/bq-accordion-group.js.map +1 -1
- package/dist/components/bq-accordion.js +1 -311
- package/dist/components/bq-accordion.js.map +1 -1
- package/dist/components/bq-alert.js +1 -220
- package/dist/components/bq-alert.js.map +1 -1
- package/dist/components/bq-avatar.js +1 -139
- package/dist/components/bq-avatar.js.map +1 -1
- package/dist/components/bq-badge.js +1 -7
- package/dist/components/bq-badge.js.map +1 -1
- package/dist/components/bq-breadcrumb-item.js +1 -96
- package/dist/components/bq-breadcrumb-item.js.map +1 -1
- package/dist/components/bq-breadcrumb.js +1 -112
- package/dist/components/bq-breadcrumb.js.map +1 -1
- package/dist/components/bq-button.js +1 -7
- package/dist/components/bq-button.js.map +1 -1
- package/dist/components/bq-card.js +1 -86
- package/dist/components/bq-card.js.map +1 -1
- package/dist/components/bq-checkbox.js +1 -207
- package/dist/components/bq-checkbox.js.map +1 -1
- package/dist/components/bq-date-picker.js +1 -390
- package/dist/components/bq-date-picker.js.map +1 -1
- package/dist/components/bq-dialog.js +1 -252
- package/dist/components/bq-dialog.js.map +1 -1
- package/dist/components/bq-divider.js +1 -7
- package/dist/components/bq-divider.js.map +1 -1
- package/dist/components/bq-drawer.js +1 -249
- package/dist/components/bq-drawer.js.map +1 -1
- package/dist/components/bq-dropdown.js +1 -7
- package/dist/components/bq-dropdown.js.map +1 -1
- package/dist/components/bq-empty-state.js +1 -125
- package/dist/components/bq-empty-state.js.map +1 -1
- package/dist/components/bq-icon.js +1 -7
- package/dist/components/bq-icon.js.map +1 -1
- package/dist/components/bq-input.js +1 -266
- package/dist/components/bq-input.js.map +1 -1
- package/dist/components/bq-notification.js +1 -245
- package/dist/components/bq-notification.js.map +1 -1
- package/dist/components/bq-option-group.js +1 -64
- package/dist/components/bq-option-group.js.map +1 -1
- package/dist/components/bq-option-list.js +1 -7
- package/dist/components/bq-option-list.js.map +1 -1
- package/dist/components/bq-option.js +1 -137
- package/dist/components/bq-option.js.map +1 -1
- package/dist/components/bq-page-title.js +1 -82
- package/dist/components/bq-page-title.js.map +1 -1
- package/dist/components/bq-panel.js +1 -7
- package/dist/components/bq-panel.js.map +1 -1
- package/dist/components/bq-progress.js +1 -130
- package/dist/components/bq-progress.js.map +1 -1
- package/dist/components/bq-radio-group.js +1 -207
- package/dist/components/bq-radio-group.js.map +1 -1
- package/dist/components/bq-radio.js +1 -136
- package/dist/components/bq-radio.js.map +1 -1
- package/dist/components/bq-select.js +1 -452
- package/dist/components/bq-select.js.map +1 -1
- package/dist/components/bq-side-menu-item.js +1 -125
- package/dist/components/bq-side-menu-item.js.map +1 -1
- package/dist/components/bq-side-menu.js +1 -144
- package/dist/components/bq-side-menu.js.map +1 -1
- package/dist/components/bq-slider.js +1 -307
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/bq-spinner.js +1 -167
- package/dist/components/bq-spinner.js.map +1 -1
- package/dist/components/bq-status.js +1 -82
- package/dist/components/bq-status.js.map +1 -1
- package/dist/components/bq-step-item.js +1 -119
- package/dist/components/bq-step-item.js.map +1 -1
- package/dist/components/bq-steps.js +1 -108
- package/dist/components/bq-steps.js.map +1 -1
- package/dist/components/bq-switch.js +1 -175
- package/dist/components/bq-switch.js.map +1 -1
- package/dist/components/bq-tab-group.js +1 -232
- package/dist/components/bq-tab-group.js.map +1 -1
- package/dist/components/bq-tab.js +1 -170
- package/dist/components/bq-tab.js.map +1 -1
- package/dist/components/bq-tag.js +1 -7
- package/dist/components/bq-tag.js.map +1 -1
- package/dist/components/bq-textarea.js +1 -210
- package/dist/components/bq-textarea.js.map +1 -1
- package/dist/components/bq-toast.js +1 -213
- package/dist/components/bq-toast.js.map +1 -1
- package/dist/components/bq-tooltip.js +1 -7
- package/dist/components/bq-tooltip.js.map +1 -1
- package/dist/components/index.js +1 -1246
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-073153b0.js +6 -0
- package/dist/components/p-073153b0.js.map +1 -0
- package/dist/components/p-0b976755.js +6 -0
- package/dist/components/p-0b976755.js.map +1 -0
- package/dist/components/p-1a5d4394.js +6 -0
- package/dist/components/p-1a5d4394.js.map +1 -0
- package/dist/components/p-1c8b6eb4.js +6 -0
- package/dist/components/p-1c8b6eb4.js.map +1 -0
- package/dist/components/p-1defeea3.js +6 -0
- package/dist/components/p-1defeea3.js.map +1 -0
- package/dist/components/p-31df5ea1.js +6 -0
- package/dist/components/p-31df5ea1.js.map +1 -0
- package/dist/components/p-33c55e15.js +6 -0
- package/dist/components/p-33c55e15.js.map +1 -0
- package/dist/components/p-4299eebe.js +6 -0
- package/dist/components/p-4299eebe.js.map +1 -0
- package/dist/components/p-57621be1.js +6 -0
- package/dist/components/p-57621be1.js.map +1 -0
- package/dist/components/p-687da041.js +6 -0
- package/dist/components/p-687da041.js.map +1 -0
- package/dist/components/p-756ea6e3.js +6 -0
- package/dist/components/p-756ea6e3.js.map +1 -0
- package/dist/components/p-90b96691.js +6 -0
- package/dist/components/p-90b96691.js.map +1 -0
- package/dist/components/p-99829fc7.js +6 -0
- package/dist/components/p-99829fc7.js.map +1 -0
- package/dist/components/p-9e40fcc3.js +6 -0
- package/dist/components/p-9e40fcc3.js.map +1 -0
- package/dist/components/p-a5dc1c94.js +6 -0
- package/dist/components/p-a5dc1c94.js.map +1 -0
- package/dist/components/p-a8cad5ab.js +6 -0
- package/dist/components/p-a8cad5ab.js.map +1 -0
- package/dist/components/p-ac2aea4d.js +6 -0
- package/dist/components/p-ac2aea4d.js.map +1 -0
- package/dist/components/p-af062402.js +6 -0
- package/dist/components/p-af062402.js.map +1 -0
- package/dist/components/p-b8a8243f.js +7 -0
- package/dist/components/p-b8a8243f.js.map +1 -0
- package/dist/components/p-b9b47a5c.js +6 -0
- package/dist/components/p-b9b47a5c.js.map +1 -0
- package/dist/components/p-c78ae3c2.js +6 -0
- package/dist/components/p-c78ae3c2.js.map +1 -0
- package/dist/components/p-d7ce7165.js +6 -0
- package/dist/components/p-d7ce7165.js.map +1 -0
- package/dist/components/p-ecd27cf2.js +6 -0
- package/dist/components/p-ecd27cf2.js.map +1 -0
- package/dist/components/p-edfd9767.js +6 -0
- package/dist/components/p-edfd9767.js.map +1 -0
- package/dist/esm/bq-date-picker.entry.js +1 -1
- package/dist/esm/bq-dialog.entry.js +1 -1
- package/dist/esm/bq-drawer.entry.js +1 -1
- package/dist/esm/bq-select.entry.js +1 -1
- package/dist/hydrate/index.js +4 -4
- package/dist/hydrate/index.mjs +4 -4
- package/dist/stencil.config.js +4 -1
- package/dist/stencil.config.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/bq-badge2.js +0 -125
- package/dist/components/bq-badge2.js.map +0 -1
- package/dist/components/bq-button2.js +0 -208
- package/dist/components/bq-button2.js.map +0 -1
- package/dist/components/bq-divider2.js +0 -159
- package/dist/components/bq-divider2.js.map +0 -1
- package/dist/components/bq-dropdown2.js +0 -155
- package/dist/components/bq-dropdown2.js.map +0 -1
- package/dist/components/bq-icon2.js +0 -315
- package/dist/components/bq-icon2.js.map +0 -1
- package/dist/components/bq-option-list2.js +0 -76
- package/dist/components/bq-option-list2.js.map +0 -1
- package/dist/components/bq-panel2.js +0 -135
- package/dist/components/bq-panel2.js.map +0 -1
- package/dist/components/bq-steps.types.js +0 -10
- package/dist/components/bq-steps.types.js.map +0 -1
- package/dist/components/bq-tab.types.js +0 -11
- package/dist/components/bq-tab.types.js.map +0 -1
- package/dist/components/bq-tag2.js +0 -271
- package/dist/components/bq-tag2.js.map +0 -1
- package/dist/components/bq-tooltip2.js +0 -178
- package/dist/components/bq-tooltip2.js.map +0 -1
- package/dist/components/cssVariables.js +0 -34
- package/dist/components/cssVariables.js.map +0 -1
- package/dist/components/debounce.js +0 -73
- package/dist/components/debounce.js.map +0 -1
- package/dist/components/event.js +0 -18
- package/dist/components/event.js.map +0 -1
- package/dist/components/index2.js +0 -2138
- package/dist/components/index2.js.map +0 -1
- package/dist/components/isDefined.js +0 -19
- package/dist/components/isDefined.js.map +0 -1
- package/dist/components/isHTMLElement.js +0 -17
- package/dist/components/isHTMLElement.js.map +0 -1
- package/dist/components/isNil.js +0 -16
- package/dist/components/isNil.js.map +0 -1
- package/dist/components/isString.js +0 -21
- package/dist/components/isString.js.map +0 -1
- package/dist/components/props.js +0 -27
- package/dist/components/props.js.map +0 -1
- package/dist/components/slot.js +0 -85
- package/dist/components/slot.js.map +0 -1
- package/dist/components/transition.js +0 -131
- package/dist/components/transition.js.map +0 -1
- /package/dist/beeq/{p-42fd96c3.entry.js.map → p-01050fbd.entry.js.map} +0 -0
- /package/dist/beeq/{p-7bc123c9.entry.js.map → p-2951eb56.entry.js.map} +0 -0
- /package/dist/beeq/{p-e8410587.entry.js.map → p-9a7ddcd2.entry.js.map} +0 -0
- /package/dist/beeq/{p-b71d2d9a.entry.js.map → p-fc0af6bb.entry.js.map} +0 -0
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by Endavans
|
|
3
|
-
* © https://beeq.design - Apache 2 License.
|
|
4
|
-
*/
|
|
5
|
-
import { Env, proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
6
|
-
import { i as isNil } from './isNil.js';
|
|
7
|
-
import { i as isString } from './isString.js';
|
|
8
|
-
import { g as getColorCSSVariable } from './cssVariables.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Inspired by Shoelace's `getBasePath` and `setBasePath` functions.
|
|
12
|
-
* https://github.com/shoelace-style/shoelace/blob/next/src/utilities/base-path.ts
|
|
13
|
-
*/
|
|
14
|
-
let beeqBasePath;
|
|
15
|
-
const DATA_BEEQ_ATTRIBUTE = 'data-beeq';
|
|
16
|
-
const DEFAULT_SVG_PATH = 'svg';
|
|
17
|
-
/**
|
|
18
|
-
* Sets the base path for the assets.
|
|
19
|
-
* @param {string} path - The base path to set.
|
|
20
|
-
*/
|
|
21
|
-
const setBasePath = (path) => {
|
|
22
|
-
beeqBasePath = path;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Gets the base path for the assets.
|
|
26
|
-
* @param {string} subpath - An optional subpath to append to the base path.
|
|
27
|
-
* @returns {string} The base path of the assets.
|
|
28
|
-
*/
|
|
29
|
-
const getBasePath = (subpath = '') => {
|
|
30
|
-
if (!beeqBasePath) {
|
|
31
|
-
const configScript = findConfigScript();
|
|
32
|
-
const fallbackScript = configScript ? null : findFallbackScript();
|
|
33
|
-
const script = configScript || fallbackScript;
|
|
34
|
-
if (script) {
|
|
35
|
-
const path = configScript ? script.getAttribute(DATA_BEEQ_ATTRIBUTE) : getScriptPath(script);
|
|
36
|
-
setBasePath(`${path}/${DEFAULT_SVG_PATH}`);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
// Fallback: use an environment variable (if set) or the default path
|
|
40
|
-
setBasePath(Env.BEEQ_ASSETS_BASE_PATH || `./${DEFAULT_SVG_PATH}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// Return the base path without a trailing slash. If one exists, append the subpath separated by a slash.
|
|
44
|
-
const formattedSubpath = subpath ? `/${subpath.replace(/^\//, '')}` : '';
|
|
45
|
-
return beeqBasePath.replace(/\/$/, '') + formattedSubpath;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Finds the configuration script element.
|
|
49
|
-
* @returns The configuration script element or null if not found.
|
|
50
|
-
*/
|
|
51
|
-
const findConfigScript = () => {
|
|
52
|
-
if (typeof window === 'undefined')
|
|
53
|
-
return null;
|
|
54
|
-
return document.querySelector(`script[${DATA_BEEQ_ATTRIBUTE}]`);
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Finds the fallback script element.
|
|
58
|
-
* @returns The fallback script element or null if not found.
|
|
59
|
-
*/
|
|
60
|
-
const findFallbackScript = () => {
|
|
61
|
-
if (typeof window === 'undefined')
|
|
62
|
-
return null;
|
|
63
|
-
return document.querySelector(`script[src*="beeq"]`);
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Gets the path of a script element.
|
|
67
|
-
* @param {HTMLScriptElement} script - The script element.
|
|
68
|
-
* @returns The path of the script element.
|
|
69
|
-
*/
|
|
70
|
-
const getScriptPath = (script) => {
|
|
71
|
-
if (typeof window === 'undefined')
|
|
72
|
-
return '';
|
|
73
|
-
const src = script.getAttribute('src');
|
|
74
|
-
return src ? src.substring(0, src.lastIndexOf('/')) : '';
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/* -------------------------------------------------------------------------- */
|
|
78
|
-
const requests = new Map();
|
|
79
|
-
const iconContent = new Map();
|
|
80
|
-
/**
|
|
81
|
-
* Fetches SVG content from a given URL and optionally sanitizes it.
|
|
82
|
-
* @param {string} url - The URL to fetch the SVG from.
|
|
83
|
-
* @param {boolean} sanitize - Whether to sanitize the SVG content.
|
|
84
|
-
* @returns {Promise<unknown>} - A promise that resolves to the SVG content.
|
|
85
|
-
*/
|
|
86
|
-
const fetchSvg = async (url, sanitize) => {
|
|
87
|
-
if (isNil(url) || typeof fetch === 'undefined' || typeof window === 'undefined') {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (requests.has(url))
|
|
91
|
-
return requests.get(url);
|
|
92
|
-
try {
|
|
93
|
-
const response = await fetch(url);
|
|
94
|
-
if (!response.ok) {
|
|
95
|
-
iconContent.set(url, '');
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
let svgContent = await response.text();
|
|
99
|
-
if (sanitize !== false) {
|
|
100
|
-
svgContent = validateContent(svgContent);
|
|
101
|
-
}
|
|
102
|
-
iconContent.set(url, svgContent);
|
|
103
|
-
return svgContent;
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
console.error(`[BqIcon] Failed to fetch SVG from ${url}:`, error);
|
|
107
|
-
iconContent.set(url, '');
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Retrieves the SVG content for a given URL, fetching and caching it if necessary.
|
|
112
|
-
* @param {string} url - The URL to fetch the SVG from.
|
|
113
|
-
* @param {boolean} sanitize - Whether to sanitize the SVG content.
|
|
114
|
-
* @returns {Promise<unknown>} - A promise that resolves to the SVG content.
|
|
115
|
-
*/
|
|
116
|
-
const getSvgContent = async (url, sanitize) => {
|
|
117
|
-
if (isNil(url))
|
|
118
|
-
return;
|
|
119
|
-
let req = requests.get(url);
|
|
120
|
-
if (isNil(req)) {
|
|
121
|
-
req = fetchSvg(url, sanitize);
|
|
122
|
-
requests.set(url, req);
|
|
123
|
-
}
|
|
124
|
-
return req;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Validates and sanitizes the SVG content.
|
|
128
|
-
* @param {string} svgContent - The SVG content to validate.
|
|
129
|
-
* @returns {string} - The sanitized SVG content.
|
|
130
|
-
*/
|
|
131
|
-
const validateContent = (svgContent) => {
|
|
132
|
-
if (typeof window === 'undefined' || isNil(svgContent))
|
|
133
|
-
return '';
|
|
134
|
-
const svgTag = 'svg';
|
|
135
|
-
const iconCssClass = 'bq-icon__svg';
|
|
136
|
-
const div = document.createElement('div');
|
|
137
|
-
div.innerHTML = svgContent;
|
|
138
|
-
const svgElm = div.querySelector(svgTag);
|
|
139
|
-
if (svgElm) {
|
|
140
|
-
const existingClasses = svgElm.getAttribute('class') || '';
|
|
141
|
-
svgElm.setAttribute('class', `${existingClasses} ${iconCssClass}`.trim());
|
|
142
|
-
svgElm.setAttribute('part', svgTag);
|
|
143
|
-
svgElm.removeAttribute('height');
|
|
144
|
-
svgElm.removeAttribute('width');
|
|
145
|
-
if (isValid(svgElm)) {
|
|
146
|
-
return div.innerHTML;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return '';
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* Checks if an HTML element is valid (i.e., does not contain scripts or event handlers).
|
|
153
|
-
* @param {HTMLElement} elm - The element to check.
|
|
154
|
-
* @returns {boolean} - True if the element is valid, false otherwise.
|
|
155
|
-
*/
|
|
156
|
-
const isValid = (elm) => {
|
|
157
|
-
if (!elm)
|
|
158
|
-
return false;
|
|
159
|
-
if (elm.nodeType !== Node.ELEMENT_NODE)
|
|
160
|
-
return false;
|
|
161
|
-
if (elm.nodeName.toLowerCase() === 'script')
|
|
162
|
-
return false;
|
|
163
|
-
for (const attribute of Array.from(elm.attributes)) {
|
|
164
|
-
if (isString(attribute.value) && attribute.value.toLowerCase().startsWith('on')) {
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
for (const childNode of Array.from(elm.children)) {
|
|
169
|
-
if (!isValid(childNode))
|
|
170
|
-
return false;
|
|
171
|
-
}
|
|
172
|
-
return true;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
const bqIconCss = ".bq-icon__svg,.scale-x-\\[--bq-icon--direction\\],.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}::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{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);font-family:var(--bq-font-family);line-height:var(--bq-font-line-height--regular);min-height:100vh;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}}: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.light,.light,:root,[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-200);--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}.beeq.dark,.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-800);--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}.endava,[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,[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-200);--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-800);--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}.inline-block{display:inline-block}.scale-x-\\[--bq-icon--direction\\]{--tw-scale-x:var(--bq-icon--direction)}.scale-x-\\[--bq-icon--direction\\],.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))}@-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-icon--color:inherit;--bq-icon--size:24px;display:inline-block}.bq-icon__svg{--tw-scale-x:var(--bq-icon--direction);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))}.static{position:static}.flex{display:flex}.text-\\[color\\:--bq-icon--color\\]{color:var(--bq-icon--color)}.bs-\\[--bq-icon--size\\]{block-size:var(--bq-icon--size)}.is-\\[--bq-icon--size\\]{inline-size:var(--bq-icon--size)}";
|
|
176
|
-
const BqIconStyle0 = bqIconCss;
|
|
177
|
-
|
|
178
|
-
const BqIcon = /*@__PURE__*/ proxyCustomElement(class BqIcon extends HTMLElement {
|
|
179
|
-
constructor() {
|
|
180
|
-
super();
|
|
181
|
-
this.__registerHost();
|
|
182
|
-
this.__attachShadow();
|
|
183
|
-
this.svgLoaded = createEvent(this, "svgLoaded", 7);
|
|
184
|
-
this._svgContent = undefined;
|
|
185
|
-
this.label = undefined;
|
|
186
|
-
this.color = undefined;
|
|
187
|
-
this.name = undefined;
|
|
188
|
-
this.size = 24;
|
|
189
|
-
this.src = undefined;
|
|
190
|
-
this.weight = undefined;
|
|
191
|
-
}
|
|
192
|
-
// Prop lifecycle events
|
|
193
|
-
// =======================
|
|
194
|
-
handlePropsChange() {
|
|
195
|
-
this.loadIcon(this.name);
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* !TO BE REMOVED: Delete this `@Watch()` once the deprecated `weight` property is removed
|
|
199
|
-
* We need to maintain retro-compatibility until the next major release
|
|
200
|
-
*/
|
|
201
|
-
handleWeightChange() {
|
|
202
|
-
if (this.name.includes(this.weight))
|
|
203
|
-
return;
|
|
204
|
-
console.warn(`❗️ [bq-icon]: the 'weight' property is deprecated, you should add the weight to the icon name.\n
|
|
205
|
-
For example, '<bq-icon name="bell-fill"></bq-icon>' instead of '<bq-icon name="bell" weight="fill"></bq-icon>'`);
|
|
206
|
-
// Check if the icon is weighted. An icon is considered weighted if its weight is not 'regular' and ENV_SVG_PATH is not set.
|
|
207
|
-
// Eg: if the weight is 'bold' and ENV_SVG_PATH is not set, isWeightedIcon will be true.
|
|
208
|
-
const REGULAR = 'regular';
|
|
209
|
-
const isWeightedIcon = !isNil(this.weight) && this.weight !== REGULAR;
|
|
210
|
-
// If the icon is weighted, append the weight to the icon name. Otherwise, append nothing.
|
|
211
|
-
// Eg: if isWeightedIcon is true and the weight is 'bold', weightSuffix will be '-bold'.
|
|
212
|
-
const weightSuffix = isWeightedIcon ? `-${this.weight}` : '';
|
|
213
|
-
// Construct the icon name by appending the weight suffix (if any) and the file extension.
|
|
214
|
-
// Eg: if the name is 'my-icon' and weightSuffix is '-bold', iconName will be 'my-icon-bold.svg'.
|
|
215
|
-
const iconName = `${this.name}${weightSuffix}`;
|
|
216
|
-
this.loadIcon(iconName);
|
|
217
|
-
}
|
|
218
|
-
// Events section
|
|
219
|
-
// Requires JSDocs for public API documentation
|
|
220
|
-
// ==============================================
|
|
221
|
-
/** Callback handler to be called when the SVG has loaded */
|
|
222
|
-
svgLoaded;
|
|
223
|
-
// Component lifecycle events
|
|
224
|
-
// Ordered by their natural call order
|
|
225
|
-
// =====================================
|
|
226
|
-
connectedCallback() {
|
|
227
|
-
this.setupIconComponent();
|
|
228
|
-
}
|
|
229
|
-
componentWillLoad() {
|
|
230
|
-
this.setupIconComponent();
|
|
231
|
-
}
|
|
232
|
-
// Listeners
|
|
233
|
-
// ==============
|
|
234
|
-
// Public methods API
|
|
235
|
-
// These methods are exposed on the host element.
|
|
236
|
-
// Always use two lines.
|
|
237
|
-
// Public Methods must be async.
|
|
238
|
-
// Requires JSDocs for public API documentation.
|
|
239
|
-
// ===============================================
|
|
240
|
-
// Local methods
|
|
241
|
-
// Internal business logic.
|
|
242
|
-
// These methods cannot be called from the host element.
|
|
243
|
-
// =======================================================
|
|
244
|
-
setupIconComponent = () => {
|
|
245
|
-
this.loadIcon(this.name);
|
|
246
|
-
// !TO BE REMOVED: Delete this once the deprecated `weight` property is removed
|
|
247
|
-
if (!isNil(this.weight))
|
|
248
|
-
this.handleWeightChange();
|
|
249
|
-
};
|
|
250
|
-
getIconSource = (name) => {
|
|
251
|
-
if (!this.name && !this.src)
|
|
252
|
-
return;
|
|
253
|
-
// Return the src if it is set
|
|
254
|
-
if (this.src)
|
|
255
|
-
return this.src;
|
|
256
|
-
const SVG_EXTENSION = '.svg';
|
|
257
|
-
const iconFileName = `${name}${SVG_EXTENSION}`;
|
|
258
|
-
return getBasePath(iconFileName);
|
|
259
|
-
};
|
|
260
|
-
loadIcon = (name) => {
|
|
261
|
-
const url = this.getIconSource(name);
|
|
262
|
-
getSvgContent(url, true).then(() => {
|
|
263
|
-
this._svgContent = iconContent.get(url);
|
|
264
|
-
this.svgLoaded.emit(this._svgContent);
|
|
265
|
-
});
|
|
266
|
-
};
|
|
267
|
-
// render() function
|
|
268
|
-
// Always the last one in the class.
|
|
269
|
-
// ===================================
|
|
270
|
-
render() {
|
|
271
|
-
const styles = {
|
|
272
|
-
...(this.color && { '--bq-icon--color': getColorCSSVariable(this.color) }),
|
|
273
|
-
...(this.size && { '--bq-icon--size': `${this.size}px` }),
|
|
274
|
-
};
|
|
275
|
-
return (h(Host, { key: '69753077792209616891575d12aeeefbd767f29c', style: styles }, h("div", { key: 'b7df52fa6437e598b9a79e686c9b036cd3dbe864', "aria-label": this.label ?? `${this.name} icon`, class: "flex text-[color:--bq-icon--color] bs-[--bq-icon--size] is-[--bq-icon--size]", innerHTML: this._svgContent, part: "base", role: "img" })));
|
|
276
|
-
}
|
|
277
|
-
static get assetsDirs() { return ["svg"]; }
|
|
278
|
-
static get watchers() { return {
|
|
279
|
-
"color": ["handlePropsChange"],
|
|
280
|
-
"name": ["handlePropsChange"],
|
|
281
|
-
"size": ["handlePropsChange"],
|
|
282
|
-
"weight": ["handleWeightChange"]
|
|
283
|
-
}; }
|
|
284
|
-
static get style() { return BqIconStyle0; }
|
|
285
|
-
}, [1, "bq-icon", {
|
|
286
|
-
"label": [513],
|
|
287
|
-
"color": [513],
|
|
288
|
-
"name": [513],
|
|
289
|
-
"size": [520],
|
|
290
|
-
"src": [513],
|
|
291
|
-
"weight": [513],
|
|
292
|
-
"_svgContent": [32]
|
|
293
|
-
}, undefined, {
|
|
294
|
-
"color": ["handlePropsChange"],
|
|
295
|
-
"name": ["handlePropsChange"],
|
|
296
|
-
"size": ["handlePropsChange"],
|
|
297
|
-
"weight": ["handleWeightChange"]
|
|
298
|
-
}]);
|
|
299
|
-
function defineCustomElement() {
|
|
300
|
-
if (typeof customElements === "undefined") {
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
const components = ["bq-icon"];
|
|
304
|
-
components.forEach(tagName => { switch (tagName) {
|
|
305
|
-
case "bq-icon":
|
|
306
|
-
if (!customElements.get(tagName)) {
|
|
307
|
-
customElements.define(tagName, BqIcon);
|
|
308
|
-
}
|
|
309
|
-
break;
|
|
310
|
-
} });
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export { BqIcon as B, defineCustomElement as d, getBasePath as g, setBasePath as s };
|
|
314
|
-
|
|
315
|
-
//# sourceMappingURL=bq-icon2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-icon2.js","mappings":";;;;;;;;;AAAA;;;;AAMA,IAAI,YAAgC,CAAC;AACrC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AACxC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B;;;;MAIa,WAAW,GAAG,CAAC,IAAY;IACtC,YAAY,GAAG,IAAI,CAAC;AACtB,EAAE;AAEF;;;;;MAKa,WAAW,GAAG,CAAC,UAAkB,EAAE;IAC9C,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,YAAY,GAAG,gBAAgB,EAAE,CAAC;QACxC,MAAM,cAAc,GAAG,YAAY,GAAG,IAAI,GAAG,kBAAkB,EAAE,CAAC;QAElE,MAAM,MAAM,GAAG,YAAY,IAAI,cAAc,CAAC;QAC9C,IAAI,MAAM,EAAE;YACV,MAAM,IAAI,GAAG,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,mBAAmB,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;YAC7F,WAAW,CAAC,GAAG,IAAI,IAAI,gBAAgB,EAAE,CAAC,CAAC;SAC5C;aAAM;;YAEL,WAAW,CAAC,GAAG,CAAC,qBAAqB,IAAI,KAAK,gBAAgB,EAAE,CAAC,CAAC;SACnE;KACF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;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/shared/utils/assetsPath.ts","../../packages/beeq/src/components/icon/helper/request.ts","../../packages/beeq/src/components/icon/scss/bq-icon.scss?tag=bq-icon&encapsulation=shadow","../../packages/beeq/src/components/icon/bq-icon.tsx"],"sourcesContent":["/**\n * Inspired by Shoelace's `getBasePath` and `setBasePath` functions.\n * https://github.com/shoelace-style/shoelace/blob/next/src/utilities/base-path.ts\n */\nimport { Env } from '@stencil/core';\n\nlet beeqBasePath: string | undefined;\nconst DATA_BEEQ_ATTRIBUTE = 'data-beeq';\nconst DEFAULT_SVG_PATH = 'svg';\n\n/**\n * Sets the base path for the assets.\n * @param {string} path - The base path to set.\n */\nexport const setBasePath = (path: string): void => {\n beeqBasePath = path;\n};\n\n/**\n * Gets the base path for the assets.\n * @param {string} subpath - An optional subpath to append to the base path.\n * @returns {string} The base path of the assets.\n */\nexport const getBasePath = (subpath: string = ''): string => {\n if (!beeqBasePath) {\n const configScript = findConfigScript();\n const fallbackScript = configScript ? null : findFallbackScript();\n\n const script = configScript || fallbackScript;\n if (script) {\n const path = configScript ? script.getAttribute(DATA_BEEQ_ATTRIBUTE) : getScriptPath(script);\n setBasePath(`${path}/${DEFAULT_SVG_PATH}`);\n } else {\n // Fallback: use an environment variable (if set) or the default path\n setBasePath(Env.BEEQ_ASSETS_BASE_PATH || `./${DEFAULT_SVG_PATH}`);\n }\n }\n\n // Return the base path without a trailing slash. If one exists, append the subpath separated by a slash.\n const formattedSubpath = subpath ? `/${subpath.replace(/^\\//, '')}` : '';\n return beeqBasePath.replace(/\\/$/, '') + formattedSubpath;\n};\n\n/**\n * Finds the configuration script element.\n * @returns The configuration script element or null if not found.\n */\nconst findConfigScript = (): HTMLScriptElement | null => {\n if (typeof window === 'undefined') return null;\n\n return document.querySelector(`script[${DATA_BEEQ_ATTRIBUTE}]`);\n};\n\n/**\n * Finds the fallback script element.\n * @returns The fallback script element or null if not found.\n */\nconst findFallbackScript = (): HTMLScriptElement | null => {\n if (typeof window === 'undefined') return null;\n\n return document.querySelector(`script[src*=\"beeq\"]`);\n};\n\n/**\n * Gets the path of a script element.\n * @param {HTMLScriptElement} script - The script element.\n * @returns The path of the script element.\n */\nconst getScriptPath = (script: HTMLScriptElement): string => {\n if (typeof window === 'undefined') return '';\n\n const src = script.getAttribute('src');\n return src ? src.substring(0, src.lastIndexOf('/')) : '';\n};\n","/* -------------------------------------------------------------------------- */\n/* Icon request helper */\n/* -------------------------------------------------------------------------- */\n\nimport { isNil, isString } from '../../../shared/utils';\n\nconst requests = new Map<string, Promise<unknown>>();\nexport const iconContent = new Map<string, string>();\n\n/**\n * Fetches SVG content from a given URL and optionally sanitizes it.\n * @param {string} url - The URL to fetch the SVG from.\n * @param {boolean} sanitize - Whether to sanitize the SVG content.\n * @returns {Promise<unknown>} - A promise that resolves to the SVG content.\n */\nconst fetchSvg = async (url: string, sanitize: boolean): Promise<unknown> => {\n if (isNil(url) || typeof fetch === 'undefined' || typeof window === 'undefined') {\n return;\n }\n\n if (requests.has(url)) return requests.get(url);\n\n try {\n const response = await fetch(url);\n\n if (!response.ok) {\n iconContent.set(url, '');\n return;\n }\n\n let svgContent = await response.text();\n\n if (sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n\n iconContent.set(url, svgContent);\n return svgContent;\n } catch (error) {\n console.error(`[BqIcon] Failed to fetch SVG from ${url}:`, error);\n iconContent.set(url, '');\n }\n};\n\n/**\n * Retrieves the SVG content for a given URL, fetching and caching it if necessary.\n * @param {string} url - The URL to fetch the SVG from.\n * @param {boolean} sanitize - Whether to sanitize the SVG content.\n * @returns {Promise<unknown>} - A promise that resolves to the SVG content.\n */\nexport const getSvgContent = async (url: string, sanitize: boolean): Promise<unknown> => {\n if (isNil(url)) return;\n\n let req = requests.get(url);\n\n if (isNil(req)) {\n req = fetchSvg(url, sanitize);\n requests.set(url, req);\n }\n return req;\n};\n\n/**\n * Validates and sanitizes the SVG content.\n * @param {string} svgContent - The SVG content to validate.\n * @returns {string} - The sanitized SVG content.\n */\nexport const validateContent = (svgContent: string): string => {\n if (typeof window === 'undefined' || isNil(svgContent)) return '';\n\n const svgTag = 'svg';\n const iconCssClass = 'bq-icon__svg';\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n const svgElm = div.querySelector(svgTag);\n\n if (svgElm) {\n const existingClasses = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', `${existingClasses} ${iconCssClass}`.trim());\n svgElm.setAttribute('part', svgTag);\n svgElm.removeAttribute('height');\n svgElm.removeAttribute('width');\n\n if (isValid(svgElm)) {\n return div.innerHTML;\n }\n }\n\n return '';\n};\n\n/**\n * Checks if an HTML element is valid (i.e., does not contain scripts or event handlers).\n * @param {HTMLElement} elm - The element to check.\n * @returns {boolean} - True if the element is valid, false otherwise.\n */\nexport const isValid = (elm: Element): boolean => {\n if (!elm) return false;\n if (elm.nodeType !== Node.ELEMENT_NODE) return false;\n if (elm.nodeName.toLowerCase() === 'script') return false;\n\n for (const attribute of Array.from(elm.attributes)) {\n if (isString(attribute.value) && attribute.value.toLowerCase().startsWith('on')) {\n return false;\n }\n }\n\n for (const childNode of Array.from(elm.children) as HTMLElement[]) {\n if (!isValid(childNode)) return false;\n }\n\n return true;\n};\n","/* -------------------------------------------------------------------------- */\n/* Icon styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-icon.variables';\n\n:host {\n @apply inline-block;\n}\n\n/**\n * This class is added on packages/beeq/src/components/icon/helper/request.ts\n * See lines 42 and 58 for details.\n */\n.bq-icon__svg {\n @apply scale-x-[--bq-icon--direction];\n}\n","import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { TIconWeight } from './bq-icon.types';\nimport { getSvgContent, iconContent } from './helper/request';\nimport { getBasePath, getColorCSSVariable, isNil } from '../../shared/utils';\n\n/**\n * Icons are simplified images that graphically explain the meaning of an object on the screen.\n *\n * @part base - The component's internal wrapper that holds the icon SVG content.\n * @part svg - The `<svg>` tag element inside the component.\n */\n@Component({\n assetsDirs: ['svg'],\n tag: 'bq-icon',\n styleUrl: './scss/bq-icon.scss',\n shadow: true,\n})\nexport class BqIcon {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private _svgContent: string;\n\n // Public Property API\n // ========================\n\n /** Label for the icon, used for accessibility */\n @Prop({ reflect: true }) label?: string;\n\n /** Set the stroke color of the SVG. The value should be a valid value of the palette color */\n @Prop({ reflect: true }) color?: string;\n\n /** Icon name to load. Please check all available icons [here](https://phosphoricons.com/) */\n @Prop({ reflect: true }) name?: string;\n\n /** Set the size of the SVG */\n @Prop({ reflect: true }) size?: string | number = 24;\n\n /** Set the source of the SVG. If the source is set, the name property will be ignored */\n @Prop({ reflect: true }) src?: string;\n\n /** @deprecated It set the icon weight/style */\n @Prop({ reflect: true }) weight?: TIconWeight = undefined;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('color')\n @Watch('name')\n @Watch('size')\n handlePropsChange() {\n this.loadIcon(this.name);\n }\n\n /**\n * !TO BE REMOVED: Delete this `@Watch()` once the deprecated `weight` property is removed\n * We need to maintain retro-compatibility until the next major release\n */\n @Watch('weight')\n handleWeightChange() {\n if (this.name.includes(this.weight)) return;\n\n console.warn(\n `❗️ [bq-icon]: the 'weight' property is deprecated, you should add the weight to the icon name.\\n\n For example, '<bq-icon name=\"bell-fill\"></bq-icon>' instead of '<bq-icon name=\"bell\" weight=\"fill\"></bq-icon>'`,\n );\n // Check if the icon is weighted. An icon is considered weighted if its weight is not 'regular' and ENV_SVG_PATH is not set.\n // Eg: if the weight is 'bold' and ENV_SVG_PATH is not set, isWeightedIcon will be true.\n const REGULAR = 'regular';\n const isWeightedIcon = !isNil(this.weight) && this.weight !== REGULAR;\n // If the icon is weighted, append the weight to the icon name. Otherwise, append nothing.\n // Eg: if isWeightedIcon is true and the weight is 'bold', weightSuffix will be '-bold'.\n const weightSuffix = isWeightedIcon ? `-${this.weight}` : '';\n // Construct the icon name by appending the weight suffix (if any) and the file extension.\n // Eg: if the name is 'my-icon' and weightSuffix is '-bold', iconName will be 'my-icon-bold.svg'.\n const iconName = `${this.name}${weightSuffix}`;\n this.loadIcon(iconName);\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the SVG has loaded */\n @Event() svgLoaded: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.setupIconComponent();\n }\n\n componentWillLoad() {\n this.setupIconComponent();\n }\n\n // Listeners\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 // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private setupIconComponent = () => {\n this.loadIcon(this.name);\n // !TO BE REMOVED: Delete this once the deprecated `weight` property is removed\n if (!isNil(this.weight)) this.handleWeightChange();\n };\n\n private getIconSource = (name: string) => {\n if (!this.name && !this.src) return;\n // Return the src if it is set\n if (this.src) return this.src;\n\n const SVG_EXTENSION = '.svg';\n const iconFileName = `${name}${SVG_EXTENSION}`;\n\n return getBasePath(iconFileName);\n };\n\n private loadIcon = (name: string) => {\n const url = this.getIconSource(name);\n getSvgContent(url, true).then(() => {\n this._svgContent = iconContent.get(url);\n this.svgLoaded.emit(this._svgContent);\n });\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const styles = {\n ...(this.color && { '--bq-icon--color': getColorCSSVariable(this.color) }),\n ...(this.size && { '--bq-icon--size': `${this.size}px` }),\n };\n\n return (\n <Host style={styles}>\n <div\n aria-label={this.label ?? `${this.name} icon`}\n class=\"flex text-[color:--bq-icon--color] bs-[--bq-icon--size] is-[--bq-icon--size]\"\n innerHTML={this._svgContent}\n part=\"base\"\n role=\"img\"\n />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by Endavans
|
|
3
|
-
* © https://beeq.design - Apache 2 License.
|
|
4
|
-
*/
|
|
5
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
6
|
-
import { i as isEventTargetChildOfElement } from './event.js';
|
|
7
|
-
import { i as isHTMLElement } from './isHTMLElement.js';
|
|
8
|
-
|
|
9
|
-
const bqOptionListCss = ".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;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))}::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{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);font-family:var(--bq-font-family);line-height:var(--bq-font-line-height--regular);min-height:100vh;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}}: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.light,.light,:root,[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-200);--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}.beeq.dark,.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-800);--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}.endava,[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,[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-200);--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-800);--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}.block{display:block}@-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-option-group--gapY-list:var(--bq-spacing-xs);display:block}.static{position:static}.flex{display:flex}.flex-col{flex-direction:column}.gap-y-\\[--bq-option-group--gapY-list\\]{row-gap:var(--bq-option-group--gapY-list)}";
|
|
10
|
-
const BqOptionListStyle0 = bqOptionListCss;
|
|
11
|
-
|
|
12
|
-
const BqOptionList = /*@__PURE__*/ proxyCustomElement(class BqOptionList extends HTMLElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this.__registerHost();
|
|
16
|
-
this.__attachShadow();
|
|
17
|
-
this.bqSelect = createEvent(this, "bqSelect", 7);
|
|
18
|
-
this.ariaLabel = 'Options';
|
|
19
|
-
}
|
|
20
|
-
get el() { return this; }
|
|
21
|
-
// Events section
|
|
22
|
-
// Requires JSDocs for public API documentation
|
|
23
|
-
// ==============================================
|
|
24
|
-
/** Handler to be called when `bq-option` is selected (on click/enter press). */
|
|
25
|
-
bqSelect;
|
|
26
|
-
// Component lifecycle events
|
|
27
|
-
// Ordered by their natural call order
|
|
28
|
-
// =====================================
|
|
29
|
-
componentDidLoad() {
|
|
30
|
-
this.el.setAttribute('role', 'listbox');
|
|
31
|
-
}
|
|
32
|
-
// Listeners
|
|
33
|
-
// ==============
|
|
34
|
-
onBqSelect(event) {
|
|
35
|
-
const { target: item } = event;
|
|
36
|
-
if (!isHTMLElement(item, 'bq-option') || !isEventTargetChildOfElement(event, this.el))
|
|
37
|
-
return;
|
|
38
|
-
this.bqSelect.emit({ item, value: item.value });
|
|
39
|
-
}
|
|
40
|
-
// Public methods API
|
|
41
|
-
// These methods are exposed on the host element.
|
|
42
|
-
// Always use two lines.
|
|
43
|
-
// Public Methods must be async.
|
|
44
|
-
// Requires JSDocs for public API documentation.
|
|
45
|
-
// ===============================================
|
|
46
|
-
// Local methods
|
|
47
|
-
// Internal business logic.
|
|
48
|
-
// These methods cannot be called from the host element.
|
|
49
|
-
// =======================================================
|
|
50
|
-
// render() function
|
|
51
|
-
// Always the last one in the class.
|
|
52
|
-
// ===================================
|
|
53
|
-
render() {
|
|
54
|
-
return (h("div", { key: '7f7d61daf2db66a6fc7eb4ffabf201bec95eff4e', class: "bq-option__list flex flex-col gap-y-[--bq-option-group--gapY-list]", part: "base" }, h("slot", { key: '3a935eb5df7816e4075f37e796b818e3e7a65a89' })));
|
|
55
|
-
}
|
|
56
|
-
static get style() { return BqOptionListStyle0; }
|
|
57
|
-
}, [1, "bq-option-list", {
|
|
58
|
-
"ariaLabel": [513, "aria-label"]
|
|
59
|
-
}, [[1, "bqClick", "onBqSelect"], [1, "bqEnter", "onBqSelect"]]]);
|
|
60
|
-
function defineCustomElement() {
|
|
61
|
-
if (typeof customElements === "undefined") {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const components = ["bq-option-list"];
|
|
65
|
-
components.forEach(tagName => { switch (tagName) {
|
|
66
|
-
case "bq-option-list":
|
|
67
|
-
if (!customElements.get(tagName)) {
|
|
68
|
-
customElements.define(tagName, BqOptionList);
|
|
69
|
-
}
|
|
70
|
-
break;
|
|
71
|
-
} });
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export { BqOptionList as B, defineCustomElement as d };
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=bq-option-list2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-option-list2.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,q4lBAAq4lB,CAAC;AAC95lB,2BAAe,eAAe;;MCWjB,YAAY;;;;;;yBAoBsB,SAAS;;;;;;;IAO7C,QAAQ,CAA6D;;;;IAM9E,gBAAgB;QACd,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;KACzC;;;IAOD,UAAU,CAAC,KAA+B;QACxC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,2BAA2B,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;YAAE,OAAO;QAE9F,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;KACjD;;;;;;;;;;;;;;IAkBD,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,oEAAoE,EAAC,IAAI,EAAC,MAAM,IACzF,8DAAQ,CACJ,EACN;KACH;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["../../packages/beeq/src/components/option-list/scss/bq-option-list.scss?tag=bq-option-list&encapsulation=shadow","../../packages/beeq/src/components/option-list/bq-option-list.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Option list styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-option-list.variables';\n\n:host {\n @apply block;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop } from '@stencil/core';\n\nimport { isEventTargetChildOfElement, isHTMLElement } from '../../shared/utils';\n\n/**\n * @part base - The component's internal wrapper.\n */\n@Component({\n tag: 'bq-option-list',\n styleUrl: './scss/bq-option-list.scss',\n shadow: true,\n})\nexport class BqOptionList {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionListElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n // Prop lifecycle events\n // =======================\n\n /** Aria label for the list. */\n @Prop({ reflect: true }) ariaLabel: string = 'Options';\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when `bq-option` is selected (on click/enter press). */\n @Event() bqSelect: EventEmitter<{ value: string; item: HTMLBqOptionElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.el.setAttribute('role', 'listbox');\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { passive: true })\n @Listen('bqEnter', { passive: true })\n onBqSelect(event: CustomEvent<HTMLElement>) {\n const { target: item } = event;\n if (!isHTMLElement(item, 'bq-option') || !isEventTargetChildOfElement(event, this.el)) return;\n\n this.bqSelect.emit({ item, value: item.value });\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 // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-option__list flex flex-col gap-y-[--bq-option-group--gapY-list]\" part=\"base\">\n <slot />\n </div>\n );\n }\n}\n"],"version":3}
|