@nanoporetech-digital/components 8.3.2 → 8.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/dist/cjs/constructible-style-BsHBb9au.js +133 -0
- package/dist/cjs/{fade-BzBFJiQK.js → fade-DBuNbJEw.js} +1 -1
- package/dist/cjs/{fullscreen-Cz3eYnOp.js → fullscreen-Bk4jXSN0.js} +1 -1
- package/dist/cjs/index-DGttnXif.js +28 -16
- package/dist/cjs/{lazyload-DIFYejbf.js → lazyload-gQqOMvpr.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +28 -9
- package/dist/cjs/nano-avatar_5.cjs.entry.js +11 -11
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/{nano-data-table-DFEflpc4.js → nano-data-table-BHQIpW0N.js} +31 -1
- package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
- package/dist/cjs/nano-details.cjs.entry.js +6 -4
- package/dist/cjs/nano-field-validator.cjs.entry.js +4 -2
- package/dist/cjs/nano-footer.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-nav.cjs.entry.js +22 -21
- package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +6 -130
- package/dist/cjs/nano-hero.cjs.entry.js +4 -4
- package/dist/cjs/{nano-icon_3.cjs.entry.js → nano-icon-button_2.cjs.entry.js} +2 -320
- package/dist/cjs/nano-icon.cjs.entry.js +326 -0
- package/dist/cjs/nano-in-page-nav.cjs.entry.js +1 -1
- package/dist/cjs/nano-increment.cjs.entry.js +1 -1
- package/dist/cjs/nano-intersection-observe.cjs.entry.js +1 -1
- package/dist/cjs/nano-masked-overflow.cjs.entry.js +3 -3
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +2 -2
- package/dist/cjs/nano-more-less.cjs.entry.js +2 -2
- package/dist/cjs/nano-rating.cjs.entry.js +4 -4
- package/dist/cjs/nano-resize-observe.cjs.entry.js +2 -2
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/{nano-slides-C576PTmo.js → nano-slides-C73bSG0h.js} +7 -7
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
- package/dist/cjs/nano-step-accordion.cjs.entry.js +101 -0
- package/dist/cjs/nano-step-breadcrumb.cjs.entry.js +133 -0
- package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-table.cjs.entry.js +2 -2
- package/dist/cjs/{page-dots-Clb2QknR.js → page-dots-BLPta5z5.js} +1 -1
- package/dist/cjs/{table.worker-DxRLPmU9.js → table.worker-BeE8kdSf.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/accordion/accordion.js +51 -13
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/data-table/table.js +1 -13
- package/dist/collection/components/details/details.js +9 -6
- package/dist/collection/components/field-validator/field-validator.js +4 -2
- package/dist/collection/components/footer/footer.css +7 -7
- package/dist/collection/components/footer/footer.js +2 -1
- package/dist/collection/components/global-nav/global-nav.js +23 -22
- package/dist/collection/components/global-search-results/global-search-results.js +4 -4
- package/dist/collection/components/grid/grid-item.js +1 -1
- package/dist/collection/components/grid/grid.js +1 -1
- package/dist/collection/components/hero/hero.js +4 -4
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/validate.js +1 -1
- package/dist/collection/components/img/img.js +3 -3
- package/dist/collection/components/in-page-nav/in-page-nav.js +1 -1
- package/dist/collection/components/increment/increment.js +1 -1
- package/dist/collection/components/intersection-observe/intersection-observe.js +1 -1
- package/dist/collection/components/masked-overflow/masked-overflow.js +3 -3
- package/dist/collection/components/menu-drawer/menu-drawer.js +2 -2
- package/dist/collection/components/more-less/more-less.js +2 -2
- package/dist/collection/components/rating/rating.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +2 -2
- package/dist/collection/components/select/select.js +7 -7
- package/dist/collection/components/slides/slide.js +1 -1
- package/dist/collection/components/slides/slides.js +3 -3
- package/dist/collection/components/sortable/sortable.js +1 -1
- package/dist/collection/components/step-accordion/step-accordion.css +138 -0
- package/dist/collection/components/step-accordion/step-accordion.js +190 -0
- package/dist/collection/components/step-breadcrumb/step-breadcrumb.css +231 -0
- package/dist/collection/components/step-breadcrumb/step-breadcrumb.js +222 -0
- package/dist/collection/components/sticker/sticker.js +2 -2
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/tabs/tab-content.js +2 -2
- package/dist/collection/components/tabs/tab.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/constructible-style.js +2 -2
- package/dist/collection/utils/performance.js +17 -0
- package/dist/components/accordion.js +80 -0
- package/dist/components/constructible-style.js +131 -0
- package/dist/components/details.js +6 -4
- package/dist/components/global-search-results.js +4 -4
- package/dist/components/grid.js +5 -129
- package/dist/components/icon.js +2 -2
- package/dist/components/img.js +3 -3
- package/dist/components/masked-overflow.js +3 -3
- package/dist/components/nano-accordion.js +1 -56
- package/dist/components/nano-data-table.js +30 -0
- package/dist/components/nano-field-validator.js +4 -2
- package/dist/components/nano-footer.js +2 -2
- package/dist/components/nano-global-nav.js +22 -21
- package/dist/components/nano-grid-item.js +1 -1
- package/dist/components/nano-hero.js +4 -4
- package/dist/components/nano-in-page-nav.js +1 -1
- package/dist/components/nano-increment.js +1 -1
- package/dist/components/nano-intersection-observe.js +1 -1
- package/dist/components/nano-menu-drawer.js +2 -2
- 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-step-accordion.d.ts +11 -0
- package/dist/components/nano-step-accordion.js +141 -0
- package/dist/components/nano-step-breadcrumb.d.ts +11 -0
- package/dist/components/nano-step-breadcrumb.js +181 -0
- package/dist/components/nano-tab-content.js +2 -2
- package/dist/components/nano-tab.js +2 -2
- package/dist/components/nano-table.js +2 -2
- package/dist/components/resize-observe.js +2 -2
- package/dist/components/select.js +7 -7
- package/dist/components/slides.js +3 -3
- package/dist/components/sticker.js +2 -2
- package/dist/components/tooltip.js +2 -2
- package/dist/esm/constructible-style-B2_GfhhS.js +131 -0
- package/dist/esm/{fade-D4P3XGVa.js → fade-C0NluV0K.js} +1 -1
- package/dist/esm/{fullscreen-Cfl6LvH2.js → fullscreen-Ck_w6MCZ.js} +1 -1
- package/dist/esm/index-BM3Om9WE.js +28 -16
- package/dist/esm/{lazyload-CQYknGN2.js → lazyload-DddTyM-A.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-accordion.entry.js +28 -9
- package/dist/esm/nano-avatar_5.entry.js +11 -11
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/{nano-data-table-Bqk8ZUaL.js → nano-data-table-CWliPF7Y.js} +31 -1
- package/dist/esm/nano-data-table.entry.js +1 -1
- package/dist/esm/nano-details.entry.js +6 -4
- package/dist/esm/nano-field-validator.entry.js +4 -2
- package/dist/esm/nano-footer.entry.js +2 -2
- package/dist/esm/nano-global-nav.entry.js +22 -21
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +7 -131
- package/dist/esm/nano-hero.entry.js +4 -4
- package/dist/esm/{nano-icon_3.entry.js → nano-icon-button_2.entry.js} +4 -321
- package/dist/esm/nano-icon.entry.js +324 -0
- package/dist/esm/nano-in-page-nav.entry.js +1 -1
- package/dist/esm/nano-increment.entry.js +1 -1
- package/dist/esm/nano-intersection-observe.entry.js +1 -1
- package/dist/esm/nano-masked-overflow.entry.js +3 -3
- package/dist/esm/nano-menu-drawer.entry.js +2 -2
- package/dist/esm/nano-more-less.entry.js +2 -2
- package/dist/esm/nano-rating.entry.js +4 -4
- package/dist/esm/nano-resize-observe.entry.js +2 -2
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/{nano-slides-DcJWApi6.js → nano-slides-BiPGpe5F.js} +7 -7
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/nano-sortable.entry.js +1 -1
- package/dist/esm/nano-step-accordion.entry.js +99 -0
- package/dist/esm/nano-step-breadcrumb.entry.js +131 -0
- package/dist/esm/nano-sticker.entry.js +2 -2
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-table.entry.js +2 -2
- package/dist/esm/{page-dots-kX7jiD3G.js → page-dots-WKehEjjM.js} +1 -1
- package/dist/esm/{table.worker-a52UkSRM.js → table.worker-DJks4i_l.js} +1 -1
- package/dist/nano-components/constructible-style-B2_GfhhS.js +4 -0
- package/dist/nano-components/{fade-D4P3XGVa.js → fade-C0NluV0K.js} +1 -1
- package/dist/nano-components/{fullscreen-Cfl6LvH2.js → fullscreen-Ck_w6MCZ.js} +1 -1
- package/dist/nano-components/{lazyload-CQYknGN2.js → lazyload-DddTyM-A.js} +1 -1
- package/dist/nano-components/nano-accordion.entry.js +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-components.css +32 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-data-table-CWliPF7Y.js +4 -0
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-details.entry.js +1 -1
- package/dist/nano-components/nano-field-validator.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-button_2.entry.js +4 -0
- package/dist/nano-components/nano-icon.entry.js +4 -0
- package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
- package/dist/nano-components/nano-increment.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-rating.entry.js +1 -1
- package/dist/nano-components/nano-resize-observe.entry.js +1 -1
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/{nano-slides-DcJWApi6.js → nano-slides-BiPGpe5F.js} +3 -3
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/nano-sortable.entry.js +1 -1
- package/dist/nano-components/nano-step-accordion.entry.js +4 -0
- package/dist/nano-components/nano-step-breadcrumb.entry.js +4 -0
- package/dist/nano-components/nano-sticker.entry.js +1 -1
- package/dist/nano-components/nano-tab-content.entry.js +1 -1
- package/dist/nano-components/nano-tab.entry.js +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{page-dots-kX7jiD3G.js → page-dots-WKehEjjM.js} +1 -1
- package/dist/nano-components/{table.worker-a52UkSRM.js → table.worker-DJks4i_l.js} +1 -1
- package/dist/stencil.config.js +1 -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/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/dist/types/components/accordion/accordion.d.ts +10 -4
- package/dist/types/components/details/details.d.ts +3 -2
- package/dist/types/components/footer/footer.d.ts +1 -0
- package/dist/types/components/global-nav/global-nav.d.ts +1 -1
- package/dist/types/components/step-accordion/step-accordion.d.ts +38 -0
- package/dist/types/components/step-breadcrumb/step-breadcrumb.d.ts +37 -0
- package/dist/types/components.d.ts +174 -4
- package/dist/types/utils/performance.d.ts +1 -0
- package/docs-json.json +352 -18
- package/docs-vscode.json +41 -2
- package/hydrate/index.js +404 -99
- package/hydrate/index.mjs +404 -99
- package/package.json +2 -2
- package/dist/nano-components/nano-data-table-Bqk8ZUaL.js +0 -4
- package/dist/nano-components/nano-icon_3.entry.js +0 -4
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -0,0 +1,181 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, Build, Host } from '@stencil/core/internal/client';
|
5
|
+
import { h } from './renderer.js';
|
6
|
+
import { C as ConstructibleStyle } from './constructible-style.js';
|
7
|
+
import { a as addGlobalStylesheetToShadow } from './style.js';
|
8
|
+
import { d as defineCustomElement$5 } from './dropdown.js';
|
9
|
+
import { d as defineCustomElement$4 } from './icon.js';
|
10
|
+
import { d as defineCustomElement$3 } from './menu.js';
|
11
|
+
import { d as defineCustomElement$2 } from './nav-item.js';
|
12
|
+
|
13
|
+
const stepBreadcrumbCss = ":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{display:block;--background:var(--nano-color-base-0)}.step-wrapper{container-type:inline-size}.step-list.desktop{display:flex;flex-direction:row;align-items:center;justify-content:space-between;list-style:none;padding:0;margin:0;position:relative;z-index:1}.step-list.desktop::before{content:\"\";display:block;flex-grow:1;block-size:1px;background-color:var(--nano-color-neutral-300);position:absolute;inset-block-start:50%;z-index:-1;inset-inline-start:0;inline-size:100%}.step-item-wrapper{flex:0 1 auto;display:inline-flex;align-items:center;cursor:pointer}.step-item-wrapper:last-of-type{flex:0 1 auto}.step-item-wrapper:last-of-type .step-item{padding-inline-end:0}.step-item-wrapper:first-of-type::before{display:none}.step-item-wrapper:first-of-type .step-item{padding-inline-start:0}.step-item-wrapper::before{content:\"\";grid-column:2;grid-row:1;inline-size:0.4rem;block-size:0.4rem;place-self:center end;inset-block-start:0.5px;position:relative;border-inline-end:1px solid var(--nano-color-neutral-300);border-block-end:1px solid var(--nano-color-neutral-300);rotate:-45deg}:dir(rtl) .step-item-wrapper::after{rotate:45deg}.step-item{all:unset;display:inline-flex;align-items:center;gap:var(--nano-spacing-sm);background-color:var(--background);padding:0 var(--nano-spacing-sm);position:relative}.step-item:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset);z-index:1}.step-item.step-item--disabled{cursor:not-allowed}.step-item.step-item--disabled>*{opacity:0.5}.step-item-icon{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);display:inline-flex;align-items:center;justify-content:center;inline-size:1.5rem;block-size:1.5rem;border-radius:var(--nano-border-radius-circle);background-color:transparent;color:var(--nano-color-neutral-1400);border:1px solid var(--nano-color-neutral-300)}.step-item--complete .step-item-icon{background-color:var(--nano-color-success-1000);color:var(--nano-color-base-0);border:none}.step-item--active .step-item-icon{background-color:var(--nano-color-primary-1000);color:var(--nano-color-base-0);border:none}.step-dropdown{inline-size:100%;min-inline-size:300px}.step-trigger{all:unset;display:inline-flex;gap:var(--nano-spacing-md);align-items:center;inline-size:100%;cursor:pointer}.step-trigger-text{display:flex;flex-direction:column}.step-trigger-now{font-weight:var(--nano-font-weight-normal);font-size:var(--nano-font-size-xl);line-height:var(--nano-line-height-denser);text-wrap:balance;color:var(--nano-color-neutral-1400)}.step-trigger-next{font-size:var(--nano-font-size-2xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);color:var(--nano-color-neutral-1000)}.step-trigger-icon{margin-inline-start:auto;color:var(--nano-color-primary-1000);transition:var(--nano-transition-x-fast) rotate}[open] .step-trigger-icon{rotate:180deg}.step-progress-circle{--size:64px;--thickness:4px;inline-size:var(--size);min-inline-size:var(--size);aspect-ratio:1/1;border-radius:50%;display:grid;place-items:center;position:relative}.step-progress-circle::before{content:\"\";position:absolute;inset:0;border-radius:50%;background:conic-gradient(var(--nano-color-success-1000) calc(var(--value) / var(--max) * 360deg), var(--nano-color-neutral-100) 0);-webkit-mask:radial-gradient(farthest-side, transparent calc(100% - var(--thickness)), black 90%);mask:radial-gradient(farthest-side, transparent calc(100% - var(--thickness)), black 90%)}.step-progress-title{font-size:var(--nano-font-size-sm);line-height:var(--nano-line-height-normal);font-weight:var(--nano-font-weight-bold);white-space:nowrap;color:var(--nano-color-neutral-1000)}.step-progress-title strong{color:var(--nano-color-neutral-1400)}";
|
14
|
+
|
15
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
16
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
17
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
18
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
19
|
+
else
|
20
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
21
|
+
if (d = decorators[i])
|
22
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
23
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
24
|
+
};
|
25
|
+
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
26
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
27
|
+
return Reflect.metadata(k, v);
|
28
|
+
};
|
29
|
+
const NanoStepBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class NanoStepBreadcrumb extends HTMLElement {
|
30
|
+
constructor() {
|
31
|
+
super();
|
32
|
+
this.__registerHost();
|
33
|
+
this.__attachShadow();
|
34
|
+
this.nanoStepActive = createEvent(this, "nanoStepActive", 7);
|
35
|
+
}
|
36
|
+
get host() { return this; }
|
37
|
+
calculatedWidth;
|
38
|
+
cacheKey;
|
39
|
+
/** The currently active step, zero-based index */
|
40
|
+
activeStep = 0;
|
41
|
+
handleActiveStepChange(newValue, oldValue) {
|
42
|
+
if (!this.steps[newValue]?.enabled)
|
43
|
+
this.activeStep = oldValue;
|
44
|
+
else {
|
45
|
+
const event = this.nanoStepActive.emit({
|
46
|
+
index: newValue,
|
47
|
+
step: this.steps[newValue],
|
48
|
+
});
|
49
|
+
if (event.defaultPrevented) {
|
50
|
+
this.activeStep = oldValue;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
/** Emitted when the active step changes. Prevent default to cancel the change */
|
55
|
+
nanoStepActive;
|
56
|
+
_steps = [];
|
57
|
+
stepProxyHandler = {
|
58
|
+
set: (target, prop, value) => {
|
59
|
+
target[prop] = value;
|
60
|
+
forceUpdate(this.host);
|
61
|
+
return true;
|
62
|
+
},
|
63
|
+
};
|
64
|
+
/** An array of steps, each with a title, completion status, and enabled state */
|
65
|
+
get steps() {
|
66
|
+
return this._steps;
|
67
|
+
}
|
68
|
+
set steps(value) {
|
69
|
+
this._steps = [];
|
70
|
+
// improved devX - use a proxy to re-render when step properties change
|
71
|
+
value.forEach((step) => {
|
72
|
+
const proxyStep = new Proxy(step, this.stepProxyHandler);
|
73
|
+
this._steps.push(proxyStep);
|
74
|
+
});
|
75
|
+
}
|
76
|
+
handleStepsChange() {
|
77
|
+
const numberOfSteps = this._steps.length;
|
78
|
+
const charLength = this._steps.reduce((acc, step) => acc + step.title.length, 0);
|
79
|
+
this.cacheKey = 'step-breadcrumb-' + numberOfSteps + charLength;
|
80
|
+
// text characters + icons (3 x 1.5rem) + arrows (2 x 1.875rem) + gaps (3 * 20px)
|
81
|
+
this.calculatedWidth = `calc(${charLength}ch + ${numberOfSteps * 1.5}rem + ${(numberOfSteps - 1) * 1.875}rem + ${numberOfSteps * 10}px)`;
|
82
|
+
}
|
83
|
+
styles = () => {
|
84
|
+
const css = /* css */ `@container (width > ${this.calculatedWidth}) {
|
85
|
+
.step-list.mobile.${this.cacheKey} { display: none; }
|
86
|
+
.step-list.desktop.${this.cacheKey} { display: flex; }
|
87
|
+
}
|
88
|
+
@container (width <= ${this.calculatedWidth}) {
|
89
|
+
.step-list.mobile.${this.cacheKey} { display: block; }
|
90
|
+
.step-list.desktop.${this.cacheKey} { display: none; }
|
91
|
+
}`;
|
92
|
+
return css;
|
93
|
+
};
|
94
|
+
componentWillLoad() {
|
95
|
+
this.handleStepsChange();
|
96
|
+
if (Build.isBrowser)
|
97
|
+
addGlobalStylesheetToShadow(this.host.shadowRoot);
|
98
|
+
}
|
99
|
+
ControlTag = ({ step, index, }) => {
|
100
|
+
const Tag = step.enabled ? (step.href ? 'A' : 'BUTTON') : 'SPAN';
|
101
|
+
return (h(Tag, { href: step.href || undefined, class: {
|
102
|
+
'step-item': true,
|
103
|
+
'step-item--active': index === this.activeStep,
|
104
|
+
'step-item--complete': step.complete,
|
105
|
+
'step-item--disabled': !step.enabled,
|
106
|
+
}, onClick: () => {
|
107
|
+
if (step.enabled) {
|
108
|
+
this.activeStep = index;
|
109
|
+
}
|
110
|
+
} }, h("span", { class: "step-item-icon", slot: "icon-start" }, index + 1), h("span", { class: "step-item-title" }, step.title)));
|
111
|
+
};
|
112
|
+
render() {
|
113
|
+
const Wrapper = this.steps.filter((step) => step.href).length > 0 ? 'nav' : 'div';
|
114
|
+
return (h(Host, { key: 'c4d0e767abe4ee65f8e70534844e7ff254455af0' }, h(Wrapper, { key: '6df94c5a9df7ae957b5ff243ecbe78e7c57233b3', class: "step-wrapper" }, h("ul", { key: 'ba1838191a0b888b630bfaba5125ae868f8aab38', class: `step-list desktop ${this.cacheKey}` }, this.steps.map((step, index) => (h("li", { class: "step-item-wrapper", key: index }, h(this.ControlTag, { step: step, index: index }))))), h("div", { key: '64ae2c870494d376f4bb6484e97a5217dc4be311', class: `step-list mobile ${this.cacheKey}` }, h("nano-dropdown", { key: '08d3dc468d594177b922ae91fb1ff02ed79d282c', dialogTitle: "Steps", class: "step-dropdown" }, h("button", { key: '88ef0602628d800a3517da3c06e2eea1dad5a7dd', slot: "trigger", class: "step-trigger" }, h("div", { key: '9d60be986e00fdd6814a910641cf94ef97fb2eed', class: "step-progress-circle", role: "progressbar", "aria-valuenow": "2", "aria-valuemin": "0", "aria-valuemax": "5", style: {
|
115
|
+
'--value': '' + (this.activeStep + 1),
|
116
|
+
'--max': '' + this.steps.length,
|
117
|
+
} }, h("span", { key: '9e6eb88c9fc12f4228f55fe04cb2e1ce9a92e1f2', class: "step-progress-text" }, h("strong", { key: '5e999ae958a2c43f5d8998e9083e91b11ea9041d' }, this.activeStep + 1), " of", ' ', this.steps.length)), h("div", { key: 'ccb66003ef35b256ae8d0d34c8cad7535680d05b', class: "step-trigger-text" }, h("div", { key: '87f8a73802c33c289860b0eb530edae379fa5ebf', class: "step-trigger-now" }, this.steps[this.activeStep | 0]?.title || 'Select a step'), h("div", { key: '9b00c5ae99376028ec077e782f430b0346580119', class: "step-trigger-next" }, this.steps[this.activeStep + 1]?.title || 'Next step')), h("nano-icon", { key: '5073cf36a3a15599df7fa3816a62e72af257ab99', class: "step-trigger-icon", name: "light/chevron-down" })), h("nano-menu", { key: '18f15bb2439661286c019a6f20272db72a6ad1b1' }, this.steps.map((step, index) => (h("nano-nav-item", { class: {
|
118
|
+
'step-item-mobile': true,
|
119
|
+
'step-item-mobile step-item--active': index === this.activeStep,
|
120
|
+
'step-item-mobile step-item--complete': step.complete,
|
121
|
+
}, disabled: !step.enabled, key: index, onClick: () => {
|
122
|
+
if (step.enabled) {
|
123
|
+
this.activeStep = index;
|
124
|
+
}
|
125
|
+
} }, h("span", { class: "step-item-icon", slot: "icon-start" }, index + 1), h("span", { class: "step-item-title" }, step.title))))))))));
|
126
|
+
}
|
127
|
+
static get watchers() { return {
|
128
|
+
"activeStep": ["handleActiveStepChange"],
|
129
|
+
"steps": ["handleStepsChange"]
|
130
|
+
}; }
|
131
|
+
static get style() { return stepBreadcrumbCss; }
|
132
|
+
}, [257, "nano-step-breadcrumb", {
|
133
|
+
"activeStep": [1026, "active-step"],
|
134
|
+
"steps": [6160],
|
135
|
+
"calculatedWidth": [32]
|
136
|
+
}, undefined, {
|
137
|
+
"activeStep": ["handleActiveStepChange"],
|
138
|
+
"steps": ["handleStepsChange"]
|
139
|
+
}]);
|
140
|
+
__decorate([
|
141
|
+
ConstructibleStyle({ cacheKeyProperty: 'calculatedWidth' }),
|
142
|
+
__metadata("design:type", Object)
|
143
|
+
], NanoStepBreadcrumb$1.prototype, "styles", void 0);
|
144
|
+
function defineCustomElement$1() {
|
145
|
+
if (typeof customElements === "undefined") {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
const components = ["nano-step-breadcrumb", "nano-dropdown", "nano-icon", "nano-menu", "nano-nav-item"];
|
149
|
+
components.forEach(tagName => { switch (tagName) {
|
150
|
+
case "nano-step-breadcrumb":
|
151
|
+
if (!customElements.get(tagName)) {
|
152
|
+
customElements.define(tagName, NanoStepBreadcrumb$1);
|
153
|
+
}
|
154
|
+
break;
|
155
|
+
case "nano-dropdown":
|
156
|
+
if (!customElements.get(tagName)) {
|
157
|
+
defineCustomElement$5();
|
158
|
+
}
|
159
|
+
break;
|
160
|
+
case "nano-icon":
|
161
|
+
if (!customElements.get(tagName)) {
|
162
|
+
defineCustomElement$4();
|
163
|
+
}
|
164
|
+
break;
|
165
|
+
case "nano-menu":
|
166
|
+
if (!customElements.get(tagName)) {
|
167
|
+
defineCustomElement$3();
|
168
|
+
}
|
169
|
+
break;
|
170
|
+
case "nano-nav-item":
|
171
|
+
if (!customElements.get(tagName)) {
|
172
|
+
defineCustomElement$2();
|
173
|
+
}
|
174
|
+
break;
|
175
|
+
} });
|
176
|
+
}
|
177
|
+
|
178
|
+
const NanoStepBreadcrumb = NanoStepBreadcrumb$1;
|
179
|
+
const defineCustomElement = defineCustomElement$1;
|
180
|
+
|
181
|
+
export { NanoStepBreadcrumb, defineCustomElement };
|
@@ -24,10 +24,10 @@ const NanoTabContent$1 = /*@__PURE__*/ proxyCustomElement(class NanoTabContent e
|
|
24
24
|
requestAnimationFrame(() => (this.ready = true));
|
25
25
|
}
|
26
26
|
render() {
|
27
|
-
return (h(Host, { key: '
|
27
|
+
return (h(Host, { key: '7afee777be86f5847c5ac4c8de6babae3199b01d', id: this.host.id || this.tabContentId, style: { display: this.active ? 'block' : 'none' }, role: "tabpanel", "aria-hidden": this.active ? 'false' : 'true', class: {
|
28
28
|
ready: this.ready,
|
29
29
|
'nano-tab-content': true,
|
30
|
-
} }, h("div", { key: '
|
30
|
+
} }, h("div", { key: 'c316e2c15458eeb9fb6162d81060b81a1132e795', part: "base", class: "nano-tab-content" }, h("slot", { key: '532eedd714e732749cfe9b303b1f4c633e89491c' }))));
|
31
31
|
}
|
32
32
|
static get style() { return tabContentCss; }
|
33
33
|
}, [257, "nano-tab-content", {
|
@@ -49,12 +49,12 @@ const NanoTab$1 = /*@__PURE__*/ proxyCustomElement(class NanoTab extends HTMLEle
|
|
49
49
|
}
|
50
50
|
};
|
51
51
|
render() {
|
52
|
-
return (h(Host, { key: '
|
52
|
+
return (h(Host, { key: '67fe232bda16bf41bf1268a1891cfeb6483ebd02', id: this.host.id || this.tabId, role: "tab", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.active ? 'true' : 'false', class: "nano-tab" }, h("div", { key: '6f07d7d5a89071e094fe3deb19e88ec66a524f3d', part: `base${this.active ? ' base--active' : ''}${this.disabled ? ' base--disabled' : ''}${this.closable ? ' base--closable' : ''}`, class: {
|
53
53
|
tab: true,
|
54
54
|
'tab--active': this.active,
|
55
55
|
'tab--disabled': this.disabled,
|
56
56
|
'tab--closable': this.closable,
|
57
|
-
} }, h("slot", { key: '
|
57
|
+
} }, h("slot", { key: '4c8dce458c8ae3ed526d4aed7332650be891510c', name: "start" }), h("div", { key: 'e71cced02347ffaa432b5711af54666ac0a6cfd6', part: "label", ref: (el) => (this.tab = el), tabindex: this.disabled || !this.active ? '-1' : '0', class: "tab__label" }, h("slot", { key: '382f7f77b009e3a5cf3af3d3b94b02e639bf2934' })), h("slot", { key: '82a2c81ab573d3c78b7d913f4b7ab146e7c6d5b2', name: "end" }), this.closable && !this.disabled && (h("nano-icon-button", { key: '14e812f9acd5e081a1eba5014f6d4fe4b79371e2', label: "Close this tab", iconName: "light/xmark", class: "tab__close-button", onClick: this.handleCloseClick, onKeyDown: this.handleCloseKeydown, part: "close-button" })))));
|
58
58
|
}
|
59
59
|
static get style() { return tabCss; }
|
60
60
|
}, [257, "nano-tab", {
|
@@ -229,10 +229,10 @@ const NanoTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoTable extends HTM
|
|
229
229
|
this.cleanUpObservers();
|
230
230
|
}
|
231
231
|
render() {
|
232
|
-
return (h(Host, { key: '
|
232
|
+
return (h(Host, { key: '3c45a2880bd20a771bcc682355452312340db56d', class: {
|
233
233
|
'nano-table': true,
|
234
234
|
'nano-table--props-ready': this.propsReady,
|
235
|
-
} }, this.scrollable && (h("nano-masked-overflow", { key: '
|
235
|
+
} }, this.scrollable && (h("nano-masked-overflow", { key: '6b29ca4c8c64deae80def0d3958dc25c4d6cd1c0', hideScrollbars: false, scrollControls: false, label: this.caption?.textContent || undefined, class: "nano-table__overflow-container" }, h("div", { key: '83dce90d6e5425b0fd2a2443d0d90b7acfc9c141', class: "nano-table__overflow" }))), h("slot", { key: 'cff62841c17cf20c2ff5872944dbd38bbe438369' })));
|
236
236
|
}
|
237
237
|
static get watchers() { return {
|
238
238
|
"compact": ["handleCompactChange"],
|
@@ -228,13 +228,13 @@ const ResizeObserve = /*@__PURE__*/ proxyCustomElement(class ResizeObserve exten
|
|
228
228
|
}
|
229
229
|
}
|
230
230
|
render() {
|
231
|
-
return (h(Host, { key: '
|
231
|
+
return (h(Host, { key: '3d1301e7d8a6c0f96188ea4dadddcc3f71a349cc', class: {
|
232
232
|
'nano-resize-observe': true,
|
233
233
|
'content-fit-x': this.contentFitX,
|
234
234
|
'content-fit-y': this.contentFitY,
|
235
235
|
'content-nofit-x': this.contentFitX === false,
|
236
236
|
'content-nofit-y': this.contentFitY === false,
|
237
|
-
} }, h("slot", { key: '
|
237
|
+
} }, h("slot", { key: '363d69b62debe81c7d3d1790d4dead42538f7118' }), !!this.notifyContentFit &&
|
238
238
|
(this.contentFitX !== null || this.contentFitY !== null) && [
|
239
239
|
this.contentFitX ? (h("slot", { name: "content-fit-x" })) : (h("slot", { name: "content-nofit-x" })),
|
240
240
|
this.contentFitY ? (h("slot", { name: "content-fit-y" })) : (h("slot", { name: "content-nofit-y" })),
|
@@ -711,30 +711,30 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
711
711
|
disabled,
|
712
712
|
clearControl: this.clearable,
|
713
713
|
}))(this);
|
714
|
-
return (h(Host, { key: '
|
714
|
+
return (h(Host, { key: '0648eef02c3e5fc9891e3aee3baa81eae2fc2b5e', type: this.multiple ? 'select-multiple' : 'select-one', "aria-disabled": this.disabled ? 'true' : null, class: {
|
715
715
|
'has-value': !!this.value.length || !!this.inputSearchVal.length,
|
716
716
|
'has-focus': this.hasFocus,
|
717
717
|
'is-invalid': this._invalid === true,
|
718
718
|
'is-valid': this._invalid === false,
|
719
719
|
'nano-select': true,
|
720
|
-
} }, h(FormControlWrap, { key: '
|
720
|
+
} }, h(FormControlWrap, { key: '36dcb0e4ef701eaf17ddf03f8f64cf83dee35b07', ...wrapOptions, class: {
|
721
721
|
'has-error': !!this.errorMessage &&
|
722
722
|
this.showInlineError &&
|
723
723
|
this._invalid === true,
|
724
724
|
'has-helper': this.hasHelperSlot,
|
725
725
|
'is-open': this.hasOpened,
|
726
726
|
masked: this.mask,
|
727
|
-
} }, h(FormControl, { key: '
|
728
|
-
this.mask && (h("div", { key: '
|
729
|
-
h("input", { key: '
|
730
|
-
])), !this.readonly && !this.disabled && (h("nano-datalist", { key: '
|
727
|
+
} }, h(FormControl, { key: '6adbd4bf79d59de4a8d8f20c6dc287b9f70c9e5c', ...controlOptions, ref: (el) => (this.selectWrap = el), onClearText: this.clearSelectValue, control: this.el, endValueSlot: h("slot", { name: "down-arrow" }, h("nano-icon", { class: "select__down-arrow", name: "light/chevron-down" })), showInlineError: this.showInlineError }, this.multiple && (h("div", { key: 'eaf182a6e691f3490a2e26522be8daef9f3c0e58', class: "select__multi-wrap select" }, this.multipleValues(labelId, moreId, helperEndId))), !this.multiple && [
|
728
|
+
this.mask && (h("div", { key: 'd08b3d345fde15bd92a9d3237c9f0265b39a1cbb', class: "select__mask" }, this.getLabel(this.value))),
|
729
|
+
h("input", { key: '29eb562d57d5af570132b502652fbf0109563481', ref: (input) => (this.inputCtrl = input), id: this.selectId, class: "select__native-input", "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, form: this.form, placeholder: this.placeholder, readonly: true, required: this.required, value: this.getLabel(this.value), onFocus: this.onFocus }),
|
730
|
+
])), !this.readonly && !this.disabled && (h("nano-datalist", { key: 'c7135aca51ac7e0b3f23fc63b8e8fef3d5d0d4a8', ref: (el) => (this.datalist = el), selected: this.valArray, type: this.multiple ? 'selectMulti' : 'select', options: this._options.length ? this._options : undefined, onNanoDeselect: (e) => {
|
731
731
|
e.preventDefault();
|
732
732
|
this.removeValue(e.detail.value);
|
733
733
|
}, onNanoOptionsUpdated: this.setOptions, onNanoSelect: this.setValue,
|
734
734
|
// @ts-expect-error - this bubbles from the nano-dropdown
|
735
735
|
onNanoShow: () => (this.hasOpened = true), onNanoHide: () => (this.hasOpened = false) }, this.allowCustomValues &&
|
736
736
|
this.multiple &&
|
737
|
-
!!this.inputSearchVal && (h("nano-option", { key: '
|
737
|
+
!!this.inputSearchVal && (h("nano-option", { key: 'c1bfe32d20443e5be164a400e5553e30488f26be', slot: "list-top", value: this.inputSearchVal, selected: false, label: this.inputSearchVal, onNanoSelect: () => this.inputCtrl.focus() }, h("span", { key: 'aad3f8699ac6e9538055437e30d040ba686b0c46', slot: "check-icon" }), "Add '", this.inputSearchVal, "'")), h("slot", { key: 'bbbc2b303f78dcdc9aaf19c78279099b389159c4' }))), h("select", { key: '87e9d612386dc3b0baf0a79b6de750d22043c967', id: this.selectId + '-hidden', class: "select__native-ctrl", ref: (select) => (this.nativeSelect = select), "aria-labelledby": labelId + ' ' + moreId + ' ' + helperEndId, disabled: this.disabled, form: this.form, multiple: this.multiple, name: this.name, required: this.required, onInvalid: this.handleInvalid }, this.allowCustomValues &&
|
738
738
|
this.valArray.map((val) => {
|
739
739
|
return (h("option", { value: val, selected: true }, val));
|
740
740
|
}), !this.allowCustomValues &&
|
@@ -2961,15 +2961,15 @@ const Slides = /*@__PURE__*/ proxyCustomElement(class Slides extends HTMLElement
|
|
2961
2961
|
this.destroyflickity();
|
2962
2962
|
}
|
2963
2963
|
render() {
|
2964
|
-
return (h(Host, { key: '
|
2964
|
+
return (h(Host, { key: '905eab94c6853e11f8103ade8a2711515a957a88', class: "nano-slides" }, h("div", { key: 'a6ca3bf953dc8ad8643b5f196bbbb4cad5696739', class: {
|
2965
2965
|
slideshow: true,
|
2966
2966
|
ready: this.ready,
|
2967
2967
|
'not-ready': !this.ready,
|
2968
|
-
}, part: "base" }, h("div", { key: '
|
2968
|
+
}, part: "base" }, h("div", { key: 'ebf38a42c8c0ee4a192e2c10c7e882f4953cf707', ref: (div) => (this.flickityEl = div), class: {
|
2969
2969
|
'flickity-container': true,
|
2970
2970
|
'slides-ready': this.slidesReady,
|
2971
2971
|
'slides-not-ready': !this.slidesReady,
|
2972
|
-
}, part: "slide-container" }, h("slot", { key: '
|
2972
|
+
}, part: "slide-container" }, h("slot", { key: 'ac8e76e6ee701ef38a73a1f753cbf7ad30ef9c59' })), h("div", { key: 'e74cad0bd4ec8e2e15308b26550a697ff3dd4dcb', class: "ui-extras" }, h("slot", { key: '8b7b6cfb6ba0e531a8c7707f5f65cba334e8eba6', name: "ui" })))));
|
2973
2973
|
}
|
2974
2974
|
static get watchers() { return {
|
2975
2975
|
"options": ["optionsChanged"],
|
@@ -607,12 +607,12 @@ const Sticker = /*@__PURE__*/ proxyCustomElement(class Sticker extends HTMLEleme
|
|
607
607
|
this.hasBootstrapped = false;
|
608
608
|
}
|
609
609
|
render() {
|
610
|
-
return (h(Host, { key: '
|
610
|
+
return (h(Host, { key: 'd0e4e1b0cc7c63db0389ee67b999c30347f7e16b', 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'), class: "nano-sticker" }, h("div", { key: '6f9852e2cfeb2e203e5dde6f71e7a042a996dd86', class: {
|
611
611
|
sticker: true,
|
612
612
|
sticky: this.isRootSticker && this.isSticky,
|
613
613
|
stuck: this.isStuck && this.isRootSticker && this.isSticky,
|
614
614
|
hide: this.isRootSticker && this.hide && this.isStuck,
|
615
|
-
}, ref: (div) => (this.sticker = div) }, h("div", { key: '
|
615
|
+
}, ref: (div) => (this.sticker = div) }, h("div", { key: '1e54d0ebe57b52c95a64acbb6d46f8c9d9778dd3', class: "sticker-content", ref: (div) => (this.content = div) }, h("slot", { key: 'e8359edd6c73c5006ff1c90a91ecafad07e5c915' })))));
|
616
616
|
}
|
617
617
|
static get watchers() { return {
|
618
618
|
"trigger": ["updateTriggerOffset"],
|
@@ -230,10 +230,10 @@ const Tooltip = /*@__PURE__*/ proxyCustomElement(class Tooltip extends HTMLEleme
|
|
230
230
|
this.popover.destroy();
|
231
231
|
}
|
232
232
|
render() {
|
233
|
-
return (h(Host, { key: '
|
233
|
+
return (h(Host, { key: '94758bb18228b14884cf2be79228e554de84013f', onKeyDown: this.handleKeyDown, onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick, class: "nano-tooltip" }, h("slot", { key: '45589386e68d89c21abbb50513678152e8bce9d1', onSlotchange: this.handleSlotChange }), h("div", { key: '6a76c101c35d45458f0a680753a381cc95631b87', ref: (el) => (this.tooltipPositioner = el), class: "tooltip-positioner", popover: "manual" }, h("div", { key: 'd3b2cc9c9018c9a0a5dc4cef256c8b9c568cd0b4', part: "base", ref: (el) => (this.tooltip = el), class: {
|
234
234
|
tooltip: true,
|
235
235
|
'tooltip--open': this.open,
|
236
|
-
}, role: "tooltip", "aria-hidden": this.open ? 'false' : 'true' }, h("slot", { key: '
|
236
|
+
}, role: "tooltip", "aria-hidden": this.open ? 'false' : 'true' }, h("slot", { key: '1c51cdc6a7ec88107e3290b0b9750198e7176c20', name: "content", onSlotchange: () => this.setLabel() }, this.content), h("div", { key: '00f090eee000e6bba713dc21a1d53c348eb94a76', class: "tooltip-arrow", "data-popper-arrow": true })))));
|
237
237
|
}
|
238
238
|
static get watchers() { return {
|
239
239
|
"content": ["setLabel"],
|
@@ -0,0 +1,131 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import { h, a as Host, g as getElement } from './index-BM3Om9WE.js';
|
5
|
+
|
6
|
+
// import type { VNode, HTMLStencilElement } from "@stencil/core";
|
7
|
+
const supportsConstructibleStylesheets = (() => {
|
8
|
+
try {
|
9
|
+
return !!new CSSStyleSheet();
|
10
|
+
}
|
11
|
+
catch (_e) {
|
12
|
+
return false;
|
13
|
+
}
|
14
|
+
})();
|
15
|
+
const cacheKeys = new WeakMap();
|
16
|
+
/**
|
17
|
+
* Dynamically create a constructible stylesheet which is applied to the component.
|
18
|
+
* The stylesheet is then cached for future instances of the component.
|
19
|
+
* @usage
|
20
|
+
As a string:
|
21
|
+
```
|
22
|
+
@ConstructableStyle() style = `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
|
23
|
+
```
|
24
|
+
As a function:
|
25
|
+
```
|
26
|
+
@ConstructableStyle() style = () => `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
|
27
|
+
```
|
28
|
+
* @param opts - optional `cacheKeyProperty` - in case an instance of a component could produce different styles based on variables.
|
29
|
+
* @returns `@ConstructableStyle` decorator
|
30
|
+
*/
|
31
|
+
function ConstructibleStyle(opts = {}) {
|
32
|
+
return (target, propertyKey) => {
|
33
|
+
if (!opts.cacheKeyProperty) {
|
34
|
+
opts.cacheKeyProperty = propertyKey;
|
35
|
+
}
|
36
|
+
const { componentWillLoad, render, componentWillRender } = target;
|
37
|
+
if (supportsConstructibleStylesheets && true) {
|
38
|
+
// adds a constructible stylesheet to the component
|
39
|
+
const addStylesheet = (instance) => {
|
40
|
+
if (!instance[opts.cacheKeyProperty] ||
|
41
|
+
(cacheKeys.get(instance) &&
|
42
|
+
cacheKeys.get(instance) === instance[opts.cacheKeyProperty]))
|
43
|
+
return;
|
44
|
+
cacheKeys.set(instance, instance[opts.cacheKeyProperty]);
|
45
|
+
const host = getElement(instance);
|
46
|
+
const cssText = typeof instance[propertyKey] === 'function'
|
47
|
+
? instance[propertyKey]()
|
48
|
+
: instance[propertyKey];
|
49
|
+
const root = (host.shadowRoot || document);
|
50
|
+
root.adoptedStyleSheets = [
|
51
|
+
...(root.adoptedStyleSheets || []),
|
52
|
+
getOrCreateStylesheet(instance, target, cssText, opts),
|
53
|
+
];
|
54
|
+
};
|
55
|
+
target.componentWillLoad = function () {
|
56
|
+
const willLoadResult = componentWillLoad && componentWillLoad.call(this);
|
57
|
+
addStylesheet(this);
|
58
|
+
return willLoadResult;
|
59
|
+
};
|
60
|
+
target.componentWillRender = function () {
|
61
|
+
const willRenderResult = componentWillRender && componentWillRender.call(this);
|
62
|
+
addStylesheet(this);
|
63
|
+
return willRenderResult;
|
64
|
+
};
|
65
|
+
}
|
66
|
+
else {
|
67
|
+
// adds a style element to the component
|
68
|
+
target.render = function () {
|
69
|
+
const cssText = typeof this[propertyKey] === 'function'
|
70
|
+
? this[propertyKey]()
|
71
|
+
: this[propertyKey];
|
72
|
+
let renderedNode = render.call(this);
|
73
|
+
if (isHost(renderedNode)) {
|
74
|
+
appendStyleToHost(renderedNode, target.constructor.name, cssText);
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
renderedNode = h(Host, null, renderedNode);
|
78
|
+
if (!('attachShadow' in HTMLElement.prototype)) {
|
79
|
+
appendStyleToHost(renderedNode, target.constructor.name, cssText);
|
80
|
+
}
|
81
|
+
else {
|
82
|
+
if (!target.__constructableStyle) {
|
83
|
+
const style = document.createElement('style');
|
84
|
+
style.setAttribute('type', 'text/css');
|
85
|
+
style.setAttribute('constructible-style', target.constructor.name);
|
86
|
+
style.innerHTML = cssText;
|
87
|
+
target.__constructableStyle = style;
|
88
|
+
document.head.appendChild(style);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
return renderedNode;
|
93
|
+
};
|
94
|
+
}
|
95
|
+
};
|
96
|
+
}
|
97
|
+
function appendStyleToHost(node, targetName, cssText) {
|
98
|
+
(getHostChildren(node) || []).push(h("style", { type: "text/css", "constructible-style": targetName }, cssText));
|
99
|
+
}
|
100
|
+
function getOrCreateStylesheet(instance, target, cssText, opts) {
|
101
|
+
if (!target.__constructableStyle) {
|
102
|
+
target.__constructableStyle = {};
|
103
|
+
}
|
104
|
+
const key = instance[opts.cacheKeyProperty];
|
105
|
+
if (!target.__constructableStyle[key]) {
|
106
|
+
target.__constructableStyle[key] = new CSSStyleSheet();
|
107
|
+
target.__constructableStyle[key].replace(cssText);
|
108
|
+
}
|
109
|
+
return target.__constructableStyle[key];
|
110
|
+
}
|
111
|
+
function isHost(node) {
|
112
|
+
for (const prop in node) {
|
113
|
+
if (prop in node) {
|
114
|
+
if (node[prop] === Host) {
|
115
|
+
return true;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
return false;
|
120
|
+
}
|
121
|
+
function getHostChildren(node) {
|
122
|
+
for (const prop in node) {
|
123
|
+
if (prop in node) {
|
124
|
+
if (Array.isArray(node[prop])) {
|
125
|
+
return node[prop];
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
export { ConstructibleStyle as C };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { F as Flickity, u as utils } from './nano-slides-
|
4
|
+
import { F as Flickity, u as utils } from './nano-slides-BiPGpe5F.js';
|
5
5
|
import './index-BM3Om9WE.js';
|
6
6
|
import './renderer-BaP2L8CT.js';
|
7
7
|
|
@@ -119,10 +119,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
119
119
|
}
|
120
120
|
switch(bundleId) {
|
121
121
|
|
122
|
-
case 'nano-accordion':
|
123
|
-
return import(
|
124
|
-
/* webpackMode: "lazy" */
|
125
|
-
'./nano-accordion.entry.js').then(processMod, consoleError);
|
126
122
|
case 'nano-alert':
|
127
123
|
return import(
|
128
124
|
/* webpackMode: "lazy" */
|
@@ -255,6 +251,14 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
255
251
|
return import(
|
256
252
|
/* webpackMode: "lazy" */
|
257
253
|
'./nano-split-pane.entry.js').then(processMod, consoleError);
|
254
|
+
case 'nano-step-accordion':
|
255
|
+
return import(
|
256
|
+
/* webpackMode: "lazy" */
|
257
|
+
'./nano-step-accordion.entry.js').then(processMod, consoleError);
|
258
|
+
case 'nano-step-breadcrumb':
|
259
|
+
return import(
|
260
|
+
/* webpackMode: "lazy" */
|
261
|
+
'./nano-step-breadcrumb.entry.js').then(processMod, consoleError);
|
258
262
|
case 'nano-tab':
|
259
263
|
return import(
|
260
264
|
/* webpackMode: "lazy" */
|
@@ -271,22 +275,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
271
275
|
return import(
|
272
276
|
/* webpackMode: "lazy" */
|
273
277
|
'./nano-table.entry.js').then(processMod, consoleError);
|
274
|
-
case 'nano-
|
278
|
+
case 'nano-accordion':
|
275
279
|
return import(
|
276
280
|
/* webpackMode: "lazy" */
|
277
|
-
'./nano-
|
278
|
-
case 'nano-
|
281
|
+
'./nano-accordion.entry.js').then(processMod, consoleError);
|
282
|
+
case 'nano-avatar_5':
|
279
283
|
return import(
|
280
284
|
/* webpackMode: "lazy" */
|
281
|
-
'./nano-
|
285
|
+
'./nano-avatar_5.entry.js').then(processMod, consoleError);
|
282
286
|
case 'nano-grid_2':
|
283
287
|
return import(
|
284
288
|
/* webpackMode: "lazy" */
|
285
289
|
'./nano-grid_2.entry.js').then(processMod, consoleError);
|
286
|
-
case 'nano-nav-item':
|
287
|
-
return import(
|
288
|
-
/* webpackMode: "lazy" */
|
289
|
-
'./nano-nav-item.entry.js').then(processMod, consoleError);
|
290
290
|
case 'nano-progress-bar':
|
291
291
|
return import(
|
292
292
|
/* webpackMode: "lazy" */
|
@@ -299,10 +299,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
299
299
|
return import(
|
300
300
|
/* webpackMode: "lazy" */
|
301
301
|
'./nano-datalist_3.entry.js').then(processMod, consoleError);
|
302
|
+
case 'nano-details':
|
303
|
+
return import(
|
304
|
+
/* webpackMode: "lazy" */
|
305
|
+
'./nano-details.entry.js').then(processMod, consoleError);
|
302
306
|
case 'nano-date-picker_2':
|
303
307
|
return import(
|
304
308
|
/* webpackMode: "lazy" */
|
305
309
|
'./nano-date-picker_2.entry.js').then(processMod, consoleError);
|
310
|
+
case 'nano-nav-item':
|
311
|
+
return import(
|
312
|
+
/* webpackMode: "lazy" */
|
313
|
+
'./nano-nav-item.entry.js').then(processMod, consoleError);
|
306
314
|
case 'nano-cta':
|
307
315
|
return import(
|
308
316
|
/* webpackMode: "lazy" */
|
@@ -319,18 +327,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
319
327
|
return import(
|
320
328
|
/* webpackMode: "lazy" */
|
321
329
|
'./nano-sticker.entry.js').then(processMod, consoleError);
|
330
|
+
case 'nano-spinner':
|
331
|
+
return import(
|
332
|
+
/* webpackMode: "lazy" */
|
333
|
+
'./nano-spinner.entry.js').then(processMod, consoleError);
|
322
334
|
case 'nano-dropdown_2':
|
323
335
|
return import(
|
324
336
|
/* webpackMode: "lazy" */
|
325
337
|
'./nano-dropdown_2.entry.js').then(processMod, consoleError);
|
326
|
-
case 'nano-
|
338
|
+
case 'nano-icon-button_2':
|
327
339
|
return import(
|
328
340
|
/* webpackMode: "lazy" */
|
329
|
-
'./nano-
|
330
|
-
case 'nano-
|
341
|
+
'./nano-icon-button_2.entry.js').then(processMod, consoleError);
|
342
|
+
case 'nano-icon':
|
331
343
|
return import(
|
332
344
|
/* webpackMode: "lazy" */
|
333
|
-
'./nano-
|
345
|
+
'./nano-icon.entry.js').then(processMod, consoleError);
|
334
346
|
case 'nano-data-table':
|
335
347
|
return import(
|
336
348
|
/* webpackMode: "lazy" */
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { F as Flickity, u as utils } from './nano-slides-
|
4
|
+
import { F as Flickity, u as utils } from './nano-slides-BiPGpe5F.js';
|
5
5
|
import './index-BM3Om9WE.js';
|
6
6
|
import './renderer-BaP2L8CT.js';
|
7
7
|
|