@swisspost/design-system-components 1.4.0 → 1.5.1

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 (162) hide show
  1. package/dist/cjs/check-one-of-4c2e8b2e.js +10 -0
  2. package/dist/cjs/check-one-of-4c2e8b2e.js.map +1 -0
  3. package/dist/cjs/{check-type-f24cf91d.js → check-type-508a21a5.js} +1 -7
  4. package/dist/cjs/check-type-508a21a5.js.map +1 -0
  5. package/dist/cjs/fade-8c6d4fa7.js +12 -0
  6. package/dist/cjs/fade-8c6d4fa7.js.map +1 -0
  7. package/dist/cjs/{index-50d7d035.js → index-12cc37c9.js} +107 -5
  8. package/dist/cjs/index-12cc37c9.js.map +1 -0
  9. package/dist/cjs/index-f8f6f146.js +28 -0
  10. package/dist/cjs/index-f8f6f146.js.map +1 -0
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/package-112e1698.js +7 -0
  13. package/dist/cjs/package-112e1698.js.map +1 -0
  14. package/dist/cjs/post-alert.cjs.entry.js +105 -0
  15. package/dist/cjs/post-alert.cjs.entry.js.map +1 -0
  16. package/dist/cjs/post-collapsible.cjs.entry.js +6 -5
  17. package/dist/cjs/post-collapsible.cjs.entry.js.map +1 -1
  18. package/dist/cjs/post-components.cjs.js +2 -2
  19. package/dist/cjs/post-icon.cjs.entry.js +12 -21
  20. package/dist/cjs/post-icon.cjs.entry.js.map +1 -1
  21. package/dist/cjs/post-tab-header.cjs.entry.js +4 -4
  22. package/dist/cjs/post-tab-header.cjs.entry.js.map +1 -1
  23. package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
  24. package/dist/cjs/post-tabs.cjs.entry.js +31 -17
  25. package/dist/cjs/post-tabs.cjs.entry.js.map +1 -1
  26. package/dist/cjs/post-tooltip.cjs.entry.js +5097 -0
  27. package/dist/cjs/post-tooltip.cjs.entry.js.map +1 -0
  28. package/dist/collection/collection-manifest.json +3 -1
  29. package/dist/collection/components/post-alert/alert-types.js +2 -0
  30. package/dist/collection/components/post-alert/alert-types.js.map +1 -0
  31. package/dist/collection/components/post-alert/post-alert.css +35 -0
  32. package/dist/collection/components/post-alert/post-alert.js +255 -0
  33. package/dist/collection/components/post-alert/post-alert.js.map +1 -0
  34. package/dist/collection/components/post-collapsible/post-collapsible.css +2 -227
  35. package/dist/collection/components/post-icon/post-icon.css +1 -102
  36. package/dist/collection/components/post-tab-header/post-tab-header.css +3 -337
  37. package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
  38. package/dist/collection/components/post-tab-header/post-tab-header.js.map +1 -1
  39. package/dist/collection/components/post-tab-panel/post-tab-panel.css +1 -3
  40. package/dist/collection/components/post-tabs/post-tabs.css +1 -148
  41. package/dist/collection/components/post-tabs/post-tabs.js +26 -7
  42. package/dist/collection/components/post-tabs/post-tabs.js.map +1 -1
  43. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -0
  44. package/dist/collection/components/post-tooltip/post-tooltip.js +338 -0
  45. package/dist/collection/components/post-tooltip/post-tooltip.js.map +1 -0
  46. package/dist/collection/components/post-tooltip/types.js +2 -0
  47. package/dist/collection/components/post-tooltip/types.js.map +1 -0
  48. package/dist/collection/utils/property-checkers/check-one-of.js.map +1 -1
  49. package/dist/collection/utils/property-checkers/check-pattern.js +5 -0
  50. package/dist/collection/utils/property-checkers/check-pattern.js.map +1 -0
  51. package/dist/collection/utils/property-checkers/index.js +3 -0
  52. package/dist/collection/utils/property-checkers/index.js.map +1 -1
  53. package/dist/components/check-one-of.js +8 -0
  54. package/dist/components/check-one-of.js.map +1 -0
  55. package/dist/components/check-type.js +1 -6
  56. package/dist/components/check-type.js.map +1 -1
  57. package/dist/components/fade.js +9 -0
  58. package/dist/components/fade.js.map +1 -0
  59. package/dist/components/package.js +1 -1
  60. package/dist/components/post-alert.d.ts +11 -0
  61. package/dist/components/post-alert.js +135 -0
  62. package/dist/components/post-alert.js.map +1 -0
  63. package/dist/components/post-collapsible.js +3 -2
  64. package/dist/components/post-collapsible.js.map +1 -1
  65. package/dist/components/post-icon.js +1 -135
  66. package/dist/components/post-icon.js.map +1 -1
  67. package/dist/components/post-icon2.js +146 -0
  68. package/dist/components/post-icon2.js.map +1 -0
  69. package/dist/components/post-tab-header.js +2 -2
  70. package/dist/components/post-tab-header.js.map +1 -1
  71. package/dist/components/post-tabs.js +27 -13
  72. package/dist/components/post-tabs.js.map +1 -1
  73. package/dist/components/post-tooltip.d.ts +11 -0
  74. package/dist/components/post-tooltip.js +5118 -0
  75. package/dist/components/post-tooltip.js.map +1 -0
  76. package/dist/docs.json +313 -3
  77. package/dist/esm/check-one-of-ded5e15e.js +8 -0
  78. package/dist/esm/check-one-of-ded5e15e.js.map +1 -0
  79. package/dist/esm/{check-type-67411ed3.js → check-type-18ebb4e7.js} +2 -7
  80. package/dist/esm/check-type-18ebb4e7.js.map +1 -0
  81. package/dist/esm/fade-671f1489.js +9 -0
  82. package/dist/esm/fade-671f1489.js.map +1 -0
  83. package/dist/esm/{index-cc0e53f0.js → index-5611074b.js} +107 -5
  84. package/dist/esm/index-5611074b.js.map +1 -0
  85. package/dist/esm/index-7f723686.js +24 -0
  86. package/dist/esm/index-7f723686.js.map +1 -0
  87. package/dist/esm/loader.js +3 -3
  88. package/dist/esm/package-331628f1.js +5 -0
  89. package/dist/esm/package-331628f1.js.map +1 -0
  90. package/dist/esm/post-alert.entry.js +101 -0
  91. package/dist/esm/post-alert.entry.js.map +1 -0
  92. package/dist/esm/post-collapsible.entry.js +5 -4
  93. package/dist/esm/post-collapsible.entry.js.map +1 -1
  94. package/dist/esm/post-components.js +3 -3
  95. package/dist/esm/post-icon.entry.js +7 -16
  96. package/dist/esm/post-icon.entry.js.map +1 -1
  97. package/dist/esm/post-tab-header.entry.js +4 -4
  98. package/dist/esm/post-tab-header.entry.js.map +1 -1
  99. package/dist/esm/post-tab-panel.entry.js +2 -2
  100. package/dist/esm/post-tabs.entry.js +29 -15
  101. package/dist/esm/post-tabs.entry.js.map +1 -1
  102. package/dist/esm/post-tooltip.entry.js +5093 -0
  103. package/dist/esm/post-tooltip.entry.js.map +1 -0
  104. package/dist/post-components/p-0d37fe44.entry.js +2 -0
  105. package/dist/post-components/p-0d37fe44.entry.js.map +1 -0
  106. package/dist/post-components/p-123bb6fb.entry.js +2 -0
  107. package/dist/post-components/p-123bb6fb.entry.js.map +1 -0
  108. package/dist/post-components/p-15fc087f.js +2 -0
  109. package/dist/post-components/p-15fc087f.js.map +1 -0
  110. package/dist/post-components/p-65a9d1c2.entry.js +2 -0
  111. package/dist/post-components/p-7240ae7b.entry.js +2 -0
  112. package/dist/post-components/p-7240ae7b.entry.js.map +1 -0
  113. package/dist/post-components/p-75a7b352.js +2 -0
  114. package/dist/post-components/p-75a7b352.js.map +1 -0
  115. package/dist/post-components/p-8c386036.entry.js +9 -0
  116. package/dist/post-components/p-8c386036.entry.js.map +1 -0
  117. package/dist/post-components/p-97a064da.entry.js +2 -0
  118. package/dist/post-components/{p-6dad6a8a.entry.js.map → p-97a064da.entry.js.map} +1 -1
  119. package/dist/post-components/p-bcc705f1.js +2 -0
  120. package/dist/post-components/p-bcc705f1.js.map +1 -0
  121. package/dist/post-components/p-ccae1c68.entry.js +2 -0
  122. package/dist/post-components/p-ccae1c68.entry.js.map +1 -0
  123. package/dist/post-components/p-d94db268.js +3 -0
  124. package/dist/post-components/p-d94db268.js.map +1 -0
  125. package/dist/post-components/p-e5306504.js +2 -0
  126. package/dist/post-components/p-e5306504.js.map +1 -0
  127. package/dist/post-components/p-eb3ff4dc.js +2 -0
  128. package/dist/post-components/post-components.esm.js +1 -1
  129. package/dist/post-components/post-components.esm.js.map +1 -1
  130. package/dist/types/components/post-alert/alert-types.d.ts +2 -0
  131. package/dist/types/components/post-alert/post-alert.d.ts +49 -0
  132. package/dist/types/components/post-tabs/post-tabs.d.ts +1 -0
  133. package/dist/types/components/post-tooltip/post-tooltip.d.ts +66 -0
  134. package/dist/types/components/post-tooltip/types.d.ts +2 -0
  135. package/dist/types/components.d.ts +115 -0
  136. package/dist/types/utils/property-checkers/check-one-of.d.ts +1 -1
  137. package/dist/types/utils/property-checkers/check-pattern.d.ts +1 -0
  138. package/dist/types/utils/property-checkers/index.d.ts +3 -1
  139. package/package.json +12 -8
  140. package/dist/cjs/check-type-f24cf91d.js.map +0 -1
  141. package/dist/cjs/index-50d7d035.js.map +0 -1
  142. package/dist/cjs/package-e8a6597e.js +0 -7
  143. package/dist/cjs/package-e8a6597e.js.map +0 -1
  144. package/dist/esm/check-type-67411ed3.js.map +0 -1
  145. package/dist/esm/index-cc0e53f0.js.map +0 -1
  146. package/dist/esm/package-b514d0f6.js +0 -5
  147. package/dist/esm/package-b514d0f6.js.map +0 -1
  148. package/dist/post-components/p-1388585d.entry.js +0 -2
  149. package/dist/post-components/p-1388585d.entry.js.map +0 -1
  150. package/dist/post-components/p-58916755.js +0 -2
  151. package/dist/post-components/p-5b3445dc.entry.js +0 -2
  152. package/dist/post-components/p-5b3445dc.entry.js.map +0 -1
  153. package/dist/post-components/p-6341b9b4.js +0 -3
  154. package/dist/post-components/p-6341b9b4.js.map +0 -1
  155. package/dist/post-components/p-6dad6a8a.entry.js +0 -2
  156. package/dist/post-components/p-b95ec099.entry.js +0 -2
  157. package/dist/post-components/p-cc92afb7.entry.js +0 -2
  158. package/dist/post-components/p-cc92afb7.entry.js.map +0 -1
  159. package/dist/post-components/p-f549b3fc.js +0 -2
  160. package/dist/post-components/p-f549b3fc.js.map +0 -1
  161. /package/dist/post-components/{p-b95ec099.entry.js.map → p-65a9d1c2.entry.js.map} +0 -0
  162. /package/dist/post-components/{p-58916755.js.map → p-eb3ff4dc.js.map} +0 -0
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "entries": [
3
+ "./components/post-alert/post-alert.js",
3
4
  "./components/post-collapsible/post-collapsible.js",
4
5
  "./components/post-icon/post-icon.js",
5
6
  "./components/post-tab-header/post-tab-header.js",
6
7
  "./components/post-tab-panel/post-tab-panel.js",
7
- "./components/post-tabs/post-tabs.js"
8
+ "./components/post-tabs/post-tabs.js",
9
+ "./components/post-tooltip/post-tooltip.js"
8
10
  ],
9
11
  "compiler": {
10
12
  "name": "@stencil/core",
@@ -0,0 +1,2 @@
1
+ export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'];
2
+ //# sourceMappingURL=alert-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-types.js","sourceRoot":"","sources":["../../../../src/components/post-alert/alert-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC","sourcesContent":["export const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'] as const;\n\nexport type AlertType = typeof ALERT_TYPES[number];\n"]}
@@ -0,0 +1,35 @@
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
+ */.alert-primary,.alert-success,.alert-danger,.alert-warning,.alert-info,.alert-gray,.alert-notification,.alert-error{background-color:rgb(var(--post-bg-rgb)) !important;color:var(--post-contrast-color) !important}.alert-success,.alert-warning,.alert-info,.alert-gray{--post-contrast-color: #000;--post-contrast-color-inverted: #fff;--post-gray-10: hsl(0, 0%, 90%);--post-gray-20: hsl(0, 0%, 80%);--post-gray-40: hsl(0, 0%, 60%);--post-gray-60: hsl(0, 0%, 40%);--post-gray-80: hsl(0, 0%, 20%);--post-yellow: #fc0;--post-light: #faf9f8;--post-gray: #f4f3f1;--post-dark: hsl(0, 0%, 20%);--post-primary: hsl(0, 0%, 20%);--post-white: #fff;--post-black: #000;--post-success: #2c911c;--post-info: #cce4ee;--post-warning: #f49e00;--post-danger: #a51728;--post-nightblue: #004976;--post-nightblue-bright: #0076a8;--post-petrol: #006d68;--post-petrol-bright: #00968f;--post-coral: #9e2a2f;--post-coral-bright: #e03c31;--post-olive: #716135;--post-olive-bright: #aa9d2e;--post-purple: #80276c;--post-purple-bright: #c5299b;--post-aubergine: #523178;--post-aubergine-bright: #7566a0;--post-contrast-color-rgb: 0, 0, 0;--post-contrast-color-inverted-rgb: 255, 255, 255;--post-gray-10-rgb: 230, 230, 230;--post-gray-20-rgb: 204, 204, 204;--post-gray-40-rgb: 153, 153, 153;--post-gray-60-rgb: 102, 102, 102;--post-gray-80-rgb: 51, 51, 51;--post-yellow-rgb: 255, 204, 0;--post-light-rgb: 250, 249, 248;--post-gray-rgb: 244, 243, 241;--post-dark-rgb: 51, 51, 51;--post-primary-rgb: 51, 51, 51;--post-white-rgb: 255, 255, 255;--post-black-rgb: 0, 0, 0;--post-success-rgb: 44, 145, 28;--post-info-rgb: 204, 228, 238;--post-warning-rgb: 244, 158, 0;--post-danger-rgb: 165, 23, 40;--post-nightblue-rgb: 0, 73, 118;--post-nightblue-bright-rgb: 0, 118, 168;--post-petrol-rgb: 0, 109, 104;--post-petrol-bright-rgb: 0, 150, 143;--post-coral-rgb: 158, 42, 47;--post-coral-bright-rgb: 224, 60, 49;--post-olive-rgb: 113, 97, 53;--post-olive-bright-rgb: 170, 157, 46;--post-purple-rgb: 128, 39, 108;--post-purple-bright-rgb: 197, 41, 155;--post-aubergine-rgb: 82, 49, 120;--post-aubergine-bright-rgb: 117, 102, 160}.alert-primary,.alert-danger,.alert-notification,.alert-error{--post-contrast-color: #fff;--post-contrast-color-inverted: #000;--post-dark: #faf9f8;--post-light: hsl(0, 0%, 20%);--post-gray-80: hsl(0, 0%, 90%);--post-gray-60: hsl(0, 0%, 80%);--post-gray-40: hsl(0, 0%, 60%);--post-gray-20: hsl(0, 0%, 40%);--post-gray-10: hsl(0, 0%, 20%);--post-contrast-color-rgb: 255, 255, 255;--post-contrast-color-inverted-rgb: 0, 0, 0;--post-dark-rgb: 250, 249, 248;--post-light-rgb: 51, 51, 51;--post-gray-80-rgb: 230, 230, 230;--post-gray-60-rgb: 204, 204, 204;--post-gray-40-rgb: 153, 153, 153;--post-gray-20-rgb: 102, 102, 102;--post-gray-10-rgb: 51, 51, 51}.alert{position:relative;box-sizing:border-box;min-height:5rem;box-shadow:0 2px 4px 0 rgba(0,0,0,.2);border-radius:4px;padding:1rem 1.25rem;padding-inline-start:5.5rem;margin-block-end:1rem;font-size:1rem;font-weight:300}.alert.no-icon{min-height:3.5rem;padding-inline-start:1.25rem}.alert[class^=pi-],.alert[class*=" pi-"]{background-size:3rem;background-position:1.25rem 1rem;background-repeat:no-repeat}.alert[class^=pi-].no-icon,.alert[class*=" pi-"].no-icon{background-image:none}.alert::before{content:"";display:block}.alert::before,.alert>post-icon{position:absolute;height:3rem;width:3rem;left:1.25rem;top:1rem}.alert.no-icon::before,.alert[class^=pi-]::before,.alert[class*=" pi-"]::before{content:unset}.alert.no-icon>post-icon,.alert[class^=pi-]>post-icon,.alert[class*=" pi-"]>post-icon{display:none}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.alert{filter:none !important;background-color:rgba(0,0,0,0) !important;border:2px solid WindowText}}.alert:not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert:not(.alert-action) a{font-weight:400}.alert:not(.alert-action) hr{margin-block:.5rem .75rem !important}.alert:not(.alert-action)>:only-child,.alert:not(.alert-action)>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert:not(.alert-action)>*{margin:0}.alert-heading{font-size:1.0625rem;font-weight:700}.alert-dismissible{pointer-events:auto;position:relative;padding-inline-end:4rem}.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:1.25rem}.alert-dismissible>.btn-close:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action{display:flex;flex-direction:row;align-items:center;gap:1.25rem}.alert-action>.alert-content{flex:1 1 auto;display:flex;flex-direction:column;justify-content:center;gap:.25rem}.alert-action>.alert-content a{font-weight:400}.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.alert-action>.alert-content>:only-child,.alert-action>.alert-content>post-icon:first-child+:last-child{font-size:1.0625rem;font-weight:700}.alert-action>.alert-content>*{margin:0}.alert-action>.alert-buttons{flex:0 0 auto;display:flex;align-items:center;gap:.5rem}@media(min-width: 780px){.alert-action.alert-dismissible>.btn-close{inset-block-start:calc(50% - 0.75rem)}}@media(max-width: 779.98px){.alert-action{flex-direction:column;align-items:stretch;padding-inline:1.25rem}.alert-action>.alert-content{padding-inline-start:4.25rem;padding-inline-end:2.75rem}.alert-action>.alert-buttons{display:flex}.alert-action>.alert-buttons>.btn{flex:1 0 0;width:100%}.alert-action>.alert-buttons>.btn:first-child{margin-inline-start:0}}.alert-fixed-bottom{position:fixed;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;margin-bottom:0;border-radius:0;z-index:1030}@media(min-width: 1441px){.alert-fixed-bottom{padding-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem);padding-inline-start:calc(
30
+ (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem
31
+ );background-position-x:calc((100% - 1440px) / 2 + 120px + 1.25rem + 1.5rem)}.alert-fixed-bottom::before{left:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.no-icon{padding-inline-start:calc((100% - 1440px) / 2 + 120px + 1.25rem)}.alert-fixed-bottom.alert-dismissible{padding-inline-end:calc(
32
+ (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem
33
+ )}.alert-fixed-bottom.alert-dismissible>.btn-close{inset-inline-end:calc((100% - 1440px) / 2 + 120px + 1.25rem)}}.alert-primary{--post-bg-rgb: 51, 51, 51}.alert-primary:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667v2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18H3.2z'/%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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667v2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18H3.2z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-primary>post-icon{background-color:#333}.alert-success{--post-bg-rgb: 44, 145, 28}.alert-success:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%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='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-success>post-icon{background-color:#2c911c}.alert-danger{--post-bg-rgb: 165, 23, 40}.alert-danger:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='M14.667 4h2.667v18.667h-2.667V4zm0 21.333h2.667V28h-2.667v-2.667z'/%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='M14.667 4h2.667v18.667h-2.667V4zm0 21.333h2.667V28h-2.667v-2.667z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-danger>post-icon{background-color:#a51728}.alert-warning{--post-bg-rgb: 244, 158, 0}.alert-warning:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='M14.667 4h2.667v18.667h-2.667V4zm0 21.333h2.667V28h-2.667v-2.667z'/%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='M14.667 4h2.667v18.667h-2.667V4zm0 21.333h2.667V28h-2.667v-2.667z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-warning>post-icon{background-color:#f49e00}.alert-info{--post-bg-rgb: 204, 228, 238}.alert-info:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667V4z'/%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='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667V4z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-info>post-icon{background-color:#cce4ee}.alert-gray{--post-bg-rgb: 244, 243, 241}.alert-gray:not(.no-icon,[class^=pi-],[class*=" pi-"])::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.241 5.241 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.241 5.241 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27zM16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.325 6.325 0 0 0-.325 1.997 6.598 6.598 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667zM11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0zm-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334zm13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0zm-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333zm-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335zm7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334zM11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334zM28.93 18.548a13.19 13.19 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266zm-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.647 11.647 0 0 0 2.359-.888.668.668 0 0 1 .896.294zM4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.798 11.798 0 0 0 4 15.92z'/%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.241 5.241 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.241 5.241 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27zM16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.325 6.325 0 0 0-.325 1.997 6.598 6.598 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667zM11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0zm-4 0c0-.735.599-1.333 1.334-1.333s1.333.598 1.333 1.333-.598 1.334-1.333 1.334-1.334-.598-1.334-1.334zm13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0zm-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333zm-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335zm7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334zM11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334zM28.93 18.548a13.19 13.19 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266zm-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.647 11.647 0 0 0 2.359-.888.668.668 0 0 1 .896.294zM4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.798 11.798 0 0 0 4 15.92z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-gray>post-icon{background-color:#f4f3f1}.alert-notification{--post-bg-rgb: 51, 51, 51}.alert-notification:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667v2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18H3.2z'/%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='M30.533 26.933c-3.333-4.8-5.867-12.667-5.867-18.267 0-4.8-3.867-8.667-8.667-8.667S7.332 3.866 7.332 8.666c0 5.6-2.533 13.467-5.867 18.267L1.998 28h11.333v4h5.333v-4h11.333l.533-1.067zm-13.2 3.734h-2.667V28h2.667v2.667zm-14.133-4c3.2-5.067 5.467-12.533 5.467-18 0-4 3.333-7.333 7.333-7.333s7.333 3.333 7.333 7.333c0 5.467 2.267 12.933 5.467 18H3.2z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-notification>post-icon{background-color:#333}.alert-error{--post-bg-rgb: 165, 23, 40}.alert-error:not(.no-icon,[class^=pi-],[class*=" pi-"])::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='M14.667 4h2.667v18.667h-2.667V4zm0 21.333h2.667V28h-2.667v-2.667z'/%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='M14.667 4h2.667v18.667h-2.667V4zm0 21.333h2.667V28h-2.667v-2.667z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor}.alert-error>post-icon{background-color:#a51728}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;user-select:none;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}.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;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)}.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}/*!
34
+ * Copyright 2021 by Swiss Post, Information Technology
35
+ */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.visually-hidden:not(caption){position:absolute !important}.alert-heading>::slotted(h1){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h2){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h3){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h4){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h5){font-size:inherit !important;font-weight:inherit !important}.alert-heading>::slotted(h6){font-size:inherit !important;font-weight:inherit !important}
@@ -0,0 +1,255 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { version } from '../../../package.json';
3
+ import { fadeOut } from '../../animations';
4
+ import { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';
5
+ import { ALERT_TYPES } from './alert-types';
6
+ export class PostAlert {
7
+ constructor() {
8
+ this.alertId = crypto.randomUUID();
9
+ this.classes = undefined;
10
+ this.hasActions = undefined;
11
+ this.hasHeading = undefined;
12
+ this.onDismissButtonClick = () => this.dismiss();
13
+ this.dismissible = false;
14
+ this.dismissLabel = undefined;
15
+ this.fixed = false;
16
+ this.icon = undefined;
17
+ this.type = 'primary';
18
+ }
19
+ validateDismissible(isDismissible = this.dismissible) {
20
+ checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
21
+ setTimeout(() => this.validateDismissLabel());
22
+ }
23
+ validateDismissLabel(dismissLabel = this.dismissLabel) {
24
+ if (this.dismissible) {
25
+ checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
26
+ }
27
+ }
28
+ validateFixed(isFixed = this.fixed) {
29
+ checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
30
+ }
31
+ validateIcon(icon = this.icon) {
32
+ checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
33
+ }
34
+ validateType(type = this.type) {
35
+ checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
36
+ }
37
+ connectedCallback() {
38
+ this.validateDismissible();
39
+ this.validateFixed();
40
+ this.validateIcon();
41
+ this.validateType();
42
+ }
43
+ componentWillRender() {
44
+ var _a;
45
+ this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
46
+ this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
47
+ this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
48
+ if (this.dismissible)
49
+ this.classes += ' alert-dismissible';
50
+ if (this.hasActions)
51
+ this.classes += ' alert-action';
52
+ if (this.fixed)
53
+ this.classes += ' alert-fixed-bottom';
54
+ if (this.icon === 'none')
55
+ this.classes += ' no-icon';
56
+ }
57
+ /**
58
+ * Triggers alert dismissal programmatically (same as clicking on the close button (×)).
59
+ */
60
+ async dismiss() {
61
+ const dismissal = fadeOut(this.host);
62
+ await dismissal.finished;
63
+ this.host.remove();
64
+ this.dismissed.emit();
65
+ }
66
+ render() {
67
+ const defaultAlertContent = [
68
+ this.hasHeading && (h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, h("slot", { name: "heading" }))),
69
+ h("slot", { key: `${this.alertId}-message` })
70
+ ];
71
+ const actionAlertContent = [
72
+ h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
73
+ h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, h("slot", { name: "actions" })),
74
+ ];
75
+ return (h(Host, { "data-version": version }, h("div", { role: "alert", class: this.classes }, this.dismissible && (h("button", { class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions
76
+ ? actionAlertContent
77
+ : defaultAlertContent)));
78
+ }
79
+ static get is() { return "post-alert"; }
80
+ static get encapsulation() { return "shadow"; }
81
+ static get originalStyleUrls() {
82
+ return {
83
+ "$": ["post-alert.scss"]
84
+ };
85
+ }
86
+ static get styleUrls() {
87
+ return {
88
+ "$": ["post-alert.css"]
89
+ };
90
+ }
91
+ static get properties() {
92
+ return {
93
+ "dismissible": {
94
+ "type": "boolean",
95
+ "mutable": false,
96
+ "complexType": {
97
+ "original": "boolean",
98
+ "resolved": "boolean",
99
+ "references": {}
100
+ },
101
+ "required": false,
102
+ "optional": false,
103
+ "docs": {
104
+ "tags": [],
105
+ "text": "If `true`, a close button (\u00D7) is displayed and the alert can be dismissed by the user."
106
+ },
107
+ "attribute": "dismissible",
108
+ "reflect": false,
109
+ "defaultValue": "false"
110
+ },
111
+ "dismissLabel": {
112
+ "type": "string",
113
+ "mutable": false,
114
+ "complexType": {
115
+ "original": "string",
116
+ "resolved": "string",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": false,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": "The label to use for the close button of a dismissible alert."
124
+ },
125
+ "attribute": "dismiss-label",
126
+ "reflect": false
127
+ },
128
+ "fixed": {
129
+ "type": "boolean",
130
+ "mutable": false,
131
+ "complexType": {
132
+ "original": "boolean",
133
+ "resolved": "boolean",
134
+ "references": {}
135
+ },
136
+ "required": false,
137
+ "optional": false,
138
+ "docs": {
139
+ "tags": [],
140
+ "text": "If `true`, the alert is positioned at the bottom of the window, from edge to edge."
141
+ },
142
+ "attribute": "fixed",
143
+ "reflect": false,
144
+ "defaultValue": "false"
145
+ },
146
+ "icon": {
147
+ "type": "string",
148
+ "mutable": false,
149
+ "complexType": {
150
+ "original": "string",
151
+ "resolved": "string",
152
+ "references": {}
153
+ },
154
+ "required": false,
155
+ "optional": false,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": "The icon to display in the alert. By default, the icon depends on the alert type.\n\nIf `none`, no icon is displayed."
159
+ },
160
+ "attribute": "icon",
161
+ "reflect": false
162
+ },
163
+ "type": {
164
+ "type": "string",
165
+ "mutable": false,
166
+ "complexType": {
167
+ "original": "AlertType",
168
+ "resolved": "\"danger\" | \"gray\" | \"info\" | \"primary\" | \"success\" | \"warning\"",
169
+ "references": {
170
+ "AlertType": {
171
+ "location": "import",
172
+ "path": "./alert-types"
173
+ }
174
+ }
175
+ },
176
+ "required": false,
177
+ "optional": false,
178
+ "docs": {
179
+ "tags": [],
180
+ "text": "The type of the alert."
181
+ },
182
+ "attribute": "type",
183
+ "reflect": false,
184
+ "defaultValue": "'primary'"
185
+ }
186
+ };
187
+ }
188
+ static get states() {
189
+ return {
190
+ "alertId": {},
191
+ "classes": {},
192
+ "hasActions": {},
193
+ "hasHeading": {},
194
+ "onDismissButtonClick": {}
195
+ };
196
+ }
197
+ static get events() {
198
+ return [{
199
+ "method": "dismissed",
200
+ "name": "dismissed",
201
+ "bubbles": true,
202
+ "cancelable": true,
203
+ "composed": true,
204
+ "docs": {
205
+ "tags": [],
206
+ "text": "An event emitted when the alert element is dismissed, after the transition.\nIt has no payload and only relevant for dismissible alerts."
207
+ },
208
+ "complexType": {
209
+ "original": "void",
210
+ "resolved": "void",
211
+ "references": {}
212
+ }
213
+ }];
214
+ }
215
+ static get methods() {
216
+ return {
217
+ "dismiss": {
218
+ "complexType": {
219
+ "signature": "() => Promise<void>",
220
+ "parameters": [],
221
+ "references": {
222
+ "Promise": {
223
+ "location": "global"
224
+ }
225
+ },
226
+ "return": "Promise<void>"
227
+ },
228
+ "docs": {
229
+ "text": "Triggers alert dismissal programmatically (same as clicking on the close button (\u00D7)).",
230
+ "tags": []
231
+ }
232
+ }
233
+ };
234
+ }
235
+ static get elementRef() { return "host"; }
236
+ static get watchers() {
237
+ return [{
238
+ "propName": "dismissible",
239
+ "methodName": "validateDismissible"
240
+ }, {
241
+ "propName": "dismissLabel",
242
+ "methodName": "validateDismissLabel"
243
+ }, {
244
+ "propName": "fixed",
245
+ "methodName": "validateFixed"
246
+ }, {
247
+ "propName": "icon",
248
+ "methodName": "validateIcon"
249
+ }, {
250
+ "propName": "type",
251
+ "methodName": "validateType"
252
+ }];
253
+ }
254
+ }
255
+ //# sourceMappingURL=post-alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post-alert.js","sourceRoot":"","sources":["../../../../src/components/post-alert/post-alert.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport { version } from '../../../package.json';\nimport { fadeOut } from '../../animations';\nimport { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from '../../utils';\nimport { ALERT_TYPES, AlertType } from './alert-types';\n\n@Component({\n tag: 'post-alert',\n styleUrl: 'post-alert.scss',\n shadow: true,\n})\nexport class PostAlert {\n @Element() host: HTMLPostAlertElement;\n\n @State() alertId = crypto.randomUUID();\n @State() classes: string;\n @State() hasActions: boolean;\n @State() hasHeading: boolean;\n @State() onDismissButtonClick = () => this.dismiss();\n\n /**\n * If `true`, a close button (×) is displayed and the alert can be dismissed by the user.\n */\n @Prop() readonly dismissible: boolean = false;\n\n @Watch('dismissible')\n validateDismissible(isDismissible = this.dismissible) {\n checkType(isDismissible, 'boolean', 'The post-alert \"dismissible\" prop should be a boolean.');\n setTimeout(() => this.validateDismissLabel());\n }\n\n /**\n * The label to use for the close button of a dismissible alert.\n */\n @Prop() readonly dismissLabel: string;\n\n @Watch('dismissLabel')\n validateDismissLabel(dismissLabel = this.dismissLabel) {\n if (this.dismissible) {\n checkNonEmpty(dismissLabel, 'Dismissible post-alert\\'s require a \"dismiss-label\" prop.');\n }\n }\n\n /**\n * If `true`, the alert is positioned at the bottom of the window, from edge to edge.\n */\n @Prop() readonly fixed: boolean = false;\n\n @Watch('fixed')\n validateFixed(isFixed = this.fixed) {\n checkType(isFixed, 'boolean', 'The post-alert \"fixed\" prop should be a boolean.');\n }\n\n /**\n * The icon to display in the alert. By default, the icon depends on the alert type.\n *\n * If `none`, no icon is displayed.\n */\n @Prop() readonly icon: string;\n\n @Watch('icon')\n validateIcon(icon = this.icon) {\n checkEmptyOrPattern(icon, /\\d{4}|none/, 'The post-alert \"icon\" prop should be a 4-digits string.');\n }\n\n /**\n * The type of the alert.\n */\n @Prop() readonly type: AlertType = 'primary';\n\n @Watch('type')\n validateType(type = this.type) {\n checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);\n }\n\n /**\n * An event emitted when the alert element is dismissed, after the transition.\n * It has no payload and only relevant for dismissible alerts.\n */\n @Event() dismissed: EventEmitter<void>;\n\n connectedCallback() {\n this.validateDismissible();\n this.validateFixed();\n this.validateIcon();\n this.validateType();\n }\n\n componentWillRender() {\n this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;\n this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;\n\n this.classes = `alert alert-${this.type ?? 'primary'}`;\n if (this.dismissible) this.classes += ' alert-dismissible';\n if (this.hasActions) this.classes += ' alert-action';\n if (this.fixed) this.classes += ' alert-fixed-bottom';\n if (this.icon === 'none') this.classes += ' no-icon';\n }\n\n /**\n * Triggers alert dismissal programmatically (same as clicking on the close button (×)).\n */\n @Method()\n async dismiss() {\n const dismissal = fadeOut(this.host);\n\n await dismissal.finished;\n\n this.host.remove();\n this.dismissed.emit();\n }\n\n render() {\n const defaultAlertContent = [\n this.hasHeading && (\n <div key={`${this.alertId}-heading`} class=\"alert-heading\">\n <slot name=\"heading\"/>\n </div>\n ),\n <slot key={`${this.alertId}-message`}/>\n ];\n\n const actionAlertContent = [\n <div key={`${this.alertId}-content`} class=\"alert-content\">\n {defaultAlertContent}\n </div>,\n <div key={`${this.alertId}-buttons`} class=\"alert-buttons\">\n <slot name=\"actions\"/>\n </div>,\n ];\n\n return (\n <Host data-version={version}>\n <div role=\"alert\" class={this.classes}>\n {this.dismissible && (\n <button class=\"btn-close\" onClick={this.onDismissButtonClick}>\n <span class=\"visually-hidden\">{this.dismissLabel}</span>\n </button>\n )}\n\n {this.icon && this.icon !== 'none' && (\n <post-icon key={`${this.alertId}-icon`} name={this.icon} />\n )}\n\n {this.hasActions\n ? actionAlertContent\n : defaultAlertContent\n }\n </div>\n </Host>\n );\n }\n\n}\n"]}
@@ -1,186 +1,4 @@
1
- /**
2
- * Colors used by the post style guide
3
- */
4
- /**
5
- * Maps. Allow maps to have custom colors from the project
6
- * by always merging into a default empty map
7
- */
8
- /**
9
- * Colors used by the post style guide
10
- */
11
- /**
12
- * Maps. Allow maps to have custom colors from the project
13
- * by always merging into a default empty map
14
- */
15
- /**
16
- * Override the necessary bootstrap
17
- * colors and maps using colors from
18
- * the post style guide only.
19
- *
20
- * Other bootstrap colors
21
- * will be available as sass-variables
22
- * but should not be used.
23
- */
24
- .accordion-item {
25
- border-block-start: 2px solid hsl(0, 0%, 90%);
26
- }
27
-
28
- .accordion-header {
29
- font-size: 1.0625rem;
30
- font-weight: 700;
31
- line-height: 1.5;
32
- margin: 0;
33
- }
34
- @media (min-width: 1024px) {
35
- .accordion-header {
36
- font-size: 1.25rem;
37
- }
38
- }
39
-
40
- .accordion-button {
41
- padding: 0;
42
- overflow: visible;
43
- border: 0;
44
- background: none;
45
- color: inherit;
46
- font: inherit;
47
- user-select: none;
48
- appearance: button;
49
- width: 100%;
50
- position: relative;
51
- padding-block: 1rem;
52
- padding-inline-start: 1rem;
53
- padding-inline-end: 2.5rem;
54
- text-align: start;
55
- }
56
- .accordion-button:not(:disabled) {
57
- cursor: pointer;
58
- }
59
- .accordion-button:disabled {
60
- opacity: 0.4;
61
- }
62
- .accordion-button:focus {
63
- outline: none;
64
- box-shadow: 0 0 0 0.125rem rgba(51, 51, 51, 0.25);
65
- }
66
- .accordion-button::after {
67
- /* stylelint-disable-next-line property-no-vendor-prefix */
68
- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E");
69
- mask-image: url("data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E");
70
- background-color: currentColor;
71
- content: "";
72
- display: block;
73
- height: 1.5rem;
74
- width: 1.5rem;
75
- position: absolute;
76
- inset-inline-end: 1rem;
77
- inset-block-start: 50%;
78
- transform: translateY(-50%);
79
- transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
80
- border: 1px solid rgb(var(--post-bg-rgb, 255, 255, 255));
81
- }
82
- .accordion-button.collapsed::after {
83
- transform: translateY(-50%) rotate(-180deg);
84
- }
85
- .accordion-button > .text-truncate {
86
- display: block;
87
- }
88
- @media (forced-colors: active), (-ms-high-contrast: active), (-ms-high-contrast: white-on-black) {
89
- .accordion-button:hover:not(:disabled), .accordion-button:focus-visible:not(:disabled) {
90
- outline: 2px solid Highlight;
91
- }
92
- .accordion-button:disabled {
93
- opacity: 1 !important;
94
- }
95
- }
96
-
97
- .accordion-body {
98
- padding: 0.75rem 1rem 2.5rem;
99
- border-block-start: 2px solid hsl(0, 0%, 90%);
100
- }
101
- .accordion-body h1,
102
- .accordion-body .h1 {
103
- font-size: 1.0625rem;
104
- margin: 2.5rem 0 0;
105
- font-weight: 700;
106
- }
107
- @media (min-width: 1024px) {
108
- .accordion-body h1,
109
- .accordion-body .h1 {
110
- font-size: 1.25rem;
111
- }
112
- }
113
- .accordion-body h2,
114
- .accordion-body .h2 {
115
- font-size: 1.0625rem;
116
- margin: 2.5rem 0 0;
117
- font-weight: 700;
118
- }
119
- @media (min-width: 1024px) {
120
- .accordion-body h2,
121
- .accordion-body .h2 {
122
- font-size: 1.25rem;
123
- }
124
- }
125
- .accordion-body h3,
126
- .accordion-body .h3 {
127
- font-size: 1.0625rem;
128
- margin: 2.5rem 0 0;
129
- font-weight: 700;
130
- }
131
- @media (min-width: 1024px) {
132
- .accordion-body h3,
133
- .accordion-body .h3 {
134
- font-size: 1.25rem;
135
- }
136
- }
137
- .accordion-body h4,
138
- .accordion-body .h4 {
139
- font-size: 1.0625rem;
140
- margin: 2.5rem 0 0;
141
- font-weight: 700;
142
- }
143
- @media (min-width: 1024px) {
144
- .accordion-body h4,
145
- .accordion-body .h4 {
146
- font-size: 1.25rem;
147
- }
148
- }
149
- .accordion-body h5,
150
- .accordion-body .h5 {
151
- font-size: 1.0625rem;
152
- margin: 2.5rem 0 0;
153
- font-weight: 700;
154
- }
155
- @media (min-width: 1024px) {
156
- .accordion-body h5,
157
- .accordion-body .h5 {
158
- font-size: 1.25rem;
159
- }
160
- }
161
- .accordion-body h6,
162
- .accordion-body .h6 {
163
- font-size: 1.0625rem;
164
- margin: 2.5rem 0 0;
165
- font-weight: 700;
166
- }
167
- @media (min-width: 1024px) {
168
- .accordion-body h6,
169
- .accordion-body .h6 {
170
- font-size: 1.25rem;
171
- }
172
- }
173
-
174
- .accordion-button > :first-child,
175
- .accordion-body > :first-child {
176
- margin-block-start: 0 !important;
177
- }
178
- .accordion-button > :last-child,
179
- .accordion-body > :last-child {
180
- margin-block-end: 0 !important;
181
- }
182
-
183
- /*!
1
+ .accordion-item{border-block-start:2px solid #e6e6e6}.accordion-header{font-size:1.0625rem;font-weight:700;line-height:1.5;margin:0}@media(min-width: 1024px){.accordion-header{font-size:1.25rem}}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;user-select:none;appearance:button;width:100%;position:relative;padding-block:1rem;padding-inline-start:1rem;padding-inline-end:2.5rem;text-align:start}.accordion-button:not(:disabled){cursor:pointer}.accordion-button:disabled{opacity:.4}.accordion-button:focus{outline:none;box-shadow:0 0 0 .125rem rgba(51,51,51,.25)}.accordion-button::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xml:space='preserve' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='icon'%3E%3Cpath d='m23.6 18.3-.9.9-6.7-6.6-6.6 6.6-.9-.9 7.5-7.6 7.6 7.6z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;content:"";display:block;height:1.5rem;width:1.5rem;position:absolute;inset-inline-end:1rem;inset-block-start:50%;transform:translateY(-50%);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);border:1px solid rgb(var(--post-bg-rgb, 255, 255, 255))}.accordion-button.collapsed::after{transform:translateY(-50%) rotate(-180deg)}.accordion-button>.text-truncate{display:block}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:2px solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding:.75rem 1rem 2.5rem;border-block-start:2px solid #e6e6e6}.accordion-body h1,.accordion-body .h1{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media(min-width: 1024px){.accordion-body h1,.accordion-body .h1{font-size:1.25rem}}.accordion-body h2,.accordion-body .h2{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media(min-width: 1024px){.accordion-body h2,.accordion-body .h2{font-size:1.25rem}}.accordion-body h3,.accordion-body .h3{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media(min-width: 1024px){.accordion-body h3,.accordion-body .h3{font-size:1.25rem}}.accordion-body h4,.accordion-body .h4{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media(min-width: 1024px){.accordion-body h4,.accordion-body .h4{font-size:1.25rem}}.accordion-body h5,.accordion-body .h5{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media(min-width: 1024px){.accordion-body h5,.accordion-body .h5{font-size:1.25rem}}.accordion-body h6,.accordion-body .h6{font-size:1.0625rem;margin:2.5rem 0 0;font-weight:700}@media(min-width: 1024px){.accordion-body h6,.accordion-body .h6{font-size:1.25rem}}.accordion-button>:first-child,.accordion-body>:first-child{margin-block-start:0 !important}.accordion-button>:last-child,.accordion-body>:last-child{margin-block-end:0 !important}/*!
184
2
  * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
185
3
  * Copyright 2011-2021 The Bootstrap Authors
186
4
  * Copyright 2011-2021 Twitter, Inc.
@@ -208,47 +26,4 @@
208
26
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
209
27
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
210
28
  * THE SOFTWARE.
211
- */
212
- .fade {
213
- transition: opacity 200ms linear;
214
- }
215
- @media (prefers-reduced-motion: reduce) {
216
- .fade {
217
- transition: none;
218
- }
219
- }
220
- .fade:not(.show) {
221
- opacity: 0;
222
- }
223
-
224
- .collapse:not(.show) {
225
- display: none;
226
- }
227
-
228
- .collapsing {
229
- height: 0;
230
- overflow: hidden;
231
- transition: height 250ms cubic-bezier(0.4, 0, 0.2, 1), padding 250ms cubic-bezier(0.4, 0, 0.2, 1);
232
- }
233
- @media (prefers-reduced-motion: reduce) {
234
- .collapsing {
235
- transition: none;
236
- }
237
- }
238
- .collapsing.collapse-horizontal {
239
- width: 0;
240
- height: auto;
241
- transition: width 0.35s ease;
242
- }
243
- @media (prefers-reduced-motion: reduce) {
244
- .collapsing.collapse-horizontal {
245
- transition: none;
246
- }
247
- }
248
-
249
- :host {
250
- display: block;
251
- }
252
- :host .accordion-button > ::slotted(.text-truncate) {
253
- display: block;
254
- }
29
+ */.fade{transition:opacity 200ms linear}@media(prefers-reduced-motion: reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height 250ms cubic-bezier(0.4, 0, 0.2, 1),padding 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media(prefers-reduced-motion: reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{width:0;height:auto;transition:width .35s ease}@media(prefers-reduced-motion: reduce){.collapsing.collapse-horizontal{transition:none}}:host{display:block}:host .accordion-button>::slotted(.text-truncate){display:block}