@ukho/admiralty-core 4.0.0-next.7 → 4.0.0-next.8

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.
Files changed (90) hide show
  1. package/dist/admiralty/admiralty.esm.js +1 -1
  2. package/dist/admiralty/admiralty.esm.js.map +1 -1
  3. package/dist/admiralty/{p-0747bd00.entry.js → p-1e01bb1c.entry.js} +2 -2
  4. package/dist/admiralty/{p-0747bd00.entry.js.map → p-1e01bb1c.entry.js.map} +1 -1
  5. package/dist/admiralty/{p-e11fb21b.entry.js → p-6dde3d41.entry.js} +2 -2
  6. package/dist/admiralty/p-6dde3d41.entry.js.map +1 -0
  7. package/dist/admiralty/{p-f8e1cfce.entry.js → p-a0466b05.entry.js} +2 -2
  8. package/dist/admiralty/p-a0466b05.entry.js.map +1 -0
  9. package/dist/admiralty/p-f2f2c51d.entry.js +2 -0
  10. package/dist/admiralty/p-f2f2c51d.entry.js.map +1 -0
  11. package/dist/cjs/admiralty-autocomplete.cjs.entry.js +4 -3
  12. package/dist/cjs/admiralty-autocomplete.cjs.entry.js.map +1 -1
  13. package/dist/cjs/admiralty-input.cjs.entry.js +2 -2
  14. package/dist/cjs/admiralty-input.cjs.entry.js.map +1 -1
  15. package/dist/cjs/admiralty-progress-bar.cjs.entry.js +9 -3
  16. package/dist/cjs/admiralty-progress-bar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/admiralty-tab-group.cjs.entry.js +17 -5
  18. package/dist/cjs/admiralty-tab-group.cjs.entry.js.map +1 -1
  19. package/dist/cjs/admiralty.cjs.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -3
  22. package/dist/collection/components/autocomplete/autocomplete.js +5 -4
  23. package/dist/collection/components/autocomplete/autocomplete.js.map +1 -1
  24. package/dist/collection/components/input/input.js +2 -2
  25. package/dist/collection/components/input/input.js.map +1 -1
  26. package/dist/collection/components/progress-bar/progress-bar.js +9 -3
  27. package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
  28. package/dist/components/admiralty-autocomplete.js +4 -3
  29. package/dist/components/admiralty-autocomplete.js.map +1 -1
  30. package/dist/components/admiralty-input.js +121 -1
  31. package/dist/components/admiralty-input.js.map +1 -1
  32. package/dist/components/admiralty-progress-bar.js +9 -3
  33. package/dist/components/admiralty-progress-bar.js.map +1 -1
  34. package/dist/components/admiralty-tab-group.js +13 -1
  35. package/dist/components/admiralty-tab-group.js.map +1 -1
  36. package/dist/esm/admiralty-autocomplete.entry.js +4 -3
  37. package/dist/esm/admiralty-autocomplete.entry.js.map +1 -1
  38. package/dist/esm/admiralty-input.entry.js +2 -2
  39. package/dist/esm/admiralty-input.entry.js.map +1 -1
  40. package/dist/esm/admiralty-progress-bar.entry.js +9 -3
  41. package/dist/esm/admiralty-progress-bar.entry.js.map +1 -1
  42. package/dist/esm/admiralty-tab-group.entry.js +13 -1
  43. package/dist/esm/admiralty-tab-group.entry.js.map +1 -1
  44. package/dist/esm/admiralty.js +1 -1
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/types/components/autocomplete/autocomplete.d.ts +1 -1
  47. package/dist/types/components/progress-bar/progress-bar.d.ts +3 -1
  48. package/dist/types/components.d.ts +2 -94
  49. package/docs/docs.json +3 -218
  50. package/package.json +2 -2
  51. package/dist/admiralty/p-26ffce79.entry.js +0 -2
  52. package/dist/admiralty/p-26ffce79.entry.js.map +0 -1
  53. package/dist/admiralty/p-a4bd6904.js +0 -2
  54. package/dist/admiralty/p-a4bd6904.js.map +0 -1
  55. package/dist/admiralty/p-b7153ca1.entry.js +0 -2
  56. package/dist/admiralty/p-b7153ca1.entry.js.map +0 -1
  57. package/dist/admiralty/p-d701641c.entry.js +0 -2
  58. package/dist/admiralty/p-d701641c.entry.js.map +0 -1
  59. package/dist/admiralty/p-e11fb21b.entry.js.map +0 -1
  60. package/dist/admiralty/p-f8e1cfce.entry.js.map +0 -1
  61. package/dist/cjs/Keys-019752ee.js +0 -16
  62. package/dist/cjs/Keys-019752ee.js.map +0 -1
  63. package/dist/cjs/admiralty-type-ahead-item.cjs.entry.js +0 -23
  64. package/dist/cjs/admiralty-type-ahead-item.cjs.entry.js.map +0 -1
  65. package/dist/cjs/admiralty-type-ahead.cjs.entry.js +0 -204
  66. package/dist/cjs/admiralty-type-ahead.cjs.entry.js.map +0 -1
  67. package/dist/collection/components/type-ahead/type-ahead.css +0 -106
  68. package/dist/collection/components/type-ahead/type-ahead.js +0 -329
  69. package/dist/collection/components/type-ahead/type-ahead.js.map +0 -1
  70. package/dist/collection/components/type-ahead-item/type-ahead-item.css +0 -3
  71. package/dist/collection/components/type-ahead-item/type-ahead-item.js +0 -43
  72. package/dist/collection/components/type-ahead-item/type-ahead-item.js.map +0 -1
  73. package/dist/components/admiralty-type-ahead-item.d.ts +0 -11
  74. package/dist/components/admiralty-type-ahead-item.js +0 -38
  75. package/dist/components/admiralty-type-ahead-item.js.map +0 -1
  76. package/dist/components/admiralty-type-ahead.d.ts +0 -11
  77. package/dist/components/admiralty-type-ahead.js +0 -254
  78. package/dist/components/admiralty-type-ahead.js.map +0 -1
  79. package/dist/components/p-1a2059bb.js +0 -125
  80. package/dist/components/p-1a2059bb.js.map +0 -1
  81. package/dist/components/p-a4bd6904.js +0 -16
  82. package/dist/components/p-a4bd6904.js.map +0 -1
  83. package/dist/esm/Keys-acfce4b9.js +0 -16
  84. package/dist/esm/Keys-acfce4b9.js.map +0 -1
  85. package/dist/esm/admiralty-type-ahead-item.entry.js +0 -19
  86. package/dist/esm/admiralty-type-ahead-item.entry.js.map +0 -1
  87. package/dist/esm/admiralty-type-ahead.entry.js +0 -200
  88. package/dist/esm/admiralty-type-ahead.entry.js.map +0 -1
  89. package/dist/types/components/type-ahead/type-ahead.d.ts +0 -72
  90. package/dist/types/components/type-ahead-item/type-ahead-item.d.ts +0 -4
@@ -1,254 +0,0 @@
1
- import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-7dd465c9.js';
2
- import { K as Keys } from './p-a4bd6904.js';
3
- import { d as defineCustomElement$6 } from './p-8ccb8247.js';
4
- import { d as defineCustomElement$5 } from './p-91d406aa.js';
5
- import { d as defineCustomElement$4 } from './p-1a2059bb.js';
6
- import { d as defineCustomElement$3 } from './p-8c6a193a.js';
7
- import { d as defineCustomElement$2 } from './p-09a69305.js';
8
-
9
- const typeAheadCss = ".visually-hidden.sc-admiralty-type-ahead:not(:focus):not(:active){position:absolute !important;width:1px !important;height:1px !important;margin:0 !important;padding:0 !important;overflow:hidden !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;border:0 !important;white-space:nowrap !important}@media (max-width: 1023px){.desktop-only.sc-admiralty-type-ahead{display:none}}@media (min-width: 1024px){.not-desktop.sc-admiralty-type-ahead{display:none}}@media (min-width: 1024px){.tablet-only.sc-admiralty-type-ahead{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-only.sc-admiralty-type-ahead{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-or-desktop.sc-admiralty-type-ahead{display:none}}@media (min-width: 1024px){.phone-or-tablet.sc-admiralty-type-ahead{display:none}}@media (min-width: 1024px){.phone-only.sc-admiralty-type-ahead{display:none}}@media (max-width: 1023px) and (min-width: 480px){.phone-only.sc-admiralty-type-ahead{display:none}}*.sc-admiralty-type-ahead{margin:0px;padding:0px}.text-input-wrap.sc-admiralty-type-ahead{height:auto !important}.filterTextInput.sc-admiralty-type-ahead{width:100%}.typeahead-list-container.sc-admiralty-type-ahead{position:relative}.typeahead-list-container.sc-admiralty-type-ahead .typeahead-list.sc-admiralty-type-ahead{position:absolute;left:0px;top:-24px;background-color:var(--admiralty-background-colour);width:100%;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);border:2px solid var(--admiralty-text-colour);border-top:none;box-sizing:border-box;max-height:180px;overflow-y:auto;z-index:1;list-style:none}.typeahead-list-container.sc-admiralty-type-ahead .typeahead-list.sc-admiralty-type-ahead li.sc-admiralty-type-ahead{cursor:pointer;transform:unset !important;padding:6px;min-height:24px;margin:0}.typeahead-list-container.sc-admiralty-type-ahead .typeahead-list.sc-admiralty-type-ahead li.sc-admiralty-type-ahead:before{content:none}.typeahead-list-container.sc-admiralty-type-ahead .typeahead-list.sc-admiralty-type-ahead li.highlighted.sc-admiralty-type-ahead{background-color:var(--admiralty-colour-primary);color:var(--admiralty-colour-primary-contrast)}";
10
- const AdmiraltyTypeAheadStyle0 = typeAheadCss;
11
-
12
- const TypeAheadComponent = /*@__PURE__*/ proxyCustomElement(class TypeAheadComponent extends H {
13
- constructor() {
14
- super();
15
- this.__registerHost();
16
- this.selectionChanged = createEvent(this, "selectionChanged", 7);
17
- this.valueChanged = createEvent(this, "valueChanged", 7);
18
- this.internalId = ++id;
19
- this.filterList = [];
20
- this.selectedItemIndex = -1;
21
- this.isFocused = false;
22
- this.isSilenced = false;
23
- this.isAlternateStatusSection = false;
24
- this.originalSearch = '';
25
- this.hasBeenFocusedAtLeastOnce = false;
26
- this.filterResult = new Array();
27
- this.value = undefined;
28
- this.label = undefined;
29
- this.hint = undefined;
30
- this.placeholder = undefined;
31
- this.resultsOnInitFocus = false;
32
- }
33
- get inputValue() {
34
- return this.inputControl.value.toString();
35
- }
36
- set inputValue(value) {
37
- this.inputControl.value = value;
38
- }
39
- componentDidLoad() {
40
- if (this.value) {
41
- this.inputValue = this.value;
42
- }
43
- }
44
- connectedCallback() {
45
- this.mutation = new MutationObserver(() => {
46
- this.populateFilterList();
47
- forceUpdate(this);
48
- });
49
- this.mutation.observe(this.el, {
50
- childList: true,
51
- subtree: true,
52
- });
53
- }
54
- disconnectedCallback() {
55
- if (this.mutation) {
56
- this.mutation.disconnect();
57
- this.mutation = undefined;
58
- }
59
- }
60
- populateFilterList() {
61
- const slotItems = this.el.querySelectorAll('admiralty-type-ahead-item');
62
- this.filterList = [];
63
- slotItems.forEach(el => {
64
- this.filterList.push(el.getAttribute('value'));
65
- });
66
- }
67
- handleFocusIn() {
68
- if (this.resultsOnInitFocus && !this.hasBeenFocusedAtLeastOnce) {
69
- this.performFilter('');
70
- this.hasBeenFocusedAtLeastOnce = true;
71
- }
72
- this.isFocused = true;
73
- this.isSilenced = false;
74
- }
75
- handleFocusOut() {
76
- this.isFocused = false;
77
- this.statusText = null;
78
- this.isSilenced = true;
79
- }
80
- textChanged(value) {
81
- this.originalSearch = value;
82
- this.performFilter(value);
83
- this.isSilenced = false;
84
- this.valueChanged.emit(value);
85
- }
86
- handleKeyPressed(event) {
87
- event.stopImmediatePropagation();
88
- if (event.key === Keys.UP_ARROW || event.key === Keys.DOWN_ARROW) {
89
- this.navigateSuggestions(event.key);
90
- this.updateScroll();
91
- }
92
- else if (event.key !== Keys.ENTER) {
93
- this.textChanged(this.inputValue);
94
- this.selectCurrentItem();
95
- }
96
- }
97
- handleKeyDown(event) {
98
- event.stopImmediatePropagation();
99
- if (event.key === Keys.TAB || event.key === Keys.ENTER) {
100
- this.selectCurrentItem();
101
- }
102
- }
103
- handleItemSelected(value) {
104
- this.inputValue = value;
105
- this.textChanged(value);
106
- this.filterResult = new Array();
107
- this.selectionChanged.emit(value);
108
- }
109
- performFilter(value) {
110
- const filter = (filterList, text) => {
111
- const filterResult = filterList.filter(value => {
112
- return text === null || text.length < 1 || value.toLowerCase().indexOf(text.toLowerCase()) > -1;
113
- });
114
- return filterResult;
115
- };
116
- this.filterResult = filter(this.filterList, value);
117
- this.selectedItemIndex = -1;
118
- }
119
- addHighlight() {
120
- if (this.selectedItemIndex > -1) {
121
- const listItem = this.el.querySelector(`#${this.getListItemId(this.selectedItemIndex)}`);
122
- listItem.classList.add('highlighted');
123
- }
124
- }
125
- removeHighlight(i) {
126
- if (i > -1) {
127
- const listItem = this.el.querySelector(`#${this.getListItemId(i)}`);
128
- listItem.classList.remove('highlighted');
129
- }
130
- }
131
- selectCurrentItem() {
132
- if (this.selectedItemIndex >= 0) {
133
- const selectedItemText = this.filterResult[this.selectedItemIndex];
134
- this.handleItemSelected(selectedItemText);
135
- }
136
- }
137
- handleItemHovered(index) {
138
- this.removeHighlight(this.selectedItemIndex);
139
- this.selectedItemIndex = index;
140
- this.addHighlight();
141
- }
142
- handleComponentFocusOut() {
143
- var _a;
144
- // Ensure dropdown closed on clicking or tabbing away from this component
145
- if (((_a = this.filterResult) === null || _a === void 0 ? void 0 : _a.length) > 0) {
146
- this.filterResult = new Array();
147
- this.hasBeenFocusedAtLeastOnce = false;
148
- }
149
- }
150
- /**
151
- * Check if the selected option is in view, and scroll if not
152
- */
153
- updateScroll() {
154
- const container = this.listContainer;
155
- const ul = container.querySelector('ul');
156
- const selectedItem = Array.from(ul.childNodes).find((item) => item.ariaPosInSet === `${this.selectedItemIndex + 1}`);
157
- if (container && selectedItem && container.scrollHeight + container.clientHeight) {
158
- selectedItem.scrollIntoView();
159
- }
160
- }
161
- navigateSuggestions(key) {
162
- if (key === Keys.UP_ARROW) {
163
- this.removeHighlight(this.selectedItemIndex);
164
- this.selectedItemIndex--;
165
- if (this.selectedItemIndex === -2) {
166
- this.selectedItemIndex = this.filterResult.length - 1;
167
- }
168
- }
169
- if (key === Keys.DOWN_ARROW) {
170
- this.removeHighlight(this.selectedItemIndex);
171
- this.selectedItemIndex++;
172
- if (this.selectedItemIndex > this.filterResult.length - 1) {
173
- this.selectedItemIndex = -1;
174
- }
175
- }
176
- if (this.selectedItemIndex === -1) {
177
- this.inputValue = this.originalSearch;
178
- }
179
- else {
180
- const value = this.filterResult[this.selectedItemIndex];
181
- this.inputValue = value;
182
- this.addHighlight();
183
- }
184
- }
185
- getListItemId(i) {
186
- const id = this.getId();
187
- return `${id}-list-item-${i}`;
188
- }
189
- getId() {
190
- return this.el.id != '' ? this.el.id : `admiralty-typeahead-${this.internalId}`;
191
- }
192
- render() {
193
- const id = this.getId();
194
- const inputId = `${id}-input`;
195
- const hintId = `${id}-assistive-hint`;
196
- const listId = `${id}-list`;
197
- return (h(Host, { key: 'a31dfc130539fc7998a1a858780180c3f58a3dca', onFocusout: _ev => this.handleComponentFocusOut() }, h("div", { key: '2b1d16a096aedc73730e3456a786c79bbb649087', class: "visually-hidden" }, h("div", { key: '7a4ffe9d200afbb32759292ad537af595b46d377', class: "results-status-a", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !this.isSilenced && this.isAlternateStatusSection ? this.statusText : ''), h("div", { key: '246dd3d76841a08ec9304156956279b1319ae956', class: "results-status-b", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !this.isSilenced && !this.isAlternateStatusSection ? this.statusText : '')), h("admiralty-input", { key: '9226118ea71b0c055c3b8b12bdaf183b8d0f1be0', type: "text", ref: el => (this.inputControl = el), id: inputId, label: this.label, hint: this.hint, placeholder: this.placeholder, class: "filterTextInput", onKeyUp: ev => this.handleKeyPressed(ev), onKeyDown: ev => this.handleKeyDown(ev), onFocusin: _ev => this.handleFocusIn(), onFocusout: _ev => this.handleFocusOut(), "aria-expanded": this.isFocused && this.filterResult.length > 0 }), h("span", { key: '2802b19f095e15fef7e346311014f4944578804d', id: hintId, class: "visually-hidden" }, "When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."), this.filterResult.length > 0 ? (h("div", { class: "typeahead-list-container", ref: el => (this.listContainer = el) }, h("ul", { class: "typeahead-list", id: listId, role: "listbox" }, this.filterResult.map((item, i) => (h("li", { id: this.getListItemId(i), onMouseDown: _ev => this.handleItemSelected(item), onMouseOver: _ev => this.handleItemHovered(i), "aria-selected": i === this.selectedItemIndex, role: "option", tabindex: "-1", "aria-posinset": i + 1, "aria-setsize": this.filterResult.length }, item)))))) : null, h("slot", { key: '52fb739eff8fe71caa9e39ae6add139cbb4db1a7' })));
198
- }
199
- get el() { return this; }
200
- static get style() { return AdmiraltyTypeAheadStyle0; }
201
- }, [6, "admiralty-type-ahead", {
202
- "value": [1],
203
- "label": [1],
204
- "hint": [1],
205
- "placeholder": [1],
206
- "resultsOnInitFocus": [4, "results-on-init-focus"],
207
- "filterResult": [32]
208
- }]);
209
- let id = 0;
210
- function defineCustomElement$1() {
211
- if (typeof customElements === "undefined") {
212
- return;
213
- }
214
- const components = ["admiralty-type-ahead", "admiralty-hint", "admiralty-icon", "admiralty-input", "admiralty-input-invalid", "admiralty-label"];
215
- components.forEach(tagName => { switch (tagName) {
216
- case "admiralty-type-ahead":
217
- if (!customElements.get(tagName)) {
218
- customElements.define(tagName, TypeAheadComponent);
219
- }
220
- break;
221
- case "admiralty-hint":
222
- if (!customElements.get(tagName)) {
223
- defineCustomElement$6();
224
- }
225
- break;
226
- case "admiralty-icon":
227
- if (!customElements.get(tagName)) {
228
- defineCustomElement$5();
229
- }
230
- break;
231
- case "admiralty-input":
232
- if (!customElements.get(tagName)) {
233
- defineCustomElement$4();
234
- }
235
- break;
236
- case "admiralty-input-invalid":
237
- if (!customElements.get(tagName)) {
238
- defineCustomElement$3();
239
- }
240
- break;
241
- case "admiralty-label":
242
- if (!customElements.get(tagName)) {
243
- defineCustomElement$2();
244
- }
245
- break;
246
- } });
247
- }
248
-
249
- const AdmiraltyTypeAhead = TypeAheadComponent;
250
- const defineCustomElement = defineCustomElement$1;
251
-
252
- export { AdmiraltyTypeAhead, defineCustomElement };
253
-
254
- //# sourceMappingURL=admiralty-type-ahead.js.map
@@ -1 +0,0 @@
1
- {"file":"admiralty-type-ahead.js","mappings":";;;;;;;;AAAA,MAAM,YAAY,GAAG,+qEAA+qE,CAAC;AACrsE,iCAAe,YAAY;;MCOd,kBAAkB;;;;;;QACrB,eAAU,GAAG,EAAE,EAAE,CAAC;QAS1B,eAAU,GAAkB,EAAE,CAAC;QAE/B,sBAAiB,GAAG,CAAC,CAAC,CAAC;QACvB,cAAS,GAAG,KAAK,CAAC;QAElB,eAAU,GAAG,KAAK,CAAC;QACnB,6BAAwB,GAAG,KAAK,CAAC;QAKzB,mBAAc,GAAG,EAAE,CAAC;QACpB,8BAAyB,GAAG,KAAK,CAAC;4BAdR,IAAI,KAAK,EAAU;;;;;kCA+Cf,KAAK;;IA/B3C,IAAY,UAAU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,EAAE,EAAE,MAAM,EAAE,IAAI,EAAC,SAAS,IAClD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,MAC7B,UACE,EAAE,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EACzB,WAAW,EAAE,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EACjD,WAAW,EAAE,GAAG,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAC9B,CAAC,KAAK,IAAI,CAAC,iBAAiB,EAC3C,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAC,IAAI,mBACE,CAAC,GAAG,CAAC,kBACN,IAAI,CAAC,YAAY,CAAC,MAAM,IAErC,IAAI,CACF,CACN,CAAC,CACC,CACD,IACJ,IAAI,EACR,8DAAa,CACR,EACP;KACH;;;;;;;;;;;AAGH,IAAI,EAAE,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/type-ahead/type-ahead.scss?tag=admiralty-type-ahead&encapsulation=scoped","src/components/type-ahead/type-ahead.tsx"],"sourcesContent":["@import 'type-ahead.vars';\n\n* {\n margin: 0px;\n padding: 0px;\n}\n\n.text-input-wrap {\n height: auto !important;\n}\n\n.filterTextInput {\n width: 100%;\n}\n\n.typeahead-list-container {\n position: relative;\n\n .typeahead-list {\n position: absolute;\n left: 0px;\n top: -24px;\n background-color: $type-ahead-background-colour;\n width: 100%;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n border: 2px solid $type-ahead-border-colour;\n border-top: none;\n box-sizing: border-box;\n max-height: 180px;\n overflow-y: auto;\n z-index: 1;\n list-style: none;\n\n li {\n cursor: pointer;\n transform: unset !important;\n padding: 6px;\n min-height: 24px;\n margin: 0;\n }\n\n li:before {\n content: none;\n }\n\n li.highlighted {\n background-color: $type-ahead-highlighted-background-colour;\n color: $type-ahead-highlighted-text-colour;\n }\n }\n}\n","import { Component, EventEmitter, Host, Prop, Event, h, State, Element, forceUpdate } from '@stencil/core';\nimport { Keys } from '../Keys';\n\n@Component({\n tag: 'admiralty-type-ahead',\n styleUrl: 'type-ahead.scss',\n scoped: true,\n})\nexport class TypeAheadComponent {\n private internalId = ++id;\n\n @Element() el: HTMLElement;\n\n listContainer!: HTMLDivElement;\n inputControl!: HTMLAdmiraltyInputElement;\n\n @State() filterResult: string[] = new Array<string>();\n\n filterList: Array<string> = [];\n\n selectedItemIndex = -1;\n isFocused = false;\n\n isSilenced = false;\n isAlternateStatusSection = false;\n statusText: string;\n\n private mutation: MutationObserver;\n\n private originalSearch = '';\n private hasBeenFocusedAtLeastOnce = false;\n\n private get inputValue() {\n return this.inputControl.value.toString();\n }\n\n private set inputValue(value: string) {\n this.inputControl.value = value;\n }\n\n /**\n * The value of the textinput\n */\n @Prop() value: string;\n\n /**\n * The text content of the label for the input box\n */\n @Prop() label: string;\n\n /**\n * The hint which will be used under the label to describe the input.\n */\n @Prop() hint: string;\n\n /**\n * The placeholder text for the input field\n */\n @Prop() placeholder: string;\n\n /**\n * Optional property to show results when input box is initally focused\n */\n @Prop() resultsOnInitFocus: boolean = false;\n\n /**\n * Optional function that will be executed when the user selects an item from the typeahead\n */\n @Event() selectionChanged: EventEmitter<string>;\n\n /**\n * Event that is fired whenever the value of the typeahead changes\n * e.g. selection from the dropdown or manually typed entry\n */\n @Event() valueChanged: EventEmitter<string>;\n\n componentDidLoad() {\n if (this.value) {\n this.inputValue = this.value;\n }\n }\n\n connectedCallback() {\n this.mutation = new MutationObserver(() => {\n this.populateFilterList();\n forceUpdate(this);\n });\n this.mutation.observe(this.el, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n if (this.mutation) {\n this.mutation.disconnect();\n this.mutation = undefined;\n }\n }\n\n populateFilterList() {\n const slotItems = this.el.querySelectorAll('admiralty-type-ahead-item');\n this.filterList = [];\n slotItems.forEach(el => {\n this.filterList.push(el.getAttribute('value'));\n });\n }\n\n handleFocusIn() {\n if (this.resultsOnInitFocus && !this.hasBeenFocusedAtLeastOnce) {\n this.performFilter('');\n this.hasBeenFocusedAtLeastOnce = true;\n }\n\n this.isFocused = true;\n this.isSilenced = false;\n }\n\n handleFocusOut() {\n this.isFocused = false;\n this.statusText = null;\n this.isSilenced = true;\n }\n\n private textChanged(value: string): void {\n this.originalSearch = value;\n this.performFilter(value);\n this.isSilenced = false;\n this.valueChanged.emit(value);\n }\n\n handleKeyPressed(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n\n if (event.key === Keys.UP_ARROW || event.key === Keys.DOWN_ARROW) {\n this.navigateSuggestions(event.key);\n this.updateScroll();\n } else if (event.key !== Keys.ENTER) {\n this.textChanged(this.inputValue);\n this.selectCurrentItem();\n }\n }\n\n handleKeyDown(event: KeyboardEvent): void {\n event.stopImmediatePropagation();\n\n if (event.key === Keys.TAB || event.key === Keys.ENTER) {\n this.selectCurrentItem();\n }\n }\n\n handleItemSelected(value: string): void {\n this.inputValue = value;\n this.textChanged(value);\n this.filterResult = new Array<string>();\n this.selectionChanged.emit(value);\n }\n\n private performFilter(value: string) {\n const filter = (filterList: string[], text: string) => {\n const filterResult = filterList.filter(value => {\n return text === null || text.length < 1 || value.toLowerCase().indexOf(text.toLowerCase()) > -1;\n });\n return filterResult;\n };\n\n this.filterResult = filter(this.filterList, value);\n\n this.selectedItemIndex = -1;\n }\n\n private addHighlight() {\n if (this.selectedItemIndex > -1) {\n const listItem = this.el.querySelector(`#${this.getListItemId(this.selectedItemIndex)}`);\n listItem.classList.add('highlighted');\n }\n }\n\n private removeHighlight(i: number) {\n if (i > -1) {\n const listItem = this.el.querySelector(`#${this.getListItemId(i)}`);\n listItem.classList.remove('highlighted');\n }\n }\n\n private selectCurrentItem(): void {\n if (this.selectedItemIndex >= 0) {\n const selectedItemText = this.filterResult[this.selectedItemIndex];\n this.handleItemSelected(selectedItemText);\n }\n }\n\n handleItemHovered(index: number): void {\n this.removeHighlight(this.selectedItemIndex);\n this.selectedItemIndex = index;\n this.addHighlight();\n }\n\n handleComponentFocusOut() {\n // Ensure dropdown closed on clicking or tabbing away from this component\n if (this.filterResult?.length > 0) {\n this.filterResult = new Array<string>();\n this.hasBeenFocusedAtLeastOnce = false;\n }\n }\n\n /**\n * Check if the selected option is in view, and scroll if not\n */\n private updateScroll() {\n const container = this.listContainer;\n\n const ul = container.querySelector('ul');\n const selectedItem: any = Array.from(ul.childNodes).find((item: any) => item.ariaPosInSet === `${this.selectedItemIndex + 1}`);\n\n if (container && selectedItem && container.scrollHeight + container.clientHeight) {\n selectedItem.scrollIntoView();\n }\n }\n\n private navigateSuggestions(key: Keys) {\n if (key === Keys.UP_ARROW) {\n this.removeHighlight(this.selectedItemIndex);\n this.selectedItemIndex--;\n if (this.selectedItemIndex === -2) {\n this.selectedItemIndex = this.filterResult.length - 1;\n }\n }\n if (key === Keys.DOWN_ARROW) {\n this.removeHighlight(this.selectedItemIndex);\n this.selectedItemIndex++;\n if (this.selectedItemIndex > this.filterResult.length - 1) {\n this.selectedItemIndex = -1;\n }\n }\n if (this.selectedItemIndex === -1) {\n this.inputValue = this.originalSearch;\n } else {\n const value = this.filterResult[this.selectedItemIndex];\n\n this.inputValue = value;\n\n this.addHighlight();\n }\n }\n\n private getListItemId(i: number) {\n const id = this.getId();\n return `${id}-list-item-${i}`;\n }\n\n private getId() {\n return this.el.id != '' ? this.el.id : `admiralty-typeahead-${this.internalId}`;\n }\n\n render() {\n const id = this.getId();\n const inputId = `${id}-input`;\n const hintId = `${id}-assistive-hint`;\n const listId = `${id}-list`;\n\n return (\n <Host onFocusout={_ev => this.handleComponentFocusOut()}>\n <div class=\"visually-hidden\">\n <div class=\"results-status-a\" role=\"status\" aria-atomic=\"true\" aria-live=\"polite\">\n {!this.isSilenced && this.isAlternateStatusSection ? this.statusText : ''}\n </div>\n <div class=\"results-status-b\" role=\"status\" aria-atomic=\"true\" aria-live=\"polite\">\n {!this.isSilenced && !this.isAlternateStatusSection ? this.statusText : ''}\n </div>\n </div>\n <admiralty-input\n type=\"text\"\n ref={el => (this.inputControl = el)}\n id={inputId}\n label={this.label}\n hint={this.hint}\n placeholder={this.placeholder}\n class=\"filterTextInput\"\n onKeyUp={ev => this.handleKeyPressed(ev)}\n onKeyDown={ev => this.handleKeyDown(ev)}\n onFocusin={_ev => this.handleFocusIn()}\n onFocusout={_ev => this.handleFocusOut()}\n aria-expanded={this.isFocused && this.filterResult.length > 0}\n ></admiralty-input>\n\n <span id={hintId} class=\"visually-hidden\">\n When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.\n </span>\n {this.filterResult.length > 0 ? (\n <div class=\"typeahead-list-container\" ref={el => (this.listContainer = el)}>\n <ul class=\"typeahead-list\" id={listId} role=\"listbox\">\n {this.filterResult.map((item, i) => (\n <li\n id={this.getListItemId(i)}\n onMouseDown={_ev => this.handleItemSelected(item)}\n onMouseOver={_ev => this.handleItemHovered(i)}\n aria-selected={i === this.selectedItemIndex}\n role=\"option\"\n tabindex=\"-1\"\n aria-posinset={i + 1}\n aria-setsize={this.filterResult.length}\n >\n {item}\n </li>\n ))}\n </ul>\n </div>\n ) : null}\n <slot></slot>\n </Host>\n );\n }\n}\n\nlet id = 0;\n"],"version":3}
@@ -1,125 +0,0 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-7dd465c9.js';
2
- import { d as defineCustomElement$4 } from './p-8ccb8247.js';
3
- import { d as defineCustomElement$3 } from './p-91d406aa.js';
4
- import { d as defineCustomElement$2 } from './p-8c6a193a.js';
5
- import { d as defineCustomElement$1 } from './p-09a69305.js';
6
-
7
- const inputCss = ".visually-hidden.sc-admiralty-input:not(:focus):not(:active){position:absolute !important;width:1px !important;height:1px !important;margin:0 !important;padding:0 !important;overflow:hidden !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;border:0 !important;white-space:nowrap !important}@media (max-width: 1023px){.desktop-only.sc-admiralty-input{display:none}}@media (min-width: 1024px){.not-desktop.sc-admiralty-input{display:none}}@media (min-width: 1024px){.tablet-only.sc-admiralty-input{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-only.sc-admiralty-input{display:none}}@media (max-width: 479px) and (min-width: 0px){.tablet-or-desktop.sc-admiralty-input{display:none}}@media (min-width: 1024px){.phone-or-tablet.sc-admiralty-input{display:none}}@media (min-width: 1024px){.phone-only.sc-admiralty-input{display:none}}@media (max-width: 1023px) and (min-width: 480px){.phone-only.sc-admiralty-input{display:none}}.text-input-container.sc-admiralty-input{display:flex;flex-direction:column}.text-input-container.sc-admiralty-input input.sc-admiralty-input{background-color:var(--admiralty-background-colour);border-color:var(--admiralty-text-colour);border-width:2px;border-style:solid;color:var(--admiralty-text-colour);font-size:var(--admiralty-input-font-size, var(--admiralty-font-size-0));line-height:24px;font-weight:var(--admiralty-input-font-weight, var(--admiralty-font-weight-normal));padding:12px}.text-input-container.sc-admiralty-input input.sc-admiralty-input:focus{outline-offset:unset;outline:3px solid var(--admiralty-focus-colour);box-shadow:var(--admiralty-text-colour) inset 0 0 0 2px}.text-input-container.sc-admiralty-input input.invalid.sc-admiralty-input{border-color:var(--admiralty-colour-danger)}.text-input-container.sc-admiralty-input input.invalid.sc-admiralty-input:focus-visible{border-color:unset;outline:3px solid var(--admiralty-focus-colour)}.text-input-container.sc-admiralty-input input.disabled.sc-admiralty-input{color:var(--admiralty-disabled-colour);border-color:var(--admiralty-disabled-colour);background:var(--admiralty-background-colour)}.text-input-container.sc-admiralty-input admiralty-input-invalid.sc-admiralty-input{margin-top:6px}";
8
- const AdmiraltyInputStyle0 = inputCss;
9
-
10
- const InputComponent = /*@__PURE__*/ proxyCustomElement(class InputComponent extends H {
11
- constructor() {
12
- super();
13
- this.__registerHost();
14
- this.admiraltyInput = createEvent(this, "admiraltyInput", 7);
15
- this.admiraltyFocus = createEvent(this, "admiraltyFocus", 7);
16
- this.admiraltyBlur = createEvent(this, "admiraltyBlur", 7);
17
- this.internalId = ++nextId;
18
- this.onInput = (ev) => {
19
- const input = ev.target;
20
- if (input) {
21
- this.value = input.value || '';
22
- }
23
- };
24
- this.onBlur = (ev) => {
25
- this.admiraltyBlur.emit(ev);
26
- };
27
- this.onFocus = (ev) => {
28
- this.admiraltyFocus.emit(ev);
29
- };
30
- this.name = undefined;
31
- this.label = undefined;
32
- this.hint = undefined;
33
- this.disabled = false;
34
- this.type = 'text';
35
- this.placeholder = undefined;
36
- this.width = undefined;
37
- this.required = false;
38
- this.invalid = false;
39
- this.invalidMessage = undefined;
40
- this.autocomplete = 'off';
41
- this.value = '';
42
- }
43
- /**
44
- * Update the native input element when the value changes
45
- */
46
- valueChanged() {
47
- const nativeInput = this.nativeInput;
48
- const value = this.getValue();
49
- if (nativeInput && nativeInput.value !== value) {
50
- nativeInput.value = value;
51
- }
52
- this.admiraltyInput.emit({ value: this.value == null ? this.getValue() : this.value.toString() });
53
- }
54
- getValue() {
55
- return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();
56
- }
57
- render() {
58
- const value = this.getValue();
59
- const id = this.el.id != '' ? this.el.id : `admiralty-input-${this.internalId}`;
60
- const inputId = `${id}-input`;
61
- const hintId = `${id}-hint`;
62
- const errorId = `${id}-error`;
63
- return (h("div", { key: '8331b75bcdebf5e7881f3e89a6ff1afc07a2f247', class: "text-input-container" }, this.label ? (h("admiralty-label", { disabled: this.disabled, for: inputId }, this.label)) : null, this.hint ? (h("admiralty-hint", { id: hintId, disabled: this.disabled }, this.hint)) : null, h("input", { key: 'eef1a12e80d073e63c2452924ff1cf513943db13', ref: input => (this.nativeInput = input), class: { disabled: this.disabled, invalid: this.invalid }, disabled: this.disabled, id: inputId, name: this.name, type: this.type, value: value, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur, placeholder: this.placeholder, autoComplete: this.autocomplete, required: this.required, style: {
64
- maxWidth: this.width ? `${this.width}px` : null,
65
- }, "aria-invalid": this.invalid ? 'true' : 'false', "aria-describedby": (this.hint ? hintId : '') + ' ' + (this.invalid ? errorId : '') }), h("admiralty-input-invalid", { key: 'f571590d72b3ac40bff045a523dd60e017385bb9', id: errorId, style: Object.assign({}, (!(this.invalid && this.invalidMessage) ? { display: 'none' } : {})) }, this.invalidMessage)));
66
- }
67
- get el() { return this; }
68
- static get watchers() { return {
69
- "value": ["valueChanged"]
70
- }; }
71
- static get style() { return AdmiraltyInputStyle0; }
72
- }, [2, "admiralty-input", {
73
- "name": [1],
74
- "label": [1],
75
- "hint": [1],
76
- "disabled": [4],
77
- "type": [1],
78
- "placeholder": [1],
79
- "width": [2],
80
- "required": [4],
81
- "invalid": [4],
82
- "invalidMessage": [1, "invalid-message"],
83
- "autocomplete": [1],
84
- "value": [1032]
85
- }, undefined, {
86
- "value": ["valueChanged"]
87
- }]);
88
- let nextId = 0;
89
- function defineCustomElement() {
90
- if (typeof customElements === "undefined") {
91
- return;
92
- }
93
- const components = ["admiralty-input", "admiralty-hint", "admiralty-icon", "admiralty-input-invalid", "admiralty-label"];
94
- components.forEach(tagName => { switch (tagName) {
95
- case "admiralty-input":
96
- if (!customElements.get(tagName)) {
97
- customElements.define(tagName, InputComponent);
98
- }
99
- break;
100
- case "admiralty-hint":
101
- if (!customElements.get(tagName)) {
102
- defineCustomElement$4();
103
- }
104
- break;
105
- case "admiralty-icon":
106
- if (!customElements.get(tagName)) {
107
- defineCustomElement$3();
108
- }
109
- break;
110
- case "admiralty-input-invalid":
111
- if (!customElements.get(tagName)) {
112
- defineCustomElement$2();
113
- }
114
- break;
115
- case "admiralty-label":
116
- if (!customElements.get(tagName)) {
117
- defineCustomElement$1();
118
- }
119
- break;
120
- } });
121
- }
122
-
123
- export { InputComponent as I, defineCustomElement as d };
124
-
125
- //# sourceMappingURL=p-1a2059bb.js.map
@@ -1 +0,0 @@
1
- {"file":"p-1a2059bb.js","mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,wuEAAwuE,CAAC;AAC1vE,6BAAe,QAAQ;;MCcV,cAAc;;;;;;;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AI,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,sBAC3B,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,EAAE,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,GAAG,OAAO,GAAG,EAAE,CAAC,GACjF,EACF,gFAAyB,EAAE,EAAE,OAAO,EAAE,KAAK,qBAAQ,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MACjH,IAAI,CAAC,cAAc,CACI,CACtB,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;AAGH,IAAI,MAAM,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/input.scss?tag=admiralty-input&encapsulation=scoped","src/components/input/input.tsx"],"sourcesContent":["@import 'inputs.vars';\n\n.text-input-container {\n display: flex;\n flex-direction: column;\n\n input {\n background-color: $input-background-colour;\n border-color: $input-border-colour;\n border-width: 2px;\n border-style: solid;\n color: $input-text-colour;\n font-size: $input-text-size;\n line-height: 24px;\n font-weight: $input-text-weight;\n\n padding: 12px;\n\n &:focus {\n outline-offset: unset;\n outline: 3px solid $input-focus-colour;\n box-shadow: $input-border-colour inset 0 0 0 2px;\n }\n\n &.invalid {\n border-color: $input-error-border-colour;\n\n &:focus-visible {\n border-color: unset;\n outline: 3px solid $input-focus-colour;\n }\n }\n\n &.disabled {\n color: $input-disabled-text-colour;\n border-color: $input-disabled-border-colour;\n background: $input-background-colour;\n }\n }\n\n admiralty-input-invalid {\n margin-top: 6px;\n }\n}\n","import { Component, ComponentInterface, Element, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\nimport { InputChangeEventDetail } from './input.interface';\n\n/**\n * Once this component works, review whether a form field component should be created so\n * that shared properties such as `label`, `hint`, `disabled` etc. can be defined once.\n * Examples of similar components that can extend that base component are area, select\n * and checkbox.\n */\n\n@Component({\n tag: 'admiralty-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class InputComponent implements ComponentInterface {\n private internalId = ++nextId;\n private nativeInput?: HTMLInputElement;\n\n @Element() el!: HTMLElement;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string;\n\n /**\n * The label which will be used above the input to describe the input.\n */\n @Prop() label: string;\n\n /**\n * The hint which will be used under the label to describe the input.\n */\n @Prop() hint: string;\n\n /**\n * This dictates whether the form field is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The input type, options are: text; number; date; time; email; password; tel; url\n */\n @Prop() type: 'text' | 'number' | 'date' | 'time' | 'email' | 'password' | 'tel' | 'url' = 'text';\n\n /**\n * The placeholder text to show in the input\n */\n @Prop() placeholder: string;\n\n /**\n * The maximum width for the input field.\n */\n @Prop() width: number;\n\n /**\n * This dictates whether the input is required or not\n */\n @Prop() required: boolean = false;\n\n /**\n * Whether to show the input in an invalid state\n */\n @Prop() invalid: boolean = false;\n\n /**\n * The message to show when the input is invalid\n */\n @Prop() invalidMessage: string;\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: string = 'off';\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | number | null = '';\n\n /**\n * Emitted when the value has changed.\n */\n @Event() admiraltyInput: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input gains focus.\n */\n @Event() admiraltyFocus: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() admiraltyBlur: EventEmitter<FocusEvent>;\n\n /**\n * Update the native input element when the value changes\n */\n\n @Watch('value')\n protected valueChanged() {\n const nativeInput = this.nativeInput;\n const value = this.getValue();\n if (nativeInput && nativeInput.value !== value) {\n nativeInput.value = value;\n }\n this.admiraltyInput.emit({ value: this.value == null ? this.getValue() : this.value.toString() });\n }\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (input) {\n this.value = input.value || '';\n }\n };\n\n private getValue(): string {\n return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.admiraltyBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.admiraltyFocus.emit(ev);\n };\n\n render() {\n const value = this.getValue();\n const id = this.el.id != '' ? this.el.id : `admiralty-input-${this.internalId}`;\n const inputId = `${id}-input`;\n const hintId = `${id}-hint`;\n const errorId = `${id}-error`;\n\n return (\n <div class=\"text-input-container\">\n {this.label ? (\n <admiralty-label disabled={this.disabled} for={inputId}>\n {this.label}\n </admiralty-label>\n ) : null}\n {this.hint ? (\n <admiralty-hint id={hintId} disabled={this.disabled}>\n {this.hint}\n </admiralty-hint>\n ) : null}\n <input\n ref={input => (this.nativeInput = input)}\n class={{ disabled: this.disabled, invalid: this.invalid }}\n disabled={this.disabled}\n id={inputId}\n name={this.name}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n placeholder={this.placeholder}\n autoComplete={this.autocomplete}\n required={this.required}\n style={{\n maxWidth: this.width ? `${this.width}px` : null,\n }}\n aria-invalid={this.invalid ? 'true' : 'false'}\n aria-describedby={(this.hint ? hintId : '') + ' ' + (this.invalid ? errorId : '')}\n />\n <admiralty-input-invalid id={errorId} style={{ ...(!(this.invalid && this.invalidMessage) ? { display: 'none' } : {}) }}>\n {this.invalidMessage}\n </admiralty-input-invalid>\n </div>\n );\n }\n}\n\nlet nextId = 0;\n"],"version":3}
@@ -1,16 +0,0 @@
1
- var Keys;
2
- (function (Keys) {
3
- Keys["UP_ARROW"] = "ArrowUp";
4
- Keys["DOWN_ARROW"] = "ArrowDown";
5
- Keys["LEFT_ARROW"] = "ArrowLeft";
6
- Keys["RIGHT_ARROW"] = "ArrowRight";
7
- Keys["ENTER"] = "Enter";
8
- Keys["TAB"] = "Tab";
9
- Keys["HOME"] = "Home";
10
- Keys["END"] = "End";
11
- Keys["SPACE"] = " ";
12
- })(Keys || (Keys = {}));
13
-
14
- export { Keys as K };
15
-
16
- //# sourceMappingURL=p-a4bd6904.js.map
@@ -1 +0,0 @@
1
- {"file":"p-a4bd6904.js","mappings":"IAAY;AAAZ,WAAY,IAAI;IACd,4BAAoB,CAAA;IACpB,gCAAwB,CAAA;IACxB,gCAAwB,CAAA;IACxB,kCAA0B,CAAA;IAC1B,uBAAe,CAAA;IACf,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,mBAAW,CAAA;IACX,mBAAW,CAAA;AACb,CAAC,EAVW,IAAI,KAAJ,IAAI;;;;","names":[],"sources":["src/components/Keys.ts"],"sourcesContent":["export enum Keys {\n UP_ARROW = 'ArrowUp',\n DOWN_ARROW = 'ArrowDown',\n LEFT_ARROW = 'ArrowLeft',\n RIGHT_ARROW = 'ArrowRight',\n ENTER = 'Enter',\n TAB = 'Tab',\n HOME = 'Home',\n END = 'End',\n SPACE = ' '\n}\n"],"version":3}
@@ -1,16 +0,0 @@
1
- var Keys;
2
- (function (Keys) {
3
- Keys["UP_ARROW"] = "ArrowUp";
4
- Keys["DOWN_ARROW"] = "ArrowDown";
5
- Keys["LEFT_ARROW"] = "ArrowLeft";
6
- Keys["RIGHT_ARROW"] = "ArrowRight";
7
- Keys["ENTER"] = "Enter";
8
- Keys["TAB"] = "Tab";
9
- Keys["HOME"] = "Home";
10
- Keys["END"] = "End";
11
- Keys["SPACE"] = " ";
12
- })(Keys || (Keys = {}));
13
-
14
- export { Keys as K };
15
-
16
- //# sourceMappingURL=Keys-acfce4b9.js.map
@@ -1 +0,0 @@
1
- {"file":"Keys-acfce4b9.js","mappings":"IAAY;AAAZ,WAAY,IAAI;IACd,4BAAoB,CAAA;IACpB,gCAAwB,CAAA;IACxB,gCAAwB,CAAA;IACxB,kCAA0B,CAAA;IAC1B,uBAAe,CAAA;IACf,mBAAW,CAAA;IACX,qBAAa,CAAA;IACb,mBAAW,CAAA;IACX,mBAAW,CAAA;AACb,CAAC,EAVW,IAAI,KAAJ,IAAI;;;;","names":[],"sources":["src/components/Keys.ts"],"sourcesContent":["export enum Keys {\n UP_ARROW = 'ArrowUp',\n DOWN_ARROW = 'ArrowDown',\n LEFT_ARROW = 'ArrowLeft',\n RIGHT_ARROW = 'ArrowRight',\n ENTER = 'Enter',\n TAB = 'Tab',\n HOME = 'Home',\n END = 'End',\n SPACE = ' '\n}\n"],"version":3}
@@ -1,19 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-60c25452.js';
2
-
3
- const typeAheadItemCss = ".sc-admiralty-type-ahead-item-h{display:block}";
4
- const AdmiraltyTypeAheadItemStyle0 = typeAheadItemCss;
5
-
6
- const AdmiraltyTypeAheadItem = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.value = undefined;
10
- }
11
- render() {
12
- return h(Host, { key: 'b6ccf51ad68ce75c2c5e9670d1d8bb407cdc2ca8', value: this.value });
13
- }
14
- };
15
- AdmiraltyTypeAheadItem.style = AdmiraltyTypeAheadItemStyle0;
16
-
17
- export { AdmiraltyTypeAheadItem as admiralty_type_ahead_item };
18
-
19
- //# sourceMappingURL=admiralty-type-ahead-item.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"admiralty-type-ahead-item.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,gDAAgD,CAAC;AAC1E,qCAAe,gBAAgB;;MCMlB,sBAAsB;;;;;IAGjC,MAAM;QACJ,OAAO,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAS,CAAC;KACzC;;;;;;","names":[],"sources":["src/components/type-ahead-item/type-ahead-item.scss?tag=admiralty-type-ahead-item&encapsulation=scoped","src/components/type-ahead-item/type-ahead-item.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'admiralty-type-ahead-item',\n styleUrl: 'type-ahead-item.scss',\n scoped: true,\n})\nexport class AdmiraltyTypeAheadItem {\n @Prop() value: string;\n\n render() {\n return <Host value={this.value}></Host>;\n }\n}\n"],"version":3}