@swisspost/design-system-components 9.0.0-next.5 → 9.0.0-next.7
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 +8 -4
- package/dist/cjs/index.cjs.js +24 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-53892d3d.js → package-bc44930e.js} +1 -1
- package/dist/cjs/{post-accordion-7f627ffd.js → post-accordion-c55fef06.js} +1 -1
- package/dist/cjs/{post-accordion-item-ceb5399f.js → post-accordion-item-641f0b42.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-10d7b5c0.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/post-banner-b286d37f.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-8cdc59a8.js} +1 -1
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/post-card-control-fc4aca2a.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-c8b3e767.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-8c1ec4fd.js} +2 -2
- package/dist/cjs/post-language-option.cjs.entry.js +2 -2
- package/dist/cjs/{post-megadropdown-trigger-da912fed.js → post-megadropdown-trigger-9b9f1036.js} +32 -37
- package/dist/cjs/{post-menu-54fa65d3.js → post-menu-5a71a6fe.js} +2 -2
- package/dist/cjs/{post-menu-item-8c3090b1.js → post-menu-item-5c5c1aaf.js} +2 -2
- package/dist/cjs/post-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-trigger-71449876.js → post-menu-trigger-02d128c4.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-91a83e9d.js} +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-3d166fed.js → post-rating-57fcf949.js} +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/post-tab-header-ce56b760.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-70e49260.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-e871c911.js → post-tabs-39262e55.js} +3 -3
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-62f31d0e.js → post-tag-b6bc5785.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/post-togglebutton-2f39442e.js +28 -0
- package/dist/cjs/post-togglebutton.cjs.entry.js +11 -0
- package/dist/cjs/{post-tooltip-851c342c.js → post-tooltip-8be3b2aa.js} +28 -16
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -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-header/post-header.js +1 -1
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +20 -31
- package/dist/collection/components/post-language-option/post-language-option.js +1 -1
- package/dist/collection/components/post-list/post-list.js +2 -2
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +1 -1
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- 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-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +56 -0
- package/dist/collection/components/post-tooltip/post-tooltip.js +28 -12
- package/dist/collection/index.js +2 -1
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.js +2 -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-header2.js +1 -1
- package/dist/components/post-icon2.js +22 -29
- package/dist/components/post-language-option2.js +1 -1
- package/dist/components/post-list-item2.js +1 -1
- package/dist/components/post-list2.js +2 -2
- package/dist/components/post-logo2.js +1 -1
- package/dist/components/post-mainnavigation2.js +1 -1
- package/dist/components/post-megadropdown-trigger2.js +1 -1
- package/dist/components/post-megadropdown2.js +1 -1
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +4 -2
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-popover2.js +2 -2
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +2 -2
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-togglebutton.d.ts +11 -0
- package/dist/components/post-togglebutton.js +6 -0
- package/dist/components/post-togglebutton2.js +43 -0
- package/dist/components/post-tooltip2.js +27 -15
- package/dist/docs.json +209 -175
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/index-e1b64755.js +8 -4
- package/dist/esm/index.js +22 -20
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-180da9f3.js +3 -0
- package/dist/esm/{post-accordion-b2762084.js → post-accordion-7268e29b.js} +1 -1
- package/dist/esm/{post-accordion-item-82ef1c4a.js → post-accordion-item-a5a76abb.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-19162f90.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/post-banner-132709ad.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-5a77f988.js} +1 -1
- package/dist/esm/post-breadcrumb-item.entry.js +2 -2
- package/dist/esm/post-card-control-5be9c80a.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-43fbbf03.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-f41240c3.js} +2 -2
- package/dist/esm/post-language-option.entry.js +2 -2
- package/dist/esm/{post-megadropdown-trigger-7e577245.js → post-megadropdown-trigger-813b5140.js} +32 -37
- package/dist/esm/{post-menu-e6337859.js → post-menu-62c3e49a.js} +2 -2
- package/dist/esm/{post-menu-item-c10a0a93.js → post-menu-item-f63a1521.js} +2 -2
- package/dist/esm/post-menu-item.entry.js +2 -2
- package/dist/esm/{post-menu-trigger-5f31ad60.js → post-menu-trigger-b84f728d.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-abae1f3a.js} +3 -3
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-d04d0349.js → post-rating-b963d4f2.js} +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/post-tab-header-c16feb72.js +30 -0
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-d9ecc10e.js → post-tab-panel-cb02df49.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-e98a47e8.js → post-tabs-81085d7b.js} +3 -3
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-40a65871.js → post-tag-103bfff5.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/post-togglebutton-0e714838.js +26 -0
- package/dist/esm/post-togglebutton.entry.js +3 -0
- package/dist/esm/{post-tooltip-3b1e121c.js → post-tooltip-2c5ff736.js} +28 -16
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-06980a04.js +1 -0
- package/dist/post-components/p-0af7dfbb.js +1 -0
- package/dist/post-components/p-0f699dbc.js +1 -0
- package/dist/post-components/p-12262945.entry.js +1 -0
- package/dist/post-components/p-2504dace.entry.js +1 -0
- package/dist/post-components/p-27343d32.entry.js +1 -0
- package/dist/post-components/{p-42c628fd.js → p-2a456317.js} +1 -1
- package/dist/post-components/p-2c3980d2.js +1 -0
- package/dist/post-components/p-31d38040.js +1 -0
- package/dist/post-components/{p-76dbca34.entry.js → p-339e000e.entry.js} +1 -1
- package/dist/post-components/p-3b325360.entry.js +1 -0
- package/dist/post-components/{p-2069e764.js → p-3e65ba47.js} +1 -1
- package/dist/post-components/p-3f417208.entry.js +1 -0
- package/dist/post-components/p-4922deaf.entry.js +1 -0
- package/dist/post-components/p-6c7546b8.entry.js +1 -0
- package/dist/post-components/{p-e0dc4fac.js → p-6f56a13d.js} +3 -3
- package/dist/post-components/p-7eee2b6a.js +1 -0
- package/dist/post-components/p-816623f0.entry.js +1 -0
- package/dist/post-components/p-83cd3885.entry.js +1 -0
- package/dist/post-components/{p-879ae242.js → p-8b6f7f04.js} +1 -1
- package/dist/post-components/p-9abe554b.js +1 -0
- package/dist/post-components/p-9ea6103e.entry.js +1 -0
- package/dist/post-components/p-a0a7c2c1.entry.js +1 -0
- package/dist/post-components/p-abf9ffdc.entry.js +1 -0
- package/dist/post-components/p-b4a2c7b7.entry.js +1 -0
- package/dist/post-components/{p-77a757d4.js → p-b7ef401f.js} +1 -1
- package/dist/post-components/p-b8a9cf2d.js +1 -0
- package/dist/post-components/p-bb103905.js +1 -0
- package/dist/post-components/{p-75514d7d.js → p-c819933c.js} +1 -1
- package/dist/post-components/p-ccd8a221.entry.js +1 -0
- package/dist/post-components/p-cfc1727f.entry.js +1 -0
- package/dist/post-components/{p-fc2c7222.js → p-d4465c2b.js} +1 -1
- package/dist/post-components/{p-af8cfb8e.js → p-d4cef624.js} +1 -1
- package/dist/post-components/p-da449573.js +1 -0
- package/dist/post-components/p-df5bdda5.entry.js +1 -0
- package/dist/post-components/{p-7a20605b.js → p-ed834dde.js} +1 -1
- package/dist/post-components/p-f1416918.entry.js +1 -0
- package/dist/post-components/p-f171b18b.entry.js +1 -0
- package/dist/post-components/p-f4dbd35f.entry.js +1 -0
- package/dist/post-components/p-f6b44820.js +1 -0
- package/dist/post-components/p-fa7af203.js +1 -0
- 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-icon/post-icon.d.ts +2 -5
- 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/post-togglebutton/post-togglebutton.d.ts +13 -0
- package/dist/types/components.d.ts +92 -79
- package/dist/types/index.d.ts +2 -1
- package/loaders/get-root.js +9 -0
- package/loaders/index.d.ts +4 -2
- package/loaders/index.js +2 -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-header.js +1 -1
- package/loaders/post-icon2.js +22 -29
- package/loaders/post-language-option.js +1 -1
- package/loaders/post-list-item.js +1 -1
- package/loaders/post-list.js +2 -2
- package/loaders/post-logo.js +1 -1
- package/loaders/post-mainnavigation.js +1 -1
- package/loaders/post-megadropdown-trigger.js +1 -1
- package/loaders/post-megadropdown.js +1 -1
- package/loaders/post-menu-item.js +1 -1
- package/loaders/post-menu-trigger.js +4 -2
- package/loaders/post-menu.js +1 -1
- package/loaders/post-popover.js +2 -2
- package/loaders/post-popovercontainer2.js +2 -2
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +2 -2
- package/loaders/post-tag.js +1 -1
- package/loaders/post-togglebutton.d.ts +11 -0
- package/loaders/post-togglebutton.js +46 -0
- package/loaders/post-tooltip.js +27 -15
- package/package.json +5 -5
- 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-1d8a41d3.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-6e7bde44.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
|
@@ -5,8 +5,8 @@ let cardControlIds = 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* @class PostCardControl - representing a stencil component
|
|
7
7
|
*
|
|
8
|
-
* @slot default - Content to place into the `default` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Block-level_contentt">block content</a>.<p className="
|
|
9
|
-
* @slot icon - To insert a custom icon into the named `icon` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Inline-level_content">inline content</a>.<p className="
|
|
8
|
+
* @slot default - Content to place into the `default` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Block-level_contentt">block content</a>.<p className="banner banner-sm banner-warning">Even if it is generally possible, we do not recommend using interactive elements in this slot because the background of the card control is clickable.<br/>This can lead to confusion when the hit box of nested interactive controls is not clearly separated from the background, is invalid HTML and click events bubbling up to the card control will unexpectedly toggle it if they're not captured.<br/>More info: <a href="https://accessibilityinsights.io/info-examples/web/nested-interactive/">https://accessibilityinsights.io/info-examples/web/nested-interactive/</a></p>
|
|
9
|
+
* @slot icon - To insert a custom icon into the named `icon` slot.<p>Markup accepted: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Inline-level_content">inline content</a>.<p className="banner banner-sm banner-info">It is only meant for <code>img</code> or <code>svg</code> elements and overrides the `icon` property.</p>
|
|
10
10
|
*/
|
|
11
11
|
export class PostCardControl {
|
|
12
12
|
/**
|
|
@@ -218,14 +218,14 @@ export class PostCardControl {
|
|
|
218
218
|
this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
|
|
219
219
|
}
|
|
220
220
|
render() {
|
|
221
|
-
return (h(Host, { key: '
|
|
221
|
+
return (h(Host, { key: '9a9606cbe154a9bedbc5bcabfd0f8a124f48d7c3', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: 'fc77375570af7db9e8fe1a554d73e1aec04025b5', class: {
|
|
222
222
|
'card-control': true,
|
|
223
223
|
'is-checked': this.checked,
|
|
224
224
|
'is-disabled': this.disabled,
|
|
225
225
|
'is-focused': this.focused,
|
|
226
226
|
'is-valid': this.validity !== null && this.validity !== 'false',
|
|
227
227
|
'is-invalid': this.validity === 'false',
|
|
228
|
-
} }, h("input", { key: '
|
|
228
|
+
} }, h("input", { key: '5364895020750c3a265ff3773d29fa1984215a36', ref: el => (this.control = el), id: this.controlId, class: "card-control--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 }), h("label", { key: '452117728c65c511f58ca1e3c98f06edff295c83', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: 'b9da8ef0d3cc6492aa6fa2b7696f73905dca3bb6', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '37aed120bb769b1cfcbccd41b17135b1b769d31e' })))));
|
|
229
229
|
}
|
|
230
230
|
componentDidRender() {
|
|
231
231
|
this.setHostContext();
|
|
@@ -328,7 +328,7 @@ export class PostCardControl {
|
|
|
328
328
|
"optional": false,
|
|
329
329
|
"docs": {
|
|
330
330
|
"tags": [],
|
|
331
|
-
"text": "Defines the `name` attribute of the control.\n<span className=\"
|
|
331
|
+
"text": "Defines the `name` attribute of the control.\n<span className=\"banner banner-sm banner-info\">This is a required property, when the control should participate in a native `form`. If not specified, a native `form` will never contain this controls value.</span>\n<span className=\"banner banner-sm banner-info\">This is a required property, when the control is used with type `radio`.</span>"
|
|
332
332
|
},
|
|
333
333
|
"attribute": "name",
|
|
334
334
|
"reflect": false,
|
|
@@ -346,7 +346,7 @@ export class PostCardControl {
|
|
|
346
346
|
"optional": false,
|
|
347
347
|
"docs": {
|
|
348
348
|
"tags": [],
|
|
349
|
-
"text": "Defines the `value` attribute of the control. <span className=\"
|
|
349
|
+
"text": "Defines the `value` attribute of the control. <span className=\"banner banner-sm banner-info\">This is a required property, when the control is used with type `radio`.</span>"
|
|
350
350
|
},
|
|
351
351
|
"attribute": "value",
|
|
352
352
|
"reflect": false,
|
|
@@ -418,7 +418,7 @@ export class PostCardControl {
|
|
|
418
418
|
"optional": false,
|
|
419
419
|
"docs": {
|
|
420
420
|
"tags": [],
|
|
421
|
-
"text": "Defines the icon `name` inside the card.\n<span className=\"
|
|
421
|
+
"text": "Defines the icon `name` inside the card.\n<span className=\"banner banner-sm banner-info\">If not set the icon will not show up.</span>"
|
|
422
422
|
},
|
|
423
423
|
"attribute": "icon",
|
|
424
424
|
"reflect": false,
|
|
@@ -455,7 +455,7 @@ export class PostCardControl {
|
|
|
455
455
|
"composed": true,
|
|
456
456
|
"docs": {
|
|
457
457
|
"tags": [],
|
|
458
|
-
"text": "An event emitted whenever the components checked state is toggled.\nThe event payload (emitted under `event.detail.state`) is a boolean: `true` if the component is checked, `false` if it is unchecked.\n<span className=\"
|
|
458
|
+
"text": "An event emitted whenever the components checked state is toggled.\nThe event payload (emitted under `event.detail.state`) is a boolean: `true` if the component is checked, `false` if it is unchecked.\n<span className=\"banner banner-sm banner-info\">If the component is used with type `radio`, it will only emit this event, when the checked state is changing to `true`.</span>"
|
|
459
459
|
},
|
|
460
460
|
"complexType": {
|
|
461
461
|
"original": "{ state: boolean; value: string }",
|
|
@@ -70,7 +70,7 @@ export class PostHeader {
|
|
|
70
70
|
if (this.mobileMenuExtended) {
|
|
71
71
|
mainNavClasses.push('extended');
|
|
72
72
|
}
|
|
73
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: '85b0f7c1d14b96947497cc6d1cdf059430eb9ab6', version: version }, h("div", { key: '740ed42365e2e71215d4b8174cf98d8f8385fe9a', class: "global-header" }, h("div", { key: '0a0b0a3bdb527c6988992e23a3401f9c51b02d51', class: "global-sub" }, h("div", { key: '983bc0dacdc9f7f96a8aefdd3e17f31d0fbe1ef8', class: "logo" }, h("slot", { key: 'e9b97b26cfdbe836147493c50a98986791d8ce85', name: "post-logo" })), this.device === 'desktop' && h("slot", { key: '8a6d9c3c9d3f72de6d9ef0dbd2ecde3fd4982de6', name: "audience-navigation" })), h("div", { key: 'a85add260edc38024612e7bc1f2e7d19a2b11fdf', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: 'ffac0efc9078819711471067b6a85feaa807c9c9', name: "meta-navigation" }), h("slot", { key: 'c8270ebb6c57bbba4db4e2799e69e33ea0a2c094', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: 'ac209cb8acd66dcaeb300c17994f0bae201cc0f8', name: "post-language-switch" }), h("div", { key: '210a5220eb97155138422a032a850d13992ac9a2', onClick: () => this.handleMobileMenuToggle(), class: "mobile-toggle" }, h("slot", { key: '42fb06418bc617252c80bab4ae64c64a74265723', name: "post-togglebutton" })))), h("div", { key: '62e1859020d65a54b86d53882a4452f6005589e9', class: "title-header d-flex space-between align-center" }, h("slot", { key: 'b285ac31f54fb3011813aab9f7c8ae1e9d64e8c2', name: "title" }), h("div", { key: 'b529d4b6d01bc39c9344bd2ed15f698d0637fe35', class: "global-sub" }, h("slot", { key: 'da20b42e70bd715c89ef4e6c7419f115bb1bfb45', name: "local-controls" }), h("slot", { key: 'd27c3b97b6597df51811913c74ae2ec157939563' }))), h("div", { key: '7d80d02dd4794598828d6c05779714d874818bbe', class: mainNavClasses.join(' ') }, (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: 'dc02044dec14c3b716dd20209c5fb775d75d583f', name: "audience-navigation" })), h("slot", { key: '3f5a09fb4f69bb21924db2e236d554036a559d54', name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: 'f50c0ce8631109041c25200c4e4b3f57502cf434', name: "meta-navigation" })), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: 'fc87fa82fd01021eb629bacc168f2d0a537409eb', name: "post-language-switch" })))));
|
|
74
74
|
}
|
|
75
75
|
static get is() { return "post-header"; }
|
|
76
76
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}
|
|
1
|
+
:host{container-name:post-icon;container-type:inline-size;display:inline-block;width:1em;height:1em;vertical-align:-0.15em}svg{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color}@container post-icon (max-width: 23.98px){svg{--pis-16: block}}@container post-icon (min-width: 24px) and (max-width: 31.98px){svg{--pis-24: block}}@container post-icon (min-width: 32px) and (max-width: 39.98px){svg{--pis-32: block}}@container post-icon (min-width: 40px) and (max-width: 47.98px){svg{--pis-40: block}}@container post-icon (min-width: 48px) and (max-width: 63.98px){svg{--pis-48: block}}@container post-icon (min-width: 64px){svg{--pis-64: block}}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}
|
|
@@ -16,8 +16,6 @@ const ANIMATION_KEYS = [...ANIMATION_NAMES];
|
|
|
16
16
|
*/
|
|
17
17
|
export class PostIcon {
|
|
18
18
|
constructor() {
|
|
19
|
-
this.svgStyles = undefined;
|
|
20
|
-
this.svgOutput = undefined;
|
|
21
19
|
this.animation = null;
|
|
22
20
|
this.base = null;
|
|
23
21
|
this.flipH = false;
|
|
@@ -49,6 +47,25 @@ export class PostIcon {
|
|
|
49
47
|
validateScale(newValue = this.scale) {
|
|
50
48
|
checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
51
49
|
}
|
|
50
|
+
getPath() {
|
|
51
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52
|
+
// Construct icon path from different possible sources
|
|
53
|
+
const metaBase = (_b = (_a = document.head
|
|
54
|
+
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
|
|
55
|
+
const baseHref = (_c = document.getElementsByTagName('base')[0]) === null || _c === void 0 ? void 0 : _c.href;
|
|
56
|
+
const fileBase = `${(_f = (_e = (_d = this.base) !== null && _d !== void 0 ? _d : metaBase) !== null && _e !== void 0 ? _e : baseHref) !== null && _f !== void 0 ? _f : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
57
|
+
const fileName = `${this.name}.svg#i-${this.name}`;
|
|
58
|
+
const filePath = `${fileBase}${fileName}`;
|
|
59
|
+
return new URL(filePath, window.location.origin).toString();
|
|
60
|
+
}
|
|
61
|
+
getStyles() {
|
|
62
|
+
return Object.entries({
|
|
63
|
+
transform: (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
64
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
65
|
+
})
|
|
66
|
+
.filter(([_key, value]) => value !== null)
|
|
67
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
68
|
+
}
|
|
52
69
|
componentDidLoad() {
|
|
53
70
|
this.validateBase();
|
|
54
71
|
this.validateName();
|
|
@@ -58,30 +75,8 @@ export class PostIcon {
|
|
|
58
75
|
this.validateRotate();
|
|
59
76
|
this.validateAnimation();
|
|
60
77
|
}
|
|
61
|
-
componentWillRender() {
|
|
62
|
-
this.setPath();
|
|
63
|
-
}
|
|
64
|
-
setPath() {
|
|
65
|
-
var _a, _b, _c, _d;
|
|
66
|
-
// Construct icon path from different possible sources
|
|
67
|
-
const metaBase = (_b = (_a = document.head
|
|
68
|
-
.querySelector('meta[name="design-system-settings"][data-post-icon-base]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-post-icon-base')) !== null && _b !== void 0 ? _b : null;
|
|
69
|
-
const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
70
|
-
const fileName = `${this.name}.svg`;
|
|
71
|
-
const filePath = `${fileBase}${fileName}`;
|
|
72
|
-
this.path = new URL(filePath, window.location.origin).toString();
|
|
73
|
-
}
|
|
74
78
|
render() {
|
|
75
|
-
|
|
76
|
-
const svgStyles = Object.entries({
|
|
77
|
-
'-webkit-mask-image': `url('${this.path}')`,
|
|
78
|
-
'mask-image': `url('${this.path}')`,
|
|
79
|
-
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
80
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
81
|
-
})
|
|
82
|
-
.filter(([_key, value]) => value !== null)
|
|
83
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
84
|
-
return (h(Host, { key: '86c61ac92270e1b46ef63e2bb0ff4683a16ca794', "data-version": version }, h("span", { key: 'ad856363b96d303912c9085d9d45cb911cbedfc6', style: svgStyles })));
|
|
79
|
+
return (h(Host, { key: '34a48ba95a05ab98ccbd7d5c59423f8f261c2a77', "data-version": version }, h("svg", { key: '34a70353c83fba4b8606ee4516cda7982c042ea2', style: this.getStyles() }, h("use", { key: '3241328a9e9b1f7929d79fff89725d98e5e162a0', href: this.getPath() }))));
|
|
85
80
|
}
|
|
86
81
|
static get is() { return "post-icon"; }
|
|
87
82
|
static get encapsulation() { return "shadow"; }
|
|
@@ -229,12 +224,6 @@ export class PostIcon {
|
|
|
229
224
|
}
|
|
230
225
|
};
|
|
231
226
|
}
|
|
232
|
-
static get states() {
|
|
233
|
-
return {
|
|
234
|
-
"svgStyles": {},
|
|
235
|
-
"svgOutput": {}
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
227
|
static get elementRef() { return "host"; }
|
|
239
228
|
static get watchers() {
|
|
240
229
|
return [{
|
|
@@ -47,7 +47,7 @@ export class PostLanguageOption {
|
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
49
|
const lang = this.code.toLowerCase();
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'e52e889c7aee2f5a46d7070a6a12185573db2cb3', "data-version": version, role: "listitem" }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, "aria-label": this.name, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange() }, h("slot", null))) : (h("button", { "aria-current": this.active ? 'true' : undefined, "aria-label": this.name, lang: lang, onClick: () => this.emitChange() }, h("slot", null)))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "post-language-option"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -20,12 +20,12 @@ export class PostList {
|
|
|
20
20
|
this.checkTitle();
|
|
21
21
|
}
|
|
22
22
|
checkTitle() {
|
|
23
|
-
if (!this.titleEl.
|
|
23
|
+
if (!this.titleEl.textContent.trim()) {
|
|
24
24
|
throw new Error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '7126a864e6c4d8152c9024bd8d390514bc8c0b7a', "data-version": version }, h("div", { key: 'c3f56a0e41146dc5dbd2c3fc165152e05953956f', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: '3de0cd83b48ef3a3201f854842781ccba9bedf29' })), h("div", { key: '4b8a4ac0a9c89451a408cc8de814878dc8da11b7', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '474d87804fc39241a0f3541a82bdfbe1491a4452', name: "post-list-item" }))));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "post-list"; }
|
|
31
31
|
static get originalStyleUrls() {
|
|
@@ -7,7 +7,7 @@ export class PostListItem {
|
|
|
7
7
|
this.host.setAttribute('slot', 'post-list-item');
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '25532c40e8f02f335df6b112041cbaf6056576b6', role: "listitem" }, h("slot", { key: '46ddc9e27c71040b271ab6bd59db2ac37fa4a112' })));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "post-list-item"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,7 +23,7 @@ export class PostLogo {
|
|
|
23
23
|
render() {
|
|
24
24
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
25
25
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: 'd3dd408c30b4e22712b9a293906c7334e7d1852b', "data-version": version, slot: "post-logo" }, h(LogoTag, Object.assign({ key: '4eb08a4d1b4a0ec2557b63678225a16d287c692c', class: "logo" }, (logoLink ? { href: logoLink } : {})), h("span", { key: 'ab3b1a8da4a7b87aa0a020d47586a7018619e9c3', class: "description" }, h("slot", { key: 'a9c39b1f2f54fd4ceb79a82ab30571c161a29adb', onSlotchange: () => this.checkDescription() })), h("svg", { key: 'af4c3fbdb2a72e0b8518a6c16cefdb795f41244c', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: '05e25c1522dd4edfc676b04cf9092ed519d95381', id: "Logo" }, h("rect", { key: '12e1b7878e990e110c8ae83ef742bb6fa4c48a2f', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: '0e1120c70769c4a23b3711c1157e6f1742e3a75b', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), h("path", { key: 'ccc271be1919898fc6eed78bf2e012e71dd96c48', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "post-logo"; }
|
|
29
29
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,7 +18,7 @@ export class PostMainnavigation {
|
|
|
18
18
|
this.postToggle.emit();
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '5006fede681cf581b878c84fd1a6b7fe4830cbd2', slot: "post-mainnavigation" }, h("div", { key: 'a2273bab074eac3f9197961b935c3ba19ecbbb21', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: 'c42751bee76cecbb076bb227bd0ffcc634b354a2', name: "back-button" })), h("nav", { key: '89541b5efc3500a8feec250a3d10402ea4b1a3a2', class: "main-navigation" }, h("slot", { key: 'f5f5a030325e701aaaca13747131b1f1fa10e849' }))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "post-mainnavigation"; }
|
|
24
24
|
static get originalStyleUrls() {
|
|
@@ -28,7 +28,7 @@ export class PostMegadropdown {
|
|
|
28
28
|
this.hide();
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '96d71da6b3cfcd8980d7e60cb383d545c754d7b3', slot: "post-mainnavigation" }, h("post-popovercontainer", { key: 'ec27bcdae9da77299d59d8869be60c08816eef85', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: '0b97d183a5fad18401aa876cf19d3975a1757d18', class: "megadropdown" }, h("div", { key: '4eb9715d7cf88898dddae702f71d430f1e3810af', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: 'a21d4b50b1d04211ecfb5d0b145452a6bbae0ae0', name: "back-button" })), h("slot", { key: '5a4dd77f0f91bf6a61ef1cf9bdd4371875a52d2e' })))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "post-megadropdown"; }
|
|
34
34
|
static get originalStyleUrls() {
|
|
@@ -8,7 +8,7 @@ export class PostMegadropdownTrigger {
|
|
|
8
8
|
this.postToggle.emit();
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '0b3de3d7d035e7427ff55d5818ce89f3cadd3c57', slot: "post-megadropdown-trigger" }, h("button", { key: '6e5ea2515fcafbf9ed4ea4f0532f85f6c044f2a5', "aria-expanded": this.toggled, onClick: () => this.handleClick() }, h("slot", { key: '60daae26758894fea7576d696d9325fa61f3cc31' }))));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "post-megadropdown-trigger"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -135,7 +135,7 @@ export class PostMenu {
|
|
|
135
135
|
return menuItems;
|
|
136
136
|
}
|
|
137
137
|
render() {
|
|
138
|
-
return (h(Host, { key: '
|
|
138
|
+
return (h(Host, { key: '80720b7f1d029833de466c84c9fe931460a5b9b1', "data-version": version }, h("post-popovercontainer", { key: 'b1e610ad0c0f33a09ac3fee5954567e957653e76', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'a9cd7f6efcd762b548acb7c8d3bf614ccdedd504', class: "popover-container" }, h("slot", { key: 'e278c4020b70c8bd5f6a1e4a3ac8cbaf37f2b786' })))));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "post-menu"; }
|
|
141
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
export class PostMenuItem {
|
|
4
4
|
render() {
|
|
5
|
-
return (h(Host, { key: '
|
|
5
|
+
return (h(Host, { key: '48720f09bc2ab4a979d215f590dcb80e39422e46', role: "menuitem", "data-version": version }, h("slot", { key: '5a0c1aeb2c96a02c2e4567d3e1e83fd6e3a3aace' })));
|
|
6
6
|
}
|
|
7
7
|
static get is() { return "post-menu-item"; }
|
|
8
8
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
|
-
import { checkType } from "../../utils/index";
|
|
3
|
+
import { checkType, getRoot } from "../../utils/index";
|
|
4
4
|
export class PostMenuTrigger {
|
|
5
5
|
constructor() {
|
|
6
6
|
/**
|
|
@@ -25,7 +25,7 @@ export class PostMenuTrigger {
|
|
|
25
25
|
checkType(forValue, 'string', 'The "for" property is required and should be a string.');
|
|
26
26
|
}
|
|
27
27
|
get menu() {
|
|
28
|
-
const ref =
|
|
28
|
+
const ref = this.root.getElementById(this.for);
|
|
29
29
|
return ref && ref.localName === 'post-menu' ? ref : null;
|
|
30
30
|
}
|
|
31
31
|
handleToggle() {
|
|
@@ -40,6 +40,7 @@ export class PostMenuTrigger {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
componentDidLoad() {
|
|
43
|
+
this.root = getRoot(this.host);
|
|
43
44
|
this.validateControlFor();
|
|
44
45
|
this.slottedButton = this.host.querySelector('button');
|
|
45
46
|
if (this.slottedButton) {
|
|
@@ -54,7 +55,7 @@ export class PostMenuTrigger {
|
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
render() {
|
|
57
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '5c07c2a808f5048b870d77f1f65d84bc2007431f', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'ab779f01983e2c88f09707ab8b12eb326ac6946b' })));
|
|
58
59
|
}
|
|
59
60
|
static get is() { return "post-menu-trigger"; }
|
|
60
61
|
static get originalStyleUrls() {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
-
*/.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:var(--post-device-border-radius-round);color
|
|
3
|
+
*/.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}
|
|
@@ -88,7 +88,7 @@ export class PostPopover {
|
|
|
88
88
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
89
89
|
}
|
|
90
90
|
render() {
|
|
91
|
-
return (h(Host, { key: '
|
|
91
|
+
return (h(Host, { key: 'e716f0b45da8a21c43afba019dbf84a87bc49fab', "data-version": version }, h("post-popovercontainer", { key: '530ffbd07a0f2b2edc26db0c5667c9de372edf01', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '4d7420876786f835aef9decf92030651f5117f52', class: "popover-container" }, h("div", { key: 'e557e3e1f4566fc81b1255ef628e7c58d59fc596', class: "popover-content" }, h("slot", { key: 'ea5e3407ec41868471d388a02cb8a4ba32889d6c' })), h("button", { key: 'af21850867d713f7c5a825d4ac824b12ce40f3e7', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'b2f85d5efd0fd424448efa73ee9ad07c5bab2947', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
92
92
|
}
|
|
93
93
|
static get is() { return "post-popover"; }
|
|
94
94
|
static get encapsulation() { return "shadow"; }
|
|
@@ -137,9 +137,9 @@ export class PostPopovercontainer {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '11e3be5293791aa58da291f2a0f17677ad0e0e63', "data-version": version }, this.arrow && (h("span", { key: '00d76dcd41bf267bb50290ae439c49333ade68b3', class: "arrow", ref: el => {
|
|
141
141
|
this.arrowRef = el;
|
|
142
|
-
} })), h("slot", { key: '
|
|
142
|
+
} })), h("slot", { key: '7c579254fc1b76c91ddecf0952945339cf5bc7fd' })));
|
|
143
143
|
}
|
|
144
144
|
static get is() { return "post-popovercontainer"; }
|
|
145
145
|
static get originalStyleUrls() {
|
|
@@ -64,7 +64,7 @@ export class PostRating {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: 'd5bce841329555bdb71e7f861b7d1f74d93dbcbc', "data-version": version }, h("div", { key: '0c81664652bd279c833ffabe63f082e4849e611a', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
68
68
|
'star': true,
|
|
69
69
|
'before-hover': i < this.hoveredIndex,
|
|
70
70
|
'active': i < Math.round(this.currentRating),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.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
|
|
1
|
+
.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)}}/*!
|
|
2
2
|
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
3
|
*/: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}
|
|
@@ -16,7 +16,7 @@ export class PostTabHeader {
|
|
|
16
16
|
this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '4ca8efb0e3a6a429442be5406eb43f9cd2406b49', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '049d4c8378c42fc31b572d8b073fef523fbc6f37' })));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "post-tab-header"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,7 +13,7 @@ export class PostTabPanel {
|
|
|
13
13
|
this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '8116daf192361e9c9333c1a94afa4d9eb5cce3d1', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '646fc0fa564f76c6f2a1f706cc753f11306ca231' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "post-tab-panel"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.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{
|
|
1
|
+
.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}
|
|
@@ -142,7 +142,7 @@ export class PostTabs {
|
|
|
142
142
|
nextTab.focus();
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
|
-
return (h(Host, { key: '
|
|
145
|
+
return (h(Host, { key: '2a7fe6d86dc18dcebaa25b5466ffc88de96114e6', "data-version": version }, h("div", { key: '71940a2be5c36f591f0948c7f8dedbb26e98736d', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'bd9fa6ba6e2bd037a0a09365d4906b7288f929c6', class: "tabs", role: "tablist" }, h("slot", { key: '72a369206b0f81e88ff9741a69e6b58ba3239f5e', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '9c544b7bae6dc2abb3e297015216c88872a78b8e', class: "tab-content", part: "content" }, h("slot", { key: '2f2e274ecb2bbe19c8f016b8d7a1f7a7038d6646', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
146
146
|
}
|
|
147
147
|
static get is() { return "post-tabs"; }
|
|
148
148
|
static get encapsulation() { return "shadow"; }
|
|
@@ -30,7 +30,7 @@ export class PostTag {
|
|
|
30
30
|
this.setClasses();
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: '52768516080d294eaf20034e18e6a776149fa97e', "data-version": version }, h("div", { key: 'f342d20bfccfdf650f5c6e943065f090a13fd94c', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '5286cb07cbfa5b20e0dfbbd4847a3dda49a19278', class: "tag-text" }, h("slot", { key: '6215a61b4e10d6c0274019f183ef90e46d282114' })))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "post-tag"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,7 +93,7 @@ export class PostTag {
|
|
|
93
93
|
"optional": false,
|
|
94
94
|
"docs": {
|
|
95
95
|
"tags": [],
|
|
96
|
-
"text": "Defines the icon `name` inside of the component.\n<span className=\"
|
|
96
|
+
"text": "Defines the icon `name` inside of the component.\n<span className=\"banner banner-sm banner-info\">If not set the icon will not show up.</span>\nTo learn which icons are available, please visit our <a href=\"/?path=/docs/5704bdc4-c5b5-45e6-b123-c54d01fce2f1--docs\">icon library</a>."
|
|
97
97
|
},
|
|
98
98
|
"attribute": "icon",
|
|
99
99
|
"reflect": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{cursor:pointer}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
/**
|
|
4
|
+
* @slot toggled - Slot for content displayed when the button is in the "on" state.
|
|
5
|
+
* @slot untoggled - Slot for content displayed when the button is in the "off" state.
|
|
6
|
+
*/
|
|
7
|
+
export class PostTogglebutton {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.handleClick = () => {
|
|
10
|
+
this.toggled = !this.toggled;
|
|
11
|
+
};
|
|
12
|
+
this.handleKeydown = (event) => {
|
|
13
|
+
if (event.key === 'Enter') {
|
|
14
|
+
this.toggled = !this.toggled;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
this.toggled = false;
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return (h(Host, { key: '253ca4026764e8d2c0979341a617fffb6d0d2e8e', slot: "post-togglebutton", tabindex: "0", "data-version": version, role: "button", "aria-pressed": this.toggled.toString(), onClick: this.handleClick, onKeyDown: this.handleKeydown }, h("span", { key: 'e8c7c7492986993ca1ec6c38743555030b068dbb', hidden: this.toggled }, h("slot", { key: 'd012a64cf1da8acc149ad4c5929cfe3fa31619a3', name: "untoggled" })), h("span", { key: '6603b12b05870348e979a9283ac4a17f15a217c6', hidden: !this.toggled }, h("slot", { key: '1306cb988d645ca297fb32d8b743ae65abfe644b', name: "toggled" }))));
|
|
21
|
+
}
|
|
22
|
+
static get is() { return "post-togglebutton"; }
|
|
23
|
+
static get encapsulation() { return "shadow"; }
|
|
24
|
+
static get originalStyleUrls() {
|
|
25
|
+
return {
|
|
26
|
+
"$": ["post-togglebutton.scss"]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static get styleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["post-togglebutton.css"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get properties() {
|
|
35
|
+
return {
|
|
36
|
+
"toggled": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"mutable": true,
|
|
39
|
+
"complexType": {
|
|
40
|
+
"original": "boolean",
|
|
41
|
+
"resolved": "boolean",
|
|
42
|
+
"references": {}
|
|
43
|
+
},
|
|
44
|
+
"required": false,
|
|
45
|
+
"optional": false,
|
|
46
|
+
"docs": {
|
|
47
|
+
"tags": [],
|
|
48
|
+
"text": "If `true`, the button is in the \"on\" state, otherwise it is in the \"off\" state."
|
|
49
|
+
},
|
|
50
|
+
"attribute": "toggled",
|
|
51
|
+
"reflect": true,
|
|
52
|
+
"defaultValue": "false"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|