@swisspost/design-system-components 9.0.0-next.3 → 9.0.0-next.31
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/{attribute-observer-10f08c04.js → attribute-observer-6d8b886b.js} +4 -4
- package/dist/cjs/breakpoints-c6247c71.js +54 -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/debounce-158fd76f.js +13 -0
- package/dist/cjs/fade-72d5ef55.js +14 -0
- package/dist/cjs/get-root-7a3498ef.js +11 -0
- package/dist/cjs/index-23e36ff7.js +37 -0
- package/dist/cjs/{index-e1f32cce.js → index-d6bf2c66.js} +30 -18
- package/dist/cjs/index.browser-2f65f583.js +15 -0
- package/dist/cjs/index.cjs.js +56 -30
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-ef26e62c.js → package-a1fbac54.js} +1 -1
- package/dist/cjs/{post-accordion-3878bf43.js → post-accordion-b9b8560b.js} +9 -8
- package/dist/cjs/post-accordion-item-0901683a.js +64 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +8 -5
- package/dist/cjs/post-accordion.cjs.entry.js +4 -4
- package/dist/cjs/{post-avatar-2bcfc016.js → post-avatar-cfdfe811.js} +10 -14
- package/dist/cjs/post-avatar.cjs.entry.js +4 -4
- package/dist/cjs/post-back-to-top-6f1e9011.js +76 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
- package/dist/cjs/post-banner-404dc94a.js +96 -0
- package/dist/cjs/post-banner.cjs.entry.js +19 -0
- package/dist/cjs/post-breadcrumb-c21c84f4.js +112 -0
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
- package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-a6318276.js +283 -0
- package/dist/cjs/post-card-control.cjs.entry.js +5 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +35 -0
- package/dist/cjs/{post-collapsible-trigger-6ae59c64.js → post-collapsible-trigger-be86fb6c.js} +50 -56
- package/dist/cjs/post-collapsible_2.cjs.entry.js +10 -6
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-b2d22ab2.js +38 -0
- package/dist/cjs/post-footer.cjs.entry.js +12 -0
- package/dist/cjs/post-linkarea-32b1ad0e.js +30 -0
- package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-de3b5248.js +68 -0
- package/dist/cjs/post-popover-18867edc.js +110 -0
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/{post-rating-1d2c59b7.js → post-rating-af90656e.js} +16 -6
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-0204f3de.js +33 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +5 -4
- package/dist/cjs/{post-tab-panel-80b1f3ee.js → post-tab-panel-72bc27b9.js} +6 -5
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-c2d42035.js → post-tabs-fa187aec.js} +23 -16
- package/dist/cjs/post-tabs.cjs.entry.js +4 -4
- package/dist/cjs/post-tag-bbc449d9.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/post-togglebutton-b9e25ee3.js +3963 -0
- package/dist/cjs/{post-tooltip-9a120b2e.js → post-tooltip-41fd9477.js} +38 -25
- package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
- package/dist/cjs/slide-cd1f09b3.js +28 -0
- package/dist/collection/animations/collapse.js +5 -5
- package/dist/collection/animations/fade.js +6 -2
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +20 -3
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +5 -3
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -9
- package/dist/collection/components/post-avatar/post-avatar.js +8 -11
- 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 +109 -0
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +3 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +50 -72
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +163 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +98 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +55 -43
- package/dist/collection/components/post-closebutton/post-closebutton.js +13 -0
- package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +15 -6
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +21 -20
- package/dist/collection/components/post-footer/post-footer.css +1 -0
- package/dist/collection/components/post-footer/post-footer.js +76 -0
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +323 -0
- package/dist/collection/components/post-icon/post-icon.js +79 -46
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +65 -10
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
- package/dist/collection/components/post-language-switch/post-language-switch.js +192 -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 +3 -0
- package/dist/collection/components/post-list/post-list.js +90 -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 +27 -0
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- package/dist/collection/components/post-logo/post-logo.js +3 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +268 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +285 -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 +127 -0
- package/dist/collection/components/post-menu/post-menu.css +3 -0
- package/dist/collection/components/post-menu/post-menu.js +295 -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 +122 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +14 -7
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +203 -39
- package/dist/collection/components/post-rating/post-rating.css +1 -1
- package/dist/collection/components/post-rating/post-rating.js +13 -2
- package/dist/collection/components/post-tab-header/post-tab-header.css +2 -2
- package/dist/collection/components/post-tab-header/post-tab-header.js +6 -4
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -2
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +17 -14
- package/dist/collection/components/post-tag/post-tag.css +1 -1
- package/dist/collection/components/post-tag/post-tag.js +3 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +75 -0
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +35 -17
- package/dist/collection/index.js +19 -2
- package/dist/collection/utils/attribute-observer.js +4 -4
- package/dist/collection/utils/breakpoints.js +50 -0
- package/dist/collection/utils/component-on-ready.js +4 -4
- package/dist/collection/utils/debounce.js +2 -1
- package/dist/collection/utils/get-focusable-children.js +33 -0
- 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/attribute-observer.js +4 -4
- package/dist/components/breakpoints.js +52 -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/debounce.js +11 -0
- package/dist/components/fade.js +6 -2
- package/dist/components/get-focusable-children.js +35 -0
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.browser.js +13 -0
- package/dist/components/index.js +19 -2
- package/dist/components/index2.js +25 -12
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +33 -14
- package/dist/components/post-accordion2.js +6 -5
- package/dist/components/post-avatar2.js +7 -11
- 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 +101 -0
- package/dist/components/post-banner.d.ts +11 -0
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +131 -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-breadcrumb.d.ts +11 -0
- package/dist/components/post-breadcrumb.js +6 -0
- package/dist/components/post-breadcrumb2.js +169 -0
- package/dist/components/post-card-control2.js +50 -39
- package/dist/components/post-closebutton.d.ts +11 -0
- package/dist/components/post-closebutton.js +6 -0
- package/dist/components/post-closebutton2.js +34 -0
- package/dist/components/post-collapsible-trigger2.js +23 -38
- package/dist/components/post-collapsible2.js +22 -14
- 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 +401 -0
- package/dist/components/post-icon2.js +81 -45
- package/dist/components/post-language-option2.js +32 -14
- 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 +148 -0
- package/dist/components/post-linkarea.d.ts +11 -0
- package/dist/components/post-linkarea.js +6 -0
- package/dist/components/post-linkarea2.js +42 -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 +55 -0
- package/dist/components/post-logo2.js +4 -4
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +271 -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 +113 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +199 -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 +191 -0
- package/dist/components/post-popover2.js +14 -8
- package/dist/components/post-popovercontainer2.js +249 -72
- package/dist/components/post-rating2.js +14 -4
- package/dist/components/post-tab-header2.js +7 -6
- package/dist/components/post-tab-panel2.js +4 -3
- package/dist/components/post-tabs2.js +20 -13
- package/dist/components/post-tag2.js +3 -3
- package/dist/components/post-togglebutton.d.ts +11 -0
- package/dist/components/post-togglebutton.js +6 -0
- package/dist/components/post-togglebutton2.js +61 -0
- package/dist/components/post-tooltip2.js +35 -22
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +1653 -186
- package/dist/esm/{attribute-observer-37fa950a.js → attribute-observer-2f203993.js} +4 -4
- package/dist/esm/breakpoints-bbe0c54e.js +52 -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/debounce-e54c7131.js +11 -0
- package/dist/esm/fade-1f3cacf4.js +11 -0
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/{index-e1b64755.js → index-3419e46d.js} +30 -18
- package/dist/esm/index-8f8fe5b0.js +32 -0
- package/dist/esm/index.browser-51485f85.js +13 -0
- package/dist/esm/index.js +33 -24
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-8a1c1ec5.js +3 -0
- package/dist/esm/{post-accordion-01d49d83.js → post-accordion-3cfa5952.js} +9 -8
- package/dist/esm/post-accordion-item-3c760745.js +62 -0
- package/dist/esm/post-accordion-item.entry.js +8 -5
- package/dist/esm/post-accordion.entry.js +4 -4
- package/dist/esm/{post-avatar-6f24d1ab.js → post-avatar-ea5b904a.js} +10 -14
- package/dist/esm/post-avatar.entry.js +4 -4
- package/dist/esm/post-back-to-top-472452ca.js +74 -0
- package/dist/esm/post-back-to-top.entry.js +7 -0
- package/dist/esm/post-banner-a55185e3.js +94 -0
- package/dist/esm/post-banner.entry.js +11 -0
- package/dist/esm/post-breadcrumb-53aebbe1.js +110 -0
- package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
- package/dist/esm/post-breadcrumb.entry.js +5 -0
- package/dist/esm/post-card-control-667d0db8.js +281 -0
- package/dist/esm/post-card-control.entry.js +5 -5
- package/dist/esm/post-closebutton_15.entry.js +13 -0
- package/dist/esm/{post-collapsible-trigger-654bf2b0.js → post-collapsible-trigger-a8dae8e5.js} +49 -55
- package/dist/esm/post-collapsible_2.entry.js +10 -6
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-72fa9233.js +36 -0
- package/dist/esm/post-footer.entry.js +4 -0
- package/dist/esm/post-linkarea-ec7139a7.js +28 -0
- package/dist/esm/post-linkarea.entry.js +3 -0
- package/dist/esm/post-menu-item-663b69ea.js +65 -0
- package/dist/esm/post-popover-33b11e03.js +108 -0
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/{post-rating-3cd3e97b.js → post-rating-4b878fdb.js} +16 -6
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-cc1a5af4.js +31 -0
- package/dist/esm/post-tab-header.entry.js +5 -4
- package/dist/esm/{post-tab-panel-163e6c99.js → post-tab-panel-4d075c9a.js} +6 -5
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-8cb1bce9.js → post-tabs-435d6842.js} +23 -16
- package/dist/esm/post-tabs.entry.js +4 -4
- package/dist/esm/post-tag-3302db4b.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/post-togglebutton-fdda47b1.js +3947 -0
- package/dist/esm/{post-tooltip-dc7e1a21.js → post-tooltip-d501e42e.js} +38 -25
- package/dist/esm/post-tooltip.entry.js +8 -6
- package/dist/esm/slide-cd2850ee.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0c945b7d.js +1 -0
- package/dist/post-components/p-0fc4c0f7.entry.js +1 -0
- package/dist/post-components/p-181c73d5.js +1 -0
- package/dist/post-components/p-1e3f36d8.js +1 -0
- package/dist/post-components/p-23bbd444.js +1 -0
- package/dist/post-components/p-251361a3.entry.js +1 -0
- package/dist/post-components/p-338e7b28.js +1 -0
- package/dist/post-components/p-37d32092.js +1 -0
- package/dist/post-components/p-44bf0821.entry.js +1 -0
- package/dist/post-components/p-4766cb56.entry.js +1 -0
- package/dist/post-components/p-4859cf12.entry.js +1 -0
- package/dist/post-components/p-4dfe5596.js +1 -0
- package/dist/post-components/p-5959f2bd.js +1 -0
- package/dist/post-components/p-5aeb3656.js +1 -0
- package/dist/post-components/p-5beca2e1.js +1 -0
- package/dist/post-components/p-5c52db92.entry.js +1 -0
- package/dist/post-components/{p-3eab790d.js → p-5c758f41.js} +1 -1
- package/dist/post-components/p-5e612dc3.entry.js +1 -0
- package/dist/post-components/p-64e3de38.js +1 -0
- package/dist/post-components/p-66dcff86.js +1 -0
- package/dist/post-components/p-7709c14a.js +1 -0
- package/dist/post-components/p-77a4c79d.js +1 -0
- package/dist/post-components/p-8442e784.entry.js +1 -0
- package/dist/post-components/p-85fdc2d3.js +1 -0
- package/dist/post-components/p-8926be2f.entry.js +1 -0
- package/dist/post-components/p-8a5e87de.js +1 -0
- package/dist/post-components/p-8b7112e2.js +1 -0
- package/dist/post-components/p-8e989dc8.entry.js +1 -0
- package/dist/post-components/p-913e3850.entry.js +1 -0
- package/dist/post-components/p-945dfe27.js +1 -0
- package/dist/post-components/p-9513a8cc.entry.js +1 -0
- package/dist/post-components/p-9748a355.js +1 -0
- package/dist/post-components/p-9b052461.js +1 -0
- package/dist/post-components/p-9e0a5dee.entry.js +1 -0
- package/dist/post-components/p-a357201d.entry.js +1 -0
- package/dist/post-components/p-a7ca86ab.js +1 -0
- package/dist/post-components/p-ac77dc5d.entry.js +1 -0
- package/dist/post-components/p-b030fea7.entry.js +1 -0
- package/dist/post-components/{p-0ad93d89.js → p-b3f80a8d.js} +3 -3
- package/dist/post-components/p-b6e2ef6b.js +1 -0
- package/dist/post-components/p-baaa2cdd.entry.js +1 -0
- package/dist/post-components/p-d45df336.js +1 -0
- package/dist/post-components/p-d9609f91.js +1 -0
- package/dist/post-components/p-dbd973a2.js +1 -0
- package/dist/post-components/p-e1baac59.js +1 -0
- package/dist/post-components/p-e585c6fe.js +1 -0
- package/dist/post-components/p-f2d8b5b9.js +1 -0
- package/dist/post-components/p-f5f8a7a5.entry.js +1 -0
- package/dist/post-components/p-f9322b9f.entry.js +1 -0
- package/dist/post-components/p-fc91cbc2.js +1 -0
- package/dist/post-components/p-ff6877b8.js +1 -0
- package/dist/post-components/p-ff87f8cb.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-item/post-accordion-item.d.ts +8 -2
- package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -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/post-breadcrumb.d.ts +30 -0
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +20 -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-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +51 -0
- package/dist/types/components/post-icon/post-icon.d.ts +13 -11
- package/dist/types/components/post-language-option/post-language-option.d.ts +13 -4
- 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 +71 -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 +31 -0
- package/dist/types/components/post-menu/post-menu.d.ts +48 -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-popovercontainer/post-popovercontainer.d.ts +27 -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 +1 -1
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
- package/dist/types/components.d.ts +532 -76
- 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 +20 -3
- 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/get-focusable-children.d.ts +1 -0
- package/dist/types/utils/get-root.d.ts +1 -1
- 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/attribute-observer.js +4 -4
- package/loaders/breakpoints.js +52 -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/debounce.js +11 -0
- package/loaders/fade.js +6 -2
- package/loaders/get-focusable-children.js +35 -0
- package/loaders/get-root.js +9 -0
- package/loaders/index.browser.js +13 -0
- package/loaders/index.d.ts +36 -2
- package/loaders/index.js +20 -2
- package/loaders/index2.js +25 -12
- 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 +6 -5
- package/loaders/post-avatar.js +7 -11
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +104 -0
- package/loaders/post-banner.d.ts +11 -0
- package/loaders/post-banner.js +134 -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-breadcrumb.d.ts +11 -0
- package/loaders/post-breadcrumb.js +172 -0
- package/loaders/post-card-control.js +50 -39
- package/loaders/post-closebutton.d.ts +11 -0
- package/loaders/post-closebutton.js +37 -0
- package/loaders/post-collapsible-trigger2.js +23 -38
- package/loaders/post-collapsible2.js +21 -13
- 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 +404 -0
- package/loaders/post-icon2.js +81 -45
- package/loaders/post-language-option.js +31 -13
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +151 -0
- package/loaders/post-linkarea.d.ts +11 -0
- package/loaders/post-linkarea.js +45 -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 +58 -0
- package/loaders/post-logo.js +5 -5
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +274 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +116 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +202 -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 +191 -0
- package/loaders/post-popover.js +14 -8
- package/loaders/post-popovercontainer2.js +249 -72
- package/loaders/post-rating.js +14 -4
- package/loaders/post-tab-header.js +7 -6
- package/loaders/post-tab-panel.js +4 -3
- package/loaders/post-tabs.js +20 -13
- package/loaders/post-tag.js +3 -3
- package/loaders/post-togglebutton.d.ts +11 -0
- package/loaders/post-togglebutton.js +64 -0
- package/loaders/post-tooltip.js +34 -21
- package/loaders/slide.js +25 -0
- package/package.json +26 -20
- package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
- package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
- package/dist/cjs/fade-35a3633a.js +0 -10
- package/dist/cjs/index-01f30442.js +0 -52
- package/dist/cjs/post-accordion-item-0278e6e2.js +0 -52
- package/dist/cjs/post-alert-5f795d9c.js +0 -98
- package/dist/cjs/post-alert.cjs.entry.js +0 -16
- package/dist/cjs/post-card-control-5ffcd201.js +0 -272
- package/dist/cjs/post-icon-1f71aa0f.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-language-option-4a3ecaeb.js +0 -67
- package/dist/cjs/post-language-option.cjs.entry.js +0 -14
- package/dist/cjs/post-logo-7070d727.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popover-de1b8d95.js +0 -104
- package/dist/cjs/post-popovercontainer-6a25713a.js +0 -2186
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-877676bf.js +0 -32
- package/dist/cjs/post-tag-5e2c7798.js +0 -47
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -7
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/check-non-empty-58bd6b17.js +0 -9
- package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
- package/dist/esm/fade-7fd71785.js +0 -7
- package/dist/esm/index-f41b763f.js +0 -46
- package/dist/esm/package-0311770e.js +0 -3
- package/dist/esm/post-accordion-item-366f385b.js +0 -50
- package/dist/esm/post-alert-5a69f40d.js +0 -96
- package/dist/esm/post-alert.entry.js +0 -8
- package/dist/esm/post-card-control-2a7939c3.js +0 -270
- package/dist/esm/post-icon-885f17e9.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-language-option-0c2818aa.js +0 -65
- package/dist/esm/post-language-option.entry.js +0 -6
- package/dist/esm/post-logo-dd425f2e.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popover-7d44a85c.js +0 -102
- package/dist/esm/post-popovercontainer-e6d11d81.js +0 -2184
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-776a991a.js +0 -30
- package/dist/esm/post-tag-deefcc86.js +0 -45
- package/dist/post-components/p-048538ea.js +0 -1
- package/dist/post-components/p-0a1f5e13.entry.js +0 -1
- package/dist/post-components/p-0a4318ff.js +0 -1
- package/dist/post-components/p-0d64ef0c.entry.js +0 -1
- package/dist/post-components/p-1198a5f2.entry.js +0 -1
- package/dist/post-components/p-13d1bef7.entry.js +0 -1
- package/dist/post-components/p-16d057a6.js +0 -1
- package/dist/post-components/p-1a091fca.entry.js +0 -1
- package/dist/post-components/p-1f35b0ba.entry.js +0 -1
- package/dist/post-components/p-246a6d28.js +0 -1
- package/dist/post-components/p-2737eaf5.js +0 -1
- package/dist/post-components/p-3aa5e1e5.js +0 -1
- package/dist/post-components/p-3d3795f9.js +0 -1
- package/dist/post-components/p-3fabf6e4.entry.js +0 -1
- package/dist/post-components/p-4f0617e6.js +0 -1
- package/dist/post-components/p-53bacbbc.js +0 -1
- package/dist/post-components/p-5c8cb76f.entry.js +0 -1
- package/dist/post-components/p-5eee8d31.entry.js +0 -1
- package/dist/post-components/p-60e72b25.js +0 -1
- package/dist/post-components/p-611b3c41.js +0 -1
- package/dist/post-components/p-66ed33a9.js +0 -1
- package/dist/post-components/p-681b751d.entry.js +0 -1
- package/dist/post-components/p-6adeaa6c.js +0 -1
- package/dist/post-components/p-6b6a1e82.entry.js +0 -1
- package/dist/post-components/p-752e6a98.entry.js +0 -1
- package/dist/post-components/p-8734876e.js +0 -1
- package/dist/post-components/p-9ac2a947.js +0 -1
- package/dist/post-components/p-9d211a45.js +0 -1
- package/dist/post-components/p-b095519d.js +0 -1
- package/dist/post-components/p-b38eaabf.js +0 -1
- package/dist/post-components/p-cdfcc758.entry.js +0 -1
- package/dist/post-components/p-d50d4ec1.entry.js +0 -1
- package/dist/post-components/p-d785856c.js +0 -1
- package/dist/post-components/p-deb4131c.js +0 -1
- package/dist/post-components/p-e18f3639.js +0 -1
- package/dist/post-components/p-f1b7797f.entry.js +0 -1
- package/dist/post-components/p-f6efc76b.entry.js +0 -1
- package/dist/post-components/p-f825d681.js +0 -1
- package/dist/post-components/p-fff1c2ee.entry.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
4
|
+
import { n as nanoid } from './index.browser.js';
|
|
4
5
|
|
|
5
|
-
const postTabHeaderCss = ".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
|
|
6
|
+
const postTabHeaderCss = ".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}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */: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}}";
|
|
6
7
|
const PostTabHeaderStyle0 = postTabHeaderCss;
|
|
7
8
|
|
|
8
9
|
const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
|
|
@@ -13,16 +14,16 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
|
|
|
13
14
|
this.tabId = undefined;
|
|
14
15
|
this.panel = undefined;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
get host() { return this; }
|
|
18
|
+
validateFor() {
|
|
19
|
+
checkNonEmpty(this, 'panel');
|
|
18
20
|
}
|
|
19
21
|
componentWillLoad() {
|
|
20
|
-
this.tabId = `tab-${this.host.id ||
|
|
22
|
+
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
21
23
|
}
|
|
22
24
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '336824660de90bf5c570e9739947927a32612fbd', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '8bfe0b57fa96044692e2db3fd983ccde427558e7' })));
|
|
24
26
|
}
|
|
25
|
-
get host() { return this; }
|
|
26
27
|
static get watchers() { return {
|
|
27
28
|
"panel": ["validateFor"]
|
|
28
29
|
}; }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
+
import { n as nanoid } from './index.browser.js';
|
|
3
4
|
|
|
4
5
|
const postTabPanelCss = ":host{display:none}";
|
|
5
6
|
const PostTabPanelStyle0 = postTabPanelCss;
|
|
@@ -12,14 +13,14 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
12
13
|
this.panelId = undefined;
|
|
13
14
|
this.name = undefined;
|
|
14
15
|
}
|
|
16
|
+
get host() { return this; }
|
|
15
17
|
componentWillLoad() {
|
|
16
18
|
// get the id set on the host element or use a random id by default
|
|
17
|
-
this.panelId = `panel-${this.host.id ||
|
|
19
|
+
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
18
20
|
}
|
|
19
21
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '8331ab54bda793a120dc467d8406cc0a02a5c480', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '7da6d67b69150a70ee290ad8ef9b95684ea3f83d' })));
|
|
21
23
|
}
|
|
22
|
-
get host() { return this; }
|
|
23
24
|
static get style() { return PostTabPanelStyle0; }
|
|
24
25
|
}, [1, "post-tab-panel", {
|
|
25
26
|
"name": [1],
|
package/loaders/post-tabs.js
CHANGED
|
@@ -6,7 +6,7 @@ import { f as fadeOut, a as fadeIn } from './fade.js';
|
|
|
6
6
|
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
7
7
|
* @see https://stenciljs.com/docs/api#componentonready
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
function componentOnReady(el) {
|
|
10
10
|
if (typeof el.componentOnReady === 'function') {
|
|
11
11
|
return el.componentOnReady();
|
|
12
12
|
}
|
|
@@ -15,15 +15,15 @@ const componentOnReady = (el) => {
|
|
|
15
15
|
resolve(el);
|
|
16
16
|
}));
|
|
17
17
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
18
|
+
}
|
|
19
|
+
function customOnReady(callback) {
|
|
20
20
|
if (typeof requestAnimationFrame === 'function') {
|
|
21
21
|
return requestAnimationFrame(callback);
|
|
22
22
|
}
|
|
23
23
|
return setTimeout(callback);
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
const postTabsCss = ".tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(
|
|
26
|
+
const postTabsCss = ".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}";
|
|
27
27
|
const PostTabsStyle0 = postTabsCss;
|
|
28
28
|
|
|
29
29
|
const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLElement {
|
|
@@ -32,16 +32,25 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
32
32
|
this.__registerHost();
|
|
33
33
|
this.__attachShadow();
|
|
34
34
|
this.postChange = createEvent(this, "postChange", 7);
|
|
35
|
-
this.isLoaded = false;
|
|
36
35
|
this.activePanel = undefined;
|
|
37
36
|
}
|
|
37
|
+
activeTab;
|
|
38
|
+
showing;
|
|
39
|
+
hiding;
|
|
40
|
+
isLoaded = false;
|
|
38
41
|
get tabs() {
|
|
39
|
-
return this.host.querySelectorAll('post-tab-header');
|
|
42
|
+
return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
40
43
|
}
|
|
44
|
+
get host() { return this; }
|
|
45
|
+
/**
|
|
46
|
+
* An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.
|
|
47
|
+
* The payload is the name of the newly shown panel.
|
|
48
|
+
*/
|
|
49
|
+
postChange;
|
|
41
50
|
componentDidLoad() {
|
|
42
51
|
this.moveMisplacedTabs();
|
|
43
52
|
this.enableTabs();
|
|
44
|
-
const initiallyActivePanel = this.activePanel || this.tabs
|
|
53
|
+
const initiallyActivePanel = this.activePanel || this.tabs[0]?.panel;
|
|
45
54
|
void this.show(initiallyActivePanel);
|
|
46
55
|
this.isLoaded = true;
|
|
47
56
|
}
|
|
@@ -50,9 +59,8 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
50
59
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
51
60
|
*/
|
|
52
61
|
async show(panelName) {
|
|
53
|
-
var _a;
|
|
54
62
|
// do nothing if the tab is already active
|
|
55
|
-
if (panelName ===
|
|
63
|
+
if (panelName === this.activeTab?.panel) {
|
|
56
64
|
return;
|
|
57
65
|
}
|
|
58
66
|
const previousTab = this.activeTab;
|
|
@@ -112,7 +120,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
112
120
|
});
|
|
113
121
|
// if the currently active tab was removed from the DOM then select the first one
|
|
114
122
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
115
|
-
void this.show(this.tabs
|
|
123
|
+
void this.show(this.tabs[0]?.panel);
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
activateTab(tab) {
|
|
@@ -164,9 +172,8 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
164
172
|
nextTab.focus();
|
|
165
173
|
}
|
|
166
174
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
175
|
+
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() }))));
|
|
168
176
|
}
|
|
169
|
-
get host() { return this; }
|
|
170
177
|
static get style() { return PostTabsStyle0; }
|
|
171
178
|
}, [1, "post-tabs", {
|
|
172
179
|
"activePanel": [1, "active-panel"],
|
package/loaders/post-tag.js
CHANGED
|
@@ -2,10 +2,11 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './post-icon2.js';
|
|
4
4
|
|
|
5
|
-
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap
|
|
5
|
+
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.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}";
|
|
6
6
|
const PostTagStyle0 = postTagCss;
|
|
7
7
|
|
|
8
8
|
const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLElement {
|
|
9
|
+
get host() { return this; }
|
|
9
10
|
constructor() {
|
|
10
11
|
super();
|
|
11
12
|
this.__registerHost();
|
|
@@ -35,9 +36,8 @@ const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEle
|
|
|
35
36
|
this.setClasses();
|
|
36
37
|
}
|
|
37
38
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
39
|
+
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' })))));
|
|
39
40
|
}
|
|
40
|
-
get host() { return this; }
|
|
41
41
|
static get watchers() { return {
|
|
42
42
|
"variant": ["variantChanged"],
|
|
43
43
|
"size": ["sizeChanged"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/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,64 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkType } from './check-type.js';
|
|
4
|
+
|
|
5
|
+
const postTogglebuttonCss = ":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}";
|
|
6
|
+
const PostTogglebuttonStyle0 = postTogglebuttonCss;
|
|
7
|
+
|
|
8
|
+
const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.toggled = false;
|
|
14
|
+
}
|
|
15
|
+
get host() { return this; }
|
|
16
|
+
validateToggled() {
|
|
17
|
+
checkType(this, 'toggled', 'boolean');
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.validateToggled();
|
|
21
|
+
// add event listener to not override listener that might be set on the host
|
|
22
|
+
this.host.addEventListener('click', () => this.handleClick());
|
|
23
|
+
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
24
|
+
}
|
|
25
|
+
handleClick = () => {
|
|
26
|
+
this.toggled = !this.toggled;
|
|
27
|
+
};
|
|
28
|
+
handleKeydown = (event) => {
|
|
29
|
+
// perform a click when enter or spaced are pressed to mimic the button behavior
|
|
30
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
31
|
+
event.preventDefault(); // prevents the page from scrolling when space is pressed
|
|
32
|
+
this.host.click();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
render() {
|
|
36
|
+
return (h(Host, { key: '3a1429a9b67b8cfafae184fe0d060ee3a04974e0', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '9ab1537574423740fc335fde732c699698acac25' })));
|
|
37
|
+
}
|
|
38
|
+
static get watchers() { return {
|
|
39
|
+
"toggled": ["validateToggled"]
|
|
40
|
+
}; }
|
|
41
|
+
static get style() { return PostTogglebuttonStyle0; }
|
|
42
|
+
}, [1, "post-togglebutton", {
|
|
43
|
+
"toggled": [1028]
|
|
44
|
+
}, undefined, {
|
|
45
|
+
"toggled": ["validateToggled"]
|
|
46
|
+
}]);
|
|
47
|
+
function defineCustomElement$1() {
|
|
48
|
+
if (typeof customElements === "undefined") {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const components = ["post-togglebutton"];
|
|
52
|
+
components.forEach(tagName => { switch (tagName) {
|
|
53
|
+
case "post-togglebutton":
|
|
54
|
+
if (!customElements.get(tagName)) {
|
|
55
|
+
customElements.define(tagName, PostTogglebutton$1);
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
} });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const PostTogglebutton = PostTogglebutton$1;
|
|
62
|
+
const defineCustomElement = defineCustomElement$1;
|
|
63
|
+
|
|
64
|
+
export { PostTogglebutton, defineCustomElement };
|
package/loaders/post-tooltip.js
CHANGED
|
@@ -4,10 +4,6 @@ import { g as getAttributeObserver } from './attribute-observer.js';
|
|
|
4
4
|
import { c as checkEmptyOrType } from './index2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } 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) {
|
|
@@ -4777,7 +4773,7 @@ const isFocusable = /*@__PURE__*/getDefaultExportFromCjs(focusable.exports);
|
|
|
4777
4773
|
|
|
4778
4774
|
}(window, document));
|
|
4779
4775
|
|
|
4780
|
-
const postTooltipCss = "
|
|
4776
|
+
const postTooltipCss = "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:calc(224px - var(--post-core-dimension-8));min-height:var(--post-core-dimension-16)}";
|
|
4781
4777
|
const PostTooltipStyle0 = postTooltipCss;
|
|
4782
4778
|
|
|
4783
4779
|
const OPEN_DELAY = 650; // matches HTML title delay
|
|
@@ -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,15 +4801,18 @@ 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;
|
|
4811
4812
|
const tooltip = document.getElementById(tooltipTarget);
|
|
4812
4813
|
// Determine if the tooltip was triggered by a focus event
|
|
4813
4814
|
const triggeredByFocus = e.type === 'focusin';
|
|
4814
|
-
void
|
|
4815
|
+
void tooltip?.show(targetElement, triggeredByFocus);
|
|
4815
4816
|
if (hideTooltipTimeout) {
|
|
4816
4817
|
window.clearTimeout(hideTooltipTimeout);
|
|
4817
4818
|
hideTooltipTimeout = null;
|
|
@@ -4852,7 +4853,7 @@ const patchAccessibilityFeatures = (trigger) => {
|
|
|
4852
4853
|
const describedBy = trigger.getAttribute('aria-describedby');
|
|
4853
4854
|
const id = trigger.getAttribute(tooltipTargetAttribute);
|
|
4854
4855
|
// Add tooltip to aria-describedby
|
|
4855
|
-
if (!
|
|
4856
|
+
if (!describedBy?.includes(id)) {
|
|
4856
4857
|
const newDescribedBy = describedBy ? `${describedBy} ${id}` : id;
|
|
4857
4858
|
trigger.setAttribute('aria-describedby', newDescribedBy);
|
|
4858
4859
|
}
|
|
@@ -4868,13 +4869,15 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
4868
4869
|
super();
|
|
4869
4870
|
this.__registerHost();
|
|
4870
4871
|
this.__attachShadow();
|
|
4871
|
-
this.wasOpenedByFocus = false;
|
|
4872
4872
|
this.placement = 'top';
|
|
4873
4873
|
this.arrow = true;
|
|
4874
4874
|
this.delayed = false;
|
|
4875
4875
|
}
|
|
4876
|
+
popoverRef;
|
|
4877
|
+
wasOpenedByFocus = false;
|
|
4878
|
+
get host() { return this; }
|
|
4876
4879
|
validateDelayed() {
|
|
4877
|
-
checkEmptyOrType(this
|
|
4880
|
+
checkEmptyOrType(this, 'delayed', 'boolean');
|
|
4878
4881
|
}
|
|
4879
4882
|
connectedCallback() {
|
|
4880
4883
|
this.validateDelayed();
|
|
@@ -4931,18 +4934,29 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
4931
4934
|
* @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
|
|
4932
4935
|
*/
|
|
4933
4936
|
async show(target, triggeredByFocus = false) {
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4937
|
+
const showTooltip = () => {
|
|
4938
|
+
// If focus or pointer event is not on the button anymore, don't show the tooltip
|
|
4939
|
+
if (globalCurrentTarget !== target)
|
|
4940
|
+
return;
|
|
4941
|
+
// Determine if the tooltip was opened by a focus event
|
|
4942
|
+
this.wasOpenedByFocus = triggeredByFocus;
|
|
4943
|
+
// Disable pointer events if triggered by focus, otherwise enable them
|
|
4944
|
+
if (this.wasOpenedByFocus) {
|
|
4945
|
+
this.host.style.pointerEvents = 'none';
|
|
4946
|
+
}
|
|
4947
|
+
else {
|
|
4948
|
+
this.host.style.pointerEvents = 'auto';
|
|
4949
|
+
}
|
|
4950
|
+
this.popoverRef.show(target);
|
|
4951
|
+
};
|
|
4952
|
+
if (this.delayed) {
|
|
4953
|
+
tooltipTimeout = setTimeout(() => {
|
|
4954
|
+
showTooltip();
|
|
4955
|
+
}, OPEN_DELAY);
|
|
4941
4956
|
}
|
|
4942
4957
|
else {
|
|
4943
|
-
|
|
4958
|
+
showTooltip();
|
|
4944
4959
|
}
|
|
4945
|
-
this.popoverRef.show(target);
|
|
4946
4960
|
}
|
|
4947
4961
|
/**
|
|
4948
4962
|
* Programmatically hide this tooltip
|
|
@@ -4977,9 +4991,8 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
4977
4991
|
}
|
|
4978
4992
|
render() {
|
|
4979
4993
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
4980
|
-
return (h(Host, { key: '
|
|
4994
|
+
return (h(Host, { key: '89b0e64fd5fde4c21d9c1eb624facff38b287e4a', "data-version": version$1, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '8006874c12a2eebe39682a09db677e8b315dd6bb', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'cf3bd12703885fe886f1703038437b59a4d79fd3' }))));
|
|
4981
4995
|
}
|
|
4982
|
-
get host() { return this; }
|
|
4983
4996
|
static get watchers() { return {
|
|
4984
4997
|
"delayed": ["validateDelayed"]
|
|
4985
4998
|
}; }
|
package/loaders/slide.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const easing = 'ease';
|
|
2
|
+
const duration = 500;
|
|
3
|
+
const fill = 'forwards';
|
|
4
|
+
function slideUp(el, translateSize = '-100%') {
|
|
5
|
+
return el.animate([
|
|
6
|
+
{ transform: 'translateY(0)' }, // Starting position (no translation)
|
|
7
|
+
{ transform: `translateY(${translateSize})` }, // End position
|
|
8
|
+
], {
|
|
9
|
+
duration: duration,
|
|
10
|
+
easing,
|
|
11
|
+
fill,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function slideDown(el, translateSize = '-100%') {
|
|
15
|
+
return el.animate([
|
|
16
|
+
{ transform: `translateY(${translateSize})` }, // Starting position (no translation)
|
|
17
|
+
{ transform: 'translateY(0)' }, // End position
|
|
18
|
+
], {
|
|
19
|
+
duration: duration,
|
|
20
|
+
easing,
|
|
21
|
+
fill,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { slideUp as a, slideDown as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.31",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -24,35 +24,41 @@
|
|
|
24
24
|
"linkDirectory": true
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@floating-ui/dom": "1.6.
|
|
27
|
+
"@floating-ui/dom": "1.6.13",
|
|
28
28
|
"@oddbird/popover-polyfill": "0.3.7",
|
|
29
|
-
"@swisspost/design-system-
|
|
29
|
+
"@swisspost/design-system-icons": "9.0.0-next.31",
|
|
30
|
+
"@swisspost/design-system-styles": "9.0.0-next.31",
|
|
30
31
|
"ally.js": "1.4.1",
|
|
31
|
-
"long-press-event": "2.5.0"
|
|
32
|
+
"long-press-event": "2.5.0",
|
|
33
|
+
"nanoid": "5.0.9"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@
|
|
36
|
+
"@eslint/compat": "1.2.5",
|
|
37
|
+
"@eslint/js": "9.18.0",
|
|
38
|
+
"@percy/cli": "1.30.6",
|
|
35
39
|
"@percy/cypress": "3.1.2",
|
|
36
|
-
"@stencil-community/eslint-plugin": "0.
|
|
40
|
+
"@stencil-community/eslint-plugin": "0.9.0",
|
|
37
41
|
"@stencil/angular-output-target": "0.8.4",
|
|
38
42
|
"@stencil/core": "4.19.2",
|
|
39
43
|
"@stencil/react-output-target": "0.5.3",
|
|
40
44
|
"@stencil/sass": "3.0.12",
|
|
41
|
-
"@types/jest": "29.5.
|
|
42
|
-
"@types/node": "
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
45
|
+
"@types/jest": "29.5.14",
|
|
46
|
+
"@types/node": "22.10.5",
|
|
44
47
|
"@typescript-eslint/parser": "7.18.0",
|
|
45
48
|
"bootstrap": "5.3.3",
|
|
46
49
|
"cypress": "13.13.2",
|
|
47
50
|
"cypress-axe": "1.5.0",
|
|
48
51
|
"cypress-storybook": "1.0.0",
|
|
49
|
-
"eslint": "
|
|
50
|
-
"eslint-plugin-react": "7.
|
|
52
|
+
"eslint": "9.18.0",
|
|
53
|
+
"eslint-plugin-react": "7.37.4",
|
|
54
|
+
"globals": "15.14.0",
|
|
51
55
|
"rimraf": "6.0.1",
|
|
52
56
|
"rollup-plugin-postcss": "4.0.2",
|
|
53
57
|
"sass": "1.78.0",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
58
|
+
"throttle-debounce": "5.0.2",
|
|
59
|
+
"ts-jest": "29.2.5",
|
|
60
|
+
"typescript": "5.8.2",
|
|
61
|
+
"typescript-eslint": "8.20.0"
|
|
56
62
|
},
|
|
57
63
|
"keywords": [
|
|
58
64
|
"components",
|
|
@@ -63,17 +69,17 @@
|
|
|
63
69
|
"frontend"
|
|
64
70
|
],
|
|
65
71
|
"scripts": {
|
|
66
|
-
"
|
|
72
|
+
"play": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
|
|
67
73
|
"start": "stencil build --dev --watch --docs --docs-readme",
|
|
68
|
-
"build": "stencil build --docs-readme",
|
|
74
|
+
"build": "pnpm clean && stencil build --docs-readme",
|
|
69
75
|
"clean": "rimraf www dist loader loaders",
|
|
70
|
-
"test": "pnpm run unit",
|
|
71
76
|
"unit": "stencil test --spec",
|
|
72
77
|
"unit:watch": "stencil test --spec --watchAll --silent",
|
|
73
|
-
"e2e": "cypress run",
|
|
74
|
-
"e2e:ci": "xvfb-run -a cypress run",
|
|
78
|
+
"e2e": "cypress run --browser chrome",
|
|
75
79
|
"e2e:watch": "cypress open",
|
|
76
|
-
"
|
|
77
|
-
"lint": "eslint
|
|
80
|
+
"e2e:ci": "xvfb-run -a cypress run --browser chrome",
|
|
81
|
+
"lint": "eslint",
|
|
82
|
+
"lint:fix": "eslint --fix",
|
|
83
|
+
"generate": "stencil generate"
|
|
78
84
|
}
|
|
79
85
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fadeDuration = 200;
|
|
4
|
-
const fadedOutKeyframe = { opacity: '0' };
|
|
5
|
-
const fadedInKeyframe = { opacity: '1' };
|
|
6
|
-
const fadeIn = (el) => el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
|
|
7
|
-
const fadeOut = (el) => el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
|
|
8
|
-
|
|
9
|
-
exports.fadeIn = fadeIn;
|
|
10
|
-
exports.fadeOut = fadeOut;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const constants = require('./constants-238701d3.js');
|
|
4
|
-
const checkOneOf = require('./check-one-of-f4f5d0c0.js');
|
|
5
|
-
|
|
6
|
-
function emptyOr(check) {
|
|
7
|
-
return (...args) => {
|
|
8
|
-
const value = args[0];
|
|
9
|
-
if (!constants.EMPTY_VALUES.some(v => v === value))
|
|
10
|
-
check(...args);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function checkPattern(value, pattern, errorMessage) {
|
|
15
|
-
if (typeof value !== 'string' || !pattern.test(value))
|
|
16
|
-
throw new Error(errorMessage);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function checkType(value, type, error) {
|
|
20
|
-
const typeIsArray = type === 'array';
|
|
21
|
-
const valueIsArray = Array.isArray(value);
|
|
22
|
-
if (typeIsArray || valueIsArray) {
|
|
23
|
-
if (valueIsArray !== typeIsArray)
|
|
24
|
-
throw new Error(error);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
if (typeof value !== type)
|
|
28
|
-
throw new Error(error);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function checkUrl(value, error) {
|
|
33
|
-
if (typeof value !== 'string' && !(value instanceof URL))
|
|
34
|
-
throw new Error(error);
|
|
35
|
-
try {
|
|
36
|
-
new URL(value);
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
throw new Error(error);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const checkEmptyOrOneOf = emptyOr(checkOneOf.checkOneOf);
|
|
44
|
-
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
45
|
-
const checkEmptyOrType = emptyOr(checkType);
|
|
46
|
-
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
47
|
-
|
|
48
|
-
exports.checkEmptyOrOneOf = checkEmptyOrOneOf;
|
|
49
|
-
exports.checkEmptyOrPattern = checkEmptyOrPattern;
|
|
50
|
-
exports.checkEmptyOrType = checkEmptyOrType;
|
|
51
|
-
exports.checkEmptyOrUrl = checkEmptyOrUrl;
|
|
52
|
-
exports.checkType = checkType;
|