@swisspost/design-system-components 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/attribute-observer-10f08c04.js +27 -0
- package/dist/cjs/index.cjs.js +13 -12
- package/dist/cjs/{package-0645dd08.js → package-628f6e9c.js} +1 -1
- package/dist/cjs/{post-accordion-64aa88cf.js → post-accordion-da546aa2.js} +1 -1
- package/dist/cjs/{post-accordion-item-51df1dfa.js → post-accordion-item-33d5593a.js} +3 -3
- package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/post-alert-26c1bcda.js +98 -0
- package/dist/cjs/post-alert.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-84416953.js → post-collapsible-278b2a71.js} +1 -1
- package/dist/cjs/post-collapsible.cjs.entry.js +2 -2
- package/dist/cjs/{post-icon-5fc20211.js → post-icon-fd09bc54.js} +2 -2
- package/dist/cjs/post-icon.cjs.entry.js +2 -2
- package/dist/cjs/post-popover-1e454296.js +104 -0
- package/dist/cjs/post-popover.cjs.entry.js +3 -2
- package/dist/cjs/{post-popovercontainer-cc5fa030.js → post-popovercontainer-5e355de3.js} +26 -11
- package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-header-5c8b9a0d.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-1143ea40.js → post-tab-panel-67ba226d.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-7ef36ff6.js → post-tabs-71510ced.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-45784e17.js → post-tooltip-b6bbb3e4.js} +124 -42
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -2
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +1 -1
- package/dist/collection/components/post-alert/post-alert.css +5 -5
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +47 -63
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +25 -10
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +120 -42
- package/dist/collection/utils/attribute-observer.js +23 -0
- package/dist/components/attribute-observer.js +25 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +2 -2
- package/dist/components/post-alert2.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-popover2.js +51 -64
- package/dist/components/post-popovercontainer2.js +25 -10
- package/dist/components/post-tab-header2.js +1 -1
- package/dist/components/post-tooltip2.js +123 -41
- package/dist/docs.json +5 -25
- package/dist/esm/attribute-observer-37fa950a.js +25 -0
- package/dist/esm/index.js +13 -12
- package/dist/esm/{package-37a68f71.js → package-15929f57.js} +1 -1
- package/dist/esm/{post-accordion-8872dc1b.js → post-accordion-be080240.js} +1 -1
- package/dist/esm/{post-accordion-item-02b9f01c.js → post-accordion-item-7b3c726b.js} +3 -3
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/post-alert-37f853eb.js +96 -0
- package/dist/esm/post-alert.entry.js +2 -2
- package/dist/esm/{post-collapsible-1f23fe7d.js → post-collapsible-967bb191.js} +1 -1
- package/dist/esm/post-collapsible.entry.js +2 -2
- package/dist/esm/{post-icon-2ec2127e.js → post-icon-ba163099.js} +2 -2
- package/dist/esm/post-icon.entry.js +2 -2
- package/dist/esm/post-popover-69694fa6.js +102 -0
- package/dist/esm/post-popover.entry.js +3 -2
- package/dist/esm/{post-popovercontainer-4a48161f.js → post-popovercontainer-da870ff0.js} +26 -11
- package/dist/esm/post-popovercontainer.entry.js +2 -2
- package/dist/esm/post-tab-header-14ed99cd.js +30 -0
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-da24046f.js → post-tab-panel-d89c4c50.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-21a5dfeb.js → post-tabs-e995886a.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tooltip-4f4f87b4.js → post-tooltip-0ec6a388.js} +124 -42
- package/dist/esm/post-tooltip.entry.js +3 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-00ab91d9.entry.js +1 -0
- package/dist/post-components/p-04f47e54.entry.js +1 -0
- package/dist/post-components/{p-e836df41.js → p-1f284e66.js} +1 -1
- package/dist/post-components/p-209e33a5.js +1 -0
- package/dist/post-components/p-282e21c2.entry.js +1 -0
- package/dist/post-components/p-34a772e3.entry.js +1 -0
- package/dist/post-components/p-46c47aa4.entry.js +1 -0
- package/dist/post-components/{p-73a7d4f9.js → p-51fe19e0.js} +1 -1
- package/dist/post-components/p-557f0f10.entry.js +1 -0
- package/dist/post-components/p-5ecceba0.js +1 -0
- package/dist/post-components/p-61d98756.js +1 -0
- package/dist/post-components/p-6adeaa6c.js +1 -0
- package/dist/post-components/{p-aee1750c.js → p-6b3ba10a.js} +1 -1
- package/dist/post-components/p-82f4f464.entry.js +1 -0
- package/dist/post-components/p-94256868.js +15 -0
- package/dist/post-components/p-98cb0bbd.entry.js +1 -0
- package/dist/post-components/p-9ee95668.entry.js +1 -0
- package/dist/post-components/p-a0d342e4.entry.js +1 -0
- package/dist/post-components/{p-c1c8f2ec.js → p-a9d59b04.js} +1 -1
- package/dist/post-components/p-ac7b779e.js +1 -0
- package/dist/post-components/p-d9c9ed63.js +1 -0
- package/dist/post-components/p-e1bf894f.entry.js +1 -0
- package/dist/post-components/p-e8d17225.js +1 -0
- package/dist/post-components/p-f47b0207.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-popover/post-popover.d.ts +3 -17
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +1 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +14 -9
- package/dist/types/utils/attribute-observer.d.ts +1 -0
- package/package.json +4 -3
- package/dist/cjs/post-alert-ac59385a.js +0 -98
- package/dist/cjs/post-popover-be868244.js +0 -117
- package/dist/cjs/post-tab-header-5a7070e9.js +0 -32
- package/dist/esm/post-alert-1a766c15.js +0 -96
- package/dist/esm/post-popover-f6029c96.js +0 -115
- package/dist/esm/post-tab-header-63676360.js +0 -30
- package/dist/post-components/p-0b46c9ba.entry.js +0 -1
- package/dist/post-components/p-21557c34.js +0 -15
- package/dist/post-components/p-2b67b933.js +0 -1
- package/dist/post-components/p-47fd6eb0.js +0 -1
- package/dist/post-components/p-548ee455.entry.js +0 -1
- package/dist/post-components/p-63b6c589.entry.js +0 -1
- package/dist/post-components/p-66f346fb.entry.js +0 -1
- package/dist/post-components/p-7973e3e4.js +0 -1
- package/dist/post-components/p-829f9eaf.entry.js +0 -1
- package/dist/post-components/p-82facb04.js +0 -1
- package/dist/post-components/p-8aa01298.js +0 -1
- package/dist/post-components/p-9170d84d.entry.js +0 -1
- package/dist/post-components/p-959f83c0.entry.js +0 -1
- package/dist/post-components/p-9bc7ed9e.entry.js +0 -1
- package/dist/post-components/p-a3fc7eaf.js +0 -1
- package/dist/post-components/p-a762b512.entry.js +0 -1
- package/dist/post-components/p-ccd827a1.js +0 -1
- package/dist/post-components/p-d25e401c.entry.js +0 -1
- package/dist/post-components/p-f655856d.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="2.0.3";export{o as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-10b4cf7a.js";export{s as setNonce}from"./p-10b4cf7a.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-
|
|
1
|
+
import{p as e,b as a}from"./p-10b4cf7a.js";export{s as setNonce}from"./p-10b4cf7a.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-46c47aa4",[[1,"post-accordion-item",{collapsed:[4],headingLevel:[2,"heading-level"],id:[32],isOpen:[32],toggle:[64]},[[0,"collapseChange","onCollapseChange"]],{headingLevel:["validateHeadingLevel"]}]]],["p-557f0f10",[[1,"post-alert",{dismissible:[4],dismissLabel:[1,"dismiss-label"],fixed:[4],icon:[1],type:[1],alertId:[32],classes:[32],hasActions:[32],hasHeading:[32],onDismissButtonClick:[32],dismiss:[64]},null,{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],fixed:["validateFixed"],icon:["validateIcon"],type:["validateType"]}]]],["p-04f47e54",[[1,"post-popover",{placement:[1],closeButtonCaption:[1,"close-button-caption"],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-98cb0bbd",[[1,"post-tooltip",{placement:[1],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-282e21c2",[[1,"post-accordion",{multiple:[4],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"collapseChange","collapseChangeHandler"]]]]],["p-82f4f464",[[1,"post-tab-header",{panel:[1],tabId:[32]},null,{panel:["validateFor"]}]]],["p-34a772e3",[[1,"post-tab-panel",{name:[1],panelId:[32]}]]],["p-00ab91d9",[[1,"post-tabs",{activePanel:[1,"active-panel"],show:[64]}]]],["p-e1bf894f",[[1,"post-collapsible",{collapsed:[4],id:[32],isOpen:[32],toggle:[64]},null,{collapsed:["validateCollapsed"]}]]],["p-a0d342e4",[[1,"post-icon",{animation:[1],base:[1],flipH:[4,"flip-h"],flipV:[4,"flip-v"],name:[1],rotate:[2],scale:[2],svgStyles:[32],svgOutput:[32]},null,{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}]]],["p-9ee95668",[[1,"post-popovercontainer",{placement:[1],arrow:[4],show:[64],hide:[64],toggle:[64]}]]]],e)));
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/dom';
|
|
2
|
-
/**
|
|
3
|
-
* @slot default - Slot for placing content inside the popover.
|
|
4
|
-
*/
|
|
5
2
|
export declare class PostPopover {
|
|
6
3
|
private popoverRef;
|
|
7
|
-
private
|
|
8
|
-
private localEnterTogglePopover;
|
|
9
|
-
private localTouchTogglePopover;
|
|
10
|
-
private currentTarget;
|
|
4
|
+
private localBeforeToggleHandler;
|
|
11
5
|
host: HTMLPostPopoverElement;
|
|
12
6
|
/**
|
|
13
7
|
* Defines the placement of the popover according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
@@ -25,6 +19,7 @@ export declare class PostPopover {
|
|
|
25
19
|
readonly arrow?: boolean;
|
|
26
20
|
constructor();
|
|
27
21
|
connectedCallback(): void;
|
|
22
|
+
componentDidLoad(): void;
|
|
28
23
|
disconnectedCallback(): void;
|
|
29
24
|
/**
|
|
30
25
|
* Programmatically display the popover
|
|
@@ -42,15 +37,6 @@ export declare class PostPopover {
|
|
|
42
37
|
*/
|
|
43
38
|
toggle(target: HTMLElement, force?: boolean): Promise<void>;
|
|
44
39
|
private get triggers();
|
|
45
|
-
|
|
46
|
-
* One time event handler for click events
|
|
47
|
-
* A permanent event listener would prevent a toggle button from working properly:
|
|
48
|
-
* A click opens the popover, a second click first closes it (due to light dismiss), then directly
|
|
49
|
-
* opens it again because of the click listener on the button. Registering a new
|
|
50
|
-
* one time listener after a small timeout solves this issue.
|
|
51
|
-
* @param e toggle event from post-popovercontainer
|
|
52
|
-
*/
|
|
53
|
-
private onToggle;
|
|
54
|
-
private stopImmediatePropagation;
|
|
40
|
+
private beforeToggleHandler;
|
|
55
41
|
render(): any;
|
|
56
42
|
}
|
|
@@ -16,6 +16,7 @@ export declare class PostPopovercontainer {
|
|
|
16
16
|
private arrowRef;
|
|
17
17
|
private eventTarget;
|
|
18
18
|
private clearAutoUpdate;
|
|
19
|
+
private toggleTimeoutId;
|
|
19
20
|
/**
|
|
20
21
|
* Fires whenever the popover gets shown or hidden, passing the new state in event.details as a boolean
|
|
21
22
|
*/
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { Placement } from '@floating-ui/dom';
|
|
2
2
|
import 'long-press-event';
|
|
3
|
-
/**
|
|
4
|
-
* @slot default - Slot for the content of the tooltip.
|
|
5
|
-
*/
|
|
6
3
|
export declare class PostTooltip {
|
|
7
4
|
private popoverRef;
|
|
8
|
-
private readonly localShowTooltip;
|
|
9
|
-
private readonly localHideTooltip;
|
|
10
5
|
host: HTMLPostTooltipElement;
|
|
11
6
|
/**
|
|
12
7
|
* Defines the placement of the tooltip according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
@@ -18,13 +13,17 @@ export declare class PostTooltip {
|
|
|
18
13
|
* Wheter or not to display a little pointer arrow
|
|
19
14
|
*/
|
|
20
15
|
readonly arrow?: boolean;
|
|
21
|
-
constructor();
|
|
22
16
|
connectedCallback(): void;
|
|
17
|
+
/**
|
|
18
|
+
* Add interest event listeners, but only once, and start
|
|
19
|
+
* the accessibility patcher
|
|
20
|
+
*/
|
|
21
|
+
componentWillLoad(): void;
|
|
23
22
|
/**
|
|
24
23
|
* Remove a bunch of event listeners if the tooltip gets removed from the DOM
|
|
24
|
+
* and disconnect the accessibility patcher
|
|
25
25
|
*/
|
|
26
26
|
disconnectedCallback(): void;
|
|
27
|
-
componentWillLoad(): void;
|
|
28
27
|
/**
|
|
29
28
|
* Programmatically display the tooltip
|
|
30
29
|
* @param target An element with [data-tooltip-target="id"] where the tooltip should be shown
|
|
@@ -40,7 +39,13 @@ export declare class PostTooltip {
|
|
|
40
39
|
* @param force Pass true to always show or false to always hide
|
|
41
40
|
*/
|
|
42
41
|
toggle(target: HTMLElement, force?: boolean): Promise<void>;
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Pointer or focus is on the tooltip, stop the tooltip from disappearing
|
|
44
|
+
*/
|
|
45
|
+
private handleInterest;
|
|
46
|
+
/**
|
|
47
|
+
* Pointer or focus left the tooltip, initiate the hiding process
|
|
48
|
+
*/
|
|
49
|
+
private handleInterestLost;
|
|
45
50
|
render(): any;
|
|
46
51
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getAttributeObserver: (attribute: string, handler: (element: HTMLElement, mutation?: MutationRecord) => void) => MutationObserver;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "loader/index.cjs.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@floating-ui/dom": "1.6.1",
|
|
28
28
|
"@oddbird/popover-polyfill": "0.3.7",
|
|
29
|
-
"@swisspost/design-system-styles": "6.6.
|
|
29
|
+
"@swisspost/design-system-styles": "6.6.3",
|
|
30
30
|
"ally.js": "1.4.1",
|
|
31
31
|
"long-press-event": "2.4.6"
|
|
32
32
|
},
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@typescript-eslint/parser": "5.62.0",
|
|
45
45
|
"bootstrap": "5.3.2",
|
|
46
46
|
"cypress": "13.6.4",
|
|
47
|
+
"cypress-axe": "1.5.0",
|
|
47
48
|
"cypress-storybook": "0.5.1",
|
|
48
49
|
"eslint": "8.56.0",
|
|
49
50
|
"eslint-plugin-react": "7.33.2",
|
|
50
|
-
"npm-run-all2": "5.0.2",
|
|
51
51
|
"rimraf": "5.0.5",
|
|
52
52
|
"sass": "1.70.0",
|
|
53
53
|
"ts-jest": "29.1.2",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"unit": "stencil test --spec",
|
|
71
71
|
"unit:watch": "stencil test --spec --watchAll --silent",
|
|
72
72
|
"e2e": "cypress run",
|
|
73
|
+
"e2e:ci": "xvfb-run -a cypress run",
|
|
73
74
|
"e2e:watch": "cypress open",
|
|
74
75
|
"generate": "stencil generate",
|
|
75
76
|
"lint": "eslint src/**/*{.ts,.tsx}"
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-f243643b.js');
|
|
4
|
-
const _package = require('./package-0645dd08.js');
|
|
5
|
-
const fade = require('./fade-35a3633a.js');
|
|
6
|
-
const index$1 = require('./index-8c288b1a.js');
|
|
7
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
8
|
-
|
|
9
|
-
const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'];
|
|
10
|
-
|
|
11
|
-
const postAlertCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.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-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-info:#cce4ee;--post-success:#2c911c;--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-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--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-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--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;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.alert-primary,.alert-success,.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(\n (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );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(\n (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.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.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 18z'/%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.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 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-primary:has(>post-icon)::before{content:none}.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:has(>post-icon)::before{content:none}.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.667zm0 21.333h2.667V28h-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.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-danger:has(>post-icon)::before{content:none}.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.667zm0 21.333h2.667V28h-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.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-warning:has(>post-icon)::before{content:none}.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.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='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-info:has(>post-icon)::before{content:none}.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.24 5.24 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.24 5.24 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-.27M16 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.3 6.3 0 0 0-.325 1.997 6.6 6.6 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.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 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.266m-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.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 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.8 11.8 0 0 0 4 15.92'/%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.24 5.24 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.24 5.24 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-.27M16 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.3 6.3 0 0 0-.325 1.997 6.6 6.6 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.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 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.266m-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.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 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.8 11.8 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-gray:has(>post-icon)::before{content:none}.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.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 18z'/%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.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 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-notification:has(>post-icon)::before{content:none}.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.667zm0 21.333h2.667V28h-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.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.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;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-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}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */: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}";
|
|
12
|
-
const PostAlertStyle0 = postAlertCss;
|
|
13
|
-
|
|
14
|
-
const PostAlert = class {
|
|
15
|
-
constructor(hostRef) {
|
|
16
|
-
index.registerInstance(this, hostRef);
|
|
17
|
-
this.dismissed = index.createEvent(this, "dismissed", 7);
|
|
18
|
-
this.alertId = crypto.randomUUID();
|
|
19
|
-
this.classes = undefined;
|
|
20
|
-
this.hasActions = undefined;
|
|
21
|
-
this.hasHeading = undefined;
|
|
22
|
-
this.onDismissButtonClick = () => this.dismiss();
|
|
23
|
-
this.dismissible = false;
|
|
24
|
-
this.dismissLabel = undefined;
|
|
25
|
-
this.fixed = false;
|
|
26
|
-
this.icon = undefined;
|
|
27
|
-
this.type = 'primary';
|
|
28
|
-
}
|
|
29
|
-
validateDismissible(isDismissible = this.dismissible) {
|
|
30
|
-
index$1.checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
|
|
31
|
-
setTimeout(() => this.validateDismissLabel());
|
|
32
|
-
}
|
|
33
|
-
validateDismissLabel(dismissLabel = this.dismissLabel) {
|
|
34
|
-
if (this.dismissible) {
|
|
35
|
-
checkNonEmpty.checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
validateFixed(isFixed = this.fixed) {
|
|
39
|
-
index$1.checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
|
|
40
|
-
}
|
|
41
|
-
validateIcon(icon = this.icon) {
|
|
42
|
-
index$1.checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
|
|
43
|
-
}
|
|
44
|
-
validateType(type = this.type) {
|
|
45
|
-
index$1.checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
|
|
46
|
-
}
|
|
47
|
-
connectedCallback() {
|
|
48
|
-
this.validateDismissible();
|
|
49
|
-
this.validateFixed();
|
|
50
|
-
this.validateIcon();
|
|
51
|
-
this.validateType();
|
|
52
|
-
}
|
|
53
|
-
componentWillRender() {
|
|
54
|
-
var _a;
|
|
55
|
-
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
56
|
-
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
57
|
-
this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
|
|
58
|
-
if (this.dismissible)
|
|
59
|
-
this.classes += ' alert-dismissible';
|
|
60
|
-
if (this.hasActions)
|
|
61
|
-
this.classes += ' alert-action';
|
|
62
|
-
if (this.fixed)
|
|
63
|
-
this.classes += ' alert-fixed-bottom';
|
|
64
|
-
if (this.icon === 'none')
|
|
65
|
-
this.classes += ' no-icon';
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Triggers alert dismissal programmatically (same as clicking on the close button (×)).
|
|
69
|
-
*/
|
|
70
|
-
async dismiss() {
|
|
71
|
-
const dismissal = fade.fadeOut(this.host);
|
|
72
|
-
await dismissal.finished;
|
|
73
|
-
this.host.remove();
|
|
74
|
-
this.dismissed.emit();
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
const defaultAlertContent = [
|
|
78
|
-
this.hasHeading && (index.h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, index.h("slot", { key: 'b151a1b8d49d08bd15b4a6661f7ecd25660971f8', name: "heading" }))),
|
|
79
|
-
index.h("slot", { key: `${this.alertId}-message` }),
|
|
80
|
-
];
|
|
81
|
-
const actionAlertContent = [
|
|
82
|
-
index.h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
|
|
83
|
-
index.h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, index.h("slot", { key: '6855a0e7c42527b628f3d76aeb13c86a1f708f38', name: "actions" })),
|
|
84
|
-
];
|
|
85
|
-
return (index.h(index.Host, { key: '959f326cf08711d6639678bfba195b8089b5cf6f', "data-version": _package.version }, index.h("div", { key: '011f13e08ebc25fcec404c316b3b74d0f588e0fc', role: "alert", class: this.classes }, this.dismissible && (index.h("button", { class: "btn-close", onClick: this.onDismissButtonClick }, index.h("span", { class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (index.h("post-icon", { key: `${this.alertId}-icon`, name: this.icon })), this.hasActions ? actionAlertContent : defaultAlertContent)));
|
|
86
|
-
}
|
|
87
|
-
get host() { return index.getElement(this); }
|
|
88
|
-
static get watchers() { return {
|
|
89
|
-
"dismissible": ["validateDismissible"],
|
|
90
|
-
"dismissLabel": ["validateDismissLabel"],
|
|
91
|
-
"fixed": ["validateFixed"],
|
|
92
|
-
"icon": ["validateIcon"],
|
|
93
|
-
"type": ["validateType"]
|
|
94
|
-
}; }
|
|
95
|
-
};
|
|
96
|
-
PostAlert.style = PostAlertStyle0;
|
|
97
|
-
|
|
98
|
-
exports.PostAlert = PostAlert;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-f243643b.js');
|
|
4
|
-
const _package = require('./package-0645dd08.js');
|
|
5
|
-
|
|
6
|
-
const postPopoverCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.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;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-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}";
|
|
7
|
-
const PostPopoverStyle0 = postPopoverCss;
|
|
8
|
-
|
|
9
|
-
const PostPopover = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.placement = 'top';
|
|
13
|
-
this.closeButtonCaption = undefined;
|
|
14
|
-
this.arrow = true;
|
|
15
|
-
this.localTogglePopover = e => this.toggle(e.target);
|
|
16
|
-
this.localEnterTogglePopover = e => {
|
|
17
|
-
if (e.key === 'Enter')
|
|
18
|
-
this.toggle(e.target);
|
|
19
|
-
};
|
|
20
|
-
this.localTouchTogglePopover = e => {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
this.toggle(e.target);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
connectedCallback() {
|
|
26
|
-
if (!this.triggers) {
|
|
27
|
-
throw new Error(`No trigger found for <post-popover popover-id="${this.host.id}`);
|
|
28
|
-
}
|
|
29
|
-
// As long as cross-shadow-boundary [popovertarget] and button.popoverTargetElement are not working
|
|
30
|
-
// we're left with listening to trigger events ourselves
|
|
31
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetElement
|
|
32
|
-
// https://github.com/whatwg/html/issues/9109#issuecomment-1494030465 (does not seem to work for now)
|
|
33
|
-
// https://stackoverflow.com/questions/77324143/popovertargetelement-does-not-cross-shadow-boundaries?noredirect=1#comment136318281_77324143
|
|
34
|
-
this.triggers.forEach(trigger => {
|
|
35
|
-
// See this.onToggle for one time mouse event listener
|
|
36
|
-
trigger.addEventListener('mouseup', this.localTogglePopover, { once: true });
|
|
37
|
-
trigger.addEventListener('keypress', this.localEnterTogglePopover);
|
|
38
|
-
trigger.addEventListener('touch', this.localTouchTogglePopover, { once: true });
|
|
39
|
-
trigger.setAttribute('aria-expanded', 'false');
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
disconnectedCallback() {
|
|
43
|
-
this.triggers.forEach(trigger => {
|
|
44
|
-
trigger.removeEventListener('mouseup', this.localTogglePopover);
|
|
45
|
-
trigger.removeEventListener('keypress', this.localEnterTogglePopover);
|
|
46
|
-
trigger.removeEventListener('touch', this.localTouchTogglePopover);
|
|
47
|
-
trigger.removeAttribute('aria-expanded');
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Programmatically display the popover
|
|
52
|
-
* @param target An element with [data-popover-target="id"] where the popover should be shown
|
|
53
|
-
*/
|
|
54
|
-
async show(target) {
|
|
55
|
-
this.currentTarget = target;
|
|
56
|
-
this.popoverRef.show(target);
|
|
57
|
-
target.setAttribute('aria-expanded', 'true');
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Programmatically hide this popover
|
|
61
|
-
*/
|
|
62
|
-
async hide() {
|
|
63
|
-
this.popoverRef.hide();
|
|
64
|
-
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Toggle popover display
|
|
68
|
-
* @param target An element with [data-popover-target="id"] where the popover should be anchored to
|
|
69
|
-
* @param force Pass true to always show or false to always hide
|
|
70
|
-
*/
|
|
71
|
-
async toggle(target, force) {
|
|
72
|
-
this.currentTarget = target;
|
|
73
|
-
const newState = await this.popoverRef.toggle(target, force);
|
|
74
|
-
target.setAttribute('aria-expanded', `${newState}`);
|
|
75
|
-
}
|
|
76
|
-
get triggers() {
|
|
77
|
-
return document.querySelectorAll(`[data-popover-target="${this.host.id}"]`);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* One time event handler for click events
|
|
81
|
-
* A permanent event listener would prevent a toggle button from working properly:
|
|
82
|
-
* A click opens the popover, a second click first closes it (due to light dismiss), then directly
|
|
83
|
-
* opens it again because of the click listener on the button. Registering a new
|
|
84
|
-
* one time listener after a small timeout solves this issue.
|
|
85
|
-
* @param e toggle event from post-popovercontainer
|
|
86
|
-
*/
|
|
87
|
-
onToggle(e) {
|
|
88
|
-
if (this.currentTarget) {
|
|
89
|
-
this.currentTarget.setAttribute('aria-expanded', `${e.detail}`);
|
|
90
|
-
}
|
|
91
|
-
if (!e.detail) {
|
|
92
|
-
window.requestAnimationFrame(() => {
|
|
93
|
-
this.triggers.forEach(trigger => {
|
|
94
|
-
trigger.addEventListener('mouseup', this.localTogglePopover, { once: true });
|
|
95
|
-
trigger.addEventListener('touch', this.localTouchTogglePopover, { once: true });
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
// Handle missing re-focusing logic after close. Can be removed as soon as popovertarget works correctly
|
|
99
|
-
if (this.currentTarget) {
|
|
100
|
-
this.currentTarget.focus();
|
|
101
|
-
this.currentTarget = null;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
// Fix for firefox to prevent the following lines from triggering
|
|
106
|
-
// https://github.com/oddbird/popover-polyfill/blob/main/src/popover.ts#L338
|
|
107
|
-
stopImmediatePropagation(e) {
|
|
108
|
-
e.stopImmediatePropagation();
|
|
109
|
-
}
|
|
110
|
-
render() {
|
|
111
|
-
return (index.h(index.Host, { key: 'f1580a33b1a6398ce0f32ce76365a1cebe68ceeb', "data-version": _package.version }, index.h("post-popovercontainer", { key: '3fbf43896d0cb2c4d35b18302a66097499aa31c0', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e), onPostPopoverToggled: e => this.onToggle(e) }, index.h("div", { key: '3b698cdc50d72e59238a1dbc48aced03c0c7dc43', class: "popover-container", onPointerDown: e => this.stopImmediatePropagation(e), onPointerUp: e => this.stopImmediatePropagation(e) }, index.h("div", { key: '1e9f888bba7c54fa4ba956553e7668f3f37daa67', class: "popover-content" }, index.h("slot", { key: '433e2b5d75f7bf7b07ba2895c97fc362a98b653f' })), index.h("button", { key: 'ee88604aabea87068e5653a0d14111064c6e8829', class: "btn-close", onClick: () => this.hide() }, index.h("span", { key: 'f9fbd6ab73a99c293281c5a80e4c583fe5ca8f37', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
112
|
-
}
|
|
113
|
-
get host() { return index.getElement(this); }
|
|
114
|
-
};
|
|
115
|
-
PostPopover.style = PostPopoverStyle0;
|
|
116
|
-
|
|
117
|
-
exports.PostPopover = PostPopover;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-f243643b.js');
|
|
4
|
-
const _package = require('./package-0645dd08.js');
|
|
5
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
6
|
-
|
|
7
|
-
const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:var(--post-contrast-color);text-decoration:none}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:#fff;color:var(--post-contrast-color)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:#fff;color:var(--post-contrast-color);box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:\"\";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height:.25rem;background-color:#fc0}:is(.bg-dark,.bg-primary,.bg-black,.bg-success,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-error-red) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:is(.bg-dark,.bg-primary,.bg-black,.bg-success,.bg-danger,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.bg-error-red) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:2px solid Highlight;outline-offset:-0.25rem}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}.bg-yellow .tab-title{background-color:#fc0}.bg-yellow .tab-title.active{background-color:#fc0}.bg-yellow .nav-item{background-color:#fc0}.bg-light .tab-title{background-color:#faf9f8}.bg-light .tab-title.active{background-color:#faf9f8}.bg-light .nav-item{background-color:#faf9f8}.bg-gray .tab-title{background-color:#f4f3f1}.bg-gray .tab-title.active{background-color:#f4f3f1}.bg-gray .nav-item{background-color:#f4f3f1}.bg-dark .tab-title{background-color:#333}.bg-dark .tab-title.active{background-color:#333}.bg-dark .nav-item{background-color:#333}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.bg-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.bg-success .tab-title{background-color:#2c911c}.bg-success .tab-title.active{background-color:#2c911c}.bg-success .nav-item{background-color:#2c911c}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-danger .tab-title{background-color:#a51728}.bg-danger .tab-title.active{background-color:#a51728}.bg-danger .nav-item{background-color:#a51728}.bg-nightblue .tab-title{background-color:#004976}.bg-nightblue .tab-title.active{background-color:#004976}.bg-nightblue .nav-item{background-color:#004976}.bg-nightblue-bright .tab-title{background-color:#0076a8}.bg-nightblue-bright .tab-title.active{background-color:#0076a8}.bg-nightblue-bright .nav-item{background-color:#0076a8}.bg-petrol .tab-title{background-color:#006d68}.bg-petrol .tab-title.active{background-color:#006d68}.bg-petrol .nav-item{background-color:#006d68}.bg-petrol-bright .tab-title{background-color:#00968f}.bg-petrol-bright .tab-title.active{background-color:#00968f}.bg-petrol-bright .nav-item{background-color:#00968f}.bg-coral .tab-title{background-color:#9e2a2f}.bg-coral .tab-title.active{background-color:#9e2a2f}.bg-coral .nav-item{background-color:#9e2a2f}.bg-coral-bright .tab-title{background-color:#e03c31}.bg-coral-bright .tab-title.active{background-color:#e03c31}.bg-coral-bright .nav-item{background-color:#e03c31}.bg-olive .tab-title{background-color:#716135}.bg-olive .tab-title.active{background-color:#716135}.bg-olive .nav-item{background-color:#716135}.bg-olive-bright .tab-title{background-color:#aa9d2e}.bg-olive-bright .tab-title.active{background-color:#aa9d2e}.bg-olive-bright .nav-item{background-color:#aa9d2e}.bg-purple .tab-title{background-color:#80276c}.bg-purple .tab-title.active{background-color:#80276c}.bg-purple .nav-item{background-color:#80276c}.bg-purple-bright .tab-title{background-color:#c5299b}.bg-purple-bright .tab-title.active{background-color:#c5299b}.bg-purple-bright .nav-item{background-color:#c5299b}.bg-aubergine .tab-title{background-color:#523178}.bg-aubergine .tab-title.active{background-color:#523178}.bg-aubergine .nav-item{background-color:#523178}.bg-aubergine-bright .tab-title{background-color:#7566a0}.bg-aubergine-bright .tab-title.active{background-color:#7566a0}.bg-aubergine-bright .nav-item{background-color:#7566a0}.bg-success-green .tab-title{background-color:#2c871d}.bg-success-green .tab-title.active{background-color:#2c871d}.bg-success-green .nav-item{background-color:#2c871d}.bg-error-red .tab-title{background-color:#a51728}.bg-error-red .tab-title.active{background-color:#a51728}.bg-error-red .nav-item{background-color:#a51728}.bg-warning-orange .tab-title{background-color:#f49e00}.bg-warning-orange .tab-title.active{background-color:#f49e00}.bg-warning-orange .nav-item{background-color:#f49e00}.bg-success-background .tab-title{background-color:#c0debb}.bg-success-background .tab-title.active{background-color:#c0debb}.bg-success-background .nav-item{background-color:#c0debb}.bg-error-background .tab-title{background-color:#ffdade}.bg-error-background .tab-title.active{background-color:#ffdade}.bg-error-background .nav-item{background-color:#ffdade}.bg-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}[class*=bg-] .tab-title.active:focus::after{background-color:rgba(255,255,255,.2)}@supports selector(*:focus-visible){[class*=bg-] .tab-title.active:focus::after{background-color:unset}[class*=bg-] .tab-title.active:focus-visible::after{background-color:rgba(255,255,255,.2)}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;-webkit-appearance:button;appearance:button}";
|
|
8
|
-
const PostTabHeaderStyle0 = postTabHeaderCss;
|
|
9
|
-
|
|
10
|
-
const PostTabHeader = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.tabId = undefined;
|
|
14
|
-
this.panel = undefined;
|
|
15
|
-
}
|
|
16
|
-
validateFor(newValue) {
|
|
17
|
-
checkNonEmpty.checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
|
|
18
|
-
}
|
|
19
|
-
componentWillLoad() {
|
|
20
|
-
this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
return (index.h(index.Host, { key: '5685ea424c0e59351a7df7e6b990740067f7e986', "data-version": _package.version }, index.h("button", { key: 'f32ebddafa7450b081c88e44405f59396a0e6b97', "aria-selected": "false", class: "tab-title", id: this.tabId, role: "tab", tabindex: "-1", type: "button" }, index.h("slot", { key: '95022af953bbbaf41b5eac4594bf00dc4b12fb37' }))));
|
|
24
|
-
}
|
|
25
|
-
get host() { return index.getElement(this); }
|
|
26
|
-
static get watchers() { return {
|
|
27
|
-
"panel": ["validateFor"]
|
|
28
|
-
}; }
|
|
29
|
-
};
|
|
30
|
-
PostTabHeader.style = PostTabHeaderStyle0;
|
|
31
|
-
|
|
32
|
-
exports.PostTabHeader = PostTabHeader;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1708db56.js';
|
|
2
|
-
import { v as version } from './package-37a68f71.js';
|
|
3
|
-
import { f as fadeOut } from './fade-7fd71785.js';
|
|
4
|
-
import { a as checkType, b as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-b444db27.js';
|
|
5
|
-
import { c as checkNonEmpty } from './check-non-empty-58bd6b17.js';
|
|
6
|
-
|
|
7
|
-
const ALERT_TYPES = ['primary', 'success', 'danger', 'warning', 'info', 'gray'];
|
|
8
|
-
|
|
9
|
-
const postAlertCss = "/*!\n * Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n\n * The MIT License (MIT)\n\n * Copyright (c) 2011-2020 Twitter, Inc.\n * Copyright (c) 2011-2020 The Bootstrap Authors\n\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */.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-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-info:#cce4ee;--post-success:#2c911c;--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-success-green:#2c871d;--post-error-red:#a51728;--post-warning-orange:#f49e00;--post-success-background:#c0debb;--post-error-background:#ffdade;--post-warning-background:#fce2b2;--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-info-rgb:204, 228, 238;--post-success-rgb:44, 145, 28;--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;--post-success-green-rgb:44, 135, 29;--post-error-red-rgb:165, 23, 40;--post-warning-orange-rgb:244, 158, 0;--post-success-background-rgb:192, 222, 187;--post-error-background-rgb:255, 218, 222;--post-warning-background-rgb:252, 226, 178}.alert-primary,.alert-success,.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(\n (100% - 1440px) / 2 + 120px + 1.25rem + 3rem + 1.25rem\n );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(\n (100% - 1440px) / 2 + 120px + 1.25rem + 1.25rem + 1.5rem\n )}.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.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 18z'/%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.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 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-primary:has(>post-icon)::before{content:none}.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:has(>post-icon)::before{content:none}.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.667zm0 21.333h2.667V28h-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.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-danger:has(>post-icon)::before{content:none}.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.667zm0 21.333h2.667V28h-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.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-warning:has(>post-icon)::before{content:none}.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.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='M17.333 25.333v-16h-4.667V12h2v13.333h-2V28h6.667v-2.667zM14.667 4h2.667v2.667h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-info:has(>post-icon)::before{content:none}.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.24 5.24 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.24 5.24 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-.27M16 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.3 6.3 0 0 0-.325 1.997 6.6 6.6 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.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 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.266m-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.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 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.8 11.8 0 0 0 4 15.92'/%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.24 5.24 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.24 5.24 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-.27M16 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.3 6.3 0 0 0-.325 1.997 6.6 6.6 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.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-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.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 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.266m-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.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 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.8 11.8 0 0 0 4 15.92'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-gray:has(>post-icon)::before{content:none}.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.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 18z'/%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.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 18z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-notification:has(>post-icon)::before{content:none}.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.667zm0 21.333h2.667V28h-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.667zm0 21.333h2.667V28h-2.667z'/%3E%3C/g%3E%3C/svg%3E\");background-color:currentColor}.alert-error:has(>post-icon)::before{content:none}.alert-error>post-icon{background-color:#a51728}.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;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-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}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */: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}";
|
|
10
|
-
const PostAlertStyle0 = postAlertCss;
|
|
11
|
-
|
|
12
|
-
const PostAlert = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
registerInstance(this, hostRef);
|
|
15
|
-
this.dismissed = createEvent(this, "dismissed", 7);
|
|
16
|
-
this.alertId = crypto.randomUUID();
|
|
17
|
-
this.classes = undefined;
|
|
18
|
-
this.hasActions = undefined;
|
|
19
|
-
this.hasHeading = undefined;
|
|
20
|
-
this.onDismissButtonClick = () => this.dismiss();
|
|
21
|
-
this.dismissible = false;
|
|
22
|
-
this.dismissLabel = undefined;
|
|
23
|
-
this.fixed = false;
|
|
24
|
-
this.icon = undefined;
|
|
25
|
-
this.type = 'primary';
|
|
26
|
-
}
|
|
27
|
-
validateDismissible(isDismissible = this.dismissible) {
|
|
28
|
-
checkType(isDismissible, 'boolean', 'The post-alert "dismissible" prop should be a boolean.');
|
|
29
|
-
setTimeout(() => this.validateDismissLabel());
|
|
30
|
-
}
|
|
31
|
-
validateDismissLabel(dismissLabel = this.dismissLabel) {
|
|
32
|
-
if (this.dismissible) {
|
|
33
|
-
checkNonEmpty(dismissLabel, 'Dismissible post-alert\'s require a "dismiss-label" prop.');
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
validateFixed(isFixed = this.fixed) {
|
|
37
|
-
checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
|
|
38
|
-
}
|
|
39
|
-
validateIcon(icon = this.icon) {
|
|
40
|
-
checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-alert "icon" prop should be a 4-digits string.');
|
|
41
|
-
}
|
|
42
|
-
validateType(type = this.type) {
|
|
43
|
-
checkEmptyOrOneOf(type, ALERT_TYPES, `The post-alert requires a type form: ${ALERT_TYPES.join(', ')}`);
|
|
44
|
-
}
|
|
45
|
-
connectedCallback() {
|
|
46
|
-
this.validateDismissible();
|
|
47
|
-
this.validateFixed();
|
|
48
|
-
this.validateIcon();
|
|
49
|
-
this.validateType();
|
|
50
|
-
}
|
|
51
|
-
componentWillRender() {
|
|
52
|
-
var _a;
|
|
53
|
-
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
54
|
-
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
55
|
-
this.classes = `alert alert-${(_a = this.type) !== null && _a !== void 0 ? _a : 'primary'}`;
|
|
56
|
-
if (this.dismissible)
|
|
57
|
-
this.classes += ' alert-dismissible';
|
|
58
|
-
if (this.hasActions)
|
|
59
|
-
this.classes += ' alert-action';
|
|
60
|
-
if (this.fixed)
|
|
61
|
-
this.classes += ' alert-fixed-bottom';
|
|
62
|
-
if (this.icon === 'none')
|
|
63
|
-
this.classes += ' no-icon';
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Triggers alert dismissal programmatically (same as clicking on the close button (×)).
|
|
67
|
-
*/
|
|
68
|
-
async dismiss() {
|
|
69
|
-
const dismissal = fadeOut(this.host);
|
|
70
|
-
await dismissal.finished;
|
|
71
|
-
this.host.remove();
|
|
72
|
-
this.dismissed.emit();
|
|
73
|
-
}
|
|
74
|
-
render() {
|
|
75
|
-
const defaultAlertContent = [
|
|
76
|
-
this.hasHeading && (h("div", { key: `${this.alertId}-heading`, class: "alert-heading" }, h("slot", { key: 'b151a1b8d49d08bd15b4a6661f7ecd25660971f8', name: "heading" }))),
|
|
77
|
-
h("slot", { key: `${this.alertId}-message` }),
|
|
78
|
-
];
|
|
79
|
-
const actionAlertContent = [
|
|
80
|
-
h("div", { key: `${this.alertId}-content`, class: "alert-content" }, defaultAlertContent),
|
|
81
|
-
h("div", { key: `${this.alertId}-buttons`, class: "alert-buttons" }, h("slot", { key: '6855a0e7c42527b628f3d76aeb13c86a1f708f38', name: "actions" })),
|
|
82
|
-
];
|
|
83
|
-
return (h(Host, { key: '959f326cf08711d6639678bfba195b8089b5cf6f', "data-version": version }, h("div", { key: '011f13e08ebc25fcec404c316b3b74d0f588e0fc', 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 ? actionAlertContent : defaultAlertContent)));
|
|
84
|
-
}
|
|
85
|
-
get host() { return getElement(this); }
|
|
86
|
-
static get watchers() { return {
|
|
87
|
-
"dismissible": ["validateDismissible"],
|
|
88
|
-
"dismissLabel": ["validateDismissLabel"],
|
|
89
|
-
"fixed": ["validateFixed"],
|
|
90
|
-
"icon": ["validateIcon"],
|
|
91
|
-
"type": ["validateType"]
|
|
92
|
-
}; }
|
|
93
|
-
};
|
|
94
|
-
PostAlert.style = PostAlertStyle0;
|
|
95
|
-
|
|
96
|
-
export { PostAlert as P };
|