@swisspost/design-system-components 9.0.1 → 10.0.0-next.38
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/.config/bindings.angular.js +4 -0
- package/dist/cjs/breakpoints-cdf1b747.js +59 -0
- package/dist/cjs/check-non-empty-bd99d236.js +15 -0
- package/dist/cjs/check-one-of-75d270b5.js +13 -0
- package/dist/cjs/check-type-cdbf6d29.js +21 -0
- package/dist/cjs/check-url-220a286c.js +19 -0
- package/dist/cjs/event-guard-efabc84f.js +47 -0
- package/dist/cjs/fade-72d5ef55.js +14 -0
- package/dist/cjs/get-root-8102fecd.js +17 -0
- package/dist/cjs/index-23e36ff7.js +37 -0
- package/dist/cjs/{index-e1f32cce.js → index-b60129c4.js} +35 -15
- package/dist/cjs/index.browser-4af21c17.js +16 -0
- package/dist/cjs/index.cjs.js +57 -28
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/long-press-event-6e62d113.js +266 -0
- package/dist/cjs/{package-93f142ae.js → package-3e61e6f3.js} +1 -1
- package/dist/cjs/{post-accordion-60af96cf.js → post-accordion-e54524be.js} +11 -12
- package/dist/cjs/post-accordion-item-86f11a16.js +64 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +10 -6
- package/dist/cjs/post-accordion.cjs.entry.js +6 -4
- package/dist/cjs/post-avatar-22bfd12e.js +145 -0
- package/dist/cjs/post-avatar.cjs.entry.js +14 -0
- package/dist/cjs/post-back-to-top-f682ea05.js +96 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +16 -0
- package/dist/cjs/post-banner-5c749a94.js +92 -0
- package/dist/cjs/post-banner.cjs.entry.js +20 -0
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +18 -0
- package/dist/cjs/post-breadcrumbs-76f55ae5.js +120 -0
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-161a7102.js +269 -0
- package/dist/cjs/post-card-control.cjs.entry.js +6 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +36 -0
- package/dist/cjs/{post-collapsible-trigger-3de8fe4e.js → post-collapsible-trigger-6cdf4481.js} +62 -76
- package/dist/cjs/post-collapsible_2.cjs.entry.js +11 -7
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-15d78645.js +38 -0
- package/dist/cjs/post-footer.cjs.entry.js +12 -0
- package/dist/cjs/post-linkarea-095d1928.js +30 -0
- package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-387e079b.js +68 -0
- package/dist/cjs/post-popover-388c8091.js +135 -0
- package/dist/cjs/post-popover.cjs.entry.js +4 -3
- package/dist/cjs/{post-rating-21f9c46d.js → post-rating-246e4d89.js} +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-0e9d0e06.js +34 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +6 -4
- package/dist/cjs/{post-tab-panel-dd58f425.js → post-tab-panel-f952714f.js} +5 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-83191b9a.js → post-tabs-97c30d81.js} +14 -16
- package/dist/cjs/post-tabs.cjs.entry.js +5 -4
- package/dist/cjs/post-tag-58003cf0.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/post-togglebutton-87c984d8.js +4494 -0
- package/dist/cjs/{post-tooltip-782f020b.js → post-tooltip-28e7711a.js} +10 -6
- package/dist/cjs/{post-tooltip-trigger-b2aeb636.js → post-tooltip-trigger-cbc53d14.js} +17 -280
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +5 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -4
- package/dist/cjs/slide-cd1f09b3.js +28 -0
- package/dist/collection/animations/collapse.js +8 -6
- package/dist/collection/animations/fade.js +6 -2
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +22 -3
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +8 -10
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +30 -16
- package/dist/collection/components/post-avatar/post-avatar.css +1 -0
- package/dist/collection/components/post-avatar/post-avatar.js +233 -0
- 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 +127 -0
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +1 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +44 -72
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +96 -0
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -0
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +160 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -31
- package/dist/collection/components/post-card-control/post-card-control.js +20 -24
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -0
- package/dist/collection/components/post-closebutton/post-closebutton.js +23 -0
- package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +6 -3
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +43 -45
- package/dist/collection/components/post-footer/post-footer.css +1 -0
- package/dist/collection/components/post-footer/post-footer.js +75 -0
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +320 -0
- package/dist/collection/components/post-icon/post-icon.js +58 -55
- package/dist/collection/components/post-language-option/post-language-option.css +1 -0
- package/dist/collection/components/post-language-option/post-language-option.js +237 -0
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
- package/dist/collection/components/post-language-switch/post-language-switch.js +186 -0
- package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
- package/dist/collection/components/post-linkarea/post-linkarea.js +30 -0
- package/dist/collection/components/post-list/post-list.css +1 -0
- package/dist/collection/components/post-list/post-list.js +88 -0
- package/dist/collection/components/post-list-item/post-list-item.css +1 -0
- package/dist/collection/components/post-list-item/post-list-item.js +26 -0
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- package/dist/collection/components/post-logo/post-logo.js +2 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +184 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +275 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +133 -0
- package/dist/collection/components/post-menu/post-menu.css +1 -0
- package/dist/collection/components/post-menu/post-menu.js +294 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +120 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -31
- package/dist/collection/components/post-popover/post-popover.js +16 -13
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -31
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +39 -6
- package/dist/collection/components/post-rating/post-rating.css +1 -31
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -31
- package/dist/collection/components/post-tab-header/post-tab-header.js +6 -5
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -3
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +7 -15
- package/dist/collection/components/post-tag/post-tag.css +1 -31
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +74 -0
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +6 -3
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +14 -14
- package/dist/collection/index.js +21 -2
- package/dist/collection/utils/attribute-observer.js +6 -5
- package/dist/collection/utils/breakpoints.js +52 -0
- package/dist/collection/utils/component-on-ready.js +4 -4
- package/dist/collection/utils/debounce.js +2 -1
- package/dist/collection/utils/environment.js +2 -0
- package/dist/collection/utils/event-guard.js +43 -0
- package/dist/collection/utils/get-focusable-children.js +33 -0
- package/dist/collection/utils/get-root.js +6 -1
- package/dist/collection/utils/index.js +5 -0
- package/dist/collection/utils/is-motion-reduced.js +2 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
- package/dist/collection/utils/property-checkers/check-one-of.js +8 -3
- package/dist/collection/utils/property-checkers/check-pattern.js +8 -3
- package/dist/collection/utils/property-checkers/check-type.js +11 -6
- package/dist/collection/utils/property-checkers/check-url.js +11 -6
- package/dist/collection/utils/property-checkers/empty-or.js +5 -2
- package/dist/collection/utils/sass-export.js +8 -5
- package/dist/components/breakpoints.js +56 -0
- package/dist/components/check-non-empty.js +6 -2
- package/dist/components/check-one-of.js +8 -3
- package/dist/components/check-type.js +11 -6
- package/dist/components/event-guard.js +45 -0
- package/dist/components/fade.js +6 -2
- package/dist/components/get-focusable-children.js +35 -0
- package/dist/components/get-root.js +15 -0
- package/dist/components/index.browser.js +14 -0
- package/dist/components/index.js +21 -2
- package/dist/components/index2.js +25 -12
- package/dist/components/long-press-event.js +264 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +37 -18
- package/dist/components/post-accordion2.js +8 -9
- package/dist/components/post-avatar.d.ts +11 -0
- package/dist/components/post-avatar.js +6 -0
- package/dist/components/post-avatar2.js +170 -0
- 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 +121 -0
- package/dist/components/post-banner.d.ts +11 -0
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +127 -0
- package/dist/components/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/post-breadcrumb-item.js +6 -0
- package/dist/components/post-breadcrumb-item2.js +82 -0
- package/dist/components/post-breadcrumbs.d.ts +11 -0
- package/dist/components/post-breadcrumbs.js +6 -0
- package/dist/components/post-breadcrumbs2.js +177 -0
- package/dist/components/post-card-control2.js +16 -19
- package/dist/components/post-closebutton.d.ts +11 -0
- package/dist/components/post-closebutton.js +6 -0
- package/dist/components/post-closebutton2.js +39 -0
- package/dist/components/post-collapsible-trigger2.js +47 -64
- package/dist/components/post-collapsible2.js +17 -12
- package/dist/components/post-footer.d.ts +11 -0
- package/dist/components/post-footer.js +6 -0
- package/dist/components/post-footer2.js +78 -0
- package/dist/components/post-header.d.ts +11 -0
- package/dist/components/post-header.js +6 -0
- package/dist/components/post-header2.js +399 -0
- package/dist/components/post-icon2.js +59 -55
- package/dist/components/post-language-option.d.ts +11 -0
- package/dist/components/post-language-option.js +6 -0
- package/dist/components/post-language-option2.js +103 -0
- package/dist/components/post-language-switch.d.ts +11 -0
- package/dist/components/post-language-switch.js +6 -0
- package/dist/components/post-language-switch2.js +145 -0
- package/dist/components/post-linkarea.d.ts +11 -0
- package/dist/components/post-linkarea.js +6 -0
- package/dist/components/post-linkarea2.js +43 -0
- package/dist/components/post-list-item.d.ts +11 -0
- package/dist/components/post-list-item.js +6 -0
- package/dist/components/post-list-item2.js +36 -0
- package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/dist/components/post-list.js +6 -0
- package/dist/components/post-list2.js +54 -0
- package/dist/components/post-logo2.js +4 -3
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +183 -0
- package/dist/components/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/post-megadropdown-trigger.js +6 -0
- package/dist/components/post-megadropdown-trigger2.js +121 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +190 -0
- package/dist/components/post-menu-item.d.ts +11 -0
- package/dist/components/post-menu-item.js +6 -0
- package/dist/components/post-menu-item2.js +27 -0
- package/dist/components/post-menu-trigger.d.ts +11 -0
- package/dist/components/post-menu-trigger.js +6 -0
- package/dist/components/post-menu-trigger2.js +109 -0
- package/dist/components/post-menu.d.ts +11 -0
- package/dist/components/post-menu.js +6 -0
- package/dist/components/post-menu2.js +192 -0
- package/dist/components/post-popover2.js +20 -16
- package/dist/components/post-popovercontainer2.js +788 -73
- package/dist/components/post-rating2.js +2 -2
- package/dist/components/post-tab-header2.js +8 -6
- package/dist/components/post-tab-panel2.js +4 -3
- package/dist/components/post-tabs2.js +11 -13
- package/dist/components/post-tag2.js +2 -2
- package/dist/components/post-togglebutton.d.ts +11 -0
- package/dist/components/post-togglebutton.js +6 -0
- package/dist/components/post-togglebutton2.js +62 -0
- package/dist/components/post-tooltip-trigger2.js +14 -277
- package/dist/components/post-tooltip2.js +7 -3
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +1977 -287
- package/dist/esm/breakpoints-7812702e.js +56 -0
- package/dist/esm/check-non-empty-258a56b3.js +13 -0
- package/dist/esm/check-one-of-0bee20f5.js +11 -0
- package/dist/esm/check-type-37d5d307.js +19 -0
- package/dist/esm/check-url-17962bc8.js +17 -0
- package/dist/esm/event-guard-538ee077.js +45 -0
- package/dist/esm/fade-1f3cacf4.js +11 -0
- package/dist/esm/get-root-1b1af46f.js +15 -0
- package/dist/esm/index-8f8fe5b0.js +32 -0
- package/dist/esm/{index-e1b64755.js → index-f4d19816.js} +35 -15
- package/dist/esm/index.browser-ff103197.js +14 -0
- package/dist/esm/index.js +33 -23
- package/dist/esm/loader.js +3 -3
- package/dist/esm/long-press-event-04d24397.js +264 -0
- package/dist/esm/package-33ac2576.js +3 -0
- package/dist/esm/{post-accordion-bcfe7e61.js → post-accordion-03796d13.js} +11 -12
- package/dist/esm/post-accordion-item-d29c49e5.js +62 -0
- package/dist/esm/post-accordion-item.entry.js +10 -6
- package/dist/esm/post-accordion.entry.js +6 -4
- package/dist/esm/post-avatar-639dc17a.js +143 -0
- package/dist/esm/post-avatar.entry.js +6 -0
- package/dist/esm/post-back-to-top-8099279e.js +94 -0
- package/dist/esm/post-back-to-top.entry.js +8 -0
- package/dist/esm/post-banner-54834fbf.js +90 -0
- package/dist/esm/post-banner.entry.js +12 -0
- package/dist/esm/post-breadcrumb-item_2.entry.js +9 -0
- package/dist/esm/post-breadcrumbs-caf56014.js +118 -0
- package/dist/esm/post-breadcrumbs.entry.js +5 -0
- package/dist/esm/post-card-control-b063586b.js +267 -0
- package/dist/esm/post-card-control.entry.js +6 -5
- package/dist/esm/post-closebutton_15.entry.js +14 -0
- package/dist/esm/{post-collapsible-trigger-3168178e.js → post-collapsible-trigger-727bcde1.js} +62 -76
- package/dist/esm/post-collapsible_2.entry.js +11 -7
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-16f1a8de.js +36 -0
- package/dist/esm/post-footer.entry.js +4 -0
- package/dist/esm/post-linkarea-4e4228fb.js +28 -0
- package/dist/esm/post-linkarea.entry.js +3 -0
- package/dist/esm/post-menu-item-e9dd8173.js +65 -0
- package/dist/esm/post-popover-46ede6b5.js +133 -0
- package/dist/esm/post-popover.entry.js +4 -3
- package/dist/esm/{post-rating-0fd5de37.js → post-rating-8d0d970b.js} +4 -4
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-8224c7c2.js +32 -0
- package/dist/esm/post-tab-header.entry.js +6 -4
- package/dist/esm/{post-tab-panel-6b1219e0.js → post-tab-panel-dfdeccd3.js} +5 -4
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-b8ff3c5d.js → post-tabs-fabd0569.js} +14 -16
- package/dist/esm/post-tabs.entry.js +5 -4
- package/dist/esm/post-tag-13994238.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/post-togglebutton-87967c5b.js +4478 -0
- package/dist/esm/{post-tooltip-aa745743.js → post-tooltip-eecaa4c7.js} +10 -6
- package/dist/esm/{post-tooltip-trigger-ce0b4106.js → post-tooltip-trigger-642cbb22.js} +17 -280
- package/dist/esm/post-tooltip-trigger.entry.js +5 -4
- package/dist/esm/post-tooltip.entry.js +5 -4
- package/dist/esm/slide-cd2850ee.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0539071d.js +1 -0
- package/dist/post-components/p-0889c759.js +1 -0
- package/dist/post-components/p-0dcd25ab.js +1 -0
- package/dist/post-components/p-181c73d5.js +1 -0
- package/dist/post-components/p-19317b15.js +8 -0
- package/dist/post-components/p-1ef9415b.js +1 -0
- package/dist/post-components/p-24d0695f.entry.js +1 -0
- package/dist/post-components/p-2e50a07d.entry.js +1 -0
- package/dist/post-components/p-30eb4d87.js +1 -0
- package/dist/post-components/p-46008c18.entry.js +1 -0
- package/dist/post-components/p-47ab2c2b.entry.js +1 -0
- package/dist/post-components/p-4c049de0.entry.js +1 -0
- package/dist/post-components/p-4c4acc32.entry.js +1 -0
- package/dist/post-components/p-5d473fcd.js +1 -0
- package/dist/post-components/p-5d539b30.js +1 -0
- package/dist/post-components/p-64e3de38.js +1 -0
- package/dist/post-components/p-6783e509.entry.js +1 -0
- package/dist/post-components/p-692ba59d.js +1 -0
- package/dist/post-components/p-6933fb57.entry.js +1 -0
- package/dist/post-components/p-6b31a76a.js +1 -0
- package/dist/post-components/p-72197a6b.js +1 -0
- package/dist/post-components/p-722ffaae.js +1 -0
- package/dist/post-components/p-7709c14a.js +1 -0
- package/dist/post-components/p-77910344.entry.js +1 -0
- package/dist/post-components/p-80e5100e.entry.js +1 -0
- package/dist/post-components/p-84fbf49c.js +1 -0
- package/dist/post-components/p-85fdc2d3.js +1 -0
- package/dist/post-components/p-8c09291c.js +1 -0
- package/dist/post-components/p-8db32dab.js +8 -0
- package/dist/post-components/p-93da1a5f.js +1 -0
- package/dist/post-components/p-9b052461.js +1 -0
- package/dist/post-components/p-9b8ee310.entry.js +1 -0
- package/dist/post-components/{p-3eab790d.js → p-9e461613.js} +2 -2
- package/dist/post-components/p-9efb84d3.entry.js +1 -0
- package/dist/post-components/p-9fbf2f82.entry.js +1 -0
- package/dist/post-components/p-a07f85ee.js +1 -0
- package/dist/post-components/p-a25019de.js +1 -0
- package/dist/post-components/p-a710ee00.js +1 -0
- package/dist/post-components/p-b94e5b4d.entry.js +1 -0
- package/dist/post-components/p-c2348d3d.js +1 -0
- package/dist/post-components/p-c65f32b0.js +1 -0
- package/dist/post-components/p-c6b03446.entry.js +1 -0
- package/dist/post-components/p-d0dfd5f9.js +1 -0
- package/dist/post-components/p-d45df336.js +1 -0
- package/dist/post-components/p-d4890d50.entry.js +1 -0
- package/dist/post-components/p-d5210531.entry.js +1 -0
- package/dist/post-components/p-dd39c542.entry.js +1 -0
- package/dist/post-components/p-df6c8a4c.js +1 -0
- package/dist/post-components/p-e068a41e.js +1 -0
- package/dist/post-components/p-e585c6fe.js +1 -0
- package/dist/post-components/p-f2c4a48d.js +1 -0
- package/dist/post-components/p-f31b9b5d.entry.js +1 -0
- package/dist/post-components/p-f58252d5.entry.js +1 -0
- package/dist/post-components/p-fda767f0.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/collapse.d.ts +2 -2
- package/dist/types/animations/fade.d.ts +2 -2
- package/dist/types/animations/slide.d.ts +2 -0
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +8 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +21 -0
- package/dist/types/components/post-banner/banner-types.d.ts +2 -0
- package/dist/types/components/post-banner/post-banner.d.ts +49 -0
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +20 -0
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +30 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +9 -9
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +9 -14
- package/dist/types/components/post-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +52 -0
- package/dist/types/components/post-icon/post-icon.d.ts +10 -6
- package/dist/types/components/post-language-option/post-language-option.d.ts +49 -0
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +39 -0
- package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
- package/dist/types/components/post-list/post-list.d.ts +24 -0
- package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +46 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +59 -0
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +33 -0
- package/dist/types/components/post-menu/post-menu.d.ts +49 -0
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +28 -0
- package/dist/types/components/post-popover/post-popover.d.ts +6 -4
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +9 -1
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
- package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
- package/dist/types/components/post-tag/post-tag.d.ts +2 -2
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -0
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +0 -1
- package/dist/types/components.d.ts +603 -50
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
- package/dist/types/index.d.ts +22 -3
- package/dist/types/popover-fn.d.ts +11 -0
- package/dist/types/utils/attribute-observer.d.ts +1 -1
- package/dist/types/utils/breakpoints.d.ts +12 -0
- package/dist/types/utils/component-on-ready.d.ts +1 -1
- package/dist/types/utils/environment.d.ts +2 -0
- package/dist/types/utils/event-guard.d.ts +4 -0
- package/dist/types/utils/get-focusable-children.d.ts +1 -0
- package/dist/types/utils/get-root.d.ts +5 -1
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
- package/dist/types/utils/property-checkers/index.d.ts +12 -4
- package/dist/types/utils/sass-export.d.ts +5 -1
- package/loaders/breakpoints.js +56 -0
- package/loaders/check-non-empty.js +6 -2
- package/loaders/check-one-of.js +8 -3
- package/loaders/check-type.js +11 -6
- package/loaders/event-guard.js +45 -0
- package/loaders/fade.js +6 -2
- package/loaders/get-focusable-children.js +35 -0
- package/loaders/get-root.js +15 -0
- package/loaders/index.browser.js +14 -0
- package/loaders/index.d.ts +40 -2
- package/loaders/index.js +22 -2
- package/loaders/index2.js +25 -12
- package/loaders/long-press-event.js +264 -0
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -82
- package/loaders/post-accordion-item2.js +103 -0
- package/loaders/post-accordion.js +8 -9
- package/loaders/post-avatar.d.ts +11 -0
- package/loaders/post-avatar.js +173 -0
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +124 -0
- package/loaders/post-banner.d.ts +11 -0
- package/loaders/post-banner.js +130 -0
- package/loaders/post-breadcrumb-item.d.ts +11 -0
- package/loaders/post-breadcrumb-item.js +6 -0
- package/loaders/post-breadcrumb-item2.js +82 -0
- package/loaders/post-breadcrumbs.d.ts +11 -0
- package/loaders/post-breadcrumbs.js +180 -0
- package/loaders/post-card-control.js +16 -19
- package/loaders/post-closebutton.d.ts +11 -0
- package/loaders/post-closebutton.js +42 -0
- package/loaders/post-collapsible-trigger2.js +47 -64
- package/loaders/post-collapsible2.js +16 -11
- package/loaders/post-footer.d.ts +11 -0
- package/loaders/post-footer.js +81 -0
- package/loaders/post-header.d.ts +11 -0
- package/loaders/post-header.js +402 -0
- package/loaders/post-icon2.js +59 -55
- package/loaders/post-language-option.d.ts +11 -0
- package/loaders/post-language-option.js +106 -0
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +148 -0
- package/loaders/post-linkarea.d.ts +11 -0
- package/loaders/post-linkarea.js +46 -0
- package/loaders/post-list-item.d.ts +11 -0
- package/loaders/post-list-item.js +39 -0
- package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/loaders/post-list.js +57 -0
- package/loaders/post-logo.js +5 -4
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +186 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +124 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +193 -0
- package/loaders/post-menu-item.d.ts +11 -0
- package/loaders/post-menu-item.js +6 -0
- package/loaders/post-menu-item2.js +27 -0
- package/loaders/post-menu-trigger.d.ts +11 -0
- package/loaders/post-menu-trigger.js +6 -0
- package/loaders/post-menu-trigger2.js +109 -0
- package/loaders/post-menu.d.ts +11 -0
- package/loaders/post-menu.js +6 -0
- package/loaders/post-menu2.js +192 -0
- package/loaders/post-popover.js +20 -16
- package/loaders/post-popovercontainer2.js +788 -73
- package/loaders/post-rating.js +2 -2
- package/loaders/post-tab-header.js +8 -6
- package/loaders/post-tab-panel.js +4 -3
- package/loaders/post-tabs.js +11 -13
- package/loaders/post-tag.js +2 -2
- package/loaders/post-togglebutton.d.ts +11 -0
- package/loaders/post-togglebutton.js +65 -0
- package/loaders/post-tooltip-trigger.js +14 -277
- package/loaders/post-tooltip.js +7 -3
- package/loaders/slide.js +25 -0
- package/package.json +45 -33
- package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
- package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
- package/dist/cjs/check-type-64af82a9.js +0 -16
- package/dist/cjs/fade-35a3633a.js +0 -10
- package/dist/cjs/index-824d2b71.js +0 -39
- package/dist/cjs/post-accordion-item-744c881d.js +0 -52
- package/dist/cjs/post-alert-2a768f58.js +0 -99
- package/dist/cjs/post-alert.cjs.entry.js +0 -17
- package/dist/cjs/post-card-control-197c8e44.js +0 -272
- package/dist/cjs/post-icon-df629079.js +0 -139
- package/dist/cjs/post-icon.cjs.entry.js +0 -16
- package/dist/cjs/post-logo-7caeb918.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -15
- package/dist/cjs/post-popover-090c3d01.js +0 -131
- package/dist/cjs/post-popovercontainer-872681bf.js +0 -2281
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-422d0f03.js +0 -32
- package/dist/cjs/post-tag-c72183f2.js +0 -47
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -35
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/check-non-empty-58bd6b17.js +0 -9
- package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
- package/dist/esm/check-type-8828dbe4.js +0 -14
- package/dist/esm/fade-7fd71785.js +0 -7
- package/dist/esm/index-69587a51.js +0 -34
- package/dist/esm/package-45827c3b.js +0 -3
- package/dist/esm/post-accordion-item-8869c90b.js +0 -50
- package/dist/esm/post-alert-21fd0068.js +0 -97
- package/dist/esm/post-alert.entry.js +0 -9
- package/dist/esm/post-card-control-60c132dc.js +0 -270
- package/dist/esm/post-icon-2e2e18ad.js +0 -137
- package/dist/esm/post-icon.entry.js +0 -8
- package/dist/esm/post-logo-f364eb72.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -7
- package/dist/esm/post-popover-697201cd.js +0 -129
- package/dist/esm/post-popovercontainer-2b5f37fb.js +0 -2279
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-c8898fa2.js +0 -30
- package/dist/esm/post-tag-83470f28.js +0 -45
- package/dist/post-components/p-08dc45bb.entry.js +0 -1
- package/dist/post-components/p-1a48d1b0.js +0 -1
- package/dist/post-components/p-2737eaf5.js +0 -1
- package/dist/post-components/p-2b61a526.entry.js +0 -1
- package/dist/post-components/p-3f5bf5d9.entry.js +0 -1
- package/dist/post-components/p-40e5bb56.entry.js +0 -1
- package/dist/post-components/p-4a3f67ab.js +0 -1
- package/dist/post-components/p-56ca6bb5.js +0 -1
- package/dist/post-components/p-58cbb854.entry.js +0 -1
- package/dist/post-components/p-5c557e64.js +0 -1
- package/dist/post-components/p-5ce2abc9.entry.js +0 -1
- package/dist/post-components/p-5f08d625.js +0 -15
- package/dist/post-components/p-611b3c41.js +0 -1
- package/dist/post-components/p-7069ac74.entry.js +0 -1
- package/dist/post-components/p-755b2746.js +0 -1
- package/dist/post-components/p-788e64fb.js +0 -1
- package/dist/post-components/p-799cf60e.js +0 -1
- package/dist/post-components/p-7bbcc8ee.js +0 -1
- package/dist/post-components/p-7cdf9571.entry.js +0 -1
- package/dist/post-components/p-7e4181ce.entry.js +0 -1
- package/dist/post-components/p-9409f729.js +0 -1
- package/dist/post-components/p-a07846ea.js +0 -1
- package/dist/post-components/p-a4560368.js +0 -1
- package/dist/post-components/p-a503cb2c.entry.js +0 -1
- package/dist/post-components/p-b095519d.js +0 -1
- package/dist/post-components/p-b46e2451.js +0 -1
- package/dist/post-components/p-b7207224.js +0 -1
- package/dist/post-components/p-bafc0491.js +0 -1
- package/dist/post-components/p-c078fd94.entry.js +0 -1
- package/dist/post-components/p-c0aebe5e.entry.js +0 -1
- package/dist/post-components/p-c7e4acde.js +0 -1
- package/dist/post-components/p-ca71a3ff.entry.js +0 -1
- package/dist/post-components/p-d582cc10.js +0 -1
- package/dist/post-components/p-e49f57c0.entry.js +0 -1
- package/dist/post-components/p-eb712f9b.entry.js +0 -1
- package/dist/post-components/p-eebd060d.js +0 -1
- package/dist/post-components/p-f7cead60.entry.js +0 -1
- package/dist/post-components/p-ffd75503.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { IS_BROWSER } from "../../utils/index";
|
|
2
3
|
import { version } from "../../../../package";
|
|
3
4
|
import { arrow, autoUpdate, computePosition, flip, inline, limitShift, offset, shift, size, } from "@floating-ui/dom";
|
|
4
5
|
// Polyfill for popovers, can be removed when https://caniuse.com/?search=popover is green
|
|
5
|
-
import "@oddbird/popover-polyfill";
|
|
6
|
+
import { apply, isSupported } from "@oddbird/popover-polyfill/dist/popover-fn.js";
|
|
6
7
|
/**
|
|
7
8
|
* @slot - Default slot for placing content inside the popovercontainer.
|
|
8
9
|
*/
|
|
@@ -12,6 +13,7 @@ export class PostPopovercontainer {
|
|
|
12
13
|
this.edgeGap = 8;
|
|
13
14
|
this.animation = null;
|
|
14
15
|
this.arrow = false;
|
|
16
|
+
this.manualClose = false;
|
|
15
17
|
this.safeSpace = undefined;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
@@ -23,8 +25,12 @@ export class PostPopovercontainer {
|
|
|
23
25
|
this.host.style.setProperty('--post-safe-space-cursor-x', `${event.clientX}px`);
|
|
24
26
|
this.host.style.setProperty('--post-safe-space-cursor-y', `${event.clientY}px`);
|
|
25
27
|
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
if (IS_BROWSER && !isSupported()) {
|
|
30
|
+
apply();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
26
33
|
componentDidLoad() {
|
|
27
|
-
this.host.setAttribute('popover', '');
|
|
28
34
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
29
35
|
}
|
|
30
36
|
disconnectedCallback() {
|
|
@@ -96,6 +102,13 @@ export class PostPopovercontainer {
|
|
|
96
102
|
startAutoupdates() {
|
|
97
103
|
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
|
|
98
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves the dynamic height of the header
|
|
107
|
+
*/
|
|
108
|
+
getHeaderHeight() {
|
|
109
|
+
const header = document.querySelector('post-header');
|
|
110
|
+
return header ? parseFloat(getComputedStyle(header).height) : 0;
|
|
111
|
+
}
|
|
99
112
|
async calculatePosition() {
|
|
100
113
|
const { x, y, middlewareData, placement } = await this.computeMainPosition();
|
|
101
114
|
const currentPlacement = placement.split('-')[0];
|
|
@@ -122,7 +135,9 @@ export class PostPopovercontainer {
|
|
|
122
135
|
async computeMainPosition() {
|
|
123
136
|
const gap = this.edgeGap;
|
|
124
137
|
const middleware = [
|
|
125
|
-
flip(
|
|
138
|
+
flip({
|
|
139
|
+
padding: this.getHeaderHeight(),
|
|
140
|
+
}),
|
|
126
141
|
inline(),
|
|
127
142
|
shift({
|
|
128
143
|
padding: gap,
|
|
@@ -210,9 +225,9 @@ export class PostPopovercontainer {
|
|
|
210
225
|
}
|
|
211
226
|
render() {
|
|
212
227
|
const animationClass = this.animation ? `animate-${this.animation}` : '';
|
|
213
|
-
return (h(Host, { key: '
|
|
228
|
+
return (h(Host, { key: '980c2d7531ef77f71ea51b069dc20bbf40cd0ac4', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '9fa08070a5e7f864aade0dc1afc2917e54693109', class: animationClass }, this.arrow && (h("span", { key: '4700f55c721387f2d918214309e87c9057e4831f', class: "arrow", ref: el => {
|
|
214
229
|
this.arrowRef = el;
|
|
215
|
-
} })), h("slot", { key: '
|
|
230
|
+
} })), h("slot", { key: 'ec5304bc77d4f3eb91c79fb2a37d096b4d43b888' }))));
|
|
216
231
|
}
|
|
217
232
|
static get is() { return "post-popovercontainer"; }
|
|
218
233
|
static get originalStyleUrls() {
|
|
@@ -237,7 +252,7 @@ export class PostPopovercontainer {
|
|
|
237
252
|
"Placement": {
|
|
238
253
|
"location": "import",
|
|
239
254
|
"path": "@floating-ui/dom",
|
|
240
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
255
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
241
256
|
}
|
|
242
257
|
}
|
|
243
258
|
},
|
|
@@ -305,6 +320,24 @@ export class PostPopovercontainer {
|
|
|
305
320
|
"reflect": false,
|
|
306
321
|
"defaultValue": "false"
|
|
307
322
|
},
|
|
323
|
+
"manualClose": {
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "boolean",
|
|
328
|
+
"resolved": "boolean",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "Whether or not the popovercontainer should close when user clicks outside of it"
|
|
336
|
+
},
|
|
337
|
+
"attribute": "manual-close",
|
|
338
|
+
"reflect": false,
|
|
339
|
+
"defaultValue": "false"
|
|
340
|
+
},
|
|
308
341
|
"safeSpace": {
|
|
309
342
|
"type": "string",
|
|
310
343
|
"mutable": false,
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}
|
|
2
|
-
* Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6
|
-
|
|
7
|
-
* The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
* Copyright (c) 2011-2020 Twitter, Inc.
|
|
10
|
-
* Copyright (c) 2011-2020 The Bootstrap Authors
|
|
11
|
-
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in
|
|
20
|
-
* all copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
|
-
* THE SOFTWARE.
|
|
29
|
-
*//*!
|
|
30
|
-
* Copyright 2021 by Swiss Post, Information Technology
|
|
31
|
-
*/:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.active{--post-rating-star-stroke: hsl(0, 0%, 20%);--post-rating-star-fill: #fc0}.rating .star.hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.after-active{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: #fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: hsl(0, 0%, 90%)}
|
|
1
|
+
@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.active{--post-rating-star-stroke: hsl(0, 0%, 20%);--post-rating-star-fill: #fc0}.rating .star.hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.after-active{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: #fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: hsl(0, 0%, 90%)}
|
|
@@ -64,7 +64,7 @@ export class PostRating {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: '4ccdf384b9a4cfc462d5d3f4a7caab659b6ba2b0', "data-version": version }, h("div", { key: '7ab53083bcdff6586b1de7f1c9e5fa546728fc6f', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
68
68
|
'star': true,
|
|
69
69
|
'before-hover': i < this.hoveredIndex,
|
|
70
70
|
'active': i < Math.round(this.currentRating),
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
.tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color
|
|
2
|
-
* Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6
|
-
|
|
7
|
-
* The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
* Copyright (c) 2011-2020 Twitter, Inc.
|
|
10
|
-
* Copyright (c) 2011-2020 The Bootstrap Authors
|
|
11
|
-
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in
|
|
20
|
-
* all copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
|
-
* THE SOFTWARE.
|
|
29
|
-
*//*!
|
|
30
|
-
* Copyright 2021 by Swiss Post, Information Technology
|
|
31
|
-
*/:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}
|
|
1
|
+
.tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
import { checkNonEmpty } from "../../utils/index";
|
|
4
|
+
import { nanoid } from "nanoid";
|
|
4
5
|
/**
|
|
5
6
|
* @slot default - Slot for the content of the tab header.
|
|
6
7
|
*/
|
|
@@ -9,14 +10,14 @@ export class PostTabHeader {
|
|
|
9
10
|
this.tabId = undefined;
|
|
10
11
|
this.panel = undefined;
|
|
11
12
|
}
|
|
12
|
-
validateFor(
|
|
13
|
-
checkNonEmpty(
|
|
13
|
+
validateFor() {
|
|
14
|
+
checkNonEmpty(this, 'panel');
|
|
14
15
|
}
|
|
15
16
|
componentWillLoad() {
|
|
16
|
-
this.tabId = `tab-${this.host.id ||
|
|
17
|
+
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
17
18
|
}
|
|
18
19
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '5046c46fa27fd6586c694420abf197b227b56520', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '78c2f660e4f2307ca95a63f4cfd90d08cc6942df' })));
|
|
20
21
|
}
|
|
21
22
|
static get is() { return "post-tab-header"; }
|
|
22
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -52,7 +53,7 @@ export class PostTabHeader {
|
|
|
52
53
|
"text": "The name of the panel controlled by the tab header."
|
|
53
54
|
},
|
|
54
55
|
"attribute": "panel",
|
|
55
|
-
"reflect":
|
|
56
|
+
"reflect": true
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
3
4
|
/**
|
|
4
5
|
* @slot default - Slot for placing the content of the tab panel.
|
|
5
6
|
*/
|
|
@@ -10,10 +11,10 @@ export class PostTabPanel {
|
|
|
10
11
|
}
|
|
11
12
|
componentWillLoad() {
|
|
12
13
|
// get the id set on the host element or use a random id by default
|
|
13
|
-
this.panelId = `panel-${this.host.id ||
|
|
14
|
+
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
14
15
|
}
|
|
15
16
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '98427b35c6637af65930b69b75ea56facf044000', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '4fa02667e8ff088c10122e010cfd7efe8ff3af57' })));
|
|
17
18
|
}
|
|
18
19
|
static get is() { return "post-tab-panel"; }
|
|
19
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,7 +45,7 @@ export class PostTabPanel {
|
|
|
44
45
|
"text": "The name of the panel, used to associate it with a tab header."
|
|
45
46
|
},
|
|
46
47
|
"attribute": "name",
|
|
47
|
-
"reflect":
|
|
48
|
+
"reflect": true
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(
|
|
1
|
+
.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(0,0,0,.02)}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}:host{display:block}
|
|
@@ -14,13 +14,12 @@ export class PostTabs {
|
|
|
14
14
|
this.activePanel = undefined;
|
|
15
15
|
}
|
|
16
16
|
get tabs() {
|
|
17
|
-
return Array.from(this.host.querySelectorAll('
|
|
17
|
+
return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
18
18
|
}
|
|
19
19
|
componentDidLoad() {
|
|
20
|
-
var _a;
|
|
21
20
|
this.moveMisplacedTabs();
|
|
22
21
|
this.enableTabs();
|
|
23
|
-
const initiallyActivePanel = this.activePanel ||
|
|
22
|
+
const initiallyActivePanel = this.activePanel || this.tabs[0]?.panel;
|
|
24
23
|
void this.show(initiallyActivePanel);
|
|
25
24
|
this.isLoaded = true;
|
|
26
25
|
}
|
|
@@ -29,9 +28,8 @@ export class PostTabs {
|
|
|
29
28
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
30
29
|
*/
|
|
31
30
|
async show(panelName) {
|
|
32
|
-
var _a;
|
|
33
31
|
// do nothing if the tab is already active
|
|
34
|
-
if (panelName ===
|
|
32
|
+
if (panelName === this.activeTab?.panel) {
|
|
35
33
|
return;
|
|
36
34
|
}
|
|
37
35
|
const previousTab = this.activeTab;
|
|
@@ -65,7 +63,6 @@ export class PostTabs {
|
|
|
65
63
|
});
|
|
66
64
|
}
|
|
67
65
|
enableTabs() {
|
|
68
|
-
var _a;
|
|
69
66
|
if (!this.tabs)
|
|
70
67
|
return;
|
|
71
68
|
this.tabs.forEach(async (tab) => {
|
|
@@ -92,7 +89,7 @@ export class PostTabs {
|
|
|
92
89
|
});
|
|
93
90
|
// if the currently active tab was removed from the DOM then select the first one
|
|
94
91
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
95
|
-
void this.show(
|
|
92
|
+
void this.show(this.tabs[0]?.panel);
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
activateTab(tab) {
|
|
@@ -144,7 +141,7 @@ export class PostTabs {
|
|
|
144
141
|
nextTab.focus();
|
|
145
142
|
}
|
|
146
143
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
144
|
+
return (h(Host, { key: 'dae24eee55a75f9b825f590883a9c1e896c1e9fc', "data-version": version }, h("div", { key: '0a26de80b8267ddc30455b0b5afbf10ae521232b', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '826cb0a4355eeb5ddc07288e1e68fc72785c095f', class: "tabs", role: "tablist" }, h("slot", { key: '94ce90bc3dc8ff4b5012fcfa3c0039b188c14002', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '462f80f3368431344910cc317f1c0f42112dc99a', class: "tab-content", part: "content" }, h("slot", { key: '57a80ac790ca75f3b62382994c21a3a3c78004cc', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
148
145
|
}
|
|
149
146
|
static get is() { return "post-tabs"; }
|
|
150
147
|
static get encapsulation() { return "shadow"; }
|
|
@@ -196,14 +193,9 @@ export class PostTabs {
|
|
|
196
193
|
"text": "An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\nThe payload is the name of the newly shown panel."
|
|
197
194
|
},
|
|
198
195
|
"complexType": {
|
|
199
|
-
"original": "
|
|
196
|
+
"original": "string",
|
|
200
197
|
"resolved": "string",
|
|
201
|
-
"references": {
|
|
202
|
-
"HTMLPostTabPanelElement": {
|
|
203
|
-
"location": "global",
|
|
204
|
-
"id": "global::HTMLPostTabPanelElement"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
198
|
+
"references": {}
|
|
207
199
|
}
|
|
208
200
|
}];
|
|
209
201
|
}
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}
|
|
2
|
-
* Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6
|
-
|
|
7
|
-
* The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
* Copyright (c) 2011-2020 Twitter, Inc.
|
|
10
|
-
* Copyright (c) 2011-2020 The Bootstrap Authors
|
|
11
|
-
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in
|
|
20
|
-
* all copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
|
-
* THE SOFTWARE.
|
|
29
|
-
*//*!
|
|
30
|
-
* Copyright 2021 by Swiss Post, Information Technology
|
|
31
|
-
*/.tag,.tag:where(:has(:not(pre))){--post-tag-bg: hsl(0, 0%, 90%);--post-tag-fg: #000;display:inline-flex;align-items:center;gap:.25rem;padding:0 .5rem;max-width:100%;background-color:var(--post-tag-bg);border:1px solid rgba(0,0,0,0);border-radius:.25rem;font-size:1rem;line-height:1.875rem;white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:1.5rem}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg: #fff;--post-tag-fg: #000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg: #fc0;--post-tag-fg: #000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg: #2c871d;--post-tag-fg: #fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg: #f49e00;--post-tag-fg: #000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg: #a51728;--post-tag-fg: #fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg: #cce4ee;--post-tag-fg: #000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}
|
|
1
|
+
@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}.tag,.tag:where(:has(:not(pre))){--post-tag-bg: hsl(0, 0%, 90%);--post-tag-fg: #000;display:inline-flex;align-items:center;gap:var(--post-core-dimension-4);padding:0 var(--post-core-dimension-8);max-width:100%;background-color:var(--post-tag-bg);border:var(--post-core-dimension-1) solid rgba(0,0,0,0);border-radius:var(--post-core-dimension-4);font-size:1rem;line-height:calc(var(--post-core-dimension-32) - var(--post-core-dimension-1)*2);white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:var(--post-core-dimension-24)}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg: #fff;--post-tag-fg: #000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg: #fc0;--post-tag-fg: #000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg: #2c871d;--post-tag-fg: #fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg: #f49e00;--post-tag-fg: #000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg: #a51728;--post-tag-fg: #fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg: #cce4ee;--post-tag-fg: #000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:#000}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}
|
|
@@ -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: '4ca273166b81099dd8fc0f69d3d38215e3d7ccbc', "data-version": version }, h("div", { key: 'b6c4eb6a3bf8cbaad18cf6277dab79bd6e350f0a', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '4f9e8cf6b2c723e31d60e30464c1106a9f72b5b4', class: "tag-text" }, h("slot", { key: '819a4e6ff743386f8d5d6b1d94dea9ee4a612784' })))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "post-tag"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,7 +93,7 @@ export class PostTag {
|
|
|
93
93
|
"optional": false,
|
|
94
94
|
"docs": {
|
|
95
95
|
"tags": [],
|
|
96
|
-
"text": "Defines the icon `name` inside of the component.\n<span className=\"
|
|
96
|
+
"text": "Defines the icon `name` inside of the component.\n<span className=\"banner banner-sm banner-info\">If not set the icon will not show up.</span>\nTo learn which icons are available, please visit our <a href=\"/?path=/docs/0dcfe3c0-bfc0-4107-b43b-7e9d825b805f--docs\">icon library</a>."
|
|
97
97
|
},
|
|
98
98
|
"attribute": "icon",
|
|
99
99
|
"reflect": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { checkType } from "../../utils/index";
|
|
4
|
+
/**
|
|
5
|
+
* @slot default - Slot for the content of the button.
|
|
6
|
+
*/
|
|
7
|
+
export class PostTogglebutton {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.handleClick = () => {
|
|
10
|
+
this.toggled = !this.toggled;
|
|
11
|
+
};
|
|
12
|
+
this.handleKeydown = (event) => {
|
|
13
|
+
// perform a click when enter or spaced are pressed to mimic the button behavior
|
|
14
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
15
|
+
event.preventDefault(); // prevents the page from scrolling when space is pressed
|
|
16
|
+
this.host.click();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
this.toggled = false;
|
|
20
|
+
}
|
|
21
|
+
validateToggled() {
|
|
22
|
+
checkType(this, 'toggled', 'boolean');
|
|
23
|
+
}
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.validateToggled();
|
|
26
|
+
// add event listener to not override listener that might be set on the host
|
|
27
|
+
this.host.addEventListener('click', () => this.handleClick());
|
|
28
|
+
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h(Host, { key: '3a1429a9b67b8cfafae184fe0d060ee3a04974e0', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '9ab1537574423740fc335fde732c699698acac25' })));
|
|
32
|
+
}
|
|
33
|
+
static get is() { return "post-togglebutton"; }
|
|
34
|
+
static get encapsulation() { return "shadow"; }
|
|
35
|
+
static get originalStyleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["post-togglebutton.scss"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get styleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["post-togglebutton.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get properties() {
|
|
46
|
+
return {
|
|
47
|
+
"toggled": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"mutable": true,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "boolean",
|
|
52
|
+
"resolved": "boolean",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": "If `true`, the button is in the \"on\" state, otherwise it is in the \"off\" state."
|
|
60
|
+
},
|
|
61
|
+
"attribute": "toggled",
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"defaultValue": "false"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get elementRef() { return "host"; }
|
|
68
|
+
static get watchers() {
|
|
69
|
+
return [{
|
|
70
|
+
"propName": "toggled",
|
|
71
|
+
"methodName": "validateToggled"
|
|
72
|
+
}];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{display:none
|
|
1
|
+
:host{display:none}:host([open]){display:block}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer>div{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:200px;min-height:32px}
|
|
@@ -9,7 +9,10 @@ export class PostTooltip {
|
|
|
9
9
|
this.open = false;
|
|
10
10
|
}
|
|
11
11
|
validateOpen() {
|
|
12
|
-
checkType(this
|
|
12
|
+
checkType(this, 'open', 'boolean', 'The "open" property of the post-tooltip must be a boolean.');
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
this.validateOpen();
|
|
13
16
|
}
|
|
14
17
|
componentDidLoad() {
|
|
15
18
|
if (!this.host.id) {
|
|
@@ -50,7 +53,7 @@ export class PostTooltip {
|
|
|
50
53
|
}
|
|
51
54
|
render() {
|
|
52
55
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
53
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: 'd6a76533f22e354ff89f15c1e9a10e20fe471579', "data-version": version, role: "tooltip" }, h("post-popovercontainer", { key: '60076aaa184ae98e9e813400cc2d03f5add274df', safeSpace: 'trapezoid', class: popoverClass, arrow: this.arrow, animation: this.animation, placement: this.placement, onPostToggle: e => this.handleToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '1d5ea42696cc60a8a84ff0ecc29e82152d028ba4' }))));
|
|
54
57
|
}
|
|
55
58
|
static get is() { return "post-tooltip"; }
|
|
56
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -76,7 +79,7 @@ export class PostTooltip {
|
|
|
76
79
|
"Placement": {
|
|
77
80
|
"location": "import",
|
|
78
81
|
"path": "@floating-ui/dom",
|
|
79
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
82
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
},
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { checkType } from "../../utils/index";
|
|
3
|
-
import "long-press-event";
|
|
2
|
+
import { checkType, IS_BROWSER } from "../../utils/index";
|
|
4
3
|
import { version } from "../../../../package";
|
|
5
4
|
import isFocusable from "ally.js/is/focusable";
|
|
6
5
|
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout', 'long-press'];
|
|
6
|
+
if (IS_BROWSER) {
|
|
7
|
+
(async () => {
|
|
8
|
+
await import('long-press-event');
|
|
9
|
+
})();
|
|
10
|
+
}
|
|
7
11
|
/**
|
|
8
12
|
* @slot default - Content to trigger the tooltip. Can contain any focusable element or will be made focusable automatically.
|
|
9
13
|
*/
|
|
@@ -23,14 +27,13 @@ export class PostTooltipTrigger {
|
|
|
23
27
|
this.boundTooltipHandler = this.handleTooltipEvent.bind(this);
|
|
24
28
|
}
|
|
25
29
|
validateControlFor() {
|
|
26
|
-
checkType(this
|
|
27
|
-
'string', // The expected type
|
|
28
|
-
'The "for" property must be a string' // A meaningful error message
|
|
29
|
-
);
|
|
30
|
+
checkType(this, 'for', 'string');
|
|
30
31
|
}
|
|
31
32
|
get tooltip() {
|
|
33
|
+
if (!IS_BROWSER)
|
|
34
|
+
return null;
|
|
32
35
|
const ref = document.getElementById(this.for);
|
|
33
|
-
return
|
|
36
|
+
return ref?.localName === 'post-tooltip'
|
|
34
37
|
? ref
|
|
35
38
|
: null;
|
|
36
39
|
}
|
|
@@ -146,28 +149,25 @@ export class PostTooltipTrigger {
|
|
|
146
149
|
this.interestLostHandler();
|
|
147
150
|
}
|
|
148
151
|
interestHandler() {
|
|
149
|
-
var _a;
|
|
150
152
|
if (this.delay > 0) {
|
|
151
153
|
this.delayTimeout = window.setTimeout(() => {
|
|
152
|
-
|
|
153
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.show(this.trigger);
|
|
154
|
+
this.tooltip?.show(this.trigger);
|
|
154
155
|
this.delayTimeout = null;
|
|
155
156
|
}, this.delay);
|
|
156
157
|
}
|
|
157
158
|
else {
|
|
158
|
-
|
|
159
|
+
this.tooltip?.show(this.trigger);
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
interestLostHandler() {
|
|
162
|
-
var _a;
|
|
163
163
|
if (this.delayTimeout) {
|
|
164
164
|
clearTimeout(this.delayTimeout);
|
|
165
165
|
this.delayTimeout = null;
|
|
166
166
|
}
|
|
167
|
-
|
|
167
|
+
this.tooltip?.hide();
|
|
168
168
|
}
|
|
169
169
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: '4e4b53e85570d6dbba4ee7833a1d3de00e53dbc6', "data-version": version }, h("slot", { key: 'f8f5ea2e2ce848d654e233617455bbbbdc6ba5b1', onSlotchange: () => this.handleSlotChange() })));
|
|
171
171
|
}
|
|
172
172
|
static get is() { return "post-tooltip-trigger"; }
|
|
173
173
|
static get encapsulation() { return "shadow"; }
|