@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.
- package/dist/cjs/{fade-C3xL9ihU.js → fade-Dt8ydSYD.js} +1 -1
- package/dist/cjs/{fullscreen-pHBD1-3e.js → fullscreen-D_o31hdQ.js} +1 -1
- package/dist/cjs/index-IR1lkhwT.js +6 -6
- package/dist/cjs/{lazyload-D2pj9J7r.js → lazyload-obUQkoFT.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-avatar_5.cjs.entry.js +7 -7
- package/dist/cjs/nano-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +2 -2
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-cta.cjs.entry.js +2 -1
- package/dist/cjs/{nano-data-table-BkyqQiTG.js → nano-data-table-Zj71h_Hm.js} +8 -5
- package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +8 -8
- package/dist/cjs/nano-file-upload.cjs.entry.js +48 -29
- package/dist/cjs/nano-footer.cjs.entry.js +3 -3
- package/dist/cjs/nano-global-nav.cjs.entry.js +10 -10
- package/dist/cjs/nano-grid_2.cjs.entry.js +3 -3
- package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-progress-bar.cjs.entry.js +3 -17
- package/dist/cjs/nano-rating.cjs.entry.js +4 -4
- package/dist/cjs/{nano-resize-observe_2.cjs.entry.js → nano-resize-observe.cjs.entry.js} +1 -19
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/{nano-slides-B3-XISfn.js → nano-slides-BcdSNmlz.js} +7 -7
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-table.cjs.entry.js +2 -2
- package/dist/cjs/{page-dots-DHz-mQDL.js → page-dots-CUrSK-1M.js} +1 -1
- package/dist/cjs/{style-BccHkuhC.js → style-Bf3iH5GX.js} +16 -2
- package/dist/cjs/{table.worker-NnDnfSFs.js → table.worker-D7-NI7ZI.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb.css +2 -125
- package/dist/collection/components/breadcrumb/breadcrumb.js +3 -2
- package/dist/collection/components/collapsible-comparison/collapsible-comparison.js +4 -3
- package/dist/collection/components/cta/cta.js +2 -1
- package/dist/collection/components/data-table/table.css +2 -7
- package/dist/collection/components/data-table/table.js +6 -3
- package/dist/collection/components/datalist/datalist.js +6 -6
- package/dist/collection/components/file-upload/file-upload.css +140 -215
- package/dist/collection/components/file-upload/file-upload.js +66 -44
- package/dist/collection/components/footer/footer.css +2 -3
- package/dist/collection/components/footer/footer.js +4 -3
- package/dist/collection/components/global-nav/global-nav.js +12 -11
- package/dist/collection/components/img/img.js +3 -3
- package/dist/collection/components/progress-bar/progress-bar.css +78 -33
- package/dist/collection/components/progress-bar/progress-bar.js +18 -61
- package/dist/collection/components/rating/rating.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +1 -1
- package/dist/collection/components/select/select.js +7 -7
- package/dist/collection/components/slides/slide.js +1 -1
- package/dist/collection/components/slides/slides.js +3 -3
- package/dist/collection/components/sortable/sortable.js +1 -1
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/sticker/sticker.js +2 -2
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/tabs/tab-content.js +2 -2
- package/dist/collection/components/tabs/tab.js +2 -2
- package/dist/collection/components/tag/tag.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/style.js +16 -2
- package/dist/components/cta.js +2 -1
- package/dist/components/datalist.js +6 -6
- package/dist/components/img.js +5 -11
- package/dist/components/nano-breadcrumb.js +4 -3
- package/dist/components/nano-collapsible-comparison.js +4 -3
- package/dist/components/nano-data-table.js +17 -20
- package/dist/components/nano-file-upload.js +58 -33
- package/dist/components/nano-footer.js +5 -4
- package/dist/components/nano-global-nav.js +12 -11
- package/dist/components/nano-hero.js +6 -12
- package/dist/components/nano-rating.js +4 -4
- package/dist/components/nano-slide.js +1 -1
- package/dist/components/nano-sortable.js +1 -1
- package/dist/components/nano-tab-content.js +2 -2
- package/dist/components/nano-tab.js +2 -2
- package/dist/components/nano-table.js +2 -2
- package/dist/components/progress-bar.js +7 -23
- package/dist/components/resize-observe.js +1 -1
- package/dist/components/select.js +7 -7
- package/dist/components/slides.js +3 -3
- package/dist/components/spinner.js +1 -1
- package/dist/components/sticker.js +2 -2
- package/dist/components/style.js +16 -2
- package/dist/components/tag.js +2 -2
- package/dist/components/tooltip.js +2 -2
- package/dist/esm/{fade-BTgTGh6q.js → fade-DcRXMf28.js} +1 -1
- package/dist/esm/{fullscreen-BTpZyXkc.js → fullscreen-BQyi4GFz.js} +1 -1
- package/dist/esm/index-DXvE-U_j.js +6 -6
- package/dist/esm/{lazyload-BYoZ43fz.js → lazyload-C00srsFN.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-avatar_5.entry.js +7 -7
- package/dist/esm/nano-breadcrumb.entry.js +2 -2
- package/dist/esm/nano-collapsible-comparison.entry.js +2 -2
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-cta.entry.js +2 -1
- package/dist/esm/{nano-data-table-DDBCyBmN.js → nano-data-table-wGnglzmF.js} +8 -5
- package/dist/esm/nano-data-table.entry.js +1 -1
- package/dist/esm/nano-datalist_3.entry.js +8 -8
- package/dist/esm/nano-file-upload.entry.js +48 -29
- package/dist/esm/nano-footer.entry.js +4 -4
- package/dist/esm/nano-global-nav.entry.js +10 -10
- package/dist/esm/nano-grid_2.entry.js +3 -3
- package/dist/esm/nano-icon_3.entry.js +2 -2
- package/dist/esm/nano-progress-bar.entry.js +4 -18
- package/dist/esm/nano-rating.entry.js +4 -4
- package/dist/esm/{nano-resize-observe_2.entry.js → nano-resize-observe.entry.js} +2 -19
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/{nano-slides-CvZxKg4X.js → nano-slides-g94uYmWm.js} +7 -7
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/nano-sortable.entry.js +1 -1
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-sticker.entry.js +2 -2
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-table.entry.js +2 -2
- package/dist/esm/{page-dots-_tkpExQM.js → page-dots-B947EGDd.js} +1 -1
- package/dist/esm/{style-BrRDhFfF.js → style-xLaX004n.js} +16 -2
- package/dist/esm/{table.worker-webIEBZt.js → table.worker-DQJ9Zgy3.js} +1 -1
- package/dist/nano-components/{fade-BTgTGh6q.js → fade-DcRXMf28.js} +1 -1
- package/dist/nano-components/{fullscreen-BTpZyXkc.js → fullscreen-BQyi4GFz.js} +1 -1
- package/dist/nano-components/{lazyload-BYoZ43fz.js → lazyload-C00srsFN.js} +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
- package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
- package/dist/nano-components/nano-components.css +149 -19
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-cta.entry.js +1 -1
- package/dist/nano-components/{nano-data-table-DDBCyBmN.js → nano-data-table-wGnglzmF.js} +1 -1
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js +1 -1
- package/dist/nano-components/nano-file-upload.entry.js +1 -1
- package/dist/nano-components/nano-footer.entry.js +1 -1
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/nano-progress-bar.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js +1 -1
- package/dist/nano-components/nano-resize-observe.entry.js +4 -0
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/{nano-slides-CvZxKg4X.js → nano-slides-g94uYmWm.js} +3 -3
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/nano-sortable.entry.js +1 -1
- package/dist/nano-components/nano-spinner.entry.js +1 -1
- package/dist/nano-components/nano-sticker.entry.js +1 -1
- package/dist/nano-components/nano-tab-content.entry.js +1 -1
- package/dist/nano-components/nano-tab.entry.js +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{page-dots-_tkpExQM.js → page-dots-B947EGDd.js} +1 -1
- package/dist/nano-components/style-xLaX004n.js +4 -0
- package/dist/nano-components/{table.worker-webIEBZt.js → table.worker-DQJ9Zgy3.js} +1 -1
- package/dist/style/components.css +1 -1
- package/dist/style/components.css.map +1 -1
- package/dist/style/core.css +1 -1
- package/dist/style/core.css.map +1 -1
- package/dist/style/dark.css +1 -1
- package/dist/style/dark.css.map +1 -1
- package/dist/style/light.css +1 -1
- package/dist/style/light.css.map +1 -1
- package/dist/style/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/dist/types/components/collapsible-comparison/collapsible-comparison.d.ts +1 -1
- package/dist/types/components/file-upload/file-upload.d.ts +14 -9
- package/dist/types/components/progress-bar/progress-bar.d.ts +6 -13
- package/dist/types/components.d.ts +43 -96
- package/docs-json.json +111 -261
- package/docs-vscode.json +16 -22
- package/hydrate/index.js +130 -212
- package/hydrate/index.mjs +130 -212
- package/package.json +3 -3
- package/dist/collection/components/file-upload/file-upload-list.js +0 -3
- package/dist/collection/components/skeleton/skeleton.css +0 -83
- package/dist/collection/components/skeleton/skeleton.js +0 -57
- package/dist/components/nano-skeleton.d.ts +0 -11
- package/dist/components/nano-skeleton.js +0 -9
- package/dist/components/skeleton.js +0 -41
- package/dist/nano-components/nano-resize-observe_2.entry.js +0 -4
- package/dist/nano-components/style-BrRDhFfF.js +0 -4
- package/dist/types/components/file-upload/file-upload-list.d.ts +0 -0
- package/dist/types/components/skeleton/skeleton.d.ts +0 -12
@@ -18,11 +18,14 @@ catch {
|
|
18
18
|
}
|
19
19
|
}
|
20
20
|
/**
|
21
|
-
*
|
21
|
+
* Enables the selection of files for upload.
|
22
22
|
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
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
|
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
|
-
|
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 = '
|
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 =
|
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.
|
235
|
-
error =
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
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("
|
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.
|
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: '
|
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
|
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":
|
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":
|
530
|
-
"setter":
|
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
|
-
"
|
635
|
+
"clearable": {
|
614
636
|
"type": "boolean",
|
615
|
-
"attribute": "
|
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": "'
|
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": "
|
715
|
+
"type": "any",
|
694
716
|
"attribute": "invalid",
|
695
717
|
"mutable": false,
|
696
718
|
"complexType": {
|
697
|
-
"original": "
|
698
|
-
"resolved": "
|
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": "
|
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-
|
88
|
-
color: var(--nano-color-
|
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
|
-
|
25
|
+
if (Build.isBrowser)
|
26
|
+
addGlobalStylesheetToShadow(this.host.shadowRoot);
|
26
27
|
}
|
27
28
|
render() {
|
28
|
-
return (h("footer", { key: '
|
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
|
-
|
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: '
|
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: '
|
495
|
+
} }, h("div", { key: 'c8dfcf4b405c72a14f576fb7b14ce41e8ff49b83', class: {
|
495
496
|
gn: true,
|
496
497
|
'gn__search-open': this.searchBarShown,
|
497
|
-
} }, h("nano-drawer", { key: '
|
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: '
|
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: '
|
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: '
|
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: '
|
514
|
-
]))))), h("div", { key: '
|
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: '
|
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("
|
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: '
|
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: '
|
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 --
|
41
|
-
* @prop --track-color:
|
42
|
-
* @prop --
|
43
|
-
* @prop --
|
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
|
-
|
46
|
-
--
|
47
|
-
--track-color:
|
48
|
-
--
|
49
|
-
--
|
50
|
-
display:
|
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
|
-
|
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
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
-
|
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
|
}
|