@nanoporetech-digital/components 8.0.0-alpha.2 → 8.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{fade-C3xL9ihU.js → fade-Dt8ydSYD.js} +1 -1
- package/dist/cjs/{fullscreen-pHBD1-3e.js → fullscreen-D_o31hdQ.js} +1 -1
- package/dist/cjs/index-IR1lkhwT.js +6 -6
- package/dist/cjs/{lazyload-D2pj9J7r.js → lazyload-obUQkoFT.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-avatar_5.cjs.entry.js +7 -7
- package/dist/cjs/nano-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +2 -2
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-cta.cjs.entry.js +2 -1
- package/dist/cjs/{nano-data-table-BkyqQiTG.js → nano-data-table-Zj71h_Hm.js} +8 -5
- package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +8 -8
- package/dist/cjs/nano-file-upload.cjs.entry.js +48 -29
- package/dist/cjs/nano-footer.cjs.entry.js +3 -3
- package/dist/cjs/nano-global-nav.cjs.entry.js +10 -10
- package/dist/cjs/nano-grid_2.cjs.entry.js +3 -3
- package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-progress-bar.cjs.entry.js +3 -17
- package/dist/cjs/nano-rating.cjs.entry.js +4 -4
- package/dist/cjs/{nano-resize-observe_2.cjs.entry.js → nano-resize-observe.cjs.entry.js} +1 -19
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/{nano-slides-B3-XISfn.js → nano-slides-BcdSNmlz.js} +7 -7
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-table.cjs.entry.js +2 -2
- package/dist/cjs/{page-dots-DHz-mQDL.js → page-dots-CUrSK-1M.js} +1 -1
- package/dist/cjs/{style-BccHkuhC.js → style-Bf3iH5GX.js} +16 -2
- package/dist/cjs/{table.worker-NnDnfSFs.js → table.worker-D7-NI7ZI.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb.css +2 -125
- package/dist/collection/components/breadcrumb/breadcrumb.js +3 -2
- package/dist/collection/components/collapsible-comparison/collapsible-comparison.js +4 -3
- package/dist/collection/components/cta/cta.js +2 -1
- package/dist/collection/components/data-table/table.css +2 -7
- package/dist/collection/components/data-table/table.js +6 -3
- package/dist/collection/components/datalist/datalist.js +6 -6
- package/dist/collection/components/file-upload/file-upload.css +140 -215
- package/dist/collection/components/file-upload/file-upload.js +66 -44
- package/dist/collection/components/footer/footer.css +2 -3
- package/dist/collection/components/footer/footer.js +4 -3
- package/dist/collection/components/global-nav/global-nav.js +12 -11
- package/dist/collection/components/img/img.js +3 -3
- package/dist/collection/components/progress-bar/progress-bar.css +78 -33
- package/dist/collection/components/progress-bar/progress-bar.js +18 -61
- package/dist/collection/components/rating/rating.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +1 -1
- package/dist/collection/components/select/select.js +7 -7
- package/dist/collection/components/slides/slide.js +1 -1
- package/dist/collection/components/slides/slides.js +3 -3
- package/dist/collection/components/sortable/sortable.js +1 -1
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/sticker/sticker.js +2 -2
- package/dist/collection/components/table/table.js +2 -2
- package/dist/collection/components/tabs/tab-content.js +2 -2
- package/dist/collection/components/tabs/tab.js +2 -2
- package/dist/collection/components/tag/tag.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/style.js +16 -2
- package/dist/components/cta.js +2 -1
- package/dist/components/datalist.js +6 -6
- package/dist/components/img.js +5 -11
- package/dist/components/nano-breadcrumb.js +4 -3
- package/dist/components/nano-collapsible-comparison.js +4 -3
- package/dist/components/nano-data-table.js +17 -20
- package/dist/components/nano-file-upload.js +58 -33
- package/dist/components/nano-footer.js +5 -4
- package/dist/components/nano-global-nav.js +12 -11
- package/dist/components/nano-hero.js +6 -12
- package/dist/components/nano-rating.js +4 -4
- package/dist/components/nano-slide.js +1 -1
- package/dist/components/nano-sortable.js +1 -1
- package/dist/components/nano-tab-content.js +2 -2
- package/dist/components/nano-tab.js +2 -2
- package/dist/components/nano-table.js +2 -2
- package/dist/components/progress-bar.js +7 -23
- package/dist/components/resize-observe.js +1 -1
- package/dist/components/select.js +7 -7
- package/dist/components/slides.js +3 -3
- package/dist/components/spinner.js +1 -1
- package/dist/components/sticker.js +2 -2
- package/dist/components/style.js +16 -2
- package/dist/components/tag.js +2 -2
- package/dist/components/tooltip.js +2 -2
- package/dist/esm/{fade-BTgTGh6q.js → fade-DcRXMf28.js} +1 -1
- package/dist/esm/{fullscreen-BTpZyXkc.js → fullscreen-BQyi4GFz.js} +1 -1
- package/dist/esm/index-DXvE-U_j.js +6 -6
- package/dist/esm/{lazyload-BYoZ43fz.js → lazyload-C00srsFN.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-avatar_5.entry.js +7 -7
- package/dist/esm/nano-breadcrumb.entry.js +2 -2
- package/dist/esm/nano-collapsible-comparison.entry.js +2 -2
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-cta.entry.js +2 -1
- package/dist/esm/{nano-data-table-DDBCyBmN.js → nano-data-table-wGnglzmF.js} +8 -5
- package/dist/esm/nano-data-table.entry.js +1 -1
- package/dist/esm/nano-datalist_3.entry.js +8 -8
- package/dist/esm/nano-file-upload.entry.js +48 -29
- package/dist/esm/nano-footer.entry.js +4 -4
- package/dist/esm/nano-global-nav.entry.js +10 -10
- package/dist/esm/nano-grid_2.entry.js +3 -3
- package/dist/esm/nano-icon_3.entry.js +2 -2
- package/dist/esm/nano-progress-bar.entry.js +4 -18
- package/dist/esm/nano-rating.entry.js +4 -4
- package/dist/esm/{nano-resize-observe_2.entry.js → nano-resize-observe.entry.js} +2 -19
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/{nano-slides-CvZxKg4X.js → nano-slides-g94uYmWm.js} +7 -7
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/nano-sortable.entry.js +1 -1
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-sticker.entry.js +2 -2
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-table.entry.js +2 -2
- package/dist/esm/{page-dots-_tkpExQM.js → page-dots-B947EGDd.js} +1 -1
- package/dist/esm/{style-BrRDhFfF.js → style-xLaX004n.js} +16 -2
- package/dist/esm/{table.worker-webIEBZt.js → table.worker-DQJ9Zgy3.js} +1 -1
- package/dist/nano-components/{fade-BTgTGh6q.js → fade-DcRXMf28.js} +1 -1
- package/dist/nano-components/{fullscreen-BTpZyXkc.js → fullscreen-BQyi4GFz.js} +1 -1
- package/dist/nano-components/{lazyload-BYoZ43fz.js → lazyload-C00srsFN.js} +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
- package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
- package/dist/nano-components/nano-components.css +149 -19
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-cta.entry.js +1 -1
- package/dist/nano-components/{nano-data-table-DDBCyBmN.js → nano-data-table-wGnglzmF.js} +1 -1
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js +1 -1
- package/dist/nano-components/nano-file-upload.entry.js +1 -1
- package/dist/nano-components/nano-footer.entry.js +1 -1
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/nano-progress-bar.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js +1 -1
- package/dist/nano-components/nano-resize-observe.entry.js +4 -0
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/{nano-slides-CvZxKg4X.js → nano-slides-g94uYmWm.js} +3 -3
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/nano-sortable.entry.js +1 -1
- package/dist/nano-components/nano-spinner.entry.js +1 -1
- package/dist/nano-components/nano-sticker.entry.js +1 -1
- package/dist/nano-components/nano-tab-content.entry.js +1 -1
- package/dist/nano-components/nano-tab.entry.js +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{page-dots-_tkpExQM.js → page-dots-B947EGDd.js} +1 -1
- package/dist/nano-components/style-xLaX004n.js +4 -0
- package/dist/nano-components/{table.worker-webIEBZt.js → table.worker-DQJ9Zgy3.js} +1 -1
- package/dist/style/components.css +1 -1
- package/dist/style/components.css.map +1 -1
- package/dist/style/core.css +1 -1
- package/dist/style/core.css.map +1 -1
- package/dist/style/dark.css +1 -1
- package/dist/style/dark.css.map +1 -1
- package/dist/style/light.css +1 -1
- package/dist/style/light.css.map +1 -1
- package/dist/style/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/dist/types/components/collapsible-comparison/collapsible-comparison.d.ts +1 -1
- package/dist/types/components/file-upload/file-upload.d.ts +14 -9
- package/dist/types/components/progress-bar/progress-bar.d.ts +6 -13
- package/dist/types/components.d.ts +43 -96
- package/docs-json.json +111 -261
- package/docs-vscode.json +16 -22
- package/hydrate/index.js +130 -212
- package/hydrate/index.mjs +130 -212
- package/package.json +3 -3
- package/dist/collection/components/file-upload/file-upload-list.js +0 -3
- package/dist/collection/components/skeleton/skeleton.css +0 -83
- package/dist/collection/components/skeleton/skeleton.js +0 -57
- package/dist/components/nano-skeleton.d.ts +0 -11
- package/dist/components/nano-skeleton.js +0 -9
- package/dist/components/skeleton.js +0 -41
- package/dist/nano-components/nano-resize-observe_2.entry.js +0 -4
- package/dist/nano-components/style-BrRDhFfF.js +0 -4
- package/dist/types/components/file-upload/file-upload-list.d.ts +0 -0
- package/dist/types/components/skeleton/skeleton.d.ts +0 -12
@@ -1,40 +1,18 @@
|
|
1
|
-
/*!
|
2
|
-
* Custom elements for Nanopore-Digital Web applications
|
3
|
-
*/
|
4
|
-
import { Host } from "@stencil/core";
|
5
|
-
import { h } from "../../utils/renderer";
|
6
1
|
/**
|
7
2
|
* Shows the status of an ongoing operation.
|
8
3
|
*
|
9
|
-
* @version
|
10
|
-
* @status
|
11
|
-
*
|
12
|
-
* @slot - A label to show inside the indicator.
|
4
|
+
* @version 8.0.0
|
5
|
+
* @status new
|
6
|
+
* @type CSS Only
|
13
7
|
*
|
14
|
-
* @
|
15
|
-
* @part indicator - The progress bar indicator.
|
16
|
-
* @part label - The progress bar label.
|
8
|
+
* @slot - Used for mandatory `<progress>` element and optional `<label>`
|
17
9
|
*/
|
18
10
|
export class ProgressBar {
|
19
|
-
host;
|
20
|
-
/** The progress bar's percentage, 0 to 100. */
|
21
|
-
value = 0;
|
22
|
-
/** When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state. */
|
23
|
-
indeterminate = false;
|
24
11
|
/** Whether to show the progress bar's current percent as text. Will be overwritten if you use the default slot. */
|
25
12
|
showPercent = false;
|
26
|
-
|
27
|
-
|
28
|
-
'progress-bar': true,
|
29
|
-
'progress-bar--indeterminate': this.indeterminate,
|
30
|
-
}, role: "progressbar", title: this.host.title || undefined, "aria-label": "Progress", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": this.indeterminate ? null : this.value }, h("div", { key: 'dd80b47ed6627db8d93bf20a7ef096d44757ec56', part: "indicator", class: "progress-bar__indicator", style: {
|
31
|
-
width: !this.indeterminate ? `${this.value}%` : undefined,
|
32
|
-
} }, h("span", { key: '7b967332cff45da08a49008ac727f247750347ae', part: "label", class: "progress-bar__label" }, h("slot", { key: '5d2c53909892f8c81e151ec64a337e656e7e4dae' }, !this.indeterminate && this.showPercent
|
33
|
-
? `${this.value}%`
|
34
|
-
: ''))))));
|
35
|
-
}
|
13
|
+
/** The height of the progress-bar */
|
14
|
+
size = 'medium';
|
36
15
|
static get is() { return "nano-progress-bar"; }
|
37
|
-
static get encapsulation() { return "shadow"; }
|
38
16
|
static get originalStyleUrls() {
|
39
17
|
return {
|
40
18
|
"$": ["progress-bar.scss"]
|
@@ -47,29 +25,9 @@ export class ProgressBar {
|
|
47
25
|
}
|
48
26
|
static get properties() {
|
49
27
|
return {
|
50
|
-
"
|
51
|
-
"type": "number",
|
52
|
-
"attribute": "value",
|
53
|
-
"mutable": false,
|
54
|
-
"complexType": {
|
55
|
-
"original": "number",
|
56
|
-
"resolved": "number",
|
57
|
-
"references": {}
|
58
|
-
},
|
59
|
-
"required": false,
|
60
|
-
"optional": false,
|
61
|
-
"docs": {
|
62
|
-
"tags": [],
|
63
|
-
"text": "The progress bar's percentage, 0 to 100."
|
64
|
-
},
|
65
|
-
"getter": false,
|
66
|
-
"setter": false,
|
67
|
-
"reflect": false,
|
68
|
-
"defaultValue": "0"
|
69
|
-
},
|
70
|
-
"indeterminate": {
|
28
|
+
"showPercent": {
|
71
29
|
"type": "boolean",
|
72
|
-
"attribute": "
|
30
|
+
"attribute": "show-percent",
|
73
31
|
"mutable": false,
|
74
32
|
"complexType": {
|
75
33
|
"original": "boolean",
|
@@ -80,34 +38,33 @@ export class ProgressBar {
|
|
80
38
|
"optional": false,
|
81
39
|
"docs": {
|
82
40
|
"tags": [],
|
83
|
-
"text": "
|
41
|
+
"text": "Whether to show the progress bar's current percent as text. Will be overwritten if you use the default slot."
|
84
42
|
},
|
85
43
|
"getter": false,
|
86
44
|
"setter": false,
|
87
|
-
"reflect":
|
45
|
+
"reflect": true,
|
88
46
|
"defaultValue": "false"
|
89
47
|
},
|
90
|
-
"
|
91
|
-
"type": "
|
92
|
-
"attribute": "
|
48
|
+
"size": {
|
49
|
+
"type": "string",
|
50
|
+
"attribute": "size",
|
93
51
|
"mutable": false,
|
94
52
|
"complexType": {
|
95
|
-
"original": "
|
96
|
-
"resolved": "
|
53
|
+
"original": "'small' | 'medium' | 'large'",
|
54
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
97
55
|
"references": {}
|
98
56
|
},
|
99
57
|
"required": false,
|
100
58
|
"optional": false,
|
101
59
|
"docs": {
|
102
60
|
"tags": [],
|
103
|
-
"text": "
|
61
|
+
"text": "The height of the progress-bar"
|
104
62
|
},
|
105
63
|
"getter": false,
|
106
64
|
"setter": false,
|
107
|
-
"reflect":
|
108
|
-
"defaultValue": "
|
65
|
+
"reflect": true,
|
66
|
+
"defaultValue": "'medium'"
|
109
67
|
}
|
110
68
|
};
|
111
69
|
}
|
112
|
-
static get elementRef() { return "host"; }
|
113
70
|
}
|
@@ -166,23 +166,23 @@ export class Rating {
|
|
166
166
|
else {
|
167
167
|
displayValue = this.isHovering ? this.hoverValue : this.value;
|
168
168
|
}
|
169
|
-
return (h(Host, { key: '
|
169
|
+
return (h(Host, { key: '1f1a4c5f6b8dea2419e75be53db6e74d4455c3c5', class: "nano-rating" }, h("div", { key: '6898eef81bc7e3d634b3054a4694f49db79929c8', class: "rating-wrap" }, h("div", { key: 'bbad068f69e99c12083bb53c00a25b2dff02ddb7', dir: this.isRtl ? 'rtl' : null, ref: (el) => (this.rating = el), part: "base", class: {
|
170
170
|
rating: true,
|
171
171
|
'rating--readonly': this.readonly,
|
172
172
|
'rating--disabled': this.disabled,
|
173
|
-
}, "aria-disabled": this.disabled ? 'true' : 'false', "aria-readonly": this.readonly ? 'true' : 'false', "aria-valuenow": this.value, "aria-valuemin": 0, "aria-valuemax": this.max, tabIndex: this.disabled ? -1 : 0, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onMouseMove: this.handleMouseMove, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("span", { key: '
|
173
|
+
}, "aria-disabled": this.disabled ? 'true' : 'false', "aria-readonly": this.readonly ? 'true' : 'false', "aria-valuenow": this.value, "aria-valuemin": 0, "aria-valuemax": this.max, tabIndex: this.disabled ? -1 : 0, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onMouseMove: this.handleMouseMove, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("span", { key: 'd2518d1ec73803cdc284c64ff4fcee9c86f6077d', class: "rating__symbols rating__symbols--inactive" }, counter.map((index) => (h("span", { class: {
|
174
174
|
rating__symbol: true,
|
175
175
|
'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1,
|
176
176
|
},
|
177
177
|
// Users can click the current value to clear the rating. When this happens, we set this.isHovering to
|
178
178
|
// false to prevent the hover state from confusing them as they move the mouse out of the control. This
|
179
179
|
// extra mouseenter will reinstate it if they happen to mouse over an adjacent symbol.
|
180
|
-
onMouseEnter: this.handleMouseEnter, innerHTML: this.symbol(index + 1) })))), h("span", { key: '
|
180
|
+
onMouseEnter: this.handleMouseEnter, innerHTML: this.symbol(index + 1) })))), h("span", { key: '046a97718d174445372c909eee0d061c4effd770', ref: (span) => (this.indicator = span), class: "rating__symbols rating__symbols--indicator", style: {
|
181
181
|
clip: this.clip(displayValue),
|
182
182
|
} }, counter.map((index) => (h("span", { class: {
|
183
183
|
rating__symbol: true,
|
184
184
|
'rating__symbol--hover': this.isHovering && Math.ceil(displayValue) === index + 1,
|
185
|
-
}, innerHTML: this.symbol(index + 1) })))), h("input", { key: '
|
185
|
+
}, innerHTML: this.symbol(index + 1) })))), h("input", { key: '8a0a62b7419a719e2a2cf08e361aae299dea7d65', type: "hidden", name: this.name, value: this.value, disabled: this.disabled || this.readonly })))));
|
186
186
|
}
|
187
187
|
static get is() { return "nano-rating"; }
|
188
188
|
static get encapsulation() { return "scoped"; }
|
@@ -227,7 +227,7 @@ export class ResizeObserve {
|
|
227
227
|
this.ro.disconnect();
|
228
228
|
}
|
229
229
|
render() {
|
230
|
-
return (h(Host, { key: '
|
230
|
+
return (h(Host, { key: '67ae39458d0f21c7100481c6aa68f9455e468d86', class: "nano-resize-observe" }, h("slot", { key: '503108cec78fcfda303a9e392e1903ec7acfc244' }), !!this.notifyContentFit &&
|
231
231
|
(this.contentFitX !== null || this.contentFitY !== null) && [
|
232
232
|
this.contentFitX ? (h("slot", { name: "content-fit-x" })) : (h("slot", { name: "content-nofit-x" })),
|
233
233
|
this.contentFitY ? (h("slot", { name: "content-fit-y" })) : (h("slot", { name: "content-nofit-y" })),
|
@@ -701,30 +701,30 @@ export class Select {
|
|
701
701
|
disabled,
|
702
702
|
clearControl: this.clearable,
|
703
703
|
}))(this);
|
704
|
-
return (h(Host, { key: '
|
704
|
+
return (h(Host, { key: 'b85a8a4b4566ce33e0e7bae347c765037d1ec34b', type: this.multiple ? 'select-multiple' : 'select-one', "aria-disabled": this.disabled ? 'true' : null, class: {
|
705
705
|
'has-value': !!this.value.length || !!this.inputSearchVal.length,
|
706
706
|
'has-focus': this.hasFocus,
|
707
707
|
'is-invalid': this._invalid === true,
|
708
708
|
'is-valid': this._invalid === false,
|
709
709
|
'nano-select': true,
|
710
|
-
} }, h(FormControlWrap, { key: '
|
710
|
+
} }, h(FormControlWrap, { key: '42335a9fda2b4e2560f33e5d4c40a58403e482d2', ...wrapOptions, class: {
|
711
711
|
'has-error': !!this.errorMessage &&
|
712
712
|
this.showInlineError &&
|
713
713
|
this._invalid === true,
|
714
714
|
'has-helper': this.hasHelperSlot,
|
715
715
|
'is-open': this.hasOpened,
|
716
716
|
masked: this.mask,
|
717
|
-
} }, h(FormControl, { key: '
|
718
|
-
this.mask && (h("div", { key: '
|
719
|
-
h("input", { key: '
|
720
|
-
])), !this.readonly && !this.disabled && (h("nano-datalist", { key: '
|
717
|
+
} }, h(FormControl, { key: '7571a30e6a3f0b231d9e0b7a6e2f662fe3bd8183', ...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: 'e92b079944fb81314da40799ba8f11f5644d5fa7', class: "select__multi-wrap select" }, this.multipleValues(labelId, moreId, helperEndId))), !this.multiple && [
|
718
|
+
this.mask && (h("div", { key: '488c94ddb9e49c9e3f5a099a77cb0e879a02e1e2', class: "select__mask" }, this.getLabel(this.value))),
|
719
|
+
h("input", { key: '3fc66f07b7c9220e2c9d3eb02b1b268f52921a46', 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 }),
|
720
|
+
])), !this.readonly && !this.disabled && (h("nano-datalist", { key: '1737bc4d8e6267659ebbd981cd043e0a3f0e20e3', ref: (el) => (this.datalist = el), selected: this.valArray, type: this.multiple ? 'selectMulti' : 'select', options: this._options.length ? this._options : undefined, onNanoDeselect: (e) => {
|
721
721
|
e.preventDefault();
|
722
722
|
this.removeValue(e.detail.value);
|
723
723
|
}, onNanoOptionsUpdated: this.setOptions, onNanoSelect: this.setValue,
|
724
724
|
// @ts-expect-error - this bubbles from the nano-dropdown
|
725
725
|
onNanoShow: () => (this.hasOpened = true), onNanoHide: () => (this.hasOpened = false) }, this.allowCustomValues &&
|
726
726
|
this.multiple &&
|
727
|
-
!!this.inputSearchVal && (h("nano-option", { key: '
|
727
|
+
!!this.inputSearchVal && (h("nano-option", { key: '23a03a568fc87bd041b4c4e702afba215e637423', slot: "list-top", value: this.inputSearchVal, selected: false, label: this.inputSearchVal, onNanoSelect: () => this.inputCtrl.focus() }, h("span", { key: 'edd9ba1b076740baeaa34f62aa27f598bda7114d', slot: "check-icon" }), "Add '", this.inputSearchVal, "'")), h("slot", { key: '80e401156f240faf7fa04fef7915aa982305abd3' }))), h("select", { key: 'ba8bc3b4d7149e249c26f82da6816afa1b25fabf', 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 &&
|
728
728
|
this.valArray.map((val) => {
|
729
729
|
return (h("option", { value: val, selected: true }, val));
|
730
730
|
}), !this.allowCustomValues &&
|
@@ -30,7 +30,7 @@ export class Slide {
|
|
30
30
|
});
|
31
31
|
}
|
32
32
|
render() {
|
33
|
-
return (h(Host, { key: '
|
33
|
+
return (h(Host, { key: 'f45a8a3b8232fdca227e7d53642f31206ff2a6e0', class: "nano-slide" }, h("slot", { key: '248bc7303404576301a477ed36449388190e8417' })));
|
34
34
|
}
|
35
35
|
static get is() { return "nano-slide"; }
|
36
36
|
static get encapsulation() { return "shadow"; }
|
@@ -499,15 +499,15 @@ export class Slides {
|
|
499
499
|
this.destroyflickity();
|
500
500
|
}
|
501
501
|
render() {
|
502
|
-
return (h(Host, { key: '
|
502
|
+
return (h(Host, { key: '0eecdd4b8054bfc79c414f92cc52208cc17030c9', class: "nano-slides" }, h("div", { key: '52d4f9e42fc545c9fbd955f497ff31911e2bae7e', class: {
|
503
503
|
slideshow: true,
|
504
504
|
ready: this.ready,
|
505
505
|
'not-ready': !this.ready,
|
506
|
-
}, part: "base" }, h("div", { key: '
|
506
|
+
}, part: "base" }, h("div", { key: 'd41c00513b0f7a9a9cb05a5943f368b86af34bdf', ref: (div) => (this.flickityEl = div), class: {
|
507
507
|
'flickity-container': true,
|
508
508
|
'slides-ready': this.slidesReady,
|
509
509
|
'slides-not-ready': !this.slidesReady,
|
510
|
-
}, part: "slide-container" }, h("slot", { key: '
|
510
|
+
}, part: "slide-container" }, h("slot", { key: 'bebd09c2b27bc7dbae72d5cab15b8fbd77af52a0' })), h("div", { key: '4e5b0c0385dcc3757f889004ec50f7550bc3bfe2', class: "ui-extras" }, h("slot", { key: '6481258c29c5f30c2a47b102e47e9ce75260c712', name: "ui" })))));
|
511
511
|
}
|
512
512
|
static get is() { return "nano-slides"; }
|
513
513
|
static get encapsulation() { return "shadow"; }
|
@@ -733,7 +733,7 @@ export class Sortable {
|
|
733
733
|
}
|
734
734
|
}
|
735
735
|
render() {
|
736
|
-
return (h(Host, { key: '
|
736
|
+
return (h(Host, { key: '108dd7db53821adef114521be6a825561c974137', class: "nano-sortable" }, h("div", { key: '7b23e9a51e5cb366676fb61163b031c0ba693599', class: "sortable__live-region", "aria-live": "polite", "aria-relevant": "additions", "aria-atomic": "true", role: "log", part: "announcements" }, this.ariaTextList.map((str) => (h("div", null, str)))), h("slot", { key: 'a61fca55dd0de8a4dd1611ada70101ca19906528' })));
|
737
737
|
}
|
738
738
|
static get is() { return "nano-sortable"; }
|
739
739
|
static get encapsulation() { return "shadow"; }
|
@@ -22,7 +22,7 @@ export class Spinner {
|
|
22
22
|
this.hasText = !!this.el.childNodes.length;
|
23
23
|
}
|
24
24
|
render() {
|
25
|
-
return (h(Host, { key: '
|
25
|
+
return (h(Host, { key: '50440a7fb87c4e5b54d5b3ab1c5781a77dc580c9', class: "nano-spinner" }, h("div", { key: 'c4508214b1b17c54dadf15bf5d03128f560e99b8', class: "spinner", "aria-busy": "true", "aria-live": "polite" }, h("div", { key: 'ef7f2ac50d9c6f3d8565c692b67d991e175b674a', class: "spinner__loader" }, this.type === 'dna' && (h("div", { key: '269e356d7c35879d969b9308c00ece4bfa5fbc6b', class: "spinner__dna" }, h("div", { key: '727b7efd0f96663381e0634e3ce418c9c410f2fe', class: "spinner__dnatrack spinner__dnatrack--1" }, h("div", { key: '177cf194f19c2eee3a78b9e808637b5f1cd372dd', class: "spinner__dnadot spinner__dnadot--1" }), h("div", { key: '1b4a7b46b153f26db496499cf383eb442213bbba', class: "spinner__dnadot spinner__dnadot--2" })), h("div", { key: 'f2a0b517981107faa2ff467802a024f052247f42', class: "spinner__dnatrack spinner__dnatrack--2" }, h("div", { key: '9240ab7c633a21cc68e3c7848ac1c6a68b86353c', class: "spinner__dnadot spinner__dnadot--3" }), h("div", { key: '24a36e2fc04dfa727899e2fb0d31a0a6ac4d5ea3', class: "spinner__dnadot spinner__dnadot--4" })), h("div", { key: 'c9560b3b7566f57c613483e28adae95de5154801', class: "spinner__dnatrack spinner__dnatrack--3" }, h("div", { key: '9cc8b27ed18bb71b236d9714e74c97420ae102df', class: "spinner__dnadot spinner__dnadot--5" }), h("div", { key: '63e0ce5e9788e643303a8d99ad417a2d4ebf6ede', class: "spinner__dnadot spinner__dnadot--6" })), h("div", { key: 'c23c129f65a6c8bc5f9e0fe7fdc7218d1359cb41', class: "spinner__dnatrack spinner__dnatrack--4" }, h("div", { key: '9f4def6d87deef4c6dcb19952966a73c6783f3b7', class: "spinner__dnadot spinner__dnadot--7" }), h("div", { key: 'cd66a00f3a954c6e87dd66d2701cadc2fb0ba847', class: "spinner__dnadot spinner__dnadot--8" })), h("div", { key: '0a445022fdbbd1701c2d1d950532aeec863699c5', class: "spinner__dnatrack spinner__dnatrack--5" }, h("div", { key: 'd0e880fa837d3ac04dcae98932aff0b96521cdc9', class: "spinner__dnadot spinner__dnadot--9" }), h("div", { key: 'f269a858d997cf7c6f9bb3d981cc9d3a5735a89b', class: "spinner__dnadot spinner__dnadot--10" })))), this.type === 'circle' && h("span", { key: '16f2074c1aa97fe5a541cbcac45b76985c16de9e', class: "spinner__spin" })), this.hasText && (h("div", { class: "spinner__text", key: "spinner-text" }, h("slot", { key: '2dd688af910babb15d020e14a9bde2228adfee98' }))), this.overlay && (h("div", { class: "spinner__overlay", key: "spinner-overlay" })))));
|
26
26
|
}
|
27
27
|
static get is() { return "nano-spinner"; }
|
28
28
|
static get encapsulation() { return "shadow"; }
|
@@ -599,12 +599,12 @@ export class Sticker {
|
|
599
599
|
this.hasBootstrapped = false;
|
600
600
|
}
|
601
601
|
render() {
|
602
|
-
return (h(Host, { key: '
|
602
|
+
return (h(Host, { key: 'e928d991c33b98de7844974084b955c3168b8766', 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: 'cfdaf007080976d6e556eb66e76e5d6f1bd5cdda', class: {
|
603
603
|
sticker: true,
|
604
604
|
sticky: this.isRootSticker && this.isSticky,
|
605
605
|
stuck: this.isStuck && this.isRootSticker && this.isSticky,
|
606
606
|
hide: this.isRootSticker && this.hide && this.isStuck,
|
607
|
-
}, ref: (div) => (this.sticker = div) }, h("div", { key: '
|
607
|
+
}, ref: (div) => (this.sticker = div) }, h("div", { key: 'be64fd13b426ca2ecd2f0bc2b240271e0f64bdfc', class: "sticker-content", ref: (div) => (this.content = div) }, h("slot", { key: '83903ad04e5465798443ef86fe99ca78940bd45e' })))));
|
608
608
|
}
|
609
609
|
static get is() { return "nano-sticker"; }
|
610
610
|
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: 'd3e5a8138e931cb62fefade6b995111d958ad0a5', 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: '6775e115264b8810584bfbaa573558d539a6c14d', hideScrollbars: false, scrollControls: false, label: this.caption?.textContent || undefined, class: "nano-table__overflow-container" }, h("div", { key: '297a7ca1929ee780382132ef24ba25f8533c9140', class: "nano-table__overflow" }))), h("slot", { key: '0741a9939e245d5eea38641ed35fb46b4fecf4c5' })));
|
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: '35d8ae3c3bce8bdfbd59b24ac8d56b2b065121bf', 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: 'b12340e8aa22961ab261ebe58e150ea5b2434314', part: "base", class: "nano-tab-content" }, h("slot", { key: 'eea7e936ac8ebe2338720d5878e06372c222fda2' }))));
|
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: '0a14c43ba8ab38ec19e63fff1b7569d9f10457f0', 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: 'bff4ec7769d57b0b5b9e3f936c147023ff7b532c', 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: '797a1904ebaaa96585ff47bff275a9643d09a2b8', name: "start" }), h("div", { key: '588cb30e4c7dfa85c99c45ac231db0188cb56005', part: "label", ref: (el) => (this.tab = el), tabindex: this.disabled || !this.active ? '-1' : '0', class: "tab__label" }, h("slot", { key: '6ff03454d9735733007f430cdde78010717d8677' })), h("slot", { key: '959a2633b41acdd733aa29d43178ef15784a8652', name: "end" }), this.closable && !this.disabled && (h("nano-icon-button", { key: '02b6b8158044d7be61450b86774bbe9f63575062', 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"; }
|
@@ -41,8 +41,8 @@ export class NanoTag {
|
|
41
41
|
render() {
|
42
42
|
return (this.closable &&
|
43
43
|
!this.containsAnchor() && [
|
44
|
-
h("slot", { key: '
|
45
|
-
h("nano-icon-button", { key: '
|
44
|
+
h("slot", { key: '2ef94e5651a0428b93d9d3619ad0440bf70587e2' }),
|
45
|
+
h("nano-icon-button", { key: '0ad6bfbe3fd9ab8a796bbe915c6d522986236f1d', label: "Close", "icon-name": "light/xmark-large", onKeyDown: this.onKeyDown, onClick: this.handleClick }),
|
46
46
|
]);
|
47
47
|
}
|
48
48
|
static get is() { return "nano-tag"; }
|
@@ -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: '08c87af28b192ca65f9adf1d62dd83b7e75ae3b5', onKeyDown: this.handleKeyDown, onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick, class: "nano-tooltip" }, h("slot", { key: 'c132792e3f32e824735783e6284f1c12ea3c234a', onSlotchange: this.handleSlotChange }), h("div", { key: 'd27cc6ed095544d4f81680191647ead58ed2cc89', ref: (el) => (this.tooltipPositioner = el), class: "tooltip-positioner", popover: "manual" }, h("div", { key: 'c002bf4ec9a19eb5631d120498df58956d81e9ba', 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: '9f25b5ba1a2732bf2b6f6791bc47fb6c66e08bb6', name: "content", onSlotchange: () => this.setLabel() }, this.content), h("div", { key: '8d9e9b42fc0fb8e6491492b28019c184b7fc4fac', class: "tooltip-arrow", "data-popper-arrow": true })))));
|
234
234
|
}
|
235
235
|
static get is() { return "nano-tooltip"; }
|
236
236
|
static get encapsulation() { return "shadow"; }
|
@@ -23,9 +23,23 @@ export function addGlobalStylesheetToShadow(shadowRoot) {
|
|
23
23
|
let rule = null;
|
24
24
|
let globalStylesheet = [];
|
25
25
|
for (stylesheet of globalStylesheets) {
|
26
|
-
if (!(stylesheet instanceof CSSStyleSheet))
|
26
|
+
if (!(stylesheet instanceof CSSStyleSheet)) {
|
27
27
|
continue;
|
28
|
-
|
28
|
+
}
|
29
|
+
let cssRules;
|
30
|
+
try {
|
31
|
+
// Attempt to access the cssRules of the stylesheet
|
32
|
+
cssRules = stylesheet?.cssRules;
|
33
|
+
// no cssRules? skip it
|
34
|
+
if (!cssRules)
|
35
|
+
continue;
|
36
|
+
}
|
37
|
+
catch (e) {
|
38
|
+
// some stylesheets may not be accessible due to CORS or other restrictions
|
39
|
+
console.warn('Unable to access stylesheet:', stylesheet, e);
|
40
|
+
continue;
|
41
|
+
}
|
42
|
+
for (rule of cssRules) {
|
29
43
|
// arbitrary piece of text to check for that appears early in the `nano-components` stylesheet
|
30
44
|
// this is a bit fragile but does the job
|
31
45
|
if (rule instanceof CSSLayerBlockRule &&
|
package/dist/components/cta.js
CHANGED
@@ -27,9 +27,10 @@ const NanoCta = /*@__PURE__*/ proxyCustomElement(class NanoCta extends HTMLEleme
|
|
27
27
|
/** Predefined styles when displaying a number of CTAs together */
|
28
28
|
group;
|
29
29
|
componentWillLoad() {
|
30
|
-
if (!this.host.querySelector('button, a')) {
|
30
|
+
if (!this.host.querySelector('button, a, div')) {
|
31
31
|
const button = document.createElement('button');
|
32
32
|
button.classList.add('nano-internal-cta');
|
33
|
+
button.type = 'button';
|
33
34
|
this.host.childNodes.forEach((node) => {
|
34
35
|
button.appendChild(node);
|
35
36
|
});
|
@@ -103,7 +103,7 @@ const DataList = /*@__PURE__*/ proxyCustomElement(class DataList extends HTMLEle
|
|
103
103
|
writeTask(() => {
|
104
104
|
if (this.open) {
|
105
105
|
const { height, top } = this.nanoDropdown.tetherTo.getBoundingClientRect();
|
106
|
-
this.nanoDropdown.style.setProperty('--max-height', window.innerHeight - (height + top + 40)
|
106
|
+
this.nanoDropdown.style.setProperty('--max-height', `max(${window.innerHeight - (height + top + 40)}px, 48vw)`);
|
107
107
|
}
|
108
108
|
this.nanoDropdown.open = this.open;
|
109
109
|
if (this.connectedInput) {
|
@@ -525,18 +525,18 @@ const DataList = /*@__PURE__*/ proxyCustomElement(class DataList extends HTMLEle
|
|
525
525
|
}
|
526
526
|
}
|
527
527
|
render() {
|
528
|
-
return (h(Host, { key: '
|
528
|
+
return (h(Host, { key: 'b9c67e5dfc3c26c4eac219d9bdc9081aa79d7122', class: "nano-datalist", role: this.actvOptEles.length ? 'listbox' : undefined, "aria-owns": this.optionIds.length ? this.optionIds.join(' ') : undefined, "aria-label": this.optionIds.length
|
529
529
|
? 'Select options from the list below'
|
530
|
-
: undefined }, h("nano-dropdown", { key: '
|
530
|
+
: undefined }, h("nano-dropdown", { key: '29a0de977f7be1a39c5c869a5ab366bb64711d9e', part: "dropdown", exportparts: "trigger:dropdown__trigger, panel:dropdown__panel", ...this.dropDownConfig, ref: (el) => (this.nanoDropdown = el), dialogTitle: "Select options from the list below", class: {
|
531
531
|
dlist__dropdown: true,
|
532
532
|
'dlist--isfiltered': this.isFiltered,
|
533
|
-
}, onNanoAfterShow: this.handleShow, onNanoAfterHide: this.handleHide, role: "group" }, h("nano-menu", { key: '
|
533
|
+
}, onNanoAfterShow: this.handleShow, onNanoAfterHide: this.handleHide, role: "group" }, h("nano-menu", { key: '86769c73825853c557ed7a1dfb0f86898ce6504f', part: "main-menu", ref: (el) => (this.listBox = el), hidden: !this.actvOptEles.length, type: "listbox", label: this.inputLabel ? this.inputLabel.textContent : undefined, class: {
|
534
534
|
dlist__menu: true,
|
535
535
|
'dlist__menu--open': this.dropwdownOpen,
|
536
|
-
}, tabIndex: -1, onNanoSelect: this.optSelected, onKeyDown: this.optionKeyDown }, h("slot", { key: '
|
536
|
+
}, tabIndex: -1, onNanoSelect: this.optSelected, onKeyDown: this.optionKeyDown }, h("slot", { key: 'f5ea0623591a368f38ce3c1e41ef431c4a9f5960', name: "list-top" }), h("slot", { key: '98804885ffb99528138867d2747af3acef3f64f7' }), h("slot", { key: '1341dc10f96570c04613153cf939aaf7dc21f0d3', name: "internal-opts" }), h("slot", { key: '84d86a667a69cd571f7b96dc29d1ddd58c3d482c', name: "list-bottom" })), h("nano-menu", { key: '9b09caa70bd106eb9e64c714072c0b88275f34c6', part: "no-result-menu", type: "listbox", label: "No results found", hidden: !!this.actvOptEles.length, class: {
|
537
537
|
dlist__menu: true,
|
538
538
|
'dlist__menu--open': this.dropwdownOpen,
|
539
|
-
} }, h("slot", { key: '
|
539
|
+
} }, h("slot", { key: '58187330291198ff00571570e2b6b6bfdc79c905', name: "no-result" })), !!this.actvOptEles && (h("div", { key: '72ea39405f558d10de86a14704ed48e869f01426', class: "dlist__status" }, this.actvOptEles.length, " result", this.actvOptEles.length > 1 ? 's' : '', " available.")))));
|
540
540
|
}
|
541
541
|
static get watchers() { return {
|
542
542
|
"open": ["openWatcher"],
|
package/dist/components/img.js
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
*/
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, Host, Build } from '@stencil/core/internal/client';
|
5
5
|
import { h } from './renderer.js';
|
6
|
-
import { d as defineCustomElement$
|
7
|
-
import { d as defineCustomElement$1 } from './skeleton.js';
|
6
|
+
import { d as defineCustomElement$1 } from './resize-observe.js';
|
8
7
|
|
9
8
|
const imgCss = ":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{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;flex:1 1 100%;display:flex;flex-direction:column;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px);flex:1}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0)}@media not all and (resolution >= 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";
|
10
9
|
|
@@ -143,16 +142,16 @@ const Img = /*@__PURE__*/ proxyCustomElement(class Img extends HTMLElement {
|
|
143
142
|
const bgStyle = this.loadSrc
|
144
143
|
? { 'background-image': `url(${this.loadSrc})` }
|
145
144
|
: {};
|
146
|
-
return (h(Host, { key: 'a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af', class: "nano-img" }, h("div", { key: '1f40afc64a5652f53b224403c59b4f108e5eb044', class: "img" }, h("
|
145
|
+
return (h(Host, { key: 'a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af', class: "nano-img" }, h("div", { key: '1f40afc64a5652f53b224403c59b4f108e5eb044', class: "img" }, h("div", { key: '7b3a0b8521888092effb1fc675b0c52bce7faa6f', class: "img__loader n-loader-skeleton" }, "Loading"), !!this.background && (h("div", { key: '1f4d59fc6ff3e0be42f18d1db4a099a32d099872', class: {
|
147
146
|
loaded: this.hasLoaded,
|
148
147
|
img__bg: true,
|
149
148
|
'no-height': this.autoHeight === 'image',
|
150
|
-
}, style: bgStyle }, h("slot", { key: '
|
149
|
+
}, style: bgStyle }, h("slot", { key: 'd987180d13fa9ef34868c8e962344da9e0f6b876' }))), h("img", { key: 'f3d603cf35bf0c37c4e1eb530e9a9ea7d7e81beb', class: {
|
151
150
|
img__image: true,
|
152
151
|
loaded: this.hasLoaded,
|
153
152
|
hide: this.background,
|
154
153
|
'no-height': this.autoHeight === 'content',
|
155
|
-
}, decoding: "async", src: Build.isServer ? this.src : this.loadSrc, loading: Build.isServer && this.lazy ? 'lazy' : undefined, alt: this.alt, onLoad: this.onLoad, onError: this.loadError }), h("nano-resize-observe", { key: '
|
154
|
+
}, decoding: "async", src: Build.isServer ? this.src : this.loadSrc, loading: Build.isServer && this.lazy ? 'lazy' : undefined, alt: this.alt, onLoad: this.onLoad, onError: this.loadError }), h("nano-resize-observe", { key: 'cf77dadeb8d5b01ef1afff5e6df5eb6aacad13e6', class: "img__observer", onNanoResizeStateChange: this.onResize, states: this.imgStates }))));
|
156
155
|
}
|
157
156
|
static get watchers() { return {
|
158
157
|
"_src": ["_srcChanged"],
|
@@ -183,7 +182,7 @@ function defineCustomElement() {
|
|
183
182
|
if (typeof customElements === "undefined") {
|
184
183
|
return;
|
185
184
|
}
|
186
|
-
const components = ["nano-img", "nano-resize-observe"
|
185
|
+
const components = ["nano-img", "nano-resize-observe"];
|
187
186
|
components.forEach(tagName => { switch (tagName) {
|
188
187
|
case "nano-img":
|
189
188
|
if (!customElements.get(tagName)) {
|
@@ -191,11 +190,6 @@ function defineCustomElement() {
|
|
191
190
|
}
|
192
191
|
break;
|
193
192
|
case "nano-resize-observe":
|
194
|
-
if (!customElements.get(tagName)) {
|
195
|
-
defineCustomElement$2();
|
196
|
-
}
|
197
|
-
break;
|
198
|
-
case "nano-skeleton":
|
199
193
|
if (!customElements.get(tagName)) {
|
200
194
|
defineCustomElement$1();
|
201
195
|
}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
4
|
+
import { proxyCustomElement, HTMLElement, Build, h } from '@stencil/core/internal/client';
|
5
5
|
import { a as addGlobalStylesheetToShadow } from './style.js';
|
6
6
|
import { d as defineCustomElement$5 } from './dropdown.js';
|
7
7
|
import { d as defineCustomElement$4 } from './icon.js';
|
8
8
|
import { d as defineCustomElement$3 } from './menu.js';
|
9
9
|
import { d as defineCustomElement$2 } from './nav-item.js';
|
10
10
|
|
11
|
-
const breadcrumbCss = ":host
|
11
|
+
const breadcrumbCss = ":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}}";
|
12
12
|
|
13
13
|
const NanoBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class NanoBreadcrumb extends HTMLElement {
|
14
14
|
constructor() {
|
@@ -22,7 +22,8 @@ const NanoBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class NanoBreadcrumb e
|
|
22
22
|
isOpen = false;
|
23
23
|
componentWillLoad() {
|
24
24
|
// add global styles to shadow DOM
|
25
|
-
|
25
|
+
if (Build.isBrowser)
|
26
|
+
addGlobalStylesheetToShadow(this.el?.shadowRoot);
|
26
27
|
}
|
27
28
|
render() {
|
28
29
|
const returnBreadcrumb = this.breadcrumbs?.find((breadcrumb) => breadcrumb.return);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
4
|
+
import { proxyCustomElement, HTMLElement, createEvent, Build, Host } from '@stencil/core/internal/client';
|
5
5
|
import { h } from './renderer.js';
|
6
6
|
import { a as addGlobalStylesheetToShadow } from './style.js';
|
7
7
|
import { d as defineCustomElement$5 } from './cta.js';
|
@@ -45,7 +45,8 @@ const CollapsibleComparison = /*@__PURE__*/ proxyCustomElement(class Collapsible
|
|
45
45
|
this.open = !this.open;
|
46
46
|
};
|
47
47
|
componentWillLoad() {
|
48
|
-
|
48
|
+
if (Build.isBrowser)
|
49
|
+
addGlobalStylesheetToShadow(this.el.shadowRoot);
|
49
50
|
}
|
50
51
|
componentDidLoad() {
|
51
52
|
if (this.open) {
|
@@ -55,7 +56,7 @@ const CollapsibleComparison = /*@__PURE__*/ proxyCustomElement(class Collapsible
|
|
55
56
|
}
|
56
57
|
}
|
57
58
|
render() {
|
58
|
-
return (h(Host, { key: '
|
59
|
+
return (h(Host, { key: '849c3d8630973d94ced90a7fe10506815932d9ab', class: "nano-collapsible-comparison" }, h("div", { key: 'f84d57632fc72fbc266839afd017d0087ba2ed61', class: "collapsible-comparison" }, h("div", { key: '6eeadd3c7ee8ccfacf6eeddd1addcb6f850d8561', part: "header" }, h("div", { key: 'fa7e80984c27a377b485392ada0bdc5bcacc523d', class: "header" }, h("slot", { key: '93e94814f324b460dbb69ae44214e77602e4af8f', name: "heading" }), h("nano-cta", { key: 'ac4faf7dddc1659c80493321ffacf10ccc9587dd', size: "large", icon: this.open ? 'up' : 'down', secondary: true }, h("button", { key: 'b7de49dacb1b827eaf17cfb81349b63d31858251', onClick: this.handleClick }, this.open ? 'Hide' : 'Show', " details")), h("nano-icon-button", { key: '3cddc59e59966562873e7e4999d22ff4db1b4da1', label: `${this.open ? 'Hide' : 'Show'} details`, onClick: this.handleClick, iconName: "light/chevron-down", class: this.open ? 'open' : '' })), h("div", { key: 'a977e27bf6aaea079bb80ca72433e2f2c385c683', class: "headings" }, h("slot", { key: '7793d25823855334f9d5223070ef84a1418fb1c0', name: "comparison-headings" }))), h("div", { key: '08102e78eda50cd562e0c31588a38c363e746e4d', class: "content" }, h("slot", { key: '0318767e2bb809f6db5a2c402438682d6101885a', name: "content" })))));
|
59
60
|
}
|
60
61
|
static get watchers() { return {
|
61
62
|
"open": ["handleOpenChange"]
|