@postnord/pn-marketweb-components 4.4.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-date-and-time.cjs.entry.js +25 -3
- package/cjs/pn-date-and-time.cjs.entry.js.map +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/collection/components/input/pn-date-and-time/pn-date-and-time.js +44 -3
- package/collection/components/input/pn-date-and-time/pn-date-and-time.js.map +1 -1
- package/collection/components/input/pn-date-and-time/pn-date-and-time.stories.js +3 -1
- package/components/pn-date-and-time.js +27 -3
- package/components/pn-date-and-time.js.map +1 -1
- package/esm/loader.js +1 -1
- package/esm/pn-date-and-time.entry.js +25 -3
- package/esm/pn-date-and-time.entry.js.map +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-dbfb632c.entry.js +2 -0
- package/pn-market-web-components/p-dbfb632c.entry.js.map +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
- package/types/components/input/pn-date-and-time/pn-date-and-time.d.ts +3 -0
- package/types/components.d.ts +2 -0
- package/umd/modules/@postnord/web-components/cem.json +392 -0
- package/umd/modules/@postnord/web-components/cjs/close_small-CTOfc4Qy.js +10 -0
- package/umd/modules/@postnord/web-components/cjs/index-DWu-2oJc.js +12 -4
- package/umd/modules/@postnord/web-components/cjs/loader.cjs.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-card.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-footer.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-header.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-input-chip.cjs.entry.js +52 -0
- package/umd/modules/@postnord/web-components/cjs/pn-multiselect.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-ocr-search.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-dropdown-item.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav-item.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-page-nav.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-pagination.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-radio-button.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-range.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-search-field.cjs.entry.js +2 -4
- package/umd/modules/@postnord/web-components/cjs/pn-segment.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-segmented-control.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-select.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-skeleton-loader.cjs.entry.js +103 -0
- package/umd/modules/@postnord/web-components/cjs/pn-tab.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tablist.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-text-link.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-textarea.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-tile.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-toggle-switch.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/pn-zipcode-search.cjs.entry.js +1 -1
- package/umd/modules/@postnord/web-components/cjs/postnord-web-components.cjs.js +1 -1
- package/umd/modules/@postnord/web-components/collection/collection-manifest.json +2 -0
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-skeleton-loader/pn-skeleton-loader.css +314 -0
- package/umd/modules/@postnord/web-components/collection/components/feedback/pn-skeleton-loader/pn-skeleton-loader.js +291 -0
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input-chip/pn-input-chip.css +109 -0
- package/umd/modules/@postnord/web-components/collection/components/input/pn-input-chip/pn-input-chip.js +232 -0
- package/umd/modules/@postnord/web-components/collection/components/input/pn-multiselect/pn-multiselect.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-radio-button/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-range/pn-range.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-search-field/pn-search-field.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/pn-segmented-control.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-segmented-control/segment/pn-segment.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-select/pn-select.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-textarea/pn-textarea.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/input/pn-toggle-switch/pn-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/layout/pn-header/pn-header.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-card/pn-card.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-footer/pn-footer.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/dropdown-item/pn-page-nav-dropdown-item.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/item/pn-page-nav-item.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-page-nav/menu/pn-page-nav.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-pagination/pn-pagination.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/pn-tablist.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tablist/tab/pn-tab.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-text-link/pn-text-link.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/navigation/pn-tile/pn-tile.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/web-components/pn-ocr-search/pn-ocr-search.js +1 -1
- package/umd/modules/@postnord/web-components/collection/components/web-components/pn-zipcode-search/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/components/close_small.js +5 -0
- package/umd/modules/@postnord/web-components/components/index.d.ts +4 -0
- package/umd/modules/@postnord/web-components/components/index.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-card.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-footer.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-header.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-input-chip.d.ts +11 -0
- package/umd/modules/@postnord/web-components/components/pn-input-chip.js +5 -0
- package/umd/modules/@postnord/web-components/components/pn-multiselect.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-ocr-search.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav-dropdown-item.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav-item.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-page-nav.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-pagination.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-radio-button.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-range.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-search-field2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-segment.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-segmented-control.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-select2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-skeleton-loader.d.ts +11 -0
- package/umd/modules/@postnord/web-components/components/pn-skeleton-loader.js +5 -0
- package/umd/modules/@postnord/web-components/components/pn-tab.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tablist.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-text-link2.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-textarea.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-tile.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-toggle-switch.js +1 -1
- package/umd/modules/@postnord/web-components/components/pn-zipcode-search.js +1 -1
- package/umd/modules/@postnord/web-components/esm/close_small-gPbnChG6.js +8 -0
- package/umd/modules/@postnord/web-components/esm/index-XKg-ydzH.js +12 -4
- package/umd/modules/@postnord/web-components/esm/loader.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-card.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-footer.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-header.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-input-chip.entry.js +50 -0
- package/umd/modules/@postnord/web-components/esm/pn-multiselect.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-ocr-search.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-dropdown-item.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-page-nav-item.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-page-nav.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-pagination.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-radio-button.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-range.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-search-field.entry.js +2 -4
- package/umd/modules/@postnord/web-components/esm/pn-segment.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-segmented-control.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-select.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-skeleton-loader.entry.js +101 -0
- package/umd/modules/@postnord/web-components/esm/pn-tab.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tablist.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-text-link.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-textarea.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-tile.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-toggle-switch.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/pn-zipcode-search.entry.js +1 -1
- package/umd/modules/@postnord/web-components/esm/postnord-web-components.js +1 -1
- package/umd/modules/@postnord/web-components/hydrate/index.js +199 -22
- package/umd/modules/@postnord/web-components/hydrate/index.mjs +199 -22
- package/umd/modules/@postnord/web-components/package.json +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e11b4af5.entry.js → p-10d5fb90.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-88344f8d.entry.js → p-110ba4cc.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-98a37be9.entry.js → p-1b27c05f.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-292a7591.entry.js → p-20fe57fd.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-43483837.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-060b6ad2.entry.js → p-48f7e582.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-a31d93db.entry.js → p-594f5e35.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-9d56fb64.entry.js → p-5f5f3eeb.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-783ee52f.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-e5574624.entry.js → p-809a0ddb.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-d81b4ede.entry.js → p-8d90ab9d.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-3db02038.entry.js → p-90b44536.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-a1f92f19.entry.js → p-9f48d450.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-ef00ef4d.entry.js → p-a028c1af.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-a3bd612d.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-d228b929.entry.js → p-a70c9879.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b80c060c.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-0bf70d44.entry.js → p-bdb494ac.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-020ee3f4.entry.js → p-c51d8164.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-8cedf2e0.entry.js → p-c7a6d048.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-b45e58df.entry.js → p-d728a000.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-eb15a889.entry.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-3709c995.entry.js → p-fa3c2490.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/{p-64207923.entry.js → p-fdbffb51.entry.js} +1 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-gPbnChG6.js +5 -0
- package/umd/modules/@postnord/web-components/postnord-web-components/postnord-web-components.esm.js +1 -1
- package/umd/modules/@postnord/web-components/types/components/feedback/pn-skeleton-loader/pn-skeleton-loader.d.ts +35 -0
- package/umd/modules/@postnord/web-components/types/components/input/pn-input-chip/pn-input-chip.d.ts +34 -0
- package/umd/modules/@postnord/web-components/types/components.d.ts +257 -0
- package/umd/modules/@postnord/web-components/vscode-data.json +117 -0
- package/umd/pn-marketweb-header-wrongrembase.css +6 -5
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce-header.js +1 -1
- package/umd/pn-marketweb-salesforce-owncss.js +88 -0
- package/umd/pn-marketweb-salesforce.js +1 -1
- package/vscode-data.json +4 -0
- package/pn-market-web-components/p-99843884.entry.js +0 -2
- package/pn-market-web-components/p-99843884.entry.js.map +0 -1
- package/umd/modules/@postnord/web-components/postnord-web-components/p-aa15469e.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-b72f9866.entry.js +0 -5
- package/umd/modules/@postnord/web-components/postnord-web-components/p-d71054df.entry.js +0 -5
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* By PostNord.
|
|
4
|
+
*/
|
|
5
|
+
import { h, Host } from "@stencil/core";
|
|
6
|
+
/** Display a skeleton loader placeholder to indicate content is loading. */
|
|
7
|
+
export class PnSkeletonLoader {
|
|
8
|
+
/** The skeleton shape to render.
|
|
9
|
+
*/
|
|
10
|
+
type = 'box';
|
|
11
|
+
/** Custom width (CSS value). Overrides type default.
|
|
12
|
+
*/
|
|
13
|
+
width;
|
|
14
|
+
/** Custom height (CSS value). Overrides type default.
|
|
15
|
+
*/
|
|
16
|
+
height;
|
|
17
|
+
/** Custom border-radius (CSS value). Overrides type default.
|
|
18
|
+
*/
|
|
19
|
+
borderRadius;
|
|
20
|
+
/** Small size variant for type="chip".
|
|
21
|
+
*/
|
|
22
|
+
small = false;
|
|
23
|
+
/** Large size variant for type="chip".
|
|
24
|
+
*/
|
|
25
|
+
large = false;
|
|
26
|
+
/** Number of lines for type="paragraph" or body rows for type="table". Does not do anything for other types. Default is 3.
|
|
27
|
+
*/
|
|
28
|
+
lines = 3;
|
|
29
|
+
/** When true, masks slotted content with shimmer instead of rendering a skeleton shape. The slotted content keeps its layout but text and images are hidden behind the shimmer effect.
|
|
30
|
+
*/
|
|
31
|
+
automatic = false;
|
|
32
|
+
/** When true, hides the skeleton. For automatic mode, the slotted content is shown without masking.
|
|
33
|
+
*/
|
|
34
|
+
hide = false;
|
|
35
|
+
getStyle() {
|
|
36
|
+
const style = {};
|
|
37
|
+
if (this.width)
|
|
38
|
+
style['width'] = this.width;
|
|
39
|
+
if (this.height)
|
|
40
|
+
style['height'] = this.height;
|
|
41
|
+
if (this.borderRadius)
|
|
42
|
+
style['border-radius'] = this.borderRadius;
|
|
43
|
+
return style;
|
|
44
|
+
}
|
|
45
|
+
renderParagraph() {
|
|
46
|
+
const rows = [];
|
|
47
|
+
for (let i = 0; i < this.lines; i++) {
|
|
48
|
+
const isLast = i === this.lines - 1;
|
|
49
|
+
rows.push(h("div", { class: "pn-skeleton-loader-line", style: isLast ? { width: '75%' } : undefined }));
|
|
50
|
+
}
|
|
51
|
+
return rows;
|
|
52
|
+
}
|
|
53
|
+
renderTable() {
|
|
54
|
+
const rows = [];
|
|
55
|
+
for (let i = 0; i < this.lines; i++) {
|
|
56
|
+
rows.push(h("div", { class: "pn-skeleton-loader-table-row" }));
|
|
57
|
+
}
|
|
58
|
+
return rows;
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
const style = this.getStyle();
|
|
62
|
+
if (this.automatic) {
|
|
63
|
+
return (h(Host, null, h("div", { class: {
|
|
64
|
+
'pn-skeleton-loader--automatic': !this.hide,
|
|
65
|
+
}, role: !this.hide ? 'status' : undefined, "aria-busy": !this.hide ? 'true' : undefined, "aria-label": !this.hide ? 'Loading' : undefined }, h("slot", null))));
|
|
66
|
+
}
|
|
67
|
+
if (this.hide) {
|
|
68
|
+
return h(Host, { style: { display: 'none' } });
|
|
69
|
+
}
|
|
70
|
+
if (this.type === 'paragraph') {
|
|
71
|
+
return (h(Host, null, h("div", { class: "pn-skeleton-loader pn-skeleton-loader--paragraph", style: style, role: "status", "aria-busy": "true", "aria-label": "Loading" }, this.renderParagraph())));
|
|
72
|
+
}
|
|
73
|
+
if (this.type === 'table') {
|
|
74
|
+
return (h(Host, null, h("div", { class: "pn-skeleton-loader pn-skeleton-loader--table", style: style, role: "status", "aria-busy": "true", "aria-label": "Loading" }, h("div", { class: "pn-skeleton-loader-table-header" }), this.renderTable())));
|
|
75
|
+
}
|
|
76
|
+
if (this.type === 'card') {
|
|
77
|
+
return (h(Host, null, h("div", { class: "pn-skeleton-loader pn-skeleton-loader--card", style: style, role: "status", "aria-busy": "true", "aria-label": "Loading" }, h("div", { class: "pn-skeleton-loader-card-image" }), h("div", { class: "pn-skeleton-loader-card-content" }, this.renderParagraph()))));
|
|
78
|
+
}
|
|
79
|
+
if (this.type === 'tile') {
|
|
80
|
+
return (h(Host, null, h("div", { class: "pn-skeleton-loader pn-skeleton-loader--tile", style: style, role: "status", "aria-busy": "true", "aria-label": "Loading" }, h("div", { class: "pn-skeleton-loader-tile-circle" }), h("div", { class: "pn-skeleton-loader-tile-content" }, h("div", { class: "pn-skeleton-loader-line" }), h("div", { class: "pn-skeleton-loader-line", style: { width: '75%' } })))));
|
|
81
|
+
}
|
|
82
|
+
if (this.type === 'header') {
|
|
83
|
+
return (h(Host, null, h("div", { class: "pn-skeleton-loader pn-skeleton-loader--header", style: style, role: "status", "aria-busy": "true", "aria-label": "Loading" }, h("div", { class: "pn-skeleton-loader-header-back" }), h("div", { class: "pn-skeleton-loader-header-heading" }), h("div", { class: "pn-skeleton-loader-header-subheading" }))));
|
|
84
|
+
}
|
|
85
|
+
const classes = {
|
|
86
|
+
'pn-skeleton-loader': true,
|
|
87
|
+
[`pn-skeleton-loader--${this.type}`]: true,
|
|
88
|
+
'pn-skeleton-loader--small': this.small,
|
|
89
|
+
'pn-skeleton-loader--large': this.large,
|
|
90
|
+
};
|
|
91
|
+
return (h(Host, null, h("div", { class: classes, style: style, role: "status", "aria-busy": "true", "aria-label": "Loading" })));
|
|
92
|
+
}
|
|
93
|
+
static get is() { return "pn-skeleton-loader"; }
|
|
94
|
+
static get originalStyleUrls() {
|
|
95
|
+
return {
|
|
96
|
+
"$": ["pn-skeleton-loader.scss"]
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get styleUrls() {
|
|
100
|
+
return {
|
|
101
|
+
"$": ["pn-skeleton-loader.css"]
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
static get properties() {
|
|
105
|
+
return {
|
|
106
|
+
"type": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "PnSkeletonLoaderType",
|
|
111
|
+
"resolved": "\"avatar\" | \"box\" | \"button\" | \"card\" | \"chip\" | \"header\" | \"input\" | \"paragraph\" | \"table\" | \"text\" | \"tile\"",
|
|
112
|
+
"references": {
|
|
113
|
+
"PnSkeletonLoaderType": {
|
|
114
|
+
"location": "local",
|
|
115
|
+
"path": "/home/runner/work/web-components/web-components/src/components/feedback/pn-skeleton-loader/pn-skeleton-loader.tsx",
|
|
116
|
+
"id": "src/components/feedback/pn-skeleton-loader/pn-skeleton-loader.tsx::PnSkeletonLoaderType"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"required": false,
|
|
121
|
+
"optional": false,
|
|
122
|
+
"docs": {
|
|
123
|
+
"tags": [],
|
|
124
|
+
"text": "The skeleton shape to render."
|
|
125
|
+
},
|
|
126
|
+
"getter": false,
|
|
127
|
+
"setter": false,
|
|
128
|
+
"reflect": false,
|
|
129
|
+
"attribute": "type",
|
|
130
|
+
"defaultValue": "'box'"
|
|
131
|
+
},
|
|
132
|
+
"width": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"mutable": false,
|
|
135
|
+
"complexType": {
|
|
136
|
+
"original": "string",
|
|
137
|
+
"resolved": "string",
|
|
138
|
+
"references": {}
|
|
139
|
+
},
|
|
140
|
+
"required": false,
|
|
141
|
+
"optional": true,
|
|
142
|
+
"docs": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"text": "Custom width (CSS value). Overrides type default."
|
|
145
|
+
},
|
|
146
|
+
"getter": false,
|
|
147
|
+
"setter": false,
|
|
148
|
+
"reflect": false,
|
|
149
|
+
"attribute": "width"
|
|
150
|
+
},
|
|
151
|
+
"height": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"mutable": false,
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "string",
|
|
156
|
+
"resolved": "string",
|
|
157
|
+
"references": {}
|
|
158
|
+
},
|
|
159
|
+
"required": false,
|
|
160
|
+
"optional": true,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [],
|
|
163
|
+
"text": "Custom height (CSS value). Overrides type default."
|
|
164
|
+
},
|
|
165
|
+
"getter": false,
|
|
166
|
+
"setter": false,
|
|
167
|
+
"reflect": false,
|
|
168
|
+
"attribute": "height"
|
|
169
|
+
},
|
|
170
|
+
"borderRadius": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "string",
|
|
175
|
+
"resolved": "string",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": true,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Custom border-radius (CSS value). Overrides type default."
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"attribute": "border-radius"
|
|
188
|
+
},
|
|
189
|
+
"small": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "boolean",
|
|
194
|
+
"resolved": "boolean",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Small size variant for type=\"chip\"."
|
|
202
|
+
},
|
|
203
|
+
"getter": false,
|
|
204
|
+
"setter": false,
|
|
205
|
+
"reflect": false,
|
|
206
|
+
"attribute": "small",
|
|
207
|
+
"defaultValue": "false"
|
|
208
|
+
},
|
|
209
|
+
"large": {
|
|
210
|
+
"type": "boolean",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "boolean",
|
|
214
|
+
"resolved": "boolean",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": "Large size variant for type=\"chip\"."
|
|
222
|
+
},
|
|
223
|
+
"getter": false,
|
|
224
|
+
"setter": false,
|
|
225
|
+
"reflect": false,
|
|
226
|
+
"attribute": "large",
|
|
227
|
+
"defaultValue": "false"
|
|
228
|
+
},
|
|
229
|
+
"lines": {
|
|
230
|
+
"type": "number",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "number",
|
|
234
|
+
"resolved": "number",
|
|
235
|
+
"references": {}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [],
|
|
241
|
+
"text": "Number of lines for type=\"paragraph\" or body rows for type=\"table\". Does not do anything for other types. Default is 3."
|
|
242
|
+
},
|
|
243
|
+
"getter": false,
|
|
244
|
+
"setter": false,
|
|
245
|
+
"reflect": false,
|
|
246
|
+
"attribute": "lines",
|
|
247
|
+
"defaultValue": "3"
|
|
248
|
+
},
|
|
249
|
+
"automatic": {
|
|
250
|
+
"type": "boolean",
|
|
251
|
+
"mutable": false,
|
|
252
|
+
"complexType": {
|
|
253
|
+
"original": "boolean",
|
|
254
|
+
"resolved": "boolean",
|
|
255
|
+
"references": {}
|
|
256
|
+
},
|
|
257
|
+
"required": false,
|
|
258
|
+
"optional": false,
|
|
259
|
+
"docs": {
|
|
260
|
+
"tags": [],
|
|
261
|
+
"text": "When true, masks slotted content with shimmer instead of rendering a skeleton shape. The slotted content keeps its layout but text and images are hidden behind the shimmer effect."
|
|
262
|
+
},
|
|
263
|
+
"getter": false,
|
|
264
|
+
"setter": false,
|
|
265
|
+
"reflect": false,
|
|
266
|
+
"attribute": "automatic",
|
|
267
|
+
"defaultValue": "false"
|
|
268
|
+
},
|
|
269
|
+
"hide": {
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "boolean",
|
|
274
|
+
"resolved": "boolean",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "When true, hides the skeleton. For automatic mode, the slotted content is shown without masking."
|
|
282
|
+
},
|
|
283
|
+
"getter": false,
|
|
284
|
+
"setter": false,
|
|
285
|
+
"reflect": false,
|
|
286
|
+
"attribute": "hide",
|
|
287
|
+
"defaultValue": "false"
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* Global utility variables */
|
|
2
|
+
/* Input styles */
|
|
3
|
+
/* Transition variables */
|
|
4
|
+
pn-input-chip {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
pn-input-chip .pn-input-chip {
|
|
9
|
+
position: relative;
|
|
10
|
+
font-size: 1em;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
text-align: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 0.25em;
|
|
16
|
+
padding: 0.5em 0.5em 0.5em 1em;
|
|
17
|
+
border: 0.0625em solid #969087;
|
|
18
|
+
border-radius: 0.5em;
|
|
19
|
+
background-color: #ffffff;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition-property: border-color, background-color;
|
|
22
|
+
transition-duration: 0.2s;
|
|
23
|
+
transition-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
|
|
24
|
+
}
|
|
25
|
+
@media (prefers-reduced-motion: reduce) {
|
|
26
|
+
pn-input-chip .pn-input-chip {
|
|
27
|
+
transition-duration: 0s;
|
|
28
|
+
transition-delay: 0s;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
pn-input-chip .pn-input-chip {
|
|
32
|
+
outline: 0.2rem solid transparent;
|
|
33
|
+
outline-offset: 0.2rem;
|
|
34
|
+
}
|
|
35
|
+
pn-input-chip .pn-input-chip[data-icon] {
|
|
36
|
+
padding-left: 0.75em;
|
|
37
|
+
}
|
|
38
|
+
pn-input-chip .pn-input-chip[data-icon][data-small] {
|
|
39
|
+
padding-left: 0.5em;
|
|
40
|
+
}
|
|
41
|
+
pn-input-chip .pn-input-chip[data-icon][data-large] {
|
|
42
|
+
padding-left: 1em;
|
|
43
|
+
}
|
|
44
|
+
pn-input-chip .pn-input-chip[data-small] {
|
|
45
|
+
padding: 0.25em 0.25em 0.25em 0.75em;
|
|
46
|
+
}
|
|
47
|
+
pn-input-chip .pn-input-chip[data-small] .pn-input-chip-label {
|
|
48
|
+
line-height: 1.25em;
|
|
49
|
+
font-size: 0.875em;
|
|
50
|
+
}
|
|
51
|
+
pn-input-chip .pn-input-chip[data-large] {
|
|
52
|
+
padding: 0.6875em 0.6875em 0.6875em 1.25em;
|
|
53
|
+
}
|
|
54
|
+
pn-input-chip .pn-input-chip:hover {
|
|
55
|
+
background-color: #effbff;
|
|
56
|
+
border-color: #005d92;
|
|
57
|
+
}
|
|
58
|
+
pn-input-chip .pn-input-chip:hover .pn-input-chip-label {
|
|
59
|
+
color: #005d92;
|
|
60
|
+
}
|
|
61
|
+
pn-input-chip .pn-input-chip:hover .pn-input-chip-icon .pn-icon-svg path {
|
|
62
|
+
fill: #005d92;
|
|
63
|
+
}
|
|
64
|
+
pn-input-chip .pn-input-chip:focus-visible {
|
|
65
|
+
outline-color: #005d92;
|
|
66
|
+
border-color: #005d92;
|
|
67
|
+
}
|
|
68
|
+
pn-input-chip .pn-input-chip:active {
|
|
69
|
+
background-color: #e0f8ff;
|
|
70
|
+
border-color: #005d92;
|
|
71
|
+
}
|
|
72
|
+
pn-input-chip .pn-input-chip:active .pn-input-chip-label {
|
|
73
|
+
color: #0d234b;
|
|
74
|
+
}
|
|
75
|
+
pn-input-chip .pn-input-chip:active .pn-input-chip-icon .pn-icon-svg path {
|
|
76
|
+
fill: #0d234b;
|
|
77
|
+
}
|
|
78
|
+
pn-input-chip .pn-input-chip:disabled {
|
|
79
|
+
background-color: #f3f2f2;
|
|
80
|
+
border-color: #f3f2f2;
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
}
|
|
83
|
+
pn-input-chip .pn-input-chip:disabled .pn-input-chip-label {
|
|
84
|
+
color: #5e554a;
|
|
85
|
+
margin-right: 0.5em;
|
|
86
|
+
}
|
|
87
|
+
pn-input-chip .pn-input-chip:disabled .pn-input-chip-icon .pn-icon-svg path {
|
|
88
|
+
fill: #5e554a;
|
|
89
|
+
}
|
|
90
|
+
pn-input-chip .pn-input-chip-icon {
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
width: 1.5em;
|
|
93
|
+
height: 1.5em;
|
|
94
|
+
}
|
|
95
|
+
pn-input-chip .pn-input-chip-label {
|
|
96
|
+
color: #005d92;
|
|
97
|
+
line-height: 1.5em;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
}
|
|
102
|
+
pn-input-chip .pn-input-chip-close {
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
width: 1.5em;
|
|
105
|
+
height: 1.5em;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* By PostNord.
|
|
4
|
+
*/
|
|
5
|
+
import { h, Host } from "@stencil/core";
|
|
6
|
+
import { close_small } from "pn-design-assets/pn-assets/icons";
|
|
7
|
+
import { uuidv4 } from "../../../globals/helpers";
|
|
8
|
+
/**
|
|
9
|
+
* The `pn-input-chip` represents a confirmed user input value that can be removed.
|
|
10
|
+
* It is visually similar to the `pn-choice-chip` but its only action is deletion.
|
|
11
|
+
* Clicking anywhere on the chip removes it.
|
|
12
|
+
*/
|
|
13
|
+
export class PnInputChip {
|
|
14
|
+
id = `pn-input-chip-${uuidv4()}`;
|
|
15
|
+
/** The chip label text. */
|
|
16
|
+
label;
|
|
17
|
+
/** Optional value identifier emitted with the delete event. @category Native attributes */
|
|
18
|
+
value;
|
|
19
|
+
/** Add a leading icon to the chip. @category Features */
|
|
20
|
+
icon;
|
|
21
|
+
/** Use the small size for the input chip. @category Features */
|
|
22
|
+
small = false;
|
|
23
|
+
/** Use the large size for the input chip. @category Features */
|
|
24
|
+
large = false;
|
|
25
|
+
/** Disable the chip. When disabled, the chip is not interactive. @category Native attributes */
|
|
26
|
+
disabled = false;
|
|
27
|
+
/** Emitted when the chip is clicked (removed). */
|
|
28
|
+
pnDelete;
|
|
29
|
+
/**
|
|
30
|
+
* A unique HTML ID for the input chip.
|
|
31
|
+
* @category HTML attributes
|
|
32
|
+
*/
|
|
33
|
+
pnId;
|
|
34
|
+
handleDelete = () => {
|
|
35
|
+
if (!this.disabled) {
|
|
36
|
+
this.pnDelete.emit({ label: this.label, value: this.value });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
getId() {
|
|
40
|
+
return this.pnId || this.id;
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return (h(Host, { key: '38bf6d618ac176e63fc2da44b20aa45b744c3ff8' }, h("button", { key: '43a8fa2b75eedefef49ce8881c72e86cf1323486', type: "button", class: "pn-input-chip", id: this.getId(), "data-icon": !!this.icon, "data-small": this.small, "data-large": this.large, disabled: this.disabled, "aria-label": `Remove ${this.label}`, onClick: this.handleDelete }, !!this.icon && h("pn-icon", { key: '53b015eba2c0a074febc78089bcdefc9cb799ad1', class: "pn-input-chip-icon", icon: this.icon }), h("span", { key: '0baa4ef7ebe84ac5102f295c02ad3f0e08a6516e', class: "pn-input-chip-label" }, this.label), !this.disabled && h("pn-icon", { key: '320c04a05bb38411734a77c085bd536c29296423', color: "blue700", icon: close_small }))));
|
|
44
|
+
}
|
|
45
|
+
static get is() { return "pn-input-chip"; }
|
|
46
|
+
static get originalStyleUrls() {
|
|
47
|
+
return {
|
|
48
|
+
"$": ["pn-input-chip.scss"]
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
static get styleUrls() {
|
|
52
|
+
return {
|
|
53
|
+
"$": ["pn-input-chip.css"]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get properties() {
|
|
57
|
+
return {
|
|
58
|
+
"label": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": true,
|
|
67
|
+
"optional": false,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [],
|
|
70
|
+
"text": "The chip label text."
|
|
71
|
+
},
|
|
72
|
+
"getter": false,
|
|
73
|
+
"setter": false,
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"attribute": "label"
|
|
76
|
+
},
|
|
77
|
+
"value": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": true,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [{
|
|
89
|
+
"name": "category",
|
|
90
|
+
"text": "Native attributes"
|
|
91
|
+
}],
|
|
92
|
+
"text": "Optional value identifier emitted with the delete event."
|
|
93
|
+
},
|
|
94
|
+
"getter": false,
|
|
95
|
+
"setter": false,
|
|
96
|
+
"reflect": true,
|
|
97
|
+
"attribute": "value"
|
|
98
|
+
},
|
|
99
|
+
"icon": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": true,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [{
|
|
111
|
+
"name": "category",
|
|
112
|
+
"text": "Features"
|
|
113
|
+
}],
|
|
114
|
+
"text": "Add a leading icon to the chip."
|
|
115
|
+
},
|
|
116
|
+
"getter": false,
|
|
117
|
+
"setter": false,
|
|
118
|
+
"reflect": false,
|
|
119
|
+
"attribute": "icon"
|
|
120
|
+
},
|
|
121
|
+
"small": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "boolean",
|
|
126
|
+
"resolved": "boolean",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": false,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [{
|
|
133
|
+
"name": "category",
|
|
134
|
+
"text": "Features"
|
|
135
|
+
}],
|
|
136
|
+
"text": "Use the small size for the input chip."
|
|
137
|
+
},
|
|
138
|
+
"getter": false,
|
|
139
|
+
"setter": false,
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"attribute": "small",
|
|
142
|
+
"defaultValue": "false"
|
|
143
|
+
},
|
|
144
|
+
"large": {
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"mutable": false,
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "boolean",
|
|
149
|
+
"resolved": "boolean",
|
|
150
|
+
"references": {}
|
|
151
|
+
},
|
|
152
|
+
"required": false,
|
|
153
|
+
"optional": false,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [{
|
|
156
|
+
"name": "category",
|
|
157
|
+
"text": "Features"
|
|
158
|
+
}],
|
|
159
|
+
"text": "Use the large size for the input chip."
|
|
160
|
+
},
|
|
161
|
+
"getter": false,
|
|
162
|
+
"setter": false,
|
|
163
|
+
"reflect": false,
|
|
164
|
+
"attribute": "large",
|
|
165
|
+
"defaultValue": "false"
|
|
166
|
+
},
|
|
167
|
+
"disabled": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "boolean",
|
|
172
|
+
"resolved": "boolean",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": false,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [{
|
|
179
|
+
"name": "category",
|
|
180
|
+
"text": "Native attributes"
|
|
181
|
+
}],
|
|
182
|
+
"text": "Disable the chip. When disabled, the chip is not interactive."
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"attribute": "disabled",
|
|
188
|
+
"defaultValue": "false"
|
|
189
|
+
},
|
|
190
|
+
"pnId": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [{
|
|
202
|
+
"name": "category",
|
|
203
|
+
"text": "HTML attributes"
|
|
204
|
+
}],
|
|
205
|
+
"text": "A unique HTML ID for the input chip."
|
|
206
|
+
},
|
|
207
|
+
"getter": false,
|
|
208
|
+
"setter": false,
|
|
209
|
+
"reflect": false,
|
|
210
|
+
"attribute": "pn-id"
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
static get events() {
|
|
215
|
+
return [{
|
|
216
|
+
"method": "pnDelete",
|
|
217
|
+
"name": "pnDelete",
|
|
218
|
+
"bubbles": true,
|
|
219
|
+
"cancelable": true,
|
|
220
|
+
"composed": true,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": "Emitted when the chip is clicked (removed)."
|
|
224
|
+
},
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "{ label: string; value?: string }",
|
|
227
|
+
"resolved": "{ label: string; value?: string; }",
|
|
228
|
+
"references": {}
|
|
229
|
+
}
|
|
230
|
+
}];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -646,7 +646,7 @@ export class PnMultiselect extends Mixin(animateHeightFactory) {
|
|
|
646
646
|
return (h(Tag, { id: id, class: { 'pn-multiselect-label': true, 'pn-multiselect-sr-only': this.compact && !compactLabel }, "data-compact": this.compact, ...attrs }, h("span", null, this.label), !!this.optionsChecked()?.length && (h("span", null, this.optionsCheckedTotal(), "/", this.optionsTotal()))));
|
|
647
647
|
}
|
|
648
648
|
render() {
|
|
649
|
-
return (h(Host, { key: '
|
|
649
|
+
return (h(Host, { key: 'a0ecbc763c7fe2e742a2737a13ccb25049ca5d2c' }, h("fieldset", { key: 'e34a6c4a098b8509985300c6101f28810a2624e5', class: "pn-multiselect", "data-icon": !!this.icon, "data-error": this.hasError(), disabled: this.disabled }, this.renderLabel(), h("div", { key: '4af7e657d83cd4eb9d1f7aef7c41e91c204e8b49', class: "pn-multiselect-group", ref: el => (this.elGroup = el) }, h("div", { key: 'f5d0ab6e61dfac0c19a3ba86230c3da6e14efde5', class: "pn-multiselect-input" }, !!this.icon && h("pn-icon", { key: '2bb3a5906b9624c14b912dae42ab0f266be28708', class: "pn-multiselect-icon", "data-custom": true, icon: this.icon }), h("input", { key: '40bf05bdcdfc7d20d11c7d463863727e5d6aff2e', tabindex: this.search ? null : '-1', type: this.search ? 'search' : 'input', id: this.getId(), class: "pn-multiselect-element", value: this.search ? this.searchQuery : this.optionsCheckedLabels(), name: this.selectName, placeholder: this.getPlaceholder(), required: this.search ? null : this.required, "aria-label": this.getAriaLabel(), "aria-labelledby": this.getAriaLabelledby(), "aria-describedby": this.describedBy(), "aria-controls": `${this.idOptions} ${this.search ? this.idChips : ''}`, "aria-invalid": this.hasError()?.toString(), disabled: this.disabled, readonly: !this.search, "data-compact": this.compact, onClick: () => (this.search && this.open ? null : this.toggleOpen()), onKeyDown: e => this.handleInputKeyboard(e), onBlur: e => this.handleBlur(e), onInput: e => this.search && this.setSearchQuery(e.target.value), ref: el => (this.elInput = el) }), this.compact && this.renderLabel(true), this.hasError() && (h("pn-icon", { key: 'cb667952d2f8c5d2d651781f15ff74b6b775e042', class: "pn-multiselect-icon", "data-error": true, icon: alert_exclamation_circle, color: "warning" })), h("button", { key: '94b05fea39ded60eab60763fdb84a9b711ae8162', id: this.idButton, type: "button", class: "pn-multiselect-button", "aria-label": this.translate(`BUTTON_${this.open ? 'CLOSE' : 'OPEN'}`), "aria-describedby": this.search ? null : this.getId(), "aria-controls": this.idOptions, "aria-expanded": this.open.toString(), onClick: () => this.toggleOpen(), ref: el => (this.elButton = el) }, h("pn-icon", { key: 'eeaafee94ca176871092ceeb80d963fccc31dcec', class: "pn-multiselect-icon", icon: chevron_down, color: "blue700" }))), this.renderOptions()), h("p", { key: '2b769d32ed6692b99a19c125c5177eb375095e68', id: this.idHelper, class: "pn-multiselect-text", hidden: this.hideHelpertext() }, h("span", { key: 'dc43a1985211d85923e3085d44cb2b368e2582a4' }, this.helpertext), h("slot", { key: 'f0f4cd86c528644a133f7c9db51251a77265e15f', name: "helpertext" })), h("p", { key: '718171d4d2c510d70c562a188ef25eacf60ea039', id: this.idError, class: "pn-multiselect-text", role: "alert", hidden: this.hideError() }, h("span", { key: '2b0cfd1042189fb60d96e3d43001f3ff6794cb4e' }, this.error), h("slot", { key: 'e381d819a3de5c550816309f097ae37c713b604e', name: "error" })), this.search && this.renderChips(), h("slot", { key: '6f7731063585b04cc851a5790ec77fff209baa03' }), this.search && (h("p", { key: 'f4df41d21ebc5219a86fbc90947285635df86d13', id: this.idSr, class: "pn-multiselect-sr-only", role: "alert", "aria-live": "assertive" }, this.srMessage && h("span", { key: '6d24d915b81ef53a1eb210d3c7d0a85184ea1e88' }, this.srMessage))))));
|
|
650
650
|
}
|
|
651
651
|
static get is() { return "pn-multiselect"; }
|
|
652
652
|
static get originalStyleUrls() {
|
|
@@ -166,7 +166,7 @@ export class PnRadioButton extends Mixin(animateHeightFactory) {
|
|
|
166
166
|
return !this.displayLabel() && !this.pnAriaLabel ? this.pnAriaLabelledby : null;
|
|
167
167
|
}
|
|
168
168
|
render() {
|
|
169
|
-
return (h(Host, { key: '
|
|
169
|
+
return (h(Host, { key: '52305f6cf3826500739510f0cf1fd0ab2abc7dc2' }, h("input", { key: 'cc4f799fb58073ca59af798601d70baf88263aca', type: "radio", id: this.getId(), class: "pn-radio-input", value: this.value, name: this.name, disabled: this.disabled, checked: this.checked, required: this.required, "aria-label": this.getAriaLabel(), "aria-labelledby": this.getAriaLabelledby(), "aria-invalid": this.isInvalid()?.toString(), "aria-describedby": this.displayHelpertext() ? this.idHelpertext : null, "data-tile": this.tile, "data-expand": this.expand, onChange: event => this.pnRadioChange.emit(event), ref: el => (this.radioInput = el) }), h("div", { key: '05e2a10face9b2ca1b0ced1f6f38f1173f15d1c0', class: "pn-radio", "data-tile": this.tile, "data-expand": this.expand, "data-invalid": this.isInvalid() }, h("div", { key: 'b5274e03c47ac3d53103af945b3e8ce211eec827', class: "pn-radio-button" }, h("div", { key: '1f4a592f7d243312e00259f67ce60836a449f42d', class: "pn-radio-outer" }, h("div", { key: '05cb629b8c45724c6831271a40620ba5ec6e66ef', class: "pn-radio-inner" }))), h("div", { key: 'a91835bcaa01888fd2a2b1b768def02203b58038', class: "pn-radio-content", hidden: !this.displayText() }, h("label", { key: 'c11016410fd25dbb3288640ef5f239553991f0f8', htmlFor: this.getId(), class: "pn-radio-label", hidden: !this.displayLabel() }, this.label), h("p", { key: '6d4d46978e2a4f326af1558c4c6dd04c3c29956b', id: this.idHelpertext, class: "pn-radio-helpertext", hidden: !this.displayHelpertext() }, this.helpertext, h("slot", { key: '3167af1f4d47e1a9c8010bc9316b32c5499f66ee', name: "helpertext" })), h("slot", { key: '1a4b466d8a8ba4e06ae96977e33fad1c502d5ea2' })), this.displayIcon() && h("pn-icon", { key: '67f80f5c1db91e7310cf5baefdf6f3c346c83397', icon: this.icon, color: "gray900" }), h("div", { key: 'e296239a734c33c40035b489d79b1edf44f1a2b7', class: "pn-radio-container", "data-open": this.checked, hidden: !this.displayContent(), style: { height: '0px' }, ref: el => (this.contentArea = el) }, h("div", { key: 'f6245b5b2c9611da4b59a3fdb3047fe8365f1678', class: "pn-radio-area" }, h("slot", { key: 'b985712da1ea4504025d17cc507588f14d9ebfff', name: "content" }))))));
|
|
170
170
|
}
|
|
171
171
|
static get is() { return "pn-radio-button"; }
|
|
172
172
|
static get originalStyleUrls() {
|