@swisspost/design-system-components 9.0.0-next.5 → 9.0.0-next.6
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/get-root-7a3498ef.js +11 -0
- package/dist/cjs/index-e1f32cce.js +4 -4
- package/dist/cjs/index.cjs.js +22 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-53892d3d.js → package-81d89808.js} +1 -1
- package/dist/cjs/{post-accordion-7f627ffd.js → post-accordion-7d2805f4.js} +1 -1
- package/dist/cjs/{post-accordion-item-ceb5399f.js → post-accordion-item-0d8b65b1.js} +1 -1
- 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-avatar-a8123d38.js → post-avatar-0b87e44f.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/post-banner-e42f02bd.js +90 -0
- package/dist/cjs/{post-alert.cjs.entry.js → post-banner.cjs.entry.js} +3 -3
- package/dist/cjs/{post-breadcrumb-item-6e4704e5.js → post-breadcrumb-item-46a8e876.js} +1 -1
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/post-card-control-7d3c5545.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_10.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-trigger-e4862a5b.js → post-collapsible-trigger-ae50d0d4.js} +3 -10
- package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-language-option-62414842.js → post-language-option-c6049337.js} +1 -1
- package/dist/cjs/post-language-option.cjs.entry.js +2 -2
- package/dist/cjs/{post-megadropdown-trigger-da912fed.js → post-megadropdown-trigger-97472602.js} +3 -3
- package/dist/cjs/{post-menu-54fa65d3.js → post-menu-61c31423.js} +1 -1
- package/dist/cjs/{post-menu-item-8c3090b1.js → post-menu-item-4f393cde.js} +1 -1
- package/dist/cjs/post-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-trigger-71449876.js → post-menu-trigger-44a5f8e9.js} +5 -3
- package/dist/cjs/post-menu-trigger.cjs.entry.js +3 -2
- package/dist/cjs/post-menu.cjs.entry.js +2 -2
- package/dist/cjs/{post-popover-5f639e4f.js → post-popover-44fdb733.js} +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-3d166fed.js → post-rating-4d5e7c8e.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-header-3fcb40fa.js +32 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-e5685f3d.js → post-tab-panel-b1a41181.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-e871c911.js → post-tabs-092790e4.js} +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-62f31d0e.js → post-tag-389a43f7.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-851c342c.js → post-tooltip-c42d6853.js} +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/post-avatar/post-avatar.js +1 -1
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +3 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +39 -68
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +8 -8
- package/dist/collection/components/post-list/post-list.js +2 -2
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +4 -3
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/index.js +1 -1
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/{post-alert.d.ts → post-banner.d.ts} +4 -4
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +125 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-collapsible-trigger2.js +1 -8
- package/dist/components/post-list2.js +2 -2
- package/dist/components/post-menu-trigger2.js +4 -2
- package/dist/components/post-popover2.js +1 -1
- package/dist/components/post-tab-header2.js +1 -1
- package/dist/components/post-tabs2.js +1 -1
- package/dist/components/post-tag2.js +1 -1
- package/dist/docs.json +149 -175
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/index-e1b64755.js +4 -4
- package/dist/esm/index.js +21 -20
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-c65b0409.js +3 -0
- package/dist/esm/{post-accordion-b2762084.js → post-accordion-c833c272.js} +1 -1
- package/dist/esm/{post-accordion-item-82ef1c4a.js → post-accordion-item-19fb4776.js} +1 -1
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-avatar-e84c49cb.js → post-avatar-f43ebc89.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/post-banner-cf6f756b.js +88 -0
- package/dist/esm/{post-alert.entry.js → post-banner.entry.js} +2 -2
- package/dist/esm/{post-breadcrumb-item-ff752018.js → post-breadcrumb-item-a93b91a7.js} +1 -1
- package/dist/esm/post-breadcrumb-item.entry.js +2 -2
- package/dist/esm/post-card-control-017fb9b2.js +270 -0
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_10.entry.js +2 -2
- package/dist/esm/{post-collapsible-trigger-34740fa6.js → post-collapsible-trigger-7b3d0fd3.js} +2 -9
- package/dist/esm/post-collapsible_2.entry.js +3 -2
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-language-option-e2a76752.js → post-language-option-05f53f6f.js} +1 -1
- package/dist/esm/post-language-option.entry.js +2 -2
- package/dist/esm/{post-megadropdown-trigger-7e577245.js → post-megadropdown-trigger-3112a42b.js} +3 -3
- package/dist/esm/{post-menu-e6337859.js → post-menu-05396ff7.js} +1 -1
- package/dist/esm/{post-menu-item-c10a0a93.js → post-menu-item-bbbb6a7e.js} +1 -1
- package/dist/esm/post-menu-item.entry.js +2 -2
- package/dist/esm/{post-menu-trigger-5f31ad60.js → post-menu-trigger-f9f4d299.js} +5 -3
- package/dist/esm/post-menu-trigger.entry.js +3 -2
- package/dist/esm/post-menu.entry.js +2 -2
- package/dist/esm/{post-popover-d78547b4.js → post-popover-1ae328eb.js} +2 -2
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-d04d0349.js → post-rating-75171e3a.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-tab-header-d4d40b0e.js +30 -0
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-d9ecc10e.js → post-tab-panel-79b42d3e.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-e98a47e8.js → post-tabs-4d880ed8.js} +2 -2
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-40a65871.js → post-tag-bf91d0a7.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-3b1e121c.js → post-tooltip-7aa14f94.js} +1 -1
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-314c1090.js +1 -0
- package/dist/post-components/p-34e5b9da.entry.js +1 -0
- package/dist/post-components/p-3899ed87.js +1 -0
- package/dist/post-components/p-3b3b57d0.entry.js +1 -0
- package/dist/post-components/p-4221fd16.js +1 -0
- package/dist/post-components/{p-1d8a41d3.js → p-470eb29c.js} +1 -1
- package/dist/post-components/{p-af8cfb8e.js → p-476a6342.js} +1 -1
- package/dist/post-components/p-499f3c12.entry.js +1 -0
- package/dist/post-components/{p-879ae242.js → p-4ac02dc1.js} +1 -1
- package/dist/post-components/p-4cb59994.js +1 -0
- package/dist/post-components/{p-e0dc4fac.js → p-4cca12fe.js} +1 -1
- package/dist/post-components/p-56bd7eb7.entry.js +1 -0
- package/dist/post-components/p-61b27b51.entry.js +1 -0
- package/dist/post-components/p-6e37b9bf.entry.js +1 -0
- package/dist/post-components/{p-76dbca34.entry.js → p-7175208c.entry.js} +1 -1
- package/dist/post-components/p-71eb2dc7.js +1 -0
- package/dist/post-components/p-7391daa3.entry.js +1 -0
- package/dist/post-components/{p-6e7bde44.js → p-73a5b344.js} +1 -1
- package/dist/post-components/{p-7a20605b.js → p-7a887455.js} +1 -1
- package/dist/post-components/p-7a995b7e.entry.js +1 -0
- package/dist/post-components/p-888ab913.entry.js +1 -0
- package/dist/post-components/p-8927a8e4.entry.js +1 -0
- package/dist/post-components/p-8fb11b22.entry.js +1 -0
- package/dist/post-components/p-916ec6d5.entry.js +1 -0
- package/dist/post-components/p-98d8ba01.js +1 -0
- package/dist/post-components/{p-2069e764.js → p-9d94bf34.js} +1 -1
- package/dist/post-components/p-a1a1b679.entry.js +1 -0
- package/dist/post-components/p-a87d8337.entry.js +1 -0
- package/dist/post-components/p-ab0556af.entry.js +1 -0
- package/dist/post-components/p-b8d230eb.js +1 -0
- package/dist/post-components/{p-42c628fd.js → p-c6ac2e45.js} +1 -1
- package/dist/post-components/p-c94a2ae1.entry.js +1 -0
- package/dist/post-components/{p-fc2c7222.js → p-cd06fab9.js} +1 -1
- package/dist/post-components/p-cf298c46.js +1 -0
- package/dist/post-components/p-d2938e9a.entry.js +1 -0
- package/dist/post-components/p-d6ac46af.js +1 -0
- package/dist/post-components/{p-75514d7d.js → p-d7c37aca.js} +1 -1
- package/dist/post-components/p-dddc70f6.entry.js +1 -0
- package/dist/post-components/{p-77a757d4.js → p-ed12b51d.js} +1 -1
- package/dist/post-components/p-fc91cbc2.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
- package/dist/types/components/post-banner/banner-types.d.ts +2 -0
- package/dist/types/components/post-banner/post-banner.d.ts +49 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
- package/dist/types/components/post-list/post-list.d.ts +1 -1
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +1 -0
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components.d.ts +71 -79
- package/dist/types/index.d.ts +1 -1
- package/loaders/get-root.js +9 -0
- package/loaders/index.d.ts +2 -2
- package/loaders/index.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/{post-alert.d.ts → post-banner.d.ts} +4 -4
- package/loaders/post-banner.js +128 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-collapsible-trigger2.js +1 -8
- package/loaders/post-list.js +2 -2
- package/loaders/post-menu-trigger.js +4 -2
- package/loaders/post-popover.js +1 -1
- package/loaders/post-tab-header.js +1 -1
- package/loaders/post-tabs.js +1 -1
- package/loaders/post-tag.js +1 -1
- package/package.json +4 -4
- package/dist/cjs/post-alert-5333a23c.js +0 -99
- package/dist/cjs/post-card-control-b289ddcf.js +0 -272
- package/dist/cjs/post-tab-header-03b20f24.js +0 -32
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -7
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/package-d0380f19.js +0 -3
- package/dist/esm/post-alert-0679e14b.js +0 -97
- package/dist/esm/post-card-control-53b9ca94.js +0 -270
- package/dist/esm/post-tab-header-6efc530f.js +0 -30
- package/dist/post-components/p-029c91d8.entry.js +0 -1
- package/dist/post-components/p-03c850fa.entry.js +0 -1
- package/dist/post-components/p-3705d2b4.js +0 -1
- package/dist/post-components/p-3aaea2a7.js +0 -1
- package/dist/post-components/p-3b4342e4.entry.js +0 -1
- package/dist/post-components/p-3b5bd4a4.entry.js +0 -1
- package/dist/post-components/p-3f785d16.entry.js +0 -1
- package/dist/post-components/p-40a57111.entry.js +0 -1
- package/dist/post-components/p-41f5f626.entry.js +0 -1
- package/dist/post-components/p-43451d07.js +0 -1
- package/dist/post-components/p-49a42850.js +0 -1
- package/dist/post-components/p-4f1a40dd.entry.js +0 -1
- package/dist/post-components/p-70c016ab.js +0 -1
- package/dist/post-components/p-77af2367.entry.js +0 -1
- package/dist/post-components/p-976c2742.js +0 -1
- package/dist/post-components/p-9cda2b0d.entry.js +0 -1
- package/dist/post-components/p-9fab4d3c.js +0 -1
- package/dist/post-components/p-a0226aec.js +0 -1
- package/dist/post-components/p-aa890e24.entry.js +0 -1
- package/dist/post-components/p-ac6d9496.js +0 -1
- package/dist/post-components/p-ad6e41d5.entry.js +0 -1
- package/dist/post-components/p-c95813b2.entry.js +0 -1
- package/dist/post-components/p-d3814644.entry.js +0 -1
- package/dist/post-components/p-d5b02b44.entry.js +0 -1
- package/dist/post-components/p-f404d0bb.entry.js +0 -1
- package/dist/post-components/p-f5b933bc.entry.js +0 -1
- package/dist/post-components/p-fbda2556.entry.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
5
|
const attributeObserver = require('./attribute-observer-10f08c04.js');
|
|
6
6
|
|
|
7
|
-
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;appearance:button;border-radius:var(--post-device-border-radius-round);color
|
|
7
|
+
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;appearance:button;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:280px;max-width:100%}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
|
|
8
8
|
const PostPopoverStyle0 = postPopoverCss;
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postPopover = require('./post-popover-
|
|
5
|
+
const postPopover = require('./post-popover-44fdb733.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
require('./attribute-observer-10f08c04.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
5
|
|
|
6
6
|
const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}";
|
|
7
7
|
const PostRatingStyle0 = postRatingCss;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postRating = require('./post-rating-
|
|
5
|
+
const postRating = require('./post-rating-4d5e7c8e.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-e1f32cce.js');
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
|
+
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
6
|
+
|
|
7
|
+
const postTabHeaderCss = ".tab-title[role=tab]{display:inline-block;cursor:pointer;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;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);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:var(--post-contrast-color-inverted);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}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .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-white .tab-title{background-color:#fff}.bg-white .tab-title.active{background-color:#fff}.bg-white .nav-item{background-color:#fff}.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-black .tab-title{background-color:#000}.bg-black .tab-title.active{background-color:#000}.bg-black .nav-item{background-color:#000}.bg-primary .tab-title{background-color:#333}.bg-primary .tab-title.active{background-color:#333}.bg-primary .nav-item{background-color:#333}.bg-secondary .tab-title{background-color:#666}.bg-secondary .tab-title.active{background-color:#666}.bg-secondary .nav-item{background-color:#666}.bg-success .tab-title{background-color:#2c871d}.bg-success .tab-title.active{background-color:#2c871d}.bg-success .nav-item{background-color:#2c871d}.bg-warning .tab-title{background-color:#f49e00}.bg-warning .tab-title.active{background-color:#f49e00}.bg-warning .nav-item{background-color:#f49e00}.bg-error .tab-title{background-color:#a51728}.bg-error .tab-title.active{background-color:#a51728}.bg-error .nav-item{background-color:#a51728}.bg-info .tab-title{background-color:#cce4ee}.bg-info .tab-title.active{background-color:#cce4ee}.bg-info .nav-item{background-color:#cce4ee}.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-warning-background .tab-title{background-color:#fce2b2}.bg-warning-background .tab-title.active{background-color:#fce2b2}.bg-warning-background .nav-item{background-color:#fce2b2}.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}[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;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: 'f105dabe8a61308d5aa361a6aeaad2f938cf7656', id: this.tabId, role: "tab", "data-version": _package.version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, index.h("slot", { key: '3abc0c8fab0a0ab1dd538e20831980b4672ae79a' })));
|
|
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;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTabHeader = require('./post-tab-header-
|
|
5
|
+
const postTabHeader = require('./post-tab-header-3fcb40fa.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
require('./check-non-empty-eeaa8f77.js');
|
|
9
9
|
require('./constants-238701d3.js');
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
5
|
|
|
6
6
|
const postTabPanelCss = ":host{display:none}";
|
|
7
7
|
const PostTabPanelStyle0 = postTabPanelCss;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTabPanel = require('./post-tab-panel-
|
|
5
|
+
const postTabPanel = require('./post-tab-panel-b1a41181.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
5
|
const fade = require('./fade-35a3633a.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -25,7 +25,7 @@ const customOnReady = (callback) => {
|
|
|
25
25
|
return setTimeout(callback);
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{
|
|
28
|
+
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 0.02)}.tabs-wrapper::after{content:\"\";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:\"\";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}.bg-yellow .tabs-wrapper{background-color:#fc0}.bg-white .tabs-wrapper{background-color:#fff}.bg-light .tabs-wrapper{background-color:#faf9f8}.bg-gray .tabs-wrapper{background-color:#f4f3f1}.bg-dark .tabs-wrapper{background-color:#333}.bg-black .tabs-wrapper{background-color:#000}.bg-primary .tabs-wrapper{background-color:#333}.bg-secondary .tabs-wrapper{background-color:#666}.bg-success .tabs-wrapper{background-color:#2c871d}.bg-warning .tabs-wrapper{background-color:#f49e00}.bg-error .tabs-wrapper{background-color:#a51728}.bg-info .tabs-wrapper{background-color:#cce4ee}.bg-success-background .tabs-wrapper{background-color:#c0debb}.bg-warning-background .tabs-wrapper{background-color:#fce2b2}.bg-error-background .tabs-wrapper{background-color:#ffdade}:host{display:block}";
|
|
29
29
|
const PostTabsStyle0 = postTabsCss;
|
|
30
30
|
|
|
31
31
|
const PostTabs = class {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTabs = require('./post-tabs-
|
|
5
|
+
const postTabs = require('./post-tabs-092790e4.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
require('./fade-35a3633a.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
5
|
|
|
6
6
|
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:100%;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
|
|
7
7
|
const PostTagStyle0 = postTagCss;
|
|
@@ -34,7 +34,7 @@ const PostTag = class {
|
|
|
34
34
|
this.setClasses();
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (index.h(index.Host, { key: '
|
|
37
|
+
return (index.h(index.Host, { key: 'af54c80202bf8ff05e16e9cbd872b40159d5bc20', "data-version": _package.version }, index.h("div", { key: '120bdeb4cf8c7031d2d168e11a060f05c4694ad7', class: this.classes }, this.icon ? index.h("post-icon", { name: this.icon }) : null, index.h("div", { key: 'f637f3f303724c0f676149d7f634981b5f2ee908', class: "tag-text" }, index.h("slot", { key: 'fe95dcc9967ccb654dedead3701f909bb61d9674' })))));
|
|
38
38
|
}
|
|
39
39
|
get host() { return index.getElement(this); }
|
|
40
40
|
static get watchers() { return {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTag = require('./post-tag-
|
|
5
|
+
const postTag = require('./post-tag-389a43f7.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-81d89808.js');
|
|
5
5
|
const attributeObserver = require('./attribute-observer-10f08c04.js');
|
|
6
6
|
const index$1 = require('./index-824d2b71.js');
|
|
7
7
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTooltip = require('./post-tooltip-
|
|
5
|
+
const postTooltip = require('./post-tooltip-c42d6853.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-81d89808.js');
|
|
8
8
|
require('./attribute-observer-10f08c04.js');
|
|
9
9
|
require('./index-824d2b71.js');
|
|
10
10
|
require('./constants-238701d3.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"entries": [
|
|
3
3
|
"components/post-accordion/post-accordion.js",
|
|
4
4
|
"components/post-accordion-item/post-accordion-item.js",
|
|
5
|
-
"components/post-
|
|
5
|
+
"components/post-banner/post-banner.js",
|
|
6
6
|
"components/post-breadcrumb-item/post-breadcrumb-item.js",
|
|
7
7
|
"components/post-avatar/post-avatar.js",
|
|
8
8
|
"components/post-card-control/post-card-control.js",
|
|
@@ -193,7 +193,7 @@ export class PostAvatar {
|
|
|
193
193
|
"optional": true,
|
|
194
194
|
"docs": {
|
|
195
195
|
"tags": [],
|
|
196
|
-
"text": "Defines the company internal userId.<div className=\"mb-1
|
|
196
|
+
"text": "Defines the company internal userId.<div className=\"mb-1 banner banner-warning banner-sm\">Can only be used on post.ch domains!</div>"
|
|
197
197
|
},
|
|
198
198
|
"attribute": "userid",
|
|
199
199
|
"reflect": false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
.banner,.alert{min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));box-sizing:border-box;box-shadow:var(--post-device-elevation-100);border-radius:var(--post-device-border-radius-2);padding:var(--post-device-spacing-padding-10) var(--post-device-spacing-padding-10);padding-inline-start:calc(var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6));font-weight:400;border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);position:relative;color:var(--post-scheme-color-surface-default-fg);background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='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 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-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/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='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 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-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/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}.banner:has(>post-icon)::before,.alert:has(>post-icon)::before{content:none}.banner>post-icon,.alert>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner::before,.alert::before{content:"";display:block}.banner::before,.banner>post-icon,.alert::before,.alert>post-icon{position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);left:var(--post-device-spacing-padding-10);top:var(--post-device-spacing-padding-10)}.banner.no-icon,.alert.no-icon{min-height:calc(2 * var(--post-device-spacing-padding-10) + close.$close-size);padding-inline-start:var(--post-device-spacing-padding-10)}.banner.no-icon::before,.alert.no-icon::before{content:unset}.banner.no-icon>post-icon,.alert.no-icon>post-icon{display:none}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner,.alert{filter:none !important;border:2px solid CanvasText}}.banner:not(.banner-action):not(.alert-action),.alert:not(.banner-action):not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.banner:not(.banner-action):not(.alert-action) a,.alert:not(.banner-action):not(.alert-action) a{font-weight:400}.banner:not(.banner-action):not(.alert-action) hr,.alert:not(.banner-action):not(.alert-action) hr{margin-block:.5rem .75rem !important}.banner:not(.banner-action):not(.alert-action)>*,.alert:not(.banner-action):not(.alert-action)>*{margin:0}.banner-container{border:unset;background-color:rgba(0,0,0,0)}.banner-dismissible,.alert-dismissible{pointer-events:auto;position:relative}.banner-dismissible:not(.banner-action):not(.alert-action),.alert-dismissible:not(.banner-action):not(.alert-action){padding-inline-end:calc(var(--post-device-spacing-padding-10) + var(--post-device-spacing-gap-inline-6) + 1.5rem)}.banner-dismissible>.btn-close,.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:var(--post-device-spacing-padding-10)}.banner-buttons,.alert-buttons{display:flex;align-items:center;justify-content:flex-start;flex-direction:row-reverse;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media(max-width: 779.98px){.banner-buttons,.alert-buttons{flex-direction:column}}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:.25rem}.banner-action>.banner-content a,.banner-action>.alert-content a,.alert-action>.banner-content a,.alert-action>.alert-content a{font-weight:400}.banner-action>.banner-content hr,.banner-action>.alert-content hr,.alert-action>.banner-content hr,.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.banner-action>.banner-content>*,.banner-action>.alert-content>*,.alert-action>.banner-content>*,.alert-action>.alert-content>*{margin:0}@media(max-width: 779.98px){.banner-action,.alert-action{flex-direction:column;align-items:stretch}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{padding-inline-start:var(--post-device-spacing-gap-inline-6)var(--post-device-sizing-notification-icon-2);padding-inline-end:var(--post-device-spacing-gap-inline-6)1.5rem}.banner-action.no-icon>.banner-content,.banner-action.no-icon>.alert-content,.alert-action.no-icon>.banner-content,.alert-action.no-icon>.alert-content{padding-inline-start:0}.banner-action>.banner-buttons,.banner-action>.alert-buttons,.alert-action>.banner-buttons,.alert-action>.alert-buttons{display:flex}.banner-action>.banner-buttons>.btn,.banner-action>.banner-buttons>::slotted(.btn),.banner-action>.alert-buttons>.btn,.banner-action>.alert-buttons>::slotted(.btn),.alert-action>.banner-buttons>.btn,.alert-action>.banner-buttons>::slotted(.btn),.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.banner-action>.banner-buttons>.btn:first-child,.banner-action>.banner-buttons>::slotted(.btn:first-child),.banner-action>.alert-buttons>.btn:first-child,.banner-action>.alert-buttons>::slotted(.btn:first-child),.alert-action>.banner-buttons>.btn:first-child,.alert-action>.banner-buttons>::slotted(.btn:first-child),.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.banner-neutral,.alert-neutral{background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='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 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-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/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='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 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-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/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}.banner-neutral:has(>post-icon)::before,.alert-neutral:has(>post-icon)::before{content:none}.banner-neutral>post-icon,.alert-neutral>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner-success,.alert-success{background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='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/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='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/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-success:has(>post-icon)::before,.alert-success:has(>post-icon)::before{content:none}.banner-success>post-icon,.alert-success>post-icon{background-color:var(--post-scheme-color-interactive-notification-success-bg);color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-warning,.alert-warning{background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-warning:has(>post-icon)::before,.alert-warning:has(>post-icon)::before{content:none}.banner-warning>post-icon,.alert-warning>post-icon{background-color:var(--post-scheme-color-interactive-notification-warning-bg);color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-error,.alert-error{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-error:has(>post-icon)::before,.alert-error:has(>post-icon)::before{content:none}.banner-error>post-icon,.alert-error>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-info,.alert-info{background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-info:has(>post-icon)::before,.alert-info:has(>post-icon)::before{content:none}.banner-info>post-icon,.alert-info>post-icon{background-color:var(--post-scheme-color-interactive-notification-info-bg);color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-danger,.alert-danger{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-danger:has(>post-icon)::before,.alert-danger:has(>post-icon)::before{content:none}.banner-danger>post-icon,.alert-danger>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:"";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:var(--post-gray-40)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!
|
|
2
|
+
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
+
*/: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}
|
|
@@ -1,66 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
import { fadeOut } from "../../animations/index";
|
|
4
4
|
import { checkEmptyOrOneOf, checkEmptyOrPattern, checkNonEmpty, checkType } from "../../utils/index";
|
|
5
|
-
import {
|
|
5
|
+
import { BANNER_TYPES } from "./banner-types";
|
|
6
6
|
/**
|
|
7
|
-
* @slot heading - Slot for placing custom content within the
|
|
8
|
-
* @slot actions - Slot for placing custom actions (buttons, links, etc.) within the
|
|
9
|
-
* @slot default - Slot for placing the main content/message of the
|
|
7
|
+
* @slot heading - Slot for placing custom content within the banner's heading.
|
|
8
|
+
* @slot actions - Slot for placing custom actions (buttons, links, etc.) within the banner.
|
|
9
|
+
* @slot default - Slot for placing the main content/message of the banner.
|
|
10
10
|
*/
|
|
11
|
-
export class
|
|
11
|
+
export class PostBanner {
|
|
12
12
|
constructor() {
|
|
13
|
-
this.
|
|
13
|
+
this.bannerId = crypto.randomUUID();
|
|
14
14
|
this.classes = undefined;
|
|
15
15
|
this.hasActions = undefined;
|
|
16
16
|
this.hasHeading = undefined;
|
|
17
17
|
this.onDismissButtonClick = () => this.dismiss();
|
|
18
18
|
this.dismissible = false;
|
|
19
19
|
this.dismissLabel = undefined;
|
|
20
|
-
this.fixed = false;
|
|
21
20
|
this.icon = undefined;
|
|
22
|
-
this.type = '
|
|
21
|
+
this.type = 'neutral';
|
|
23
22
|
}
|
|
24
23
|
validateDismissible(isDismissible = this.dismissible) {
|
|
25
|
-
checkType(isDismissible, 'boolean', 'The post-
|
|
24
|
+
checkType(isDismissible, 'boolean', 'The post-banner "dismissible" prop should be a boolean.');
|
|
26
25
|
setTimeout(() => this.validateDismissLabel());
|
|
27
26
|
}
|
|
28
27
|
validateDismissLabel(dismissLabel = this.dismissLabel) {
|
|
29
28
|
if (this.dismissible) {
|
|
30
|
-
checkNonEmpty(dismissLabel, 'Dismissible post-
|
|
29
|
+
checkNonEmpty(dismissLabel, 'Dismissible post-banner\'s require a "dismiss-label" prop.');
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
validateFixed(isFixed = this.fixed) {
|
|
34
|
-
checkType(isFixed, 'boolean', 'The post-alert "fixed" prop should be a boolean.');
|
|
35
|
-
}
|
|
36
32
|
validateIcon(icon = this.icon) {
|
|
37
|
-
checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-
|
|
33
|
+
checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-banner "icon" prop should be a 4-digits string.');
|
|
38
34
|
}
|
|
39
35
|
validateType(type = this.type) {
|
|
40
|
-
checkEmptyOrOneOf(type,
|
|
36
|
+
checkEmptyOrOneOf(type, BANNER_TYPES, `The post-banner requires a type form: ${BANNER_TYPES.join(', ')}`);
|
|
41
37
|
}
|
|
42
38
|
componentDidLoad() {
|
|
43
39
|
this.validateDismissible();
|
|
44
|
-
this.validateFixed();
|
|
45
40
|
this.validateIcon();
|
|
46
41
|
this.validateType();
|
|
47
42
|
}
|
|
48
43
|
componentWillRender() {
|
|
49
|
-
var _a;
|
|
50
44
|
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
51
45
|
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
52
|
-
this.classes = `
|
|
46
|
+
this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
|
|
53
47
|
if (this.dismissible)
|
|
54
|
-
this.classes += '
|
|
48
|
+
this.classes += ' banner-dismissible';
|
|
55
49
|
if (this.hasActions)
|
|
56
|
-
this.classes += '
|
|
57
|
-
if (this.fixed)
|
|
58
|
-
this.classes += ' alert-fixed-bottom';
|
|
50
|
+
this.classes += ' banner-action';
|
|
59
51
|
if (this.icon === 'none')
|
|
60
52
|
this.classes += ' no-icon';
|
|
61
53
|
}
|
|
62
54
|
/**
|
|
63
|
-
* Triggers
|
|
55
|
+
* Triggers banner dismissal programmatically (same as clicking on the close button (×)).
|
|
64
56
|
*/
|
|
65
57
|
async dismiss() {
|
|
66
58
|
const dismissal = fadeOut(this.host);
|
|
@@ -69,26 +61,26 @@ export class PostAlert {
|
|
|
69
61
|
this.postDismissed.emit();
|
|
70
62
|
}
|
|
71
63
|
render() {
|
|
72
|
-
const
|
|
73
|
-
this.hasHeading && (h("div", { key: `${this.
|
|
74
|
-
h("slot", { key: `${this.
|
|
64
|
+
const defaultBannerContent = [
|
|
65
|
+
this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '3fb76153e81b56bf69a5163bcbfce24686524190', name: "heading" }))),
|
|
66
|
+
h("slot", { key: `${this.bannerId}-message` }),
|
|
75
67
|
];
|
|
76
|
-
const
|
|
77
|
-
h("div", { key: `${this.
|
|
78
|
-
h("div", { key: `${this.
|
|
68
|
+
const actionBannerContent = [
|
|
69
|
+
h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
|
|
70
|
+
h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '0c25933ee7f2c90bb5f547878569b45ae33a2991', name: "actions" })),
|
|
79
71
|
];
|
|
80
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: 'c25f656224071310134d417ba13a6fce9a9cdd48', "data-version": version }, h("div", { key: '168b35ebf3530ad88f33dde2cee9c8b3670eef55', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '81875aa33c3922f888c779150bf023e75d0787c8', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'e45dd23c0309f9622cf5c2fcd6648a44d3fc4c8f', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
|
|
81
73
|
}
|
|
82
|
-
static get is() { return "post-
|
|
74
|
+
static get is() { return "post-banner"; }
|
|
83
75
|
static get encapsulation() { return "shadow"; }
|
|
84
76
|
static get originalStyleUrls() {
|
|
85
77
|
return {
|
|
86
|
-
"$": ["post-
|
|
78
|
+
"$": ["post-banner.scss"]
|
|
87
79
|
};
|
|
88
80
|
}
|
|
89
81
|
static get styleUrls() {
|
|
90
82
|
return {
|
|
91
|
-
"$": ["post-
|
|
83
|
+
"$": ["post-banner.css"]
|
|
92
84
|
};
|
|
93
85
|
}
|
|
94
86
|
static get properties() {
|
|
@@ -105,7 +97,7 @@ export class PostAlert {
|
|
|
105
97
|
"optional": false,
|
|
106
98
|
"docs": {
|
|
107
99
|
"tags": [],
|
|
108
|
-
"text": "If `true`, a close button (\u00D7) is displayed and the
|
|
100
|
+
"text": "If `true`, a close button (\u00D7) is displayed and the banner can be dismissed by the user."
|
|
109
101
|
},
|
|
110
102
|
"attribute": "dismissible",
|
|
111
103
|
"reflect": false,
|
|
@@ -123,29 +115,11 @@ export class PostAlert {
|
|
|
123
115
|
"optional": false,
|
|
124
116
|
"docs": {
|
|
125
117
|
"tags": [],
|
|
126
|
-
"text": "The label to use for the close button of a dismissible
|
|
118
|
+
"text": "The label to use for the close button of a dismissible banner."
|
|
127
119
|
},
|
|
128
120
|
"attribute": "dismiss-label",
|
|
129
121
|
"reflect": false
|
|
130
122
|
},
|
|
131
|
-
"fixed": {
|
|
132
|
-
"type": "boolean",
|
|
133
|
-
"mutable": false,
|
|
134
|
-
"complexType": {
|
|
135
|
-
"original": "boolean",
|
|
136
|
-
"resolved": "boolean",
|
|
137
|
-
"references": {}
|
|
138
|
-
},
|
|
139
|
-
"required": false,
|
|
140
|
-
"optional": false,
|
|
141
|
-
"docs": {
|
|
142
|
-
"tags": [],
|
|
143
|
-
"text": "If `true`, the alert is positioned at the bottom of the window, from edge to edge."
|
|
144
|
-
},
|
|
145
|
-
"attribute": "fixed",
|
|
146
|
-
"reflect": false,
|
|
147
|
-
"defaultValue": "false"
|
|
148
|
-
},
|
|
149
123
|
"icon": {
|
|
150
124
|
"type": "string",
|
|
151
125
|
"mutable": false,
|
|
@@ -158,7 +132,7 @@ export class PostAlert {
|
|
|
158
132
|
"optional": false,
|
|
159
133
|
"docs": {
|
|
160
134
|
"tags": [],
|
|
161
|
-
"text": "The icon to display in the
|
|
135
|
+
"text": "The icon to display in the banner. By default, the icon depends on the banner type.\n\nIf `none`, no icon is displayed."
|
|
162
136
|
},
|
|
163
137
|
"attribute": "icon",
|
|
164
138
|
"reflect": false
|
|
@@ -167,13 +141,13 @@ export class PostAlert {
|
|
|
167
141
|
"type": "string",
|
|
168
142
|
"mutable": false,
|
|
169
143
|
"complexType": {
|
|
170
|
-
"original": "
|
|
171
|
-
"resolved": "\"danger\" | \"
|
|
144
|
+
"original": "BannerType",
|
|
145
|
+
"resolved": "\"danger\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
|
|
172
146
|
"references": {
|
|
173
|
-
"
|
|
147
|
+
"BannerType": {
|
|
174
148
|
"location": "import",
|
|
175
|
-
"path": "./
|
|
176
|
-
"id": "src/components/post-
|
|
149
|
+
"path": "./banner-types",
|
|
150
|
+
"id": "src/components/post-banner/banner-types.ts::BannerType"
|
|
177
151
|
}
|
|
178
152
|
}
|
|
179
153
|
},
|
|
@@ -181,17 +155,17 @@ export class PostAlert {
|
|
|
181
155
|
"optional": false,
|
|
182
156
|
"docs": {
|
|
183
157
|
"tags": [],
|
|
184
|
-
"text": "The type of the
|
|
158
|
+
"text": "The type of the banner."
|
|
185
159
|
},
|
|
186
160
|
"attribute": "type",
|
|
187
161
|
"reflect": false,
|
|
188
|
-
"defaultValue": "'
|
|
162
|
+
"defaultValue": "'neutral'"
|
|
189
163
|
}
|
|
190
164
|
};
|
|
191
165
|
}
|
|
192
166
|
static get states() {
|
|
193
167
|
return {
|
|
194
|
-
"
|
|
168
|
+
"bannerId": {},
|
|
195
169
|
"classes": {},
|
|
196
170
|
"hasActions": {},
|
|
197
171
|
"hasHeading": {},
|
|
@@ -207,7 +181,7 @@ export class PostAlert {
|
|
|
207
181
|
"composed": true,
|
|
208
182
|
"docs": {
|
|
209
183
|
"tags": [],
|
|
210
|
-
"text": "An event emitted when the
|
|
184
|
+
"text": "An event emitted when the banner element is dismissed, after the transition.\nIt has no payload and only relevant for dismissible banners."
|
|
211
185
|
},
|
|
212
186
|
"complexType": {
|
|
213
187
|
"original": "void",
|
|
@@ -231,7 +205,7 @@ export class PostAlert {
|
|
|
231
205
|
"return": "Promise<void>"
|
|
232
206
|
},
|
|
233
207
|
"docs": {
|
|
234
|
-
"text": "Triggers
|
|
208
|
+
"text": "Triggers banner dismissal programmatically (same as clicking on the close button (\u00D7)).",
|
|
235
209
|
"tags": []
|
|
236
210
|
}
|
|
237
211
|
}
|
|
@@ -245,9 +219,6 @@ export class PostAlert {
|
|
|
245
219
|
}, {
|
|
246
220
|
"propName": "dismissLabel",
|
|
247
221
|
"methodName": "validateDismissLabel"
|
|
248
|
-
}, {
|
|
249
|
-
"propName": "fixed",
|
|
250
|
-
"methodName": "validateFixed"
|
|
251
222
|
}, {
|
|
252
223
|
"propName": "icon",
|
|
253
224
|
"methodName": "validateIcon"
|