@nanoporetech-digital/components 8.0.0-alpha.2 → 8.0.0-alpha.4

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 (182) hide show
  1. package/dist/cjs/{fade-C3xL9ihU.js → fade-Dt8ydSYD.js} +1 -1
  2. package/dist/cjs/{fullscreen-pHBD1-3e.js → fullscreen-D_o31hdQ.js} +1 -1
  3. package/dist/cjs/index-IR1lkhwT.js +6 -6
  4. package/dist/cjs/{lazyload-D2pj9J7r.js → lazyload-obUQkoFT.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/nano-avatar_5.cjs.entry.js +7 -7
  7. package/dist/cjs/nano-breadcrumb.cjs.entry.js +2 -2
  8. package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +2 -2
  9. package/dist/cjs/nano-components.cjs.js +1 -1
  10. package/dist/cjs/nano-cta.cjs.entry.js +2 -1
  11. package/dist/cjs/{nano-data-table-BkyqQiTG.js → nano-data-table-Zj71h_Hm.js} +8 -5
  12. package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
  13. package/dist/cjs/nano-datalist_3.cjs.entry.js +8 -8
  14. package/dist/cjs/nano-file-upload.cjs.entry.js +48 -29
  15. package/dist/cjs/nano-footer.cjs.entry.js +3 -3
  16. package/dist/cjs/nano-global-nav.cjs.entry.js +10 -10
  17. package/dist/cjs/nano-grid_2.cjs.entry.js +3 -3
  18. package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
  19. package/dist/cjs/nano-progress-bar.cjs.entry.js +3 -17
  20. package/dist/cjs/nano-rating.cjs.entry.js +4 -4
  21. package/dist/cjs/{nano-resize-observe_2.cjs.entry.js → nano-resize-observe.cjs.entry.js} +1 -19
  22. package/dist/cjs/nano-slide.cjs.entry.js +1 -1
  23. package/dist/cjs/{nano-slides-B3-XISfn.js → nano-slides-BcdSNmlz.js} +7 -7
  24. package/dist/cjs/nano-slides.cjs.entry.js +1 -1
  25. package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
  26. package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
  27. package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
  28. package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
  29. package/dist/cjs/nano-tab.cjs.entry.js +2 -2
  30. package/dist/cjs/nano-table.cjs.entry.js +2 -2
  31. package/dist/cjs/{page-dots-DHz-mQDL.js → page-dots-CUrSK-1M.js} +1 -1
  32. package/dist/cjs/{style-BccHkuhC.js → style-Bf3iH5GX.js} +16 -2
  33. package/dist/cjs/{table.worker-NnDnfSFs.js → table.worker-D7-NI7ZI.js} +1 -1
  34. package/dist/collection/collection-manifest.json +0 -1
  35. package/dist/collection/components/breadcrumb/breadcrumb.css +2 -125
  36. package/dist/collection/components/breadcrumb/breadcrumb.js +3 -2
  37. package/dist/collection/components/collapsible-comparison/collapsible-comparison.js +4 -3
  38. package/dist/collection/components/cta/cta.js +2 -1
  39. package/dist/collection/components/data-table/table.css +2 -7
  40. package/dist/collection/components/data-table/table.js +6 -3
  41. package/dist/collection/components/datalist/datalist.js +6 -6
  42. package/dist/collection/components/file-upload/file-upload.css +140 -215
  43. package/dist/collection/components/file-upload/file-upload.js +66 -44
  44. package/dist/collection/components/footer/footer.css +2 -3
  45. package/dist/collection/components/footer/footer.js +4 -3
  46. package/dist/collection/components/global-nav/global-nav.js +12 -11
  47. package/dist/collection/components/img/img.js +3 -3
  48. package/dist/collection/components/progress-bar/progress-bar.css +78 -33
  49. package/dist/collection/components/progress-bar/progress-bar.js +18 -61
  50. package/dist/collection/components/rating/rating.js +4 -4
  51. package/dist/collection/components/resize-observe/resize-observe.js +1 -1
  52. package/dist/collection/components/select/select.js +7 -7
  53. package/dist/collection/components/slides/slide.js +1 -1
  54. package/dist/collection/components/slides/slides.js +3 -3
  55. package/dist/collection/components/sortable/sortable.js +1 -1
  56. package/dist/collection/components/spinner/spinner.js +1 -1
  57. package/dist/collection/components/sticker/sticker.js +2 -2
  58. package/dist/collection/components/table/table.js +2 -2
  59. package/dist/collection/components/tabs/tab-content.js +2 -2
  60. package/dist/collection/components/tabs/tab.js +2 -2
  61. package/dist/collection/components/tag/tag.js +2 -2
  62. package/dist/collection/components/tooltip/tooltip.js +2 -2
  63. package/dist/collection/utils/style.js +16 -2
  64. package/dist/components/cta.js +2 -1
  65. package/dist/components/datalist.js +6 -6
  66. package/dist/components/img.js +5 -11
  67. package/dist/components/nano-breadcrumb.js +4 -3
  68. package/dist/components/nano-collapsible-comparison.js +4 -3
  69. package/dist/components/nano-data-table.js +17 -20
  70. package/dist/components/nano-file-upload.js +58 -33
  71. package/dist/components/nano-footer.js +5 -4
  72. package/dist/components/nano-global-nav.js +12 -11
  73. package/dist/components/nano-hero.js +6 -12
  74. package/dist/components/nano-rating.js +4 -4
  75. package/dist/components/nano-slide.js +1 -1
  76. package/dist/components/nano-sortable.js +1 -1
  77. package/dist/components/nano-tab-content.js +2 -2
  78. package/dist/components/nano-tab.js +2 -2
  79. package/dist/components/nano-table.js +2 -2
  80. package/dist/components/progress-bar.js +7 -23
  81. package/dist/components/resize-observe.js +1 -1
  82. package/dist/components/select.js +7 -7
  83. package/dist/components/slides.js +3 -3
  84. package/dist/components/spinner.js +1 -1
  85. package/dist/components/sticker.js +2 -2
  86. package/dist/components/style.js +16 -2
  87. package/dist/components/tag.js +2 -2
  88. package/dist/components/tooltip.js +2 -2
  89. package/dist/esm/{fade-BTgTGh6q.js → fade-DcRXMf28.js} +1 -1
  90. package/dist/esm/{fullscreen-BTpZyXkc.js → fullscreen-BQyi4GFz.js} +1 -1
  91. package/dist/esm/index-DXvE-U_j.js +6 -6
  92. package/dist/esm/{lazyload-BYoZ43fz.js → lazyload-C00srsFN.js} +1 -1
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/esm/nano-avatar_5.entry.js +7 -7
  95. package/dist/esm/nano-breadcrumb.entry.js +2 -2
  96. package/dist/esm/nano-collapsible-comparison.entry.js +2 -2
  97. package/dist/esm/nano-components.js +1 -1
  98. package/dist/esm/nano-cta.entry.js +2 -1
  99. package/dist/esm/{nano-data-table-DDBCyBmN.js → nano-data-table-wGnglzmF.js} +8 -5
  100. package/dist/esm/nano-data-table.entry.js +1 -1
  101. package/dist/esm/nano-datalist_3.entry.js +8 -8
  102. package/dist/esm/nano-file-upload.entry.js +48 -29
  103. package/dist/esm/nano-footer.entry.js +4 -4
  104. package/dist/esm/nano-global-nav.entry.js +10 -10
  105. package/dist/esm/nano-grid_2.entry.js +3 -3
  106. package/dist/esm/nano-icon_3.entry.js +2 -2
  107. package/dist/esm/nano-progress-bar.entry.js +4 -18
  108. package/dist/esm/nano-rating.entry.js +4 -4
  109. package/dist/esm/{nano-resize-observe_2.entry.js → nano-resize-observe.entry.js} +2 -19
  110. package/dist/esm/nano-slide.entry.js +1 -1
  111. package/dist/esm/{nano-slides-CvZxKg4X.js → nano-slides-g94uYmWm.js} +7 -7
  112. package/dist/esm/nano-slides.entry.js +1 -1
  113. package/dist/esm/nano-sortable.entry.js +1 -1
  114. package/dist/esm/nano-spinner.entry.js +1 -1
  115. package/dist/esm/nano-sticker.entry.js +2 -2
  116. package/dist/esm/nano-tab-content.entry.js +2 -2
  117. package/dist/esm/nano-tab.entry.js +2 -2
  118. package/dist/esm/nano-table.entry.js +2 -2
  119. package/dist/esm/{page-dots-_tkpExQM.js → page-dots-B947EGDd.js} +1 -1
  120. package/dist/esm/{style-BrRDhFfF.js → style-xLaX004n.js} +16 -2
  121. package/dist/esm/{table.worker-webIEBZt.js → table.worker-DQJ9Zgy3.js} +1 -1
  122. package/dist/nano-components/{fade-BTgTGh6q.js → fade-DcRXMf28.js} +1 -1
  123. package/dist/nano-components/{fullscreen-BTpZyXkc.js → fullscreen-BQyi4GFz.js} +1 -1
  124. package/dist/nano-components/{lazyload-BYoZ43fz.js → lazyload-C00srsFN.js} +1 -1
  125. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  126. package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
  127. package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
  128. package/dist/nano-components/nano-components.css +149 -19
  129. package/dist/nano-components/nano-components.esm.js +1 -1
  130. package/dist/nano-components/nano-cta.entry.js +1 -1
  131. package/dist/nano-components/{nano-data-table-DDBCyBmN.js → nano-data-table-wGnglzmF.js} +1 -1
  132. package/dist/nano-components/nano-data-table.entry.js +1 -1
  133. package/dist/nano-components/nano-datalist_3.entry.js +1 -1
  134. package/dist/nano-components/nano-file-upload.entry.js +1 -1
  135. package/dist/nano-components/nano-footer.entry.js +1 -1
  136. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  137. package/dist/nano-components/nano-grid_2.entry.js +1 -1
  138. package/dist/nano-components/nano-icon_3.entry.js +1 -1
  139. package/dist/nano-components/nano-progress-bar.entry.js +1 -1
  140. package/dist/nano-components/nano-rating.entry.js +1 -1
  141. package/dist/nano-components/nano-resize-observe.entry.js +4 -0
  142. package/dist/nano-components/nano-slide.entry.js +1 -1
  143. package/dist/nano-components/{nano-slides-CvZxKg4X.js → nano-slides-g94uYmWm.js} +3 -3
  144. package/dist/nano-components/nano-slides.entry.js +1 -1
  145. package/dist/nano-components/nano-sortable.entry.js +1 -1
  146. package/dist/nano-components/nano-spinner.entry.js +1 -1
  147. package/dist/nano-components/nano-sticker.entry.js +1 -1
  148. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  149. package/dist/nano-components/nano-tab.entry.js +1 -1
  150. package/dist/nano-components/nano-table.entry.js +1 -1
  151. package/dist/nano-components/{page-dots-_tkpExQM.js → page-dots-B947EGDd.js} +1 -1
  152. package/dist/nano-components/style-xLaX004n.js +4 -0
  153. package/dist/nano-components/{table.worker-webIEBZt.js → table.worker-DQJ9Zgy3.js} +1 -1
  154. package/dist/style/components.css +1 -1
  155. package/dist/style/components.css.map +1 -1
  156. package/dist/style/core.css +1 -1
  157. package/dist/style/core.css.map +1 -1
  158. package/dist/style/dark.css +1 -1
  159. package/dist/style/dark.css.map +1 -1
  160. package/dist/style/light.css +1 -1
  161. package/dist/style/light.css.map +1 -1
  162. package/dist/style/nano.css +1 -1
  163. package/dist/style/nano.css.map +1 -1
  164. package/dist/types/components/collapsible-comparison/collapsible-comparison.d.ts +1 -1
  165. package/dist/types/components/file-upload/file-upload.d.ts +14 -9
  166. package/dist/types/components/progress-bar/progress-bar.d.ts +6 -13
  167. package/dist/types/components.d.ts +43 -96
  168. package/docs-json.json +111 -261
  169. package/docs-vscode.json +16 -22
  170. package/hydrate/index.js +130 -212
  171. package/hydrate/index.mjs +130 -212
  172. package/package.json +3 -3
  173. package/dist/collection/components/file-upload/file-upload-list.js +0 -3
  174. package/dist/collection/components/skeleton/skeleton.css +0 -83
  175. package/dist/collection/components/skeleton/skeleton.js +0 -57
  176. package/dist/components/nano-skeleton.d.ts +0 -11
  177. package/dist/components/nano-skeleton.js +0 -9
  178. package/dist/components/skeleton.js +0 -41
  179. package/dist/nano-components/nano-resize-observe_2.entry.js +0 -4
  180. package/dist/nano-components/style-BrRDhFfF.js +0 -4
  181. package/dist/types/components/file-upload/file-upload-list.d.ts +0 -0
  182. package/dist/types/components/skeleton/skeleton.d.ts +0 -12
@@ -18,11 +18,14 @@ catch {
18
18
  }
19
19
  }
20
20
  /**
21
- * A better UI experience for `input type="file"` form controls.
21
+ * Enables the selection of files for upload.
22
22
  *
23
- * - Drag and Drop
24
- * - Validation options
25
- * - Preview and manage multiple files
23
+ * @version 1.0.0
24
+ * @status stable
25
+ *
26
+ * @slot label - A label for the file input. If not provided, the `label` prop will be used.
27
+ * @slot helper - A helper text to display below the input.
28
+ * @slot - The default slot can be used to add additional content, such as instructions or a message.
26
29
  */
27
30
  export class FileUpload {
28
31
  inputEl;
@@ -59,12 +62,18 @@ export class FileUpload {
59
62
  capture;
60
63
  /** The maximum file size allowed per file (Megabytes) */
61
64
  maxFileSize = 1;
62
- /** The maximum file size allowed per file (bytes). */
65
+ /** The maximum number of files that can be selected. Defaults to 1 */
63
66
  maxFiles = 1;
67
+ _label = '';
64
68
  /** String to place within a label element. */
65
- label;
69
+ get label() {
70
+ return this.required && !this._label.endsWith('*') ? this._label + ' *' : this._label;
71
+ }
72
+ set label(value) {
73
+ this._label = value;
74
+ }
66
75
  /** Placeholder only used within single file uploads. */
67
- placeholder = 'Choose a file...';
76
+ placeholder = 'Choose a file';
68
77
  /** Visually hide the label - but make it accessible. */
69
78
  hideLabel = false;
70
79
  /** If `true`, the user must select a file to upload before submitting a form. */
@@ -73,11 +82,11 @@ export class FileUpload {
73
82
  disabled = false;
74
83
  /** If `true`, a clear icon will appear in the input when there is a value.
75
84
  * Clicking it clears the input. Only used within single file uploads. */
76
- clearInput = false;
85
+ clearable = false;
77
86
  /** Whether to show validation errors underneath input */
78
87
  showInlineError = true;
79
88
  /** When should the field perform validation */
80
- validateOn = 'submit';
89
+ validateOn = 'submitThenDirty';
81
90
  /** The form element to associate with this input (its form owner). Must be the id of a form. */
82
91
  form;
83
92
  shouldValidate() {
@@ -89,7 +98,7 @@ export class FileUpload {
89
98
  this.showInlineValidation();
90
99
  });
91
100
  }
92
- _invalid = false;
101
+ _invalid = null;
93
102
  /** This will be true when the control is in an invalid state.
94
103
  * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly */
95
104
  get invalid() {
@@ -169,7 +178,6 @@ export class FileUpload {
169
178
  async showError(message) {
170
179
  if (this.inputEl) {
171
180
  this.inputEl.setCustomValidity(message);
172
- this.validate();
173
181
  this.showInlineValidation();
174
182
  }
175
183
  }
@@ -221,7 +229,7 @@ export class FileUpload {
221
229
  checkFileType(type) {
222
230
  if (!this.accept)
223
231
  return true;
224
- return this.accept.match(type) && this.accept.match(type).length > 0;
232
+ return !!type && this.accept.match(type) && this.accept.match(type).length > 0;
225
233
  }
226
234
  validate = () => {
227
235
  this.errorMessage = '';
@@ -231,24 +239,36 @@ export class FileUpload {
231
239
  error = this.inputEl.validationMessage;
232
240
  }
233
241
  else {
234
- this.fileList.forEach((fileItem) => {
235
- error = null;
236
- if (!this.checkFileSize(fileItem.file.size)) {
237
- error =
238
- 'Maximum file size exceeded. Max file size is ' +
239
- this.maxFileSize +
240
- 'Mb';
241
- }
242
- else if (!this.checkFileType(fileItem.file.type))
243
- error = `File type is not allowed (${this.accept})`;
244
- fileItem.validationMessage = error;
245
- fileItem.valid = !error;
246
- });
247
- if (this.fileList.length > this.maxFiles)
248
- error = `Maxinum number of files exceeded (${this.maxFiles})`;
242
+ if (this.fileList.length > this.maxFiles) {
243
+ error = `Maximum number of files exceeded (${this.maxFiles})`;
244
+ }
245
+ else {
246
+ this.fileList.forEach((fileItem) => {
247
+ let listeItemError = null;
248
+ if (!this.checkFileSize(fileItem.file.size)) {
249
+ listeItemError =
250
+ 'Maximum file size exceeded. Max file size is ' +
251
+ this.maxFileSize +
252
+ 'Mb';
253
+ }
254
+ else if (!this.checkFileType(fileItem.file.type)) {
255
+ listeItemError = `File type is not allowed (${this.accept})`;
256
+ }
257
+ fileItem.validationMessage = listeItemError;
258
+ fileItem.valid = !listeItemError;
259
+ if (listeItemError) {
260
+ error = listeItemError;
261
+ }
262
+ });
263
+ }
249
264
  }
250
- if (error)
265
+ if (error) {
251
266
  this.inputEl.setCustomValidity(error);
267
+ }
268
+ else {
269
+ this.inputEl.setCustomValidity('');
270
+ this.errorMessage = '';
271
+ }
252
272
  };
253
273
  showInlineValidation(ev) {
254
274
  if (this.validateOn === 'submitThenDirty')
@@ -364,9 +384,10 @@ export class FileUpload {
364
384
  h("div", { class: 'file-upload__' + eleType + '-wrap' }, h("label", { class: `file-upload__` + eleType, htmlFor: this.fileInputId, id: labelId, onDrop: (e) => {
365
385
  this.onDrop(e);
366
386
  this.onDragStop(e);
367
- }, onDragEnd: this.onDragStop, onDragLeave: this.onDragStop, onDragEnter: this.onDragStart, onDragOver: this.onDragStart }, (!!this.label || (this.hasLabelSlot && eleType !== 'drop')) && (h("div", { class: `file-upload__label ${this.hideLabel ? 'visually-hide' : ''}` }, !!this.label && !!this.label.length ? this.label : '', !this.label && this.hasLabelSlot && eleType !== 'drop' && (h("slot", { name: "label" })))), eleType === 'drop' && (h("div", { class: "file-upload__drop-area" }, h("div", null, this.hasLabelSlot && h("slot", { name: "label" })), h("div", null, "Drag and drop or\u00A0", h("span", null, "browse")))), eleType === 'btn' && (h("div", { class: `file-upload__button button--keyline button--icon-start ${this.hasFocus ? 'button--focus' : ''}` }, h("div", { class: `file-upload__btn-content` }, h("nano-icon", { name: "regular/cloud-arrow-up" }), h("span", null, this.fileList.length
387
+ }, onDragEnd: this.onDragStop, onDragLeave: this.onDragStop, onDragEnter: this.onDragStart, onDragOver: this.onDragStart }, (!!this.label || (this.hasLabelSlot && eleType !== 'drop')) && (h("div", { class: `file-upload__label ${this.hideLabel ? 'visually-hide' : ''}` }, !!this.label && !!this.label.length ? this.label : '', !this.label && this.hasLabelSlot && eleType !== 'drop' && (h("slot", { name: "label" })))), eleType === 'drop' && (h("div", { class: "file-upload__drop-area" }, h("div", null, this.hasLabelSlot && h("slot", { name: "label" })), h("div", null, "Drag and drop or\u00A0", h("span", null, "browse")))), eleType === 'btn' && (h("div", { class: `file-upload__button button--keyline button--icon-start ${this.hasFocus ? 'button--focus' : ''}` }, h("nano-cta", { secondary: true, class: `file-upload__btn-content` }, h("div", { class: "button", disabled: this.disabled }, this.fileList.length
368
388
  ? this.fileList[0].file.name
369
- : this.placeholder), !!this.value && this.clearInput && !this.disabled && (h("button", { type: "button", class: "icon file-upload__clear-btn", tabindex: "-1", onClick: this.onClearClick }, h("nano-icon", { name: "light/xmark" })))))), h("input", { "aria-labelledby": labelId + ' ' + moreId + ' ' + listId, type: "file", id: this.fileInputId, accept: this.accept, class: "file-upload__input", multiple: this.maxFiles > 1, disabled: this.disabled, name: this.canChangeFileList ? undefined : this.name, form: this.form, ref: (input) => {
389
+ : this.placeholder)), !!this.value && this.clearable && !this.disabled && (h("button", { type: "button", class: "icon file-upload__clear-btn", tabindex: "0", "aria-label": "Clear selected file", onClick: this.onClearClick }, h("nano-icon", { name: "light/xmark" }))), !this.disabled && this.showInlineError &&
390
+ (this._invalid ? (h("nano-icon", { name: "solid/circle-xmark", class: "file-upload__icon file-upload__icon-error" })) : (h("nano-icon", { name: "solid/circle-check", class: "file-upload__icon file-upload__icon-success" }))))), h("input", { "aria-labelledby": labelId + ' ' + moreId + ' ' + listId, type: "file", id: this.fileInputId, accept: this.accept, class: "file-upload__input", multiple: this.maxFiles > 1, disabled: this.disabled, name: this.canChangeFileList ? undefined : this.name, form: this.form, ref: (input) => {
370
391
  if (this.canChangeFileList) {
371
392
  this.publicInputEl = input;
372
393
  return;
@@ -393,11 +414,12 @@ export class FileUpload {
393
414
  ];
394
415
  };
395
416
  render() {
396
- return (h(Host, { key: '2bd95bf5d3c725d84679a373eac2f87b491ae2bd', class: "nano-file-upload" }, h("div", { key: '026b77c3165ea04d5ed9a2f8536fd5089ed3ee8e', class: {
417
+ return (h(Host, { key: '4f495870314e3f688517b34be6749cf2b77810ea', class: "nano-file-upload" }, h("div", { key: '9baa63fe75b200913f82abb4304d73e22fbb4be4', class: {
397
418
  'file-upload': true,
398
419
  'file-upload--dragging': this.isDragging,
399
420
  'file-upload--focus': this.hasFocus,
400
- 'file-upload--invalid': this._invalid,
421
+ 'file-upload--invalid': this._invalid === true,
422
+ 'file-upload--valid': this._invalid === false,
401
423
  } }, this.maxFiles > 1 ? h(this.dropArea, null) : h(this.button, null))));
402
424
  }
403
425
  static get is() { return "nano-file-upload"; }
@@ -504,7 +526,7 @@ export class FileUpload {
504
526
  "optional": false,
505
527
  "docs": {
506
528
  "tags": [],
507
- "text": "The maximum file size allowed per file (bytes)."
529
+ "text": "The maximum number of files that can be selected. Defaults to 1"
508
530
  },
509
531
  "getter": false,
510
532
  "setter": false,
@@ -520,14 +542,14 @@ export class FileUpload {
520
542
  "resolved": "string",
521
543
  "references": {}
522
544
  },
523
- "required": true,
545
+ "required": false,
524
546
  "optional": false,
525
547
  "docs": {
526
548
  "tags": [],
527
549
  "text": "String to place within a label element."
528
550
  },
529
- "getter": false,
530
- "setter": false,
551
+ "getter": true,
552
+ "setter": true,
531
553
  "reflect": false
532
554
  },
533
555
  "placeholder": {
@@ -548,7 +570,7 @@ export class FileUpload {
548
570
  "getter": false,
549
571
  "setter": false,
550
572
  "reflect": false,
551
- "defaultValue": "'Choose a file...'"
573
+ "defaultValue": "'Choose a file'"
552
574
  },
553
575
  "hideLabel": {
554
576
  "type": "boolean",
@@ -610,9 +632,9 @@ export class FileUpload {
610
632
  "reflect": true,
611
633
  "defaultValue": "false"
612
634
  },
613
- "clearInput": {
635
+ "clearable": {
614
636
  "type": "boolean",
615
- "attribute": "clear-input",
637
+ "attribute": "clearable",
616
638
  "mutable": false,
617
639
  "complexType": {
618
640
  "original": "boolean",
@@ -668,7 +690,7 @@ export class FileUpload {
668
690
  "getter": false,
669
691
  "setter": false,
670
692
  "reflect": false,
671
- "defaultValue": "'submit'"
693
+ "defaultValue": "'submitThenDirty'"
672
694
  },
673
695
  "form": {
674
696
  "type": "string",
@@ -690,12 +712,12 @@ export class FileUpload {
690
712
  "reflect": false
691
713
  },
692
714
  "invalid": {
693
- "type": "boolean",
715
+ "type": "any",
694
716
  "attribute": "invalid",
695
717
  "mutable": false,
696
718
  "complexType": {
697
- "original": "boolean",
698
- "resolved": "boolean",
719
+ "original": "any",
720
+ "resolved": "any",
699
721
  "references": {}
700
722
  },
701
723
  "required": false,
@@ -710,7 +732,7 @@ export class FileUpload {
710
732
  "getter": true,
711
733
  "setter": false,
712
734
  "reflect": true,
713
- "defaultValue": "false"
735
+ "defaultValue": "null"
714
736
  },
715
737
  "validityMessage": {
716
738
  "type": "string",
@@ -80,12 +80,11 @@
80
80
  }
81
81
  }
82
82
  :host .upper {
83
- background-color: var(--nano-color-base-rgb-1000);
84
83
  border-block-start: 1px solid var(--nano-color-neutral-200);
85
84
  }
86
85
  :host .lower {
87
- background-color: var(--nano-color-base-0);
88
- color: var(--nano-color-base-1000);
86
+ background-color: var(--nano-color-basic-black);
87
+ color: var(--nano-color-basic-white);
89
88
  }
90
89
  :host .top,
91
90
  :host .middle,
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import { h } from "@stencil/core";
4
+ import { h, Build, getAssetPath } from "@stencil/core";
5
5
  import { addGlobalStylesheetToShadow } from "../../utils/style";
6
6
  /**
7
7
  * The footer is used to provide navigation, copyright info and links to social media platforms.
@@ -22,10 +22,11 @@ import { addGlobalStylesheetToShadow } from "../../utils/style";
22
22
  export class NanoFooter {
23
23
  host;
24
24
  componentWillLoad() {
25
- addGlobalStylesheetToShadow(this.host.shadowRoot);
25
+ if (Build.isBrowser)
26
+ addGlobalStylesheetToShadow(this.host.shadowRoot);
26
27
  }
27
28
  render() {
28
- return (h("footer", { key: '6c5f9e943485a21b7c19a1c1173816151450a7a7', class: "footer" }, h("div", { key: '4f412bbb7737f5f8225729e2109b688ccc800989', class: "upper" }, h("div", { key: 'dd53490055399eafe7599aca856dd0ca79ba21fb', class: "top" }, h("div", { key: 'c8103cf1bcd74ce025924fc975849573051368d0', class: "top-start" }, h("slot", { key: '924b1f7d97a15e4afa0126f7c03fe525f97f92ba', name: "top-start_heading" }), h("slot", { key: '3feb30f6395b9acbdd670cd656321ea751a4e81a', name: "top-start_content" })), h("div", { key: '5dd035af59487992c2da47b7b61012da97cfeec4', class: "top-center" }, h("slot", { key: 'aecc20ee6792c8912cd330724af3a75cfcd487af', name: "top-center_heading" }), h("slot", { key: 'f30e4dae00d45df2afb7a419daf875843ad61a50', name: "top-center_content" })), h("div", { key: '824feef5a5f50b461904096752bdb4aeefd84d99', class: "top-end" }, h("slot", { key: '7f06ff962236e057b640460097881646e2d8b1b2', name: "top-end_heading" }), h("slot", { key: '5e2412c74e444c570f5ea46b756d2e3369f12215', name: "top-end_content" })))), h("div", { key: '77cb498fde6fb578e3c5a249ca6c3db5c88206d1', class: "lower nano-theme-dark" }, h("div", { key: '7f2e8024df8f7470443d0048eefd8978d203f727', class: "middle" }, h("div", { key: '18c334b18c07c0ee2416cb646c5f5287c091bdb3', class: "middle-start" }, h("img", { key: 'be83911db58e7a75566a2d495b843427a7d1fa0a', src: "/nano-assets/img/ont-logo-light.svg", alt: "Oxford Nanopore Technologies logo. Featuring a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.", height: "46" })), h("div", { key: 'a7b84187146146325db5cb990d53650ebfaf5741', class: "middle-center" }, h("a", { key: 'd2edfbc2e1034a9378be6291bf290af6d0e36119', href: "https://x.com/nanopore", target: "_blank" }, h("nano-icon", { key: '8e8cb317194b2dd9277599c38b525128d94d69c0', name: "brands/x-twitter", size: "large", ariaLabel: "X (formerly Twitter)" })), h("a", { key: '07091f28412bf31e853c5c51d6448631a7e47b33', href: "https://bsky.app/profile/nanoporetech.com", target: "_blank" }, h("nano-icon", { key: '8e5f4e5b2d13ce77df193d4a38743d6225f667d6', name: "brands/bluesky", size: "large", ariaLabel: "Bluesky" })), h("a", { key: '2561aa967f77b1ac0618c02fe1e78c270d8f82f7', href: "https://www.youtube.com/channel/UC5yMlYjHSgFfZ37LYq-dzig", target: "_blank" }, h("nano-icon", { key: '27ac4933b66ff7027c3f45bc001d0e311055cf0a', name: "brands/youtube", size: "large", ariaLabel: "YouTube" })), h("a", { key: '2b46f3651b32439997c4f1020d89901bcf6679a8', href: "https://www.facebook.com/Oxford-Nanopore-Technologies-251034380246/", target: "_blank" }, h("nano-icon", { key: '0f25dc9636ece933dbc00911d0e0c36735203666', name: "brands/facebook", size: "large", ariaLabel: "Facebook" })), h("a", { key: '541bef691993ace5b8c270e82d08984baace7964', href: "https://www.linkedin.com/company/oxford-nanopore-technologies", target: "_blank" }, h("nano-icon", { key: 'bb4a4104c3a39375d1f50c7c8aca1561a66d9c28', name: "brands/linkedin", size: "large", ariaLabel: "LinkedIn" })), h("a", { key: '4817a0798d5ab0586a20c40a14de73280ce749e3', href: "https://www.instagram.com/oxfordnanopore", target: "_blank" }, h("nano-icon", { key: 'dea3b9c4bc6100f73a3769999779ab4e6f343193', name: "brands/instagram", size: "large", ariaLabel: "Instagram" }))), h("div", { key: '151bbc03ca7c9fbdb14cf355dd4ff61c6fba1e36', class: "middle-end" }, h("slot", { key: '241922e25dbe52e5a6e5b9b661c037f3faa004f5', name: "middle-end" }))), h("div", { key: '08489f7cb75832e26fe862987d19bbdc03b8ff23', class: "bottom" }, h("div", { key: '1e2cfb25bbb0f6a60399b344f83a091677d848d7', class: "bottom-start" }, h("slot", { key: 'ce19389f907a75fb43a533a7ca200670b136ad86', name: "bottom-start" }, h("p", { key: '5d6d5135e67276a81f290e91d7753b9b2b4964ce' }, "\u00A9 2008 - 2025 Oxford Nanopore Technologies plc. All rights reserved. Registered Office: Gosling Building, Edmund Halley Road, Oxford Science Park, OX4 4DQ, UK | Registered No. 05386273 | VAT No 336942382. Oxford Nanopore Technologies, the Wheel icon, EPI2ME, Flongle, GridION, Metrichor, MinION, MinIT, MinKNOW, Plongle, PromethION, SmidgION, Ubik and VolTRAX are registered trademarks of Oxford Nanopore Technologies plc in various countries. Oxford Nanopore Technologies products are not intended for use for health assessment or to diagnose, treat, mitigate, cure, or prevent any disease or condition."))), h("div", { key: 'db091f94e130553a106a71071988b2c591a943ab', class: "bottom-end" }, h("slot", { key: '6b6642608e571e9d1690de419727476b27e1514f', name: "bottom-end" }))))));
29
+ return (h("footer", { key: '7df3395d83480c2efaffd3a745dcb8486492ec8d', class: "footer" }, h("div", { key: '2277f9b209312a0be9c503590f9871c3da7ab7c5', class: "upper" }, h("div", { key: '43ca2ad3f23948f23d787c3179f6012021fe0786', class: "top" }, h("div", { key: '05ee9cb69076053c9accbae4d188232d344e7bf0', class: "top-start" }, h("slot", { key: 'a34bf50a87e10191e65d0be67f88c16abcf48304', name: "top-start_heading" }), h("slot", { key: 'db386e86277ae22fa9b5e7723c78ec48b4ff5444', name: "top-start_content" })), h("div", { key: '061fd17bfdb8ad8af11dce8cd3abac07d7c58290', class: "top-center" }, h("slot", { key: '885c3acef88311528147a249ca29003ec64b10c0', name: "top-center_heading" }), h("slot", { key: '8d4f513adfd5f24880ca76a214d2d2051d3b9ad7', name: "top-center_content" })), h("div", { key: 'f6138faa2e07af7e9e46a20e1510708f58ddba27', class: "top-end" }, h("slot", { key: 'aa7570bfa51e27ec2745b2563db6736c1b7def19', name: "top-end_heading" }), h("slot", { key: '9dd64f4ad61d9a0d5dd1b305e9089c5190e89738', name: "top-end_content" })))), h("div", { key: 'bbf554d8a85ee66cf0a38f82a8de608615510722', class: "lower nano-theme-dark" }, h("div", { key: '4a46e9541cc2fa7b45cfa3fd3a8628e5aed47eae', class: "middle" }, h("div", { key: 'ef13e5c2a35f64533bba7522fa34c964c4ee8acc', class: "middle-start" }, h("img", { key: '2bf403ca600f0588be99898b4e0a42ee5f64f736', src: getAssetPath('../nano-assets/ont-logo-light.svg'), alt: "Oxford Nanopore Technologies logo. Featuring a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.", height: "46" })), h("div", { key: 'c3796b77148a0ba37fba2a7d1f3583233294de22', class: "middle-center" }, h("a", { key: 'abd8ff0fcbb1b3e7365090310c67ae0c29a8073f', href: "https://x.com/nanopore", target: "_blank" }, h("nano-icon", { key: '78ec0f32afa4da8f87fce46f36c2958a61cadaef', name: "brands/x-twitter", size: "large", ariaLabel: "X (formerly Twitter)" })), h("a", { key: '28315142cc17313a65d9039601b26bbe2400d715', href: "https://bsky.app/profile/nanoporetech.com", target: "_blank" }, h("nano-icon", { key: '155bedeeea937afe7740c867f9780ad26dd6eadf', name: "brands/bluesky", size: "large", ariaLabel: "Bluesky" })), h("a", { key: '4047f00cd32d045bd46660aaa9eb17536a5555f4', href: "https://www.youtube.com/channel/UC5yMlYjHSgFfZ37LYq-dzig", target: "_blank" }, h("nano-icon", { key: '63e9bb9f849a10b70b1a5cd32c1f9545587f8902', name: "brands/youtube", size: "large", ariaLabel: "YouTube" })), h("a", { key: 'fd2f4d639c13c99523a9f026457414aa805171bc', href: "https://www.facebook.com/Oxford-Nanopore-Technologies-251034380246/", target: "_blank" }, h("nano-icon", { key: '71a31a51945079e3419ce150a7908db2125a6523', name: "brands/facebook", size: "large", ariaLabel: "Facebook" })), h("a", { key: '426b6c582345b1e32bbd0e6ca206a75cd56ed434', href: "https://www.linkedin.com/company/oxford-nanopore-technologies", target: "_blank" }, h("nano-icon", { key: 'ec8256f6a70d0bb68beacab2a8c8adc381d26661', name: "brands/linkedin", size: "large", ariaLabel: "LinkedIn" })), h("a", { key: 'ddf5456cb764238fb5d932b2b44cf5466e82ad2f', href: "https://www.instagram.com/oxfordnanopore", target: "_blank" }, h("nano-icon", { key: '293464c660b8734f0bae8eb612c8377e763b8053', name: "brands/instagram", size: "large", ariaLabel: "Instagram" }))), h("div", { key: '6b7ed0e2ad110329ce9c5e4e085278d4e7dd4568', class: "middle-end" }, h("slot", { key: '15c3d94e8f35ee98fafdc6f062d9639b0ac54b63', name: "middle-end" }))), h("div", { key: 'a72b24bd18b825b160608a1b20e221b37c070bc4', class: "bottom" }, h("div", { key: 'a63f935bacfc660dc1c45e0dcb43514272837fdd', class: "bottom-start" }, h("slot", { key: '1fb95aa9e6da5ae676470cf532c47ecbe5ae0015', name: "bottom-start" }, h("p", { key: 'd78582a9baa27c818155577a7a49ccbc6b0fe141' }, "\u00A9 2008 - 2025 Oxford Nanopore Technologies plc. All rights reserved. Registered Office: Gosling Building, Edmund Halley Road, Oxford Science Park, OX4 4DQ, UK | Registered No. 05386273 | VAT No 336942382. Oxford Nanopore Technologies, the Wheel icon, EPI2ME, Flongle, GridION, Metrichor, MinION, MinIT, MinKNOW, Plongle, PromethION, SmidgION, Ubik and VolTRAX are registered trademarks of Oxford Nanopore Technologies plc in various countries. Oxford Nanopore Technologies products are not intended for use for health assessment or to diagnose, treat, mitigate, cure, or prevent any disease or condition."))), h("div", { key: '08a48aaf322de5c4292e24803e8ca6da40e1e3c5', class: "bottom-end" }, h("slot", { key: '81873c5375cc33b1f1b533354b960a66eadaf94b', name: "bottom-end" }))))));
29
30
  }
30
31
  static get is() { return "nano-footer"; }
31
32
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import { Host, getAssetPath, } from "@stencil/core";
4
+ import { Host, getAssetPath, Build, } from "@stencil/core";
5
5
  import { h } from "../../utils/renderer";
6
6
  import algoliaSearch from "algoliasearch/dist/algoliasearch-lite.esm.browser";
7
7
  import { debounce } from "../../utils/throttle";
@@ -431,7 +431,8 @@ export class GlobalNav {
431
431
  this.handleMyAccountUrl();
432
432
  this.initSearch();
433
433
  this.processUserData();
434
- addGlobalStylesheetToShadow(this.host.shadowRoot);
434
+ if (Build.isBrowser)
435
+ addGlobalStylesheetToShadow(this.host.shadowRoot);
435
436
  }
436
437
  componentDidRender() {
437
438
  this.handleResize();
@@ -487,20 +488,20 @@ export class GlobalNav {
487
488
  }
488
489
  render() {
489
490
  const bpps = this.bpPartials;
490
- return (h(Host, { key: '184e0e7a9468ebb9d60cfac752d955358a4fe0fe', class: {
491
+ return (h(Host, { key: '66132ed8841605602bff8c2c750a657ec4d6d83a', class: {
491
492
  'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
492
493
  'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
493
494
  'nano-global-nav': true,
494
- } }, h("div", { key: '8eaa12e98b9a38721b9f03e2d646d20add74b3e6', class: {
495
+ } }, h("div", { key: 'c8dfcf4b405c72a14f576fb7b14ce41e8ff49b83', class: {
495
496
  gn: true,
496
497
  'gn__search-open': this.searchBarShown,
497
- } }, h("nano-drawer", { key: 'b874e6c5aa026ed4c266601c52d41859857f38b5', ref: (el) => (this.overflowMenu = el), label: "Main menu", part: "drawer", class: "gn__drawer nano-theme-dark", placement: "start", open: this.overflowOpen, onNanoAfterHide: () => (this.overflowOpen = false), onNanoAfterShow: () => (this.overflowOpen = true) }, h("div", { key: '29e9160530cb0bfbc335cbae26a22a4a3fecdff7', class: "gn__drawer-header", part: "overflow-header", slot: "label" }, "Main menu"), h("nav", { key: '0b09f539037bd906065f5cf2cc6e806173d97b66', class: "gn__drawer-menu", part: "overflow-menu" }, this.breakpoint > bpps.mainMenu.breakpoint
498
+ } }, h("nano-drawer", { key: '741e6dc6df0253450f65e792f45fe2a337bb007d', ref: (el) => (this.overflowMenu = el), label: "Main menu", part: "drawer", class: "gn__drawer nano-theme-dark", placement: "start", open: this.overflowOpen, onNanoAfterHide: () => (this.overflowOpen = false), onNanoAfterShow: () => (this.overflowOpen = true) }, h("div", { key: 'b8d197424ed2d4dff32234457b7836507d9777ba', class: "gn__drawer-header", part: "overflow-header", slot: "label" }, "Main menu"), h("nav", { key: '36ef3c9a323078bfbf4f28682afd4b33475c6d1d', class: "gn__drawer-menu", part: "overflow-menu" }, this.breakpoint > bpps.mainMenu.breakpoint
498
499
  ? bpps.mainMenu.tpl()
499
- : '', h("slot", { key: '197989ea9849d9143024538c26b2678c6220e6d4', name: "overflow" }))), h("div", { key: 'ce2b19cb76ff12eda8c4589ac188749ba3684c9f', class: "gn__menu-bar-wrapper" }, h("div", { key: '11c7745248090f0163a2a505fb5a20f56fdd11d2', class: "gn__menu-bar", part: "menu-bar", ref: (el) => (this.mainMenuBar = el) }, h("nav", { key: 'a797355c5204357100884bf865d5ffb58967028e', class: `gn__main-menu ${this.shouldResize ? 'resizing' : ''}`, part: "main-menu", ref: (el) => (this.mainMenu = el) }, this.breakpoint > bpps.mainMenu.breakpoint && (h("nano-icon-button", { key: '0bf6477cd3dac4dd6cb0f55dd3ff3a313b55fb84', class: "gn__overflow-button", iconName: "light/bars", label: "Open Menu", onClick: () => this.overflowMenu.show() })), h("slot", { key: '8dbb4a02f736efcddc019aa602953ff41c5eb15e', name: "logo" }, h("a", { key: '5d60a835f364ada7ae8d8ee7b608df9b75443c26', href: this.logoUrl, class: "gn__logo-link", part: "logo-link" }, this.breakpoint <= bpps.logo.breakpoint ? (h("img", { src: getAssetPath('../nano-assets/ont-logo.svg'), alt: `Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,
500
+ : '', h("slot", { key: '569277672e49d95702583537c90db8de51d89a35', name: "overflow" }))), h("div", { key: '367e4bfffe6a8359bf49e6a4ea7a69dfdd20e6af', class: "gn__menu-bar-wrapper" }, h("div", { key: 'aca6cb95a4b03c46509cfd6d0a55e722976200e9', class: "gn__menu-bar", part: "menu-bar", ref: (el) => (this.mainMenuBar = el) }, h("nav", { key: '8c56fcfde4d896b30a277a00f79de3dfb75d93ef', class: `gn__main-menu ${this.shouldResize ? 'resizing' : ''}`, part: "main-menu", ref: (el) => (this.mainMenu = el) }, this.breakpoint > bpps.mainMenu.breakpoint && (h("nano-icon-button", { key: 'fb8ca915d6460ee871a0a357b8a25d2e720620ac', class: "gn__overflow-button", iconName: "light/bars", label: "Open Menu", onClick: () => this.overflowMenu.show() })), h("slot", { key: '96962d7ccd0d55f5c054dae0e8480398e7ea1415', name: "logo" }, h("a", { key: 'dcfa5d446ef38afb07285172dd5c0269da604d44', href: this.logoUrl, class: "gn__logo-link", part: "logo-link" }, this.breakpoint <= bpps.logo.breakpoint ? (h("img", { src: getAssetPath('../nano-assets/ont-logo.svg'), alt: `Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,
500
501
  (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.`, class: "gn__logo gn__logo--large", width: "152", height: "36", part: "logo logo--large" })) : (h("img", { src: getAssetPath('../nano-assets/ont-wheel.svg'), alt: `Oxford Nanopore Technologies logo. A stylised representation of a nanopore,
501
- (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.`, class: "gn__logo gn__logo--small", width: "36", height: "36", part: "logo logo--small" })))), this.breakpoint <= bpps.mainMenu.breakpoint && (h("div", { key: '4270c5dc3e334ca906debe763771acc1dc4dd82b', class: "gn__main-menu-links" }, bpps.mainMenu.tpl())), h("div", { key: '7f39cd0f1338a1124a6c59c18774c62d7b3e36e7', class: "gn__main-menu-actions" }, h("nano-dropdown", { key: '503d51cd5f72ad19203bab7939230f8f7a7f4bd3', dialogTitle: "Search Oxford Nanopore Technologies", placement: "bottom", class: "gn__search-dropdown", skidding: -30, distance: 25, open: this.searchBarShown, onNanoAfterShow: this.handleSearchOpenEvent, onNanoAfterHide: this.handleSearchCloseEvent, autoOpen: !!this.searchIndices.length }, h("nano-icon-button", { key: '0a82c9022cb41265d8cb969057404ad32d7179f2', class: "gn__search-button", slot: "trigger", iconName: "light/magnifying-glass", label: "Search" }), !!this.searchIndices.length && (h("form", { key: 'ee9b0742d2e8e6c3e51d35de68141bedb3677081', ref: (form) => (this.searchForm = form), class: "gn__search-form", part: "search-form", onSubmit: this.onSearchSubmit }, this.searchIndices.length > 1 && (h("nano-select", { key: 'df0da7c60f0ced0d52eeb84360a7215d7247a5e7', part: "search-select", label: "Which site do you wish to search in?", mask: true, hideLabel: true, value: this.activeIndex?.index, onNanoChange: this.handleSearchIndexChangeEvent }, this.searchIndices.map((index) => (h("nano-option", { selected: index.name === this.searchIndex, value: index.index }, index.name || index.index))))), h("nano-input", { key: '83bdee0aca807f594505c657a4b1aeaabdb8a3d0', ref: (ele) => (this.searchInput = ele), part: "search-input", label: "Search Oxford Nanopore Technologies", placeholder: "Search Oxford Nanopore...", hideLabel: true, clearable: true, onNanoChange: (e) => {
502
+ (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.`, class: "gn__logo gn__logo--small", width: "36", height: "36", part: "logo logo--small" })))), this.breakpoint <= bpps.mainMenu.breakpoint && (h("div", { key: 'c4e2a7166c5766eede74e6f9e5763e157c47ac74', class: "gn__main-menu-links" }, bpps.mainMenu.tpl())), h("div", { key: 'e6bb457db190019f21c1c712bb8c9bab5abec91b', class: "gn__main-menu-actions" }, h("nano-dropdown", { key: 'd46c596a07189f129a1644118560590e70101a2b', dialogTitle: "Search Oxford Nanopore Technologies", placement: "bottom", class: "gn__search-dropdown", skidding: -30, distance: 25, open: this.searchBarShown, onNanoAfterShow: this.handleSearchOpenEvent, onNanoAfterHide: this.handleSearchCloseEvent, autoOpen: !!this.searchIndices.length }, h("nano-icon-button", { key: '00df8fe73a5c1e5b0e3263ee584549c1b450675f', class: "gn__search-button", slot: "trigger", iconName: "light/magnifying-glass", label: "Search" }), !!this.searchIndices.length && (h("form", { key: 'b03a0c3f58a7a50939ec09258dda85a49157cf48', ref: (form) => (this.searchForm = form), class: "gn__search-form", part: "search-form", onSubmit: this.onSearchSubmit }, this.searchIndices.length > 1 && (h("nano-select", { key: '367ed61df9546497f9cef04d833e86f59389f48a', part: "search-select", label: "Which site do you wish to search in?", mask: true, hideLabel: true, value: this.activeIndex?.index, onNanoChange: this.handleSearchIndexChangeEvent }, this.searchIndices.map((index) => (h("nano-option", { selected: index.name === this.searchIndex, value: index.index }, index.name || index.index))))), h("nano-input", { key: 'd8013a6f1cd8953bc63ba6f518367a4b278197bd', ref: (ele) => (this.searchInput = ele), part: "search-input", label: "Search Oxford Nanopore Technologies", placeholder: "Search Oxford Nanopore...", hideLabel: true, clearable: true, onNanoChange: (e) => {
502
503
  this.handleSearchTermChangeEvent(e.detail.value);
503
- }, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '2f7a3e620d015b8d56044d048ed49ee6a6e29ba4', slot: "end", name: "light/magnifying-glass" }), h("nano-datalist", { key: '528da1d7293b7589ce34a00007e83cf00ac71547', class: "gn__search-results", onNanoSelect: (e) => e.preventDefault(), dropDownConfig: { tetherTo: this.searchForm }, disableFilter: true }, this.searchLoading && (h("div", { key: 'f1556946842927cd1aa65a97346bc3ce1886311e', slot: "no-result", class: "gn__search-loading" }, h("nano-spinner", { key: 'b7d9e741bdbcde586cb1734961b628de31aca103' }, "Searching..."))), this.noResultPartial(), !!this.autocompleteResults?.hits.length && [
504
+ }, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: 'fe62a269a2f3ca318ad1e071404f693c9540317b', slot: "end", name: "light/magnifying-glass" }), h("nano-datalist", { key: '87d39b1dc2be07a66b546ba53eea56351bb103ec', class: "gn__search-results", onNanoSelect: (e) => e.preventDefault(), dropDownConfig: { tetherTo: this.searchForm }, disableFilter: true }, this.searchLoading && (h("div", { key: 'fade49b478eddeb181f332b8db31b0f88c98305f', slot: "no-result", class: "gn__search-loading" }, h("nano-spinner", { key: 'e7c946dc5ec1ee76d115fd2575b1288f95d71c43' }, "Searching..."))), this.noResultPartial(), !!this.autocompleteResults?.hits.length && [
504
505
  this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
505
506
  searchInsight.sendClick({
506
507
  index: this.activeIndex.index,
@@ -510,10 +511,10 @@ export class GlobalNav {
510
511
  positions: [i + 1],
511
512
  });
512
513
  } }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
513
- h("nano-option", { key: '88e617068d30bfa4ca09f6b122109d9a3539088b', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
514
- ]))))), h("div", { key: 'acceaf54481ab87951bbd9384f079c9d37fa0663', class: "gn__cart" }, h("nano-icon-button", { key: '6bed2b6a26492c9e7e4fe205b9ef94845360327d', iconName: "light/cart-shopping", label: "View your cart", href: this.cartUrl }), !!this.cartCount && (h("nano-badge", { key: '4034d7828876c1237b1869abeb977e258d55006b', theme: "danger", strength: "2" }, this.cartCount > 9 ? '9+' : this.cartCount))), this.breakpoint <= bpps.contact.breakpoint
514
+ h("nano-option", { key: '74852e060130852064b4987f1de0c8f0fa2a395e', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
515
+ ]))))), h("div", { key: 'e66b10d8ce1de533d772bfd66bf7c73511f338ff', class: "gn__cart" }, h("nano-icon-button", { key: '47b8fc7ad91f5ea1048a670407ad602d29eb347f', iconName: "light/cart-shopping", label: "View your cart", href: this.cartUrl }), !!this.cartCount && (h("nano-badge", { key: '75c8ffb6264bd4a390ad77d15c408105d6f77393', theme: "danger", strength: "2" }, this.cartCount > 9 ? '9+' : this.cartCount))), this.breakpoint <= bpps.contact.breakpoint
515
516
  ? bpps.contact.tpl()
516
- : '', this.isLoggedIn ? (h("nano-dropdown", { dialogTitle: "User menu", class: "gn__user-dropdown", distance: 10, placement: "bottom-end" }, h("button", { slot: "trigger", class: "gn__user-dropdown-trigger" }, h("nano-icon", { name: "light/user" }), h("nano-icon", { name: "light/chevron-down", class: "gn__user-dropdown-chevron" }), !!this.msgCount && (h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount > 9 ? '9+' : this.msgCount))), this.loggedInPanel())) : (h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login"))))))), h("div", { key: 'f52e45cccc15b745f54978bc140816847dc66560', class: "gn__site", part: "site-wrapper" }, h("nano-global-search-results", { key: '0dd16b2bb789a66f3ef5b214ea54609aedad3ae4', part: "site-search-results" }, h("slot", { key: '3a86b5ee10f5da29d3da8d06b2b6ad36f27e725c' }))))));
517
+ : '', this.isLoggedIn ? (h("nano-dropdown", { dialogTitle: "User menu", class: "gn__user-dropdown", distance: 10, placement: "bottom-end" }, h("button", { slot: "trigger", class: "gn__user-dropdown-trigger" }, h("nano-icon", { name: "light/user" }), h("nano-icon", { name: "light/chevron-down", class: "gn__user-dropdown-chevron" }), !!this.msgCount && (h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount > 9 ? '9+' : this.msgCount))), this.loggedInPanel())) : (h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login"))))))), h("div", { key: '798ee16df74983e3d5689639f3320198bd1fe14d', class: "gn__site", part: "site-wrapper" }, h("nano-global-search-results", { key: 'a51edbf9c6bc9b0e34e207e21b4341704032e82f', part: "site-search-results" }, h("slot", { key: '4ae65a7bc4d8897d95e43692b87830cf9f9d8a8f' }))))));
517
518
  }
518
519
  static get is() { return "nano-global-nav"; }
519
520
  static get encapsulation() { return "shadow"; }
@@ -134,16 +134,16 @@ export class Img {
134
134
  const bgStyle = this.loadSrc
135
135
  ? { 'background-image': `url(${this.loadSrc})` }
136
136
  : {};
137
- return (h(Host, { key: 'a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af', class: "nano-img" }, h("div", { key: '1f40afc64a5652f53b224403c59b4f108e5eb044', class: "img" }, h("nano-skeleton", { key: 'a8872721a38b11951ca6950d567193ba16e1d348', class: "img__loader" }), !!this.background && (h("div", { key: 'd9c1fd739f4a4914a0cfe8c1eb8ef50832ecc35c', class: {
137
+ return (h(Host, { key: 'a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af', class: "nano-img" }, h("div", { key: '1f40afc64a5652f53b224403c59b4f108e5eb044', class: "img" }, h("div", { key: '7b3a0b8521888092effb1fc675b0c52bce7faa6f', class: "img__loader n-loader-skeleton" }, "Loading"), !!this.background && (h("div", { key: '1f4d59fc6ff3e0be42f18d1db4a099a32d099872', class: {
138
138
  loaded: this.hasLoaded,
139
139
  img__bg: true,
140
140
  'no-height': this.autoHeight === 'image',
141
- }, style: bgStyle }, h("slot", { key: '750330595e7dc0e2127d8646616107154215e97b' }))), h("img", { key: 'c04ad33e34573482e701f4239e17a9a28fd98dd0', class: {
141
+ }, style: bgStyle }, h("slot", { key: 'd987180d13fa9ef34868c8e962344da9e0f6b876' }))), h("img", { key: 'f3d603cf35bf0c37c4e1eb530e9a9ea7d7e81beb', class: {
142
142
  img__image: true,
143
143
  loaded: this.hasLoaded,
144
144
  hide: this.background,
145
145
  'no-height': this.autoHeight === 'content',
146
- }, decoding: "async", src: Build.isServer ? this.src : this.loadSrc, loading: Build.isServer && this.lazy ? 'lazy' : undefined, alt: this.alt, onLoad: this.onLoad, onError: this.loadError }), h("nano-resize-observe", { key: '4d40e294ec3a56be5756aede03e91aaf3d629bf3', class: "img__observer", onNanoResizeStateChange: this.onResize, states: this.imgStates }))));
146
+ }, decoding: "async", src: Build.isServer ? this.src : this.loadSrc, loading: Build.isServer && this.lazy ? 'lazy' : undefined, alt: this.alt, onLoad: this.onLoad, onError: this.loadError }), h("nano-resize-observe", { key: 'cf77dadeb8d5b01ef1afff5e6df5eb6aacad13e6', class: "img__observer", onNanoResizeStateChange: this.onResize, states: this.imgStates }))));
147
147
  }
148
148
  static get is() { return "nano-img"; }
149
149
  static get encapsulation() { return "shadow"; }
@@ -37,46 +37,65 @@
37
37
  scroll-behavior: auto !important;
38
38
  }
39
39
  }/**
40
- * @prop --height: The progress bar's height. Default 1em
41
- * @prop --track-color: The track color. Default rgb(var(--nano-track-rgb, 228 230 232) / 100%);
42
- * @prop --indicator-color: The indicator color. Default rgb(var(--nano-indicator-rgb, 84 140 175) / 100%);
43
- * @prop --label-color: The label color. Default var(--nano-color-white, white);
40
+ * @prop --indicator-color: Color of the progress indicator. Defaults to var(--nano-color-primary-1000);
41
+ * @prop --track-color: Color of the progress track. Defaults to var(--nano-color-neutral-300);
42
+ * @prop --border-radius: Border radius of the progress bar. Defaults to 1.25rem;
43
+ * @prop --height: Height of the progress bar. Defaults to 0.625rem;
44
44
  */
45
- :host {
46
- --height: 1em;
47
- --track-color: rgb(var(--nano-track-rgb, 228 230 232) / 100%);
48
- --indicator-color: rgb(var(--nano-indicator-rgb, 84 140 175) / 100%);
49
- --label-color: var(--nano-color-white, white);
50
- display: block;
51
- }
52
-
53
- .progress-bar {
45
+ nano-progress-bar {
46
+ --indicator-color: var(--nano-color-primary-1000);
47
+ --track-color: var(--nano-color-neutral-300);
48
+ --border-radius: 1.25rem;
49
+ --height: 0.625rem;
50
+ display: grid;
54
51
  position: relative;
52
+ overflow: clip;
53
+ border-radius: var(--border-radius);
54
+ height: var(--height);
55
+ font-size: var(--height);
56
+ }
57
+ nano-progress-bar[size=small] {
58
+ --height: 0.3125rem;
59
+ }
60
+ nano-progress-bar[size=large] {
61
+ --height: 0.9375rem;
62
+ }
63
+ nano-progress-bar progress {
64
+ appearance: none;
65
+ width: 100%;
66
+ height: inherit;
67
+ border-radius: var(--border-radius);
55
68
  background-color: var(--track-color);
56
- block-size: var(--height);
57
- border-radius: var(--nano-layer-border-radius, var(--nano-border-radius-medium, 4px));
58
- overflow: hidden;
69
+ grid-area: 1/1;
59
70
  }
60
-
61
- .progress-bar__indicator {
62
- block-size: 100%;
63
- font-size: 0.75em;
64
- background-color: var(--indicator-color);
65
- color: var(--label-color);
66
- text-align: center;
67
- white-space: nowrap;
68
- overflow: hidden;
69
- transition: 0.4s width, 0.4s background-color;
70
- transform: translateZ(0);
71
- -webkit-user-select: none;
72
- user-select: none;
73
- transform-origin: left;
71
+ nano-progress-bar > label {
72
+ grid-area: 1/1;
73
+ position: absolute;
74
+ inset: 0;
75
+ }
76
+ nano-progress-bar > label progress {
77
+ position: absolute;
78
+ inset: 0;
74
79
  }
75
-
76
- .progress-bar--indeterminate .progress-bar__indicator {
80
+ nano-progress-bar:has(progress:not([value]))::after {
81
+ content: "";
82
+ width: 100%;
83
+ inset: 0;
84
+ display: block;
85
+ transform: translateZ(0);
77
86
  animation: indeterminate 2.5s infinite cubic-bezier(0.37, 0, 0.63, 1);
87
+ background-color: var(--indicator-color);
88
+ grid-area: 1/1;
89
+ border-radius: none;
90
+ }
91
+ nano-progress-bar progress:not([value])::-webkit-progress-bar {
92
+ border-radius: var(--border-radius);
93
+ background-color: var(--track-color);
94
+ }
95
+ nano-progress-bar progress:not([value])::-moz-progress-bar {
96
+ border-radius: var(--border-radius);
97
+ background-color: var(--track-color);
78
98
  }
79
-
80
99
  @keyframes indeterminate {
81
100
  0% {
82
101
  scale: 1 1;
@@ -86,4 +105,30 @@
86
105
  scale: 1 1;
87
106
  transform: translateX(100%) translateZ(0);
88
107
  }
108
+ }
109
+ nano-progress-bar progress[value]::-webkit-progress-bar {
110
+ border-radius: var(--border-radius);
111
+ background-color: var(--track-color);
112
+ }
113
+ nano-progress-bar progress[value]::-webkit-progress-value {
114
+ background-color: var(--indicator-color);
115
+ -webkit-transition: inline-size var(--nano-transition-fast);
116
+ transition: inline-size var(--nano-transition-fast);
117
+ }
118
+ nano-progress-bar progress[value]::-moz-progress-bar {
119
+ background-color: var(--indicator-color);
120
+ -moz-transition: inline-size var(--nano-transition-fast);
121
+ transition: inline-size var(--nano-transition-fast);
122
+ }
123
+ nano-progress-bar[show-percent] progress[value]::before {
124
+ content: attr(value) "%";
125
+ position: absolute;
126
+ inline-size: attr(value %);
127
+ min-inline-size: 6%;
128
+ top: 50%;
129
+ translate: 0 -50%;
130
+ text-align: center;
131
+ transition: inline-size var(--nano-transition-fast);
132
+ font-size: 0.75em;
133
+ color: var(--nano-color-base-0);
89
134
  }