@swisspost/design-system-components 10.0.0-next.46 → 10.0.0-next.47

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.
Files changed (139) hide show
  1. package/dist/cjs/index-CpDyH7Ww.js +4 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{package-Din0le0Q.js → package-wsZ6ig4j.js} +1 -1
  4. package/dist/cjs/post-accordion_2.cjs.entry.js +1 -1
  5. package/dist/cjs/post-avatar.cjs.entry.js +1 -1
  6. package/dist/cjs/post-back-to-top.cjs.entry.js +32 -7
  7. package/dist/cjs/post-banner.cjs.entry.js +31 -35
  8. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +1 -1
  9. package/dist/cjs/post-breadcrumbs.cjs.entry.js +1 -1
  10. package/dist/cjs/post-card-control.cjs.entry.js +3 -3
  11. package/dist/cjs/post-closebutton_15.cjs.entry.js +38 -6
  12. package/dist/cjs/post-collapsible_2.cjs.entry.js +1 -1
  13. package/dist/cjs/post-components.cjs.js +1 -1
  14. package/dist/cjs/post-footer.cjs.entry.js +1 -1
  15. package/dist/cjs/post-linkarea.cjs.entry.js +1 -1
  16. package/dist/cjs/post-popover.cjs.entry.js +1 -1
  17. package/dist/cjs/post-rating.cjs.entry.js +1 -1
  18. package/dist/cjs/post-tab-header.cjs.entry.js +1 -1
  19. package/dist/cjs/post-tab-panel.cjs.entry.js +1 -1
  20. package/dist/cjs/post-tabs.cjs.entry.js +1 -1
  21. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +1 -1
  22. package/dist/cjs/post-tooltip.cjs.entry.js +1 -1
  23. package/dist/collection/animations/slide-and-fade.js +25 -0
  24. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  25. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  26. package/dist/collection/components/post-back-to-top/post-back-to-top.js +5 -5
  27. package/dist/collection/components/post-banner/post-banner.css +1 -1
  28. package/dist/collection/components/post-banner/post-banner.js +41 -81
  29. package/dist/collection/components/post-card-control/post-card-control.js +8 -8
  30. package/dist/collection/components/post-closebutton/post-closebutton.js +27 -1
  31. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +1 -1
  32. package/dist/components/{p-Dg6sSnLv.js → p-336Lbkey.js} +1 -1
  33. package/dist/components/{p-DQE6fqIb.js → p-BM8mtEfS.js} +1 -1
  34. package/dist/components/{p-DNnYEFO6.js → p-BSvy4uym.js} +4 -4
  35. package/dist/components/{p-Cd5RHPSU.js → p-C0H2ohSv.js} +1 -1
  36. package/dist/components/{p-Cpy7mEQb.js → p-Cxrx7SXz.js} +1 -1
  37. package/dist/components/{p-jLh9Y0sO.js → p-DEi5TIMq.js} +2 -2
  38. package/dist/components/{p-D1Ldeko3.js → p-DP5pj8mq.js} +2 -2
  39. package/dist/components/{p-9rHPmDn6.js → p-DVGX_JCp.js} +1 -1
  40. package/dist/components/p-Z01QMrov.js +3 -0
  41. package/dist/components/{p-C8YtuR96.js → p-i0-mizzM.js} +1 -1
  42. package/dist/components/{p-C1i4rB_c.js → p-pHxypsHK.js} +2 -2
  43. package/dist/components/post-accordion-item.js +1 -1
  44. package/dist/components/post-accordion.js +1 -1
  45. package/dist/components/post-avatar.js +1 -1
  46. package/dist/components/post-back-to-top.js +33 -8
  47. package/dist/components/post-banner.js +34 -45
  48. package/dist/components/post-breadcrumb-item.js +1 -1
  49. package/dist/components/post-breadcrumbs.js +7 -7
  50. package/dist/components/post-card-control.js +4 -4
  51. package/dist/components/post-closebutton.js +13 -4
  52. package/dist/components/post-collapsible-trigger.js +1 -1
  53. package/dist/components/post-collapsible.js +1 -1
  54. package/dist/components/post-footer.js +6 -6
  55. package/dist/components/post-header.js +25 -2
  56. package/dist/components/post-icon.js +1 -1
  57. package/dist/components/post-language-option.js +1 -1
  58. package/dist/components/post-language-switch.js +5 -5
  59. package/dist/components/post-linkarea.js +1 -1
  60. package/dist/components/post-list-item.js +1 -1
  61. package/dist/components/post-list.js +1 -1
  62. package/dist/components/post-logo.js +1 -1
  63. package/dist/components/post-mainnavigation.js +2 -2
  64. package/dist/components/post-megadropdown-trigger.js +1 -1
  65. package/dist/components/post-megadropdown.js +1 -1
  66. package/dist/components/post-menu-item.js +1 -1
  67. package/dist/components/post-menu-trigger.js +1 -1
  68. package/dist/components/post-menu.js +1 -1
  69. package/dist/components/post-popover.js +2 -2
  70. package/dist/components/post-popovercontainer.js +1 -1
  71. package/dist/components/post-rating.js +2 -2
  72. package/dist/components/post-tab-header.js +1 -1
  73. package/dist/components/post-tab-panel.js +1 -1
  74. package/dist/components/post-tabs.js +1 -1
  75. package/dist/components/post-togglebutton.js +1 -1
  76. package/dist/components/post-tooltip-trigger.js +1 -1
  77. package/dist/components/post-tooltip.js +2 -2
  78. package/dist/docs.json +42 -65
  79. package/dist/esm/index-C8a0ddDa.js +4 -4
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/package-Z01QMrov.js +3 -0
  82. package/dist/esm/post-accordion_2.entry.js +1 -1
  83. package/dist/esm/post-avatar.entry.js +1 -1
  84. package/dist/esm/post-back-to-top.entry.js +32 -7
  85. package/dist/esm/post-banner.entry.js +32 -36
  86. package/dist/esm/post-breadcrumb-item_2.entry.js +1 -1
  87. package/dist/esm/post-breadcrumbs.entry.js +1 -1
  88. package/dist/esm/post-card-control.entry.js +3 -3
  89. package/dist/esm/post-closebutton_15.entry.js +37 -5
  90. package/dist/esm/post-collapsible_2.entry.js +1 -1
  91. package/dist/esm/post-components.js +1 -1
  92. package/dist/esm/post-footer.entry.js +1 -1
  93. package/dist/esm/post-linkarea.entry.js +1 -1
  94. package/dist/esm/post-popover.entry.js +1 -1
  95. package/dist/esm/post-rating.entry.js +1 -1
  96. package/dist/esm/post-tab-header.entry.js +1 -1
  97. package/dist/esm/post-tab-panel.entry.js +1 -1
  98. package/dist/esm/post-tabs.entry.js +1 -1
  99. package/dist/esm/post-tooltip-trigger.entry.js +1 -1
  100. package/dist/esm/post-tooltip.entry.js +1 -1
  101. package/dist/post-components/{p-30f12b7c.entry.js → p-031f7489.entry.js} +1 -1
  102. package/dist/post-components/{p-a69c874a.entry.js → p-1e6a068a.entry.js} +1 -1
  103. package/dist/post-components/{p-74a9aafc.entry.js → p-2ca196d6.entry.js} +1 -1
  104. package/dist/post-components/{p-7689015e.entry.js → p-2f698af4.entry.js} +1 -1
  105. package/dist/post-components/{p-a0a1cab6.entry.js → p-3adbdda7.entry.js} +1 -1
  106. package/dist/post-components/{p-1dee733a.entry.js → p-45007aac.entry.js} +1 -1
  107. package/dist/post-components/p-57703aee.entry.js +1 -0
  108. package/dist/post-components/{p-ea9ae6b7.entry.js → p-7b8ab026.entry.js} +1 -1
  109. package/dist/post-components/{p-3789cf50.entry.js → p-9428231b.entry.js} +1 -1
  110. package/dist/post-components/p-Z01QMrov.js +1 -0
  111. package/dist/post-components/p-a2fa5ce4.entry.js +1 -0
  112. package/dist/post-components/{p-ba13450e.entry.js → p-ab8017bb.entry.js} +1 -1
  113. package/dist/post-components/p-ac73ab00.entry.js +1 -0
  114. package/dist/post-components/{p-eddb07df.entry.js → p-bbe02ba3.entry.js} +1 -1
  115. package/dist/post-components/{p-7819009b.entry.js → p-c1cf39cb.entry.js} +1 -1
  116. package/dist/post-components/{p-cb937e6b.entry.js → p-d0d92071.entry.js} +1 -1
  117. package/dist/post-components/{p-26730afe.entry.js → p-e96239c4.entry.js} +1 -1
  118. package/dist/post-components/{p-80bad606.entry.js → p-e9802b56.entry.js} +1 -1
  119. package/dist/post-components/{p-470750be.entry.js → p-f67b616a.entry.js} +1 -1
  120. package/dist/post-components/post-components.esm.js +1 -1
  121. package/dist/types/animations/slide-and-fade.d.ts +2 -0
  122. package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
  123. package/dist/types/components/post-banner/post-banner.d.ts +6 -14
  124. package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
  125. package/dist/types/components/post-closebutton/post-closebutton.d.ts +8 -0
  126. package/dist/types/components.d.ts +28 -27
  127. package/hydrate/index.js +103 -77
  128. package/hydrate/index.mjs +103 -77
  129. package/package.json +4 -4
  130. package/dist/cjs/slide-CbBL7A8w.js +0 -28
  131. package/dist/components/p-7hVD-I9l.js +0 -3
  132. package/dist/components/p-BuLMaH5t.js +0 -25
  133. package/dist/esm/package-7hVD-I9l.js +0 -3
  134. package/dist/esm/slide-BuLMaH5t.js +0 -25
  135. package/dist/post-components/p-2d3fb75c.entry.js +0 -1
  136. package/dist/post-components/p-2ed74834.entry.js +0 -1
  137. package/dist/post-components/p-7hVD-I9l.js +0 -1
  138. package/dist/post-components/p-BuLMaH5t.js +0 -1
  139. package/dist/post-components/p-cb5af9d8.entry.js +0 -1
@@ -1,49 +1,45 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4
+ r = Reflect.decorate(decorators, target, key, desc);
5
+ else
6
+ for (var i = decorators.length - 1; i >= 0; i--)
7
+ if (d = decorators[i])
8
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ };
1
11
  import { Host, h, } from "@stencil/core";
2
12
  import { version } from "../../../../package";
3
13
  import { fadeOut } from "../../animations/index";
4
- import { checkRequiredAndType, checkEmptyOrOneOf } from "../../utils/index";
14
+ import { checkEmptyOrOneOf, EventFrom } from "../../utils/index";
5
15
  import { BANNER_TYPES } from "./banner-types";
6
- import { nanoid } from "nanoid";
7
16
  /**
8
17
  * @slot heading - Slot for placing custom content within the banner's heading.
9
18
  * @slot actions - Slot for placing custom actions (buttons, links, etc.) within the banner.
19
+ * @slot close-button - Slot for placing a `post-closebutton` component to make the banner dismissible.
10
20
  * @slot default - Slot for placing the main content/message of the banner.
11
21
  */
12
22
  export class PostBanner {
13
23
  constructor() {
14
- this.bannerId = `p${nanoid(6)}`;
15
- this.onDismissButtonClick = () => this.dismiss();
16
- /**
17
- * If `true`, a close button (×) is displayed and the banner can be dismissed by the user.
18
- */
19
- this.dismissible = false;
24
+ this.mutationObserver = new MutationObserver(this.checkContent.bind(this));
25
+ this.hasActions = false;
20
26
  /**
21
27
  * The type of the banner.
22
28
  */
23
29
  this.type = 'info';
24
30
  }
25
- checkDismissible() {
26
- if (this.dismissible) {
27
- setTimeout(() => {
28
- checkRequiredAndType(this, 'dismissLabel', 'string');
29
- });
30
- }
31
- }
32
31
  validateType() {
33
32
  checkEmptyOrOneOf(this, 'type', BANNER_TYPES);
34
33
  }
34
+ connectedCallback() {
35
+ this.mutationObserver.observe(this.host, { childList: true });
36
+ }
35
37
  componentDidLoad() {
36
- this.checkDismissible();
38
+ this.checkContent();
37
39
  this.validateType();
38
40
  }
39
- componentWillRender() {
40
- this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
41
- this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
42
- this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
43
- if (this.dismissible)
44
- this.classes += ' banner-dismissible';
45
- if (this.hasActions)
46
- this.classes += ' banner-action';
41
+ disconnectedCallback() {
42
+ this.mutationObserver.disconnect();
47
43
  }
48
44
  /**
49
45
  * Triggers banner dismissal programmatically (same as clicking on the close button (×)).
@@ -54,16 +50,14 @@ export class PostBanner {
54
50
  this.host.remove();
55
51
  this.postDismissed.emit();
56
52
  }
53
+ onCloseButtonClick() {
54
+ void this.dismiss();
55
+ }
56
+ checkContent() {
57
+ this.hasActions = this.host.querySelectorAll('[slot="actions"]').length > 0;
58
+ }
57
59
  render() {
58
- const defaultBannerContent = [
59
- this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: 'cea692aeb18e0c75d9616efc1cf804f3629f5bbf', name: "heading" }))),
60
- h("slot", { key: `${this.bannerId}-message` }),
61
- ];
62
- const actionBannerContent = [
63
- h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
64
- h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '5f48e2d579c573cce2e347b08951785e2a8a0c42', name: "actions" })),
65
- ];
66
- return (h(Host, { key: '27649f6a2f208748afd204c2cf4c72b7c19eb3a0', "data-version": version }, h("div", { key: 'dd8418a4d6358bd1f6493a57308ce93a2a945cd2', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '549e7ef13a1d69312c1266737a6c145dd5cf257a', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'b024d4254d6e9e52fcf3dca5bfe42c310565afce', class: "visually-hidden" }, this.dismissLabel))), this.hasActions ? actionBannerContent : defaultBannerContent)));
60
+ return (h(Host, { key: 'fc9507a57b443c485cf9496be4e04f66c04d7eaf', "data-version": version, role: "alert" }, h("slot", { key: '1f59c2d63144990f148a37046d70b2155280abd6', name: "close-button" }), h("slot", { key: '65d0e3c723cb474498d40d26f7f369b7d3abb41e', name: "heading" }), h("slot", { key: '03ff96159a3066a64a7a474d9e6a5450937f8c84' }), this.hasActions && (h("div", { key: '641ad34505cd5141133e5ef788f7e38ab0f977c8', class: "actions" }, h("slot", { key: '242f388c40d71f37a25f2af3fe3eb622a9ab2796', name: "actions" })))));
67
61
  }
68
62
  static get is() { return "post-banner"; }
69
63
  static get encapsulation() { return "shadow"; }
@@ -79,45 +73,6 @@ export class PostBanner {
79
73
  }
80
74
  static get properties() {
81
75
  return {
82
- "dismissible": {
83
- "type": "boolean",
84
- "attribute": "dismissible",
85
- "mutable": false,
86
- "complexType": {
87
- "original": "boolean",
88
- "resolved": "boolean",
89
- "references": {}
90
- },
91
- "required": false,
92
- "optional": false,
93
- "docs": {
94
- "tags": [],
95
- "text": "If `true`, a close button (\u00D7) is displayed and the banner can be dismissed by the user."
96
- },
97
- "getter": false,
98
- "setter": false,
99
- "reflect": false,
100
- "defaultValue": "false"
101
- },
102
- "dismissLabel": {
103
- "type": "string",
104
- "attribute": "dismiss-label",
105
- "mutable": false,
106
- "complexType": {
107
- "original": "string",
108
- "resolved": "string",
109
- "references": {}
110
- },
111
- "required": false,
112
- "optional": true,
113
- "docs": {
114
- "tags": [],
115
- "text": "The label to use for the close button of a dismissible banner."
116
- },
117
- "getter": false,
118
- "setter": false,
119
- "reflect": false
120
- },
121
76
  "type": {
122
77
  "type": "string",
123
78
  "attribute": "type",
@@ -141,18 +96,14 @@ export class PostBanner {
141
96
  },
142
97
  "getter": false,
143
98
  "setter": false,
144
- "reflect": false,
99
+ "reflect": true,
145
100
  "defaultValue": "'info'"
146
101
  }
147
102
  };
148
103
  }
149
104
  static get states() {
150
105
  return {
151
- "bannerId": {},
152
- "classes": {},
153
- "hasActions": {},
154
- "hasHeading": {},
155
- "onDismissButtonClick": {}
106
+ "hasActions": {}
156
107
  };
157
108
  }
158
109
  static get events() {
@@ -197,11 +148,20 @@ export class PostBanner {
197
148
  static get elementRef() { return "host"; }
198
149
  static get watchers() {
199
150
  return [{
200
- "propName": "dismissible",
201
- "methodName": "checkDismissible"
202
- }, {
203
151
  "propName": "type",
204
152
  "methodName": "validateType"
205
153
  }];
206
154
  }
155
+ static get listeners() {
156
+ return [{
157
+ "name": "postClick",
158
+ "method": "onCloseButtonClick",
159
+ "target": undefined,
160
+ "capture": false,
161
+ "passive": false
162
+ }];
163
+ }
207
164
  }
165
+ __decorate([
166
+ EventFrom('post-closebutton')
167
+ ], PostBanner.prototype, "onCloseButtonClick", null);
@@ -5,8 +5,8 @@ let cardControlIds = 0;
5
5
  /**
6
6
  * @class PostCardControl - representing a stencil component
7
7
  *
8
- * @slot default - Content to place into the `default` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Block-level_contentt">block content</a>.<p className="banner banner-sm banner-warning">Even if it is generally possible, we do not recommend using interactive elements in this slot because the background of the card control is clickable.<br/>This can lead to confusion when the hit box of nested interactive controls is not clearly separated from the background, is invalid HTML and click events bubbling up to the card control will unexpectedly toggle it if they're not captured.<br/>More info: <a href="https://accessibilityinsights.io/info-examples/web/nested-interactive/">https://accessibilityinsights.io/info-examples/web/nested-interactive/</a></p>
9
- * @slot icon - To insert a custom icon into the named `icon` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Inline-level_content">inline content</a>.<p className="banner banner-sm banner-info">It is only meant for <code>img</code> or <code>svg</code> elements and overrides the `icon` property.</p>
8
+ * @slot default - Content to place into the `default` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Block-level_contentt">block content</a>.<post-banner type="warning" data-size="sm"><p>Even if it is generally possible, we do not recommend using interactive elements in this slot because the background of the card control is clickable.<br/>This can lead to confusion when the hit box of nested interactive controls is not clearly separated from the background, is invalid HTML and click events bubbling up to the card control will unexpectedly toggle it if they're not captured.<br/>More info: <a href="https://accessibilityinsights.io/info-examples/web/nested-interactive/">https://accessibilityinsights.io/info-examples/web/nested-interactive/</a></p></post-banner>
9
+ * @slot icon - To insert a custom icon into the named `icon` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Inline-level_content">inline content</a>.<post-banner data-size="sm"><p>It is only meant for <code>img</code> or <code>svg</code> elements and overrides the `icon` property.</p></post-banner>
10
10
  */
11
11
  export class PostCardControl {
12
12
  /**
@@ -229,14 +229,14 @@ export class PostCardControl {
229
229
  this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
230
230
  }
231
231
  render() {
232
- return (h(Host, { key: 'ff23ac518f715fc7c2727dd7c2abccd0fdb486da', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: '3519942dfeb694729e4b6c7c7df4b68854ccde81', class: {
232
+ return (h(Host, { key: 'e0f328775bee8a8a05ca02a0d74c30bab97a55b1', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: '21c4f081f2c4720dce65f0beed7127a7392c21bb', class: {
233
233
  'card-control': true,
234
234
  'is-checked': this.checked,
235
235
  'is-disabled': this.disabled,
236
236
  'is-focused': this.focused,
237
237
  'is-valid': this.validity !== undefined && this.validity !== false,
238
238
  'is-invalid': this.validity === false,
239
- } }, h("input", { key: 'f47a58485c7d507565e29c832ca1c3d6b053bc17', ref: el => (this.control = el), id: this.controlId, class: "card-control--input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === false, onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), h("label", { key: '65e8247d88c2cc6bb2e0be17e7d6fab3502fb364', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: 'df538a1f14b49fa7bd6907ef57d045c7303b6d77', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '1a79c6a2da57a5b8aef911dc2acd09e553b79489' })))));
239
+ } }, h("input", { key: '0850cf58736cd393e1aa34e7f4f44ccdfbde0f1a', ref: el => (this.control = el), id: this.controlId, class: "card-control--input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === false, onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), h("label", { key: '73956c65cb4a83e0feb3d915c8b5f7561307336f', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: '9b4104a21c0d960d9b3adbefdb38ba8e81ac1ab6', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '85469e7c5665c934c297a21870bc296a1ef95128' })))));
240
240
  }
241
241
  componentDidRender() {
242
242
  this.setHostContext();
@@ -347,7 +347,7 @@ export class PostCardControl {
347
347
  "optional": true,
348
348
  "docs": {
349
349
  "tags": [],
350
- "text": "Defines the `name` attribute of the control.\n<span className=\"mb-4 banner banner-sm banner-info\">This is a required property, when the control should participate in a native `form`. If not specified, a native `form` will never contain this controls value.</span>\n<span className=\"banner banner-sm banner-info\">This is a required property, when the control is used with type `radio`.</span>"
350
+ "text": "Defines the `name` attribute of the control.\n<post-banner data-size=\"sm\"><p>This is a required property, when the control should participate in a native `form`. If not specified, a native `form` will never contain this controls value.</p></post-banner>\n<post-banner data-size=\"sm\"><p>This is a required property, when the control is used with type `radio`.</p></post-banner>"
351
351
  },
352
352
  "getter": false,
353
353
  "setter": false,
@@ -366,7 +366,7 @@ export class PostCardControl {
366
366
  "optional": true,
367
367
  "docs": {
368
368
  "tags": [],
369
- "text": "Defines the `value` attribute of the control. <span className=\"banner banner-sm banner-info\">This is a required property, when the control is used with type `radio`.</span>"
369
+ "text": "Defines the `value` attribute of the control. <post-banner data-size=\"sm\"><p>This is a required property, when the control is used with type `radio`.</p></post-banner>"
370
370
  },
371
371
  "getter": false,
372
372
  "setter": false,
@@ -444,7 +444,7 @@ export class PostCardControl {
444
444
  "optional": true,
445
445
  "docs": {
446
446
  "tags": [],
447
- "text": "Defines the icon `name` inside the card.\n<span className=\"banner banner-sm banner-info\">If not set the icon will not show up.</span>"
447
+ "text": "Defines the icon `name` inside the card.\n<post-banner data-size=\"sm\"><p>If not set the icon will not show up.</p></post-banner>"
448
448
  },
449
449
  "getter": false,
450
450
  "setter": false,
@@ -481,7 +481,7 @@ export class PostCardControl {
481
481
  "composed": true,
482
482
  "docs": {
483
483
  "tags": [],
484
- "text": "An event emitted whenever the components checked state is toggled.\nThe event payload (emitted under `event.detail.state`) is a boolean: `true` if the component is checked, `false` if it is unchecked.\n<span className=\"banner banner-sm banner-info\">If the component is used with type `radio`, it will only emit this event, when the checked state is changing to `true`.</span>"
484
+ "text": "An event emitted whenever the components checked state is toggled.\nThe event payload (emitted under `event.detail.state`) is a boolean: `true` if the component is checked, `false` if it is unchecked.\n<post-banner data-size=\"sm\"><p>If the component is used with type `radio`, it will only emit this event, when the checked state is changing to `true`.</p></post-banner>"
485
485
  },
486
486
  "complexType": {
487
487
  "original": "{ state: boolean; value: string }",
@@ -4,8 +4,16 @@ import { version } from "../../../../package";
4
4
  * @slot default - Slot for placing visually hidden label in the close button.
5
5
  */
6
6
  export class PostClosebutton {
7
+ componentDidLoad() {
8
+ this.checkHiddenLabel();
9
+ }
10
+ checkHiddenLabel(slot = this.host.shadowRoot.querySelector('.visually-hidden slot')) {
11
+ if (slot.assignedNodes().length === 0) {
12
+ console.error(`The \`${this.host.localName}\` component requires content for accessibility.`);
13
+ }
14
+ }
7
15
  render() {
8
- return (h(Host, { key: '7b5e179b42eefd1823b2b2ef7ee17c94bd9f0ddd', "data-version": version }, h("button", { key: '471e68d1ddcfe741f5450d002b2daa86cec0f986', class: "btn btn-icon-close", type: "button" }, h("post-icon", { key: '928fa7460988cffa269a29506e68e056f84bcef8', "aria-hidden": "true", name: "closex" }), h("span", { key: 'c1501f4a8b7d8d95be7d02576b10143b9e6b0654', class: "visually-hidden" }, h("slot", { key: 'a9f1ab8db57486d420db0981090ad2ba5183c289' })))));
16
+ return (h(Host, { key: '639599ff890ccf96684035e80449a99dcad7de85', "data-version": version }, h("button", { key: '0cc95e3c46a6d91ec3d31fff498b4c0b784de272', class: "btn btn-icon-close", type: "button", onClick: () => this.postClick.emit() }, h("post-icon", { key: 'e30566a7734bb6a64a03f8983da015e7e7ec8c90', "aria-hidden": "true", name: "closex" }), h("span", { key: '549ef38de408b6af78605f5e2f6f5c9aa291c04b', class: "visually-hidden" }, h("slot", { key: '0325e4b54cfa8cfea9ddf243c1c25730d9a4b88f', onSlotchange: () => this.checkHiddenLabel() })))));
9
17
  }
10
18
  static get is() { return "post-closebutton"; }
11
19
  static get encapsulation() { return "shadow"; }
@@ -19,5 +27,23 @@ export class PostClosebutton {
19
27
  "$": ["post-closebutton.css"]
20
28
  };
21
29
  }
30
+ static get events() {
31
+ return [{
32
+ "method": "postClick",
33
+ "name": "postClick",
34
+ "bubbles": true,
35
+ "cancelable": true,
36
+ "composed": true,
37
+ "docs": {
38
+ "tags": [],
39
+ "text": "An event emitted when the close button is clicked.\nIt has no payload."
40
+ },
41
+ "complexType": {
42
+ "original": "void",
43
+ "resolved": "void",
44
+ "references": {}
45
+ }
46
+ }];
47
+ }
22
48
  static get elementRef() { return "host"; }
23
49
  }
@@ -149,7 +149,7 @@ export class PostPopovercontainer {
149
149
  Object.assign(this.arrowRef.style, {
150
150
  left: arrowX ? `${arrowX}px` : '',
151
151
  top: arrowY ? `${arrowY}px` : '',
152
- [staticSide]: '-7px',
152
+ [staticSide]: '-5px',
153
153
  });
154
154
  }
155
155
  }
@@ -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-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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,13 +1,13 @@
1
1
  import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
- import { v as version } from './p-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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-8U5GFtQP.js';
7
7
  import { n as nanoid } from './p-BLchVpF6.js';
8
- import { d as defineCustomElement$3 } from './p-DQE6fqIb.js';
9
- import { d as defineCustomElement$2 } from './p-Cd5RHPSU.js';
10
- import { d as defineCustomElement$1 } from './p-Cpy7mEQb.js';
8
+ import { d as defineCustomElement$3 } from './p-BM8mtEfS.js';
9
+ import { d as defineCustomElement$2 } from './p-C0H2ohSv.js';
10
+ import { d as defineCustomElement$1 } from './p-Cxrx7SXz.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-accordion-button-border-top-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,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
- import { v as version } from './p-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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-8U5GFtQP.js';
@@ -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-7hVD-I9l.js';
4
+ import { v as version } from './p-Z01QMrov.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,8 +1,8 @@
1
1
  import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
- import { v as version } from './p-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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-Cpy7mEQb.js';
5
+ import { d as defineCustomElement$1 } from './p-Cxrx7SXz.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,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-7hVD-I9l.js';
4
+ import { v as version } from './p-Z01QMrov.js';
5
5
 
6
6
  const PLACEMENT_TYPES = [
7
7
  'top',
@@ -2853,7 +2853,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
2853
2853
  Object.assign(this.arrowRef.style, {
2854
2854
  left: arrowX ? `${arrowX}px` : '',
2855
2855
  top: arrowY ? `${arrowY}px` : '',
2856
- [staticSide]: '-7px',
2856
+ [staticSide]: '-5px',
2857
2857
  });
2858
2858
  }
2859
2859
  }
@@ -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-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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';
@@ -0,0 +1,3 @@
1
+ const version = "10.0.0-next.47";
2
+
3
+ export { version as v };
@@ -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-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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 1rem;gap:.5rem;font-size:1rem;color:#050400;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;padding-block:.75rem}post-menu-item button:has(post-icon:last-child),post-menu-item a:has(post-icon:last-child){padding-inline-end:.75rem}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem}}post-menu-item button>post-icon:last-child,post-menu-item a>post-icon:last-child{margin-inline-start:.5rem}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:-2px !important;border-radius:4px}post-menu-item button::after,post-menu-item a::after{content:\"\";display:block;position:absolute;inset-block-end:0;inset-inline:0;height:3px;background-color:rgba(0,0,0,0);transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-menu-item button:hover,post-menu-item a:hover{color:#504f4b}post-menu-item button:hover::after,post-menu-item a:hover::after{background-color:currentColor}";
5
5
 
@@ -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-D1Ldeko3.js';
3
- import { v as version } from './p-7hVD-I9l.js';
2
+ import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-DP5pj8mq.js';
3
+ import { v as version } from './p-Z01QMrov.js';
4
4
  import { g as getFocusableChildren } from './p-C35MCWIp.js';
5
5
  import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
6
6
  import './p-CJ80BZ06.js';
@@ -1,4 +1,4 @@
1
- import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-DNnYEFO6.js';
1
+ import { P as PostAccordionItem$1, d as defineCustomElement$1 } from './p-BSvy4uym.js';
2
2
 
3
3
  const PostAccordionItem = PostAccordionItem$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { P as PostAccordion$1, d as defineCustomElement$1 } from './p-9rHPmDn6.js';
1
+ import { P as PostAccordion$1, d as defineCustomElement$1 } from './p-DVGX_JCp.js';
2
2
 
3
3
  const PostAccordion = PostAccordion$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-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.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,11 +1,36 @@
1
1
  import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
- import { s as slideDown, a as slideUp } from './p-BuLMaH5t.js';
3
- import { v as version } from './p-7hVD-I9l.js';
2
+ import { v as version } from './p-Z01QMrov.js';
4
3
  import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
5
4
  import './p-CJ80BZ06.js';
6
- import { d as defineCustomElement$2 } from './p-Cpy7mEQb.js';
5
+ import { d as defineCustomElement$2 } from './p-Cxrx7SXz.js';
7
6
 
8
- const postBackToTopCss = ":host{--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
7
+ // Define common animation options
8
+ const easing = 'ease';
9
+ const defaultDuration = 500;
10
+ const fill = 'forwards';
11
+ function createSlideFadeAnimation(el, keyframes, duration = defaultDuration) {
12
+ return el.animate(keyframes, {
13
+ duration: duration,
14
+ easing,
15
+ fill,
16
+ });
17
+ }
18
+ function slideUpAndFadeOut(el, translateY = '-100%', duration = defaultDuration) {
19
+ const keyframes = [
20
+ { transform: 'translateY(0)', opacity: '1' },
21
+ { transform: `translateY(${translateY})`, opacity: '0' },
22
+ ];
23
+ return createSlideFadeAnimation(el, keyframes, duration);
24
+ }
25
+ function slideDownAndFadeIn(el, translateY = '-100%', duration = defaultDuration) {
26
+ const keyframes = [
27
+ { transform: `translateY(${translateY})`, opacity: '0' },
28
+ { transform: 'translateY(0)', opacity: '1' },
29
+ ];
30
+ return createSlideFadeAnimation(el, keyframes, duration);
31
+ }
32
+
33
+ const postBackToTopCss = ":host{opacity:0;--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
9
34
 
10
35
  const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop extends H {
11
36
  constructor() {
@@ -26,10 +51,10 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
26
51
  /*Watch for changes in belowFold to show/hide the back to top button*/
27
52
  watchBelowFold(newValue) {
28
53
  if (newValue) {
29
- slideDown(this.host, this.translateY);
54
+ slideDownAndFadeIn(this.host, this.translateY);
30
55
  }
31
56
  else {
32
- slideUp(this.host, this.translateY);
57
+ slideUpAndFadeOut(this.host, this.translateY);
33
58
  }
34
59
  }
35
60
  scrollToTop() {
@@ -60,7 +85,7 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
60
85
  parseFloat(positionTop.replace('px', '')) -
61
86
  parseFloat(elevationHeight.replace('px', ''))) + 'px';
62
87
  if (this.belowFold) {
63
- slideDown(this.host, this.translateY);
88
+ slideDownAndFadeIn(this.host, this.translateY);
64
89
  }
65
90
  if (!this.belowFold) {
66
91
  this.host.style.transform = `translateY(${this.translateY})`;
@@ -79,7 +104,7 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
79
104
  window.removeEventListener('scroll', this.handleScroll);
80
105
  }
81
106
  render() {
82
- return (h(Host, { key: '7edc6db9d849cf9ce0308a2ac5b2c2f9bc4e47a9', "data-version": version }, h("button", { key: '610e81756ce3dd927f55d48beb8cd829b66fc247', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: 'bb1f3cc462de7680361f4cfd04abb1816aebd488', "aria-hidden": "true", name: "3026" }), h("span", { key: '4fbd84d78c425140adea5833450cef60af967f5a', class: "visually-hidden" }, this.label))));
107
+ return (h(Host, { key: '820244e9c039304895d78887000ed986707bf3b1', "data-version": version }, h("button", { key: 'c1d38883fbf31c50b2b00e08e6b22cbc6be37adb', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: '3cc57c355a12bf500f368e906d147be10f9014e7', "aria-hidden": "true", name: "3026" }), h("span", { key: '134e5c579e2d99d64c25ce21ab538e51520a6dd6', class: "visually-hidden" }, this.label))));
83
108
  }
84
109
  get host() { return this; }
85
110
  static get watchers() { return {