@swisspost/design-system-components 10.0.0-next.53 → 10.0.0-next.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-Cb8CTrOz.js → index-B4gYpuJF.js} +9 -1
- package/dist/cjs/{index-DtvYdwe1.js → index-UFKR6Ok0.js} +2 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-CTyJAQzZ.js → package-DkJrv93P.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +4 -4
- package/dist/cjs/post-avatar.cjs.entry.js +4 -4
- package/dist/cjs/post-back-to-top.cjs.entry.js +3 -3
- package/dist/cjs/post-banner.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +5 -5
- package/dist/cjs/post-card-control.cjs.entry.js +5 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +158 -87
- package/dist/cjs/post-collapsible_2.cjs.entry.js +10 -9
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer.cjs.entry.js +4 -4
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/post-popover-trigger.cjs.entry.js +4 -4
- package/dist/cjs/post-popover.cjs.entry.js +5 -5
- package/dist/cjs/post-rating.cjs.entry.js +4 -4
- package/dist/cjs/post-stepper-item.cjs.entry.js +18 -0
- package/dist/cjs/post-stepper.cjs.entry.js +106 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -4
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +4 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/post-accordion/post-accordion.js +2 -2
- package/dist/collection/components/post-avatar/post-avatar.css +1 -1
- package/dist/collection/components/post-banner/post-banner.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +6 -6
- package/dist/collection/components/post-card-control/post-card-control.js +3 -3
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +6 -5
- package/dist/collection/components/post-footer/post-footer.js +2 -2
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +104 -54
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- 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 +2 -2
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-list/post-list.js +1 -1
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +5 -3
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +2 -2
- package/dist/collection/components/post-menu/post-menu.js +8 -6
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +2 -2
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +50 -12
- package/dist/collection/components/post-rating/post-rating.js +2 -2
- package/dist/collection/components/post-stepper/post-stepper.css +1 -0
- package/dist/collection/components/post-stepper/post-stepper.js +204 -0
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +7 -0
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +18 -0
- 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-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/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/component-names.json +2 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.js +2 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion2.js +2 -2
- package/dist/components/post-avatar.js +2 -2
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumbs.js +7 -7
- package/dist/components/post-card-control.js +3 -3
- package/dist/components/post-collapsible-trigger2.js +9 -8
- package/dist/components/post-footer.js +2 -2
- package/dist/components/post-header.js +89 -54
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-language-option.js +3 -3
- package/dist/components/post-language-switch.js +3 -3
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-list-item.js +1 -1
- package/dist/components/post-list.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +2 -2
- package/dist/components/post-megadropdown-trigger.js +3 -3
- package/dist/components/post-megadropdown.js +6 -4
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +8 -6
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +3 -3
- package/dist/components/post-popovercontainer2.js +46 -12
- package/dist/components/post-rating.js +2 -2
- package/dist/components/post-stepper-item.d.ts +11 -0
- package/dist/components/post-stepper-item.js +33 -0
- package/dist/components/post-stepper.d.ts +11 -0
- package/dist/components/post-stepper.js +134 -0
- package/dist/components/post-tab-header.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +2 -2
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/p-BhxZzOEC.js +3 -0
- package/dist/components/react/{p-BB-k_ccz.js → p-CSAMO7iJ.js} +11 -9
- package/dist/components/react/{p-CV7fm1rW.js → p-CYkf_7Y5.js} +2 -1
- package/dist/components/react/{p-CJocYMQ7.js → p-Ccrl2AQn.js} +2 -2
- package/dist/components/react/{p-D_8kJXLe.js → p-CewRvBtg.js} +4 -4
- package/dist/components/react/{p-DZ_1ljyU.js → p-Cwiv86_f.js} +3 -3
- package/dist/components/react/{p-CEP4VRNR.js → p-D2waO0Zc.js} +2 -2
- package/dist/components/react/{p-vCHPi-c4.js → p-DBPOV12C.js} +3 -3
- package/dist/components/react/{p-ClNlUIJm.js → p-DVGEExot.js} +48 -14
- package/dist/components/react/{p-ClCCjdRt.js → p-Djvj8fd2.js} +3 -3
- package/dist/components/react/{p-DC1SzgZS.js → p-LtiDhYis.js} +11 -10
- package/dist/components/react/{p-oXx3C5kr.js → p-XrZzCOKT.js} +3 -3
- package/dist/components/react/{p-RFewkSE5.js → p-v3pOrMNQ.js} +5 -5
- 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 +3 -3
- package/dist/components/react/post-back-to-top.js +3 -3
- package/dist/components/react/post-banner.js +3 -3
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +14 -14
- package/dist/components/react/post-card-control.js +6 -6
- 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 +9 -9
- package/dist/components/react/post-header.js +90 -55
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-option.js +5 -5
- package/dist/components/react/post-language-switch.js +9 -9
- package/dist/components/react/post-linkarea.js +2 -2
- package/dist/components/react/post-list-item.js +2 -2
- package/dist/components/react/post-list.js +2 -2
- package/dist/components/react/post-logo.js +3 -3
- package/dist/components/react/post-mainnavigation.js +4 -4
- package/dist/components/react/post-megadropdown-trigger.js +5 -5
- package/dist/components/react/post-megadropdown.js +7 -5
- 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 +3 -3
- package/dist/components/react/post-popover.js +8 -8
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +5 -5
- package/dist/components/react/post-stepper-item.d.ts +11 -0
- package/dist/components/react/post-stepper-item.js +34 -0
- package/dist/components/react/post-stepper.d.ts +11 -0
- package/dist/components/react/post-stepper.js +135 -0
- package/dist/components/react/post-tab-header.js +3 -3
- package/dist/components/react/post-tab-panel.js +3 -3
- package/dist/components/react/post-tabs.js +2 -2
- package/dist/components/react/post-togglebutton.js +2 -2
- package/dist/components/react/post-tooltip-trigger.js +3 -3
- package/dist/components/react/post-tooltip.js +5 -5
- package/dist/docs.json +179 -27
- package/dist/esm/{index-VmK3ABCB.js → index-Beaz8wEe.js} +2 -1
- package/dist/esm/{index-CFNKgUjL.js → index-wEFJ-c34.js} +9 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-BhxZzOEC.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +4 -4
- package/dist/esm/post-avatar.entry.js +4 -4
- package/dist/esm/post-back-to-top.entry.js +3 -3
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -4
- package/dist/esm/post-breadcrumbs.entry.js +5 -5
- package/dist/esm/post-card-control.entry.js +5 -5
- package/dist/esm/post-closebutton_15.entry.js +158 -87
- package/dist/esm/post-collapsible_2.entry.js +10 -9
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer.entry.js +4 -4
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/post-popover-trigger.entry.js +4 -4
- package/dist/esm/post-popover.entry.js +5 -5
- package/dist/esm/post-rating.entry.js +4 -4
- package/dist/esm/post-stepper-item.entry.js +16 -0
- package/dist/esm/post-stepper.entry.js +104 -0
- package/dist/esm/post-tab-header.entry.js +4 -4
- package/dist/esm/post-tab-panel.entry.js +4 -4
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tooltip-trigger.entry.js +4 -4
- package/dist/esm/post-tooltip.entry.js +5 -5
- package/dist/post-components/p-01e678c9.entry.js +1 -0
- package/dist/post-components/p-034a453f.entry.js +1 -0
- package/dist/post-components/p-15a4cdbf.entry.js +1 -0
- package/dist/post-components/p-24dc54d1.entry.js +1 -0
- package/dist/post-components/p-2a2030bf.entry.js +1 -0
- package/dist/post-components/p-2ed84cc3.entry.js +1 -0
- package/dist/post-components/{p-ac1f1ebb.entry.js → p-3228968f.entry.js} +1 -1
- package/dist/post-components/p-3c01ddfe.entry.js +1 -0
- package/dist/post-components/{p-f1a6e07a.entry.js → p-57288cb2.entry.js} +1 -1
- package/dist/post-components/{p-240d3470.entry.js → p-748b1f01.entry.js} +1 -1
- package/dist/post-components/{p-43ea9ba0.entry.js → p-7745e46e.entry.js} +1 -1
- package/dist/post-components/{p-3f9554e1.entry.js → p-7f635728.entry.js} +1 -1
- package/dist/post-components/p-82c178a3.entry.js +1 -0
- package/dist/post-components/p-9b5f8319.entry.js +1 -0
- package/dist/post-components/p-Beaz8wEe.js +1 -0
- package/dist/post-components/p-BhxZzOEC.js +1 -0
- package/dist/post-components/{p-6de34182.entry.js → p-a9644e54.entry.js} +1 -1
- package/dist/post-components/{p-f4aac83e.entry.js → p-af030a3a.entry.js} +1 -1
- package/dist/post-components/{p-d288a9b1.entry.js → p-b8ba8139.entry.js} +1 -1
- package/dist/post-components/{p-4d84bb4a.entry.js → p-cd03e6f2.entry.js} +1 -1
- package/dist/post-components/{p-ff13396a.entry.js → p-db935e8e.entry.js} +1 -1
- package/dist/post-components/{p-b3bc89ad.entry.js → p-e62e1f57.entry.js} +1 -1
- package/dist/post-components/{p-5a9885dd.entry.js → p-fb4b1641.entry.js} +1 -1
- package/dist/post-components/p-wEFJ-c34.js +2 -0
- package/dist/post-components/post-components.css +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +1 -0
- package/dist/types/components/post-header/post-header.d.ts +15 -11
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +5 -0
- package/dist/types/components/post-stepper/post-stepper.d.ts +38 -0
- package/dist/types/components/post-stepper-item/post-stepper-item.d.ts +3 -0
- package/dist/types/components.d.ts +62 -2
- package/hydrate/index.js +349 -139
- package/hydrate/index.mjs +349 -139
- package/package.json +7 -8
- 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-6b73114c.entry.js +0 -1
- package/dist/post-components/p-87d9de40.entry.js +0 -1
- package/dist/post-components/p-CFNKgUjL.js +0 -2
- package/dist/post-components/p-DeqIcjvO.js +0 -1
- package/dist/post-components/p-VmK3ABCB.js +0 -1
- package/dist/post-components/p-be376a2b.entry.js +0 -1
- package/dist/post-components/p-ce396597.entry.js +0 -1
- package/dist/post-components/p-efdaa2ad.entry.js +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkRequiredAndType, f as checkRequiredAndPattern } from './index2.js';
|
|
4
|
+
import './breakpoints.js';
|
|
5
|
+
|
|
6
|
+
const postStepperCss = "ol{margin-block:0;padding-inline-start:0;list-style:none;counter-reset:step-index;display:grid;position:relative;overflow:hidden;grid-template-columns:20px;grid-auto-columns:minmax(0, 1fr);padding-inline-end:20px}@media screen and (max-width: 779.98px){ol{display:flex;padding-inline-end:0}}.active-step{font-size:var(--post-device-font-size-7);font-weight:var(--post-device-font-weight-bold);color:var(--post-scheme-color-interactive-primary-enabled-fg1)}@media screen and (min-width: 780px){.active-step{display:none}}";
|
|
7
|
+
|
|
8
|
+
const PostStepper$1 = /*@__PURE__*/ proxyCustomElement(class PostStepper extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
/**
|
|
14
|
+
* Defines the currently active step
|
|
15
|
+
*/
|
|
16
|
+
this.currentIndex = -1;
|
|
17
|
+
}
|
|
18
|
+
validateCurrentLabel() {
|
|
19
|
+
checkRequiredAndType(this, 'currentLabel', 'string');
|
|
20
|
+
}
|
|
21
|
+
validateCompletedLabel() {
|
|
22
|
+
checkRequiredAndType(this, 'completedLabel', 'string');
|
|
23
|
+
}
|
|
24
|
+
validateActiveStepLabel() {
|
|
25
|
+
checkRequiredAndPattern(this, 'activeStepLabel', /#index\b/);
|
|
26
|
+
this.updateActiveStepLabel();
|
|
27
|
+
}
|
|
28
|
+
validateCurrentIndex() {
|
|
29
|
+
checkRequiredAndType(this, 'currentIndex', 'number');
|
|
30
|
+
this.updateSteps();
|
|
31
|
+
}
|
|
32
|
+
componentDidLoad() {
|
|
33
|
+
this.validateCompletedLabel();
|
|
34
|
+
this.validateCurrentLabel();
|
|
35
|
+
this.validateActiveStepLabel();
|
|
36
|
+
// Wait for slotchange
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
this.validateCurrentIndex();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
updateActiveStepLabel() {
|
|
42
|
+
if (this.activeStepLabel) {
|
|
43
|
+
const labelTemplate = this.activeStepLabel;
|
|
44
|
+
this.mobileActiveStepLabel = labelTemplate.replace(/#index/g, `${this.currentIndex + 1}`);
|
|
45
|
+
this.updateMobileActiveStepVisibility();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
updateSteps() {
|
|
49
|
+
this.stepItems = this.host.querySelectorAll('post-stepper-item');
|
|
50
|
+
if (!this.stepItems || this.stepItems.length < 3) {
|
|
51
|
+
console.error('The post-stepper component should have at least three steps.');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.updateActiveStepLabel();
|
|
55
|
+
this.stepItems.forEach((el, i) => {
|
|
56
|
+
if (this.currentIndex === i) {
|
|
57
|
+
this.mobileActiveStepName = el.querySelector('.label').innerHTML;
|
|
58
|
+
}
|
|
59
|
+
// Update "post-stepper-item" classes to show correct status
|
|
60
|
+
el.classList.toggle('stepper-item-completed', this.currentIndex > i);
|
|
61
|
+
el.classList.toggle('stepper-item-current', this.currentIndex === i);
|
|
62
|
+
el.classList.toggle('stepper-item-inactive', this.currentIndex < i);
|
|
63
|
+
// Update accessibility label depending on status (Completed/Current/-)
|
|
64
|
+
const hiddenLabel = el.querySelector('.step-hidden-label');
|
|
65
|
+
if (hiddenLabel) {
|
|
66
|
+
let labelText = '';
|
|
67
|
+
if (this.currentIndex > i) {
|
|
68
|
+
labelText = `${this.completedLabel}:`;
|
|
69
|
+
}
|
|
70
|
+
else if (this.currentIndex === i) {
|
|
71
|
+
labelText = `${this.currentLabel}:`;
|
|
72
|
+
}
|
|
73
|
+
hiddenLabel.textContent = labelText;
|
|
74
|
+
}
|
|
75
|
+
// Update accessibility aria attributes
|
|
76
|
+
if (this.currentIndex === i) {
|
|
77
|
+
el.setAttribute('aria-current', 'step');
|
|
78
|
+
el.setAttribute('aria-live', 'polite');
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
el.removeAttribute('aria-current');
|
|
82
|
+
el.removeAttribute('aria-live');
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
this.updateMobileActiveStepVisibility();
|
|
86
|
+
}
|
|
87
|
+
updateMobileActiveStepVisibility() {
|
|
88
|
+
if (this.currentIndex >= this.stepItems.length || this.currentIndex < 0) {
|
|
89
|
+
this.mobileActiveStepLabel = '';
|
|
90
|
+
this.mobileActiveStepName = '';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return (h(Host, { key: '874d4d6a510ede937c7f9e5dd1f28f8981f33626', "data-version": version }, h("ol", { key: '55fb25ded4111eb1c87ea11a10fbd65346843132' }, h("slot", { key: '0c9f9d00573ea568c0039312507989a22868f432', onSlotchange: () => this.updateSteps() })), h("div", { key: '22e5b14c5285b96ba0a3a99c9cb90e02550298c6', class: "active-step", "aria-hidden": "true" }, this.mobileActiveStepLabel, h("span", { key: '1ba5204f3c01dad6730d0d300168a13316e3d3ac', innerHTML: this.mobileActiveStepName }))));
|
|
95
|
+
}
|
|
96
|
+
get host() { return this; }
|
|
97
|
+
static get watchers() { return {
|
|
98
|
+
"currentLabel": ["validateCurrentLabel"],
|
|
99
|
+
"completedLabel": ["validateCompletedLabel"],
|
|
100
|
+
"activeStepLabel": ["validateActiveStepLabel"],
|
|
101
|
+
"currentIndex": ["validateCurrentIndex"]
|
|
102
|
+
}; }
|
|
103
|
+
static get style() { return postStepperCss; }
|
|
104
|
+
}, [1, "post-stepper", {
|
|
105
|
+
"currentLabel": [513, "current-label"],
|
|
106
|
+
"completedLabel": [513, "completed-label"],
|
|
107
|
+
"activeStepLabel": [513, "active-step-label"],
|
|
108
|
+
"currentIndex": [2, "current-index"],
|
|
109
|
+
"mobileActiveStepLabel": [32],
|
|
110
|
+
"mobileActiveStepName": [32]
|
|
111
|
+
}, undefined, {
|
|
112
|
+
"currentLabel": ["validateCurrentLabel"],
|
|
113
|
+
"completedLabel": ["validateCompletedLabel"],
|
|
114
|
+
"activeStepLabel": ["validateActiveStepLabel"],
|
|
115
|
+
"currentIndex": ["validateCurrentIndex"]
|
|
116
|
+
}]);
|
|
117
|
+
function defineCustomElement$1() {
|
|
118
|
+
if (typeof customElements === "undefined") {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const components = ["post-stepper"];
|
|
122
|
+
components.forEach(tagName => { switch (tagName) {
|
|
123
|
+
case "post-stepper":
|
|
124
|
+
if (!customElements.get(tagName)) {
|
|
125
|
+
customElements.define(tagName, PostStepper$1);
|
|
126
|
+
}
|
|
127
|
+
break;
|
|
128
|
+
} });
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const PostStepper = PostStepper$1;
|
|
132
|
+
const defineCustomElement = defineCustomElement$1;
|
|
133
|
+
|
|
134
|
+
export { PostStepper, defineCustomElement };
|
|
@@ -19,7 +19,7 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
|
|
|
19
19
|
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'b350fb9392e74af452470d72f97678aa1ac2d430', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '49722204330b3b2d760b8718b349b1417fd29a71' })));
|
|
23
23
|
}
|
|
24
24
|
get host() { return this; }
|
|
25
25
|
static get watchers() { return {
|
|
@@ -21,7 +21,7 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
21
21
|
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'f00d9caf4324fc2d750d7844ca6ddc8198aef0c0', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '58f2eaf91aee7897039a151e117d9b9fc948162a' })));
|
|
25
25
|
}
|
|
26
26
|
get host() { return this; }
|
|
27
27
|
static get watchers() { return {
|
|
@@ -167,7 +167,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
167
167
|
nextTab.focus();
|
|
168
168
|
}
|
|
169
169
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: 'f3534a3b05c379ce1cb311d4c5ea950c8eba87d0', "data-version": version }, h("div", { key: 'd812db6b2a895504fce8ac9dae2663821b9dd759', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '9abd0ee00204a085ceaebce5e11fcff527273605', class: "tabs", role: "tablist" }, h("slot", { key: '89f09f443ca740dc9af66fedb1367cdb4885074d', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '4a94a19fd67814482934bd31bb219470bea8dec6', class: "tab-content", part: "content" }, h("slot", { key: '44db446865edacb1b1c0fc20ef391adfa189e8cb', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
171
171
|
}
|
|
172
172
|
get host() { return this; }
|
|
173
173
|
static get style() { return postTabsCss; }
|
|
@@ -29,7 +29,7 @@ const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutt
|
|
|
29
29
|
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'ecd5772b09be8842e5c6fc3bf34932b27d90c533', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '3bb32b33155e71ced9375afb5a26d1d4e63a83c8' })));
|
|
33
33
|
}
|
|
34
34
|
get host() { return this; }
|
|
35
35
|
static get style() { return postTogglebuttonCss; }
|
|
@@ -173,7 +173,7 @@ const PostTooltipTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltipT
|
|
|
173
173
|
this.tooltip?.hide();
|
|
174
174
|
}
|
|
175
175
|
render() {
|
|
176
|
-
return (h(Host, { key: '
|
|
176
|
+
return (h(Host, { key: '48246523aabaf1851e05d0273346d3e26e7ad866', "data-version": version }, h("slot", { key: '0442aeadddd59642c317b6f10c93008adf3e6585', onSlotchange: () => this.handleSlotChange() })));
|
|
177
177
|
}
|
|
178
178
|
get host() { return this; }
|
|
179
179
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ import { d as checkEmptyOrOneOf } from './index2.js';
|
|
|
4
4
|
import './breakpoints.js';
|
|
5
5
|
import { a as PLACEMENT_TYPES, d as defineCustomElement$2 } from './post-popovercontainer2.js';
|
|
6
6
|
|
|
7
|
-
const postTooltipCss = ":host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{color:var(--post-current-fg);background-color:var(--post-current-bg);padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:280px;min-height:32px;word-wrap:break-word;white-space:normal}";
|
|
7
|
+
const postTooltipCss = ":host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{color:var(--post-current-fg);background-color:var(--post-current-bg);padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:var(--post-tooltip-max-width, 280px);width:inherit;min-height:32px;word-wrap:break-word;white-space:normal}";
|
|
8
8
|
|
|
9
9
|
const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -71,7 +71,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'ebc25bd8a9615a13be82d58f246b5a5d42113cf2', "data-version": version }, h("post-popovercontainer", { key: 'dba7a96c1f354752475a6f1d9116b0097dddf320', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, animation: this.animation, placement: this.placement, onPostToggle: e => this.handleToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '537370b88912d323a72ee074767b4cf2b4bc1b57' }))));
|
|
75
75
|
}
|
|
76
76
|
get host() { return this; }
|
|
77
77
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-option,post-language-switch,post-linkarea,post-list,post-list-item,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-tab-header,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
|
|
1
|
+
const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-option,post-language-switch,post-linkarea,post-list,post-list-item,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-header,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
|
|
2
2
|
|
|
3
3
|
const NAMESPACE = 'post-components';
|
|
4
4
|
const BUILD = /* post-components */ { hydratedSelectorName: "data-hydrated", lazyLoad: false, slotRelocation: true, updatable: true};
|
|
@@ -1,8 +1,8 @@
|
|
|
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-DVGEExot.js';
|
|
3
|
+
import { v as version } from './p-BhxZzOEC.js';
|
|
4
4
|
import { g as getFocusableChildren } from './p-BVXiQdHq.js';
|
|
5
|
-
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-
|
|
5
|
+
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-CYkf_7Y5.js';
|
|
6
6
|
import './p-CJ80BZ06.js';
|
|
7
7
|
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
8
8
|
import { g as getRoot } from './p-CBFgkSgY.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: 'ab27eeef6ddcca57eb65ca9f7471809d9f78d7d1', "data-version": version }, h("post-popovercontainer", { key: 'c8053a6cbae6d22751e81107099180b95829b8c4', onPostShow: this.handlePostShown, onPostToggle: this.handlePostToggled, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'c60d336220b331cd7f3d5b896788f3fdcee090cf', part: "menu" }, h("slot", { key: '629b1f5dbe4074df6459bdfe64e1c0f836314e85', name: "header" }), h("slot", { key: 'c918bba494424db857e7e99fd80d24224bdeb9ed' })))));
|
|
197
199
|
}
|
|
198
200
|
get host() { return this; }
|
|
199
201
|
static get watchers() { return {
|
|
@@ -203,7 +205,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
203
205
|
static get style() { return postMenuCss; }
|
|
204
206
|
}, [1, "post-menu", {
|
|
205
207
|
"placement": [1],
|
|
206
|
-
"label": [
|
|
208
|
+
"label": [513],
|
|
207
209
|
"isVisible": [32],
|
|
208
210
|
"toggle": [64],
|
|
209
211
|
"show": [64],
|
|
@@ -82,7 +82,8 @@ const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
|
82
82
|
const checkEmptyOrType = emptyOr(checkType);
|
|
83
83
|
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
84
84
|
const checkRequiredAndOneOf = requiredAnd(checkOneOf);
|
|
85
|
+
const checkRequiredAndPattern = requiredAnd(checkPattern);
|
|
85
86
|
const checkRequiredAndType = requiredAnd(checkType);
|
|
86
87
|
const checkRequiredAndUrl = requiredAnd(checkUrl);
|
|
87
88
|
|
|
88
|
-
export { checkEmptyOrUrl as a, checkRequiredAndOneOf as b, checkRequiredAndType as c, checkEmptyOrOneOf as d, checkEmptyOrType as e,
|
|
89
|
+
export { checkEmptyOrUrl as a, checkRequiredAndOneOf as b, checkRequiredAndType as c, checkEmptyOrOneOf as d, checkEmptyOrType as e, checkRequiredAndPattern as f, checkEmptyOrPattern as g, checkRequiredAndUrl as h };
|
|
@@ -1,7 +1,7 @@
|
|
|
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-BhxZzOEC.js';
|
|
3
3
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
4
|
-
import { e as checkEmptyOrType } from './p-
|
|
4
|
+
import { e as checkEmptyOrType } from './p-CYkf_7Y5.js';
|
|
5
5
|
|
|
6
6
|
function isMotionReduced() {
|
|
7
7
|
return IS_BROWSER ? window.matchMedia('(prefers-reduced-motion: reduce)').matches : false;
|
|
@@ -1,7 +1,7 @@
|
|
|
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-BhxZzOEC.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
|
-
import { b as checkRequiredAndOneOf } from './p-
|
|
4
|
+
import { b as checkRequiredAndOneOf } from './p-CYkf_7Y5.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
6
6
|
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
7
7
|
|
|
@@ -102,7 +102,7 @@ const PostAccordion = /*@__PURE__*/ proxyCustomElement(class PostAccordion exten
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
105
|
+
return (h(Host, { key: '470d8a7646796044df8f9cf1ebfc113e5c8db960', "data-version": version }, h("div", { key: '360ad1fe885dbb3c61a5c026ea253e7fba81ef9e', class: "accordion" }, h("slot", { key: '9e14d7906cba560a848986787159f56c961c78db', onSlotchange: () => this.registerAccordionItems() }))));
|
|
106
106
|
}
|
|
107
107
|
get host() { return this; }
|
|
108
108
|
static get watchers() { return {
|
|
@@ -110,7 +110,7 @@ const PostAccordion = /*@__PURE__*/ proxyCustomElement(class PostAccordion exten
|
|
|
110
110
|
}; }
|
|
111
111
|
static get style() { return postAccordionCss; }
|
|
112
112
|
}, [1, "post-accordion", {
|
|
113
|
-
"headingLevel": [
|
|
113
|
+
"headingLevel": [514, "heading-level"],
|
|
114
114
|
"multiple": [4],
|
|
115
115
|
"toggle": [64],
|
|
116
116
|
"expandAll": [64],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
3
|
-
import { c as checkRequiredAndType } from './p-
|
|
2
|
+
import { v as version } from './p-BhxZzOEC.js';
|
|
3
|
+
import { c as checkRequiredAndType } from './p-CYkf_7Y5.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger e
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '14592f9564fdb09b2e809374d5794bf71f576dbb', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'a0f463000420df39035cc5a48369d230394b5e04' })));
|
|
84
84
|
}
|
|
85
85
|
get host() { return this; }
|
|
86
86
|
static get watchers() { return {
|
|
@@ -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-BhxZzOEC.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
|
|
|
@@ -9,7 +9,7 @@ const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '9d6015291b82728739de4263a62a59ad4a99c94d', "data-version": version }, h("slot", { key: '51f5ff356cddffc806639cc343437500f898065e' })));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return postMenuItemCss; }
|
|
15
15
|
}, [4, "post-menu-item"]);
|
|
@@ -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
|
-
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './p-
|
|
4
|
-
import { v as version } from './p-
|
|
3
|
+
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './p-CYkf_7Y5.js';
|
|
4
|
+
import { v as version } from './p-BhxZzOEC.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
|
|
|
@@ -116,7 +116,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
|
116
116
|
this.validateAnimation();
|
|
117
117
|
}
|
|
118
118
|
render() {
|
|
119
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: '7ce1f627f621201c0f4d6e90ee3d8d6d3c32798a', "data-version": version }, h("span", { key: '987ecd266b8bd68bdbb06cdb500a746b913e79b1', style: this.getStyles() })));
|
|
120
120
|
}
|
|
121
121
|
get host() { return this; }
|
|
122
122
|
static get watchers() { return {
|
|
@@ -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
|
-
import { d as checkEmptyOrOneOf, e as checkEmptyOrType } from './p-
|
|
4
|
-
import { v as version } from './p-
|
|
3
|
+
import { d as checkEmptyOrOneOf, e as checkEmptyOrType } from './p-CYkf_7Y5.js';
|
|
4
|
+
import { v as version } from './p-BhxZzOEC.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: '9ec775608a6bfab69c50e9cefb1a42235deaa451', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: 'b659d1ce9cf9d3b661e3712c689cf1ffb0816f6e', class: "popover-content" }, this.arrow && (h("span", { key: '504e007d07d6b38018d93f5dca5a074b881cd50b', class: "arrow", ref: el => {
|
|
3032
3066
|
this.arrowRef = el;
|
|
3033
|
-
} })), h("slot", { key: '
|
|
3067
|
+
} })), h("slot", { key: '207062f4582b4aad7b570a7453711fd61654d5e3' }))));
|
|
3034
3068
|
}
|
|
3035
3069
|
get host() { return this; }
|
|
3036
3070
|
static get watchers() { return {
|
|
@@ -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-
|
|
3
|
-
import { a as checkEmptyOrUrl } from './p-
|
|
2
|
+
import { v as version } from './p-BhxZzOEC.js';
|
|
3
|
+
import { a as checkEmptyOrUrl } from './p-CYkf_7Y5.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-DBPOV12C.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,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
3
|
-
import { c as checkRequiredAndType } from './p-
|
|
2
|
+
import { v as version } from './p-BhxZzOEC.js';
|
|
3
|
+
import { c as checkRequiredAndType } from './p-CYkf_7Y5.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
6
6
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
@@ -16,18 +16,19 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
16
16
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
17
17
|
};
|
|
18
18
|
const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollapsibleTrigger extends H {
|
|
19
|
-
constructor() {
|
|
20
|
-
super();
|
|
21
|
-
this.__registerHost();
|
|
22
|
-
this.__attachShadow();
|
|
23
|
-
this.observer = new MutationObserver(() => this.setTrigger());
|
|
24
|
-
}
|
|
25
19
|
/**
|
|
26
20
|
* Set the "aria-controls" and "aria-expanded" attributes on the trigger to match the state of the controlled post-collapsible
|
|
27
21
|
*/
|
|
28
22
|
validateAriaAttributes() {
|
|
29
23
|
checkRequiredAndType(this, 'for', 'string');
|
|
30
24
|
}
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this.__registerHost();
|
|
28
|
+
this.__attachShadow();
|
|
29
|
+
this.observer = new MutationObserver(() => this.setTrigger());
|
|
30
|
+
this.handlePostToggle = this.handlePostToggle.bind(this);
|
|
31
|
+
}
|
|
31
32
|
/**
|
|
32
33
|
* Initiate a mutation observer that updates the trigger whenever necessary
|
|
33
34
|
*/
|
|
@@ -44,7 +45,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
44
45
|
}
|
|
45
46
|
disconnectedCallback() {
|
|
46
47
|
this.observer.disconnect();
|
|
47
|
-
this.root
|
|
48
|
+
this.root?.removeEventListener('postToggle', this.handlePostToggle);
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* Update the "aria-controls" and "aria-expanded" attributes on the trigger button
|
|
@@ -103,7 +104,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
103
104
|
this.updateAriaAttributes();
|
|
104
105
|
}
|
|
105
106
|
render() {
|
|
106
|
-
return (h(Host, { key: '
|
|
107
|
+
return (h(Host, { key: '1cd00cfdb29b9ce191b8eb1fe6a91ddab412d006', "data-version": version }, h("slot", { key: 'b0625b4f2074852609d4a3dd700c04e01fa34d0a' })));
|
|
107
108
|
}
|
|
108
109
|
get host() { return this; }
|
|
109
110
|
static get watchers() { return {
|
|
@@ -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-
|
|
3
|
-
import { d as checkEmptyOrOneOf } from './p-
|
|
2
|
+
import { v as version } from './p-BhxZzOEC.js';
|
|
3
|
+
import { d as checkEmptyOrOneOf } from './p-CYkf_7Y5.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-DBPOV12C.js';
|
|
6
6
|
|
|
7
7
|
const BUTTON_TYPES = ['button', 'submit', 'reset'];
|
|
8
8
|
|
|
@@ -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-BhxZzOEC.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
|
-
import { d as checkEmptyOrOneOf } from './p-
|
|
4
|
+
import { d as checkEmptyOrOneOf } from './p-CYkf_7Y5.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-Ccrl2AQn.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-LtiDhYis.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-DBPOV12C.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,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-v3pOrMNQ.js';
|
|
2
2
|
|
|
3
3
|
const PostAccordionItem = PostAccordionItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|