@swisspost/design-system-components 9.11.0 → 9.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +17 -17
- package/dist/cjs/{package-8372a699.js → package-349bfcc9.js} +1 -1
- package/dist/cjs/{post-accordion-4e36ff13.js → post-accordion-47e0f864.js} +1 -1
- package/dist/cjs/{post-accordion-item-b50ba59d.js → post-accordion-item-77e08938.js} +2 -2
- 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-2dcb40c6.js → post-alert-7ac0d87c.js} +2 -2
- package/dist/cjs/post-alert.cjs.entry.js +2 -2
- package/dist/cjs/post-card-control-94614910.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-trigger-87f6230d.js → post-collapsible-trigger-bb6a180f.js} +1 -1
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
- package/dist/cjs/{post-icon-9d70a446.js → post-icon-13aeb3e5.js} +1 -1
- package/dist/cjs/post-icon.cjs.entry.js +2 -2
- package/dist/cjs/{post-logo-5f45a504.js → post-logo-c151060a.js} +1 -1
- package/dist/cjs/post-logo.cjs.entry.js +2 -2
- package/dist/cjs/{post-popover-4a753afa.js → post-popover-e3b4b3f6.js} +14 -9
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-popovercontainer-6ebe9ef2.js → post-popovercontainer-300e99f7.js} +1 -1
- package/dist/cjs/post-popovercontainer.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-64fb4b41.js → post-rating-05429c61.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-48a142a6.js → post-tab-header-5a6b4bb0.js} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-2f051b8c.js → post-tab-panel-fd3a3a77.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-8ffa7422.js → post-tabs-31ceb8e3.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-6a78c5bc.js → post-tag-56d07735.js} +1 -1
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-tooltip-186497b0.js → post-tooltip-9faef0c0.js} +1 -1
- package/dist/cjs/{post-tooltip-trigger-47bbb0fd.js → post-tooltip-trigger-28181172.js} +1 -1
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-alert/post-alert.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +12 -7
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-alert2.js +1 -1
- package/dist/components/post-card-control2.js +1 -1
- package/dist/components/post-popover2.js +13 -8
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +17 -17
- package/dist/esm/{package-978297ab.js → package-f8da6e59.js} +1 -1
- package/dist/esm/{post-accordion-87e4a8b0.js → post-accordion-433ad4e3.js} +1 -1
- package/dist/esm/{post-accordion-item-9dec4a30.js → post-accordion-item-f2b12e69.js} +2 -2
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/post-alert-9e1e62af.js +97 -0
- package/dist/esm/post-alert.entry.js +2 -2
- package/dist/esm/post-card-control-65b275fc.js +270 -0
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/{post-collapsible-trigger-1811a5a7.js → post-collapsible-trigger-14fcbb17.js} +1 -1
- package/dist/esm/post-collapsible_2.entry.js +2 -2
- package/dist/esm/{post-icon-2e0065c3.js → post-icon-10668179.js} +1 -1
- package/dist/esm/post-icon.entry.js +2 -2
- package/dist/esm/{post-logo-edab4acd.js → post-logo-ce3b3811.js} +1 -1
- package/dist/esm/post-logo.entry.js +2 -2
- package/dist/esm/{post-popover-544add6e.js → post-popover-b692c38e.js} +14 -9
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-popovercontainer-681abad7.js → post-popovercontainer-8a13ffab.js} +1 -1
- package/dist/esm/post-popovercontainer.entry.js +2 -2
- package/dist/esm/{post-rating-4878845f.js → post-rating-5ef799da.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-870ed118.js → post-tab-header-28f5549f.js} +1 -1
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-a1e195ce.js → post-tab-panel-885b86ab.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-127c6832.js → post-tabs-8349d001.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-28ad24fb.js → post-tag-1aea59ed.js} +1 -1
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-tooltip-a88cf3a8.js → post-tooltip-a0373a6a.js} +1 -1
- package/dist/esm/{post-tooltip-trigger-a9f166c6.js → post-tooltip-trigger-ea932d7f.js} +1 -1
- package/dist/esm/post-tooltip-trigger.entry.js +2 -2
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/{p-f01a74f2.entry.js → p-05d4148b.entry.js} +1 -1
- package/dist/post-components/p-06ee6bb2.entry.js +1 -0
- package/dist/post-components/{p-3a8f0361.js → p-0c907e34.js} +1 -1
- package/dist/post-components/p-17154700.entry.js +1 -0
- package/dist/post-components/p-3439a034.js +1 -0
- package/dist/post-components/p-3699b2ce.entry.js +1 -0
- package/dist/post-components/p-42a846d1.entry.js +1 -0
- package/dist/post-components/p-49642a4f.entry.js +1 -0
- package/dist/post-components/{p-2feaf6fe.js → p-4a33166f.js} +1 -1
- package/dist/post-components/{p-0ccaf53e.js → p-4af29f1f.js} +1 -1
- package/dist/post-components/p-51919266.entry.js +1 -0
- package/dist/post-components/{p-508c2e73.js → p-64a03411.js} +1 -1
- package/dist/post-components/p-6750ab37.entry.js +1 -0
- package/dist/post-components/p-6d052854.js +1 -0
- package/dist/post-components/p-701247b1.entry.js +1 -0
- package/dist/post-components/p-71e971f9.js +1 -0
- package/dist/post-components/p-7f240670.entry.js +1 -0
- package/dist/post-components/p-812374b2.entry.js +1 -0
- package/dist/post-components/{p-5e17f203.js → p-83bc78f0.js} +1 -1
- package/dist/post-components/{p-7ed69eed.js → p-95f24aef.js} +1 -1
- package/dist/post-components/{p-360a1a42.js → p-988f3ab9.js} +1 -1
- package/dist/post-components/p-aa77823f.entry.js +1 -0
- package/dist/post-components/{p-cd08d20d.js → p-acf259f1.js} +1 -1
- package/dist/post-components/{p-577a41b2.js → p-ae74bd1e.js} +1 -1
- package/dist/post-components/{p-4d357166.js → p-ae9141cc.js} +1 -1
- package/dist/post-components/{p-869e996c.js → p-b3fefa4b.js} +1 -1
- package/dist/post-components/p-b80c0911.entry.js +1 -0
- package/dist/post-components/{p-a0336f7a.js → p-bad8222c.js} +1 -1
- package/dist/post-components/{p-c857fe5e.js → p-bfe67406.js} +1 -1
- package/dist/post-components/p-c654ffe0.js +1 -0
- package/dist/post-components/p-efad7e5c.entry.js +1 -0
- package/dist/post-components/p-f4e98d50.entry.js +1 -0
- package/dist/post-components/p-f933a8ae.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -1
- package/loaders/post-alert.js +1 -1
- package/loaders/post-card-control.js +1 -1
- package/loaders/post-popover.js +13 -8
- package/package.json +27 -3
- package/dist/cjs/post-card-control-e6e64685.js +0 -272
- package/dist/esm/post-alert-264cb447.js +0 -97
- package/dist/esm/post-card-control-a983bae1.js +0 -270
- package/dist/post-components/p-09895700.entry.js +0 -1
- package/dist/post-components/p-1587197c.entry.js +0 -1
- package/dist/post-components/p-1fe40c76.entry.js +0 -1
- package/dist/post-components/p-24a5c89f.entry.js +0 -1
- package/dist/post-components/p-4375e8a1.entry.js +0 -1
- package/dist/post-components/p-5b7cfe14.entry.js +0 -1
- package/dist/post-components/p-5fcff491.entry.js +0 -1
- package/dist/post-components/p-66f0ba1b.entry.js +0 -1
- package/dist/post-components/p-96d3c129.js +0 -1
- package/dist/post-components/p-a58a1d66.js +0 -1
- package/dist/post-components/p-b2e83276.entry.js +0 -1
- package/dist/post-components/p-be27fc1e.js +0 -1
- package/dist/post-components/p-c327ff62.entry.js +0 -1
- package/dist/post-components/p-d55160c6.entry.js +0 -1
- package/dist/post-components/p-e4de6b31.entry.js +0 -1
- package/dist/post-components/p-edb1050b.entry.js +0 -1
- package/dist/post-components/p-ef1ff60a.js +0 -1
- package/dist/post-components/p-f6635523.entry.js +0 -1
- package/dist/post-components/p-fbc6c8ab.entry.js +0 -1
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-e1f32cce.js');
|
|
4
|
+
const checkOneOf = require('./check-one-of-f4f5d0c0.js');
|
|
5
|
+
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
6
|
+
const _package = require('./package-349bfcc9.js');
|
|
7
|
+
|
|
8
|
+
const postCardControlCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}/*!\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 *//*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.form-check{display:flex;flex-wrap:wrap;row-gap:.75rem;margin-bottom:1rem}.form-check{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.form-check:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.form-check:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.form-check-inline{display:inline-flex}.form-check-inline:not(:last-of-type){margin-right:1.5rem}.form-check-input,.form-check-label{color:rgba(var(--post-contrast-color-rgb), 0.8);transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input,.form-check-label{transition:none}}.form-check-input:hover:not([disabled]),.form-check-input:hover:not([disabled])~.form-check-input-label,.form-check-label:hover:not([disabled]),.form-check-input:hover:not([disabled])~.form-check-label-label,.form-check-label:hover:not([disabled])~.form-check-input-label,.form-check-label:hover:not([disabled])~.form-check-label-label{color:var(--post-contrast-color)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input:hover:not([disabled]),.form-check-input:hover:not([disabled])~.form-check-input-label,.form-check-label:hover:not([disabled]),.form-check-input:hover:not([disabled])~.form-check-label-label,.form-check-label:hover:not([disabled])~.form-check-input-label,.form-check-label:hover:not([disabled])~.form-check-label-label{border-color:Highlight}}.form-check-input{outline:none;display:inline-flex;flex:0 auto;appearance:none;background:rgba(0,0,0,0);height:1.375rem;width:1.375rem;border:2px solid currentColor;margin-top:1px}.form-check-input:not([disabled]),.form-check-input:not([disabled])~.form-check-label{cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input{border-color:FieldText}}.form-check-input::after{content:\"\";display:block;flex:1}.form-check-input[type=checkbox]:checked::after{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}.form-check-input[type=checkbox]:indeterminate::after{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m5.333 16.01 20-.021.001 1.333-20 .021z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[type=checkbox]:checked,.form-check-input[type=checkbox]:indeterminate{background-color:SelectedItem !important;color:SelectedItemText !important}}.form-check-input[type=radio]{border-radius:50%}.form-check-input[type=radio]:checked::after{border:.25rem solid rgba(0,0,0,0);background-color:currentColor;border-radius:inherit;background-clip:padding-box}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[type=radio]:checked::after{background-color:SelectedItem;border-color:Canvas}}.form-check-input[type=radio][disabled]{padding:2px;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' rx='100' ry='100' fill='none' stroke='hsl(0, 0%, 40%)' stroke-width='4px ' stroke-dasharray='4 2' /%3e%3c/svg%3e\")}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .form-check-input[type=radio][disabled]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' rx='100' ry='100' fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-width='4px ' stroke-dasharray='4 2' /%3e%3c/svg%3e\")}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[type=radio][disabled]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' rx='100' ry='100' fill='none' stroke='GrayText' stroke-width='4px ' stroke-dasharray='4 2' /%3e%3c/svg%3e\") !important}}.form-check-input[disabled]{border:0;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='hsl(0, 0%, 40%)' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='88' /%3e%3c/svg%3e\")}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[disabled][type=checkbox],.form-check-input[disabled][type=radio]{border-color:GrayText !important}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[disabled][type=checkbox]:checked,.form-check-input[disabled][type=checkbox]:indeterminate{background-color:Field !important;color:GrayText !important}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[disabled][type=radio]:checked::after{background-color:GrayText}}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .form-check-input[disabled]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='88' /%3e%3c/svg%3e\")}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-input[disabled]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='GrayText' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='88' /%3e%3c/svg%3e\") !important}}.form-check-sm .form-check-input[disabled][type=checkbox]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='hsl(0, 0%, 40%)' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='66' /%3e%3c/svg%3e\")}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .form-check-sm .form-check-input[disabled][type=checkbox]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='66' /%3e%3c/svg%3e\")}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-check-sm .form-check-input[disabled][type=checkbox]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='GrayText' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='66' /%3e%3c/svg%3e\") !important}}.form-check-input[disabled],.form-check-input[disabled]~.form-check-label{color:rgba(0,0,0,.6)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .form-check-input[disabled],:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .form-check-input[disabled]~.form-check-label{color:rgba(255,255,255,.8)}.form-check-sm .form-check-input{height:1rem;width:1rem}.form-check-sm .form-check-input[type=radio]:checked::after{border-width:2px}.form-check-label{flex:1}:not(.form-switch,.radio-button-card,.checkbox-button-card)>.form-check-label{padding-inline-start:.5rem}.form-check-sm .form-check-label{font-size:.75rem}.form-switch .form-check-input{height:2rem;width:4rem;border:0;border-radius:4rem;background-image:linear-gradient(to right, rgba(var(--post-contrast-color-rgb), 0.3) 50%, var(--post-success) 50%);background-size:8rem;background-position-x:0;transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),background-position 250ms cubic-bezier(0.4, 0, 0.2, 1)}.form-switch .form-check-input::after{max-width:2rem;background-color:#fff;border:2px solid #666;border-radius:50%;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.form-switch .form-check-input:checked{background-position-x:4rem}.form-switch .form-check-input:checked::after{mask-image:none;background-color:#fff;border-color:#000;transform:translateX(2rem)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-switch .form-check-input{transition:none;border:2px solid CanvasText}.form-switch .form-check-input:checked{background-color:SelectedItem !important}.form-switch .form-check-input::after,.form-switch .form-check-input:checked::after{max-width:calc(2rem - 4px);border-color:Canvas;background-color:CanvasText}}.form-switch .form-check-input[disabled]{background:#ccc}.form-switch .form-check-input[disabled]::after{border-color:#999}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-switch .form-check-input[disabled]::after{border-color:Field}.form-switch .form-check-input[disabled]:checked{background-color:GrayText !important}}.form-switch:hover>.form-check-input:not([disabled]){background-color:rgba(var(--post-contrast-color-rgb), 0.1)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.form-switch:hover>.form-check-input:not([disabled]){border-color:Highlight}}.form-switch .form-check-label{padding-top:.25rem}.form-switch .form-check-label.order-first{flex:0 auto;padding-inline-end:1rem}.form-switch .form-check-label:not(.order-first){padding-inline-start:1rem}:host{--post-card-control-bg-context: .bg-yellow, .bg-white, .bg-light, .bg-gray, .bg-warning, .bg-info, .bg-success-background, .bg-warning-background, .bg-error-background, .bg-petrol-bright, .bg-coral-bright, .bg-olive-bright, .alert-warning, post-alert[type=warning], .alert-info, post-alert[type=info], .alert-gray, post-alert[type=gray], .bg-dark, .bg-black, .bg-primary, .bg-secondary, .bg-success, .bg-error, .bg-nightblue, .bg-nightblue-bright, .bg-petrol, .bg-coral, .bg-olive, .bg-purple, .bg-purple-bright, .bg-aubergine, .bg-aubergine-bright, .alert-primary, post-alert[type=primary], .alert-success, post-alert[type=success], .alert-danger, post-alert[type=danger], .alert-notification, post-alert[type=notification], .alert-error, post-alert[type=error];display:flex;width:100%}:host-context(fieldset):host(:not(:last-child)) .card-control{margin-bottom:1rem}.card-control{--post-card-control-border-color: hsl(0, 0%, 40%);--post-card-control-bg: #fff;--post-card-control-color: hsl(0, 0%, 20%);--post-card-control-input-border-color: hsl(0, 0%, 20%);--post-card-control-input-bg: #fff;flex-basis:100%;display:grid;grid-template:\"input label icon\" \"input content content\"/min-content auto min-content;gap:0 .5rem;margin:0;padding:1rem;background-color:var(--post-card-control-bg);border:2px solid var(--post-card-control-border-color);border-radius:4px;color:var(--post-card-control-color) !important;cursor:pointer}.card-control .card-control--input{grid-area:input;margin:.25rem 0;background-color:var(--post-card-control-input-bg) !important;border-color:var(--post-card-control-input-border-color) !important;color:var(--post-card-control-input-border-color) !important;cursor:inherit;transition:none}.card-control .card-control--input:focus,.card-control .card-control--input:focus-visible{box-shadow:none}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.card-control .card-control--input::after{forced-color-adjust:none;border-color:rgba(0,0,0,0)}}.card-control .card-control--label{grid-area:label;margin:.25rem 0;padding:0;color:inherit !important;pointer-events:none;transition:none}.card-control .card-control--label:not(:has(+.card-control--icon)){grid-area:1/label/1/icon}.card-control .card-control--description{grid-area:label;font-size:.75rem}.card-control .card-control--content{grid-area:content}.card-control .card-control--icon{grid-area:icon;width:2rem;height:2rem;pointer-events:none}.card-control .card-control--icon>slot>*{width:100%;height:100%}.card-control:not(.is-disabled).is-checked{--post-card-control-border-color: #000;--post-card-control-bg: #fc0}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.card-control:not(.is-disabled).is-checked{--post-card-control-border-color: FieldText;--post-card-control-bg: SelectedItem;--post-card-control-color: SelectedItemText;--post-card-control-input-border-color: SelectedItemText;--post-card-control-input-bg: SelectedItem}.card-control:not(.is-disabled).is-checked .card-control--input::after{background-color:var(--post-card-control-color) !important}}.card-control:not(.is-disabled).is-invalid{--post-card-control-border-color: #a51728;--post-card-control-color: #a51728;--post-card-control-input-border-color: #a51728}.card-control:not(.is-disabled):hover{--post-card-control-border-color: hsl(0, 0%, 20%);--post-card-control-bg: hsl(0, 0%, 40%);--post-card-control-color: #fff;--post-card-control-input-border-color: #000}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.card-control:not(.is-disabled):hover{--post-card-control-border-color: Highlight;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: Highlight;--post-card-control-input-bg: Field}.card-control:not(.is-disabled):hover .card-control--input::after{color:FieldText}}.card-control.is-focused:where(:has(.card-control--input:focus-visible)){outline-offset:2px;outline:2px solid #1976c8}.card-control.is-disabled{--post-card-control-border-color: hsl(0, 0%, 40%);--post-card-control-bg: transparent;--post-card-control-color: hsl(0, 0%, 40%);--post-card-control-input-border-color: hsl(0, 0%, 40%);--post-card-control-input-bg: transparent;border-style:dashed;cursor:default}.card-control.is-disabled .card-control--input{border:0 none;padding:2px;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='hsl(0, 0%, 40%)' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='88' /%3e%3c/svg%3e\")}.card-control.is-disabled .card-control--input[type=radio]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' rx='100' ry='100' fill='none' stroke='hsl(0, 0%, 40%)' stroke-width='4px ' stroke-dasharray='4 2' /%3e%3c/svg%3e\")}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.card-control{--post-card-control-border-color: FieldText;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: FieldText;--post-card-control-input-bg: Field;outline:2px solid Field;outline-offset:-4px}.card-control .card-control--input{outline:2px solid Field}.card-control .card-control--input[type]{background-color:Field !important}.card-control .card-control--input::after{border-color:Field !important}.card-control .card-control--label,.card-control .card-control--content{background-color:var(--post-card-control-bg) !important}.card-control:not(.is-disabled).is-checked{--post-card-control-border-color: FieldText;--post-card-control-bg: SelectedItem;--post-card-control-color: SelectedItemText;--post-card-control-input-border-color: FieldText}.card-control:not(.is-disabled).is-checked .card-control--input::after{background-color:FieldText !important}.card-control:not(.is-disabled):hover{--post-card-control-border-color: Highlight;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: Highlight}.card-control.is-disabled{--post-card-control-border-color: GrayText;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: GrayText;--post-card-control-input-bg: Field}.card-control.is-disabled .card-control--input{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' fill='none' stroke='GrayText' stroke-width='4px ' stroke-dasharray='2 1.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4 1.5 2 3.5 4 1.5 4 1.5 4' pathLength='88' /%3e%3c/svg%3e\")}.card-control.is-disabled .card-control--input[type=radio]{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%' height='100%' rx='100' ry='100' fill='none' stroke='GrayText' stroke-width='4px ' stroke-dasharray='4 2' /%3e%3c/svg%3e\")}.card-control.is-disabled.is-checked{--post-card-control-bg: SelectedItem;--post-card-control-color: SelectedItemText;position:relative;background-color:Field}.card-control.is-disabled.is-checked::before{display:block;content:\"\";position:absolute;inset:2px;background-color:SelectedItem;z-index:1}.card-control.is-disabled.is-checked>*{position:relative;z-index:2}.card-control.is-disabled.is-checked .card-control--input::after{background-color:FieldText !important}}@media(forced-colors: active)and (forced-colors: active),(forced-colors: active)and (-ms-high-contrast: active),(forced-colors: active)and (-ms-high-contrast: white-on-black),(-ms-high-contrast: active)and (forced-colors: active),(-ms-high-contrast: active)and (-ms-high-contrast: active),(-ms-high-contrast: active)and (-ms-high-contrast: white-on-black),(-ms-high-contrast: white-on-black)and (forced-colors: active),(-ms-high-contrast: white-on-black)and (-ms-high-contrast: active),(-ms-high-contrast: white-on-black)and (-ms-high-contrast: white-on-black){.card-control{--post-card-control-border-color: GrayText;--post-card-control-color: GrayText;--post-card-control-input-border-color: GrayText}.card-control.is-checked{--post-card-control-input-bg: field;position:relative}.card-control.is-checked::before{display:block;content:\"\";position:absolute;inset:2px;border-radius:1px;background-color:SelectedItem}.card-control.is-checked>*{position:relative}.card-control.is-checked .card-control--input{outline:2px solid Field}}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control{--post-card-control-border-color: #fff;--post-card-control-bg: transparent;--post-card-control-color: #fff;--post-card-control-input-border-color: #fff;--post-card-control-input-bg: transparent}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled).is-checked{--post-card-control-border-color: #fc0;--post-card-control-bg: #fc0;--post-card-control-color: hsl(0, 0%, 20%);--post-card-control-input-border-color: hsl(0, 0%, 20%);--post-card-control-input-bg: #fff}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled).is-invalid{--post-card-control-border-color: #a51728;--post-card-control-bg: #ffdade;--post-card-control-color: #a51728;--post-card-control-input-border-color: #a51728;--post-card-control-input-bg: #fff}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled).is-invalid:where(.is-checked){--post-card-control-bg: #fc0}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled):hover{--post-card-control-border-color: #000;--post-card-control-bg: hsl(0, 0%, 80%);--post-card-control-color: #000;--post-card-control-input-border-color: #000;--post-card-control-input-bg: #fff}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled):hover{--post-card-control-border-color: Highlight;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: Highlight;--post-card-control-input-bg: Field}}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control.is-focused:where(:has(.card-control--input:focus-visible)){outline-color:#fff}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control.is-disabled{--post-card-control-border-color: post.$white-alpha-80;--post-card-control-bg: transparent;--post-card-control-color: post.$white-alpha-80;--post-card-control-input-border-color: post.$white-alpha-80;--post-card-control-input-bg: transparent}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control.is-disabled{--post-card-control-border-color: GrayText;--post-card-control-color: GrayText;--post-card-control-input-border-color: GrayText}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control.is-disabled.is-checked{--post-card-control-input-bg: Field}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control{--post-card-control-border-color: FieldText;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: FieldText;--post-card-control-input-bg: Field}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled).is-checked{--post-card-control-border-color: FieldText;--post-card-control-bg: SelectedItem;--post-card-control-color: SelectedItemText;--post-card-control-input-border-color: FieldText}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control:not(.is-disabled):hover{--post-card-control-border-color: Highlight;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: Highlight}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control.is-disabled{--post-card-control-border-color: GrayText;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: GrayText;--post-card-control-input-bg: Field}:host-context(:is(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error])) .card-control.is-disabled.is-checked{--post-card-control-bg: SelectedItem;--post-card-control-color: SelectedItemText}}:host(:not([data-context])){display:none}:host([data-context*=fieldset]:not(:last-child)) .card-control{margin-bottom:1rem}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control{--post-card-control-border-color: #fff;--post-card-control-bg: transparent;--post-card-control-color: #fff;--post-card-control-input-border-color: #fff;--post-card-control-input-bg: transparent}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled).is-checked{--post-card-control-border-color: #fc0;--post-card-control-bg: #fc0;--post-card-control-color: hsl(0, 0%, 20%);--post-card-control-input-border-color: hsl(0, 0%, 20%);--post-card-control-input-bg: #fff}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled).is-invalid{--post-card-control-border-color: #a51728;--post-card-control-bg: #ffdade;--post-card-control-color: #a51728;--post-card-control-input-border-color: #a51728;--post-card-control-input-bg: #fff}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled).is-invalid:where(.is-checked){--post-card-control-bg: #fc0}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled):hover{--post-card-control-border-color: #000;--post-card-control-bg: hsl(0, 0%, 80%);--post-card-control-color: #000;--post-card-control-input-border-color: #000;--post-card-control-input-bg: #fff}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled):hover{--post-card-control-border-color: Highlight;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: Highlight;--post-card-control-input-bg: Field}}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control.is-focused:where(:has(.card-control--input:focus-visible)){outline-color:#fff}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control.is-disabled{--post-card-control-border-color: post.$white-alpha-80;--post-card-control-bg: transparent;--post-card-control-color: post.$white-alpha-80;--post-card-control-input-border-color: post.$white-alpha-80;--post-card-control-input-bg: transparent}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control.is-disabled{--post-card-control-border-color: GrayText;--post-card-control-color: GrayText;--post-card-control-input-border-color: GrayText}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control.is-disabled.is-checked{--post-card-control-input-bg: Field}}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control{--post-card-control-border-color: FieldText;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: FieldText;--post-card-control-input-bg: Field}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled).is-checked{--post-card-control-border-color: FieldText;--post-card-control-bg: SelectedItem;--post-card-control-color: SelectedItemText;--post-card-control-input-border-color: FieldText}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control:not(.is-disabled):hover{--post-card-control-border-color: Highlight;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: Highlight}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control.is-disabled{--post-card-control-border-color: GrayText;--post-card-control-bg: Field;--post-card-control-color: FieldText;--post-card-control-input-border-color: GrayText;--post-card-control-input-bg: Field}:host(:is([data-context*=\".bg-dark\"],[data-context*=\".bg-black\"],[data-context*=\".bg-primary\"],[data-context*=\".bg-secondary\"],[data-context*=\".bg-success\"],[data-context*=\".bg-error\"],[data-context*=\".bg-nightblue\"],[data-context*=\".bg-nightblue-bright\"],[data-context*=\".bg-petrol\"],[data-context*=\".bg-coral\"],[data-context*=\".bg-olive\"],[data-context*=\".bg-purple\"],[data-context*=\".bg-purple-bright\"],[data-context*=\".bg-aubergine\"],[data-context*=\".bg-aubergine-bright\"],[data-context*=\".alert-primary\"],[data-context*=\"post-alert[type=primary]\"],[data-context*=\".alert-success\"],[data-context*=\"post-alert[type=success]\"],[data-context*=\".alert-danger\"],[data-context*=\"post-alert[type=danger]\"],[data-context*=\".alert-notification\"],[data-context*=\"post-alert[type=notification]\"],[data-context*=\".alert-error\"],[data-context*=\"post-alert[type=error]\"])) .card-control.is-disabled.is-checked{--post-card-control-bg: SelectedItem;--post-card-control-color:SelectedItemText}";
|
|
9
|
+
const PostCardControlStyle0 = postCardControlCss;
|
|
10
|
+
|
|
11
|
+
let cardControlIds = 0;
|
|
12
|
+
const PostCardControl = class {
|
|
13
|
+
/**
|
|
14
|
+
* A public method to reset the controls `checked` and `validity` state.
|
|
15
|
+
* The validity state is set to `null`, so it's neither valid nor invalid.
|
|
16
|
+
*/
|
|
17
|
+
async reset() {
|
|
18
|
+
this.validity = null;
|
|
19
|
+
this.controlSetChecked(this.initialChecked);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A hidden public method to reset the group controls `checked` state to `false`.
|
|
23
|
+
*/
|
|
24
|
+
async groupReset() {
|
|
25
|
+
if (this.disabled)
|
|
26
|
+
this.control.checked = this.checked = false;
|
|
27
|
+
this.controlSetChecked(false);
|
|
28
|
+
}
|
|
29
|
+
validateControlLabel(label = this.label) {
|
|
30
|
+
checkNonEmpty.checkNonEmpty(label, 'The "post-card-control" element requires its "label" property to be set.');
|
|
31
|
+
}
|
|
32
|
+
validateControlType(type = this.type) {
|
|
33
|
+
checkOneOf.checkOneOf(type, ['checkbox', 'radio'], 'The "post-card-control" element requires its "type" prop to be one of either "checkbox" or "radio".');
|
|
34
|
+
}
|
|
35
|
+
updateControlChecked(checked = this.checked) {
|
|
36
|
+
this.controlSetChecked(checked);
|
|
37
|
+
}
|
|
38
|
+
updateControlDisabled() {
|
|
39
|
+
this.controlSetChecked(this.checked);
|
|
40
|
+
}
|
|
41
|
+
constructor(hostRef) {
|
|
42
|
+
index.registerInstance(this, hostRef);
|
|
43
|
+
this.postInput = index.createEvent(this, "postInput", 7);
|
|
44
|
+
this.postChange = index.createEvent(this, "postChange", 7);
|
|
45
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
46
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
50
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
51
|
+
}
|
|
52
|
+
this.EVENT_MAP = {
|
|
53
|
+
input: 'postInput',
|
|
54
|
+
change: 'postChange',
|
|
55
|
+
};
|
|
56
|
+
this.KEYCODES = {
|
|
57
|
+
SPACE: 'Space',
|
|
58
|
+
LEFT: 'ArrowLeft',
|
|
59
|
+
UP: 'ArrowUp',
|
|
60
|
+
RIGHT: 'ArrowRight',
|
|
61
|
+
DOWN: 'ArrowDown',
|
|
62
|
+
};
|
|
63
|
+
this.group = {
|
|
64
|
+
hosts: [],
|
|
65
|
+
members: [],
|
|
66
|
+
first: null,
|
|
67
|
+
last: null,
|
|
68
|
+
checked: null,
|
|
69
|
+
focused: null,
|
|
70
|
+
};
|
|
71
|
+
this.controlId = `PostCardControl_${cardControlIds++}`;
|
|
72
|
+
this.focused = false;
|
|
73
|
+
this.label = undefined;
|
|
74
|
+
this.description = null;
|
|
75
|
+
this.type = undefined;
|
|
76
|
+
this.name = null;
|
|
77
|
+
this.value = null;
|
|
78
|
+
this.checked = false;
|
|
79
|
+
this.disabled = false;
|
|
80
|
+
this.validity = null;
|
|
81
|
+
this.icon = null;
|
|
82
|
+
this.cardClickHandler = this.cardClickHandler.bind(this);
|
|
83
|
+
this.controlClickHandler = this.controlClickHandler.bind(this);
|
|
84
|
+
this.controlChangeHandler = this.controlChangeHandler.bind(this);
|
|
85
|
+
this.controlFocusHandler = this.controlFocusHandler.bind(this);
|
|
86
|
+
this.controlKeyDownHandler = this.controlKeyDownHandler.bind(this);
|
|
87
|
+
}
|
|
88
|
+
cardClickHandler(e) {
|
|
89
|
+
e.stopPropagation();
|
|
90
|
+
// if this was not the clicked element anyway, trigger click on control to change it
|
|
91
|
+
if (e.target !== this.control)
|
|
92
|
+
this.control.click();
|
|
93
|
+
}
|
|
94
|
+
controlClickHandler(e) {
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
// if control is disabled do nothing
|
|
97
|
+
// else control value will fire a change event, which is handled in the controlChangeHandler method
|
|
98
|
+
if (this.disabled)
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
}
|
|
101
|
+
controlChangeHandler(e) {
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
this.groupCollectMembers();
|
|
104
|
+
this.controlSetChecked(this.control.checked, e);
|
|
105
|
+
this.groupSetChecked(this.control, e);
|
|
106
|
+
}
|
|
107
|
+
controlFocusHandler() {
|
|
108
|
+
this.focused = this.host === document.activeElement;
|
|
109
|
+
}
|
|
110
|
+
// https://googlechromelabs.github.io/howto-components/howto-radio-group/
|
|
111
|
+
controlKeyDownHandler(e) {
|
|
112
|
+
if (this.type === 'radio') {
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
if (Object.values(this.KEYCODES).includes(e.code))
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
this.groupCollectMembers();
|
|
117
|
+
switch (e.code) {
|
|
118
|
+
case this.KEYCODES.UP:
|
|
119
|
+
case this.KEYCODES.LEFT:
|
|
120
|
+
this.groupSetChecked(this.groupGetPrev(), e);
|
|
121
|
+
break;
|
|
122
|
+
case this.KEYCODES.DOWN:
|
|
123
|
+
case this.KEYCODES.RIGHT:
|
|
124
|
+
this.groupSetChecked(this.groupGetNext(), e);
|
|
125
|
+
break;
|
|
126
|
+
case this.KEYCODES.SPACE:
|
|
127
|
+
this.groupSetChecked(this.control, e);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
controlSetChecked(checked, e) {
|
|
133
|
+
if (!this.control)
|
|
134
|
+
return;
|
|
135
|
+
if (this.disabled) {
|
|
136
|
+
this.internals.setFormValue(null);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.control.checked = this.checked = checked;
|
|
140
|
+
this.internals.setFormValue(this.checked ? this.control.value : null);
|
|
141
|
+
if (e) {
|
|
142
|
+
const isCheckbox = this.type === 'checkbox';
|
|
143
|
+
const isRadioAndChecked = this.type === 'radio' && this.checked;
|
|
144
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
|
|
145
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio
|
|
146
|
+
// if an event parameter is given and a native control would fire an event, emit the corresponding event to the light dom
|
|
147
|
+
if (isCheckbox || isRadioAndChecked)
|
|
148
|
+
this[this.EVENT_MAP[e.type]].emit({ state: this.checked, value: this.value });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
groupCollectMembers() {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
if (this.type === 'radio' && this.name) {
|
|
155
|
+
this.group.hosts = Array.from(document.querySelectorAll(`post-card-control[type="radio"][name="${this.name}"]`));
|
|
156
|
+
this.group.members = this.group.hosts
|
|
157
|
+
.map(m => m.shadowRoot.querySelector('input[type="radio"]'))
|
|
158
|
+
.filter(m => m !== null);
|
|
159
|
+
if (this.group.members.length > 1) {
|
|
160
|
+
this.group.first = this.group.members[0];
|
|
161
|
+
this.group.last = this.group.members[this.group.members.length - 1];
|
|
162
|
+
this.group.checked = (_a = this.group.members.find(m => m.checked)) !== null && _a !== void 0 ? _a : null;
|
|
163
|
+
this.group.focused =
|
|
164
|
+
(_b = this.group.members.find(m => m.getRootNode().host === document.activeElement)) !== null && _b !== void 0 ? _b : this.group.first;
|
|
165
|
+
const focusableMember = this.group.checked || this.group.focused || this.group.first;
|
|
166
|
+
this.group.members.forEach(m => {
|
|
167
|
+
m.tabIndex = m === focusableMember ? 0 : -1;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
groupGetPrev() {
|
|
173
|
+
var _a;
|
|
174
|
+
const focusedIndex = this.group.members.findIndex(m => m.id === this.group.focused.id);
|
|
175
|
+
return (_a = this.group.members.find((_m, i) => i === focusedIndex - 1)) !== null && _a !== void 0 ? _a : this.group.last;
|
|
176
|
+
}
|
|
177
|
+
groupGetNext() {
|
|
178
|
+
var _a;
|
|
179
|
+
const focusedIndex = this.group.members.findIndex(m => m.id === this.group.focused.id);
|
|
180
|
+
return (_a = this.group.members.find((_m, i) => i === focusedIndex + 1)) !== null && _a !== void 0 ? _a : this.group.first;
|
|
181
|
+
}
|
|
182
|
+
groupSetChecked(newChecked, e) {
|
|
183
|
+
if (this.group.members.length > 1) {
|
|
184
|
+
const isKeyboardEvent = e.type === 'keydown';
|
|
185
|
+
const newIsAriaDisabled = newChecked.hasAttribute('aria-disabled');
|
|
186
|
+
const newIndex = this.group.members.findIndex(m => m === newChecked);
|
|
187
|
+
if (isKeyboardEvent)
|
|
188
|
+
newChecked.focus();
|
|
189
|
+
// if new is disabled, do not reset/set anything
|
|
190
|
+
if (!newIsAriaDisabled) {
|
|
191
|
+
// reset all group members but the newChecked
|
|
192
|
+
this.group.hosts
|
|
193
|
+
.filter((_h, i) => i !== newIndex)
|
|
194
|
+
.forEach(h => {
|
|
195
|
+
h.groupReset();
|
|
196
|
+
});
|
|
197
|
+
// if method was called by keyboard event, select newChecked
|
|
198
|
+
// else this has already been done by clicking on the newChecked element already
|
|
199
|
+
if (isKeyboardEvent)
|
|
200
|
+
newChecked.click();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
// remove as soon as all browser support :host-context()
|
|
205
|
+
// https://caniuse.com/?search=%3Ahost-context()
|
|
206
|
+
setHostContext() {
|
|
207
|
+
let bgContext;
|
|
208
|
+
const possibleBgContexts = window
|
|
209
|
+
.getComputedStyle(this.host)
|
|
210
|
+
.getPropertyValue('--post-card-control-bg-context')
|
|
211
|
+
.split(', ');
|
|
212
|
+
let formContext;
|
|
213
|
+
const possibleFromContexts = ['fieldset'];
|
|
214
|
+
let element = this.host;
|
|
215
|
+
while (element && (!bgContext || !formContext)) {
|
|
216
|
+
bgContext = bgContext !== null && bgContext !== void 0 ? bgContext : possibleBgContexts.find(selector => element.matches(selector));
|
|
217
|
+
formContext = formContext !== null && formContext !== void 0 ? formContext : possibleFromContexts.find(selector => element.matches(selector));
|
|
218
|
+
element = element.parentElement;
|
|
219
|
+
}
|
|
220
|
+
const hostContext = [bgContext, formContext].filter(context => !!context).join(' ');
|
|
221
|
+
this.host.setAttribute('data-context', hostContext);
|
|
222
|
+
}
|
|
223
|
+
connectedCallback() {
|
|
224
|
+
this.initialChecked = this.checked;
|
|
225
|
+
}
|
|
226
|
+
componentWillRender() {
|
|
227
|
+
this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
|
|
228
|
+
}
|
|
229
|
+
render() {
|
|
230
|
+
return (index.h(index.Host, { key: '9ae199f3c25ae7af1019f3c76baf43248b301f84', "data-version": _package.version, onClick: this.cardClickHandler }, index.h("div", { key: 'a2060187ccede9b8944e19f49ba292bab0c72635', class: {
|
|
231
|
+
'card-control': true,
|
|
232
|
+
'is-checked': this.checked,
|
|
233
|
+
'is-disabled': this.disabled,
|
|
234
|
+
'is-focused': this.focused,
|
|
235
|
+
'is-valid': this.validity !== null && this.validity !== 'false',
|
|
236
|
+
'is-invalid': this.validity === 'false',
|
|
237
|
+
} }, index.h("input", { key: 'e1e456566e1861966415c115564a8325ab479ef4', ref: el => (this.control = el), id: this.controlId, class: "card-control--input form-check-input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === 'false', onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), index.h("label", { key: 'd4377ab6041e2a73be5d14a7897158f6788831e4', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label form-check-label" }, this.label, this.description ? (index.h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (index.h("div", { class: "card-control--icon" }, index.h("slot", { name: "icon" }, this.icon ? index.h("post-icon", { name: this.icon }) : null))) : null, index.h("div", { key: '15f01cc76bdf792b7ace1997a08b961f46e112ed', id: `${this.controlId}_content`, class: "card-control--content" }, index.h("slot", { key: '4d4af0edaef3fd61f40203cadd25ea8b34963b48' })))));
|
|
238
|
+
}
|
|
239
|
+
componentDidRender() {
|
|
240
|
+
this.setHostContext();
|
|
241
|
+
this.groupCollectMembers();
|
|
242
|
+
}
|
|
243
|
+
componentDidLoad() {
|
|
244
|
+
this.validateControlLabel();
|
|
245
|
+
this.validateControlType();
|
|
246
|
+
}
|
|
247
|
+
// https://stenciljs.com/docs/form-associated
|
|
248
|
+
/* eslint-disable @stencil-community/own-methods-must-be-private */
|
|
249
|
+
formAssociatedCallback() {
|
|
250
|
+
this.controlSetChecked(this.checked);
|
|
251
|
+
}
|
|
252
|
+
formDisabledCallback(disabled) {
|
|
253
|
+
this.disabled = disabled;
|
|
254
|
+
}
|
|
255
|
+
formStateRestoreCallback(checked) {
|
|
256
|
+
this.controlSetChecked(checked);
|
|
257
|
+
}
|
|
258
|
+
formResetCallback() {
|
|
259
|
+
this.reset();
|
|
260
|
+
}
|
|
261
|
+
static get formAssociated() { return true; }
|
|
262
|
+
get host() { return index.getElement(this); }
|
|
263
|
+
static get watchers() { return {
|
|
264
|
+
"label": ["validateControlLabel"],
|
|
265
|
+
"type": ["validateControlType"],
|
|
266
|
+
"checked": ["updateControlChecked"],
|
|
267
|
+
"disabled": ["updateControlDisabled"]
|
|
268
|
+
}; }
|
|
269
|
+
};
|
|
270
|
+
PostCardControl.style = PostCardControlStyle0;
|
|
271
|
+
|
|
272
|
+
exports.PostCardControl = PostCardControl;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postCardControl = require('./post-card-control-
|
|
5
|
+
const postCardControl = require('./post-card-control-94614910.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
7
|
require('./check-one-of-f4f5d0c0.js');
|
|
8
8
|
require('./check-non-empty-eeaa8f77.js');
|
|
9
9
|
require('./constants-238701d3.js');
|
|
10
|
-
require('./package-
|
|
10
|
+
require('./package-349bfcc9.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
package/dist/cjs/{post-collapsible-trigger-87f6230d.js → post-collapsible-trigger-bb6a180f.js}
RENAMED
|
@@ -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-349bfcc9.js');
|
|
5
5
|
const index$1 = require('./index-824d2b71.js');
|
|
6
6
|
const checkType = require('./check-type-64af82a9.js');
|
|
7
7
|
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postCollapsibleTrigger = require('./post-collapsible-trigger-
|
|
5
|
+
const postCollapsibleTrigger = require('./post-collapsible-trigger-bb6a180f.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-349bfcc9.js');
|
|
8
8
|
require('./index-824d2b71.js');
|
|
9
9
|
require('./constants-238701d3.js');
|
|
10
10
|
require('./check-one-of-f4f5d0c0.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-e1f32cce.js');
|
|
4
4
|
const index$1 = require('./index-824d2b71.js');
|
|
5
|
-
const _package = require('./package-
|
|
5
|
+
const _package = require('./package-349bfcc9.js');
|
|
6
6
|
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
7
7
|
const checkType = require('./check-type-64af82a9.js');
|
|
8
8
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postIcon = require('./post-icon-
|
|
5
|
+
const postIcon = require('./post-icon-13aeb3e5.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
7
|
require('./index-824d2b71.js');
|
|
8
8
|
require('./constants-238701d3.js');
|
|
9
9
|
require('./check-one-of-f4f5d0c0.js');
|
|
10
10
|
require('./check-type-64af82a9.js');
|
|
11
|
-
require('./package-
|
|
11
|
+
require('./package-349bfcc9.js');
|
|
12
12
|
require('./check-non-empty-eeaa8f77.js');
|
|
13
13
|
|
|
14
14
|
|
|
@@ -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-349bfcc9.js');
|
|
5
5
|
const index$1 = require('./index-824d2b71.js');
|
|
6
6
|
|
|
7
7
|
const postLogoCss = ":host,.logo{display:inline-block}:host,:host .logo>svg,.logo,.logo .logo>svg{height:100%}.description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postLogo = require('./post-logo-
|
|
5
|
+
const postLogo = require('./post-logo-c151060a.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-349bfcc9.js');
|
|
8
8
|
require('./index-824d2b71.js');
|
|
9
9
|
require('./constants-238701d3.js');
|
|
10
10
|
require('./check-one-of-f4f5d0c0.js');
|
|
@@ -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-349bfcc9.js');
|
|
5
5
|
|
|
6
6
|
const getAttributeObserver = (attribute, handler) => {
|
|
7
7
|
/**
|
|
@@ -27,7 +27,7 @@ const getAttributeObserver = (attribute, handler) => {
|
|
|
27
27
|
return new MutationObserver(observerHandler);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const postPopoverCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}/*!\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 *//*!\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:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{
|
|
30
|
+
const postPopoverCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}/*!\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 *//*!\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:4px;color:var(--post-gray-80);transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-style:none !important;outline-offset:2px !important;outline-width:2px !important;outline-color:var(--post-focus-color) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:solid !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{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}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error,.bg-nightblue,.bg-nightblue-bright,.bg-petrol,.bg-coral,.bg-olive,.bg-purple,.bg-purple-bright,.bg-aubergine,.bg-aubergine-bright,.alert-primary,post-alert[type=primary],.alert-success,post-alert[type=success],.alert-danger,post-alert[type=danger],.alert-notification,post-alert[type=notification],.alert-error,post-alert[type=error]) .btn-close{color:var(--post-contrast-color)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:var(--post-contrast-color)}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{box-sizing:border-box}:host{--post-contrast-color:#fff;--post-bg-rgb:51, 51, 51;display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:var(--post-popover-max-width, 280px)}@media (max-width: 599.98px){.popover-container{max-width:100%}}.popover-content{padding:.5em;flex-grow:1}.btn-close{color:inherit}";
|
|
31
31
|
const PostPopoverStyle0 = postPopoverCss;
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -77,17 +77,19 @@ const PostPopover = class {
|
|
|
77
77
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
78
78
|
}
|
|
79
79
|
componentDidLoad() {
|
|
80
|
-
|
|
80
|
+
var _a;
|
|
81
|
+
(_a = this.popoverRef) === null || _a === void 0 ? void 0 : _a.addEventListener('beforetoggle', this.localBeforeToggleHandler);
|
|
81
82
|
}
|
|
82
83
|
disconnectedCallback() {
|
|
84
|
+
var _a;
|
|
83
85
|
popoverInstances--;
|
|
84
86
|
// Remove listeners and observer after the last popover has been destructed
|
|
85
87
|
if (popoverInstances === 0) {
|
|
86
|
-
window.removeEventListener('
|
|
88
|
+
window.removeEventListener('pointerup', globalToggleHandler);
|
|
87
89
|
window.removeEventListener('keydown', globalToggleHandler);
|
|
88
90
|
triggerObserver.disconnect();
|
|
89
91
|
}
|
|
90
|
-
this.popoverRef.removeEventListener('beforetoggle', this.localBeforeToggleHandler);
|
|
92
|
+
(_a = this.popoverRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('beforetoggle', this.localBeforeToggleHandler);
|
|
91
93
|
this.triggers.forEach(trigger => trigger.removeAttribute('aria-expanded'));
|
|
92
94
|
}
|
|
93
95
|
/**
|
|
@@ -95,14 +97,16 @@ const PostPopover = class {
|
|
|
95
97
|
* @param target An element with [data-popover-target="id"] where the popover should be shown
|
|
96
98
|
*/
|
|
97
99
|
async show(target) {
|
|
98
|
-
|
|
100
|
+
var _a;
|
|
101
|
+
(_a = this.popoverRef) === null || _a === void 0 ? void 0 : _a.show(target);
|
|
99
102
|
target.setAttribute('aria-expanded', 'true');
|
|
100
103
|
}
|
|
101
104
|
/**
|
|
102
105
|
* Programmatically hide this popover
|
|
103
106
|
*/
|
|
104
107
|
async hide() {
|
|
105
|
-
|
|
108
|
+
var _a;
|
|
109
|
+
(_a = this.popoverRef) === null || _a === void 0 ? void 0 : _a.hide();
|
|
106
110
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
107
111
|
}
|
|
108
112
|
/**
|
|
@@ -111,7 +115,8 @@ const PostPopover = class {
|
|
|
111
115
|
* @param force Pass true to always show or false to always hide
|
|
112
116
|
*/
|
|
113
117
|
async toggle(target, force) {
|
|
114
|
-
|
|
118
|
+
var _a;
|
|
119
|
+
const newState = await ((_a = this.popoverRef) === null || _a === void 0 ? void 0 : _a.toggle(target, force));
|
|
115
120
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
116
121
|
target.setAttribute('aria-expanded', `${newState}`);
|
|
117
122
|
}
|
|
@@ -122,7 +127,7 @@ const PostPopover = class {
|
|
|
122
127
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
123
128
|
}
|
|
124
129
|
render() {
|
|
125
|
-
return (index.h(index.Host, { key: '
|
|
130
|
+
return (index.h(index.Host, { key: '1563466217832b05d8d09a5309c24b90f6082684', "data-version": _package.version }, index.h("post-popovercontainer", { key: '1204b982bbc57841bf74b513f5362606a665f3ea', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, index.h("div", { key: '1f7b67d48d09bc93430f7018fb66ddcd78c5a8db', class: "popover-container" }, index.h("div", { key: '9e45722a10710785addef7bcdf31f6b3760e75ce', class: "popover-content" }, index.h("slot", { key: '4b3d30425450a31e66714d2c03ef45933b91c209' })), index.h("button", { key: 'd3425dd69710d35bde028021ae023bd8f8443b41', class: "btn-close", onClick: () => this.hide() }, index.h("span", { key: '066b14a7024bd9715424e4d42a87f6d9291f2105', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
126
131
|
}
|
|
127
132
|
get host() { return index.getElement(this); }
|
|
128
133
|
};
|
|
@@ -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-e3b4b3f6.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-349bfcc9.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postPopovercontainer = require('./post-popovercontainer-
|
|
5
|
+
const postPopovercontainer = require('./post-popovercontainer-300e99f7.js');
|
|
6
6
|
require('./index-e1f32cce.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-349bfcc9.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-349bfcc9.js');
|
|
5
5
|
|
|
6
6
|
const postRatingCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}/*!\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 *//*!\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;
|