@swisspost/design-system-components 10.0.0-next.47 → 10.0.0-next.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{event-from-AKK8RQrn.js → event-from-C6kpQwhw.js} +2 -2
- package/dist/cjs/index-CpDyH7Ww.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-wsZ6ig4j.js → package-CR0YynRY.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
- package/dist/cjs/post-avatar.cjs.entry.js +107 -80
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/post-banner.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +4 -4
- package/dist/cjs/post-card-control.cjs.entry.js +4 -4
- package/dist/cjs/post-closebutton_15.cjs.entry.js +133 -74
- package/dist/cjs/post-collapsible_2.cjs.entry.js +4 -4
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea.cjs.entry.js +19 -8
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/collection/animations/pop-in.js +14 -0
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +5 -5
- package/dist/collection/components/post-avatar/avatar-utils.js +16 -0
- package/dist/collection/components/post-avatar/post-avatar.css +1 -1
- package/dist/collection/components/post-avatar/post-avatar.js +119 -82
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +1 -1
- package/dist/collection/components/post-banner/post-banner.js +2 -2
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +2 -2
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -19
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +11 -2
- package/dist/collection/components/post-icon/post-icon.js +39 -33
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +1 -2
- package/dist/collection/components/post-language-switch/post-language-switch.js +1 -2
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +24 -6
- package/dist/collection/components/post-list/post-list.css +1 -1
- package/dist/collection/components/post-list/post-list.js +1 -1
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +12 -2
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +41 -5
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +18 -7
- package/dist/collection/components/post-rating/post-rating.css +1 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +3 -3
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +2 -2
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/utils/event-from.js +2 -2
- package/dist/component-names.json +39 -0
- package/dist/{esm/event-from-8U5GFtQP.js → components/event-from.js} +2 -2
- package/dist/components/get-root.js +15 -0
- package/dist/components/index.d.ts +73 -0
- package/dist/components/index.js +36 -2315
- package/dist/components/package.js +3 -0
- package/dist/components/post-accordion-item.js +1 -1
- package/dist/components/post-accordion-item2.js +113 -0
- package/dist/components/post-accordion.js +1 -1
- package/dist/components/post-accordion2.js +138 -0
- package/dist/components/post-avatar.js +117 -88
- package/dist/components/post-back-to-top.js +7 -8
- package/dist/components/post-banner.js +10 -11
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumb-item2.js +79 -0
- package/dist/components/post-breadcrumbs.js +16 -17
- package/dist/components/post-card-control.js +11 -12
- package/dist/components/post-closebutton.js +5 -7
- package/dist/components/post-collapsible-trigger.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +135 -0
- package/dist/components/post-collapsible.js +1 -1
- package/dist/components/post-collapsible2.js +110 -0
- package/dist/components/post-footer.js +12 -13
- package/dist/components/post-header.js +18 -10
- package/dist/components/post-icon.js +1 -1
- package/dist/components/post-icon2.js +159 -0
- package/dist/components/post-language-option.js +10 -12
- package/dist/components/post-language-switch.js +13 -15
- package/dist/components/post-linkarea.js +24 -12
- package/dist/components/post-list-item.js +4 -5
- package/dist/components/post-list.js +6 -7
- package/dist/components/post-logo.js +6 -7
- package/dist/components/post-mainnavigation.js +6 -7
- package/dist/components/post-megadropdown-trigger.js +7 -8
- package/dist/components/post-megadropdown.js +20 -11
- package/dist/components/post-menu-item.js +1 -1
- package/dist/components/post-menu-item2.js +30 -0
- package/dist/components/post-menu-trigger.js +1 -1
- package/dist/components/post-menu-trigger2.js +110 -0
- package/dist/components/post-menu.js +1 -1
- package/dist/components/post-menu2.js +237 -0
- package/dist/components/post-popover.js +8 -9
- package/dist/components/post-popovercontainer.js +1 -1
- package/dist/components/post-popovercontainer2.js +3043 -0
- package/dist/components/post-rating.js +10 -11
- package/dist/components/post-tab-header.js +8 -9
- package/dist/components/post-tab-panel.js +7 -8
- package/dist/components/post-tabs.js +7 -8
- package/dist/components/post-togglebutton.js +4 -5
- package/dist/components/post-tooltip-trigger.js +7 -8
- package/dist/components/post-tooltip.js +8 -9
- package/dist/components/react/index.d.ts +33 -0
- package/dist/components/react/index.js +2315 -0
- package/dist/components/{p-Cxrx7SXz.js → react/p-Amg0f2Yo.js} +40 -34
- package/dist/components/{p-C0H2ohSv.js → react/p-B6vPT8S3.js} +3 -3
- package/dist/components/{p-336Lbkey.js → react/p-BDs0pvkX.js} +2 -2
- package/dist/components/react/p-BLchVpF6.js +14 -0
- package/dist/components/{p-BM8mtEfS.js → react/p-BMdFdJWl.js} +2 -2
- package/dist/components/{p-DP5pj8mq.js → react/p-BS0ZqwA-.js} +31 -6
- package/dist/components/react/p-C35MCWIp.js +35 -0
- package/dist/components/react/p-CJ80BZ06.js +178 -0
- package/dist/{esm/index-BWC0gtGU.js → components/react/p-CV7fm1rW.js} +1 -1
- package/dist/components/react/p-C_2k3G1c.js +264 -0
- package/dist/components/{p-DVGX_JCp.js → react/p-D1oOccKr.js} +3 -3
- package/dist/components/{p-pHxypsHK.js → react/p-D50E7y6E.js} +24 -9
- package/dist/components/react/p-DO48NanC.js +3 -0
- package/dist/components/{p-i0-mizzM.js → react/p-DOo9tmN-.js} +2 -2
- package/dist/components/{p-DEi5TIMq.js → react/p-Do9awHW7.js} +3 -3
- package/dist/components/react/p-SbIC4aZX.js +11 -0
- package/dist/components/{p-8U5GFtQP.js → react/p-kraHE1r3.js} +2 -2
- package/dist/components/react/p-r4txK0AC.js +3 -0
- package/dist/components/{p-BSvy4uym.js → react/p-xelWyg_P.js} +8 -8
- package/dist/components/react/post-accordion-item.d.ts +11 -0
- package/dist/components/react/post-accordion-item.js +6 -0
- package/dist/components/react/post-accordion.d.ts +11 -0
- package/dist/components/react/post-accordion.js +6 -0
- package/dist/components/react/post-avatar.d.ts +11 -0
- package/dist/components/react/post-avatar.js +218 -0
- package/dist/components/react/post-back-to-top.d.ts +11 -0
- package/dist/components/react/post-back-to-top.js +145 -0
- package/dist/components/react/post-banner.d.ts +11 -0
- package/dist/components/react/post-banner.js +99 -0
- package/dist/components/react/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/react/post-breadcrumb-item.js +6 -0
- package/dist/components/react/post-breadcrumbs.d.ts +11 -0
- package/dist/components/react/post-breadcrumbs.js +187 -0
- package/dist/components/react/post-card-control.d.ts +11 -0
- package/dist/components/react/post-card-control.js +327 -0
- package/dist/components/react/post-closebutton.d.ts +11 -0
- package/dist/components/react/post-closebutton.js +50 -0
- package/dist/components/react/post-collapsible-trigger.d.ts +11 -0
- package/dist/components/react/post-collapsible-trigger.js +6 -0
- package/dist/components/react/post-collapsible.d.ts +11 -0
- package/dist/components/react/post-collapsible.js +6 -0
- package/dist/components/react/post-footer.d.ts +11 -0
- package/dist/components/react/post-footer.js +117 -0
- package/dist/components/react/post-header.d.ts +11 -0
- package/dist/components/react/post-header.js +342 -0
- package/dist/components/react/post-icon.d.ts +11 -0
- package/dist/components/react/post-icon.js +6 -0
- package/dist/components/react/post-language-option.d.ts +11 -0
- package/dist/components/react/post-language-option.js +100 -0
- package/dist/components/react/post-language-switch.d.ts +11 -0
- package/dist/components/react/post-language-switch.js +158 -0
- package/dist/components/react/post-linkarea.d.ts +11 -0
- package/dist/components/react/post-linkarea.js +59 -0
- package/dist/components/react/post-list-item.d.ts +11 -0
- package/dist/components/react/post-list-item.js +39 -0
- package/dist/components/react/post-list.d.ts +11 -0
- package/dist/components/react/post-list.js +62 -0
- package/dist/components/react/post-logo.d.ts +11 -0
- package/dist/components/react/post-logo.js +59 -0
- package/dist/components/react/post-mainnavigation.d.ts +11 -0
- package/dist/components/react/post-mainnavigation.js +181 -0
- package/dist/components/react/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/react/post-megadropdown-trigger.js +137 -0
- package/dist/components/react/post-megadropdown.d.ts +11 -0
- package/dist/components/react/post-megadropdown.js +207 -0
- package/dist/components/react/post-menu-item.d.ts +11 -0
- package/dist/components/react/post-menu-item.js +6 -0
- package/dist/components/react/post-menu-trigger.d.ts +11 -0
- package/dist/components/react/post-menu-trigger.js +6 -0
- package/dist/components/react/post-menu.d.ts +11 -0
- package/dist/components/react/post-menu.js +6 -0
- package/dist/components/react/post-popover.d.ts +11 -0
- package/dist/components/react/post-popover.js +189 -0
- package/dist/components/react/post-popovercontainer.d.ts +11 -0
- package/dist/components/react/post-popovercontainer.js +6 -0
- package/dist/components/react/post-rating.d.ts +11 -0
- package/dist/components/react/post-rating.js +153 -0
- package/dist/components/react/post-tab-header.d.ts +11 -0
- package/dist/components/react/post-tab-header.js +53 -0
- package/dist/components/react/post-tab-panel.d.ts +11 -0
- package/dist/components/react/post-tab-panel.js +55 -0
- package/dist/components/react/post-tabs.d.ts +11 -0
- package/dist/components/react/post-tabs.js +197 -0
- package/dist/components/react/post-togglebutton.d.ts +11 -0
- package/dist/components/react/post-togglebutton.js +57 -0
- package/dist/components/react/post-tooltip-trigger.d.ts +11 -0
- package/dist/components/react/post-tooltip-trigger.js +5223 -0
- package/dist/components/react/post-tooltip.d.ts +11 -0
- package/dist/components/react/post-tooltip.js +115 -0
- package/dist/components/switch-variants.js +3 -0
- package/dist/docs.json +71 -35
- package/dist/esm/event-from-kraHE1r3.js +105 -0
- package/dist/esm/index-C8a0ddDa.js +4 -4
- package/dist/esm/index-VmK3ABCB.js +88 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-DO48NanC.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +7 -7
- package/dist/esm/post-avatar.entry.js +108 -81
- package/dist/esm/post-back-to-top.entry.js +3 -3
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -4
- package/dist/esm/post-breadcrumbs.entry.js +5 -5
- package/dist/esm/post-card-control.entry.js +5 -5
- package/dist/esm/post-closebutton_15.entry.js +135 -76
- package/dist/esm/post-collapsible_2.entry.js +5 -5
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-footer.entry.js +4 -4
- package/dist/esm/post-linkarea.entry.js +19 -8
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/post-rating.entry.js +4 -4
- package/dist/esm/post-tab-header.entry.js +4 -4
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/post-tooltip-trigger.entry.js +3 -3
- package/dist/esm/post-tooltip.entry.js +4 -4
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/{loader → dist/loader}/index.d.ts +1 -1
- package/dist/loader/index.es2017.js +1 -0
- package/{loader → dist/loader}/index.js +1 -1
- package/dist/post-components/p-01bc39c2.entry.js +1 -0
- package/dist/post-components/p-0dc1e940.entry.js +1 -0
- package/dist/post-components/p-16da91bc.entry.js +1 -0
- package/dist/post-components/p-26a04741.entry.js +1 -0
- package/dist/post-components/p-2f2f9b22.entry.js +1 -0
- package/dist/post-components/{p-45007aac.entry.js → p-33008981.entry.js} +1 -1
- package/dist/post-components/p-36358cd4.entry.js +1 -0
- package/dist/post-components/p-71c48d48.entry.js +1 -0
- package/dist/post-components/{p-e9802b56.entry.js → p-84395e1d.entry.js} +1 -1
- package/dist/post-components/p-848c10ac.entry.js +1 -0
- package/dist/post-components/{p-ab8017bb.entry.js → p-8d2e5814.entry.js} +1 -1
- package/dist/post-components/{p-a2fa5ce4.entry.js → p-9dbe6595.entry.js} +1 -1
- package/dist/post-components/p-DO48NanC.js +1 -0
- package/dist/post-components/{p-BWC0gtGU.js → p-VmK3ABCB.js} +1 -1
- package/dist/post-components/p-a982458f.entry.js +1 -0
- package/dist/post-components/{p-f67b616a.entry.js → p-b0aaa058.entry.js} +1 -1
- package/dist/post-components/{p-bbe02ba3.entry.js → p-bdeef760.entry.js} +1 -1
- package/dist/post-components/{p-2f698af4.entry.js → p-d221395c.entry.js} +1 -1
- package/dist/post-components/{p-57703aee.entry.js → p-e49aa78e.entry.js} +1 -1
- package/dist/post-components/p-eb405167.entry.js +1 -0
- package/dist/post-components/p-kraHE1r3.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/pop-in.d.ts +1 -0
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +3 -3
- package/dist/types/components/post-avatar/avatar-utils.d.ts +3 -0
- package/dist/types/components/post-avatar/post-avatar.d.ts +17 -13
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -6
- package/dist/types/components/post-header/post-header.d.ts +2 -0
- package/dist/types/components/post-icon/post-icon.d.ts +11 -0
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +6 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +2 -1
- package/dist/types/components/post-menu/post-menu.d.ts +7 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +6 -2
- package/dist/types/components/post-tabs/post-tabs.d.ts +2 -2
- package/dist/types/components.d.ts +19 -22
- package/dist/types/utils/component-on-ready.d.ts +2 -2
- package/hydrate/index.js +308 -201
- package/hydrate/index.mjs +308 -201
- package/package.json +24 -12
- package/dist/components/p-Z01QMrov.js +0 -3
- package/dist/esm/package-Z01QMrov.js +0 -3
- package/dist/post-components/p-031f7489.entry.js +0 -1
- package/dist/post-components/p-1e6a068a.entry.js +0 -1
- package/dist/post-components/p-2ca196d6.entry.js +0 -1
- package/dist/post-components/p-3adbdda7.entry.js +0 -1
- package/dist/post-components/p-7b8ab026.entry.js +0 -1
- package/dist/post-components/p-8U5GFtQP.js +0 -1
- package/dist/post-components/p-9428231b.entry.js +0 -1
- package/dist/post-components/p-Z01QMrov.js +0 -1
- package/dist/post-components/p-ac73ab00.entry.js +0 -1
- package/dist/post-components/p-c1cf39cb.entry.js +0 -1
- package/dist/post-components/p-d0d92071.entry.js +0 -1
- package/dist/post-components/p-e96239c4.entry.js +0 -1
- package/dist/prebuild.js +0 -26
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +0 -1
- package/loader/cdn.js +0 -1
- package/loader/index.cjs.js +0 -1
- package/loader/index.es2017.js +0 -1
- /package/dist/components/{p-CJ80BZ06.js → breakpoints.js} +0 -0
- /package/dist/components/{p-SbIC4aZX.js → fade.js} +0 -0
- /package/dist/components/{p-C35MCWIp.js → get-focusable-children.js} +0 -0
- /package/dist/components/{p-r4txK0AC.js → heading-levels.js} +0 -0
- /package/dist/components/{p-BLchVpF6.js → index.browser.js} +0 -0
- /package/dist/components/{p-CV7fm1rW.js → index2.js} +0 -0
- /package/dist/components/{p-C_2k3G1c.js → long-press-event.js} +0 -0
- /package/dist/components/{p-CBFgkSgY.js → react/p-CBFgkSgY.js} +0 -0
- /package/dist/components/{p-DjIHLduJ.js → react/p-DjIHLduJ.js} +0 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* long-press-event - v@version@
|
|
3
|
+
* Pure JavaScript long-press-event
|
|
4
|
+
* https://github.com/john-doherty/long-press-event
|
|
5
|
+
* @author John Doherty <www.johndoherty.info>
|
|
6
|
+
* @license MIT
|
|
7
|
+
*/
|
|
8
|
+
(function (window, document) {
|
|
9
|
+
|
|
10
|
+
// local timer object based on rAF
|
|
11
|
+
var timer = null;
|
|
12
|
+
|
|
13
|
+
// check if we're using a touch screen
|
|
14
|
+
var hasPointerEvents = (('PointerEvent' in window) || (window.navigator && 'msPointerEnabled' in window.navigator));
|
|
15
|
+
var isTouch = (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
|
|
16
|
+
|
|
17
|
+
// switch to pointer events or touch events if using a touch screen
|
|
18
|
+
var mouseDown = hasPointerEvents ? 'pointerdown' : isTouch ? 'touchstart' : 'mousedown';
|
|
19
|
+
var mouseUp = hasPointerEvents ? 'pointerup' : isTouch ? 'touchend' : 'mouseup';
|
|
20
|
+
var mouseMove = hasPointerEvents ? 'pointermove' : isTouch ? 'touchmove' : 'mousemove';
|
|
21
|
+
var mouseLeave = hasPointerEvents ? 'pointerleave' : isTouch ? 'touchleave' : 'mouseleave';
|
|
22
|
+
|
|
23
|
+
// track number of pixels the mouse moves during long press
|
|
24
|
+
var startX = 0; // mouse x position when timer started
|
|
25
|
+
var startY = 0; // mouse y position when timer started
|
|
26
|
+
var maxDiffX = 10; // max number of X pixels the mouse can move during long press before it is canceled
|
|
27
|
+
var maxDiffY = 10; // max number of Y pixels the mouse can move during long press before it is canceled
|
|
28
|
+
|
|
29
|
+
// patch CustomEvent to allow constructor creation (IE/Chrome)
|
|
30
|
+
if (typeof window.CustomEvent !== 'function') {
|
|
31
|
+
|
|
32
|
+
window.CustomEvent = function (event, params) {
|
|
33
|
+
|
|
34
|
+
params = params || { bubbles: false, cancelable: false, detail: undefined };
|
|
35
|
+
|
|
36
|
+
var evt = document.createEvent('CustomEvent');
|
|
37
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
38
|
+
return evt;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
window.CustomEvent.prototype = window.Event.prototype;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// requestAnimationFrame() shim by Paul Irish
|
|
45
|
+
window.requestAnimFrame = (function () {
|
|
46
|
+
return window.requestAnimationFrame ||
|
|
47
|
+
window.webkitRequestAnimationFrame ||
|
|
48
|
+
window.mozRequestAnimationFrame ||
|
|
49
|
+
window.oRequestAnimationFrame ||
|
|
50
|
+
window.msRequestAnimationFrame || function (callback) {
|
|
51
|
+
window.setTimeout(callback, 1000 / 60);
|
|
52
|
+
};
|
|
53
|
+
})();
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Behaves the same as setTimeout except uses requestAnimationFrame() where possible for better performance
|
|
57
|
+
* @param {function} fn The callback function
|
|
58
|
+
* @param {int} delay The delay in milliseconds
|
|
59
|
+
* @returns {object} handle to the timeout object
|
|
60
|
+
*/
|
|
61
|
+
function requestTimeout(fn, delay) {
|
|
62
|
+
|
|
63
|
+
if (!window.requestAnimationFrame && !window.webkitRequestAnimationFrame &&
|
|
64
|
+
!(window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame) && // Firefox 5 ships without cancel support
|
|
65
|
+
!window.oRequestAnimationFrame && !window.msRequestAnimationFrame) return window.setTimeout(fn, delay);
|
|
66
|
+
|
|
67
|
+
var start = new Date().getTime();
|
|
68
|
+
var handle = {};
|
|
69
|
+
|
|
70
|
+
var loop = function () {
|
|
71
|
+
var current = new Date().getTime();
|
|
72
|
+
var delta = current - start;
|
|
73
|
+
|
|
74
|
+
if (delta >= delay) {
|
|
75
|
+
fn.call();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
handle.value = requestAnimFrame(loop);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
handle.value = requestAnimFrame(loop);
|
|
83
|
+
|
|
84
|
+
return handle;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Behaves the same as clearTimeout except uses cancelRequestAnimationFrame() where possible for better performance
|
|
89
|
+
* @param {object} handle The callback function
|
|
90
|
+
* @returns {void}
|
|
91
|
+
*/
|
|
92
|
+
function clearRequestTimeout(handle) {
|
|
93
|
+
if (handle) {
|
|
94
|
+
window.cancelAnimationFrame ? window.cancelAnimationFrame(handle.value) :
|
|
95
|
+
window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(handle.value) :
|
|
96
|
+
window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(handle.value) : /* Support for legacy API */
|
|
97
|
+
window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(handle.value) :
|
|
98
|
+
window.oCancelRequestAnimationFrame ? window.oCancelRequestAnimationFrame(handle.value) :
|
|
99
|
+
window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(handle.value) :
|
|
100
|
+
clearTimeout(handle);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Fires the 'long-press' event on element
|
|
106
|
+
* @param {MouseEvent|PointerEvent|TouchEvent} originalEvent The original event being fired
|
|
107
|
+
* @returns {void}
|
|
108
|
+
*/
|
|
109
|
+
function fireLongPressEvent(originalEvent) {
|
|
110
|
+
|
|
111
|
+
clearLongPressTimer();
|
|
112
|
+
|
|
113
|
+
originalEvent = unifyEvent(originalEvent);
|
|
114
|
+
|
|
115
|
+
// fire the long-press event
|
|
116
|
+
var allowClickEvent = this.dispatchEvent(new CustomEvent('long-press', {
|
|
117
|
+
bubbles: true,
|
|
118
|
+
cancelable: true,
|
|
119
|
+
|
|
120
|
+
// custom event data (legacy)
|
|
121
|
+
detail: {
|
|
122
|
+
clientX: originalEvent.clientX,
|
|
123
|
+
clientY: originalEvent.clientY,
|
|
124
|
+
offsetX: originalEvent.offsetX,
|
|
125
|
+
offsetY: originalEvent.offsetY,
|
|
126
|
+
pageX: originalEvent.pageX,
|
|
127
|
+
pageY: originalEvent.pageY
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
// add coordinate data that would typically acompany a touch/click event
|
|
131
|
+
clientX: originalEvent.clientX,
|
|
132
|
+
clientY: originalEvent.clientY,
|
|
133
|
+
offsetX: originalEvent.offsetX,
|
|
134
|
+
offsetY: originalEvent.offsetY,
|
|
135
|
+
pageX: originalEvent.pageX,
|
|
136
|
+
pageY: originalEvent.pageY,
|
|
137
|
+
screenX: originalEvent.screenX,
|
|
138
|
+
screenY: originalEvent.screenY
|
|
139
|
+
}));
|
|
140
|
+
|
|
141
|
+
if (!allowClickEvent) {
|
|
142
|
+
// suppress the next click event if e.preventDefault() was called in long-press handler
|
|
143
|
+
document.addEventListener('click', function suppressEvent(e) {
|
|
144
|
+
document.removeEventListener('click', suppressEvent, true);
|
|
145
|
+
cancelEvent(e);
|
|
146
|
+
}, true);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* consolidates mouse, touch, and Pointer events
|
|
152
|
+
* @param {MouseEvent|PointerEvent|TouchEvent} e The original event being fired
|
|
153
|
+
* @returns {MouseEvent|PointerEvent|Touch}
|
|
154
|
+
*/
|
|
155
|
+
function unifyEvent(e) {
|
|
156
|
+
if (e.changedTouches !== undefined) {
|
|
157
|
+
return e.changedTouches[0];
|
|
158
|
+
}
|
|
159
|
+
return e;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* method responsible for starting the long press timer
|
|
164
|
+
* @param {event} e - event object
|
|
165
|
+
* @returns {void}
|
|
166
|
+
*/
|
|
167
|
+
function startLongPressTimer(e) {
|
|
168
|
+
|
|
169
|
+
clearLongPressTimer();
|
|
170
|
+
|
|
171
|
+
var el = e.target;
|
|
172
|
+
|
|
173
|
+
// get delay from html attribute if it exists, otherwise default to 1500
|
|
174
|
+
var longPressDelayInMs = parseInt(getNearestAttribute(el, 'data-long-press-delay', '1500'), 10); // default 1500
|
|
175
|
+
|
|
176
|
+
// start the timer
|
|
177
|
+
timer = requestTimeout(fireLongPressEvent.bind(el, e), longPressDelayInMs);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* method responsible for clearing a pending long press timer
|
|
182
|
+
* @param {event} e - event object
|
|
183
|
+
* @returns {void}
|
|
184
|
+
*/
|
|
185
|
+
function clearLongPressTimer(e) {
|
|
186
|
+
clearRequestTimeout(timer);
|
|
187
|
+
timer = null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Cancels the current event
|
|
192
|
+
* @param {object} e - browser event object
|
|
193
|
+
* @returns {void}
|
|
194
|
+
*/
|
|
195
|
+
function cancelEvent(e) {
|
|
196
|
+
e.stopImmediatePropagation();
|
|
197
|
+
e.preventDefault();
|
|
198
|
+
e.stopPropagation();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Starts the timer on mouse down and logs current position
|
|
203
|
+
* @param {object} e - browser event object
|
|
204
|
+
* @returns {void}
|
|
205
|
+
*/
|
|
206
|
+
function mouseDownHandler(e) {
|
|
207
|
+
startX = e.clientX;
|
|
208
|
+
startY = e.clientY;
|
|
209
|
+
startLongPressTimer(e);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* If the mouse moves n pixels during long-press, cancel the timer
|
|
214
|
+
* @param {object} e - browser event object
|
|
215
|
+
* @returns {void}
|
|
216
|
+
*/
|
|
217
|
+
function mouseMoveHandler(e) {
|
|
218
|
+
|
|
219
|
+
// calculate total number of pixels the pointer has moved
|
|
220
|
+
var diffX = Math.abs(startX - e.clientX);
|
|
221
|
+
var diffY = Math.abs(startY - e.clientY);
|
|
222
|
+
|
|
223
|
+
// if pointer has moved more than allowed, cancel the long-press timer and therefore the event
|
|
224
|
+
if (diffX >= maxDiffX || diffY >= maxDiffY) {
|
|
225
|
+
clearLongPressTimer();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Gets attribute off HTML element or nearest parent
|
|
231
|
+
* @param {object} el - HTML element to retrieve attribute from
|
|
232
|
+
* @param {string} attributeName - name of the attribute
|
|
233
|
+
* @param {any} defaultValue - default value to return if no match found
|
|
234
|
+
* @returns {any} attribute value or defaultValue
|
|
235
|
+
*/
|
|
236
|
+
function getNearestAttribute(el, attributeName, defaultValue) {
|
|
237
|
+
|
|
238
|
+
// walk up the dom tree looking for data-action and data-trigger
|
|
239
|
+
while (el && el !== document.documentElement) {
|
|
240
|
+
|
|
241
|
+
var attributeValue = el.getAttribute(attributeName);
|
|
242
|
+
|
|
243
|
+
if (attributeValue) {
|
|
244
|
+
return attributeValue;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
el = el.parentNode;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return defaultValue;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// hook events that clear a pending long press event
|
|
254
|
+
document.addEventListener(mouseUp, clearLongPressTimer, true);
|
|
255
|
+
document.addEventListener(mouseLeave, clearLongPressTimer, true);
|
|
256
|
+
document.addEventListener(mouseMove, mouseMoveHandler, true);
|
|
257
|
+
document.addEventListener('wheel', clearLongPressTimer, true);
|
|
258
|
+
document.addEventListener('scroll', clearLongPressTimer, true);
|
|
259
|
+
document.addEventListener('contextmenu', clearLongPressTimer, true);
|
|
260
|
+
|
|
261
|
+
// hook events that can trigger a long press event
|
|
262
|
+
document.addEventListener(mouseDown, mouseDownHandler, true); // <- start
|
|
263
|
+
|
|
264
|
+
}(window, document));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
4
|
import { b as checkRequiredAndOneOf } from './p-CV7fm1rW.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
6
|
-
import { E as EventFrom } from './p-
|
|
6
|
+
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
7
7
|
|
|
8
|
-
const postAccordionCss = ":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-block-start:calc(var(--post-device-border-width-default)*-1)}
|
|
8
|
+
const postAccordionCss = ":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-block-start:calc(var(--post-device-border-width-default)*-1)}";
|
|
9
9
|
|
|
10
10
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-
|
|
3
|
-
import { v as version } from './p-
|
|
2
|
+
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-BS0ZqwA-.js';
|
|
3
|
+
import { v as version } from './p-DO48NanC.js';
|
|
4
4
|
import { g as getFocusableChildren } from './p-C35MCWIp.js';
|
|
5
5
|
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
6
6
|
import './p-CJ80BZ06.js';
|
|
7
|
-
import { E as EventFrom } from './p-
|
|
7
|
+
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
8
8
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
9
9
|
|
|
10
|
-
const postMenuCss = "
|
|
10
|
+
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}";
|
|
11
11
|
|
|
12
12
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
13
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -59,18 +59,32 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
this.handlePostToggle = (event) => {
|
|
62
|
-
this.isVisible = event.detail;
|
|
62
|
+
this.isVisible = event.detail.isOpen;
|
|
63
63
|
this.toggleMenu.emit(this.isVisible);
|
|
64
64
|
requestAnimationFrame(() => {
|
|
65
65
|
if (this.isVisible) {
|
|
66
66
|
this.lastFocusedElement = this.root?.activeElement;
|
|
67
67
|
const menuItems = this.getSlottedItems();
|
|
68
|
-
if (
|
|
69
|
-
menuItems
|
|
68
|
+
if (event.detail.first) {
|
|
69
|
+
if (menuItems.length > 0) {
|
|
70
|
+
// Add role="menu" to the popovercontainer
|
|
71
|
+
this.host.setAttribute('role', 'menu');
|
|
72
|
+
// Add role="menuitem" to the focusable elements
|
|
73
|
+
menuItems.forEach(item => {
|
|
74
|
+
item.setAttribute('role', 'menuitem');
|
|
75
|
+
});
|
|
76
|
+
// Add aria-label to the menu
|
|
77
|
+
if (this.label)
|
|
78
|
+
this.host.setAttribute('aria-label', this.label);
|
|
79
|
+
}
|
|
70
80
|
}
|
|
81
|
+
menuItems[0].focus();
|
|
71
82
|
}
|
|
72
83
|
else if (this.lastFocusedElement) {
|
|
73
|
-
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
// This timeout is added for NVDA to announce the menu as collapsed
|
|
86
|
+
this.lastFocusedElement.focus();
|
|
87
|
+
}, 0);
|
|
74
88
|
}
|
|
75
89
|
});
|
|
76
90
|
};
|
|
@@ -181,7 +195,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
181
195
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
182
196
|
}
|
|
183
197
|
render() {
|
|
184
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: '7b7fe6fccd27d3ff12eae3094b1a55b9b9778eb1', "data-version": version }, h("post-popovercontainer", { key: '6dae2883febd1e96ae1b34518dd2e9c634fafecb', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'e19c107831b020aa0039ea7a18465e4bb72380c4', part: "menu" }, h("slot", { key: '9d9862e73dd222435d196e67c540bf8266952d94' })))));
|
|
185
199
|
}
|
|
186
200
|
get host() { return this; }
|
|
187
201
|
static get watchers() { return {
|
|
@@ -190,6 +204,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
190
204
|
static get style() { return postMenuCss; }
|
|
191
205
|
}, [1, "post-menu", {
|
|
192
206
|
"placement": [1],
|
|
207
|
+
"label": [1],
|
|
193
208
|
"isVisible": [32],
|
|
194
209
|
"toggle": [64],
|
|
195
210
|
"show": [64],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
3
|
|
|
4
4
|
const postMenuItemCss = "post-menu-item button{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){post-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem 1rem;gap:.5rem;font-size:1rem;color:#050400;transition:color 250ms cubic-bezier(0.4, 0, 0.2, 1);outline-offset:0;padding-block:.75rem}post-menu-item button:has(post-icon:last-child),post-menu-item a:has(post-icon:last-child){padding-inline-end:.75rem}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem}}post-menu-item button>post-icon:last-child,post-menu-item a>post-icon:last-child{margin-inline-start:.5rem}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:-2px !important;border-radius:4px}post-menu-item button::after,post-menu-item a::after{content:\"\";display:block;position:absolute;inset-block-end:0;inset-inline:0;height:3px;background-color:rgba(0,0,0,0);transition:background-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-menu-item button:hover,post-menu-item a:hover{color:#504f4b}post-menu-item button:hover::after,post-menu-item a:hover::after{background-color:currentColor}";
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '9d6015291b82728739de4263a62a59ad4a99c94d', "data-version": version }, h("slot", { key: '51f5ff356cddffc806639cc343437500f898065e' })));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return postMenuItemCss; }
|
|
15
15
|
}, [4, "post-menu-item"]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
3
|
import { a as checkEmptyOrUrl } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-Amg0f2Yo.js';
|
|
6
6
|
|
|
7
7
|
const postBreadcrumbItemCss = ":host{display:flex;align-items:center;justify-content:start;gap:var(--post-device-spacing-gap-inline-5)}:host post-icon{box-sizing:border-box;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}.breadcrumb-item{white-space:nowrap;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item{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}.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}";
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
|
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '9ccdcf67335a106fd70e1d756a941736827454c0', "data-version": version }, h("post-icon", { key: 'e0c9479626737582764a4ecd55612d3d9ee4ae21', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '75f7b88edee2dda2907429c3c1ab55efe9e5137b', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: '1e59f84b6a9fd8b73372371e79fff43e44bd88c6' }))));
|
|
48
48
|
}
|
|
49
49
|
get host() { return this; }
|
|
50
50
|
static get watchers() { return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const fadeDuration = 200;
|
|
2
|
+
const fadedOutKeyframe = { opacity: '0' };
|
|
3
|
+
const fadedInKeyframe = { opacity: '1' };
|
|
4
|
+
function fadeIn(el) {
|
|
5
|
+
return el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
|
|
6
|
+
}
|
|
7
|
+
function fadeOut(el) {
|
|
8
|
+
return el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { fadeIn as a, fadeOut as f };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @returns true if the event should be processed, false otherwise
|
|
8
8
|
*/
|
|
9
9
|
function shouldProcessEvent(event, tag, host, ignoreNestedComponents) {
|
|
10
|
-
if (!(event instanceof
|
|
10
|
+
if (!(event instanceof Event && event.target instanceof HTMLElement))
|
|
11
11
|
return false;
|
|
12
12
|
const eventTarget = event.target;
|
|
13
13
|
if (eventTarget.localName !== tag)
|
|
@@ -38,7 +38,7 @@ function EventFrom(tag, option = { ignoreNestedComponents: true }) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
// Creates a hidden storage property for the original method using a
|
|
41
|
+
// Creates a hidden storage property for the original method using a
|
|
42
42
|
// modified key format (__[property]_original) to avoid naming conflicts
|
|
43
43
|
const privateKey = `__${propertyKey}_original`;
|
|
44
44
|
// Create hidden storage for original method
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
4
|
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
6
|
-
import { E as EventFrom } from './p-
|
|
6
|
+
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
7
7
|
import { n as nanoid } from './p-BLchVpF6.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './p-
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
10
|
-
import { d as defineCustomElement$1 } from './p-
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-BMdFdJWl.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-B6vPT8S3.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-Amg0f2Yo.js';
|
|
11
11
|
|
|
12
|
-
const postAccordionItemCss = ".accordion-item::after{display:block;content:\"\";margin-block-start:calc(var(--post-device-border-width-default)*-1);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-item:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-item:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black)}.accordion-button{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;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;inset-block-end:auto;border-block-start-width:var(--post-
|
|
12
|
+
const postAccordionItemCss = ".accordion-item::after{display:block;content:\"\";margin-block-start:calc(var(--post-device-border-width-default)*-1);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-item:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-item:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black)}.accordion-button{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;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;inset-block-end:auto;border-block-start-width:var(--post-device-border-width-default);border-block-start-style:var(--post-core-border-style-solid);border-block-start-color:var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-button{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}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}";
|
|
13
13
|
|
|
14
14
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15
15
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -59,10 +59,10 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
59
59
|
render() {
|
|
60
60
|
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
61
61
|
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: 'b98847d19894430b6f65130aebf8673a45afd1e6', id: this.id, "data-version": version }, h("div", { key: 'f26f9d3a4a1f59db23b4698b321e28e112c3eed0', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '14bdacce04d67a03655f600feeaeec065e0fc198', for: `${this.id}--collapse` }, h(HeadingTag, { key: '7a07a70d172306ce37f8bd0143b21ed7ec0cab8a', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '5ad0698a62df5c4b2c0a77ff622090b20f348e9c', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '6e5fcb0c9efa8a57e05fd162c72b9c170a8210c6', class: {
|
|
63
63
|
'logo-container': true,
|
|
64
64
|
'has-image': !!this.slottedLogo,
|
|
65
|
-
} }, h("slot", { key: '
|
|
65
|
+
} }, h("slot", { key: '41a1409f723bf52de893324ce45d4e7f31eb8908', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: '7186adfe4a4fe67f4dbaeb7569820d0d06c18428', name: "header" }), h("post-icon", { key: 'fbfcbdc9947a8c7cf80d861aba3a77be0dff91d1', name: "2051" })))), h("post-collapsible", { key: '5de19aab5eb0134b7c3e7f43e5c2da0cb8413908', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '5112ba8604ea177af4d88033f682c2a4cc6c4ffd', class: "accordion-body", part: "body" }, h("slot", { key: 'd70ab76842fced3f7dec812471685071e377bc61' }))))));
|
|
66
66
|
}
|
|
67
67
|
get host() { return this; }
|
|
68
68
|
static get watchers() { return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostAccordionItem extends Components.PostAccordionItem, HTMLElement {}
|
|
4
|
+
export const PostAccordionItem: {
|
|
5
|
+
prototype: PostAccordionItem;
|
|
6
|
+
new (): PostAccordionItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostAccordion extends Components.PostAccordion, HTMLElement {}
|
|
4
|
+
export const PostAccordion: {
|
|
5
|
+
prototype: PostAccordion;
|
|
6
|
+
new (): PostAccordion;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../../types/components";
|
|
2
|
+
|
|
3
|
+
interface PostAvatar extends Components.PostAvatar, HTMLElement {}
|
|
4
|
+
export const PostAvatar: {
|
|
5
|
+
prototype: PostAvatar;
|
|
6
|
+
new (): PostAvatar;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|