@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
|
@@ -4,7 +4,7 @@ import { v as version } from './package.js';
|
|
|
4
4
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
5
5
|
import { c as checkType } from './check-type.js';
|
|
6
6
|
|
|
7
|
-
const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}
|
|
7
|
+
const postIconCss = ":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)}}";
|
|
8
8
|
const PostIconStyle0 = postIconCss;
|
|
9
9
|
|
|
10
10
|
const CDN_URL = 'https://unpkg.com/@swisspost/design-system-icons/public/post-icons';
|
|
@@ -22,8 +22,6 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
22
22
|
super();
|
|
23
23
|
this.__registerHost();
|
|
24
24
|
this.__attachShadow();
|
|
25
|
-
this.svgStyles = undefined;
|
|
26
|
-
this.svgOutput = undefined;
|
|
27
25
|
this.animation = null;
|
|
28
26
|
this.base = null;
|
|
29
27
|
this.flipH = false;
|
|
@@ -55,6 +53,25 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
55
53
|
validateScale(newValue = this.scale) {
|
|
56
54
|
checkEmptyOrType(newValue, 'number', 'The post-icon "scale" prop should be a number.');
|
|
57
55
|
}
|
|
56
|
+
getPath() {
|
|
57
|
+
var _a, _b, _c, _d, _e, _f;
|
|
58
|
+
// Construct icon path from different possible sources
|
|
59
|
+
const metaBase = (_b = (_a = document.head
|
|
60
|
+
.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;
|
|
61
|
+
const baseHref = (_c = document.getElementsByTagName('base')[0]) === null || _c === void 0 ? void 0 : _c.href;
|
|
62
|
+
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(/\/\/$/, '/');
|
|
63
|
+
const fileName = `${this.name}.svg#i-${this.name}`;
|
|
64
|
+
const filePath = `${fileBase}${fileName}`;
|
|
65
|
+
return new URL(filePath, window.location.origin).toString();
|
|
66
|
+
}
|
|
67
|
+
getStyles() {
|
|
68
|
+
return Object.entries({
|
|
69
|
+
transform: (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
70
|
+
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
71
|
+
})
|
|
72
|
+
.filter(([_key, value]) => value !== null)
|
|
73
|
+
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
74
|
+
}
|
|
58
75
|
componentDidLoad() {
|
|
59
76
|
this.validateBase();
|
|
60
77
|
this.validateName();
|
|
@@ -64,30 +81,8 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
64
81
|
this.validateRotate();
|
|
65
82
|
this.validateAnimation();
|
|
66
83
|
}
|
|
67
|
-
componentWillRender() {
|
|
68
|
-
this.setPath();
|
|
69
|
-
}
|
|
70
|
-
setPath() {
|
|
71
|
-
var _a, _b, _c, _d;
|
|
72
|
-
// Construct icon path from different possible sources
|
|
73
|
-
const metaBase = (_b = (_a = document.head
|
|
74
|
-
.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;
|
|
75
|
-
const fileBase = `${(_d = (_c = this.base) !== null && _c !== void 0 ? _c : metaBase) !== null && _d !== void 0 ? _d : CDN_URL}/`.replace(/\/\/$/, '/');
|
|
76
|
-
const fileName = `${this.name}.svg`;
|
|
77
|
-
const filePath = `${fileBase}${fileName}`;
|
|
78
|
-
this.path = new URL(filePath, window.location.origin).toString();
|
|
79
|
-
}
|
|
80
84
|
render() {
|
|
81
|
-
|
|
82
|
-
const svgStyles = Object.entries({
|
|
83
|
-
'-webkit-mask-image': `url('${this.path}')`,
|
|
84
|
-
'mask-image': `url('${this.path}')`,
|
|
85
|
-
'transform': (this.scale && !isNaN(Number(this.scale)) ? 'scale(' + this.scale + ')' : '') +
|
|
86
|
-
(this.rotate && !isNaN(Number(this.rotate)) ? ' rotate(' + this.rotate + 'deg)' : ''),
|
|
87
|
-
})
|
|
88
|
-
.filter(([_key, value]) => value !== null)
|
|
89
|
-
.reduce((styles, [key, value]) => Object.assign(styles, { [key]: value }), {});
|
|
90
|
-
return (h(Host, { key: '86c61ac92270e1b46ef63e2bb0ff4683a16ca794', "data-version": version }, h("span", { key: 'ad856363b96d303912c9085d9d45cb911cbedfc6', style: svgStyles })));
|
|
85
|
+
return (h(Host, { key: '1a04eea6f1039329937a9f58d64778c272088018', "data-version": version }, h("svg", { key: '843d95a54a58f839bfa1031d2aa834c70fbc6f9e', style: this.getStyles() }, h("use", { key: 'e93c6a6fd50ebd4757c92c1ee02f9c8cd65a65b7', href: this.getPath() }))));
|
|
91
86
|
}
|
|
92
87
|
get host() { return this; }
|
|
93
88
|
static get watchers() { return {
|
|
@@ -107,9 +102,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends HTMLEle
|
|
|
107
102
|
"flipV": [4, "flip-v"],
|
|
108
103
|
"name": [1],
|
|
109
104
|
"rotate": [2],
|
|
110
|
-
"scale": [2]
|
|
111
|
-
"svgStyles": [32],
|
|
112
|
-
"svgOutput": [32]
|
|
105
|
+
"scale": [2]
|
|
113
106
|
}, undefined, {
|
|
114
107
|
"animation": ["validateAnimation"],
|
|
115
108
|
"base": ["validateBase"],
|
|
@@ -53,7 +53,7 @@ const PostLanguageOption = /*@__PURE__*/ proxyCustomElement(class PostLanguageOp
|
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
55
|
const lang = this.code.toLowerCase();
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
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)))));
|
|
57
57
|
}
|
|
58
58
|
get host() { return this; }
|
|
59
59
|
static get watchers() { return {
|
|
@@ -13,7 +13,7 @@ const PostListItem = /*@__PURE__*/ proxyCustomElement(class PostListItem extends
|
|
|
13
13
|
this.host.setAttribute('slot', 'post-list-item');
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'bbf12424f2997b7d2e7cd9e272def0bf2838f94f', role: "listitem" }, h("slot", { key: '2ce4e71879485f16ad90dfddbd1b79512107bdb0' })));
|
|
17
17
|
}
|
|
18
18
|
get host() { return this; }
|
|
19
19
|
static get style() { return PostListItemStyle0; }
|
|
@@ -27,7 +27,7 @@ const PostList = /*@__PURE__*/ proxyCustomElement(class PostList extends HTMLEle
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
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" }))));
|
|
31
31
|
}
|
|
32
32
|
get host() { return this; }
|
|
33
33
|
static get style() { return PostListStyle0; }
|
|
@@ -27,7 +27,7 @@ const PostLogo = /*@__PURE__*/ proxyCustomElement(class PostLogo extends HTMLEle
|
|
|
27
27
|
render() {
|
|
28
28
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
29
29
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
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" }))))));
|
|
31
31
|
}
|
|
32
32
|
get host() { return this; }
|
|
33
33
|
static get watchers() { return {
|
|
@@ -27,7 +27,7 @@ const PostMainnavigation = /*@__PURE__*/ proxyCustomElement(class PostMainnaviga
|
|
|
27
27
|
this.postToggle.emit();
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
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' }))));
|
|
31
31
|
}
|
|
32
32
|
static get style() { return PostMainnavigationStyle0; }
|
|
33
33
|
}, [4, "post-mainnavigation", undefined, [[0, "postToggle", "handleMegadropdownToggled"]]]);
|
|
@@ -16,7 +16,7 @@ const PostMegadropdownTrigger = /*@__PURE__*/ proxyCustomElement(class PostMegad
|
|
|
16
16
|
this.postToggle.emit();
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'd139b405fe28c7334c01eec4846a6f8b5bf1e261', slot: "post-megadropdown-trigger" }, h("button", { key: 'd3aee53488359a79764974d440d7a058d5d96873', "aria-expanded": this.toggled, onClick: () => this.handleClick() }, h("slot", { key: '7012055defbb7c8058481db5c4129919847010c6' }))));
|
|
20
20
|
}
|
|
21
21
|
static get style() { return PostMegadropdownTriggerStyle0; }
|
|
22
22
|
}, [1, "post-megadropdown-trigger", {
|
|
@@ -37,7 +37,7 @@ const PostMegadropdown = /*@__PURE__*/ proxyCustomElement(class PostMegadropdown
|
|
|
37
37
|
this.hide();
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
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' })))));
|
|
41
41
|
}
|
|
42
42
|
static get style() { return PostMegadropdownStyle0; }
|
|
43
43
|
}, [4, "post-megadropdown", {
|
|
@@ -11,7 +11,7 @@ const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
|
11
11
|
this.__attachShadow();
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '8e20fdee0faff826319440bed6ec7be0c56e6d06', role: "menuitem", "data-version": version }, h("slot", { key: '69e2be9dec334ade8e84ccb268c7d4955dd2fefb' })));
|
|
15
15
|
}
|
|
16
16
|
get host() { return this; }
|
|
17
17
|
static get style() { return PostMenuItemStyle0; }
|
|
@@ -62,7 +62,7 @@ const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger e
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
render() {
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'd6b5619d0b4035887eaffdcc3c153eb0a5fe4ceb', "data-version": version, "tab-index": "-1" }, h("slot", { key: '5d87c80dae6188470b10207993822d92adc714b1' })));
|
|
66
66
|
}
|
|
67
67
|
get host() { return this; }
|
|
68
68
|
static get watchers() { return {
|
|
@@ -168,7 +168,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
168
168
|
return menuItems;
|
|
169
169
|
}
|
|
170
170
|
render() {
|
|
171
|
-
return (h(Host, { key: '
|
|
171
|
+
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' })))));
|
|
172
172
|
}
|
|
173
173
|
get host() { return this; }
|
|
174
174
|
static get style() { return PostMenuStyle0; }
|
|
@@ -96,7 +96,7 @@ const PostPopover = /*@__PURE__*/ proxyCustomElement(class PostPopover extends H
|
|
|
96
96
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
99
|
+
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))))));
|
|
100
100
|
}
|
|
101
101
|
get host() { return this; }
|
|
102
102
|
static get style() { return PostPopoverStyle0; }
|
|
@@ -2176,9 +2176,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
2178
|
render() {
|
|
2179
|
-
return (h(Host, { key: '
|
|
2179
|
+
return (h(Host, { key: 'b8be8594adfd503c47f85872508d5bbd3473cc5a', "data-version": version }, this.arrow && (h("span", { key: 'f046737966eb3b801af1e888555178543ea015eb', class: "arrow", ref: el => {
|
|
2180
2180
|
this.arrowRef = el;
|
|
2181
|
-
} })), h("slot", { key: '
|
|
2181
|
+
} })), h("slot", { key: '5d478472a83442d47e4f16ff8121782c8e6a524b' })));
|
|
2182
2182
|
}
|
|
2183
2183
|
get host() { return this; }
|
|
2184
2184
|
static get style() { return PostPopovercontainerStyle0; }
|
|
@@ -74,7 +74,7 @@ const PostRating = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTM
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
77
|
+
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: {
|
|
78
78
|
'star': true,
|
|
79
79
|
'before-hover': i < this.hoveredIndex,
|
|
80
80
|
'active': i < Math.round(this.currentRating),
|
|
@@ -20,7 +20,7 @@ const PostTabHeader = /*@__PURE__*/ proxyCustomElement(class PostTabHeader exten
|
|
|
20
20
|
this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
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' })));
|
|
24
24
|
}
|
|
25
25
|
get host() { return this; }
|
|
26
26
|
static get watchers() { return {
|
|
@@ -17,7 +17,7 @@ const PostTabPanel = /*@__PURE__*/ proxyCustomElement(class PostTabPanel extends
|
|
|
17
17
|
this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'b4d8a6dac8662fc442ba4b75c7f89bb630b1a0ad', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '3253ed0b5efe32b0c49fc97e46de31ee3dbbd813' })));
|
|
21
21
|
}
|
|
22
22
|
get host() { return this; }
|
|
23
23
|
static get style() { return PostTabPanelStyle0; }
|
|
@@ -164,7 +164,7 @@ const PostTabs = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLEle
|
|
|
164
164
|
nextTab.focus();
|
|
165
165
|
}
|
|
166
166
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
167
|
+
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() }))));
|
|
168
168
|
}
|
|
169
169
|
get host() { return this; }
|
|
170
170
|
static get style() { return PostTabsStyle0; }
|
|
@@ -35,7 +35,7 @@ const PostTag = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEleme
|
|
|
35
35
|
this.setClasses();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
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' })))));
|
|
39
39
|
}
|
|
40
40
|
get host() { return this; }
|
|
41
41
|
static get watchers() { return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostTogglebutton extends Components.PostTogglebutton, HTMLElement {}
|
|
4
|
+
export const PostTogglebutton: {
|
|
5
|
+
prototype: PostTogglebutton;
|
|
6
|
+
new (): PostTogglebutton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
|
|
4
|
+
const postTogglebuttonCss = ":host{cursor:pointer}";
|
|
5
|
+
const PostTogglebuttonStyle0 = postTogglebuttonCss;
|
|
6
|
+
|
|
7
|
+
const PostTogglebutton = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
this.handleClick = () => {
|
|
13
|
+
this.toggled = !this.toggled;
|
|
14
|
+
};
|
|
15
|
+
this.handleKeydown = (event) => {
|
|
16
|
+
if (event.key === 'Enter') {
|
|
17
|
+
this.toggled = !this.toggled;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
this.toggled = false;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
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" }))));
|
|
24
|
+
}
|
|
25
|
+
static get style() { return PostTogglebuttonStyle0; }
|
|
26
|
+
}, [1, "post-togglebutton", {
|
|
27
|
+
"toggled": [1540]
|
|
28
|
+
}]);
|
|
29
|
+
function defineCustomElement() {
|
|
30
|
+
if (typeof customElements === "undefined") {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const components = ["post-togglebutton"];
|
|
34
|
+
components.forEach(tagName => { switch (tagName) {
|
|
35
|
+
case "post-togglebutton":
|
|
36
|
+
if (!customElements.get(tagName)) {
|
|
37
|
+
customElements.define(tagName, PostTogglebutton);
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
} });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { PostTogglebutton as P, defineCustomElement as d };
|
|
@@ -4,10 +4,6 @@ import { g as getAttributeObserver } from './attribute-observer.js';
|
|
|
4
4
|
import { d as checkEmptyOrType } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
6
6
|
|
|
7
|
-
function timeout(delay) {
|
|
8
|
-
return new Promise(resolve => setTimeout(resolve, delay));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
12
8
|
|
|
13
9
|
function getDefaultExportFromCjs (x) {
|
|
@@ -4791,6 +4787,8 @@ let tooltipInstances = 0;
|
|
|
4791
4787
|
let hideTooltipTimeout = null;
|
|
4792
4788
|
const tooltipTargetAttribute = 'data-tooltip-target';
|
|
4793
4789
|
const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
|
|
4790
|
+
let globalCurrentTarget;
|
|
4791
|
+
let tooltipTimeout = null;
|
|
4794
4792
|
/**
|
|
4795
4793
|
* Global event listener to show tooltips. This is globalized so that triggers that are rendered
|
|
4796
4794
|
* async will still work without the need to set listeners on the element itself
|
|
@@ -4803,8 +4801,11 @@ const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
|
|
|
4803
4801
|
*/
|
|
4804
4802
|
const globalInterestHandler = (e) => {
|
|
4805
4803
|
const targetElement = e.target.closest(tooltipTargetAttributeSelector);
|
|
4806
|
-
|
|
4804
|
+
globalCurrentTarget = targetElement;
|
|
4805
|
+
if (!targetElement || !('getAttribute' in targetElement)) {
|
|
4806
|
+
clearTimeout(tooltipTimeout);
|
|
4807
4807
|
return;
|
|
4808
|
+
}
|
|
4808
4809
|
const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
|
|
4809
4810
|
if (!tooltipTarget || tooltipTarget === '')
|
|
4810
4811
|
return;
|
|
@@ -4931,18 +4932,29 @@ const PostTooltip = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends H
|
|
|
4931
4932
|
* @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
|
|
4932
4933
|
*/
|
|
4933
4934
|
async show(target, triggeredByFocus = false) {
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4935
|
+
const showTooltip = () => {
|
|
4936
|
+
// If focus or pointer event is not on the button anymore, don't show the tooltip
|
|
4937
|
+
if (globalCurrentTarget !== target)
|
|
4938
|
+
return;
|
|
4939
|
+
// Determine if the tooltip was opened by a focus event
|
|
4940
|
+
this.wasOpenedByFocus = triggeredByFocus;
|
|
4941
|
+
// Disable pointer events if triggered by focus, otherwise enable them
|
|
4942
|
+
if (this.wasOpenedByFocus) {
|
|
4943
|
+
this.host.style.pointerEvents = 'none';
|
|
4944
|
+
}
|
|
4945
|
+
else {
|
|
4946
|
+
this.host.style.pointerEvents = 'auto';
|
|
4947
|
+
}
|
|
4948
|
+
this.popoverRef.show(target);
|
|
4949
|
+
};
|
|
4950
|
+
if (this.delayed) {
|
|
4951
|
+
tooltipTimeout = setTimeout(() => {
|
|
4952
|
+
showTooltip();
|
|
4953
|
+
}, OPEN_DELAY);
|
|
4941
4954
|
}
|
|
4942
4955
|
else {
|
|
4943
|
-
|
|
4956
|
+
showTooltip();
|
|
4944
4957
|
}
|
|
4945
|
-
this.popoverRef.show(target);
|
|
4946
4958
|
}
|
|
4947
4959
|
/**
|
|
4948
4960
|
* Programmatically hide this tooltip
|
|
@@ -4977,7 +4989,7 @@ const PostTooltip = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends H
|
|
|
4977
4989
|
}
|
|
4978
4990
|
render() {
|
|
4979
4991
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4980
|
-
return (h(Host, { key: '
|
|
4992
|
+
return (h(Host, { key: 'accf9ab04bcac0d6ed46818dc00e9110f936e593', "data-version": version$1, 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' }))));
|
|
4981
4993
|
}
|
|
4982
4994
|
get host() { return this; }
|
|
4983
4995
|
static get watchers() { return {
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2024-
|
|
2
|
+
"timestamp": "2024-12-09T15:52:20",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.19.2",
|
|
@@ -198,6 +198,10 @@
|
|
|
198
198
|
"readme": "# post-accordion-item\n\n\n",
|
|
199
199
|
"docs": "",
|
|
200
200
|
"docsTags": [
|
|
201
|
+
{
|
|
202
|
+
"name": "slot",
|
|
203
|
+
"text": "logo - Slot for the placing a logo before the header."
|
|
204
|
+
},
|
|
201
205
|
{
|
|
202
206
|
"name": "slot",
|
|
203
207
|
"text": "header - Slot for placing custom content within the accordion item's header."
|
|
@@ -339,6 +343,10 @@
|
|
|
339
343
|
{
|
|
340
344
|
"name": "header",
|
|
341
345
|
"docs": "Slot for placing custom content within the accordion item's header."
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "logo",
|
|
349
|
+
"docs": "Slot for the placing a logo before the header."
|
|
342
350
|
}
|
|
343
351
|
],
|
|
344
352
|
"parts": [
|
|
@@ -350,11 +358,13 @@
|
|
|
350
358
|
"dependents": [],
|
|
351
359
|
"dependencies": [
|
|
352
360
|
"post-collapsible-trigger",
|
|
361
|
+
"post-icon",
|
|
353
362
|
"post-collapsible"
|
|
354
363
|
],
|
|
355
364
|
"dependencyGraph": {
|
|
356
365
|
"post-accordion-item": [
|
|
357
366
|
"post-collapsible-trigger",
|
|
367
|
+
"post-icon",
|
|
358
368
|
"post-collapsible"
|
|
359
369
|
]
|
|
360
370
|
}
|
|
@@ -473,6 +483,53 @@
|
|
|
473
483
|
"dependencies": [],
|
|
474
484
|
"dependencyGraph": {}
|
|
475
485
|
},
|
|
486
|
+
{
|
|
487
|
+
"filePath": "src/components/post-back-to-top/post-back-to-top.tsx",
|
|
488
|
+
"encapsulation": "shadow",
|
|
489
|
+
"tag": "post-back-to-top",
|
|
490
|
+
"readme": "# post-back-to-top\n\n\n",
|
|
491
|
+
"docs": "",
|
|
492
|
+
"docsTags": [],
|
|
493
|
+
"usage": {},
|
|
494
|
+
"props": [
|
|
495
|
+
{
|
|
496
|
+
"name": "label",
|
|
497
|
+
"type": "string",
|
|
498
|
+
"complexType": {
|
|
499
|
+
"original": "string",
|
|
500
|
+
"resolved": "string",
|
|
501
|
+
"references": {}
|
|
502
|
+
},
|
|
503
|
+
"mutable": false,
|
|
504
|
+
"attr": "label",
|
|
505
|
+
"reflectToAttr": false,
|
|
506
|
+
"docs": "The label of the back-to-top button, intended solely for accessibility purposes.\nThis label is always hidden from view.",
|
|
507
|
+
"docsTags": [],
|
|
508
|
+
"values": [
|
|
509
|
+
{
|
|
510
|
+
"type": "string"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"optional": false,
|
|
514
|
+
"required": true
|
|
515
|
+
}
|
|
516
|
+
],
|
|
517
|
+
"methods": [],
|
|
518
|
+
"events": [],
|
|
519
|
+
"listeners": [],
|
|
520
|
+
"styles": [],
|
|
521
|
+
"slots": [],
|
|
522
|
+
"parts": [],
|
|
523
|
+
"dependents": [],
|
|
524
|
+
"dependencies": [
|
|
525
|
+
"post-icon"
|
|
526
|
+
],
|
|
527
|
+
"dependencyGraph": {
|
|
528
|
+
"post-back-to-top": [
|
|
529
|
+
"post-icon"
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
},
|
|
476
533
|
{
|
|
477
534
|
"filePath": "src/components/post-banner/post-banner.tsx",
|
|
478
535
|
"encapsulation": "shadow",
|
|
@@ -1504,6 +1561,8 @@
|
|
|
1504
1561
|
"slots": [],
|
|
1505
1562
|
"parts": [],
|
|
1506
1563
|
"dependents": [
|
|
1564
|
+
"post-accordion-item",
|
|
1565
|
+
"post-back-to-top",
|
|
1507
1566
|
"post-banner",
|
|
1508
1567
|
"post-breadcrumb-item",
|
|
1509
1568
|
"post-card-control",
|
|
@@ -1513,6 +1572,12 @@
|
|
|
1513
1572
|
],
|
|
1514
1573
|
"dependencies": [],
|
|
1515
1574
|
"dependencyGraph": {
|
|
1575
|
+
"post-accordion-item": [
|
|
1576
|
+
"post-icon"
|
|
1577
|
+
],
|
|
1578
|
+
"post-back-to-top": [
|
|
1579
|
+
"post-icon"
|
|
1580
|
+
],
|
|
1516
1581
|
"post-banner": [
|
|
1517
1582
|
"post-icon"
|
|
1518
1583
|
],
|
|
@@ -3449,6 +3514,66 @@
|
|
|
3449
3514
|
]
|
|
3450
3515
|
}
|
|
3451
3516
|
},
|
|
3517
|
+
{
|
|
3518
|
+
"filePath": "src/components/post-togglebutton/post-togglebutton.tsx",
|
|
3519
|
+
"encapsulation": "shadow",
|
|
3520
|
+
"tag": "post-togglebutton",
|
|
3521
|
+
"readme": "# post-togglebutton\n\n\n",
|
|
3522
|
+
"docs": "",
|
|
3523
|
+
"docsTags": [
|
|
3524
|
+
{
|
|
3525
|
+
"name": "slot",
|
|
3526
|
+
"text": "toggled - Slot for content displayed when the button is in the \"on\" state."
|
|
3527
|
+
},
|
|
3528
|
+
{
|
|
3529
|
+
"name": "slot",
|
|
3530
|
+
"text": "untoggled - Slot for content displayed when the button is in the \"off\" state."
|
|
3531
|
+
}
|
|
3532
|
+
],
|
|
3533
|
+
"usage": {},
|
|
3534
|
+
"props": [
|
|
3535
|
+
{
|
|
3536
|
+
"name": "toggled",
|
|
3537
|
+
"type": "boolean",
|
|
3538
|
+
"complexType": {
|
|
3539
|
+
"original": "boolean",
|
|
3540
|
+
"resolved": "boolean",
|
|
3541
|
+
"references": {}
|
|
3542
|
+
},
|
|
3543
|
+
"mutable": true,
|
|
3544
|
+
"attr": "toggled",
|
|
3545
|
+
"reflectToAttr": true,
|
|
3546
|
+
"docs": "If `true`, the button is in the \"on\" state, otherwise it is in the \"off\" state.",
|
|
3547
|
+
"docsTags": [],
|
|
3548
|
+
"default": "false",
|
|
3549
|
+
"values": [
|
|
3550
|
+
{
|
|
3551
|
+
"type": "boolean"
|
|
3552
|
+
}
|
|
3553
|
+
],
|
|
3554
|
+
"optional": false,
|
|
3555
|
+
"required": false
|
|
3556
|
+
}
|
|
3557
|
+
],
|
|
3558
|
+
"methods": [],
|
|
3559
|
+
"events": [],
|
|
3560
|
+
"listeners": [],
|
|
3561
|
+
"styles": [],
|
|
3562
|
+
"slots": [
|
|
3563
|
+
{
|
|
3564
|
+
"name": "toggled",
|
|
3565
|
+
"docs": "Slot for content displayed when the button is in the \"on\" state."
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
"name": "untoggled",
|
|
3569
|
+
"docs": "Slot for content displayed when the button is in the \"off\" state."
|
|
3570
|
+
}
|
|
3571
|
+
],
|
|
3572
|
+
"parts": [],
|
|
3573
|
+
"dependents": [],
|
|
3574
|
+
"dependencies": [],
|
|
3575
|
+
"dependencyGraph": {}
|
|
3576
|
+
},
|
|
3452
3577
|
{
|
|
3453
3578
|
"filePath": "src/components/post-tooltip/post-tooltip.tsx",
|
|
3454
3579
|
"encapsulation": "shadow",
|