@swisspost/design-system-components 10.0.0-next.53 → 10.0.0-next.54
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/{package-CTyJAQzZ.js → package-CvZxvdTJ.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +1 -1
- package/dist/cjs/post-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/post-banner.cjs.entry.js +2 -2
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +1 -1
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +1 -1
- package/dist/cjs/post-closebutton_15.cjs.entry.js +58 -20
- package/dist/cjs/post-collapsible_2.cjs.entry.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +1 -1
- package/dist/cjs/post-linkarea.cjs.entry.js +1 -1
- package/dist/cjs/post-popover-trigger.cjs.entry.js +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +1 -1
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +4 -2
- package/dist/collection/components/post-menu/post-menu.js +7 -5
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +50 -12
- package/dist/components/package.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-megadropdown.js +4 -2
- package/dist/components/post-menu2.js +7 -5
- package/dist/components/post-popovercontainer2.js +46 -12
- package/dist/components/react/{p-vCHPi-c4.js → p-2U_BGLjc.js} +1 -1
- package/dist/components/react/{p-CEP4VRNR.js → p-BK474oMI.js} +1 -1
- package/dist/components/react/{p-DZ_1ljyU.js → p-BUxAs8N5.js} +1 -1
- package/dist/components/react/p-BXRsHuTS.js +3 -0
- package/dist/components/react/{p-CJocYMQ7.js → p-BfLuYwf7.js} +1 -1
- package/dist/components/react/{p-ClCCjdRt.js → p-Ccgu_WOx.js} +2 -2
- package/dist/components/react/{p-oXx3C5kr.js → p-D3CFjhAf.js} +2 -2
- package/dist/components/react/{p-DC1SzgZS.js → p-D4NSCxrX.js} +1 -1
- package/dist/components/react/{p-D_8kJXLe.js → p-DVxZMuPW.js} +1 -1
- package/dist/components/react/{p-RFewkSE5.js → p-Dj7qWba5.js} +4 -4
- package/dist/components/react/{p-ClNlUIJm.js → p-mENtrn2l.js} +47 -13
- package/dist/components/react/{p-BB-k_ccz.js → p-nSFSgY-P.js} +9 -7
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +2 -2
- package/dist/components/react/post-banner.js +2 -2
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +7 -7
- package/dist/components/react/post-card-control.js +2 -2
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-footer.js +6 -6
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-option.js +1 -1
- package/dist/components/react/post-language-switch.js +5 -5
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-list-item.js +1 -1
- package/dist/components/react/post-list.js +1 -1
- package/dist/components/react/post-logo.js +1 -1
- package/dist/components/react/post-mainnavigation.js +2 -2
- package/dist/components/react/post-megadropdown-trigger.js +1 -1
- package/dist/components/react/post-megadropdown.js +5 -3
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/post-popover-trigger.js +1 -1
- package/dist/components/react/post-popover.js +4 -4
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +2 -2
- package/dist/components/react/post-tab-header.js +1 -1
- package/dist/components/react/post-tab-panel.js +1 -1
- package/dist/components/react/post-tabs.js +1 -1
- package/dist/components/react/post-togglebutton.js +1 -1
- package/dist/components/react/post-tooltip-trigger.js +1 -1
- package/dist/components/react/post-tooltip.js +2 -2
- package/dist/docs.json +5 -1
- package/dist/esm/package-BXRsHuTS.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +1 -1
- package/dist/esm/post-avatar.entry.js +1 -1
- package/dist/esm/post-back-to-top.entry.js +1 -1
- package/dist/esm/post-banner.entry.js +2 -2
- package/dist/esm/post-breadcrumb-item_2.entry.js +1 -1
- package/dist/esm/post-breadcrumbs.entry.js +1 -1
- package/dist/esm/post-card-control.entry.js +1 -1
- package/dist/esm/post-closebutton_15.entry.js +58 -20
- package/dist/esm/post-collapsible_2.entry.js +1 -1
- package/dist/esm/post-footer.entry.js +1 -1
- package/dist/esm/post-linkarea.entry.js +1 -1
- package/dist/esm/post-popover-trigger.entry.js +1 -1
- package/dist/esm/post-popover.entry.js +1 -1
- package/dist/esm/post-rating.entry.js +1 -1
- package/dist/esm/post-tab-header.entry.js +1 -1
- package/dist/esm/post-tab-panel.entry.js +1 -1
- package/dist/esm/post-tabs.entry.js +1 -1
- package/dist/esm/post-tooltip-trigger.entry.js +1 -1
- package/dist/esm/post-tooltip.entry.js +1 -1
- package/dist/post-components/{p-ff13396a.entry.js → p-02ea3ec5.entry.js} +1 -1
- package/dist/post-components/{p-240d3470.entry.js → p-0e92dbef.entry.js} +1 -1
- package/dist/post-components/{p-43ea9ba0.entry.js → p-0ec2bdd7.entry.js} +1 -1
- package/dist/post-components/{p-b3bc89ad.entry.js → p-11c204e0.entry.js} +1 -1
- package/dist/post-components/{p-ce396597.entry.js → p-197a0f25.entry.js} +1 -1
- package/dist/post-components/{p-f1a6e07a.entry.js → p-261b1452.entry.js} +1 -1
- package/dist/post-components/{p-6b73114c.entry.js → p-3274ab81.entry.js} +1 -1
- package/dist/post-components/{p-f4aac83e.entry.js → p-658b1ccc.entry.js} +1 -1
- package/dist/post-components/{p-ac1f1ebb.entry.js → p-77e43032.entry.js} +1 -1
- package/dist/post-components/{p-3f9554e1.entry.js → p-8f0fc02a.entry.js} +1 -1
- package/dist/post-components/{p-6de34182.entry.js → p-96750e25.entry.js} +1 -1
- package/dist/post-components/p-BXRsHuTS.js +1 -0
- package/dist/post-components/p-b5b5e4b9.entry.js +1 -0
- package/dist/post-components/p-b8059ba1.entry.js +1 -0
- package/dist/post-components/{p-4d84bb4a.entry.js → p-bf41fe56.entry.js} +1 -1
- package/dist/post-components/{p-be376a2b.entry.js → p-d6134e24.entry.js} +1 -1
- package/dist/post-components/p-e7029b9e.entry.js +1 -0
- package/dist/post-components/{p-d288a9b1.entry.js → p-e90688ab.entry.js} +1 -1
- package/dist/post-components/{p-efdaa2ad.entry.js → p-ea5da614.entry.js} +1 -1
- package/dist/post-components/{p-5a9885dd.entry.js → p-f1b815b6.entry.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +5 -0
- package/hydrate/index.js +59 -21
- package/hydrate/index.mjs +59 -21
- package/package.json +4 -4
- package/dist/components/react/p-DeqIcjvO.js +0 -3
- package/dist/esm/package-DeqIcjvO.js +0 -3
- package/dist/post-components/p-5450bd15.entry.js +0 -1
- package/dist/post-components/p-5b53b042.entry.js +0 -1
- package/dist/post-components/p-87d9de40.entry.js +0 -1
- package/dist/post-components/p-DeqIcjvO.js +0 -1
|
@@ -62,7 +62,9 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
62
62
|
if (PostMegadropdown.activeDropdown === this) {
|
|
63
63
|
PostMegadropdown.activeDropdown = null;
|
|
64
64
|
}
|
|
65
|
-
this.defaultSlotObserver
|
|
65
|
+
if (this.defaultSlotObserver) {
|
|
66
|
+
this.defaultSlotObserver.disconnect();
|
|
67
|
+
}
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
70
|
* Toggles the dropdown visibility based on its current state.
|
|
@@ -229,7 +231,7 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
229
231
|
}
|
|
230
232
|
render() {
|
|
231
233
|
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
232
|
-
return (h(Host, { key: '
|
|
234
|
+
return (h(Host, { key: 'd111d8d93a9b64018f3df88813da8f6d1c65759e', version: version }, h("div", { key: 'd7cb2b98624c9241108bc66cc11c15c0a2e7acf3', class: `megadropdown-container ${this.animationClass || ''}`, style: containerStyle, onAnimationEnd: () => this.handleAnimationEnd() }, h("div", { key: '9f0280b6f28f19ee7f9ba4707209b64b38759927', class: "megadropdown" }, h("slot", { key: '71f2521e1ab13406dd986c18a7c52e171148b0b0', name: "megadropdown-title" }), h("slot", { key: '148de1446aade76b074e155d07b70e775fc9612c', name: "megadropdown-overview-link" }), h("div", { key: '269c1e1db66acb7c274c720a9f715d29e875ef54', class: "megadropdown-content" }, h("slot", { key: '444040337c57e64bcc57f56415c4c40513ef0a5b' })), h("div", { key: 'f97d8c578ee19b5ba7d593e5d110e3b283255087', onClick: () => this.hide(true), class: "back-button" }, h("slot", { key: 'dc04da3a42714e2e8742ab8ed25bcc288a236294', name: "back-button" })), h("div", { key: '354eca51a5aef76d483a30e595bedfa95792d7ce', onClick: () => this.hide(true), class: "close-button" }, h("slot", { key: '28693622360c0da91f3051426be545852c5ec337', name: "close-button" }))))));
|
|
233
235
|
}
|
|
234
236
|
get host() { return this; }
|
|
235
237
|
static get style() { return postMegadropdownCss; }
|
|
@@ -76,10 +76,12 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
76
76
|
this.toggleMenu.emit(this.isVisible);
|
|
77
77
|
if (this.isVisible) {
|
|
78
78
|
this.lastFocusedElement = this.root?.activeElement;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
menuItems
|
|
82
|
-
|
|
79
|
+
requestAnimationFrame(() => {
|
|
80
|
+
const menuItems = this.getSlottedItems();
|
|
81
|
+
if (menuItems.length > 0) {
|
|
82
|
+
menuItems[0].focus();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
83
85
|
}
|
|
84
86
|
else if (this.lastFocusedElement) {
|
|
85
87
|
this.lastFocusedElement.focus();
|
|
@@ -193,7 +195,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
193
195
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
194
196
|
}
|
|
195
197
|
render() {
|
|
196
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: 'eef3d3cdf2553c2627ddf580a95c70f00c02d388', "data-version": version }, h("post-popovercontainer", { key: '27c3341bec9d4ee98b59f70e902913f03954c32c', onPostShow: this.handlePostShown, onPostToggle: this.handlePostToggled, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'ef6c0ab8b6de380c23f6562a3d0ba34d9eaace98', part: "menu" }, h("slot", { key: 'edca1d3e9ab11d016ba18baf9f8d6aa65bb71958', name: "header" }), h("slot", { key: '40596847f9bac957a5992364997f0bcd8fd6a704' })))));
|
|
197
199
|
}
|
|
198
200
|
get host() { return this; }
|
|
199
201
|
static get watchers() { return {
|
|
@@ -2773,6 +2773,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2773
2773
|
* Whether or not the popovercontainer should close when user clicks outside of it
|
|
2774
2774
|
*/
|
|
2775
2775
|
this.manualClose = false;
|
|
2776
|
+
this.currentAnimation = null;
|
|
2776
2777
|
}
|
|
2777
2778
|
validatePlacement() {
|
|
2778
2779
|
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
@@ -2814,8 +2815,6 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2814
2815
|
if (this.toggleTimeoutId)
|
|
2815
2816
|
return;
|
|
2816
2817
|
this.eventTarget = target;
|
|
2817
|
-
if (this.toggleTimeoutId)
|
|
2818
|
-
return;
|
|
2819
2818
|
this.calculatePosition();
|
|
2820
2819
|
this.host.showPopover();
|
|
2821
2820
|
}
|
|
@@ -2826,17 +2825,19 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2826
2825
|
const content = this.host.querySelector('.popover-content');
|
|
2827
2826
|
this.startAutoupdates();
|
|
2828
2827
|
if (content) {
|
|
2829
|
-
|
|
2830
|
-
if (animation
|
|
2828
|
+
// Only run animation and emit related events if animation is defined
|
|
2829
|
+
if (this.animation === null) {
|
|
2830
|
+
// No animation case
|
|
2831
2831
|
this.postBeforeToggle.emit({ willOpen: true });
|
|
2832
2832
|
this.postBeforeShow.emit({ first: this.hasOpenedOnce });
|
|
2833
|
-
}
|
|
2834
|
-
animation?.finished.then(() => {
|
|
2835
2833
|
this.postToggle.emit({ isOpen: true });
|
|
2836
2834
|
this.postShow.emit({ first: this.hasOpenedOnce });
|
|
2837
2835
|
if (this.hasOpenedOnce)
|
|
2838
2836
|
this.hasOpenedOnce = false;
|
|
2839
|
-
}
|
|
2837
|
+
}
|
|
2838
|
+
else {
|
|
2839
|
+
this.runOpenAnimation(content);
|
|
2840
|
+
}
|
|
2840
2841
|
}
|
|
2841
2842
|
if (this.safeSpace) {
|
|
2842
2843
|
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
@@ -2852,17 +2853,50 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2852
2853
|
if (this.safeSpace) {
|
|
2853
2854
|
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2854
2855
|
}
|
|
2856
|
+
// Cancel any running animation
|
|
2857
|
+
if (this.animation !== null && this.currentAnimation) {
|
|
2858
|
+
this.currentAnimation.cancel();
|
|
2859
|
+
this.currentAnimation = null;
|
|
2860
|
+
}
|
|
2861
|
+
this.postBeforeToggle.emit({ willOpen: false });
|
|
2855
2862
|
this.postToggle.emit({ isOpen: false });
|
|
2856
2863
|
this.postHide.emit();
|
|
2857
2864
|
}
|
|
2865
|
+
/**
|
|
2866
|
+
* Runs the animation and emits the toggle/show/hide events in the correct timing
|
|
2867
|
+
*/
|
|
2868
|
+
async runOpenAnimation(element) {
|
|
2869
|
+
let animation;
|
|
2870
|
+
try {
|
|
2871
|
+
animation = popIn(element);
|
|
2872
|
+
this.currentAnimation = animation;
|
|
2873
|
+
if (animation.playState === 'running') {
|
|
2874
|
+
this.postBeforeToggle.emit({ willOpen: true });
|
|
2875
|
+
this.postBeforeShow.emit({ first: this.hasOpenedOnce });
|
|
2876
|
+
}
|
|
2877
|
+
await animation.finished;
|
|
2878
|
+
this.postToggle.emit({ isOpen: true });
|
|
2879
|
+
this.postShow.emit({ first: this.hasOpenedOnce });
|
|
2880
|
+
this.hasOpenedOnce = true;
|
|
2881
|
+
}
|
|
2882
|
+
catch (err) {
|
|
2883
|
+
console.warn('Animation failed or was interrupted:', err);
|
|
2884
|
+
// Reset all states to closing
|
|
2885
|
+
this.postBeforeToggle.emit({ willOpen: false });
|
|
2886
|
+
this.postBeforeShow.emit({ first: this.hasOpenedOnce });
|
|
2887
|
+
this.postToggle.emit({ isOpen: false });
|
|
2888
|
+
}
|
|
2889
|
+
finally {
|
|
2890
|
+
if (this.currentAnimation === animation) {
|
|
2891
|
+
this.currentAnimation = null;
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2858
2895
|
/**
|
|
2859
2896
|
* Programmatically hide the popovercontainer
|
|
2860
2897
|
*/
|
|
2861
2898
|
async hide() {
|
|
2862
2899
|
if (!this.toggleTimeoutId) {
|
|
2863
|
-
if (this.eventTarget && this.eventTarget instanceof HTMLElement$1) {
|
|
2864
|
-
this.eventTarget.focus();
|
|
2865
|
-
}
|
|
2866
2900
|
this.eventTarget = null;
|
|
2867
2901
|
this.host.hidePopover();
|
|
2868
2902
|
this.postHide.emit();
|
|
@@ -3028,9 +3062,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
3028
3062
|
}
|
|
3029
3063
|
}
|
|
3030
3064
|
render() {
|
|
3031
|
-
return (h(Host, { key: '
|
|
3065
|
+
return (h(Host, { key: 'ec57bb478a7fe7d6449ef1ed4d91db4d0835ea4e', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '2969b3c6ef9441d06b9c913f47bb64e84006dbe4', class: "popover-content" }, this.arrow && (h("span", { key: '03b8addd0bee91d9358e9554f2d507b9a349e0db', class: "arrow", ref: el => {
|
|
3032
3066
|
this.arrowRef = el;
|
|
3033
|
-
} })), h("slot", { key: '
|
|
3067
|
+
} })), h("slot", { key: '2fb25dce5ea9e5f1044cde4839df61af34c8b667' }))));
|
|
3034
3068
|
}
|
|
3035
3069
|
get host() { return this; }
|
|
3036
3070
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
2
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
3
3
|
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
|
-
import { v as version } from './p-
|
|
4
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
5
5
|
|
|
6
6
|
const postIconCss = ":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)}}";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
|
|
4
4
|
const postMenuItemCss = "post-menu-item button{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){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
4
4
|
import { e as checkEmptyOrType } from './p-CV7fm1rW.js';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { a as checkEmptyOrUrl } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-2U_BGLjc.js';
|
|
6
6
|
|
|
7
7
|
const postBreadcrumbItemCss = ":host{display:flex;align-items:center;justify-content:start;gap:var(--post-device-spacing-gap-inline-5)}:host post-icon{box-sizing:border-box;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}.breadcrumb-item{white-space:nowrap;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item{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}.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item: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){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}";
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-2U_BGLjc.js';
|
|
6
6
|
|
|
7
7
|
const BUTTON_TYPES = ['button', 'submit', 'reset'];
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
4
|
import { b as checkRequiredAndOneOf } from './p-CV7fm1rW.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
4
|
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
6
6
|
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
7
7
|
import { n as nanoid } from './p-BLchVpF6.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './p-
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
10
|
-
import { d as defineCustomElement$1 } from './p-
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-BfLuYwf7.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-D4NSCxrX.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-2U_BGLjc.js';
|
|
11
11
|
|
|
12
12
|
const postAccordionItemCss = ".accordion-item::after{display:block;content:\"\";margin-block-start:calc(var(--post-device-border-width-default)*-1);border-block-end: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-extra-black)}.accordion-button{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;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}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;inset-block-end:auto;border-block-start-width:var(--post-device-border-width-default);border-block-start-style:var(--post-core-border-style-solid);border-block-start-color:var(--post-scheme-color-interactive-primary-enabled-stroke)}.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}";
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
2
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
3
3
|
import { d as checkEmptyOrOneOf, e as checkEmptyOrType } from './p-CV7fm1rW.js';
|
|
4
|
-
import { v as version } from './p-
|
|
4
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
5
5
|
|
|
6
6
|
const PLACEMENT_TYPES = [
|
|
7
7
|
'top',
|
|
@@ -2773,6 +2773,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2773
2773
|
* Whether or not the popovercontainer should close when user clicks outside of it
|
|
2774
2774
|
*/
|
|
2775
2775
|
this.manualClose = false;
|
|
2776
|
+
this.currentAnimation = null;
|
|
2776
2777
|
}
|
|
2777
2778
|
validatePlacement() {
|
|
2778
2779
|
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
@@ -2814,8 +2815,6 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2814
2815
|
if (this.toggleTimeoutId)
|
|
2815
2816
|
return;
|
|
2816
2817
|
this.eventTarget = target;
|
|
2817
|
-
if (this.toggleTimeoutId)
|
|
2818
|
-
return;
|
|
2819
2818
|
this.calculatePosition();
|
|
2820
2819
|
this.host.showPopover();
|
|
2821
2820
|
}
|
|
@@ -2826,17 +2825,19 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2826
2825
|
const content = this.host.querySelector('.popover-content');
|
|
2827
2826
|
this.startAutoupdates();
|
|
2828
2827
|
if (content) {
|
|
2829
|
-
|
|
2830
|
-
if (animation
|
|
2828
|
+
// Only run animation and emit related events if animation is defined
|
|
2829
|
+
if (this.animation === null) {
|
|
2830
|
+
// No animation case
|
|
2831
2831
|
this.postBeforeToggle.emit({ willOpen: true });
|
|
2832
2832
|
this.postBeforeShow.emit({ first: this.hasOpenedOnce });
|
|
2833
|
-
}
|
|
2834
|
-
animation?.finished.then(() => {
|
|
2835
2833
|
this.postToggle.emit({ isOpen: true });
|
|
2836
2834
|
this.postShow.emit({ first: this.hasOpenedOnce });
|
|
2837
2835
|
if (this.hasOpenedOnce)
|
|
2838
2836
|
this.hasOpenedOnce = false;
|
|
2839
|
-
}
|
|
2837
|
+
}
|
|
2838
|
+
else {
|
|
2839
|
+
this.runOpenAnimation(content);
|
|
2840
|
+
}
|
|
2840
2841
|
}
|
|
2841
2842
|
if (this.safeSpace) {
|
|
2842
2843
|
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
@@ -2852,17 +2853,50 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2852
2853
|
if (this.safeSpace) {
|
|
2853
2854
|
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2854
2855
|
}
|
|
2856
|
+
// Cancel any running animation
|
|
2857
|
+
if (this.animation !== null && this.currentAnimation) {
|
|
2858
|
+
this.currentAnimation.cancel();
|
|
2859
|
+
this.currentAnimation = null;
|
|
2860
|
+
}
|
|
2861
|
+
this.postBeforeToggle.emit({ willOpen: false });
|
|
2855
2862
|
this.postToggle.emit({ isOpen: false });
|
|
2856
2863
|
this.postHide.emit();
|
|
2857
2864
|
}
|
|
2865
|
+
/**
|
|
2866
|
+
* Runs the animation and emits the toggle/show/hide events in the correct timing
|
|
2867
|
+
*/
|
|
2868
|
+
async runOpenAnimation(element) {
|
|
2869
|
+
let animation;
|
|
2870
|
+
try {
|
|
2871
|
+
animation = popIn(element);
|
|
2872
|
+
this.currentAnimation = animation;
|
|
2873
|
+
if (animation.playState === 'running') {
|
|
2874
|
+
this.postBeforeToggle.emit({ willOpen: true });
|
|
2875
|
+
this.postBeforeShow.emit({ first: this.hasOpenedOnce });
|
|
2876
|
+
}
|
|
2877
|
+
await animation.finished;
|
|
2878
|
+
this.postToggle.emit({ isOpen: true });
|
|
2879
|
+
this.postShow.emit({ first: this.hasOpenedOnce });
|
|
2880
|
+
this.hasOpenedOnce = true;
|
|
2881
|
+
}
|
|
2882
|
+
catch (err) {
|
|
2883
|
+
console.warn('Animation failed or was interrupted:', err);
|
|
2884
|
+
// Reset all states to closing
|
|
2885
|
+
this.postBeforeToggle.emit({ willOpen: false });
|
|
2886
|
+
this.postBeforeShow.emit({ first: this.hasOpenedOnce });
|
|
2887
|
+
this.postToggle.emit({ isOpen: false });
|
|
2888
|
+
}
|
|
2889
|
+
finally {
|
|
2890
|
+
if (this.currentAnimation === animation) {
|
|
2891
|
+
this.currentAnimation = null;
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2858
2895
|
/**
|
|
2859
2896
|
* Programmatically hide the popovercontainer
|
|
2860
2897
|
*/
|
|
2861
2898
|
async hide() {
|
|
2862
2899
|
if (!this.toggleTimeoutId) {
|
|
2863
|
-
if (this.eventTarget && this.eventTarget instanceof H) {
|
|
2864
|
-
this.eventTarget.focus();
|
|
2865
|
-
}
|
|
2866
2900
|
this.eventTarget = null;
|
|
2867
2901
|
this.host.hidePopover();
|
|
2868
2902
|
this.postHide.emit();
|
|
@@ -3028,9 +3062,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
3028
3062
|
}
|
|
3029
3063
|
}
|
|
3030
3064
|
render() {
|
|
3031
|
-
return (h(Host, { key: '
|
|
3065
|
+
return (h(Host, { key: 'ec57bb478a7fe7d6449ef1ed4d91db4d0835ea4e', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '2969b3c6ef9441d06b9c913f47bb64e84006dbe4', class: "popover-content" }, this.arrow && (h("span", { key: '03b8addd0bee91d9358e9554f2d507b9a349e0db', class: "arrow", ref: el => {
|
|
3032
3066
|
this.arrowRef = el;
|
|
3033
|
-
} })), h("slot", { key: '
|
|
3067
|
+
} })), h("slot", { key: '2fb25dce5ea9e5f1044cde4839df61af34c8b667' }))));
|
|
3034
3068
|
}
|
|
3035
3069
|
get host() { return this; }
|
|
3036
3070
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-
|
|
3
|
-
import { v as version } from './p-
|
|
2
|
+
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-mENtrn2l.js';
|
|
3
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
4
4
|
import { g as getFocusableChildren } from './p-BVXiQdHq.js';
|
|
5
5
|
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
6
6
|
import './p-CJ80BZ06.js';
|
|
@@ -76,10 +76,12 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
76
76
|
this.toggleMenu.emit(this.isVisible);
|
|
77
77
|
if (this.isVisible) {
|
|
78
78
|
this.lastFocusedElement = this.root?.activeElement;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
menuItems
|
|
82
|
-
|
|
79
|
+
requestAnimationFrame(() => {
|
|
80
|
+
const menuItems = this.getSlottedItems();
|
|
81
|
+
if (menuItems.length > 0) {
|
|
82
|
+
menuItems[0].focus();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
83
85
|
}
|
|
84
86
|
else if (this.lastFocusedElement) {
|
|
85
87
|
this.lastFocusedElement.focus();
|
|
@@ -193,7 +195,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
193
195
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
194
196
|
}
|
|
195
197
|
render() {
|
|
196
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: 'eef3d3cdf2553c2627ddf580a95c70f00c02d388', "data-version": version }, h("post-popovercontainer", { key: '27c3341bec9d4ee98b59f70e902913f03954c32c', onPostShow: this.handlePostShown, onPostToggle: this.handlePostToggled, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'ef6c0ab8b6de380c23f6562a3d0ba34d9eaace98', part: "menu" }, h("slot", { key: 'edca1d3e9ab11d016ba18baf9f8d6aa65bb71958', name: "header" }), h("slot", { key: '40596847f9bac957a5992364997f0bcd8fd6a704' })))));
|
|
197
199
|
}
|
|
198
200
|
get host() { return this; }
|
|
199
201
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-Dj7qWba5.js';
|
|
2
2
|
|
|
3
3
|
const PostAccordionItem = PostAccordionItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { c as checkRequiredAndType, e as checkEmptyOrType, f as checkEmptyOrPattern } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-BXRsHuTS.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-2U_BGLjc.js';
|
|
6
6
|
|
|
7
7
|
// Define common animation options
|
|
8
8
|
const easing = 'ease';
|