@swisspost/design-system-components 9.0.0-next.6 → 9.0.0-next.8
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-e1f32cce.js +8 -0
- package/dist/cjs/index.cjs.js +25 -21
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-81d89808.js → package-a2b895fc.js} +1 -1
- package/dist/cjs/{post-accordion-7d2805f4.js → post-accordion-3ce01432.js} +2 -2
- package/dist/cjs/post-accordion-item-81601b1e.js +62 -0
- 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-0b87e44f.js → post-avatar-b1c97f51.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/post-back-to-top-0ce98569.js +98 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +14 -0
- package/dist/cjs/{post-banner-e42f02bd.js → post-banner-8611eab5.js} +4 -4
- package/dist/cjs/post-banner.cjs.entry.js +2 -2
- package/dist/cjs/{post-breadcrumb-item-46a8e876.js → post-breadcrumb-item-2075462a.js} +2 -2
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/post-card-control-acd30573.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-ae50d0d4.js → post-collapsible-trigger-8ca4d85b.js} +2 -2
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-language-option-c6049337.js → post-language-option-cf32d0ed.js} +2 -2
- package/dist/cjs/post-language-option.cjs.entry.js +2 -2
- package/dist/cjs/{post-megadropdown-trigger-97472602.js → post-megadropdown-trigger-7376d867.js} +32 -37
- package/dist/cjs/{post-menu-61c31423.js → post-menu-a3b7b63b.js} +2 -2
- package/dist/cjs/{post-menu-item-4f393cde.js → post-menu-item-28ab1a72.js} +2 -2
- package/dist/cjs/post-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-trigger-44a5f8e9.js → post-menu-trigger-821839f5.js} +2 -2
- package/dist/cjs/post-menu-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-menu.cjs.entry.js +2 -2
- package/dist/cjs/{post-popover-44fdb733.js → post-popover-c4f50134.js} +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-4d5e7c8e.js → post-rating-3a87ca46.js} +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-3fcb40fa.js → post-tab-header-5fdb05a1.js} +2 -2
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-b1a41181.js → post-tab-panel-34aed8e6.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-092790e4.js → post-tabs-dd2da5d2.js} +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-389a43f7.js → post-tag-59232922.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/post-togglebutton-59c6357b.js +28 -0
- package/dist/cjs/post-togglebutton.cjs.entry.js +11 -0
- package/dist/cjs/{post-tooltip-c42d6853.js → post-tooltip-3e0c1509.js} +28 -16
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +17 -5
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +107 -0
- package/dist/collection/components/post-banner/post-banner.js +3 -3
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- 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 +1 -1
- 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 +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.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- 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 -0
- package/dist/components/index.js +2 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +26 -9
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/post-back-to-top.d.ts +11 -0
- package/dist/components/post-back-to-top.js +6 -0
- package/dist/components/post-back-to-top2.js +123 -0
- package/dist/components/post-banner2.js +3 -3
- package/dist/components/post-breadcrumb-item2.js +1 -1
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-popover2.js +1 -1
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +1 -1
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +1 -1
- 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 +126 -1
- package/dist/esm/index-e1b64755.js +8 -0
- package/dist/esm/index.js +23 -21
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-9cafe148.js +3 -0
- package/dist/esm/{post-accordion-c833c272.js → post-accordion-19e88941.js} +2 -2
- package/dist/esm/post-accordion-item-33bbe4de.js +60 -0
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-avatar-f43ebc89.js → post-avatar-d15a9f9e.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/post-back-to-top-bcf46150.js +96 -0
- package/dist/esm/post-back-to-top.entry.js +6 -0
- package/dist/esm/{post-banner-cf6f756b.js → post-banner-bf5e6a18.js} +4 -4
- package/dist/esm/post-banner.entry.js +2 -2
- package/dist/esm/{post-breadcrumb-item-a93b91a7.js → post-breadcrumb-item-e3b41f74.js} +2 -2
- package/dist/esm/post-breadcrumb-item.entry.js +2 -2
- package/dist/esm/post-card-control-f0788f6f.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-7b3d0fd3.js → post-collapsible-trigger-1d939eb6.js} +2 -2
- package/dist/esm/post-collapsible_2.entry.js +2 -2
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-language-option-05f53f6f.js → post-language-option-1436370d.js} +2 -2
- package/dist/esm/post-language-option.entry.js +2 -2
- package/dist/esm/{post-megadropdown-trigger-3112a42b.js → post-megadropdown-trigger-210b4ab3.js} +32 -37
- package/dist/esm/{post-menu-05396ff7.js → post-menu-e853e28b.js} +2 -2
- package/dist/esm/{post-menu-item-bbbb6a7e.js → post-menu-item-86d4c7ab.js} +2 -2
- package/dist/esm/post-menu-item.entry.js +2 -2
- package/dist/esm/{post-menu-trigger-f9f4d299.js → post-menu-trigger-80c2bdf4.js} +2 -2
- package/dist/esm/post-menu-trigger.entry.js +2 -2
- package/dist/esm/post-menu.entry.js +2 -2
- package/dist/esm/{post-popover-1ae328eb.js → post-popover-7195d05a.js} +2 -2
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-75171e3a.js → post-rating-8baf86fe.js} +2 -2
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-d4d40b0e.js → post-tab-header-a1d1d9d0.js} +2 -2
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-79b42d3e.js → post-tab-panel-afce8d40.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-4d880ed8.js → post-tabs-fbb42496.js} +2 -2
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-bf91d0a7.js → post-tag-d67b6a19.js} +2 -2
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/post-togglebutton-c3fb912d.js +26 -0
- package/dist/esm/post-togglebutton.entry.js +3 -0
- package/dist/esm/{post-tooltip-7aa14f94.js → post-tooltip-7101ed24.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-314c1090.js → p-00fa0152.js} +1 -1
- package/dist/post-components/p-1667387e.entry.js +1 -0
- package/dist/post-components/p-19551c18.entry.js +1 -0
- package/dist/post-components/p-1b627f80.js +1 -0
- package/dist/post-components/p-24673919.js +1 -0
- package/dist/post-components/p-266b734f.entry.js +1 -0
- package/dist/post-components/{p-cf298c46.js → p-282115c4.js} +1 -1
- package/dist/post-components/p-2d0ffc1e.entry.js +1 -0
- package/dist/post-components/p-45018d7e.entry.js +1 -0
- package/dist/post-components/{p-4ac02dc1.js → p-485dafcf.js} +1 -1
- package/dist/post-components/{p-c6ac2e45.js → p-4a647a78.js} +1 -1
- package/dist/post-components/p-4abfa65b.js +1 -0
- package/dist/post-components/{p-3b3b57d0.entry.js → p-517f2b1f.entry.js} +1 -1
- package/dist/post-components/p-55224ee7.entry.js +1 -0
- package/dist/post-components/{p-4cb59994.js → p-558a9849.js} +1 -1
- package/dist/post-components/{p-4221fd16.js → p-59b31557.js} +1 -1
- package/dist/post-components/p-5d1db85c.entry.js +1 -0
- package/dist/post-components/{p-7a887455.js → p-61e79941.js} +1 -1
- package/dist/post-components/p-679978de.entry.js +1 -0
- package/dist/post-components/p-6a842b96.entry.js +1 -0
- package/dist/post-components/{p-4cca12fe.js → p-6cea23cd.js} +3 -3
- package/dist/post-components/p-71f03424.js +1 -0
- package/dist/post-components/p-8c2568c1.entry.js +1 -0
- package/dist/post-components/p-8fd3a3cb.entry.js +1 -0
- package/dist/post-components/{p-71eb2dc7.js → p-939f2ba7.js} +1 -1
- package/dist/post-components/p-a4c39296.entry.js +1 -0
- package/dist/post-components/p-af5d3b89.entry.js +1 -0
- package/dist/post-components/p-b4423249.entry.js +1 -0
- package/dist/post-components/{p-7175208c.entry.js → p-c31a7d65.entry.js} +1 -1
- package/dist/post-components/p-c544bb82.js +1 -0
- package/dist/post-components/{p-cd06fab9.js → p-ccb6dfa1.js} +1 -1
- package/dist/post-components/{p-d7c37aca.js → p-d0b8820a.js} +1 -1
- package/dist/post-components/{p-476a6342.js → p-d36adfb5.js} +1 -1
- package/dist/post-components/p-da6a8268.entry.js +1 -0
- package/dist/post-components/p-ece14d88.js +1 -0
- package/dist/post-components/p-f0f8427e.js +1 -0
- package/dist/post-components/p-f2e1b4d8.js +1 -0
- package/dist/post-components/p-f627744e.js +1 -0
- package/dist/post-components/p-f7b6b96a.entry.js +1 -0
- package/dist/post-components/p-f812e93d.entry.js +1 -0
- package/dist/post-components/{p-9d94bf34.js → p-f8d41c32.js} +1 -1
- package/dist/post-components/p-fe516cdf.entry.js +1 -0
- package/dist/post-components/p-fe7467fb.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/slide.d.ts +2 -0
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +5 -1
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
- package/dist/types/components/post-icon/post-icon.d.ts +2 -5
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +13 -0
- package/dist/types/components.d.ts +42 -0
- package/dist/types/index.d.ts +2 -0
- package/loaders/index.d.ts +4 -0
- package/loaders/index.js +2 -0
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +26 -9
- package/loaders/post-accordion.js +1 -1
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +126 -0
- package/loaders/post-banner.js +3 -3
- package/loaders/post-breadcrumb-item.js +1 -1
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-closebutton.js +1 -1
- package/loaders/post-collapsible2.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/loaders/post-menu.js +1 -1
- package/loaders/post-popover.js +1 -1
- package/loaders/post-popovercontainer2.js +2 -2
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +1 -1
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +1 -1
- 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 +4 -3
- package/dist/cjs/post-accordion-item-0d8b65b1.js +0 -52
- package/dist/cjs/post-card-control-7d3c5545.js +0 -272
- package/dist/esm/package-c65b0409.js +0 -3
- package/dist/esm/post-accordion-item-19fb4776.js +0 -50
- package/dist/esm/post-card-control-017fb9b2.js +0 -270
- package/dist/post-components/p-34e5b9da.entry.js +0 -1
- package/dist/post-components/p-3899ed87.js +0 -1
- package/dist/post-components/p-470eb29c.js +0 -1
- package/dist/post-components/p-499f3c12.entry.js +0 -1
- package/dist/post-components/p-56bd7eb7.entry.js +0 -1
- package/dist/post-components/p-61b27b51.entry.js +0 -1
- package/dist/post-components/p-6e37b9bf.entry.js +0 -1
- package/dist/post-components/p-7391daa3.entry.js +0 -1
- package/dist/post-components/p-73a5b344.js +0 -1
- package/dist/post-components/p-7a995b7e.entry.js +0 -1
- package/dist/post-components/p-888ab913.entry.js +0 -1
- package/dist/post-components/p-8927a8e4.entry.js +0 -1
- package/dist/post-components/p-8fb11b22.entry.js +0 -1
- package/dist/post-components/p-916ec6d5.entry.js +0 -1
- package/dist/post-components/p-98d8ba01.js +0 -1
- package/dist/post-components/p-a1a1b679.entry.js +0 -1
- package/dist/post-components/p-a87d8337.entry.js +0 -1
- package/dist/post-components/p-ab0556af.entry.js +0 -1
- package/dist/post-components/p-b8d230eb.js +0 -1
- package/dist/post-components/p-c94a2ae1.entry.js +0 -1
- package/dist/post-components/p-d2938e9a.entry.js +0 -1
- package/dist/post-components/p-d6ac46af.js +0 -1
- package/dist/post-components/p-dddc70f6.entry.js +0 -1
- package/dist/post-components/p-ed12b51d.js +0 -1
|
@@ -49,7 +49,7 @@ export class PostCollapsible {
|
|
|
49
49
|
triggers.forEach(trigger => trigger.update());
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: '5b3622ee79d02725071a6d7a2d9f72d0d5305619', "data-version": version }, h("slot", { key: '9db4642e4e5b4867c7880964070ee5d774455fd2' })));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "post-collapsible"; }
|
|
55
55
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: 'a09985740ff01e4f38e7bbe5e0b9012d77e7cba2', version: version }, h("div", { key: 'c612b90e757d916036bee002d7bba8abfeb19073', class: "global-header" }, h("div", { key: 'd11c51f756d1c7a8c0b4f3b9625cfbe8cae88435', class: "global-sub" }, h("div", { key: '43fb63bfe0350ffca0e44fd611bb6bbe6c3eef0c', class: "logo" }, h("slot", { key: '8d90d7f20b0fd6a7cbc93e5dd95ad8200c027822', name: "post-logo" }))), h("div", { key: 'b1bc83b4fcb3a0af6ffd99976af4acf454b3d29d', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: 'bbe38f3e0d070bfd84e1656e7dd631816df0101c', name: "meta-navigation" }), h("slot", { key: 'b1483eea11ecdc9cddf122077cf0746d88f69239', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '785f557f30bffc5cd282a0505e9ffc7e3e6e1029', name: "post-language-switch" }), h("div", { key: 'f088ddb3df417929525b22a09fa3be113042e48f', onClick: () => this.handleMobileMenuToggle(), class: "mobile-toggle" }, h("slot", { key: 'de65884a443290e057ed911289818d5a323f5a9c', name: "post-togglebutton" })))), h("div", { key: '56ebdec46003a6ead4f3710dc9c0f60e9a86ed8d', class: "title-header d-flex space-between align-center" }, h("slot", { key: '8e61e4711ea8018e51fd11c5b5faa30a1ad9445c', name: "title" }), h("div", { key: '4d762d1f4d3f45470d52af167c7f4a71651e7970', class: "global-sub" }, h("slot", { key: 'c8c5b73b1fa0e665a7133ae8db0212ef8948ba29', name: "local-controls" }), h("slot", { key: '212640155af85dfab34182ab236bfe72456e77b1' }))), h("div", { key: 'c4004d443fd546fac8a2651482725fae99c2db6c', class: mainNavClasses.join(' ') }, h("slot", { key: '783787f85d25d9e42d96213ae77f6c689f872b70', name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: '04cfd7d09d03ab85ac9c12f9c3d6cb31fbb65fc2', name: "meta-navigation" })), (this.device === 'mobile' || this.device === 'tablet') && (h("slot", { key: '117e76f18fdc93493115428e1cd0d6a119c7a652', 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: '1a04eea6f1039329937a9f58d64778c272088018', "data-version": version }, h("svg", { key: '843d95a54a58f839bfa1031d2aa834c70fbc6f9e', style: this.getStyles() }, h("use", { key: 'e93c6a6fd50ebd4757c92c1ee02f9c8cd65a65b7', 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: '0a80e062fecb20c7277b89f49a4d774fda80a18e', "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"; }
|
|
@@ -25,7 +25,7 @@ export class PostList {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '017f05c43fa95bb93c856bbeddd5d26cbc2f4cfa', "data-version": version }, h("div", { key: '71fd7d32c761cecf7b4d5d5f39cedb3bf668a0cb', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: 'fe0e03d5d25f6a975e04be00549facae49a0970b' })), h("div", { key: 'bb717e4338396c86fa28dbf8236f5f185823f9be', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '7fd25cab433f5fbbafaa7ca01f42774823cbf579', 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: 'bbf12424f2997b7d2e7cd9e272def0bf2838f94f', role: "listitem" }, h("slot", { key: '2ce4e71879485f16ad90dfddbd1b79512107bdb0' })));
|
|
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: 'ec5f82baaa08c75a03808a6cda7a9971152a54d6', "data-version": version, slot: "post-logo" }, h(LogoTag, Object.assign({ key: 'ce6aeff4dfab0612376e4c6aa14c74c438213b5d', class: "logo" }, (logoLink ? { href: logoLink } : {})), h("span", { key: 'fa6f8ecaf3c3a4a8e60a8c8e2171dbd25d585ede', class: "description" }, h("slot", { key: '2dcff76129e8e054e58244b2aa77a5b51e059b6b', onSlotchange: () => this.checkDescription() })), h("svg", { key: '468282e3c21fb6cfc97fccee64298abe43542da5', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: 'd3f4e0a6a7372991ccef5be9fad206cab2f553e7', id: "Logo" }, h("rect", { key: '3f17ddd240131ce23faf1e73a76ca4f702b029d7', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: '1b714023d9e587a57571fd86a9515701ec77f993', 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: 'b4064875cbad1263ac2278613fdf5db8d1697c2a', 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: '7179d087e93ab9e14dc21e16b52beaf965c53cd3', slot: "post-mainnavigation" }, h("div", { key: '2aede886c29972bf1dfebbe4513c4acf2e47c6ea', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '4697ec520be78fccee832a358b349f68081b2f54', name: "back-button" })), h("nav", { key: '5bae57025152af07b9d68a19a07b61d0149d31dc', class: "main-navigation" }, h("slot", { key: 'e2a73a4b814a39a7cb1f7733f87c3c588f484006' }))));
|
|
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: '9b8e17f4120259f55ed3dbce4780559cb8876540', slot: "post-mainnavigation" }, h("post-popovercontainer", { key: 'ac48d1fffbcdff5aa20d9f2f6fed9beb4dd3be23', placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: 'af02d9fd35973b6d889b639f1d856dd3d9921ae1', class: "megadropdown" }, h("div", { key: '445aa9b1a04e63c0d2b17466c610a30662f3db0e', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '8d8f4cad3d5860fdfc1c615e7122ab5dd2ca5ed3', name: "back-button" })), h("slot", { key: 'c9ba8c0941f86fd29a44153e186cd679bcd678f5' })))));
|
|
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: 'd139b405fe28c7334c01eec4846a6f8b5bf1e261', slot: "post-megadropdown-trigger" }, h("button", { key: 'd3aee53488359a79764974d440d7a058d5d96873', "aria-expanded": this.toggled, onClick: () => this.handleClick() }, h("slot", { key: '7012055defbb7c8058481db5c4129919847010c6' }))));
|
|
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: 'c3fa319c92cc36b562590df18b6585b1bc18f133', "data-version": version }, h("post-popovercontainer", { key: '7d297b7598fecb01f46c3f1b999b6017ee878d06', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '3ae32950348ae8910094cddd34afef060ca517f1', class: "popover-container" }, h("slot", { key: '7faa98f2f4c50ef1ac424387a6c3890dcf09adce' })))));
|
|
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: '8e20fdee0faff826319440bed6ec7be0c56e6d06', role: "menuitem", "data-version": version }, h("slot", { key: '69e2be9dec334ade8e84ccb268c7d4955dd2fefb' })));
|
|
6
6
|
}
|
|
7
7
|
static get is() { return "post-menu-item"; }
|
|
8
8
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,7 +55,7 @@ export class PostMenuTrigger {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: 'd6b5619d0b4035887eaffdcc3c153eb0a5fe4ceb', "data-version": version, "tab-index": "-1" }, h("slot", { key: '5d87c80dae6188470b10207993822d92adc714b1' })));
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "post-menu-trigger"; }
|
|
61
61
|
static get originalStyleUrls() {
|
|
@@ -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: 'e73d0edf5c6992db8c8c6e162a9c50e95a335d79', "data-version": version }, h("post-popovercontainer", { key: '206cbec19db4af9772899c1ec4cc870c362f590e', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '8d744d6784d892313b137ee03dd9967ea4b77184', class: "popover-container" }, h("div", { key: 'aa78aee830e853945f0049d0708710f8fad90d36', class: "popover-content" }, h("slot", { key: '50a5aeae0c0db36e5c0aa2495f3d95474bed13fc' })), h("button", { key: '4389f79f9e1b2a0977a0ecb177b385f049cc8484', class: "btn-close", onClick: () => this.hide() }, h("span", { key: 'e302e17cef666fc280a547ebc3caeedacdc544b0', 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: 'b8be8594adfd503c47f85872508d5bbd3473cc5a', "data-version": version }, this.arrow && (h("span", { key: 'f046737966eb3b801af1e888555178543ea015eb', class: "arrow", ref: el => {
|
|
141
141
|
this.arrowRef = el;
|
|
142
|
-
} })), h("slot", { key: '
|
|
142
|
+
} })), h("slot", { key: '5d478472a83442d47e4f16ff8121782c8e6a524b' })));
|
|
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: '98459f7f5e2406577857571fb6ececd8198a4cdb', "data-version": version }, h("div", { key: '2880d40e1623e49c8cae64b70e0057713f5f5cfd', 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),
|
|
@@ -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: 'af78e7b118f13ce64c76947af5dc3a6ed5ed09a0', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '99a8257992b974f9c3503eb1f67652c50bbf0671' })));
|
|
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: 'b4d8a6dac8662fc442ba4b75c7f89bb630b1a0ad', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '3253ed0b5efe32b0c49fc97e46de31ee3dbbd813' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "post-tab-panel"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '8e6ef1f64dd41d18cbb87d23ae27ed198dba420f', "data-version": version }, h("div", { key: '3e08dbfa502935737040e54f71c5cdba55838ac5', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '57c2c50ec3ca3ee38a69f3c46f0bd6cfb3649178', class: "tabs", role: "tablist" }, h("slot", { key: 'c7ce48bec67f02abf47fa2d152a786f2f7f912fe', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'daf2d7e9d51ad3831a68ed8cd6498d9042bc017f', class: "tab-content", part: "content" }, h("slot", { key: 'ee2c3619a2c262a416b34b65843f10e4baa62e38', 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: 'e2d95e10853f66d7b05768b80a0350e0bc05051d', "data-version": version }, h("div", { key: '72bac44cca9c4197e9042e6a4896f235d057a5c9', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '1b54b8a89320306aa09fe1e50dffd453b44fc587', class: "tag-text" }, h("slot", { key: '52f4f5b2d62f8ae245c7b472cdbc9f5202b554c1' })))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "post-tag"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '82fc4126d97650255d1d5fd041208b3d11cf0ded', slot: "post-togglebutton", tabindex: "0", "data-version": version, role: "button", "aria-pressed": this.toggled.toString(), onClick: this.handleClick, onKeyDown: this.handleKeydown }, h("span", { key: '0364e8b63cc2c7955282f62533683c3627aa6626', hidden: this.toggled }, h("slot", { key: '11ccb62855497ddf395276e7f7e88a8409fa36e4', name: "untoggled" })), h("span", { key: '463f4571ceecc51063a4d4495d22063b6b75d0df', hidden: !this.toggled }, h("slot", { key: '7d41e35a64deefd22087524bc57530603aae18fa', 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
|
+
}
|
|
@@ -3,7 +3,7 @@ import { version } from "../../../../package";
|
|
|
3
3
|
import isFocusable from "ally.js/is/focusable";
|
|
4
4
|
import "long-press-event";
|
|
5
5
|
import { getAttributeObserver } from "../../utils/attribute-observer";
|
|
6
|
-
import { checkEmptyOrType
|
|
6
|
+
import { checkEmptyOrType } from "../../utils/index";
|
|
7
7
|
const OPEN_DELAY = 650; // matches HTML title delay
|
|
8
8
|
/**
|
|
9
9
|
* @slot default - Slot for the content of the tooltip.
|
|
@@ -15,6 +15,8 @@ let tooltipInstances = 0;
|
|
|
15
15
|
let hideTooltipTimeout = null;
|
|
16
16
|
const tooltipTargetAttribute = 'data-tooltip-target';
|
|
17
17
|
const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
|
|
18
|
+
let globalCurrentTarget;
|
|
19
|
+
let tooltipTimeout = null;
|
|
18
20
|
/**
|
|
19
21
|
* Global event listener to show tooltips. This is globalized so that triggers that are rendered
|
|
20
22
|
* async will still work without the need to set listeners on the element itself
|
|
@@ -27,8 +29,11 @@ const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
|
|
|
27
29
|
*/
|
|
28
30
|
const globalInterestHandler = (e) => {
|
|
29
31
|
const targetElement = e.target.closest(tooltipTargetAttributeSelector);
|
|
30
|
-
|
|
32
|
+
globalCurrentTarget = targetElement;
|
|
33
|
+
if (!targetElement || !('getAttribute' in targetElement)) {
|
|
34
|
+
clearTimeout(tooltipTimeout);
|
|
31
35
|
return;
|
|
36
|
+
}
|
|
32
37
|
const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
|
|
33
38
|
if (!tooltipTarget || tooltipTarget === '')
|
|
34
39
|
return;
|
|
@@ -152,18 +157,29 @@ export class PostTooltip {
|
|
|
152
157
|
* @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
|
|
153
158
|
*/
|
|
154
159
|
async show(target, triggeredByFocus = false) {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const showTooltip = () => {
|
|
161
|
+
// If focus or pointer event is not on the button anymore, don't show the tooltip
|
|
162
|
+
if (globalCurrentTarget !== target)
|
|
163
|
+
return;
|
|
164
|
+
// Determine if the tooltip was opened by a focus event
|
|
165
|
+
this.wasOpenedByFocus = triggeredByFocus;
|
|
166
|
+
// Disable pointer events if triggered by focus, otherwise enable them
|
|
167
|
+
if (this.wasOpenedByFocus) {
|
|
168
|
+
this.host.style.pointerEvents = 'none';
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.host.style.pointerEvents = 'auto';
|
|
172
|
+
}
|
|
173
|
+
this.popoverRef.show(target);
|
|
174
|
+
};
|
|
175
|
+
if (this.delayed) {
|
|
176
|
+
tooltipTimeout = setTimeout(() => {
|
|
177
|
+
showTooltip();
|
|
178
|
+
}, OPEN_DELAY);
|
|
162
179
|
}
|
|
163
180
|
else {
|
|
164
|
-
|
|
181
|
+
showTooltip();
|
|
165
182
|
}
|
|
166
|
-
this.popoverRef.show(target);
|
|
167
183
|
}
|
|
168
184
|
/**
|
|
169
185
|
* Programmatically hide this tooltip
|
|
@@ -198,7 +214,7 @@ export class PostTooltip {
|
|
|
198
214
|
}
|
|
199
215
|
render() {
|
|
200
216
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
201
|
-
return (h(Host, { key: '
|
|
217
|
+
return (h(Host, { key: 'accf9ab04bcac0d6ed46818dc00e9110f936e593', "data-version": version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'e31610624b6833e78de7cb6ec52fb3fc5ca02d49', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '206925925cc51d3b0eb4f2c0b1e8ca65ab3fd8c4' }))));
|
|
202
218
|
}
|
|
203
219
|
static get is() { return "post-tooltip"; }
|
|
204
220
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Export every single component so it gets included in the dist output
|
|
2
2
|
export { PostAccordion } from './components/post-accordion/post-accordion';
|
|
3
3
|
export { PostAccordionItem } from './components/post-accordion-item/post-accordion-item';
|
|
4
|
+
export { PostBackToTop } from './components/post-back-to-top/post-back-to-top';
|
|
4
5
|
export { PostBanner } from './components/post-banner/post-banner';
|
|
5
6
|
export { PostBreadcrumbItem } from './components/post-breadcrumb-item/post-breadcrumb-item';
|
|
6
7
|
export { PostAvatar } from './components/post-avatar/post-avatar';
|
|
@@ -22,6 +23,7 @@ export { PostTabHeader } from './components/post-tab-header/post-tab-header';
|
|
|
22
23
|
export { PostTabPanel } from './components/post-tab-panel/post-tab-panel';
|
|
23
24
|
export { PostTooltip } from './components/post-tooltip/post-tooltip';
|
|
24
25
|
export { PostTag } from './components/post-tag/post-tag';
|
|
26
|
+
export { PostTogglebutton } from './components/post-togglebutton/post-togglebutton';
|
|
25
27
|
export { PostList } from './components/post-list/post-list';
|
|
26
28
|
export { PostListItem } from './components/post-list-item/post-list-item';
|
|
27
29
|
export { PostHeader } from './components/post-header/post-header';
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { P as PostAccordion } from './post-accordion2.js';
|
|
3
3
|
export { P as PostAccordionItem } from './post-accordion-item2.js';
|
|
4
|
+
export { P as PostBackToTop } from './post-back-to-top2.js';
|
|
4
5
|
export { P as PostBanner } from './post-banner2.js';
|
|
5
6
|
export { P as PostBreadcrumbItem } from './post-breadcrumb-item2.js';
|
|
6
7
|
export { P as PostAvatar } from './post-avatar2.js';
|
|
@@ -22,6 +23,7 @@ export { P as PostTabHeader } from './post-tab-header2.js';
|
|
|
22
23
|
export { P as PostTabPanel } from './post-tab-panel2.js';
|
|
23
24
|
export { P as PostTooltip } from './post-tooltip2.js';
|
|
24
25
|
export { P as PostTag } from './post-tag2.js';
|
|
26
|
+
export { P as PostTogglebutton } from './post-togglebutton2.js';
|
|
25
27
|
export { P as PostList } from './post-list2.js';
|
|
26
28
|
export { P as PostListItem } from './post-list-item2.js';
|
|
27
29
|
export { P as PostHeader } from './post-header2.js';
|