@nldd/design-system 0.8.100 → 0.9.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/custom-elements.json +325 -16
- package/dist/components/actions/button/button.d.ts +5 -3
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.d.ts +3 -1
- package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.js +3 -1
- package/dist/components/actions/button/button.i18n.js.map +1 -1
- package/dist/components/actions/button/button.js +1 -1
- package/dist/components/actions/button/button.styles.js +2 -2
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +9 -10
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +5 -3
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +1 -1
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +7 -7
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +1 -1
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +4 -2
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/components.js +357 -122
- package/dist/components/content/avatar/avatar.d.ts +5 -3
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts +3 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.js +3 -1
- package/dist/components/content/avatar/avatar.i18n.js.map +1 -1
- package/dist/components/content/avatar/avatar.js +1 -1
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.template.js +6 -6
- package/dist/components/content/avatar/avatar.template.js.map +1 -1
- package/dist/components/{icon-button-BtU8DX64.js → icon-button-BVhiOwX9.js} +10 -5
- package/dist/components/layout/card/card.d.ts +6 -4
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.d.ts +3 -1
- package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.js +3 -1
- package/dist/components/layout/card/card.i18n.js.map +1 -1
- package/dist/components/layout/card/card.js +2 -2
- package/dist/components/layout/card/card.template.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.js +6 -6
- package/dist/components/layout/card/card.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +9 -0
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.js +29 -1
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +20 -13
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +7 -3
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +31 -4
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +16 -0
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +61 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +5 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +25 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +28 -7
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js +8 -4
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +5 -2
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +9 -4
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +12 -5
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +15 -7
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +9 -2
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts +7 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +6 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +7 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +12 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +6 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +6 -4
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.d.ts +3 -1
- package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.js +3 -1
- package/dist/components/navigation/link/link.i18n.js.map +1 -1
- package/dist/components/navigation/link/link.js +2 -2
- package/dist/components/navigation/link/link.styles.js +2 -2
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +7 -8
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +1 -14
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +7 -55
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/{with-translations-C8_0-9y8.js → with-translations-C6QfP6_S.js} +24 -1
- package/dist/nldd.min.js +753 -707
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +24 -7
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +24 -7
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +24 -7
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +2 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +24 -7
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +24 -7
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +29 -16
- package/dist/utilities/focus-target.d.ts +23 -0
- package/dist/utilities/focus-target.d.ts.map +1 -0
- package/dist/utilities/focus-target.js +70 -0
- package/dist/utilities/focus-target.js.map +1 -0
- package/dist/utilities/link-hint.d.ts +18 -0
- package/dist/utilities/link-hint.d.ts.map +1 -0
- package/dist/utilities/link-hint.js +29 -0
- package/dist/utilities/link-hint.js.map +1 -0
- package/package.json +2 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { n as slottedReset, t as inheritedTextReset } from "./shadow-resets-CPa58rmc.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as linkRel, i as linkHintKey, n as setTranslations, r as translate, t as withTranslations } from "./with-translations-C6QfP6_S.js";
|
|
4
4
|
import { t as __decorate } from "./decorate-CO88j7Lc.js";
|
|
5
5
|
import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
|
|
6
|
-
import { i as PopupAnchorController, n as NLDDTooltip, r as NLDDActivityIndicator, t as NLDDIconButton } from "./icon-button-
|
|
6
|
+
import { i as PopupAnchorController, n as NLDDTooltip, r as NLDDActivityIndicator, t as NLDDIconButton } from "./icon-button-BVhiOwX9.js";
|
|
7
7
|
import { t as NLDDIcon } from "./icon-D_ZGezHx.js";
|
|
8
8
|
import { n as isPointerMode, r as isTouchMode, t as isKeyboardMode } from "./input-modality-DhTeUxKi.js";
|
|
9
9
|
import { t as breakpoints } from "./breakpoints-CkxsiRgH.js";
|
|
@@ -547,9 +547,9 @@ var buttonStyles = css`
|
|
|
547
547
|
color: var(--_button-is-active-secondary-content-color);
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
/* Visually-hidden
|
|
550
|
+
/* Visually-hidden link hint (another website, a new tab);
|
|
551
551
|
part of the link's accessible name but never shown. Standard recipe. */
|
|
552
|
-
.
|
|
552
|
+
.button__link-hint {
|
|
553
553
|
position: absolute;
|
|
554
554
|
margin: -1px;
|
|
555
555
|
border: 0;
|
|
@@ -649,10 +649,11 @@ function template$24(helpers) {
|
|
|
649
649
|
const content = renderContent(this);
|
|
650
650
|
const buttonClass = ["button", this.supportingText ? "has-supporting-text" : ""].filter(Boolean).join(" ");
|
|
651
651
|
const ariaExpanded = this.expandable || !!this.popupType ? String(this.expanded) : this.expanded ? "true" : nothing;
|
|
652
|
-
const
|
|
652
|
+
const hintKey = linkHintKey(this.href, this.target);
|
|
653
|
+
const linkHint = hintKey ? this._t(`components.button.${hintKey}`) : "";
|
|
653
654
|
const baseAriaLabel = this.accessibleLabel || (this.supportingText ? [this.text, this.supportingText].filter(Boolean).join(", ") : "");
|
|
654
|
-
const ariaLabel = baseAriaLabel ? [baseAriaLabel,
|
|
655
|
-
const
|
|
655
|
+
const ariaLabel = baseAriaLabel ? [baseAriaLabel, linkHint].filter(Boolean).join(", ") : nothing;
|
|
656
|
+
const renderLinkHint = !!linkHint && !baseAriaLabel;
|
|
656
657
|
const ariaBusy = this.loading ? "true" : nothing;
|
|
657
658
|
const loadingIndicator = this.loading ? html`
|
|
658
659
|
<div class="button__activity-indicator">
|
|
@@ -680,8 +681,7 @@ function template$24(helpers) {
|
|
|
680
681
|
@pointerdown=${this._popup.handlePointerdown}
|
|
681
682
|
@click=${helpers.handleClick}
|
|
682
683
|
>
|
|
683
|
-
${content}
|
|
684
|
-
${renderOpensInNewTabHint ? html`<span class="button__opens-in-new-tab-hint">${opensInNewTabHint}</span>` : nothing}
|
|
684
|
+
${content}${renderLinkHint ? html`<span class="button__link-hint">, ${linkHint}</span>` : nothing}
|
|
685
685
|
</a>
|
|
686
686
|
${loadingIndicator}
|
|
687
687
|
${popupSlot}
|
|
@@ -711,7 +711,11 @@ function template$24(helpers) {
|
|
|
711
711
|
}
|
|
712
712
|
//#endregion
|
|
713
713
|
//#region src/components/actions/button/button.i18n.ts
|
|
714
|
-
var nlddButtonTranslations = {
|
|
714
|
+
var nlddButtonTranslations = {
|
|
715
|
+
"components.button.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
716
|
+
"components.button.link-hint-external-lowercase-label": "andere website",
|
|
717
|
+
"components.button.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
718
|
+
};
|
|
715
719
|
//#endregion
|
|
716
720
|
//#region src/utilities/described-by-mixin.ts
|
|
717
721
|
/**
|
|
@@ -825,7 +829,7 @@ function DescribedBy(Base) {
|
|
|
825
829
|
* @attr {string} end-icon - Icon name for the end icon (after text)
|
|
826
830
|
* @attr {string} accessible-label - Accessible label for the button, overrides text for screen readers
|
|
827
831
|
* @attr {string} href - When set, renders an <a> element instead of <button>
|
|
828
|
-
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the button adds a visually hidden "opens in new tab" announcement for screen readers (WCAG 2.1 SC 3.2.2).
|
|
832
|
+
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the button adds a visually hidden "opens in new tab" announcement for screen readers (WCAG 2.1 SC 3.2.2). An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
829
833
|
* @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
830
834
|
* @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
|
|
831
835
|
*
|
|
@@ -5603,7 +5607,7 @@ var toolbarTitleStyles = css`
|
|
|
5603
5607
|
text-decoration: none;
|
|
5604
5608
|
}
|
|
5605
5609
|
|
|
5606
|
-
.
|
|
5610
|
+
.toolbar__link-hint {
|
|
5607
5611
|
position: absolute;
|
|
5608
5612
|
margin: -1px;
|
|
5609
5613
|
border: 0;
|
|
@@ -5685,6 +5689,7 @@ function toolbarTitleTemplate(component) {
|
|
|
5685
5689
|
${component.supportingText ? html`<p class="toolbar__supporting-text">${component.supportingText}</p>` : nothing}
|
|
5686
5690
|
</div>
|
|
5687
5691
|
`;
|
|
5692
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
5688
5693
|
return html`
|
|
5689
5694
|
${component.href ? html`
|
|
5690
5695
|
<a class="toolbar__title-link"
|
|
@@ -5693,7 +5698,7 @@ function toolbarTitleTemplate(component) {
|
|
|
5693
5698
|
rel=${linkRel(null, component.target) || nothing}
|
|
5694
5699
|
>
|
|
5695
5700
|
<slot name="media"></slot>
|
|
5696
|
-
${titleGroup}${
|
|
5701
|
+
${titleGroup}${hintKey ? html`<span class="toolbar__link-hint">, ${component._t(`components.toolbar.${hintKey}`)}</span>` : nothing}
|
|
5697
5702
|
</a>
|
|
5698
5703
|
` : html`
|
|
5699
5704
|
<slot name="media"></slot>
|
|
@@ -5743,7 +5748,9 @@ function template$17(component, hasCenterChildren, leftSpacerZero, rightSpacerZe
|
|
|
5743
5748
|
//#region src/components/actions/toolbar/toolbar.i18n.ts
|
|
5744
5749
|
var nlddToolbarTranslations = {
|
|
5745
5750
|
"components.toolbar.overflow-action": "Meer",
|
|
5746
|
-
"components.toolbar.
|
|
5751
|
+
"components.toolbar.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
5752
|
+
"components.toolbar.link-hint-external-lowercase-label": "andere website",
|
|
5753
|
+
"components.toolbar.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
5747
5754
|
};
|
|
5748
5755
|
//#endregion
|
|
5749
5756
|
//#region src/components/actions/toolbar/toolbar.ts
|
|
@@ -5807,7 +5814,7 @@ var nlddToolbarTranslations = {
|
|
|
5807
5814
|
* @attr {'sm'|'md'|'lg'} size - Set by nldd-toolbar, not a consumer attribute: mirrors the toolbar's size (default: 'md'), which sets the title group height and, at 'sm', the title and supporting-text fonts.
|
|
5808
5815
|
*
|
|
5809
5816
|
* @attr {string} href - Makes the mark and the name one link, for the place this window belongs to (usually the app's own start). The `action` slot stays outside it: a control inside a link is a control you cannot reach without following the link.
|
|
5810
|
-
* @attr {string} target - Where the link opens; only meaningful with `href`. `_blank` adds rel="noopener noreferrer" and a visually hidden "opens in a new tab" announcement.
|
|
5817
|
+
* @attr {string} target - Where the link opens; only meaningful with `href`. `_blank` adds rel="noopener noreferrer" and a visually hidden "opens in a new tab" announcement. An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
5811
5818
|
* @attr {object} translations - Override translation keys (the new-tab announcement); unset keys fall back to Dutch.
|
|
5812
5819
|
*
|
|
5813
5820
|
* @slot media - Optional leading image before the title: a logo, a product mark, a file-type icon. Its height is capped to the title group so it cannot stretch the row; pick the size within that yourself. With no `text` the media stands alone and carries the name, so give it one (an `alt`, or an accessible label).
|
|
@@ -6537,7 +6544,11 @@ function groupForOverflow(items) {
|
|
|
6537
6544
|
}
|
|
6538
6545
|
//#endregion
|
|
6539
6546
|
//#region src/components/content/avatar/avatar.i18n.ts
|
|
6540
|
-
var nlddAvatarTranslations = {
|
|
6547
|
+
var nlddAvatarTranslations = {
|
|
6548
|
+
"components.avatar.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
6549
|
+
"components.avatar.link-hint-external-lowercase-label": "andere website",
|
|
6550
|
+
"components.avatar.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
6551
|
+
};
|
|
6541
6552
|
//#endregion
|
|
6542
6553
|
//#region src/components/content/avatar/avatar.styles.ts
|
|
6543
6554
|
var avatarStyles = css`
|
|
@@ -6710,8 +6721,9 @@ function avatarTemplate(component) {
|
|
|
6710
6721
|
const initials = component.resolvedInitials;
|
|
6711
6722
|
const showInitials = !showImage && initials !== "";
|
|
6712
6723
|
const showIcon = !showImage && !showInitials;
|
|
6713
|
-
const
|
|
6714
|
-
const
|
|
6724
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
6725
|
+
const linkHint = hintKey ? component._t(`components.avatar.${hintKey}`) : "";
|
|
6726
|
+
const controlLabel = [component.accessibleLabel || component.name, linkHint].filter(Boolean).join(", ") || nothing;
|
|
6715
6727
|
const content = html`
|
|
6716
6728
|
${showImage ? html`
|
|
6717
6729
|
<img class="avatar__image"
|
|
@@ -6803,7 +6815,7 @@ function avatarTemplate(component) {
|
|
|
6803
6815
|
* @attr {string} href - Makes the avatar a link to this URL; the shape itself becomes the link, so the hit area and the focus ring follow it
|
|
6804
6816
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for an avatar that is a link or a button inside a roving container (a row of an nldd-list). Does nothing on a decorative avatar.
|
|
6805
6817
|
* @attr {boolean} button - Makes the avatar a button; ignored when `href` is set
|
|
6806
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab"
|
|
6818
|
+
* @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab". An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
6807
6819
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
6808
6820
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
6809
6821
|
*
|
|
@@ -9480,10 +9492,15 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
|
|
|
9480
9492
|
else this.style.removeProperty("--_list-max-height");
|
|
9481
9493
|
}
|
|
9482
9494
|
}
|
|
9483
|
-
/**
|
|
9495
|
+
/** The name of a navigation list: `accessible-label`, or the translated default. */
|
|
9496
|
+
_navigationLabel() {
|
|
9497
|
+
return this.accessibleLabel || this._t("components.list.navigation-accessible-label");
|
|
9498
|
+
}
|
|
9499
|
+
/** On every render, so the texts this list sets itself follow a language
|
|
9500
|
+
* switch and a change of `accessible-label`. */
|
|
9484
9501
|
_syncTranslatedTexts() {
|
|
9485
9502
|
if (this.hasAttribute("data-nldd-auto-label") && this.getAttribute("aria-label") === this._autoLabel) {
|
|
9486
|
-
this._autoLabel = this.
|
|
9503
|
+
this._autoLabel = this._navigationLabel();
|
|
9487
9504
|
this.setAttribute("aria-label", this._autoLabel);
|
|
9488
9505
|
}
|
|
9489
9506
|
if (this.hasAttribute("aria-keyshortcuts")) this.setAttribute("aria-description", this._t("components.list.arrow-navigation-description-text"));
|
|
@@ -9492,7 +9509,7 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
|
|
|
9492
9509
|
if (this.type === "navigation") {
|
|
9493
9510
|
this.setAttribute("role", "navigation");
|
|
9494
9511
|
if (!this.hasAttribute("aria-label") && !this.hasAttribute("aria-labelledby")) {
|
|
9495
|
-
this._autoLabel = this.
|
|
9512
|
+
this._autoLabel = this._navigationLabel();
|
|
9496
9513
|
this.setAttribute("aria-label", this._autoLabel);
|
|
9497
9514
|
this.setAttribute("data-nldd-auto-label", "");
|
|
9498
9515
|
}
|
|
@@ -10201,7 +10218,7 @@ var listItemStyles = css`
|
|
|
10201
10218
|
opacity: var(--primitives-opacity-disabled);
|
|
10202
10219
|
}
|
|
10203
10220
|
|
|
10204
|
-
.list-
|
|
10221
|
+
.list-item__link-hint {
|
|
10205
10222
|
position: absolute;
|
|
10206
10223
|
margin: -1px;
|
|
10207
10224
|
border: 0;
|
|
@@ -10464,7 +10481,8 @@ var listItemStyles = css`
|
|
|
10464
10481
|
//#region src/components/lists-and-tables/list-item/list-item.template.ts
|
|
10465
10482
|
var content = html`<slot></slot>`;
|
|
10466
10483
|
var divider = html`<div class="list-item__divider"></div>`;
|
|
10467
|
-
var template$14 = (button, href, target, rel,
|
|
10484
|
+
var template$14 = (button, href, target, rel, linkHint, actionTabindex, isHighlighted = false, checkbox = false, radio = false, checked = false, expanded, showChildren = false, hasCheckedSegment = false, disabled = false, childrenRole = "group", childrenOpen = expanded === true, accessibleLabel = "") => {
|
|
10485
|
+
const ariaLabel = accessibleLabel ? [accessibleLabel, linkHint].filter(Boolean).join(", ") : nothing;
|
|
10468
10486
|
const ariaExpanded = expanded === void 0 ? nothing : String(expanded);
|
|
10469
10487
|
const children = showChildren ? html`<div class="list-item__children"
|
|
10470
10488
|
role=${childrenRole}
|
|
@@ -10480,16 +10498,18 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10480
10498
|
href=${href}
|
|
10481
10499
|
target=${target ?? nothing}
|
|
10482
10500
|
rel=${linkRel(rel, target) || nothing}
|
|
10501
|
+
aria-label=${ariaLabel}
|
|
10483
10502
|
aria-disabled=${disabled ? "true" : nothing}
|
|
10484
10503
|
aria-expanded=${ariaExpanded}
|
|
10485
10504
|
tabindex=${actionTabindex ?? nothing}
|
|
10486
|
-
>${content}${
|
|
10505
|
+
>${content}${linkHint && !accessibleLabel ? html`<span class="list-item__link-hint">, ${linkHint}</span>` : nothing}</a>
|
|
10487
10506
|
${divider}
|
|
10488
10507
|
</div>${children}`;
|
|
10489
10508
|
if (checkbox) return html`<div class=${blockClass}>
|
|
10490
10509
|
<button class="list-item__action"
|
|
10491
10510
|
type="button"
|
|
10492
10511
|
role="checkbox"
|
|
10512
|
+
aria-label=${ariaLabel}
|
|
10493
10513
|
?disabled=${disabled}
|
|
10494
10514
|
aria-checked=${String(checked)}
|
|
10495
10515
|
aria-expanded=${ariaExpanded}
|
|
@@ -10501,6 +10521,7 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10501
10521
|
<button class="list-item__action"
|
|
10502
10522
|
type="button"
|
|
10503
10523
|
role="radio"
|
|
10524
|
+
aria-label=${ariaLabel}
|
|
10504
10525
|
?disabled=${disabled}
|
|
10505
10526
|
aria-checked=${String(checked)}
|
|
10506
10527
|
tabindex=${actionTabindex ?? nothing}
|
|
@@ -10510,6 +10531,7 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10510
10531
|
if (button) return html`<div class=${blockClass}>
|
|
10511
10532
|
<button class="list-item__action"
|
|
10512
10533
|
type="button"
|
|
10534
|
+
aria-label=${ariaLabel}
|
|
10513
10535
|
?disabled=${disabled}
|
|
10514
10536
|
aria-expanded=${ariaExpanded}
|
|
10515
10537
|
tabindex=${actionTabindex ?? nothing}
|
|
@@ -10523,7 +10545,11 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10523
10545
|
};
|
|
10524
10546
|
//#endregion
|
|
10525
10547
|
//#region src/components/lists-and-tables/list-item/list-item.i18n.ts
|
|
10526
|
-
var nlddListItemTranslations = {
|
|
10548
|
+
var nlddListItemTranslations = {
|
|
10549
|
+
"components.list-item.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
10550
|
+
"components.list-item.link-hint-external-lowercase-label": "andere website",
|
|
10551
|
+
"components.list-item.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
10552
|
+
};
|
|
10527
10553
|
//#endregion
|
|
10528
10554
|
//#region src/components/lists-and-tables/list-item/list-item.ts
|
|
10529
10555
|
var list_item_exports = /* @__PURE__ */ __exportAll({ NLDDListItem: () => NLDDListItem });
|
|
@@ -10600,6 +10626,7 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
|
|
|
10600
10626
|
this.button = false;
|
|
10601
10627
|
this.checkbox = false;
|
|
10602
10628
|
this.radio = false;
|
|
10629
|
+
this.accessibleLabel = "";
|
|
10603
10630
|
this.reorderable = false;
|
|
10604
10631
|
this.selected = false;
|
|
10605
10632
|
this.checked = false;
|
|
@@ -11201,9 +11228,10 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
|
|
|
11201
11228
|
return parent;
|
|
11202
11229
|
}
|
|
11203
11230
|
render() {
|
|
11204
|
-
const
|
|
11231
|
+
const hintKey = linkHintKey(this.href, this.target);
|
|
11232
|
+
const linkHint = hintKey ? this._t(`components.list-item.${hintKey}`) : void 0;
|
|
11205
11233
|
const actionTabindex = this._isListboxOption ? "-1" : this._arrowNavigation ? this._rovingActive ? "0" : "-1" : void 0;
|
|
11206
|
-
return template$14(this.button, this.href, this.target, this.rel,
|
|
11234
|
+
return template$14(this.button, this.href, this.target, this.rel, linkHint, actionTabindex, this._highlighted, this.checkbox, this.radio, this.checked, this._resolvedExpanded, this._showChildren, this._hasCheckedSegment, this.disabled, this._parentType === "navigation" ? "list" : "group", this._childrenOpen, this.accessibleLabel);
|
|
11207
11235
|
}
|
|
11208
11236
|
}, _NLDDListItem = _NLDDListItem2, _NLDDListItem2.styles = [listItemStyles], _NLDDListItem2.SIZED_CELLS = "nldd-text-cell, nldd-drag-handle-cell", _NLDDListItem2);
|
|
11209
11237
|
__decorate([property({
|
|
@@ -11225,6 +11253,10 @@ __decorate([property({
|
|
|
11225
11253
|
type: Boolean,
|
|
11226
11254
|
reflect: true
|
|
11227
11255
|
})], NLDDListItem.prototype, "radio", void 0);
|
|
11256
|
+
__decorate([property({
|
|
11257
|
+
type: String,
|
|
11258
|
+
attribute: "accessible-label"
|
|
11259
|
+
})], NLDDListItem.prototype, "accessibleLabel", void 0);
|
|
11228
11260
|
__decorate([property({
|
|
11229
11261
|
type: Boolean,
|
|
11230
11262
|
reflect: true
|
|
@@ -17530,7 +17562,7 @@ var historyField_ = /*@__PURE__*/ StateField.define({
|
|
|
17530
17562
|
/**
|
|
17531
17563
|
Create a history extension with the given configuration.
|
|
17532
17564
|
*/
|
|
17533
|
-
function history(config = {}) {
|
|
17565
|
+
function history$1(config = {}) {
|
|
17534
17566
|
return [
|
|
17535
17567
|
historyField_,
|
|
17536
17568
|
historyConfig.of(config),
|
|
@@ -19227,7 +19259,7 @@ var _NLDDCodeEditor = class NLDDCodeEditor extends DescribedBy(FormAssociated(NL
|
|
|
19227
19259
|
buildExtensions() {
|
|
19228
19260
|
return [
|
|
19229
19261
|
nlddCodeMirrorTheme,
|
|
19230
|
-
history(),
|
|
19262
|
+
history$1(),
|
|
19231
19263
|
drawSelection(),
|
|
19232
19264
|
keymap.of([...defaultKeymap, ...historyKeymap]),
|
|
19233
19265
|
this._placeholderCompartment.of(this._placeholderExtension()),
|
|
@@ -33895,7 +33927,7 @@ var _NLDDTextEditor = class NLDDTextEditor extends DescribedBy(FormAssociated(NL
|
|
|
33895
33927
|
quote
|
|
33896
33928
|
})),
|
|
33897
33929
|
Prec.highest(linkOpenBadge((url) => this._t("components.text-editor.open-in-new-tab-label", { url }))),
|
|
33898
|
-
this._historyCompartment.of(history()),
|
|
33930
|
+
this._historyCompartment.of(history$1()),
|
|
33899
33931
|
drawSelection(),
|
|
33900
33932
|
stableCursor,
|
|
33901
33933
|
dropCursor(),
|
|
@@ -34183,7 +34215,7 @@ var _NLDDTextEditor = class NLDDTextEditor extends DescribedBy(FormAssociated(NL
|
|
|
34183
34215
|
const view = this.view;
|
|
34184
34216
|
if (!view) return;
|
|
34185
34217
|
view.dispatch({ effects: this._historyCompartment.reconfigure([]) });
|
|
34186
|
-
view.dispatch({ effects: this._historyCompartment.reconfigure(history()) });
|
|
34218
|
+
view.dispatch({ effects: this._historyCompartment.reconfigure(history$1()) });
|
|
34187
34219
|
this._emitState();
|
|
34188
34220
|
}
|
|
34189
34221
|
/** The annotations lying fully inside the current selection, offset relative to
|
|
@@ -42398,12 +42430,15 @@ var heroCornerStyles = css`
|
|
|
42398
42430
|
|
|
42399
42431
|
:host([data-media-corner]) {
|
|
42400
42432
|
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-sm-width) * 1.5);
|
|
42433
|
+
--_hero-media-corner-limit: initial;
|
|
42434
|
+
--_hero-main-corner-limit: initial;
|
|
42401
42435
|
}
|
|
42402
42436
|
|
|
42403
42437
|
/* On .hero, not :host: a var() resolves where it is declared, so on :host
|
|
42404
42438
|
this would halve the sm radius at every breakpoint. */
|
|
42405
42439
|
:host([data-media-corner]) .hero {
|
|
42406
|
-
--_hero-
|
|
42440
|
+
--_hero-media-corner-radius: min(var(--_hero-corner-radius), var(--_hero-media-corner-limit, var(--_hero-corner-radius)));
|
|
42441
|
+
--_hero-main-corner-radius: calc(var(--_hero-media-corner-radius) / 2);
|
|
42407
42442
|
|
|
42408
42443
|
@container (min-width: ${mdMin$10}) and (max-width: ${mdMax$8}) {
|
|
42409
42444
|
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-md-width) * 2);
|
|
@@ -42414,6 +42449,10 @@ var heroCornerStyles = css`
|
|
|
42414
42449
|
}
|
|
42415
42450
|
}
|
|
42416
42451
|
|
|
42452
|
+
:host([data-media-corner]:not([data-has-media])) .hero {
|
|
42453
|
+
--_hero-main-corner-radius: min(var(--_hero-corner-radius) / 2, var(--_hero-main-corner-limit, var(--_hero-corner-radius)));
|
|
42454
|
+
}
|
|
42455
|
+
|
|
42417
42456
|
/* ## Contained */
|
|
42418
42457
|
|
|
42419
42458
|
:host([data-media-corner][data-has-media]) .hero {
|
|
@@ -42437,30 +42476,30 @@ var heroCornerStyles = css`
|
|
|
42437
42476
|
/* ## Media */
|
|
42438
42477
|
|
|
42439
42478
|
:host([data-has-media][data-media-corner="top-left"]) .hero__media {
|
|
42440
|
-
border-top-left-radius: var(--_hero-corner-radius);
|
|
42479
|
+
border-top-left-radius: var(--_hero-media-corner-radius);
|
|
42441
42480
|
}
|
|
42442
42481
|
|
|
42443
42482
|
:host([data-has-media][data-media-corner="top-right"]) .hero__media {
|
|
42444
|
-
border-top-right-radius: var(--_hero-corner-radius);
|
|
42483
|
+
border-top-right-radius: var(--_hero-media-corner-radius);
|
|
42445
42484
|
}
|
|
42446
42485
|
|
|
42447
42486
|
:host([data-has-media][data-media-corner="bottom-left"]) .hero__media {
|
|
42448
42487
|
@container (min-width: ${mdMin$10}) {
|
|
42449
|
-
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
42488
|
+
border-bottom-left-radius: var(--_hero-media-corner-radius);
|
|
42450
42489
|
}
|
|
42451
42490
|
|
|
42452
42491
|
@container (max-width: ${smMax$11}) {
|
|
42453
|
-
border-top-left-radius: var(--_hero-corner-radius);
|
|
42492
|
+
border-top-left-radius: var(--_hero-media-corner-radius);
|
|
42454
42493
|
}
|
|
42455
42494
|
}
|
|
42456
42495
|
|
|
42457
42496
|
:host([data-has-media][data-media-corner="bottom-right"]) .hero__media {
|
|
42458
42497
|
@container (min-width: ${mdMin$10}) {
|
|
42459
|
-
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
42498
|
+
border-bottom-right-radius: var(--_hero-media-corner-radius);
|
|
42460
42499
|
}
|
|
42461
42500
|
|
|
42462
42501
|
@container (max-width: ${smMax$11}) {
|
|
42463
|
-
border-top-right-radius: var(--_hero-corner-radius);
|
|
42502
|
+
border-top-right-radius: var(--_hero-media-corner-radius);
|
|
42464
42503
|
}
|
|
42465
42504
|
}
|
|
42466
42505
|
|
|
@@ -42493,27 +42532,27 @@ var heroCornerStyles = css`
|
|
|
42493
42532
|
/* ## Without media */
|
|
42494
42533
|
|
|
42495
42534
|
:host(:not([data-has-media])[data-media-corner="top-left"]) :is(.hero__body, .hero__main) {
|
|
42496
|
-
border-top-left-radius: var(--_hero-corner-radius);
|
|
42535
|
+
border-top-left-radius: var(--_hero-main-corner-radius);
|
|
42497
42536
|
}
|
|
42498
42537
|
|
|
42499
42538
|
:host(:not([data-has-media])[data-media-corner="top-right"]) :is(.hero__body, .hero__main) {
|
|
42500
|
-
border-top-right-radius: var(--_hero-corner-radius);
|
|
42539
|
+
border-top-right-radius: var(--_hero-main-corner-radius);
|
|
42501
42540
|
}
|
|
42502
42541
|
|
|
42503
42542
|
:host(:not([data-has-media])[data-media-corner="bottom-left"]) :is(.hero__body, .hero__main) {
|
|
42504
|
-
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
42543
|
+
border-bottom-left-radius: var(--_hero-main-corner-radius);
|
|
42505
42544
|
}
|
|
42506
42545
|
|
|
42507
42546
|
:host(:not([data-has-media])[data-media-corner="bottom-right"]) :is(.hero__body, .hero__main) {
|
|
42508
|
-
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
42547
|
+
border-bottom-right-radius: var(--_hero-main-corner-radius);
|
|
42509
42548
|
}
|
|
42510
42549
|
|
|
42511
42550
|
:host(:not([data-has-media]):is([data-media-corner="top-left"], [data-media-corner="bottom-left"])) .hero__main {
|
|
42512
|
-
padding-left: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
42551
|
+
padding-left: calc(var(--_hero-main-padding) + var(--_hero-main-corner-radius) / 2);
|
|
42513
42552
|
}
|
|
42514
42553
|
|
|
42515
42554
|
:host(:not([data-has-media]):is([data-media-corner="top-right"], [data-media-corner="bottom-right"])) .hero__main {
|
|
42516
|
-
padding-right: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
42555
|
+
padding-right: calc(var(--_hero-main-padding) + var(--_hero-main-corner-radius) / 2);
|
|
42517
42556
|
}
|
|
42518
42557
|
`;
|
|
42519
42558
|
//#endregion
|
|
@@ -42532,6 +42571,9 @@ var AUTO_MEDIA_CORNER = {
|
|
|
42532
42571
|
"left": "top-right",
|
|
42533
42572
|
"right": "top-left"
|
|
42534
42573
|
};
|
|
42574
|
+
function autoCornerWithoutMedia(position) {
|
|
42575
|
+
return position.endsWith("right") ? "top-left" : "top-right";
|
|
42576
|
+
}
|
|
42535
42577
|
var MAIN_CORNER = {
|
|
42536
42578
|
"bottom-left": "top-right",
|
|
42537
42579
|
"bottom-right": "top-left",
|
|
@@ -42572,7 +42614,7 @@ function applyCorner(host) {
|
|
|
42572
42614
|
const value = host.corner.trim();
|
|
42573
42615
|
const chosen = CORNERS.includes(value) ? value : null;
|
|
42574
42616
|
const covered = host._hasMedia ? coveredCorners(host, position) : [];
|
|
42575
|
-
let mediaCorner = chosen ?? AUTO_MEDIA_CORNER[position];
|
|
42617
|
+
let mediaCorner = chosen ?? (host._hasMedia ? AUTO_MEDIA_CORNER[position] : autoCornerWithoutMedia(host.mainPosition));
|
|
42576
42618
|
if (!chosen && covered.includes(mediaCorner)) {
|
|
42577
42619
|
const horizontal = mediaCorner.endsWith("left") ? "left" : "right";
|
|
42578
42620
|
mediaCorner = `${mediaCorner.startsWith("top") ? "bottom" : "top"}-${horizontal}`;
|
|
@@ -42582,6 +42624,27 @@ function applyCorner(host) {
|
|
|
42582
42624
|
if (mainCorner) host.setAttribute("data-main-corner", mainCorner);
|
|
42583
42625
|
else host.removeAttribute("data-main-corner");
|
|
42584
42626
|
}
|
|
42627
|
+
var LIMITS = ["--_hero-media-corner-limit", "--_hero-main-corner-limit"];
|
|
42628
|
+
/**
|
|
42629
|
+
* Caps the radius at a third of the shortest side of the area it rounds, so a
|
|
42630
|
+
* low hero (a single title without media, a small `media-height`) keeps a
|
|
42631
|
+
* corner rather than turning into a drop. Fed by a ResizeObserver on the media
|
|
42632
|
+
* and the panel; the panel's own limit only counts without media, where it is
|
|
42633
|
+
* the whole hero. An area that is not shown measures zero and keeps its limit.
|
|
42634
|
+
*/
|
|
42635
|
+
function limitCorner(host, entries) {
|
|
42636
|
+
for (const entry of entries) {
|
|
42637
|
+
const box = entry.borderBoxSize?.[0];
|
|
42638
|
+
const width = box?.inlineSize ?? entry.contentRect.width;
|
|
42639
|
+
const height = box?.blockSize ?? entry.contentRect.height;
|
|
42640
|
+
if (!width || !height) continue;
|
|
42641
|
+
const limit = entry.target.classList.contains("hero__media") ? LIMITS[0] : LIMITS[1];
|
|
42642
|
+
host.style.setProperty(limit, `${Math.min(width, height) / 3}px`);
|
|
42643
|
+
}
|
|
42644
|
+
}
|
|
42645
|
+
function clearCornerLimits(host) {
|
|
42646
|
+
for (const limit of LIMITS) host.style.removeProperty(limit);
|
|
42647
|
+
}
|
|
42585
42648
|
//#endregion
|
|
42586
42649
|
//#region src/components/layout/page-sections/hero/hero.ts
|
|
42587
42650
|
/**
|
|
@@ -42631,7 +42694,7 @@ function applyCorner(host) {
|
|
|
42631
42694
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
42632
42695
|
* @attr {boolean} grow - Takes the height the page has left, so the footer sits at the bottom of a short page. Without it, nldd-page lets its last section grow.
|
|
42633
42696
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
42634
|
-
* @attr {string} corner - Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the panel leaves free.
|
|
42697
|
+
* @attr {string} corner - Rounds one corner of the media area, in the shape language of the Rijkshuisstijl: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', or empty (or 'auto') to let the hero choose a corner the panel leaves free. With media it applies with `layout="contained"` and the panel in a corner or along a side; with overlap or a centered panel the hero stays rectangular and says so in development. The panel stands against the edge of the image, so a `main-width` in percent (33.33%, 50%) is a share of the image, and gets a corner at half the radius, the one pointing into the image; a panel along a full side, a `main-width="full"` strip and the panel on mobile stay square. On mobile a bottom corner moves to the top. Without media the panel is the whole hero: the corner applies in every layout and position, at half the radius, and the hero chooses top-right, or top-left for a panel on the right. The radius comes from the ribbon width: 1.5X on sm, 2X on md and lg, and is never more than a third of the shortest side of the area it rounds, so a low hero keeps a corner rather than a drop. Says so in development when the chosen corner sits under the panel, or with `width="full"`
|
|
42635
42698
|
* @attr {'contained'|'overlap'} layout - How the panel relates to the image (default: 'overlap'). 'contained' keeps it on the image, in any of the eight positions; 'overlap' lets it fall `overlap-size` over the bottom of the image and run on below as far as its content needs, so the image keeps its height whatever the content. In 'overlap' the image has a fixed height (320px on md, 400px on lg) unless `media-height` or `media-aspect-ratio` is set, and only the horizontal side of `main-position` counts. A panel shorter than `overlap-size` ends inside the image and says so in development
|
|
42636
42699
|
* @attr {string} main-background - Surface color of the panel: 'base' (the base surface)
|
|
42637
42700
|
* or a category color — 'accent' (default) or a Rijkshuisstijl color such as
|
|
@@ -42655,7 +42718,7 @@ function applyCorner(host) {
|
|
|
42655
42718
|
* @slot - Content of the text panel (nldd-title and nldd-rich-text with color="inherit", for instance)
|
|
42656
42719
|
*/
|
|
42657
42720
|
var _NLDDHero;
|
|
42658
|
-
var CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
42721
|
+
var CSS_WIDE_KEYWORDS$1 = /* @__PURE__ */ new Set([
|
|
42659
42722
|
"inherit",
|
|
42660
42723
|
"initial",
|
|
42661
42724
|
"unset",
|
|
@@ -42669,7 +42732,7 @@ var CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
42669
42732
|
* something else.
|
|
42670
42733
|
*/
|
|
42671
42734
|
function takesValue(property, value) {
|
|
42672
|
-
return !CSS_WIDE_KEYWORDS.has(value.trim().toLowerCase()) && CSS.supports(property, value);
|
|
42735
|
+
return !CSS_WIDE_KEYWORDS$1.has(value.trim().toLowerCase()) && CSS.supports(property, value);
|
|
42673
42736
|
}
|
|
42674
42737
|
var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
42675
42738
|
constructor(..._args) {
|
|
@@ -42688,6 +42751,7 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42688
42751
|
this.mediaSizes = "";
|
|
42689
42752
|
this.mediaAlt = "";
|
|
42690
42753
|
this._slotHasMedia = false;
|
|
42754
|
+
this._cornerObserver = null;
|
|
42691
42755
|
this._warnedHeight = false;
|
|
42692
42756
|
this._overlapObserver = null;
|
|
42693
42757
|
this._warnedOverlap = false;
|
|
@@ -42703,11 +42767,14 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42703
42767
|
}
|
|
42704
42768
|
connectedCallback() {
|
|
42705
42769
|
super.connectedCallback();
|
|
42770
|
+
if (this.hasUpdated) this._watchCorner();
|
|
42706
42771
|
}
|
|
42707
42772
|
disconnectedCallback() {
|
|
42708
42773
|
super.disconnectedCallback();
|
|
42709
42774
|
this._overlapObserver?.disconnect();
|
|
42710
42775
|
this._overlapObserver = null;
|
|
42776
|
+
this._cornerObserver?.disconnect();
|
|
42777
|
+
this._cornerObserver = null;
|
|
42711
42778
|
this._warnedOverlap = false;
|
|
42712
42779
|
}
|
|
42713
42780
|
updated(changed) {
|
|
@@ -42717,6 +42784,7 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42717
42784
|
if (w && w !== "full" && takesValue("max-width", w)) this.style.setProperty("--_hero-max-width", w);
|
|
42718
42785
|
else this.style.removeProperty("--_hero-max-width");
|
|
42719
42786
|
}
|
|
42787
|
+
if (changed.has("corner")) this._watchCorner();
|
|
42720
42788
|
if (changed.has("mainWidth")) {
|
|
42721
42789
|
const width = (this.mainWidth ?? "").trim();
|
|
42722
42790
|
const valid = width !== "" && width !== "auto" && width !== "full" && takesValue("width", width);
|
|
@@ -42741,6 +42809,21 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42741
42809
|
else this.style.removeProperty("--_hero-media-aspect-ratio");
|
|
42742
42810
|
}
|
|
42743
42811
|
}
|
|
42812
|
+
_watchCorner() {
|
|
42813
|
+
if (!(this.corner !== null && this.corner !== void 0 && typeof ResizeObserver !== "undefined")) {
|
|
42814
|
+
this._cornerObserver?.disconnect();
|
|
42815
|
+
this._cornerObserver = null;
|
|
42816
|
+
clearCornerLimits(this);
|
|
42817
|
+
return;
|
|
42818
|
+
}
|
|
42819
|
+
if (this._cornerObserver) return;
|
|
42820
|
+
const media = this.shadowRoot?.querySelector(".hero__media");
|
|
42821
|
+
const main = this.shadowRoot?.querySelector(".hero__main");
|
|
42822
|
+
if (!media || !main) return;
|
|
42823
|
+
this._cornerObserver = new ResizeObserver((entries) => limitCorner(this, entries));
|
|
42824
|
+
this._cornerObserver.observe(media);
|
|
42825
|
+
this._cornerObserver.observe(main);
|
|
42826
|
+
}
|
|
42744
42827
|
_watchOverlap() {
|
|
42745
42828
|
if (!(this.layout !== "contained" && typeof ResizeObserver !== "undefined")) {
|
|
42746
42829
|
this._overlapObserver?.disconnect();
|
|
@@ -44574,6 +44657,62 @@ __decorate([property({
|
|
|
44574
44657
|
})], NLDDSheet.prototype, "open", void 0);
|
|
44575
44658
|
NLDDSheet = __decorate([customElement("nldd-sheet")], NLDDSheet);
|
|
44576
44659
|
//#endregion
|
|
44660
|
+
//#region src/utilities/focus-target.ts
|
|
44661
|
+
/**
|
|
44662
|
+
* Moving focus to a place on the page, the way a skip link does.
|
|
44663
|
+
*/
|
|
44664
|
+
/**
|
|
44665
|
+
* The fragment of an href that stays on this page, or an empty string. An
|
|
44666
|
+
* absolute URL to the page you are on counts too: a router or a CMS writes
|
|
44667
|
+
* `/pagina#inhoud` as readily as `#inhoud`.
|
|
44668
|
+
*/
|
|
44669
|
+
function samePageHash(href) {
|
|
44670
|
+
try {
|
|
44671
|
+
const url = new URL(href, document.baseURI);
|
|
44672
|
+
return url.origin === location.origin && url.pathname === location.pathname && url.search === location.search ? url.hash : "";
|
|
44673
|
+
} catch {
|
|
44674
|
+
return "";
|
|
44675
|
+
}
|
|
44676
|
+
}
|
|
44677
|
+
/** The element a fragment points at, looked up in the tree of `from` first. */
|
|
44678
|
+
function hashTarget(hash, from) {
|
|
44679
|
+
let id = hash.slice(1);
|
|
44680
|
+
if (!id) return null;
|
|
44681
|
+
try {
|
|
44682
|
+
id = decodeURIComponent(id);
|
|
44683
|
+
} catch {}
|
|
44684
|
+
return from.getRootNode().getElementById?.(id) ?? document.getElementById(id);
|
|
44685
|
+
}
|
|
44686
|
+
/**
|
|
44687
|
+
* Focuses the target and leaves it as it was once focus moves on. Returns the
|
|
44688
|
+
* function that puts it back (safe to call twice), or null when the target did
|
|
44689
|
+
* not take focus because it is hidden or inert; it is then already put back.
|
|
44690
|
+
*
|
|
44691
|
+
* The tabindex is 0 and not -1, also when the target came with a -1 of its
|
|
44692
|
+
* own. WebKit skips everything inside a shadow host that has a negative
|
|
44693
|
+
* tabindex, slotted content included, so with -1 on an nldd-* section the
|
|
44694
|
+
* next Tab left the page instead of reaching the first link in it.
|
|
44695
|
+
*/
|
|
44696
|
+
function focusTemporarily(target, options) {
|
|
44697
|
+
const previous = target.getAttribute("tabindex");
|
|
44698
|
+
let restored = false;
|
|
44699
|
+
const restore = () => {
|
|
44700
|
+
if (restored) return;
|
|
44701
|
+
restored = true;
|
|
44702
|
+
target.removeEventListener("blur", restore);
|
|
44703
|
+
if (previous === null) target.removeAttribute("tabindex");
|
|
44704
|
+
else target.setAttribute("tabindex", previous);
|
|
44705
|
+
};
|
|
44706
|
+
target.setAttribute("tabindex", "0");
|
|
44707
|
+
target.addEventListener("blur", restore);
|
|
44708
|
+
target.focus(options);
|
|
44709
|
+
if (target.getRootNode().activeElement !== target) {
|
|
44710
|
+
restore();
|
|
44711
|
+
return null;
|
|
44712
|
+
}
|
|
44713
|
+
return restore;
|
|
44714
|
+
}
|
|
44715
|
+
//#endregion
|
|
44577
44716
|
//#region src/components/layout/page-sections/sidebar-section/sidebar-section.ts
|
|
44578
44717
|
/**
|
|
44579
44718
|
* Nederlandse Digitale Dienst Sidebar Section Component (Lit + TypeScript)
|
|
@@ -44596,6 +44735,18 @@ NLDDSheet = __decorate([customElement("nldd-sheet")], NLDDSheet);
|
|
|
44596
44735
|
* The sheet gets a sticky title bar by default — the `sidebar-label` as title plus a
|
|
44597
44736
|
* "Sluit" button — overridable via the `sheet-top-title-bar` slot.
|
|
44598
44737
|
*
|
|
44738
|
+
* A link in the sheet to a place on the page beside it, such as a row of a
|
|
44739
|
+
* table of contents, closes the sheet first and then scrolls to that place and
|
|
44740
|
+
* moves focus there, with a temporary tab stop as a skip link does. Left to the
|
|
44741
|
+
* browser, the page would scroll under a sheet that is still open, and on
|
|
44742
|
+
* closing the browser gives focus back to the trigger without scrolling to it,
|
|
44743
|
+
* so focus ends up out of sight. A link that opens elsewhere (another page, a
|
|
44744
|
+
* new tab, a modifier key, a `download`) or points into the sidebar itself is
|
|
44745
|
+
* left alone, as is a click the consumer has already handled with
|
|
44746
|
+
* `preventDefault()`. The address gets the fragment through `replaceState`,
|
|
44747
|
+
* without a new history entry and without a `hashchange` event or a `:target`
|
|
44748
|
+
* match: a router that listens for those does not see the jump.
|
|
44749
|
+
*
|
|
44599
44750
|
* The sidebar content lives in `slot="sidebar"`. Its slot outlet moves between the
|
|
44600
44751
|
* box (expanded) and the sheet (collapsed) so there is a single, never-duplicated
|
|
44601
44752
|
* copy — the light DOM (and its state) is preserved across the switch.
|
|
@@ -44653,8 +44804,37 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
|
|
|
44653
44804
|
this._hasMeasured = true;
|
|
44654
44805
|
this._applyCollapsed(width, announce);
|
|
44655
44806
|
};
|
|
44807
|
+
this._onClick = (event) => {
|
|
44808
|
+
if (!this.collapsed || !this._sheetOpen || event.defaultPrevented) return;
|
|
44809
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
44810
|
+
const path = event.composedPath();
|
|
44811
|
+
if (!path.some((node) => node instanceof Element && node.parentElement === this && node.slot === "sidebar")) return;
|
|
44812
|
+
const anchor = path.find((node) => node instanceof HTMLAnchorElement && node.hasAttribute("href"));
|
|
44813
|
+
if (!anchor || anchor.hasAttribute("download") || anchor.target && anchor.target !== "_self") return;
|
|
44814
|
+
const hash = samePageHash(anchor.href);
|
|
44815
|
+
const target = hash ? hashTarget(hash, this) : null;
|
|
44816
|
+
if (!target || this._inSidebar(target)) return;
|
|
44817
|
+
event.preventDefault();
|
|
44818
|
+
this._pendingJump?.abort();
|
|
44819
|
+
const jump = new AbortController();
|
|
44820
|
+
this._pendingJump = jump;
|
|
44821
|
+
this._sheet?.addEventListener("close", () => queueMicrotask(() => {
|
|
44822
|
+
if (jump.signal.aborted) return;
|
|
44823
|
+
this._pendingJump = void 0;
|
|
44824
|
+
target.scrollIntoView();
|
|
44825
|
+
focusTemporarily(target, { preventScroll: true });
|
|
44826
|
+
history.replaceState(history.state, "", hash);
|
|
44827
|
+
}), {
|
|
44828
|
+
once: true,
|
|
44829
|
+
signal: jump.signal
|
|
44830
|
+
});
|
|
44831
|
+
this.hide();
|
|
44832
|
+
if (this._sheet?.open) jump.abort();
|
|
44833
|
+
};
|
|
44656
44834
|
this._onSheetOpen = () => {
|
|
44657
44835
|
this._sheetOpen = true;
|
|
44836
|
+
this._pendingJump?.abort();
|
|
44837
|
+
this._pendingJump = void 0;
|
|
44658
44838
|
};
|
|
44659
44839
|
this._onSheetClose = () => {
|
|
44660
44840
|
this._sheetOpen = false;
|
|
@@ -44674,12 +44854,15 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
|
|
|
44674
44854
|
super.connectedCallback();
|
|
44675
44855
|
this._ro = new ResizeObserver(this._onResize);
|
|
44676
44856
|
this._ro.observe(this);
|
|
44857
|
+
this.addEventListener("click", this._onClick);
|
|
44677
44858
|
}
|
|
44678
44859
|
disconnectedCallback() {
|
|
44679
44860
|
super.disconnectedCallback();
|
|
44680
44861
|
this._ro?.disconnect();
|
|
44681
44862
|
this._ro = void 0;
|
|
44682
44863
|
this._hasMeasured = false;
|
|
44864
|
+
this.removeEventListener("click", this._onClick);
|
|
44865
|
+
this._pendingJump?.abort();
|
|
44683
44866
|
}
|
|
44684
44867
|
firstUpdated() {
|
|
44685
44868
|
this._applyCollapsed(this.clientWidth, false);
|
|
@@ -44725,6 +44908,9 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
|
|
|
44725
44908
|
if (this._sheetOpen) this._sheet?.hide();
|
|
44726
44909
|
else this._sheet?.show();
|
|
44727
44910
|
}
|
|
44911
|
+
_inSidebar(node) {
|
|
44912
|
+
return [...this.children].some((child) => child.slot === "sidebar" && child.contains(node));
|
|
44913
|
+
}
|
|
44728
44914
|
render() {
|
|
44729
44915
|
return sidebarSectionTemplate(this);
|
|
44730
44916
|
}
|
|
@@ -45028,8 +45214,9 @@ var cardStyles = css`
|
|
|
45028
45214
|
//#endregion
|
|
45029
45215
|
//#region src/components/layout/card/card.template.ts
|
|
45030
45216
|
function cardTemplate(component) {
|
|
45031
|
-
const
|
|
45032
|
-
const
|
|
45217
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
45218
|
+
const linkHint = hintKey ? component._t(`components.card.${hintKey}`) : "";
|
|
45219
|
+
const linkLabel = [component.accessibleLabel, linkHint].filter(Boolean).join(", ") || nothing;
|
|
45033
45220
|
const isInteractive = Boolean(component.href) || component.button;
|
|
45034
45221
|
return html`
|
|
45035
45222
|
<article class="card"
|
|
@@ -45073,7 +45260,11 @@ function cardTemplate(component) {
|
|
|
45073
45260
|
}
|
|
45074
45261
|
//#endregion
|
|
45075
45262
|
//#region src/components/layout/card/card.i18n.ts
|
|
45076
|
-
var nlddCardTranslations = {
|
|
45263
|
+
var nlddCardTranslations = {
|
|
45264
|
+
"components.card.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
45265
|
+
"components.card.link-hint-external-lowercase-label": "andere website",
|
|
45266
|
+
"components.card.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
45267
|
+
};
|
|
45077
45268
|
//#endregion
|
|
45078
45269
|
//#region src/components/layout/card/card.ts
|
|
45079
45270
|
/**
|
|
@@ -45097,9 +45288,9 @@ var nlddCardTranslations = { "components.card.opens-in-new-tab-label": "Opent in
|
|
|
45097
45288
|
*
|
|
45098
45289
|
* @attr {'base'|'tinted'} background - Surface color of the card: `base` (default) on a plain page background, `tinted` when the card should stand out against a base surface
|
|
45099
45290
|
* @attr {string} accessible-label - Accessible name of the card; with `href`/`button` it names the link or button, otherwise the card region
|
|
45100
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
45291
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement)
|
|
45101
45292
|
* @attr {string} href - Makes the whole card a link to this URL (empty = no link)
|
|
45102
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "
|
|
45293
|
+
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "opent in nieuw tabblad" announcement for '_blank'. An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
45103
45294
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
45104
45295
|
* @attr {boolean} button - Makes the whole card a button; ignored when `href` is set
|
|
45105
45296
|
*
|
|
@@ -46724,14 +46915,27 @@ var listItemSegmentStyles = css`
|
|
|
46724
46915
|
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
46725
46916
|
pointer-events: none;
|
|
46726
46917
|
}
|
|
46918
|
+
|
|
46919
|
+
.list-item-segment__link-hint {
|
|
46920
|
+
position: absolute;
|
|
46921
|
+
margin: -1px;
|
|
46922
|
+
border: 0;
|
|
46923
|
+
width: 1px;
|
|
46924
|
+
height: 1px;
|
|
46925
|
+
overflow: hidden;
|
|
46926
|
+
padding: 0;
|
|
46927
|
+
white-space: nowrap;
|
|
46928
|
+
clip-path: inset(50%);
|
|
46929
|
+
}
|
|
46727
46930
|
`;
|
|
46728
46931
|
//#endregion
|
|
46729
46932
|
//#region src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts
|
|
46730
|
-
function template$9(control, href, target, rel, checked, expanded, current, disabled, accessibleLabel, actionTabindex, popupType, popovertarget, popoverTargetElement, popoverTargetAction) {
|
|
46933
|
+
function template$9(control, href, target, rel, checked, expanded, current, disabled, accessibleLabel, actionTabindex, popupType, popovertarget, popoverTargetElement, popoverTargetAction, linkHint = "") {
|
|
46731
46934
|
const content = html`<slot></slot>`;
|
|
46732
46935
|
const ariaExpanded = expanded === void 0 ? popupType ? "false" : nothing : String(expanded);
|
|
46733
46936
|
const ariaCurrent = current ?? nothing;
|
|
46734
46937
|
const label = accessibleLabel || nothing;
|
|
46938
|
+
const linkLabel = accessibleLabel ? [accessibleLabel, linkHint].filter(Boolean).join(", ") : nothing;
|
|
46735
46939
|
if (control === "link") return html`<a class="list-item-segment"
|
|
46736
46940
|
href=${href ?? nothing}
|
|
46737
46941
|
target=${target ?? nothing}
|
|
@@ -46739,9 +46943,9 @@ function template$9(control, href, target, rel, checked, expanded, current, disa
|
|
|
46739
46943
|
aria-disabled=${disabled ? "true" : nothing}
|
|
46740
46944
|
aria-expanded=${ariaExpanded}
|
|
46741
46945
|
aria-current=${ariaCurrent}
|
|
46742
|
-
aria-label=${
|
|
46946
|
+
aria-label=${linkLabel}
|
|
46743
46947
|
tabindex=${actionTabindex ?? nothing}
|
|
46744
|
-
>${content}</a>`;
|
|
46948
|
+
>${content}${linkHint && !accessibleLabel ? html`<span class="list-item-segment__link-hint">, ${linkHint}</span>` : nothing}</a>`;
|
|
46745
46949
|
if (control === "checkbox" || control === "button") return html`<button class="list-item-segment"
|
|
46746
46950
|
type="button"
|
|
46747
46951
|
aria-haspopup=${popupType || nothing}
|
|
@@ -46759,8 +46963,15 @@ function template$9(control, href, target, rel, checked, expanded, current, disa
|
|
|
46759
46963
|
return html`<div class="list-item-segment">${content}</div>`;
|
|
46760
46964
|
}
|
|
46761
46965
|
//#endregion
|
|
46966
|
+
//#region src/components/lists-and-tables/list-item-segment/list-item-segment.i18n.ts
|
|
46967
|
+
var nlddListItemSegmentTranslations = {
|
|
46968
|
+
"components.list-item-segment.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
46969
|
+
"components.list-item-segment.link-hint-external-lowercase-label": "andere website",
|
|
46970
|
+
"components.list-item-segment.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
46971
|
+
};
|
|
46972
|
+
//#endregion
|
|
46762
46973
|
//#region src/components/lists-and-tables/list-item-segment/list-item-segment.ts
|
|
46763
|
-
var _NLDDListItemSegment = class NLDDListItemSegment extends LitElement {
|
|
46974
|
+
var _NLDDListItemSegment = class NLDDListItemSegment extends withTranslations(LitElement, nlddListItemSegmentTranslations) {
|
|
46764
46975
|
constructor(..._args) {
|
|
46765
46976
|
super(..._args);
|
|
46766
46977
|
this.width = "fit-content";
|
|
@@ -46861,7 +47072,8 @@ var _NLDDListItemSegment = class NLDDListItemSegment extends LitElement {
|
|
|
46861
47072
|
this.classList.toggle("is-expanded", expanded === true);
|
|
46862
47073
|
}
|
|
46863
47074
|
render() {
|
|
46864
|
-
|
|
47075
|
+
const hintKey = this._controlType === "link" ? linkHintKey(this.href, this.target) : null;
|
|
47076
|
+
return template$9(this._controlType, this.href, this.target, this.rel, this.checked, this.disclosure ? this._rowExpanded : this.expanded, this.current ? this.currentType : void 0, this.disabled, this.accessibleLabel, this._tabbable === void 0 ? void 0 : this._tabbable ? "0" : "-1", this.popupType, this.popovertarget, this.popoverTargetElement, this.popoverTargetAction, hintKey ? this._t(`components.list-item-segment.${hintKey}`) : "");
|
|
46865
47077
|
}
|
|
46866
47078
|
};
|
|
46867
47079
|
var NLDDListItemSegment = (_NLDDListItemSegment.styles = [listItemSegmentStyles], _NLDDListItemSegment);
|
|
@@ -48248,6 +48460,8 @@ var stepCellStyles = css`
|
|
|
48248
48460
|
--_step-cell-future-content-color: var(--semantics-content-secondary-color);
|
|
48249
48461
|
--_step-cell-current-fill-color: light-dark(var(--primitives-color-accent-75), var(--primitives-color-accent-100));
|
|
48250
48462
|
--_step-cell-icon-size: calc(var(--_step-cell-marker-size) * 2 / 3);
|
|
48463
|
+
--_step-cell-marker-offset: 0px;
|
|
48464
|
+
--_step-cell-marker-center: 50%;
|
|
48251
48465
|
|
|
48252
48466
|
isolation: isolate;
|
|
48253
48467
|
display: flex;
|
|
@@ -48276,6 +48490,18 @@ var stepCellStyles = css`
|
|
|
48276
48490
|
--_step-cell-marker-size: var(--primitives-space-12);
|
|
48277
48491
|
}
|
|
48278
48492
|
|
|
48493
|
+
:host([vertical-alignment="top"]) {
|
|
48494
|
+
--_step-cell-marker-center: calc(var(--_step-cell-lane-size) / 2);
|
|
48495
|
+
}
|
|
48496
|
+
|
|
48497
|
+
:host([vertical-alignment="bottom"]) {
|
|
48498
|
+
--_step-cell-marker-center: calc(100% - var(--_step-cell-lane-size) / 2);
|
|
48499
|
+
}
|
|
48500
|
+
|
|
48501
|
+
:host([data-marker-offset]) {
|
|
48502
|
+
--_step-cell-marker-center: var(--_step-cell-marker-offset);
|
|
48503
|
+
}
|
|
48504
|
+
|
|
48279
48505
|
/* Bleeds back over the host's block padding, so consecutive rows connect. */
|
|
48280
48506
|
.step-cell {
|
|
48281
48507
|
position: relative;
|
|
@@ -48285,6 +48511,13 @@ var stepCellStyles = css`
|
|
|
48285
48511
|
margin-block: calc(var(--context-cell-padding-block, 0px) * -1);
|
|
48286
48512
|
}
|
|
48287
48513
|
|
|
48514
|
+
/* The row's content box: the dot is placed in it, and the lines reach out
|
|
48515
|
+
over the padding from it. */
|
|
48516
|
+
.step-cell__content {
|
|
48517
|
+
position: absolute;
|
|
48518
|
+
inset: var(--context-cell-padding-block, 0px) 0;
|
|
48519
|
+
}
|
|
48520
|
+
|
|
48288
48521
|
/* The ring, but only left and right. A spread would put the same band above
|
|
48289
48522
|
and below the line, and there it would cut the track at every row
|
|
48290
48523
|
boundary: the lines that run on downward deliberately reach past the cell
|
|
@@ -48309,18 +48542,18 @@ var stepCellStyles = css`
|
|
|
48309
48542
|
without this the track breaks at every row. The top line needs nothing —
|
|
48310
48543
|
the row above already covers the band. */
|
|
48311
48544
|
.step-cell__full-line {
|
|
48312
|
-
top:
|
|
48313
|
-
bottom: calc(-1 * var(--semantics-dividers-thickness));
|
|
48545
|
+
top: calc(-1 * var(--context-cell-padding-block, 0px));
|
|
48546
|
+
bottom: calc(-1 * var(--context-cell-padding-block, 0px) - var(--semantics-dividers-thickness));
|
|
48314
48547
|
}
|
|
48315
48548
|
|
|
48316
48549
|
.step-cell__top-line {
|
|
48317
|
-
|
|
48318
|
-
height:
|
|
48550
|
+
top: calc(-1 * var(--context-cell-padding-block, 0px));
|
|
48551
|
+
height: calc(var(--context-cell-padding-block, 0px) + var(--_step-cell-marker-center));
|
|
48319
48552
|
}
|
|
48320
48553
|
|
|
48321
48554
|
.step-cell__bottom-line {
|
|
48322
|
-
top:
|
|
48323
|
-
bottom: calc(-1 * var(--semantics-dividers-thickness));
|
|
48555
|
+
top: var(--_step-cell-marker-center);
|
|
48556
|
+
bottom: calc(-1 * var(--context-cell-padding-block, 0px) - var(--semantics-dividers-thickness));
|
|
48324
48557
|
}
|
|
48325
48558
|
|
|
48326
48559
|
:host([status="future"]:not([line])) .step-cell__top-line,
|
|
@@ -48363,7 +48596,7 @@ var stepCellStyles = css`
|
|
|
48363
48596
|
.step-cell__marker {
|
|
48364
48597
|
box-sizing: border-box;
|
|
48365
48598
|
position: absolute;
|
|
48366
|
-
top:
|
|
48599
|
+
top: var(--_step-cell-marker-center);
|
|
48367
48600
|
left: 50%;
|
|
48368
48601
|
z-index: var(--_step-cell-marker-z-index);
|
|
48369
48602
|
display: flex;
|
|
@@ -48415,7 +48648,9 @@ var stepCellStyles = css`
|
|
|
48415
48648
|
function stepCellTemplate(component) {
|
|
48416
48649
|
if (component.level === "none") return html`
|
|
48417
48650
|
<div class="step-cell">
|
|
48418
|
-
|
|
48651
|
+
<div class="step-cell__content">
|
|
48652
|
+
${component.position === "only" ? nothing : html`<div class="step-cell__full-line"></div>`}
|
|
48653
|
+
</div>
|
|
48419
48654
|
</div>
|
|
48420
48655
|
`;
|
|
48421
48656
|
const hasTop = component.position === "between" || component.position === "last";
|
|
@@ -48426,9 +48661,11 @@ function stepCellTemplate(component) {
|
|
|
48426
48661
|
const content = component.showsContent ? html`${marker}<slot></slot>` : marker;
|
|
48427
48662
|
return html`
|
|
48428
48663
|
<div class="step-cell">
|
|
48429
|
-
|
|
48430
|
-
|
|
48431
|
-
|
|
48664
|
+
<div class="step-cell__content">
|
|
48665
|
+
${showTopLine ? html`<div class="step-cell__top-line"></div>` : nothing}
|
|
48666
|
+
<div class="step-cell__marker">${content}</div>
|
|
48667
|
+
${showBottomLine ? html`<div class="step-cell__bottom-line"></div>` : nothing}
|
|
48668
|
+
</div>
|
|
48432
48669
|
</div>
|
|
48433
48670
|
`;
|
|
48434
48671
|
}
|
|
@@ -48454,6 +48691,8 @@ function stepCellTemplate(component) {
|
|
|
48454
48691
|
* @attr {'major' | 'minor' | 'none'} level - What stands in the lane: a whole dot (`major`, the default), a smaller one for a row that belongs under the one above it (`minor`), or nothing at all (`none`) for a row that carries what a step holds rather than being a step. A `none` row keeps its `size` and its `status`, so it stays in the same lane and the track runs on in the right color
|
|
48455
48692
|
* @attr {'past' | 'current' | 'future'} status - How far along this row is (default 'past'); the same values as `nldd-step-bar-item`. It colors the dot and the track around it: covered above where you are, still ahead below
|
|
48456
48693
|
* @attr {'sm' | 'md'} size - How wide the lane is and so how big the dot: `sm` (default, 16px) for steps without a number, `md` (24px) where a number or an icon has to fit. Every row in one list takes the same size, or the track jumps
|
|
48694
|
+
* @attr {'top' | 'center' | 'bottom'} vertical-alignment - Where the dot stands in the row (default 'center'). `top` puts it against the row's top padding and `bottom` against its bottom padding, as a whole dot would stand, so a `minor` dot lines up with a `major` one. To line it up with what stands beside it, such as the first line of a text cell or a title, use `marker-offset`. The track runs to the middle of the dot either way, so consecutive rows still connect
|
|
48695
|
+
* @attr {string} marker-offset - How far below the top of the row's content the middle of the dot stands, as a CSS length or a percentage of the content's height: `0%` is its top, `50%` its middle and `100%` its bottom. For a row whose first line is not as high as a whole dot, such as a large title beside it: half the height of that line puts the dot beside it. Measured after the row's padding, so it stays right when `size` changes that padding. Prefer `rem` over `px`, so the dot moves along when someone sets a larger font size in the browser. Wins over `vertical-alignment`; an invalid value falls back to it and says so in development
|
|
48457
48696
|
* @attr {'down' | 'up'} direction - The direction the timeline moves forward in: `down` (default) puts the past above, `up` below. Only the current step has half a track, so this only has an effect there
|
|
48458
48697
|
* @attr {'first' | 'between' | 'last' | 'only'} position - Place of the row in the list as it stands on screen (default 'between'): decides whether the line continues above the dot, below it, or on both sides. `first` is the top row and only has a line below, `last` the bottom row and only has a line above, also with `direction="up"`: position is about where the row stands, `direction` about which way time runs. `only` is the single row in the series and gets a line on neither side: a track of one dot leads nowhere. On a `level="none"` row, which is nothing but line, `only` leaves it out altogether: the track ends above it
|
|
48459
48698
|
* @attr {'auto' | 'top' | 'bottom' | 'both' | 'none'} line - Which halves of the track you have covered, when `status` and `direction` get it wrong (default 'auto', which is what those two say). The halves you name are drawn as covered and the other one as still ahead, so `none` covers neither. Which halves are drawn at all stays with `position`, except that naming a half draws it: `line="both"` on a `first` row draws one above too. A row that opens a group of its own is the case for `both`, since the going carries on below it. A `level="none"` row has one line rather than two halves, and no point where a fill could change over, so there the status colors the whole of it and `line` overrules the whole of it. On a `current` row that leans the way the timeline runs: what belongs to a point usually comes after it, so going `down` the stretch reads as still ahead and going `up` as behind you
|
|
@@ -48462,12 +48701,22 @@ function stepCellTemplate(component) {
|
|
|
48462
48701
|
*
|
|
48463
48702
|
* @slot - Custom content in the dot (an alternative to `text` and `icon`)
|
|
48464
48703
|
*/
|
|
48465
|
-
var _NLDDStepCell
|
|
48704
|
+
var _NLDDStepCell;
|
|
48705
|
+
var CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
48706
|
+
"inherit",
|
|
48707
|
+
"initial",
|
|
48708
|
+
"unset",
|
|
48709
|
+
"revert",
|
|
48710
|
+
"revert-layer"
|
|
48711
|
+
]);
|
|
48712
|
+
var NLDDStepCell = (_NLDDStepCell = class NLDDStepCell extends VisibilityMixin(LitElement, "cells-container") {
|
|
48466
48713
|
constructor(..._args) {
|
|
48467
48714
|
super(..._args);
|
|
48468
48715
|
this.level = "major";
|
|
48469
48716
|
this.status = "past";
|
|
48470
48717
|
this.size = "sm";
|
|
48718
|
+
this.verticalAlignment = "center";
|
|
48719
|
+
this.markerOffset = "";
|
|
48471
48720
|
this.direction = "down";
|
|
48472
48721
|
this.position = "between";
|
|
48473
48722
|
this.line = "auto";
|
|
@@ -48482,12 +48731,18 @@ var _NLDDStepCell = class NLDDStepCell extends VisibilityMixin(LitElement, "cell
|
|
|
48482
48731
|
}
|
|
48483
48732
|
updated(changed) {
|
|
48484
48733
|
super.updated(changed);
|
|
48734
|
+
if (changed.has("markerOffset")) {
|
|
48735
|
+
const offset = (this.markerOffset ?? "").trim();
|
|
48736
|
+
const valid = offset !== "" && !CSS_WIDE_KEYWORDS.has(offset.toLowerCase()) && offset.toLowerCase() !== "auto" && CSS.supports("margin-top", offset);
|
|
48737
|
+
if (valid) this.style.setProperty("--_step-cell-marker-offset", offset);
|
|
48738
|
+
else this.style.removeProperty("--_step-cell-marker-offset");
|
|
48739
|
+
this.toggleAttribute("data-marker-offset", valid);
|
|
48740
|
+
}
|
|
48485
48741
|
}
|
|
48486
48742
|
render() {
|
|
48487
48743
|
return stepCellTemplate(this);
|
|
48488
48744
|
}
|
|
48489
|
-
};
|
|
48490
|
-
var NLDDStepCell = (_NLDDStepCell.styles = stepCellStyles, _NLDDStepCell);
|
|
48745
|
+
}, _NLDDStepCell.styles = stepCellStyles, _NLDDStepCell);
|
|
48491
48746
|
__decorate([property({
|
|
48492
48747
|
reflect: true,
|
|
48493
48748
|
converter: reflectNonDefault("major")
|
|
@@ -48500,6 +48755,16 @@ __decorate([property({
|
|
|
48500
48755
|
reflect: true,
|
|
48501
48756
|
converter: reflectNonDefault("sm")
|
|
48502
48757
|
})], NLDDStepCell.prototype, "size", void 0);
|
|
48758
|
+
__decorate([property({
|
|
48759
|
+
reflect: true,
|
|
48760
|
+
attribute: "vertical-alignment",
|
|
48761
|
+
converter: reflectNonDefault("center")
|
|
48762
|
+
})], NLDDStepCell.prototype, "verticalAlignment", void 0);
|
|
48763
|
+
__decorate([property({
|
|
48764
|
+
reflect: true,
|
|
48765
|
+
attribute: "marker-offset",
|
|
48766
|
+
converter: reflectNonDefault("")
|
|
48767
|
+
})], NLDDStepCell.prototype, "markerOffset", void 0);
|
|
48503
48768
|
__decorate([property({
|
|
48504
48769
|
reflect: true,
|
|
48505
48770
|
converter: reflectNonDefault("down")
|
|
@@ -49690,9 +49955,9 @@ var linkStyles = css`
|
|
|
49690
49955
|
top: 0.2em;
|
|
49691
49956
|
}
|
|
49692
49957
|
|
|
49693
|
-
/* Visually-hidden
|
|
49958
|
+
/* Visually-hidden link hint (another website, a new tab); part of
|
|
49694
49959
|
the link's accessible name but never shown. Standard visually-hidden recipe. */
|
|
49695
|
-
.
|
|
49960
|
+
.link__link-hint {
|
|
49696
49961
|
position: absolute;
|
|
49697
49962
|
margin: -1px;
|
|
49698
49963
|
border: 0;
|
|
@@ -49708,9 +49973,10 @@ var linkStyles = css`
|
|
|
49708
49973
|
//#region src/components/navigation/link/link.template.ts
|
|
49709
49974
|
function template$3(helpers) {
|
|
49710
49975
|
const resolvedRel = linkRel(this.rel, this.target);
|
|
49711
|
-
const
|
|
49712
|
-
const
|
|
49713
|
-
const
|
|
49976
|
+
const hintKey = this.disabled ? null : linkHintKey(this.href, this.target);
|
|
49977
|
+
const linkHint = hintKey ? this._t(`components.link.${hintKey}`) : "";
|
|
49978
|
+
const ariaLabel = this.accessibleLabel ? [this.accessibleLabel, linkHint].filter(Boolean).join(", ") : nothing;
|
|
49979
|
+
const renderLinkHint = !!linkHint && !this.accessibleLabel;
|
|
49714
49980
|
return html`
|
|
49715
49981
|
<a class="link"
|
|
49716
49982
|
href=${this.disabled ? nothing : this.href || nothing}
|
|
@@ -49728,14 +49994,17 @@ function template$3(helpers) {
|
|
|
49728
49994
|
<span class="link__label">${this.text ? this.text : html`<slot></slot>`}</span>
|
|
49729
49995
|
${this.endIcon ? html`
|
|
49730
49996
|
<span class="link__end-icon"><nldd-icon icon=${this.endIcon}></nldd-icon></span>
|
|
49731
|
-
` : html`<slot name="end-icon"></slot>`}
|
|
49732
|
-
${renderOpensInNewTabHint ? html`<span class="link__opens-in-new-tab-hint">${opensInNewTabHint}</span>` : nothing}
|
|
49997
|
+
` : html`<slot name="end-icon"></slot>`}${renderLinkHint ? html`<span class="link__link-hint">, ${linkHint}</span>` : nothing}
|
|
49733
49998
|
</a>
|
|
49734
49999
|
`;
|
|
49735
50000
|
}
|
|
49736
50001
|
//#endregion
|
|
49737
50002
|
//#region src/components/navigation/link/link.i18n.ts
|
|
49738
|
-
var nlddLinkTranslations = {
|
|
50003
|
+
var nlddLinkTranslations = {
|
|
50004
|
+
"components.link.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
50005
|
+
"components.link.link-hint-external-lowercase-label": "andere website",
|
|
50006
|
+
"components.link.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
50007
|
+
};
|
|
49739
50008
|
//#endregion
|
|
49740
50009
|
//#region src/components/navigation/link/link.ts
|
|
49741
50010
|
/**
|
|
@@ -49758,7 +50027,7 @@ var nlddLinkTranslations = { "components.link.opens-in-new-tab-label": "Opent in
|
|
|
49758
50027
|
*
|
|
49759
50028
|
* @element nldd-link
|
|
49760
50029
|
* @attr {string} href - Link target
|
|
49761
|
-
* @attr {string} target - Link target (e.g. '_blank'); adjusts rel automatically. With '_blank' the link adds a visually hidden "
|
|
50030
|
+
* @attr {string} target - Link target (e.g. '_blank'); adjusts rel automatically. With '_blank' the link adds a visually hidden "opent in nieuw tabblad" announcement for screen readers (WCAG 2.1 SC 3.2.2). An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
49762
50031
|
* @attr {string} rel - Link rel attribute; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
49763
50032
|
* @attr {string} size - Text size: 'inherit' (the default) follows the surrounding text and lays the link out inline, so it wraps in running prose. 'xs' | 'sm' | 'md' | 'lg' pin a size and switch to inline-flex, which baseline-aligns a start or end icon with an explicit gap.
|
|
49764
50033
|
* @attr {string} text - Link text (alternative to the default slot)
|
|
@@ -49767,7 +50036,7 @@ var nlddLinkTranslations = { "components.link.opens-in-new-tab-label": "Opent in
|
|
|
49767
50036
|
* @attr {string} accessible-label - Accessible label for screen readers
|
|
49768
50037
|
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
49769
50038
|
* @attr {boolean} no-tab - Takes the control out of the tab order (tabindex="-1"), for a control owned by a roving container (a row of an nldd-list, where the arrow keys move between rows) that manages focus itself. Still mouse- and script-focusable.
|
|
49770
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
50039
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement); unset keys fall back to Dutch.
|
|
49771
50040
|
*
|
|
49772
50041
|
* @slot - Link text (alternative to the text attribute)
|
|
49773
50042
|
* @slot start-icon - Custom icon before the text
|
|
@@ -49983,14 +50252,10 @@ var _NLDDSkipLink = class NLDDSkipLink extends withTranslations(LitElement, nldd
|
|
|
49983
50252
|
this._focus(next);
|
|
49984
50253
|
};
|
|
49985
50254
|
this._handleLinkClick = (event) => {
|
|
49986
|
-
const hash = this.
|
|
50255
|
+
const hash = samePageHash(this.href);
|
|
49987
50256
|
if (!hash) return;
|
|
49988
50257
|
if (event && (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) return;
|
|
49989
|
-
|
|
49990
|
-
try {
|
|
49991
|
-
id = decodeURIComponent(id);
|
|
49992
|
-
} catch {}
|
|
49993
|
-
const target = this.getRootNode().getElementById?.(id) ?? document.getElementById(id);
|
|
50258
|
+
const target = hashTarget(hash, this);
|
|
49994
50259
|
if (!target) return;
|
|
49995
50260
|
clearTimeout(this._focusTimer);
|
|
49996
50261
|
this._focusTimer = setTimeout(() => this._focus(target));
|
|
@@ -49999,45 +50264,15 @@ var _NLDDSkipLink = class NLDDSkipLink extends withTranslations(LitElement, nldd
|
|
|
49999
50264
|
get _text() {
|
|
50000
50265
|
return this.text || this._t("components.skip-link.action");
|
|
50001
50266
|
}
|
|
50002
|
-
/**
|
|
50003
|
-
* The fragment of an href that stays on this page, or an empty string. An
|
|
50004
|
-
* absolute URL to the page you are on counts too: a router or a CMS writes
|
|
50005
|
-
* `/pagina#inhoud` as readily as `#inhoud`.
|
|
50006
|
-
*/
|
|
50007
|
-
_samePageHash() {
|
|
50008
|
-
try {
|
|
50009
|
-
const url = new URL(this.href, location.href);
|
|
50010
|
-
return url.origin === location.origin && url.pathname === location.pathname && url.search === location.search ? url.hash : "";
|
|
50011
|
-
} catch {
|
|
50012
|
-
return "";
|
|
50013
|
-
}
|
|
50014
|
-
}
|
|
50015
50267
|
disconnectedCallback() {
|
|
50016
50268
|
super.disconnectedCallback();
|
|
50017
50269
|
clearTimeout(this._focusTimer);
|
|
50018
50270
|
}
|
|
50019
|
-
/**
|
|
50020
|
-
* Focuses the target and leaves it as it was once focus moves on.
|
|
50021
|
-
*
|
|
50022
|
-
* The tabindex is 0 and not -1, also when the target came with a -1 of its
|
|
50023
|
-
* own. WebKit skips everything inside a shadow host that has a negative
|
|
50024
|
-
* tabindex, slotted content included, so with -1 on an nldd-* section the
|
|
50025
|
-
* next Tab left the page instead of reaching the first link in it.
|
|
50026
|
-
*/
|
|
50271
|
+
/** Focuses the target with a temporary tab stop; see focusTemporarily. */
|
|
50027
50272
|
_focus(target) {
|
|
50028
50273
|
this._restoreTarget?.();
|
|
50029
|
-
|
|
50030
|
-
|
|
50031
|
-
target.removeEventListener("blur", restore);
|
|
50032
|
-
if (this._restoreTarget === restore) this._restoreTarget = void 0;
|
|
50033
|
-
if (previous === null) target.removeAttribute("tabindex");
|
|
50034
|
-
else target.setAttribute("tabindex", previous);
|
|
50035
|
-
};
|
|
50036
|
-
this._restoreTarget = restore;
|
|
50037
|
-
target.setAttribute("tabindex", "0");
|
|
50038
|
-
target.addEventListener("blur", restore);
|
|
50039
|
-
target.focus();
|
|
50040
|
-
if (target.getRootNode().activeElement !== target) restore();
|
|
50274
|
+
this._restoreTarget = focusTemporarily(target) ?? void 0;
|
|
50275
|
+
if (!this._restoreTarget && false);
|
|
50041
50276
|
}
|
|
50042
50277
|
/**
|
|
50043
50278
|
* The first following sibling that is rendered. `focus()` does nothing on
|