@swisspost/design-system-components 9.0.0-next.17 → 9.0.0-next.19
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/{check-url-1ff4cf75.js → check-url-4c524d85.js} +1 -1
- package/dist/cjs/{index-f2eedfeb.js → index-d4222dcb.js} +1 -1
- package/dist/cjs/index.cjs.js +22 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-6000ba84.js → package-1403e51d.js} +1 -1
- package/dist/cjs/{post-accordion-562d63d3.js → post-accordion-e84c9d23.js} +1 -1
- package/dist/cjs/{post-accordion-item-2b9a7c01.js → post-accordion-item-d1ef00c3.js} +3 -3
- package/dist/cjs/post-accordion-item.cjs.entry.js +4 -4
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/{post-avatar-d9194b7f.js → post-avatar-7a8860df.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/{post-back-to-top-fa8d4e1d.js → post-back-to-top-6c7057f9.js} +2 -2
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/{post-banner-3b91a695.js → post-banner-ecc46714.js} +3 -3
- package/dist/cjs/post-banner.cjs.entry.js +4 -4
- package/dist/cjs/{post-breadcrumb-839a2652.js → post-breadcrumb-dbb85db9.js} +2 -2
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/{post-card-control-14a4dfc8.js → post-card-control-76f6a5b3.js} +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_15.cjs.entry.js +4 -4
- package/dist/cjs/{post-collapsible-trigger-05be3759.js → post-collapsible-trigger-8b242323.js} +2 -2
- package/dist/cjs/post-collapsible_2.cjs.entry.js +4 -4
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-footer-a70591e7.js → post-footer-eeec84e0.js} +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +2 -2
- package/dist/cjs/post-linkarea-61dbfe5d.js +30 -0
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-item-e20f184b.js → post-menu-item-12639f7c.js} +2 -2
- package/dist/cjs/{post-popover-e398bdfb.js → post-popover-9569b144.js} +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-7aff1856.js → post-rating-5645cae4.js} +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-a2dbedd3.js → post-tab-header-82e8ccd0.js} +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-5be6d90e.js → post-tab-panel-ef3df53e.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-c0ff849b.js → post-tabs-8f1e74d9.js} +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-0d9d3036.js → post-tag-c353e30c.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-togglebutton-46c57375.js → post-togglebutton-8949d278.js} +341 -161
- package/dist/cjs/{post-tooltip-fd1b7b47.js → post-tooltip-cf18ac29.js} +4 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +4 -4
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +13 -3
- package/dist/collection/components/post-icon/post-icon.js +41 -37
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +2 -2
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +6 -6
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +12 -14
- package/dist/collection/components/post-list/post-list.js +2 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +55 -34
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +64 -21
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +24 -2
- package/dist/collection/components/post-menu/post-menu.js +17 -13
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +13 -7
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +141 -33
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/utils/property-checkers/check-url.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-back-to-top2.js +1 -1
- package/dist/components/post-banner2.js +1 -1
- package/dist/components/post-header2.js +14 -4
- package/dist/components/post-icon2.js +41 -37
- package/dist/components/post-language-option2.js +2 -2
- package/dist/components/post-language-switch2.js +6 -6
- package/dist/components/post-linkarea2.js +12 -14
- package/dist/components/post-list2.js +2 -2
- package/dist/components/post-mainnavigation2.js +57 -36
- package/dist/components/post-megadropdown-trigger2.js +24 -2
- package/dist/components/post-megadropdown2.js +42 -19
- package/dist/components/post-menu-trigger2.js +13 -7
- package/dist/components/post-menu2.js +17 -13
- package/dist/components/post-popover2.js +1 -1
- package/dist/components/post-popovercontainer2.js +125 -33
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +1 -1
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip2.js +2 -2
- package/dist/docs.json +71 -11
- package/dist/esm/{check-url-8ab230de.js → check-url-f84034b1.js} +1 -1
- package/dist/esm/{index-0aec278f.js → index-1b263a63.js} +1 -1
- package/dist/esm/index.js +22 -22
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-21cb9eb8.js +3 -0
- package/dist/esm/{post-accordion-ae79061a.js → post-accordion-db14e23a.js} +1 -1
- package/dist/esm/{post-accordion-item-6aa9b5bd.js → post-accordion-item-c1f42c05.js} +3 -3
- package/dist/esm/post-accordion-item.entry.js +4 -4
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-avatar-2384ca3b.js → post-avatar-ccda94eb.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/{post-back-to-top-ec1c2754.js → post-back-to-top-f038d599.js} +2 -2
- package/dist/esm/post-back-to-top.entry.js +2 -2
- package/dist/esm/{post-banner-c7b88ac2.js → post-banner-a24ccf11.js} +3 -3
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/{post-breadcrumb-d48cb773.js → post-breadcrumb-e3e4b50c.js} +2 -2
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -4
- package/dist/esm/post-breadcrumb.entry.js +3 -3
- package/dist/esm/{post-card-control-b63a2837.js → post-card-control-0a4497d8.js} +1 -1
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_15.entry.js +4 -4
- package/dist/esm/{post-collapsible-trigger-8f4daf1e.js → post-collapsible-trigger-6b0253d8.js} +2 -2
- package/dist/esm/post-collapsible_2.entry.js +4 -4
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-footer-b4b75c94.js → post-footer-fa4a2a32.js} +1 -1
- package/dist/esm/post-footer.entry.js +2 -2
- package/dist/esm/post-linkarea-1458faa8.js +28 -0
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/{post-menu-item-d087d910.js → post-menu-item-b9af8b46.js} +2 -2
- package/dist/esm/{post-popover-a096ee08.js → post-popover-425eb5c9.js} +2 -2
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-0ead6a2a.js → post-rating-4057a5b5.js} +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-e29d371b.js → post-tab-header-602eb0cb.js} +3 -3
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-57840a1a.js → post-tab-panel-fccea5b6.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-70dfc43c.js → post-tabs-b9f41051.js} +2 -2
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-be1ad18d.js → post-tag-54b70906.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-togglebutton-8da6d613.js → post-togglebutton-f6746062.js} +341 -161
- package/dist/esm/{post-tooltip-cb549b9f.js → post-tooltip-eccf3d93.js} +4 -4
- package/dist/esm/post-tooltip.entry.js +4 -4
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0337eb03.entry.js +1 -0
- package/dist/post-components/p-0470d5af.entry.js +1 -0
- package/dist/post-components/p-07b75b18.entry.js +1 -0
- package/dist/post-components/{p-c3135c18.js → p-0d879e8b.js} +1 -1
- package/dist/post-components/{p-9b46c8f2.js → p-0f6fee8f.js} +1 -1
- package/dist/post-components/p-114bb8ba.js +1 -0
- package/dist/post-components/{p-fa65c799.js → p-18fa847f.js} +1 -1
- package/dist/post-components/{p-fb8f5195.js → p-1c1a614d.js} +1 -1
- package/dist/post-components/p-202156ad.js +1 -0
- package/dist/post-components/p-2f5425e2.entry.js +1 -0
- package/dist/post-components/p-39586235.js +1 -0
- package/dist/post-components/p-3b1c2b8a.entry.js +1 -0
- package/dist/post-components/{p-16d20563.js → p-46accc5f.js} +1 -1
- package/dist/post-components/{p-f513fd5d.js → p-470c7464.js} +1 -1
- package/dist/post-components/{p-77eb06d0.js → p-509fc6e6.js} +1 -1
- package/dist/post-components/{p-7f09a864.js → p-541c7be9.js} +2 -2
- package/dist/post-components/p-54c98790.js +1 -0
- package/dist/post-components/p-5afa25c7.entry.js +1 -0
- package/dist/post-components/{p-49b69e0e.js → p-5b1c57d5.js} +1 -1
- package/dist/post-components/p-5cf79fe3.entry.js +1 -0
- package/dist/post-components/p-5d9c1fc3.entry.js +1 -0
- package/dist/post-components/p-608ba689.entry.js +1 -0
- package/dist/post-components/p-64776810.entry.js +1 -0
- package/dist/post-components/{p-faaa4c0a.js → p-6651164c.js} +1 -1
- package/dist/post-components/p-7085e0e7.entry.js +1 -0
- package/dist/post-components/{p-904b3028.entry.js → p-7bf39758.entry.js} +1 -1
- package/dist/post-components/p-7dc1ccf0.entry.js +1 -0
- package/dist/post-components/p-81eac2e5.entry.js +1 -0
- package/dist/post-components/p-8a31b2fc.entry.js +1 -0
- package/dist/post-components/p-8e7e9942.entry.js +1 -0
- package/dist/post-components/p-a24bf798.js +1 -0
- package/dist/post-components/p-a621090d.js +1 -0
- package/dist/post-components/p-a926c755.js +1 -0
- package/dist/post-components/{p-ce76e0bf.js → p-b27b7d03.js} +1 -1
- package/dist/post-components/{p-76bbd883.js → p-b8100b63.js} +1 -1
- package/dist/post-components/p-c48553bd.entry.js +1 -0
- package/dist/post-components/{p-26951eb6.js → p-cb472e20.js} +1 -1
- package/dist/post-components/p-cea81e00.entry.js +1 -0
- package/dist/post-components/p-d2d2681a.js +1 -0
- package/dist/post-components/{p-baf06ea0.js → p-d8b179fb.js} +1 -1
- package/dist/post-components/p-f405f29e.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-header/post-header.d.ts +1 -0
- package/dist/types/components/post-icon/post-icon.d.ts +5 -0
- package/dist/types/components/post-language-option/post-language-option.d.ts +1 -1
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +1 -1
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +2 -2
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +2 -5
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +12 -5
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +6 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +2 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +15 -1
- package/dist/types/components.d.ts +19 -10
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item2.js +1 -1
- package/loaders/post-back-to-top.js +1 -1
- package/loaders/post-banner.js +1 -1
- package/loaders/post-header.js +14 -4
- package/loaders/post-icon2.js +41 -37
- package/loaders/post-language-option.js +2 -2
- package/loaders/post-language-switch.js +6 -6
- package/loaders/post-linkarea.js +12 -14
- package/loaders/post-list.js +2 -2
- package/loaders/post-mainnavigation.js +57 -36
- package/loaders/post-megadropdown-trigger.js +24 -2
- package/loaders/post-megadropdown.js +42 -19
- package/loaders/post-menu-trigger2.js +13 -7
- package/loaders/post-menu2.js +17 -13
- package/loaders/post-popover.js +1 -1
- package/loaders/post-popovercontainer2.js +125 -33
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +1 -1
- package/loaders/post-tag.js +1 -1
- package/loaders/post-togglebutton.js +1 -1
- package/loaders/post-tooltip.js +2 -2
- package/package.json +3 -3
- package/dist/cjs/post-linkarea-199a2615.js +0 -32
- package/dist/esm/package-0d05729a.js +0 -3
- package/dist/esm/post-linkarea-d3ae37f9.js +0 -30
- package/dist/post-components/p-0ca3d16c.entry.js +0 -1
- package/dist/post-components/p-1a695d66.entry.js +0 -1
- package/dist/post-components/p-1eb54abb.entry.js +0 -1
- package/dist/post-components/p-2bcf91f6.entry.js +0 -1
- package/dist/post-components/p-3e94d076.entry.js +0 -1
- package/dist/post-components/p-3ef59370.entry.js +0 -1
- package/dist/post-components/p-3fdd351e.js +0 -1
- package/dist/post-components/p-413b656c.entry.js +0 -1
- package/dist/post-components/p-480169b9.js +0 -1
- package/dist/post-components/p-59373941.js +0 -1
- package/dist/post-components/p-78ae731e.js +0 -1
- package/dist/post-components/p-78b6020e.entry.js +0 -1
- package/dist/post-components/p-88c5e0bf.entry.js +0 -1
- package/dist/post-components/p-8c732622.entry.js +0 -1
- package/dist/post-components/p-8f2e8a63.entry.js +0 -1
- package/dist/post-components/p-9a5111ca.entry.js +0 -1
- package/dist/post-components/p-9ae6517d.entry.js +0 -1
- package/dist/post-components/p-a2806a35.js +0 -1
- package/dist/post-components/p-c6a239f2.entry.js +0 -1
- package/dist/post-components/p-ceb96aaa.js +0 -1
- package/dist/post-components/p-d2646369.entry.js +0 -1
- package/dist/post-components/p-debe5b2d.entry.js +0 -1
- package/dist/post-components/p-f2ed28e5.js +0 -1
- package/dist/post-components/p-f3c23d8c.entry.js +0 -1
- package/dist/post-components/p-f573860f.js +0 -1
- package/dist/post-components/p-facba41d.entry.js +0 -1
|
@@ -2103,15 +2103,9 @@ const computePosition = (reference, floating, options) => {
|
|
|
2103
2103
|
}
|
|
2104
2104
|
`,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();})();
|
|
2105
2105
|
|
|
2106
|
-
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:var(--post-device-elevation-300);
|
|
2106
|
+
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;z-index:1060;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:var(--post-device-elevation-300);width:max-content;color:var(--post-current-palette-fg);background-color:var(--post-current-palette-bg);border:2px solid rgba(0,0,0,0);border-radius:4px}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--safe-space-cursor-x, 0) var(--safe-space-cursor-y, 0), var(--safe-space-popover-x-start, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-start, 0)), var(--safe-space-popover-x-end, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--safe-space-trigger-x-start, var(--safe-space-trigger-x, 0)) var(--safe-space-trigger-y, var(--safe-space-trigger-y-start, 0)), var(--safe-space-trigger-x-end, var(--safe-space-trigger-x, 0)) var(--safe-space-trigger-y, var(--safe-space-trigger-y-end, 0)), var(--safe-space-popover-x-end, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-end, 0)), var(--safe-space-popover-x-start, var(--safe-space-popover-x, 0)) var(--safe-space-popover-y, var(--safe-space-popover-y-start, 0)))}:where(post-popovercontainer):not(:has(.arrow))>div{box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow)>div{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)>div{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)>div{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)>div{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)}";
|
|
2107
2107
|
const PostPopovercontainerStyle0 = postPopovercontainerCss;
|
|
2108
2108
|
|
|
2109
|
-
const SIDE_MAP = {
|
|
2110
|
-
top: 'bottom',
|
|
2111
|
-
right: 'left',
|
|
2112
|
-
bottom: 'top',
|
|
2113
|
-
left: 'right',
|
|
2114
|
-
};
|
|
2115
2109
|
const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends HTMLElement$1 {
|
|
2116
2110
|
constructor() {
|
|
2117
2111
|
super();
|
|
@@ -2121,7 +2115,28 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2121
2115
|
this.placement = 'top';
|
|
2122
2116
|
this.edgeGap = 8;
|
|
2123
2117
|
this.arrow = false;
|
|
2118
|
+
this.safeSpace = undefined;
|
|
2124
2119
|
}
|
|
2120
|
+
static STATIC_SIDES = {
|
|
2121
|
+
top: 'bottom',
|
|
2122
|
+
right: 'left',
|
|
2123
|
+
bottom: 'top',
|
|
2124
|
+
left: 'right',
|
|
2125
|
+
};
|
|
2126
|
+
static PROPERTIES_TO_CLEAR = [
|
|
2127
|
+
'--safe-space-popover-x',
|
|
2128
|
+
'--safe-space-popover-y',
|
|
2129
|
+
'--safe-space-popover-x-start',
|
|
2130
|
+
'--safe-space-popover-x-end',
|
|
2131
|
+
'--safe-space-popover-y-start',
|
|
2132
|
+
'--safe-space-popover-y-end',
|
|
2133
|
+
'--safe-space-trigger-x',
|
|
2134
|
+
'--safe-space-trigger-y',
|
|
2135
|
+
'--safe-space-trigger-x-start',
|
|
2136
|
+
'--safe-space-trigger-x-end',
|
|
2137
|
+
'--safe-space-trigger-y-start',
|
|
2138
|
+
'--safe-space-trigger-y-end',
|
|
2139
|
+
];
|
|
2125
2140
|
get host() { return this; }
|
|
2126
2141
|
arrowRef;
|
|
2127
2142
|
eventTarget;
|
|
@@ -2131,12 +2146,22 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2131
2146
|
* Fires whenever the popover gets shown or hidden, passing the new state in event.details as a boolean
|
|
2132
2147
|
*/
|
|
2133
2148
|
postToggle;
|
|
2149
|
+
/**
|
|
2150
|
+
* Updates cursor position for safe space feature when popover is open.
|
|
2151
|
+
* Sets CSS custom properties for dynamic styling of safe area.
|
|
2152
|
+
* @param event MouseEvent with cursor position
|
|
2153
|
+
*/
|
|
2154
|
+
mouseTrackingHandler(event) {
|
|
2155
|
+
this.host.style.setProperty('--safe-space-cursor-x', `${event.clientX}px`);
|
|
2156
|
+
this.host.style.setProperty('--safe-space-cursor-y', `${event.clientY}px`);
|
|
2157
|
+
}
|
|
2134
2158
|
componentDidLoad() {
|
|
2135
2159
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
2136
2160
|
}
|
|
2137
2161
|
disconnectedCallback() {
|
|
2138
|
-
if (typeof this.clearAutoUpdate === 'function')
|
|
2162
|
+
if (typeof this.clearAutoUpdate === 'function') {
|
|
2139
2163
|
this.clearAutoUpdate();
|
|
2164
|
+
}
|
|
2140
2165
|
}
|
|
2141
2166
|
/**
|
|
2142
2167
|
* Programmatically display the tooltip
|
|
@@ -2171,7 +2196,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2171
2196
|
this.host.togglePopover(force);
|
|
2172
2197
|
this.toggleTimeoutId = null;
|
|
2173
2198
|
}
|
|
2174
|
-
return this.host.matches(':where(:popover-open, .popover-open');
|
|
2199
|
+
return this.host.matches(':where(:popover-open, .popover-open)');
|
|
2175
2200
|
}
|
|
2176
2201
|
/**
|
|
2177
2202
|
* Start or stop auto updates based on tooltip events.
|
|
@@ -2184,10 +2209,14 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2184
2209
|
const isOpen = e.newState === 'open';
|
|
2185
2210
|
if (isOpen) {
|
|
2186
2211
|
this.startAutoupdates();
|
|
2212
|
+
if (this.safeSpace)
|
|
2213
|
+
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2187
2214
|
}
|
|
2188
2215
|
else {
|
|
2189
2216
|
if (typeof this.clearAutoUpdate === 'function')
|
|
2190
2217
|
this.clearAutoUpdate();
|
|
2218
|
+
if (this.safeSpace)
|
|
2219
|
+
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2191
2220
|
}
|
|
2192
2221
|
this.postToggle.emit(isOpen);
|
|
2193
2222
|
}
|
|
@@ -2199,14 +2228,35 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2199
2228
|
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
|
|
2200
2229
|
}
|
|
2201
2230
|
async calculatePosition() {
|
|
2231
|
+
const { x, y, middlewareData, placement } = await this.computeMainPosition();
|
|
2232
|
+
const currentPlacement = placement.split('-')[0];
|
|
2233
|
+
// Position popover
|
|
2234
|
+
this.host.style.left = `${x}px`;
|
|
2235
|
+
this.host.style.top = `${y}px`;
|
|
2236
|
+
// Position arrow if enabled
|
|
2237
|
+
if (this.arrow && middlewareData.arrow) {
|
|
2238
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
2239
|
+
const staticSide = PostPopovercontainer.STATIC_SIDES[currentPlacement];
|
|
2240
|
+
if (staticSide) {
|
|
2241
|
+
Object.assign(this.arrowRef.style, {
|
|
2242
|
+
left: arrowX ? `${arrowX}px` : '',
|
|
2243
|
+
top: arrowY ? `${arrowY}px` : '',
|
|
2244
|
+
[staticSide]: '-7px',
|
|
2245
|
+
});
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
// Handle safe space if enabled
|
|
2249
|
+
if (this.safeSpace && this.eventTarget) {
|
|
2250
|
+
await this.updateSafeSpaceBoundaries(currentPlacement);
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
async computeMainPosition() {
|
|
2202
2254
|
const gap = this.edgeGap;
|
|
2203
2255
|
const middleware = [
|
|
2204
2256
|
flip(),
|
|
2205
2257
|
inline(),
|
|
2206
2258
|
shift({
|
|
2207
2259
|
padding: gap,
|
|
2208
|
-
// Prevents shifting away from the anchor too far, while shifting as far as possible
|
|
2209
|
-
// https://floating-ui.com/docs/shift#limiter
|
|
2210
2260
|
limiter: limitShift({
|
|
2211
2261
|
offset: 32,
|
|
2212
2262
|
}),
|
|
@@ -2218,40 +2268,81 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2218
2268
|
});
|
|
2219
2269
|
},
|
|
2220
2270
|
}),
|
|
2221
|
-
offset(this.arrow ? gap + 4 : gap),
|
|
2271
|
+
offset(this.arrow ? gap + 4 : gap),
|
|
2222
2272
|
];
|
|
2223
2273
|
if (this.arrow) {
|
|
2224
2274
|
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
2225
2275
|
}
|
|
2226
|
-
|
|
2276
|
+
return computePosition(this.eventTarget, this.host, {
|
|
2227
2277
|
placement: this.placement || 'top',
|
|
2228
2278
|
strategy: 'fixed',
|
|
2229
2279
|
middleware,
|
|
2230
2280
|
});
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
this.
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2281
|
+
}
|
|
2282
|
+
async updateSafeSpaceBoundaries(currentPlacement) {
|
|
2283
|
+
const targetRect = this.eventTarget.getBoundingClientRect();
|
|
2284
|
+
const popoverRect = this.host.getBoundingClientRect();
|
|
2285
|
+
const isVertical = currentPlacement === 'top' || currentPlacement === 'bottom';
|
|
2286
|
+
// Helper function to get positioning data based on placement
|
|
2287
|
+
const getPositioningData = (placement, popoverRect, targetRect) => {
|
|
2288
|
+
if (placement === 'top' || placement === 'bottom') {
|
|
2289
|
+
return {
|
|
2290
|
+
popover: {
|
|
2291
|
+
y: placement === 'top' ? popoverRect.bottom : popoverRect.top,
|
|
2292
|
+
xStart: popoverRect.left,
|
|
2293
|
+
xEnd: popoverRect.right,
|
|
2294
|
+
},
|
|
2295
|
+
trigger: {
|
|
2296
|
+
y: placement === 'top' ? targetRect.top : targetRect.bottom,
|
|
2297
|
+
xStart: targetRect.left,
|
|
2298
|
+
xEnd: targetRect.right,
|
|
2299
|
+
},
|
|
2300
|
+
};
|
|
2301
|
+
}
|
|
2302
|
+
else {
|
|
2303
|
+
// left or right
|
|
2304
|
+
return {
|
|
2305
|
+
popover: {
|
|
2306
|
+
x: placement === 'left' ? popoverRect.right : popoverRect.left,
|
|
2307
|
+
yStart: popoverRect.top,
|
|
2308
|
+
yEnd: popoverRect.bottom,
|
|
2309
|
+
},
|
|
2310
|
+
trigger: {
|
|
2311
|
+
x: placement === 'left' ? targetRect.left : targetRect.right,
|
|
2312
|
+
yStart: targetRect.top,
|
|
2313
|
+
yEnd: targetRect.bottom,
|
|
2314
|
+
},
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
};
|
|
2318
|
+
const posData = getPositioningData(currentPlacement, popoverRect, targetRect);
|
|
2319
|
+
// Clear previous values
|
|
2320
|
+
PostPopovercontainer.PROPERTIES_TO_CLEAR.forEach(prop => {
|
|
2321
|
+
this.host.style.removeProperty(prop);
|
|
2322
|
+
});
|
|
2323
|
+
if (isVertical) {
|
|
2324
|
+
// For top/bottom placement
|
|
2325
|
+
this.host.style.setProperty('--safe-space-popover-y', `${posData.popover.y}px`);
|
|
2326
|
+
this.host.style.setProperty('--safe-space-popover-x-start', `${posData.popover.xStart}px`);
|
|
2327
|
+
this.host.style.setProperty('--safe-space-popover-x-end', `${posData.popover.xEnd}px`);
|
|
2328
|
+
this.host.style.setProperty('--safe-space-trigger-y', `${posData.trigger.y}px`);
|
|
2329
|
+
this.host.style.setProperty('--safe-space-trigger-x-start', `${posData.trigger.xStart}px`);
|
|
2330
|
+
this.host.style.setProperty('--safe-space-trigger-x-end', `${posData.trigger.xEnd}px`);
|
|
2331
|
+
}
|
|
2332
|
+
else {
|
|
2333
|
+
// For left/right placement
|
|
2334
|
+
this.host.style.setProperty('--safe-space-popover-x', `${posData.popover.x}px`);
|
|
2335
|
+
this.host.style.setProperty('--safe-space-popover-y-start', `${posData.popover.yStart}px`);
|
|
2336
|
+
this.host.style.setProperty('--safe-space-popover-y-end', `${posData.popover.yEnd}px`);
|
|
2337
|
+
this.host.style.setProperty('--safe-space-trigger-x', `${posData.trigger.x}px`);
|
|
2338
|
+
this.host.style.setProperty('--safe-space-trigger-y-start', `${posData.trigger.yStart}px`);
|
|
2339
|
+
this.host.style.setProperty('--safe-space-trigger-y-end', `${posData.trigger.yEnd}px`);
|
|
2249
2340
|
}
|
|
2250
2341
|
}
|
|
2251
2342
|
render() {
|
|
2252
|
-
return (h(Host, { key: '
|
|
2343
|
+
return (h(Host, { key: '2d04c94fe2a6de0c0fe17c1e2dcb99481d13336b', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '3653be7880e5b896ae85e97ad709838732032f2d' }, this.arrow && (h("span", { key: '770f1727acf0ccb47e3940d034850df9fc3a6096', class: "arrow", ref: el => {
|
|
2253
2344
|
this.arrowRef = el;
|
|
2254
|
-
} })), h("slot", { key: '
|
|
2345
|
+
} })), h("slot", { key: 'b12e95d51accec79a08fda3970f3b46ba7147ed7' }))));
|
|
2255
2346
|
}
|
|
2256
2347
|
static get style() { return PostPopovercontainerStyle0; }
|
|
2257
2348
|
}, [4, "post-popovercontainer", {
|
|
@@ -2259,6 +2350,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2259
2350
|
"placement": [1],
|
|
2260
2351
|
"edgeGap": [2, "edge-gap"],
|
|
2261
2352
|
"arrow": [4],
|
|
2353
|
+
"safeSpace": [513, "safe-space"],
|
|
2262
2354
|
"show": [64],
|
|
2263
2355
|
"hide": [64],
|
|
2264
2356
|
"toggle": [64]
|
package/loaders/post-rating.js
CHANGED
|
@@ -85,7 +85,7 @@ const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends H
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: '4ccdf384b9a4cfc462d5d3f4a7caab659b6ba2b0', "data-version": version }, h("div", { key: '7ab53083bcdff6586b1de7f1c9e5fa546728fc6f', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
89
89
|
'star': true,
|
|
90
90
|
'before-hover': i < this.hoveredIndex,
|
|
91
91
|
'active': i < Math.round(this.currentRating),
|
|
@@ -3,7 +3,7 @@ import { v as version } from './package.js';
|
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
4
4
|
import { n as nanoid } from './index.browser.js';
|
|
5
5
|
|
|
6
|
-
const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:
|
|
6
|
+
const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}";
|
|
7
7
|
const PostTabHeaderStyle0 = postTabHeaderCss;
|
|
8
8
|
|
|
9
9
|
const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
|
|
@@ -22,7 +22,7 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
|
|
|
22
22
|
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '79e7eed336d8867b9741efb96f80c1a3b1910a3f', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '10f7977c4f26a41730d364c8e60b7a15b87bb45c' })));
|
|
26
26
|
}
|
|
27
27
|
static get watchers() { return {
|
|
28
28
|
"panel": ["validateFor"]
|
|
@@ -19,7 +19,7 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
19
19
|
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '8331ab54bda793a120dc467d8406cc0a02a5c480', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '7da6d67b69150a70ee290ad8ef9b95684ea3f83d' })));
|
|
23
23
|
}
|
|
24
24
|
static get style() { return PostTabPanelStyle0; }
|
|
25
25
|
}, [1, "post-tab-panel", {
|
package/loaders/post-tabs.js
CHANGED
|
@@ -172,7 +172,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
172
172
|
nextTab.focus();
|
|
173
173
|
}
|
|
174
174
|
render() {
|
|
175
|
-
return (h(Host, { key: '
|
|
175
|
+
return (h(Host, { key: 'dae24eee55a75f9b825f590883a9c1e896c1e9fc', "data-version": version }, h("div", { key: '0a26de80b8267ddc30455b0b5afbf10ae521232b', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '826cb0a4355eeb5ddc07288e1e68fc72785c095f', class: "tabs", role: "tablist" }, h("slot", { key: '94ce90bc3dc8ff4b5012fcfa3c0039b188c14002', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '462f80f3368431344910cc317f1c0f42112dc99a', class: "tab-content", part: "content" }, h("slot", { key: '57a80ac790ca75f3b62382994c21a3a3c78004cc', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
176
176
|
}
|
|
177
177
|
static get style() { return PostTabsStyle0; }
|
|
178
178
|
}, [1, "post-tabs", {
|
package/loaders/post-tag.js
CHANGED
|
@@ -36,7 +36,7 @@ const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEle
|
|
|
36
36
|
this.setClasses();
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '4ca273166b81099dd8fc0f69d3d38215e3d7ccbc', "data-version": version }, h("div", { key: 'b6c4eb6a3bf8cbaad18cf6277dab79bd6e350f0a', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '4f9e8cf6b2c723e31d60e30464c1106a9f72b5b4', class: "tag-text" }, h("slot", { key: '819a4e6ff743386f8d5d6b1d94dea9ee4a612784' })))));
|
|
40
40
|
}
|
|
41
41
|
static get watchers() { return {
|
|
42
42
|
"variant": ["variantChanged"],
|
|
@@ -33,7 +33,7 @@ const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutt
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: 'b8488abcad38f815ff6ccaef358bebee904512cd', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '6bc5745dca9c408c241ca1993a5d75ff94d3b444' })));
|
|
37
37
|
}
|
|
38
38
|
static get watchers() { return {
|
|
39
39
|
"toggled": ["validateToggled"]
|
package/loaders/post-tooltip.js
CHANGED
|
@@ -4773,7 +4773,7 @@ const isFocusable = /*@__PURE__*/getDefaultExportFromCjs(focusable.exports);
|
|
|
4773
4773
|
|
|
4774
4774
|
}(window, document));
|
|
4775
4775
|
|
|
4776
|
-
const postTooltipCss = "post-popovercontainer{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:calc(
|
|
4776
|
+
const postTooltipCss = "post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:calc(224px - var(--post-core-dimension-8));min-height:var(--post-core-dimension-16)}";
|
|
4777
4777
|
const PostTooltipStyle0 = postTooltipCss;
|
|
4778
4778
|
|
|
4779
4779
|
const OPEN_DELAY = 650; // matches HTML title delay
|
|
@@ -4991,7 +4991,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
4991
4991
|
}
|
|
4992
4992
|
render() {
|
|
4993
4993
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4994
|
-
return (h(Host, { key: '
|
|
4994
|
+
return (h(Host, { key: '170a2b1fe50a5080930fa2603a74ee310fd006dd', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'bd6658b278d53eff9bd93326bcadb467cbb318f4', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'b534b427a0511bc5971574b59e74d847a4b562a2' }))));
|
|
4995
4995
|
}
|
|
4996
4996
|
static get watchers() { return {
|
|
4997
4997
|
"delayed": ["validateDelayed"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.19",
|
|
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,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/dom": "1.6.13",
|
|
28
28
|
"@oddbird/popover-polyfill": "0.3.7",
|
|
29
|
-
"@swisspost/design-system-icons": "9.0.0-next.
|
|
30
|
-
"@swisspost/design-system-styles": "9.0.0-next.
|
|
29
|
+
"@swisspost/design-system-icons": "9.0.0-next.19",
|
|
30
|
+
"@swisspost/design-system-styles": "9.0.0-next.19",
|
|
31
31
|
"ally.js": "1.4.1",
|
|
32
32
|
"long-press-event": "2.5.0",
|
|
33
33
|
"nanoid": "5.0.9"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-5acef487.js');
|
|
4
|
-
const _package = require('./package-6000ba84.js');
|
|
5
|
-
|
|
6
|
-
const postLinkareaCss = ":host{display:contents;cursor:pointer}";
|
|
7
|
-
const PostLinkareaStyle0 = postLinkareaCss;
|
|
8
|
-
|
|
9
|
-
const PostLinkarea = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
get hostElement() { return index.getElement(this); }
|
|
14
|
-
handleClick = () => {
|
|
15
|
-
const customSlottedLink = this.hostElement.querySelector('a[data-link]');
|
|
16
|
-
const linkElement = customSlottedLink
|
|
17
|
-
? customSlottedLink
|
|
18
|
-
: this.hostElement.querySelector('a');
|
|
19
|
-
if (linkElement.href) {
|
|
20
|
-
window.location.href = linkElement.href;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
console.error('<post-linkarea> : Your element must contain a child with a `href` property.');
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
render() {
|
|
27
|
-
return (index.h(index.Host, { key: 'fd83dca8dca965d14f5a844454e79d7fb449639d', "data-version": _package.version, onClick: this.handleClick, tabindex: "0" }, index.h("slot", { key: '278537c9aabe710d118cdd6075ab506a8a4dcfe2' })));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
PostLinkarea.style = PostLinkareaStyle0;
|
|
31
|
-
|
|
32
|
-
exports.PostLinkarea = PostLinkarea;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
-
import { v as version } from './package-0d05729a.js';
|
|
3
|
-
|
|
4
|
-
const postLinkareaCss = ":host{display:contents;cursor:pointer}";
|
|
5
|
-
const PostLinkareaStyle0 = postLinkareaCss;
|
|
6
|
-
|
|
7
|
-
const PostLinkarea = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
}
|
|
11
|
-
get hostElement() { return getElement(this); }
|
|
12
|
-
handleClick = () => {
|
|
13
|
-
const customSlottedLink = this.hostElement.querySelector('a[data-link]');
|
|
14
|
-
const linkElement = customSlottedLink
|
|
15
|
-
? customSlottedLink
|
|
16
|
-
: this.hostElement.querySelector('a');
|
|
17
|
-
if (linkElement.href) {
|
|
18
|
-
window.location.href = linkElement.href;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
console.error('<post-linkarea> : Your element must contain a child with a `href` property.');
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
render() {
|
|
25
|
-
return (h(Host, { key: 'fd83dca8dca965d14f5a844454e79d7fb449639d', "data-version": version, onClick: this.handleClick, tabindex: "0" }, h("slot", { key: '278537c9aabe710d118cdd6075ab506a8a4dcfe2' })));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
PostLinkarea.style = PostLinkareaStyle0;
|
|
29
|
-
|
|
30
|
-
export { PostLinkarea as P };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_banner}from"./p-26951eb6.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-64e3de38.js";import"./p-fb8f5195.js";import"./p-440193f4.js";import"./p-bacd3e2c.js";import"./p-8562c7dc.js";import"./p-59373941.js";import"./p-5959f2bd.js";import"./p-b095519d.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_linkarea}from"./p-480169b9.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tabs}from"./p-77eb06d0.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-64e3de38.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_popover}from"./p-f2ed28e5.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-9748a355.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_accordion_item}from"./p-78ae731e.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-247a1668.js";import"./p-fb8f5195.js";import"./p-440193f4.js";import"./p-bacd3e2c.js";import"./p-8562c7dc.js";import"./p-59373941.js";import"./p-5959f2bd.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_avatar}from"./p-fa65c799.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-b095519d.js";import"./p-440193f4.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,g as t,h as a,H as o}from"./p-ff95dcd3.js";import{v as e}from"./p-f573860f.js";import{n as r}from"./p-5959f2bd.js";const i=class{constructor(t){s(this,t),this.panelId=void 0,this.name=void 0}get host(){return t(this)}componentWillLoad(){this.panelId=`panel-${this.host.id||r(6)}`}render(){return a(o,{key:"9d35c9ceec54f1c2983600342e5e63a49ca93aef","data-version":e,id:this.panelId,role:"tabpanel"},a("slot",{key:"8db185ca7a2030343df512962126a91f64840a64"}))}};i.style=":host{display:none}";export{i as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_footer}from"./p-f513fd5d.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as a,h as s,H as e}from"./p-ff95dcd3.js";import{v as o}from"./p-f573860f.js";const r=class{constructor(a){t(this,a)}get hostElement(){return a(this)}handleClick=()=>{const t=this.hostElement.querySelector("a[data-link]")||this.hostElement.querySelector("a");t.href?window.location.href=t.href:console.error("<post-linkarea> : Your element must contain a child with a `href` property.")};render(){return s(e,{key:"fd83dca8dca965d14f5a844454e79d7fb449639d","data-version":o,onClick:this.handleClick,tabindex:"0"},s("slot",{key:"278537c9aabe710d118cdd6075ab506a8a4dcfe2"}))}};r.style=":host{display:contents;cursor:pointer}";export{r as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function r(r,n){if("string"!=typeof r&&!(r instanceof URL))throw new Error(n);try{new URL(r,window.location.href)}catch{throw new Error(n)}}export{r as c}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,g as e,h as t,H as i}from"./p-ff95dcd3.js";import{v as a}from"./p-f573860f.js";import{H as c}from"./p-247a1668.js";import{c as r}from"./p-fb8f5195.js";import{n as s}from"./p-5959f2bd.js";const d=class{constructor(e){o(this,e),this.id=void 0,this.slottedLogo=void 0,this.collapsed=!1,this.headingLevel=void 0}collapsible;get host(){return e(this)}validateHeadingLevel(o=this.headingLevel){r(o,c,"The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.")}componentWillLoad(){this.id=this.host.id||`p${s(6)}`}componentDidLoad(){this.validateHeadingLevel()}onCollapseToggle(o){o.target===this.host&&"post-accordion-item"===o.target.localName&&(this.collapsed=!o.detail)}async toggle(o){return this.collapsible.toggle(o)}onSlotLogoChange(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}componentWillRender(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}render(){const o=this.host.closest("post-accordion")?.getAttribute("heading-level");return t(i,{key:"f1275370d7aff41e1fc60285395af35a1ecc90e7",id:this.id,"data-version":a},t("div",{key:"d74f762805143939a891e40cfa7a4779ea29921d",part:"accordion-item",class:"accordion-item"},t("post-collapsible-trigger",{key:"5ddad810d8b1f8564bdaaf2b09e9e89eee96e007",for:`${this.id}--collapse`},t(`h${o??this.headingLevel??2}`,{key:"fc6dc947d426bb31de04e83d8c9795a0c826733c",class:"accordion-header",id:`${this.id}--header`},t("button",{key:"bd8005bb87e8e00fee57794bd73c5f06cb642a3d",type:"button",class:"accordion-button"+(this.collapsed?" collapsed":""),part:"button"},t("span",{key:"89eb0b80e63867e2dcd6b27d95c6519d1e86b10d",class:{"logo-container":!0,"has-image":!!this.slottedLogo}},t("slot",{key:"0940530a15ce04b50af007db7f1530ae3c6a456d",name:"logo",onSlotchange:this.onSlotLogoChange.bind(this)})),t("slot",{key:"f06a6b067727be0667b4ea9384e75ee8aa435bfc",name:"header"}),t("post-icon",{key:"460b2c22083cc3049e0c83fc690cb44e3f984db7",name:"2051"})))),t("post-collapsible",{key:"2411f1f93d136ae0bfcbf0da9bb2902d7da0e2a0",id:`${this.id}--collapse`,collapsed:this.collapsed,ref:o=>this.collapsible=o},t("div",{key:"e648a76e35c28bc1aa5cc57233bf6e8277532294",class:"accordion-body",part:"body"},t("slot",{key:"7841fff45f2132990d8f1577dfe7d3707d1eb46c"})))))}static get watchers(){return{headingLevel:["validateHeadingLevel"]}}};d.style='.accordion-item::after{display:block;content:"";margin-top:calc(var(--post-device-border-width-default)*-1);border-bottom:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-item:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-item:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}.accordion-button::before{display:block;position:absolute;content:"";inset:0;bottom:auto;border-top:var(--post-accordion-button-border-top)}.accordion-button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}';export{d as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_breadcrumb}from"./p-c3135c18.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-59373941.js";import"./p-e1baac59.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tab_panel}from"./p-3fdd351e.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-5959f2bd.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_card_control}from"./p-faaa4c0a.js";import"./p-ff95dcd3.js";import"./p-bacd3e2c.js";import"./p-b095519d.js";import"./p-440193f4.js";import"./p-f573860f.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_back_to_top}from"./p-a2806a35.js";import"./p-ff95dcd3.js";import"./p-4af6dbed.js";import"./p-f573860f.js";import"./p-8562c7dc.js";import"./p-b095519d.js";import"./p-440193f4.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_collapsible,a as post_collapsible_trigger}from"./p-baf06ea0.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-fb8f5195.js";import"./p-440193f4.js";import"./p-bacd3e2c.js";import"./p-8562c7dc.js";import"./p-59373941.js";import"./p-b095519d.js";import"./p-e1baac59.js";import"./p-fc91cbc2.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tooltip}from"./p-7f09a864.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-9748a355.js";import"./p-fb8f5195.js";import"./p-440193f4.js";import"./p-bacd3e2c.js";import"./p-8562c7dc.js";import"./p-59373941.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as o,h as e,H as i}from"./p-ff95dcd3.js";import{s,a as r}from"./p-4af6dbed.js";import{v as a}from"./p-f573860f.js";import{c}from"./p-8562c7dc.js";import{c as n}from"./p-b095519d.js";const d=class{constructor(o){t(this,o),this.label=void 0,this.belowFold=!1}get el(){return o(this)}translateY;isBelowFold(){return window.scrollY>window.innerHeight}handleScroll=()=>{this.belowFold=this.isBelowFold()};watchBelowFold(t){t?s(this.el,this.translateY):r(this.el,this.translateY)}scrollToTop(){window.scrollTo({top:0})}validateLabel(){c(this.label,"string","The label property of the Back to Top component is required for accessibility purposes. Please ensure it is set."),n(this.label,"The label property of the Back to Top component must not be empty. Please provide a proper text for the label")}componentWillLoad(){this.belowFold=this.isBelowFold()}componentDidLoad(){window.addEventListener("scroll",this.handleScroll,!1),this.translateY=window.getComputedStyle(this.el).getPropertyValue("--post-floating-button-translate-y"),this.belowFold||(this.el.style.transform=`translateY(${this.translateY})`),this.belowFold&&s(this.el,this.translateY),this.validateLabel()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}render(){return e(i,{key:"c718f2e4cd8ee679cabf72cba7a493770fab2585","data-version":a},e("button",{key:"9573fafeb9f4a81b82331f82d42caede5bc8d625",class:"back-to-top","aria-hidden":this.belowFold?"false":"true",tabindex:this.belowFold?"0":"-1",onClick:this.scrollToTop},e("post-icon",{key:"7041105b5bb9dbea36999699c9d77d5eca272984","aria-hidden":"true",name:"3026"}),e("span",{key:"e8ad9cc2b468d304b01221da24e870b90701cb92",class:"visually-hidden"},this.label)))}static get watchers(){return{belowFold:["watchBelowFold"],label:["validateLabel"]}}};d.style=":host{--post-floating-button-translate-y:calc(-1 * var(--post-core-dimension-112));position:fixed;top:var(--post-device-position-1);right:var(--post-device-position-1)}:host .back-to-top{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;box-shadow:var(--post-device-elevation-300);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";export{d as P}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{P as post_tab_header}from"./p-16d20563.js";import"./p-ff95dcd3.js";import"./p-f573860f.js";import"./p-b095519d.js";import"./p-440193f4.js";import"./p-5959f2bd.js";
|