@swisspost/design-system-components 2.1.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  3. package/dist/cjs/check-one-of-f4f5d0c0.js +8 -0
  4. package/dist/cjs/heading-levels-608d432e.js +5 -0
  5. package/dist/cjs/{index-8c288b1a.js → index-a1440961.js} +2 -6
  6. package/dist/cjs/index-de783b23.js +1394 -0
  7. package/dist/cjs/index.cjs.js +21 -15
  8. package/dist/cjs/loader.cjs.js +5 -3
  9. package/dist/cjs/{package-96a46572.js → package-dacf5ec2.js} +1 -1
  10. package/dist/cjs/{post-accordion-9d27458a.js → post-accordion-225de951.js} +40 -23
  11. package/dist/cjs/post-accordion-item-935e122a.js +52 -0
  12. package/dist/cjs/post-accordion-item.cjs.entry.js +6 -4
  13. package/dist/cjs/post-accordion.cjs.entry.js +5 -3
  14. package/dist/cjs/post-alert-6041a34c.js +98 -0
  15. package/dist/cjs/post-alert.cjs.entry.js +5 -4
  16. package/dist/cjs/post-card-control-3c089d8e.js +314 -0
  17. package/dist/cjs/post-card-control.cjs.entry.js +14 -0
  18. package/dist/cjs/{post-collapsible-1867015c.js → post-collapsible-562268e9.js} +7 -7
  19. package/dist/cjs/post-collapsible.cjs.entry.js +5 -4
  20. package/dist/cjs/post-components.cjs.js +13 -11
  21. package/dist/cjs/{post-icon-07a67b83.js → post-icon-973d5c46.js} +5 -5
  22. package/dist/cjs/post-icon.cjs.entry.js +5 -4
  23. package/dist/cjs/post-popover-b0844e71.js +104 -0
  24. package/dist/cjs/post-popover.cjs.entry.js +3 -3
  25. package/dist/cjs/{post-popovercontainer-003c0819.js → post-popovercontainer-5bb6a804.js} +254 -55
  26. package/dist/cjs/post-popovercontainer.cjs.entry.js +3 -3
  27. package/dist/cjs/post-rating-d2845096.js +88 -0
  28. package/dist/cjs/post-rating.cjs.entry.js +3 -3
  29. package/dist/cjs/post-tab-header-6496a51b.js +32 -0
  30. package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
  31. package/dist/cjs/{post-tab-panel-6a9c4a4f.js → post-tab-panel-25bd8c74.js} +3 -3
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
  33. package/dist/cjs/{post-tabs-2eb6f376.js → post-tabs-4e4ee252.js} +23 -21
  34. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  35. package/dist/cjs/post-tag-cbc458ed.js +47 -0
  36. package/dist/cjs/post-tag.cjs.entry.js +11 -0
  37. package/dist/cjs/{post-tooltip-260d0627.js → post-tooltip-805bc0c0.js} +13 -9
  38. package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
  39. package/dist/collection/collection-manifest.json +5 -3
  40. package/dist/collection/components/post-accordion/post-accordion.js +68 -25
  41. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  42. package/dist/collection/components/post-accordion-item/post-accordion-item.js +17 -12
  43. package/dist/collection/components/post-alert/alert-types.js +1 -1
  44. package/dist/collection/components/post-alert/post-alert.css +2 -2
  45. package/dist/collection/components/post-alert/post-alert.js +9 -9
  46. package/dist/collection/components/post-card-control/post-card-control.css +31 -0
  47. package/dist/collection/components/post-card-control/post-card-control.js +523 -0
  48. package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
  49. package/dist/collection/components/post-collapsible/post-collapsible.js +6 -6
  50. package/dist/collection/components/post-icon/post-icon.js +4 -4
  51. package/dist/collection/components/post-popover/post-popover.css +29 -1
  52. package/dist/collection/components/post-popover/post-popover.js +3 -3
  53. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  54. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +7 -7
  55. package/dist/collection/components/post-rating/post-rating.css +28 -0
  56. package/dist/collection/components/post-rating/post-rating.js +8 -8
  57. package/dist/collection/components/post-tab-header/post-tab-header.css +30 -2
  58. package/dist/collection/components/post-tab-header/post-tab-header.js +3 -3
  59. package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -2
  60. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  61. package/dist/collection/components/post-tabs/post-tabs.js +23 -21
  62. package/dist/collection/components/post-tag/post-tag.css +31 -0
  63. package/dist/collection/components/post-tag/post-tag.js +119 -0
  64. package/dist/collection/components/post-tooltip/post-tooltip.js +12 -9
  65. package/dist/collection/index.js +2 -0
  66. package/dist/collection/types/heading-levels.js +1 -0
  67. package/dist/collection/types/index.js +1 -0
  68. package/dist/collection/utils/index.js +1 -0
  69. package/dist/collection/utils/sass-export.js +16 -0
  70. package/dist/components/check-one-of.js +6 -0
  71. package/dist/components/heading-levels.js +3 -0
  72. package/dist/components/index.js +2 -0
  73. package/dist/components/index2.js +1 -5
  74. package/dist/components/package.js +1 -1
  75. package/dist/components/post-accordion-item2.js +9 -8
  76. package/dist/components/post-accordion2.js +42 -22
  77. package/dist/components/post-alert2.js +7 -7
  78. package/dist/components/post-card-control.d.ts +11 -0
  79. package/dist/components/post-card-control.js +6 -0
  80. package/dist/components/post-card-control2.js +345 -0
  81. package/dist/components/post-collapsible2.js +4 -4
  82. package/dist/components/post-icon2.js +2 -2
  83. package/dist/components/post-popover2.js +2 -2
  84. package/dist/components/post-popovercontainer2.js +252 -53
  85. package/dist/components/post-rating2.js +6 -6
  86. package/dist/components/post-tab-header2.js +2 -2
  87. package/dist/components/post-tab-panel2.js +1 -1
  88. package/dist/components/post-tabs2.js +21 -19
  89. package/dist/components/post-tag.d.ts +11 -0
  90. package/dist/components/post-tag.js +6 -0
  91. package/dist/components/post-tag2.js +74 -0
  92. package/dist/components/post-tooltip2.js +11 -7
  93. package/dist/docs.d.ts +34 -0
  94. package/dist/docs.json +538 -25
  95. package/dist/esm/app-globals-0f993ce5.js +3 -0
  96. package/dist/esm/check-one-of-6b3ef8eb.js +6 -0
  97. package/dist/esm/heading-levels-5b7b4349.js +3 -0
  98. package/dist/esm/index-cf1d5611.js +1365 -0
  99. package/dist/esm/{index-b444db27.js → index-d1eba94c.js} +1 -5
  100. package/dist/esm/index.js +19 -15
  101. package/dist/esm/loader.js +6 -4
  102. package/dist/esm/{package-50a9c0c3.js → package-a837c1ad.js} +1 -1
  103. package/dist/esm/{post-accordion-33fe4f0e.js → post-accordion-fdd22c1d.js} +40 -23
  104. package/dist/esm/post-accordion-item-336f568c.js +50 -0
  105. package/dist/esm/post-accordion-item.entry.js +6 -4
  106. package/dist/esm/post-accordion.entry.js +5 -3
  107. package/dist/esm/post-alert-f48527d8.js +96 -0
  108. package/dist/esm/post-alert.entry.js +5 -4
  109. package/dist/esm/post-card-control-3e6a5855.js +312 -0
  110. package/dist/esm/post-card-control.entry.js +6 -0
  111. package/dist/esm/{post-collapsible-50dc361b.js → post-collapsible-486ab980.js} +7 -7
  112. package/dist/esm/post-collapsible.entry.js +5 -4
  113. package/dist/esm/post-components.js +14 -12
  114. package/dist/esm/{post-icon-00f314ae.js → post-icon-19fdfc4d.js} +5 -5
  115. package/dist/esm/post-icon.entry.js +5 -4
  116. package/dist/esm/post-popover-17164186.js +102 -0
  117. package/dist/esm/post-popover.entry.js +3 -3
  118. package/dist/esm/{post-popovercontainer-62e1fd82.js → post-popovercontainer-d19f9646.js} +254 -55
  119. package/dist/esm/post-popovercontainer.entry.js +3 -3
  120. package/dist/esm/post-rating-ea204778.js +86 -0
  121. package/dist/esm/post-rating.entry.js +3 -3
  122. package/dist/esm/post-tab-header-a97cdef2.js +30 -0
  123. package/dist/esm/post-tab-header.entry.js +3 -3
  124. package/dist/esm/{post-tab-panel-37a1331f.js → post-tab-panel-e6999395.js} +3 -3
  125. package/dist/esm/post-tab-panel.entry.js +3 -3
  126. package/dist/esm/{post-tabs-c4e65a45.js → post-tabs-524c699a.js} +23 -21
  127. package/dist/esm/post-tabs.entry.js +3 -3
  128. package/dist/esm/post-tag-e2035a81.js +45 -0
  129. package/dist/esm/post-tag.entry.js +3 -0
  130. package/dist/esm/{post-tooltip-033f63fa.js → post-tooltip-e4fc9c0c.js} +13 -9
  131. package/dist/esm/post-tooltip.entry.js +3 -3
  132. package/dist/post-components/index.esm.js +1 -1
  133. package/dist/post-components/p-07cc4853.entry.js +1 -0
  134. package/dist/post-components/p-0e410cec.entry.js +1 -0
  135. package/dist/post-components/p-14e22434.entry.js +1 -0
  136. package/dist/post-components/p-18a2ef27.js +1 -0
  137. package/dist/post-components/p-18b571e3.js +2 -0
  138. package/dist/post-components/p-247a1668.js +1 -0
  139. package/dist/post-components/p-2f4c40ee.js +1 -0
  140. package/dist/post-components/p-39a1dcb8.entry.js +1 -0
  141. package/dist/post-components/p-3b0988a1.js +1 -0
  142. package/dist/post-components/p-3ee18d14.entry.js +1 -0
  143. package/dist/post-components/p-4575a570.js +1 -0
  144. package/dist/post-components/p-59da0b80.js +1 -0
  145. package/dist/post-components/p-611b3c41.js +1 -0
  146. package/dist/post-components/p-63277771.entry.js +1 -0
  147. package/dist/post-components/p-67df1075.js +1 -0
  148. package/dist/post-components/p-74db9b35.entry.js +1 -0
  149. package/dist/post-components/p-7bb79254.entry.js +1 -0
  150. package/dist/post-components/p-8398de7b.entry.js +1 -0
  151. package/dist/post-components/p-9a59f2c7.js +1 -0
  152. package/dist/post-components/p-c4a7208a.js +1 -0
  153. package/dist/post-components/{p-7e7833f7.js → p-c85913ed.js} +3 -3
  154. package/dist/post-components/p-caaa5b4c.entry.js +1 -0
  155. package/dist/post-components/p-cf10d355.js +1 -0
  156. package/dist/post-components/p-d1f516dd.js +1 -0
  157. package/dist/post-components/p-d2eb0f0b.js +1 -0
  158. package/dist/post-components/p-d70f33cd.js +1 -0
  159. package/dist/post-components/p-da049db2.entry.js +1 -0
  160. package/dist/post-components/p-db114d1d.entry.js +1 -0
  161. package/dist/post-components/p-e1255160.js +1 -0
  162. package/dist/post-components/p-e929ddbc.js +1 -0
  163. package/dist/post-components/p-ebb54756.entry.js +1 -0
  164. package/dist/post-components/p-ed22dec0.js +1 -0
  165. package/dist/post-components/p-f5d8f3fe.entry.js +1 -0
  166. package/dist/post-components/p-f91c0e1b.js +1 -0
  167. package/dist/post-components/post-components.esm.js +1 -1
  168. package/dist/types/components/post-accordion/post-accordion.d.ts +8 -2
  169. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +3 -2
  170. package/dist/types/components/post-alert/alert-types.d.ts +2 -2
  171. package/dist/types/components/post-alert/post-alert.d.ts +2 -2
  172. package/dist/types/components/post-card-control/post-card-control.d.ts +112 -0
  173. package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -1
  174. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -1
  175. package/dist/types/components/post-rating/post-rating.d.ts +2 -2
  176. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
  177. package/dist/types/components/post-tag/post-tag.d.ts +27 -0
  178. package/dist/types/components.d.ts +191 -15
  179. package/dist/types/css-modules.js +0 -0
  180. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/css-modules.d.ts +6 -0
  181. package/dist/types/index.d.ts +2 -0
  182. package/dist/types/types/heading-levels.d.ts +2 -0
  183. package/dist/types/types/index.d.ts +1 -0
  184. package/dist/types/utils/index.d.ts +1 -0
  185. package/dist/types/utils/sass-export.d.ts +2 -0
  186. package/package.json +22 -22
  187. package/dist/cjs/index-f243643b.js +0 -2051
  188. package/dist/cjs/post-accordion-item-61fb55fa.js +0 -51
  189. package/dist/cjs/post-alert-a810f5b9.js +0 -98
  190. package/dist/cjs/post-popover-9610b64c.js +0 -104
  191. package/dist/cjs/post-rating-75574abd.js +0 -88
  192. package/dist/cjs/post-tab-header-85424e32.js +0 -32
  193. package/dist/esm/index-1708db56.js +0 -2022
  194. package/dist/esm/post-accordion-item-1fd95c9f.js +0 -49
  195. package/dist/esm/post-alert-65d67f69.js +0 -96
  196. package/dist/esm/post-popover-40bfd1b7.js +0 -102
  197. package/dist/esm/post-rating-f7a79ed4.js +0 -86
  198. package/dist/esm/post-tab-header-0683252a.js +0 -30
  199. package/dist/post-components/p-00dcad55.js +0 -1
  200. package/dist/post-components/p-01e57281.entry.js +0 -1
  201. package/dist/post-components/p-06c989fb.entry.js +0 -1
  202. package/dist/post-components/p-07ffb6de.entry.js +0 -1
  203. package/dist/post-components/p-10b4cf7a.js +0 -2
  204. package/dist/post-components/p-26c658c1.entry.js +0 -1
  205. package/dist/post-components/p-2a964700.js +0 -1
  206. package/dist/post-components/p-35f14000.js +0 -1
  207. package/dist/post-components/p-3fb09ecd.js +0 -1
  208. package/dist/post-components/p-4b0a45d8.entry.js +0 -1
  209. package/dist/post-components/p-53e8e4e7.entry.js +0 -1
  210. package/dist/post-components/p-598b11b6.js +0 -1
  211. package/dist/post-components/p-5b6ee52a.entry.js +0 -1
  212. package/dist/post-components/p-8139faa4.entry.js +0 -1
  213. package/dist/post-components/p-8cd6d7c2.js +0 -1
  214. package/dist/post-components/p-99a9602e.js +0 -1
  215. package/dist/post-components/p-a2775477.entry.js +0 -1
  216. package/dist/post-components/p-a905b16b.entry.js +0 -1
  217. package/dist/post-components/p-aa02111b.js +0 -1
  218. package/dist/post-components/p-b135d3e2.js +0 -1
  219. package/dist/post-components/p-b81e61ed.entry.js +0 -1
  220. package/dist/post-components/p-d6bc34ff.js +0 -1
  221. package/dist/post-components/p-da2b8e26.entry.js +0 -1
  222. package/dist/post-components/p-f0476913.js +0 -1
  223. package/dist/post-components/p-f0e82e63.js +0 -1
  224. package/dist/post-components/p-ff0e1564.js +0 -1
@@ -0,0 +1,523 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { checkNonEmpty, checkOneOf } from "../../utils/index";
3
+ import { version } from "../../../../package";
4
+ // remove as soon as all browser support :host-context()
5
+ // https://caniuse.com/?search=%3Ahost-context()
6
+ import scss from "./post-card-control.module.scss";
7
+ import { parse } from "../../utils/sass-export";
8
+ const SCSS_VARIABLES = parse(scss);
9
+ let cardControlIds = 0;
10
+ /**
11
+ * @class PostCardControl - representing a stencil component
12
+ *
13
+ * @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="alert alert-sm alert-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>
14
+ * @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="alert alert-sm alert-info">It is only meant for <code>img</code> or <code>svg</code> elements and overrides the `icon` property.</p>
15
+ */
16
+ export class PostCardControl {
17
+ /**
18
+ * A public method to reset the controls `checked` and `validity` state.
19
+ * The validity state is set to `null`, so it's neither valid nor invalid.
20
+ */
21
+ async reset() {
22
+ this.validity = null;
23
+ this.controlSetChecked(this.initialChecked);
24
+ }
25
+ /**
26
+ * A hidden public method to reset the group controls `checked` state to `false`.
27
+ */
28
+ async groupReset() {
29
+ if (this.disabled)
30
+ this.control.checked = this.checked = false;
31
+ this.controlSetChecked(false);
32
+ }
33
+ validateControlLabel(label = this.label) {
34
+ checkNonEmpty(label, 'The "post-card-control" element requires its "label" property to be set.');
35
+ }
36
+ validateControlType(type = this.type) {
37
+ checkOneOf(type, ['checkbox', 'radio'], 'The "post-card-control" element requires its "type" prop to be one of either "checkbox" or "radio".');
38
+ }
39
+ updateControlChecked(checked = this.checked) {
40
+ this.controlSetChecked(checked);
41
+ }
42
+ updateControlDisbled() {
43
+ this.controlSetChecked(this.checked);
44
+ }
45
+ constructor() {
46
+ this.EVENT_MAP = {
47
+ input: 'postInput',
48
+ change: 'postChange',
49
+ };
50
+ this.KEYCODES = {
51
+ SPACE: 'Space',
52
+ LEFT: 'ArrowLeft',
53
+ UP: 'ArrowUp',
54
+ RIGHT: 'ArrowRight',
55
+ DOWN: 'ArrowDown',
56
+ };
57
+ this.group = {
58
+ hosts: [],
59
+ members: [],
60
+ first: null,
61
+ last: null,
62
+ checked: null,
63
+ focused: null,
64
+ };
65
+ this.controlId = `PostCardControl_${cardControlIds++}`;
66
+ // remove as soon as all browser support the :host-context() selector
67
+ this.HOST_CONTEXT_FILTERS = ['fieldset', ...SCSS_VARIABLES['dark-bg-selectors']];
68
+ this.focused = false;
69
+ this.label = undefined;
70
+ this.description = null;
71
+ this.type = undefined;
72
+ this.name = null;
73
+ this.value = null;
74
+ this.checked = false;
75
+ this.disabled = false;
76
+ this.validity = null;
77
+ this.icon = null;
78
+ this.cardClickHandler = this.cardClickHandler.bind(this);
79
+ this.controlClickHandler = this.controlClickHandler.bind(this);
80
+ this.controlChangeHandler = this.controlChangeHandler.bind(this);
81
+ this.controlFocusHandler = this.controlFocusHandler.bind(this);
82
+ this.controlKeyDownHandler = this.controlKeyDownHandler.bind(this);
83
+ }
84
+ cardClickHandler(e) {
85
+ e.stopPropagation();
86
+ // if this was not the clicked element anyway, trigger click on control to change it
87
+ if (e.target !== this.control)
88
+ this.control.click();
89
+ }
90
+ controlClickHandler(e) {
91
+ e.stopPropagation();
92
+ // if control is disabled do nothing
93
+ // else control value will fire a change event, which is handled in the controlChangeHandler method
94
+ if (this.disabled)
95
+ e.preventDefault();
96
+ }
97
+ controlChangeHandler(e) {
98
+ e.stopPropagation();
99
+ this.groupCollectMembers();
100
+ this.controlSetChecked(this.control.checked, e);
101
+ this.groupSetChecked(this.control, e);
102
+ }
103
+ controlFocusHandler() {
104
+ this.focused = this.host === document.activeElement;
105
+ }
106
+ // https://googlechromelabs.github.io/howto-components/howto-radio-group/
107
+ controlKeyDownHandler(e) {
108
+ if (this.type === 'radio') {
109
+ e.stopPropagation();
110
+ if (Object.values(this.KEYCODES).includes(e.code))
111
+ e.preventDefault();
112
+ this.groupCollectMembers();
113
+ switch (e.code) {
114
+ case this.KEYCODES.UP:
115
+ case this.KEYCODES.LEFT:
116
+ this.groupSetChecked(this.groupGetPrev(), e);
117
+ break;
118
+ case this.KEYCODES.DOWN:
119
+ case this.KEYCODES.RIGHT:
120
+ this.groupSetChecked(this.groupGetNext(), e);
121
+ break;
122
+ case this.KEYCODES.SPACE:
123
+ this.groupSetChecked(this.control, e);
124
+ break;
125
+ default:
126
+ break;
127
+ }
128
+ }
129
+ }
130
+ controlSetChecked(checked, e) {
131
+ if (!this.control)
132
+ return;
133
+ if (this.disabled) {
134
+ this.internals.setFormValue(null);
135
+ }
136
+ else {
137
+ this.control.checked = this.checked = checked;
138
+ this.internals.setFormValue(this.checked ? this.control.value : null);
139
+ if (e) {
140
+ const isCheckbox = this.type === 'checkbox';
141
+ const isRadioAndChecked = this.type === 'radio' && this.checked;
142
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
143
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio
144
+ // if an event parameter is given and a native control would fire an event, emit the corresponding event to the light dom
145
+ if (isCheckbox || isRadioAndChecked)
146
+ this[this.EVENT_MAP[e.type]].emit({ state: this.checked, value: this.value });
147
+ }
148
+ }
149
+ }
150
+ groupCollectMembers() {
151
+ var _a, _b;
152
+ if (this.type === 'radio' && this.name) {
153
+ this.group.hosts = Array.from(document.querySelectorAll(`post-card-control[type="radio"][name="${this.name}"]`));
154
+ this.group.members = this.group.hosts
155
+ .map(m => m.shadowRoot.querySelector('input[type="radio"]'))
156
+ .filter(m => m !== null);
157
+ if (this.group.members.length > 1) {
158
+ this.group.first = this.group.members[0];
159
+ this.group.last = this.group.members[this.group.members.length - 1];
160
+ this.group.checked = (_a = this.group.members.find(m => m.checked)) !== null && _a !== void 0 ? _a : null;
161
+ this.group.focused =
162
+ (_b = this.group.members.find(m => m.getRootNode().host === document.activeElement)) !== null && _b !== void 0 ? _b : this.group.first;
163
+ const focusableMember = this.group.checked || this.group.focused || this.group.first;
164
+ this.group.members.forEach(m => {
165
+ m.tabIndex = m === focusableMember ? 0 : -1;
166
+ });
167
+ }
168
+ }
169
+ }
170
+ groupGetPrev() {
171
+ var _a;
172
+ const focusedIndex = this.group.members.findIndex(m => m.id === this.group.focused.id);
173
+ return (_a = this.group.members.find((_m, i) => i === focusedIndex - 1)) !== null && _a !== void 0 ? _a : this.group.last;
174
+ }
175
+ groupGetNext() {
176
+ var _a;
177
+ const focusedIndex = this.group.members.findIndex(m => m.id === this.group.focused.id);
178
+ return (_a = this.group.members.find((_m, i) => i === focusedIndex + 1)) !== null && _a !== void 0 ? _a : this.group.first;
179
+ }
180
+ groupSetChecked(newChecked, e) {
181
+ if (this.group.members.length > 1) {
182
+ const isKeyboardEvent = e.type === 'keydown';
183
+ const newIsAriaDisabled = newChecked.hasAttribute('aria-disabled');
184
+ const newIndex = this.group.members.findIndex(m => m === newChecked);
185
+ if (isKeyboardEvent)
186
+ newChecked.focus();
187
+ // if new is disabled, do not reset/set anything
188
+ if (!newIsAriaDisabled) {
189
+ // reset all group members but the newChecked
190
+ this.group.hosts
191
+ .filter((_h, i) => i !== newIndex)
192
+ .forEach(h => {
193
+ h.groupReset();
194
+ });
195
+ // if method was called by keyboard event, select newChecked
196
+ // else this has already been done by clicking on the newChecked element already
197
+ if (isKeyboardEvent)
198
+ newChecked.click();
199
+ }
200
+ }
201
+ }
202
+ setHostContext() {
203
+ this.hostContext = [];
204
+ let element = this.host;
205
+ while (element) {
206
+ const localName = element.localName;
207
+ const id = element.id ? `#${element.id}` : '';
208
+ const classes = element.classList.length > 0 ? `.${Array.from(element.classList).join('.')}` : '';
209
+ this.hostContext.push(`${localName}${id}${classes}`);
210
+ element = element.parentElement;
211
+ }
212
+ this.hostContext = this.hostContext.filter(ctx => this.HOST_CONTEXT_FILTERS.find(f => ctx.includes(f)));
213
+ }
214
+ connectedCallback() {
215
+ // remove as soon as all browser support :host-context()
216
+ this.setHostContext();
217
+ this.initialChecked = this.checked;
218
+ }
219
+ componentWillRender() {
220
+ this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
221
+ }
222
+ render() {
223
+ return (h(Host, { key: 'd471cfc0f5073dad9381a0e5dd19a621a47c45a6', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: '2e1d0e5de66ae66988e1cca7479b918e1cf0d498', class: {
224
+ 'card-control': true,
225
+ 'is-checked': this.checked,
226
+ 'is-disabled': this.disabled,
227
+ 'is-focused': this.focused,
228
+ 'is-valid': this.validity !== null && this.validity !== 'false',
229
+ 'is-invalid': this.validity === 'false',
230
+ }, "data-host-context": this.hostContext.join(' ') }, h("input", { key: 'fefab8a7853cce9facbaa009301ca5380107972c', ref: el => (this.control = el), id: this.controlId, class: "card-control--input form-check-input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_label ${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: '3e7ab241125d0cf597d3c66a42f86b937b2e3647', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label form-check-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: 'd70262c70f206ce0a0f8f64dba74d95db80e5f14', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: 'd1b9a7b850706b5efd6a0ec8508ce4e7aedd8f8e' })))));
231
+ }
232
+ componentDidRender() {
233
+ this.groupCollectMembers();
234
+ }
235
+ componentDidLoad() {
236
+ this.validateControlLabel();
237
+ this.validateControlType();
238
+ }
239
+ // https://stenciljs.com/docs/form-associated
240
+ /* eslint-disable @stencil-community/own-methods-must-be-private */
241
+ formAssociatedCallback() {
242
+ this.controlSetChecked(this.checked);
243
+ }
244
+ formDisabledCallback(disabled) {
245
+ this.disabled = disabled;
246
+ }
247
+ formStateRestoreCallback(checked) {
248
+ this.controlSetChecked(checked);
249
+ }
250
+ formResetCallback() {
251
+ this.reset();
252
+ }
253
+ static get is() { return "post-card-control"; }
254
+ static get encapsulation() { return "shadow"; }
255
+ static get formAssociated() { return true; }
256
+ static get originalStyleUrls() {
257
+ return {
258
+ "$": ["post-card-control.scss"]
259
+ };
260
+ }
261
+ static get styleUrls() {
262
+ return {
263
+ "$": ["post-card-control.css"]
264
+ };
265
+ }
266
+ static get properties() {
267
+ return {
268
+ "label": {
269
+ "type": "string",
270
+ "mutable": false,
271
+ "complexType": {
272
+ "original": "string",
273
+ "resolved": "string",
274
+ "references": {}
275
+ },
276
+ "required": true,
277
+ "optional": false,
278
+ "docs": {
279
+ "tags": [],
280
+ "text": "Defines the text in the control-label."
281
+ },
282
+ "attribute": "label",
283
+ "reflect": false
284
+ },
285
+ "description": {
286
+ "type": "string",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "string",
290
+ "resolved": "string",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": false,
295
+ "docs": {
296
+ "tags": [],
297
+ "text": "Defines the description in the control-label."
298
+ },
299
+ "attribute": "description",
300
+ "reflect": false,
301
+ "defaultValue": "null"
302
+ },
303
+ "type": {
304
+ "type": "string",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "'checkbox' | 'radio'",
308
+ "resolved": "\"checkbox\" | \"radio\"",
309
+ "references": {}
310
+ },
311
+ "required": true,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Defines the `type` attribute of the control."
316
+ },
317
+ "attribute": "type",
318
+ "reflect": false
319
+ },
320
+ "name": {
321
+ "type": "string",
322
+ "mutable": false,
323
+ "complexType": {
324
+ "original": "string",
325
+ "resolved": "string",
326
+ "references": {}
327
+ },
328
+ "required": false,
329
+ "optional": false,
330
+ "docs": {
331
+ "tags": [],
332
+ "text": "Defines the `name` attribute of the control.\n<span className=\"alert alert-sm alert-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=\"alert alert-sm alert-info\">This is a required property, when the control is used with type `radio`.</span>"
333
+ },
334
+ "attribute": "name",
335
+ "reflect": false,
336
+ "defaultValue": "null"
337
+ },
338
+ "value": {
339
+ "type": "string",
340
+ "mutable": false,
341
+ "complexType": {
342
+ "original": "string",
343
+ "resolved": "string",
344
+ "references": {}
345
+ },
346
+ "required": false,
347
+ "optional": false,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": "Defines the `value` attribute of the control. <span className=\"alert alert-sm alert-info\">This is a required property, when the control is used with type `radio`.</span>"
351
+ },
352
+ "attribute": "value",
353
+ "reflect": false,
354
+ "defaultValue": "null"
355
+ },
356
+ "checked": {
357
+ "type": "boolean",
358
+ "mutable": true,
359
+ "complexType": {
360
+ "original": "boolean",
361
+ "resolved": "boolean",
362
+ "references": {}
363
+ },
364
+ "required": false,
365
+ "optional": false,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "Defines the `checked` attribute of the control. If `true`, the control is selected at its value will be included in the forms data."
369
+ },
370
+ "attribute": "checked",
371
+ "reflect": false,
372
+ "defaultValue": "false"
373
+ },
374
+ "disabled": {
375
+ "type": "boolean",
376
+ "mutable": true,
377
+ "complexType": {
378
+ "original": "boolean",
379
+ "resolved": "boolean",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": false,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "Defines the `disabled` attribute of the control. If `true`, the user can not interact with the control and the controls value will not be included in the forms data."
387
+ },
388
+ "attribute": "disabled",
389
+ "reflect": false,
390
+ "defaultValue": "false"
391
+ },
392
+ "validity": {
393
+ "type": "string",
394
+ "mutable": true,
395
+ "complexType": {
396
+ "original": "null | 'true' | 'false'",
397
+ "resolved": "\"false\" | \"true\"",
398
+ "references": {}
399
+ },
400
+ "required": false,
401
+ "optional": false,
402
+ "docs": {
403
+ "tags": [],
404
+ "text": "Defines the validation `validity` of the control.\nTo reset validity to an undefiend state, simply remove the attribute from the control."
405
+ },
406
+ "attribute": "validity",
407
+ "reflect": false,
408
+ "defaultValue": "null"
409
+ },
410
+ "icon": {
411
+ "type": "string",
412
+ "mutable": false,
413
+ "complexType": {
414
+ "original": "string",
415
+ "resolved": "string",
416
+ "references": {}
417
+ },
418
+ "required": false,
419
+ "optional": false,
420
+ "docs": {
421
+ "tags": [],
422
+ "text": "Defines the icon `name` inside of the card.\n<span className=\"alert alert-sm alert-info\">If not set the icon will not show up.</span>"
423
+ },
424
+ "attribute": "icon",
425
+ "reflect": false,
426
+ "defaultValue": "null"
427
+ }
428
+ };
429
+ }
430
+ static get states() {
431
+ return {
432
+ "focused": {}
433
+ };
434
+ }
435
+ static get events() {
436
+ return [{
437
+ "method": "postInput",
438
+ "name": "postInput",
439
+ "bubbles": true,
440
+ "cancelable": true,
441
+ "composed": true,
442
+ "docs": {
443
+ "tags": [],
444
+ "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."
445
+ },
446
+ "complexType": {
447
+ "original": "{ state: boolean; value: string }",
448
+ "resolved": "{ state: boolean; value: string; }",
449
+ "references": {}
450
+ }
451
+ }, {
452
+ "method": "postChange",
453
+ "name": "postChange",
454
+ "bubbles": true,
455
+ "cancelable": true,
456
+ "composed": true,
457
+ "docs": {
458
+ "tags": [],
459
+ "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=\"alert alert-sm alert-info\">If the component is used with type `radio`, it will only emit this event, when the checked state is changing to `true`.</span>"
460
+ },
461
+ "complexType": {
462
+ "original": "{ state: boolean; value: string }",
463
+ "resolved": "{ state: boolean; value: string; }",
464
+ "references": {}
465
+ }
466
+ }];
467
+ }
468
+ static get methods() {
469
+ return {
470
+ "reset": {
471
+ "complexType": {
472
+ "signature": "() => Promise<void>",
473
+ "parameters": [],
474
+ "references": {
475
+ "Promise": {
476
+ "location": "global",
477
+ "id": "global::Promise"
478
+ }
479
+ },
480
+ "return": "Promise<void>"
481
+ },
482
+ "docs": {
483
+ "text": "A public method to reset the controls `checked` and `validity` state.\nThe validity state is set to `null`, so it's neither valid nor invalid.",
484
+ "tags": []
485
+ }
486
+ },
487
+ "groupReset": {
488
+ "complexType": {
489
+ "signature": "() => Promise<void>",
490
+ "parameters": [],
491
+ "references": {
492
+ "Promise": {
493
+ "location": "global",
494
+ "id": "global::Promise"
495
+ }
496
+ },
497
+ "return": "Promise<void>"
498
+ },
499
+ "docs": {
500
+ "text": "A hidden public method to reset the group controls `checked` state to `false`.",
501
+ "tags": []
502
+ }
503
+ }
504
+ };
505
+ }
506
+ static get elementRef() { return "host"; }
507
+ static get watchers() {
508
+ return [{
509
+ "propName": "label",
510
+ "methodName": "validateControlLabel"
511
+ }, {
512
+ "propName": "type",
513
+ "methodName": "validateControlType"
514
+ }, {
515
+ "propName": "checked",
516
+ "methodName": "updateControlChecked"
517
+ }, {
518
+ "propName": "disabled",
519
+ "methodName": "updateControlDisbled"
520
+ }];
521
+ }
522
+ static get attachInternalsMemberName() { return "internals"; }
523
+ }
@@ -1 +1 @@
1
- :host{display:block}
1
+ :host{display:block}.collapse{overflow:hidden}
@@ -1,7 +1,7 @@
1
1
  import { h, Host, } from "@stencil/core";
2
- import { version } from "../../../package.json";
2
+ import { version } from "../../../../package";
3
3
  import { collapse, expand } from "../../animations/collapse";
4
- import { checkEmptyOrType, isMotionReduced } from "../../utils";
4
+ import { checkEmptyOrType, isMotionReduced } from "../../utils/index";
5
5
  /**
6
6
  * @slot default - Slot for placing content within the collapsible element.
7
7
  */
@@ -36,7 +36,7 @@ export class PostCollapsible {
36
36
  return open;
37
37
  this.isOpen = !this.isOpen;
38
38
  if (this.isLoaded)
39
- this.collapseChange.emit(this.isOpen);
39
+ this.postToggle.emit(this.isOpen);
40
40
  const animation = open ? expand(this.collapsible) : collapse(this.collapsible);
41
41
  if (!this.isLoaded || isMotionReduced())
42
42
  animation.finish();
@@ -45,7 +45,7 @@ export class PostCollapsible {
45
45
  return this.isOpen;
46
46
  }
47
47
  render() {
48
- return (h(Host, { key: 'cf0622c0844054ac31023781a393b174ac263397', id: this.id, "data-version": version }, h("div", { key: '4138a3402559b59bc2994eace597bbf27623f806', class: "collapse", id: `${this.id}--collapse`, ref: el => (this.collapsible = el) }, h("slot", { key: '9a6fd61dcc0925b8ac1bf2353c4a093ae23fac22' }))));
48
+ return (h(Host, { key: 'ae26c034e446105728047e8636d9cc2b81ce56f8', id: this.id, "data-version": version }, h("div", { key: 'ed041dbf2c64e15863edeba34e524d3eb685f562', class: "collapse", id: `${this.id}--collapse`, ref: el => (this.collapsible = el) }, h("slot", { key: 'd579a77be3d99d52a15bc9da00669d8be27a92cf' }))));
49
49
  }
50
50
  static get is() { return "post-collapsible"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -89,8 +89,8 @@ export class PostCollapsible {
89
89
  }
90
90
  static get events() {
91
91
  return [{
92
- "method": "collapseChange",
93
- "name": "collapseChange",
92
+ "method": "postToggle",
93
+ "name": "postToggle",
94
94
  "bubbles": true,
95
95
  "cancelable": true,
96
96
  "composed": true,
@@ -1,6 +1,6 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { checkNonEmpty, checkType, checkEmptyOrType, checkEmptyOrOneOf } from "../../utils";
3
- import { version } from "../../../package.json";
2
+ import { checkNonEmpty, checkType, checkEmptyOrType, checkEmptyOrOneOf } from "../../utils/index";
3
+ import { version } from "../../../../package";
4
4
  const CDN_URL = 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons';
5
5
  const ANIMATION_NAMES = [
6
6
  'cylon',
@@ -67,7 +67,7 @@ export class PostIcon {
67
67
  const metaBase = (_b = (_a = document.head
68
68
  .querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
69
69
  const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
70
- const fileName = `${this.name}.svg#icon`;
70
+ const fileName = `${this.name}.svg`;
71
71
  const filePath = `${fileBase}${fileName}`;
72
72
  this.path = new URL(filePath, window.location.origin).toString();
73
73
  }
@@ -81,7 +81,7 @@ export class PostIcon {
81
81
  })
82
82
  .filter(([_key, value]) => value !== null)
83
83
  .reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
84
- return (h(Host, { key: '8a892fa9fa24e07995453e0e491328fde76dc496', "data-version": version }, h("span", { key: '14761a251eb0ab02df268aa23597151ccb71ebc8', style: svgStyles })));
84
+ return (h(Host, { key: '95fa0f7a09d3430bb5d621e01b57188742920eb4', "data-version": version }, h("span", { key: 'c824e3705dc83665bb6f7649381654e6d1e07dfb', style: svgStyles })));
85
85
  }
86
86
  static get is() { return "post-icon"; }
87
87
  static get encapsulation() { return "shadow"; }
@@ -1,3 +1,31 @@
1
1
  /*!
2
+ * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
3
+ * Copyright 2011-2021 The Bootstrap Authors
4
+ * Copyright 2011-2021 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6
+
7
+ * The MIT License (MIT)
8
+
9
+ * Copyright (c) 2011-2020 Twitter, Inc.
10
+ * Copyright (c) 2011-2020 The Bootstrap Authors
11
+
12
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ * of this software and associated documentation files (the "Software"), to deal
14
+ * in the Software without restriction, including without limitation the rights
15
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ * copies of the Software, and to permit persons to whom the Software is
17
+ * furnished to do so, subject to the following conditions:
18
+
19
+ * The above copyright notice and this permission notice shall be included in
20
+ * all copies or substantial portions of the Software.
21
+
22
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
+ * THE SOFTWARE.
29
+ *//*!
2
30
  * Copyright 2021 by Swiss Post, Information Technology
3
- */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button;outline:none;outline-offset:2px;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline:2px solid var(--post-contrast-color)}.btn-close::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:"";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color: #fff;--post-bg-rgb: 51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;max-width:min(66vw,60rem)}@media(max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em}
31
+ */.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:"";display:block;height:1.5rem;width:1.5rem}:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color: #fff;--post-bg-rgb: 51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px}@media(max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { version } from "../../../package.json";
2
+ import { version } from "../../../../package";
3
3
  import { getAttributeObserver } from "../../utils/attribute-observer";
4
4
  /**
5
5
  * @slot default - Slot for placing content inside the popover.
@@ -88,7 +88,7 @@ export class PostPopover {
88
88
  this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
89
89
  }
90
90
  render() {
91
- return (h(Host, { key: '90cd97eedfdecb6666c5825cd09bb323cf857cbb', "data-version": version }, h("post-popovercontainer", { key: 'fe555322454124f4b9a618c634f2ae504ec89c07', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'd6e30229dd8d38c95e165d1fc55b1c7af5c7b5e2', class: "popover-container" }, h("div", { key: 'c43c1347bb6bfe3532387693b1761b53533584ec', class: "popover-content" }, h("slot", { key: '24a4aa1df86497a4fe4b72adaac76f6e69db9d9e' })), h("button", { key: '3a5e52f480ddd1ef41d068e476d2a8c5f7d77c4a', class: "btn-close", onClick: () => this.hide() }, h("span", { key: '493310100d3f76dfe5bf6cf1d64250b7551be43c', class: "visually-hidden" }, this.closeButtonCaption))))));
91
+ return (h(Host, { key: '97db4a92db81f3a84ca272af8f79981cf181024d', "data-version": version }, h("post-popovercontainer", { key: '291247845dc11572a5722aa949c1dfa74e521edd', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '92137bf8c92633c8578c89c7b0c8252b0b59e2fa', class: "popover-container" }, h("div", { key: '06f79f59e90ca439b552380af0e151084adadf03', class: "popover-content" }, h("slot", { key: 'c37c742ac7cf24f9440ac3b862761fcd937f7658' })), h("button", { key: '0e6f316574720e0f901af56e0dbb99f86e36c5b4', class: "btn-close", onClick: () => this.hide() }, h("span", { key: '77c41e8e8df74649ce9ca21740c77e78336905e6', class: "visually-hidden" }, this.closeButtonCaption))))));
92
92
  }
93
93
  static get is() { return "post-popover"; }
94
94
  static get encapsulation() { return "shadow"; }
@@ -114,7 +114,7 @@ export class PostPopover {
114
114
  "Placement": {
115
115
  "location": "import",
116
116
  "path": "@floating-ui/dom",
117
- "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
117
+ "id": "../../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
118
118
  }
119
119
  }
120
120
  },