@nldd/design-system 0.8.100 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +325 -16
- package/dist/components/actions/button/button.d.ts +5 -3
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.d.ts +3 -1
- package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.js +3 -1
- package/dist/components/actions/button/button.i18n.js.map +1 -1
- package/dist/components/actions/button/button.js +1 -1
- package/dist/components/actions/button/button.styles.js +2 -2
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +9 -10
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +5 -3
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +1 -1
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +7 -7
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +1 -1
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +4 -2
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/components.js +357 -122
- package/dist/components/content/avatar/avatar.d.ts +5 -3
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts +3 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.js +3 -1
- package/dist/components/content/avatar/avatar.i18n.js.map +1 -1
- package/dist/components/content/avatar/avatar.js +1 -1
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.template.js +6 -6
- package/dist/components/content/avatar/avatar.template.js.map +1 -1
- package/dist/components/{icon-button-BtU8DX64.js → icon-button-BVhiOwX9.js} +10 -5
- package/dist/components/layout/card/card.d.ts +6 -4
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.d.ts +3 -1
- package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.js +3 -1
- package/dist/components/layout/card/card.i18n.js.map +1 -1
- package/dist/components/layout/card/card.js +2 -2
- package/dist/components/layout/card/card.template.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.js +6 -6
- package/dist/components/layout/card/card.template.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +9 -0
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.js +29 -1
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +20 -13
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +7 -3
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +31 -4
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +16 -0
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +61 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +5 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +25 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +28 -7
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js +8 -4
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +5 -2
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +9 -4
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +12 -5
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +15 -7
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +9 -2
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts +7 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +6 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +7 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +12 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +6 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +6 -4
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.d.ts +3 -1
- package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.js +3 -1
- package/dist/components/navigation/link/link.i18n.js.map +1 -1
- package/dist/components/navigation/link/link.js +2 -2
- package/dist/components/navigation/link/link.styles.js +2 -2
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +7 -8
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +1 -14
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +7 -55
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/{with-translations-C8_0-9y8.js → with-translations-C6QfP6_S.js} +24 -1
- package/dist/nldd.min.js +753 -707
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +24 -7
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +24 -7
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +24 -7
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +2 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +24 -7
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +24 -7
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +29 -16
- package/dist/utilities/focus-target.d.ts +23 -0
- package/dist/utilities/focus-target.d.ts.map +1 -0
- package/dist/utilities/focus-target.js +70 -0
- package/dist/utilities/focus-target.js.map +1 -0
- package/dist/utilities/link-hint.d.ts +18 -0
- package/dist/utilities/link-hint.d.ts.map +1 -0
- package/dist/utilities/link-hint.js +29 -0
- package/dist/utilities/link-hint.js.map +1 -0
- package/package.json +2 -1
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* @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
|
|
40
40
|
* @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.
|
|
41
41
|
* @attr {boolean} button - Makes the avatar a button; ignored when `href` is set
|
|
42
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab"
|
|
42
|
+
* @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.
|
|
43
43
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
44
44
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
45
45
|
*
|
|
@@ -79,9 +79,11 @@ export type AvatarColor = 'neutral' | 'inherit';
|
|
|
79
79
|
export type AvatarSize = 'full' | '16' | '20' | '24' | '28' | '32' | '40' | '44' | '48' | '56' | '64' | '80' | '96';
|
|
80
80
|
declare const NLDDAvatar_base: (abstract new (...args: any[]) => LitElement & {
|
|
81
81
|
translations: Partial<{
|
|
82
|
-
'components.avatar.
|
|
82
|
+
'components.avatar.link-hint-new-tab-lowercase-label': string;
|
|
83
|
+
'components.avatar.link-hint-external-lowercase-label': string;
|
|
84
|
+
'components.avatar.link-hint-external-new-tab-lowercase-label': string;
|
|
83
85
|
}>;
|
|
84
|
-
_t(key: "components.avatar.
|
|
86
|
+
_t(key: "components.avatar.link-hint-new-tab-lowercase-label" | "components.avatar.link-hint-external-lowercase-label" | "components.avatar.link-hint-external-new-tab-lowercase-label", vars?: Record<string, string | number>): string;
|
|
85
87
|
}) & typeof LitElement;
|
|
86
88
|
export declare class NLDDAvatar extends NLDDAvatar_base {
|
|
87
89
|
static styles: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,E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SAAM;IAEV;+DAC2D;IAE3D,eAAe,SAAM;IAGrB,UAAU,UAAS;IAEnB;;4EAEwE;IAExE,aAAa,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAW;IAEvD;iFAC6E;IAE7E,IAAI,SAAM;IAEV;;;wEAGoE;IAEpE,KAAK,UAAS;IAEd;6EACyE;IAEzE,MAAM,UAAS;IAGf,MAAM,SAAM;IAGZ,GAAG,SAAM;IAET,gDAAgD;IAChD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,OAAO,CAAC,YAAY,CAAS;IAE7B;mEAC+D;IAE/D,YAAY,UAAS;IAErB;2EACuE;IACvE,IAAI,gBAAgB,IAAI,MAAM,CAO7B;IAED,8DAA8D;IAC9D,IAAI,YAAY,IAAI,MAAM,CAGzB;IAED,aAAa,QAAO,IAAI,CAEtB;IAEF;;mFAE+E;IAC/E,OAAO,CAAC,eAAe,CAAiD;IAE/D,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAS/C,YAAY,IAAI,IAAI;IAKpB,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAK5B,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAiDrD;;;;kEAI8D;IAC9D,OAAO,CAAC,YAAY;IAaX,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const nlddAvatarTranslations: {
|
|
2
|
-
'components.avatar.
|
|
2
|
+
'components.avatar.link-hint-new-tab-lowercase-label': string;
|
|
3
|
+
'components.avatar.link-hint-external-lowercase-label': string;
|
|
4
|
+
'components.avatar.link-hint-external-new-tab-lowercase-label': string;
|
|
3
5
|
};
|
|
4
6
|
export type NLDDAvatarTranslations = typeof nlddAvatarTranslations;
|
|
5
7
|
//# sourceMappingURL=avatar.i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"avatar.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const nlddAvatarTranslations = {
|
|
2
|
-
'components.avatar.
|
|
2
|
+
'components.avatar.link-hint-new-tab-lowercase-label': 'opent in nieuw tabblad',
|
|
3
|
+
'components.avatar.link-hint-external-lowercase-label': 'andere website',
|
|
4
|
+
'components.avatar.link-hint-external-new-tab-lowercase-label': 'andere website, opent in nieuw tabblad',
|
|
3
5
|
};
|
|
4
6
|
//# sourceMappingURL=avatar.i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.i18n.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,
|
|
1
|
+
{"version":3,"file":"avatar.i18n.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,qDAAqD,EAAE,wBAAwB;IAC/E,sDAAsD,EAAE,gBAAgB;IACxE,8DAA8D,EAAE,wCAAwC;CACxG,CAAC"}
|
|
@@ -45,7 +45,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
45
45
|
* @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
|
|
46
46
|
* @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.
|
|
47
47
|
* @attr {boolean} button - Makes the avatar a button; ignored when `href` is set
|
|
48
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab"
|
|
48
|
+
* @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.
|
|
49
49
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
50
50
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
51
51
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar.template.d.ts","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,uBAAuB,CAAC;AAE/B,wBAAgB,cAAc,CAAC,SAAS,EAAE,UAAU,GAAG,cAAc,CA6EpE"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
2
|
import { linkRel } from '../../../utilities/link-rel.js';
|
|
3
|
+
import { linkHintKey } from '../../../utilities/link-hint.js';
|
|
3
4
|
import '../tooltip/tooltip.js';
|
|
4
5
|
export function avatarTemplate(component) {
|
|
5
6
|
const showImage = Boolean(component.src) && !component._imageFailed;
|
|
6
7
|
const initials = component.resolvedInitials;
|
|
7
8
|
const showInitials = !showImage && initials !== '';
|
|
8
9
|
const showIcon = !showImage && !showInitials;
|
|
9
|
-
// A
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
: '';
|
|
10
|
+
// A link to another website or a new tab says so (WCAG 2.1 SC 3.2.2).
|
|
11
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
12
|
+
const linkHint = hintKey ? component._t(`components.avatar.${hintKey}`) : '';
|
|
13
13
|
// The control shows no text of its own, so its name comes from
|
|
14
|
-
// accessible-label (or the name it already carries), plus the
|
|
15
|
-
const controlLabel = [component.accessibleLabel || component.name,
|
|
14
|
+
// accessible-label (or the name it already carries), plus the link hint.
|
|
15
|
+
const controlLabel = [component.accessibleLabel || component.name, linkHint]
|
|
16
16
|
.filter(Boolean).join(', ') || nothing;
|
|
17
17
|
// sizes="auto" (valid because the image is lazy) resolves srcset against the
|
|
18
18
|
// avatar's real rendered width; without a fixed size we can't know it here,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.template.js","sourceRoot":"","sources":["../../../../src/components/content/avatar/avatar.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,uBAAuB,CAAC;AAE/B,MAAM,UAAU,cAAc,CAAC,SAAqB;IACnD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;IACpE,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAC;IAC5C,MAAM,YAAY,GAAG,CAAC,SAAS,IAAI,QAAQ,KAAK,EAAE,CAAC;IACnD,MAAM,QAAQ,GAAG,CAAC,SAAS,IAAI,CAAC,YAAY,CAAC;IAC7C,
|
|
1
|
+
{"version":3,"file":"avatar.template.js","sourceRo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D,CAAC,CAAC,KAAK,CAAC;AACV,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as inheritedTextReset } from "./shadow-resets-CPa58rmc.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as linkRel, i as linkHintKey, r as translate, t as withTranslations } from "./with-translations-C6QfP6_S.js";
|
|
3
3
|
import { t as __decorate } from "./decorate-CO88j7Lc.js";
|
|
4
4
|
import { t as reflectNonDefault } from "./reflect-non-default-OLaK60rT.js";
|
|
5
5
|
import "./icon-D_ZGezHx.js";
|
|
@@ -1401,8 +1401,9 @@ function renderContent(component) {
|
|
|
1401
1401
|
`;
|
|
1402
1402
|
}
|
|
1403
1403
|
function template() {
|
|
1404
|
-
const
|
|
1405
|
-
const
|
|
1404
|
+
const hintKey = linkHintKey(this.href, this.target);
|
|
1405
|
+
const linkHint = hintKey ? this._t(`components.icon-button.${hintKey}`) : "";
|
|
1406
|
+
const label = [this.accessibleLabel || this.text || "", linkHint].filter(Boolean).join(", ") || nothing;
|
|
1406
1407
|
const content = renderContent(this);
|
|
1407
1408
|
const tooltipText = this.accessibleLabel || (this.size !== "lg" || this.hideLgText ? this.text : "");
|
|
1408
1409
|
const ariaExpanded = this.expandable || !!this.popupType ? String(this.expanded) : this.expanded ? "true" : nothing;
|
|
@@ -1471,7 +1472,11 @@ function template() {
|
|
|
1471
1472
|
}
|
|
1472
1473
|
//#endregion
|
|
1473
1474
|
//#region src/components/actions/icon-button/icon-button.i18n.ts
|
|
1474
|
-
var nlddIconButtonTranslations = {
|
|
1475
|
+
var nlddIconButtonTranslations = {
|
|
1476
|
+
"components.icon-button.link-hint-new-tab-lowercase-label": "opent in nieuw tabblad",
|
|
1477
|
+
"components.icon-button.link-hint-external-lowercase-label": "andere website",
|
|
1478
|
+
"components.icon-button.link-hint-external-new-tab-lowercase-label": "andere website, opent in nieuw tabblad"
|
|
1479
|
+
};
|
|
1475
1480
|
//#endregion
|
|
1476
1481
|
//#region src/components/actions/icon-button/icon-button.ts
|
|
1477
1482
|
/**
|
|
@@ -1496,7 +1501,7 @@ var nlddIconButtonTranslations = { "components.icon-button.opens-in-new-tab-labe
|
|
|
1496
1501
|
* @attr {string} accessible-label - Accessible label for screen readers. Overrides text as aria-label and title tooltip. Use when the visible text alone lacks context for screen readers (e.g. text "Toon", accessible-label "Toon wachtwoord"). The text is still shown visually in lg size regardless.
|
|
1497
1502
|
* @attr {string} tooltip-timing - Forwarded to the inner nldd-tooltip's `timing`: 'delay' (the default, a 700 ms show-delay), 'instant', or 'never' (suppress the visual tooltip; screen readers still get the aria-label). Use 'never' when the surrounding context already explains the button (e.g. spin buttons in nldd-number-field, the chevron in nldd-split-button).
|
|
1498
1503
|
* @attr {string} href - When set, renders an <a> element instead of <button>
|
|
1499
|
-
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the "opens in new tab" announcement is folded into the aria-label for screen readers (WCAG 2.1 SC 3.2.2).
|
|
1504
|
+
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the "opens in new tab" announcement is folded into the aria-label 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.
|
|
1500
1505
|
* @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
1501
1506
|
* @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
|
|
1502
1507
|
* @attr {string} popovertarget - ID of a popover element to toggle; forwarded to the inner <button>
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @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
|
|
21
21
|
* @attr {string} accessible-label - Accessible name of the card; with `href`/`button` it names the link or button, otherwise the card region
|
|
22
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
22
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement)
|
|
23
23
|
* @attr {string} href - Makes the whole card a link to this URL (empty = no link)
|
|
24
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "
|
|
24
|
+
* @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.
|
|
25
25
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
26
26
|
* @attr {boolean} button - Makes the whole card a button; ignored when `href` is set
|
|
27
27
|
*
|
|
@@ -33,9 +33,11 @@ import { LitElement } from 'lit';
|
|
|
33
33
|
export type CardBackground = 'base' | 'tinted';
|
|
34
34
|
declare const NLDDCard_base: (abstract new (...args: any[]) => LitElement & {
|
|
35
35
|
translations: Partial<{
|
|
36
|
-
'components.card.
|
|
36
|
+
'components.card.link-hint-new-tab-lowercase-label': string;
|
|
37
|
+
'components.card.link-hint-external-lowercase-label': string;
|
|
38
|
+
'components.card.link-hint-external-new-tab-lowercase-label': string;
|
|
37
39
|
}>;
|
|
38
|
-
_t(key: "components.card.
|
|
40
|
+
_t(key: "components.card.link-hint-new-tab-lowercase-label" | "components.card.link-hint-external-lowercase-label" | "components.card.link-hint-external-new-tab-lowercase-label", vars?: Record<string, string | number>): string;
|
|
39
41
|
}) & typeof LitElement;
|
|
40
42
|
export declare class NLDDCard extends NLDDCard_base {
|
|
41
43
|
static styles: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAQjC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAQjC,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAC;;;;;;;;;AAE/C,qBACa,QAAS,SAAQ,aAAkD;IAC/E,OAAgB,MAAM,0BAAc;IAGpC,UAAU,EAAE,cAAc,CAAU;IAGpC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IAEpC;;yCAEqC;IAErC,IAAI,SAAM;IAGV,MAAM,SAAM;IAGZ,GAAG,SAAM;IAET;;;uDAGmD;IAEnD,MAAM,UAAS;IAEf,OAAO,CAAC,YAAY,CAAS;IAE7B;;;8DAG0D;IAE1D,OAAO,CAAC,cAAc,CAAS;IAE/B,OAAO,CAAC,UAAU,CAKhB;IAEF,OAAO,CAAC,WAAW,CAEjB;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc,CAOpB;IAEF,OAAO,CAAC,aAAa,CAInB;IAEO,iBAAiB;IAkBjB,OAAO,IAAI,IAAI;IAgBxB,aAAa,GAAI,GAAG,KAAK,KAAG,IAAI,CAI9B;IAEO,oBAAoB;IAQpB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;KACtB;CACD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const nlddCardTranslations: {
|
|
2
|
-
'components.card.
|
|
2
|
+
'components.card.link-hint-new-tab-lowercase-label': string;
|
|
3
|
+
'components.card.link-hint-external-lowercase-label': string;
|
|
4
|
+
'components.card.link-hint-external-new-tab-lowercase-label': string;
|
|
3
5
|
};
|
|
4
6
|
export type NLDDCardTranslations = typeof nlddCardTranslations;
|
|
5
7
|
//# sourceMappingURL=card.i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"card.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const nlddCardTranslations = {
|
|
2
|
-
'components.card.
|
|
2
|
+
'components.card.link-hint-new-tab-lowercase-label': 'opent in nieuw tabblad',
|
|
3
|
+
'components.card.link-hint-external-lowercase-label': 'andere website',
|
|
4
|
+
'components.card.link-hint-external-new-tab-lowercase-label': 'andere website, opent in nieuw tabblad',
|
|
3
5
|
};
|
|
4
6
|
//# sourceMappingURL=card.i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.i18n.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,
|
|
1
|
+
{"version":3,"file":"card.i18n.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,mDAAmD,EAAE,wBAAwB;IAC7E,oDAAoD,EAAE,gBAAgB;IACtE,4DAA4D,EAAE,wCAAwC;CACtG,CAAC"}
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*
|
|
20
20
|
* @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
|
|
21
21
|
* @attr {string} accessible-label - Accessible name of the card; with `href`/`button` it names the link or button, otherwise the card region
|
|
22
|
-
* @attr {object} translations - Override translation keys (e.g. the "
|
|
22
|
+
* @attr {object} translations - Override translation keys (e.g. the "opent in nieuw tabblad" announcement)
|
|
23
23
|
* @attr {string} href - Makes the whole card a link to this URL (empty = no link)
|
|
24
|
-
* @attr {string} target - Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "
|
|
24
|
+
* @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.
|
|
25
25
|
* @attr {string} rel - Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
26
26
|
* @attr {boolean} button - Makes the whole card a button; ignored when `href` is set
|
|
27
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.template.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"card.template.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAI1C,wBAAgB,YAAY,CAAC,SAAS,EAAE,QAAQ,GAAG,cAAc,CAiDhE"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { html, nothing } from 'lit';
|
|
2
2
|
import { linkRel } from '../../../utilities/link-rel.js';
|
|
3
|
+
import { linkHintKey } from '../../../utilities/link-hint.js';
|
|
3
4
|
export function cardTemplate(component) {
|
|
4
|
-
// A
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
: '';
|
|
5
|
+
// A link to another website or a new tab says so (WCAG 2.1 SC 3.2.2).
|
|
6
|
+
const hintKey = linkHintKey(component.href, component.target);
|
|
7
|
+
const linkHint = hintKey ? component._t(`components.card.${hintKey}`) : '';
|
|
8
8
|
// The overlay control has no text, so its name comes from aria-label, with
|
|
9
|
-
// the
|
|
9
|
+
// the link hint appended. accessible-label names the link or button when
|
|
10
10
|
// the card is interactive, the article otherwise — so the card carries
|
|
11
11
|
// exactly one name.
|
|
12
|
-
const linkLabel = [component.accessibleLabel,
|
|
12
|
+
const linkLabel = [component.accessibleLabel, linkHint].filter(Boolean).join(', ') || nothing;
|
|
13
13
|
const isInteractive = Boolean(component.href) || component.button;
|
|
14
14
|
return html `
|
|
15
15
|
<article class="card"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.template.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"card.template.js","sourceRoot":"","sources":["../../../../src/components/layout/card/card.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAkB,MAAM,KAAK,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,UAAU,YAAY,CAAC,SAAmB;IAC/C,sEAAsE;IACtE,MAAM,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,mBAAmB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,2EAA2E;IAC3E,yEAAyE;IACzE,uEAAuE;IACvE,oBAAoB;IACpB,MAAM,SAAS,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC;IAC9F,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC;IAClE,OAAO,IAAI,CAAA;;gBAEI,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,IAAI,OAAO,CAAC;;KAE3E,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;;YAEd,SAAS,CAAC,IAAI;cACZ,SAAS,CAAC,MAAM,IAAI,OAAO;WAC9B,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,OAAO;kBAC5C,SAAS;;IAEvB,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;;;kBAGZ,SAAS;;IAEvB,CAAC,CAAC,CAAC,OAAO;;;;;;mBAMK,SAAS,CAAC,aAAa;;;;;;;;;;;mBAWvB,SAAS,CAAC,aAAa;;;;;EAKxC,CAAC;AACH,CAAC"}
|
|
@@ -16,5 +16,14 @@ interface CornerHost extends HTMLElement {
|
|
|
16
16
|
* language, both are removed and the hero is rectangular.
|
|
17
17
|
*/
|
|
18
18
|
export declare function applyCorner(host: CornerHost): void;
|
|
19
|
+
/**
|
|
20
|
+
* Caps the radius at a third of the shortest side of the area it rounds, so a
|
|
21
|
+
* low hero (a single title without media, a small `media-height`) keeps a
|
|
22
|
+
* corner rather than turning into a drop. Fed by a ResizeObserver on the media
|
|
23
|
+
* and the panel; the panel's own limit only counts without media, where it is
|
|
24
|
+
* the whole hero. An area that is not shown measures zero and keeps its limit.
|
|
25
|
+
*/
|
|
26
|
+
export declare function limitCorner(host: HTMLElement, entries: readonly ResizeObserverEntry[]): void;
|
|
27
|
+
export declare function clearCornerLimits(host: HTMLElement): void;
|
|
19
28
|
export {};
|
|
20
29
|
//# sourceMappingURL=hero-corner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-corner.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAMnF,gDAAgD;AAChD,UAAU,UAAW,SAAQ,WAAW;IACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"hero-corner.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAMnF,gDAAgD;AAChD,UAAU,UAAW,SAAQ,WAAW;IACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B;AAsDD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAqDlD;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,mBAAmB,EAAE,GAAG,IAAI,CAS5F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAEzD"}
|
|
@@ -9,6 +9,11 @@ const AUTO_MEDIA_CORNER = {
|
|
|
9
9
|
'left': 'top-right',
|
|
10
10
|
'right': 'top-left',
|
|
11
11
|
};
|
|
12
|
+
/* Without media the panel is the whole hero: the free corner is at the top,
|
|
13
|
+
* on the side the text does not start from. */
|
|
14
|
+
function autoCornerWithoutMedia(position) {
|
|
15
|
+
return position.endsWith('right') ? 'top-left' : 'top-right';
|
|
16
|
+
}
|
|
12
17
|
/* The panel's own corner: the one pointing diagonally into the media. A panel
|
|
13
18
|
* that spans a full side has none. */
|
|
14
19
|
const MAIN_CORNER = {
|
|
@@ -75,7 +80,7 @@ export function applyCorner(host) {
|
|
|
75
80
|
const value = host.corner.trim();
|
|
76
81
|
const chosen = CORNERS.includes(value) ? value : null;
|
|
77
82
|
const covered = host._hasMedia ? coveredCorners(host, position) : [];
|
|
78
|
-
let mediaCorner = chosen ?? AUTO_MEDIA_CORNER[position];
|
|
83
|
+
let mediaCorner = chosen ?? (host._hasMedia ? AUTO_MEDIA_CORNER[position] : autoCornerWithoutMedia(host.mainPosition));
|
|
79
84
|
if (!chosen && covered.includes(mediaCorner)) {
|
|
80
85
|
// A full-width strip covers both corners on its edge: move to the
|
|
81
86
|
// other edge, on the same side.
|
|
@@ -100,4 +105,27 @@ export function applyCorner(host) {
|
|
|
100
105
|
warnOnce(host, 'width-full', '<nldd-hero>: corner with width="full" runs the hero to the edge of the screen. A shape with a rounded corner always keeps a margin around it; leave width="full" off or drop the corner.');
|
|
101
106
|
}
|
|
102
107
|
}
|
|
108
|
+
const LIMITS = ['--_hero-media-corner-limit', '--_hero-main-corner-limit'];
|
|
109
|
+
/**
|
|
110
|
+
* Caps the radius at a third of the shortest side of the area it rounds, so a
|
|
111
|
+
* low hero (a single title without media, a small `media-height`) keeps a
|
|
112
|
+
* corner rather than turning into a drop. Fed by a ResizeObserver on the media
|
|
113
|
+
* and the panel; the panel's own limit only counts without media, where it is
|
|
114
|
+
* the whole hero. An area that is not shown measures zero and keeps its limit.
|
|
115
|
+
*/
|
|
116
|
+
export function limitCorner(host, entries) {
|
|
117
|
+
for (const entry of entries) {
|
|
118
|
+
const box = entry.borderBoxSize?.[0];
|
|
119
|
+
const width = box?.inlineSize ?? entry.contentRect.width;
|
|
120
|
+
const height = box?.blockSize ?? entry.contentRect.height;
|
|
121
|
+
if (!width || !height)
|
|
122
|
+
continue;
|
|
123
|
+
const limit = entry.target.classList.contains('hero__media') ? LIMITS[0] : LIMITS[1];
|
|
124
|
+
host.style.setProperty(limit, `${Math.min(width, height) / 3}px`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
export function clearCornerLimits(host) {
|
|
128
|
+
for (const limit of LIMITS)
|
|
129
|
+
host.style.removeProperty(limit);
|
|
130
|
+
}
|
|
103
131
|
//# sourceMappingURL=hero-corner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-corner.js","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.ts"],"names":[],"mappings":"AAMA,MAAM,OAAO,GAA0B,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;AAYhG;0EAC0E;AAC1E,MAAM,iBAAiB,GAAuC;IAC7D,aAAa,EAAE,WAAW;IAC1B,cAAc,EAAE,aAAa;IAC7B,UAAU,EAAE,WAAW;IACvB,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,UAAU;CACnB,CAAC;AAEF;sCACsC;AACtC,MAAM,WAAW,GAA8C;IAC9D,aAAa,EAAE,WAAW;IAC1B,cAAc,EAAE,UAAU;IAC1B,UAAU,EAAE,cAAc;IAC1B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CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-corner.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"hero-corner.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,yBAmI5B,CAAC"}
|
|
@@ -11,12 +11,15 @@ export const heroCornerStyles = css `
|
|
|
11
11
|
|
|
12
12
|
:host([data-media-corner]) {
|
|
13
13
|
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-sm-width) * 1.5);
|
|
14
|
+
--_hero-media-corner-limit: initial;
|
|
15
|
+
--_hero-main-corner-limit: initial;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
/* On .hero, not :host: a var() resolves where it is declared, so on :host
|
|
17
19
|
this would halve the sm radius at every breakpoint. */
|
|
18
20
|
:host([data-media-corner]) .hero {
|
|
19
|
-
--_hero-
|
|
21
|
+
--_hero-media-corner-radius: min(var(--_hero-corner-radius), var(--_hero-media-corner-limit, var(--_hero-corner-radius)));
|
|
22
|
+
--_hero-main-corner-radius: calc(var(--_hero-media-corner-radius) / 2);
|
|
20
23
|
|
|
21
24
|
@container (min-width: ${mdMin}) and (max-width: ${mdMax}) {
|
|
22
25
|
--_hero-corner-radius: calc(var(--semantics-brand-ribbon-md-width) * 2);
|
|
@@ -27,6 +30,10 @@ export const heroCornerStyles = css `
|
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
:host([data-media-corner]:not([data-has-media])) .hero {
|
|
34
|
+
--_hero-main-corner-radius: min(var(--_hero-corner-radius) / 2, var(--_hero-main-corner-limit, var(--_hero-corner-radius)));
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
/* ## Contained */
|
|
31
38
|
|
|
32
39
|
:host([data-media-corner][data-has-media]) .hero {
|
|
@@ -50,30 +57,30 @@ export const heroCornerStyles = css `
|
|
|
50
57
|
/* ## Media */
|
|
51
58
|
|
|
52
59
|
:host([data-has-media][data-media-corner="top-left"]) .hero__media {
|
|
53
|
-
border-top-left-radius: var(--_hero-corner-radius);
|
|
60
|
+
border-top-left-radius: var(--_hero-media-corner-radius);
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
:host([data-has-media][data-media-corner="top-right"]) .hero__media {
|
|
57
|
-
border-top-right-radius: var(--_hero-corner-radius);
|
|
64
|
+
border-top-right-radius: var(--_hero-media-corner-radius);
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
:host([data-has-media][data-media-corner="bottom-left"]) .hero__media {
|
|
61
68
|
@container (min-width: ${mdMin}) {
|
|
62
|
-
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
69
|
+
border-bottom-left-radius: var(--_hero-media-corner-radius);
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
@container (max-width: ${smMax}) {
|
|
66
|
-
border-top-left-radius: var(--_hero-corner-radius);
|
|
73
|
+
border-top-left-radius: var(--_hero-media-corner-radius);
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
:host([data-has-media][data-media-corner="bottom-right"]) .hero__media {
|
|
71
78
|
@container (min-width: ${mdMin}) {
|
|
72
|
-
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
79
|
+
border-bottom-right-radius: var(--_hero-media-corner-radius);
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
@container (max-width: ${smMax}) {
|
|
76
|
-
border-top-right-radius: var(--_hero-corner-radius);
|
|
83
|
+
border-top-right-radius: var(--_hero-media-corner-radius);
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
|
|
@@ -106,27 +113,27 @@ export const heroCornerStyles = css `
|
|
|
106
113
|
/* ## Without media */
|
|
107
114
|
|
|
108
115
|
:host(:not([data-has-media])[data-media-corner="top-left"]) :is(.hero__body, .hero__main) {
|
|
109
|
-
border-top-left-radius: var(--_hero-corner-radius);
|
|
116
|
+
border-top-left-radius: var(--_hero-main-corner-radius);
|
|
110
117
|
}
|
|
111
118
|
|
|
112
119
|
:host(:not([data-has-media])[data-media-corner="top-right"]) :is(.hero__body, .hero__main) {
|
|
113
|
-
border-top-right-radius: var(--_hero-corner-radius);
|
|
120
|
+
border-top-right-radius: var(--_hero-main-corner-radius);
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
:host(:not([data-has-media])[data-media-corner="bottom-left"]) :is(.hero__body, .hero__main) {
|
|
117
|
-
border-bottom-left-radius: var(--_hero-corner-radius);
|
|
124
|
+
border-bottom-left-radius: var(--_hero-main-corner-radius);
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
:host(:not([data-has-media])[data-media-corner="bottom-right"]) :is(.hero__body, .hero__main) {
|
|
121
|
-
border-bottom-right-radius: var(--_hero-corner-radius);
|
|
128
|
+
border-bottom-right-radius: var(--_hero-main-corner-radius);
|
|
122
129
|
}
|
|
123
130
|
|
|
124
131
|
:host(:not([data-has-media]):is([data-media-corner="top-left"], [data-media-corner="bottom-left"])) .hero__main {
|
|
125
|
-
padding-left: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
132
|
+
padding-left: calc(var(--_hero-main-padding) + var(--_hero-main-corner-radius) / 2);
|
|
126
133
|
}
|
|
127
134
|
|
|
128
135
|
:host(:not([data-has-media]):is([data-media-corner="top-right"], [data-media-corner="bottom-right"])) .hero__main {
|
|
129
|
-
padding-right: calc(var(--_hero-main-padding) + var(--_hero-corner-radius) / 2);
|
|
136
|
+
padding-right: calc(var(--_hero-main-padding) + var(--_hero-main-corner-radius) / 2);
|
|
130
137
|
}
|
|
131
138
|
`;
|
|
132
139
|
//# sourceMappingURL=hero-corner.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero-corner.styles.js","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"hero-corner.styles.js","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero-corner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;2BAiBR,KAAK,qBAAqB,KAAK;;;;2BAI/B,KAAK;;;;;;;;;;;;2BAYL,KAAK;;;;;;2BAML,KAAK;;;;;;2BAML,KAAK;;;;;;;;;;;;;;;;2BAgBL,KAAK;;;;2BAIL,KAAK;;;;;;2BAML,KAAK;;;;2BAIL,KAAK;;;;;;;;2BAQL,KAAK;;;;;;2BAML,KAAK;;;;;;2BAML,KAAK;;;;;;2BAML,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/B,CAAC"}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
* @attr {string} width - Body max-width; 'full' removes the bound (section API)
|
|
46
46
|
* @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.
|
|
47
47
|
* @attr {string} padding-block - Block padding override, also per edge and responsive (section API)
|
|
48
|
-
* @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.
|
|
48
|
+
* @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"`
|
|
49
49
|
* @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
|
|
50
50
|
* @attr {string} main-background - Surface color of the panel: 'base' (the base surface)
|
|
51
51
|
* or a category color — 'accent' (default) or a Rijkshuisstijl color such as
|
|
@@ -95,8 +95,9 @@ export declare class NLDDHero extends NLDDHero_base {
|
|
|
95
95
|
static styles: import("lit").CSSResult[];
|
|
96
96
|
/** Width mode: 'full' (removes body max-width) or any CSS length. */
|
|
97
97
|
width: string;
|
|
98
|
-
/** Rounds one corner of the media area and one of the panel
|
|
99
|
-
*
|
|
98
|
+
/** Rounds one corner of the media area and one of the panel, or without
|
|
99
|
+
* media one corner of the hero. An empty value lets the hero choose the
|
|
100
|
+
* corner from `main-position`. */
|
|
100
101
|
corner: string | null;
|
|
101
102
|
layout: HeroLayout;
|
|
102
103
|
mainBackground: HeroMainBackground;
|
|
@@ -121,6 +122,9 @@ export declare class NLDDHero extends NLDDHero_base {
|
|
|
121
122
|
connectedCallback(): void;
|
|
122
123
|
disconnectedCallback(): void;
|
|
123
124
|
updated(changed: PropertyValues): void;
|
|
125
|
+
/** Measures the rounded areas, so the radius never outgrows them. */
|
|
126
|
+
private _cornerObserver;
|
|
127
|
+
private _watchCorner;
|
|
124
128
|
/** DEV-only latch for the `height` warning. */
|
|
125
129
|
private _warnedHeight;
|
|
126
130
|
/** DEV-only: watches an overlap hero for a panel that does not reach below its image. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/page-sections/hero/hero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAStD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,MAAM,GAAG,OAAO,CA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