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

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 (161) hide show
  1. package/dist/cjs/{fade-C3xL9ihU.js → fade-CqKYrZYq.js} +1 -1
  2. package/dist/cjs/{fullscreen-pHBD1-3e.js → fullscreen-D-fHJ_IJ.js} +1 -1
  3. package/dist/cjs/index-IR1lkhwT.js +4 -4
  4. package/dist/cjs/{lazyload-D2pj9J7r.js → lazyload-DK1ITMfR.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 +1 -1
  8. package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +1 -1
  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-C_KLyFMO.js} +6 -3
  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 +1 -1
  17. package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
  18. package/dist/cjs/nano-progress-bar.cjs.entry.js +3 -17
  19. package/dist/cjs/nano-rating.cjs.entry.js +4 -4
  20. package/dist/cjs/nano-resize-observe_2.cjs.entry.js +3 -3
  21. package/dist/cjs/nano-slide.cjs.entry.js +1 -1
  22. package/dist/cjs/{nano-slides-B3-XISfn.js → nano-slides-BhpvytBB.js} +7 -7
  23. package/dist/cjs/nano-slides.cjs.entry.js +1 -1
  24. package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
  25. package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
  26. package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
  27. package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
  28. package/dist/cjs/nano-tab.cjs.entry.js +2 -2
  29. package/dist/cjs/nano-table.cjs.entry.js +2 -2
  30. package/dist/cjs/{page-dots-DHz-mQDL.js → page-dots-DeSuT5bE.js} +1 -1
  31. package/dist/cjs/{style-BccHkuhC.js → style-Bf3iH5GX.js} +16 -2
  32. package/dist/cjs/{table.worker-NnDnfSFs.js → table.worker-C5ofbi7M.js} +1 -1
  33. package/dist/collection/components/cta/cta.js +2 -1
  34. package/dist/collection/components/data-table/table.js +5 -2
  35. package/dist/collection/components/datalist/datalist.js +6 -6
  36. package/dist/collection/components/file-upload/file-upload.css +140 -215
  37. package/dist/collection/components/file-upload/file-upload.js +66 -44
  38. package/dist/collection/components/footer/footer.css +2 -3
  39. package/dist/collection/components/footer/footer.js +4 -3
  40. package/dist/collection/components/progress-bar/progress-bar.css +78 -33
  41. package/dist/collection/components/progress-bar/progress-bar.js +18 -61
  42. package/dist/collection/components/rating/rating.js +4 -4
  43. package/dist/collection/components/resize-observe/resize-observe.js +1 -1
  44. package/dist/collection/components/select/select.js +7 -7
  45. package/dist/collection/components/skeleton/skeleton.js +2 -2
  46. package/dist/collection/components/slides/slide.js +1 -1
  47. package/dist/collection/components/slides/slides.js +3 -3
  48. package/dist/collection/components/sortable/sortable.js +1 -1
  49. package/dist/collection/components/spinner/spinner.js +1 -1
  50. package/dist/collection/components/sticker/sticker.js +2 -2
  51. package/dist/collection/components/table/table.js +2 -2
  52. package/dist/collection/components/tabs/tab-content.js +2 -2
  53. package/dist/collection/components/tabs/tab.js +2 -2
  54. package/dist/collection/components/tag/tag.js +2 -2
  55. package/dist/collection/components/tooltip/tooltip.js +2 -2
  56. package/dist/collection/utils/style.js +16 -2
  57. package/dist/components/cta.js +2 -1
  58. package/dist/components/datalist.js +6 -6
  59. package/dist/components/nano-data-table.js +5 -2
  60. package/dist/components/nano-file-upload.js +58 -33
  61. package/dist/components/nano-footer.js +5 -4
  62. package/dist/components/nano-rating.js +4 -4
  63. package/dist/components/nano-slide.js +1 -1
  64. package/dist/components/nano-sortable.js +1 -1
  65. package/dist/components/nano-tab-content.js +2 -2
  66. package/dist/components/nano-tab.js +2 -2
  67. package/dist/components/nano-table.js +2 -2
  68. package/dist/components/progress-bar.js +7 -23
  69. package/dist/components/resize-observe.js +1 -1
  70. package/dist/components/select.js +7 -7
  71. package/dist/components/skeleton.js +2 -2
  72. package/dist/components/slides.js +3 -3
  73. package/dist/components/spinner.js +1 -1
  74. package/dist/components/sticker.js +2 -2
  75. package/dist/components/style.js +16 -2
  76. package/dist/components/tag.js +2 -2
  77. package/dist/components/tooltip.js +2 -2
  78. package/dist/esm/{fade-BTgTGh6q.js → fade-CnaZvOTY.js} +1 -1
  79. package/dist/esm/{fullscreen-BTpZyXkc.js → fullscreen-BIFliVxG.js} +1 -1
  80. package/dist/esm/index-DXvE-U_j.js +4 -4
  81. package/dist/esm/{lazyload-BYoZ43fz.js → lazyload-D_Ju_KaC.js} +1 -1
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/esm/nano-avatar_5.entry.js +7 -7
  84. package/dist/esm/nano-breadcrumb.entry.js +1 -1
  85. package/dist/esm/nano-collapsible-comparison.entry.js +1 -1
  86. package/dist/esm/nano-components.js +1 -1
  87. package/dist/esm/nano-cta.entry.js +2 -1
  88. package/dist/esm/{nano-data-table-DDBCyBmN.js → nano-data-table-CJbVKIuu.js} +6 -3
  89. package/dist/esm/nano-data-table.entry.js +1 -1
  90. package/dist/esm/nano-datalist_3.entry.js +8 -8
  91. package/dist/esm/nano-file-upload.entry.js +48 -29
  92. package/dist/esm/nano-footer.entry.js +4 -4
  93. package/dist/esm/nano-global-nav.entry.js +1 -1
  94. package/dist/esm/nano-icon_3.entry.js +2 -2
  95. package/dist/esm/nano-progress-bar.entry.js +4 -18
  96. package/dist/esm/nano-rating.entry.js +4 -4
  97. package/dist/esm/nano-resize-observe_2.entry.js +3 -3
  98. package/dist/esm/nano-slide.entry.js +1 -1
  99. package/dist/esm/{nano-slides-CvZxKg4X.js → nano-slides-B9KjZVqC.js} +7 -7
  100. package/dist/esm/nano-slides.entry.js +1 -1
  101. package/dist/esm/nano-sortable.entry.js +1 -1
  102. package/dist/esm/nano-spinner.entry.js +1 -1
  103. package/dist/esm/nano-sticker.entry.js +2 -2
  104. package/dist/esm/nano-tab-content.entry.js +2 -2
  105. package/dist/esm/nano-tab.entry.js +2 -2
  106. package/dist/esm/nano-table.entry.js +2 -2
  107. package/dist/esm/{page-dots-_tkpExQM.js → page-dots-BmS6HUrx.js} +1 -1
  108. package/dist/esm/{style-BrRDhFfF.js → style-xLaX004n.js} +16 -2
  109. package/dist/esm/{table.worker-webIEBZt.js → table.worker-CsTdjWrS.js} +1 -1
  110. package/dist/nano-components/{fade-BTgTGh6q.js → fade-CnaZvOTY.js} +1 -1
  111. package/dist/nano-components/{fullscreen-BTpZyXkc.js → fullscreen-BIFliVxG.js} +1 -1
  112. package/dist/nano-components/{lazyload-BYoZ43fz.js → lazyload-D_Ju_KaC.js} +1 -1
  113. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  114. package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
  115. package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
  116. package/dist/nano-components/nano-components.css +23 -19
  117. package/dist/nano-components/nano-components.esm.js +1 -1
  118. package/dist/nano-components/nano-cta.entry.js +1 -1
  119. package/dist/nano-components/{nano-data-table-DDBCyBmN.js → nano-data-table-CJbVKIuu.js} +1 -1
  120. package/dist/nano-components/nano-data-table.entry.js +1 -1
  121. package/dist/nano-components/nano-datalist_3.entry.js +1 -1
  122. package/dist/nano-components/nano-file-upload.entry.js +1 -1
  123. package/dist/nano-components/nano-footer.entry.js +1 -1
  124. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  125. package/dist/nano-components/nano-icon_3.entry.js +1 -1
  126. package/dist/nano-components/nano-progress-bar.entry.js +1 -1
  127. package/dist/nano-components/nano-rating.entry.js +1 -1
  128. package/dist/nano-components/nano-resize-observe_2.entry.js +1 -1
  129. package/dist/nano-components/nano-slide.entry.js +1 -1
  130. package/dist/nano-components/{nano-slides-CvZxKg4X.js → nano-slides-B9KjZVqC.js} +3 -3
  131. package/dist/nano-components/nano-slides.entry.js +1 -1
  132. package/dist/nano-components/nano-sortable.entry.js +1 -1
  133. package/dist/nano-components/nano-spinner.entry.js +1 -1
  134. package/dist/nano-components/nano-sticker.entry.js +1 -1
  135. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  136. package/dist/nano-components/nano-tab.entry.js +1 -1
  137. package/dist/nano-components/nano-table.entry.js +1 -1
  138. package/dist/nano-components/{page-dots-_tkpExQM.js → page-dots-BmS6HUrx.js} +1 -1
  139. package/dist/nano-components/style-xLaX004n.js +4 -0
  140. package/dist/nano-components/{table.worker-webIEBZt.js → table.worker-CsTdjWrS.js} +1 -1
  141. package/dist/style/components.css +1 -1
  142. package/dist/style/components.css.map +1 -1
  143. package/dist/style/core.css +1 -1
  144. package/dist/style/core.css.map +1 -1
  145. package/dist/style/dark.css +1 -1
  146. package/dist/style/dark.css.map +1 -1
  147. package/dist/style/light.css +1 -1
  148. package/dist/style/light.css.map +1 -1
  149. package/dist/style/nano.css +1 -1
  150. package/dist/style/nano.css.map +1 -1
  151. package/dist/types/components/file-upload/file-upload.d.ts +14 -9
  152. package/dist/types/components/progress-bar/progress-bar.d.ts +6 -13
  153. package/dist/types/components.d.ts +43 -53
  154. package/docs-json.json +111 -172
  155. package/docs-vscode.json +16 -9
  156. package/hydrate/index.js +132 -110
  157. package/hydrate/index.mjs +132 -110
  158. package/package.json +3 -3
  159. package/dist/collection/components/file-upload/file-upload-list.js +0 -3
  160. package/dist/nano-components/style-BrRDhFfF.js +0 -4
  161. package/dist/types/components/file-upload/file-upload-list.d.ts +0 -0
@@ -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"; }
@@ -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
  }
@@ -1,40 +1,18 @@
1
- /*!
2
- * Custom elements for Nanopore-Digital Web applications
3
- */
4
- import { Host } from "@stencil/core";
5
- import { h } from "../../utils/renderer";
6
1
  /**
7
2
  * Shows the status of an ongoing operation.
8
3
  *
9
- * @version 3.0.0
10
- * @status stable
11
- *
12
- * @slot - A label to show inside the indicator.
4
+ * @version 8.0.0
5
+ * @status new
6
+ * @type CSS Only
13
7
  *
14
- * @part base - The component's base wrapper.
15
- * @part indicator - The progress bar indicator.
16
- * @part label - The progress bar label.
8
+ * @slot - Used for mandatory `<progress>` element and optional `<label>`
17
9
  */
18
10
  export class ProgressBar {
19
- host;
20
- /** The progress bar's percentage, 0 to 100. */
21
- value = 0;
22
- /** When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state. */
23
- indeterminate = false;
24
11
  /** Whether to show the progress bar's current percent as text. Will be overwritten if you use the default slot. */
25
12
  showPercent = false;
26
- render() {
27
- return (h(Host, { key: '2d33cb1a93d9b155cef4ea64b1a36a275104ed5c', class: "nano-progress-bar" }, h("div", { key: '1477b01e971f00541af5501df4f42c2d69cb87d4', part: "base", class: {
28
- 'progress-bar': true,
29
- 'progress-bar--indeterminate': this.indeterminate,
30
- }, role: "progressbar", title: this.host.title || undefined, "aria-label": "Progress", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": this.indeterminate ? null : this.value }, h("div", { key: 'dd80b47ed6627db8d93bf20a7ef096d44757ec56', part: "indicator", class: "progress-bar__indicator", style: {
31
- width: !this.indeterminate ? `${this.value}%` : undefined,
32
- } }, h("span", { key: '7b967332cff45da08a49008ac727f247750347ae', part: "label", class: "progress-bar__label" }, h("slot", { key: '5d2c53909892f8c81e151ec64a337e656e7e4dae' }, !this.indeterminate && this.showPercent
33
- ? `${this.value}%`
34
- : ''))))));
35
- }
13
+ /** The height of the progress-bar */
14
+ size = 'medium';
36
15
  static get is() { return "nano-progress-bar"; }
37
- static get encapsulation() { return "shadow"; }
38
16
  static get originalStyleUrls() {
39
17
  return {
40
18
  "$": ["progress-bar.scss"]
@@ -47,29 +25,9 @@ export class ProgressBar {
47
25
  }
48
26
  static get properties() {
49
27
  return {
50
- "value": {
51
- "type": "number",
52
- "attribute": "value",
53
- "mutable": false,
54
- "complexType": {
55
- "original": "number",
56
- "resolved": "number",
57
- "references": {}
58
- },
59
- "required": false,
60
- "optional": false,
61
- "docs": {
62
- "tags": [],
63
- "text": "The progress bar's percentage, 0 to 100."
64
- },
65
- "getter": false,
66
- "setter": false,
67
- "reflect": false,
68
- "defaultValue": "0"
69
- },
70
- "indeterminate": {
28
+ "showPercent": {
71
29
  "type": "boolean",
72
- "attribute": "indeterminate",
30
+ "attribute": "show-percent",
73
31
  "mutable": false,
74
32
  "complexType": {
75
33
  "original": "boolean",
@@ -80,34 +38,33 @@ export class ProgressBar {
80
38
  "optional": false,
81
39
  "docs": {
82
40
  "tags": [],
83
- "text": "When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state."
41
+ "text": "Whether to show the progress bar's current percent as text. Will be overwritten if you use the default slot."
84
42
  },
85
43
  "getter": false,
86
44
  "setter": false,
87
- "reflect": false,
45
+ "reflect": true,
88
46
  "defaultValue": "false"
89
47
  },
90
- "showPercent": {
91
- "type": "boolean",
92
- "attribute": "show-percent",
48
+ "size": {
49
+ "type": "string",
50
+ "attribute": "size",
93
51
  "mutable": false,
94
52
  "complexType": {
95
- "original": "boolean",
96
- "resolved": "boolean",
53
+ "original": "'small' | 'medium' | 'large'",
54
+ "resolved": "\"large\" | \"medium\" | \"small\"",
97
55
  "references": {}
98
56
  },
99
57
  "required": false,
100
58
  "optional": false,
101
59
  "docs": {
102
60
  "tags": [],
103
- "text": "Whether to show the progress bar's current percent as text. Will be overwritten if you use the default slot."
61
+ "text": "The height of the progress-bar"
104
62
  },
105
63
  "getter": false,
106
64
  "setter": false,
107
- "reflect": false,
108
- "defaultValue": "false"
65
+ "reflect": true,
66
+ "defaultValue": "'medium'"
109
67
  }
110
68
  };
111
69
  }
112
- static get elementRef() { return "host"; }
113
70
  }
@@ -166,23 +166,23 @@ export class Rating {
166
166
  else {
167
167
  displayValue = this.isHovering ? this.hoverValue : this.value;
168
168
  }
169
- return (h(Host, { key: 'cecf5fdd43d5b48e55ddd4c69900e82c85c48bee', class: "nano-rating" }, h("div", { key: '87803596623dfc08370dd7e6f0a59bfaed8fcf4f', class: "rating-wrap" }, h("div", { key: '32da5e5a323bf552e5e04403e7594ecc57739b31', dir: this.isRtl ? 'rtl' : null, ref: (el) => (this.rating = el), part: "base", class: {
169
+ return (h(Host, { key: '1f1a4c5f6b8dea2419e75be53db6e74d4455c3c5', class: "nano-rating" }, h("div", { key: '6898eef81bc7e3d634b3054a4694f49db79929c8', class: "rating-wrap" }, h("div", { key: 'bbad068f69e99c12083bb53c00a25b2dff02ddb7', dir: this.isRtl ? 'rtl' : null, ref: (el) => (this.rating = el), part: "base", class: {
170
170
  rating: true,
171
171
  'rating--readonly': this.readonly,
172
172
  'rating--disabled': this.disabled,
173
- }, "aria-disabled": this.disabled ? 'true' : 'false', "aria-readonly": this.readonly ? 'true' : 'false', "aria-valuenow": this.value, "aria-valuemin": 0, "aria-valuemax": this.max, tabIndex: this.disabled ? -1 : 0, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onMouseMove: this.handleMouseMove, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("span", { key: 'cab05324ead1b6e539e6c162ab0a9f2488a3a801', class: "rating__symbols rating__symbols--inactive" }, counter.map((index) => (h("span", { class: {
173
+ }, "aria-disabled": this.disabled ? 'true' : 'false', "aria-readonly": this.readonly ? 'true' : 'false', "aria-valuenow": this.value, "aria-valuemin": 0, "aria-valuemax": this.max, tabIndex: this.disabled ? -1 : 0, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onMouseMove: this.handleMouseMove, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("span", { key: 'd2518d1ec73803cdc284c64ff4fcee9c86f6077d', class: "rating__symbols rating__symbols--inactive" }, counter.map((index) => (h("span", { class: {
174
174
  rating__symbol: true,
175
175
  'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1,
176
176
  },
177
177
  // Users can click the current value to clear the rating. When this happens, we set this.isHovering to
178
178
  // false to prevent the hover state from confusing them as they move the mouse out of the control. This
179
179
  // extra mouseenter will reinstate it if they happen to mouse over an adjacent symbol.
180
- onMouseEnter: this.handleMouseEnter, innerHTML: this.symbol(index + 1) })))), h("span", { key: 'd369b4d296ba7c763777422a7885a78d0175e0c8', ref: (span) => (this.indicator = span), class: "rating__symbols rating__symbols--indicator", style: {
180
+ onMouseEnter: this.handleMouseEnter, innerHTML: this.symbol(index + 1) })))), h("span", { key: '046a97718d174445372c909eee0d061c4effd770', ref: (span) => (this.indicator = span), class: "rating__symbols rating__symbols--indicator", style: {
181
181
  clip: this.clip(displayValue),
182
182
  } }, counter.map((index) => (h("span", { class: {
183
183
  rating__symbol: true,
184
184
  'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1,
185
- }, innerHTML: this.symbol(index + 1) })))), h("input", { key: 'd1cfd5eeb33163a3c0f02cde0234bbf0ddbd2805', type: "hidden", name: this.name, value: this.value, disabled: this.disabled || this.readonly })))));
185
+ }, innerHTML: this.symbol(index + 1) })))), h("input", { key: '8a0a62b7419a719e2a2cf08e361aae299dea7d65', type: "hidden", name: this.name, value: this.value, disabled: this.disabled || this.readonly })))));
186
186
  }
187
187
  static get is() { return "nano-rating"; }
188
188
  static get encapsulation() { return "scoped"; }
@@ -227,7 +227,7 @@ export class ResizeObserve {
227
227
  this.ro.disconnect();
228
228
  }
229
229
  render() {
230
- return (h(Host, { key: 'c18db95f590c660cc2c0e1dd1f2d2a0c66e63a54', class: "nano-resize-observe" }, h("slot", { key: '25cd2b6762d1bb05d5182fd817b758256ce6750a' }), !!this.notifyContentFit &&
230
+ return (h(Host, { key: '67ae39458d0f21c7100481c6aa68f9455e468d86', class: "nano-resize-observe" }, h("slot", { key: '503108cec78fcfda303a9e392e1903ec7acfc244' }), !!this.notifyContentFit &&
231
231
  (this.contentFitX !== null || this.contentFitY !== null) && [
232
232
  this.contentFitX ? (h("slot", { name: "content-fit-x" })) : (h("slot", { name: "content-nofit-x" })),
233
233
  this.contentFitY ? (h("slot", { name: "content-fit-y" })) : (h("slot", { name: "content-nofit-y" })),