@swisspost/design-system-components 10.5.0 → 10.6.0
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/README.md +2 -2
- package/dist/cjs/{create-validator-decorator-u-Byhihe.js → create-validator-decorator-Cy5yN6u9.js} +1 -1
- package/dist/cjs/{index-CXnlZiX8.js → index-B3PXzvDk.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{one-of-LGG0uEIi.js → one-of-CRFrfihj.js} +1 -1
- package/dist/cjs/{package-DdU-rENe.js → package-pKyFPwiA.js} +1 -1
- package/dist/cjs/{pattern-B-csvfNt.js → pattern-D329DFcf.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +5 -5
- package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
- package/dist/cjs/post-avatar.cjs.entry.js +6 -6
- package/dist/cjs/post-back-to-top.cjs.entry.js +5 -5
- package/dist/cjs/post-banner.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +32 -10
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +158 -58
- package/dist/cjs/post-closebutton_14.cjs.entry.js +49 -45
- package/dist/cjs/post-collapsible_2.cjs.entry.js +7 -7
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +17 -15
- package/dist/cjs/post-footer.cjs.entry.js +7 -7
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
- package/dist/cjs/post-listbox.cjs.entry.js +3 -3
- package/dist/cjs/post-number-input.cjs.entry.js +4 -4
- package/dist/cjs/post-pagination.cjs.entry.js +5 -5
- package/dist/cjs/post-popover-trigger.cjs.entry.js +6 -6
- package/dist/cjs/post-popover.cjs.entry.js +9 -9
- package/dist/cjs/post-progressbar.cjs.entry.js +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +6 -6
- package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +6 -6
- package/dist/cjs/post-side-navigation.cjs.entry.js +7 -7
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +7 -7
- package/dist/cjs/post-tab-item.cjs.entry.js +6 -6
- package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
- package/dist/cjs/post-tabs.cjs.entry.js +8 -8
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +7 -7
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -5
- package/dist/cjs/{required-bJzxBV-V.js → required-DhAEd0c7.js} +1 -1
- package/dist/cjs/{type-CGPnqGY1.js → type-2Ma9dvHs.js} +1 -1
- package/dist/cjs/{url-Dxdd6tWj.js → url-DePscsTj.js} +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +30 -3
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +184 -57
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +2 -2
- package/dist/collection/components/post-date-picker/native-mask-element.js +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +11 -9
- package/dist/collection/components/post-footer/post-footer.js +2 -2
- package/dist/collection/components/post-header/post-header.js +2 -2
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +1 -1
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +3 -3
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +1 -1
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +2 -2
- package/dist/collection/components/post-popover/post-popover.js +3 -3
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +2 -2
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +26 -22
- package/dist/collection/components/post-progressbar/post-progressbar.js +1 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-side-navigation/post-side-navigation.js +1 -1
- package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +1 -1
- package/dist/collection/components/post-stepper/post-stepper.js +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.js +2 -2
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +2 -2
- package/dist/collection/utils/floating-ui.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +1 -1
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-date-picker.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-progressbar.js +1 -1
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-side-navigation-trigger.js +1 -1
- package/dist/components/post-side-navigation.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/{p-CoCua20S.js → p-3RU9XwVO.js} +1 -1
- package/dist/components/react/p-B1TcktiB.js +1 -0
- package/dist/components/react/p-BN2dfUQ0.js +1 -0
- package/dist/components/react/{p-CuVhOs8F.js → p-BPUhha1U.js} +1 -1
- package/dist/components/react/{p-PYoaz_Xl.js → p-Bnb_TyDh.js} +1 -1
- package/dist/components/react/{p-CLeWLMJn.js → p-CcDLIogT.js} +1 -1
- package/dist/components/react/{p-DD-Sl3Ji.js → p-CdggfEzz.js} +1 -1
- package/dist/components/react/{p-DasK590W.js → p-CzsG0uCA.js} +1 -1
- package/dist/components/react/{p-C8vlYfD-.js → p-DffT6evQ.js} +1 -1
- package/dist/components/react/p-T8T3po4z.js +1 -0
- package/dist/components/react/{p-DiFAKI9o.js → p-WXzzOdnl.js} +1 -1
- package/dist/components/react/{p-D3rq_-Qk.js → p-m1-sOx5T.js} +1 -1
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-autocomplete.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +1 -1
- package/dist/components/react/post-banner.js +1 -1
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +1 -1
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-date-picker.js +1 -1
- package/dist/components/react/post-footer.js +1 -1
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.js +1 -1
- package/dist/components/react/post-language-menu.js +1 -1
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-listbox-option.js +1 -1
- package/dist/components/react/post-listbox.js +1 -1
- package/dist/components/react/post-logo.js +1 -1
- package/dist/components/react/post-mainnavigation.js +1 -1
- package/dist/components/react/post-megadropdown-trigger.js +1 -1
- package/dist/components/react/post-megadropdown.js +1 -1
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/post-number-input.js +1 -1
- package/dist/components/react/post-pagination.js +1 -1
- package/dist/components/react/post-popover-trigger.js +1 -1
- package/dist/components/react/post-popover.js +1 -1
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-progressbar.js +1 -1
- package/dist/components/react/post-rating.js +1 -1
- package/dist/components/react/post-side-navigation-trigger.js +1 -1
- package/dist/components/react/post-side-navigation.js +1 -1
- package/dist/components/react/post-stepper-item.js +1 -1
- package/dist/components/react/post-stepper.js +1 -1
- package/dist/components/react/post-tab-item.js +1 -1
- package/dist/components/react/post-tab-panel.js +1 -1
- package/dist/components/react/post-tabs.js +1 -1
- package/dist/components/react/post-togglebutton.js +1 -1
- package/dist/components/react/post-tooltip-trigger.js +1 -1
- package/dist/components/react/post-tooltip.js +1 -1
- package/dist/docs.json +57 -12
- package/dist/esm/{create-validator-decorator-CbYxqPSB.js → create-validator-decorator-C2XlYkNB.js} +1 -1
- package/dist/esm/{index-D3NdvMgy.js → index-BjziJWh2.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{one-of-Mx4vYjem.js → one-of-Do1iao-k.js} +1 -1
- package/dist/esm/{package-Ny5VnydI.js → package-T8T3po4z.js} +1 -1
- package/dist/esm/{pattern-CqQVrJPN.js → pattern-BZDucOTq.js} +1 -1
- package/dist/esm/post-accordion_2.entry.js +5 -5
- package/dist/esm/post-autocomplete.entry.js +5 -5
- package/dist/esm/post-avatar.entry.js +6 -6
- package/dist/esm/post-back-to-top.entry.js +5 -5
- package/dist/esm/post-banner.entry.js +4 -4
- package/dist/esm/post-breadcrumb-item.entry.js +32 -10
- package/dist/esm/post-breadcrumbs.entry.js +158 -58
- package/dist/esm/post-closebutton_14.entry.js +49 -45
- package/dist/esm/post-collapsible_2.entry.js +7 -7
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +17 -15
- package/dist/esm/post-footer.entry.js +7 -7
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/post-listbox-option.entry.js +4 -4
- package/dist/esm/post-listbox.entry.js +3 -3
- package/dist/esm/post-number-input.entry.js +4 -4
- package/dist/esm/post-pagination.entry.js +5 -5
- package/dist/esm/post-popover-trigger.entry.js +6 -6
- package/dist/esm/post-popover.entry.js +9 -9
- package/dist/esm/post-progressbar.entry.js +4 -4
- package/dist/esm/post-rating.entry.js +6 -6
- package/dist/esm/post-side-navigation-trigger.entry.js +6 -6
- package/dist/esm/post-side-navigation.entry.js +7 -7
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +7 -7
- package/dist/esm/post-tab-item.entry.js +6 -6
- package/dist/esm/post-tab-panel.entry.js +6 -6
- package/dist/esm/post-tabs.entry.js +8 -8
- package/dist/esm/post-tooltip-trigger.entry.js +7 -7
- package/dist/esm/post-tooltip.entry.js +5 -5
- package/dist/esm/{required-CxvSCYJj.js → required-B0X7uy13.js} +1 -1
- package/dist/esm/{type-CYB7_Yi8.js → type-CF1dOg6D.js} +1 -1
- package/dist/esm/{url-DOwgyBfp.js → url-BL7d6iWZ.js} +1 -1
- package/dist/post-components/{p-4e2bb082.entry.js → p-0e922531.entry.js} +1 -1
- package/dist/post-components/{p-e8c19f72.entry.js → p-1ec27142.entry.js} +1 -1
- package/dist/post-components/{p-ffec1880.entry.js → p-2005eb98.entry.js} +1 -1
- package/dist/post-components/{p-894b20dd.entry.js → p-2cff5b3a.entry.js} +1 -1
- package/dist/post-components/p-53bd2128.entry.js +1 -0
- package/dist/post-components/{p-2379e498.entry.js → p-59b30e90.entry.js} +1 -1
- package/dist/post-components/{p-a9223467.entry.js → p-60550edb.entry.js} +1 -1
- package/dist/post-components/p-655ded00.entry.js +1 -0
- package/dist/post-components/{p-030bfaa1.entry.js → p-76cc3c9a.entry.js} +1 -1
- package/dist/post-components/{p-44718c1a.entry.js → p-8012cc3b.entry.js} +1 -1
- package/dist/post-components/{p-1d67c427.entry.js → p-819c93de.entry.js} +1 -1
- package/dist/post-components/p-840acd3c.entry.js +1 -0
- package/dist/post-components/{p-781efeb8.entry.js → p-87b1034f.entry.js} +1 -1
- package/dist/post-components/{p-e8268a8d.entry.js → p-88f754e9.entry.js} +1 -1
- package/dist/post-components/p-9S_5_Zh8.js +1 -0
- package/dist/post-components/p-BYfu3J2D.js +1 -0
- package/dist/post-components/p-BjziJWh2.js +2 -0
- package/dist/post-components/p-BoYe-VVx.js +1 -0
- package/dist/post-components/p-CbbADNiv.js +1 -0
- package/dist/post-components/{p-sgCfAEQU.js → p-DgnQe03V.js} +1 -1
- package/dist/post-components/p-DlKbBdcP.js +1 -0
- package/dist/post-components/p-T8T3po4z.js +1 -0
- package/dist/post-components/{p-2cb843f4.entry.js → p-a32d3050.entry.js} +1 -1
- package/dist/post-components/p-b4229624.entry.js +1 -0
- package/dist/post-components/{p-2ee255c1.entry.js → p-b9faa76b.entry.js} +1 -1
- package/dist/post-components/{p-b856263a.entry.js → p-ba1b4ba0.entry.js} +1 -1
- package/dist/post-components/p-c0ae13b7.entry.js +1 -0
- package/dist/post-components/p-c9dcdebb.entry.js +1 -0
- package/dist/post-components/{p-5a44b217.entry.js → p-ccf8020b.entry.js} +1 -1
- package/dist/post-components/p-cd68d3a2.entry.js +1 -0
- package/dist/post-components/p-cdc7b8d3.entry.js +1 -0
- package/dist/post-components/{p-e7f97f6d.entry.js → p-d7c9a969.entry.js} +1 -1
- package/dist/post-components/{p-9ad2216e.entry.js → p-db11f781.entry.js} +1 -1
- package/dist/post-components/p-dc285087.entry.js +1 -0
- package/dist/post-components/{p-b6e231a8.entry.js → p-de6f1816.entry.js} +1 -1
- package/dist/post-components/p-dec8bd99.entry.js +1 -0
- package/dist/post-components/{p-665d877f.entry.js → p-f9a8ee94.entry.js} +1 -1
- package/dist/post-components/post-components.css +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +8 -1
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +39 -22
- package/dist/types/components.d.ts +18 -7
- package/hydrate/index.js +274 -137
- package/hydrate/index.mjs +274 -137
- package/package.json +28 -20
- package/dist/components/react/p-0nNMdSBr.js +0 -1
- package/dist/components/react/p-Ny5VnydI.js +0 -1
- package/dist/components/react/p-SBBBSmJM.js +0 -1
- package/dist/post-components/p-29e6c2a4.entry.js +0 -1
- package/dist/post-components/p-3a75186d.entry.js +0 -1
- package/dist/post-components/p-65e12f2c.entry.js +0 -1
- package/dist/post-components/p-795eb5ad.entry.js +0 -1
- package/dist/post-components/p-BmpkvdQk.js +0 -1
- package/dist/post-components/p-C-FunIfQ.js +0 -1
- package/dist/post-components/p-CCciE4QO.js +0 -1
- package/dist/post-components/p-D3NdvMgy.js +0 -2
- package/dist/post-components/p-Ny5VnydI.js +0 -1
- package/dist/post-components/p-X1vWfzMK.js +0 -1
- package/dist/post-components/p-c7a39444.entry.js +0 -1
- package/dist/post-components/p-cGcyMrvx.js +0 -1
- package/dist/post-components/p-cde00944.entry.js +0 -1
- package/dist/post-components/p-cf7493ab.entry.js +0 -1
- package/dist/post-components/p-e463e7ac.entry.js +0 -1
- package/dist/post-components/p-ecfc494e.entry.js +0 -1
- package/dist/post-components/p-eda4a376.entry.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B3PXzvDk.js');
|
|
4
4
|
require('./breakpoints-Kruvy8Dm.js');
|
|
5
5
|
var componentOnReady = require('./component-on-ready-CifOTqw1.js');
|
|
6
6
|
var nanoid = require('./nanoid-CmjyF1Cm.js');
|
|
7
|
-
var _package = require('./package-
|
|
7
|
+
var _package = require('./package-pKyFPwiA.js');
|
|
8
8
|
var index$1 = require('./index-CggFmZ8n.js');
|
|
9
|
-
var required = require('./required-
|
|
10
|
-
var url = require('./url-
|
|
11
|
-
var type = require('./type-
|
|
12
|
-
require('./create-validator-decorator-
|
|
9
|
+
var required = require('./required-DhAEd0c7.js');
|
|
10
|
+
var url = require('./url-DePscsTj.js');
|
|
11
|
+
var type = require('./type-2Ma9dvHs.js');
|
|
12
|
+
require('./create-validator-decorator-Cy5yN6u9.js');
|
|
13
13
|
|
|
14
|
-
const postBreadcrumbsCss = () => `:host{display:block;position:relative}nav{max-width:100%}nav.invisible{overflow:hidden;visibility:hidden;position:absolute;inset:0}nav.loading>div>:not(.home){display:none}[role=list]{display:flex;align-items:flex-start;gap:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:flex-start;padding-block:var(--post-device-spacing-padding-block-6);gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item :is(button,a){display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;font:inherit;padding:unset;border:unset;
|
|
14
|
+
const postBreadcrumbsCss = () => `:host{display:block;position:relative}nav{max-width:100%}nav.invisible{overflow:hidden;visibility:hidden;position:absolute;inset:0}nav.loading>div>:not(.home){display:none}[role=list]{display:flex;align-items:flex-start;gap:var(--post-device-spacing-gap-inline-4)}[role=list]>.menu:first-child::before{content:none}.breadcrumb-item{display:flex;align-items:flex-start;padding-block:var(--post-device-spacing-padding-block-6);gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item :is(button,a){display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;font:inherit;padding:unset;border:unset;border-radius:var(--post-device-border-radius-focus);color:var(--post-scheme-color-interactive-primary-enabled-fg1);text-decoration:var(--post-core-text-decoration-none)}.breadcrumb-item :is(button,a):not(:disabled):hover{text-decoration:none}.breadcrumb-item :is(button,a):disabled{border-style:var(--post-core-border-style-dash);cursor:unset}.breadcrumb-item :is(button,a){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(button,a):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(button,a):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item :is(button,a):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(button,a):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item :is(button,a){border-width:1px !important;transition:none}.breadcrumb-item :is(button,a):is(button){background-color:ButtonFace !important;border-color:ButtonBorder !important}}.breadcrumb-item :is(button,a):hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item::before{mask-image:var(--post-icon-chevronright);background-color:currentColor;flex:0 0 auto;content:"";display:block;height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4);margin-block:calc(var(--post-device-spacing-padding-35) - 1*var(--post-device-spacing-padding-block-6));margin-inline:var(--post-core-dimension-4)}:root,:host{--post-icon-chevronright:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzPjxzeW1ib2wgaWQ9ImktY2hldnJvbnJpZ2h0Ij48c3ltYm9sIGlkPSJzMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTUuMzggMTRjLS4xOSAwLS4zOC0uMDctLjUzLS4yMmEuNzU0Ljc1NCAwIDAgMSAwLTEuMDZMOS41NyA4IDQuODUgMy4yOGMtLjI5LS4yOS0uMjktLjc3IDAtMS4wNnMuNzctLjI5IDEuMDYgMEwxMS42OSA4bC01Ljc4IDUuNzhjLS4xNS4xNS0uMzQuMjItLjUzLjIyIi8+PC9zeW1ib2w+PHN5bWJvbCBpZD0iczI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik04LjA3IDIwLjcyYy0uMjIgMC0uNDUtLjA4LS42Mi0uMjZhLjg4Ljg4IDAgMCAxIDAtMS4yNGw3LjI2LTcuMjZMNy40NSA0LjdhLjg4Ljg4IDAgMCAxIDAtMS4yNGMuMzQtLjM0LjktLjM0IDEuMjQgMGw4LjUgOC41LTguNDkgOC40OWMtLjE3LjE3LS40LjI2LS42Mi4yNloiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTEwLjc2IDI3LjVjLS4yNiAwLS41MS0uMS0uNzEtLjI5YS45OTYuOTk2IDAgMCAxIDAtMS40MWw5Ljc5LTkuNzktOS43OS05LjgxYS45OTYuOTk2IDAgMSAxIDEuNDEtMS40MUwyMi42NyAxNiAxMS40NiAyNy4yMWMtLjIuMi0uNDUuMjktLjcxLjI5WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48cGF0aCBkPSJNMTMuNSAzNC4yMmExLjEyMyAxLjEyMyAwIDAgMS0uOC0xLjkybDEyLjMzLTEyLjMzTDEyLjcgNy42M2MtLjQ0LS40NC0uNDQtMS4xNSAwLTEuNTlzMS4xNS0uNDQgMS41OSAwbDEzLjkzIDEzLjkzTDE0LjMgMzMuODljLS4yMi4yMi0uNTEuMzMtLjguMzMiLz48L3N5bWJvbD48c3ltYm9sIGlkPSJzNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHBhdGggZD0iTTE2LjE0IDQxYy0uMzIgMC0uNjQtLjEyLS44OC0uMzdhMS4yNSAxLjI1IDAgMCAxIDAtMS43N2wxNC44Ny0xNC44N0wxNS4yNSA5LjExYy0uNDktLjQ5LS40OS0xLjI4IDAtMS43N3MxLjI4LS40OSAxLjc3IDBsMTYuNjQgMTYuNjQtMTYuNjMgMTYuNjNjLS4yNC4yNC0uNTYuMzctLjg4LjM3WiIvPjwvc3ltYm9sPjxzeW1ib2wgaWQ9InM2NCIgdmlld0JveD0iMCAwIDY0IDY0Ij48cGF0aCBkPSJNMjEuNTEgNTQuNGExLjM3NiAxLjM3NiAwIDAgMS0uOTctMi4zNWwyMC4wMy0yMC4wMy0yMC4wNC0yMC4wM2MtLjU0LS41NC0uNTQtMS40MSAwLTEuOTVzMS40MS0uNTQgMS45NSAwbDIxLjk4IDIxLjk5TDIyLjQ5IDU0Yy0uMjcuMjctLjYyLjQtLjk3LjRaIi8+PC9zeW1ib2w+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczE2LCBub25lKSIgaHJlZj0iI3MxNiIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXMyNCwgbm9uZSkiIGhyZWY9IiNzMjQiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zMzIsIG5vbmUpIiBocmVmPSIjczMyIi8+PHVzZSBzdHlsZT0iZGlzcGxheTogdmFyKC0tczQwLCBub25lKSIgaHJlZj0iI3M0MCIvPjx1c2Ugc3R5bGU9ImRpc3BsYXk6IHZhcigtLXM0OCwgbm9uZSkiIGhyZWY9IiNzNDgiLz48dXNlIHN0eWxlPSJkaXNwbGF5OiB2YXIoLS1zNjQsIG5vbmUpIiBocmVmPSIjczY0Ii8+PC9zeW1ib2w+PC9kZWZzPjxzdHlsZT5AbWVkaWEgKG1heC13aWR0aDogMjMuOThweCkge2d7LS1zMTY6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogMjRweCkgYW5kIChtYXgtd2lkdGg6IDMxLjk4cHgpIHtney0tczI0OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDMycHgpIGFuZCAobWF4LXdpZHRoOiAzOS45OHB4KSB7Z3stLXMzMjpibG9jazt9fUBtZWRpYSAobWluLXdpZHRoOiA0MHB4KSBhbmQgKG1heC13aWR0aDogNDcuOThweCkge2d7LS1zNDA6YmxvY2s7fX1AbWVkaWEgKG1pbi13aWR0aDogNDhweCkgYW5kIChtYXgtd2lkdGg6IDYzLjk4cHgpIHtney0tczQ4OmJsb2NrO319QG1lZGlhIChtaW4td2lkdGg6IDY0cHgpIHtney0tczY0OmJsb2NrO319PC9zdHlsZT48Zz48dXNlIGhyZWY9IiNpLWNoZXZyb25yaWdodCIvPjwvZz48L3N2Zz4=")}post-menu-item>slot[name=home]>a{position:relative;display:flex;align-items:center;padding:8px 12px 8px 16px;gap:12px;font-size:.875rem;color:#050400;border-radius:0;text-decoration:none;min-width:0;white-space:normal;overflow:visible;text-overflow:unset;justify-content:start;overflow-wrap:anywhere;hyphens:auto;line-break:strict}@media screen and (min-width: 780px){post-menu-item>slot[name=home]>a{font-size:1rem;padding-block:12px;gap:16px}}@media screen and (min-width: 1024px){post-menu-item>slot[name=home]>a{font-size:1.25rem;padding-block:13px}}post-menu-item>slot[name=home]>a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item>slot[name=home]>a:hover{background-color:#504f4b;color:#fff}.home{flex:none}.home::before{content:unset}.home.icon{padding-block:var(--post-device-spacing-padding-47)}.home.icon post-icon{width:var(--post-device-sizing-interactive-icon-size2);height:var(--post-device-sizing-interactive-icon-size2)}.menu{margin-inline-end:calc(-1*var(--post-device-spacing-gap-inline-4))}.menu.empty{display:none}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}`;
|
|
15
15
|
|
|
16
16
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
17
17
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -30,17 +30,33 @@ const PostBreadcrumbs = class {
|
|
|
30
30
|
index.registerInstance(this, hostRef);
|
|
31
31
|
this.debounceUpdateCollapsedItems = index$1.throttle(MEASUREMENT_DEBOUNCE_MS, this.updateCollapsedItems.bind(this));
|
|
32
32
|
this.resizeObserver = new ResizeObserver(this.debounceUpdateCollapsedItems);
|
|
33
|
-
this.mutationObserver = new MutationObserver(
|
|
33
|
+
this.mutationObserver = new MutationObserver(() => {
|
|
34
|
+
void this.updateAfterMutation();
|
|
35
|
+
});
|
|
34
36
|
this.loaded = false;
|
|
35
|
-
/**
|
|
37
|
+
/** Whether the consumer slotted their own `<a>` into the `home` slot. When true, `home-url` is not required, since the internal fallback link is not rendered. */
|
|
38
|
+
this.hasSlottedHomeAnchor = false;
|
|
39
|
+
/** Whether the slotted home anchor contains a post-icon. */
|
|
40
|
+
this.hasSlottedHomeIcon = false;
|
|
41
|
+
/** The number of breadcrumb items, counted from the start, moved into the overflow menu. */
|
|
36
42
|
this.collapsed = 0;
|
|
43
|
+
/** Whether the home item is collapsed into its own overflow menu. */
|
|
44
|
+
this.homeCollapsed = false;
|
|
45
|
+
/** Whether the last (selected) item wraps onto multiple lines. */
|
|
46
|
+
this.lastItemWraps = false;
|
|
37
47
|
/** The visible breadcrumb navigation. */
|
|
38
48
|
this.nav = null;
|
|
39
49
|
/** An off-screen copy of the breadcrumb navigation used for measurement. */
|
|
40
50
|
this.hiddenNav = null;
|
|
51
|
+
/**
|
|
52
|
+
* Whether `text-home` content is displayed instead of the home icon, enabling segment specific
|
|
53
|
+
* breadcrumbs (like "Private customers" or "About us").
|
|
54
|
+
*/
|
|
55
|
+
this.homeTextOnly = false;
|
|
41
56
|
}
|
|
42
57
|
componentWillLoad() {
|
|
43
58
|
this.id = this.host.id || `b${nanoid.nanoid(6)}`;
|
|
59
|
+
this.checkSlottedHomeAnchor();
|
|
44
60
|
}
|
|
45
61
|
async componentDidLoad() {
|
|
46
62
|
this.resizeObserver?.observe(document.body);
|
|
@@ -58,69 +74,95 @@ const PostBreadcrumbs = class {
|
|
|
58
74
|
this.mutationObserver?.disconnect();
|
|
59
75
|
this.debounceUpdateCollapsedItems.cancel();
|
|
60
76
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
checkSlottedHomeAnchor() {
|
|
78
|
+
const homeSlotElement = Array.from(this.host.children).find(child => child.getAttribute('slot') === 'home');
|
|
79
|
+
this.hasSlottedHomeAnchor = homeSlotElement?.tagName === 'A';
|
|
80
|
+
this.hasSlottedHomeIcon =
|
|
81
|
+
this.hasSlottedHomeAnchor && !!homeSlotElement?.querySelector('post-icon');
|
|
82
|
+
}
|
|
83
|
+
get usesHomeText() {
|
|
84
|
+
return this.hasSlottedHomeAnchor ? !this.hasSlottedHomeIcon : this.homeTextOnly;
|
|
85
|
+
}
|
|
86
|
+
// Degrade order: collapse middle items -> collapse home -> wrap the last item.
|
|
87
|
+
/** Measures the available space and updates all three degrade-stage states. */
|
|
65
88
|
async updateCollapsedItems() {
|
|
66
89
|
if (!this.nav)
|
|
67
90
|
return;
|
|
68
|
-
|
|
91
|
+
const { overflowing, homeOverflows, lastItemWraps } = await this.calculateCollapsedItems();
|
|
92
|
+
this.collapsed = overflowing;
|
|
93
|
+
this.homeCollapsed = homeOverflows;
|
|
94
|
+
this.lastItemWraps = lastItemWraps;
|
|
69
95
|
}
|
|
70
|
-
/**
|
|
71
|
-
* Determines how many items have to be collapsed, either because they do not fit the breadcrumb
|
|
72
|
-
* navigation or because they exceed the maximum number of visible items.
|
|
73
|
-
*/
|
|
74
96
|
async calculateCollapsedItems() {
|
|
75
97
|
const items = this.host.querySelectorAll('post-breadcrumb-item');
|
|
76
|
-
const overflowing = await this.calculateOverflowingItems();
|
|
98
|
+
const { overflowing, homeOverflows, lastItemWraps } = await this.calculateOverflowingItems();
|
|
77
99
|
// Never show more than `MAX_VISIBLE_ITEMS`, even if the nav is wide enough to fit them all.
|
|
78
|
-
return
|
|
100
|
+
return {
|
|
101
|
+
overflowing: Math.max(overflowing, items.length - MAX_VISIBLE_ITEMS),
|
|
102
|
+
homeOverflows,
|
|
103
|
+
lastItemWraps,
|
|
104
|
+
};
|
|
79
105
|
}
|
|
80
|
-
/**
|
|
81
|
-
* Determines how many items overflow the width of the breadcrumb navigation.
|
|
82
|
-
*/
|
|
106
|
+
/** Runs the three degrade stages in order against the off-screen measurement clone. */
|
|
83
107
|
async calculateOverflowingItems() {
|
|
84
|
-
// Fallback to zero if the hidden nav is not available for measurement.
|
|
85
108
|
if (!this.hiddenNav)
|
|
86
|
-
return 0;
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
//
|
|
93
|
-
|
|
109
|
+
return { overflowing: 0, homeOverflows: false, lastItemWraps: false };
|
|
110
|
+
const nav = this.hiddenNav;
|
|
111
|
+
const availableWidth = nav.clientWidth;
|
|
112
|
+
const gap = Number.parseFloat(getComputedStyle(nav.firstElementChild).gap);
|
|
113
|
+
const menuWidth = nav.querySelector('.menu')?.clientWidth ?? 0;
|
|
114
|
+
const homeWidth = nav.querySelector('.home')?.clientWidth ?? 0;
|
|
115
|
+
// Stage 1: collapse middle items, starting closest to home, until the rest fits.
|
|
116
|
+
const middleItems = Array.from(nav.querySelectorAll('post-breadcrumb-item')).slice(0, -1);
|
|
117
|
+
const { overflowing, remainingWidth } = this.collapseMiddleItems(middleItems, gap, menuWidth, availableWidth);
|
|
118
|
+
// Stage 2: home + last item, single-line. Text home can collapse into the menu, while the
|
|
119
|
+
// icon-only home remains visible and lets the last item wrap instead.
|
|
120
|
+
const homeOverflows = this.usesHomeText && remainingWidth > availableWidth;
|
|
121
|
+
// Stage 3: home joins the existing menu when middle items have collapsed. If no middle item
|
|
122
|
+
// collapsed, the menu needs to be added when home moves into it.
|
|
123
|
+
const widthWithHomeCollapsed = remainingWidth - homeWidth + (overflowing === 0 ? menuWidth : 0);
|
|
124
|
+
const lastItemWraps = this.usesHomeText
|
|
125
|
+
? homeOverflows && widthWithHomeCollapsed > availableWidth
|
|
126
|
+
: remainingWidth > availableWidth;
|
|
127
|
+
return { overflowing, homeOverflows, lastItemWraps };
|
|
128
|
+
}
|
|
129
|
+
/** Stage 1: collapses middle items until the rest fits, or none are left. */
|
|
130
|
+
collapseMiddleItems(items, gap, menuWidth, availableWidth) {
|
|
131
|
+
// Start from the assumption that all items fit and that no menu is shown, so subtract the
|
|
132
|
+
// overflow menu's width from the total.
|
|
133
|
+
let width = this.hiddenNav.scrollWidth - menuWidth + gap;
|
|
94
134
|
let overflowing = 0;
|
|
95
|
-
|
|
96
|
-
while (overflowing < items.length && width > this.hiddenNav.clientWidth) {
|
|
135
|
+
while (overflowing < items.length && width > availableWidth) {
|
|
97
136
|
// The overflow menu needs to be displayed as soon as the first item is moved into it, so its
|
|
98
137
|
// width needs to be taken into account when measuring the remaining items.
|
|
99
138
|
if (overflowing === 0)
|
|
100
|
-
width +=
|
|
139
|
+
width += menuWidth;
|
|
101
140
|
width -= items[overflowing++].clientWidth + gap;
|
|
102
141
|
}
|
|
103
|
-
return overflowing;
|
|
142
|
+
return { overflowing, remainingWidth: width };
|
|
104
143
|
}
|
|
105
|
-
/**
|
|
106
|
-
|
|
107
|
-
*/
|
|
108
|
-
updateItems(items, collapsed) {
|
|
144
|
+
/** Applies the degrade states to the `<post-breadcrumb-item>` elements. */
|
|
145
|
+
updateItems(items, collapsed, lastItemWraps) {
|
|
109
146
|
items.forEach((item, index) => {
|
|
147
|
+
const isLast = index === items.length - 1;
|
|
110
148
|
item.setAttribute('variant', index < collapsed ? 'menuitem' : 'listitem');
|
|
111
|
-
item.setAttribute('selected', String(
|
|
112
|
-
item.setAttribute('standalone', String(
|
|
149
|
+
item.setAttribute('selected', String(isLast));
|
|
150
|
+
item.setAttribute('standalone', String(isLast && index === collapsed && lastItemWraps));
|
|
113
151
|
});
|
|
114
152
|
}
|
|
115
|
-
/**
|
|
116
|
-
* Rebuilds the off-screen copy of the breadcrumb navigation.
|
|
117
|
-
*/
|
|
153
|
+
/** Rebuilds the off-screen copy of the breadcrumb navigation. */
|
|
118
154
|
async updateHiddenNav() {
|
|
119
155
|
this.hiddenNav?.remove();
|
|
120
156
|
this.hiddenNav = await this.renderHiddenNav();
|
|
121
157
|
}
|
|
158
|
+
async updateAfterMutation() {
|
|
159
|
+
await this.updateHiddenNav();
|
|
160
|
+
await this.updateCollapsedItems();
|
|
161
|
+
}
|
|
122
162
|
/**
|
|
123
|
-
* Renders an off-screen copy of the
|
|
163
|
+
* Renders an off-screen copy of the nav for measurements. `.home` is rebuilt independently (see
|
|
164
|
+
* `buildMeasurementHomeElement`) rather than cloned, since the live nav may show the home item
|
|
165
|
+
* in the overflow menu instead if it is already collapsed.
|
|
124
166
|
*/
|
|
125
167
|
async renderHiddenNav() {
|
|
126
168
|
const shadowRoot = this.host.shadowRoot;
|
|
@@ -131,12 +173,29 @@ const PostBreadcrumbs = class {
|
|
|
131
173
|
// Deep clone the breadcrumb navigation and flatten its slots into the clone.
|
|
132
174
|
this.nav.querySelectorAll('slot').forEach((source, index) => {
|
|
133
175
|
const target = slots[index];
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
176
|
+
const assignedElements = source.assignedElements();
|
|
177
|
+
if (assignedElements.length > 0) {
|
|
178
|
+
// Insert the assigned elements where the slot used to be, then drop the now empty slot.
|
|
179
|
+
assignedElements.forEach(element => {
|
|
180
|
+
target.insertAdjacentElement('beforebegin', element.cloneNode(true));
|
|
181
|
+
});
|
|
182
|
+
target.remove();
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
// Nothing assigned: keep the slot's own fallback content (e.g. the default home link) by
|
|
186
|
+
// unwrap the <slot> in place, move its children to where it was, then remove it.
|
|
187
|
+
const parent = target.parentNode;
|
|
188
|
+
if (parent) {
|
|
189
|
+
Array.from(target.childNodes).forEach(child => parent.insertBefore(child, target));
|
|
190
|
+
target.remove();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
139
193
|
});
|
|
194
|
+
// Always measure the full, uncollapsed home item — see the method doc above. Uses
|
|
195
|
+
// replaceChild rather than replaceWith, since the latter isn't implemented by Stencil's
|
|
196
|
+
// mock-doc DOM used during SSR/hydration.
|
|
197
|
+
const existingHome = clone.querySelector('.home');
|
|
198
|
+
existingHome?.parentNode?.replaceChild(this.buildMeasurementHomeElement(), existingHome);
|
|
140
199
|
clone.classList.remove('loading');
|
|
141
200
|
clone.classList.add('invisible');
|
|
142
201
|
// Show the overflow menu so that we can include the space it takes up in the measurement.
|
|
@@ -145,31 +204,72 @@ const PostBreadcrumbs = class {
|
|
|
145
204
|
// Wait for all items to be fully hydrated before measuring.
|
|
146
205
|
const items = clone.querySelectorAll('post-breadcrumb-item');
|
|
147
206
|
await Promise.all(Array.from(items).map(item => componentOnReady.componentOnReady(item)));
|
|
148
|
-
//
|
|
149
|
-
this.updateItems(items, 0);
|
|
207
|
+
// Uncollapsed layout, both single-line, for measurement.
|
|
208
|
+
this.updateItems(items, 0, false);
|
|
150
209
|
return clone;
|
|
151
210
|
}
|
|
211
|
+
/** Builds `.home` in its full, uncollapsed form for measurement. Mirrors `renderHomeContent`, but as plain DOM since this runs outside the render cycle. */
|
|
212
|
+
buildMeasurementHomeElement() {
|
|
213
|
+
const home = document.createElement('div');
|
|
214
|
+
home.className = `breadcrumb-item home${this.usesHomeText ? '' : ' icon'}`;
|
|
215
|
+
home.setAttribute('role', 'listitem');
|
|
216
|
+
const slottedAnchor = this.hasSlottedHomeAnchor
|
|
217
|
+
? Array.from(this.host.children).find(child => child.getAttribute('slot') === 'home')
|
|
218
|
+
: null;
|
|
219
|
+
if (slottedAnchor) {
|
|
220
|
+
home.append(slottedAnchor.cloneNode(true));
|
|
221
|
+
return home;
|
|
222
|
+
}
|
|
223
|
+
const anchor = document.createElement('a');
|
|
224
|
+
if (this.homeUrl)
|
|
225
|
+
anchor.href = this.homeUrl;
|
|
226
|
+
const label = document.createElement('span');
|
|
227
|
+
if (!this.usesHomeText)
|
|
228
|
+
label.className = 'visually-hidden';
|
|
229
|
+
label.textContent = this.textHome;
|
|
230
|
+
anchor.append(label);
|
|
231
|
+
if (!this.usesHomeText) {
|
|
232
|
+
const icon = document.createElement('post-icon');
|
|
233
|
+
icon.setAttribute('aria-hidden', 'true');
|
|
234
|
+
icon.setAttribute('name', 'home');
|
|
235
|
+
anchor.append(icon);
|
|
236
|
+
}
|
|
237
|
+
home.append(anchor);
|
|
238
|
+
return home;
|
|
239
|
+
}
|
|
152
240
|
renderMenu() {
|
|
153
241
|
const menuId = `${this.id}-menu`;
|
|
154
|
-
return (index.h("div", { class: `breadcrumb-item menu ${this.collapsed === 0 ? 'empty' : ''}`, role: "listitem" }, index.h("post-menu-trigger", { for: menuId }, index.h("button", null, index.h("span", { class: "visually-hidden" }, this.textMoreItems), index.h("span", { "aria-hidden": "true" }, "..."))), index.h("post-menu", { id: menuId, label: this.textMoreItems, placement: "bottom-start" }, index.h("slot", { name: "menu" }))));
|
|
242
|
+
return (index.h("div", { class: `breadcrumb-item menu ${this.collapsed === 0 && !this.homeCollapsed ? 'empty' : ''}`, role: "listitem" }, index.h("post-menu-trigger", { for: menuId }, index.h("button", null, index.h("span", { class: "visually-hidden" }, this.textMoreItems), index.h("span", { "aria-hidden": "true" }, "..."))), index.h("post-menu", { id: menuId, label: this.textMoreItems, placement: "bottom-start" }, this.homeCollapsed && this.usesHomeText && (index.h("post-menu-item", null, this.renderHomeContent())), index.h("slot", { name: "menu" }))));
|
|
243
|
+
}
|
|
244
|
+
/** Reused by the plain home item and the home menu — a slot can only be assigned once. */
|
|
245
|
+
renderHomeContent() {
|
|
246
|
+
return (index.h("slot", { name: "home", onSlotchange: () => this.checkSlottedHomeAnchor() }, index.h("a", { href: this.homeUrl }, index.h("span", { class: this.usesHomeText ? undefined : 'visually-hidden' }, this.textHome), !this.usesHomeText && index.h("post-icon", { "aria-hidden": "true", name: "home" }))));
|
|
247
|
+
}
|
|
248
|
+
/** Degrade stage 2: home renders in full, single-line, not yet collapsed. */
|
|
249
|
+
renderHome() {
|
|
250
|
+
return (index.h("div", { class: `breadcrumb-item home${this.usesHomeText ? '' : ' icon'}`, role: "listitem" }, this.renderHomeContent()));
|
|
155
251
|
}
|
|
156
252
|
render() {
|
|
157
253
|
if (this.loaded) {
|
|
158
254
|
const items = this.host.querySelectorAll('post-breadcrumb-item');
|
|
159
|
-
this.updateItems(items, this.collapsed);
|
|
255
|
+
this.updateItems(items, this.collapsed, this.lastItemWraps);
|
|
160
256
|
}
|
|
161
|
-
return (index.h(index.Host, { key: '
|
|
257
|
+
return (index.h(index.Host, { key: '8d5f457a7c6a2df0cfaf5c31f3ffc6937de76e57', "data-version": _package.version, class: this.homeCollapsed && this.usesHomeText ? 'home-collapsed' : undefined }, index.h("nav", { key: 'ce3fd7ad69060dd6968afaad6170e27eee72682f', "aria-label": this.textBreadcrumbs, ref: el => (this.nav = el), class: this.loaded ? '' : 'loading' }, index.h("div", { key: '1c400c8c1e1b625203876cc9804936782a2202c6', role: "list" }, (!this.homeCollapsed || !this.usesHomeText) && this.renderHome(), this.renderMenu(), index.h("slot", { key: '5cf6618b487961c0e7d70637f5396d023660ec55' }), index.h("slot", { key: 'f4fb662d04d9966c76a22444844d692611472b2d', name: "selected" })))));
|
|
162
258
|
}
|
|
163
259
|
get host() { return index.getElement(this); }
|
|
164
260
|
};
|
|
165
261
|
__decorate([
|
|
166
|
-
required.Required(),
|
|
262
|
+
required.Required({ when: 'hasSlottedHomeAnchor', truthy: false }),
|
|
167
263
|
url.Url()
|
|
168
264
|
], PostBreadcrumbs.prototype, "homeUrl", void 0);
|
|
169
265
|
__decorate([
|
|
170
|
-
required.Required(),
|
|
266
|
+
required.Required({ when: 'hasSlottedHomeAnchor', truthy: false }),
|
|
171
267
|
type.Type('string')
|
|
172
268
|
], PostBreadcrumbs.prototype, "textHome", void 0);
|
|
269
|
+
__decorate([
|
|
270
|
+
required.Required(),
|
|
271
|
+
type.Type('boolean')
|
|
272
|
+
], PostBreadcrumbs.prototype, "homeTextOnly", void 0);
|
|
173
273
|
__decorate([
|
|
174
274
|
required.Required(),
|
|
175
275
|
type.Type('string')
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-B3PXzvDk.js');
|
|
4
4
|
var breakpoints = require('./breakpoints-Kruvy8Dm.js');
|
|
5
5
|
var eventFrom = require('./event-from-CTcQxB9-.js');
|
|
6
|
-
var _package = require('./package-
|
|
7
|
-
var oneOf = require('./one-of-
|
|
8
|
-
var required = require('./required-
|
|
6
|
+
var _package = require('./package-pKyFPwiA.js');
|
|
7
|
+
var oneOf = require('./one-of-CRFrfihj.js');
|
|
8
|
+
var required = require('./required-DhAEd0c7.js');
|
|
9
9
|
var fade = require('./fade-CPQhl1fP.js');
|
|
10
10
|
var getFocusableChildren = require('./get-focusable-children-BGVgg7Te.js');
|
|
11
11
|
var index$1 = require('./index-CggFmZ8n.js');
|
|
12
|
-
var type = require('./type-
|
|
12
|
+
var type = require('./type-2Ma9dvHs.js');
|
|
13
13
|
var nanoid = require('./nanoid-CmjyF1Cm.js');
|
|
14
|
-
var pattern = require('./pattern-
|
|
15
|
-
var url = require('./url-
|
|
14
|
+
var pattern = require('./pattern-D329DFcf.js');
|
|
15
|
+
var url = require('./url-DePscsTj.js');
|
|
16
16
|
var utils = require('./utils-s05L2ulk.js');
|
|
17
17
|
var fadeSlide = require('./fade-slide-dPhQa-I1.js');
|
|
18
18
|
var placement = require('./placement-qEFR9hmI.js');
|
|
19
19
|
var getRoot = require('./get-root-B1FnQ50K.js');
|
|
20
|
-
require('./create-validator-decorator-
|
|
20
|
+
require('./create-validator-decorator-Cy5yN6u9.js');
|
|
21
21
|
|
|
22
22
|
const CLOSABLE_TARGETS = [
|
|
23
23
|
{
|
|
@@ -125,7 +125,7 @@ const PostClosebutton = class {
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
render() {
|
|
128
|
-
return (index.h(index.Host, { key: '
|
|
128
|
+
return (index.h(index.Host, { key: 'b8e2214b904f5167fa3753aab947418891236fcf', "data-version": _package.version }, index.h("button", { key: '224ca42d3be187062ba9717e4a534ff34eeafaf7', type: this.buttonType, class: "btn btn-icon btn-secondary btn-sm", onClick: this.handleClick }, index.h("post-icon", { key: '5b289691599d6f9a3bb0fa7a28c71eecd1f5aee7', "aria-hidden": "true", name: "closex" }), index.h("span", { key: 'e22045f15b3dc8b8b228eb4282114e10db68b186', ref: el => (this.visuallyHidden = el), class: "visually-hidden" }, index.h("slot", { key: 'e492390c995a993ffc8988a1c90a41e59fbe39f5' })))));
|
|
129
129
|
}
|
|
130
130
|
static get formAssociated() { return true; }
|
|
131
131
|
get host() { return index.getElement(this); }
|
|
@@ -472,10 +472,10 @@ const PostHeader = class {
|
|
|
472
472
|
render() {
|
|
473
473
|
const onDesktop = this.device === 'desktop';
|
|
474
474
|
const onTabletAndMobile = this.device !== 'desktop';
|
|
475
|
-
return (index.h(index.Host, { key: '
|
|
475
|
+
return (index.h(index.Host, { key: 'd288ef2e58942c2cbc5da673076548c97eef04ed', "data-version": _package.version, "data-color-scheme": "light", "data-burger-menu": this.hasBurgerMenu, "data-menu-extended": this.burgerMenuExtended }, index.h("header", { key: '5357f3edf382dec9b552fdfe9fb51d0878de697c' }, index.h("div", { key: 'bafa11390b33056e5a3d1a8a2922fd3a43a25020', class: "global-header" }, index.h("div", { key: '2d54e8d2931864880ff7a28aea64625e775ce327', class: "section" }, index.h("div", { key: 'b3a87bbf3b87213e22043d58a7298d0cff530cdf', class: "logo" }, index.h("slot", { key: '9d559b9231dc23841e277d3f4633cdeba2da12b2', name: "post-logo" })), index.h("div", { key: '64ebd463868ce8b417023651e745e33331feb908', class: "sliding-controls" }, onDesktop && (index.h("div", { key: 'b4e7d7231a0d8bebe620d41cb655c3686449b19f', class: "audience" }, index.h("slot", { key: '0781a76b1853a842dc74ec2a2a649f7de487e148', name: "audience" }))), index.h("slot", { key: '25f1d5b34a5aa950014214f810f3acca95dbbe80', name: "global-nav-primary" }), (onDesktop || !this.hasMainNav) && [
|
|
476
476
|
index.h("slot", { key: "global-nav-secondary", name: "global-nav-secondary" }),
|
|
477
477
|
index.h("slot", { key: "language-menu", name: "language-menu" }),
|
|
478
|
-
], index.h("slot", { key: '
|
|
478
|
+
], index.h("slot", { key: 'd7121e5e9ddf825f96a3a82e65ff135c61891adb', name: "post-login" }), onTabletAndMobile && this.hasMainNav && (index.h("post-togglebutton", { key: 'dd0bcf9cfd96d4ffa44fc549d518d7b39d287156', class: "burger-button", ref: el => (this.burgerMenuButton = el), onClick: () => this.toggleBurgerMenu() }, index.h("span", { key: '23004cb12733a7081f828d33327cc26adafe3888' }, this.textMenu), index.h("post-icon", { key: '7fb36892eadfcce0a85d964c411aeafc3fbbde1b', "aria-hidden": "true", name: "burger", "data-showwhen": "untoggled" }), index.h("post-icon", { key: 'a41292205573c03f25d225d4f4296f75ffe6c7ce', "aria-hidden": "true", name: "closex", "data-showwhen": "toggled" })))))), index.h("div", { key: '7d6d1424881bb5277210c86b194dfb9e5dcb7c59', ref: el => (this.localHeader = el), class: { 'local-header': true, 'megadropdown-open': this.megadropdownOpen } }, index.h("div", { key: '724a8d3f79112875ba343470f9d0b753ce5d4861', class: "section" }, index.h("slot", { key: '688aafdec4e4d5565f3d0a9d9bd9bb7bc78152be', name: "side-nav" }), index.h("slot", { key: '12590bfb4bfcc8c565f008a8e3d75b5951eb73bc', name: "title" }), this.hasTitle && index.h("slot", { key: 'd862de0f3aaba5ea22a26c387ea7e93dc0c5e79c', name: "local-nav" }), onDesktop && index.h("slot", { key: '1a25ec6694bc8b2c06e21449dc566f36595afbb5', name: "main-nav" }), onDesktop && !this.hasTitle && index.h("slot", { key: '987c26ee73fb19049fdd19de79b537b71e2771de', name: "local-nav" }))), this.hasBurgerMenu && this.renderBurgerMenu())));
|
|
479
479
|
}
|
|
480
480
|
get host() { return index.getElement(this); }
|
|
481
481
|
static get watchers() { return {
|
|
@@ -605,7 +605,7 @@ const PostIcon = class {
|
|
|
605
605
|
}).filter(([_key, value]) => value !== null));
|
|
606
606
|
}
|
|
607
607
|
render() {
|
|
608
|
-
return (index.h(index.Host, { key: '
|
|
608
|
+
return (index.h(index.Host, { key: '405ccfde4206c14f044575d0b23998d93a03ffb6', "data-version": _package.version }, index.h("span", { key: 'ad70ccf63add4b881ef6096ae460e13fba09f508', style: this.getStyles() })));
|
|
609
609
|
}
|
|
610
610
|
get host() { return index.getElement(this); }
|
|
611
611
|
};
|
|
@@ -838,7 +838,7 @@ const PostLogo = class {
|
|
|
838
838
|
render() {
|
|
839
839
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
840
840
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
841
|
-
return (index.h(index.Host, { key: '
|
|
841
|
+
return (index.h(index.Host, { key: '1f69b0ddc0ecf2fde47423cd7824fcbe76e4a529', "data-version": _package.version }, index.h(LogoTag, { key: '096736bd50a6dd43e02a104e7e81897cb286db60', class: `logo ${logoLink ? 'logo-link' : ''}`, ...(logoLink ? { href: logoLink } : {}) }, index.h("span", { key: 'bc49b9591424f02744f771eb1079911f02ceca33', class: "description" }, index.h("slot", { key: 'ea905eac805e2a9940bfe50aa222bef738d15d27', onSlotchange: () => this.checkDescription() })), index.h("svg", { key: '482d94c38347017269dabd0ab3d15f4ede14f187', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, index.h("g", { key: 'fcd3dc56e8a0e448abe65b557639a8bea8ca580f', id: "Logo" }, index.h("rect", { key: '11ed7bad596ee07301f1c1101ddded089ef2bf99', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), index.h("polygon", { key: '6ab9d28c8492c746a2620cff62dbd92a59a00aff', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), index.h("path", { key: '8b96cee7ee8ad1ec3c22aaf7928f7a711c05c828', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
|
|
842
842
|
}
|
|
843
843
|
get host() { return index.getElement(this); }
|
|
844
844
|
};
|
|
@@ -978,7 +978,7 @@ const PostMainnavigation = class {
|
|
|
978
978
|
}, NAVBAR_DISABLE_DURATION);
|
|
979
979
|
}
|
|
980
980
|
render() {
|
|
981
|
-
return (index.h(index.Host, { key: '
|
|
981
|
+
return (index.h(index.Host, { key: 'cf7b2328a41b41ca28956120b8042590655e7bb2', version: _package.version, class: this.canScroll ? 'scrollable' : '' }, index.h("div", { key: 'a25c55cf7b11a11ce86fb134dd57dbdad3d30301', "aria-hidden": "true", class: { 'scroll-control scroll-left': true, 'd-none': !this.canScrollLeft }, onMouseDown: e => this.handleScrollButtonClick(e, 'left') }, index.h("post-icon", { key: '013778591637d5ee0ac2cd2bf3f23c677ba2a13f', "aria-hidden": "true", name: "chevronleft" })), index.h("nav", { key: 'a007b7be57429580de35865e5eff0c54378d0a8e', ref: el => (this.navbar = el), "aria-label": this.textMain }, index.h("slot", { key: 'bc8e1db18430ee43b5963539fbaa65e1fb1b0c55' })), index.h("div", { key: 'cdb413fedc9a90c712db0fe5d6ab760a426ff632', "aria-hidden": "true", class: { 'scroll-control scroll-right': true, 'd-none': !this.canScrollRight }, onMouseDown: e => this.handleScrollButtonClick(e, 'right') }, index.h("post-icon", { key: 'b2df569a79881b3a044556ba9c0f2e2b0646e78b', "aria-hidden": "true", name: "chevronright" }))));
|
|
982
982
|
}
|
|
983
983
|
get host() { return index.getElement(this); }
|
|
984
984
|
};
|
|
@@ -1001,6 +1001,8 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
1001
1001
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1002
1002
|
};
|
|
1003
1003
|
const PostMegadropdown = class {
|
|
1004
|
+
/** Tracks the currently active dropdown instance. */
|
|
1005
|
+
static { this.activeDropdown = null; }
|
|
1004
1006
|
get megadropdownTrigger() {
|
|
1005
1007
|
const hostId = this.host.getAttribute('id');
|
|
1006
1008
|
return hostId ? document.querySelector(`post-megadropdown-trigger[for="${hostId}"]`) : null;
|
|
@@ -1282,12 +1284,10 @@ const PostMegadropdown = class {
|
|
|
1282
1284
|
}
|
|
1283
1285
|
render() {
|
|
1284
1286
|
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
1285
|
-
return (index.h(index.Host, { key: '
|
|
1287
|
+
return (index.h(index.Host, { key: 'c0854fff62bf5e8de1597e46051aea5f300ee686', version: _package.version }, index.h("div", { key: '1f4f66b74d7129481d76f1eec15a924b2c37718c', ref: el => (this.animatedContainer = el), class: "megadropdown", style: containerStyle }, index.h("div", { key: 'af743442fe3ad6211cddccddf5d0803de9f501b5', class: "section" }, this.device !== 'desktop' && this.megadropdownTitle && (index.h("p", { key: '35a03b2ee32498aa157140d4e6916cbf66655e5c', class: "megadropdown-title" }, this.megadropdownTitle)), index.h("div", { key: '6c4efb52e7bb04c4f40d5b3f739ca69771c48602', class: "megadropdown-content" }, index.h("slot", { key: '2b3200495cf23fe049734de9de9a5a1f4c9b09f3' })), this.device === 'desktop' ? (index.h("post-closebutton", { onClick: () => this.hide(true), class: "close-button", size: "small", placement: "manual" }, this.textClose)) : (index.h("button", { onClick: () => this.hide(true), class: "back-button" }, index.h("post-icon", { name: "arrowleft" }), this.textBack))))));
|
|
1286
1288
|
}
|
|
1287
1289
|
get host() { return index.getElement(this); }
|
|
1288
1290
|
};
|
|
1289
|
-
/** Tracks the currently active dropdown instance. */
|
|
1290
|
-
PostMegadropdown.activeDropdown = null;
|
|
1291
1291
|
__decorate$4([
|
|
1292
1292
|
required.Required(),
|
|
1293
1293
|
type.Type('string')
|
|
@@ -1369,7 +1369,7 @@ const PostMegadropdownTrigger = class {
|
|
|
1369
1369
|
this.megadropdown.toggle();
|
|
1370
1370
|
}
|
|
1371
1371
|
render() {
|
|
1372
|
-
return (index.h(index.Host, { key: '
|
|
1372
|
+
return (index.h(index.Host, { key: '7e6201e3cdea96113bbebdeeb805acff557c8bbb', "data-version": _package.version }, index.h("button", { key: '1863f48dbd6e98b7a2b226b7c3b25b16a38c644b', ref: el => (this.interactiveButton = el), type: "button", "aria-haspopup": "menu", "aria-expanded": this.isMegadropdownExpanded.toString(), onClick: this.onClick.bind(this), onKeyDown: this.onKeyDown.bind(this), class: { active: this.active } }, index.h("span", { key: 'dee7e77e45914a3e40a9f5027570bef0035dfdf2' }, index.h("span", { key: '362865f7946f14f45ecdb240e81f09370e3f6d10', innerHTML: this.slottedContent }), index.h("span", { key: 'd61eb63433aa65631f787646df2c6705c3d6e7a1', "aria-hidden": "true" }, index.h("slot", { key: 'c831f7299fe3c80b8229c861e01e09a2ee481bc8' }))), index.h("post-icon", { key: 'bcc8ed53293e16d4571e989a491760f98425b298', name: "chevrondown" }))));
|
|
1373
1373
|
}
|
|
1374
1374
|
get host() { return index.getElement(this); }
|
|
1375
1375
|
};
|
|
@@ -1577,7 +1577,7 @@ const PostMenu = class {
|
|
|
1577
1577
|
]));
|
|
1578
1578
|
}
|
|
1579
1579
|
render() {
|
|
1580
|
-
return (index.h(index.Host, { key: '
|
|
1580
|
+
return (index.h(index.Host, { key: '22441c2bef0402f10e77b96b8a5d48a0648615f7', "data-version": _package.version }, index.h("post-popovercontainer", { key: '8b37fe55d58a3a486e947266348b55408999a8bb', onPostShow: this.handlePostShown.bind(this), onPostBeforeToggle: this.handlePostBeforeToggle.bind(this), placement: this.placement, ref: e => (this.popoverRef = e) }, index.h("div", { key: '2679eb9c4a95585b8aaf74e29f026c84b10aa6f3', part: "post-menu" }, index.h("slot", { key: '0da58a1bde1bdb4c1f8b7b19ca8cbde14d7946fc', name: "header" }), index.h("slot", { key: '801f7bc59d4d3267728b9adf0750dbea76a7652c' })))));
|
|
1581
1581
|
}
|
|
1582
1582
|
get host() { return index.getElement(this); }
|
|
1583
1583
|
};
|
|
@@ -1596,7 +1596,7 @@ __decorate$2([
|
|
|
1596
1596
|
], PostMenu.prototype, "handlePostBeforeToggle", null);
|
|
1597
1597
|
PostMenu.style = postMenuCss();
|
|
1598
1598
|
|
|
1599
|
-
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;width:100%}@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
|
|
1599
|
+
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;width:100%}@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 button,post-menu-item a{position:relative;display:flex;align-items:center;padding:8px 12px 8px 16px;gap:12px;font-size:.875rem;color:#050400;border-radius:0;text-decoration:none}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:12px;gap:16px}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:13px}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}post-menu-item button post-icon,post-menu-item a post-icon{width:16px;height:16px;margin-block:4px}@media screen and (min-width: 780px){post-menu-item button post-icon,post-menu-item a post-icon{width:24px;height:24px;margin:0}}`;
|
|
1600
1600
|
|
|
1601
1601
|
const PostMenuItem = class {
|
|
1602
1602
|
constructor(hostRef) {
|
|
@@ -1676,7 +1676,7 @@ const PostMenuTrigger = class {
|
|
|
1676
1676
|
return null;
|
|
1677
1677
|
}
|
|
1678
1678
|
render() {
|
|
1679
|
-
return (index.h(index.Host, { key: '
|
|
1679
|
+
return (index.h(index.Host, { key: 'f75522d28e9a45c80846a191cff3ea2eb51b5bde', "data-version": _package.version }, index.h("slot", { key: 'bc70e3ddc8dc372611c00a4cda52cd35ede02a3f' })));
|
|
1680
1680
|
}
|
|
1681
1681
|
get host() { return index.getElement(this); }
|
|
1682
1682
|
};
|
|
@@ -4546,7 +4546,7 @@ function applySafeArea(clippingRect, element) {
|
|
|
4546
4546
|
*/
|
|
4547
4547
|
const computePositionWithSafeArea = (reference, floating, options) => {
|
|
4548
4548
|
// Adapted from https://github.com/floating-ui/floating-ui/blob/27629b74ba36ab8ceb2a968051927b9b69511a3b/packages/dom/src/index.ts#L15
|
|
4549
|
-
options
|
|
4549
|
+
options ??= {};
|
|
4550
4550
|
return computePosition(reference, floating, {
|
|
4551
4551
|
...options,
|
|
4552
4552
|
platform: {
|
|
@@ -4573,6 +4573,30 @@ const ANIMATIONS = {
|
|
|
4573
4573
|
'pop-in': popIn,
|
|
4574
4574
|
};
|
|
4575
4575
|
const PostPopovercontainer = class {
|
|
4576
|
+
static {
|
|
4577
|
+
this.STATIC_SIDES = {
|
|
4578
|
+
top: 'bottom',
|
|
4579
|
+
right: 'left',
|
|
4580
|
+
bottom: 'top',
|
|
4581
|
+
left: 'right',
|
|
4582
|
+
};
|
|
4583
|
+
}
|
|
4584
|
+
static {
|
|
4585
|
+
this.PROPERTIES_TO_CLEAR = [
|
|
4586
|
+
'--post-safe-space-popover-x',
|
|
4587
|
+
'--post-safe-space-popover-y',
|
|
4588
|
+
'--post-safe-space-popover-x-start',
|
|
4589
|
+
'--post-safe-space-popover-x-end',
|
|
4590
|
+
'--post-safe-space-popover-y-start',
|
|
4591
|
+
'--post-safe-space-popover-y-end',
|
|
4592
|
+
'--post-safe-space-trigger-x',
|
|
4593
|
+
'--post-safe-space-trigger-y',
|
|
4594
|
+
'--post-safe-space-trigger-x-start',
|
|
4595
|
+
'--post-safe-space-trigger-x-end',
|
|
4596
|
+
'--post-safe-space-trigger-y-start',
|
|
4597
|
+
'--post-safe-space-trigger-y-end',
|
|
4598
|
+
];
|
|
4599
|
+
}
|
|
4576
4600
|
constructor(hostRef) {
|
|
4577
4601
|
index.registerInstance(this, hostRef);
|
|
4578
4602
|
this.postBeforeShow = index.createEvent(this, "postBeforeShow");
|
|
@@ -4908,32 +4932,12 @@ const PostPopovercontainer = class {
|
|
|
4908
4932
|
}
|
|
4909
4933
|
}
|
|
4910
4934
|
render() {
|
|
4911
|
-
return (index.h(index.Host, { key: '
|
|
4935
|
+
return (index.h(index.Host, { key: 'f3ea4bfc9a59faa2fbf1e413a1ec648f598a6779', "data-version": _package.version, popover: "auto" }, index.h("div", { key: 'a328c73c7e08eca1e423fcbe736798188cca2a87', part: "post-popovercontainer-content", class: "popover-content" }, this.arrow && (index.h("span", { key: '8fad0095fb8d8c903ba84a639b4efc3e321c6aef', "dynamic-placement": this.dynamicPlacement, class: "arrow", ref: el => {
|
|
4912
4936
|
this.arrowRef = el;
|
|
4913
|
-
} })), index.h("span", { key: '
|
|
4937
|
+
} })), index.h("span", { key: 'deadbcc5892ed545a64b4a0e5e0936e0dd1feb70', part: "post-popovercontainer-border-mask" }), index.h("slot", { key: '48c4db7ab222f3ef18157ce19d8ba15d75441f98' }))));
|
|
4914
4938
|
}
|
|
4915
4939
|
get host() { return index.getElement(this); }
|
|
4916
4940
|
};
|
|
4917
|
-
PostPopovercontainer.STATIC_SIDES = {
|
|
4918
|
-
top: 'bottom',
|
|
4919
|
-
right: 'left',
|
|
4920
|
-
bottom: 'top',
|
|
4921
|
-
left: 'right',
|
|
4922
|
-
};
|
|
4923
|
-
PostPopovercontainer.PROPERTIES_TO_CLEAR = [
|
|
4924
|
-
'--post-safe-space-popover-x',
|
|
4925
|
-
'--post-safe-space-popover-y',
|
|
4926
|
-
'--post-safe-space-popover-x-start',
|
|
4927
|
-
'--post-safe-space-popover-x-end',
|
|
4928
|
-
'--post-safe-space-popover-y-start',
|
|
4929
|
-
'--post-safe-space-popover-y-end',
|
|
4930
|
-
'--post-safe-space-trigger-x',
|
|
4931
|
-
'--post-safe-space-trigger-y',
|
|
4932
|
-
'--post-safe-space-trigger-x-start',
|
|
4933
|
-
'--post-safe-space-trigger-x-end',
|
|
4934
|
-
'--post-safe-space-trigger-y-start',
|
|
4935
|
-
'--post-safe-space-trigger-y-end',
|
|
4936
|
-
];
|
|
4937
4941
|
__decorate([
|
|
4938
4942
|
oneOf.OneOf(placement.PLACEMENT_TYPES)
|
|
4939
4943
|
], PostPopovercontainer.prototype, "placement", void 0);
|
|
@@ -4974,7 +4978,7 @@ const PostTogglebutton = class {
|
|
|
4974
4978
|
});
|
|
4975
4979
|
}
|
|
4976
4980
|
render() {
|
|
4977
|
-
return (index.h(index.Host, { key: '
|
|
4981
|
+
return (index.h(index.Host, { key: '81fa9d922480059096e4146c10cf2ef72357b482', "data-version": _package.version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, index.h("slot", { key: '4e8d793e3867ba4c9c8e17d509652309a79f032a' })));
|
|
4978
4982
|
}
|
|
4979
4983
|
get host() { return index.getElement(this); }
|
|
4980
4984
|
};
|