@nanoporetech-digital/components 8.0.0-alpha.1 → 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.
- package/dist/cjs/{algolia-data-CFc_52My.js → algolia-data-CSD3I9WJ.js} +1 -1
- package/dist/cjs/{component-store-DdyLi-VY.js → component-store-DS6c_IIg.js} +1 -1
- package/dist/cjs/{dom-CvQQBdol.js → dom-3kyE_RMm.js} +1 -1
- package/dist/cjs/{fade-Bq3U8uF7.js → fade-CqKYrZYq.js} +3 -3
- package/dist/cjs/{form-control-gUYfW0n-.js → form-control-BVH0tPGy.js} +2 -2
- package/dist/cjs/{fullscreen-Czdw-D-5.js → fullscreen-D-fHJ_IJ.js} +3 -3
- package/dist/cjs/{index-B76C6Tm9.js → index-IR1lkhwT.js} +157 -136
- package/dist/cjs/{index-ChTXweZN.js → index-yq5hsIxW.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{lazyload-BpoUFECt.js → lazyload-DK1ITMfR.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{modal-DddxtK2h.js → modal-DZVjwBg8.js} +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +3 -3
- package/dist/cjs/nano-alert.cjs.entry.js +7 -7
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +4 -4
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia.cjs.entry.js +5 -5
- package/dist/cjs/nano-animation.cjs.entry.js +3 -3
- package/dist/cjs/nano-avatar_5.cjs.entry.js +16 -16
- package/dist/cjs/nano-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/nano-card-carousel.cjs.entry.js +2 -2
- package/dist/cjs/nano-card.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/nano-checkbox.cjs.entry.js +6 -6
- package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +3 -3
- package/dist/cjs/nano-components.cjs.js +3 -3
- package/dist/cjs/nano-content-links.cjs.entry.js +1 -1
- package/dist/cjs/nano-cta.cjs.entry.js +10 -8
- package/dist/cjs/{nano-data-table-BNwDI1rg.js → nano-data-table-C_KLyFMO.js} +10 -7
- package/dist/cjs/nano-data-table.cjs.entry.js +6 -6
- package/dist/cjs/nano-datalist_3.cjs.entry.js +11 -11
- package/dist/cjs/nano-date-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-date-picker_2.cjs.entry.js +4 -4
- package/dist/cjs/nano-details.cjs.entry.js +3 -3
- package/dist/cjs/nano-dialog.cjs.entry.js +8 -8
- package/dist/cjs/nano-dropdown_2.cjs.entry.js +5 -5
- package/dist/cjs/nano-field-validator.cjs.entry.js +3 -3
- package/dist/cjs/nano-file-upload.cjs.entry.js +50 -31
- package/dist/cjs/nano-footer.cjs.entry.js +4 -4
- package/dist/cjs/nano-global-nav.cjs.entry.js +19 -15
- package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +2 -2
- package/dist/cjs/nano-hero.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon_3.cjs.entry.js +4 -4
- package/dist/cjs/nano-in-page-nav.cjs.entry.js +3 -3
- package/dist/cjs/nano-intersection-observe.cjs.entry.js +4 -4
- package/dist/cjs/nano-masked-overflow.cjs.entry.js +9 -9
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +3 -3
- package/dist/cjs/nano-more-less.cjs.entry.js +4 -4
- package/dist/cjs/nano-nav-item.cjs.entry.js +5 -5
- package/dist/cjs/nano-progress-bar.cjs.entry.js +4 -18
- package/dist/cjs/nano-range.cjs.entry.js +2 -2
- package/dist/cjs/nano-rating.cjs.entry.js +6 -6
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +5 -5
- package/dist/cjs/nano-slide.cjs.entry.js +3 -3
- package/dist/cjs/{nano-slides-Cj4figHV.js → nano-slides-BhpvytBB.js} +9 -9
- package/dist/cjs/nano-slides.cjs.entry.js +3 -3
- package/dist/cjs/nano-sortable.cjs.entry.js +3 -3
- package/dist/cjs/nano-spinner.cjs.entry.js +3 -3
- package/dist/cjs/nano-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/nano-sticker.cjs.entry.js +6 -6
- package/dist/cjs/nano-tab-content.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab.cjs.entry.js +4 -4
- package/dist/cjs/nano-table.cjs.entry.js +5 -5
- package/dist/cjs/{page-dots-E6b7S4vs.js → page-dots-DeSuT5bE.js} +3 -3
- package/dist/cjs/{renderer-Z8wHFL4e.js → renderer-h0yo23iy.js} +1 -1
- package/dist/cjs/{scroll-DspYj7mY.js → scroll-_aiH0KkA.js} +1 -1
- package/dist/cjs/{slot-B4QUWT-c.js → slot-Hlplqf1Z.js} +1 -1
- package/dist/cjs/{style-BccHkuhC.js → style-Bf3iH5GX.js} +16 -2
- package/dist/cjs/{tabbable-YPytg5sg.js → tabbable-CkzmpQhq.js} +1 -1
- package/dist/cjs/{table.worker-bFxUCos7.js → table.worker-C5ofbi7M.js} +6 -6
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/animation/animation.js +4 -1
- package/dist/collection/components/checkbox/checkbox.js +4 -4
- package/dist/collection/components/cta/cta.js +9 -11
- package/dist/collection/components/data-table/table.js +5 -2
- 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/form-control/form-control.js +1 -1
- package/dist/collection/components/global-nav/global-nav.js +35 -14
- package/dist/collection/components/masked-overflow/masked-overflow.css +3 -4
- package/dist/collection/components/masked-overflow/masked-overflow.js +8 -6
- package/dist/collection/components/more-less/more-less.js +6 -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/skeleton/skeleton.js +2 -2
- package/dist/collection/components/slides/slide.js +1 -1
- package/dist/collection/components/slides/slides.js +4 -4
- 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 +3 -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 +11 -9
- package/dist/components/datalist.js +6 -6
- package/dist/components/form-control.js +1 -1
- package/dist/components/masked-overflow.js +5 -5
- package/dist/components/nano-animation.js +1 -1
- package/dist/components/nano-checkbox.js +4 -4
- package/dist/components/nano-data-table.js +5 -2
- package/dist/components/nano-file-upload.js +58 -33
- package/dist/components/nano-footer.js +5 -4
- package/dist/components/nano-global-nav.js +18 -13
- package/dist/components/nano-more-less.js +2 -2
- 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 +4 -4
- 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/skeleton.js +2 -2
- 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/{algolia-data-CCqzaIh4.js → algolia-data-D6wnbV__.js} +1 -1
- package/dist/esm/{component-store-C-YnXSQE.js → component-store-CH5BI3Tg.js} +1 -1
- package/dist/esm/{dom-GYcqUAl_.js → dom-Cb7FUtXp.js} +1 -1
- package/dist/esm/{fade-C3aqZinc.js → fade-CnaZvOTY.js} +3 -3
- package/dist/esm/{form-control-BjKTwcqA.js → form-control-BOVGZF9R.js} +2 -2
- package/dist/esm/{fullscreen-T7b44-vN.js → fullscreen-BIFliVxG.js} +3 -3
- package/dist/esm/{index-DOuz1S3w.js → index-DXvE-U_j.js} +157 -136
- package/dist/esm/{index-DkZY6pJu.js → index-Dw3NZx59.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{lazyload-BdH0bSmg.js → lazyload-D_Ju_KaC.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{modal-s7sHBYzQ.js → modal-B_AxJQQp.js} +1 -1
- package/dist/esm/nano-accordion.entry.js +3 -3
- package/dist/esm/nano-alert.entry.js +7 -7
- package/dist/esm/nano-algolia-filter.entry.js +4 -4
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +3 -3
- package/dist/esm/nano-algolia.entry.js +5 -5
- package/dist/esm/nano-animation.entry.js +3 -3
- package/dist/esm/nano-avatar_5.entry.js +16 -16
- package/dist/esm/nano-breadcrumb.entry.js +2 -2
- package/dist/esm/nano-card-carousel.entry.js +2 -2
- package/dist/esm/nano-card.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +2 -2
- package/dist/esm/nano-checkbox.entry.js +6 -6
- package/dist/esm/nano-collapsible-comparison.entry.js +3 -3
- package/dist/esm/nano-components.js +4 -4
- package/dist/esm/nano-content-links.entry.js +1 -1
- package/dist/esm/nano-cta.entry.js +10 -8
- package/dist/esm/{nano-data-table-Bm9J8Phu.js → nano-data-table-CJbVKIuu.js} +10 -7
- package/dist/esm/nano-data-table.entry.js +6 -6
- package/dist/esm/nano-datalist_3.entry.js +11 -11
- package/dist/esm/nano-date-input.entry.js +2 -2
- package/dist/esm/nano-date-picker_2.entry.js +4 -4
- package/dist/esm/nano-details.entry.js +3 -3
- package/dist/esm/nano-dialog.entry.js +8 -8
- package/dist/esm/nano-dropdown_2.entry.js +5 -5
- package/dist/esm/nano-field-validator.entry.js +3 -3
- package/dist/esm/nano-file-upload.entry.js +50 -31
- package/dist/esm/nano-footer.entry.js +4 -4
- package/dist/esm/nano-global-nav.entry.js +19 -15
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +2 -2
- package/dist/esm/nano-hero.entry.js +2 -2
- package/dist/esm/nano-icon-item.entry.js +1 -1
- package/dist/esm/nano-icon_3.entry.js +4 -4
- package/dist/esm/nano-in-page-nav.entry.js +3 -3
- package/dist/esm/nano-intersection-observe.entry.js +4 -4
- package/dist/esm/nano-masked-overflow.entry.js +9 -9
- package/dist/esm/nano-menu-drawer.entry.js +3 -3
- package/dist/esm/nano-more-less.entry.js +4 -4
- package/dist/esm/nano-nav-item.entry.js +5 -5
- package/dist/esm/nano-progress-bar.entry.js +4 -18
- package/dist/esm/nano-range.entry.js +2 -2
- package/dist/esm/nano-rating.entry.js +6 -6
- package/dist/esm/nano-resize-observe_2.entry.js +5 -5
- package/dist/esm/nano-slide.entry.js +3 -3
- package/dist/esm/{nano-slides-BEE7xEu_.js → nano-slides-B9KjZVqC.js} +9 -9
- package/dist/esm/nano-slides.entry.js +3 -3
- package/dist/esm/nano-sortable.entry.js +3 -3
- package/dist/esm/nano-spinner.entry.js +3 -3
- package/dist/esm/nano-split-pane.entry.js +2 -2
- package/dist/esm/nano-sticker.entry.js +6 -6
- package/dist/esm/nano-tab-content.entry.js +4 -4
- package/dist/esm/nano-tab-group.entry.js +4 -4
- package/dist/esm/nano-tab.entry.js +4 -4
- package/dist/esm/nano-table.entry.js +5 -5
- package/dist/esm/{page-dots-D2WI1eZ0.js → page-dots-BmS6HUrx.js} +3 -3
- package/dist/esm/{renderer-CnE0Hztu.js → renderer-BUaAsDso.js} +1 -1
- package/dist/esm/{scroll-DHa1CIPP.js → scroll-iCYjzh9N.js} +1 -1
- package/dist/esm/{slot-lixS0pd2.js → slot-DYFgWo5f.js} +1 -1
- package/dist/esm/{style-BrRDhFfF.js → style-xLaX004n.js} +16 -2
- package/dist/esm/{tabbable-QmV19K7Q.js → tabbable-C4l-rYq9.js} +1 -1
- package/dist/esm/{table.worker-zeRR3oed.js → table.worker-CsTdjWrS.js} +6 -6
- package/dist/nano-components/{algolia-data-CCqzaIh4.js → algolia-data-D6wnbV__.js} +1 -1
- package/dist/nano-components/{component-store-C-YnXSQE.js → component-store-CH5BI3Tg.js} +1 -1
- package/dist/nano-components/{dom-GYcqUAl_.js → dom-Cb7FUtXp.js} +1 -1
- package/dist/nano-components/{fade-C3aqZinc.js → fade-CnaZvOTY.js} +1 -1
- package/dist/nano-components/form-control-BOVGZF9R.js +4 -0
- package/dist/nano-components/{fullscreen-T7b44-vN.js → fullscreen-BIFliVxG.js} +1 -1
- package/dist/nano-components/index-DXvE-U_j.js +5 -0
- package/dist/nano-components/{index-DkZY6pJu.js → index-Dw3NZx59.js} +1 -1
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/{lazyload-BdH0bSmg.js → lazyload-D_Ju_KaC.js} +1 -1
- package/dist/nano-components/{modal-s7sHBYzQ.js → modal-B_AxJQQp.js} +1 -1
- package/dist/nano-components/nano-accordion.entry.js +1 -1
- package/dist/nano-components/nano-alert.entry.js +1 -1
- package/dist/nano-components/nano-algolia-filter.entry.js +1 -1
- package/dist/nano-components/nano-algolia-pagination.entry.js +1 -1
- package/dist/nano-components/nano-algolia-results.entry.js +1 -1
- package/dist/nano-components/nano-algolia.entry.js +1 -1
- package/dist/nano-components/nano-animation.entry.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-card-carousel.entry.js +1 -1
- package/dist/nano-components/nano-card.entry.js +1 -1
- package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
- package/dist/nano-components/nano-checkbox.entry.js +1 -1
- package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
- package/dist/nano-components/nano-components.css +24 -20
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-content-links.entry.js +1 -1
- package/dist/nano-components/nano-cta.entry.js +1 -1
- package/dist/nano-components/{nano-data-table-Bm9J8Phu.js → nano-data-table-CJbVKIuu.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-date-input.entry.js +1 -1
- package/dist/nano-components/nano-date-picker_2.entry.js +1 -1
- package/dist/nano-components/nano-details.entry.js +1 -1
- package/dist/nano-components/nano-dialog.entry.js +1 -1
- package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
- package/dist/nano-components/nano-field-validator.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-item.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/nano-hero.entry.js +1 -1
- package/dist/nano-components/nano-icon-item.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
- package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
- package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
- package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
- package/dist/nano-components/nano-more-less.entry.js +1 -1
- package/dist/nano-components/nano-nav-item.entry.js +1 -1
- package/dist/nano-components/nano-progress-bar.entry.js +1 -1
- package/dist/nano-components/nano-range.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js +1 -1
- package/dist/nano-components/nano-resize-observe_2.entry.js +1 -1
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/{nano-slides-BEE7xEu_.js → nano-slides-B9KjZVqC.js} +4 -4
- 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-split-pane.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-group.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-D2WI1eZ0.js → page-dots-BmS6HUrx.js} +1 -1
- package/dist/nano-components/{renderer-CnE0Hztu.js → renderer-BUaAsDso.js} +1 -1
- package/dist/nano-components/{scroll-DHa1CIPP.js → scroll-iCYjzh9N.js} +1 -1
- package/dist/nano-components/{slot-lixS0pd2.js → slot-DYFgWo5f.js} +1 -1
- package/dist/nano-components/style-xLaX004n.js +4 -0
- package/dist/nano-components/{tabbable-QmV19K7Q.js → tabbable-C4l-rYq9.js} +1 -1
- package/dist/nano-components/table.worker-CsTdjWrS.js +4 -0
- 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/animation/animation.d.ts +3 -0
- package/dist/types/components/cta/cta.d.ts +0 -2
- package/dist/types/components/file-upload/file-upload.d.ts +14 -9
- package/dist/types/components/global-nav/global-nav.d.ts +4 -2
- package/dist/types/components/masked-overflow/masked-overflow.d.ts +4 -2
- package/dist/types/components/more-less/more-less.d.ts +4 -1
- package/dist/types/components/progress-bar/progress-bar.d.ts +6 -13
- package/dist/types/components/slides/slides-interface.d.ts +1 -1
- package/dist/types/components.d.ts +83 -69
- package/docs-json.json +171 -186
- package/docs-vscode.json +18 -11
- package/hydrate/index.js +299 -254
- package/hydrate/index.mjs +299 -254
- package/package.json +2 -2
- package/dist/collection/components/file-upload/file-upload-list.js +0 -3
- package/dist/nano-components/form-control-BjKTwcqA.js +0 -4
- package/dist/nano-components/index-DOuz1S3w.js +0 -5
- package/dist/nano-components/style-BrRDhFfF.js +0 -4
- package/dist/nano-components/table.worker-zeRR3oed.js +0 -4
- 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
|
-
*
|
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"; }
|
@@ -22,7 +22,7 @@ export const FormControlWrap = (props, children) => {
|
|
22
22
|
'has-float-label': label !== null && floatLabel,
|
23
23
|
'has-helper-end': hasHelperEndSlot,
|
24
24
|
rtl,
|
25
|
-
[props.class]:
|
25
|
+
[props.class]: !!props.class,
|
26
26
|
} }, h("div", { class: "form-ctrl__wrapper" }, !floatLabel ? renderLabel({ ...props }) : '', h("div", { class: {
|
27
27
|
'form-ctrl__input': true,
|
28
28
|
'form-ctrl__textarea': type === 'textarea',
|
@@ -61,9 +61,13 @@ export class GlobalNav {
|
|
61
61
|
cartCount = 0;
|
62
62
|
/** MyAccount un-read message count. */
|
63
63
|
msgCount = 0;
|
64
|
-
/** Manually
|
65
|
-
async
|
66
|
-
this.overflowOpen =
|
64
|
+
/** Manually open the overflow menu */
|
65
|
+
async openOverflowMenu() {
|
66
|
+
this.overflowOpen = true;
|
67
|
+
}
|
68
|
+
/** Manually close the overflow menu */
|
69
|
+
async closeOverflowMenu() {
|
70
|
+
this.overflowOpen = false;
|
67
71
|
}
|
68
72
|
/// MY-ACCOUNT - start ///
|
69
73
|
/** A base url to retrieve global nav / sso data. `nav_bar_data.json` will be appended to this url */
|
@@ -483,20 +487,20 @@ export class GlobalNav {
|
|
483
487
|
}
|
484
488
|
render() {
|
485
489
|
const bpps = this.bpPartials;
|
486
|
-
return (h(Host, { key: '
|
490
|
+
return (h(Host, { key: '184e0e7a9468ebb9d60cfac752d955358a4fe0fe', class: {
|
487
491
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
488
492
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
489
493
|
'nano-global-nav': true,
|
490
|
-
} }, h("div", { key: '
|
494
|
+
} }, h("div", { key: '8eaa12e98b9a38721b9f03e2d646d20add74b3e6', class: {
|
491
495
|
gn: true,
|
492
496
|
'gn__search-open': this.searchBarShown,
|
493
|
-
} }, h("nano-drawer", { key: '
|
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
|
494
498
|
? bpps.mainMenu.tpl()
|
495
|
-
: '', h("slot", { key: '
|
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,
|
496
500
|
(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,
|
497
|
-
(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: '
|
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) => {
|
498
502
|
this.handleSearchTermChangeEvent(e.detail.value);
|
499
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
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 && [
|
500
504
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
501
505
|
searchInsight.sendClick({
|
502
506
|
index: this.activeIndex.index,
|
@@ -506,10 +510,10 @@ export class GlobalNav {
|
|
506
510
|
positions: [i + 1],
|
507
511
|
});
|
508
512
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
509
|
-
h("nano-option", { key: '
|
510
|
-
]))))), h("div", { key: '
|
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
|
511
515
|
? bpps.contact.tpl()
|
512
|
-
: '', 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: '
|
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' }))))));
|
513
517
|
}
|
514
518
|
static get is() { return "nano-global-nav"; }
|
515
519
|
static get encapsulation() { return "shadow"; }
|
@@ -915,7 +919,24 @@ export class GlobalNav {
|
|
915
919
|
}
|
916
920
|
static get methods() {
|
917
921
|
return {
|
918
|
-
"
|
922
|
+
"openOverflowMenu": {
|
923
|
+
"complexType": {
|
924
|
+
"signature": "() => Promise<void>",
|
925
|
+
"parameters": [],
|
926
|
+
"references": {
|
927
|
+
"Promise": {
|
928
|
+
"location": "global",
|
929
|
+
"id": "global::Promise"
|
930
|
+
}
|
931
|
+
},
|
932
|
+
"return": "Promise<void>"
|
933
|
+
},
|
934
|
+
"docs": {
|
935
|
+
"text": "Manually open the overflow menu",
|
936
|
+
"tags": []
|
937
|
+
}
|
938
|
+
},
|
939
|
+
"closeOverflowMenu": {
|
919
940
|
"complexType": {
|
920
941
|
"signature": "() => Promise<void>",
|
921
942
|
"parameters": [],
|
@@ -928,7 +949,7 @@ export class GlobalNav {
|
|
928
949
|
"return": "Promise<void>"
|
929
950
|
},
|
930
951
|
"docs": {
|
931
|
-
"text": "Manually
|
952
|
+
"text": "Manually close the overflow menu",
|
932
953
|
"tags": []
|
933
954
|
}
|
934
955
|
},
|
@@ -159,8 +159,7 @@
|
|
159
159
|
.onav--horizontal .onav__items {
|
160
160
|
flex-direction: row;
|
161
161
|
}
|
162
|
-
.
|
163
|
-
content: "";
|
162
|
+
.onav--horizontal .onav__items::before {
|
164
163
|
inline-size: 100%;
|
165
164
|
block-size: var(--indicator-track-size);
|
166
165
|
inset-block-end: 0;
|
@@ -186,6 +185,7 @@
|
|
186
185
|
}
|
187
186
|
.onav--vertical .onav__nav {
|
188
187
|
max-block-size: 100%;
|
188
|
+
min-inline-size: 100%;
|
189
189
|
display: flex;
|
190
190
|
}
|
191
191
|
.onav--vertical .onav__scroller {
|
@@ -220,8 +220,7 @@
|
|
220
220
|
flex-direction: column;
|
221
221
|
inline-size: fit-content;
|
222
222
|
}
|
223
|
-
.
|
224
|
-
content: "";
|
223
|
+
.onav--vertical .onav__items::before {
|
225
224
|
block-size: 100%;
|
226
225
|
inline-size: var(--indicator-track-size);
|
227
226
|
inset-inline-start: 0;
|
@@ -7,8 +7,10 @@ import { getDirectChildren, getOffset } from "../../utils/dom";
|
|
7
7
|
import { debounce } from "../../utils/throttle";
|
8
8
|
import { scrollIntoView } from "../../utils/scroll";
|
9
9
|
/**
|
10
|
-
*
|
11
|
-
*
|
10
|
+
* A container for content that can horizontally or vertically scroll
|
11
|
+
*
|
12
|
+
* @version 4.0.0
|
13
|
+
* @status stable
|
12
14
|
*
|
13
15
|
* @slot - Default slot to place items.
|
14
16
|
*
|
@@ -325,7 +327,7 @@ export class MaskedOverflow {
|
|
325
327
|
}
|
326
328
|
}
|
327
329
|
render() {
|
328
|
-
return (h(Host, { key: '
|
330
|
+
return (h(Host, { key: '4f88bf0a4cd8f01c745685afe7b0c5f9fc9b26b2', dir: this.isRtl ? 'rtl' : null, class: "nano-masked-overflow", "has-scroll-controls": this.hasScrollControls }, h("div", { key: 'b7894467af4981a53bb0540998f9fdee3b5e4db7', part: "base", class: {
|
329
331
|
onav: true,
|
330
332
|
[`onav--${this.orientation}`]: true,
|
331
333
|
'onav--has-scroll-controls': this.hasScrollControls,
|
@@ -333,13 +335,13 @@ export class MaskedOverflow {
|
|
333
335
|
'onav--has-scroll-controls-end': !this.hideControlEnd,
|
334
336
|
'onav--no-transitions': this.instantReCalc,
|
335
337
|
'onnav--has-indicator': this.showIndicator,
|
336
|
-
'onnav--hide-scrollbars': this.hideScrollbars,
|
337
|
-
}, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: '
|
338
|
+
'onnav--hide-scrollbars': this.hideScrollbars && this.hideScrollbars !== 'false',
|
339
|
+
}, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'c12e39f98ea4750a0709c822f1827fd3a4580ca5', class: "onav__nav" }, this.scrollControls && (h("nano-icon-button", { key: '9f45887d61630f41398e872bb7d3538f87fcc7c0', part: "scroll-button scroll-button-prev", class: {
|
338
340
|
'onav__scroll-button': true,
|
339
341
|
'onav__scroll-button--start': true,
|
340
342
|
}, ref: (btn) => (this.startBtn = btn), onClick: () => this.handleBtnClick(false), label: "Click to scroll", iconName: this.orientation === 'horizontal'
|
341
343
|
? 'light/chevron-left'
|
342
|
-
: 'light/chevron-up' })), h("div", { key: '
|
344
|
+
: 'light/chevron-up' })), h("div", { key: '1b6402869156bb7d6f3ddaf5b6b9e1ba80e94104', part: "scroller", ref: (el) => (this.nav = el), class: "onav__scroller", onScroll: this.handleScroll, tabindex: this.hasScrollControls ? 0 : undefined, role: "region", "aria-label": this.label || undefined }, h("div", { key: '1018eef93e68d13faf4c7898a69f6723e772ec3c', part: "items", ref: (el) => (this.itemContainer = el), class: "onav__items" }, this.showIndicator && (h("div", { key: 'ab21bd04d6bb661f716d835ee4bc0d111fed863f', part: "indicator", ref: (el) => (this.activeIndicator = el), class: "onav__active-indicator" })), h("slot", { key: 'bb66cabd059551b392e5049eb8d18f83de8eb818', onSlotchange: this.slotChangeHandler }))), this.scrollControls && (h("nano-icon-button", { key: 'bd48cb7171ee606a9c368a36090cefb3e61337bd', part: "scroll-button scroll-button-next", class: {
|
343
345
|
'onav__scroll-button': true,
|
344
346
|
'onav__scroll-button--end': true,
|
345
347
|
}, ref: (btn) => (this.endBtn = btn), onClick: () => this.handleBtnClick(true), label: "Click to scroll", iconName: this.orientation === 'horizontal'
|
@@ -4,7 +4,10 @@
|
|
4
4
|
import { Host, } from "@stencil/core";
|
5
5
|
import { h } from "../../utils/renderer";
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* Show more or less from a collection of items.
|
8
|
+
*
|
9
|
+
* @version 6.0.0
|
10
|
+
* @status stable
|
8
11
|
*
|
9
12
|
* @slot less - a button displayed when all fewer are shown. When clicked will show elements
|
10
13
|
* @slot more - a button displayed when all items are shown. When clicked will hide elements
|
@@ -62,8 +65,8 @@ export class Rating {
|
|
62
65
|
this.handleShowHideElements();
|
63
66
|
}
|
64
67
|
render() {
|
65
|
-
return (h(Host, { key: '
|
66
|
-
h("div", { key: '
|
68
|
+
return (h(Host, { key: '49834d5d379bcc71bfd228cbad3becf4343160ac', class: "nano-more-less" }, h("slot", { key: '4cbea5f74ddd512cacfc2c65c35ce0cd9fbfee00', onSlotchange: () => this.handleShowHideElements() }), this.children?.length > this.maxToShow && [
|
69
|
+
h("div", { key: 'd8b9b8135f3789705f18793dd8262bcebb38f2cb', style: { display: this.show ? 'none' : 'contents' }, class: "button-wrapper", part: "button-wrapper button-wrapper--less", onClick: (e) => this.handleClick(e) }, h("slot", { key: '564f67099d59d520fbf9a5c40f6f14e681346eff', name: "less" }, h("button", { key: 'a5aa9c0a0eda6b6dda1c72288b18668d4028eec5', part: "button button--less" }, "Show more (+", this.children.length - this.maxToShow, ")"))),
|
67
70
|
!this.noHideBtn ? (h("div", { style: { display: this.show ? 'contents' : 'none' }, class: "button-wrapper", part: "button-wrapper button-wrapper--more", onClick: (e) => this.handleClick(e) }, h("slot", { name: "more" }, h("button", { part: "button button--more" }, "Show less (-", this.children.length - this.maxToShow, ")")))) : (''),
|
68
71
|
]));
|
69
72
|
}
|