@nanoporetech-digital/components 8.3.2 → 8.4.0
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 +21 -20
- 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 +22 -21
- 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 +21 -20
- 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 +21 -20
- 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 +403 -98
- package/hydrate/index.mjs +403 -98
- 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 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{x6knoJK1 → FKs_t1C_}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -0,0 +1,222 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
5
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
6
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
7
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
8
|
+
else
|
9
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
10
|
+
if (d = decorators[i])
|
11
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
12
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
13
|
+
};
|
14
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
15
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
16
|
+
return Reflect.metadata(k, v);
|
17
|
+
};
|
18
|
+
import { forceUpdate, Host, Build, } from "@stencil/core";
|
19
|
+
import { h } from "../../utils/renderer";
|
20
|
+
import { ConstructibleStyle } from "../../utils/constructible-style";
|
21
|
+
import { addGlobalStylesheetToShadow } from "../../utils/style";
|
22
|
+
/**
|
23
|
+
* Presents a breadcrumb navigation for steps in a process, allowing users to see their progress and navigate back to completed steps.
|
24
|
+
*
|
25
|
+
* @version 8.4.0
|
26
|
+
* @status new
|
27
|
+
*/
|
28
|
+
export class NanoStepBreadcrumb {
|
29
|
+
host;
|
30
|
+
calculatedWidth;
|
31
|
+
cacheKey;
|
32
|
+
/** The currently active step, zero-based index */
|
33
|
+
activeStep = 0;
|
34
|
+
handleActiveStepChange(newValue, oldValue) {
|
35
|
+
if (!this.steps[newValue]?.enabled)
|
36
|
+
this.activeStep = oldValue;
|
37
|
+
else {
|
38
|
+
const event = this.nanoStepActive.emit({
|
39
|
+
index: newValue,
|
40
|
+
step: this.steps[newValue],
|
41
|
+
});
|
42
|
+
if (event.defaultPrevented) {
|
43
|
+
this.activeStep = oldValue;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
/** Emitted when the active step changes. Prevent default to cancel the change */
|
48
|
+
nanoStepActive;
|
49
|
+
_steps = [];
|
50
|
+
stepProxyHandler = {
|
51
|
+
set: (target, prop, value) => {
|
52
|
+
target[prop] = value;
|
53
|
+
forceUpdate(this.host);
|
54
|
+
return true;
|
55
|
+
},
|
56
|
+
};
|
57
|
+
/** An array of steps, each with a title, completion status, and enabled state */
|
58
|
+
get steps() {
|
59
|
+
return this._steps;
|
60
|
+
}
|
61
|
+
set steps(value) {
|
62
|
+
this._steps = [];
|
63
|
+
// improved devX - use a proxy to re-render when step properties change
|
64
|
+
value.forEach((step) => {
|
65
|
+
const proxyStep = new Proxy(step, this.stepProxyHandler);
|
66
|
+
this._steps.push(proxyStep);
|
67
|
+
});
|
68
|
+
}
|
69
|
+
handleStepsChange() {
|
70
|
+
const numberOfSteps = this._steps.length;
|
71
|
+
const charLength = this._steps.reduce((acc, step) => acc + step.title.length, 0);
|
72
|
+
this.cacheKey = 'step-breadcrumb-' + numberOfSteps + charLength;
|
73
|
+
// text characters + icons (3 x 1.5rem) + arrows (2 x 1.875rem) + gaps (3 * 20px)
|
74
|
+
this.calculatedWidth = `calc(${charLength}ch + ${numberOfSteps * 1.5}rem + ${(numberOfSteps - 1) * 1.875}rem + ${numberOfSteps * 10}px)`;
|
75
|
+
}
|
76
|
+
styles = () => {
|
77
|
+
const css = /* css */ `@container (width > ${this.calculatedWidth}) {
|
78
|
+
.step-list.mobile.${this.cacheKey} { display: none; }
|
79
|
+
.step-list.desktop.${this.cacheKey} { display: flex; }
|
80
|
+
}
|
81
|
+
@container (width <= ${this.calculatedWidth}) {
|
82
|
+
.step-list.mobile.${this.cacheKey} { display: block; }
|
83
|
+
.step-list.desktop.${this.cacheKey} { display: none; }
|
84
|
+
}`;
|
85
|
+
return css;
|
86
|
+
};
|
87
|
+
componentWillLoad() {
|
88
|
+
this.handleStepsChange();
|
89
|
+
if (Build.isBrowser)
|
90
|
+
addGlobalStylesheetToShadow(this.host.shadowRoot);
|
91
|
+
}
|
92
|
+
ControlTag = ({ step, index, }) => {
|
93
|
+
const Tag = step.enabled ? (step.href ? 'A' : 'BUTTON') : 'SPAN';
|
94
|
+
return (h(Tag, { href: step.href || undefined, class: {
|
95
|
+
'step-item': true,
|
96
|
+
'step-item--active': index === this.activeStep,
|
97
|
+
'step-item--complete': step.complete,
|
98
|
+
'step-item--disabled': !step.enabled,
|
99
|
+
}, onClick: () => {
|
100
|
+
if (step.enabled) {
|
101
|
+
this.activeStep = index;
|
102
|
+
}
|
103
|
+
} }, h("span", { class: "step-item-icon", slot: "icon-start" }, index + 1), h("span", { class: "step-item-title" }, step.title)));
|
104
|
+
};
|
105
|
+
render() {
|
106
|
+
const Wrapper = this.steps.filter((step) => step.href).length > 0 ? 'nav' : 'div';
|
107
|
+
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: {
|
108
|
+
'--value': '' + (this.activeStep + 1),
|
109
|
+
'--max': '' + this.steps.length,
|
110
|
+
} }, 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: {
|
111
|
+
'step-item-mobile': true,
|
112
|
+
'step-item-mobile step-item--active': index === this.activeStep,
|
113
|
+
'step-item-mobile step-item--complete': step.complete,
|
114
|
+
}, disabled: !step.enabled, key: index, onClick: () => {
|
115
|
+
if (step.enabled) {
|
116
|
+
this.activeStep = index;
|
117
|
+
}
|
118
|
+
} }, h("span", { class: "step-item-icon", slot: "icon-start" }, index + 1), h("span", { class: "step-item-title" }, step.title))))))))));
|
119
|
+
}
|
120
|
+
static get is() { return "nano-step-breadcrumb"; }
|
121
|
+
static get encapsulation() { return "shadow"; }
|
122
|
+
static get originalStyleUrls() {
|
123
|
+
return {
|
124
|
+
"$": ["step-breadcrumb.scss"]
|
125
|
+
};
|
126
|
+
}
|
127
|
+
static get styleUrls() {
|
128
|
+
return {
|
129
|
+
"$": ["step-breadcrumb.css"]
|
130
|
+
};
|
131
|
+
}
|
132
|
+
static get properties() {
|
133
|
+
return {
|
134
|
+
"activeStep": {
|
135
|
+
"type": "number",
|
136
|
+
"attribute": "active-step",
|
137
|
+
"mutable": true,
|
138
|
+
"complexType": {
|
139
|
+
"original": "number",
|
140
|
+
"resolved": "number",
|
141
|
+
"references": {}
|
142
|
+
},
|
143
|
+
"required": false,
|
144
|
+
"optional": false,
|
145
|
+
"docs": {
|
146
|
+
"tags": [],
|
147
|
+
"text": "The currently active step, zero-based index"
|
148
|
+
},
|
149
|
+
"getter": false,
|
150
|
+
"setter": false,
|
151
|
+
"reflect": false,
|
152
|
+
"defaultValue": "0"
|
153
|
+
},
|
154
|
+
"steps": {
|
155
|
+
"type": "unknown",
|
156
|
+
"attribute": "steps",
|
157
|
+
"mutable": false,
|
158
|
+
"complexType": {
|
159
|
+
"original": "Step[]",
|
160
|
+
"resolved": "Step[]",
|
161
|
+
"references": {
|
162
|
+
"Step": {
|
163
|
+
"location": "global",
|
164
|
+
"id": "global::Step"
|
165
|
+
}
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"required": false,
|
169
|
+
"optional": false,
|
170
|
+
"docs": {
|
171
|
+
"tags": [],
|
172
|
+
"text": "An array of steps, each with a title, completion status, and enabled state"
|
173
|
+
},
|
174
|
+
"getter": true,
|
175
|
+
"setter": true,
|
176
|
+
"defaultValue": "[]"
|
177
|
+
}
|
178
|
+
};
|
179
|
+
}
|
180
|
+
static get states() {
|
181
|
+
return {
|
182
|
+
"calculatedWidth": {}
|
183
|
+
};
|
184
|
+
}
|
185
|
+
static get events() {
|
186
|
+
return [{
|
187
|
+
"method": "nanoStepActive",
|
188
|
+
"name": "nanoStepActive",
|
189
|
+
"bubbles": true,
|
190
|
+
"cancelable": true,
|
191
|
+
"composed": true,
|
192
|
+
"docs": {
|
193
|
+
"tags": [],
|
194
|
+
"text": "Emitted when the active step changes. Prevent default to cancel the change"
|
195
|
+
},
|
196
|
+
"complexType": {
|
197
|
+
"original": "{\n step: Step;\n index: number;\n }",
|
198
|
+
"resolved": "{ step: Step; index: number; }",
|
199
|
+
"references": {
|
200
|
+
"Step": {
|
201
|
+
"location": "global",
|
202
|
+
"id": "global::Step"
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}];
|
207
|
+
}
|
208
|
+
static get elementRef() { return "host"; }
|
209
|
+
static get watchers() {
|
210
|
+
return [{
|
211
|
+
"propName": "activeStep",
|
212
|
+
"methodName": "handleActiveStepChange"
|
213
|
+
}, {
|
214
|
+
"propName": "steps",
|
215
|
+
"methodName": "handleStepsChange"
|
216
|
+
}];
|
217
|
+
}
|
218
|
+
}
|
219
|
+
__decorate([
|
220
|
+
ConstructibleStyle({ cacheKeyProperty: 'calculatedWidth' }),
|
221
|
+
__metadata("design:type", Object)
|
222
|
+
], NanoStepBreadcrumb.prototype, "styles", void 0);
|
@@ -603,12 +603,12 @@ export class Sticker {
|
|
603
603
|
this.hasBootstrapped = false;
|
604
604
|
}
|
605
605
|
render() {
|
606
|
-
return (h(Host, { key: '
|
606
|
+
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: {
|
607
607
|
sticker: true,
|
608
608
|
sticky: this.isRootSticker && this.isSticky,
|
609
609
|
stuck: this.isStuck && this.isRootSticker && this.isSticky,
|
610
610
|
hide: this.isRootSticker && this.hide && this.isStuck,
|
611
|
-
}, ref: (div) => (this.sticker = div) }, h("div", { key: '
|
611
|
+
}, ref: (div) => (this.sticker = div) }, h("div", { key: '1e54d0ebe57b52c95a64acbb6d46f8c9d9778dd3', class: "sticker-content", ref: (div) => (this.content = div) }, h("slot", { key: 'e8359edd6c73c5006ff1c90a91ecafad07e5c915' })))));
|
612
612
|
}
|
613
613
|
static get is() { return "nano-sticker"; }
|
614
614
|
static get encapsulation() { return "shadow"; }
|
@@ -227,10 +227,10 @@ export class NanoTable {
|
|
227
227
|
this.cleanUpObservers();
|
228
228
|
}
|
229
229
|
render() {
|
230
|
-
return (h(Host, { key: '
|
230
|
+
return (h(Host, { key: '3c45a2880bd20a771bcc682355452312340db56d', class: {
|
231
231
|
'nano-table': true,
|
232
232
|
'nano-table--props-ready': this.propsReady,
|
233
|
-
} }, this.scrollable && (h("nano-masked-overflow", { key: '
|
233
|
+
} }, 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' })));
|
234
234
|
}
|
235
235
|
static get is() { return "nano-table"; }
|
236
236
|
static get encapsulation() { return "scoped"; }
|
@@ -24,10 +24,10 @@ export class NanoTabContent {
|
|
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 is() { return "nano-tab-content"; }
|
33
33
|
static get encapsulation() { return "shadow"; }
|
@@ -51,12 +51,12 @@ export class NanoTab {
|
|
51
51
|
}
|
52
52
|
};
|
53
53
|
render() {
|
54
|
-
return (h(Host, { key: '
|
54
|
+
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: {
|
55
55
|
tab: true,
|
56
56
|
'tab--active': this.active,
|
57
57
|
'tab--disabled': this.disabled,
|
58
58
|
'tab--closable': this.closable,
|
59
|
-
} }, h("slot", { key: '
|
59
|
+
} }, 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" })))));
|
60
60
|
}
|
61
61
|
static get is() { return "nano-tab"; }
|
62
62
|
static get encapsulation() { return "shadow"; }
|
@@ -227,10 +227,10 @@ export class Tooltip {
|
|
227
227
|
this.popover.destroy();
|
228
228
|
}
|
229
229
|
render() {
|
230
|
-
return (h(Host, { key: '
|
230
|
+
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: {
|
231
231
|
tooltip: true,
|
232
232
|
'tooltip--open': this.open,
|
233
|
-
}, role: "tooltip", "aria-hidden": this.open ? 'false' : 'true' }, h("slot", { key: '
|
233
|
+
}, 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 })))));
|
234
234
|
}
|
235
235
|
static get is() { return "nano-tooltip"; }
|
236
236
|
static get encapsulation() { return "shadow"; }
|
@@ -33,9 +33,8 @@ export function ConstructibleStyle(opts = {}) {
|
|
33
33
|
opts.cacheKeyProperty = propertyKey;
|
34
34
|
}
|
35
35
|
const { componentWillLoad, render, componentWillRender } = target;
|
36
|
-
if (!componentWillLoad)
|
37
|
-
console.warn(`ConstructibleStyle requires you to have a \`componentWillLoad\` lifecycle method in \`${target.constructor.name}\`. Failure to add this function may cause ConstructibleStyle to fail due to StencilJS build optimizations.`);
|
38
36
|
if (supportsConstructibleStylesheets && !Build.isServer) {
|
37
|
+
// adds a constructible stylesheet to the component
|
39
38
|
const addStylesheet = (instance) => {
|
40
39
|
if (!instance[opts.cacheKeyProperty] ||
|
41
40
|
(cacheKeys.get(instance) &&
|
@@ -64,6 +63,7 @@ export function ConstructibleStyle(opts = {}) {
|
|
64
63
|
};
|
65
64
|
}
|
66
65
|
else {
|
66
|
+
// adds a style element to the component
|
67
67
|
target.render = function () {
|
68
68
|
const cssText = typeof this[propertyKey] === 'function'
|
69
69
|
? this[propertyKey]()
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
const measurePerf = true;
|
5
|
+
export function perMark(name, end = false) {
|
6
|
+
if (!performance || !measurePerf)
|
7
|
+
return;
|
8
|
+
if (end) {
|
9
|
+
performance?.mark('end' + name);
|
10
|
+
performance?.measure(name, 'start' + name, 'end' + name);
|
11
|
+
const entries = performance?.getEntriesByName(name);
|
12
|
+
console.info(entries[entries.length ? entries.length - 1 : 0]);
|
13
|
+
}
|
14
|
+
else {
|
15
|
+
performance?.mark('start' + name);
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
|
5
|
+
import { t as transformTag, h } from './renderer.js';
|
6
|
+
import { g as getDirectChildren } from './dom.js';
|
7
|
+
|
8
|
+
const accordionCss = ":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:contents}";
|
9
|
+
|
10
|
+
const NanoAccordion = /*@__PURE__*/ proxyCustomElement(class NanoAccordion extends HTMLElement {
|
11
|
+
constructor() {
|
12
|
+
super();
|
13
|
+
this.__registerHost();
|
14
|
+
this.__attachShadow();
|
15
|
+
this.nanoToggle = createEvent(this, "nanoToggle", 7);
|
16
|
+
}
|
17
|
+
indexOpened;
|
18
|
+
elementOpened;
|
19
|
+
get el() { return this; }
|
20
|
+
/** Force one details element to always be open */
|
21
|
+
alwaysOpen = false;
|
22
|
+
/** Fires when accordion elements toggle */
|
23
|
+
nanoToggle;
|
24
|
+
onToggleHandler(event) {
|
25
|
+
if (event.target?.tagName !== 'NANO-DETAILS')
|
26
|
+
return;
|
27
|
+
event.stopPropagation();
|
28
|
+
const items = getDirectChildren(this.el, transformTag('nano-details'));
|
29
|
+
items.forEach((item, i) => {
|
30
|
+
if (item !== event.target)
|
31
|
+
item.open = false;
|
32
|
+
else if (item === event.target) {
|
33
|
+
this.indexOpened = i;
|
34
|
+
}
|
35
|
+
});
|
36
|
+
this.nanoToggle.emit({ element: event.target, index: this.indexOpened });
|
37
|
+
}
|
38
|
+
onClosedHandler(event) {
|
39
|
+
event.stopPropagation();
|
40
|
+
if (this.alwaysOpen) {
|
41
|
+
let foundOpen;
|
42
|
+
const items = getDirectChildren(this.el, transformTag('nano-details'));
|
43
|
+
items.forEach((item) => {
|
44
|
+
if (item !== event.target && item.open) {
|
45
|
+
foundOpen = true;
|
46
|
+
}
|
47
|
+
});
|
48
|
+
if (!foundOpen) {
|
49
|
+
event.preventDefault();
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
if (this.elementOpened === event.target) {
|
54
|
+
this.elementOpened = null;
|
55
|
+
this.indexOpened = null;
|
56
|
+
this.nanoToggle.emit();
|
57
|
+
}
|
58
|
+
}
|
59
|
+
render() {
|
60
|
+
return h("slot", { key: 'a16b340b9312672847ee022b2beb6767fc0dfb86' });
|
61
|
+
}
|
62
|
+
static get style() { return accordionCss; }
|
63
|
+
}, [257, "nano-accordion", {
|
64
|
+
"alwaysOpen": [4, "always-open"]
|
65
|
+
}, [[0, "nanoOpen", "onToggleHandler"], [0, "nanoClose", "onClosedHandler"]]]);
|
66
|
+
function defineCustomElement() {
|
67
|
+
if (typeof customElements === "undefined") {
|
68
|
+
return;
|
69
|
+
}
|
70
|
+
const components = ["nano-accordion"];
|
71
|
+
components.forEach(tagName => { switch (tagName) {
|
72
|
+
case "nano-accordion":
|
73
|
+
if (!customElements.get(tagName)) {
|
74
|
+
customElements.define(tagName, NanoAccordion);
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
} });
|
78
|
+
}
|
79
|
+
|
80
|
+
export { NanoAccordion as N, defineCustomElement as d };
|
@@ -0,0 +1,131 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import { Build, h, Host, getElement } from '@stencil/core/internal/client';
|
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 && !Build.isServer) {
|
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 };
|
@@ -131,7 +131,9 @@ const NanoDetails = /*@__PURE__*/ proxyCustomElement(class NanoDetails extends H
|
|
131
131
|
if (this.stateChanging)
|
132
132
|
return;
|
133
133
|
for (const change of changes) {
|
134
|
-
if (change.type === 'attributes' &&
|
134
|
+
if (change.type === 'attributes' &&
|
135
|
+
change.attributeName === 'open' &&
|
136
|
+
!this.disabled) {
|
135
137
|
this.open = this.detailsEl.open;
|
136
138
|
}
|
137
139
|
}
|
@@ -159,13 +161,13 @@ const NanoDetails = /*@__PURE__*/ proxyCustomElement(class NanoDetails extends H
|
|
159
161
|
}
|
160
162
|
}
|
161
163
|
render() {
|
162
|
-
return (h(Host, { key: '
|
164
|
+
return (h(Host, { key: '1cbedc078a3390a3ad82b99ac0f37e8ea0f8d480', class: "nano-details" }, h("details", { key: '22659218ba7d1ec936523ff33c7ed2a1efb2af74', part: "base", ref: (d) => (this.detailsEl = d), class: {
|
163
165
|
details: true,
|
164
166
|
disabled: this.disabled,
|
165
|
-
} }, h("summary", { key: '
|
167
|
+
} }, h("summary", { key: '3a7cd64e7d8e2b5235b7c0f7d58c434cb2a52469', part: "header", "aria-controls": "content", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? '-1' : '0', id: "header", role: "button", class: "header", ref: (s) => (this.headerEl = s), onKeyDown: this.onKeyDown, onClick: this.onMouseDown }, this.slotCtrl.has('icon-start') && (h("span", { key: '4a8de08dca34823e162019e2d4dddef2ed2c123d', part: "icon icon--start", class: "icon icon--start" }, h("slot", { key: 'cf6ea31f1685afa4bde64a6cbdef43cb0d0a053a', name: "icon-start" }))), h("div", { key: '0b11c544cfbb5852dfeae66b482154f1780a2569', part: "label", class: "label" }, this.label ? this.label : h("slot", { name: "label" })), h("span", { key: '5470af7891318c513870c473a8ad1f501174f51b', part: "icon icon--end", class: "icon icon--end" }, this.open ? (h("slot", { name: "icon-collapse" })) : (h("slot", { name: "icon-expand" })), h("slot", { key: '45960716eeec5d5ad08b63fd536608fcd33ab8f2', name: "icon-end" }, !this.slotCtrl.has('icon-start') &&
|
166
168
|
!this.slotCtrl.has('icon-end') &&
|
167
169
|
!this.slotCtrl.has('icon-expand') &&
|
168
|
-
!this.slotCtrl.has('icon-collapse') && (h("nano-icon", { key: '
|
170
|
+
!this.slotCtrl.has('icon-collapse') && (h("nano-icon", { key: '5357b61cb197dc4a1ceccf415a34defdfeb6b290', class: "default-icon", name: "light/chevron-down" }))))), h("div", { key: 'aa7f850c8415c2cd40fd7a965fba8eb98fca62b5', part: "body", class: "body", ref: (div) => (this.bodyEl = div), role: "region", "aria-labelledby": "header" }, h("div", { key: 'e98e6a68e4c15525b4377d4229fb4a1855650732', part: "content-wrapper", class: "content-wrapper" }, h("div", { key: '6710e302f7e2a5987ccd6703ea3c6cc0bf705d23', part: "content", class: "content", id: "content" }, h("slot", { key: '891525e66383979e621787f766bcfbcea78a9630' })))))));
|
169
171
|
}
|
170
172
|
static get watchers() { return {
|
171
173
|
"open": ["toggleClick"]
|
@@ -314,12 +314,12 @@ const GlobalSearchResults = /*@__PURE__*/ proxyCustomElement(class GlobalSearchR
|
|
314
314
|
this.ro.observe(this.el);
|
315
315
|
}
|
316
316
|
render() {
|
317
|
-
return (h(Host, { key: '
|
317
|
+
return (h(Host, { key: 'c88b1cd5b5fcf63cc3961cc3e190fe4432349b03', class: {
|
318
318
|
small: this.currentWidth < 780,
|
319
319
|
'nano-global-search-results': true,
|
320
|
-
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: '
|
320
|
+
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: 'e27f4efbd7405ca852f9e6ea96d3a53b4ded8041', storeId: this.queryId, storeMethod: "url-hash-push", class: "main-search__wrap sc-nano-global-search-results", ref: (ele) => requestAnimationFrame(() => (this.algoliaEle = ele)), id: "main-search",
|
321
321
|
// @ts-expect-error this bubbles from nano-algolia-filter
|
322
|
-
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '
|
322
|
+
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: 'a614cc2ad29144b19555cf2106b8a38982817918', slot: "template" },
|
323
323
|
/* html */ `<div class="main-search sc-nano-global-search-results">
|
324
324
|
<nano-algolia-results id="main-search-results" class="main-search__results sc-nano-global-search-results" infinite-scroll>
|
325
325
|
<script type="text/template" slot="start-template">
|
@@ -697,7 +697,7 @@ const GlobalSearchResults = /*@__PURE__*/ proxyCustomElement(class GlobalSearchR
|
|
697
697
|
</div>
|
698
698
|
</div>
|
699
699
|
{{ /if }}
|
700
|
-
</div>`), h("div", { key: '
|
700
|
+
</div>`), h("div", { key: 'c759117717909ec2ca8973bd4de0175e06fd73fa', slot: "output" }), h("slot", { key: '45d84a723310889c1acb75b2563839e6bd164296' }))));
|
701
701
|
}
|
702
702
|
static get watchers() { return {
|
703
703
|
"algoliaEle": ["handleAlgoliaCredsChange", "handleAlgoliaIndexChange", "handleAlgoliaEleChange"],
|