@nldd/design-system 0.8.99 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +484 -40
- package/dist/components/actions/button/button.d.ts +7 -5
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.d.ts +3 -1
- package/dist/components/actions/button/button.i18n.d.ts.map +1 -1
- package/dist/components/actions/button/button.i18n.js +3 -1
- package/dist/components/actions/button/button.i18n.js.map +1 -1
- package/dist/components/actions/button/button.js +3 -3
- package/dist/components/actions/button/button.styles.js +2 -2
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +9 -10
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +7 -5
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js +3 -1
- package/dist/components/actions/icon-button/icon-button.i18n.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +3 -3
- package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +7 -7
- package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +9 -0
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +18 -1
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts +1 -1
- package/dist/components/actions/split-button/split-button.js +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js +3 -1
- package/dist/components/actions/toolbar/toolbar.i18n.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +1 -1
- package/dist/components/actions/toolbar/toolbar.template.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.template.js +4 -2
- package/dist/components/actions/toolbar/toolbar.template.js.map +1 -1
- package/dist/components/components.js +1014 -296
- package/dist/components/content/avatar/avatar.d.ts +5 -3
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts +3 -1
- package/dist/components/content/avatar/avatar.i18n.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.i18n.js +3 -1
- package/dist/components/content/avatar/avatar.i18n.js.map +1 -1
- package/dist/components/content/avatar/avatar.js +1 -1
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.template.js +6 -6
- package/dist/components/content/avatar/avatar.template.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +55 -0
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +16 -1
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +109 -0
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +39 -0
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/token/token.d.ts +1 -1
- package/dist/components/content/token/token.js +1 -1
- package/dist/components/{icon-button-CJIikwyu.js → icon-button-BVhiOwX9.js} +12 -7
- package/dist/components/inputs/dropdown/dropdown.d.ts +6 -0
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +6 -0
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +6 -4
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.d.ts +3 -1
- package/dist/components/layout/card/card.i18n.d.ts.map +1 -1
- package/dist/components/layout/card/card.i18n.js +3 -1
- package/dist/components/layout/card/card.i18n.js.map +1 -1
- package/dist/components/layout/card/card.js +2 -2
- package/dist/components/layout/card/card.template.d.ts.map +1 -1
- package/dist/components/layout/card/card.template.js +6 -6
- package/dist/components/layout/card/card.template.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts +16 -5
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +44 -10
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/collection/collection.styles.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.styles.js +7 -6
- package/dist/components/layout/collection/collection.styles.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +1 -1
- package/dist/components/layout/container/container.js +1 -1
- package/dist/components/layout/container/container.styles.d.ts.map +1 -1
- package/dist/components/layout/container/container.styles.js +4 -0
- package/dist/components/layout/container/container.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +29 -0
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js +131 -0
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts +2 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.d.ts.map +1 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js +139 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -0
- package/dist/components/layout/page-sections/hero/hero.d.ts +13 -5
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +42 -6
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts +16 -0
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +61 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +1 -1
- package/dist/components/layout/window/window.js +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +5 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +25 -0
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +28 -7
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js +8 -4
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +5 -2
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +9 -4
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +12 -5
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js +3 -1
- package/dist/components/lists-and-tables/list-item/list-item.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +15 -7
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +9 -2
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts +7 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.d.ts.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js +6 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.i18n.js.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +7 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +12 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js +6 -3
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +8 -5
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +19 -10
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +4 -0
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.js +5 -1
- package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +7 -5
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.d.ts +3 -1
- package/dist/components/navigation/link/link.i18n.d.ts.map +1 -1
- package/dist/components/navigation/link/link.i18n.js +3 -1
- package/dist/components/navigation/link/link.i18n.js.map +1 -1
- package/dist/components/navigation/link/link.js +3 -3
- package/dist/components/navigation/link/link.styles.js +2 -2
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +7 -8
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +4 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +11 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts +1 -1
- package/dist/components/navigation/pagination/pagination.js +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts +1 -14
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +7 -55
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +6 -3
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +11 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +21 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +1 -1
- package/dist/components/{with-translations-C8_0-9y8.js → with-translations-C6QfP6_S.js} +24 -1
- package/dist/css/rich-text.css +1 -1
- package/dist/css/variables.css +1 -0
- package/dist/nldd.min.js +962 -683
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +24 -7
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +24 -7
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +24 -7
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +2 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +24 -7
- package/dist/translations/pap-AW.js.map +1 -1
- package/dist/translations/pap-CW.d.ts.map +1 -1
- package/dist/translations/pap-CW.js +24 -7
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +71 -38
- package/dist/utilities/focus-target.d.ts +23 -0
- package/dist/utilities/focus-target.d.ts.map +1 -0
- package/dist/utilities/focus-target.js +70 -0
- package/dist/utilities/focus-target.js.map +1 -0
- package/dist/utilities/link-hint.d.ts +18 -0
- package/dist/utilities/link-hint.d.ts.map +1 -0
- package/dist/utilities/link-hint.js +29 -0
- package/dist/utilities/link-hint.js.map +1 -0
- package/package.json +3 -2
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
7
7
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
8
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
8
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
9
9
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
10
|
-
* @attr {boolean} disabled - Disabled state
|
|
10
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
11
11
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
12
12
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
13
13
|
* @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @attr {string} end-icon - Icon name for the end icon (after text)
|
|
26
26
|
* @attr {string} accessible-label - Accessible label for the button, overrides text for screen readers
|
|
27
27
|
* @attr {string} href - When set, renders an <a> element instead of <button>
|
|
28
|
-
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the button adds a visually hidden "opens in new tab" announcement for screen readers (WCAG 2.1 SC 3.2.2).
|
|
28
|
+
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the button adds a visually hidden "opens in new tab" announcement for screen readers (WCAG 2.1 SC 3.2.2). An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
29
29
|
* @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
30
30
|
* @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
|
|
31
31
|
*
|
|
@@ -46,9 +46,11 @@ type ButtonType = 'button' | 'submit' | 'reset';
|
|
|
46
46
|
type PopupType = 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid';
|
|
47
47
|
declare const NLDDButton_base: (abstract new (...args: any[]) => LitElement & {
|
|
48
48
|
translations: Partial<{
|
|
49
|
-
'components.button.
|
|
49
|
+
'components.button.link-hint-new-tab-lowercase-label': string;
|
|
50
|
+
'components.button.link-hint-external-lowercase-label': string;
|
|
51
|
+
'components.button.link-hint-external-new-tab-lowercase-label': string;
|
|
50
52
|
}>;
|
|
51
|
-
_t(key: "components.button.
|
|
53
|
+
_t(key: "components.button.link-hint-new-tab-lowercase-label" | "components.button.link-hint-external-lowercase-label" | "components.button.link-hint-external-new-tab-lowercase-label", vars?: Record<string, string | number>): string;
|
|
52
54
|
}) & typeof LitElement & (abstract new (...args: any[]) => import("../../../utilities/described-by-mixin.js").DescribedElement);
|
|
53
55
|
export declare class NLDDButton extends NLDDButton_base {
|
|
54
56
|
static styles: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAAO,sEAAsE,CAAC;AAG9E,KAAK,UAAU,GACZ,SAAS,GACT,WAAW,GACX,aAAa,GACb,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,GACd,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,gBAAgB,CAAC;AACpB,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChD,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAAO,sEAAsE,CAAC;AAG9E,KAAK,UAAU,GACZ,SAAS,GACT,WAAW,GACX,aAAa,GACb,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,GACd,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,gBAAgB,CAAC;AACpB,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChD,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;;;;;;;;;AAEjE,qBACa,UAAW,SAAQ,eAAiE;IAChG,OAAgB,MAAM,0BAAgB;IAKtC,MAAM,CAAC,cAAc,UAAQ;IAC7B,OAAO,CAAC,UAAU,CA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AAC,GAAG,IAAI;IAmC/D,OAAO,CAAC,YAAY;IAgCpB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,UAAU;IAuBlB;;;OAGG;IACM,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAI5C,6DAA6D;IACpD,eAAe,IAAI,OAAO,GAAG,IAAI;IAIjC,MAAM;CAKf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,aAAa,EAAE,UAAU,CAAC;KAC1B;CACD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const nlddButtonTranslations: {
|
|
2
|
-
'components.button.
|
|
2
|
+
'components.button.link-hint-new-tab-lowercase-label': string;
|
|
3
|
+
'components.button.link-hint-external-lowercase-label': string;
|
|
4
|
+
'components.button.link-hint-external-new-tab-lowercase-label': string;
|
|
3
5
|
};
|
|
4
6
|
export type NLDDButtonTranslations = typeof nlddButtonTranslations;
|
|
5
7
|
//# sourceMappingURL=button.i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"button.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.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 nlddButtonTranslations = {
|
|
2
|
-
'components.button.
|
|
2
|
+
'components.button.link-hint-new-tab-lowercase-label': 'opent in nieuw tabblad',
|
|
3
|
+
'components.button.link-hint-external-lowercase-label': 'andere website',
|
|
4
|
+
'components.button.link-hint-external-new-tab-lowercase-label': 'andere website, opent in nieuw tabblad',
|
|
3
5
|
};
|
|
4
6
|
//# sourceMappingURL=button.i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,
|
|
1
|
+
{"version":3,"file":"button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.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"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @attr {string} appearance - Visual style, color included: 'primary' | 'secondary' | 'destructive' | 'accent-filled' | 'accent-transparent' | 'neutral-tinted' | 'neutral-base' | 'neutral-transparent' | 'critical-tinted' | 'critical-transparent' | 'inherit-filled' | 'inherit-tinted'. The inherit appearances derive their colors from currentColor, for buttons on colored surfaces; inherit-filled uses the surface color (--context-parent-background-color) as the label color, with a white/black contrast flip as a fallback.
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md'). 'lg' uses larger text and 24px start/end icons.
|
|
7
7
|
* @attr {string} horizontal-alignment - Horizontal alignment of the button content: 'left' | 'center' | 'right' (default: unset, centered). Most visible with width="full" or a fixed width.
|
|
8
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width.
|
|
8
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden content, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). The content stays laid out, so the button keeps its width. Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
9
9
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
10
|
-
* @attr {boolean} disabled - Disabled state
|
|
10
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
11
11
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
12
12
|
* @attr {string} popovertarget - ID of a popover element this button invokes; forwarded to the inner button. Use the popoverTargetElement property instead when the popover lives in another tree.
|
|
13
13
|
* @attr {boolean} expandable - Whether the button has a icon to indicate it opens a menu or popover
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @attr {string} end-icon - Icon name for the end icon (after text)
|
|
26
26
|
* @attr {string} accessible-label - Accessible label for the button, overrides text for screen readers
|
|
27
27
|
* @attr {string} href - When set, renders an <a> element instead of <button>
|
|
28
|
-
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the button adds a visually hidden "opens in new tab" announcement for screen readers (WCAG 2.1 SC 3.2.2).
|
|
28
|
+
* @attr {string} target - Link target (e.g. '_blank'); only used when href is set. With '_blank' the button adds a visually hidden "opens in new tab" announcement for screen readers (WCAG 2.1 SC 3.2.2). An `href` to another origin than the page (another website, a subdomain too) adds a visually hidden "andere website", in one sentence with the new-tab announcement when both apply; there is no way to switch it off.
|
|
29
29
|
* @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
30
30
|
* @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
|
|
31
31
|
*
|
|
@@ -526,9 +526,9 @@ export const buttonStyles = css `
|
|
|
526
526
|
color: var(--_button-is-active-secondary-content-color);
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
/* Visually-hidden
|
|
529
|
+
/* Visually-hidden link hint (another website, a new tab);
|
|
530
530
|
part of the link's accessible name but never shown. Standard recipe. */
|
|
531
|
-
.
|
|
531
|
+
.button__link-hint {
|
|
532
532
|
position: absolute;
|
|
533
533
|
margin: -1px;
|
|
534
534
|
border: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9C,UAAU,eAAe;IACxB,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AA+BD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,wCAgHlE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
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
|
function renderContent(component) {
|
|
4
5
|
// `button__text` falls back to the slot on falsy `text`. The property
|
|
5
6
|
// defaults to '', so `text=""` and an absent attribute are indistinguishable
|
|
@@ -40,11 +41,10 @@ export function template(helpers) {
|
|
|
40
41
|
// irrelevant ARIA attributes.
|
|
41
42
|
const isDisclosure = this.expandable || !!this.popupType;
|
|
42
43
|
const ariaExpanded = isDisclosure ? String(this.expanded) : (this.expanded ? 'true' : nothing);
|
|
43
|
-
// A
|
|
44
|
-
// Only the <a> path (href)
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
: '';
|
|
44
|
+
// A link to another website or a new tab says so (WCAG 2.1 SC 3.2.2).
|
|
45
|
+
// Only the <a> path (href) navigates.
|
|
46
|
+
const hintKey = linkHintKey(this.href, this.target);
|
|
47
|
+
const linkHint = hintKey ? this._t(`components.button.${hintKey}`) : '';
|
|
48
48
|
// `supporting-text` renders in a sibling span next to the text; the
|
|
49
49
|
// accessible-name flat-string algorithm concatenates them without a
|
|
50
50
|
// separator ("OpslaanAlle wijzigingen"). With no explicit accessible-label,
|
|
@@ -54,14 +54,14 @@ export function template(helpers) {
|
|
|
54
54
|
// those consumers should set accessible-label.)
|
|
55
55
|
const baseAriaLabel = this.accessibleLabel
|
|
56
56
|
|| (this.supportingText ? [this.text, this.supportingText].filter(Boolean).join(', ') : '');
|
|
57
|
-
// aria-label wins the accessible-name cascade, so when one is set the
|
|
57
|
+
// aria-label wins the accessible-name cascade, so when one is set the link
|
|
58
58
|
// hint must live inside it; otherwise `nothing` leaves the name content-derived
|
|
59
59
|
// and the visually-hidden span below appends the hint (it also reaches slotted
|
|
60
60
|
// text, which can't be read into a string here).
|
|
61
61
|
const ariaLabel = baseAriaLabel
|
|
62
|
-
? [baseAriaLabel,
|
|
62
|
+
? [baseAriaLabel, linkHint].filter(Boolean).join(', ')
|
|
63
63
|
: nothing;
|
|
64
|
-
const
|
|
64
|
+
const renderLinkHint = !!linkHint && !baseAriaLabel;
|
|
65
65
|
// Loading: an activity indicator overlays the (opacity-hidden) content. It
|
|
66
66
|
// sits OUTSIDE the <button>/<a> (a sibling, overlaid via the host's
|
|
67
67
|
// position:relative) so its role="status" live region can announce "Laden"
|
|
@@ -101,8 +101,7 @@ export function template(helpers) {
|
|
|
101
101
|
@pointerdown=${this._popup.handlePointerdown}
|
|
102
102
|
@click=${helpers.handleClick}
|
|
103
103
|
>
|
|
104
|
-
${content}
|
|
105
|
-
${renderOpensInNewTabHint ? html `<span class="button__opens-in-new-tab-hint">${opensInNewTabHint}</span>` : nothing}
|
|
104
|
+
${content}${renderLinkHint ? html `<span class="button__link-hint">, ${linkHint}</span>` : nothing}
|
|
106
105
|
</a>
|
|
107
106
|
${loadingIndicator}
|
|
108
107
|
${popupSlot}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAM9D,SAAS,aAAa,CAAC,SAAqB;IAC3C,sEAAsE;IACtE,6EAA6E;IAC7E,mEAAmE;IACnE,OAAO,IAAI,CAAA;;KAEP,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA;;uBAER,SAAS,CAAC,SAAS;;IAEtC,CAAC,CAAC,CAAC,IAAI,CAAA,iCAAiC;;iCAEX,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,2BAA2B;MAC5F,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAA,yCAAyC,SAAS,CAAC,cAAc,SAAS,CAAC,CAAC,CAAC,OAAO;;KAEpH,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;;uBAEN,SAAS,CAAC,OAAO;;IAEpC,CAAC,CAAC,CAAC,IAAI,CAAA,+BAA+B;;IAEtC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;;;;GAI5B,CAAC,CAAC,CAAC,OAAO;EACX,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAmB,OAAwB;IAClE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAEpC,MAAM,WAAW,GAAG,CAAC,QAAQ;QAC5B,IAAI,CAAC,c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zB,YAAY;gBAChB,QAAQ;eACT,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;mBACvB,IAAI,CAAC,MAAM,CAAC,iBAAiB;aACnC,OAAO,CAAC,WAAW;;MAE1B,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,CAAA,qCAAqC,QAAQ,SAAS,CAAC,CAAC,CAAC,OAAO;;KAEhG,gBAAgB;KAChB,SAAS;GACX,CAAC;IACH,CAAC;IAED,uEAAuE;IACvE,2EAA2E;IAC3E,wEAAwE;IACxE,yEAAyE;IACzE,wEAAwE;IACxE,OAAO,IAAI,CAAA;kBACM,WAAW;UACnB,IAAI,CAAC,IAAI;eACJ,IAAI,CAAC,QAAQ;mBACT,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;gBACnC,SAAS;mBACN,IAAI,CAAC,SAAS,IAAI,OAAO;mBACzB,YAAY;eAChB,QAAQ;cACT,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO;mBACtB,IAAI,CAAC,aAAa,IAAI,OAAO;2BACrB,IAAI,CAAC,oBAAoB;0BAC1B,IAAI,CAAC,mBAAmB;kBAChC,IAAI,CAAC,MAAM,CAAC,iBAAiB;YACnC,OAAO,CAAC,WAAW;;KAE1B,OAAO;;IAER,gBAAgB;IAChB,SAAS;EACX,CAAC;AACH,CAAC"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
7
7
|
* @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
|
|
8
8
|
* @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when a control group draws a single border instead).
|
|
9
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).
|
|
9
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
10
10
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
11
|
-
* @attr {boolean} disabled - Disabled state
|
|
11
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
12
12
|
* @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (an nldd-token in nldd-token-field, a button in a row of an nldd-list) that manages focus itself. Still mouse- and script-focusable.
|
|
13
13
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
14
14
|
* @attr {boolean} expandable - Whether the button opens a menu or popover and shows chevron next to the icon
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* @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.
|
|
21
21
|
* @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).
|
|
22
22
|
* @attr {string} href - When set, renders an <a> element instead of <button>
|
|
23
|
-
* @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).
|
|
23
|
+
* @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.
|
|
24
24
|
* @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
25
25
|
* @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
|
|
26
26
|
* @attr {string} popovertarget - ID of a popover element to toggle; forwarded to the inner <button>
|
|
@@ -48,9 +48,11 @@ export type ButtonType = 'button' | 'submit' | 'reset';
|
|
|
48
48
|
export type PopupType = 'menu' | 'listbox' | 'dialog' | 'tree' | 'grid';
|
|
49
49
|
declare const NLDDIconButton_base: (abstract new (...args: any[]) => LitElement & {
|
|
50
50
|
translations: Partial<{
|
|
51
|
-
'components.icon-button.
|
|
51
|
+
'components.icon-button.link-hint-new-tab-lowercase-label': string;
|
|
52
|
+
'components.icon-button.link-hint-external-lowercase-label': string;
|
|
53
|
+
'components.icon-button.link-hint-external-new-tab-lowercase-label': string;
|
|
52
54
|
}>;
|
|
53
|
-
_t(key: "components.icon-button.
|
|
55
|
+
_t(key: "components.icon-button.link-hint-new-tab-lowercase-label" | "components.icon-button.link-hint-external-lowercase-label" | "components.icon-button.link-hint-external-new-tab-lowercase-label", vars?: Record<string, string | number>): string;
|
|
54
56
|
}) & typeof LitElement;
|
|
55
57
|
export declare class NLDDIconButton extends NLDDIconButton_base {
|
|
56
58
|
static styles: import("lit").CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAAO,sEAAsE,CAAC;AAE9E,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,UAAU,GACnB,SAAS,GACT,WAAW,GACX,aAAa,GACb,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,GACd,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,gBAAgB,CAAC;AACpB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,8BAA8B,CAAC;AACtC,OAAO,sEAAsE,CAAC;AAE9E,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,UAAU,GACnB,SAAS,GACT,WAAW,GACX,aAAa,GACb,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,cAAc,GACd,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,gBAAgB,GAChB,gBAAgB,CAAC;AACpB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;;;;;;;;;AAExE,qBACa,cAAe,SAAQ,mBAAwD;IAC3F,OAAgB,MAAM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,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IA6B3C;;;OAGG;IACM,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAM5C,iBAAiB,IAAI,IAAI;IAIhB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,cAAc,CAAC;KACnC;CACD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const nlddIconButtonTranslations: {
|
|
2
|
-
'components.icon-button.
|
|
2
|
+
'components.icon-button.link-hint-new-tab-lowercase-label': string;
|
|
3
|
+
'components.icon-button.link-hint-external-lowercase-label': string;
|
|
4
|
+
'components.icon-button.link-hint-external-new-tab-lowercase-label': string;
|
|
3
5
|
};
|
|
4
6
|
export type NLDDIconButtonTranslations = typeof nlddIconButtonTranslations;
|
|
5
7
|
//# sourceMappingURL=icon-button.i18n.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"icon-button.i18n.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.i18n.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B;;;;CAItC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export const nlddIconButtonTranslations = {
|
|
2
|
-
'components.icon-button.
|
|
2
|
+
'components.icon-button.link-hint-new-tab-lowercase-label': 'opent in nieuw tabblad',
|
|
3
|
+
'components.icon-button.link-hint-external-lowercase-label': 'andere website',
|
|
4
|
+
'components.icon-button.link-hint-external-new-tab-lowercase-label': 'andere website, opent in nieuw tabblad',
|
|
3
5
|
};
|
|
4
6
|
//# sourceMappingURL=icon-button.i18n.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC
|
|
1
|
+
{"version":3,"file":"icon-button.i18n.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.i18n.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,0DAA0D,EAAE,wBAAwB;IACpF,2DAA2D,EAAE,gBAAgB;IAC7E,mEAAmE,EAAE,wCAAwC;CAC7G,CAAC"}
|
|
@@ -12,9 +12,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
* @attr {string} size - Button size: 'xs' | 'sm' | 'md' | 'lg' (default: 'md')
|
|
13
13
|
* @attr {boolean} hide-lg-text - In lg size, hides the text label and enlarges the icon by one step (28px)
|
|
14
14
|
* @attr {boolean} no-highlight-border - Removes the per-appearance highlight border (e.g. when a control group draws a single border instead).
|
|
15
|
-
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled).
|
|
15
|
+
* @attr {boolean} loading - Loading state (default: false). Shows an activity indicator over the visually hidden icon, sets aria-busy on the inner control and blocks activation, without dropping the button from the tab order (unlike disabled). Meant for an action that has to wait for the server, such as sending an application. For most actions, show the result right away and confirm in the background, as the design guidelines describe.
|
|
16
16
|
* @attr {string} loading-text - What the screen reader announces while `loading` is on, for a button that does more than load: "Aan het bewaren". Leave it out and the activity indicator says its translated "Laden".
|
|
17
|
-
* @attr {boolean} disabled - Disabled state
|
|
17
|
+
* @attr {boolean} disabled - Disabled state. Avoid it: let the action run and say afterwards what is missing; the design guidelines say why.
|
|
18
18
|
* @attr {boolean} no-tab - Takes the button out of the tab order (tabindex="-1"), for a control owned by a roving container (an nldd-token in nldd-token-field, a button in a row of an nldd-list) that manages focus itself. Still mouse- and script-focusable.
|
|
19
19
|
* @attr {string} type - Button type for form submission: 'button' | 'submit' | 'reset' (ignored when href is set)
|
|
20
20
|
* @attr {boolean} expandable - Whether the button opens a menu or popover and shows chevron next to the icon
|
|
@@ -26,7 +26,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
26
26
|
* @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.
|
|
27
27
|
* @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).
|
|
28
28
|
* @attr {string} href - When set, renders an <a> element instead of <button>
|
|
29
|
-
* @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).
|
|
29
|
+
* @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.
|
|
30
30
|
* @attr {string} rel - Link rel attribute, used with href; with target '_blank', 'noopener noreferrer' is added to whatever you set
|
|
31
31
|
* @attr {object} translations - Override translation keys (e.g. the "opens in new tab" announcement); unset keys fall back to Dutch.
|
|
32
32
|
* @attr {string} popovertarget - ID of a popover element to toggle; forwarded to the inner <button>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"icon-button.template.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,kCAAkC,CAAC;AAwB1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,wCAoH5C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
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 '../../content/tooltip/tooltip.js';
|
|
4
5
|
function renderContent(component) {
|
|
5
6
|
return html `
|
|
@@ -23,18 +24,17 @@ function renderContent(component) {
|
|
|
23
24
|
`;
|
|
24
25
|
}
|
|
25
26
|
export function template() {
|
|
26
|
-
// A
|
|
27
|
+
// A link to another website or a new tab says so (WCAG 2.1 SC 3.2.2).
|
|
27
28
|
// The control always carries an aria-label, which wins the accessible-name
|
|
28
29
|
// cascade, so fold the hint into it rather than into a hidden span (which it
|
|
29
|
-
// would override). Only the <a> path (href)
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
: '';
|
|
30
|
+
// would override). Only the <a> path (href) navigates.
|
|
31
|
+
const hintKey = linkHintKey(this.href, this.target);
|
|
32
|
+
const linkHint = hintKey ? this._t(`components.icon-button.${hintKey}`) : '';
|
|
33
33
|
const baseLabel = this.accessibleLabel || this.text || '';
|
|
34
|
-
const label = [baseLabel,
|
|
34
|
+
const label = [baseLabel, linkHint].filter(Boolean).join(', ') || nothing;
|
|
35
35
|
const content = renderContent(this);
|
|
36
36
|
// Tooltip text: accessible-label always, or text when not visible (non-lg).
|
|
37
|
-
// The
|
|
37
|
+
// The link hint is screen-reader only, so it stays out of the visual tooltip.
|
|
38
38
|
const tooltipText = this.accessibleLabel
|
|
39
39
|
|| ((this.size !== 'lg' || this.hideLgText) ? this.text : '');
|
|
40
40
|
// `expandable` (disclosure widget signal) or `popup-type` (popup container
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,kCAAkC,CAAC;AAE1C,SAAS,aAAa,CAAC,SAAyB;IAC/C,OAAO,IAAI,CAAA;;;MAGN,SAAS,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,CAAA,mBAAmB,SAAS,CAAC,IAAI,eAAe;QACtD,CAAC,CAAC,IAAI,CAAA,iCAAiC,SAAS,CAAC,iBAAiB;;cAEzD;;KAET,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;;;;IAI5B,CAAC,CAAC,CAAC,OAAO;;IAEV,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;qCACY,SAAS,CAAC,IAAI;GAChD,CAAC,CAAC,CAAC,EAAE;EACN,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ;IACvB,
|
|
1
|
+
{"version":3,"file":"icon-button.template.js","sourceRoot":"","sources":["../../../../src/components/actions/icon-button/icon-button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,kCAAkC,CAAC;AAE1C,SAAS,aAAa,CAAC,SAAyB;IAC/C,OAAO,IAAI,CAAA;;;MAGN,SAAS,CAAC,IAAI;QACf,CAAC,CAAC,IAAI,CAAA,mBAA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,SAAS,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -178,6 +178,15 @@ export declare class NLDDMenu extends LitElement {
|
|
|
178
178
|
*/
|
|
179
179
|
anchorElement: Element | null;
|
|
180
180
|
placement: string;
|
|
181
|
+
/**
|
|
182
|
+
* @internal Distance in px between the anchor and the menu, along the placement
|
|
183
|
+
* side; negative pulls the menu in. Set by a component that hangs a menu
|
|
184
|
+
* off itself and draws its own edge inside its box, such as
|
|
185
|
+
* nldd-menu-bar-item, whose indicator stops short of the item. Not an
|
|
186
|
+
* attribute: the anchor knows that inset, the consumer does not. Set it on
|
|
187
|
+
* every open: the menu puts it back to 0 when it closes.
|
|
188
|
+
*/
|
|
189
|
+
anchorOffset: number;
|
|
181
190
|
/**
|
|
182
191
|
* Maximum number of visible items before the menu scrolls.
|
|
183
192
|
* Sets --_menu-max-items internally. Default: 0 (no limit).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAKjC,OAAO,EAA0E,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE9H,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,qDAAqD,CAAC;AAC7D,OAAO,yDAAyD,CAAC;AACjE,OAAO,qDAAqD,CAAC;AAC7D,OAAO,4BAA4B,CAAC;AACpC,OAAO,sDAAsD,CAAC;AAC9D,OAAO,0DAA0D,CAAC;AAiBlE;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAE3C,0EAA0E;IAE1E,WAAW,EAAE,WAAW,GAAG,IAAI,CAAQ;IAE9B,MAAM;CAGf;AASD;;;;;;;;;;;;;;;;;;;;;GAq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CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAO;IAElD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,gBAAgB;IAgCxB;;;;;;;;;;;;;;;;OAgBG;IACI,WAAW,QAAO,IAAI,CAkB3B;IAEF,OAAO,CAAC,0BAA0B,CAAS;IAC3C,OAAO,CAAC,yBAAyB,CAAS;IAE1C,+EAA+E;IAC/E,OAAO,CAAC,0BAA0B;IAQlC,OAAO,CAAC,mBAAmB,CAEzB;IAEF,OAAO,CAAC,aAAa,CA2DnB;IAEO,MAAM;CAGf;AAMD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,WAAW,EAAE,QAAQ,CAAC;QACtB,gBAAgB,EAAE,YAAY,CAAC;QAC/B,mBAAmB,EAAE,eAAe,CAAC;QACrC,iBAAiB,EAAE,aAAa,CAAC;KACjC;CACD"}
|
|
@@ -427,6 +427,15 @@ export class NLDDMenu extends LitElement {
|
|
|
427
427
|
*/
|
|
428
428
|
this.anchorElement = null;
|
|
429
429
|
this.placement = 'bottom-start';
|
|
430
|
+
/**
|
|
431
|
+
* @internal Distance in px between the anchor and the menu, along the placement
|
|
432
|
+
* side; negative pulls the menu in. Set by a component that hangs a menu
|
|
433
|
+
* off itself and draws its own edge inside its box, such as
|
|
434
|
+
* nldd-menu-bar-item, whose indicator stops short of the item. Not an
|
|
435
|
+
* attribute: the anchor knows that inset, the consumer does not. Set it on
|
|
436
|
+
* every open: the menu puts it back to 0 when it closes.
|
|
437
|
+
*/
|
|
438
|
+
this.anchorOffset = 0;
|
|
430
439
|
/**
|
|
431
440
|
* Maximum number of visible items before the menu scrolls.
|
|
432
441
|
* Sets --_menu-max-items internally. Default: 0 (no limit).
|
|
@@ -1259,6 +1268,9 @@ export class NLDDMenu extends LitElement {
|
|
|
1259
1268
|
// already chosen a value, so screen readers announce the role.
|
|
1260
1269
|
this._syncAnchorPopupState(this._isOpen);
|
|
1261
1270
|
if (toggleEvent.newState !== 'open') {
|
|
1271
|
+
// The offset belongs to the anchor that opened the menu, which sets
|
|
1272
|
+
// it again on every open; another anchor starts from 0.
|
|
1273
|
+
this.anchorOffset = 0;
|
|
1262
1274
|
this._cleanupAutoUpdate?.();
|
|
1263
1275
|
this._cleanupAutoUpdate = null;
|
|
1264
1276
|
window.removeEventListener('resize', this._handleWindowResize);
|
|
@@ -1352,6 +1364,8 @@ export class NLDDMenu extends LitElement {
|
|
|
1352
1364
|
}
|
|
1353
1365
|
// — Lifecycle ——————————————————————————————————————————————————————————————
|
|
1354
1366
|
updated(changedProperties) {
|
|
1367
|
+
if (changedProperties.has('anchorOffset') && this._isOpen)
|
|
1368
|
+
void this.reposition();
|
|
1355
1369
|
if (changedProperties.has('width')) {
|
|
1356
1370
|
if (this.width) {
|
|
1357
1371
|
// An explicit width pins the menu to exactly that size — clamp the
|
|
@@ -2143,7 +2157,7 @@ export class NLDDMenu extends LitElement {
|
|
|
2143
2157
|
const { x, y } = await computePosition(anchorEl, this, {
|
|
2144
2158
|
placement: effectivePlacement,
|
|
2145
2159
|
middleware: [
|
|
2146
|
-
offset({ mainAxis:
|
|
2160
|
+
offset({ mainAxis: this.anchorOffset, alignmentAxis: -submenuPadding }),
|
|
2147
2161
|
...(drillIn ? [] : [flip({ padding: viewportMargin })]),
|
|
2148
2162
|
shift({ padding: viewportMargin }),
|
|
2149
2163
|
size({
|
|
@@ -2283,6 +2297,9 @@ __decorate([
|
|
|
2283
2297
|
__decorate([
|
|
2284
2298
|
property({ reflect: true, converter: reflectNonDefault('bottom-start') })
|
|
2285
2299
|
], NLDDMenu.prototype, "placement", void 0);
|
|
2300
|
+
__decorate([
|
|
2301
|
+
property({ attribute: false })
|
|
2302
|
+
], NLDDMenu.prototype, "anchorOffset", void 0);
|
|
2286
2303
|
__decorate([
|
|
2287
2304
|
property({ type: Number, attribute: 'max-items' })
|
|
2288
2305
|
], NLDDMenu.prototype, "maxItems", void 0);
|