@swisspost/design-system-components 8.8.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +16 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-18fe645e.js → package-47e2b57d.js} +1 -1
- package/dist/cjs/{post-accordion-72204d6b.js → post-accordion-20974b9a.js} +1 -1
- package/dist/cjs/{post-accordion-item-0d948fae.js → post-accordion-item-eabef3b1.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-7121f9c8.js → post-alert-3949513d.js} +1 -1
- package/dist/cjs/post-alert.cjs.entry.js +2 -2
- package/dist/cjs/{post-card-control-673c4762.js → post-card-control-2d5007b3.js} +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-trigger-257d54c9.js → post-collapsible-trigger-fdbbc054.js} +1 -1
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-icon-f77924c5.js → post-icon-f21b03b4.js} +60 -27
- package/dist/cjs/post-icon.cjs.entry.js +2 -2
- package/dist/cjs/{post-logo-705d008a.js → post-logo-5e71df9f.js} +1 -1
- package/dist/cjs/post-logo.cjs.entry.js +2 -2
- package/dist/cjs/{post-popover-25583f00.js → post-popover-2ad73bd3.js} +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-popovercontainer-76507ccc.js → post-popovercontainer-33d2561e.js} +2 -2
- package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-11dbd790.js → post-rating-45cfe0cf.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-6f5d2be3.js → post-tab-header-fb539597.js} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-f1ed5976.js → post-tab-panel-b9df8047.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-d174c1e4.js → post-tabs-315fdf6c.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-f2bd6bdf.js → post-tag-b7789a57.js} +1 -1
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-7d0e0502.js → post-tooltip-f5d7c6f1.js} +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-icon/post-icon.js +59 -32
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-icon2.js +60 -29
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +16 -16
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{package-942f65ba.js → package-08fde6c9.js} +1 -1
- package/dist/esm/{post-accordion-107de0bf.js → post-accordion-fc082a6d.js} +1 -1
- package/dist/esm/{post-accordion-item-02dc6e8e.js → post-accordion-item-2266baf9.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-67119095.js → post-alert-5f56513e.js} +1 -1
- package/dist/esm/post-alert.entry.js +2 -2
- package/dist/esm/{post-card-control-b50b4415.js → post-card-control-8692a4b3.js} +1 -1
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/{post-collapsible-trigger-e867341f.js → post-collapsible-trigger-df2fda7a.js} +1 -1
- package/dist/esm/post-collapsible_2.entry.js +2 -2
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-icon-c7aefee7.js → post-icon-f23e7246.js} +60 -27
- package/dist/esm/post-icon.entry.js +2 -2
- package/dist/esm/{post-logo-5c1d6caf.js → post-logo-39493c51.js} +1 -1
- package/dist/esm/post-logo.entry.js +2 -2
- package/dist/esm/{post-popover-e9507e20.js → post-popover-e46db9d7.js} +1 -1
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-popovercontainer-3ffbd7a1.js → post-popovercontainer-f2bd3608.js} +2 -2
- package/dist/esm/post-popovercontainer.entry.js +2 -2
- package/dist/esm/{post-rating-6b62253c.js → post-rating-2a35545e.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-ee7e3c9a.js → post-tab-header-ba8f0dde.js} +1 -1
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-0d723465.js → post-tab-panel-03f0c4e7.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-4e70f6b5.js → post-tabs-75e64d21.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-d56caa2f.js → post-tag-64b158d7.js} +1 -1
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-f53a1116.js → post-tooltip-78458f2e.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-a38b6227.js → p-0f230d9d.js} +1 -1
- package/dist/post-components/p-228f6fff.entry.js +1 -0
- package/dist/post-components/{p-11a29ae9.entry.js → p-26a75af8.entry.js} +1 -1
- package/dist/post-components/{p-94c1642c.js → p-27466c43.js} +1 -1
- package/dist/post-components/{p-8632c93e.js → p-29f3b024.js} +1 -1
- package/dist/post-components/p-3a7e0eb0.entry.js +1 -0
- package/dist/post-components/{p-d1bf9fc6.js → p-41a6ed2e.js} +1 -1
- package/dist/post-components/p-43919169.entry.js +1 -0
- package/dist/post-components/{p-6b39cec5.js → p-4f4e3ca3.js} +1 -1
- package/dist/post-components/{p-2a21d0cb.js → p-606f6944.js} +1 -1
- package/dist/post-components/p-6364af05.entry.js +1 -0
- package/dist/post-components/{p-8ffe22ec.js → p-740936e8.js} +1 -1
- package/dist/post-components/{p-a1d2c19f.js → p-76f71540.js} +1 -1
- package/dist/post-components/p-786ab630.entry.js +1 -0
- package/dist/post-components/p-80b34a10.entry.js +1 -0
- package/dist/post-components/{p-b63064ed.js → p-82a37955.js} +1 -1
- package/dist/post-components/p-880141d1.entry.js +1 -0
- package/dist/post-components/p-9cf80f04.entry.js +1 -0
- package/dist/post-components/p-af7f9325.entry.js +1 -0
- package/dist/post-components/{p-6d229e13.js → p-b562ef6b.js} +1 -1
- package/dist/post-components/p-b5a5a368.entry.js +1 -0
- package/dist/post-components/{p-8914ab70.js → p-b7435c96.js} +1 -1
- package/dist/post-components/{p-00852a2d.js → p-c172368e.js} +1 -1
- package/dist/post-components/p-c2b10c80.entry.js +1 -0
- package/dist/post-components/p-d6c0790c.entry.js +1 -0
- package/dist/post-components/{p-ee540033.js → p-dec7d50c.js} +1 -1
- package/dist/post-components/{p-acc58441.js → p-e15f7eb6.js} +1 -1
- package/dist/post-components/p-ec6b827c.entry.js +1 -0
- package/dist/post-components/p-ed057108.js +1 -0
- package/dist/post-components/p-f16cf914.entry.js +1 -0
- package/dist/post-components/p-f5251062.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-icon/post-icon.d.ts +2 -5
- package/loaders/package.js +1 -1
- package/loaders/post-icon2.js +60 -29
- package/loaders/post-popovercontainer2.js +1 -1
- package/package.json +2 -2
- package/dist/post-components/p-051affe1.entry.js +0 -1
- package/dist/post-components/p-072e09e5.js +0 -1
- package/dist/post-components/p-201aa44b.entry.js +0 -1
- package/dist/post-components/p-423300d9.entry.js +0 -1
- package/dist/post-components/p-442d115b.entry.js +0 -1
- package/dist/post-components/p-4a95d21e.entry.js +0 -1
- package/dist/post-components/p-50e9827f.entry.js +0 -1
- package/dist/post-components/p-5f048f56.entry.js +0 -1
- package/dist/post-components/p-6bbe961c.entry.js +0 -1
- package/dist/post-components/p-753c8265.js +0 -1
- package/dist/post-components/p-956f9933.entry.js +0 -1
- package/dist/post-components/p-ab5c21a0.entry.js +0 -1
- package/dist/post-components/p-c514f454.entry.js +0 -1
- package/dist/post-components/p-ca459b37.entry.js +0 -1
- package/dist/post-components/p-e6adee20.entry.js +0 -1
- package/dist/post-components/p-f3f879a5.entry.js +0 -1
package/loaders/post-icon2.js
CHANGED
|
@@ -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,31 +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, _e, _f;
|
|
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 baseHref = (_c = document.getElementsByTagName('base')[0]) === null || _c === void 0 ? void 0 : _c.href;
|
|
76
|
-
const fileBase = `${(_f = (_e = (_d = this.base) !== null && _d !== void 0 ? _d : metaBase) !== null && _e !== void 0 ? _e : baseHref) !== null && _f !== void 0 ? _f : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
77
|
-
const fileName = `${this.name}.svg`;
|
|
78
|
-
const filePath = `${fileBase}${fileName}`;
|
|
79
|
-
this.path = new URL(filePath, window.location.origin).toString();
|
|
80
|
-
}
|
|
81
123
|
render() {
|
|
82
|
-
|
|
83
|
-
const svgStyles = Object.entries({
|
|
84
|
-
'-webkit-mask-image': `url('${this.path}')`,
|
|
85
|
-
'mask-image': `url('${this.path}')`,
|
|
86
|
-
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
87
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
88
|
-
})
|
|
89
|
-
.filter(([_key, value]) => value !== null)
|
|
90
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
91
|
-
return (h(Host, { key: '4eff0b8a359adccaa1957983f24dd9d2b5cc465d', "data-version": version }, h("span", { key: 'b84e20e26b501bb3c03a31beb908ece1c9dddfa5', style: svgStyles })));
|
|
124
|
+
return (h(Host, { key: '77740745eb170076301edb3ff96b846e48c7f2f4', "data-version": version }, h("span", { key: '573f2acd8e92ec5f2f8853b5cb05386bcaee693d', style: this.getStyles() })));
|
|
92
125
|
}
|
|
93
126
|
get host() { return this; }
|
|
94
127
|
static get watchers() { return {
|
|
@@ -108,9 +141,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
108
141
|
"flipV": [4, "flip-v"],
|
|
109
142
|
"name": [1],
|
|
110
143
|
"rotate": [2],
|
|
111
|
-
"scale": [2]
|
|
112
|
-
"svgStyles": [32],
|
|
113
|
-
"svgOutput": [32]
|
|
144
|
+
"scale": [2]
|
|
114
145
|
}, undefined, {
|
|
115
146
|
"animation": ["validateAnimation"],
|
|
116
147
|
"base": ["validateBase"],
|
|
@@ -2039,7 +2039,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
2039
2039
|
}
|
|
2040
2040
|
`,E=null;function I(e){if(E===null)try{E=new CSSStyleSheet,E.replaceSync(C);}catch{E=!1;}if(E===!1){let t=document.createElement("style");t.textContent=C,e instanceof Document?e.head.prepend(t):e.prepend(t);}else e.adoptedStyleSheets=[E,...e.adoptedStyleSheets];}function K(){window.ToggleEvent=window.ToggleEvent||c;function e(n){return n?.includes(":popover-open")&&(n=n.replace(J,"$1.\\:popover-open")),n}f(Document.prototype,"querySelector",e),f(Document.prototype,"querySelectorAll",e),f(Element.prototype,"querySelector",e),f(Element.prototype,"querySelectorAll",e),f(Element.prototype,"matches",e),f(Element.prototype,"closest",e),f(DocumentFragment.prototype,"querySelectorAll",e),f(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let n=(this.getAttribute("popover")||"").toLowerCase();return n===""||n=="auto"?"auto":"manual"},set(n){this.setAttribute("popover",n);}},showPopover:{enumerable:!0,configurable:!0,value(){S(this);}},hidePopover:{enumerable:!0,configurable:!0,value(){m(this,!0,!0);}},togglePopover:{enumerable:!0,configurable:!0,value(n){h.get(this)==="showing"&&n===void 0||n===!1?m(this,!0,!0):(n===void 0||n===!0)&&S(this);}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(n){let s=t.call(this,n);return I(s),s}}});let o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let n=o.call(this);return n.shadowRoot&&I(n.shadowRoot),n}}});let r=new WeakMap;function i(n){Object.defineProperties(n.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(s){if(s===null)this.removeAttribute("popovertarget"),r.delete(this);else if(s instanceof Element)this.setAttribute("popovertarget",""),r.set(this,s);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let s=r.get(this);if(s&&s.isConnected)return s;if(s&&!s.isConnected)return r.delete(this),null;let u=v(this),w=this.getAttribute("popovertarget");return (u instanceof Document||u instanceof B)&&w&&u.getElementById(w)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let s=(this.getAttribute("popovertargetaction")||"").toLowerCase();return s==="show"||s==="hide"?s:"toggle"},set(s){this.setAttribute("popovertargetaction",s);}}});}i(HTMLButtonElement),i(HTMLInputElement);let l=n=>{if(!n.isTrusted)return;let s=n.composedPath()[0];if(!(s instanceof Element)||s?.shadowRoot)return;let u=v(s);if(!(u instanceof B||u instanceof Document))return;let w=s.closest("[popovertargetaction],[popovertarget]");if(w){O(w),n.preventDefault();return}},a=n=>{let s=n.key,u=n.target;!n.defaultPrevented&&u&&(s==="Escape"||s==="Esc")&&T(u.ownerDocument,!0,!0);};(n=>{n.addEventListener("click",l),n.addEventListener("keydown",a),n.addEventListener("pointerdown",x),n.addEventListener("pointerup",x);})(document),I(document);}j()||K();})();
|
|
2041
2041
|
|
|
2042
|
-
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:2px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-left:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-right:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-left:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";
|
|
2042
|
+
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;color:var(--post-contrast-color);background-color:rgb(var(--post-bg-rgb));border:2px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}:where(post-popovercontainer):not(:has(.arrow)){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12)}:where(post-popovercontainer):has(.arrow){filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top){filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left){filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right){filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-left:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-right:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-left:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";
|
|
2043
2043
|
const PostPopovercontainerStyle0 = postPopovercontainerCss;
|
|
2044
2044
|
|
|
2045
2045
|
const SIDE_MAP = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.0",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/dom": "1.6.8",
|
|
28
28
|
"@oddbird/popover-polyfill": "0.3.7",
|
|
29
|
-
"@swisspost/design-system-styles": "8.
|
|
29
|
+
"@swisspost/design-system-styles": "8.9.0",
|
|
30
30
|
"ally.js": "1.4.1",
|
|
31
31
|
"long-press-event": "2.5.0"
|
|
32
32
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_popovercontainer}from"./p-acc58441.js";import"./p-343f6de1.js";import"./p-072e09e5.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const o="8.8.0";export{o as v}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_logo}from"./p-ee540033.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-deb4131c.js";import"./p-440193f4.js";import"./p-611b3c41.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_accordion}from"./p-6b39cec5.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-247a1668.js";import"./p-611b3c41.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tabs}from"./p-a38b6227.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-2737eaf5.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tab_header}from"./p-2a21d0cb.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-b095519d.js";import"./p-440193f4.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_alert}from"./p-a1d2c19f.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-2737eaf5.js";import"./p-deb4131c.js";import"./p-440193f4.js";import"./p-611b3c41.js";import"./p-b095519d.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_accordion_item}from"./p-d1bf9fc6.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-247a1668.js";import"./p-deb4131c.js";import"./p-440193f4.js";import"./p-611b3c41.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_popover}from"./p-8632c93e.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-6adeaa6c.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,H as a,g as e}from"./p-343f6de1.js";import{c as o,d as n,a as s}from"./p-deb4131c.js";import{v as r}from"./p-072e09e5.js";import{c as l}from"./p-b095519d.js";const c=["cylon","cylon-vertical","spin","spin-reverse","fade","throb"],m=class{constructor(t){i(this,t),this.svgStyles=void 0,this.svgOutput=void 0,this.animation=null,this.base=null,this.flipH=!1,this.flipV=!1,this.name=void 0,this.rotate=null,this.scale=null}validateAnimation(i=this.animation){void 0!==i&&o(i,c,`The post-icon "animation" prop requires one of the following values: ${c.join(", ")}.`)}validateBase(i=this.base){n(i,"string",'The post-icon "base" prop should be a string.')}validateFlipH(i=this.flipH){n(i,"boolean",'The post-icon "flipH" prop should be a boolean.')}validateFlipV(i=this.flipV){n(i,"boolean",'The post-icon "flipV" prop should be a boolean.')}validateName(i=this.name){l(i,'The post-icon "name" prop is required!.'),s(i,"string",'The post-icon "name" prop should be a string.')}validateRotate(i=this.rotate){n(i,"number",'The post-icon "rotate" prop should be a number.')}validateScale(i=this.scale){n(i,"number",'The post-icon "scale" prop should be a number.')}componentDidLoad(){this.validateBase(),this.validateName(),this.validateFlipH(),this.validateFlipV(),this.validateScale(),this.validateRotate(),this.validateAnimation()}componentWillRender(){this.setPath()}setPath(){var i,t,a,e,o,n;const s=null!==(t=null===(i=document.head.querySelector('meta[name="design-system-settings"][data-post-icon-base]'))||void 0===i?void 0:i.getAttribute("data-post-icon-base"))&&void 0!==t?t:null,r=null===(a=document.getElementsByTagName("base")[0])||void 0===a?void 0:a.href,l=`${null!==(n=null!==(o=null!==(e=this.base)&&void 0!==e?e:s)&&void 0!==o?o:r)&&void 0!==n?n:"https://unpkg.com/@swisspost/design-system-icons/public/post-icons"}/`.replace(/\/\/$/,"/");this.path=new URL(`${l}${this.name}.svg`,window.location.origin).toString()}render(){const i=Object.entries({"-webkit-mask-image":`url('${this.path}')`,"mask-image":`url('${this.path}')`,transform:(this.scale&&!isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([i,t])=>null!==t)).reduce(((i,[t,a])=>Object.assign(i,{[t]:a})),{});return t(a,{key:"4eff0b8a359adccaa1957983f24dd9d2b5cc465d","data-version":r},t("span",{key:"b84e20e26b501bb3c03a31beb908ece1c9dddfa5",style:i}))}get host(){return e(this)}static get watchers(){return{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}}};m.style=":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";export{m as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_rating}from"./p-8914ab70.js";import"./p-343f6de1.js";import"./p-072e09e5.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_icon}from"./p-753c8265.js";import"./p-343f6de1.js";import"./p-deb4131c.js";import"./p-440193f4.js";import"./p-611b3c41.js";import"./p-072e09e5.js";import"./p-b095519d.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tag}from"./p-94c1642c.js";import"./p-343f6de1.js";import"./p-072e09e5.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tooltip}from"./p-00852a2d.js";import"./p-343f6de1.js";import"./p-072e09e5.js";import"./p-6adeaa6c.js";import"./p-deb4131c.js";import"./p-440193f4.js";import"./p-611b3c41.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_card_control}from"./p-8ffe22ec.js";import"./p-343f6de1.js";import"./p-611b3c41.js";import"./p-b095519d.js";import"./p-440193f4.js";import"./p-072e09e5.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tab_panel}from"./p-6d229e13.js";import"./p-343f6de1.js";import"./p-072e09e5.js";
|