@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
package/dist/types/vue.d.ts
CHANGED
|
@@ -201,7 +201,7 @@ declare module 'vue' {
|
|
|
201
201
|
'noTab'?: NLDDAvatar['noTab'];
|
|
202
202
|
/** Makes the avatar a button; ignored when `href` is set */
|
|
203
203
|
'button'?: NLDDAvatar['button'];
|
|
204
|
-
/** Link target for href (e.g. '_blank'); completes rel and announces "Opens in a new tab" */
|
|
204
|
+
/** 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. */
|
|
205
205
|
'target'?: NLDDAvatar['target'];
|
|
206
206
|
/** Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
207
207
|
'rel'?: NLDDAvatar['rel'];
|
|
@@ -380,7 +380,7 @@ declare module 'vue' {
|
|
|
380
380
|
'accessibleLabel'?: NLDDButton['accessibleLabel'];
|
|
381
381
|
/** When set, renders an <a> element instead of <button> */
|
|
382
382
|
'href'?: NLDDButton['href'];
|
|
383
|
-
/** 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). */
|
|
383
|
+
/** 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. */
|
|
384
384
|
'target'?: NLDDButton['target'];
|
|
385
385
|
/** Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
386
386
|
'rel'?: NLDDButton['rel'];
|
|
@@ -424,13 +424,13 @@ declare module 'vue' {
|
|
|
424
424
|
'accessibleLabel'?: NLDDCard['accessibleLabel'];
|
|
425
425
|
/** Makes the whole card a link to this URL (empty = no link) */
|
|
426
426
|
'href'?: NLDDCard['href'];
|
|
427
|
-
/** Link target for href (e.g. '_blank'); adjusts rel automatically and adds an "
|
|
427
|
+
/** 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. */
|
|
428
428
|
'target'?: NLDDCard['target'];
|
|
429
429
|
/** Link rel for href; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
430
430
|
'rel'?: NLDDCard['rel'];
|
|
431
431
|
/** Makes the whole card a button; ignored when `href` is set */
|
|
432
432
|
'button'?: NLDDCard['button'];
|
|
433
|
-
/** Override translation keys (e.g. the "
|
|
433
|
+
/** Override translation keys (e.g. the "opent in nieuw tabblad" announcement) */
|
|
434
434
|
'translations'?: NLDDCard['translations'];
|
|
435
435
|
};
|
|
436
436
|
|
|
@@ -1183,7 +1183,7 @@ declare module 'vue' {
|
|
|
1183
1183
|
type NLDDHeroProps = {
|
|
1184
1184
|
/** Body max-width; 'full' removes the bound (section API) */
|
|
1185
1185
|
'width'?: NLDDHero['width'];
|
|
1186
|
-
/** 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.
|
|
1186
|
+
/** 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"` */
|
|
1187
1187
|
'corner'?: NLDDHero['corner'];
|
|
1188
1188
|
/** 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 */
|
|
1189
1189
|
'layout'?: NLDDHero['layout'];
|
|
@@ -1328,7 +1328,7 @@ declare module 'vue' {
|
|
|
1328
1328
|
'tooltipTiming'?: NLDDIconButton['tooltipTiming'];
|
|
1329
1329
|
/** When set, renders an <a> element instead of <button> */
|
|
1330
1330
|
'href'?: NLDDIconButton['href'];
|
|
1331
|
-
/** 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). */
|
|
1331
|
+
/** 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. */
|
|
1332
1332
|
'target'?: NLDDIconButton['target'];
|
|
1333
1333
|
/** Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
1334
1334
|
'rel'?: NLDDIconButton['rel'];
|
|
@@ -1510,7 +1510,7 @@ declare module 'vue' {
|
|
|
1510
1510
|
type NLDDLinkProps = {
|
|
1511
1511
|
/** Link target */
|
|
1512
1512
|
'href'?: NLDDLink['href'];
|
|
1513
|
-
/** Link target (e.g. '_blank'); adjusts rel automatically. With '_blank' the link adds a visually hidden "
|
|
1513
|
+
/** 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. */
|
|
1514
1514
|
'target'?: NLDDLink['target'];
|
|
1515
1515
|
/** Link rel attribute; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
1516
1516
|
'rel'?: NLDDLink['rel'];
|
|
@@ -1536,7 +1536,7 @@ declare module 'vue' {
|
|
|
1536
1536
|
'no-tab'?: NLDDLink['noTab'];
|
|
1537
1537
|
/** 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. */
|
|
1538
1538
|
'noTab'?: NLDDLink['noTab'];
|
|
1539
|
-
/** Override translation keys (e.g. the "
|
|
1539
|
+
/** Override translation keys (e.g. the "opent in nieuw tabblad" announcement); unset keys fall back to Dutch. */
|
|
1540
1540
|
'translations'?: NLDDLink['translations'];
|
|
1541
1541
|
};
|
|
1542
1542
|
|
|
@@ -1549,9 +1549,9 @@ declare module 'vue' {
|
|
|
1549
1549
|
'dividers'?: NLDDList['dividers'];
|
|
1550
1550
|
/** Listbox only: caps the options' scroll region at this CSS length (e.g. '320px'). Unset means no cap. */
|
|
1551
1551
|
'height'?: NLDDList['height'];
|
|
1552
|
-
/** Accessible name
|
|
1552
|
+
/** Accessible name: of the list in `type="list"`, of the search field in `type="listbox"`, and of the navigation landmark in `type="navigation"`, so several navigation lists on a page can be told apart. Falls back to the i18n default. An `aria-label` or `aria-labelledby` set on the element itself wins. */
|
|
1553
1553
|
'accessible-label'?: NLDDList['accessibleLabel'];
|
|
1554
|
-
/** Accessible name
|
|
1554
|
+
/** Accessible name: of the list in `type="list"`, of the search field in `type="listbox"`, and of the navigation landmark in `type="navigation"`, so several navigation lists on a page can be told apart. Falls back to the i18n default. An `aria-label` or `aria-labelledby` set on the element itself wins. */
|
|
1555
1555
|
'accessibleLabel'?: NLDDList['accessibleLabel'];
|
|
1556
1556
|
/** Override translation keys; unset keys fall back to Dutch */
|
|
1557
1557
|
'translations'?: NLDDList['translations'];
|
|
@@ -1568,7 +1568,7 @@ declare module 'vue' {
|
|
|
1568
1568
|
'size'?: NLDDListItem['size'];
|
|
1569
1569
|
/** Renders the item as an `<a>` with this URL. Wins over `checkbox` and `button`; without any of the three the item is a plain container with no action. */
|
|
1570
1570
|
'href'?: NLDDListItem['href'];
|
|
1571
|
-
/** Link target forwarded to the `<a>` (e.g. '_blank'); only applies with `href`. With '_blank' a visually hidden "opens in new tab" announcement is added for assistive technology. */
|
|
1571
|
+
/** Link target forwarded to the `<a>` (e.g. '_blank'); only applies with `href`. With '_blank' a visually hidden "opens in new tab" announcement is added for assistive technology. 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. */
|
|
1572
1572
|
'target'?: NLDDListItem['target'];
|
|
1573
1573
|
/** Link rel forwarded to the `<a>`, only with `href`; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
1574
1574
|
'rel'?: NLDDListItem['rel'];
|
|
@@ -1578,6 +1578,10 @@ declare module 'vue' {
|
|
|
1578
1578
|
'checkbox'?: NLDDListItem['checkbox'];
|
|
1579
1579
|
/** Makes the whole row one radio of a group: the action becomes a `role="radio"` button carrying `aria-checked`, and activation sets `checked` (never clears it) and fires `change`. Put the rows in an `nldd-list type="radiogroup"`, which is what makes them a set. Wins over `button`, loses to `href` and `checkbox`. The arrow keys move focus without checking, where a native radio group and `nldd-radio-button-group` check as they go: a row can carry more than a label, so stepping past one should not commit it. */
|
|
1580
1580
|
'radio'?: NLDDListItem['radio'];
|
|
1581
|
+
/** Accessible name of the row's action (its link, button, checkbox or radio), for a row whose text does not say enough on its own. It replaces the content of the whole row for assistive technology, the supporting text and a status included, so set it only when the row has no text of its own, or put everything that matters in it. The hint for another website or a new tab is added to it. */
|
|
1582
|
+
'accessible-label'?: NLDDListItem['accessibleLabel'];
|
|
1583
|
+
/** Accessible name of the row's action (its link, button, checkbox or radio), for a row whose text does not say enough on its own. It replaces the content of the whole row for assistive technology, the supporting text and a status included, so set it only when the row has no text of its own, or put everything that matters in it. The hint for another website or a new tab is added to it. */
|
|
1584
|
+
'accessibleLabel'?: NLDDListItem['accessibleLabel'];
|
|
1581
1585
|
/** Set by the parent `nldd-list` when its own `reorderable` is on (with `type="list"`); consumers do not set this. Serves as a CSS hook for drag handle visibility. */
|
|
1582
1586
|
'reorderable'?: NLDDListItem['reorderable'];
|
|
1583
1587
|
/** Marks the item as selected: it is one of the rows you picked. Selection is consumer-managed; the list never sets it. In a `navigation` parent it puts `aria-current` on the inner action, with `current-type` as its value; in a `listbox` parent it drives `aria-selected`. */
|
|
@@ -1586,7 +1590,7 @@ declare module 'vue' {
|
|
|
1586
1590
|
'checked'?: NLDDListItem['checked'];
|
|
1587
1591
|
/** Disclosure state. Drives the `children` group's visibility AND supplies `aria-expanded` — to the row's own control when the row is interactive, or to the segment marked `disclosure`. Written once either way; the item DEV-warns when there is nowhere for it to live. */
|
|
1588
1592
|
'expanded'?: NLDDListItem['expanded'];
|
|
1589
|
-
/** Marks the item as the one you are on: the page a menu row points at, the record a list has open. Exactly one row in a list carries it, where `selected` may be on many. It paints like `selected` at rest, and takes the highlighted fill while focus is anywhere in the row — including inside a nested `nldd-list-item-segment`, which is what a segmented row needs: the focus never reaches the row's own control, because there is none. In a `navigation` parent it puts `aria-current` on the inner action, with `current-type` as its value. On a segmented row set it on the segment that holds the link instead: the row reads `current` off its own segments and paints itself, so it is written once, where `aria-current` belongs. */
|
|
1593
|
+
/** Marks the item as the one you are on: the page a menu row points at, the record a list has open. Exactly one row in a list carries it, where `selected` may be on many. It paints like `selected` at rest, a quiet fill on purpose: the page itself says where you are, in its title, heading and breadcrumb, so the fill is an extra that should not pull attention from the content, and an automated check that flags its contrast is expected. It takes the highlighted fill while focus is anywhere in the row — including inside a nested `nldd-list-item-segment`, which is what a segmented row needs: the focus never reaches the row's own control, because there is none. In a `navigation` parent it puts `aria-current` on the inner action, with `current-type` as its value. On a segmented row set it on the segment that holds the link instead: the row reads `current` off its own segments and paints itself, so it is written once, where `aria-current` belongs. */
|
|
1590
1594
|
'current'?: NLDDListItem['current'];
|
|
1591
1595
|
/** The `aria-current` value a `current` or `selected` row puts on its action in a `navigation` parent (default 'page'). Use 'location' for a table of contents, whose rows point at sections of the page you are on. */
|
|
1592
1596
|
'current-type'?: NLDDListItem['currentType'];
|
|
@@ -1616,7 +1620,7 @@ declare module 'vue' {
|
|
|
1616
1620
|
'width'?: NLDDListItemSegment['width'];
|
|
1617
1621
|
/** Renders the segment as an `<a>` with this URL. Wins over `checkbox` and `button`. */
|
|
1618
1622
|
'href'?: NLDDListItemSegment['href'];
|
|
1619
|
-
/** Link target forwarded to the `<a>`; only applies with `href` */
|
|
1623
|
+
/** Link target forwarded to the `<a>`; only applies with `href`. With '_blank' a visually hidden "opent in nieuw tabblad" announcement is added. 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. With `accessible-label` the hint goes into the label. */
|
|
1620
1624
|
'target'?: NLDDListItemSegment['target'];
|
|
1621
1625
|
/** Link rel forwarded to the `<a>`, only with `href`; with target '_blank', 'noopener noreferrer' is added to whatever you set */
|
|
1622
1626
|
'rel'?: NLDDListItemSegment['rel'];
|
|
@@ -1656,6 +1660,7 @@ declare module 'vue' {
|
|
|
1656
1660
|
'divider-end'?: NLDDListItemSegment['dividerEnd'];
|
|
1657
1661
|
/** The row's divider stops after this cell. */
|
|
1658
1662
|
'dividerEnd'?: NLDDListItemSegment['dividerEnd'];
|
|
1663
|
+
'translations'?: NLDDListItemSegment['translations'];
|
|
1659
1664
|
/** Direct element reference to that popover, for one living in another tree (an nldd-menu reparented to the body). IDL-only, like the counterpart on nldd-icon-button, so the browser still treats this segment's button as the popover's invoker. */
|
|
1660
1665
|
'popoverTargetElement'?: NLDDListItemSegment['popoverTargetElement'];
|
|
1661
1666
|
/** Action the browser performs on click, mirroring popovertargetaction. */
|
|
@@ -2809,6 +2814,14 @@ declare module 'vue' {
|
|
|
2809
2814
|
'status'?: NLDDStepCell['status'];
|
|
2810
2815
|
/** 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 */
|
|
2811
2816
|
'size'?: NLDDStepCell['size'];
|
|
2817
|
+
/** 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 */
|
|
2818
|
+
'vertical-alignment'?: NLDDStepCell['verticalAlignment'];
|
|
2819
|
+
/** 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 */
|
|
2820
|
+
'verticalAlignment'?: NLDDStepCell['verticalAlignment'];
|
|
2821
|
+
/** 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 */
|
|
2822
|
+
'marker-offset'?: NLDDStepCell['markerOffset'];
|
|
2823
|
+
/** 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 */
|
|
2824
|
+
'markerOffset'?: NLDDStepCell['markerOffset'];
|
|
2812
2825
|
/** 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 */
|
|
2813
2826
|
'direction'?: NLDDStepCell['direction'];
|
|
2814
2827
|
/** 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 */
|
|
@@ -3549,7 +3562,7 @@ declare module 'vue' {
|
|
|
3549
3562
|
'supportingText'?: NLDDToolbarTitle['supportingText'];
|
|
3550
3563
|
/** 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. */
|
|
3551
3564
|
'href'?: NLDDToolbarTitle['href'];
|
|
3552
|
-
/** Where the link opens; only meaningful with `href`. `_blank` adds rel="noopener noreferrer" and a visually hidden "opens in a new tab" announcement. */
|
|
3565
|
+
/** 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. */
|
|
3553
3566
|
'target'?: NLDDToolbarTitle['target'];
|
|
3554
3567
|
/** Override translation keys (the new-tab announcement); unset keys fall back to Dutch. */
|
|
3555
3568
|
'translations'?: NLDDToolbarTitle['translations'];
|
|
@@ -3857,7 +3870,7 @@ declare module 'vue' {
|
|
|
3857
3870
|
'nldd-link': DefineComponent<NLDDLinkProps>;
|
|
3858
3871
|
/** A container for `nldd-list-item` elements. The `type` attribute switches the list's a11y role and behavior: - `list` (default) — `role="list"`, items `role="listitem"`. Reorderable allowed. - `radiogroup` — `role="radiogroup"`, for a set of `nldd-list-item radio` rows: one choice, laid out as rows so each option can carry a count or a second line. The rows step out of the accessibility tree themselves (`role="none"`), so the radios are the group's own children. The arrows move focus here and activation checks, rather than the selection following focus as it does in `nldd-radio-button-group`. - `tree` — `role="tree"`, items `role="treeitem"`. Branch rows put their child rows in their own `slot="children"`, which the item renders as a `role="group"`. Level, position and set size are NOT authored: the nesting represents the hierarchy, so assistive technology derives them. A branch row must carry `expanded`; the group is hidden while it is false. Visual indentation is the consumer's — repeat a spacer-cell per level. Comes with its own keyboard, see "Tree" below. - `navigation` — host `role="navigation"`, items with `selected` get `aria-current="page"` on their inner `<a>` or `<button>`. Sub-pages go in their parent row's `slot="children"`, which the item renders as a list inside the list item, so a screen reader hears the level and how many there are. They are always shown and the arrows walk them like any other row; a spacer-cell alone indents but says nothing. Visual indentation is still the consumer's. - `form` — rows that are not actions themselves: the controls inside them are. A row of a label and a field, a switch, a menu button, or a value you cannot change at all. Semantically the same as `list` (`role="list"`, `role="listitem"`), and everything visual is unchanged; what falls away is the keyboard of a list you walk through. No arrow navigation, so no promise of it either, and no tab stop on the row: Tab goes straight to the controls, in source order, the way it does in any form. Rows that ARE actions (`href`, `button`, `checkbox`, or a segment) contradict that and warn in development. SwiftUI draws the same line between `List` and `Form`, for the same reason. - `listbox` — an accessible, filterable listbox (combobox pattern). The list renders its OWN search input (`role="combobox"`) pinned above the options; `.list__items` becomes `role="listbox"` and items become `role="option"`. Focus stays in the input, the active option moves via `aria-activedescendant`, and filtering is consumer-managed via the `input` event (toggle `[hidden]` on items). See "Listbox" below. Selection state is consumer-managed: the list never mutates `selected` itself. A list you walk through answers to the arrow keys, and there is no attribute to switch that on. Whether the keys do something is not a property of one list: it is what a reader may assume about all of them, and a per-list setting made that unknowable from the outside. It follows the type, which you can see before you touch a key. - ArrowUp / ArrowDown — move focus between the rows there is something to do with. A row of nothing but text is skipped, because focus that leads nowhere is a dead end. - Home / End — the first / last of those rows. - Tab — the list is ONE tab stop, so Tab moves past it rather than through it. Within the current row Tab walks that row's own controls: a chevron beside a checkbox, a menu button at the end. The same controls in the other rows are held out of the tab order (`tabindex="-1"`, or `no-tab` on a design-system control that keeps its tab stop in its own shadow root), and so are this row's once focus leaves the list, so tabbing back in lands on the row again. - Escape — out of a control the row holds, back onto the row. One level up, where Shift+Tab is one step back. On the row itself the list claims nothing, so Escape carries on to whatever holds the list, and a control showing a menu keeps the first press for closing that menu. While focus sits in a control a row holds, the list stands down: those keys are the control's, and a list that took them anyway would pull focus out of a combo box or a text field mid-word. What the row IS — its own link, button or segments — keeps answering here. Arrows move focus only; selection stays consumer-managed. Three types answer differently, and all three say so on screen before you touch a key: a listbox runs its keyboard from its search field, a reorderable list moves rows with the arrows, and a form has no rows to move between at all. In `type="listbox"` the list owns a native `<input role="combobox">` (mirroring how `nldd-combo-box` wires an input to a slotted listbox). Keyboard, handled on the input so focus never leaves it: - ArrowDown / ArrowUp — move the active option among the VISIBLE (non-`[hidden]`) options (wrap around). - Home / End — first / last visible option. - Enter — activate the active option by triggering its inner action (a link navigates, a button fires the consumer's handler). Selection stays consumer-managed. - Escape — clear the search value (and refire `input`). On every active change the input's `aria-activedescendant` is set to the active option's id and the option is scrolled into view. The active option (`_highlighted` on the item, a highlight) is distinct from `selected`. Filtering is the consumer's job: listen to `input` (`{ detail: { value } }`) and toggle `[hidden]` on items; after the visible set changes the list resets the active option to the first visible one. `reorderable` and the roving arrow keys are ignored in listbox mode (listbox has its own keyboard). A tree adds to that keyboard, and counts the rows of an open branch as part of the order the arrows walk: - ArrowRight — opens a closed branch; on an open one it steps to its first child. - ArrowLeft — closes an open branch; on a leaf it steps out to the parent row. - Enter — follows the row: its own link or button, or on a segmented branch the first action that is not the chevron. A branch with only a chevron folds instead. - Space — open and close, the same as Right and Left. Only while focus sits on the row itself: a row that is its own control, and a segmented action you tabbed into, handle both keys themselves. Opening and closing runs through the row's own disclosure control — the segment marked `disclosure`, or the row itself when it is a button. The list activates that control rather than writing `expanded`, so the state keeps being set in one place: the consumer's handler. A row that is a link is never activated this way, since that would navigate away. The tree is one tab stop. Focus lands on the row itself when the row has no control of its own, because that is where `treeitem` sits and it makes assistive technology announce the row rather than a button inside it. Tab then walks the controls of THAT row (a chevron beside a checkbox, say) and leaves the list after the last one. A deliberate deviation: strictly speaking a row with several controls is a `treegrid`, not a `tree`. We keep the tree semantics — level and set size are what matters here, not rows and columns — and borrow the "Tab within the row" behavior from the grid pattern. Should a tree with real columns come up, that is when `treegrid` earns its own type. On reorder (type="list" + reorderable), the list dispatches `nldd-reorder` with `fromIndex` / `toIndex` and expects the consumer to mutate the DOM (or their data model that renders the DOM). Focus is restored to the moved item's drag handle via a single `requestAnimationFrame` — this assumes the consumer reorders **synchronously** in the event handler. Async renderers (React, Vue, …) that update the DOM on a later tick will miss the focus restore and should manage focus themselves after their render commits. */
|
|
3859
3872
|
'nldd-list': DefineComponent<NLDDListProps>;
|
|
3860
|
-
/** A row within an `nldd-list`. Renders as a link when `href` is set, as a checkbox when `checkbox` is set, as a button when `button` is set, or as a plain container otherwise. All cells and segments share one flat slot, in source order. With one action, make the row itself the control (`href`, `button`, `checkbox` or `radio`): the whole row is then one hit area. With two or more, give each its own `nldd-list-item-segment` and leave the row without an action of its own. Both at once nests a control inside a control, and the item warns about that in development. Two rules govern every row: 1. State fills always paint the WIDENED row geometry — the row box extended by the indicator inline inset on both sides — whether or not the row is interactive. Paint never differs between a selected plain row and a selected interactive row. 2. The widened strip belongs to the ROW, never to a segment. A row with any action (its own `href`/`button`/`checkbox`, or a slotted segment) pulls itself outward (`is-interactive` host class → negative inline margin) and pads the row block back by the same amount, so content stays on the grid. A row-wide action owns that padding itself, making the whole widened box one hit area; slotted segments stay in the grid, so their footprint is position-independent and tree columns line up at any depth. By default the divider starts at the row's first text or title cell, so the line lands on the words rather than on whatever leads up to them — an icon, an avatar, a checkbox, or the spacers a tree indents with. Rows of different shapes then still line their dividers up with each other, and a tree's dividers step inward with its indentation. Text inside an `nldd-list-item-segment` counts as the row's content, and the marker is that text cell rather than the action: the action carries its own inline padding, so its edge sits before the words. A row with no text or title cell keeps the full content width. Mark a cell with `divider-start` and/or `divider-end` to place it yourself instead — an explicit marker replaces the derived one entirely, so `divider-start` on the leading cell restores the full-width line. Multiple markers resolve as the union: first `divider-start` through last `divider-end`. A start past the last end is an authoring error — the item DEV-warns and falls back to the full content width. A branch row can disclose its children in two ways: a dedicated `nldd-list-item-segment[disclosure]` segment (only the chevron is clickable), or the row itself as the control (`button` + `expanded`, the whole row toggles). In the second case, mark the chevron's `nldd-icon-cell` with `disclosure` and the row turns it with `expanded` — the same affordance, without having to trade a clickable row for a turning chevron. `checkbox` makes the WHOLE row the control: the inner action becomes a `role="checkbox"` button carrying `aria-checked`, it toggles `checked` on activation and fires `change`. Slot an `nldd-checkbox decorative` (or any glyph) before the text: it only shows the state, since the row already conveys role and state, and a second focusable control would double the tab stops. Do NOT nest a real `<input type="checkbox">` in the action: interactive content inside a `<button>` is invalid HTML and AT announces the button, not the checked state. A `<label>` variant is not offered for the same reason it cannot work — label-to-input association walks the DOM tree, and a slotted input is not a descendant of a label in the shadow root. When it renders as a link, `target` and `rel` are forwarded to the inner `<a>` (e.g. `target="_blank" rel="noopener noreferrer"`). With `target="_blank"` the item also injects a visually hidden "opens in new tab" announcement for assistive technology (WCAG 2.1 SC 3.2.2). The item synchronizes its ARIA with its parent `nldd-list`'s `type`: - `list` parent → `role="listitem"` - `navigation` parent → `role="listitem"` + `aria-current` on the inner `<a>` / `<button>` when `current` or `selected`, with `current-type` as its value (`page` unless set) - `listbox` parent → `role="option"` + `aria-selected` reflecting `selected`. The list points its search input's `aria-activedescendant` at the active option via `_highlighted` (separate from `selected`). */
|
|
3873
|
+
/** A row within an `nldd-list`. Renders as a link when `href` is set, as a checkbox when `checkbox` is set, as a button when `button` is set, or as a plain container otherwise. All cells and segments share one flat slot, in source order. With one action, make the row itself the control (`href`, `button`, `checkbox` or `radio`): the whole row is then one hit area. With two or more, give each its own `nldd-list-item-segment` and leave the row without an action of its own. Both at once nests a control inside a control, and the item warns about that in development. Two rules govern every row: 1. State fills always paint the WIDENED row geometry — the row box extended by the indicator inline inset on both sides — whether or not the row is interactive. Paint never differs between a selected plain row and a selected interactive row. 2. The widened strip belongs to the ROW, never to a segment. A row with any action (its own `href`/`button`/`checkbox`, or a slotted segment) pulls itself outward (`is-interactive` host class → negative inline margin) and pads the row block back by the same amount, so content stays on the grid. A row-wide action owns that padding itself, making the whole widened box one hit area; slotted segments stay in the grid, so their footprint is position-independent and tree columns line up at any depth. By default the divider starts at the row's first text or title cell, so the line lands on the words rather than on whatever leads up to them — an icon, an avatar, a checkbox, or the spacers a tree indents with. Rows of different shapes then still line their dividers up with each other, and a tree's dividers step inward with its indentation. Text inside an `nldd-list-item-segment` counts as the row's content, and the marker is that text cell rather than the action: the action carries its own inline padding, so its edge sits before the words. A row with no text or title cell keeps the full content width. Mark a cell with `divider-start` and/or `divider-end` to place it yourself instead — an explicit marker replaces the derived one entirely, so `divider-start` on the leading cell restores the full-width line. Multiple markers resolve as the union: first `divider-start` through last `divider-end`. A start past the last end is an authoring error — the item DEV-warns and falls back to the full content width. A branch row can disclose its children in two ways: a dedicated `nldd-list-item-segment[disclosure]` segment (only the chevron is clickable), or the row itself as the control (`button` + `expanded`, the whole row toggles). In the second case, mark the chevron's `nldd-icon-cell` with `disclosure` and the row turns it with `expanded` — the same affordance, without having to trade a clickable row for a turning chevron. `checkbox` makes the WHOLE row the control: the inner action becomes a `role="checkbox"` button carrying `aria-checked`, it toggles `checked` on activation and fires `change`. Slot an `nldd-checkbox decorative` (or any glyph) before the text: it only shows the state, since the row already conveys role and state, and a second focusable control would double the tab stops. Do NOT nest a real `<input type="checkbox">` in the action: interactive content inside a `<button>` is invalid HTML and AT announces the button, not the checked state. A `<label>` variant is not offered for the same reason it cannot work — label-to-input association walks the DOM tree, and a slotted input is not a descendant of a label in the shadow root. When it renders as a link, `target` and `rel` are forwarded to the inner `<a>` (e.g. `target="_blank" rel="noopener noreferrer"`). With `target="_blank"` the item also injects a visually hidden "opens in new tab" announcement for assistive technology (WCAG 2.1 SC 3.2.2), and an `href` to another website a visually hidden "andere website". An `nldd-icon-cell` with `external-link` is only the picture of that; the row says it either way. The item synchronizes its ARIA with its parent `nldd-list`'s `type`: - `list` parent → `role="listitem"` - `navigation` parent → `role="listitem"` + `aria-current` on the inner `<a>` / `<button>` when `current` or `selected`, with `current-type` as its value (`page` unless set) - `listbox` parent → `role="option"` + `aria-selected` reflecting `selected`. The list points its search input's `aria-activedescendant` at the active option via `_highlighted` (separate from `selected`). */
|
|
3861
3874
|
'nldd-list-item': DefineComponent<NLDDListItemProps>;
|
|
3862
3875
|
/** A segment inside an `nldd-list-item`: it groups a run of cells and makes just that run clickable. Use it when a row needs more than one segment — a tree row whose chevron expands while the label toggles a checkbox, or a row that navigates with a separate button beside it. Put it in the row where its cells would go: the item has one flat slot, and a segment takes the place of the cells it covers. Where the divider starts or stops is marked on the cells themselves (`divider-start` / `divider-end`), not by the slot a segment sits in. A row is EITHER row-level interactive (`href` / `button` / `checkbox` on the `nldd-list-item`) OR segmented (one or more of these). Both at once nests a control inside a control, which is invalid HTML; the item DEV-warns. Unlike the row-wide action this does not bleed outward: a segment sits between siblings, so an outward inset would overlap them. It owns its inline padding and never drops below the row's control size, so an icon-only one still meets the WCAG 2.5.8 target size — do not add spacer cells inside it for room or hit area, that doubles the space. In a `type="listbox"` list the segment renders as a plain container (no control, not focusable) and DEV-warns: an `option` may not contain interactive descendants. The cells render unchanged, so nothing shifts. */
|
|
3863
3876
|
'nldd-list-item-segment': DefineComponent<NLDDListItemSegmentProps>;
|
|
@@ -3925,7 +3938,7 @@ declare module 'vue' {
|
|
|
3925
3938
|
'nldd-shell': DefineComponent<NLDDShellProps>;
|
|
3926
3939
|
/** A horizontal split view with multiple equal panes side by side. The number of panes is set via the `panes` attribute. Each pane automatically gets a numbered slot: pane-1, pane-2, etc. Panes that do not fit the available width are automatically hidden, from right to left: `pane-1` is the last to go. Put the main content in `pane-1` and an inspector or detail in the last pane. */
|
|
3927
3940
|
'nldd-side-by-side-split-view': DefineComponent<NLDDSideBySideSplitViewProps>;
|
|
3928
|
-
/** A page section with a left sidebar alongside the main content. - **Wide (section >= 1008px):** two columns. The sidebar is a sticky, scrollable box (max-width 320px) beside the main content. It takes the surface of the section around it and is edged by a divider line, so it reads as a block without drawing the eye away from the main. Its sticky top/bottom insets default to 16px; override with `sticky-top` / `sticky-bottom` so it clears other sticky page elements (e.g. a sticky header). - **Narrow (section < 1008px):** the sidebar collapses behind a sheet (a left panel on md+ viewports, a bottom sheet on mobile), and the host reflects a `collapsed` attribute. The consumer owns the trigger: place any chrome (a button, a chosen-filters bar, …) wherever you want, show it only while collapsed (e.g. `nldd-sidebar-section[collapsed] .my-trigger { … }` or by reading `collapsed` / listening to `collapse-change`), and call `show()` / `toggle()` to open the sheet. Bind `aria-expanded` via the `open`/`close` events. The sheet gets a sticky title bar by default — the `sidebar-label` as title plus a "Sluit" button — overridable via the `sheet-top-title-bar` slot. The sidebar content lives in `slot="sidebar"`. Its slot outlet moves between the box (expanded) and the sheet (collapsed) so there is a single, never-duplicated copy — the light DOM (and its state) is preserved across the switch. The box <-> sheet switch follows the section's OWN width (a ResizeObserver on the host), not the viewport — so a sidebar-section in a narrow column or a split-view pane collapses to the sheet just like one in a narrow viewport, and the sidebar never stacks above or crowds the main. Set `no-collapse` to opt out: a narrow section then stacks the sidebar (full-width) above the main instead of using a sheet. Inherits block `padding` and `height` from PageSectionMixin. */
|
|
3941
|
+
/** A page section with a left sidebar alongside the main content. - **Wide (section >= 1008px):** two columns. The sidebar is a sticky, scrollable box (max-width 320px) beside the main content. It takes the surface of the section around it and is edged by a divider line, so it reads as a block without drawing the eye away from the main. Its sticky top/bottom insets default to 16px; override with `sticky-top` / `sticky-bottom` so it clears other sticky page elements (e.g. a sticky header). - **Narrow (section < 1008px):** the sidebar collapses behind a sheet (a left panel on md+ viewports, a bottom sheet on mobile), and the host reflects a `collapsed` attribute. The consumer owns the trigger: place any chrome (a button, a chosen-filters bar, …) wherever you want, show it only while collapsed (e.g. `nldd-sidebar-section[collapsed] .my-trigger { … }` or by reading `collapsed` / listening to `collapse-change`), and call `show()` / `toggle()` to open the sheet. Bind `aria-expanded` via the `open`/`close` events. The sheet gets a sticky title bar by default — the `sidebar-label` as title plus a "Sluit" button — overridable via the `sheet-top-title-bar` slot. A link in the sheet to a place on the page beside it, such as a row of a table of contents, closes the sheet first and then scrolls to that place and moves focus there, with a temporary tab stop as a skip link does. Left to the browser, the page would scroll under a sheet that is still open, and on closing the browser gives focus back to the trigger without scrolling to it, so focus ends up out of sight. A link that opens elsewhere (another page, a new tab, a modifier key, a `download`) or points into the sidebar itself is left alone, as is a click the consumer has already handled with `preventDefault()`. The address gets the fragment through `replaceState`, without a new history entry and without a `hashchange` event or a `:target` match: a router that listens for those does not see the jump. The sidebar content lives in `slot="sidebar"`. Its slot outlet moves between the box (expanded) and the sheet (collapsed) so there is a single, never-duplicated copy — the light DOM (and its state) is preserved across the switch. The box <-> sheet switch follows the section's OWN width (a ResizeObserver on the host), not the viewport — so a sidebar-section in a narrow column or a split-view pane collapses to the sheet just like one in a narrow viewport, and the sidebar never stacks above or crowds the main. Set `no-collapse` to opt out: a narrow section then stacks the sidebar (full-width) above the main instead of using a sheet. Inherits block `padding` and `height` from PageSectionMixin. */
|
|
3929
3942
|
'nldd-sidebar-section': DefineComponent<NLDDSidebarSectionProps>;
|
|
3930
3943
|
/** A basic section with responsive padding and gap based on container size. Contains optional header and footer slots. The padding and spacing between slots adjust automatically via container queries. Use one section per content block and repeat the section rather than building columns inside one: the section sets the reading width and the padding itself. For two columns there are nldd-one-half-one-half-section, nldd-two-thirds-one-third-section, nldd-one-third-two-thirds-section and nldd-sidebar-section. Give a section its surface with `background` instead of a background color of your own; that is how the components inside know which surface they are on. */
|
|
3931
3944
|
'nldd-simple-section': DefineComponent<NLDDSimpleSectionProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moving focus to a place on the page, the way a skip link does.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The fragment of an href that stays on this page, or an empty string. An
|
|
6
|
+
* absolute URL to the page you are on counts too: a router or a CMS writes
|
|
7
|
+
* `/pagina#inhoud` as readily as `#inhoud`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function samePageHash(href: string): string;
|
|
10
|
+
/** The element a fragment points at, looked up in the tree of `from` first. */
|
|
11
|
+
export declare function hashTarget(hash: string, from: Node): HTMLElement | null;
|
|
12
|
+
/**
|
|
13
|
+
* Focuses the target and leaves it as it was once focus moves on. Returns the
|
|
14
|
+
* function that puts it back (safe to call twice), or null when the target did
|
|
15
|
+
* not take focus because it is hidden or inert; it is then already put back.
|
|
16
|
+
*
|
|
17
|
+
* The tabindex is 0 and not -1, also when the target came with a -1 of its
|
|
18
|
+
* own. WebKit skips everything inside a shadow host that has a negative
|
|
19
|
+
* tabindex, slotted content included, so with -1 on an nldd-* section the
|
|
20
|
+
* next Tab left the page instead of reaching the first link in it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function focusTemporarily(target: HTMLElement, options?: FocusOptions): (() => void) | null;
|
|
23
|
+
//# sourceMappingURL=focus-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-target.d.ts","sourceRoot":"","sources":["../../src/utilities/focus-target.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAYjD;AAED,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,GAAG,IAAI,CAOvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAoBjG"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moving focus to a place on the page, the way a skip link does.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The fragment of an href that stays on this page, or an empty string. An
|
|
6
|
+
* absolute URL to the page you are on counts too: a router or a CMS writes
|
|
7
|
+
* `/pagina#inhoud` as readily as `#inhoud`.
|
|
8
|
+
*/
|
|
9
|
+
export function samePageHash(href) {
|
|
10
|
+
try {
|
|
11
|
+
// Resolved as the browser resolves a link: against the base URL, which a
|
|
12
|
+
// <base href> can move away from the page itself.
|
|
13
|
+
const url = new URL(href, document.baseURI);
|
|
14
|
+
const samePage = url.origin === location.origin
|
|
15
|
+
&& url.pathname === location.pathname
|
|
16
|
+
&& url.search === location.search;
|
|
17
|
+
return samePage ? url.hash : '';
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** The element a fragment points at, looked up in the tree of `from` first. */
|
|
24
|
+
export function hashTarget(hash, from) {
|
|
25
|
+
let id = hash.slice(1);
|
|
26
|
+
if (!id)
|
|
27
|
+
return null;
|
|
28
|
+
// A malformed escape throws; the raw id is then the best guess left.
|
|
29
|
+
try {
|
|
30
|
+
id = decodeURIComponent(id);
|
|
31
|
+
}
|
|
32
|
+
catch { /* keep the raw id */ }
|
|
33
|
+
const root = from.getRootNode();
|
|
34
|
+
return root.getElementById?.(id) ?? document.getElementById(id);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Focuses the target and leaves it as it was once focus moves on. Returns the
|
|
38
|
+
* function that puts it back (safe to call twice), or null when the target did
|
|
39
|
+
* not take focus because it is hidden or inert; it is then already put back.
|
|
40
|
+
*
|
|
41
|
+
* The tabindex is 0 and not -1, also when the target came with a -1 of its
|
|
42
|
+
* own. WebKit skips everything inside a shadow host that has a negative
|
|
43
|
+
* tabindex, slotted content included, so with -1 on an nldd-* section the
|
|
44
|
+
* next Tab left the page instead of reaching the first link in it.
|
|
45
|
+
*/
|
|
46
|
+
export function focusTemporarily(target, options) {
|
|
47
|
+
const previous = target.getAttribute('tabindex');
|
|
48
|
+
let restored = false;
|
|
49
|
+
const restore = () => {
|
|
50
|
+
if (restored)
|
|
51
|
+
return;
|
|
52
|
+
restored = true;
|
|
53
|
+
target.removeEventListener('blur', restore);
|
|
54
|
+
if (previous === null)
|
|
55
|
+
target.removeAttribute('tabindex');
|
|
56
|
+
else
|
|
57
|
+
target.setAttribute('tabindex', previous);
|
|
58
|
+
};
|
|
59
|
+
target.setAttribute('tabindex', '0');
|
|
60
|
+
target.addEventListener('blur', restore);
|
|
61
|
+
target.focus(options);
|
|
62
|
+
// Focus did not take: no blur will follow, so the tab stop would stay
|
|
63
|
+
// behind for good.
|
|
64
|
+
if (target.getRootNode().activeElement !== target) {
|
|
65
|
+
restore();
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return restore;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=focus-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-target.js","sourceRoot":"","sources":["../../src/utilities/focus-target.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACxC,IAAI,CAAC;QACJ,yEAAyE;QACzE,kDAAkD;QAClD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM;eAC3C,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ;eAClC,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC;QACnC,OAAO,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,EAAE,CAAC;IACX,CAAC;AACF,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAAU;IAClD,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACrB,qEAAqE;IACrE,IAAI,CAAC;QAAC,EAAE,GAAG,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAA2B,CAAC;IACzD,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AACjE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAmB,EAAE,OAAsB;IAC3E,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACjD,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,OAAO,GAAG,GAAG,EAAE;QACpB,IAAI,QAAQ;YAAE,OAAO;QACrB,QAAQ,GAAG,IAAI,CAAC;QAChB,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5C,IAAI,QAAQ,KAAK,IAAI;YAAE,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;;YACrD,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC,CAAC;IACF,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtB,sEAAsE;IACtE,mBAAmB;IACnB,IAAK,MAAM,CAAC,WAAW,EAA4B,CAAC,aAAa,KAAK,MAAM,EAAE,CAAC;QAC9E,OAAO,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which hidden hint a link carries, as the suffix of a translation key.
|
|
3
|
+
*
|
|
4
|
+
* A link to another origin goes to another website, with a heading, navigation
|
|
5
|
+
* and title of its own, so it says so; a link with `target="_blank"` says it
|
|
6
|
+
* opens in a new tab (WCAG 2.1 SC 3.2.2). Both together make one sentence, so a
|
|
7
|
+
* screen reader reads one hint rather than two. Only `http:` and `https:`
|
|
8
|
+
* links can go to another website: `mailto:`, `tel:`, fragments and relative
|
|
9
|
+
* paths never do. There is no way to switch the hint off: a subdomain is
|
|
10
|
+
* another website too.
|
|
11
|
+
*
|
|
12
|
+
* Returns null when the link needs no hint.
|
|
13
|
+
*/
|
|
14
|
+
export type LinkHintKey = 'link-hint-external-lowercase-label' | 'link-hint-new-tab-lowercase-label' | 'link-hint-external-new-tab-lowercase-label';
|
|
15
|
+
export declare function linkHintKey(href: string | null | undefined, target: string | null | undefined): LinkHintKey | null;
|
|
16
|
+
/** Whether `href` points at another origin than the page it is on. */
|
|
17
|
+
export declare function isExternalHref(href: string): boolean;
|
|
18
|
+
//# sourceMappingURL=link-hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-hint.d.ts","sourceRoot":"","sources":["../../src/utilities/link-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG,oCAAoC,GAAG,mCAAmC,GAAG,4CAA4C,CAAC;AAEpJ,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAQlH;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAUpD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export function linkHintKey(href, target) {
|
|
2
|
+
if (!href)
|
|
3
|
+
return null;
|
|
4
|
+
const external = isExternalHref(href);
|
|
5
|
+
const newTab = target === '_blank';
|
|
6
|
+
if (external && newTab)
|
|
7
|
+
return 'link-hint-external-new-tab-lowercase-label';
|
|
8
|
+
if (external)
|
|
9
|
+
return 'link-hint-external-lowercase-label';
|
|
10
|
+
if (newTab)
|
|
11
|
+
return 'link-hint-new-tab-lowercase-label';
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
/** Whether `href` points at another origin than the page it is on. */
|
|
15
|
+
export function isExternalHref(href) {
|
|
16
|
+
if (typeof document === 'undefined' || typeof location === 'undefined')
|
|
17
|
+
return false;
|
|
18
|
+
let url;
|
|
19
|
+
try {
|
|
20
|
+
url = new URL(href, document.baseURI);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:')
|
|
26
|
+
return false;
|
|
27
|
+
return url.origin !== location.origin;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=link-hint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-hint.js","sourceRoot":"","sources":["../../src/utilities/link-hint.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,WAAW,CAAC,IAA+B,EAAE,MAAiC;IAC7F,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,MAAM,KAAK,QAAQ,CAAC;IACnC,IAAI,QAAQ,IAAI,MAAM;QAAE,OAAO,4CAA4C,CAAC;IAC5E,IAAI,QAAQ;QAAE,OAAO,oCAAoC,CAAC;IAC1D,IAAI,MAAM;QAAE,OAAO,mCAAmC,CAAC;IACvD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,cAAc,CAAC,IAAY;IAC1C,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO,KAAK,CAAC;IACrF,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACJ,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACxE,OAAO,GAAG,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC;AACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nldd/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Designsysteem voor de Nederlandse Digitale Dienst",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/components/components.js",
|
|
@@ -564,6 +564,7 @@
|
|
|
564
564
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
565
565
|
"@eslint/js": "^10.0.1",
|
|
566
566
|
"@semantic-release/changelog": "^7.0.0",
|
|
567
|
+
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
567
568
|
"@semantic-release/exec": "^7.1.0",
|
|
568
569
|
"@semantic-release/git": "^11.0.1",
|
|
569
570
|
"@storybook/addon-a11y": "^10.6.0",
|