@nldd/design-system 0.8.99 → 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 +484 -40
- package/dist/components/actions/button/button.d.ts +7 -5
- 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 +3 -3
- 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 +7 -5
- 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 +3 -3
- 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/menu/menu.d.ts +9 -0
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +18 -1
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +1 -1
- package/dist/components/actions/split-button/split-button.js +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 +1014 -296
- 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/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +55 -0
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +16 -1
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +109 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +39 -0
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/token/token.d.ts +1 -1
- package/dist/components/content/token/token.js +1 -1
- package/dist/components/{icon-button-CJIikwyu.js → icon-button-BVhiOwX9.js} +12 -7
- package/dist/components/inputs/dropdown/dropdown.d.ts +6 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +6 -0
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- 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/collection/collection.d.ts +16 -5
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +44 -10
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +7 -6
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +1 -1
- package/dist/components/layout/container/container.js +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +4 -0
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +29 -0
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js +131 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts +2 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +139 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero.d.ts +13 -5
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +42 -6
- 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/layout/window/window.d.ts +1 -1
- package/dist/components/layout/window/window.js +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/lists-and-tables/table/table.d.ts +8 -5
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +19 -10
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +4 -0
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.js +5 -1
- package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +7 -5
- 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 +3 -3
- 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/menu-bar-item/menu-bar-item.d.ts +4 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +11 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +1 -1
- package/dist/components/navigation/pagination/pagination.js +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/navigation/tab-bar/tab-bar.d.ts +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +6 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +11 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +21 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +1 -1
- package/dist/components/{with-translations-C8_0-9y8.js → with-translations-C6QfP6_S.js} +24 -1
- package/dist/css/rich-text.css +1 -1
- package/dist/css/variables.css +1 -0
- package/dist/nldd.min.js +962 -683
- 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 +71 -38
- 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 +3 -2
|
@@ -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
|
/**
|
|
@@ -805,9 +809,9 @@ function DescribedBy(Base) {
|
|
|
805
809
|
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
806
810
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
807
811
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
808
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
812
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
809
813
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
810
|
-
* @attr {boolean} disabled - Disabled state
|
|
814
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
811
815
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
812
816
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
813
817
|
* @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
|
|
@@ -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
|
*
|
|
@@ -3078,7 +3082,7 @@ function inlineDialogTemplate(component) {
|
|
|
3078
3082
|
}
|
|
3079
3083
|
//#endregion
|
|
3080
3084
|
//#region src/components/actions/button-group/button-group.styles.ts
|
|
3081
|
-
var smMax$
|
|
3085
|
+
var smMax$21 = unsafeCSS(breakpoints.smMax);
|
|
3082
3086
|
var buttonGroupStyles = css`
|
|
3083
3087
|
:host {
|
|
3084
3088
|
box-sizing: border-box;
|
|
@@ -3130,7 +3134,7 @@ var buttonGroupStyles = css`
|
|
|
3130
3134
|
OR absent, and a rule that named it would have needed a second selector
|
|
3131
3135
|
beside it everywhere. */
|
|
3132
3136
|
|
|
3133
|
-
@container (max-width: ${smMax$
|
|
3137
|
+
@container (max-width: ${smMax$21}) {
|
|
3134
3138
|
:host(:not([orientation="horizontal"], [orientation="vertical"])) .button-group {
|
|
3135
3139
|
flex-direction: column;
|
|
3136
3140
|
--context-button-width: 100%;
|
|
@@ -3727,6 +3731,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
3727
3731
|
this.anchor = "";
|
|
3728
3732
|
this.anchorElement = null;
|
|
3729
3733
|
this.placement = "bottom-start";
|
|
3734
|
+
this.anchorOffset = 0;
|
|
3730
3735
|
this.maxItems = 0;
|
|
3731
3736
|
this.emptyText = "";
|
|
3732
3737
|
this.emptySupportingText = "";
|
|
@@ -4094,6 +4099,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4094
4099
|
this._isOpen = toggleEvent.newState === "open";
|
|
4095
4100
|
this._syncAnchorPopupState(this._isOpen);
|
|
4096
4101
|
if (toggleEvent.newState !== "open") {
|
|
4102
|
+
this.anchorOffset = 0;
|
|
4097
4103
|
this._cleanupAutoUpdate?.();
|
|
4098
4104
|
this._cleanupAutoUpdate = null;
|
|
4099
4105
|
window.removeEventListener("resize", this._handleWindowResize);
|
|
@@ -4172,6 +4178,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4172
4178
|
});
|
|
4173
4179
|
}
|
|
4174
4180
|
updated(changedProperties) {
|
|
4181
|
+
if (changedProperties.has("anchorOffset") && this._isOpen) this.reposition();
|
|
4175
4182
|
if (changedProperties.has("width")) {
|
|
4176
4183
|
if (this.width) {
|
|
4177
4184
|
this.style.setProperty("--_menu-width", this.width);
|
|
@@ -4747,7 +4754,7 @@ var NLDDMenu = class NLDDMenu extends LitElement {
|
|
|
4747
4754
|
placement: effectivePlacement,
|
|
4748
4755
|
middleware: [
|
|
4749
4756
|
offset({
|
|
4750
|
-
mainAxis:
|
|
4757
|
+
mainAxis: this.anchorOffset,
|
|
4751
4758
|
alignmentAxis: -submenuPadding
|
|
4752
4759
|
}),
|
|
4753
4760
|
...drillIn ? [] : [flip({ padding: viewportMargin })],
|
|
@@ -4836,6 +4843,7 @@ __decorate([property({
|
|
|
4836
4843
|
reflect: true,
|
|
4837
4844
|
converter: reflectNonDefault("bottom-start")
|
|
4838
4845
|
})], NLDDMenu.prototype, "placement", void 0);
|
|
4846
|
+
__decorate([property({ attribute: false })], NLDDMenu.prototype, "anchorOffset", void 0);
|
|
4839
4847
|
__decorate([property({
|
|
4840
4848
|
type: Number,
|
|
4841
4849
|
attribute: "max-items"
|
|
@@ -4890,7 +4898,7 @@ if (!customElements.get("nldd-menu")) customElements.define("nldd-menu", NLDDMen
|
|
|
4890
4898
|
* @element nldd-split-button
|
|
4891
4899
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
4892
4900
|
* @attr {string} appearance - Visual style (default: 'neutral-tinted'; 'inherit-tinted' and 'inherit-filled' for a colored surface)
|
|
4893
|
-
* @attr {boolean} disabled - Disabled state
|
|
4901
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
4894
4902
|
* @attr {string} width - Width mode: 'full' (stretches to container) or any CSS length; the main action button fills the available space
|
|
4895
4903
|
* @attr {string} text - Button text for the primary action
|
|
4896
4904
|
* @attr {string} icon - Icon name shown before the text on the primary action button
|
|
@@ -5599,7 +5607,7 @@ var toolbarTitleStyles = css`
|
|
|
5599
5607
|
text-decoration: none;
|
|
5600
5608
|
}
|
|
5601
5609
|
|
|
5602
|
-
.
|
|
5610
|
+
.toolbar__link-hint {
|
|
5603
5611
|
position: absolute;
|
|
5604
5612
|
margin: -1px;
|
|
5605
5613
|
border: 0;
|
|
@@ -5681,6 +5689,7 @@ function toolbarTitleTemplate(component) {
|
|
|
5681
5689
|
${component.supportingText ? html`<p class="toolbar__supporting-text">${component.supportingText}</p>` : nothing}
|
|
5682
5690
|
</div>
|
|
5683
5691
|
`;
|
|
5692
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
5684
5693
|
return html`
|
|
5685
5694
|
${component.href ? html`
|
|
5686
5695
|
<a class="toolbar__title-link"
|
|
@@ -5689,7 +5698,7 @@ function toolbarTitleTemplate(component) {
|
|
|
5689
5698
|
rel=${linkRel(null, component.target) || nothing}
|
|
5690
5699
|
>
|
|
5691
5700
|
<slot name="media"></slot>
|
|
5692
|
-
${titleGroup}${
|
|
5701
|
+
${titleGroup}${hintKey ? html`<span class="toolbar__link-hint">, ${component._t(`components.toolbar.${hintKey}`)}</span>` : nothing}
|
|
5693
5702
|
</a>
|
|
5694
5703
|
` : html`
|
|
5695
5704
|
<slot name="media"></slot>
|
|
@@ -5739,7 +5748,9 @@ function template$17(component, hasCenterChildren, leftSpacerZero, rightSpacerZe
|
|
|
5739
5748
|
//#region src/components/actions/toolbar/toolbar.i18n.ts
|
|
5740
5749
|
var nlddToolbarTranslations = {
|
|
5741
5750
|
"components.toolbar.overflow-action": "Meer",
|
|
5742
|
-
"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"
|
|
5743
5754
|
};
|
|
5744
5755
|
//#endregion
|
|
5745
5756
|
//#region src/components/actions/toolbar/toolbar.ts
|
|
@@ -5803,7 +5814,7 @@ var nlddToolbarTranslations = {
|
|
|
5803
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.
|
|
5804
5815
|
*
|
|
5805
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.
|
|
5806
|
-
* @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.
|
|
5807
5818
|
* @attr {object} translations - Override translation keys (the new-tab announcement); unset keys fall back to Dutch.
|
|
5808
5819
|
*
|
|
5809
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).
|
|
@@ -6533,7 +6544,11 @@ function groupForOverflow(items) {
|
|
|
6533
6544
|
}
|
|
6534
6545
|
//#endregion
|
|
6535
6546
|
//#region src/components/content/avatar/avatar.i18n.ts
|
|
6536
|
-
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
|
+
};
|
|
6537
6552
|
//#endregion
|
|
6538
6553
|
//#region src/components/content/avatar/avatar.styles.ts
|
|
6539
6554
|
var avatarStyles = css`
|
|
@@ -6706,8 +6721,9 @@ function avatarTemplate(component) {
|
|
|
6706
6721
|
const initials = component.resolvedInitials;
|
|
6707
6722
|
const showInitials = !showImage && initials !== "";
|
|
6708
6723
|
const showIcon = !showImage && !showInitials;
|
|
6709
|
-
const
|
|
6710
|
-
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;
|
|
6711
6727
|
const content = html`
|
|
6712
6728
|
${showImage ? html`
|
|
6713
6729
|
<img class="avatar__image"
|
|
@@ -6799,7 +6815,7 @@ function avatarTemplate(component) {
|
|
|
6799
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
|
|
6800
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.
|
|
6801
6817
|
* @attr {boolean} button - Makes the avatar a button; ignored when `href` is set
|
|
6802
|
-
* @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.
|
|
6803
6819
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
6804
6820
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
6805
6821
|
*
|
|
@@ -6989,7 +7005,7 @@ __decorate([state()], NLDDAvatar.prototype, "_imageFailed", void 0);
|
|
|
6989
7005
|
NLDDAvatar = __decorate([customElement("nldd-avatar")], NLDDAvatar);
|
|
6990
7006
|
//#endregion
|
|
6991
7007
|
//#region src/components/content/blockquote/blockquote.styles.ts
|
|
6992
|
-
var smMax$
|
|
7008
|
+
var smMax$20 = unsafeCSS(breakpoints.smMax);
|
|
6993
7009
|
var blockquoteStyles = css`
|
|
6994
7010
|
:host {
|
|
6995
7011
|
box-sizing: border-box;
|
|
@@ -7003,13 +7019,13 @@ var blockquoteStyles = css`
|
|
|
7003
7019
|
--_blockquote-quote-font: var(--semantics-blockquotes-md-quote-font);
|
|
7004
7020
|
--_blockquote-attribution-font: var(--semantics-blockquotes-md-attribution-font);
|
|
7005
7021
|
|
|
7006
|
-
@media (max-width: ${smMax$
|
|
7022
|
+
@media (max-width: ${smMax$20}) {
|
|
7007
7023
|
--_blockquote-spacing: var(--semantics-blockquotes-sm-spacing);
|
|
7008
7024
|
--_blockquote-quote-font: var(--semantics-blockquotes-sm-quote-font);
|
|
7009
7025
|
--_blockquote-attribution-font: var(--semantics-blockquotes-sm-attribution-font);
|
|
7010
7026
|
}
|
|
7011
7027
|
|
|
7012
|
-
@container layout-container (max-width: ${smMax$
|
|
7028
|
+
@container layout-container (max-width: ${smMax$20}) {
|
|
7013
7029
|
--_blockquote-spacing: var(--semantics-blockquotes-sm-spacing);
|
|
7014
7030
|
--_blockquote-quote-font: var(--semantics-blockquotes-sm-quote-font);
|
|
7015
7031
|
--_blockquote-attribution-font: var(--semantics-blockquotes-sm-attribution-font);
|
|
@@ -7308,8 +7324,8 @@ function avatarGroupTemplate(component) {
|
|
|
7308
7324
|
}
|
|
7309
7325
|
//#endregion
|
|
7310
7326
|
//#region src/components/layout/popover/popover.styles.ts
|
|
7311
|
-
var smMax$
|
|
7312
|
-
var mdMin$
|
|
7327
|
+
var smMax$19 = unsafeCSS(breakpoints.smMax);
|
|
7328
|
+
var mdMin$22 = unsafeCSS(breakpoints.mdMin);
|
|
7313
7329
|
var popoverStyles = css`
|
|
7314
7330
|
:host {
|
|
7315
7331
|
box-sizing: border-box;
|
|
@@ -7335,7 +7351,7 @@ var popoverStyles = css`
|
|
|
7335
7351
|
-webkit-user-select: text;
|
|
7336
7352
|
user-select: text;
|
|
7337
7353
|
|
|
7338
|
-
@media (max-width: ${smMax$
|
|
7354
|
+
@media (max-width: ${smMax$19}) {
|
|
7339
7355
|
position: fixed;
|
|
7340
7356
|
inset: auto 0 0 0;
|
|
7341
7357
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
@@ -7349,7 +7365,7 @@ var popoverStyles = css`
|
|
|
7349
7365
|
overlay var(--semantics-sheets-bottom-animation-duration) allow-discrete;
|
|
7350
7366
|
}
|
|
7351
7367
|
|
|
7352
|
-
@media (min-width: ${mdMin$
|
|
7368
|
+
@media (min-width: ${mdMin$22}) {
|
|
7353
7369
|
position: absolute;
|
|
7354
7370
|
inset: unset;
|
|
7355
7371
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
@@ -7372,7 +7388,7 @@ var popoverStyles = css`
|
|
|
7372
7388
|
keeps it laid out so its size can be measured. The sm bottom-sheet is CSS-animated
|
|
7373
7389
|
and positioned, so it is excluded. The positioned attribute is set once
|
|
7374
7390
|
reposition() finishes and cleared on every re-open. */
|
|
7375
|
-
@media (min-width: ${mdMin$
|
|
7391
|
+
@media (min-width: ${mdMin$22}) {
|
|
7376
7392
|
:host(:popover-open:not([positioned])) {
|
|
7377
7393
|
visibility: hidden;
|
|
7378
7394
|
}
|
|
@@ -7385,7 +7401,7 @@ var popoverStyles = css`
|
|
|
7385
7401
|
}
|
|
7386
7402
|
|
|
7387
7403
|
:host(:popover-open) {
|
|
7388
|
-
@media (max-width: ${smMax$
|
|
7404
|
+
@media (max-width: ${smMax$19}) {
|
|
7389
7405
|
transform: translateY(0);
|
|
7390
7406
|
|
|
7391
7407
|
@starting-style {
|
|
@@ -7395,13 +7411,13 @@ var popoverStyles = css`
|
|
|
7395
7411
|
}
|
|
7396
7412
|
|
|
7397
7413
|
:host::backdrop {
|
|
7398
|
-
@media (max-width: ${smMax$
|
|
7414
|
+
@media (max-width: ${smMax$19}) {
|
|
7399
7415
|
background-color: var(--semantics-overlays-backdrop-color);
|
|
7400
7416
|
}
|
|
7401
7417
|
}
|
|
7402
7418
|
|
|
7403
7419
|
:host([sm-full-height]) {
|
|
7404
|
-
@media (max-width: ${smMax$
|
|
7420
|
+
@media (max-width: ${smMax$19}) {
|
|
7405
7421
|
height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
7406
7422
|
}
|
|
7407
7423
|
}
|
|
@@ -7885,10 +7901,10 @@ __decorate([property({
|
|
|
7885
7901
|
NLDDPopover = _NLDDPopover = __decorate([customElement("nldd-popover")], NLDDPopover);
|
|
7886
7902
|
//#endregion
|
|
7887
7903
|
//#region src/components/layout/container/container.styles.ts
|
|
7888
|
-
var smMax$
|
|
7889
|
-
var mdMin$
|
|
7890
|
-
var mdMax$
|
|
7891
|
-
var lgMin$
|
|
7904
|
+
var smMax$18 = unsafeCSS(breakpoints.smMax);
|
|
7905
|
+
var mdMin$21 = unsafeCSS(breakpoints.mdMin);
|
|
7906
|
+
var mdMax$14 = unsafeCSS(breakpoints.mdMax);
|
|
7907
|
+
var lgMin$15 = unsafeCSS(breakpoints.lgMin);
|
|
7892
7908
|
var containerStyles = css`
|
|
7893
7909
|
:host {
|
|
7894
7910
|
box-sizing: border-box;
|
|
@@ -7934,13 +7950,13 @@ var containerStyles = css`
|
|
|
7934
7950
|
container and anywhere else the viewport. Multicol reads the gap in three
|
|
7935
7951
|
rules, so the value is swapped here rather than declared in each. The
|
|
7936
7952
|
bare --_container-gap is what stands when neither set matches. */
|
|
7937
|
-
@media (max-width: ${smMax$
|
|
7938
|
-
@media (min-width: ${mdMin$
|
|
7939
|
-
@media (min-width: ${lgMin$
|
|
7953
|
+
@media (max-width: ${smMax$18}) { --_container-gap: var(--_container-sm-gap); }
|
|
7954
|
+
@media (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) { --_container-gap: var(--_container-md-gap); }
|
|
7955
|
+
@media (min-width: ${lgMin$15}) { --_container-gap: var(--_container-lg-gap); }
|
|
7940
7956
|
|
|
7941
|
-
@container layout-container (max-width: ${smMax$
|
|
7942
|
-
@container layout-container (min-width: ${mdMin$
|
|
7943
|
-
@container layout-container (min-width: ${lgMin$
|
|
7957
|
+
@container layout-container (max-width: ${smMax$18}) { --_container-gap: var(--_container-sm-gap); }
|
|
7958
|
+
@container layout-container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) { --_container-gap: var(--_container-md-gap); }
|
|
7959
|
+
@container layout-container (min-width: ${lgMin$15}) { --_container-gap: var(--_container-lg-gap); }
|
|
7944
7960
|
|
|
7945
7961
|
display: block;
|
|
7946
7962
|
width: var(--_container-width);
|
|
@@ -7970,42 +7986,42 @@ var containerStyles = css`
|
|
|
7970
7986
|
padding-bottom: var(--_container-padding-bottom);
|
|
7971
7987
|
padding-left: var(--_container-padding-left);
|
|
7972
7988
|
|
|
7973
|
-
@media (max-width: ${smMax$
|
|
7989
|
+
@media (max-width: ${smMax$18}) {
|
|
7974
7990
|
padding-top: var(--_container-sm-padding-top);
|
|
7975
7991
|
padding-right: var(--_container-sm-padding-right);
|
|
7976
7992
|
padding-bottom: var(--_container-sm-padding-bottom);
|
|
7977
7993
|
padding-left: var(--_container-sm-padding-left);
|
|
7978
7994
|
}
|
|
7979
7995
|
|
|
7980
|
-
@media (min-width: ${mdMin$
|
|
7996
|
+
@media (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
7981
7997
|
padding-top: var(--_container-md-padding-top);
|
|
7982
7998
|
padding-right: var(--_container-md-padding-right);
|
|
7983
7999
|
padding-bottom: var(--_container-md-padding-bottom);
|
|
7984
8000
|
padding-left: var(--_container-md-padding-left);
|
|
7985
8001
|
}
|
|
7986
8002
|
|
|
7987
|
-
@media (min-width: ${lgMin$
|
|
8003
|
+
@media (min-width: ${lgMin$15}) {
|
|
7988
8004
|
padding-top: var(--_container-lg-padding-top);
|
|
7989
8005
|
padding-right: var(--_container-lg-padding-right);
|
|
7990
8006
|
padding-bottom: var(--_container-lg-padding-bottom);
|
|
7991
8007
|
padding-left: var(--_container-lg-padding-left);
|
|
7992
8008
|
}
|
|
7993
8009
|
|
|
7994
|
-
@container layout-container (max-width: ${smMax$
|
|
8010
|
+
@container layout-container (max-width: ${smMax$18}) {
|
|
7995
8011
|
padding-top: var(--_container-sm-padding-top);
|
|
7996
8012
|
padding-right: var(--_container-sm-padding-right);
|
|
7997
8013
|
padding-bottom: var(--_container-sm-padding-bottom);
|
|
7998
8014
|
padding-left: var(--_container-sm-padding-left);
|
|
7999
8015
|
}
|
|
8000
8016
|
|
|
8001
|
-
@container layout-container (min-width: ${mdMin$
|
|
8017
|
+
@container layout-container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
8002
8018
|
padding-top: var(--_container-md-padding-top);
|
|
8003
8019
|
padding-right: var(--_container-md-padding-right);
|
|
8004
8020
|
padding-bottom: var(--_container-md-padding-bottom);
|
|
8005
8021
|
padding-left: var(--_container-md-padding-left);
|
|
8006
8022
|
}
|
|
8007
8023
|
|
|
8008
|
-
@container layout-container (min-width: ${lgMin$
|
|
8024
|
+
@container layout-container (min-width: ${lgMin$15}) {
|
|
8009
8025
|
padding-top: var(--_container-lg-padding-top);
|
|
8010
8026
|
padding-right: var(--_container-lg-padding-right);
|
|
8011
8027
|
padding-bottom: var(--_container-lg-padding-bottom);
|
|
@@ -8013,6 +8029,10 @@ var containerStyles = css`
|
|
|
8013
8029
|
}
|
|
8014
8030
|
}
|
|
8015
8031
|
|
|
8032
|
+
:host([width="fit-content"]) .container {
|
|
8033
|
+
container-type: normal;
|
|
8034
|
+
}
|
|
8035
|
+
|
|
8016
8036
|
|
|
8017
8037
|
/* # Inner — actual layout */
|
|
8018
8038
|
|
|
@@ -8111,7 +8131,7 @@ var containerStyles = css`
|
|
|
8111
8131
|
|
|
8112
8132
|
/* # Column count — sm scope (queries :host own width) */
|
|
8113
8133
|
|
|
8114
|
-
@container (max-width: ${smMax$
|
|
8134
|
+
@container (max-width: ${smMax$18}) {
|
|
8115
8135
|
:host([sm-column-count="1"]) .container__inner { --_container-column-count: 1; }
|
|
8116
8136
|
:host([sm-column-count="2"]) .container__inner { --_container-column-count: 2; }
|
|
8117
8137
|
:host([sm-column-count="3"]) .container__inner { --_container-column-count: 3; }
|
|
@@ -8126,7 +8146,7 @@ var containerStyles = css`
|
|
|
8126
8146
|
|
|
8127
8147
|
/* # Column count — md scope */
|
|
8128
8148
|
|
|
8129
|
-
@container (min-width: ${mdMin$
|
|
8149
|
+
@container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
8130
8150
|
:host([md-column-count="1"]) .container__inner { --_container-column-count: 1; }
|
|
8131
8151
|
:host([md-column-count="2"]) .container__inner { --_container-column-count: 2; }
|
|
8132
8152
|
:host([md-column-count="3"]) .container__inner { --_container-column-count: 3; }
|
|
@@ -8141,7 +8161,7 @@ var containerStyles = css`
|
|
|
8141
8161
|
|
|
8142
8162
|
/* # Column count — lg scope */
|
|
8143
8163
|
|
|
8144
|
-
@container (min-width: ${lgMin$
|
|
8164
|
+
@container (min-width: ${lgMin$15}) {
|
|
8145
8165
|
:host([lg-column-count="1"]) .container__inner { --_container-column-count: 1; }
|
|
8146
8166
|
:host([lg-column-count="2"]) .container__inner { --_container-column-count: 2; }
|
|
8147
8167
|
:host([lg-column-count="3"]) .container__inner { --_container-column-count: 3; }
|
|
@@ -8166,15 +8186,15 @@ var containerStyles = css`
|
|
|
8166
8186
|
order: var(--_container-slot-order, 0);
|
|
8167
8187
|
}
|
|
8168
8188
|
|
|
8169
|
-
@container (max-width: ${smMax$
|
|
8189
|
+
@container (max-width: ${smMax$18}) {
|
|
8170
8190
|
::slotted(*) { order: var(--_container-slot-sm-order, var(--_container-slot-order, 0)); }
|
|
8171
8191
|
}
|
|
8172
8192
|
|
|
8173
|
-
@container (min-width: ${mdMin$
|
|
8193
|
+
@container (min-width: ${mdMin$21}) and (max-width: ${mdMax$14}) {
|
|
8174
8194
|
::slotted(*) { order: var(--_container-slot-md-order, var(--_container-slot-order, 0)); }
|
|
8175
8195
|
}
|
|
8176
8196
|
|
|
8177
|
-
@container (min-width: ${lgMin$
|
|
8197
|
+
@container (min-width: ${lgMin$15}) {
|
|
8178
8198
|
::slotted(*) { order: var(--_container-slot-lg-order, var(--_container-slot-order, 0)); }
|
|
8179
8199
|
}
|
|
8180
8200
|
`;
|
|
@@ -8309,7 +8329,7 @@ function spacingToValue(value, element, attribute) {
|
|
|
8309
8329
|
* @attr {number} sm-column-count - Column count when this container is sm-wide
|
|
8310
8330
|
* @attr {number} md-column-count - Column count when this container is md-wide
|
|
8311
8331
|
* @attr {number} lg-column-count - Column count when this container is lg-wide
|
|
8312
|
-
* @attr {string} width - 'full' (default, fills the parent) | 'fit-content' | a CSS length (e.g. '480px'). A container narrower than its parent stays where its parent puts it; use the parent's horizontal-alignment to move it.
|
|
8332
|
+
* @attr {string} width - 'full' (default, fills the parent) | 'fit-content' | a CSS length (e.g. '480px'). A container narrower than its parent stays where its parent puts it; use the parent's horizontal-alignment to move it. A 'fit-content' container takes its width from its content, so it cannot measure itself: its breakpoint padding, gap and column count follow the container around it.
|
|
8313
8333
|
* @attr {string} min-width - Minimum width as a CSS length (e.g. '280px')
|
|
8314
8334
|
* @attr {string} max-width - Maximum width as a CSS length (e.g. '480px')
|
|
8315
8335
|
* @attr {string} gap - Gap between children. One distance for all of them, so it fits children of one kind; for a stack of different kinds, space each seam with nldd-spacer instead.
|
|
@@ -9472,10 +9492,15 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
|
|
|
9472
9492
|
else this.style.removeProperty("--_list-max-height");
|
|
9473
9493
|
}
|
|
9474
9494
|
}
|
|
9475
|
-
/**
|
|
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`. */
|
|
9476
9501
|
_syncTranslatedTexts() {
|
|
9477
9502
|
if (this.hasAttribute("data-nldd-auto-label") && this.getAttribute("aria-label") === this._autoLabel) {
|
|
9478
|
-
this._autoLabel = this.
|
|
9503
|
+
this._autoLabel = this._navigationLabel();
|
|
9479
9504
|
this.setAttribute("aria-label", this._autoLabel);
|
|
9480
9505
|
}
|
|
9481
9506
|
if (this.hasAttribute("aria-keyshortcuts")) this.setAttribute("aria-description", this._t("components.list.arrow-navigation-description-text"));
|
|
@@ -9484,7 +9509,7 @@ var NLDDList = (_NLDDList2 = class NLDDList extends LitElement {
|
|
|
9484
9509
|
if (this.type === "navigation") {
|
|
9485
9510
|
this.setAttribute("role", "navigation");
|
|
9486
9511
|
if (!this.hasAttribute("aria-label") && !this.hasAttribute("aria-labelledby")) {
|
|
9487
|
-
this._autoLabel = this.
|
|
9512
|
+
this._autoLabel = this._navigationLabel();
|
|
9488
9513
|
this.setAttribute("aria-label", this._autoLabel);
|
|
9489
9514
|
this.setAttribute("data-nldd-auto-label", "");
|
|
9490
9515
|
}
|
|
@@ -10193,7 +10218,7 @@ var listItemStyles = css`
|
|
|
10193
10218
|
opacity: var(--primitives-opacity-disabled);
|
|
10194
10219
|
}
|
|
10195
10220
|
|
|
10196
|
-
.list-
|
|
10221
|
+
.list-item__link-hint {
|
|
10197
10222
|
position: absolute;
|
|
10198
10223
|
margin: -1px;
|
|
10199
10224
|
border: 0;
|
|
@@ -10456,7 +10481,8 @@ var listItemStyles = css`
|
|
|
10456
10481
|
//#region src/components/lists-and-tables/list-item/list-item.template.ts
|
|
10457
10482
|
var content = html`<slot></slot>`;
|
|
10458
10483
|
var divider = html`<div class="list-item__divider"></div>`;
|
|
10459
|
-
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;
|
|
10460
10486
|
const ariaExpanded = expanded === void 0 ? nothing : String(expanded);
|
|
10461
10487
|
const children = showChildren ? html`<div class="list-item__children"
|
|
10462
10488
|
role=${childrenRole}
|
|
@@ -10472,16 +10498,18 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10472
10498
|
href=${href}
|
|
10473
10499
|
target=${target ?? nothing}
|
|
10474
10500
|
rel=${linkRel(rel, target) || nothing}
|
|
10501
|
+
aria-label=${ariaLabel}
|
|
10475
10502
|
aria-disabled=${disabled ? "true" : nothing}
|
|
10476
10503
|
aria-expanded=${ariaExpanded}
|
|
10477
10504
|
tabindex=${actionTabindex ?? nothing}
|
|
10478
|
-
>${content}${
|
|
10505
|
+
>${content}${linkHint && !accessibleLabel ? html`<span class="list-item__link-hint">, ${linkHint}</span>` : nothing}</a>
|
|
10479
10506
|
${divider}
|
|
10480
10507
|
</div>${children}`;
|
|
10481
10508
|
if (checkbox) return html`<div class=${blockClass}>
|
|
10482
10509
|
<button class="list-item__action"
|
|
10483
10510
|
type="button"
|
|
10484
10511
|
role="checkbox"
|
|
10512
|
+
aria-label=${ariaLabel}
|
|
10485
10513
|
?disabled=${disabled}
|
|
10486
10514
|
aria-checked=${String(checked)}
|
|
10487
10515
|
aria-expanded=${ariaExpanded}
|
|
@@ -10493,6 +10521,7 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10493
10521
|
<button class="list-item__action"
|
|
10494
10522
|
type="button"
|
|
10495
10523
|
role="radio"
|
|
10524
|
+
aria-label=${ariaLabel}
|
|
10496
10525
|
?disabled=${disabled}
|
|
10497
10526
|
aria-checked=${String(checked)}
|
|
10498
10527
|
tabindex=${actionTabindex ?? nothing}
|
|
@@ -10502,6 +10531,7 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10502
10531
|
if (button) return html`<div class=${blockClass}>
|
|
10503
10532
|
<button class="list-item__action"
|
|
10504
10533
|
type="button"
|
|
10534
|
+
aria-label=${ariaLabel}
|
|
10505
10535
|
?disabled=${disabled}
|
|
10506
10536
|
aria-expanded=${ariaExpanded}
|
|
10507
10537
|
tabindex=${actionTabindex ?? nothing}
|
|
@@ -10515,7 +10545,11 @@ var template$14 = (button, href, target, rel, opensInNewTabLabel, actionTabindex
|
|
|
10515
10545
|
};
|
|
10516
10546
|
//#endregion
|
|
10517
10547
|
//#region src/components/lists-and-tables/list-item/list-item.i18n.ts
|
|
10518
|
-
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
|
+
};
|
|
10519
10553
|
//#endregion
|
|
10520
10554
|
//#region src/components/lists-and-tables/list-item/list-item.ts
|
|
10521
10555
|
var list_item_exports = /* @__PURE__ */ __exportAll({ NLDDListItem: () => NLDDListItem });
|
|
@@ -10592,6 +10626,7 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
|
|
|
10592
10626
|
this.button = false;
|
|
10593
10627
|
this.checkbox = false;
|
|
10594
10628
|
this.radio = false;
|
|
10629
|
+
this.accessibleLabel = "";
|
|
10595
10630
|
this.reorderable = false;
|
|
10596
10631
|
this.selected = false;
|
|
10597
10632
|
this.checked = false;
|
|
@@ -11193,9 +11228,10 @@ var NLDDListItem = (_NLDDListItem2 = class NLDDListItem extends withTranslations
|
|
|
11193
11228
|
return parent;
|
|
11194
11229
|
}
|
|
11195
11230
|
render() {
|
|
11196
|
-
const
|
|
11231
|
+
const hintKey = linkHintKey(this.href, this.target);
|
|
11232
|
+
const linkHint = hintKey ? this._t(`components.list-item.${hintKey}`) : void 0;
|
|
11197
11233
|
const actionTabindex = this._isListboxOption ? "-1" : this._arrowNavigation ? this._rovingActive ? "0" : "-1" : void 0;
|
|
11198
|
-
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);
|
|
11199
11235
|
}
|
|
11200
11236
|
}, _NLDDListItem = _NLDDListItem2, _NLDDListItem2.styles = [listItemStyles], _NLDDListItem2.SIZED_CELLS = "nldd-text-cell, nldd-drag-handle-cell", _NLDDListItem2);
|
|
11201
11237
|
__decorate([property({
|
|
@@ -11217,6 +11253,10 @@ __decorate([property({
|
|
|
11217
11253
|
type: Boolean,
|
|
11218
11254
|
reflect: true
|
|
11219
11255
|
})], NLDDListItem.prototype, "radio", void 0);
|
|
11256
|
+
__decorate([property({
|
|
11257
|
+
type: String,
|
|
11258
|
+
attribute: "accessible-label"
|
|
11259
|
+
})], NLDDListItem.prototype, "accessibleLabel", void 0);
|
|
11220
11260
|
__decorate([property({
|
|
11221
11261
|
type: Boolean,
|
|
11222
11262
|
reflect: true
|
|
@@ -11560,7 +11600,7 @@ __decorate([state()], NLDDAvatarGroup.prototype, "_total", void 0);
|
|
|
11560
11600
|
NLDDAvatarGroup = __decorate([customElement("nldd-avatar-group")], NLDDAvatarGroup);
|
|
11561
11601
|
//#endregion
|
|
11562
11602
|
//#region src/components/content/identity/identity.styles.ts
|
|
11563
|
-
var smMax$
|
|
11603
|
+
var smMax$17 = unsafeCSS(breakpoints.smMax);
|
|
11564
11604
|
var identityStyles = css`
|
|
11565
11605
|
:host {
|
|
11566
11606
|
box-sizing: border-box;
|
|
@@ -11598,7 +11638,7 @@ var identityStyles = css`
|
|
|
11598
11638
|
}
|
|
11599
11639
|
|
|
11600
11640
|
.identity[data-multiple-avatars] {
|
|
11601
|
-
@container (max-width: ${smMax$
|
|
11641
|
+
@container (max-width: ${smMax$17}) {
|
|
11602
11642
|
flex-direction: column;
|
|
11603
11643
|
align-items: flex-start;
|
|
11604
11644
|
}
|
|
@@ -13958,6 +13998,19 @@ var textStyles = css`
|
|
|
13958
13998
|
--_text-max-width: var(--semantics-text-max-width);
|
|
13959
13999
|
--_text-color: var(--context-content-color, var(--semantics-content-color));
|
|
13960
14000
|
--_text-align: left;
|
|
14001
|
+
--_text-link-color: var(--semantics-links-color);
|
|
14002
|
+
--_text-link-is-hovered-color: var(--semantics-links-is-hovered-color);
|
|
14003
|
+
--_text-link-is-active-color: var(--semantics-links-is-active-color);
|
|
14004
|
+
--_text-link-underline-offset: var(--primitives-space-2);
|
|
14005
|
+
--_text-code-padding: var(--primitives-space-4);
|
|
14006
|
+
--_text-code-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
14007
|
+
--_text-code-background-color: var(--semantics-surfaces-tinted-background-color);
|
|
14008
|
+
--_text-code-font-family: var(--primitives-font-family-monospace);
|
|
14009
|
+
--_text-code-font-size: var(--semantics-code-inline-font-size);
|
|
14010
|
+
--_text-mark-padding: var(--primitives-space-1) var(--primitives-space-2);
|
|
14011
|
+
--_text-mark-corner-radius: var(--semantics-controls-xs-corner-radius);
|
|
14012
|
+
--_text-mark-background-color: var(--semantics-content-mark-background-color);
|
|
14013
|
+
--_text-mark-color: var(--semantics-content-mark-color);
|
|
13961
14014
|
|
|
13962
14015
|
display: block;
|
|
13963
14016
|
max-width: var(--_text-max-width);
|
|
@@ -14011,6 +14064,48 @@ var textStyles = css`
|
|
|
14011
14064
|
}
|
|
14012
14065
|
|
|
14013
14066
|
|
|
14067
|
+
/* # Inline elements */
|
|
14068
|
+
|
|
14069
|
+
::slotted(em),
|
|
14070
|
+
::slotted(i) {
|
|
14071
|
+
color: inherit;
|
|
14072
|
+
font-style: italic;
|
|
14073
|
+
}
|
|
14074
|
+
|
|
14075
|
+
::slotted(a) {
|
|
14076
|
+
color: var(--_text-link-color);
|
|
14077
|
+
text-decoration: underline;
|
|
14078
|
+
text-underline-offset: var(--_text-link-underline-offset);
|
|
14079
|
+
}
|
|
14080
|
+
|
|
14081
|
+
::slotted(a:hover) {
|
|
14082
|
+
color: var(--_text-link-is-hovered-color);
|
|
14083
|
+
}
|
|
14084
|
+
|
|
14085
|
+
::slotted(a:active) {
|
|
14086
|
+
color: var(--_text-link-is-active-color);
|
|
14087
|
+
}
|
|
14088
|
+
|
|
14089
|
+
:host([color="inherit"]) ::slotted(a) {
|
|
14090
|
+
color: currentColor;
|
|
14091
|
+
}
|
|
14092
|
+
|
|
14093
|
+
::slotted(code) {
|
|
14094
|
+
border-radius: var(--_text-code-corner-radius);
|
|
14095
|
+
background-color: var(--_text-code-background-color);
|
|
14096
|
+
padding: var(--_text-code-padding);
|
|
14097
|
+
font-family: var(--_text-code-font-family);
|
|
14098
|
+
font-size: var(--_text-code-font-size);
|
|
14099
|
+
}
|
|
14100
|
+
|
|
14101
|
+
::slotted(mark) {
|
|
14102
|
+
border-radius: var(--_text-mark-corner-radius);
|
|
14103
|
+
background-color: var(--_text-mark-background-color);
|
|
14104
|
+
padding: var(--_text-mark-padding);
|
|
14105
|
+
color: var(--_text-mark-color);
|
|
14106
|
+
}
|
|
14107
|
+
|
|
14108
|
+
|
|
14014
14109
|
/* # Line height */
|
|
14015
14110
|
|
|
14016
14111
|
:host([line-height="flat"]) {
|
|
@@ -14104,7 +14199,7 @@ function template$11() {
|
|
|
14104
14199
|
* @attr {string} color - Text color: 'content' (the default) | 'secondary' | 'accent' | 'success' | 'warning' | 'critical' | 'inherit'. 'content' and 'secondary' follow the surrounding content channel; 'inherit' takes the color it inherits, for text on a painted surface.
|
|
14105
14200
|
* @attr {string} horizontal-alignment - Alignment of the text within the block: 'left' | 'center' | 'right' (default: 'left'). Aligns the words; `horizontal-alignment` on nldd-container moves the box.
|
|
14106
14201
|
*
|
|
14107
|
-
* @slot - The text. Inline elements
|
|
14202
|
+
* @slot - The text. Inline elements look as they do in nldd-rich-text: `<strong>` and `<b>` take the bold weight from the scale, `<em>` and `<i>` are italic, `<a>` is an underlined link, `<code>` sits on a tinted surface in the monospace font, and `<mark>` is highlighted. This holds for elements directly in the text; one inside another (a link inside `<strong>`) keeps only the outer one's styling. Components such as `nldd-tag` are left alone.
|
|
14108
14203
|
*/
|
|
14109
14204
|
var _NLDDText = class NLDDText extends LitElement {
|
|
14110
14205
|
constructor(..._args) {
|
|
@@ -14145,10 +14240,10 @@ __decorate([property({
|
|
|
14145
14240
|
NLDDText = __decorate([customElement("nldd-text")], NLDDText);
|
|
14146
14241
|
//#endregion
|
|
14147
14242
|
//#region src/components/content/title/title.styles.ts
|
|
14148
|
-
var smMax$
|
|
14149
|
-
var mdMin$
|
|
14150
|
-
var mdMax$
|
|
14151
|
-
var lgMin$
|
|
14243
|
+
var smMax$16 = unsafeCSS(breakpoints.smMax);
|
|
14244
|
+
var mdMin$20 = unsafeCSS(breakpoints.mdMin);
|
|
14245
|
+
var mdMax$13 = unsafeCSS(breakpoints.mdMax);
|
|
14246
|
+
var lgMin$14 = unsafeCSS(breakpoints.lgMin);
|
|
14152
14247
|
var titleStyles = css`
|
|
14153
14248
|
:host {
|
|
14154
14249
|
box-sizing: border-box;
|
|
@@ -14158,27 +14253,34 @@ var titleStyles = css`
|
|
|
14158
14253
|
/* # Host */
|
|
14159
14254
|
|
|
14160
14255
|
:host {
|
|
14161
|
-
|
|
14256
|
+
--_title-sm-custom-size: initial;
|
|
14257
|
+
--_title-md-custom-size: initial;
|
|
14258
|
+
--_title-lg-custom-size: initial;
|
|
14259
|
+
--_title-sm-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-sm-custom-size), var(--primitives-font-size-700)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
14260
|
+
--_title-md-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-md-custom-size), var(--primitives-font-size-800)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
14261
|
+
--_title-lg-custom-font: var(--primitives-font-weight-display-bold) max(var(--_title-lg-custom-size), var(--primitives-font-size-1000)) / var(--primitives-line-height-flat) var(--primitives-font-family-display);
|
|
14262
|
+
|
|
14263
|
+
@media (max-width: ${smMax$16}) {
|
|
14162
14264
|
--_title-font: var(--primitives-font-display-3-sm);
|
|
14163
14265
|
}
|
|
14164
14266
|
|
|
14165
|
-
@media (min-width: ${mdMin$
|
|
14267
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14166
14268
|
--_title-font: var(--primitives-font-display-3-md);
|
|
14167
14269
|
}
|
|
14168
14270
|
|
|
14169
|
-
@media (min-width: ${lgMin$
|
|
14271
|
+
@media (min-width: ${lgMin$14}) {
|
|
14170
14272
|
--_title-font: var(--primitives-font-display-3-lg);
|
|
14171
14273
|
}
|
|
14172
14274
|
|
|
14173
|
-
@container layout-container (max-width: ${smMax$
|
|
14275
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14174
14276
|
--_title-font: var(--primitives-font-display-3-sm);
|
|
14175
14277
|
}
|
|
14176
14278
|
|
|
14177
|
-
@container layout-container (min-width: ${mdMin$
|
|
14279
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14178
14280
|
--_title-font: var(--primitives-font-display-3-md);
|
|
14179
14281
|
}
|
|
14180
14282
|
|
|
14181
|
-
@container layout-container (min-width: ${lgMin$
|
|
14283
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14182
14284
|
--_title-font: var(--primitives-font-display-3-lg);
|
|
14183
14285
|
}
|
|
14184
14286
|
|
|
@@ -14187,135 +14289,167 @@ var titleStyles = css`
|
|
|
14187
14289
|
}
|
|
14188
14290
|
|
|
14189
14291
|
:host([size="1"]) {
|
|
14190
|
-
@media (max-width: ${smMax$
|
|
14292
|
+
@media (max-width: ${smMax$16}) {
|
|
14191
14293
|
--_title-font: var(--primitives-font-display-1-sm);
|
|
14192
14294
|
}
|
|
14193
14295
|
|
|
14194
|
-
@media (min-width: ${mdMin$
|
|
14296
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14195
14297
|
--_title-font: var(--primitives-font-display-1-md);
|
|
14196
14298
|
}
|
|
14197
14299
|
|
|
14198
|
-
@media (min-width: ${lgMin$
|
|
14300
|
+
@media (min-width: ${lgMin$14}) {
|
|
14199
14301
|
--_title-font: var(--primitives-font-display-1-lg);
|
|
14200
14302
|
}
|
|
14201
14303
|
|
|
14202
|
-
@container layout-container (max-width: ${smMax$
|
|
14304
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14203
14305
|
--_title-font: var(--primitives-font-display-1-sm);
|
|
14204
14306
|
}
|
|
14205
14307
|
|
|
14206
|
-
@container layout-container (min-width: ${mdMin$
|
|
14308
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14207
14309
|
--_title-font: var(--primitives-font-display-1-md);
|
|
14208
14310
|
}
|
|
14209
14311
|
|
|
14210
|
-
@container layout-container (min-width: ${lgMin$
|
|
14312
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14211
14313
|
--_title-font: var(--primitives-font-display-1-lg);
|
|
14212
14314
|
}
|
|
14213
14315
|
}
|
|
14214
14316
|
|
|
14215
14317
|
:host([size="2"]) {
|
|
14216
|
-
@media (max-width: ${smMax$
|
|
14318
|
+
@media (max-width: ${smMax$16}) {
|
|
14217
14319
|
--_title-font: var(--primitives-font-display-2-sm);
|
|
14218
14320
|
}
|
|
14219
14321
|
|
|
14220
|
-
@media (min-width: ${mdMin$
|
|
14322
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14221
14323
|
--_title-font: var(--primitives-font-display-2-md);
|
|
14222
14324
|
}
|
|
14223
14325
|
|
|
14224
|
-
@media (min-width: ${lgMin$
|
|
14326
|
+
@media (min-width: ${lgMin$14}) {
|
|
14225
14327
|
--_title-font: var(--primitives-font-display-2-lg);
|
|
14226
14328
|
}
|
|
14227
14329
|
|
|
14228
|
-
@container layout-container (max-width: ${smMax$
|
|
14330
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14229
14331
|
--_title-font: var(--primitives-font-display-2-sm);
|
|
14230
14332
|
}
|
|
14231
14333
|
|
|
14232
|
-
@container layout-container (min-width: ${mdMin$
|
|
14334
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14233
14335
|
--_title-font: var(--primitives-font-display-2-md);
|
|
14234
14336
|
}
|
|
14235
14337
|
|
|
14236
|
-
@container layout-container (min-width: ${lgMin$
|
|
14338
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14237
14339
|
--_title-font: var(--primitives-font-display-2-lg);
|
|
14238
14340
|
}
|
|
14239
14341
|
}
|
|
14240
14342
|
|
|
14241
14343
|
:host([size="4"]) {
|
|
14242
|
-
@media (max-width: ${smMax$
|
|
14344
|
+
@media (max-width: ${smMax$16}) {
|
|
14243
14345
|
--_title-font: var(--primitives-font-display-4-sm);
|
|
14244
14346
|
}
|
|
14245
14347
|
|
|
14246
|
-
@media (min-width: ${mdMin$
|
|
14348
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14247
14349
|
--_title-font: var(--primitives-font-display-4-md);
|
|
14248
14350
|
}
|
|
14249
14351
|
|
|
14250
|
-
@media (min-width: ${lgMin$
|
|
14352
|
+
@media (min-width: ${lgMin$14}) {
|
|
14251
14353
|
--_title-font: var(--primitives-font-display-4-lg);
|
|
14252
14354
|
}
|
|
14253
14355
|
|
|
14254
|
-
@container layout-container (max-width: ${smMax$
|
|
14356
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14255
14357
|
--_title-font: var(--primitives-font-display-4-sm);
|
|
14256
14358
|
}
|
|
14257
14359
|
|
|
14258
|
-
@container layout-container (min-width: ${mdMin$
|
|
14360
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14259
14361
|
--_title-font: var(--primitives-font-display-4-md);
|
|
14260
14362
|
}
|
|
14261
14363
|
|
|
14262
|
-
@container layout-container (min-width: ${lgMin$
|
|
14364
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14263
14365
|
--_title-font: var(--primitives-font-display-4-lg);
|
|
14264
14366
|
}
|
|
14265
14367
|
}
|
|
14266
14368
|
|
|
14267
14369
|
:host([size="5"]) {
|
|
14268
|
-
@media (max-width: ${smMax$
|
|
14370
|
+
@media (max-width: ${smMax$16}) {
|
|
14269
14371
|
--_title-font: var(--primitives-font-display-5-sm);
|
|
14270
14372
|
}
|
|
14271
14373
|
|
|
14272
|
-
@media (min-width: ${mdMin$
|
|
14374
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14273
14375
|
--_title-font: var(--primitives-font-display-5-md);
|
|
14274
14376
|
}
|
|
14275
14377
|
|
|
14276
|
-
@media (min-width: ${lgMin$
|
|
14378
|
+
@media (min-width: ${lgMin$14}) {
|
|
14277
14379
|
--_title-font: var(--primitives-font-display-5-lg);
|
|
14278
14380
|
}
|
|
14279
14381
|
|
|
14280
|
-
@container layout-container (max-width: ${smMax$
|
|
14382
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14281
14383
|
--_title-font: var(--primitives-font-display-5-sm);
|
|
14282
14384
|
}
|
|
14283
14385
|
|
|
14284
|
-
@container layout-container (min-width: ${mdMin$
|
|
14386
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14285
14387
|
--_title-font: var(--primitives-font-display-5-md);
|
|
14286
14388
|
}
|
|
14287
14389
|
|
|
14288
|
-
@container layout-container (min-width: ${lgMin$
|
|
14390
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14289
14391
|
--_title-font: var(--primitives-font-display-5-lg);
|
|
14290
14392
|
}
|
|
14291
14393
|
}
|
|
14292
14394
|
|
|
14293
14395
|
:host([size="6"]) {
|
|
14294
|
-
@media (max-width: ${smMax$
|
|
14396
|
+
@media (max-width: ${smMax$16}) {
|
|
14295
14397
|
--_title-font: var(--primitives-font-display-6-sm);
|
|
14296
14398
|
}
|
|
14297
14399
|
|
|
14298
|
-
@media (min-width: ${mdMin$
|
|
14400
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14299
14401
|
--_title-font: var(--primitives-font-display-6-md);
|
|
14300
14402
|
}
|
|
14301
14403
|
|
|
14302
|
-
@media (min-width: ${lgMin$
|
|
14404
|
+
@media (min-width: ${lgMin$14}) {
|
|
14303
14405
|
--_title-font: var(--primitives-font-display-6-lg);
|
|
14304
14406
|
}
|
|
14305
14407
|
|
|
14306
|
-
@container layout-container (max-width: ${smMax$
|
|
14408
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14307
14409
|
--_title-font: var(--primitives-font-display-6-sm);
|
|
14308
14410
|
}
|
|
14309
14411
|
|
|
14310
|
-
@container layout-container (min-width: ${mdMin$
|
|
14412
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14311
14413
|
--_title-font: var(--primitives-font-display-6-md);
|
|
14312
14414
|
}
|
|
14313
14415
|
|
|
14314
|
-
@container layout-container (min-width: ${lgMin$
|
|
14416
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14315
14417
|
--_title-font: var(--primitives-font-display-6-lg);
|
|
14316
14418
|
}
|
|
14317
14419
|
}
|
|
14318
14420
|
|
|
14421
|
+
/* ## Custom size */
|
|
14422
|
+
|
|
14423
|
+
:host([data-sm-custom-size]) {
|
|
14424
|
+
@media (max-width: ${smMax$16}) {
|
|
14425
|
+
--_title-font: var(--_title-sm-custom-font);
|
|
14426
|
+
}
|
|
14427
|
+
|
|
14428
|
+
@container layout-container (max-width: ${smMax$16}) {
|
|
14429
|
+
--_title-font: var(--_title-sm-custom-font);
|
|
14430
|
+
}
|
|
14431
|
+
}
|
|
14432
|
+
|
|
14433
|
+
:host([data-md-custom-size]) {
|
|
14434
|
+
@media (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14435
|
+
--_title-font: var(--_title-md-custom-font);
|
|
14436
|
+
}
|
|
14437
|
+
|
|
14438
|
+
@container layout-container (min-width: ${mdMin$20}) and (max-width: ${mdMax$13}) {
|
|
14439
|
+
--_title-font: var(--_title-md-custom-font);
|
|
14440
|
+
}
|
|
14441
|
+
}
|
|
14442
|
+
|
|
14443
|
+
:host([data-lg-custom-size]) {
|
|
14444
|
+
@media (min-width: ${lgMin$14}) {
|
|
14445
|
+
--_title-font: var(--_title-lg-custom-font);
|
|
14446
|
+
}
|
|
14447
|
+
|
|
14448
|
+
@container layout-container (min-width: ${lgMin$14}) {
|
|
14449
|
+
--_title-font: var(--_title-lg-custom-font);
|
|
14450
|
+
}
|
|
14451
|
+
}
|
|
14452
|
+
|
|
14319
14453
|
:host([hidden]) {
|
|
14320
14454
|
display: none;
|
|
14321
14455
|
}
|
|
@@ -14489,6 +14623,9 @@ function titleTemplate(component) {
|
|
|
14489
14623
|
* @element nldd-title
|
|
14490
14624
|
*
|
|
14491
14625
|
* @attr {number} size - Visual size of the title: 1–6 (default: 3)
|
|
14626
|
+
* @attr {string} sm-custom-size - A size of your own at sm, any CSS length (e.g. '56px', '3.5rem', 'clamp(3rem, 8vw, 7rem)'), for a statement larger than size 1. A var() works when the variable holds a length; one that is not defined leaves the title without its size, the floor included. For headings use `size`; if a design does not fit the scale, raise it as an issue. Set per breakpoint on purpose: a breakpoint without one keeps the size from `size`, so a title made large for a wide screen never breaks a narrow one. Never smaller than size 1 at the same breakpoint: a smaller value shows as size 1, and a fixed length that is smaller says so in development (a relative value, such as vw, em or a percentage, is not checked there; the floor still holds). Takes the weight, typeface and line height of size 1. An invalid value falls back to `size`
|
|
14627
|
+
* @attr {string} md-custom-size - The same, at md
|
|
14628
|
+
* @attr {string} lg-custom-size - The same, at lg
|
|
14492
14629
|
* @attr {string} color - 'content' (the default) takes the system's own content
|
|
14493
14630
|
* colors. 'inherit' lets the title follow the text color of the surface
|
|
14494
14631
|
* instead (for colored areas such as the filled categories); overline and
|
|
@@ -14503,10 +14640,49 @@ function titleTemplate(component) {
|
|
|
14503
14640
|
* @slot supporting-text - Supporting text that is more than text. Takes the place of the supporting-text attribute.
|
|
14504
14641
|
* @slot end - Whatever belongs at the end of the title line: a button, a menu, a status badge, a version. Named for the position, not for a kind of content, because anything can sit there.
|
|
14505
14642
|
*/
|
|
14506
|
-
var _NLDDTitle
|
|
14643
|
+
var _NLDDTitle;
|
|
14644
|
+
var BREAKPOINTS = [
|
|
14645
|
+
"sm",
|
|
14646
|
+
"md",
|
|
14647
|
+
"lg"
|
|
14648
|
+
];
|
|
14649
|
+
/** The font size of size 1 per breakpoint: the floor of a custom size. */
|
|
14650
|
+
var SIZE_1_FONT_SIZE = {
|
|
14651
|
+
sm: "var(--primitives-font-size-700)",
|
|
14652
|
+
md: "var(--primitives-font-size-800)",
|
|
14653
|
+
lg: "var(--primitives-font-size-1000)"
|
|
14654
|
+
};
|
|
14655
|
+
/** Font-size values that are not a length: the CSS-wide keywords and the
|
|
14656
|
+
* absolute and relative size keywords. */
|
|
14657
|
+
var NOT_A_LENGTH = /* @__PURE__ */ new Set([
|
|
14658
|
+
"inherit",
|
|
14659
|
+
"initial",
|
|
14660
|
+
"unset",
|
|
14661
|
+
"revert",
|
|
14662
|
+
"revert-layer",
|
|
14663
|
+
"xx-small",
|
|
14664
|
+
"x-small",
|
|
14665
|
+
"small",
|
|
14666
|
+
"medium",
|
|
14667
|
+
"large",
|
|
14668
|
+
"x-large",
|
|
14669
|
+
"xx-large",
|
|
14670
|
+
"xxx-large",
|
|
14671
|
+
"larger",
|
|
14672
|
+
"smaller",
|
|
14673
|
+
"math"
|
|
14674
|
+
]);
|
|
14675
|
+
/** A length font-size takes. A keyword cannot go inside the max() that keeps the floor, so it would void the whole font. */
|
|
14676
|
+
function isFontSize(value) {
|
|
14677
|
+
return !NOT_A_LENGTH.has(value.toLowerCase()) && CSS.supports("font-size", value);
|
|
14678
|
+
}
|
|
14679
|
+
var NLDDTitle = (_NLDDTitle = class NLDDTitle extends LitElement {
|
|
14507
14680
|
constructor(..._args) {
|
|
14508
14681
|
super(..._args);
|
|
14509
14682
|
this.size = 3;
|
|
14683
|
+
this.smCustomSize = "";
|
|
14684
|
+
this.mdCustomSize = "";
|
|
14685
|
+
this.lgCustomSize = "";
|
|
14510
14686
|
this.color = "content";
|
|
14511
14687
|
this.text = "";
|
|
14512
14688
|
this.supportingText = "";
|
|
@@ -14522,17 +14698,81 @@ var _NLDDTitle = class NLDDTitle extends LitElement {
|
|
|
14522
14698
|
else if (slot.name === "supporting-text") this._hasSupportingTextSlotted = hasContent;
|
|
14523
14699
|
else this._hasDefaultSlotted = hasContent;
|
|
14524
14700
|
};
|
|
14701
|
+
this._customSizes = {};
|
|
14702
|
+
this._warned = /* @__PURE__ */ new Set();
|
|
14525
14703
|
}
|
|
14526
14704
|
firstUpdated() {}
|
|
14705
|
+
willUpdate(changed) {
|
|
14706
|
+
super.willUpdate(changed);
|
|
14707
|
+
if (!changed.has("smCustomSize") && !changed.has("mdCustomSize") && !changed.has("lgCustomSize")) return;
|
|
14708
|
+
if (typeof CSS === "undefined") return;
|
|
14709
|
+
const own = {
|
|
14710
|
+
sm: this.smCustomSize,
|
|
14711
|
+
md: this.mdCustomSize,
|
|
14712
|
+
lg: this.lgCustomSize
|
|
14713
|
+
};
|
|
14714
|
+
this._customSizes = {};
|
|
14715
|
+
for (const breakpoint of BREAKPOINTS) {
|
|
14716
|
+
const value = (own[breakpoint] || "").trim();
|
|
14717
|
+
const valid = value !== "" && isFontSize(value);
|
|
14718
|
+
if (valid) {
|
|
14719
|
+
this._customSizes[breakpoint] = value;
|
|
14720
|
+
this.style.setProperty(`--_title-${breakpoint}-custom-size`, value);
|
|
14721
|
+
} else this.style.removeProperty(`--_title-${breakpoint}-custom-size`);
|
|
14722
|
+
this.toggleAttribute(`data-${breakpoint}-custom-size`, valid);
|
|
14723
|
+
}
|
|
14724
|
+
}
|
|
14725
|
+
updated(changed) {
|
|
14726
|
+
super.updated(changed);
|
|
14727
|
+
}
|
|
14728
|
+
_warnOnce(key, message) {
|
|
14729
|
+
if (this._warned.has(key)) return;
|
|
14730
|
+
this._warned.add(key);
|
|
14731
|
+
console.warn(message, this);
|
|
14732
|
+
}
|
|
14733
|
+
/** DEV-only: says so when a custom size is smaller than size 1, which then shows instead. */
|
|
14734
|
+
_checkFloor(sizes) {
|
|
14735
|
+
if (!this.shadowRoot || Object.keys(sizes).length === 0) return;
|
|
14736
|
+
const probe = document.createElement("span");
|
|
14737
|
+
probe.style.position = "absolute";
|
|
14738
|
+
probe.style.visibility = "hidden";
|
|
14739
|
+
this.shadowRoot.append(probe);
|
|
14740
|
+
const px = (value) => {
|
|
14741
|
+
probe.style.fontSize = value;
|
|
14742
|
+
return parseFloat(getComputedStyle(probe).fontSize);
|
|
14743
|
+
};
|
|
14744
|
+
try {
|
|
14745
|
+
for (const [breakpoint, value] of Object.entries(sizes)) {
|
|
14746
|
+
if (/%|\d(?:v[whib]|vmin|vmax|cq[whib]|cqmin|cqmax|em|ex|ch|cap|ic|lh)\b/.test(value)) continue;
|
|
14747
|
+
if (px(value) < px(SIZE_1_FONT_SIZE[breakpoint]) - .5) this._warnOnce(`floor-${breakpoint}-${value}`, `<nldd-title>: custom size "${value}" is smaller than size 1 at ${breakpoint} and shows as size 1. Use size for headings up to size 1.`);
|
|
14748
|
+
}
|
|
14749
|
+
} finally {
|
|
14750
|
+
probe.remove();
|
|
14751
|
+
}
|
|
14752
|
+
}
|
|
14527
14753
|
render() {
|
|
14528
14754
|
return titleTemplate(this);
|
|
14529
14755
|
}
|
|
14530
|
-
};
|
|
14531
|
-
var NLDDTitle = (_NLDDTitle.styles = titleStyles, _NLDDTitle);
|
|
14756
|
+
}, _NLDDTitle.styles = titleStyles, _NLDDTitle);
|
|
14532
14757
|
__decorate([property({
|
|
14533
14758
|
type: Number,
|
|
14534
14759
|
reflect: true
|
|
14535
14760
|
})], NLDDTitle.prototype, "size", void 0);
|
|
14761
|
+
__decorate([property({
|
|
14762
|
+
reflect: true,
|
|
14763
|
+
attribute: "sm-custom-size",
|
|
14764
|
+
converter: reflectNonDefault("")
|
|
14765
|
+
})], NLDDTitle.prototype, "smCustomSize", void 0);
|
|
14766
|
+
__decorate([property({
|
|
14767
|
+
reflect: true,
|
|
14768
|
+
attribute: "md-custom-size",
|
|
14769
|
+
converter: reflectNonDefault("")
|
|
14770
|
+
})], NLDDTitle.prototype, "mdCustomSize", void 0);
|
|
14771
|
+
__decorate([property({
|
|
14772
|
+
reflect: true,
|
|
14773
|
+
attribute: "lg-custom-size",
|
|
14774
|
+
converter: reflectNonDefault("")
|
|
14775
|
+
})], NLDDTitle.prototype, "lgCustomSize", void 0);
|
|
14536
14776
|
__decorate([property({
|
|
14537
14777
|
reflect: true,
|
|
14538
14778
|
converter: reflectNonDefault("content")
|
|
@@ -14754,7 +14994,7 @@ var nlddTokenTranslations = {
|
|
|
14754
14994
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
14755
14995
|
* @attr {boolean} roving - Inside a roving-focus container (e.g. nldd-token-field): the host is the single tab stop, so the trailing control is not separately tabbable.
|
|
14756
14996
|
* @attr {boolean} expanded - Reflects whether the token's menu is open (control="menu"); managed by the token.
|
|
14757
|
-
* @attr {boolean} disabled - Disabled state
|
|
14997
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
14758
14998
|
*
|
|
14759
14999
|
* @slot - Token text
|
|
14760
15000
|
* @slot menu - An nldd-menu that the token opens from its menu button (control="menu").
|
|
@@ -15213,7 +15453,7 @@ var NLDDForm = class extends HTMLElement {
|
|
|
15213
15453
|
if (!customElements.get("nldd-form")) customElements.define("nldd-form", NLDDForm);
|
|
15214
15454
|
//#endregion
|
|
15215
15455
|
//#region src/components/forms/form-actions/form-actions.styles.ts
|
|
15216
|
-
var mdMin$
|
|
15456
|
+
var mdMin$19 = unsafeCSS(breakpoints.mdMin);
|
|
15217
15457
|
var formActionsStyles = css`
|
|
15218
15458
|
:host {
|
|
15219
15459
|
box-sizing: border-box;
|
|
@@ -15244,7 +15484,7 @@ var formActionsStyles = css`
|
|
|
15244
15484
|
:host([label-alignment="right"]) .form-actions,
|
|
15245
15485
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-actions,
|
|
15246
15486
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-actions {
|
|
15247
|
-
@container (min-width: ${mdMin$
|
|
15487
|
+
@container (min-width: ${mdMin$19}) {
|
|
15248
15488
|
flex-direction: row;
|
|
15249
15489
|
gap: var(--semantics-forms-columns-gap);
|
|
15250
15490
|
align-items: start;
|
|
@@ -15255,7 +15495,7 @@ var formActionsStyles = css`
|
|
|
15255
15495
|
:host([label-alignment="right"]) .form-actions::before,
|
|
15256
15496
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-actions::before,
|
|
15257
15497
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-actions::before {
|
|
15258
|
-
@container (min-width: ${mdMin$
|
|
15498
|
+
@container (min-width: ${mdMin$19}) {
|
|
15259
15499
|
content: '';
|
|
15260
15500
|
width: var(--semantics-forms-label-column-width);
|
|
15261
15501
|
flex-grow: 0;
|
|
@@ -15366,7 +15606,7 @@ function setOwnedAttribute(el, name, value, applied) {
|
|
|
15366
15606
|
}
|
|
15367
15607
|
//#endregion
|
|
15368
15608
|
//#region src/components/forms/form-field/form-field.styles.ts
|
|
15369
|
-
var mdMin$
|
|
15609
|
+
var mdMin$18 = unsafeCSS(breakpoints.mdMin);
|
|
15370
15610
|
var formFieldStyles = css`
|
|
15371
15611
|
:host {
|
|
15372
15612
|
box-sizing: border-box;
|
|
@@ -15403,7 +15643,7 @@ var formFieldStyles = css`
|
|
|
15403
15643
|
:host([label-alignment="right"]) .form-field,
|
|
15404
15644
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field,
|
|
15405
15645
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field {
|
|
15406
|
-
@container (min-width: ${mdMin$
|
|
15646
|
+
@container (min-width: ${mdMin$18}) {
|
|
15407
15647
|
flex-direction: row;
|
|
15408
15648
|
gap: var(--semantics-forms-columns-gap);
|
|
15409
15649
|
align-items: start;
|
|
@@ -15427,7 +15667,7 @@ var formFieldStyles = css`
|
|
|
15427
15667
|
:host([label-alignment="right"]) .form-field__header,
|
|
15428
15668
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__header,
|
|
15429
15669
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__header {
|
|
15430
|
-
@container (min-width: ${mdMin$
|
|
15670
|
+
@container (min-width: ${mdMin$18}) {
|
|
15431
15671
|
z-index: auto;
|
|
15432
15672
|
width: var(--semantics-forms-label-column-width);
|
|
15433
15673
|
min-height: var(--semantics-controls-md-min-size);
|
|
@@ -15439,7 +15679,7 @@ var formFieldStyles = css`
|
|
|
15439
15679
|
|
|
15440
15680
|
:host([label-alignment="right"]) .form-field__header,
|
|
15441
15681
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__header {
|
|
15442
|
-
@container (min-width: ${mdMin$
|
|
15682
|
+
@container (min-width: ${mdMin$18}) {
|
|
15443
15683
|
align-items: end;
|
|
15444
15684
|
text-align: right;
|
|
15445
15685
|
}
|
|
@@ -15447,7 +15687,7 @@ var formFieldStyles = css`
|
|
|
15447
15687
|
|
|
15448
15688
|
:host([label-alignment="left"]) .form-field__header,
|
|
15449
15689
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__header {
|
|
15450
|
-
@container (min-width: ${mdMin$
|
|
15690
|
+
@container (min-width: ${mdMin$18}) {
|
|
15451
15691
|
align-items: start;
|
|
15452
15692
|
text-align: left;
|
|
15453
15693
|
}
|
|
@@ -15461,7 +15701,7 @@ var formFieldStyles = css`
|
|
|
15461
15701
|
:host([label-alignment="right"]) .form-field__header.is-empty,
|
|
15462
15702
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__header.is-empty,
|
|
15463
15703
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__header.is-empty {
|
|
15464
|
-
@container (min-width: ${mdMin$
|
|
15704
|
+
@container (min-width: ${mdMin$18}) {
|
|
15465
15705
|
display: flex;
|
|
15466
15706
|
}
|
|
15467
15707
|
}
|
|
@@ -15482,7 +15722,7 @@ var formFieldStyles = css`
|
|
|
15482
15722
|
:host([label-alignment="right"]) .form-field__label,
|
|
15483
15723
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__label,
|
|
15484
15724
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__label {
|
|
15485
|
-
@container (min-width: ${mdMin$
|
|
15725
|
+
@container (min-width: ${mdMin$18}) {
|
|
15486
15726
|
display: flex;
|
|
15487
15727
|
flex-direction: column;
|
|
15488
15728
|
gap: var(--primitives-space-0);
|
|
@@ -15491,14 +15731,14 @@ var formFieldStyles = css`
|
|
|
15491
15731
|
|
|
15492
15732
|
:host([label-alignment="right"]) .form-field__label,
|
|
15493
15733
|
:host(:not([label-alignment])[form-label-alignment="right"]) .form-field__label {
|
|
15494
|
-
@container (min-width: ${mdMin$
|
|
15734
|
+
@container (min-width: ${mdMin$18}) {
|
|
15495
15735
|
align-items: end;
|
|
15496
15736
|
}
|
|
15497
15737
|
}
|
|
15498
15738
|
|
|
15499
15739
|
:host([label-alignment="left"]) .form-field__label,
|
|
15500
15740
|
:host(:not([label-alignment])[form-label-alignment="left"]) .form-field__label {
|
|
15501
|
-
@container (min-width: ${mdMin$
|
|
15741
|
+
@container (min-width: ${mdMin$18}) {
|
|
15502
15742
|
align-items: start;
|
|
15503
15743
|
}
|
|
15504
15744
|
}
|
|
@@ -17322,7 +17562,7 @@ var historyField_ = /*@__PURE__*/ StateField.define({
|
|
|
17322
17562
|
/**
|
|
17323
17563
|
Create a history extension with the given configuration.
|
|
17324
17564
|
*/
|
|
17325
|
-
function history(config = {}) {
|
|
17565
|
+
function history$1(config = {}) {
|
|
17326
17566
|
return [
|
|
17327
17567
|
historyField_,
|
|
17328
17568
|
historyConfig.of(config),
|
|
@@ -19019,7 +19259,7 @@ var _NLDDCodeEditor = class NLDDCodeEditor extends DescribedBy(FormAssociated(NL
|
|
|
19019
19259
|
buildExtensions() {
|
|
19020
19260
|
return [
|
|
19021
19261
|
nlddCodeMirrorTheme,
|
|
19022
|
-
history(),
|
|
19262
|
+
history$1(),
|
|
19023
19263
|
drawSelection(),
|
|
19024
19264
|
keymap.of([...defaultKeymap, ...historyKeymap]),
|
|
19025
19265
|
this._placeholderCompartment.of(this._placeholderExtension()),
|
|
@@ -20168,7 +20408,7 @@ function resolveDateBound(raw, today = /* @__PURE__ */ new Date()) {
|
|
|
20168
20408
|
}
|
|
20169
20409
|
//#endregion
|
|
20170
20410
|
//#region src/components/inputs/date-field/date-field.styles.ts
|
|
20171
|
-
var mdMin$
|
|
20411
|
+
var mdMin$17 = unsafeCSS(breakpoints.mdMin);
|
|
20172
20412
|
var dateFieldStyles = css`
|
|
20173
20413
|
:host {
|
|
20174
20414
|
box-sizing: border-box;
|
|
@@ -20416,7 +20656,7 @@ var dateFieldStyles = css`
|
|
|
20416
20656
|
|
|
20417
20657
|
/* The sheet's title bar only makes sense on a small screen, where the popover
|
|
20418
20658
|
becomes a bottom sheet. It shows by default and is hidden from md up. */
|
|
20419
|
-
@media (min-width: ${mdMin$
|
|
20659
|
+
@media (min-width: ${mdMin$17}) {
|
|
20420
20660
|
.date-field__picker-button nldd-top-title-bar {
|
|
20421
20661
|
display: none;
|
|
20422
20662
|
}
|
|
@@ -23029,6 +23269,12 @@ function dropdownTemplate(component) {
|
|
|
23029
23269
|
* and keyboard navigation, including `<optgroup>`, `data-*` attributes and
|
|
23030
23270
|
* dynamic changes to options.
|
|
23031
23271
|
*
|
|
23272
|
+
* A dropdown hides its options, so it is the last resort for a choice from a
|
|
23273
|
+
* fixed set. Show a handful of options with nldd-segmented-control,
|
|
23274
|
+
* nldd-toggle-button-group or nldd-radio-button-group, and let the user type
|
|
23275
|
+
* in nldd-combo-box when there are many, a list of countries included. The
|
|
23276
|
+
* design guidelines explain the order.
|
|
23277
|
+
*
|
|
23032
23278
|
* @element nldd-dropdown
|
|
23033
23279
|
* @attr {string} size - Size: 'xs' | 'sm' | 'md' (default: 'md')
|
|
23034
23280
|
* @attr {boolean} valid - Marks the field as valid
|
|
@@ -33681,7 +33927,7 @@ var _NLDDTextEditor = class NLDDTextEditor extends DescribedBy(FormAssociated(NL
|
|
|
33681
33927
|
quote
|
|
33682
33928
|
})),
|
|
33683
33929
|
Prec.highest(linkOpenBadge((url) => this._t("components.text-editor.open-in-new-tab-label", { url }))),
|
|
33684
|
-
this._historyCompartment.of(history()),
|
|
33930
|
+
this._historyCompartment.of(history$1()),
|
|
33685
33931
|
drawSelection(),
|
|
33686
33932
|
stableCursor,
|
|
33687
33933
|
dropCursor(),
|
|
@@ -33969,7 +34215,7 @@ var _NLDDTextEditor = class NLDDTextEditor extends DescribedBy(FormAssociated(NL
|
|
|
33969
34215
|
const view = this.view;
|
|
33970
34216
|
if (!view) return;
|
|
33971
34217
|
view.dispatch({ effects: this._historyCompartment.reconfigure([]) });
|
|
33972
|
-
view.dispatch({ effects: this._historyCompartment.reconfigure(history()) });
|
|
34218
|
+
view.dispatch({ effects: this._historyCompartment.reconfigure(history$1()) });
|
|
33973
34219
|
this._emitState();
|
|
33974
34220
|
}
|
|
33975
34221
|
/** The annotations lying fully inside the current selection, offset relative to
|
|
@@ -34834,7 +35080,7 @@ __decorate([property({
|
|
|
34834
35080
|
NLDDTextField = __decorate([customElement("nldd-text-field")], NLDDTextField);
|
|
34835
35081
|
//#endregion
|
|
34836
35082
|
//#region src/components/inputs/time-field/time-field.styles.ts
|
|
34837
|
-
var mdMin$
|
|
35083
|
+
var mdMin$16 = unsafeCSS(breakpoints.mdMin);
|
|
34838
35084
|
var timeFieldStyles = css`
|
|
34839
35085
|
:host {
|
|
34840
35086
|
box-sizing: border-box;
|
|
@@ -35028,7 +35274,7 @@ var timeFieldStyles = css`
|
|
|
35028
35274
|
}
|
|
35029
35275
|
|
|
35030
35276
|
|
|
35031
|
-
@media (min-width: ${mdMin$
|
|
35277
|
+
@media (min-width: ${mdMin$16}) {
|
|
35032
35278
|
.time-field__picker-button nldd-top-title-bar {
|
|
35033
35279
|
display: none;
|
|
35034
35280
|
}
|
|
@@ -35036,10 +35282,10 @@ var timeFieldStyles = css`
|
|
|
35036
35282
|
`;
|
|
35037
35283
|
//#endregion
|
|
35038
35284
|
//#region src/components/layout/spacer/spacer.styles.ts
|
|
35039
|
-
var smMax$
|
|
35040
|
-
var mdMin$
|
|
35041
|
-
var mdMax$
|
|
35042
|
-
var lgMin$
|
|
35285
|
+
var smMax$15 = unsafeCSS(breakpoints.smMax);
|
|
35286
|
+
var mdMin$15 = unsafeCSS(breakpoints.mdMin);
|
|
35287
|
+
var mdMax$12 = unsafeCSS(breakpoints.mdMax);
|
|
35288
|
+
var lgMin$13 = unsafeCSS(breakpoints.lgMin);
|
|
35043
35289
|
var spacerStyles = css`
|
|
35044
35290
|
:host {
|
|
35045
35291
|
box-sizing: border-box;
|
|
@@ -35125,7 +35371,7 @@ var spacerStyles = css`
|
|
|
35125
35371
|
|
|
35126
35372
|
/* ## sm: max-width 640px */
|
|
35127
35373
|
|
|
35128
|
-
@media (max-width: ${smMax$
|
|
35374
|
+
@media (max-width: ${smMax$15}) {
|
|
35129
35375
|
:host([sm-size="2"]) { --_spacer-size: var(--primitives-space-2); }
|
|
35130
35376
|
:host([sm-size="4"]) { --_spacer-size: var(--primitives-space-4); }
|
|
35131
35377
|
:host([sm-size="6"]) { --_spacer-size: var(--primitives-space-6); }
|
|
@@ -35166,7 +35412,7 @@ var spacerStyles = css`
|
|
|
35166
35412
|
|
|
35167
35413
|
/* ## md: 641px–1007px */
|
|
35168
35414
|
|
|
35169
|
-
@media (min-width: ${mdMin$
|
|
35415
|
+
@media (min-width: ${mdMin$15}) and (max-width: ${mdMax$12}) {
|
|
35170
35416
|
:host([md-size="2"]) { --_spacer-size: var(--primitives-space-2); }
|
|
35171
35417
|
:host([md-size="4"]) { --_spacer-size: var(--primitives-space-4); }
|
|
35172
35418
|
:host([md-size="6"]) { --_spacer-size: var(--primitives-space-6); }
|
|
@@ -35207,7 +35453,7 @@ var spacerStyles = css`
|
|
|
35207
35453
|
|
|
35208
35454
|
/* ## lg: min-width 1008px */
|
|
35209
35455
|
|
|
35210
|
-
@media (min-width: ${lgMin$
|
|
35456
|
+
@media (min-width: ${lgMin$13}) {
|
|
35211
35457
|
:host([lg-size="2"]) { --_spacer-size: var(--primitives-space-2); }
|
|
35212
35458
|
:host([lg-size="4"]) { --_spacer-size: var(--primitives-space-4); }
|
|
35213
35459
|
:host([lg-size="6"]) { --_spacer-size: var(--primitives-space-6); }
|
|
@@ -39293,10 +39539,10 @@ __decorate([state()], NLDDBarSplitView.prototype, "_currentBreakpoint", void 0);
|
|
|
39293
39539
|
NLDDBarSplitView = __decorate([customElement("nldd-bar-split-view")], NLDDBarSplitView);
|
|
39294
39540
|
//#endregion
|
|
39295
39541
|
//#region src/components/layout/split-views/navigation-split-view/navigation-split-view.styles.ts
|
|
39296
|
-
var smMax$
|
|
39297
|
-
var mdMin$
|
|
39298
|
-
var mdMax$
|
|
39299
|
-
var lgMin$
|
|
39542
|
+
var smMax$14 = unsafeCSS(breakpoints.smMax);
|
|
39543
|
+
var mdMin$14 = unsafeCSS(breakpoints.mdMin);
|
|
39544
|
+
var mdMax$11 = unsafeCSS(breakpoints.mdMax);
|
|
39545
|
+
var lgMin$12 = unsafeCSS(breakpoints.lgMin);
|
|
39300
39546
|
var navigationSplitViewStyles = css`
|
|
39301
39547
|
:host {
|
|
39302
39548
|
box-sizing: border-box;
|
|
@@ -39478,7 +39724,7 @@ var navigationSplitViewStyles = css`
|
|
|
39478
39724
|
padding: 0;
|
|
39479
39725
|
flex-direction: column;
|
|
39480
39726
|
|
|
39481
|
-
@media (max-width: ${smMax$
|
|
39727
|
+
@media (max-width: ${smMax$14}) {
|
|
39482
39728
|
inset: auto 0 0 0;
|
|
39483
39729
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
39484
39730
|
width: 100%;
|
|
@@ -39487,14 +39733,14 @@ var navigationSplitViewStyles = css`
|
|
|
39487
39733
|
max-height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
39488
39734
|
}
|
|
39489
39735
|
|
|
39490
|
-
@media (min-width: ${mdMin$
|
|
39736
|
+
@media (min-width: ${mdMin$14}) and (max-width: ${mdMax$11}) {
|
|
39491
39737
|
inset: var(--semantics-overlays-inset) var(--semantics-overlays-inset) var(--semantics-overlays-inset) auto;
|
|
39492
39738
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39493
39739
|
width: var(--semantics-sheets-side-md-width);
|
|
39494
39740
|
height: calc(100dvh - var(--semantics-overlays-inset) * 2);
|
|
39495
39741
|
}
|
|
39496
39742
|
|
|
39497
|
-
@media (min-width: ${lgMin$
|
|
39743
|
+
@media (min-width: ${lgMin$12}) {
|
|
39498
39744
|
inset: var(--semantics-overlays-inset) var(--semantics-overlays-inset) var(--semantics-overlays-inset) auto;
|
|
39499
39745
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39500
39746
|
width: var(--semantics-sheets-side-lg-width);
|
|
@@ -39516,21 +39762,21 @@ var navigationSplitViewStyles = css`
|
|
|
39516
39762
|
}
|
|
39517
39763
|
|
|
39518
39764
|
&[open] {
|
|
39519
|
-
@media (max-width: ${smMax$
|
|
39765
|
+
@media (max-width: ${smMax$14}) {
|
|
39520
39766
|
animation: navigation-split-view-slide-in-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39521
39767
|
}
|
|
39522
39768
|
|
|
39523
|
-
@media (min-width: ${mdMin$
|
|
39769
|
+
@media (min-width: ${mdMin$14}) {
|
|
39524
39770
|
animation: navigation-split-view-inspector-slide-in var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39525
39771
|
}
|
|
39526
39772
|
}
|
|
39527
39773
|
|
|
39528
39774
|
&.is-closing {
|
|
39529
|
-
@media (max-width: ${smMax$
|
|
39775
|
+
@media (max-width: ${smMax$14}) {
|
|
39530
39776
|
animation: navigation-split-view-slide-out-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39531
39777
|
}
|
|
39532
39778
|
|
|
39533
|
-
@media (min-width: ${mdMin$
|
|
39779
|
+
@media (min-width: ${mdMin$14}) {
|
|
39534
39780
|
animation: navigation-split-view-inspector-slide-out var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39535
39781
|
}
|
|
39536
39782
|
}
|
|
@@ -39556,7 +39802,7 @@ var navigationSplitViewStyles = css`
|
|
|
39556
39802
|
padding: 0;
|
|
39557
39803
|
flex-direction: column;
|
|
39558
39804
|
|
|
39559
|
-
@media (max-width: ${smMax$
|
|
39805
|
+
@media (max-width: ${smMax$14}) {
|
|
39560
39806
|
inset: auto 0 0 0;
|
|
39561
39807
|
border-radius: var(--semantics-overlays-corner-radius) var(--semantics-overlays-corner-radius) 0 0;
|
|
39562
39808
|
width: 100%;
|
|
@@ -39565,14 +39811,14 @@ var navigationSplitViewStyles = css`
|
|
|
39565
39811
|
max-height: calc(100dvh - var(--semantics-sheets-bottom-top-inset));
|
|
39566
39812
|
}
|
|
39567
39813
|
|
|
39568
|
-
@media (min-width: ${mdMin$
|
|
39814
|
+
@media (min-width: ${mdMin$14}) and (max-width: ${mdMax$11}) {
|
|
39569
39815
|
inset: var(--semantics-overlays-inset) auto var(--semantics-overlays-inset) var(--semantics-overlays-inset);
|
|
39570
39816
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39571
39817
|
width: var(--semantics-sheets-side-md-width);
|
|
39572
39818
|
height: calc(100dvh - var(--semantics-overlays-inset) * 2);
|
|
39573
39819
|
}
|
|
39574
39820
|
|
|
39575
|
-
@media (min-width: ${lgMin$
|
|
39821
|
+
@media (min-width: ${lgMin$12}) {
|
|
39576
39822
|
inset: var(--semantics-overlays-inset) auto var(--semantics-overlays-inset) var(--semantics-overlays-inset);
|
|
39577
39823
|
border-radius: var(--semantics-overlays-corner-radius);
|
|
39578
39824
|
width: var(--semantics-sheets-side-lg-width);
|
|
@@ -39594,21 +39840,21 @@ var navigationSplitViewStyles = css`
|
|
|
39594
39840
|
}
|
|
39595
39841
|
|
|
39596
39842
|
&[open] {
|
|
39597
|
-
@media (max-width: ${smMax$
|
|
39843
|
+
@media (max-width: ${smMax$14}) {
|
|
39598
39844
|
animation: navigation-split-view-slide-in-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39599
39845
|
}
|
|
39600
39846
|
|
|
39601
|
-
@media (min-width: ${mdMin$
|
|
39847
|
+
@media (min-width: ${mdMin$14}) {
|
|
39602
39848
|
animation: navigation-split-view-primary-sidebar-slide-in var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39603
39849
|
}
|
|
39604
39850
|
}
|
|
39605
39851
|
|
|
39606
39852
|
&.is-closing {
|
|
39607
|
-
@media (max-width: ${smMax$
|
|
39853
|
+
@media (max-width: ${smMax$14}) {
|
|
39608
39854
|
animation: navigation-split-view-slide-out-bottom var(--semantics-sheets-bottom-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39609
39855
|
}
|
|
39610
39856
|
|
|
39611
|
-
@media (min-width: ${mdMin$
|
|
39857
|
+
@media (min-width: ${mdMin$14}) {
|
|
39612
39858
|
animation: navigation-split-view-primary-sidebar-slide-out var(--semantics-sheets-side-animation-duration) var(--primitives-transition-easing-default) both;
|
|
39613
39859
|
}
|
|
39614
39860
|
}
|
|
@@ -39648,7 +39894,7 @@ var navigationSplitViewStyles = css`
|
|
|
39648
39894
|
definite height and the zero basis never surfaces, which is why this only
|
|
39649
39895
|
shows below 641px. The dialog's max-height still caps a long sheet;
|
|
39650
39896
|
flex-shrink then hands the overflow to the pane's own scroll container. */
|
|
39651
|
-
@media (max-width: ${smMax$
|
|
39897
|
+
@media (max-width: ${smMax$14}) {
|
|
39652
39898
|
.navigation-split-view__primary-sidebar-sheet-body slot::slotted(*),
|
|
39653
39899
|
.navigation-split-view__inspector-sheet-body slot::slotted(*) {
|
|
39654
39900
|
flex-basis: auto;
|
|
@@ -40501,7 +40747,7 @@ __decorate([state()], NLDDStackedSplitView.prototype, "_visiblePanes", void 0);
|
|
|
40501
40747
|
NLDDStackedSplitView = __decorate([customElement("nldd-stacked-split-view")], NLDDStackedSplitView);
|
|
40502
40748
|
//#endregion
|
|
40503
40749
|
//#region src/components/layout/split-views/split-view-pane/split-view-pane.styles.ts
|
|
40504
|
-
var mdMin$
|
|
40750
|
+
var mdMin$13 = unsafeCSS(breakpoints.mdMin);
|
|
40505
40751
|
var splitViewPaneStyles = css`
|
|
40506
40752
|
:host {
|
|
40507
40753
|
box-sizing: border-box;
|
|
@@ -40517,7 +40763,7 @@ var splitViewPaneStyles = css`
|
|
|
40517
40763
|
width: 100%;
|
|
40518
40764
|
height: 100%;
|
|
40519
40765
|
|
|
40520
|
-
@media (min-width: ${mdMin$
|
|
40766
|
+
@media (min-width: ${mdMin$13}) {
|
|
40521
40767
|
background-color: var(--_split-view-pane-background-color);
|
|
40522
40768
|
}
|
|
40523
40769
|
}
|
|
@@ -41476,10 +41722,10 @@ function PageSectionMixin(Base) {
|
|
|
41476
41722
|
}
|
|
41477
41723
|
//#endregion
|
|
41478
41724
|
//#region src/components/layout/page-sections/simple-section/simple-section.styles.ts
|
|
41479
|
-
var smMax$
|
|
41480
|
-
var mdMin$
|
|
41481
|
-
var mdMax$
|
|
41482
|
-
var lgMin$
|
|
41725
|
+
var smMax$13 = unsafeCSS(breakpoints.smMax);
|
|
41726
|
+
var mdMin$12 = unsafeCSS(breakpoints.mdMin);
|
|
41727
|
+
var mdMax$10 = unsafeCSS(breakpoints.mdMax);
|
|
41728
|
+
var lgMin$11 = unsafeCSS(breakpoints.lgMin);
|
|
41483
41729
|
var simpleSectionStyles = css`
|
|
41484
41730
|
:host {
|
|
41485
41731
|
box-sizing: border-box;
|
|
@@ -41553,19 +41799,19 @@ var simpleSectionStyles = css`
|
|
|
41553
41799
|
align-items: center;
|
|
41554
41800
|
|
|
41555
41801
|
|
|
41556
|
-
@container (max-width: ${smMax$
|
|
41802
|
+
@container (max-width: ${smMax$13}) {
|
|
41557
41803
|
padding-inline: var(--semantics-page-sections-sm-margin-inline);
|
|
41558
41804
|
padding-top: var(--_simple-section-sm-padding-top, var(--_simple-section-padding-top, var(--semantics-page-sections-sm-margin-block)));
|
|
41559
41805
|
padding-bottom: var(--_simple-section-sm-padding-bottom, var(--_simple-section-padding-bottom, var(--semantics-page-sections-sm-margin-block)));
|
|
41560
41806
|
}
|
|
41561
41807
|
|
|
41562
|
-
@container (min-width: ${mdMin$
|
|
41808
|
+
@container (min-width: ${mdMin$12}) and (max-width: ${mdMax$10}) {
|
|
41563
41809
|
padding-inline: var(--semantics-page-sections-md-margin-inline);
|
|
41564
41810
|
padding-top: var(--_simple-section-md-padding-top, var(--_simple-section-padding-top, var(--semantics-page-sections-md-margin-block)));
|
|
41565
41811
|
padding-bottom: var(--_simple-section-md-padding-bottom, var(--_simple-section-padding-bottom, var(--semantics-page-sections-md-margin-block)));
|
|
41566
41812
|
}
|
|
41567
41813
|
|
|
41568
|
-
@container (min-width: ${lgMin$
|
|
41814
|
+
@container (min-width: ${lgMin$11}) {
|
|
41569
41815
|
padding-inline: var(--semantics-page-sections-lg-margin-inline);
|
|
41570
41816
|
padding-top: var(--_simple-section-lg-padding-top, var(--_simple-section-padding-top, var(--semantics-page-sections-lg-margin-block)));
|
|
41571
41817
|
padding-bottom: var(--_simple-section-lg-padding-bottom, var(--_simple-section-padding-bottom, var(--semantics-page-sections-lg-margin-block)));
|
|
@@ -41582,15 +41828,15 @@ var simpleSectionStyles = css`
|
|
|
41582
41828
|
flex-direction: column;
|
|
41583
41829
|
flex-grow: 1;
|
|
41584
41830
|
|
|
41585
|
-
@container (max-width: ${smMax$
|
|
41831
|
+
@container (max-width: ${smMax$13}) {
|
|
41586
41832
|
gap: var(--semantics-page-sections-sm-gap);
|
|
41587
41833
|
}
|
|
41588
41834
|
|
|
41589
|
-
@container (min-width: ${mdMin$
|
|
41835
|
+
@container (min-width: ${mdMin$12}) and (max-width: ${mdMax$10}) {
|
|
41590
41836
|
gap: var(--semantics-page-sections-md-gap);
|
|
41591
41837
|
}
|
|
41592
41838
|
|
|
41593
|
-
@container (min-width: ${lgMin$
|
|
41839
|
+
@container (min-width: ${lgMin$11}) {
|
|
41594
41840
|
gap: var(--semantics-page-sections-lg-gap);
|
|
41595
41841
|
}
|
|
41596
41842
|
}
|
|
@@ -41710,10 +41956,10 @@ __decorate([property({
|
|
|
41710
41956
|
NLDDSimpleSection = __decorate([customElement("nldd-simple-section")], NLDDSimpleSection);
|
|
41711
41957
|
//#endregion
|
|
41712
41958
|
//#region src/components/layout/page-sections/hero/hero.styles.ts
|
|
41713
|
-
var smMax$
|
|
41714
|
-
var mdMin$
|
|
41715
|
-
var mdMax$
|
|
41716
|
-
var lgMin$
|
|
41959
|
+
var smMax$12 = unsafeCSS(breakpoints.smMax);
|
|
41960
|
+
var mdMin$11 = unsafeCSS(breakpoints.mdMin);
|
|
41961
|
+
var mdMax$9 = unsafeCSS(breakpoints.mdMax);
|
|
41962
|
+
var lgMin$10 = unsafeCSS(breakpoints.lgMin);
|
|
41717
41963
|
var heroStyles = css`
|
|
41718
41964
|
:host {
|
|
41719
41965
|
box-sizing: border-box;
|
|
@@ -41881,13 +42127,13 @@ var heroStyles = css`
|
|
|
41881
42127
|
inside :host would match an ancestor container, while these must query
|
|
41882
42128
|
the host's own inline size. */
|
|
41883
42129
|
|
|
41884
|
-
@container (max-width: ${smMax$
|
|
42130
|
+
@container (max-width: ${smMax$12}) {
|
|
41885
42131
|
padding-inline: var(--semantics-page-sections-sm-margin-inline);
|
|
41886
42132
|
padding-top: var(--_hero-sm-padding-top, var(--_hero-padding-top, calc(var(--semantics-page-sections-sm-margin-block) / 2)));
|
|
41887
42133
|
padding-bottom: var(--_hero-sm-padding-bottom, var(--_hero-padding-bottom, var(--semantics-page-sections-sm-margin-block)));
|
|
41888
42134
|
}
|
|
41889
42135
|
|
|
41890
|
-
@container (min-width: ${mdMin$
|
|
42136
|
+
@container (min-width: ${mdMin$11}) and (max-width: ${mdMax$9}) {
|
|
41891
42137
|
--_hero-main-padding: var(--primitives-space-24);
|
|
41892
42138
|
--_hero-main-inset: var(--semantics-page-sections-md-gap);
|
|
41893
42139
|
--_hero-default-overlap-size: var(--primitives-area-160);
|
|
@@ -41897,7 +42143,7 @@ var heroStyles = css`
|
|
|
41897
42143
|
padding-bottom: var(--_hero-md-padding-bottom, var(--_hero-padding-bottom, var(--semantics-page-sections-md-margin-block)));
|
|
41898
42144
|
}
|
|
41899
42145
|
|
|
41900
|
-
@container (min-width: ${lgMin$
|
|
42146
|
+
@container (min-width: ${lgMin$10}) {
|
|
41901
42147
|
--_hero-main-padding: var(--primitives-space-32);
|
|
41902
42148
|
--_hero-main-inset: var(--semantics-page-sections-lg-gap);
|
|
41903
42149
|
--_hero-default-overlap-size: var(--primitives-area-160);
|
|
@@ -41942,7 +42188,7 @@ var heroStyles = css`
|
|
|
41942
42188
|
rather than rigidly tied to the width. align-self: start stops the
|
|
41943
42189
|
stretch fit from cancelling the ratio. */
|
|
41944
42190
|
:host([data-has-media]) .hero__body::before {
|
|
41945
|
-
@container (min-width: ${mdMin$
|
|
42191
|
+
@container (min-width: ${mdMin$11}) {
|
|
41946
42192
|
content: '';
|
|
41947
42193
|
height: var(--_hero-media-height);
|
|
41948
42194
|
aspect-ratio: var(--_hero-media-aspect-ratio);
|
|
@@ -42030,7 +42276,7 @@ var heroStyles = css`
|
|
|
42030
42276
|
}
|
|
42031
42277
|
|
|
42032
42278
|
:host([data-has-media][data-main-width-length]) .hero__main {
|
|
42033
|
-
@container (min-width: ${mdMin$
|
|
42279
|
+
@container (min-width: ${mdMin$11}) {
|
|
42034
42280
|
width: var(--_hero-main-width);
|
|
42035
42281
|
min-width: 0;
|
|
42036
42282
|
max-width: calc(100% - 2 * var(--_hero-main-inset));
|
|
@@ -42084,7 +42330,7 @@ var heroStyles = css`
|
|
|
42084
42330
|
/* # Overlap (md+) — the media keeps a fixed height; the panel sits in the
|
|
42085
42331
|
row below it, pulled up over it by the overlap size. */
|
|
42086
42332
|
|
|
42087
|
-
@container (min-width: ${mdMin$
|
|
42333
|
+
@container (min-width: ${mdMin$11}) {
|
|
42088
42334
|
:host([data-has-media]:not([layout="contained"])) .hero__body::before {
|
|
42089
42335
|
content: none;
|
|
42090
42336
|
}
|
|
@@ -42114,7 +42360,7 @@ var heroStyles = css`
|
|
|
42114
42360
|
/* # Mobile — the media on top, the panel below it, indented and overlapping
|
|
42115
42361
|
it a little. */
|
|
42116
42362
|
|
|
42117
|
-
@container (max-width: ${smMax$
|
|
42363
|
+
@container (max-width: ${smMax$12}) {
|
|
42118
42364
|
.hero__body {
|
|
42119
42365
|
display: flex;
|
|
42120
42366
|
flex-direction: column;
|
|
@@ -42172,16 +42418,244 @@ function heroTemplate(component) {
|
|
|
42172
42418
|
`;
|
|
42173
42419
|
}
|
|
42174
42420
|
//#endregion
|
|
42421
|
+
//#region src/components/layout/page-sections/hero/hero-corner.styles.ts
|
|
42422
|
+
var smMax$11 = unsafeCSS(breakpoints.smMax);
|
|
42423
|
+
var mdMin$10 = unsafeCSS(breakpoints.mdMin);
|
|
42424
|
+
var mdMax$8 = unsafeCSS(breakpoints.mdMax);
|
|
42425
|
+
var lgMin$9 = unsafeCSS(breakpoints.lgMin);
|
|
42426
|
+
var heroCornerStyles = css`
|
|
42427
|
+
|
|
42428
|
+
|
|
42429
|
+
/* # Corner */
|
|
42430
|
+
|
|
42431
|
+
:host([data-media-corner]) {
|
|
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;
|
|
42435
|
+
}
|
|
42436
|
+
|
|
42437
|
+
/* On .hero, not :host: a var() resolves where it is declared, so on :host
|
|
42438
|
+
this would halve the sm radius at every breakpoint. */
|
|
42439
|
+
:host([data-media-corner]) .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);
|
|
42442
|
+
|
|
42443
|
+
@container (min-width: ${mdMin$10}) and (max-width: ${mdMax$8}) {
|
|
42444
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-md-width) * 2);
|
|
42445
|
+
}
|
|
42446
|
+
|
|
42447
|
+
@container (min-width: ${lgMin$9}) {
|
|
42448
|
+
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-lg-width) * 2);
|
|
42449
|
+
}
|
|
42450
|
+
}
|
|
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
|
+
|
|
42456
|
+
/* ## Contained */
|
|
42457
|
+
|
|
42458
|
+
:host([data-media-corner][data-has-media]) .hero {
|
|
42459
|
+
@container (min-width: ${mdMin$10}) {
|
|
42460
|
+
--_hero-main-inset: var(--primitives-space-0);
|
|
42461
|
+
}
|
|
42462
|
+
}
|
|
42463
|
+
|
|
42464
|
+
:host([data-has-media]:is([data-main-corner="top-left"], [data-main-corner="top-right"])) .hero__main {
|
|
42465
|
+
@container (min-width: ${mdMin$10}) {
|
|
42466
|
+
margin-top: var(--_hero-corner-radius);
|
|
42467
|
+
}
|
|
42468
|
+
}
|
|
42469
|
+
|
|
42470
|
+
:host([data-has-media]:is([data-main-corner="bottom-left"], [data-main-corner="bottom-right"])) .hero__main {
|
|
42471
|
+
@container (min-width: ${mdMin$10}) {
|
|
42472
|
+
margin-bottom: var(--_hero-corner-radius);
|
|
42473
|
+
}
|
|
42474
|
+
}
|
|
42475
|
+
|
|
42476
|
+
/* ## Media */
|
|
42477
|
+
|
|
42478
|
+
:host([data-has-media][data-media-corner="top-left"]) .hero__media {
|
|
42479
|
+
border-top-left-radius: var(--_hero-media-corner-radius);
|
|
42480
|
+
}
|
|
42481
|
+
|
|
42482
|
+
:host([data-has-media][data-media-corner="top-right"]) .hero__media {
|
|
42483
|
+
border-top-right-radius: var(--_hero-media-corner-radius);
|
|
42484
|
+
}
|
|
42485
|
+
|
|
42486
|
+
:host([data-has-media][data-media-corner="bottom-left"]) .hero__media {
|
|
42487
|
+
@container (min-width: ${mdMin$10}) {
|
|
42488
|
+
border-bottom-left-radius: var(--_hero-media-corner-radius);
|
|
42489
|
+
}
|
|
42490
|
+
|
|
42491
|
+
@container (max-width: ${smMax$11}) {
|
|
42492
|
+
border-top-left-radius: var(--_hero-media-corner-radius);
|
|
42493
|
+
}
|
|
42494
|
+
}
|
|
42495
|
+
|
|
42496
|
+
:host([data-has-media][data-media-corner="bottom-right"]) .hero__media {
|
|
42497
|
+
@container (min-width: ${mdMin$10}) {
|
|
42498
|
+
border-bottom-right-radius: var(--_hero-media-corner-radius);
|
|
42499
|
+
}
|
|
42500
|
+
|
|
42501
|
+
@container (max-width: ${smMax$11}) {
|
|
42502
|
+
border-top-right-radius: var(--_hero-media-corner-radius);
|
|
42503
|
+
}
|
|
42504
|
+
}
|
|
42505
|
+
|
|
42506
|
+
/* ## Main */
|
|
42507
|
+
|
|
42508
|
+
:host([data-main-corner="top-left"]) .hero__main {
|
|
42509
|
+
@container (min-width: ${mdMin$10}) {
|
|
42510
|
+
border-top-left-radius: var(--_hero-main-corner-radius);
|
|
42511
|
+
}
|
|
42512
|
+
}
|
|
42513
|
+
|
|
42514
|
+
:host([data-main-corner="top-right"]) .hero__main {
|
|
42515
|
+
@container (min-width: ${mdMin$10}) {
|
|
42516
|
+
border-top-right-radius: var(--_hero-main-corner-radius);
|
|
42517
|
+
}
|
|
42518
|
+
}
|
|
42519
|
+
|
|
42520
|
+
:host([data-main-corner="bottom-left"]) .hero__main {
|
|
42521
|
+
@container (min-width: ${mdMin$10}) {
|
|
42522
|
+
border-bottom-left-radius: var(--_hero-main-corner-radius);
|
|
42523
|
+
}
|
|
42524
|
+
}
|
|
42525
|
+
|
|
42526
|
+
:host([data-main-corner="bottom-right"]) .hero__main {
|
|
42527
|
+
@container (min-width: ${mdMin$10}) {
|
|
42528
|
+
border-bottom-right-radius: var(--_hero-main-corner-radius);
|
|
42529
|
+
}
|
|
42530
|
+
}
|
|
42531
|
+
|
|
42532
|
+
/* ## Without media */
|
|
42533
|
+
|
|
42534
|
+
:host(:not([data-has-media])[data-media-corner="top-left"]) :is(.hero__body, .hero__main) {
|
|
42535
|
+
border-top-left-radius: var(--_hero-main-corner-radius);
|
|
42536
|
+
}
|
|
42537
|
+
|
|
42538
|
+
:host(:not([data-has-media])[data-media-corner="top-right"]) :is(.hero__body, .hero__main) {
|
|
42539
|
+
border-top-right-radius: var(--_hero-main-corner-radius);
|
|
42540
|
+
}
|
|
42541
|
+
|
|
42542
|
+
:host(:not([data-has-media])[data-media-corner="bottom-left"]) :is(.hero__body, .hero__main) {
|
|
42543
|
+
border-bottom-left-radius: var(--_hero-main-corner-radius);
|
|
42544
|
+
}
|
|
42545
|
+
|
|
42546
|
+
:host(:not([data-has-media])[data-media-corner="bottom-right"]) :is(.hero__body, .hero__main) {
|
|
42547
|
+
border-bottom-right-radius: var(--_hero-main-corner-radius);
|
|
42548
|
+
}
|
|
42549
|
+
|
|
42550
|
+
:host(:not([data-has-media]):is([data-media-corner="top-left"], [data-media-corner="bottom-left"])) .hero__main {
|
|
42551
|
+
padding-left: calc(var(--_hero-main-padding) + var(--_hero-main-corner-radius) / 2);
|
|
42552
|
+
}
|
|
42553
|
+
|
|
42554
|
+
:host(:not([data-has-media]):is([data-media-corner="top-right"], [data-media-corner="bottom-right"])) .hero__main {
|
|
42555
|
+
padding-right: calc(var(--_hero-main-padding) + var(--_hero-main-corner-radius) / 2);
|
|
42556
|
+
}
|
|
42557
|
+
`;
|
|
42558
|
+
//#endregion
|
|
42559
|
+
//#region src/components/layout/page-sections/hero/hero-corner.ts
|
|
42560
|
+
var CORNERS = [
|
|
42561
|
+
"top-left",
|
|
42562
|
+
"top-right",
|
|
42563
|
+
"bottom-left",
|
|
42564
|
+
"bottom-right"
|
|
42565
|
+
];
|
|
42566
|
+
var AUTO_MEDIA_CORNER = {
|
|
42567
|
+
"bottom-left": "top-right",
|
|
42568
|
+
"bottom-right": "bottom-left",
|
|
42569
|
+
"top-left": "top-right",
|
|
42570
|
+
"top-right": "top-left",
|
|
42571
|
+
"left": "top-right",
|
|
42572
|
+
"right": "top-left"
|
|
42573
|
+
};
|
|
42574
|
+
function autoCornerWithoutMedia(position) {
|
|
42575
|
+
return position.endsWith("right") ? "top-left" : "top-right";
|
|
42576
|
+
}
|
|
42577
|
+
var MAIN_CORNER = {
|
|
42578
|
+
"bottom-left": "top-right",
|
|
42579
|
+
"bottom-right": "top-left",
|
|
42580
|
+
"top-left": "bottom-right",
|
|
42581
|
+
"top-right": "bottom-left",
|
|
42582
|
+
"left": null,
|
|
42583
|
+
"right": null
|
|
42584
|
+
};
|
|
42585
|
+
/** The media corners the panel stands on, where a rounded corner would vanish. */
|
|
42586
|
+
function coveredCorners(host, position) {
|
|
42587
|
+
if (position === "left") return ["top-left", "bottom-left"];
|
|
42588
|
+
if (position === "right") return ["top-right", "bottom-right"];
|
|
42589
|
+
if (host.mainWidth !== "full") return [position];
|
|
42590
|
+
const vertical = position.startsWith("top") ? "top" : "bottom";
|
|
42591
|
+
return [`${vertical}-left`, `${vertical}-right`];
|
|
42592
|
+
}
|
|
42593
|
+
function clear(host) {
|
|
42594
|
+
host.removeAttribute("data-media-corner");
|
|
42595
|
+
host.removeAttribute("data-main-corner");
|
|
42596
|
+
}
|
|
42597
|
+
/**
|
|
42598
|
+
* Works out which corners are rounded and writes them onto the host as
|
|
42599
|
+
* `data-media-corner` and `data-main-corner`, which the corner stylesheet
|
|
42600
|
+
* keys off. Without `corner`, or where a corner does not fit the shape
|
|
42601
|
+
* language, both are removed and the hero is rectangular.
|
|
42602
|
+
*/
|
|
42603
|
+
function applyCorner(host) {
|
|
42604
|
+
if (host.corner === null || host.corner === void 0) {
|
|
42605
|
+
clear(host);
|
|
42606
|
+
return;
|
|
42607
|
+
}
|
|
42608
|
+
const center = host.mainPosition === "top-center" || host.mainPosition === "bottom-center";
|
|
42609
|
+
const position = Object.prototype.hasOwnProperty.call(MAIN_CORNER, host.mainPosition) ? host.mainPosition : "bottom-left";
|
|
42610
|
+
if (host._hasMedia && (host.layout !== "contained" || center)) {
|
|
42611
|
+
clear(host);
|
|
42612
|
+
return;
|
|
42613
|
+
}
|
|
42614
|
+
const value = host.corner.trim();
|
|
42615
|
+
const chosen = CORNERS.includes(value) ? value : null;
|
|
42616
|
+
const covered = host._hasMedia ? coveredCorners(host, position) : [];
|
|
42617
|
+
let mediaCorner = chosen ?? (host._hasMedia ? AUTO_MEDIA_CORNER[position] : autoCornerWithoutMedia(host.mainPosition));
|
|
42618
|
+
if (!chosen && covered.includes(mediaCorner)) {
|
|
42619
|
+
const horizontal = mediaCorner.endsWith("left") ? "left" : "right";
|
|
42620
|
+
mediaCorner = `${mediaCorner.startsWith("top") ? "bottom" : "top"}-${horizontal}`;
|
|
42621
|
+
}
|
|
42622
|
+
const mainCorner = host._hasMedia && host.mainWidth !== "full" ? MAIN_CORNER[position] : null;
|
|
42623
|
+
host.setAttribute("data-media-corner", mediaCorner);
|
|
42624
|
+
if (mainCorner) host.setAttribute("data-main-corner", mainCorner);
|
|
42625
|
+
else host.removeAttribute("data-main-corner");
|
|
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
|
+
}
|
|
42648
|
+
//#endregion
|
|
42175
42649
|
//#region src/components/layout/page-sections/hero/hero.ts
|
|
42176
42650
|
/**
|
|
42177
42651
|
* Nederlandse Digitale Dienst Hero Component (Lit + TypeScript)
|
|
42178
42652
|
*
|
|
42179
42653
|
* The section that says what a page is for: it names the main goal of what
|
|
42180
42654
|
* you can find there, draws the eye and is the visual welcome. It has a media
|
|
42181
|
-
* area and a text panel (the main) that can stand in eight positions.
|
|
42182
|
-
*
|
|
42183
|
-
* they are, such as a home or a topic
|
|
42184
|
-
* that, a section with a title is enough.
|
|
42655
|
+
* area and a text panel (the main) that can stand in eight positions. The
|
|
42656
|
+
* areas are rectangular; `corner` rounds one corner of each. Use it on pages
|
|
42657
|
+
* where a visitor first has to know where they are, such as a home or a topic
|
|
42658
|
+
* page; where the title already does that, a section with a title is enough.
|
|
42185
42659
|
*
|
|
42186
42660
|
* The image in a hero sets the mood and is never the main content, so the
|
|
42187
42661
|
* panel always stands on it. Over an image the panel keeps a section gap from
|
|
@@ -42220,6 +42694,7 @@ function heroTemplate(component) {
|
|
|
42220
42694
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
42221
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.
|
|
42222
42696
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
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"`
|
|
42223
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
|
|
42224
42699
|
* @attr {string} main-background - Surface color of the panel: 'base' (the base surface)
|
|
42225
42700
|
* or a category color — 'accent' (default) or a Rijkshuisstijl color such as
|
|
@@ -42243,7 +42718,7 @@ function heroTemplate(component) {
|
|
|
42243
42718
|
* @slot - Content of the text panel (nldd-title and nldd-rich-text with color="inherit", for instance)
|
|
42244
42719
|
*/
|
|
42245
42720
|
var _NLDDHero;
|
|
42246
|
-
var CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
42721
|
+
var CSS_WIDE_KEYWORDS$1 = /* @__PURE__ */ new Set([
|
|
42247
42722
|
"inherit",
|
|
42248
42723
|
"initial",
|
|
42249
42724
|
"unset",
|
|
@@ -42257,12 +42732,13 @@ var CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
42257
42732
|
* something else.
|
|
42258
42733
|
*/
|
|
42259
42734
|
function takesValue(property, value) {
|
|
42260
|
-
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);
|
|
42261
42736
|
}
|
|
42262
42737
|
var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement) {
|
|
42263
42738
|
constructor(..._args) {
|
|
42264
42739
|
super(..._args);
|
|
42265
42740
|
this.width = "";
|
|
42741
|
+
this.corner = null;
|
|
42266
42742
|
this.layout = "overlap";
|
|
42267
42743
|
this.mainBackground = "accent";
|
|
42268
42744
|
this.mainWidth = "auto";
|
|
@@ -42275,6 +42751,7 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42275
42751
|
this.mediaSizes = "";
|
|
42276
42752
|
this.mediaAlt = "";
|
|
42277
42753
|
this._slotHasMedia = false;
|
|
42754
|
+
this._cornerObserver = null;
|
|
42278
42755
|
this._warnedHeight = false;
|
|
42279
42756
|
this._overlapObserver = null;
|
|
42280
42757
|
this._warnedOverlap = false;
|
|
@@ -42286,14 +42763,18 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42286
42763
|
willUpdate(changed) {
|
|
42287
42764
|
super.willUpdate(changed);
|
|
42288
42765
|
this.toggleAttribute("data-has-media", this._hasMedia);
|
|
42766
|
+
applyCorner(this);
|
|
42289
42767
|
}
|
|
42290
42768
|
connectedCallback() {
|
|
42291
42769
|
super.connectedCallback();
|
|
42770
|
+
if (this.hasUpdated) this._watchCorner();
|
|
42292
42771
|
}
|
|
42293
42772
|
disconnectedCallback() {
|
|
42294
42773
|
super.disconnectedCallback();
|
|
42295
42774
|
this._overlapObserver?.disconnect();
|
|
42296
42775
|
this._overlapObserver = null;
|
|
42776
|
+
this._cornerObserver?.disconnect();
|
|
42777
|
+
this._cornerObserver = null;
|
|
42297
42778
|
this._warnedOverlap = false;
|
|
42298
42779
|
}
|
|
42299
42780
|
updated(changed) {
|
|
@@ -42303,6 +42784,7 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42303
42784
|
if (w && w !== "full" && takesValue("max-width", w)) this.style.setProperty("--_hero-max-width", w);
|
|
42304
42785
|
else this.style.removeProperty("--_hero-max-width");
|
|
42305
42786
|
}
|
|
42787
|
+
if (changed.has("corner")) this._watchCorner();
|
|
42306
42788
|
if (changed.has("mainWidth")) {
|
|
42307
42789
|
const width = (this.mainWidth ?? "").trim();
|
|
42308
42790
|
const valid = width !== "" && width !== "auto" && width !== "full" && takesValue("width", width);
|
|
@@ -42327,6 +42809,21 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42327
42809
|
else this.style.removeProperty("--_hero-media-aspect-ratio");
|
|
42328
42810
|
}
|
|
42329
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
|
+
}
|
|
42330
42827
|
_watchOverlap() {
|
|
42331
42828
|
if (!(this.layout !== "contained" && typeof ResizeObserver !== "undefined")) {
|
|
42332
42829
|
this._overlapObserver?.disconnect();
|
|
@@ -42364,11 +42861,15 @@ var NLDDHero = (_NLDDHero = class NLDDHero extends PageSectionMixin(LitElement)
|
|
|
42364
42861
|
render() {
|
|
42365
42862
|
return heroTemplate(this);
|
|
42366
42863
|
}
|
|
42367
|
-
}, _NLDDHero.styles = heroStyles, _NLDDHero);
|
|
42864
|
+
}, _NLDDHero.styles = [heroStyles, heroCornerStyles], _NLDDHero);
|
|
42368
42865
|
__decorate([property({
|
|
42369
42866
|
reflect: true,
|
|
42370
42867
|
converter: reflectNonDefault("")
|
|
42371
42868
|
})], NLDDHero.prototype, "width", void 0);
|
|
42869
|
+
__decorate([property({
|
|
42870
|
+
type: String,
|
|
42871
|
+
reflect: true
|
|
42872
|
+
})], NLDDHero.prototype, "corner", void 0);
|
|
42372
42873
|
__decorate([property({
|
|
42373
42874
|
reflect: true,
|
|
42374
42875
|
converter: reflectNonDefault("overlap")
|
|
@@ -44156,6 +44657,62 @@ __decorate([property({
|
|
|
44156
44657
|
})], NLDDSheet.prototype, "open", void 0);
|
|
44157
44658
|
NLDDSheet = __decorate([customElement("nldd-sheet")], NLDDSheet);
|
|
44158
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
|
|
44159
44716
|
//#region src/components/layout/page-sections/sidebar-section/sidebar-section.ts
|
|
44160
44717
|
/**
|
|
44161
44718
|
* Nederlandse Digitale Dienst Sidebar Section Component (Lit + TypeScript)
|
|
@@ -44178,6 +44735,18 @@ NLDDSheet = __decorate([customElement("nldd-sheet")], NLDDSheet);
|
|
|
44178
44735
|
* The sheet gets a sticky title bar by default — the `sidebar-label` as title plus a
|
|
44179
44736
|
* "Sluit" button — overridable via the `sheet-top-title-bar` slot.
|
|
44180
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
|
+
*
|
|
44181
44750
|
* The sidebar content lives in `slot="sidebar"`. Its slot outlet moves between the
|
|
44182
44751
|
* box (expanded) and the sheet (collapsed) so there is a single, never-duplicated
|
|
44183
44752
|
* copy — the light DOM (and its state) is preserved across the switch.
|
|
@@ -44235,8 +44804,37 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
|
|
|
44235
44804
|
this._hasMeasured = true;
|
|
44236
44805
|
this._applyCollapsed(width, announce);
|
|
44237
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
|
+
};
|
|
44238
44834
|
this._onSheetOpen = () => {
|
|
44239
44835
|
this._sheetOpen = true;
|
|
44836
|
+
this._pendingJump?.abort();
|
|
44837
|
+
this._pendingJump = void 0;
|
|
44240
44838
|
};
|
|
44241
44839
|
this._onSheetClose = () => {
|
|
44242
44840
|
this._sheetOpen = false;
|
|
@@ -44256,12 +44854,15 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
|
|
|
44256
44854
|
super.connectedCallback();
|
|
44257
44855
|
this._ro = new ResizeObserver(this._onResize);
|
|
44258
44856
|
this._ro.observe(this);
|
|
44857
|
+
this.addEventListener("click", this._onClick);
|
|
44259
44858
|
}
|
|
44260
44859
|
disconnectedCallback() {
|
|
44261
44860
|
super.disconnectedCallback();
|
|
44262
44861
|
this._ro?.disconnect();
|
|
44263
44862
|
this._ro = void 0;
|
|
44264
44863
|
this._hasMeasured = false;
|
|
44864
|
+
this.removeEventListener("click", this._onClick);
|
|
44865
|
+
this._pendingJump?.abort();
|
|
44265
44866
|
}
|
|
44266
44867
|
firstUpdated() {
|
|
44267
44868
|
this._applyCollapsed(this.clientWidth, false);
|
|
@@ -44307,6 +44908,9 @@ var _NLDDSidebarSection = class NLDDSidebarSection extends PageSectionMixin(LitE
|
|
|
44307
44908
|
if (this._sheetOpen) this._sheet?.hide();
|
|
44308
44909
|
else this._sheet?.show();
|
|
44309
44910
|
}
|
|
44911
|
+
_inSidebar(node) {
|
|
44912
|
+
return [...this.children].some((child) => child.slot === "sidebar" && child.contains(node));
|
|
44913
|
+
}
|
|
44310
44914
|
render() {
|
|
44311
44915
|
return sidebarSectionTemplate(this);
|
|
44312
44916
|
}
|
|
@@ -44610,8 +45214,9 @@ var cardStyles = css`
|
|
|
44610
45214
|
//#endregion
|
|
44611
45215
|
//#region src/components/layout/card/card.template.ts
|
|
44612
45216
|
function cardTemplate(component) {
|
|
44613
|
-
const
|
|
44614
|
-
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;
|
|
44615
45220
|
const isInteractive = Boolean(component.href) || component.button;
|
|
44616
45221
|
return html`
|
|
44617
45222
|
<article class="card"
|
|
@@ -44655,7 +45260,11 @@ function cardTemplate(component) {
|
|
|
44655
45260
|
}
|
|
44656
45261
|
//#endregion
|
|
44657
45262
|
//#region src/components/layout/card/card.i18n.ts
|
|
44658
|
-
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
|
+
};
|
|
44659
45268
|
//#endregion
|
|
44660
45269
|
//#region src/components/layout/card/card.ts
|
|
44661
45270
|
/**
|
|
@@ -44679,9 +45288,9 @@ var nlddCardTranslations = { "components.card.opens-in-new-tab-label": "Opent in
|
|
|
44679
45288
|
*
|
|
44680
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
|
|
44681
45290
|
* @attr {string} accessible-label - Accessible name of the card; with `href`/`button` it names the link or button, otherwise the card region
|
|
44682
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
45291
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement)
|
|
44683
45292
|
* @attr {string} href - Makes the whole card a link to this URL (empty = no link)
|
|
44684
|
-
* @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.
|
|
44685
45294
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
44686
45295
|
* @attr {boolean} button - Makes the whole card a button; ignored when `href` is set
|
|
44687
45296
|
*
|
|
@@ -44782,7 +45391,8 @@ var collectionStyles = css`
|
|
|
44782
45391
|
/* # Host */
|
|
44783
45392
|
|
|
44784
45393
|
:host {
|
|
44785
|
-
--_collection-item-width: var(--primitives-area-280);
|
|
45394
|
+
--_collection-item-min-width: var(--primitives-area-280);
|
|
45395
|
+
--_collection-item-max-width: var(--primitives-area-480);
|
|
44786
45396
|
--_collection-focus-ring-z-index: 1;
|
|
44787
45397
|
|
|
44788
45398
|
/* Two sets, because a collection inside a layout-container follows that
|
|
@@ -44825,10 +45435,10 @@ var collectionStyles = css`
|
|
|
44825
45435
|
|
|
44826
45436
|
:host([layout="grid"]) .collection__items,
|
|
44827
45437
|
:host(:not([layout])) .collection__items {
|
|
44828
|
-
/* min(item-width, 100%) clamps the track min to the container width so
|
|
45438
|
+
/* min(item-min-width, 100%) clamps the track min to the container width so
|
|
44829
45439
|
a single column never forces horizontal overflow on narrow screens. */
|
|
44830
45440
|
display: grid;
|
|
44831
|
-
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-width), 100%), 1fr));
|
|
45441
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-min-width), 100%), 1fr));
|
|
44832
45442
|
}
|
|
44833
45443
|
|
|
44834
45444
|
/* A grid item's automatic minimum is min-content, so one long unbreakable
|
|
@@ -44854,7 +45464,7 @@ var collectionStyles = css`
|
|
|
44854
45464
|
load-more adds to it. */
|
|
44855
45465
|
:host([layout="lanes"]) .collection__items {
|
|
44856
45466
|
display: grid;
|
|
44857
|
-
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-width), 100%), 1fr));
|
|
45467
|
+
grid-template-columns: repeat(auto-fill, minmax(min(var(--_collection-item-min-width), 100%), 1fr));
|
|
44858
45468
|
}
|
|
44859
45469
|
|
|
44860
45470
|
:host([layout="lanes"]) .collection__items ::slotted(*) {
|
|
@@ -44899,10 +45509,10 @@ var collectionStyles = css`
|
|
|
44899
45509
|
}
|
|
44900
45510
|
|
|
44901
45511
|
:host([layout="horizontal-scroll"]) .collection__items ::slotted(*) {
|
|
44902
|
-
max-width: 100
|
|
45512
|
+
max-width: min(max(var(--_collection-item-min-width), var(--_collection-item-max-width)), 100%);
|
|
44903
45513
|
flex-grow: 1;
|
|
44904
45514
|
flex-shrink: 0;
|
|
44905
|
-
flex-basis: var(--_collection-item-width);
|
|
45515
|
+
flex-basis: var(--_collection-item-min-width);
|
|
44906
45516
|
scroll-snap-align: start;
|
|
44907
45517
|
}
|
|
44908
45518
|
|
|
@@ -45023,19 +45633,23 @@ var nlddCollectionTranslations = {
|
|
|
45023
45633
|
* Supports grid, stack, lanes and horizontal scroll layouts.
|
|
45024
45634
|
*
|
|
45025
45635
|
* Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS
|
|
45026
|
-
* grid of your own: the collection sets the columns from `item-width` and
|
|
45027
|
-
* available width, and the gap per breakpoint.
|
|
45636
|
+
* grid of your own: the collection sets the columns from `item-min-width` and
|
|
45637
|
+
* the available width, and the gap per breakpoint.
|
|
45028
45638
|
*
|
|
45029
45639
|
* In grid and stack modes, items are paginated via a load-more button. In
|
|
45030
45640
|
* horizontal scroll, the prev/next controls and the edge fade appear only when
|
|
45031
|
-
* the items overflow the container.
|
|
45641
|
+
* the items overflow the container. Use horizontal scroll for items that
|
|
45642
|
+
* together serve one purpose, such as the events of one agenda; it is not a
|
|
45643
|
+
* carousel for unrelated highlights, which the design guidelines advise
|
|
45644
|
+
* against.
|
|
45032
45645
|
* With `lazy-load`, the next items are automatically loaded when
|
|
45033
45646
|
* the load-more button comes into view.
|
|
45034
45647
|
*
|
|
45035
45648
|
* @element nldd-collection
|
|
45036
45649
|
*
|
|
45037
45650
|
* @attr {string} layout - Layout mode: 'grid' | 'stack' | 'lanes' | 'horizontal-scroll' (default: 'grid')
|
|
45038
|
-
* @attr {string} item-width -
|
|
45651
|
+
* @attr {string} item-min-width - Smallest width an item takes (e.g. '280px', '20rem'). In grid and lanes the minimum column width: columns are at least this wide and grow to fill the row. In horizontal scroll the flex-basis: items never shrink below it, and grow up to `item-max-width` when they fit. No effect in stack. Never forces horizontal overflow, the value is clamped to the container width.
|
|
45652
|
+
* @attr {string} item-max-width - Largest width an item takes in horizontal scroll (e.g. '400px', '25rem'), so one or two items that fit do not stretch across the container. Defaults to 480px; `item-max-width="100%"` lets items fill the container, as they did before the default. Never narrower than `item-min-width`, which wins when it is wider, and never wider than the container. No effect in grid, lanes and stack: a grid leaves empty columns rather than stretching an item, and its right edge stays aligned with the content around it.
|
|
45039
45653
|
* @attr {string} gap - Gap between items, as a step of the spacing scale ('0', '2', '4', '6', '8', '10', '12', '16', '20', '24', '28', '32', '40', '44', '48', '56', '64', '80', '96'). Overrides the responsive default at every breakpoint; unset keeps the default.
|
|
45040
45654
|
* @attr {string} sm-gap - Gap at sm, overriding `gap` there
|
|
45041
45655
|
* @attr {string} md-gap - Gap at md, overriding `gap` there
|
|
@@ -45045,6 +45659,10 @@ var nlddCollectionTranslations = {
|
|
|
45045
45659
|
* @attr {boolean} show-load-more - Show load-more button in grid/stack (default: false)
|
|
45046
45660
|
* @attr {boolean} lazy-load - Automatically load more items when the button becomes visible
|
|
45047
45661
|
*
|
|
45662
|
+
* @migration Items in horizontal scroll stop at 480px (or at `item-min-width` when that is wider) instead of filling the container.
|
|
45663
|
+
* Set `item-max-width="100%"` where one or two items should still fill the row.
|
|
45664
|
+
* @migration The `item-width` attribute has been renamed to `item-min-width`, because it was a minimum in every layout.
|
|
45665
|
+
* Replace `item-width="320px"` with `item-min-width="320px"`.
|
|
45048
45666
|
* @migration The `load-more-label` attribute has been removed.
|
|
45049
45667
|
* Use `translations` property instead: `.translations=${{ 'components.collection.load-more-action': 'Show more' }}`
|
|
45050
45668
|
*
|
|
@@ -45104,6 +45722,12 @@ var _NLDDCollection = class NLDDCollection extends LitElement {
|
|
|
45104
45722
|
super.connectedCallback();
|
|
45105
45723
|
this._visibleCount = this.maxItems;
|
|
45106
45724
|
}
|
|
45725
|
+
static get observedAttributes() {
|
|
45726
|
+
return [...super.observedAttributes, "item-width"];
|
|
45727
|
+
}
|
|
45728
|
+
attributeChangedCallback(name, old, value) {
|
|
45729
|
+
super.attributeChangedCallback(name, old, value);
|
|
45730
|
+
}
|
|
45107
45731
|
disconnectedCallback() {
|
|
45108
45732
|
super.disconnectedCallback();
|
|
45109
45733
|
this._intersectionObserver?.disconnect();
|
|
@@ -45111,9 +45735,13 @@ var _NLDDCollection = class NLDDCollection extends LitElement {
|
|
|
45111
45735
|
}
|
|
45112
45736
|
updated(changedProperties) {
|
|
45113
45737
|
if (changedProperties.has("layout")) this._setupScrollListeners();
|
|
45114
|
-
if (changedProperties.has("
|
|
45115
|
-
if (this.
|
|
45116
|
-
else this.style.removeProperty("--_collection-item-width");
|
|
45738
|
+
if (changedProperties.has("itemMinWidth")) {
|
|
45739
|
+
if (this.itemMinWidth) this.style.setProperty("--_collection-item-min-width", this.itemMinWidth);
|
|
45740
|
+
else this.style.removeProperty("--_collection-item-min-width");
|
|
45741
|
+
}
|
|
45742
|
+
if (changedProperties.has("itemMaxWidth")) {
|
|
45743
|
+
if (this.itemMaxWidth) this.style.setProperty("--_collection-item-max-width", this.itemMaxWidth);
|
|
45744
|
+
else this.style.removeProperty("--_collection-item-max-width");
|
|
45117
45745
|
}
|
|
45118
45746
|
if (changedProperties.has("gap") || changedProperties.has("smGap") || changedProperties.has("mdGap") || changedProperties.has("lgGap")) {
|
|
45119
45747
|
const plain = spacingToValue(this.gap, "nldd-collection", "gap");
|
|
@@ -45208,8 +45836,13 @@ __decorate([property({
|
|
|
45208
45836
|
__decorate([property({
|
|
45209
45837
|
type: String,
|
|
45210
45838
|
reflect: true,
|
|
45211
|
-
attribute: "item-width"
|
|
45212
|
-
})], NLDDCollection.prototype, "
|
|
45839
|
+
attribute: "item-min-width"
|
|
45840
|
+
})], NLDDCollection.prototype, "itemMinWidth", void 0);
|
|
45841
|
+
__decorate([property({
|
|
45842
|
+
type: String,
|
|
45843
|
+
reflect: true,
|
|
45844
|
+
attribute: "item-max-width"
|
|
45845
|
+
})], NLDDCollection.prototype, "itemMaxWidth", void 0);
|
|
45213
45846
|
__decorate([property({
|
|
45214
45847
|
type: String,
|
|
45215
45848
|
reflect: true
|
|
@@ -45440,7 +46073,7 @@ var nlddWindowTranslations = { "components.window.accessible-label": "Venster" }
|
|
|
45440
46073
|
* @attr {boolean} centered - Centers both axes on the viewport. Overridable per axis: `centered top="0"` is horizontally centered, top aligned. Mirrors CSS `place-items: center` with `align-items`/`justify-items` overrides.
|
|
45441
46074
|
* @attr {string} accessible-label - Accessible name (aria-label). Unset, the window takes the text of the nldd-top-title-bar inside it, and without one the i18n default ('Venster'). Each window needs a unique, descriptive name, from either.
|
|
45442
46075
|
* @attr {object} translations - Override translation keys; unset keys fall back to the Dutch default.
|
|
45443
|
-
* @attr {boolean} no-light-dismiss - A click on the backdrop does not close the window. For windows where dismissing by accident costs work: a
|
|
46076
|
+
* @attr {boolean} no-light-dismiss - A click on the backdrop does not close the window. For windows where dismissing by accident costs work: a process of several steps, a form with filled-in fields. Escape and the dismiss button keep working.
|
|
45444
46077
|
* @attr {boolean} open - Whether the window is open. Set it to open or close the window, as an alternative to show() and hide(). The window clears it itself when it closes another way (Escape, the backdrop, the close button of its title bar), so bind it together with the close event.
|
|
45445
46078
|
*
|
|
45446
46079
|
* @slot - Complete window content (e.g. nldd-page)
|
|
@@ -46282,14 +46915,27 @@ var listItemSegmentStyles = css`
|
|
|
46282
46915
|
box-shadow: var(--semantics-focus-ring-box-shadow);
|
|
46283
46916
|
pointer-events: none;
|
|
46284
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
|
+
}
|
|
46285
46930
|
`;
|
|
46286
46931
|
//#endregion
|
|
46287
46932
|
//#region src/components/lists-and-tables/list-item-segment/list-item-segment.template.ts
|
|
46288
|
-
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 = "") {
|
|
46289
46934
|
const content = html`<slot></slot>`;
|
|
46290
46935
|
const ariaExpanded = expanded === void 0 ? popupType ? "false" : nothing : String(expanded);
|
|
46291
46936
|
const ariaCurrent = current ?? nothing;
|
|
46292
46937
|
const label = accessibleLabel || nothing;
|
|
46938
|
+
const linkLabel = accessibleLabel ? [accessibleLabel, linkHint].filter(Boolean).join(", ") : nothing;
|
|
46293
46939
|
if (control === "link") return html`<a class="list-item-segment"
|
|
46294
46940
|
href=${href ?? nothing}
|
|
46295
46941
|
target=${target ?? nothing}
|
|
@@ -46297,9 +46943,9 @@ function template$9(control, href, target, rel, checked, expanded, current, disa
|
|
|
46297
46943
|
aria-disabled=${disabled ? "true" : nothing}
|
|
46298
46944
|
aria-expanded=${ariaExpanded}
|
|
46299
46945
|
aria-current=${ariaCurrent}
|
|
46300
|
-
aria-label=${
|
|
46946
|
+
aria-label=${linkLabel}
|
|
46301
46947
|
tabindex=${actionTabindex ?? nothing}
|
|
46302
|
-
>${content}</a>`;
|
|
46948
|
+
>${content}${linkHint && !accessibleLabel ? html`<span class="list-item-segment__link-hint">, ${linkHint}</span>` : nothing}</a>`;
|
|
46303
46949
|
if (control === "checkbox" || control === "button") return html`<button class="list-item-segment"
|
|
46304
46950
|
type="button"
|
|
46305
46951
|
aria-haspopup=${popupType || nothing}
|
|
@@ -46317,8 +46963,15 @@ function template$9(control, href, target, rel, checked, expanded, current, disa
|
|
|
46317
46963
|
return html`<div class="list-item-segment">${content}</div>`;
|
|
46318
46964
|
}
|
|
46319
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
|
|
46320
46973
|
//#region src/components/lists-and-tables/list-item-segment/list-item-segment.ts
|
|
46321
|
-
var _NLDDListItemSegment = class NLDDListItemSegment extends LitElement {
|
|
46974
|
+
var _NLDDListItemSegment = class NLDDListItemSegment extends withTranslations(LitElement, nlddListItemSegmentTranslations) {
|
|
46322
46975
|
constructor(..._args) {
|
|
46323
46976
|
super(..._args);
|
|
46324
46977
|
this.width = "fit-content";
|
|
@@ -46419,7 +47072,8 @@ var _NLDDListItemSegment = class NLDDListItemSegment extends LitElement {
|
|
|
46419
47072
|
this.classList.toggle("is-expanded", expanded === true);
|
|
46420
47073
|
}
|
|
46421
47074
|
render() {
|
|
46422
|
-
|
|
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}`) : "");
|
|
46423
47077
|
}
|
|
46424
47078
|
};
|
|
46425
47079
|
var NLDDListItemSegment = (_NLDDListItemSegment.styles = [listItemSegmentStyles], _NLDDListItemSegment);
|
|
@@ -46551,6 +47205,10 @@ var tableStyles = css`
|
|
|
46551
47205
|
padding: var(--primitives-space-16);
|
|
46552
47206
|
}
|
|
46553
47207
|
|
|
47208
|
+
.table__empty-cell slot[hidden] {
|
|
47209
|
+
display: none;
|
|
47210
|
+
}
|
|
47211
|
+
|
|
46554
47212
|
/* Empty state: collapse the column tracks to a single box-wide column so the
|
|
46555
47213
|
message spans the surface instead of the (wider) data columns — otherwise
|
|
46556
47214
|
the empty box scrolls horizontally. */
|
|
@@ -46633,6 +47291,9 @@ function tableTemplate() {
|
|
|
46633
47291
|
role="cell"
|
|
46634
47292
|
>
|
|
46635
47293
|
<slot name="empty"></slot>
|
|
47294
|
+
<slot name="no-results"
|
|
47295
|
+
hidden
|
|
47296
|
+
></slot>
|
|
46636
47297
|
</div>
|
|
46637
47298
|
</div>
|
|
46638
47299
|
`;
|
|
@@ -46688,7 +47349,8 @@ var nlddTableTranslations = { "components.table.accessible-label": "Tabel" };
|
|
|
46688
47349
|
*
|
|
46689
47350
|
* @slot header - One `<nldd-table-row slot="header">` carrying the column headers
|
|
46690
47351
|
* @slot - The body rows (`<nldd-table-row>`)
|
|
46691
|
-
* @slot empty - Shown when
|
|
47352
|
+
* @slot empty - Shown when the table has no body rows (the header is hidden too). Empty by default: what an empty table should say is the app's to write, so put an `nldd-inline-dialog` here.
|
|
47353
|
+
* @slot no-results - Shown when the table has body rows but every one of them is `[hidden]`, which is what consumer-driven filtering leaves behind. A different state from `empty` and a different sentence: say that nothing matches and how to get rows back. Falls back to `[slot="empty"]` when not given.
|
|
46692
47354
|
*
|
|
46693
47355
|
* @element nldd-table-row
|
|
46694
47356
|
*
|
|
@@ -46755,19 +47417,25 @@ var NLDDTable = (_NLDDTable = class NLDDTable extends LitElement {
|
|
|
46755
47417
|
});
|
|
46756
47418
|
this._updateEmpty();
|
|
46757
47419
|
}
|
|
46758
|
-
/** Show the empty-state
|
|
46759
|
-
* excluded)
|
|
46760
|
-
*
|
|
46761
|
-
*
|
|
47420
|
+
/** Show the empty-state row when there are no visible body rows (header
|
|
47421
|
+
* excluded), with the no-results slot when there are rows that are all
|
|
47422
|
+
* hidden and the empty slot otherwise. Toggled imperatively (like the
|
|
47423
|
+
* tabindex affordance) so it doesn't schedule a reactive re-render out of
|
|
47424
|
+
* firstUpdated. The `is-empty` host class drives hiding the header (CSS)
|
|
47425
|
+
* so only the message shows. */
|
|
46762
47426
|
_updateEmpty() {
|
|
46763
47427
|
const empty = this.shadowRoot?.querySelector(".table__empty");
|
|
46764
47428
|
if (!empty) return;
|
|
46765
47429
|
const rows = ((this.shadowRoot?.querySelector("slot:not([name])"))?.assignedElements() ?? []).filter((el) => el.localName === "nldd-table-row");
|
|
46766
47430
|
const isEmpty = rows.length === 0 || rows.every((row) => row.hasAttribute("hidden"));
|
|
47431
|
+
const hasEmpty = !!this.querySelector(":scope > [slot=\"empty\"]");
|
|
47432
|
+
const noResults = isEmpty && rows.length > 0 && !!this.querySelector(":scope > [slot=\"no-results\"]");
|
|
46767
47433
|
empty.toggleAttribute("hidden", !isEmpty);
|
|
47434
|
+
this.shadowRoot?.querySelector("slot[name=\"empty\"]")?.toggleAttribute("hidden", noResults);
|
|
47435
|
+
this.shadowRoot?.querySelector("slot[name=\"no-results\"]")?.toggleAttribute("hidden", !noResults);
|
|
46768
47436
|
this.classList.toggle("is-empty", isEmpty);
|
|
46769
|
-
this.classList.toggle("is-blank", isEmpty && !
|
|
46770
|
-
this._warnSilentEmpty(isEmpty);
|
|
47437
|
+
this.classList.toggle("is-blank", isEmpty && !noResults && !hasEmpty);
|
|
47438
|
+
this._warnSilentEmpty(isEmpty, hasEmpty, rows.length > 0);
|
|
46771
47439
|
}
|
|
46772
47440
|
/**
|
|
46773
47441
|
* A table with no rows and nothing to say about that.
|
|
@@ -46778,7 +47446,7 @@ var NLDDTable = (_NLDDTable = class NLDDTable extends LitElement {
|
|
|
46778
47446
|
* tree either, so the table asks the person building it rather than
|
|
46779
47447
|
* answering for them.
|
|
46780
47448
|
*/
|
|
46781
|
-
_warnSilentEmpty(isEmpty) {}
|
|
47449
|
+
_warnSilentEmpty(isEmpty, hasEmpty, hasRows) {}
|
|
46782
47450
|
/** The track list for the current width: a breakpoint override when set,
|
|
46783
47451
|
* otherwise the base `columns`. */
|
|
46784
47452
|
_activeColumns() {
|
|
@@ -47792,6 +48460,8 @@ var stepCellStyles = css`
|
|
|
47792
48460
|
--_step-cell-future-content-color: var(--semantics-content-secondary-color);
|
|
47793
48461
|
--_step-cell-current-fill-color: light-dark(var(--primitives-color-accent-75), var(--primitives-color-accent-100));
|
|
47794
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%;
|
|
47795
48465
|
|
|
47796
48466
|
isolation: isolate;
|
|
47797
48467
|
display: flex;
|
|
@@ -47820,6 +48490,18 @@ var stepCellStyles = css`
|
|
|
47820
48490
|
--_step-cell-marker-size: var(--primitives-space-12);
|
|
47821
48491
|
}
|
|
47822
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
|
+
|
|
47823
48505
|
/* Bleeds back over the host's block padding, so consecutive rows connect. */
|
|
47824
48506
|
.step-cell {
|
|
47825
48507
|
position: relative;
|
|
@@ -47829,6 +48511,13 @@ var stepCellStyles = css`
|
|
|
47829
48511
|
margin-block: calc(var(--context-cell-padding-block, 0px) * -1);
|
|
47830
48512
|
}
|
|
47831
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
|
+
|
|
47832
48521
|
/* The ring, but only left and right. A spread would put the same band above
|
|
47833
48522
|
and below the line, and there it would cut the track at every row
|
|
47834
48523
|
boundary: the lines that run on downward deliberately reach past the cell
|
|
@@ -47853,18 +48542,18 @@ var stepCellStyles = css`
|
|
|
47853
48542
|
without this the track breaks at every row. The top line needs nothing —
|
|
47854
48543
|
the row above already covers the band. */
|
|
47855
48544
|
.step-cell__full-line {
|
|
47856
|
-
top:
|
|
47857
|
-
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));
|
|
47858
48547
|
}
|
|
47859
48548
|
|
|
47860
48549
|
.step-cell__top-line {
|
|
47861
|
-
|
|
47862
|
-
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));
|
|
47863
48552
|
}
|
|
47864
48553
|
|
|
47865
48554
|
.step-cell__bottom-line {
|
|
47866
|
-
top:
|
|
47867
|
-
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));
|
|
47868
48557
|
}
|
|
47869
48558
|
|
|
47870
48559
|
:host([status="future"]:not([line])) .step-cell__top-line,
|
|
@@ -47907,7 +48596,7 @@ var stepCellStyles = css`
|
|
|
47907
48596
|
.step-cell__marker {
|
|
47908
48597
|
box-sizing: border-box;
|
|
47909
48598
|
position: absolute;
|
|
47910
|
-
top:
|
|
48599
|
+
top: var(--_step-cell-marker-center);
|
|
47911
48600
|
left: 50%;
|
|
47912
48601
|
z-index: var(--_step-cell-marker-z-index);
|
|
47913
48602
|
display: flex;
|
|
@@ -47959,7 +48648,9 @@ var stepCellStyles = css`
|
|
|
47959
48648
|
function stepCellTemplate(component) {
|
|
47960
48649
|
if (component.level === "none") return html`
|
|
47961
48650
|
<div class="step-cell">
|
|
47962
|
-
|
|
48651
|
+
<div class="step-cell__content">
|
|
48652
|
+
${component.position === "only" ? nothing : html`<div class="step-cell__full-line"></div>`}
|
|
48653
|
+
</div>
|
|
47963
48654
|
</div>
|
|
47964
48655
|
`;
|
|
47965
48656
|
const hasTop = component.position === "between" || component.position === "last";
|
|
@@ -47970,9 +48661,11 @@ function stepCellTemplate(component) {
|
|
|
47970
48661
|
const content = component.showsContent ? html`${marker}<slot></slot>` : marker;
|
|
47971
48662
|
return html`
|
|
47972
48663
|
<div class="step-cell">
|
|
47973
|
-
|
|
47974
|
-
|
|
47975
|
-
|
|
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>
|
|
47976
48669
|
</div>
|
|
47977
48670
|
`;
|
|
47978
48671
|
}
|
|
@@ -47998,6 +48691,8 @@ function stepCellTemplate(component) {
|
|
|
47998
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
|
|
47999
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
|
|
48000
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
|
|
48001
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
|
|
48002
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
|
|
48003
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
|
|
@@ -48006,12 +48701,22 @@ function stepCellTemplate(component) {
|
|
|
48006
48701
|
*
|
|
48007
48702
|
* @slot - Custom content in the dot (an alternative to `text` and `icon`)
|
|
48008
48703
|
*/
|
|
48009
|
-
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") {
|
|
48010
48713
|
constructor(..._args) {
|
|
48011
48714
|
super(..._args);
|
|
48012
48715
|
this.level = "major";
|
|
48013
48716
|
this.status = "past";
|
|
48014
48717
|
this.size = "sm";
|
|
48718
|
+
this.verticalAlignment = "center";
|
|
48719
|
+
this.markerOffset = "";
|
|
48015
48720
|
this.direction = "down";
|
|
48016
48721
|
this.position = "between";
|
|
48017
48722
|
this.line = "auto";
|
|
@@ -48026,12 +48731,18 @@ var _NLDDStepCell = class NLDDStepCell extends VisibilityMixin(LitElement, "cell
|
|
|
48026
48731
|
}
|
|
48027
48732
|
updated(changed) {
|
|
48028
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
|
+
}
|
|
48029
48741
|
}
|
|
48030
48742
|
render() {
|
|
48031
48743
|
return stepCellTemplate(this);
|
|
48032
48744
|
}
|
|
48033
|
-
};
|
|
48034
|
-
var NLDDStepCell = (_NLDDStepCell.styles = stepCellStyles, _NLDDStepCell);
|
|
48745
|
+
}, _NLDDStepCell.styles = stepCellStyles, _NLDDStepCell);
|
|
48035
48746
|
__decorate([property({
|
|
48036
48747
|
reflect: true,
|
|
48037
48748
|
converter: reflectNonDefault("major")
|
|
@@ -48044,6 +48755,16 @@ __decorate([property({
|
|
|
48044
48755
|
reflect: true,
|
|
48045
48756
|
converter: reflectNonDefault("sm")
|
|
48046
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);
|
|
48047
48768
|
__decorate([property({
|
|
48048
48769
|
reflect: true,
|
|
48049
48770
|
converter: reflectNonDefault("down")
|
|
@@ -48639,7 +49360,7 @@ function template$4(component) {
|
|
|
48639
49360
|
* @attr {boolean} icon-only - Hide the text visually (always). The text then shows as a tooltip on hover and focus.
|
|
48640
49361
|
* @attr {'icon'|'text'} content-priority - Decides what stays visible in compact mode: 'icon' hides the text, 'text' hides the icon. A bar is compact on a narrow screen and also at 200% zoom on a desktop, so with 'icon' the text is gone there too and shows as a tooltip instead.
|
|
48641
49362
|
* @attr {boolean} compact - Activates content-priority behavior (set by the parent nldd-menu-bar)
|
|
48642
|
-
* @attr {boolean} disabled - Turn interaction off
|
|
49363
|
+
* @attr {boolean} disabled - Turn interaction off. Avoid it where you can; the design guidelines say why.
|
|
48643
49364
|
* @attr {string} accessible-label - Override aria-label
|
|
48644
49365
|
* @attr {string} haspopup - aria-haspopup value (e.g. "menu", "dialog")
|
|
48645
49366
|
* @attr {boolean} open - Whether the linked popover or menu is open
|
|
@@ -48756,6 +49477,14 @@ var _NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
|
|
|
48756
49477
|
this._menuToggleHandler = null;
|
|
48757
49478
|
this._menuOpen = false;
|
|
48758
49479
|
}
|
|
49480
|
+
/** How far the indicator stops short of the item's top and bottom, so the
|
|
49481
|
+
* menu can open against the indicator instead of against the item. */
|
|
49482
|
+
_indicatorInset() {
|
|
49483
|
+
const item = this.shadowRoot?.querySelector(".menu-bar-item");
|
|
49484
|
+
if (!item) return 0;
|
|
49485
|
+
const inset = parseFloat(getComputedStyle(item, "::before").top);
|
|
49486
|
+
return Number.isNaN(inset) ? 0 : inset;
|
|
49487
|
+
}
|
|
48759
49488
|
_toggleMenu() {
|
|
48760
49489
|
if (this._pointerdownWhileMenuOpen) {
|
|
48761
49490
|
this._pointerdownWhileMenuOpen = false;
|
|
@@ -48763,6 +49492,7 @@ var _NLDDMenuBarItem = class NLDDMenuBarItem extends LitElement {
|
|
|
48763
49492
|
}
|
|
48764
49493
|
if (!this._menu) return;
|
|
48765
49494
|
this._menu.anchorElement = this;
|
|
49495
|
+
this._menu.anchorOffset = -this._indicatorInset();
|
|
48766
49496
|
if (this._menuOpen) this._menu.hidePopover();
|
|
48767
49497
|
else this._menu.showPopover();
|
|
48768
49498
|
}
|
|
@@ -49225,9 +49955,9 @@ var linkStyles = css`
|
|
|
49225
49955
|
top: 0.2em;
|
|
49226
49956
|
}
|
|
49227
49957
|
|
|
49228
|
-
/* Visually-hidden
|
|
49958
|
+
/* Visually-hidden link hint (another website, a new tab); part of
|
|
49229
49959
|
the link's accessible name but never shown. Standard visually-hidden recipe. */
|
|
49230
|
-
.
|
|
49960
|
+
.link__link-hint {
|
|
49231
49961
|
position: absolute;
|
|
49232
49962
|
margin: -1px;
|
|
49233
49963
|
border: 0;
|
|
@@ -49243,9 +49973,10 @@ var linkStyles = css`
|
|
|
49243
49973
|
//#region src/components/navigation/link/link.template.ts
|
|
49244
49974
|
function template$3(helpers) {
|
|
49245
49975
|
const resolvedRel = linkRel(this.rel, this.target);
|
|
49246
|
-
const
|
|
49247
|
-
const
|
|
49248
|
-
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;
|
|
49249
49980
|
return html`
|
|
49250
49981
|
<a class="link"
|
|
49251
49982
|
href=${this.disabled ? nothing : this.href || nothing}
|
|
@@ -49263,14 +49994,17 @@ function template$3(helpers) {
|
|
|
49263
49994
|
<span class="link__label">${this.text ? this.text : html`<slot></slot>`}</span>
|
|
49264
49995
|
${this.endIcon ? html`
|
|
49265
49996
|
<span class="link__end-icon"><nldd-icon icon=${this.endIcon}></nldd-icon></span>
|
|
49266
|
-
` : html`<slot name="end-icon"></slot>`}
|
|
49267
|
-
${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}
|
|
49268
49998
|
</a>
|
|
49269
49999
|
`;
|
|
49270
50000
|
}
|
|
49271
50001
|
//#endregion
|
|
49272
50002
|
//#region src/components/navigation/link/link.i18n.ts
|
|
49273
|
-
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
|
+
};
|
|
49274
50008
|
//#endregion
|
|
49275
50009
|
//#region src/components/navigation/link/link.ts
|
|
49276
50010
|
/**
|
|
@@ -49293,16 +50027,16 @@ var nlddLinkTranslations = { "components.link.opens-in-new-tab-label": "Opent in
|
|
|
49293
50027
|
*
|
|
49294
50028
|
* @element nldd-link
|
|
49295
50029
|
* @attr {string} href - Link target
|
|
49296
|
-
* @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.
|
|
49297
50031
|
* @attr {string} rel - Link rel attribute; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
49298
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.
|
|
49299
50033
|
* @attr {string} text - Link text (alternative to the default slot)
|
|
49300
50034
|
* @attr {string} start-icon - Icon before the text
|
|
49301
50035
|
* @attr {string} end-icon - Icon after the text
|
|
49302
50036
|
* @attr {string} accessible-label - Accessible label for screen readers
|
|
49303
|
-
* @attr {boolean} disabled - Disabled state
|
|
50037
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
49304
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.
|
|
49305
|
-
* @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.
|
|
49306
50040
|
*
|
|
49307
50041
|
* @slot - Link text (alternative to the text attribute)
|
|
49308
50042
|
* @slot start-icon - Custom icon before the text
|
|
@@ -49518,14 +50252,10 @@ var _NLDDSkipLink = class NLDDSkipLink extends withTranslations(LitElement, nldd
|
|
|
49518
50252
|
this._focus(next);
|
|
49519
50253
|
};
|
|
49520
50254
|
this._handleLinkClick = (event) => {
|
|
49521
|
-
const hash = this.
|
|
50255
|
+
const hash = samePageHash(this.href);
|
|
49522
50256
|
if (!hash) return;
|
|
49523
50257
|
if (event && (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) return;
|
|
49524
|
-
|
|
49525
|
-
try {
|
|
49526
|
-
id = decodeURIComponent(id);
|
|
49527
|
-
} catch {}
|
|
49528
|
-
const target = this.getRootNode().getElementById?.(id) ?? document.getElementById(id);
|
|
50258
|
+
const target = hashTarget(hash, this);
|
|
49529
50259
|
if (!target) return;
|
|
49530
50260
|
clearTimeout(this._focusTimer);
|
|
49531
50261
|
this._focusTimer = setTimeout(() => this._focus(target));
|
|
@@ -49534,45 +50264,15 @@ var _NLDDSkipLink = class NLDDSkipLink extends withTranslations(LitElement, nldd
|
|
|
49534
50264
|
get _text() {
|
|
49535
50265
|
return this.text || this._t("components.skip-link.action");
|
|
49536
50266
|
}
|
|
49537
|
-
/**
|
|
49538
|
-
* The fragment of an href that stays on this page, or an empty string. An
|
|
49539
|
-
* absolute URL to the page you are on counts too: a router or a CMS writes
|
|
49540
|
-
* `/pagina#inhoud` as readily as `#inhoud`.
|
|
49541
|
-
*/
|
|
49542
|
-
_samePageHash() {
|
|
49543
|
-
try {
|
|
49544
|
-
const url = new URL(this.href, location.href);
|
|
49545
|
-
return url.origin === location.origin && url.pathname === location.pathname && url.search === location.search ? url.hash : "";
|
|
49546
|
-
} catch {
|
|
49547
|
-
return "";
|
|
49548
|
-
}
|
|
49549
|
-
}
|
|
49550
50267
|
disconnectedCallback() {
|
|
49551
50268
|
super.disconnectedCallback();
|
|
49552
50269
|
clearTimeout(this._focusTimer);
|
|
49553
50270
|
}
|
|
49554
|
-
/**
|
|
49555
|
-
* Focuses the target and leaves it as it was once focus moves on.
|
|
49556
|
-
*
|
|
49557
|
-
* The tabindex is 0 and not -1, also when the target came with a -1 of its
|
|
49558
|
-
* own. WebKit skips everything inside a shadow host that has a negative
|
|
49559
|
-
* tabindex, slotted content included, so with -1 on an nldd-* section the
|
|
49560
|
-
* next Tab left the page instead of reaching the first link in it.
|
|
49561
|
-
*/
|
|
50271
|
+
/** Focuses the target with a temporary tab stop; see focusTemporarily. */
|
|
49562
50272
|
_focus(target) {
|
|
49563
50273
|
this._restoreTarget?.();
|
|
49564
|
-
|
|
49565
|
-
|
|
49566
|
-
target.removeEventListener("blur", restore);
|
|
49567
|
-
if (this._restoreTarget === restore) this._restoreTarget = void 0;
|
|
49568
|
-
if (previous === null) target.removeAttribute("tabindex");
|
|
49569
|
-
else target.setAttribute("tabindex", previous);
|
|
49570
|
-
};
|
|
49571
|
-
this._restoreTarget = restore;
|
|
49572
|
-
target.setAttribute("tabindex", "0");
|
|
49573
|
-
target.addEventListener("blur", restore);
|
|
49574
|
-
target.focus();
|
|
49575
|
-
if (target.getRootNode().activeElement !== target) restore();
|
|
50274
|
+
this._restoreTarget = focusTemporarily(target) ?? void 0;
|
|
50275
|
+
if (!this._restoreTarget && false);
|
|
49576
50276
|
}
|
|
49577
50277
|
/**
|
|
49578
50278
|
* The first following sibling that is rendered. `focus()` does nothing on
|
|
@@ -49635,6 +50335,9 @@ var topNavigationBarStyles = css`
|
|
|
49635
50335
|
--_top-navigation-bar-logo-background-color: var(--semantics-brand-ribbon-color);
|
|
49636
50336
|
--_top-navigation-bar-wordmark-content-color: light-dark(var(--primitives-color-reference-lintblauw), var(--primitives-color-neutral-1000));
|
|
49637
50337
|
--_top-navigation-bar-wordmark-max-width: 280px;
|
|
50338
|
+
--_top-navigation-bar-wordmark-title-font: var(--primitives-font-body-sm-semi-bold-flat);
|
|
50339
|
+
--_top-navigation-bar-wordmark-subtitle-font: var(--primitives-font-body-xs-regular-flat);
|
|
50340
|
+
--_top-navigation-bar-wordmark-supporting-text-font: var(--primitives-font-body-xxs-regular-flat);
|
|
49638
50341
|
--_top-navigation-bar-max-width: var(--semantics-page-sections-body-max-width);
|
|
49639
50342
|
--_top-navigation-bar-title-sm-font: var(--primitives-font-display-6-sm);
|
|
49640
50343
|
--_top-navigation-bar-title-md-font: var(--primitives-font-display-5-sm);
|
|
@@ -49892,19 +50595,19 @@ var topNavigationBarStyles = css`
|
|
|
49892
50595
|
|
|
49893
50596
|
.top-navigation-bar__wordmark-title {
|
|
49894
50597
|
margin: 0;
|
|
49895
|
-
font: var(--
|
|
50598
|
+
font: var(--_top-navigation-bar-wordmark-title-font);
|
|
49896
50599
|
text-wrap: balance;
|
|
49897
50600
|
}
|
|
49898
50601
|
|
|
49899
50602
|
.top-navigation-bar__wordmark-subtitle {
|
|
49900
50603
|
margin: 0;
|
|
49901
|
-
font: var(--
|
|
50604
|
+
font: var(--_top-navigation-bar-wordmark-subtitle-font);
|
|
49902
50605
|
text-wrap: balance;
|
|
49903
50606
|
}
|
|
49904
50607
|
|
|
49905
50608
|
.top-navigation-bar__wordmark-supporting-text {
|
|
49906
50609
|
margin: 0;
|
|
49907
|
-
font: var(--
|
|
50610
|
+
font: var(--_top-navigation-bar-wordmark-supporting-text-font);
|
|
49908
50611
|
text-wrap: balance;
|
|
49909
50612
|
}
|
|
49910
50613
|
|
|
@@ -51148,7 +51851,7 @@ var nlddTabBarTranslations = { "components.tab-bar.overflow-action": "Meer tabs"
|
|
|
51148
51851
|
* @attr {string} variant - Visual mode: 'icon-and-text' | 'text' | 'icon'. When unset, the variant is inferred from each item's content. Drives the layout at every size.
|
|
51149
51852
|
* @attr {string} size - Size: 'md' | 'lg' (default: 'md'). 'lg' enlarges the touch target; the per-variant layout is preserved (icon-and-text stacks the icon over the text, text renders large text, icon renders a larger icon-only control).
|
|
51150
51853
|
* @attr {boolean} navigation - Renders a nav landmark instead of tablist; use for href-based items that navigate between routes
|
|
51151
|
-
* @attr {boolean} disabled - Disables the whole bar: dims it, blocks pointer interaction, and takes the tabs out of the tab order
|
|
51854
|
+
* @attr {boolean} disabled - Disables the whole bar: dims it, blocks pointer interaction, and takes the tabs out of the tab order. Avoid it where you can; the design guidelines say why.
|
|
51152
51855
|
* @attr {boolean} centered - Centers the tabs in the container (host fills the row, tabs group in the middle)
|
|
51153
51856
|
* @attr {string} accessible-label - Accessible name for the navigation region; defaults to 'Tabs'
|
|
51154
51857
|
* @attr {object} translations - Override translation keys (e.g. the overflow button label); unset keys fall back to Dutch.
|
|
@@ -53302,7 +54005,7 @@ var nlddPaginationTranslations = {
|
|
|
53302
54005
|
* @element nldd-pagination
|
|
53303
54006
|
* @attr {number} current - Currently active page (1-based)
|
|
53304
54007
|
* @attr {number} total - Total number of pages (recommended max: 200 for compact select performance)
|
|
53305
|
-
* @attr {boolean} disabled - Disabled state
|
|
54008
|
+
* @attr {boolean} disabled - Disabled state. Avoid it where you can; the design guidelines say why.
|
|
53306
54009
|
* @attr {boolean} centered - Centers the pagination in the container (host fills row, items grouped in the middle)
|
|
53307
54010
|
* @attr {string} href-pattern - URL pattern with a {page} placeholder, renders links instead of buttons
|
|
53308
54011
|
* @attr {object} translations - Translations; unspecified keys fall back to Dutch
|
|
@@ -53567,6 +54270,13 @@ function modalDialogTemplate(component) {
|
|
|
53567
54270
|
* A modal window with overlay backdrop, based on the native <dialog> element.
|
|
53568
54271
|
* Internally renders an <nldd-inline-dialog> for the visual structure.
|
|
53569
54272
|
*
|
|
54273
|
+
* Use it only when there is no way back, and give it a real choice: a dialog
|
|
54274
|
+
* with one button offers nothing to decide, so tell the user with an
|
|
54275
|
+
* nldd-notification or an inline message instead. In a destructive dialog the
|
|
54276
|
+
* safe way out comes first, as the primary button. Work that needs the page
|
|
54277
|
+
* as context, such as editing, belongs in an nldd-sheet. The design guidelines
|
|
54278
|
+
* say why. A dialog that opens with one action says so in development.
|
|
54279
|
+
*
|
|
53570
54280
|
* Open and close it with `open`, bound to your state together with the close
|
|
53571
54281
|
* event: the dialog clears `open` itself when the user closes it. show() and
|
|
53572
54282
|
* hide() do the same for code without a binding. Keep the dialog in the DOM
|
|
@@ -53587,7 +54297,7 @@ function modalDialogTemplate(component) {
|
|
|
53587
54297
|
* @slot notifications - Where the notifications area lands while this overlay is open, so a notification is not left inert behind it. Filled by the package; leave it alone.
|
|
53588
54298
|
*
|
|
53589
54299
|
* @fires open - When the dialog is opened
|
|
53590
|
-
* @fires close - When the dialog is fully closed. Does not bubble: overlays nest, and a listener on one dialog asking about that dialog should not also hear the form it opened.
|
|
54300
|
+
* @fires close - When the dialog is fully closed. Does not bubble: overlays nest, and a listener on one dialog asking about that dialog should not also hear the form it opened.
|
|
53591
54301
|
*
|
|
53592
54302
|
* @method show() - Opens the modal dialog
|
|
53593
54303
|
* @method hide() - Closes the modal dialog with a closing animation
|
|
@@ -53609,6 +54319,7 @@ var NLDDModalDialog = (_NLDDModalDialog = class NLDDModalDialog extends LitEleme
|
|
|
53609
54319
|
this.open = false;
|
|
53610
54320
|
this._closing = false;
|
|
53611
54321
|
this._cancelPendingOpen = null;
|
|
54322
|
+
this._warnedSingleAction = false;
|
|
53612
54323
|
this._closeFallback = 0;
|
|
53613
54324
|
this._pointerDownOnBackdrop = false;
|
|
53614
54325
|
this._handleDialogPointerDown = (e) => {
|
|
@@ -53652,6 +54363,13 @@ var NLDDModalDialog = (_NLDDModalDialog = class NLDDModalDialog extends LitEleme
|
|
|
53652
54363
|
composed: true
|
|
53653
54364
|
}));
|
|
53654
54365
|
}
|
|
54366
|
+
/** DEV-only: warns once when the dialog opens with a single action. */
|
|
54367
|
+
_checkActions() {
|
|
54368
|
+
if (this._warnedSingleAction) return;
|
|
54369
|
+
if ([...this.children].filter((child) => child.getAttribute("slot") === "actions").length !== 1) return;
|
|
54370
|
+
this._warnedSingleAction = true;
|
|
54371
|
+
console.warn("<nldd-modal-dialog>: The dialog has one action, so there is nothing to choose. Tell the user with an nldd-notification or an inline message instead, or give the dialog a real choice.", this);
|
|
54372
|
+
}
|
|
53655
54373
|
_manageFocus() {
|
|
53656
54374
|
if (focusAutofocusTarget(this)) return;
|
|
53657
54375
|
const dialog = this._dialog;
|