@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.57
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/{components/react/p-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
- package/dist/cjs/debounce-BsIBi_-2.js +13 -0
- package/dist/cjs/environment-BQE9Unf_.js +52 -0
- package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
- package/dist/cjs/fade-CPQhl1fP.js +26 -0
- package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
- package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
- package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
- package/dist/cjs/{index-B4gYpuJF.js → index-B4rc1pqu.js} +2150 -292
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-DkJrv93P.js → package-uQ5oiSiN.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +19 -15
- package/dist/cjs/post-avatar.cjs.entry.js +27 -17
- package/dist/cjs/post-back-to-top.cjs.entry.js +23 -43
- package/dist/cjs/post-banner.cjs.entry.js +15 -12
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +14 -12
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
- package/dist/cjs/post-card-control.cjs.entry.js +42 -26
- package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +618 -531
- package/dist/cjs/post-collapsible_2.cjs.entry.js +41 -37
- package/dist/cjs/post-components.cjs.js +3 -3
- package/dist/cjs/post-env-test.cjs.entry.js +15 -0
- package/dist/cjs/post-footer.cjs.entry.js +24 -20
- package/dist/cjs/post-linkarea.cjs.entry.js +5 -5
- package/dist/cjs/post-pagination.cjs.entry.js +615 -0
- package/dist/cjs/post-popover-trigger.cjs.entry.js +54 -34
- package/dist/cjs/post-popover.cjs.entry.js +26 -17
- package/dist/cjs/post-rating.cjs.entry.js +24 -18
- package/dist/cjs/post-stepper-item.cjs.entry.js +5 -5
- package/dist/cjs/post-stepper.cjs.entry.js +40 -29
- package/dist/cjs/post-tab-item.cjs.entry.js +51 -0
- package/dist/cjs/post-tab-panel.cjs.entry.js +13 -11
- package/dist/cjs/post-tabs.cjs.entry.js +195 -40
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -11
- package/dist/cjs/post-tooltip.cjs.entry.js +14 -12
- package/dist/cjs/utils-s05L2ulk.js +26 -0
- package/dist/collection/animations/collapse.js +3 -3
- package/dist/collection/animations/fade-slide.js +33 -0
- package/dist/collection/animations/fade.js +19 -7
- package/dist/collection/animations/index.js +2 -0
- package/dist/collection/animations/slide.js +25 -21
- package/dist/collection/animations/types.js +14 -0
- package/dist/collection/animations/utils.js +8 -0
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +5 -4
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +9 -8
- package/dist/collection/components/post-avatar/post-avatar.js +11 -11
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +15 -15
- package/dist/collection/components/post-banner/post-banner.css +4 -1
- package/dist/collection/components/post-banner/post-banner.js +6 -5
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +3 -3
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -29
- package/dist/collection/components/post-card-control/post-card-control.js +18 -18
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.js +4 -3
- package/dist/collection/components/post-collapsible/post-collapsible.js +28 -28
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +3 -3
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +18 -16
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +144 -82
- package/dist/collection/components/post-icon/post-icon.js +18 -16
- package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
- package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +45 -36
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
- package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +24 -23
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-logo/post-logo.css +3 -1
- package/dist/collection/components/post-logo/post-logo.js +3 -3
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +81 -75
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +39 -38
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
- package/dist/collection/components/post-pagination/post-pagination.css +1 -0
- package/dist/collection/components/post-pagination/post-pagination.js +838 -0
- package/dist/collection/components/post-popover/post-popover.js +22 -16
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +45 -29
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +82 -131
- package/dist/collection/components/post-rating/post-rating.js +7 -7
- package/dist/collection/components/post-stepper/post-stepper.js +38 -35
- package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
- package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +10 -10
- package/dist/collection/components/post-tabs/post-tabs.js +232 -59
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +2 -2
- package/dist/collection/components/post-tooltip/post-tooltip.js +9 -27
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +4 -4
- package/dist/collection/utils/environment.js +47 -2
- package/dist/collection/utils/event-from.js +2 -2
- package/dist/collection/utils/get-focusable-children.js +29 -21
- package/dist/collection/utils/is-motion-reduced.js +1 -1
- package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
- package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
- package/dist/component-names.json +4 -5
- package/dist/components/breakpoints.js +1 -178
- package/dist/components/debounce.js +1 -0
- package/dist/components/environment.js +1 -0
- package/dist/components/event-from.js +1 -119
- package/dist/components/fade-slide.js +1 -0
- package/dist/components/fade.js +1 -11
- package/dist/components/focusable.js +1 -5018
- package/dist/components/get-focusable-children.js +1 -64
- package/dist/components/get-root.js +1 -15
- package/dist/components/heading-levels.js +1 -3
- package/dist/components/index.browser.js +1 -14
- package/dist/components/index.d.ts +11 -10
- package/dist/components/index.js +1 -39
- package/dist/components/long-press-event.js +1 -257
- package/dist/components/package.js +1 -3
- package/dist/components/post-accordion-item.js +1 -6
- package/dist/components/post-accordion-item2.js +1 -113
- package/dist/components/post-accordion.js +1 -6
- package/dist/components/post-accordion2.js +1 -138
- package/dist/components/post-avatar.js +1 -217
- package/dist/components/post-back-to-top.js +1 -144
- package/dist/components/post-banner.js +1 -98
- package/dist/components/post-breadcrumb-item.js +1 -6
- package/dist/components/post-breadcrumb-item2.js +1 -79
- package/dist/components/post-breadcrumbs.js +1 -196
- package/dist/components/post-card-control.js +1 -326
- package/dist/components/post-closebutton.js +1 -6
- package/dist/components/post-closebutton2.js +1 -77
- package/dist/components/post-collapsible-trigger.js +1 -6
- package/dist/components/post-collapsible-trigger2.js +1 -136
- package/dist/components/post-collapsible.js +1 -6
- package/dist/components/post-collapsible2.js +1 -110
- package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
- package/dist/components/post-env-test.js +1 -0
- package/dist/components/post-footer.js +1 -116
- package/dist/components/post-header.js +1 -372
- package/dist/components/post-icon.js +1 -6
- package/dist/components/post-icon2.js +1 -159
- package/dist/components/post-language-menu-item.d.ts +11 -0
- package/dist/components/post-language-menu-item.js +1 -0
- package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
- package/dist/components/post-language-menu.js +1 -0
- package/dist/components/post-linkarea.js +1 -58
- package/dist/components/post-logo.js +1 -58
- package/dist/components/post-mainnavigation.js +1 -180
- package/dist/components/post-megadropdown-trigger.js +1 -136
- package/dist/components/post-megadropdown.js +1 -267
- package/dist/components/post-menu-item.js +1 -6
- package/dist/components/post-menu-item2.js +1 -30
- package/dist/components/post-menu-trigger.js +1 -6
- package/dist/components/post-menu-trigger2.js +1 -110
- package/dist/components/post-menu.js +1 -6
- package/dist/components/post-menu2.js +1 -242
- package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
- package/dist/components/post-pagination.js +1 -0
- package/dist/components/post-popover-trigger.js +1 -132
- package/dist/components/post-popover.js +1 -118
- package/dist/components/post-popovercontainer.js +1 -6
- package/dist/components/post-popovercontainer2.js +1 -3127
- package/dist/components/post-rating.js +1 -148
- package/dist/components/post-stepper-item.js +1 -33
- package/dist/components/post-stepper.js +1 -134
- package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
- package/dist/components/post-tab-item.js +1 -0
- package/dist/components/post-tab-panel.js +1 -54
- package/dist/components/post-tabs.js +1 -196
- package/dist/components/post-togglebutton.js +1 -56
- package/dist/components/post-togglebutton2.js +1 -0
- package/dist/components/post-tooltip-trigger.js +1 -206
- package/dist/components/post-tooltip.js +1 -114
- package/dist/components/react/index.d.ts +2 -0
- package/dist/components/react/index.js +1 -2315
- package/dist/components/react/p-B8YiQ3mz.js +1 -0
- package/dist/components/react/p-BC5nlBvn.js +1 -0
- package/dist/components/react/p-BLchVpF6.js +1 -14
- package/dist/components/react/p-BVCjnh6Q.js +1 -0
- package/dist/{post-components/p-CBFgkSgY.js → components/react/p-BVGcVycs.js} +1 -1
- package/dist/components/react/p-B_XPj2c8.js +1 -0
- package/dist/components/react/p-BllOMLDs.js +1 -0
- package/dist/components/react/p-BmRNjQUZ.js +1 -0
- package/dist/components/react/p-ByFh05IW.js +1 -0
- package/dist/components/react/p-C9hMpmsD.js +1 -0
- package/dist/components/react/p-CJ13r5fi.js +1 -0
- package/dist/components/react/p-CZvbetqX.js +1 -0
- package/dist/components/react/p-C_2k3G1c.js +1 -257
- package/dist/components/react/p-CoDiS_Ik.js +1 -0
- package/dist/components/react/p-Cou17ld8.js +1 -0
- package/dist/components/react/p-D5knoiyy.js +1 -0
- package/dist/components/react/p-D9DDtvFM.js +1 -0
- package/dist/components/react/p-DY2U5CQt.js +1 -0
- package/dist/components/react/p-DjIHLduJ.js +1 -3
- package/dist/components/react/p-DpATRD2W.js +1 -0
- package/dist/components/react/p-FxUVQ4Tx.js +1 -0
- package/dist/components/react/p-HygIVKXC.js +1 -5018
- package/dist/components/react/p-YR7U0Z_g.js +1 -0
- package/dist/components/react/p-ZeKXASQs.js +1 -0
- package/dist/components/react/p-r4txK0AC.js +1 -3
- package/dist/components/react/p-sSn0kXFi.js +1 -0
- package/dist/components/react/post-accordion-item.js +1 -6
- package/dist/components/react/post-accordion.js +1 -6
- package/dist/components/react/post-avatar.js +1 -218
- package/dist/components/react/post-back-to-top.js +1 -145
- package/dist/components/react/post-banner.js +1 -99
- package/dist/components/react/post-breadcrumb-item.js +1 -6
- package/dist/components/react/post-breadcrumbs.js +1 -197
- package/dist/components/react/post-card-control.js +1 -327
- package/dist/components/react/post-closebutton.js +1 -6
- package/dist/components/react/post-collapsible-trigger.js +1 -6
- package/dist/components/react/post-collapsible.js +1 -6
- package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
- package/dist/components/react/post-env-test.js +1 -0
- package/dist/components/react/post-footer.js +1 -117
- package/dist/components/react/post-header.js +1 -373
- package/dist/components/react/post-icon.js +1 -6
- package/dist/components/react/post-language-menu-item.d.ts +11 -0
- package/dist/components/react/post-language-menu-item.js +1 -0
- package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
- package/dist/components/react/post-language-menu.js +1 -0
- package/dist/components/react/post-linkarea.js +1 -59
- package/dist/components/react/post-logo.js +1 -59
- package/dist/components/react/post-mainnavigation.js +1 -181
- package/dist/components/react/post-megadropdown-trigger.js +1 -137
- package/dist/components/react/post-megadropdown.js +1 -268
- package/dist/components/react/post-menu-item.js +1 -6
- package/dist/components/react/post-menu-trigger.js +1 -6
- package/dist/components/react/post-menu.js +1 -6
- package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
- package/dist/components/react/post-pagination.js +1 -0
- package/dist/components/react/post-popover-trigger.js +1 -133
- package/dist/components/react/post-popover.js +1 -119
- package/dist/components/react/post-popovercontainer.js +1 -6
- package/dist/components/react/post-rating.js +1 -149
- package/dist/components/react/post-stepper-item.js +1 -34
- package/dist/components/react/post-stepper.js +1 -135
- package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
- package/dist/components/react/post-tab-item.js +1 -0
- package/dist/components/react/post-tab-panel.js +1 -55
- package/dist/components/react/post-tabs.js +1 -197
- package/dist/components/react/post-togglebutton.js +1 -57
- package/dist/components/react/post-tooltip-trigger.js +1 -207
- package/dist/components/react/post-tooltip.js +1 -115
- package/dist/components/switch-variants.js +1 -3
- package/dist/components/utils.js +1 -0
- package/dist/docs.d.ts +11 -0
- package/dist/docs.json +873 -631
- package/dist/{cjs/breakpoints-CEkeixld.js → esm/breakpoints-DYoSKGHO.js} +89 -6
- package/dist/esm/debounce-C9hMpmsD.js +11 -0
- package/dist/esm/environment-CEmnRoA6.js +49 -0
- package/dist/{components/react/p-CzIKqBrS.js → esm/event-from-rEfV4v4a.js} +2 -2
- package/dist/esm/fade-DsgPYmAa.js +24 -0
- package/dist/esm/fade-slide-CvOvauo9.js +36 -0
- package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
- package/dist/{components/react/p-CBFgkSgY.js → esm/get-root-CXfAA093.js} +1 -1
- package/dist/esm/{index-wEFJ-c34.js → index-CDZBzSdV.js} +2150 -292
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-CZvbetqX.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +17 -13
- package/dist/esm/post-avatar.entry.js +22 -12
- package/dist/esm/post-back-to-top.entry.js +23 -43
- package/dist/esm/post-banner.entry.js +14 -11
- package/dist/esm/post-breadcrumb-item_2.entry.js +13 -11
- package/dist/esm/post-breadcrumbs.entry.js +31 -32
- package/dist/esm/post-card-control.entry.js +32 -16
- package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +599 -510
- package/dist/esm/post-collapsible_2.entry.js +38 -34
- package/dist/esm/post-components.js +4 -4
- package/dist/esm/post-env-test.entry.js +13 -0
- package/dist/esm/post-footer.entry.js +21 -17
- package/dist/esm/post-linkarea.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +613 -0
- package/dist/esm/post-popover-trigger.entry.js +52 -32
- package/dist/esm/post-popover.entry.js +25 -16
- package/dist/esm/post-rating.entry.js +16 -10
- package/dist/esm/post-stepper-item.entry.js +5 -5
- package/dist/esm/post-stepper.entry.js +39 -28
- package/dist/esm/post-tab-item.entry.js +49 -0
- package/dist/esm/post-tab-panel.entry.js +13 -11
- package/dist/esm/post-tabs.entry.js +195 -40
- package/dist/esm/post-tooltip-trigger.entry.js +10 -8
- package/dist/esm/post-tooltip.entry.js +13 -11
- package/dist/esm/utils-CoDiS_Ik.js +24 -0
- package/dist/post-components/p-09ba7cf9.entry.js +1 -0
- package/dist/post-components/p-0c091898.entry.js +1 -0
- package/dist/post-components/{p-cd03e6f2.entry.js → p-0e97fcfd.entry.js} +1 -1
- package/dist/post-components/p-296f1dd5.entry.js +1 -0
- package/dist/post-components/p-32ad2b21.entry.js +1 -0
- package/dist/post-components/p-366c28cb.entry.js +1 -0
- package/dist/post-components/p-41ae68d5.entry.js +1 -0
- package/dist/post-components/p-448e7265.entry.js +1 -0
- package/dist/post-components/p-554da188.entry.js +1 -0
- package/dist/post-components/p-5912f8f1.entry.js +1 -0
- package/dist/post-components/p-790f300d.entry.js +1 -0
- package/dist/post-components/p-7ed5a493.entry.js +1 -0
- package/dist/post-components/p-85bea1b6.entry.js +1 -0
- package/dist/post-components/p-8bcff4d2.entry.js +1 -0
- package/dist/post-components/p-9dc9c245.entry.js +1 -0
- package/dist/post-components/p-B7ebLhHc.js +1 -0
- package/dist/post-components/p-BVCjnh6Q.js +1 -0
- package/dist/post-components/p-BXNs2_sw.js +1 -0
- package/dist/post-components/p-C9hMpmsD.js +1 -0
- package/dist/post-components/p-CDZBzSdV.js +2 -0
- package/dist/post-components/p-CEmnRoA6.js +1 -0
- package/dist/post-components/p-CZvbetqX.js +1 -0
- package/dist/post-components/p-CoDiS_Ik.js +1 -0
- package/dist/post-components/p-D5knoiyy.js +1 -0
- package/dist/post-components/p-DI-h_mEL.js +1 -0
- package/dist/post-components/p-a06f9695.entry.js +1 -0
- package/dist/post-components/p-a191f1df.entry.js +1 -0
- package/dist/post-components/p-c5d19d62.entry.js +1 -0
- package/dist/post-components/{p-24dc54d1.entry.js → p-c8c4d05b.entry.js} +1 -1
- package/dist/post-components/{p-57288cb2.entry.js → p-d1a5c980.entry.js} +1 -1
- package/dist/post-components/p-d4e2c556.entry.js +1 -0
- package/dist/post-components/p-f96a310c.entry.js +1 -0
- package/dist/post-components/p-fab2327d.entry.js +1 -0
- package/dist/post-components/p-rEfV4v4a.js +1 -0
- package/dist/post-components/post-components.css +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/prebuild.js +46 -0
- package/dist/types/animations/collapse.d.ts +1 -0
- package/dist/types/animations/fade-slide.d.ts +11 -0
- package/dist/types/animations/fade.d.ts +2 -2
- package/dist/types/animations/index.d.ts +2 -0
- package/dist/types/animations/slide.d.ts +9 -2
- package/dist/types/animations/types.d.ts +13 -0
- package/dist/types/animations/utils.d.ts +2 -0
- package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
- package/dist/types/components/post-footer/post-footer.d.ts +4 -4
- package/dist/types/components/post-header/post-header.d.ts +23 -13
- package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +12 -11
- package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
- package/dist/types/components/post-menu/post-menu.d.ts +4 -4
- package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
- package/dist/types/components/post-popover/post-popover.d.ts +4 -3
- package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -21
- package/dist/types/components/post-rating/post-rating.d.ts +1 -1
- package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
- package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
- package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -5
- package/dist/types/components.d.ts +322 -219
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
- package/dist/types/stencil-public-runtime.d.ts +147 -10
- package/dist/types/types/heading-levels.d.ts +1 -1
- package/dist/types/utils/environment.d.ts +25 -1
- package/dist/types/utils/get-focusable-children.d.ts +2 -2
- package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
- package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
- package/hydrate/index.d.ts +14 -0
- package/hydrate/index.js +7494 -2714
- package/hydrate/index.mjs +7493 -2715
- package/package.json +7 -8
- package/dist/cjs/fade-nS5zzDQS.js +0 -14
- package/dist/cjs/index-UFKR6Ok0.js +0 -98
- package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
- package/dist/collection/animations/slide-and-fade.js +0 -25
- package/dist/collection/components/post-language-option/post-language-option.css +0 -1
- package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
- package/dist/collection/components/post-list/post-list.css +0 -1
- package/dist/collection/components/post-list/post-list.js +0 -97
- package/dist/collection/components/post-list-item/post-list-item.css +0 -1
- package/dist/collection/components/post-list-item/post-list-item.js +0 -26
- package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
- package/dist/components/index2.js +0 -89
- package/dist/components/post-language-option.d.ts +0 -11
- package/dist/components/post-language-option.js +0 -99
- package/dist/components/post-language-switch.js +0 -157
- package/dist/components/post-list-item.js +0 -38
- package/dist/components/post-list.js +0 -61
- package/dist/components/post-tab-header.js +0 -52
- package/dist/components/react/p-BVXiQdHq.js +0 -64
- package/dist/components/react/p-BhxZzOEC.js +0 -3
- package/dist/components/react/p-CSAMO7iJ.js +0 -243
- package/dist/components/react/p-CYkf_7Y5.js +0 -89
- package/dist/components/react/p-Ccrl2AQn.js +0 -111
- package/dist/components/react/p-CewRvBtg.js +0 -139
- package/dist/components/react/p-Cwiv86_f.js +0 -111
- package/dist/components/react/p-D2waO0Zc.js +0 -31
- package/dist/components/react/p-DBPOV12C.js +0 -160
- package/dist/components/react/p-DVGEExot.js +0 -3128
- package/dist/components/react/p-Djvj8fd2.js +0 -80
- package/dist/components/react/p-LtiDhYis.js +0 -137
- package/dist/components/react/p-SbIC4aZX.js +0 -11
- package/dist/components/react/p-XrZzCOKT.js +0 -78
- package/dist/components/react/p-v3pOrMNQ.js +0 -114
- package/dist/components/react/post-language-option.js +0 -100
- package/dist/components/react/post-language-switch.d.ts +0 -11
- package/dist/components/react/post-language-switch.js +0 -158
- package/dist/components/react/post-list-item.js +0 -39
- package/dist/components/react/post-list.js +0 -62
- package/dist/components/react/post-tab-header.js +0 -53
- package/dist/esm/breakpoints-CJ80BZ06.js +0 -178
- package/dist/esm/event-from-CzIKqBrS.js +0 -119
- package/dist/esm/fade-SbIC4aZX.js +0 -11
- package/dist/esm/get-root-BkQ3CrLq.js +0 -15
- package/dist/esm/index-Beaz8wEe.js +0 -89
- package/dist/esm/package-BhxZzOEC.js +0 -3
- package/dist/esm/post-tab-header.entry.js +0 -29
- package/dist/post-components/p-01e678c9.entry.js +0 -1
- package/dist/post-components/p-034a453f.entry.js +0 -1
- package/dist/post-components/p-15a4cdbf.entry.js +0 -1
- package/dist/post-components/p-2a2030bf.entry.js +0 -1
- package/dist/post-components/p-2ed84cc3.entry.js +0 -1
- package/dist/post-components/p-3228968f.entry.js +0 -1
- package/dist/post-components/p-3c01ddfe.entry.js +0 -1
- package/dist/post-components/p-748b1f01.entry.js +0 -1
- package/dist/post-components/p-7745e46e.entry.js +0 -1
- package/dist/post-components/p-7f635728.entry.js +0 -1
- package/dist/post-components/p-82c178a3.entry.js +0 -1
- package/dist/post-components/p-9b5f8319.entry.js +0 -1
- package/dist/post-components/p-Beaz8wEe.js +0 -1
- package/dist/post-components/p-BhxZzOEC.js +0 -1
- package/dist/post-components/p-CJ80BZ06.js +0 -1
- package/dist/post-components/p-D9ZHp2FP.js +0 -1
- package/dist/post-components/p-SbIC4aZX.js +0 -1
- package/dist/post-components/p-a9644e54.entry.js +0 -1
- package/dist/post-components/p-af030a3a.entry.js +0 -1
- package/dist/post-components/p-b8ba8139.entry.js +0 -1
- package/dist/post-components/p-db935e8e.entry.js +0 -1
- package/dist/post-components/p-e62e1f57.entry.js +0 -1
- package/dist/post-components/p-fb4b1641.entry.js +0 -1
- package/dist/post-components/p-wEFJ-c34.js +0 -2
- package/dist/types/animations/slide-and-fade.d.ts +0 -2
- package/dist/types/components/post-list/post-list.d.ts +0 -24
- package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
- /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
- /package/dist/{post-components/p-CzIKqBrS.js → components/react/p-rEfV4v4a.js} +0 -0
- /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as checkRequiredAndType, d as checkEmptyOrOneOf } from './index2.js';
|
|
3
|
-
import './breakpoints.js';
|
|
4
|
-
import { E as EventFrom } from './event-from.js';
|
|
5
|
-
import { v as version } from './package.js';
|
|
6
|
-
import { S as SWITCH_VARIANTS } from './switch-variants.js';
|
|
7
|
-
import { n as nanoid } from './index.browser.js';
|
|
8
|
-
import { d as defineCustomElement$5 } from './post-icon2.js';
|
|
9
|
-
import { d as defineCustomElement$4 } from './post-menu2.js';
|
|
10
|
-
import { d as defineCustomElement$3 } from './post-menu-trigger2.js';
|
|
11
|
-
import { d as defineCustomElement$2 } from './post-popovercontainer2.js';
|
|
12
|
-
|
|
13
|
-
const postLanguageSwitchCss = ":host{display:flex !important;flex-wrap:wrap;gap:.5rem}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;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;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{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}.post-language-switch-trigger: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){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger: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){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{border:1px solid ButtonBorder}.post-language-switch-trigger[aria-expanded=true] post-icon,.post-language-switch-trigger:hover post-icon{color:HighlightText}}post-menu::part(menu){padding-block:0}.post-language-switch-list{margin-top:1rem}";
|
|
14
|
-
|
|
15
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
16
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
17
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
18
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
19
|
-
else
|
|
20
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
21
|
-
if (d = decorators[i])
|
|
22
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
23
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
24
|
-
};
|
|
25
|
-
const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguageSwitch extends HTMLElement {
|
|
26
|
-
constructor() {
|
|
27
|
-
super();
|
|
28
|
-
this.__registerHost();
|
|
29
|
-
this.__attachShadow();
|
|
30
|
-
this.menuId = `p${nanoid(11)}`;
|
|
31
|
-
this.listSpanId = `list-span-${nanoid(11)}`;
|
|
32
|
-
/**
|
|
33
|
-
* Whether the component is rendered as a list or a menu
|
|
34
|
-
*/
|
|
35
|
-
this.variant = 'list';
|
|
36
|
-
}
|
|
37
|
-
get languageOptions() {
|
|
38
|
-
return Array.from(this.host.querySelectorAll('post-language-option'));
|
|
39
|
-
}
|
|
40
|
-
validateCaption() {
|
|
41
|
-
checkRequiredAndType(this, 'caption', 'string');
|
|
42
|
-
}
|
|
43
|
-
validateDescription() {
|
|
44
|
-
checkRequiredAndType(this, 'description', 'string');
|
|
45
|
-
}
|
|
46
|
-
validateVariant() {
|
|
47
|
-
checkEmptyOrOneOf(this, 'variant', SWITCH_VARIANTS);
|
|
48
|
-
this.updateChildrenVariant();
|
|
49
|
-
}
|
|
50
|
-
componentDidLoad() {
|
|
51
|
-
this.validateCaption();
|
|
52
|
-
this.validateDescription();
|
|
53
|
-
this.validateVariant();
|
|
54
|
-
// Initially set variants and active language
|
|
55
|
-
// Handles cases where the language-switch is rendered after the language-options have been rendered
|
|
56
|
-
this.updateChildrenVariant();
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Listen for the postChange event and guard it to run only for events originating from a <post-language-option> element.
|
|
60
|
-
*/
|
|
61
|
-
handlePostChange(event) {
|
|
62
|
-
this.activeLang = event.detail;
|
|
63
|
-
// Update the active state in the children post-language-option components
|
|
64
|
-
this.languageOptions.forEach(lang => {
|
|
65
|
-
if (lang.code && lang.code === this.activeLang) {
|
|
66
|
-
lang.setAttribute('active', '');
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
lang.removeAttribute('active');
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
// Hides the dropdown when an option has been clicked
|
|
73
|
-
if (this.variant === 'menu') {
|
|
74
|
-
const menu = this.host.shadowRoot.querySelector('post-menu');
|
|
75
|
-
menu.hide();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Handles cases where the language switch is being rendered before options are available
|
|
80
|
-
* @param event Initially emitted by <post-langauge-option>
|
|
81
|
-
*/
|
|
82
|
-
handleInitiallyActive(event) {
|
|
83
|
-
this.activeLang = event.detail;
|
|
84
|
-
}
|
|
85
|
-
// Update post-language-option variant to have the correct style
|
|
86
|
-
updateChildrenVariant() {
|
|
87
|
-
this.languageOptions.forEach(el => {
|
|
88
|
-
el.setAttribute('variant', this.variant);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
renderList() {
|
|
92
|
-
return (h(Host, { "data-version": version }, h("div", { class: "post-language-switch-list", role: "list", "aria-label": this.caption, "aria-describedby": this.listSpanId }, h("span", { id: this.listSpanId, class: "visually-hidden" }, this.description), h("slot", null))));
|
|
93
|
-
}
|
|
94
|
-
renderDropdown() {
|
|
95
|
-
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger" }, this.activeLang, h("span", { class: "visually-hidden" }, this.caption), h("span", { class: "visually-hidden" }, this.description), h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container", label: this.caption }, h("slot", null))));
|
|
96
|
-
}
|
|
97
|
-
render() {
|
|
98
|
-
return this.variant === 'list' ? this.renderList() : this.renderDropdown();
|
|
99
|
-
}
|
|
100
|
-
get host() { return this; }
|
|
101
|
-
static get watchers() { return {
|
|
102
|
-
"caption": ["validateCaption"],
|
|
103
|
-
"description": ["validateDescription"],
|
|
104
|
-
"variant": ["validateVariant"]
|
|
105
|
-
}; }
|
|
106
|
-
static get style() { return postLanguageSwitchCss; }
|
|
107
|
-
}, [1, "post-language-switch", {
|
|
108
|
-
"caption": [513],
|
|
109
|
-
"description": [513],
|
|
110
|
-
"variant": [1],
|
|
111
|
-
"activeLang": [32]
|
|
112
|
-
}, [[0, "postChange", "handlePostChange"], [0, "postLanguageOptionInitiallyActive", "handleInitiallyActive"]], {
|
|
113
|
-
"caption": ["validateCaption"],
|
|
114
|
-
"description": ["validateDescription"],
|
|
115
|
-
"variant": ["validateVariant"]
|
|
116
|
-
}]);
|
|
117
|
-
__decorate([
|
|
118
|
-
EventFrom('post-language-option')
|
|
119
|
-
], PostLanguageSwitch$1.prototype, "handlePostChange", null);
|
|
120
|
-
function defineCustomElement$1() {
|
|
121
|
-
if (typeof customElements === "undefined") {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
const components = ["post-language-switch", "post-icon", "post-menu", "post-menu-trigger", "post-popovercontainer"];
|
|
125
|
-
components.forEach(tagName => { switch (tagName) {
|
|
126
|
-
case "post-language-switch":
|
|
127
|
-
if (!customElements.get(tagName)) {
|
|
128
|
-
customElements.define(tagName, PostLanguageSwitch$1);
|
|
129
|
-
}
|
|
130
|
-
break;
|
|
131
|
-
case "post-icon":
|
|
132
|
-
if (!customElements.get(tagName)) {
|
|
133
|
-
defineCustomElement$5();
|
|
134
|
-
}
|
|
135
|
-
break;
|
|
136
|
-
case "post-menu":
|
|
137
|
-
if (!customElements.get(tagName)) {
|
|
138
|
-
defineCustomElement$4();
|
|
139
|
-
}
|
|
140
|
-
break;
|
|
141
|
-
case "post-menu-trigger":
|
|
142
|
-
if (!customElements.get(tagName)) {
|
|
143
|
-
defineCustomElement$3();
|
|
144
|
-
}
|
|
145
|
-
break;
|
|
146
|
-
case "post-popovercontainer":
|
|
147
|
-
if (!customElements.get(tagName)) {
|
|
148
|
-
defineCustomElement$2();
|
|
149
|
-
}
|
|
150
|
-
break;
|
|
151
|
-
} });
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const PostLanguageSwitch = PostLanguageSwitch$1;
|
|
155
|
-
const defineCustomElement = defineCustomElement$1;
|
|
156
|
-
|
|
157
|
-
export { PostLanguageSwitch, defineCustomElement };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
|
|
4
|
-
const postListItemCss = ":host{display:flex}";
|
|
5
|
-
|
|
6
|
-
const PostListItem$1 = /*@__PURE__*/ proxyCustomElement(class PostListItem extends HTMLElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.__registerHost();
|
|
10
|
-
this.__attachShadow();
|
|
11
|
-
}
|
|
12
|
-
connectedCallback() {
|
|
13
|
-
this.host.setAttribute('slot', 'post-list-item');
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return (h(Host, { key: '98f83a8ef6ff73461bfc7b67d8113543e94d66cb', role: "listitem", slot: "post-list-item", version: version }, h("slot", { key: '1ee5c021183b30ba7b560a58042a196aa9c1127e' })));
|
|
17
|
-
}
|
|
18
|
-
get host() { return this; }
|
|
19
|
-
static get style() { return postListItemCss; }
|
|
20
|
-
}, [1, "post-list-item"]);
|
|
21
|
-
function defineCustomElement$1() {
|
|
22
|
-
if (typeof customElements === "undefined") {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const components = ["post-list-item"];
|
|
26
|
-
components.forEach(tagName => { switch (tagName) {
|
|
27
|
-
case "post-list-item":
|
|
28
|
-
if (!customElements.get(tagName)) {
|
|
29
|
-
customElements.define(tagName, PostListItem$1);
|
|
30
|
-
}
|
|
31
|
-
break;
|
|
32
|
-
} });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const PostListItem = PostListItem$1;
|
|
36
|
-
const defineCustomElement = defineCustomElement$1;
|
|
37
|
-
|
|
38
|
-
export { PostListItem, defineCustomElement };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { n as nanoid } from './index.browser.js';
|
|
4
|
-
|
|
5
|
-
const postListCss = "post-list{display:flex;flex-direction:column;gap:var(--post-list-title-gap, 0)}post-list>[role=list]{display:flex;flex-direction:column;gap:var(--post-list-item-gap, 0)}post-list:where([horizontal]:not([horizontal=false])){flex-direction:row;align-items:center}post-list:where([horizontal]:not([horizontal=false]))>[role=list]{flex-direction:row;align-items:center}post-list>.list-title.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
6
|
-
|
|
7
|
-
const PostList$1 = /*@__PURE__*/ proxyCustomElement(class PostList extends HTMLElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
/**
|
|
12
|
-
* If `true`, the list title will be hidden. Otherwise, it will be displayed.`
|
|
13
|
-
*/
|
|
14
|
-
this.titleHidden = false;
|
|
15
|
-
/**
|
|
16
|
-
* The list can become horizontal by setting `horizontal="true"` or just `horizontal`
|
|
17
|
-
*/
|
|
18
|
-
this.horizontal = false;
|
|
19
|
-
}
|
|
20
|
-
componentWillLoad() {
|
|
21
|
-
/**
|
|
22
|
-
* Get the id set on the host element or use a random id by default
|
|
23
|
-
*/
|
|
24
|
-
this.titleId = `title-${this.host.id || nanoid(6)}`;
|
|
25
|
-
}
|
|
26
|
-
componentDidLoad() {
|
|
27
|
-
this.checkTitle();
|
|
28
|
-
}
|
|
29
|
-
checkTitle() {
|
|
30
|
-
if (!this.titleEl.textContent.trim()) {
|
|
31
|
-
console.error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (h(Host, { key: '85193bec2b2ff22ed76c93a4037f353b091192bc', "data-version": version }, h("div", { key: '32cdc5ccb95b48e3f81e90ac93f0207d935c9d3b', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: '890dd411e370a7829354dcaa00fae75e8f538f01' })), h("div", { key: '72867a1d81f2e186ed3d68f5185a46c7c96fdd3b', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: '2cd5a5e9ca717c675f9db3a19fbf13ff49a7312c', name: "post-list-item" }))));
|
|
36
|
-
}
|
|
37
|
-
get host() { return this; }
|
|
38
|
-
static get style() { return postListCss; }
|
|
39
|
-
}, [4, "post-list", {
|
|
40
|
-
"titleHidden": [4, "title-hidden"],
|
|
41
|
-
"horizontal": [516],
|
|
42
|
-
"titleId": [32]
|
|
43
|
-
}]);
|
|
44
|
-
function defineCustomElement$1() {
|
|
45
|
-
if (typeof customElements === "undefined") {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const components = ["post-list"];
|
|
49
|
-
components.forEach(tagName => { switch (tagName) {
|
|
50
|
-
case "post-list":
|
|
51
|
-
if (!customElements.get(tagName)) {
|
|
52
|
-
customElements.define(tagName, PostList$1);
|
|
53
|
-
}
|
|
54
|
-
break;
|
|
55
|
-
} });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const PostList = PostList$1;
|
|
59
|
-
const defineCustomElement = defineCustomElement$1;
|
|
60
|
-
|
|
61
|
-
export { PostList, defineCustomElement };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { v as version } from './package.js';
|
|
3
|
-
import { c as checkRequiredAndType } from './index2.js';
|
|
4
|
-
import './breakpoints.js';
|
|
5
|
-
import { n as nanoid } from './index.browser.js';
|
|
6
|
-
|
|
7
|
-
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}}: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}}";
|
|
8
|
-
|
|
9
|
-
const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.__registerHost();
|
|
13
|
-
this.__attachShadow();
|
|
14
|
-
}
|
|
15
|
-
validateFor() {
|
|
16
|
-
checkRequiredAndType(this, 'panel', 'string');
|
|
17
|
-
}
|
|
18
|
-
componentWillLoad() {
|
|
19
|
-
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return (h(Host, { key: 'b350fb9392e74af452470d72f97678aa1ac2d430', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '49722204330b3b2d760b8718b349b1417fd29a71' })));
|
|
23
|
-
}
|
|
24
|
-
get host() { return this; }
|
|
25
|
-
static get watchers() { return {
|
|
26
|
-
"panel": ["validateFor"]
|
|
27
|
-
}; }
|
|
28
|
-
static get style() { return postTabHeaderCss; }
|
|
29
|
-
}, [1, "post-tab-header", {
|
|
30
|
-
"panel": [513],
|
|
31
|
-
"tabId": [32]
|
|
32
|
-
}, undefined, {
|
|
33
|
-
"panel": ["validateFor"]
|
|
34
|
-
}]);
|
|
35
|
-
function defineCustomElement$1() {
|
|
36
|
-
if (typeof customElements === "undefined") {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const components = ["post-tab-header"];
|
|
40
|
-
components.forEach(tagName => { switch (tagName) {
|
|
41
|
-
case "post-tab-header":
|
|
42
|
-
if (!customElements.get(tagName)) {
|
|
43
|
-
customElements.define(tagName, PostTabHeader$1);
|
|
44
|
-
}
|
|
45
|
-
break;
|
|
46
|
-
} });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const PostTabHeader = PostTabHeader$1;
|
|
50
|
-
const defineCustomElement = defineCustomElement$1;
|
|
51
|
-
|
|
52
|
-
export { PostTabHeader, defineCustomElement };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const focusableSelector = `:where(${[
|
|
2
|
-
'button',
|
|
3
|
-
'input:not([type="hidden"])',
|
|
4
|
-
'[tabindex]',
|
|
5
|
-
'select',
|
|
6
|
-
'textarea',
|
|
7
|
-
'[contenteditable]',
|
|
8
|
-
'a[href]',
|
|
9
|
-
'iframe',
|
|
10
|
-
'audio[controls]',
|
|
11
|
-
'video[controls]',
|
|
12
|
-
'area[href]',
|
|
13
|
-
'details > summary:first-of-type',
|
|
14
|
-
].join(',')})`;
|
|
15
|
-
const focusDisablingSelector = `:where(${[
|
|
16
|
-
'[inert]',
|
|
17
|
-
'[inert] *',
|
|
18
|
-
':disabled',
|
|
19
|
-
'dialog:not([open]) *',
|
|
20
|
-
'[popover]:not(:popover-open) *',
|
|
21
|
-
'details:not([open]) > *:not(details > summary:first-of-type)',
|
|
22
|
-
'details:not([open]) > *:not(details > summary:first-of-type) *',
|
|
23
|
-
'[tabindex^="-"]',
|
|
24
|
-
'[hidden]:not([hidden="false"])',
|
|
25
|
-
].join(',')})`;
|
|
26
|
-
function getFocusableChildren(element) {
|
|
27
|
-
const focusableChildren = element.querySelectorAll(`${focusableSelector}:not(${focusDisablingSelector})`);
|
|
28
|
-
return Array.from(focusableChildren).filter(isVisible);
|
|
29
|
-
}
|
|
30
|
-
// Searches deeper accross shadowDom
|
|
31
|
-
function getDeepFocusableChildren(element) {
|
|
32
|
-
const results = [];
|
|
33
|
-
function traverse(node) {
|
|
34
|
-
if (isElementFocusable(node)) {
|
|
35
|
-
results.push(node);
|
|
36
|
-
}
|
|
37
|
-
if (node instanceof HTMLElement && node.shadowRoot) {
|
|
38
|
-
traverse(node.shadowRoot);
|
|
39
|
-
}
|
|
40
|
-
for (const child of Array.from(node.children)) {
|
|
41
|
-
traverse(child);
|
|
42
|
-
}
|
|
43
|
-
if (node instanceof HTMLElement) {
|
|
44
|
-
for (const slot of Array.from(node.querySelectorAll('slot'))) {
|
|
45
|
-
for (const el of slot.assignedElements({ flatten: true })) {
|
|
46
|
-
traverse(el);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
traverse(element);
|
|
52
|
-
return results;
|
|
53
|
-
}
|
|
54
|
-
function isVisible(el) {
|
|
55
|
-
const style = window.getComputedStyle(el.parentElement);
|
|
56
|
-
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
57
|
-
}
|
|
58
|
-
function isElementFocusable(node) {
|
|
59
|
-
return (node instanceof HTMLElement &&
|
|
60
|
-
node.matches(`${focusableSelector}:not(${focusDisablingSelector})`) &&
|
|
61
|
-
isVisible(node));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export { getDeepFocusableChildren as a, getFocusableChildren as g };
|
|
@@ -1,243 +0,0 @@
|
|
|
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-DVGEExot.js';
|
|
3
|
-
import { v as version } from './p-BhxZzOEC.js';
|
|
4
|
-
import { g as getFocusableChildren } from './p-BVXiQdHq.js';
|
|
5
|
-
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-CYkf_7Y5.js';
|
|
6
|
-
import './p-CJ80BZ06.js';
|
|
7
|
-
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
8
|
-
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
9
|
-
|
|
10
|
-
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}";
|
|
11
|
-
|
|
12
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
-
else
|
|
17
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
18
|
-
if (d = decorators[i])
|
|
19
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
-
};
|
|
22
|
-
const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this.__registerHost();
|
|
26
|
-
this.__attachShadow();
|
|
27
|
-
this.toggleMenu = createEvent(this, "toggleMenu");
|
|
28
|
-
this.lastFocusedElement = null;
|
|
29
|
-
this.KEYCODES = {
|
|
30
|
-
SPACE: ' ',
|
|
31
|
-
ENTER: 'Enter',
|
|
32
|
-
UP: 'ArrowUp',
|
|
33
|
-
DOWN: 'ArrowDown',
|
|
34
|
-
TAB: 'Tab',
|
|
35
|
-
HOME: 'Home',
|
|
36
|
-
END: 'End',
|
|
37
|
-
ESCAPE: 'Escape',
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Defines the position of the menu relative to its trigger.
|
|
41
|
-
* Menus are automatically flipped to the opposite side if there is not enough available space and are shifted towards the viewport if they would overlap edge boundaries.
|
|
42
|
-
* For supported values and behavior details, see the [Floating UI placement documentation](https://floating-ui.com/docs/computePosition#placement).
|
|
43
|
-
*/
|
|
44
|
-
this.placement = 'bottom';
|
|
45
|
-
/**
|
|
46
|
-
* Holds the current visibility state of the menu.
|
|
47
|
-
* This state is internally managed to track whether the menu is open (`true`) or closed (`false`),
|
|
48
|
-
* and updates automatically when the menu is toggled.
|
|
49
|
-
*/
|
|
50
|
-
this.isVisible = false;
|
|
51
|
-
this.handleKeyDown = (e) => {
|
|
52
|
-
e.stopPropagation();
|
|
53
|
-
if (e.key === this.KEYCODES.ESCAPE) {
|
|
54
|
-
this.toggle(this.host);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (Object.values(this.KEYCODES).includes(e.key)) {
|
|
58
|
-
this.controlKeyDownHandler(e);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
this.handlePostShown = (event) => {
|
|
62
|
-
// Only for the first open
|
|
63
|
-
if (event.detail.first) {
|
|
64
|
-
// Add "menu" and "menuitem" aria roles and aria-label
|
|
65
|
-
this.host.setAttribute('role', 'menu');
|
|
66
|
-
const menuItems = this.getSlottedItems();
|
|
67
|
-
for (const item of menuItems) {
|
|
68
|
-
item.setAttribute('role', 'menuitem');
|
|
69
|
-
}
|
|
70
|
-
if (this.label)
|
|
71
|
-
this.host.setAttribute('aria-label', this.label);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
this.handlePostToggled = (event) => {
|
|
75
|
-
this.isVisible = event.detail.isOpen;
|
|
76
|
-
this.toggleMenu.emit(this.isVisible);
|
|
77
|
-
if (this.isVisible) {
|
|
78
|
-
this.lastFocusedElement = this.root?.activeElement;
|
|
79
|
-
requestAnimationFrame(() => {
|
|
80
|
-
const menuItems = this.getSlottedItems();
|
|
81
|
-
if (menuItems.length > 0) {
|
|
82
|
-
menuItems[0].focus();
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
else if (this.lastFocusedElement) {
|
|
87
|
-
this.lastFocusedElement.focus();
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
this.handleClick = (e) => {
|
|
91
|
-
const target = e.target;
|
|
92
|
-
if (['BUTTON', 'A', 'INPUT', 'SELECT', 'TEXTAREA'].includes(target.tagName)) {
|
|
93
|
-
this.toggle(this.host);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
validatePlacement() {
|
|
98
|
-
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
99
|
-
}
|
|
100
|
-
validateLabel() {
|
|
101
|
-
checkRequiredAndType(this, 'label', 'string');
|
|
102
|
-
}
|
|
103
|
-
connectedCallback() {
|
|
104
|
-
this.root = getRoot(this.host);
|
|
105
|
-
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
106
|
-
this.host.addEventListener('click', this.handleClick);
|
|
107
|
-
}
|
|
108
|
-
disconnectedCallback() {
|
|
109
|
-
this.host.removeEventListener('keydown', this.handleKeyDown);
|
|
110
|
-
this.host.removeEventListener('click', this.handleClick);
|
|
111
|
-
}
|
|
112
|
-
componentDidLoad() {
|
|
113
|
-
this.validatePlacement();
|
|
114
|
-
this.validateLabel();
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Toggles the menu visibility based on its current state.
|
|
118
|
-
*/
|
|
119
|
-
async toggle(target) {
|
|
120
|
-
if (this.popoverRef) {
|
|
121
|
-
await this.popoverRef.toggle(target);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
console.error('toggle: popoverRef is null or undefined');
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Displays the popover menu, focusing the first menu item.
|
|
129
|
-
*
|
|
130
|
-
* @param target - The HTML element relative to which the popover menu should be displayed.
|
|
131
|
-
*/
|
|
132
|
-
async show(target) {
|
|
133
|
-
if (this.popoverRef) {
|
|
134
|
-
await this.popoverRef.show(target);
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
console.error('show: popoverRef is null or undefined');
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Hides the popover menu and restores focus to the previously focused element.
|
|
142
|
-
*/
|
|
143
|
-
async hide() {
|
|
144
|
-
if (this.popoverRef) {
|
|
145
|
-
await this.popoverRef.hide();
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
console.error('hide: popoverRef is null or undefined');
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
controlKeyDownHandler(e) {
|
|
152
|
-
const menuItems = this.getSlottedItems();
|
|
153
|
-
if (!menuItems.length) {
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
let currentIndex = menuItems.findIndex(el => {
|
|
157
|
-
// Check if the item is currently focused within its rendered scope (document or shadow root)
|
|
158
|
-
return el === getRoot(el).activeElement;
|
|
159
|
-
});
|
|
160
|
-
switch (e.key) {
|
|
161
|
-
case this.KEYCODES.UP:
|
|
162
|
-
e.preventDefault();
|
|
163
|
-
currentIndex = (currentIndex - 1 + menuItems.length) % menuItems.length;
|
|
164
|
-
break;
|
|
165
|
-
case this.KEYCODES.DOWN:
|
|
166
|
-
e.preventDefault();
|
|
167
|
-
currentIndex = (currentIndex + 1) % menuItems.length;
|
|
168
|
-
break;
|
|
169
|
-
case this.KEYCODES.HOME:
|
|
170
|
-
currentIndex = 0;
|
|
171
|
-
break;
|
|
172
|
-
case this.KEYCODES.END:
|
|
173
|
-
e.preventDefault();
|
|
174
|
-
currentIndex = menuItems.length - 1;
|
|
175
|
-
break;
|
|
176
|
-
case this.KEYCODES.SPACE:
|
|
177
|
-
this.toggle(this.host);
|
|
178
|
-
return;
|
|
179
|
-
case this.KEYCODES.TAB:
|
|
180
|
-
this.toggle(this.host);
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
if (menuItems[currentIndex]) {
|
|
184
|
-
menuItems[currentIndex].focus();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
getSlottedItems() {
|
|
188
|
-
const slot = this.host.shadowRoot.querySelectorAll('slot');
|
|
189
|
-
const slottedElements = [];
|
|
190
|
-
slot.forEach(slotItem => slottedElements.push(...slotItem.assignedElements()));
|
|
191
|
-
return (slottedElements
|
|
192
|
-
// If the element is a slot, get the assigned elements
|
|
193
|
-
.flatMap(el => (el instanceof HTMLSlotElement ? el.assignedElements() : el))
|
|
194
|
-
// For each menu item, get any focusable children (e.g., buttons, links)
|
|
195
|
-
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
196
|
-
}
|
|
197
|
-
render() {
|
|
198
|
-
return (h(Host, { key: 'ab27eeef6ddcca57eb65ca9f7471809d9f78d7d1', "data-version": version }, h("post-popovercontainer", { key: 'c8053a6cbae6d22751e81107099180b95829b8c4', onPostShow: this.handlePostShown, onPostToggle: this.handlePostToggled, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'c60d336220b331cd7f3d5b896788f3fdcee090cf', part: "menu" }, h("slot", { key: '629b1f5dbe4074df6459bdfe64e1c0f836314e85', name: "header" }), h("slot", { key: 'c918bba494424db857e7e99fd80d24224bdeb9ed' })))));
|
|
199
|
-
}
|
|
200
|
-
get host() { return this; }
|
|
201
|
-
static get watchers() { return {
|
|
202
|
-
"placement": ["validatePlacement"],
|
|
203
|
-
"label": ["validateLabel"]
|
|
204
|
-
}; }
|
|
205
|
-
static get style() { return postMenuCss; }
|
|
206
|
-
}, [1, "post-menu", {
|
|
207
|
-
"placement": [1],
|
|
208
|
-
"label": [513],
|
|
209
|
-
"isVisible": [32],
|
|
210
|
-
"toggle": [64],
|
|
211
|
-
"show": [64],
|
|
212
|
-
"hide": [64]
|
|
213
|
-
}, undefined, {
|
|
214
|
-
"placement": ["validatePlacement"],
|
|
215
|
-
"label": ["validateLabel"]
|
|
216
|
-
}]);
|
|
217
|
-
__decorate([
|
|
218
|
-
EventFrom('post-popovercontainer')
|
|
219
|
-
], PostMenu.prototype, "handlePostShown", void 0);
|
|
220
|
-
__decorate([
|
|
221
|
-
EventFrom('post-popovercontainer')
|
|
222
|
-
], PostMenu.prototype, "handlePostToggled", void 0);
|
|
223
|
-
function defineCustomElement() {
|
|
224
|
-
if (typeof customElements === "undefined") {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
const components = ["post-menu", "post-popovercontainer"];
|
|
228
|
-
components.forEach(tagName => { switch (tagName) {
|
|
229
|
-
case "post-menu":
|
|
230
|
-
if (!customElements.get(tagName)) {
|
|
231
|
-
customElements.define(tagName, PostMenu);
|
|
232
|
-
}
|
|
233
|
-
break;
|
|
234
|
-
case "post-popovercontainer":
|
|
235
|
-
if (!customElements.get(tagName)) {
|
|
236
|
-
defineCustomElement$1();
|
|
237
|
-
}
|
|
238
|
-
break;
|
|
239
|
-
} });
|
|
240
|
-
}
|
|
241
|
-
defineCustomElement();
|
|
242
|
-
|
|
243
|
-
export { PostMenu as P, defineCustomElement as d };
|