@nanoporetech-digital/components 5.3.1 → 5.4.1
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/CHANGELOG.md +22 -0
- package/dist/cjs/{algolia-data-ed53eaa8.js → algolia-data-6841724e.js} +2 -2
- package/dist/cjs/{algolia-data-ed53eaa8.js.map → algolia-data-6841724e.js.map} +1 -1
- package/dist/cjs/{component-store-21cb4901.js → component-store-6d7b8855.js} +2 -2
- package/dist/cjs/{component-store-21cb4901.js.map → component-store-6d7b8855.js.map} +1 -1
- package/dist/cjs/{form-control-443e90bf.js → form-control-8db579a2.js} +2 -2
- package/dist/cjs/{form-control-443e90bf.js.map → form-control-8db579a2.js.map} +1 -1
- package/dist/cjs/{index-99649bef.js → index-0f470227.js} +2 -2
- package/dist/cjs/{index-99649bef.js.map → index-0f470227.js.map} +1 -1
- package/dist/cjs/{index-71f899a7.js → index-1d3ebe1a.js} +1 -8
- package/dist/cjs/index-1d3ebe1a.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +1 -1
- package/dist/cjs/nano-alert.cjs.entry.js +1 -1
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-input.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia.cjs.entry.js +3 -3
- package/dist/cjs/nano-aspect-ratio.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-components.cjs.js +2 -2
- package/dist/cjs/nano-components.cjs.js.map +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/nano-demo.cjs.entry.js +1 -1
- package/dist/cjs/nano-details.cjs.entry.js +1 -1
- package/dist/cjs/nano-dialog.cjs.entry.js +2 -2
- package/dist/cjs/nano-drawer.cjs.entry.js +2 -2
- package/dist/cjs/nano-dropdown.cjs.entry.js +10 -8
- package/dist/cjs/nano-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-field-validator.cjs.entry.js +2 -2
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-search-results.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-hero.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon-button_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon.cjs.entry.js +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +1 -1
- package/dist/cjs/nano-overflow-nav.cjs.entry.js +1 -1
- package/dist/cjs/nano-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +1 -1
- package/dist/cjs/nano-rating.cjs.entry.js +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/nano-sortable.cjs.entry.js +2 -2
- package/dist/cjs/nano-sortable.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-content.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab.cjs.entry.js +1 -1
- package/dist/cjs/{nano-table-3bfe9c30.js → nano-table-4a8e46d0.js} +4 -4
- package/dist/cjs/{nano-table-3bfe9c30.js.map → nano-table-4a8e46d0.js.map} +1 -1
- package/dist/cjs/nano-table.cjs.entry.js +3 -3
- package/dist/cjs/{table.worker-b3818c42.js → table.worker-969b683a.js} +4 -4
- package/dist/cjs/table.worker-969b683a.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/dropdown/dropdown.css +1 -0
- package/dist/collection/components/dropdown/dropdown.js +8 -6
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/sortable/sortable.js +2 -2
- package/dist/collection/components/sortable/sortable.js.map +1 -1
- package/dist/components/dropdown.js +9 -7
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/nano-sortable.js +1 -1
- package/dist/components/nano-sortable.js.map +1 -1
- package/dist/esm/{algolia-data-ef2829e0.js → algolia-data-ebf2a439.js} +2 -2
- package/dist/esm/{algolia-data-ef2829e0.js.map → algolia-data-ebf2a439.js.map} +1 -1
- package/dist/esm/{component-store-65d7e36a.js → component-store-54df2005.js} +2 -2
- package/dist/esm/{component-store-65d7e36a.js.map → component-store-54df2005.js.map} +1 -1
- package/dist/esm/{form-control-e8739b2e.js → form-control-eb06e009.js} +2 -2
- package/dist/esm/{form-control-e8739b2e.js.map → form-control-eb06e009.js.map} +1 -1
- package/dist/esm/{index-dad5627b.js → index-06666022.js} +1 -8
- package/dist/esm/index-06666022.js.map +1 -0
- package/dist/esm/{index-5d0f4704.js → index-e8891229.js} +2 -2
- package/dist/esm/{index-5d0f4704.js.map → index-e8891229.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/nano-accordion.entry.js +1 -1
- package/dist/esm/nano-alert.entry.js +1 -1
- package/dist/esm/nano-algolia-filter.entry.js +3 -3
- package/dist/esm/nano-algolia-input.entry.js +3 -3
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +2 -2
- package/dist/esm/nano-algolia.entry.js +3 -3
- package/dist/esm/nano-aspect-ratio.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-components.js +3 -3
- package/dist/esm/nano-components.js.map +1 -1
- package/dist/esm/nano-datalist_3.entry.js +1 -1
- package/dist/esm/nano-date-input.entry.js +1 -1
- package/dist/esm/nano-date-picker.entry.js +1 -1
- package/dist/esm/nano-demo.entry.js +1 -1
- package/dist/esm/nano-details.entry.js +1 -1
- package/dist/esm/nano-dialog.entry.js +2 -2
- package/dist/esm/nano-drawer.entry.js +2 -2
- package/dist/esm/nano-dropdown.entry.js +10 -8
- package/dist/esm/nano-dropdown.entry.js.map +1 -1
- package/dist/esm/nano-field-validator.entry.js +2 -2
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-global-nav-user-profile_3.entry.js +2 -2
- package/dist/esm/nano-global-nav.entry.js +2 -2
- package/dist/esm/nano-global-search-results.entry.js +1 -1
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +1 -1
- package/dist/esm/nano-hero.entry.js +1 -1
- package/dist/esm/nano-icon-button_2.entry.js +1 -1
- package/dist/esm/nano-icon.entry.js +1 -1
- package/dist/esm/nano-input.entry.js +2 -2
- package/dist/esm/nano-menu-drawer.entry.js +1 -1
- package/dist/esm/nano-overflow-nav.entry.js +1 -1
- package/dist/esm/nano-progress-bar.entry.js +1 -1
- package/dist/esm/nano-range.entry.js +1 -1
- package/dist/esm/nano-rating.entry.js +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +1 -1
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/nano-sortable.entry.js +2 -2
- package/dist/esm/nano-sortable.entry.js.map +1 -1
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-split-pane.entry.js +1 -1
- package/dist/esm/nano-sticker.entry.js +1 -1
- package/dist/esm/nano-tab-content.entry.js +1 -1
- package/dist/esm/nano-tab-group.entry.js +2 -2
- package/dist/esm/nano-tab.entry.js +1 -1
- package/dist/esm/{nano-table-7fb21169.js → nano-table-05a285ed.js} +4 -4
- package/dist/esm/{nano-table-7fb21169.js.map → nano-table-05a285ed.js.map} +1 -1
- package/dist/esm/nano-table.entry.js +3 -3
- package/dist/esm/{table.worker-a37fa949.js → table.worker-f8e4350e.js} +4 -4
- package/dist/esm/table.worker-f8e4350e.js.map +1 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/{p-487de04d.entry.js → p-02b727d3.entry.js} +2 -2
- package/dist/nano-components/{p-90cd4f56.entry.js → p-03f8b115.entry.js} +2 -2
- package/dist/nano-components/{p-570d2e50.entry.js → p-04d5c9ea.entry.js} +2 -2
- package/dist/nano-components/{p-d74e2642.entry.js → p-0563e812.entry.js} +2 -2
- package/dist/nano-components/{p-7ed03b91.entry.js → p-0bc40dd1.entry.js} +2 -2
- package/dist/nano-components/{p-288dbe6b.entry.js → p-0e0f07f0.entry.js} +2 -2
- package/dist/nano-components/{p-20383b2e.entry.js → p-16e75af9.entry.js} +2 -2
- package/dist/nano-components/{p-57085052.entry.js → p-17eb456c.entry.js} +2 -2
- package/dist/nano-components/{p-5a4b3fa9.entry.js → p-18e0d957.entry.js} +2 -2
- package/dist/nano-components/{p-192902e0.entry.js → p-1a55e282.entry.js} +2 -2
- package/dist/nano-components/{p-ebb98a9e.entry.js → p-2a7d0c13.entry.js} +2 -2
- package/dist/nano-components/{p-ad6209ec.entry.js → p-328ef9d3.entry.js} +2 -2
- package/dist/nano-components/{p-bf18e298.entry.js → p-37c7eda3.entry.js} +2 -2
- package/dist/nano-components/{p-0301e8f7.entry.js → p-3ae362ae.entry.js} +2 -2
- package/dist/nano-components/p-3ae362ae.entry.js.map +1 -0
- package/dist/nano-components/{p-3dd8ae89.entry.js → p-3eeaba47.entry.js} +2 -2
- package/dist/nano-components/{p-cba50c3e.entry.js → p-3f40e370.entry.js} +2 -2
- package/dist/nano-components/{p-565793a2.entry.js → p-4a79eafe.entry.js} +2 -2
- package/dist/nano-components/{p-93cfbdb6.entry.js → p-4d0c0873.entry.js} +2 -2
- package/dist/nano-components/{p-cd2f5e97.entry.js → p-50f2fdb3.entry.js} +2 -2
- package/dist/nano-components/{p-20038e9c.entry.js → p-54c4a2f5.entry.js} +2 -2
- package/dist/nano-components/{p-27422aa9.entry.js → p-650aa197.entry.js} +2 -2
- package/dist/nano-components/{p-bdb5b6fc.entry.js → p-6bdbcaa6.entry.js} +2 -2
- package/dist/nano-components/{p-898cbac7.entry.js → p-6c4171fa.entry.js} +2 -2
- package/dist/nano-components/{p-9ebbb814.js → p-70747f20.js} +2 -2
- package/dist/nano-components/{p-1b791810.entry.js → p-73312f19.entry.js} +2 -2
- package/dist/nano-components/{p-5d466a58.entry.js → p-760d80d2.entry.js} +2 -2
- package/dist/nano-components/p-79c96564.entry.js +5 -0
- package/dist/nano-components/p-79c96564.entry.js.map +1 -0
- package/dist/nano-components/p-7ce68d02.entry.js +5 -0
- package/dist/nano-components/{p-f504b1df.entry.js → p-7dd30a3f.entry.js} +3 -3
- package/dist/nano-components/{p-f7a4c62b.entry.js → p-7f5fb917.entry.js} +2 -2
- package/dist/nano-components/{p-207a1fbc.entry.js → p-800c4260.entry.js} +2 -2
- package/dist/nano-components/{p-fe7a0158.entry.js → p-87329424.entry.js} +2 -2
- package/dist/nano-components/{p-00a18187.js → p-8bfcdfcc.js} +2 -2
- package/dist/nano-components/{p-68928c59.entry.js → p-9925e504.entry.js} +2 -2
- package/dist/nano-components/{p-bdef618c.entry.js → p-9c290055.entry.js} +2 -2
- package/dist/nano-components/{p-9b5429e1.entry.js → p-9d65f5de.entry.js} +2 -2
- package/dist/nano-components/{p-76a650b1.entry.js → p-a03993f9.entry.js} +2 -2
- package/dist/nano-components/{p-60a8c896.js → p-a26bdb65.js} +2 -2
- package/dist/nano-components/{p-ace7743c.entry.js → p-ac7953e0.entry.js} +2 -2
- package/dist/nano-components/{p-676a4744.entry.js → p-bedada62.entry.js} +2 -2
- package/dist/nano-components/p-c7312365.js +5 -0
- package/dist/nano-components/{p-fecb72b9.entry.js → p-d4e44f93.entry.js} +2 -2
- package/dist/nano-components/{p-b8e76fdf.entry.js → p-d62b48bc.entry.js} +2 -2
- package/dist/nano-components/p-d6a04b3a.js +6 -0
- package/dist/nano-components/p-d6a04b3a.js.map +1 -0
- package/dist/nano-components/{p-71057181.js → p-dc805ecc.js} +2 -2
- package/dist/nano-components/{p-653ae985.js → p-dd5687db.js} +2 -2
- package/dist/nano-components/{p-5aae2588.entry.js → p-e6a0675e.entry.js} +2 -2
- package/dist/nano-components/{p-b38cabe2.entry.js → p-e98835e2.entry.js} +2 -2
- package/dist/nano-components/{p-5984ae16.entry.js → p-efd3e121.entry.js} +2 -2
- package/dist/nano-components/{p-a8d6ca38.entry.js → p-fa9f834b.entry.js} +2 -2
- package/dist/nano-components/{p-173cc842.entry.js → p-fcbc9122.entry.js} +2 -2
- package/dist/nano-components/{p-31c23d6e.entry.js → p-fcd8df14.entry.js} +2 -2
- package/docs-json.json +3 -3
- package/hydrate/index.js +14 -15
- package/package.json +3 -3
- package/dist/cjs/index-71f899a7.js.map +0 -1
- package/dist/cjs/table.worker-b3818c42.js.map +0 -1
- package/dist/esm/index-dad5627b.js.map +0 -1
- package/dist/esm/table.worker-a37fa949.js.map +0 -1
- package/dist/nano-components/p-0301e8f7.entry.js.map +0 -1
- package/dist/nano-components/p-35d3072e.entry.js +0 -5
- package/dist/nano-components/p-c579d9aa.js +0 -5
- package/dist/nano-components/p-ede12d35.entry.js +0 -5
- package/dist/nano-components/p-ede12d35.entry.js.map +0 -1
- package/dist/nano-components/p-f6a8467a.js +0 -6
- package/dist/nano-components/p-f6a8467a.js.map +0 -1
- /package/dist/nano-components/{p-487de04d.entry.js.map → p-02b727d3.entry.js.map} +0 -0
- /package/dist/nano-components/{p-90cd4f56.entry.js.map → p-03f8b115.entry.js.map} +0 -0
- /package/dist/nano-components/{p-570d2e50.entry.js.map → p-04d5c9ea.entry.js.map} +0 -0
- /package/dist/nano-components/{p-d74e2642.entry.js.map → p-0563e812.entry.js.map} +0 -0
- /package/dist/nano-components/{p-7ed03b91.entry.js.map → p-0bc40dd1.entry.js.map} +0 -0
- /package/dist/nano-components/{p-288dbe6b.entry.js.map → p-0e0f07f0.entry.js.map} +0 -0
- /package/dist/nano-components/{p-20383b2e.entry.js.map → p-16e75af9.entry.js.map} +0 -0
- /package/dist/nano-components/{p-57085052.entry.js.map → p-17eb456c.entry.js.map} +0 -0
- /package/dist/nano-components/{p-5a4b3fa9.entry.js.map → p-18e0d957.entry.js.map} +0 -0
- /package/dist/nano-components/{p-192902e0.entry.js.map → p-1a55e282.entry.js.map} +0 -0
- /package/dist/nano-components/{p-ebb98a9e.entry.js.map → p-2a7d0c13.entry.js.map} +0 -0
- /package/dist/nano-components/{p-ad6209ec.entry.js.map → p-328ef9d3.entry.js.map} +0 -0
- /package/dist/nano-components/{p-bf18e298.entry.js.map → p-37c7eda3.entry.js.map} +0 -0
- /package/dist/nano-components/{p-3dd8ae89.entry.js.map → p-3eeaba47.entry.js.map} +0 -0
- /package/dist/nano-components/{p-cba50c3e.entry.js.map → p-3f40e370.entry.js.map} +0 -0
- /package/dist/nano-components/{p-565793a2.entry.js.map → p-4a79eafe.entry.js.map} +0 -0
- /package/dist/nano-components/{p-93cfbdb6.entry.js.map → p-4d0c0873.entry.js.map} +0 -0
- /package/dist/nano-components/{p-cd2f5e97.entry.js.map → p-50f2fdb3.entry.js.map} +0 -0
- /package/dist/nano-components/{p-20038e9c.entry.js.map → p-54c4a2f5.entry.js.map} +0 -0
- /package/dist/nano-components/{p-27422aa9.entry.js.map → p-650aa197.entry.js.map} +0 -0
- /package/dist/nano-components/{p-bdb5b6fc.entry.js.map → p-6bdbcaa6.entry.js.map} +0 -0
- /package/dist/nano-components/{p-898cbac7.entry.js.map → p-6c4171fa.entry.js.map} +0 -0
- /package/dist/nano-components/{p-9ebbb814.js.map → p-70747f20.js.map} +0 -0
- /package/dist/nano-components/{p-1b791810.entry.js.map → p-73312f19.entry.js.map} +0 -0
- /package/dist/nano-components/{p-5d466a58.entry.js.map → p-760d80d2.entry.js.map} +0 -0
- /package/dist/nano-components/{p-35d3072e.entry.js.map → p-7ce68d02.entry.js.map} +0 -0
- /package/dist/nano-components/{p-f504b1df.entry.js.map → p-7dd30a3f.entry.js.map} +0 -0
- /package/dist/nano-components/{p-f7a4c62b.entry.js.map → p-7f5fb917.entry.js.map} +0 -0
- /package/dist/nano-components/{p-207a1fbc.entry.js.map → p-800c4260.entry.js.map} +0 -0
- /package/dist/nano-components/{p-fe7a0158.entry.js.map → p-87329424.entry.js.map} +0 -0
- /package/dist/nano-components/{p-00a18187.js.map → p-8bfcdfcc.js.map} +0 -0
- /package/dist/nano-components/{p-68928c59.entry.js.map → p-9925e504.entry.js.map} +0 -0
- /package/dist/nano-components/{p-bdef618c.entry.js.map → p-9c290055.entry.js.map} +0 -0
- /package/dist/nano-components/{p-9b5429e1.entry.js.map → p-9d65f5de.entry.js.map} +0 -0
- /package/dist/nano-components/{p-76a650b1.entry.js.map → p-a03993f9.entry.js.map} +0 -0
- /package/dist/nano-components/{p-60a8c896.js.map → p-a26bdb65.js.map} +0 -0
- /package/dist/nano-components/{p-ace7743c.entry.js.map → p-ac7953e0.entry.js.map} +0 -0
- /package/dist/nano-components/{p-676a4744.entry.js.map → p-bedada62.entry.js.map} +0 -0
- /package/dist/nano-components/{p-c579d9aa.js.map → p-c7312365.js.map} +0 -0
- /package/dist/nano-components/{p-fecb72b9.entry.js.map → p-d4e44f93.entry.js.map} +0 -0
- /package/dist/nano-components/{p-b8e76fdf.entry.js.map → p-d62b48bc.entry.js.map} +0 -0
- /package/dist/nano-components/{p-71057181.js.map → p-dc805ecc.js.map} +0 -0
- /package/dist/nano-components/{p-653ae985.js.map → p-dd5687db.js.map} +0 -0
- /package/dist/nano-components/{p-5aae2588.entry.js.map → p-e6a0675e.entry.js.map} +0 -0
- /package/dist/nano-components/{p-b38cabe2.entry.js.map → p-e98835e2.entry.js.map} +0 -0
- /package/dist/nano-components/{p-5984ae16.entry.js.map → p-efd3e121.entry.js.map} +0 -0
- /package/dist/nano-components/{p-a8d6ca38.entry.js.map → p-fa9f834b.entry.js.map} +0 -0
- /package/dist/nano-components/{p-173cc842.entry.js.map → p-fcbc9122.entry.js.map} +0 -0
- /package/dist/nano-components/{p-31c23d6e.entry.js.map → p-fcd8df14.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
|
-
import{r as t,c as i,h as s,a as e,g as h}from"./p-f6a8467a.js";import{a as n}from"./p-257432ff.js";import{d as o}from"./p-7bff5224.js";const r=':host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-layer-index-menubar, 10);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}';function a(t){return t instanceof Document?window.pageYOffset:t.scrollTop}function c(t,i){const s=i instanceof Document?document.documentElement:i;return n(t,s)}const f=class{constructor(s){t(this,s);this.nanoStuck=i(this,"nanoStuck",7);this.nanoUnstuck=i(this,"nanoUnstuck",7);this.nanoHide=i(this,"nanoHide",7);this.nanoShow=i(this,"nanoShow",7);this.isRtl=false;this.scrollPosCache=0;this.scrollPosThresholdCache=0;this.cacheOffset=0;this.pauseResizeWatcher=false;this.listenForScrollParent=false;this.positions=[];this.pauseHide=false;this.hasBootstrapped=false;this.setupParentResizeListener=()=>{if(!window["ResizeObserver"])return;if(this.parentSizeObserver){this.parentSizeObserver.disconnect();this.parentSizeObserver=undefined}this.parentSizeObserver=new ResizeObserver((t=>{for(const i of t){let t,s;if(i.contentRect.height)t=i.contentRect.height;if(i.contentRect.width)s=i.contentRect.width;if(typeof this.quietMode==="object"){if(s<this.quietMode.w||t<this.quietMode.h)this.quietModeIsOn=true;else this.quietModeIsOn=false}if(this.breakPointMin){if(s>this.breakPointMin)this.isSticky=true;else this.isSticky=false}if(this.breakPointMax){if(s<this.breakPointMax)this.isSticky=true;else this.isSticky=false}if(this.isRootSticker&&this.sticker&&this.autoResize)this.sticker.style.width=this.host.scrollWidth+"px"}}));const t=this.scrollParent instanceof Document?this.scrollParent.documentElement:this.scrollParent;if(t)this.parentSizeObserver.observe(t)};this.onStickToDisplayEvent=t=>{if(t.detail.sticker!==this.stickToEle)return;switch(t.type){case"nanoHide":this._offset=0;this.cacheOffset=this.offset;this.offset=0;if(!this.isStuck)this.moveTrigger(false);if(!this.isRootSticker&&this.quietModeIsOn){requestAnimationFrame((()=>{this.stickToEle.style.minHeight=this.stickToEleInitSize.height+(this.host.scrollHeight+(typeof this.cacheOffset==="object"?this.cacheOffset.v:this.cacheOffset))+"px";this.stickToEle.setTriggerPos(this.stickToEleInitSize.height*-1)}))}break;case"nanoShow":this._offset=this.stickToEleInitSize.height;this.offset=this.cacheOffset;this.moveTrigger(true);if(!this.isRootSticker&&this.quietModeIsOn){requestAnimationFrame((()=>{this.stickToEle.style.minHeight="";this.stickToEle.setTriggerPos(0)}))}break;case"nanoStuck":this.stickToEleInitSize=this.stickToEle.getBoundingClientRect();this._offset=this.stickToEleInitSize.height;break}};this.onStickEvent=async t=>{const i=t.detail?t.detail.sticker:null;if(!i||i.position!==this.position)return;const s=await i.getTriggerPos();if(t.type==="nanoStuck"&&i!==this.host&&i.scrollParent===this.host.scrollParent){this.stickerIndex++;if(!this.hideOnNewStickers)return;if(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top){this.multiStickerHide=true;this.stuckCounter++}}if(t.type==="nanoUnstuck"&&i!==this.host&&i.scrollParent===this.host.scrollParent){this.stickerIndex--;if(!this.hideOnNewStickers)return;if(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top){this.stuckCounter--;if(this.stuckCounter<1)this.multiStickerHide=false}}};this.onScroll=()=>{const t=a(this.scrollParent);if(t<this.scrollPosCache){if(!this.positions.includes("bottom"))this.handleScrollTo();else this.handleScrollAway(t)}if(t>this.scrollPosCache){if(!this.positions.includes("bottom"))this.handleScrollAway(t);else this.handleScrollTo()}this.scrollPosCache=t};this.isStuck=false;this.isRootSticker=true;this.hide=false;this.scrollHide=false;this.multiStickerHide=false;this.scrollingTo=false;this.quietModeIsOn=false;this.stuckCounter=0;this.stickerIndex=0;this.stickToEle=undefined;this.triggerPos=undefined;this.trigger=undefined;this._offset=0;this.autoResize=true;this.isSticky=true;this.offset=0;this.position="top";this.quietMode={h:600,w:600};this.hideOnNewStickers=true;this.breakPointMax=null;this.breakPointMin=null;this.scrollParent=undefined;this.stickTo=undefined}async isHiding(){return this.hide}async isSticking(){this.shouldStick();return this.isStuck}async setTriggerPos(t){return this._offset=t}async getTriggerPos(){return this.triggerPos}async pauseHiding(t){return this.pauseHide=t}updateTriggerOffset(){if(!this.trigger||!this.scrollParent||!this.listenForScrollParent)return;this.triggerPos=c(this.trigger,this.scrollParent)}stickerResizeListener(){if(!this.content||!window["ResizeObserver"])return;if(this.contentSizeObserver){this.contentSizeObserver.disconnect();this.contentSizeObserver=undefined}this.contentSizeObserver=new ResizeObserver((t=>{for(const i of t){if(this.pauseResizeWatcher)return;if(i.contentRect.height){if(this.position==="top")this.host.style.height=i.contentRect.height+"px";if(this.position==="bottom")this.host.style.minHeight=i.contentRect.height+"px"}}}));this.contentSizeObserver.observe(this.content)}quietModeChange(){if(this.quietMode==="on")requestAnimationFrame((()=>this.quietModeIsOn=true));else if(this.quietMode==="off")requestAnimationFrame((()=>this.quietModeIsOn=false))}setOffset(){this.trigger.setAttribute("style","");let t,i,s,e;const h=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!h)return;if(typeof this.offset==="object")({v:t,h:i}=this.offset);else t=i=this.offset;if(typeof this._offset==="object")({v:t=s,h:i=e}=this._offset);else s=e=this._offset;const n=s=>{const e=s.match(/(top|bottom)/)?t:i;o(s);h.style[s]=e+"px";if(e)this.host.style.setProperty("--hide-transform-amount",`(110% + ${e}px)`);else this.host.style.setProperty("--hide-transform-amount",null)};const o=h=>{const n=h.match(/(top|bottom)/)?t+s:i+e;this.trigger.style[h]=n*-1+"px";this.trigger.style.position="relative";this.trigger.style.minHeight="1px";this.trigger.style.maxHeight="1px";this.trigger.style.overflow="hidden"};if(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)n("right");if(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)n("left");if(this.positions.includes("top"))n("top");if(this.positions.includes("bottom"))n("bottom")}positionChange(){this.positions=this.position.split("-");this.setOffset()}async stuckChange(){if(this.isStuck){if(this.stickToEle){const t=this.host.children;this.slottedContent=Array.from(t);this.slottedContent.forEach((t=>{this.stickToEle.appendChild(t);t.style.order=this.stickerIndex+""}));this.nanoStuck.emit({sticker:this.stickToEle})}else this.nanoStuck.emit({sticker:this.host})}else{this.scrollHide=false;if(this.stickToEle){this.slottedContent.forEach((t=>{this.host.appendChild(t);t.style.order=""}));this.nanoUnstuck.emit({sticker:this.stickToEle})}else this.nanoUnstuck.emit({sticker:this.host})}}attachScrollListeners(){if(this.quietModeIsOn)this.scrollParent.addEventListener("scroll",this.onScroll,{passive:true,capture:false});else if(this.scrollParent){this.scrollParent.removeEventListener("scroll",this.onScroll);this.moveTrigger(true)}}handleParentEvents(t,i=null){if(!this.listenForScrollParent)return;if(i)this.manageListenersOnParent(false,i);if(this.scrollParent)this.manageListenersOnParent(!this.stickToEle)}stickToEleChange(t,i){if(this.stickToEle){this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)}if(i){i.removeEventListener("nanoHide",this.onStickToDisplayEvent);i.removeEventListener("nanoShow",this.onStickToDisplayEvent);i.removeEventListener("nanoStuck",this.onStickToDisplayEvent);i.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent)}}stickToChange(){if(typeof this.stickTo==="string")this.stickToEle=this.scrollParent.querySelector(this.stickTo);else if(!!this.stickTo)this.stickToEle=this.stickTo;else this.stickToEle=undefined}visibilityDecisionHandler(){if(this.multiStickerHide||this.scrollHide)this.hide=true;else this.hide=false}handleHideChange(){if(this.hide)this.nanoHide.emit({sticker:this.host});else this.nanoShow.emit({sticker:this.host})}setupIO(){if(this.io){this.io.disconnect();this.io=undefined}if(!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;let t=this.scrollParent;if(this.scrollParent instanceof Document)t=null;this.io=new window.IntersectionObserver((t=>{if(this.pauseResizeWatcher||!this.isSticky)return;this.shouldStick(t.slice(-1)[0])}),{root:t});this.io.observe(this.trigger)}manageListenersOnParent(t,i){const s=i||this.scrollParent;if(!s)return;if(!t){try{if(this.quietModeIsOn)s.removeEventListener("scroll",this.onScroll);s.removeEventListener("nanoStuck",this.onStickEvent);s.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(t){console.error("Events haven`t been added")}}else{s.addEventListener("nanoStuck",this.onStickEvent);s.addEventListener("nanoUnstuck",this.onStickEvent);if(this.quietModeIsOn)this.attachScrollListeners()}this.setupParentResizeListener()}handleScrollTo(){this.scrollPosThresholdCache=null;if(!this.scrollHide)return;if(this.scrollingTo!==true){this._offset=this.cacheOffset||this._offset}this.scrollingTo=true;this.scrollHide=false}handleScrollAway(t){if(this.scrollHide)return;if(!this.isStuck)return;if(this.scrollingTo!==false){this.cacheOffset=this._offset;this._offset=0}this.scrollingTo=false;if(!this.scrollPosThresholdCache)this.scrollPosThresholdCache=t;else if(!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100)this.scrollHide=true}moveTrigger(t){if(this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t){this.host.parentNode.insertBefore(this.trigger,this.host)}else this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)}getScrollParent(){const t=/(auto|scroll)/;const i=(t,s)=>{if(t.parentNode===null){return s}return i(t.parentNode,s.concat([t]))};const s=(t,i)=>getComputedStyle(t,null).getPropertyValue(i);const e=t=>s(t,"overflow")+s(t,"overflow-y")+s(t,"overflow-x");const h=i=>t.test(e(i));const n=document.documentElement.getBoundingClientRect().height;const o=t=>{if(!(typeof t==="object"))return;const s=i(t,[]);return s.find((t=>h(t)&&t.getBoundingClientRect().height!==n))||document};return o(this.host)}shouldStick(t){let i;if(this.positions.includes("top")){if(!this.isRootSticker){i=c(this.trigger,this.scrollParent).top}else{i=this.trigger.getBoundingClientRect().top}this.isStuck=i<-1}else if(this.positions.includes("bottom")){i=this.trigger.getBoundingClientRect().top;const s=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=!t.isIntersecting||i>s.height+s.top}}bootstrapGurantor(){this.hasBootstrapped=true;this.scrollParent=this.scrollParent||this.getScrollParent();this.isRootSticker=this.scrollParent instanceof Document;this.trigger=this.trigger||document.createElement("div");this.trigger.innerHTML=" ";this.trigger.classList.add("sticker-trigger");this.positionChange();this.moveTrigger(true);this.quietModeChange();this.listenForScrollParent=true;this.handleParentEvents(true);this.stickerIndex=Array.from(this.scrollParent.querySelectorAll("nano-sticker")).filter((t=>t.position===this.position)).findIndex((t=>t===this.host));this.setOffset();this.stickerResizeListener();this.setupParentResizeListener();this.slottedContent=Array.from(this.host.children);this.slottedContent.forEach((t=>{t.style.order=this.stickerIndex+""}));this.updateTriggerOffset();this.stickToChange();this.setupIO();this.onStickToDisplayEvent=o(this.onStickToDisplayEvent,50)}connectedCallback(){this.isRtl=this.host.dir==="rtl"||this.host.ownerDocument.dir==="rtl";document.documentElement.addEventListener("nanoComponentsReady",(()=>{setTimeout((t=>this.bootstrapGurantor()),200)}));setTimeout((t=>{if(!this.hasBootstrapped)this.bootstrapGurantor()}),1e3)}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}if(this.parentSizeObserver){this.parentSizeObserver.disconnect();this.parentSizeObserver=undefined}this.scrollParent=null;this.hasBootstrapped=false}render(){return s(e,{sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start")},s("div",{class:{sticker:true,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:t=>this.sticker=t},s("div",{class:"sticker-content",ref:t=>this.content=t},s("slot",null))))}get host(){return h(this)}static get watchers(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}}};f.style=r;export{f as nano_sticker};
|
5
|
-
//# sourceMappingURL=p-
|
4
|
+
import{r as t,c as i,h as s,a as e,g as h}from"./p-d6a04b3a.js";import{a as n}from"./p-257432ff.js";import{d as o}from"./p-7bff5224.js";const r=':host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-layer-index-menubar, 10);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}';function a(t){return t instanceof Document?window.pageYOffset:t.scrollTop}function c(t,i){const s=i instanceof Document?document.documentElement:i;return n(t,s)}const f=class{constructor(s){t(this,s);this.nanoStuck=i(this,"nanoStuck",7);this.nanoUnstuck=i(this,"nanoUnstuck",7);this.nanoHide=i(this,"nanoHide",7);this.nanoShow=i(this,"nanoShow",7);this.isRtl=false;this.scrollPosCache=0;this.scrollPosThresholdCache=0;this.cacheOffset=0;this.pauseResizeWatcher=false;this.listenForScrollParent=false;this.positions=[];this.pauseHide=false;this.hasBootstrapped=false;this.setupParentResizeListener=()=>{if(!window["ResizeObserver"])return;if(this.parentSizeObserver){this.parentSizeObserver.disconnect();this.parentSizeObserver=undefined}this.parentSizeObserver=new ResizeObserver((t=>{for(const i of t){let t,s;if(i.contentRect.height)t=i.contentRect.height;if(i.contentRect.width)s=i.contentRect.width;if(typeof this.quietMode==="object"){if(s<this.quietMode.w||t<this.quietMode.h)this.quietModeIsOn=true;else this.quietModeIsOn=false}if(this.breakPointMin){if(s>this.breakPointMin)this.isSticky=true;else this.isSticky=false}if(this.breakPointMax){if(s<this.breakPointMax)this.isSticky=true;else this.isSticky=false}if(this.isRootSticker&&this.sticker&&this.autoResize)this.sticker.style.width=this.host.scrollWidth+"px"}}));const t=this.scrollParent instanceof Document?this.scrollParent.documentElement:this.scrollParent;if(t)this.parentSizeObserver.observe(t)};this.onStickToDisplayEvent=t=>{if(t.detail.sticker!==this.stickToEle)return;switch(t.type){case"nanoHide":this._offset=0;this.cacheOffset=this.offset;this.offset=0;if(!this.isStuck)this.moveTrigger(false);if(!this.isRootSticker&&this.quietModeIsOn){requestAnimationFrame((()=>{this.stickToEle.style.minHeight=this.stickToEleInitSize.height+(this.host.scrollHeight+(typeof this.cacheOffset==="object"?this.cacheOffset.v:this.cacheOffset))+"px";this.stickToEle.setTriggerPos(this.stickToEleInitSize.height*-1)}))}break;case"nanoShow":this._offset=this.stickToEleInitSize.height;this.offset=this.cacheOffset;this.moveTrigger(true);if(!this.isRootSticker&&this.quietModeIsOn){requestAnimationFrame((()=>{this.stickToEle.style.minHeight="";this.stickToEle.setTriggerPos(0)}))}break;case"nanoStuck":this.stickToEleInitSize=this.stickToEle.getBoundingClientRect();this._offset=this.stickToEleInitSize.height;break}};this.onStickEvent=async t=>{const i=t.detail?t.detail.sticker:null;if(!i||i.position!==this.position)return;const s=await i.getTriggerPos();if(t.type==="nanoStuck"&&i!==this.host&&i.scrollParent===this.host.scrollParent){this.stickerIndex++;if(!this.hideOnNewStickers)return;if(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top){this.multiStickerHide=true;this.stuckCounter++}}if(t.type==="nanoUnstuck"&&i!==this.host&&i.scrollParent===this.host.scrollParent){this.stickerIndex--;if(!this.hideOnNewStickers)return;if(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top){this.stuckCounter--;if(this.stuckCounter<1)this.multiStickerHide=false}}};this.onScroll=()=>{const t=a(this.scrollParent);if(t<this.scrollPosCache){if(!this.positions.includes("bottom"))this.handleScrollTo();else this.handleScrollAway(t)}if(t>this.scrollPosCache){if(!this.positions.includes("bottom"))this.handleScrollAway(t);else this.handleScrollTo()}this.scrollPosCache=t};this.isStuck=false;this.isRootSticker=true;this.hide=false;this.scrollHide=false;this.multiStickerHide=false;this.scrollingTo=false;this.quietModeIsOn=false;this.stuckCounter=0;this.stickerIndex=0;this.stickToEle=undefined;this.triggerPos=undefined;this.trigger=undefined;this._offset=0;this.autoResize=true;this.isSticky=true;this.offset=0;this.position="top";this.quietMode={h:600,w:600};this.hideOnNewStickers=true;this.breakPointMax=null;this.breakPointMin=null;this.scrollParent=undefined;this.stickTo=undefined}async isHiding(){return this.hide}async isSticking(){this.shouldStick();return this.isStuck}async setTriggerPos(t){return this._offset=t}async getTriggerPos(){return this.triggerPos}async pauseHiding(t){return this.pauseHide=t}updateTriggerOffset(){if(!this.trigger||!this.scrollParent||!this.listenForScrollParent)return;this.triggerPos=c(this.trigger,this.scrollParent)}stickerResizeListener(){if(!this.content||!window["ResizeObserver"])return;if(this.contentSizeObserver){this.contentSizeObserver.disconnect();this.contentSizeObserver=undefined}this.contentSizeObserver=new ResizeObserver((t=>{for(const i of t){if(this.pauseResizeWatcher)return;if(i.contentRect.height){if(this.position==="top")this.host.style.height=i.contentRect.height+"px";if(this.position==="bottom")this.host.style.minHeight=i.contentRect.height+"px"}}}));this.contentSizeObserver.observe(this.content)}quietModeChange(){if(this.quietMode==="on")requestAnimationFrame((()=>this.quietModeIsOn=true));else if(this.quietMode==="off")requestAnimationFrame((()=>this.quietModeIsOn=false))}setOffset(){this.trigger.setAttribute("style","");let t,i,s,e;const h=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!h)return;if(typeof this.offset==="object")({v:t,h:i}=this.offset);else t=i=this.offset;if(typeof this._offset==="object")({v:t=s,h:i=e}=this._offset);else s=e=this._offset;const n=s=>{const e=s.match(/(top|bottom)/)?t:i;o(s);h.style[s]=e+"px";if(e)this.host.style.setProperty("--hide-transform-amount",`(110% + ${e}px)`);else this.host.style.setProperty("--hide-transform-amount",null)};const o=h=>{const n=h.match(/(top|bottom)/)?t+s:i+e;this.trigger.style[h]=n*-1+"px";this.trigger.style.position="relative";this.trigger.style.minHeight="1px";this.trigger.style.maxHeight="1px";this.trigger.style.overflow="hidden"};if(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)n("right");if(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)n("left");if(this.positions.includes("top"))n("top");if(this.positions.includes("bottom"))n("bottom")}positionChange(){this.positions=this.position.split("-");this.setOffset()}async stuckChange(){if(this.isStuck){if(this.stickToEle){const t=this.host.children;this.slottedContent=Array.from(t);this.slottedContent.forEach((t=>{this.stickToEle.appendChild(t);t.style.order=this.stickerIndex+""}));this.nanoStuck.emit({sticker:this.stickToEle})}else this.nanoStuck.emit({sticker:this.host})}else{this.scrollHide=false;if(this.stickToEle){this.slottedContent.forEach((t=>{this.host.appendChild(t);t.style.order=""}));this.nanoUnstuck.emit({sticker:this.stickToEle})}else this.nanoUnstuck.emit({sticker:this.host})}}attachScrollListeners(){if(this.quietModeIsOn)this.scrollParent.addEventListener("scroll",this.onScroll,{passive:true,capture:false});else if(this.scrollParent){this.scrollParent.removeEventListener("scroll",this.onScroll);this.moveTrigger(true)}}handleParentEvents(t,i=null){if(!this.listenForScrollParent)return;if(i)this.manageListenersOnParent(false,i);if(this.scrollParent)this.manageListenersOnParent(!this.stickToEle)}stickToEleChange(t,i){if(this.stickToEle){this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent);this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)}if(i){i.removeEventListener("nanoHide",this.onStickToDisplayEvent);i.removeEventListener("nanoShow",this.onStickToDisplayEvent);i.removeEventListener("nanoStuck",this.onStickToDisplayEvent);i.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent)}}stickToChange(){if(typeof this.stickTo==="string")this.stickToEle=this.scrollParent.querySelector(this.stickTo);else if(!!this.stickTo)this.stickToEle=this.stickTo;else this.stickToEle=undefined}visibilityDecisionHandler(){if(this.multiStickerHide||this.scrollHide)this.hide=true;else this.hide=false}handleHideChange(){if(this.hide)this.nanoHide.emit({sticker:this.host});else this.nanoShow.emit({sticker:this.host})}setupIO(){if(this.io){this.io.disconnect();this.io=undefined}if(!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;let t=this.scrollParent;if(this.scrollParent instanceof Document)t=null;this.io=new window.IntersectionObserver((t=>{if(this.pauseResizeWatcher||!this.isSticky)return;this.shouldStick(t.slice(-1)[0])}),{root:t});this.io.observe(this.trigger)}manageListenersOnParent(t,i){const s=i||this.scrollParent;if(!s)return;if(!t){try{if(this.quietModeIsOn)s.removeEventListener("scroll",this.onScroll);s.removeEventListener("nanoStuck",this.onStickEvent);s.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(t){console.error("Events haven`t been added")}}else{s.addEventListener("nanoStuck",this.onStickEvent);s.addEventListener("nanoUnstuck",this.onStickEvent);if(this.quietModeIsOn)this.attachScrollListeners()}this.setupParentResizeListener()}handleScrollTo(){this.scrollPosThresholdCache=null;if(!this.scrollHide)return;if(this.scrollingTo!==true){this._offset=this.cacheOffset||this._offset}this.scrollingTo=true;this.scrollHide=false}handleScrollAway(t){if(this.scrollHide)return;if(!this.isStuck)return;if(this.scrollingTo!==false){this.cacheOffset=this._offset;this._offset=0}this.scrollingTo=false;if(!this.scrollPosThresholdCache)this.scrollPosThresholdCache=t;else if(!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100)this.scrollHide=true}moveTrigger(t){if(this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t){this.host.parentNode.insertBefore(this.trigger,this.host)}else this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)}getScrollParent(){const t=/(auto|scroll)/;const i=(t,s)=>{if(t.parentNode===null){return s}return i(t.parentNode,s.concat([t]))};const s=(t,i)=>getComputedStyle(t,null).getPropertyValue(i);const e=t=>s(t,"overflow")+s(t,"overflow-y")+s(t,"overflow-x");const h=i=>t.test(e(i));const n=document.documentElement.getBoundingClientRect().height;const o=t=>{if(!(typeof t==="object"))return;const s=i(t,[]);return s.find((t=>h(t)&&t.getBoundingClientRect().height!==n))||document};return o(this.host)}shouldStick(t){let i;if(this.positions.includes("top")){if(!this.isRootSticker){i=c(this.trigger,this.scrollParent).top}else{i=this.trigger.getBoundingClientRect().top}this.isStuck=i<-1}else if(this.positions.includes("bottom")){i=this.trigger.getBoundingClientRect().top;const s=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=!t.isIntersecting||i>s.height+s.top}}bootstrapGurantor(){this.hasBootstrapped=true;this.scrollParent=this.scrollParent||this.getScrollParent();this.isRootSticker=this.scrollParent instanceof Document;this.trigger=this.trigger||document.createElement("div");this.trigger.innerHTML=" ";this.trigger.classList.add("sticker-trigger");this.positionChange();this.moveTrigger(true);this.quietModeChange();this.listenForScrollParent=true;this.handleParentEvents(true);this.stickerIndex=Array.from(this.scrollParent.querySelectorAll("nano-sticker")).filter((t=>t.position===this.position)).findIndex((t=>t===this.host));this.setOffset();this.stickerResizeListener();this.setupParentResizeListener();this.slottedContent=Array.from(this.host.children);this.slottedContent.forEach((t=>{t.style.order=this.stickerIndex+""}));this.updateTriggerOffset();this.stickToChange();this.setupIO();this.onStickToDisplayEvent=o(this.onStickToDisplayEvent,50)}connectedCallback(){this.isRtl=this.host.dir==="rtl"||this.host.ownerDocument.dir==="rtl";document.documentElement.addEventListener("nanoComponentsReady",(()=>{setTimeout((t=>this.bootstrapGurantor()),200)}));setTimeout((t=>{if(!this.hasBootstrapped)this.bootstrapGurantor()}),1e3)}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}if(this.parentSizeObserver){this.parentSizeObserver.disconnect();this.parentSizeObserver=undefined}this.scrollParent=null;this.hasBootstrapped=false}render(){return s(e,{sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start")},s("div",{class:{sticker:true,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:t=>this.sticker=t},s("div",{class:"sticker-content",ref:t=>this.content=t},s("slot",null))))}get host(){return h(this)}static get watchers(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}}};f.style=r;export{f as nano_sticker};
|
5
|
+
//# sourceMappingURL=p-fcd8df14.entry.js.map
|
package/docs-json.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
|
-
"timestamp": "2023-
|
2
|
+
"timestamp": "2023-09-08T13:43:42",
|
3
3
|
"compiler": {
|
4
4
|
"name": "@stencil/core",
|
5
|
-
"version": "2.23.
|
5
|
+
"version": "2.23.1",
|
6
6
|
"typescriptVersion": "4.9.4"
|
7
7
|
},
|
8
8
|
"components": [
|
@@ -14242,7 +14242,7 @@
|
|
14242
14242
|
"text": "a function that attaches a keyboard accessible handle control element.\nThe function itself *must* return the handle element."
|
14243
14243
|
}
|
14244
14244
|
],
|
14245
|
-
"default": "(_number: number, _element: Element) => {\n const handleTpl = /* html */ `\n <nano-icon-button\n slot=\"end\"\n icon-name=\"light/arrows\"\n class=\"nano-sortable__keyboard-handle visually-hidden\"\n label=\"Re-order this item\"\n ></nano-icon-button>`;\n const div =
|
14245
|
+
"default": "(_number: number, _element: Element) => {\n const handleTpl = /* html */ `\n <nano-icon-button\n slot=\"end\"\n icon-name=\"light/arrows\"\n class=\"nano-sortable__keyboard-handle visually-hidden\"\n label=\"Re-order this item\"\n ></nano-icon-button>`;\n const div = document.createElement('div');\n div.innerHTML = handleTpl;\n\n const handle = div.children[0] as HTMLElement;\n _element.append(handle);\n return handle;\n }",
|
14246
14246
|
"values": [
|
14247
14247
|
{
|
14248
14248
|
"type": "(_number: number, _element: Element) => HTMLElement"
|
package/hydrate/index.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
7
7
|
|
8
8
|
/*!
|
9
|
-
Stencil Mock Doc v2.23.
|
9
|
+
Stencil Mock Doc v2.23.1 | MIT Licensed | https://stenciljs.com
|
10
10
|
*/
|
11
11
|
const CONTENT_REF_ID = 'r';
|
12
12
|
const ORG_LOCATION_ID = 'o';
|
@@ -5951,12 +5951,9 @@ const callRender = (e, t, n) => {
|
|
5951
5951
|
}
|
5952
5952
|
var I;
|
5953
5953
|
if (r) {
|
5954
|
-
let
|
5955
|
-
const
|
5956
|
-
for (;
|
5957
|
-
Array.from(e.childNodes).forEach((e => {
|
5958
|
-
8 === e.nodeType && "string" != typeof e["s-sn"] && e.parentNode.removeChild(e);
|
5959
|
-
}));
|
5954
|
+
let e = 0;
|
5955
|
+
const t = a.length;
|
5956
|
+
for (;e < t; e++) r.appendChild(a[e]);
|
5960
5957
|
}
|
5961
5958
|
o.$hostElement$ = e, s();
|
5962
5959
|
})(e, n.$tagName$, o, t);
|
@@ -14797,7 +14794,7 @@ class Popover {
|
|
14797
14794
|
}
|
14798
14795
|
}
|
14799
14796
|
|
14800
|
-
const dropdownCss = "/*!@:host*/.sc-nano-dropdown-h{box-sizing:border-box}/*!@*,\n*::before,\n*::after*/*.sc-nano-dropdown,*.sc-nano-dropdown::before,*.sc-nano-dropdown::after{box-sizing:border-box}/*!@[hidden]*/[hidden].sc-nano-dropdown{display:none !important}/*!@:host*/.sc-nano-dropdown-h{--width:auto;--border:var(--nano-layer-border-style, 1px solid var(--nano-layer-border-color, rgba(0, 0, 0, 0.1)));--border-radius:var(--nano-layer-border-radius, var(--nano-border-radius-medium, 4px));--background:var(--nano-layer-bg, #fff);--padding:10px 0;--overflow:auto;--dropdown-z-index:var(--nano-layer-index-dropdown, 300);--min-width:0;--box-shadow:var(--nano-layer-shadow-large, 0 2px 8px rgba(0, 0, 0, 0.2));--menu-height:var(--max-menu-height, 50vh);display:flex}/*!@.dropdown*/.dropdown.sc-nano-dropdown{position:relative}/*!@.dropdown__trigger*/.dropdown__trigger.sc-nano-dropdown{display:block}/*!@.dropdown__positioner*/.dropdown__positioner.sc-nano-dropdown{position:absolute;z-index:var(--dropdown-z-index);min-inline-size:var(--min-width);border:0;background:none;padding:0;overflow:visible}/*!@.dropdown__positioner::backdrop*/.dropdown__positioner.sc-nano-dropdown::backdrop{display:none}/*!@.dropdown__positioner[popover], .dropdown__positioner:popover-open*/.dropdown__positioner[popover].sc-nano-dropdown,.dropdown__positioner.sc-nano-dropdown:popover-open{inset:unset}@media (max-width: 35.9375em){/*!@.dropdown__positioner*/.dropdown__positioner.sc-nano-dropdown{z-index:100}}/*!@.dropdown__panel*/.dropdown__panel.sc-nano-dropdown{padding:var(--padding);background:var(--background);min-inline-size:var(--min-width);inline-size:var(--width);border:var(--border);border-radius:var(--border-radius);color:currentcolor;box-shadow:var(--box-shadow);opacity:0;transition:0.2s ease opacity, 0.2s ease transform, 0.2s ease min-block-size;min-block-size:20px;overflow:var(--overflow);box-sizing:content-box !important}/*!@.dropdown__panel.loading*/.dropdown__panel.loading.sc-nano-dropdown{overflow-y:hidden}/*!@.dropdown__panel.top*/.dropdown__panel.top.sc-nano-dropdown{transform:translateY(-20px) translateZ(0)}/*!@.dropdown__panel.bottom*/.dropdown__panel.bottom.sc-nano-dropdown{transform:translateY(20px) translateZ(0)}/*!@.dropdown__positioner.popover-visible .dropdown__panel*/.dropdown__positioner.popover-visible.sc-nano-dropdown .dropdown__panel.sc-nano-dropdown{opacity:1;transform:translateY(0) translateZ(0)}/*!@.dropdown__panel ::slotted(nano-menu)*/.dropdown__panel .sc-nano-dropdown-s>nano-menu{max-block-size:var(--menu-height)}/*!@.dropdown__accessible-title*/.dropdown__accessible-title.sc-nano-dropdown{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}";
|
14797
|
+
const dropdownCss = "/*!@:host*/.sc-nano-dropdown-h{box-sizing:border-box}/*!@*,\n*::before,\n*::after*/*.sc-nano-dropdown,*.sc-nano-dropdown::before,*.sc-nano-dropdown::after{box-sizing:border-box}/*!@[hidden]*/[hidden].sc-nano-dropdown{display:none !important}/*!@:host*/.sc-nano-dropdown-h{--width:auto;--border:var(--nano-layer-border-style, 1px solid var(--nano-layer-border-color, rgba(0, 0, 0, 0.1)));--border-radius:var(--nano-layer-border-radius, var(--nano-border-radius-medium, 4px));--background:var(--nano-layer-bg, #fff);--padding:10px 0;--overflow:auto;--dropdown-z-index:var(--nano-layer-index-dropdown, 300);--min-width:0;--box-shadow:var(--nano-layer-shadow-large, 0 2px 8px rgba(0, 0, 0, 0.2));--menu-height:var(--max-menu-height, 50vh);display:flex}/*!@.dropdown*/.dropdown.sc-nano-dropdown{position:relative}/*!@.dropdown__trigger*/.dropdown__trigger.sc-nano-dropdown{display:block}/*!@.dropdown__positioner*/.dropdown__positioner.sc-nano-dropdown{position:absolute;z-index:var(--dropdown-z-index);min-inline-size:var(--min-width);border:0;background:none;padding:0;overflow:visible;color:unset}/*!@.dropdown__positioner::backdrop*/.dropdown__positioner.sc-nano-dropdown::backdrop{display:none}/*!@.dropdown__positioner[popover], .dropdown__positioner:popover-open*/.dropdown__positioner[popover].sc-nano-dropdown,.dropdown__positioner.sc-nano-dropdown:popover-open{inset:unset}@media (max-width: 35.9375em){/*!@.dropdown__positioner*/.dropdown__positioner.sc-nano-dropdown{z-index:100}}/*!@.dropdown__panel*/.dropdown__panel.sc-nano-dropdown{padding:var(--padding);background:var(--background);min-inline-size:var(--min-width);inline-size:var(--width);border:var(--border);border-radius:var(--border-radius);color:currentcolor;box-shadow:var(--box-shadow);opacity:0;transition:0.2s ease opacity, 0.2s ease transform, 0.2s ease min-block-size;min-block-size:20px;overflow:var(--overflow);box-sizing:content-box !important}/*!@.dropdown__panel.loading*/.dropdown__panel.loading.sc-nano-dropdown{overflow-y:hidden}/*!@.dropdown__panel.top*/.dropdown__panel.top.sc-nano-dropdown{transform:translateY(-20px) translateZ(0)}/*!@.dropdown__panel.bottom*/.dropdown__panel.bottom.sc-nano-dropdown{transform:translateY(20px) translateZ(0)}/*!@.dropdown__positioner.popover-visible .dropdown__panel*/.dropdown__positioner.popover-visible.sc-nano-dropdown .dropdown__panel.sc-nano-dropdown{opacity:1;transform:translateY(0) translateZ(0)}/*!@.dropdown__panel ::slotted(nano-menu)*/.dropdown__panel .sc-nano-dropdown-s>nano-menu{max-block-size:var(--menu-height)}/*!@.dropdown__accessible-title*/.dropdown__accessible-title.sc-nano-dropdown{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}";
|
14801
14798
|
|
14802
14799
|
let dropDownIds = 0;
|
14803
14800
|
/**
|
@@ -14925,7 +14922,6 @@ class Dropdown {
|
|
14925
14922
|
}
|
14926
14923
|
/** Hides the dropdown panel */
|
14927
14924
|
async hide() {
|
14928
|
-
var _a;
|
14929
14925
|
this.ignoreOpenWatcher = true;
|
14930
14926
|
this.open = false;
|
14931
14927
|
const nanoHide = this.nanoHide.emit();
|
@@ -14937,16 +14933,19 @@ class Dropdown {
|
|
14937
14933
|
if (this.popover)
|
14938
14934
|
this.popover.hide();
|
14939
14935
|
this.ignoreOpenWatcher = false;
|
14940
|
-
// @ts-expect-error
|
14941
|
-
if (typeof ((_a = this.positioner) === null || _a === void 0 ? void 0 : _a.hidePopover) === 'function') {
|
14942
|
-
// @ts-expect-error
|
14943
|
-
this.positioner.hidePopover();
|
14944
|
-
}
|
14945
14936
|
document.removeEventListener('mousedown', this.handleDocumentMouseDown);
|
14946
14937
|
document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
14947
14938
|
if (this.accessibleTrigger && this.focusEleInDropDwn()) {
|
14948
14939
|
this.accessibleTrigger.focus();
|
14949
14940
|
}
|
14941
|
+
setTimeout(() => {
|
14942
|
+
var _a;
|
14943
|
+
// @ts-expect-error
|
14944
|
+
if (!this.open && typeof ((_a = this.positioner) === null || _a === void 0 ? void 0 : _a.hidePopover) === 'function') {
|
14945
|
+
// @ts-expect-error
|
14946
|
+
this.positioner.hidePopover();
|
14947
|
+
}
|
14948
|
+
}, 300);
|
14950
14949
|
}
|
14951
14950
|
// Private methods
|
14952
14951
|
/**
|
@@ -27230,7 +27229,7 @@ class Sortable {
|
|
27230
27229
|
class="nano-sortable__keyboard-handle visually-hidden"
|
27231
27230
|
label="Re-order this item"
|
27232
27231
|
></nano-icon-button>`;
|
27233
|
-
const div =
|
27232
|
+
const div = document.createElement('div');
|
27234
27233
|
div.innerHTML = handleTpl;
|
27235
27234
|
const handle = div.children[0];
|
27236
27235
|
_element.append(handle);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nanoporetech-digital/components",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.4.1",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "https://git.oxfordnanolabs.local/Digital/nano-components"
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"dependencies": {
|
58
58
|
"@fortawesome/fontawesome-pro": "^5.12.0",
|
59
59
|
"@popperjs/core": "^2.4.4",
|
60
|
-
"@stencil/core": "npm:@johnjenkins/stencil-community@2.23.
|
60
|
+
"@stencil/core": "npm:@johnjenkins/stencil-community@2.23.1",
|
61
61
|
"@stencil/store": "^1.5.0",
|
62
62
|
"@types/flickity": "^2.2.4",
|
63
63
|
"algoliasearch": "^4.1.0",
|
@@ -131,7 +131,7 @@
|
|
131
131
|
"nanopore",
|
132
132
|
"digital"
|
133
133
|
],
|
134
|
-
"gitHead": "
|
134
|
+
"gitHead": "25e68e684af372ba9979473a11bf547cbce5b275",
|
135
135
|
"volta": {
|
136
136
|
"node": "14.18.1",
|
137
137
|
"npm": "8.6.0"
|