@ukho/admiralty-core 5.6.0-next.0 → 5.6.0

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.
@@ -0,0 +1,311 @@
1
+ import { h, Host } from "@stencil/core";
2
+ export class TooltipComponent {
3
+ constructor() {
4
+ this.placement = 'top';
5
+ this.alignment = 'centre';
6
+ this.positionTooltip = () => {
7
+ var _a;
8
+ if (!this.target)
9
+ return;
10
+ const r = this.target.getBoundingClientRect();
11
+ const tooltip = (_a = this.tooltipEl) !== null && _a !== void 0 ? _a : this.host.querySelector('.tooltip');
12
+ if (!tooltip)
13
+ return;
14
+ const gap = 8;
15
+ this.map = {
16
+ top: () => {
17
+ tooltip.style.top = `${r.top - gap}px`;
18
+ tooltip.style.left = `${r.left + r.width / 2}px`;
19
+ tooltip.style.transform = `translate(-50%, calc(-100% - ${gap}px)) scale(1)`;
20
+ },
21
+ bottom: () => {
22
+ tooltip.style.top = `${r.bottom + gap}px`;
23
+ tooltip.style.left = `${r.left + r.width / 2}px`;
24
+ tooltip.style.transform = `translate(-50%, ${gap}px) scale(1)`;
25
+ },
26
+ left: () => {
27
+ tooltip.style.top = `${r.top + r.height / 2}px`;
28
+ tooltip.style.left = `${r.left - 20}px`; // `${r.left - gap}px`;
29
+ tooltip.style.transform = `translate(calc(-100% - ${gap}px), -50%) scale(1)`;
30
+ },
31
+ right: () => {
32
+ tooltip.style.top = `${r.top + r.height / 2}px`;
33
+ tooltip.style.left = `${r.right + 20}px`; // `${r.right - gap}px`;
34
+ tooltip.style.transform = `translate(${gap}px, -50%) scale(1)`;
35
+ },
36
+ };
37
+ if (this.map[this.placement]) {
38
+ this.map[this.placement]();
39
+ return;
40
+ }
41
+ const spaceAbove = r.top;
42
+ const spaceBelow = window.innerHeight - r.bottom;
43
+ const spaceLeft = r.left;
44
+ const spaceRight = window.innerWidth - r.right;
45
+ if (spaceLeft > spaceRight) {
46
+ this.placement = 'left';
47
+ this.map[this.placement]();
48
+ this.handleOffScreen(tooltip, gap);
49
+ return;
50
+ }
51
+ if (spaceRight > spaceLeft) {
52
+ this.placement = 'right';
53
+ this.map[this.placement]();
54
+ this.handleOffScreen(tooltip, gap);
55
+ return;
56
+ }
57
+ if (spaceAbove > spaceBelow) {
58
+ this.placement = 'top';
59
+ this.map[this.placement]();
60
+ this.handleOffScreen(tooltip, gap);
61
+ return;
62
+ }
63
+ if (spaceBelow > spaceAbove) {
64
+ this.placement = 'bottom';
65
+ this.map[this.placement]();
66
+ this.handleOffScreen(tooltip, gap);
67
+ return;
68
+ }
69
+ };
70
+ this.addPositionListeners = () => {
71
+ if (!this.target)
72
+ return;
73
+ // Ensure updateTooltipPosition can be called repeatedly without duplicating handlers.
74
+ this.removePositionListeners();
75
+ this.target.addEventListener('mouseenter', this.positionTooltip);
76
+ this.target.addEventListener('focus', this.positionTooltip, true);
77
+ };
78
+ this.removePositionListeners = () => {
79
+ if (!this.target)
80
+ return;
81
+ this.target.removeEventListener('mouseenter', this.positionTooltip);
82
+ this.target.removeEventListener('focus', this.positionTooltip, true);
83
+ };
84
+ this.show = () => {
85
+ if (this.hideTimeout) {
86
+ clearTimeout(this.hideTimeout);
87
+ this.hideTimeout = undefined;
88
+ }
89
+ this.host.setAttribute('data-open', '');
90
+ this.setTooltipA11yState(true);
91
+ };
92
+ this.hide = () => {
93
+ this.host.removeAttribute('data-open');
94
+ this.setTooltipA11yState(false);
95
+ };
96
+ this.addTargetDescribedBy = () => {
97
+ if (!this.target || !this.tooltipId)
98
+ return;
99
+ const current = this.target.getAttribute('aria-describedby') || '';
100
+ const ids = current
101
+ .split(/\s+/)
102
+ .map(id => id.trim())
103
+ .filter(Boolean);
104
+ if (!ids.includes(this.tooltipId)) {
105
+ ids.push(this.tooltipId);
106
+ this.target.setAttribute('aria-describedby', ids.join(' '));
107
+ }
108
+ };
109
+ this.removeTargetDescribedBy = () => {
110
+ if (!this.target || !this.tooltipId)
111
+ return;
112
+ const current = this.target.getAttribute('aria-describedby') || '';
113
+ const ids = current
114
+ .split(/\s+/)
115
+ .map(id => id.trim())
116
+ .filter(id => id && id !== this.tooltipId);
117
+ if (ids.length > 0) {
118
+ this.target.setAttribute('aria-describedby', ids.join(' '));
119
+ }
120
+ else {
121
+ this.target.removeAttribute('aria-describedby');
122
+ }
123
+ };
124
+ this.setTooltipA11yState = (isOpen) => {
125
+ if (!this.tooltipEl)
126
+ return;
127
+ this.tooltipEl.setAttribute('aria-hidden', isOpen ? 'false' : 'true');
128
+ if (isOpen) {
129
+ this.addTargetDescribedBy();
130
+ return;
131
+ }
132
+ this.removeTargetDescribedBy();
133
+ };
134
+ this.scheduleHide = () => {
135
+ if (this.hideTimeout) {
136
+ clearTimeout(this.hideTimeout);
137
+ }
138
+ // Small delay prevents flicker when moving between trigger and tooltip.
139
+ this.hideTimeout = setTimeout(() => {
140
+ this.hide();
141
+ this.hideTimeout = undefined;
142
+ }, 120);
143
+ };
144
+ }
145
+ componentDidLoad() {
146
+ var _a, _b, _c, _d;
147
+ this.target = document.getElementById(this.for);
148
+ this.tooltipEl = this.host.querySelector('.tooltip');
149
+ if (this.tooltipEl) {
150
+ if (!this.tooltipEl.id) {
151
+ this.tooltipEl.id = `${this.for}-tooltip`;
152
+ }
153
+ this.tooltipId = this.tooltipEl.id;
154
+ this.tooltipEl.setAttribute('aria-hidden', 'true');
155
+ }
156
+ if (!this.target)
157
+ return;
158
+ this.target.addEventListener('mouseenter', this.show);
159
+ this.target.addEventListener('mouseleave', this.scheduleHide);
160
+ this.target.addEventListener('focus', this.show, true);
161
+ this.target.addEventListener('blur', this.scheduleHide, true);
162
+ (_a = this.tooltipEl) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.show);
163
+ (_b = this.tooltipEl) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.scheduleHide);
164
+ (_c = this.tooltipEl) === null || _c === void 0 ? void 0 : _c.addEventListener('focusin', this.show);
165
+ (_d = this.tooltipEl) === null || _d === void 0 ? void 0 : _d.addEventListener('focusout', this.scheduleHide);
166
+ this.updateTooltipPosition();
167
+ }
168
+ disconnectedCallback() {
169
+ var _a, _b, _c, _d;
170
+ if (this.hideTimeout) {
171
+ clearTimeout(this.hideTimeout);
172
+ this.hideTimeout = undefined;
173
+ }
174
+ this.removeTargetDescribedBy();
175
+ if (!this.target)
176
+ return;
177
+ this.removePositionListeners();
178
+ this.target.removeEventListener('mouseenter', this.show);
179
+ this.target.removeEventListener('mouseleave', this.scheduleHide);
180
+ this.target.removeEventListener('focus', this.show, true);
181
+ this.target.removeEventListener('blur', this.scheduleHide, true);
182
+ (_a = this.tooltipEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.show);
183
+ (_b = this.tooltipEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.scheduleHide);
184
+ (_c = this.tooltipEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('focusin', this.show);
185
+ (_d = this.tooltipEl) === null || _d === void 0 ? void 0 : _d.removeEventListener('focusout', this.scheduleHide);
186
+ }
187
+ checkElementOffScreen(el) {
188
+ const rect = el.getBoundingClientRect();
189
+ const viewportWidth = window.innerWidth || document.documentElement.clientWidth;
190
+ const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
191
+ const status = {
192
+ topOff: rect.top < 0,
193
+ bottomOff: rect.bottom > viewportHeight,
194
+ leftOff: rect.left < 0,
195
+ rightOff: rect.right > viewportWidth,
196
+ };
197
+ return status;
198
+ }
199
+ updateTooltipPosition() {
200
+ this.addPositionListeners();
201
+ }
202
+ handleOffScreen(tooltip, gap) {
203
+ const isOffScreen = this.checkElementOffScreen(this.host.querySelector('.tooltip'));
204
+ const placementTransform = this.placement === 'top'
205
+ ? `translate(-50%, calc(-100% - ${gap}px)) scale(1)`
206
+ : this.placement === 'bottom'
207
+ ? `translate(-50%, ${gap}px) scale(1)`
208
+ : this.placement === 'left'
209
+ ? `translate(calc(-100% - ${gap}px), -50%) scale(1)`
210
+ : `translate(${gap}px, -50%) scale(1)`;
211
+ if (isOffScreen.leftOff) {
212
+ tooltip.style.transform = placementTransform;
213
+ tooltip.style.left = '0';
214
+ tooltip.style.right = '';
215
+ }
216
+ if (isOffScreen.rightOff) {
217
+ tooltip.style.transform = placementTransform;
218
+ tooltip.style.left = '';
219
+ tooltip.style.right = '0';
220
+ }
221
+ }
222
+ render() {
223
+ return (h(Host, { key: '7c328f07c4535f43ada56773dc84f87427109190' }, h("div", { key: 'a5143338bea798aaee058ab3bd2cafb1cb8dbfd4', role: "tooltip", class: "tooltip", "data-placement": this.placement, "data-alignment": this.alignment }, h("slot", { key: 'b8528a55526b2ddb230be231004319bc8a46de37' }), h("span", { key: 'b93de586490d52b76d7ce39c474decb828a7f369', class: "arrow", "aria-hidden": "true" }))));
224
+ }
225
+ static get is() { return "admiralty-tooltip"; }
226
+ static get encapsulation() { return "scoped"; }
227
+ static get originalStyleUrls() {
228
+ return {
229
+ "$": ["tooltip.scss"]
230
+ };
231
+ }
232
+ static get styleUrls() {
233
+ return {
234
+ "$": ["tooltip.css"]
235
+ };
236
+ }
237
+ static get properties() {
238
+ return {
239
+ "for": {
240
+ "type": "string",
241
+ "mutable": false,
242
+ "complexType": {
243
+ "original": "string",
244
+ "resolved": "string",
245
+ "references": {}
246
+ },
247
+ "required": true,
248
+ "optional": false,
249
+ "docs": {
250
+ "tags": [],
251
+ "text": ""
252
+ },
253
+ "getter": false,
254
+ "setter": false,
255
+ "reflect": false,
256
+ "attribute": "for"
257
+ },
258
+ "placement": {
259
+ "type": "string",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "Placement",
263
+ "resolved": "\"bottom\" | \"left\" | \"right\" | \"top\"",
264
+ "references": {
265
+ "Placement": {
266
+ "location": "global",
267
+ "id": "global::Placement"
268
+ }
269
+ }
270
+ },
271
+ "required": false,
272
+ "optional": true,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": ""
276
+ },
277
+ "getter": false,
278
+ "setter": false,
279
+ "reflect": true,
280
+ "attribute": "placement",
281
+ "defaultValue": "'top'"
282
+ },
283
+ "alignment": {
284
+ "type": "string",
285
+ "mutable": false,
286
+ "complexType": {
287
+ "original": "Alignment",
288
+ "resolved": "\"centre\" | \"end\" | \"start\"",
289
+ "references": {
290
+ "Alignment": {
291
+ "location": "global",
292
+ "id": "global::Alignment"
293
+ }
294
+ }
295
+ },
296
+ "required": false,
297
+ "optional": true,
298
+ "docs": {
299
+ "tags": [],
300
+ "text": ""
301
+ },
302
+ "getter": false,
303
+ "setter": false,
304
+ "reflect": true,
305
+ "attribute": "alignment",
306
+ "defaultValue": "'centre'"
307
+ }
308
+ };
309
+ }
310
+ static get elementRef() { return "host"; }
311
+ }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface AdmiraltyTooltip extends Components.AdmiraltyTooltip, HTMLElement {}
4
+ export const AdmiraltyTooltip: {
5
+ prototype: AdmiraltyTooltip;
6
+ new (): AdmiraltyTooltip;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{p as t,H as i,h as a,a as o,t as s}from"./index.js";const e=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.placement="top",this.alignment="centre",this.positionTooltip=()=>{var t;if(!this.target)return;const i=this.target.getBoundingClientRect(),a=null!==(t=this.tooltipEl)&&void 0!==t?t:this.host.querySelector(".tooltip");if(!a)return;if(this.map={top:()=>{a.style.top=i.top-8+"px",a.style.left=i.left+i.width/2+"px",a.style.transform="translate(-50%, calc(-100% - 8px)) scale(1)"},bottom:()=>{a.style.top=i.bottom+8+"px",a.style.left=i.left+i.width/2+"px",a.style.transform="translate(-50%, 8px) scale(1)"},left:()=>{a.style.top=i.top+i.height/2+"px",a.style.left=i.left-20+"px",a.style.transform="translate(calc(-100% - 8px), -50%) scale(1)"},right:()=>{a.style.top=i.top+i.height/2+"px",a.style.left=i.right+20+"px",a.style.transform="translate(8px, -50%) scale(1)"}},this.map[this.placement])return void this.map[this.placement]();const o=i.top,s=window.innerHeight-i.bottom,e=i.left,l=window.innerWidth-i.right;return e>l?(this.placement="left",this.map[this.placement](),void this.handleOffScreen(a,8)):l>e?(this.placement="right",this.map[this.placement](),void this.handleOffScreen(a,8)):o>s?(this.placement="top",this.map[this.placement](),void this.handleOffScreen(a,8)):s>o?(this.placement="bottom",this.map[this.placement](),void this.handleOffScreen(a,8)):void 0},this.addPositionListeners=()=>{this.target&&(this.removePositionListeners(),this.target.addEventListener("mouseenter",this.positionTooltip),this.target.addEventListener("focus",this.positionTooltip,!0))},this.removePositionListeners=()=>{this.target&&(this.target.removeEventListener("mouseenter",this.positionTooltip),this.target.removeEventListener("focus",this.positionTooltip,!0))},this.show=()=>{this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.host.setAttribute("data-open",""),this.setTooltipA11yState(!0)},this.hide=()=>{this.host.removeAttribute("data-open"),this.setTooltipA11yState(!1)},this.addTargetDescribedBy=()=>{if(!this.target||!this.tooltipId)return;const t=(this.target.getAttribute("aria-describedby")||"").split(/\s+/).map((t=>t.trim())).filter(Boolean);t.includes(this.tooltipId)||(t.push(this.tooltipId),this.target.setAttribute("aria-describedby",t.join(" ")))},this.removeTargetDescribedBy=()=>{if(!this.target||!this.tooltipId)return;const t=(this.target.getAttribute("aria-describedby")||"").split(/\s+/).map((t=>t.trim())).filter((t=>t&&t!==this.tooltipId));t.length>0?this.target.setAttribute("aria-describedby",t.join(" ")):this.target.removeAttribute("aria-describedby")},this.setTooltipA11yState=t=>{this.tooltipEl&&(this.tooltipEl.setAttribute("aria-hidden",t?"false":"true"),t?this.addTargetDescribedBy():this.removeTargetDescribedBy())},this.scheduleHide=()=>{this.hideTimeout&&clearTimeout(this.hideTimeout),this.hideTimeout=setTimeout((()=>{this.hide(),this.hideTimeout=void 0}),120)}}componentDidLoad(){var t,i,a,o;this.target=document.getElementById(this.for),this.tooltipEl=this.host.querySelector(".tooltip"),this.tooltipEl&&(this.tooltipEl.id||(this.tooltipEl.id=this.for+"-tooltip"),this.tooltipId=this.tooltipEl.id,this.tooltipEl.setAttribute("aria-hidden","true")),this.target&&(this.target.addEventListener("mouseenter",this.show),this.target.addEventListener("mouseleave",this.scheduleHide),this.target.addEventListener("focus",this.show,!0),this.target.addEventListener("blur",this.scheduleHide,!0),null===(t=this.tooltipEl)||void 0===t||t.addEventListener("mouseenter",this.show),null===(i=this.tooltipEl)||void 0===i||i.addEventListener("mouseleave",this.scheduleHide),null===(a=this.tooltipEl)||void 0===a||a.addEventListener("focusin",this.show),null===(o=this.tooltipEl)||void 0===o||o.addEventListener("focusout",this.scheduleHide),this.updateTooltipPosition())}disconnectedCallback(){var t,i,a,o;this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=void 0),this.removeTargetDescribedBy(),this.target&&(this.removePositionListeners(),this.target.removeEventListener("mouseenter",this.show),this.target.removeEventListener("mouseleave",this.scheduleHide),this.target.removeEventListener("focus",this.show,!0),this.target.removeEventListener("blur",this.scheduleHide,!0),null===(t=this.tooltipEl)||void 0===t||t.removeEventListener("mouseenter",this.show),null===(i=this.tooltipEl)||void 0===i||i.removeEventListener("mouseleave",this.scheduleHide),null===(a=this.tooltipEl)||void 0===a||a.removeEventListener("focusin",this.show),null===(o=this.tooltipEl)||void 0===o||o.removeEventListener("focusout",this.scheduleHide))}checkElementOffScreen(t){const i=t.getBoundingClientRect(),a=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{topOff:i.top<0,bottomOff:i.bottom>o,leftOff:i.left<0,rightOff:i.right>a}}updateTooltipPosition(){this.addPositionListeners()}handleOffScreen(t,i){const a=this.checkElementOffScreen(this.host.querySelector(".tooltip")),o="top"===this.placement?`translate(-50%, calc(-100% - ${i}px)) scale(1)`:"bottom"===this.placement?`translate(-50%, ${i}px) scale(1)`:"left"===this.placement?`translate(calc(-100% - ${i}px), -50%) scale(1)`:`translate(${i}px, -50%) scale(1)`;a.leftOff&&(t.style.transform=o,t.style.left="0",t.style.right=""),a.rightOff&&(t.style.transform=o,t.style.left="",t.style.right="0")}render(){return a(o,{key:"7c328f07c4535f43ada56773dc84f87427109190"},a("div",{key:"a5143338bea798aaee058ab3bd2cafb1cb8dbfd4",role:"tooltip",class:"tooltip","data-placement":this.placement,"data-alignment":this.alignment},a("slot",{key:"b8528a55526b2ddb230be231004319bc8a46de37"}),a("span",{key:"b93de586490d52b76d7ce39c474decb828a7f369",class:"arrow","aria-hidden":"true"})))}get host(){return this}static get style(){return".anchor.sc-admiralty-tooltip{position:relative;display:inline-flex;vertical-align:middle}.sc-admiralty-tooltip-h:hover .tooltip.sc-admiralty-tooltip,.sc-admiralty-tooltip-h:focus-within .tooltip.sc-admiralty-tooltip{opacity:1;visibility:visible;transform:translate(0, 0) scale(1)}.trigger.sc-admiralty-tooltip{display:inline-flex}.tooltip.sc-admiralty-tooltip{position:fixed;padding:0.75rem;color:var(--admiralty-text-colour);background:var(--admiralty-background-colour);z-index:999;white-space:nowrap;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.06), 0 1px 10px 0 rgba(0, 0, 0, 0.1);opacity:0;visibility:hidden;transform:translate(0, 0) scale(0.98);transition:opacity 0.2s ease-in-out}[data-open].sc-admiralty-tooltip-h .tooltip.sc-admiralty-tooltip{opacity:1;visibility:visible;transform:translate(0, 0) scale(1);transition:opacity 0.2s ease-in-out}.arrow.sc-admiralty-tooltip{width:14px;height:14px;position:absolute;background:var(--admiralty-background-colour);transform:rotate(45deg)}.tooltip[data-placement=top].sc-admiralty-tooltip{border-top:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=top].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:50%;bottom:-4px;transform:translateX(-50%) rotate(45deg)}.tooltip[data-placement=bottom].sc-admiralty-tooltip{border-bottom:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=bottom].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:50%;top:-4px;transform:translateX(-50%) rotate(45deg)}.tooltip[data-placement=left].sc-admiralty-tooltip{border-bottom:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=left].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{top:50%;right:-4px;transform:translateY(-50%) rotate(45deg)}.tooltip[data-placement=right].sc-admiralty-tooltip{border-bottom:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=right].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{top:50%;left:-4px;transform:translateY(-50%) rotate(45deg)}.tooltip[data-placement=top][data-alignment=start].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip,.tooltip[data-placement=bottom][data-alignment=start].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:8px;right:auto;transform:rotate(45deg)}.tooltip[data-placement=top][data-alignment=centre].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip,.tooltip[data-placement=bottom][data-alignment=centre].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:50%;right:auto;transform:translateX(-50%) rotate(45deg)}.tooltip[data-placement=top][data-alignment=end].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip,.tooltip[data-placement=bottom][data-alignment=end].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{right:8px;left:auto;transform:rotate(45deg)}"}},[262,"admiralty-tooltip",{for:[1],placement:[513],alignment:[513]}]),l=e,r=function(){"undefined"!=typeof customElements&&["admiralty-tooltip"].forEach((t=>{"admiralty-tooltip"===t&&(customElements.get(s(t))||customElements.define(s(t),e))}))};export{l as AdmiraltyTooltip,r as defineCustomElement}
@@ -0,0 +1,233 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-uO9JpdnI.js';
2
+
3
+ const tooltipCss = () => `.anchor.sc-admiralty-tooltip{position:relative;display:inline-flex;vertical-align:middle}.sc-admiralty-tooltip-h:hover .tooltip.sc-admiralty-tooltip,.sc-admiralty-tooltip-h:focus-within .tooltip.sc-admiralty-tooltip{opacity:1;visibility:visible;transform:translate(0, 0) scale(1)}.trigger.sc-admiralty-tooltip{display:inline-flex}.tooltip.sc-admiralty-tooltip{position:fixed;padding:0.75rem;color:var(--admiralty-text-colour);background:var(--admiralty-background-colour);z-index:999;white-space:nowrap;box-shadow:0 2px 20px 0 rgba(0, 0, 0, 0.06), 0 1px 10px 0 rgba(0, 0, 0, 0.1);opacity:0;visibility:hidden;transform:translate(0, 0) scale(0.98);transition:opacity 0.2s ease-in-out}[data-open].sc-admiralty-tooltip-h .tooltip.sc-admiralty-tooltip{opacity:1;visibility:visible;transform:translate(0, 0) scale(1);transition:opacity 0.2s ease-in-out}.arrow.sc-admiralty-tooltip{width:14px;height:14px;position:absolute;background:var(--admiralty-background-colour);transform:rotate(45deg)}.tooltip[data-placement=top].sc-admiralty-tooltip{border-top:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=top].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:50%;bottom:-4px;transform:translateX(-50%) rotate(45deg)}.tooltip[data-placement=bottom].sc-admiralty-tooltip{border-bottom:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=bottom].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:50%;top:-4px;transform:translateX(-50%) rotate(45deg)}.tooltip[data-placement=left].sc-admiralty-tooltip{border-bottom:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=left].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{top:50%;right:-4px;transform:translateY(-50%) rotate(45deg)}.tooltip[data-placement=right].sc-admiralty-tooltip{border-bottom:3px solid var(--admiralty-colour-primary)}.tooltip[data-placement=right].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{top:50%;left:-4px;transform:translateY(-50%) rotate(45deg)}.tooltip[data-placement=top][data-alignment=start].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip,.tooltip[data-placement=bottom][data-alignment=start].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:8px;right:auto;transform:rotate(45deg)}.tooltip[data-placement=top][data-alignment=centre].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip,.tooltip[data-placement=bottom][data-alignment=centre].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{left:50%;right:auto;transform:translateX(-50%) rotate(45deg)}.tooltip[data-placement=top][data-alignment=end].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip,.tooltip[data-placement=bottom][data-alignment=end].sc-admiralty-tooltip .arrow.sc-admiralty-tooltip{right:8px;left:auto;transform:rotate(45deg)}`;
4
+
5
+ const TooltipComponent = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.placement = 'top';
9
+ this.alignment = 'centre';
10
+ this.positionTooltip = () => {
11
+ var _a;
12
+ if (!this.target)
13
+ return;
14
+ const r = this.target.getBoundingClientRect();
15
+ const tooltip = (_a = this.tooltipEl) !== null && _a !== void 0 ? _a : this.host.querySelector('.tooltip');
16
+ if (!tooltip)
17
+ return;
18
+ const gap = 8;
19
+ this.map = {
20
+ top: () => {
21
+ tooltip.style.top = `${r.top - gap}px`;
22
+ tooltip.style.left = `${r.left + r.width / 2}px`;
23
+ tooltip.style.transform = `translate(-50%, calc(-100% - ${gap}px)) scale(1)`;
24
+ },
25
+ bottom: () => {
26
+ tooltip.style.top = `${r.bottom + gap}px`;
27
+ tooltip.style.left = `${r.left + r.width / 2}px`;
28
+ tooltip.style.transform = `translate(-50%, ${gap}px) scale(1)`;
29
+ },
30
+ left: () => {
31
+ tooltip.style.top = `${r.top + r.height / 2}px`;
32
+ tooltip.style.left = `${r.left - 20}px`; // `${r.left - gap}px`;
33
+ tooltip.style.transform = `translate(calc(-100% - ${gap}px), -50%) scale(1)`;
34
+ },
35
+ right: () => {
36
+ tooltip.style.top = `${r.top + r.height / 2}px`;
37
+ tooltip.style.left = `${r.right + 20}px`; // `${r.right - gap}px`;
38
+ tooltip.style.transform = `translate(${gap}px, -50%) scale(1)`;
39
+ },
40
+ };
41
+ if (this.map[this.placement]) {
42
+ this.map[this.placement]();
43
+ return;
44
+ }
45
+ const spaceAbove = r.top;
46
+ const spaceBelow = window.innerHeight - r.bottom;
47
+ const spaceLeft = r.left;
48
+ const spaceRight = window.innerWidth - r.right;
49
+ if (spaceLeft > spaceRight) {
50
+ this.placement = 'left';
51
+ this.map[this.placement]();
52
+ this.handleOffScreen(tooltip, gap);
53
+ return;
54
+ }
55
+ if (spaceRight > spaceLeft) {
56
+ this.placement = 'right';
57
+ this.map[this.placement]();
58
+ this.handleOffScreen(tooltip, gap);
59
+ return;
60
+ }
61
+ if (spaceAbove > spaceBelow) {
62
+ this.placement = 'top';
63
+ this.map[this.placement]();
64
+ this.handleOffScreen(tooltip, gap);
65
+ return;
66
+ }
67
+ if (spaceBelow > spaceAbove) {
68
+ this.placement = 'bottom';
69
+ this.map[this.placement]();
70
+ this.handleOffScreen(tooltip, gap);
71
+ return;
72
+ }
73
+ };
74
+ this.addPositionListeners = () => {
75
+ if (!this.target)
76
+ return;
77
+ // Ensure updateTooltipPosition can be called repeatedly without duplicating handlers.
78
+ this.removePositionListeners();
79
+ this.target.addEventListener('mouseenter', this.positionTooltip);
80
+ this.target.addEventListener('focus', this.positionTooltip, true);
81
+ };
82
+ this.removePositionListeners = () => {
83
+ if (!this.target)
84
+ return;
85
+ this.target.removeEventListener('mouseenter', this.positionTooltip);
86
+ this.target.removeEventListener('focus', this.positionTooltip, true);
87
+ };
88
+ this.show = () => {
89
+ if (this.hideTimeout) {
90
+ clearTimeout(this.hideTimeout);
91
+ this.hideTimeout = undefined;
92
+ }
93
+ this.host.setAttribute('data-open', '');
94
+ this.setTooltipA11yState(true);
95
+ };
96
+ this.hide = () => {
97
+ this.host.removeAttribute('data-open');
98
+ this.setTooltipA11yState(false);
99
+ };
100
+ this.addTargetDescribedBy = () => {
101
+ if (!this.target || !this.tooltipId)
102
+ return;
103
+ const current = this.target.getAttribute('aria-describedby') || '';
104
+ const ids = current
105
+ .split(/\s+/)
106
+ .map(id => id.trim())
107
+ .filter(Boolean);
108
+ if (!ids.includes(this.tooltipId)) {
109
+ ids.push(this.tooltipId);
110
+ this.target.setAttribute('aria-describedby', ids.join(' '));
111
+ }
112
+ };
113
+ this.removeTargetDescribedBy = () => {
114
+ if (!this.target || !this.tooltipId)
115
+ return;
116
+ const current = this.target.getAttribute('aria-describedby') || '';
117
+ const ids = current
118
+ .split(/\s+/)
119
+ .map(id => id.trim())
120
+ .filter(id => id && id !== this.tooltipId);
121
+ if (ids.length > 0) {
122
+ this.target.setAttribute('aria-describedby', ids.join(' '));
123
+ }
124
+ else {
125
+ this.target.removeAttribute('aria-describedby');
126
+ }
127
+ };
128
+ this.setTooltipA11yState = (isOpen) => {
129
+ if (!this.tooltipEl)
130
+ return;
131
+ this.tooltipEl.setAttribute('aria-hidden', isOpen ? 'false' : 'true');
132
+ if (isOpen) {
133
+ this.addTargetDescribedBy();
134
+ return;
135
+ }
136
+ this.removeTargetDescribedBy();
137
+ };
138
+ this.scheduleHide = () => {
139
+ if (this.hideTimeout) {
140
+ clearTimeout(this.hideTimeout);
141
+ }
142
+ // Small delay prevents flicker when moving between trigger and tooltip.
143
+ this.hideTimeout = setTimeout(() => {
144
+ this.hide();
145
+ this.hideTimeout = undefined;
146
+ }, 120);
147
+ };
148
+ }
149
+ componentDidLoad() {
150
+ var _a, _b, _c, _d;
151
+ this.target = document.getElementById(this.for);
152
+ this.tooltipEl = this.host.querySelector('.tooltip');
153
+ if (this.tooltipEl) {
154
+ if (!this.tooltipEl.id) {
155
+ this.tooltipEl.id = `${this.for}-tooltip`;
156
+ }
157
+ this.tooltipId = this.tooltipEl.id;
158
+ this.tooltipEl.setAttribute('aria-hidden', 'true');
159
+ }
160
+ if (!this.target)
161
+ return;
162
+ this.target.addEventListener('mouseenter', this.show);
163
+ this.target.addEventListener('mouseleave', this.scheduleHide);
164
+ this.target.addEventListener('focus', this.show, true);
165
+ this.target.addEventListener('blur', this.scheduleHide, true);
166
+ (_a = this.tooltipEl) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', this.show);
167
+ (_b = this.tooltipEl) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', this.scheduleHide);
168
+ (_c = this.tooltipEl) === null || _c === void 0 ? void 0 : _c.addEventListener('focusin', this.show);
169
+ (_d = this.tooltipEl) === null || _d === void 0 ? void 0 : _d.addEventListener('focusout', this.scheduleHide);
170
+ this.updateTooltipPosition();
171
+ }
172
+ disconnectedCallback() {
173
+ var _a, _b, _c, _d;
174
+ if (this.hideTimeout) {
175
+ clearTimeout(this.hideTimeout);
176
+ this.hideTimeout = undefined;
177
+ }
178
+ this.removeTargetDescribedBy();
179
+ if (!this.target)
180
+ return;
181
+ this.removePositionListeners();
182
+ this.target.removeEventListener('mouseenter', this.show);
183
+ this.target.removeEventListener('mouseleave', this.scheduleHide);
184
+ this.target.removeEventListener('focus', this.show, true);
185
+ this.target.removeEventListener('blur', this.scheduleHide, true);
186
+ (_a = this.tooltipEl) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', this.show);
187
+ (_b = this.tooltipEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', this.scheduleHide);
188
+ (_c = this.tooltipEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('focusin', this.show);
189
+ (_d = this.tooltipEl) === null || _d === void 0 ? void 0 : _d.removeEventListener('focusout', this.scheduleHide);
190
+ }
191
+ checkElementOffScreen(el) {
192
+ const rect = el.getBoundingClientRect();
193
+ const viewportWidth = window.innerWidth || document.documentElement.clientWidth;
194
+ const viewportHeight = window.innerHeight || document.documentElement.clientHeight;
195
+ const status = {
196
+ topOff: rect.top < 0,
197
+ bottomOff: rect.bottom > viewportHeight,
198
+ leftOff: rect.left < 0,
199
+ rightOff: rect.right > viewportWidth,
200
+ };
201
+ return status;
202
+ }
203
+ updateTooltipPosition() {
204
+ this.addPositionListeners();
205
+ }
206
+ handleOffScreen(tooltip, gap) {
207
+ const isOffScreen = this.checkElementOffScreen(this.host.querySelector('.tooltip'));
208
+ const placementTransform = this.placement === 'top'
209
+ ? `translate(-50%, calc(-100% - ${gap}px)) scale(1)`
210
+ : this.placement === 'bottom'
211
+ ? `translate(-50%, ${gap}px) scale(1)`
212
+ : this.placement === 'left'
213
+ ? `translate(calc(-100% - ${gap}px), -50%) scale(1)`
214
+ : `translate(${gap}px, -50%) scale(1)`;
215
+ if (isOffScreen.leftOff) {
216
+ tooltip.style.transform = placementTransform;
217
+ tooltip.style.left = '0';
218
+ tooltip.style.right = '';
219
+ }
220
+ if (isOffScreen.rightOff) {
221
+ tooltip.style.transform = placementTransform;
222
+ tooltip.style.left = '';
223
+ tooltip.style.right = '0';
224
+ }
225
+ }
226
+ render() {
227
+ return (h(Host, { key: '7c328f07c4535f43ada56773dc84f87427109190' }, h("div", { key: 'a5143338bea798aaee058ab3bd2cafb1cb8dbfd4', role: "tooltip", class: "tooltip", "data-placement": this.placement, "data-alignment": this.alignment }, h("slot", { key: 'b8528a55526b2ddb230be231004319bc8a46de37' }), h("span", { key: 'b93de586490d52b76d7ce39c474decb828a7f369', class: "arrow", "aria-hidden": "true" }))));
228
+ }
229
+ get host() { return getElement(this); }
230
+ };
231
+ TooltipComponent.style = tooltipCss();
232
+
233
+ export { TooltipComponent as admiralty_tooltip };
@@ -17,5 +17,5 @@ var patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(async (options) => {
19
19
  await globalScripts();
20
- return bootstrapLazy([["admiralty-autocomplete",[[2,"admiralty-autocomplete",{"autoselect":[4],"cssNamespace":[1,"css-namespace"],"displayMenu":[1,"display-menu"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"confirmOnBlur":[4,"confirm-on-blur"],"showNoOptionsFound":[4,"show-no-options-found"],"showAllValues":[4,"show-all-values"],"required":[4],"assistiveHint":[1,"assistive-hint"],"menuAttributes":[8,"menu-attributes"],"inputClasses":[1,"input-classes"],"menuClasses":[1,"menu-classes"],"iconName":[1,"icon-name"],"label":[1],"hint":[1],"invalid":[4],"invalidMessage":[1,"invalid-message"],"disabled":[4],"value":[1025],"filterFunction":[16],"focused":[32],"hovered":[32],"menuOpen":[32],"options":[32],"option":[32],"query":[32],"validChoiceMade":[32],"selected":[32],"ariaHint":[32]},null,{"value":[{"onValueChange":0}],"focused":[{"onFocusedChange":0}]}]]],["admiralty-input",[[2,"admiralty-input",{"name":[1],"label":[1],"hint":[1],"disabled":[4],"type":[1],"placeholder":[1],"width":[2],"required":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"autocomplete":[1],"value":[1032]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-select",[[262,"admiralty-select",{"disabled":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"hint":[1],"label":[1],"width":[2],"value":[1032]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-textarea",[[2,"admiralty-textarea",{"label":[1],"hint":[1],"width":[2],"disabled":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"value":[1032]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-radio-group",[[262,"admiralty-radio-group",{"name":[1],"label":[1],"hint":[1],"disabled":[4],"value":[1032],"displayVertical":[4,"display-vertical"],"invalid":[4],"invalidMessage":[1,"invalid-message"]},null,{"value":[{"valueChanged":0}],"invalid":[{"invalidChanged":0}]}]]],["admiralty-colour-block",[[262,"admiralty-colour-block",{"width":[2],"height":[2],"heading":[1],"colour":[1],"href":[1],"linkText":[1,"link-text"],"suppressRedirect":[4,"suppress-redirect"],"enableCardEvent":[4,"enable-card-event"],"actionText":[1,"action-text"]}]]],["admiralty-error-summary",[[262,"admiralty-error-summary",{"heading":[1]}]]],["admiralty-file-input",[[2,"admiralty-file-input",{"label":[1],"multiple":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"files":[32]}]]],["admiralty-filter",[[262,"admiralty-filter",{"filterTitle":[1,"filter-title"]}]]],["admiralty-filter-group",[[262,"admiralty-filter-group",{"groupTitle":[1,"group-title"]}]]],["admiralty-paginator",[[2,"admiralty-paginator",{"pages":[2],"currentPage":[2,"current-page"],"label":[1]}]]],["admiralty-breadcrumb",[[262,"admiralty-breadcrumb",{"active":[4],"first":[4],"href":[1]}]]],["admiralty-header",[[262,"admiralty-header",{"headerTitle":[1,"header-title"],"headerTitleUrl":[1,"header-title-url"],"logoLinkUrl":[1,"logo-link-url"],"logoImgUrl":[1,"logo-img-url"],"logoAltText":[1,"logo-alt-text"],"mobileMenuOpen":[32],"displayHamburger":[32]}]]],["admiralty-icon-side-bar-item",[[2,"admiralty-icon-side-bar-item",{"expanded":[1540],"icon":[1],"href":[1],"itemText":[1,"item-text"],"suppressRedirect":[4,"suppress-redirect"],"active":[1540]},null,{"active":[{"handleActiveChange":0}]}]]],["admiralty-pill",[[2,"admiralty-pill",{"text":[1],"number":[1],"label":[1],"colour":[1],"selected":[4]}]]],["admiralty-progress-bar",[[2,"admiralty-progress-bar",{"label":[1],"progression":[2],"error":[4],"progressionValue":[32]},null,{"progression":[{"progressionChanged":0}]}]]],["admiralty-progress-tracker",[[262,"admiralty-progress-tracker",{"allowBackNavigation":[4,"allow-back-navigation"],"allowForwardNavigation":[4,"allow-forward-navigation"],"focusedStepIndex":[32],"currentSteps":[32]}]]],["admiralty-read-more",[[262,"admiralty-read-more",{"heading":[1],"expanded":[32]}]]],["admiralty-text-side-bar-item",[[262,"admiralty-text-side-bar-item",{"variant":[1],"expanded":[1540],"icon":[1],"href":[1],"itemText":[1,"item-text"],"suppressRedirect":[4,"suppress-redirect"],"active":[1540]},null,{"active":[{"handleActiveChange":0}]}]]],["admiralty-theme-toggle",[[2,"admiralty-theme-toggle",{"theme":[1537],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"theme":[{"themeChanged":0}]}]]],["admiralty-autocomplete-option",[[2,"admiralty-autocomplete-option",{"value":[8]}]]],["admiralty-breadcrumbs",[[262,"admiralty-breadcrumbs"]]],["admiralty-card",[[262,"admiralty-card",{"heading":[1]}]]],["admiralty-checkbox",[[2,"admiralty-checkbox",{"checkboxRight":[4,"checkbox-right"],"disabled":[4],"name":[1],"checked":[1540],"value":[8],"labelText":[1,"label-text"],"labelHidden":[4,"label-hidden"]},null,{"checked":[{"checkedChanged":0}]}]]],["admiralty-footer",[[262,"admiralty-footer",{"variant":[1],"imageLink":[1,"image-link"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"text":[1],"hasSlotContent":[32]},[[2,"slotchange","handleSlotChange"]]]]],["admiralty-header-menu-item",[[262,"admiralty-header-menu-item",{"menuTitle":[1,"menu-title"],"active":[4]}]]],["admiralty-header-menu-link",[[262,"admiralty-header-menu-link",{"menuTitle":[1,"menu-title"],"active":[4],"href":[1],"suppressRedirect":[4,"suppress-redirect"]}]]],["admiralty-header-profile",[[2,"admiralty-header-profile",{"isSignedIn":[4,"is-signed-in"],"signedInText":[1,"signed-in-text"],"signInOnly":[4,"sign-in-only"]}]]],["admiralty-header-sub-menu-item",[[262,"admiralty-header-sub-menu-item",{"menuTitle":[1,"menu-title"],"href":[1],"suppressRedirect":[4,"suppress-redirect"]}]]],["admiralty-hr",[[2,"admiralty-hr"]]],["admiralty-icon-side-bar",[[262,"admiralty-icon-side-bar",{"label":[1],"showLogo":[4,"show-logo"],"logoImgUrl":[1,"logo-img-url"],"iconSideBarWidth":[1,"icon-side-bar-width"]}]]],["admiralty-icon-side-bar-wrapper",[[260,"admiralty-icon-side-bar-wrapper",null,[[0,"iconSideBarItemClick","onIconSideBarItemSelected"]]]]],["admiralty-link",[[262,"admiralty-link",{"href":[1],"newTab":[4,"new-tab"]}]]],["admiralty-modal-dialog",[[262,"admiralty-modal-dialog",{"heading":[1],"label":[1],"description":[1],"show":[4]}]]],["admiralty-paginator-wrapper",[[260,"admiralty-paginator-wrapper",null,[[0,"pageChange","pageChangedHandler"]]]]],["admiralty-phase-banner",[[2,"admiralty-phase-banner",{"phase":[1],"link":[1]}]]],["admiralty-progress-tracker-step",[[262,"admiralty-progress-tracker-step",{"stepId":[1,"step-id"],"stepTitle":[1,"step-title"],"status":[1],"summary":[1]}]]],["admiralty-radio",[[262,"admiralty-radio",{"name":[1],"value":[1025],"disabled":[4],"checked":[1028],"invalid":[4],"buttonTabindex":[32],"setButtonTabindex":[64]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-side-nav",[[262,"admiralty-side-nav",{"label":[1]}]]],["admiralty-side-nav-item",[[2,"admiralty-side-nav-item",{"sideNavItemId":[1,"side-nav-item-id"],"headingTitle":[1,"heading-title"],"navActive":[4,"nav-active"]}]]],["admiralty-side-nav-wrapper",[[260,"admiralty-side-nav-wrapper",null,[[0,"sideNavItemSelected","onSideNavItemSelected"]]]]],["admiralty-skeleton",[[2,"admiralty-skeleton",{"height":[1],"width":[1],"radius":[1],"noAnimation":[1540,"no-animation"]}]]],["admiralty-skip-link",[[2,"admiralty-skip-link",{"href":[1]}]]],["admiralty-tab",[[262,"admiralty-tab",{"label":[1],"tabLabelId":[1,"tab-label-id"],"tabContentId":[1,"tab-content-id"]}]]],["admiralty-tab-group",[[262,"admiralty-tab-group",{"selectedIndex":[1026,"selected-index"]}]]],["admiralty-table",[[262,"admiralty-table",{"caption":[1]}]]],["admiralty-table-body",[[262,"admiralty-table-body"]]],["admiralty-table-cell",[[262,"admiralty-table-cell"]]],["admiralty-table-header",[[262,"admiralty-table-header"]]],["admiralty-table-header-cell",[[262,"admiralty-table-header-cell"]]],["admiralty-table-row",[[262,"admiralty-table-row"]]],["admiralty-text-side-bar",[[262,"admiralty-text-side-bar",{"label":[1],"showLogo":[4,"show-logo"],"logoImgUrl":[1,"logo-img-url"],"textSideBarWidth":[1,"text-side-bar-width"]}]]],["admiralty-text-side-bar-wrapper",[[260,"admiralty-text-side-bar-wrapper",null,[[0,"textSideBarItemClick","ontextSideBarItemSelected"]]]]],["admiralty-icon",[[1,"admiralty-icon",{"name":[1],"size":[8]}]]],["admiralty-dialogue",[[262,"admiralty-dialogue",{"type":[1],"heading":[1],"sectionRole":[1,"section-role"]}]]],["admiralty-expansion",[[262,"admiralty-expansion",{"heading":[1],"expanded":[1540],"alignHeadingRight":[4,"align-heading-right"],"hideBorder":[4,"hide-border"]}]]],["admiralty-button",[[262,"admiralty-button",{"variant":[1],"icon":[1],"disabled":[516],"borderless":[4],"type":[1],"form":[1],"name":[1],"value":[1]}]]],["admiralty-hint_3",[[262,"admiralty-hint",{"disabled":[4]}],[262,"admiralty-label",{"disabled":[4],"for":[1]}],[262,"admiralty-input-invalid"]]]], options);
20
+ return bootstrapLazy([["admiralty-autocomplete",[[2,"admiralty-autocomplete",{"autoselect":[4],"cssNamespace":[1,"css-namespace"],"displayMenu":[1,"display-menu"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"confirmOnBlur":[4,"confirm-on-blur"],"showNoOptionsFound":[4,"show-no-options-found"],"showAllValues":[4,"show-all-values"],"required":[4],"assistiveHint":[1,"assistive-hint"],"menuAttributes":[8,"menu-attributes"],"inputClasses":[1,"input-classes"],"menuClasses":[1,"menu-classes"],"iconName":[1,"icon-name"],"label":[1],"hint":[1],"invalid":[4],"invalidMessage":[1,"invalid-message"],"disabled":[4],"value":[1025],"filterFunction":[16],"focused":[32],"hovered":[32],"menuOpen":[32],"options":[32],"option":[32],"query":[32],"validChoiceMade":[32],"selected":[32],"ariaHint":[32]},null,{"value":[{"onValueChange":0}],"focused":[{"onFocusedChange":0}]}]]],["admiralty-input",[[2,"admiralty-input",{"name":[1],"label":[1],"hint":[1],"disabled":[4],"type":[1],"placeholder":[1],"width":[2],"required":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"autocomplete":[1],"value":[1032]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-select",[[262,"admiralty-select",{"disabled":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"hint":[1],"label":[1],"width":[2],"value":[1032]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-textarea",[[2,"admiralty-textarea",{"label":[1],"hint":[1],"width":[2],"disabled":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"value":[1032]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-radio-group",[[262,"admiralty-radio-group",{"name":[1],"label":[1],"hint":[1],"disabled":[4],"value":[1032],"displayVertical":[4,"display-vertical"],"invalid":[4],"invalidMessage":[1,"invalid-message"]},null,{"value":[{"valueChanged":0}],"invalid":[{"invalidChanged":0}]}]]],["admiralty-colour-block",[[262,"admiralty-colour-block",{"width":[2],"height":[2],"heading":[1],"colour":[1],"href":[1],"linkText":[1,"link-text"],"suppressRedirect":[4,"suppress-redirect"],"enableCardEvent":[4,"enable-card-event"],"actionText":[1,"action-text"]}]]],["admiralty-error-summary",[[262,"admiralty-error-summary",{"heading":[1]}]]],["admiralty-file-input",[[2,"admiralty-file-input",{"label":[1],"multiple":[4],"invalid":[4],"invalidMessage":[1,"invalid-message"],"files":[32]}]]],["admiralty-filter",[[262,"admiralty-filter",{"filterTitle":[1,"filter-title"]}]]],["admiralty-filter-group",[[262,"admiralty-filter-group",{"groupTitle":[1,"group-title"]}]]],["admiralty-paginator",[[2,"admiralty-paginator",{"pages":[2],"currentPage":[2,"current-page"],"label":[1]}]]],["admiralty-breadcrumb",[[262,"admiralty-breadcrumb",{"active":[4],"first":[4],"href":[1]}]]],["admiralty-header",[[262,"admiralty-header",{"headerTitle":[1,"header-title"],"headerTitleUrl":[1,"header-title-url"],"logoLinkUrl":[1,"logo-link-url"],"logoImgUrl":[1,"logo-img-url"],"logoAltText":[1,"logo-alt-text"],"mobileMenuOpen":[32],"displayHamburger":[32]}]]],["admiralty-icon-side-bar-item",[[2,"admiralty-icon-side-bar-item",{"expanded":[1540],"icon":[1],"href":[1],"itemText":[1,"item-text"],"suppressRedirect":[4,"suppress-redirect"],"active":[1540]},null,{"active":[{"handleActiveChange":0}]}]]],["admiralty-pill",[[2,"admiralty-pill",{"text":[1],"number":[1],"label":[1],"colour":[1],"selected":[4]}]]],["admiralty-progress-bar",[[2,"admiralty-progress-bar",{"label":[1],"progression":[2],"error":[4],"progressionValue":[32]},null,{"progression":[{"progressionChanged":0}]}]]],["admiralty-progress-tracker",[[262,"admiralty-progress-tracker",{"allowBackNavigation":[4,"allow-back-navigation"],"allowForwardNavigation":[4,"allow-forward-navigation"],"focusedStepIndex":[32],"currentSteps":[32]}]]],["admiralty-read-more",[[262,"admiralty-read-more",{"heading":[1],"expanded":[32]}]]],["admiralty-text-side-bar-item",[[262,"admiralty-text-side-bar-item",{"variant":[1],"expanded":[1540],"icon":[1],"href":[1],"itemText":[1,"item-text"],"suppressRedirect":[4,"suppress-redirect"],"active":[1540]},null,{"active":[{"handleActiveChange":0}]}]]],["admiralty-theme-toggle",[[2,"admiralty-theme-toggle",{"theme":[1537],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"theme":[{"themeChanged":0}]}]]],["admiralty-autocomplete-option",[[2,"admiralty-autocomplete-option",{"value":[8]}]]],["admiralty-breadcrumbs",[[262,"admiralty-breadcrumbs"]]],["admiralty-card",[[262,"admiralty-card",{"heading":[1]}]]],["admiralty-checkbox",[[2,"admiralty-checkbox",{"checkboxRight":[4,"checkbox-right"],"disabled":[4],"name":[1],"checked":[1540],"value":[8],"labelText":[1,"label-text"],"labelHidden":[4,"label-hidden"]},null,{"checked":[{"checkedChanged":0}]}]]],["admiralty-footer",[[262,"admiralty-footer",{"variant":[1],"imageLink":[1,"image-link"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"text":[1],"hasSlotContent":[32]},[[2,"slotchange","handleSlotChange"]]]]],["admiralty-header-menu-item",[[262,"admiralty-header-menu-item",{"menuTitle":[1,"menu-title"],"active":[4]}]]],["admiralty-header-menu-link",[[262,"admiralty-header-menu-link",{"menuTitle":[1,"menu-title"],"active":[4],"href":[1],"suppressRedirect":[4,"suppress-redirect"]}]]],["admiralty-header-profile",[[2,"admiralty-header-profile",{"isSignedIn":[4,"is-signed-in"],"signedInText":[1,"signed-in-text"],"signInOnly":[4,"sign-in-only"]}]]],["admiralty-header-sub-menu-item",[[262,"admiralty-header-sub-menu-item",{"menuTitle":[1,"menu-title"],"href":[1],"suppressRedirect":[4,"suppress-redirect"]}]]],["admiralty-hr",[[2,"admiralty-hr"]]],["admiralty-icon-side-bar",[[262,"admiralty-icon-side-bar",{"label":[1],"showLogo":[4,"show-logo"],"logoImgUrl":[1,"logo-img-url"],"iconSideBarWidth":[1,"icon-side-bar-width"]}]]],["admiralty-icon-side-bar-wrapper",[[260,"admiralty-icon-side-bar-wrapper",null,[[0,"iconSideBarItemClick","onIconSideBarItemSelected"]]]]],["admiralty-link",[[262,"admiralty-link",{"href":[1],"newTab":[4,"new-tab"]}]]],["admiralty-modal-dialog",[[262,"admiralty-modal-dialog",{"heading":[1],"label":[1],"description":[1],"show":[4]}]]],["admiralty-paginator-wrapper",[[260,"admiralty-paginator-wrapper",null,[[0,"pageChange","pageChangedHandler"]]]]],["admiralty-phase-banner",[[2,"admiralty-phase-banner",{"phase":[1],"link":[1]}]]],["admiralty-progress-tracker-step",[[262,"admiralty-progress-tracker-step",{"stepId":[1,"step-id"],"stepTitle":[1,"step-title"],"status":[1],"summary":[1]}]]],["admiralty-radio",[[262,"admiralty-radio",{"name":[1],"value":[1025],"disabled":[4],"checked":[1028],"invalid":[4],"buttonTabindex":[32],"setButtonTabindex":[64]},null,{"value":[{"valueChanged":0}]}]]],["admiralty-side-nav",[[262,"admiralty-side-nav",{"label":[1]}]]],["admiralty-side-nav-item",[[2,"admiralty-side-nav-item",{"sideNavItemId":[1,"side-nav-item-id"],"headingTitle":[1,"heading-title"],"navActive":[4,"nav-active"]}]]],["admiralty-side-nav-wrapper",[[260,"admiralty-side-nav-wrapper",null,[[0,"sideNavItemSelected","onSideNavItemSelected"]]]]],["admiralty-skeleton",[[2,"admiralty-skeleton",{"height":[1],"width":[1],"radius":[1],"noAnimation":[1540,"no-animation"]}]]],["admiralty-skip-link",[[2,"admiralty-skip-link",{"href":[1]}]]],["admiralty-tab",[[262,"admiralty-tab",{"label":[1],"tabLabelId":[1,"tab-label-id"],"tabContentId":[1,"tab-content-id"]}]]],["admiralty-tab-group",[[262,"admiralty-tab-group",{"selectedIndex":[1026,"selected-index"]}]]],["admiralty-table",[[262,"admiralty-table",{"caption":[1]}]]],["admiralty-table-body",[[262,"admiralty-table-body"]]],["admiralty-table-cell",[[262,"admiralty-table-cell"]]],["admiralty-table-header",[[262,"admiralty-table-header"]]],["admiralty-table-header-cell",[[262,"admiralty-table-header-cell"]]],["admiralty-table-row",[[262,"admiralty-table-row"]]],["admiralty-text-side-bar",[[262,"admiralty-text-side-bar",{"label":[1],"showLogo":[4,"show-logo"],"logoImgUrl":[1,"logo-img-url"],"textSideBarWidth":[1,"text-side-bar-width"]}]]],["admiralty-text-side-bar-wrapper",[[260,"admiralty-text-side-bar-wrapper",null,[[0,"textSideBarItemClick","ontextSideBarItemSelected"]]]]],["admiralty-tooltip",[[262,"admiralty-tooltip",{"for":[1],"placement":[513],"alignment":[513]}]]],["admiralty-icon",[[1,"admiralty-icon",{"name":[1],"size":[8]}]]],["admiralty-dialogue",[[262,"admiralty-dialogue",{"type":[1],"heading":[1],"sectionRole":[1,"section-role"]}]]],["admiralty-expansion",[[262,"admiralty-expansion",{"heading":[1],"expanded":[1540],"alignHeadingRight":[4,"align-heading-right"],"hideBorder":[4,"hide-border"]}]]],["admiralty-button",[[262,"admiralty-button",{"variant":[1],"icon":[1],"disabled":[516],"borderless":[4],"type":[1],"form":[1],"name":[1],"value":[1]}]]],["admiralty-hint_3",[[262,"admiralty-hint",{"disabled":[4]}],[262,"admiralty-label",{"disabled":[4],"for":[1]}],[262,"admiralty-input-invalid"]]]], options);
21
21
  });