@swisspost/design-system-components 7.4.9 → 7.4.11
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/index.cjs.js +16 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-4e243dd8.js → package-90a34c68.js} +1 -1
- package/dist/cjs/{post-accordion-ce83add5.js → post-accordion-523563dc.js} +1 -1
- package/dist/cjs/{post-accordion-item-c75ca1ac.js → post-accordion-item-63038f3c.js} +1 -1
- package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/{post-alert-98ebde8f.js → post-alert-f2d60637.js} +1 -1
- package/dist/cjs/post-alert.cjs.entry.js +2 -2
- package/dist/cjs/{post-card-control-d60c6998.js → post-card-control-d24df42e.js} +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-9b30cc1c.js → post-collapsible-1b667879.js} +1 -1
- package/dist/cjs/{post-collapsible-trigger-b6af9fa6.js → post-collapsible-trigger-84783a3c.js} +1 -1
- package/dist/cjs/post-collapsible-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-collapsible.cjs.entry.js +2 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-icon-133f5f99.js → post-icon-097ed746.js} +60 -26
- package/dist/cjs/post-icon.cjs.entry.js +2 -2
- package/dist/cjs/{post-popover-f8e2a007.js → post-popover-c694dc71.js} +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-popovercontainer-1d6daa2a.js → post-popovercontainer-9528d26d.js} +1 -1
- package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-8505f9df.js → post-rating-654ad87a.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-457d8a5d.js → post-tab-header-1da67676.js} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-ab7b10d9.js → post-tab-panel-7b2bda81.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-e2899740.js → post-tabs-90e0a8f3.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-2ae173b8.js → post-tag-c1dbc1e3.js} +1 -1
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-15d85ffa.js → post-tooltip-876ba174.js} +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-icon/post-icon.js +59 -31
- package/dist/components/package.js +1 -1
- package/dist/components/post-icon2.js +60 -28
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +16 -16
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-db4481b4.js → package-9d6426d1.js} +1 -1
- package/dist/esm/{post-accordion-b512017b.js → post-accordion-e140a9d4.js} +1 -1
- package/dist/esm/{post-accordion-item-d73cbfe0.js → post-accordion-item-03203ecd.js} +1 -1
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-alert-cbdc31be.js → post-alert-a9791ef2.js} +1 -1
- package/dist/esm/post-alert.entry.js +2 -2
- package/dist/esm/{post-card-control-f052ae55.js → post-card-control-8ef31b10.js} +1 -1
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/{post-collapsible-66a26663.js → post-collapsible-fdeee1a8.js} +1 -1
- package/dist/esm/{post-collapsible-trigger-8394bbca.js → post-collapsible-trigger-bfa217db.js} +1 -1
- package/dist/esm/post-collapsible-trigger.entry.js +2 -2
- package/dist/esm/post-collapsible.entry.js +2 -2
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-icon-02a5642f.js → post-icon-27bb7505.js} +60 -26
- package/dist/esm/post-icon.entry.js +2 -2
- package/dist/esm/{post-popover-f371fc52.js → post-popover-77691872.js} +1 -1
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-popovercontainer-a93f59dc.js → post-popovercontainer-e81c8c09.js} +1 -1
- package/dist/esm/post-popovercontainer.entry.js +2 -2
- package/dist/esm/{post-rating-00af74f1.js → post-rating-23f986bf.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-1c89d427.js → post-tab-header-ee7a4c4a.js} +1 -1
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-c9487339.js → post-tab-panel-e4514e2c.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-aef1b257.js → post-tabs-e7b19b56.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-803bfa89.js → post-tag-83a1f5cd.js} +1 -1
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-92c953eb.js → post-tooltip-f5942d2f.js} +1 -1
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/{p-5549c87d.js → p-064c1b18.js} +1 -1
- package/dist/post-components/{p-bc6aeed0.js → p-1357ab17.js} +1 -1
- package/dist/post-components/{p-5bc8ca5c.js → p-1708b957.js} +1 -1
- package/dist/post-components/p-1c5ff741.entry.js +1 -0
- package/dist/post-components/{p-5d899150.js → p-1e34ed6d.js} +1 -1
- package/dist/post-components/p-2b4470d0.entry.js +1 -0
- package/dist/post-components/p-2f1db3fb.entry.js +1 -0
- package/dist/post-components/p-3704b194.entry.js +1 -0
- package/dist/post-components/{p-cd3a95bc.js → p-38fb68da.js} +1 -1
- package/dist/post-components/{p-3a18348a.js → p-394d183e.js} +1 -1
- package/dist/post-components/p-4cfba627.entry.js +1 -0
- package/dist/post-components/p-57d4644a.entry.js +1 -0
- package/dist/post-components/p-5d28247f.entry.js +1 -0
- package/dist/post-components/{p-d6942830.js → p-70c91301.js} +1 -1
- package/dist/post-components/p-72f708f1.js +1 -0
- package/dist/post-components/{p-3837f8d9.js → p-82e57348.js} +1 -1
- package/dist/post-components/p-93d1dc90.js +1 -0
- package/dist/post-components/{p-5efa4c05.js → p-9605c5f4.js} +1 -1
- package/dist/post-components/p-9a99eb2e.entry.js +1 -0
- package/dist/post-components/p-a1c87a90.entry.js +1 -0
- package/dist/post-components/p-a598cd4c.entry.js +1 -0
- package/dist/post-components/p-a61dd5b4.entry.js +1 -0
- package/dist/post-components/p-aaeb6f4f.entry.js +1 -0
- package/dist/post-components/{p-c9b91b12.js → p-b16601a9.js} +1 -1
- package/dist/post-components/{p-f6c08610.js → p-b1fcc75c.js} +1 -1
- package/dist/post-components/p-bd174894.entry.js +1 -0
- package/dist/post-components/{p-ccc962e7.js → p-c0740b36.js} +1 -1
- package/dist/post-components/p-c0c02502.entry.js +1 -0
- package/dist/post-components/p-ca818834.entry.js +1 -0
- package/dist/post-components/{p-e92bb590.js → p-e1d56ade.js} +1 -1
- package/dist/post-components/{p-81384711.js → p-e6983d7b.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-icon/post-icon.d.ts +2 -5
- package/package.json +2 -2
- package/dist/post-components/p-099a5fa0.entry.js +0 -1
- package/dist/post-components/p-1e03ab88.entry.js +0 -1
- package/dist/post-components/p-4549e147.entry.js +0 -1
- package/dist/post-components/p-51ef1780.entry.js +0 -1
- package/dist/post-components/p-555547e4.entry.js +0 -1
- package/dist/post-components/p-56bc4f94.js +0 -1
- package/dist/post-components/p-58bb8f1d.entry.js +0 -1
- package/dist/post-components/p-6199fc20.entry.js +0 -1
- package/dist/post-components/p-7e60aeb1.entry.js +0 -1
- package/dist/post-components/p-95184ae6.entry.js +0 -1
- package/dist/post-components/p-a49c3a0e.entry.js +0 -1
- package/dist/post-components/p-abf1e628.entry.js +0 -1
- package/dist/post-components/p-c92701fd.entry.js +0 -1
- package/dist/post-components/p-cf15fc8e.entry.js +0 -1
- package/dist/post-components/p-d183d54d.js +0 -1
- package/dist/post-components/p-e41eee57.entry.js +0 -1
- package/dist/post-components/p-f134c132.entry.js +0 -1
|
@@ -16,8 +16,6 @@ const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
|
16
16
|
*/
|
|
17
17
|
export class PostIcon {
|
|
18
18
|
constructor() {
|
|
19
|
-
this.svgStyles = undefined;
|
|
20
|
-
this.svgOutput = undefined;
|
|
21
19
|
this.animation = null;
|
|
22
20
|
this.base = null;
|
|
23
21
|
this.flipH = false;
|
|
@@ -49,6 +47,64 @@ export class PostIcon {
|
|
|
49
47
|
validateScale(newValue = this.scale) {
|
|
50
48
|
checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
51
49
|
}
|
|
50
|
+
// Construct the icon url from different possible sources
|
|
51
|
+
getUrl() {
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
53
|
+
// the first definition object which defines a domain, will be used to set the domain of the file url
|
|
54
|
+
// the first definition object which defines a slug, will be used to set the slug of the file url
|
|
55
|
+
const urlDefinitions = [
|
|
56
|
+
getUrlDefinition(this.base, 'both'),
|
|
57
|
+
getUrlDefinition((_a = document.head
|
|
58
|
+
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base'), 'relative'),
|
|
59
|
+
getUrlDefinition((_b = document.querySelector('base[href]')) === null || _b === void 0 ? void 0 : _b.getAttribute('href'), 'both'),
|
|
60
|
+
];
|
|
61
|
+
// in case no other definition defines a domain, the current origin is used as a fallback
|
|
62
|
+
const origin = (_e = (_d = (_c = urlDefinitions.find(d => d.definesDomain)) === null || _c === void 0 ? void 0 : _c.url) === null || _d === void 0 ? void 0 : _d.origin) !== null && _e !== void 0 ? _e : window.location.origin;
|
|
63
|
+
// in case no other definition defines a slug, the cdn url is used as a fallback
|
|
64
|
+
const slug = (_g = (_f = urlDefinitions.find(d => d.definesSlug)) === null || _f === void 0 ? void 0 : _f.url) === null || _g === void 0 ? void 0 : _g.pathname;
|
|
65
|
+
const file = `${this.name}.svg`;
|
|
66
|
+
let url;
|
|
67
|
+
if (slug) {
|
|
68
|
+
url = new URL(`${origin}${slug}/${file}`).toString();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
url = new URL(`${CDN_URL}/${file}`).toString();
|
|
72
|
+
}
|
|
73
|
+
return url;
|
|
74
|
+
function getUrlDefinition(url, allow) {
|
|
75
|
+
return {
|
|
76
|
+
url: getUrlObject(url),
|
|
77
|
+
definesDomain: allow !== 'relative' ? definesDomain(url) : false,
|
|
78
|
+
definesSlug: allow !== 'absolute' ? definesSlug(url) : false,
|
|
79
|
+
};
|
|
80
|
+
function getUrlObject(url) {
|
|
81
|
+
if (url) {
|
|
82
|
+
return definesDomain(url) ? new URL(url) : new URL(url, window.location.origin);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
function definesDomain(url) {
|
|
89
|
+
return url ? /^https?:\/\//.test(url) : false;
|
|
90
|
+
}
|
|
91
|
+
function definesSlug(url) {
|
|
92
|
+
const urlObject = getUrlObject(url);
|
|
93
|
+
return Boolean(/^\/.+/.test(urlObject === null || urlObject === void 0 ? void 0 : urlObject.pathname));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
getStyles() {
|
|
98
|
+
const url = this.getUrl();
|
|
99
|
+
return Object.entries({
|
|
100
|
+
'-webkit-mask-image': `url(${url})`,
|
|
101
|
+
'mask-image': `url('${url}')`,
|
|
102
|
+
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
103
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
104
|
+
})
|
|
105
|
+
.filter(([_key, value]) => value !== null)
|
|
106
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
107
|
+
}
|
|
52
108
|
componentDidLoad() {
|
|
53
109
|
this.validateBase();
|
|
54
110
|
this.validateName();
|
|
@@ -58,30 +114,8 @@ export class PostIcon {
|
|
|
58
114
|
this.validateRotate();
|
|
59
115
|
this.validateAnimation();
|
|
60
116
|
}
|
|
61
|
-
componentWillRender() {
|
|
62
|
-
this.setPath();
|
|
63
|
-
}
|
|
64
|
-
setPath() {
|
|
65
|
-
var _a, _b, _c, _d;
|
|
66
|
-
// Construct icon path from different possible sources
|
|
67
|
-
const metaBase = (_b = (_a = document.head
|
|
68
|
-
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
|
|
69
|
-
const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
70
|
-
const fileName = `${this.name}.svg`;
|
|
71
|
-
const filePath = `${fileBase}${fileName}`;
|
|
72
|
-
this.path = new URL(filePath, window.location.origin).toString();
|
|
73
|
-
}
|
|
74
117
|
render() {
|
|
75
|
-
|
|
76
|
-
const svgStyles = Object.entries({
|
|
77
|
-
'-webkit-mask-image': `url('${this.path}')`,
|
|
78
|
-
'mask-image': `url('${this.path}')`,
|
|
79
|
-
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
80
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
81
|
-
})
|
|
82
|
-
.filter(([_key, value]) => value !== null)
|
|
83
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
84
|
-
return (h(Host, { key: 'c4744bef990eef90a7de44312fd349583b295f4c', "data-version": version }, h("span", { key: '0655e0d6ada2b822bf4b3c399dcf63000e26bf46', style: svgStyles })));
|
|
118
|
+
return (h(Host, { key: 'a38838bcd99af618f660ec4ffef4e869cdab3995', "data-version": version }, h("span", { key: '24ae06bdb0aa65ddca7ac88fac9bb6bb5a12550a', style: this.getStyles() })));
|
|
85
119
|
}
|
|
86
120
|
static get is() { return "post-icon"; }
|
|
87
121
|
static get encapsulation() { return "shadow"; }
|
|
@@ -229,12 +263,6 @@ export class PostIcon {
|
|
|
229
263
|
}
|
|
230
264
|
};
|
|
231
265
|
}
|
|
232
|
-
static get states() {
|
|
233
|
-
return {
|
|
234
|
-
"svgStyles": {},
|
|
235
|
-
"svgOutput": {}
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
266
|
static get elementRef() { return "host"; }
|
|
239
267
|
static get watchers() {
|
|
240
268
|
return [{
|
|
@@ -22,8 +22,6 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
22
22
|
super();
|
|
23
23
|
this.__registerHost();
|
|
24
24
|
this.__attachShadow();
|
|
25
|
-
this.svgStyles = undefined;
|
|
26
|
-
this.svgOutput = undefined;
|
|
27
25
|
this.animation = null;
|
|
28
26
|
this.base = null;
|
|
29
27
|
this.flipH = false;
|
|
@@ -55,6 +53,64 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
55
53
|
validateScale(newValue = this.scale) {
|
|
56
54
|
checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
57
55
|
}
|
|
56
|
+
// Construct the icon url from different possible sources
|
|
57
|
+
getUrl() {
|
|
58
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
59
|
+
// the first definition object which defines a domain, will be used to set the domain of the file url
|
|
60
|
+
// the first definition object which defines a slug, will be used to set the slug of the file url
|
|
61
|
+
const urlDefinitions = [
|
|
62
|
+
getUrlDefinition(this.base, 'both'),
|
|
63
|
+
getUrlDefinition((_a = document.head
|
|
64
|
+
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base'), 'relative'),
|
|
65
|
+
getUrlDefinition((_b = document.querySelector('base[href]')) === null || _b === void 0 ? void 0 : _b.getAttribute('href'), 'both'),
|
|
66
|
+
];
|
|
67
|
+
// in case no other definition defines a domain, the current origin is used as a fallback
|
|
68
|
+
const origin = (_e = (_d = (_c = urlDefinitions.find(d => d.definesDomain)) === null || _c === void 0 ? void 0 : _c.url) === null || _d === void 0 ? void 0 : _d.origin) !== null && _e !== void 0 ? _e : window.location.origin;
|
|
69
|
+
// in case no other definition defines a slug, the cdn url is used as a fallback
|
|
70
|
+
const slug = (_g = (_f = urlDefinitions.find(d => d.definesSlug)) === null || _f === void 0 ? void 0 : _f.url) === null || _g === void 0 ? void 0 : _g.pathname;
|
|
71
|
+
const file = `${this.name}.svg`;
|
|
72
|
+
let url;
|
|
73
|
+
if (slug) {
|
|
74
|
+
url = new URL(`${origin}${slug}/${file}`).toString();
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
url = new URL(`${CDN_URL}/${file}`).toString();
|
|
78
|
+
}
|
|
79
|
+
return url;
|
|
80
|
+
function getUrlDefinition(url, allow) {
|
|
81
|
+
return {
|
|
82
|
+
url: getUrlObject(url),
|
|
83
|
+
definesDomain: allow !== 'relative' ? definesDomain(url) : false,
|
|
84
|
+
definesSlug: allow !== 'absolute' ? definesSlug(url) : false,
|
|
85
|
+
};
|
|
86
|
+
function getUrlObject(url) {
|
|
87
|
+
if (url) {
|
|
88
|
+
return definesDomain(url) ? new URL(url) : new URL(url, window.location.origin);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function definesDomain(url) {
|
|
95
|
+
return url ? /^https?:\/\//.test(url) : false;
|
|
96
|
+
}
|
|
97
|
+
function definesSlug(url) {
|
|
98
|
+
const urlObject = getUrlObject(url);
|
|
99
|
+
return Boolean(/^\/.+/.test(urlObject === null || urlObject === void 0 ? void 0 : urlObject.pathname));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
getStyles() {
|
|
104
|
+
const url = this.getUrl();
|
|
105
|
+
return Object.entries({
|
|
106
|
+
'-webkit-mask-image': `url(${url})`,
|
|
107
|
+
'mask-image': `url('${url}')`,
|
|
108
|
+
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
109
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
110
|
+
})
|
|
111
|
+
.filter(([_key, value]) => value !== null)
|
|
112
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
113
|
+
}
|
|
58
114
|
componentDidLoad() {
|
|
59
115
|
this.validateBase();
|
|
60
116
|
this.validateName();
|
|
@@ -64,30 +120,8 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
64
120
|
this.validateRotate();
|
|
65
121
|
this.validateAnimation();
|
|
66
122
|
}
|
|
67
|
-
componentWillRender() {
|
|
68
|
-
this.setPath();
|
|
69
|
-
}
|
|
70
|
-
setPath() {
|
|
71
|
-
var _a, _b, _c, _d;
|
|
72
|
-
// Construct icon path from different possible sources
|
|
73
|
-
const metaBase = (_b = (_a = document.head
|
|
74
|
-
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
|
|
75
|
-
const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
76
|
-
const fileName = `${this.name}.svg`;
|
|
77
|
-
const filePath = `${fileBase}${fileName}`;
|
|
78
|
-
this.path = new URL(filePath, window.location.origin).toString();
|
|
79
|
-
}
|
|
80
123
|
render() {
|
|
81
|
-
|
|
82
|
-
const svgStyles = Object.entries({
|
|
83
|
-
'-webkit-mask-image': `url('${this.path}')`,
|
|
84
|
-
'mask-image': `url('${this.path}')`,
|
|
85
|
-
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
86
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
87
|
-
})
|
|
88
|
-
.filter(([_key, value]) => value !== null)
|
|
89
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
90
|
-
return (h(Host, { key: 'c4744bef990eef90a7de44312fd349583b295f4c', "data-version": version }, h("span", { key: '0655e0d6ada2b822bf4b3c399dcf63000e26bf46', style: svgStyles })));
|
|
124
|
+
return (h(Host, { key: 'a38838bcd99af618f660ec4ffef4e869cdab3995', "data-version": version }, h("span", { key: '24ae06bdb0aa65ddca7ac88fac9bb6bb5a12550a', style: this.getStyles() })));
|
|
91
125
|
}
|
|
92
126
|
get host() { return this; }
|
|
93
127
|
static get watchers() { return {
|
|
@@ -107,9 +141,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
107
141
|
"flipV": [4, "flip-v"],
|
|
108
142
|
"name": [1],
|
|
109
143
|
"rotate": [2],
|
|
110
|
-
"scale": [2]
|
|
111
|
-
"svgStyles": [32],
|
|
112
|
-
"svgOutput": [32]
|
|
144
|
+
"scale": [2]
|
|
113
145
|
}, undefined, {
|
|
114
146
|
"animation": ["validateAnimation"],
|
|
115
147
|
"base": ["validateBase"],
|
package/dist/docs.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { P as PostAccordion } from './post-accordion-
|
|
2
|
-
export { P as PostAccordionItem } from './post-accordion-item-
|
|
3
|
-
export { P as PostAlert } from './post-alert-
|
|
4
|
-
export { P as PostCardControl } from './post-card-control-
|
|
5
|
-
export { P as PostCollapsible } from './post-collapsible-
|
|
6
|
-
export { P as PostCollapsibleTrigger } from './post-collapsible-trigger-
|
|
7
|
-
export { P as PostIcon } from './post-icon-
|
|
8
|
-
export { P as PostPopover } from './post-popover-
|
|
9
|
-
export { P as PostPopovercontainer } from './post-popovercontainer-
|
|
10
|
-
export { P as PostRating } from './post-rating-
|
|
11
|
-
export { P as PostTabs } from './post-tabs-
|
|
12
|
-
export { P as PostTabHeader } from './post-tab-header-
|
|
13
|
-
export { P as PostTabPanel } from './post-tab-panel-
|
|
14
|
-
export { P as PostTooltip } from './post-tooltip-
|
|
15
|
-
export { P as PostTag } from './post-tag-
|
|
1
|
+
export { P as PostAccordion } from './post-accordion-e140a9d4.js';
|
|
2
|
+
export { P as PostAccordionItem } from './post-accordion-item-03203ecd.js';
|
|
3
|
+
export { P as PostAlert } from './post-alert-a9791ef2.js';
|
|
4
|
+
export { P as PostCardControl } from './post-card-control-8ef31b10.js';
|
|
5
|
+
export { P as PostCollapsible } from './post-collapsible-fdeee1a8.js';
|
|
6
|
+
export { P as PostCollapsibleTrigger } from './post-collapsible-trigger-bfa217db.js';
|
|
7
|
+
export { P as PostIcon } from './post-icon-27bb7505.js';
|
|
8
|
+
export { P as PostPopover } from './post-popover-77691872.js';
|
|
9
|
+
export { P as PostPopovercontainer } from './post-popovercontainer-e81c8c09.js';
|
|
10
|
+
export { P as PostRating } from './post-rating-23f986bf.js';
|
|
11
|
+
export { P as PostTabs } from './post-tabs-e7b19b56.js';
|
|
12
|
+
export { P as PostTabHeader } from './post-tab-header-ee7a4c4a.js';
|
|
13
|
+
export { P as PostTabPanel } from './post-tab-panel-e4514e2c.js';
|
|
14
|
+
export { P as PostTooltip } from './post-tooltip-f5942d2f.js';
|
|
15
|
+
export { P as PostTag } from './post-tag-83a1f5cd.js';
|
|
16
16
|
import './index-9ace3232.js';
|
|
17
|
-
import './package-
|
|
17
|
+
import './package-9d6426d1.js';
|
|
18
18
|
import './heading-levels-5b7b4349.js';
|
|
19
19
|
import './check-one-of-6b3ef8eb.js';
|
|
20
20
|
import './index-29d17d6d.js';
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-card-control",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisbled"]}]]],["post-popovercontainer",[[4,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"delayed":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"delayed":["validateDelayed"]}]]],["post-accordion",[[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-collapsible-trigger",[[0,"post-collapsible-trigger",{"for":[1],"update":[64]},[[4,"postToggle","setAriaExpanded"]],{"for":["setAriaAttributes"]}]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}]]],["post-icon",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2]
|
|
8
|
+
return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-card-control",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisbled"]}]]],["post-popovercontainer",[[4,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"delayed":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"delayed":["validateDelayed"]}]]],["post-accordion",[[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-collapsible-trigger",[[0,"post-collapsible-trigger",{"for":[1],"update":[64]},[[4,"postToggle","setAriaExpanded"]],{"for":["setAriaAttributes"]}]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}]]],["post-icon",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2]},null,{"animation":["validateAnimation"],"base":["validateBase"],"flipH":["validateFlipH"],"flipV":["validateFlipV"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
|
|
4
4
|
import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
|
|
4
4
|
import { c as checkEmptyOrOneOf } from './index-29d17d6d.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_accordion_item } from './post-accordion-item-
|
|
1
|
+
export { P as post_accordion_item } from './post-accordion-item-03203ecd.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|
|
4
4
|
import './heading-levels-5b7b4349.js';
|
|
5
5
|
import './index-29d17d6d.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { P as post_accordion } from './post-accordion-
|
|
1
|
+
export { P as post_accordion } from './post-accordion-e140a9d4.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|
|
4
4
|
import './heading-levels-5b7b4349.js';
|
|
5
5
|
import './check-one-of-6b3ef8eb.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
import { f as fadeOut } from './fade-7fd71785.js';
|
|
4
4
|
import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-29d17d6d.js';
|
|
5
5
|
import { c as checkType } from './check-type-8828dbe4.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_alert } from './post-alert-
|
|
1
|
+
export { P as post_alert } from './post-alert-a9791ef2.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|
|
4
4
|
import './fade-7fd71785.js';
|
|
5
5
|
import './index-29d17d6d.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
2
|
import { c as checkOneOf } from './check-one-of-6b3ef8eb.js';
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
4
|
-
import { v as version } from './package-
|
|
4
|
+
import { v as version } from './package-9d6426d1.js';
|
|
5
5
|
|
|
6
6
|
function parse(scss) {
|
|
7
7
|
return Object.entries(scss).reduce((object, [path, value]) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_card_control } from './post-card-control-
|
|
1
|
+
export { P as post_card_control } from './post-card-control-8ef31b10.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
3
|
import './check-one-of-6b3ef8eb.js';
|
|
4
4
|
import './check-non-empty-58bd6b17.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
6
|
-
import './package-
|
|
6
|
+
import './package-9d6426d1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
import { b as checkEmptyOrType } from './index-29d17d6d.js';
|
|
4
4
|
|
|
5
5
|
function isMotionReduced() {
|
package/dist/esm/{post-collapsible-trigger-8394bbca.js → post-collapsible-trigger-bfa217db.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
import { c as checkType } from './check-type-8828dbe4.js';
|
|
4
4
|
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_collapsible_trigger } from './post-collapsible-trigger-
|
|
1
|
+
export { P as post_collapsible_trigger } from './post-collapsible-trigger-bfa217db.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|
|
4
4
|
import './check-type-8828dbe4.js';
|
|
5
5
|
import './check-non-empty-58bd6b17.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_collapsible } from './post-collapsible-
|
|
1
|
+
export { P as post_collapsible } from './post-collapsible-fdeee1a8.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|
|
4
4
|
import './index-29d17d6d.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
6
6
|
import './check-one-of-6b3ef8eb.js';
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-card-control",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisbled"]}]]],["post-popovercontainer",[[4,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"delayed":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"delayed":["validateDelayed"]}]]],["post-accordion",[[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-collapsible-trigger",[[0,"post-collapsible-trigger",{"for":[1],"update":[64]},[[4,"postToggle","setAriaExpanded"]],{"for":["setAriaAttributes"]}]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}]]],["post-icon",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2]
|
|
19
|
+
return bootstrapLazy([["post-accordion-item",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-alert",[[1,"post-alert",{"dismissible":[4],"dismissLabel":[1,"dismiss-label"],"fixed":[4],"icon":[1],"type":[1],"alertId":[32],"classes":[32],"hasActions":[32],"hasHeading":[32],"onDismissButtonClick":[32],"dismiss":[64]},null,{"dismissible":["validateDismissible"],"dismissLabel":["validateDismissLabel"],"fixed":["validateFixed"],"icon":["validateIcon"],"type":["validateType"]}]]],["post-card-control",[[65,"post-card-control",{"label":[1],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1025],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"type":["validateControlType"],"checked":["updateControlChecked"],"disabled":["updateControlDisbled"]}]]],["post-popovercontainer",[[4,"post-popovercontainer",{"placement":[1],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]}]]],["post-tag",[[1,"post-tag",{"variant":[1],"size":[1],"icon":[1],"classes":[32]},null,{"variant":["variantChanged"],"size":["sizeChanged"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"delayed":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"delayed":["validateDelayed"]}]]],["post-accordion",[[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-collapsible-trigger",[[0,"post-collapsible-trigger",{"for":[1],"update":[64]},[[4,"postToggle","setAriaExpanded"]],{"for":["setAriaAttributes"]}]]],["post-tab-header",[[1,"post-tab-header",{"panel":[1],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[1],"panelId":[32]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"show":[64]}]]],["post-collapsible",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}]]],["post-icon",[[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[1],"rotate":[2],"scale":[2]},null,{"animation":["validateAnimation"],"base":["validateBase"],"flipH":["validateFlipH"],"flipV":["validateFlipV"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
2
|
import { c as checkEmptyOrOneOf, b as checkEmptyOrType } from './index-29d17d6d.js';
|
|
3
|
-
import { v as version } from './package-
|
|
3
|
+
import { v as version } from './package-9d6426d1.js';
|
|
4
4
|
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
5
5
|
import { c as checkType } from './check-type-8828dbe4.js';
|
|
6
6
|
|
|
@@ -20,8 +20,6 @@ const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
|
20
20
|
const PostIcon = class {
|
|
21
21
|
constructor(hostRef) {
|
|
22
22
|
registerInstance(this, hostRef);
|
|
23
|
-
this.svgStyles = undefined;
|
|
24
|
-
this.svgOutput = undefined;
|
|
25
23
|
this.animation = null;
|
|
26
24
|
this.base = null;
|
|
27
25
|
this.flipH = false;
|
|
@@ -53,6 +51,64 @@ const PostIcon = class {
|
|
|
53
51
|
validateScale(newValue = this.scale) {
|
|
54
52
|
checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
55
53
|
}
|
|
54
|
+
// Construct the icon url from different possible sources
|
|
55
|
+
getUrl() {
|
|
56
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
57
|
+
// the first definition object which defines a domain, will be used to set the domain of the file url
|
|
58
|
+
// the first definition object which defines a slug, will be used to set the slug of the file url
|
|
59
|
+
const urlDefinitions = [
|
|
60
|
+
getUrlDefinition(this.base, 'both'),
|
|
61
|
+
getUrlDefinition((_a = document.head
|
|
62
|
+
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base'), 'relative'),
|
|
63
|
+
getUrlDefinition((_b = document.querySelector('base[href]')) === null || _b === void 0 ? void 0 : _b.getAttribute('href'), 'both'),
|
|
64
|
+
];
|
|
65
|
+
// in case no other definition defines a domain, the current origin is used as a fallback
|
|
66
|
+
const origin = (_e = (_d = (_c = urlDefinitions.find(d => d.definesDomain)) === null || _c === void 0 ? void 0 : _c.url) === null || _d === void 0 ? void 0 : _d.origin) !== null && _e !== void 0 ? _e : window.location.origin;
|
|
67
|
+
// in case no other definition defines a slug, the cdn url is used as a fallback
|
|
68
|
+
const slug = (_g = (_f = urlDefinitions.find(d => d.definesSlug)) === null || _f === void 0 ? void 0 : _f.url) === null || _g === void 0 ? void 0 : _g.pathname;
|
|
69
|
+
const file = `${this.name}.svg`;
|
|
70
|
+
let url;
|
|
71
|
+
if (slug) {
|
|
72
|
+
url = new URL(`${origin}${slug}/${file}`).toString();
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
url = new URL(`${CDN_URL}/${file}`).toString();
|
|
76
|
+
}
|
|
77
|
+
return url;
|
|
78
|
+
function getUrlDefinition(url, allow) {
|
|
79
|
+
return {
|
|
80
|
+
url: getUrlObject(url),
|
|
81
|
+
definesDomain: allow !== 'relative' ? definesDomain(url) : false,
|
|
82
|
+
definesSlug: allow !== 'absolute' ? definesSlug(url) : false,
|
|
83
|
+
};
|
|
84
|
+
function getUrlObject(url) {
|
|
85
|
+
if (url) {
|
|
86
|
+
return definesDomain(url) ? new URL(url) : new URL(url, window.location.origin);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function definesDomain(url) {
|
|
93
|
+
return url ? /^https?:\/\//.test(url) : false;
|
|
94
|
+
}
|
|
95
|
+
function definesSlug(url) {
|
|
96
|
+
const urlObject = getUrlObject(url);
|
|
97
|
+
return Boolean(/^\/.+/.test(urlObject === null || urlObject === void 0 ? void 0 : urlObject.pathname));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
getStyles() {
|
|
102
|
+
const url = this.getUrl();
|
|
103
|
+
return Object.entries({
|
|
104
|
+
'-webkit-mask-image': `url(${url})`,
|
|
105
|
+
'mask-image': `url('${url}')`,
|
|
106
|
+
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
107
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
108
|
+
})
|
|
109
|
+
.filter(([_key, value]) => value !== null)
|
|
110
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
111
|
+
}
|
|
56
112
|
componentDidLoad() {
|
|
57
113
|
this.validateBase();
|
|
58
114
|
this.validateName();
|
|
@@ -62,30 +118,8 @@ const PostIcon = class {
|
|
|
62
118
|
this.validateRotate();
|
|
63
119
|
this.validateAnimation();
|
|
64
120
|
}
|
|
65
|
-
componentWillRender() {
|
|
66
|
-
this.setPath();
|
|
67
|
-
}
|
|
68
|
-
setPath() {
|
|
69
|
-
var _a, _b, _c, _d;
|
|
70
|
-
// Construct icon path from different possible sources
|
|
71
|
-
const metaBase = (_b = (_a = document.head
|
|
72
|
-
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
|
|
73
|
-
const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
74
|
-
const fileName = `${this.name}.svg`;
|
|
75
|
-
const filePath = `${fileBase}${fileName}`;
|
|
76
|
-
this.path = new URL(filePath, window.location.origin).toString();
|
|
77
|
-
}
|
|
78
121
|
render() {
|
|
79
|
-
|
|
80
|
-
const svgStyles = Object.entries({
|
|
81
|
-
'-webkit-mask-image': `url('${this.path}')`,
|
|
82
|
-
'mask-image': `url('${this.path}')`,
|
|
83
|
-
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
84
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
85
|
-
})
|
|
86
|
-
.filter(([_key, value]) => value !== null)
|
|
87
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
88
|
-
return (h(Host, { key: 'c4744bef990eef90a7de44312fd349583b295f4c', "data-version": version }, h("span", { key: '0655e0d6ada2b822bf4b3c399dcf63000e26bf46', style: svgStyles })));
|
|
122
|
+
return (h(Host, { key: 'a38838bcd99af618f660ec4ffef4e869cdab3995', "data-version": version }, h("span", { key: '24ae06bdb0aa65ddca7ac88fac9bb6bb5a12550a', style: this.getStyles() })));
|
|
89
123
|
}
|
|
90
124
|
get host() { return getElement(this); }
|
|
91
125
|
static get watchers() { return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { P as post_icon } from './post-icon-
|
|
1
|
+
export { P as post_icon } from './post-icon-27bb7505.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
3
|
import './index-29d17d6d.js';
|
|
4
4
|
import './constants-8d548297.js';
|
|
5
5
|
import './check-one-of-6b3ef8eb.js';
|
|
6
6
|
import './check-type-8828dbe4.js';
|
|
7
|
-
import './package-
|
|
7
|
+
import './package-9d6426d1.js';
|
|
8
8
|
import './check-non-empty-58bd6b17.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
import { g as getAttributeObserver } from './attribute-observer-37fa950a.js';
|
|
4
4
|
|
|
5
5
|
const postPopoverCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { P as post_popover } from './post-popover-
|
|
1
|
+
export { P as post_popover } from './post-popover-77691872.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|
|
4
4
|
import './attribute-observer-37fa950a.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9ace3232.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-9d6426d1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Custom positioning reference element.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { P as post_popovercontainer } from './post-popovercontainer-
|
|
1
|
+
export { P as post_popovercontainer } from './post-popovercontainer-e81c8c09.js';
|
|
2
2
|
import './index-9ace3232.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-9d6426d1.js';
|