@nldd/design-system 0.11.0 → 0.13.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 +2726 -617
- package/dist/components/actions/button-group/button-group.d.ts +4 -3
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +4 -3
- package/dist/components/actions/button-group/button-group.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +6 -6
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +3 -0
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/components.js +21704 -19266
- package/dist/components/content/avatar/avatar.d.ts +2 -1
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.js +12 -1
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts +30 -2
- package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.i18n.d.ts +1 -0
- package/dist/components/content/avatar-group/avatar-group.i18n.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.i18n.js +1 -0
- package/dist/components/content/avatar-group/avatar-group.i18n.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.js +96 -7
- package/dist/components/content/avatar-group/avatar-group.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js +35 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.template.d.ts +1 -0
- package/dist/components/content/avatar-group/avatar-group.template.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.template.js +52 -29
- package/dist/components/content/avatar-group/avatar-group.template.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts +14 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.diff.d.ts +40 -0
- package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.diff.js +261 -0
- package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -0
- package/dist/components/content/code-viewer/code-viewer.i18n.d.ts +5 -0
- package/dist/components/content/code-viewer/code-viewer.i18n.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.i18n.js +9 -0
- package/dist/components/content/code-viewer/code-viewer.i18n.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +98 -6
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.styles.js +180 -14
- package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.template.js +5 -4
- package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +32 -4
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.js +19 -0
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +19 -4
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts +10 -0
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +10 -0
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +2 -0
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/{dist-Bo5Jeyfn.js → dist-B5E3q-ea.js} +2 -1
- package/dist/components/{dist-DbNhCpS5.js → dist-BFw_yEMS.js} +2 -1
- package/dist/components/{dist-DnZmcpbQ.js → dist-BNLAXAyO.js} +2 -1
- package/dist/components/{dist-DkqAbJH8.js → dist-BOVSVPSz.js} +1 -1
- package/dist/components/{dist-Ch3gNAuT.js → dist-BPB3rWnd.js} +2 -1
- package/dist/components/{dist-Bud_7w5g.js → dist-BWlUmyq3.js} +34 -2869
- package/dist/components/dist-CC8oiVtm.js +366 -0
- package/dist/components/dist-COKR0tYU.js +2860 -0
- package/dist/components/{dist-CaxHkqR2.js → dist-Co-tsc9S.js} +4 -3
- package/dist/components/{dist-iC2RTM0V.js → dist-D_9ZyZ5v.js} +3 -2
- package/dist/components/{dist-BB5mlo7D.js → dist-Dn9pjiud.js} +3 -2
- package/dist/components/{dist-B2QcygzG.js → dist-Dz28se9B.js} +2 -1
- package/dist/components/{dist-CA0yDFIt.js → dist-IPm8ilWf.js} +3 -2
- package/dist/components/{icon-zNX9A6d3.js → icon-BJHKWhY5.js} +39 -8
- package/dist/components/{icon-button-Cntrg4_E.js → icon-button-DhBIq6lN.js} +75 -2
- package/dist/components/inputs/code-editor/code-editor.d.ts +4 -54
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.js +22 -262
- package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.styles.js +43 -6
- package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts +2 -2
- package/dist/components/inputs/date-picker/date-picker.i18n.d.ts +1 -1
- package/dist/components/inputs/date-picker/date-picker.i18n.js +1 -1
- package/dist/components/inputs/date-picker/date-picker.i18n.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.js +1 -1
- package/dist/components/inputs/date-picker/date-picker.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +86 -10
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.drop.d.ts +34 -0
- package/dist/components/inputs/file-field/file-field.drop.d.ts.map +1 -0
- package/dist/components/inputs/file-field/file-field.drop.js +176 -0
- package/dist/components/inputs/file-field/file-field.drop.js.map +1 -0
- package/dist/components/inputs/file-field/file-field.i18n.d.ts +20 -1
- package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.js +20 -1
- package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +283 -15
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.js +245 -10
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts +1 -0
- package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +167 -28
- package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.truncate.d.ts +22 -0
- package/dist/components/inputs/file-field/file-field.truncate.d.ts.map +1 -0
- package/dist/components/inputs/file-field/file-field.truncate.js +62 -0
- package/dist/components/inputs/file-field/file-field.truncate.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +9 -7
- package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
- package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts +16 -0
- package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.clipboard.js +50 -0
- package/dist/components/inputs/text-editor/text-editor.clipboard.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.d.ts +10 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.js +141 -0
- package/dist/components/inputs/text-editor/text-editor.code-copy.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.commands.js +31 -58
- package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts +17 -64
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.drag.js +2 -1
- package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +3 -0
- package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.focus-selection.js +55 -0
- package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts +6 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +305 -0
- package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts +5 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.i18n.js +7 -0
- package/dist/components/inputs/text-editor/text-editor.i18n.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +126 -315
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.keymap.d.ts +6 -0
- package/dist/components/inputs/text-editor/text-editor.keymap.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.keymap.js +38 -0
- package/dist/components/inputs/text-editor/text-editor.keymap.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.links.js +11 -9
- package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +1 -17
- package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.markdown.js +32 -188
- package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mention.d.ts +52 -0
- package/dist/components/inputs/text-editor/text-editor.mention.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.mention.js +186 -0
- package/dist/components/inputs/text-editor/text-editor.mention.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +0 -16
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +1 -41
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.selection.d.ts +13 -0
- package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.selection.js +72 -0
- package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.spellcheck.js +4 -6
- package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.styles.js +301 -60
- package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.syntax.d.ts +22 -0
- package/dist/components/inputs/text-editor/text-editor.syntax.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.syntax.js +44 -0
- package/dist/components/inputs/text-editor/text-editor.syntax.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.tasks.d.ts +17 -0
- package/dist/components/inputs/text-editor/text-editor.tasks.d.ts.map +1 -0
- package/dist/components/inputs/text-editor/text-editor.tasks.js +109 -0
- package/dist/components/inputs/text-editor/text-editor.tasks.js.map +1 -0
- 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 +61 -0
- package/dist/components/layout/page-sections/hero/hero-corner.styles.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +1 -1
- package/dist/components/layout/popover/popover.d.ts +6 -0
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +16 -0
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/popover/popover.styles.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.styles.js +13 -0
- package/dist/components/layout/popover/popover.styles.js.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js +5 -0
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +2 -0
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +3 -0
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.d.ts +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +2 -2
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts +3 -2
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +9 -4
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.styles.js +18 -0
- package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notifications-area.js +14 -0
- package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.d.ts +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.i18n.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.d.ts +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.js +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.i18n.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/css/rich-text.css +61 -1
- package/dist/css/themes/donkergeel.css +12 -3
- package/dist/css/themes/geel.css +12 -3
- package/dist/css/themes.css +24 -6
- package/dist/css/variables.css +16 -10
- package/dist/nldd.min.js +2217 -1329
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +34 -4
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/fy.d.ts.map +1 -1
- package/dist/translations/fy.js +29 -4
- package/dist/translations/fy.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +34 -4
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/pap-AW.d.ts.map +1 -1
- package/dist/translations/pap-AW.js +29 -4
- 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 +29 -4
- package/dist/translations/pap-CW.js.map +1 -1
- package/dist/types/vue.d.ts +43 -39
- package/dist/utilities/carried-context.d.ts +20 -0
- package/dist/utilities/carried-context.d.ts.map +1 -0
- package/dist/utilities/carried-context.js +76 -0
- package/dist/utilities/carried-context.js.map +1 -0
- package/dist/utilities/codemirror/codemirror-input.d.ts +90 -0
- package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -0
- package/dist/utilities/codemirror/codemirror-input.js +250 -0
- package/dist/utilities/codemirror/codemirror-input.js.map +1 -0
- package/dist/utilities/codemirror/languages.d.ts +5 -1
- package/dist/utilities/codemirror/languages.d.ts.map +1 -1
- package/dist/utilities/codemirror/languages.js +21 -1
- package/dist/utilities/codemirror/languages.js.map +1 -1
- package/dist/utilities/dismiss-from-title-bar.d.ts +1 -1
- package/dist/utilities/dismiss-from-title-bar.js +1 -1
- package/package.json +2 -1
package/dist/types/vue.d.ts
CHANGED
|
@@ -193,7 +193,7 @@ declare module 'vue' {
|
|
|
193
193
|
'tooltip-timing'?: NLDDAvatar['tooltipTiming'];
|
|
194
194
|
/** When the name appears as a tooltip on hover or focus: `delay` (the default, after 700ms), `instant`, or `never`. An avatar shows no text, so without a tooltip the name is readable by assistive software only. A `decorative` avatar shows none regardless: there the name already stands beside it as text */
|
|
195
195
|
'tooltipTiming'?: NLDDAvatar['tooltipTiming'];
|
|
196
|
-
/** Makes the avatar a link to this URL; the shape itself becomes the link, so the hit area and the focus ring follow it */
|
|
196
|
+
/** Makes the avatar a link to this URL; the shape itself becomes the link, so the hit area and the focus ring follow it. As a link or a button the avatar needs size 24 or larger (WCAG 2.5.8) */
|
|
197
197
|
'href'?: NLDDAvatar['href'];
|
|
198
198
|
/** Takes the control out of the tab order (tabindex="-1"), for an avatar that is a link or a button inside a roving container (a row of an nldd-list). Does nothing on a decorative avatar. */
|
|
199
199
|
'no-tab'?: NLDDAvatar['noTab'];
|
|
@@ -218,7 +218,7 @@ declare module 'vue' {
|
|
|
218
218
|
type NLDDAvatarGroupProps = {
|
|
219
219
|
/** Diameter of each avatar in px (spacer-aligned: 16, 20, 24, 28, 32, 40, 44, 48, 56, 64, 80, 96); default 40 */
|
|
220
220
|
'size'?: NLDDAvatarGroup['size'];
|
|
221
|
-
/** Shows at most this many avatars; the rest go behind a "+N" button that opens them as a list of names */
|
|
221
|
+
/** Shows at most this many avatars; the rest go behind a "+N" button that opens them as a list of names. A longer number is set smaller, and where it no longer fits the disc the button shows an ellipsis with the count in a tooltip (a number shows from size 24 with one digit, 40 with two, 56 with three and 80 with four) */
|
|
222
222
|
'max'?: NLDDAvatarGroup['max'];
|
|
223
223
|
/** Describes the group as a whole (e.g. "Editors"); without a label the group is not a landmark of its own and the avatars speak for themselves */
|
|
224
224
|
'accessible-label'?: NLDDAvatarGroup['accessibleLabel'];
|
|
@@ -260,7 +260,7 @@ declare module 'vue' {
|
|
|
260
260
|
'variant'?: NLDDBanner['variant'];
|
|
261
261
|
/** Banner size (default: 'md'). 'sm' tightens the padding to 8px, drops the icon to 24px and uses a smaller dismiss button — for a bar that sits between chrome and content rather than a standalone page-level notice. The typography is unchanged. */
|
|
262
262
|
'size'?: NLDDBanner['size'];
|
|
263
|
-
/** Icon override. Default per variant: neutral → info-circle-filled, accent → info-circle-filled, success → check-circle-filled, warning → exclamation-triangle-filled, critical → exclamation-circle-filled */
|
|
263
|
+
/** Icon override. Default per variant: neutral → info-circle-filled, accent → info-circle-filled, success → check-mark-circle-filled, warning → exclamation-triangle-filled, critical → exclamation-circle-filled */
|
|
264
264
|
'icon'?: NLDDBanner['icon'];
|
|
265
265
|
/** Main text (heading or paragraph, depending on heading-level) */
|
|
266
266
|
'text'?: NLDDBanner['text'];
|
|
@@ -538,6 +538,18 @@ declare module 'vue' {
|
|
|
538
538
|
};
|
|
539
539
|
|
|
540
540
|
type NLDDCodeEditorProps = {
|
|
541
|
+
/** Wrap long lines instead of horizontal scroll */
|
|
542
|
+
'wrap'?: NLDDCodeEditor['wrap'];
|
|
543
|
+
/** 'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default) */
|
|
544
|
+
'resize'?: NLDDCodeEditor['resize'];
|
|
545
|
+
/** 'simple' (default, bare) | 'input-field' (framed surface) */
|
|
546
|
+
'appearance'?: NLDDCodeEditor['appearance'];
|
|
547
|
+
/** Highlight grammar (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python). Empty disables highlighting. */
|
|
548
|
+
'language'?: NLDDCodeEditor['language'];
|
|
549
|
+
/** Show a line-number gutter */
|
|
550
|
+
'line-numbers'?: NLDDCodeEditor['lineNumbers'];
|
|
551
|
+
/** Show a line-number gutter */
|
|
552
|
+
'lineNumbers'?: NLDDCodeEditor['lineNumbers'];
|
|
541
553
|
/** Editor content */
|
|
542
554
|
'value'?: NLDDCodeEditor['value'];
|
|
543
555
|
/** Sets the id on the editable element. Set automatically by nldd-form-field. */
|
|
@@ -554,20 +566,8 @@ declare module 'vue' {
|
|
|
554
566
|
'readonly'?: NLDDCodeEditor['readonly'];
|
|
555
567
|
/** Required state */
|
|
556
568
|
'required'?: NLDDCodeEditor['required'];
|
|
557
|
-
/** Wrap long lines instead of horizontal scroll */
|
|
558
|
-
'wrap'?: NLDDCodeEditor['wrap'];
|
|
559
569
|
/** Minimum visible rows (the floor in every resize mode). Default: 6. */
|
|
560
570
|
'rows'?: NLDDCodeEditor['rows'];
|
|
561
|
-
/** 'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default) */
|
|
562
|
-
'resize'?: NLDDCodeEditor['resize'];
|
|
563
|
-
/** 'simple' (default, bare) | 'input-field' (framed surface) */
|
|
564
|
-
'appearance'?: NLDDCodeEditor['appearance'];
|
|
565
|
-
/** Highlight grammar (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python). Empty disables highlighting. */
|
|
566
|
-
'language'?: NLDDCodeEditor['language'];
|
|
567
|
-
/** Show a line-number gutter */
|
|
568
|
-
'line-numbers'?: NLDDCodeEditor['lineNumbers'];
|
|
569
|
-
/** Show a line-number gutter */
|
|
570
|
-
'lineNumbers'?: NLDDCodeEditor['lineNumbers'];
|
|
571
571
|
/** Accessible label forwarded to the editor. Set automatically by nldd-form-field. */
|
|
572
572
|
'accessible-label'?: NLDDCodeEditor['accessibleLabel'];
|
|
573
573
|
/** Accessible label forwarded to the editor. Set automatically by nldd-form-field. */
|
|
@@ -588,6 +588,8 @@ declare module 'vue' {
|
|
|
588
588
|
'appearance'?: NLDDCodeViewer['appearance'];
|
|
589
589
|
/** Grammar to highlight with. Empty disables highlighting. */
|
|
590
590
|
'language'?: NLDDCodeViewer['language'];
|
|
591
|
+
/** The content is a unified diff: shown with line colors, old and new line numbers, and the changed words marked. */
|
|
592
|
+
'diff'?: NLDDCodeViewer['diff'];
|
|
591
593
|
/** Hide the copy-to-clipboard button (shown by default). */
|
|
592
594
|
'no-copy'?: NLDDCodeViewer['noCopy'];
|
|
593
595
|
/** Hide the copy-to-clipboard button (shown by default). */
|
|
@@ -1205,7 +1207,7 @@ declare module 'vue' {
|
|
|
1205
1207
|
type NLDDHeroProps = {
|
|
1206
1208
|
/** Body max-width; 'full' removes the bound (section API) */
|
|
1207
1209
|
'width'?: NLDDHero['width'];
|
|
1208
|
-
/** 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"` */
|
|
1210
|
+
/** 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, with more padding along its two sides so the content keeps its distance to the curve. A panel along the same edge as the rounded corner of the image stops before the curve, at the panel's padding from it; 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, and the panel stands under the image, as wide as it, instead of overlapping it. 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"` */
|
|
1209
1211
|
'corner'?: NLDDHero['corner'];
|
|
1210
1212
|
/** 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 */
|
|
1211
1213
|
'layout'?: NLDDHero['layout'];
|
|
@@ -1966,7 +1968,7 @@ declare module 'vue' {
|
|
|
1966
1968
|
type NLDDNotificationProps = {
|
|
1967
1969
|
/** What kind of message this is; sets the icon color and the ARIA role (default: 'neutral') */
|
|
1968
1970
|
'variant'?: NLDDNotification['variant'];
|
|
1969
|
-
/** Icon override. Default per variant: neutral → info-circle-filled, accent → info-circle-filled, success → check-circle-filled, warning → exclamation-triangle-filled, critical → exclamation-circle-filled */
|
|
1971
|
+
/** Icon override. Default per variant: neutral → info-circle-filled, accent → info-circle-filled, success → check-mark-circle-filled, warning → exclamation-triangle-filled, critical → exclamation-circle-filled */
|
|
1970
1972
|
'icon'?: NLDDNotification['icon'];
|
|
1971
1973
|
/** The message */
|
|
1972
1974
|
'text'?: NLDDNotification['text'];
|
|
@@ -3159,6 +3161,22 @@ declare module 'vue' {
|
|
|
3159
3161
|
};
|
|
3160
3162
|
|
|
3161
3163
|
type NLDDTextEditorProps = {
|
|
3164
|
+
/** Turns spellchecking off. It is on by default, like the other text fields, and leaves out what is not running text: inline code and code blocks, the address of a link and a bare URL (the link text is checked), and mentions. Autocorrect and autocapitalize follow the user's own settings, as in the other fields, also with `no-spellcheck`. Two limits come from the browser: text that was already there is checked once you edit near it, not when the editor opens (the editor lives in a shadow root; Firefox only checks around the caret), and markup that changes how a line is built, such as starting a list item, hides the underlines on that line until you type on. */
|
|
3165
|
+
'no-spellcheck'?: NLDDTextEditor['noSpellcheck'];
|
|
3166
|
+
/** Turns spellchecking off. It is on by default, like the other text fields, and leaves out what is not running text: inline code and code blocks, the address of a link and a bare URL (the link text is checked), and mentions. Autocorrect and autocapitalize follow the user's own settings, as in the other fields, also with `no-spellcheck`. Two limits come from the browser: text that was already there is checked once you edit near it, not when the editor opens (the editor lives in a shadow root; Firefox only checks around the caret), and markup that changes how a line is built, such as starting a list item, hides the underlines on that line until you type on. */
|
|
3167
|
+
'noSpellcheck'?: NLDDTextEditor['noSpellcheck'];
|
|
3168
|
+
/** Wrap long lines (default true; prose wraps) */
|
|
3169
|
+
'wrap'?: NLDDTextEditor['wrap'];
|
|
3170
|
+
/** 'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default) */
|
|
3171
|
+
'resize'?: NLDDTextEditor['resize'];
|
|
3172
|
+
/** 'simple' (default, bare) | 'input-field' (framed surface) */
|
|
3173
|
+
'appearance'?: NLDDTextEditor['appearance'];
|
|
3174
|
+
/** 'visible' (default): every formatting mark stays in view, dimmed, a bullet as the character you typed (`-`, `*` or `+`). 'hidden': the marks of bold, italic, strikethrough, inline code, links and the `#` of a heading are hidden and come back where the caret or the selection touches that construct, so the text reads closer to the result while what you edit is still the markdown. A bullet reads as a dot, and shows its character on the line the caret is on. A quote reads as a line on the left; with the caret anywhere in it, its `>` marks show instead, in the same place. A `---` line reads as a divider until the caret is on it, and a code block loses its closing ``` line until the caret is in it, since its own tint and edge already say what it is. Its opening line stays as the head of the block, with only the backticks hidden: the language as a label on the left, the copy button on the right. The numbers of a numbered list stay, in the color of the text: they are content. Read-only and disabled hide every mark, which makes a clean read view. The value is plain markdown either way. */
|
|
3175
|
+
'syntax'?: NLDDTextEditor['syntax'];
|
|
3176
|
+
/** Enable the annotation overlay (off by default). Annotations only render when this is set. */
|
|
3177
|
+
'annotatable'?: NLDDTextEditor['annotatable'];
|
|
3178
|
+
/** Override the editor's assistive-tech strings (the open-in-new-tab link badge, the annotation count badge, the label of a task's box and the copy button of a code block). Unset keys fall back to Dutch. */
|
|
3179
|
+
'translations'?: NLDDTextEditor['translations'];
|
|
3162
3180
|
/** Editor content (markdown) */
|
|
3163
3181
|
'value'?: NLDDTextEditor['value'];
|
|
3164
3182
|
/** Sets the id on the editable element. Set automatically by nldd-form-field. */
|
|
@@ -3175,26 +3193,12 @@ declare module 'vue' {
|
|
|
3175
3193
|
'readonly'?: NLDDTextEditor['readonly'];
|
|
3176
3194
|
/** Required state */
|
|
3177
3195
|
'required'?: NLDDTextEditor['required'];
|
|
3178
|
-
/** Turns spellchecking off. It is on by default, like the other text fields, and leaves out what is not running text: inline code and code blocks, the address of a link and a bare URL (the link text is checked), and mentions. Autocorrect and autocapitalize follow the user's own settings, as in the other fields, also with `no-spellcheck`. Two limits come from the browser: text that was already there is checked once you edit near it, not when the editor opens (the editor lives in a shadow root; Firefox only checks around the caret), and markup that changes how a line is built, such as starting a list item, hides the underlines on that line until you type on. */
|
|
3179
|
-
'no-spellcheck'?: NLDDTextEditor['noSpellcheck'];
|
|
3180
|
-
/** Turns spellchecking off. It is on by default, like the other text fields, and leaves out what is not running text: inline code and code blocks, the address of a link and a bare URL (the link text is checked), and mentions. Autocorrect and autocapitalize follow the user's own settings, as in the other fields, also with `no-spellcheck`. Two limits come from the browser: text that was already there is checked once you edit near it, not when the editor opens (the editor lives in a shadow root; Firefox only checks around the caret), and markup that changes how a line is built, such as starting a list item, hides the underlines on that line until you type on. */
|
|
3181
|
-
'noSpellcheck'?: NLDDTextEditor['noSpellcheck'];
|
|
3182
|
-
/** Wrap long lines (default true; prose wraps) */
|
|
3183
|
-
'wrap'?: NLDDTextEditor['wrap'];
|
|
3184
3196
|
/** Minimum visible rows (the floor in every resize mode). Default: 6. */
|
|
3185
3197
|
'rows'?: NLDDTextEditor['rows'];
|
|
3186
|
-
/** 'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default) */
|
|
3187
|
-
'resize'?: NLDDTextEditor['resize'];
|
|
3188
|
-
/** 'simple' (default, bare) | 'input-field' (framed surface) */
|
|
3189
|
-
'appearance'?: NLDDTextEditor['appearance'];
|
|
3190
3198
|
/** Accessible label forwarded to the editor. Set automatically by nldd-form-field. */
|
|
3191
3199
|
'accessible-label'?: NLDDTextEditor['accessibleLabel'];
|
|
3192
3200
|
/** Accessible label forwarded to the editor. Set automatically by nldd-form-field. */
|
|
3193
3201
|
'accessibleLabel'?: NLDDTextEditor['accessibleLabel'];
|
|
3194
|
-
/** Enable the annotation overlay (off by default). Annotations only render when this is set. */
|
|
3195
|
-
'annotatable'?: NLDDTextEditor['annotatable'];
|
|
3196
|
-
/** Override the editor's assistive-tech strings (the open-in-new-tab link badge and the annotation count badge). Unset keys fall back to Dutch. */
|
|
3197
|
-
'translations'?: NLDDTextEditor['translations'];
|
|
3198
3202
|
/** Marks the control as invalid. Announced with aria-invalid; nothing is drawn for it. */
|
|
3199
3203
|
'invalid'?: NLDDTextEditor['invalid'];
|
|
3200
3204
|
/** Consumer-supplied */
|
|
@@ -3896,7 +3900,7 @@ declare module 'vue' {
|
|
|
3896
3900
|
'nldd-activity-indicator': DefineComponent<NLDDActivityIndicatorProps>;
|
|
3897
3901
|
/** Shows one person or organization as a compact, round (person) or rounded (organization) representation. The content follows a fixed fallback chain: an image when `src` loads, otherwise the initials (from `initials` or derived from `name`), and otherwise a fallback icon. `type` sets both the shape and the fallback icon: `person` gives a circle with a person icon, `organization` a rounded square with a building icon. The shape belongs to the meaning and cannot be set on its own. Override the fallback icon with `icon` where that helps. Without `size` the avatar scales with its container, like `nldd-icon`; a fixed size (the same spacer-aligned scale, 16 through 96) is the exception. The initials and the icon scale along. Wide initials (WW, MMM) are scaled down automatically so they stay inside the shape. Accessibility: the host element carries the meaning. With a `name` (and without `decorative`) it gets `role="img"` with the name as its label. When the name already stands beside it as text, in an identity for instance, set `decorative` so the avatar stays hidden from assistive software. A dead `src` falls back to the initials or the icon, never to a broken-image icon. */
|
|
3898
3902
|
'nldd-avatar': DefineComponent<NLDDAvatarProps>;
|
|
3899
|
-
/** Shows several avatars as one group: they overlap, and each one gets a ring in the surface color so they stay apart where they meet. The ring uses the same mechanism as the badge, so on a colored surface you hand the color over through `--context-parent-background-color`. Slot `nldd-avatar` elements, not bare `img`. An avatar already knows what to do with a dead image, when to fall back to initials, and how to show its name as a tooltip; a loose image would have to reproduce all of that and cannot do the last one. Set `decorative` when the names already stand beside the group as text; otherwise give every avatar a name, because the group itself describes nobody. The size applies to the whole group: it is imposed on the avatars, a slotted `img` included. That keeps the row on one line whatever a consumer hands over. */
|
|
3903
|
+
/** Shows several avatars as one group: they overlap, and each one gets a ring in the surface color so they stay apart where they meet. The ring uses the same mechanism as the badge, so on a colored surface you hand the color over through `--context-parent-background-color`. Slot `nldd-avatar` elements, not bare `img`. An avatar already knows what to do with a dead image, when to fall back to initials, and how to show its name as a tooltip; a loose image would have to reproduce all of that and cannot do the last one. Set `decorative` when the names already stand beside the group as text; otherwise give every avatar a name, because the group itself describes nobody. The size applies to the whole group: it is imposed on the avatars, a slotted `img` included. That keeps the row on one line whatever a consumer hands over. Avatars that are links or buttons need size 32 or larger: they overlap, so each keeps only part of its width as a target (WCAG 2.5.8). On sm the list behind the button is a bottom sheet with a title bar, which names the group (its `accessible-label`) and closes it. The row never overflows its container. Where there is no room for every avatar, the group shows as many as fit and puts the rest behind the "+N" button, as `max` does; `max` is then the most it shows, not a fixed count. */
|
|
3900
3904
|
'nldd-avatar-group': DefineComponent<NLDDAvatarGroupProps>;
|
|
3901
3905
|
/** Shows the state of something, or how much of it there is: a status, a number of unread messages, a dot saying something is new. What it says is decided by the system, and it changes without anyone touching it. A badge is never interactive. It shows text, a number and/or an icon; with no content it becomes a dot. Put it in a corner of another element (an icon, for instance) or on its own. For a property someone assigns to something, such as a category, a role or a certification, use `nldd-tag`. For standalone data the user works with, such as a chosen person or an active filter, use `nldd-token`. */
|
|
3902
3906
|
'nldd-badge': DefineComponent<NLDDBadgeProps>;
|
|
@@ -3916,7 +3920,7 @@ declare module 'vue' {
|
|
|
3916
3920
|
/** A horizontal container for grouping buttons with a neutral background. Automatically propagates its size and appearance to all child nldd-button and nldd-icon-button elements. Renders nldd-button-bar-divider elements as internal dividers — no separate component needed. The bar is one surface for actions; on/off buttons do not go in it. For a row of toggles use nldd-toggle-button-group, and for one choice out of a few options on one surface nldd-segmented-control. An nldd-toggle-button placed here is shown as it is, and a warning says so in development. */
|
|
3917
3921
|
'nldd-button-bar': DefineComponent<NLDDButtonBarProps>;
|
|
3918
3922
|
'nldd-button-bar-divider': DefineComponent<anonymous_0Props>;
|
|
3919
|
-
/** A container for grouping related buttons together, in a row or stacked. `auto`, the default, is a row
|
|
3923
|
+
/** A container for grouping related buttons together, in a row or stacked. `auto`, the default, is a row, and a stack over the full width in a container of 30rem (480px) or less, the width of a phone, where two labels beside each other leave no room for either. A card or a dialog between 480px and the sm breakpoint keeps its row. The group is its own container, so it follows the width it was given rather than the width of the window: the same group is a row in a page and a stack in a sheet beside it. Being a container has one consequence to know: the width has to come from the parent, since a container may not size itself from what is inside it. In a parent that shrink-wraps its content (an inline-flex box, a float, a table cell, a flex item at `width: auto`) the group measures zero and its buttons are invisible. It says so once in development. Give the group or that parent a width. A stack fills the width with its buttons, except an `nldd-icon-button`, which keeps its own size: a bar with a single glyph in the middle is not a bigger target, only a wider one. */
|
|
3920
3924
|
'nldd-button-group': DefineComponent<NLDDButtonGroupProps>;
|
|
3921
3925
|
/** A visually bounded card with optional header, body and footer sections. The card is elevated by default. Padding is left to nested containers. With `href` the whole card becomes a link (an overlay anchor across the card), with `button` a button (an overlay button that fires a plain, composed `click`, so a click listener or htmx attribute on the card itself works directly, and Enter/Space work natively). `href` wins when both are set. Nested interactive content, footer buttons for instance, has to be lifted above it with `position: relative; z-index: 1` to stay clickable. A card that is a link or button steps its surface and border one shade up on hover and one more while pressed, as a neutral-base button does; content lifted above the overlay does not set it off. On a touch screen there is no hover, and a touch that turns into a scroll lets go of the pressed shade. */
|
|
3922
3926
|
'nldd-card': DefineComponent<NLDDCardProps>;
|
|
@@ -3928,7 +3932,7 @@ declare module 'vue' {
|
|
|
3928
3932
|
'nldd-checkbox-field': DefineComponent<NLDDCheckboxFieldProps>;
|
|
3929
3933
|
/** A monospace editor for code, YAML, JSON and other technical content, built on CodeMirror 6 (via NLDDCodeMirrorElement). Visually pairs with nldd-code-viewer for a matching read-only surface. Default `appearance="simple"` is a bare, flush editor (no frame, no focus ring) for use inside an nldd-form-field or a consumer composition that owns its own chrome and focus treatment; the caret is rendered as a prominent accent as the focus cue. `appearance="input-field"` adds the framed surface (border ring, tinted fill, inner padding, radius) and a focus ring for standalone use. The simple variant has no surrounding space of its own: let a layout container own the spacing and forward clicks with `focusFromPoint()` so clicking the padding still starts editing. Optional `language` enables lazy syntax highlighting; `line-numbers` adds a gutter (click a number to move the caret to that line). */
|
|
3930
3934
|
'nldd-code-editor': DefineComponent<NLDDCodeEditorProps>;
|
|
3931
|
-
/** A read-only block of code/text built on a non-editable CodeMirror 6 view. Visually pairs with nldd-code-editor (same engine, same token palette). Whitespace is preserved; long lines scroll horizontally by default. Set `wrap` to break long lines onto the next visual line. The viewer grows with its content. Set `max-height` to show a long file in a frame of its own: the block grows up to that height and scrolls beyond it. A scroller that overflows, in either direction, is a tab stop with a role and a name, so the keyboard reaches what a pointer can scroll to. Set `language` to one of the supported grammars (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python) to highlight the content. Without `language` the content renders plain. Grammars are loaded lazily on first use, so a page that never sets `language` ships zero grammar code. Token colors are the `--semantics-code-syntax-*` custom properties (shared with the editor via the CodeMirror highlight style). Override them per-instance to swap the theme. */
|
|
3935
|
+
/** A read-only block of code/text built on a non-editable CodeMirror 6 view. Visually pairs with nldd-code-editor (same engine, same token palette). Whitespace is preserved; long lines scroll horizontally by default. Set `wrap` to break long lines onto the next visual line. The viewer grows with its content. Set `max-height` to show a long file in a frame of its own: the block grows up to that height and scrolls beyond it. A scroller that overflows, in either direction, is a tab stop with a role and a name, so the keyboard reaches what a pointer can scroll to. Set `language` to one of the supported grammars (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python) to highlight the content. Without `language` the content renders plain. Grammars are loaded lazily on first use, so a page that never sets `language` ships zero grammar code. Set `diff` when the content is a unified diff, as git and pull request tools hand it out. The viewer shows the code it changes: an added line green and a removed line red, a column with the old and one with the new line number, a column with the `+` or `−`, and the `@@` header of each hunk between them. Within a removed line that is directly followed by an added one, the words that differ are marked, unless more than half of the line changed. File headers (`diff --git`, `---`, `+++`) are left out: name the file in the page around the viewer, and give each file of a multi-file diff a viewer of its own. `language` still highlights the code. A screen reader hears a summary first ("2 regels toegevoegd, 1 regel verwijderd") and "Toegevoegd" or "Verwijderd" with the line number before each changed line. A selection copies the code; the copy button copies the diff. Token colors are the `--semantics-code-syntax-*` custom properties (shared with the editor via the CodeMirror highlight style). Override them per-instance to swap the theme. */
|
|
3932
3936
|
'nldd-code-viewer': DefineComponent<NLDDCodeViewerProps>;
|
|
3933
3937
|
/** A container for displaying collections of items. Supports grid, stack, lanes and horizontal scroll layouts. Use it for a set of equal blocks, usually `nldd-card`s, instead of a CSS grid of your own: the collection sets the columns from `item-min-width` and the available width, and the gap per breakpoint. A grid keeps as many columns as fit, also when there are fewer items, so a page of results lines up with the next. For a fixed set of a few cards without paging, such as three points on a landing page, use `nldd-container layout="grid"` instead: its empty columns collapse, so the cards fill the row. In grid and stack modes, items are paginated via a load-more button. In horizontal scroll, the prev/next controls and the edge fade appear only when the items overflow the container. Use horizontal scroll for items that together serve one purpose, such as the events of one agenda; it is not a carousel for unrelated highlights, which the design guidelines advise against. With `lazy-load`, the next items are automatically loaded when the load-more button comes into view. */
|
|
3934
3938
|
'nldd-collection': DefineComponent<NLDDCollectionProps>;
|
|
@@ -3951,7 +3955,7 @@ declare module 'vue' {
|
|
|
3951
3955
|
'nldd-drag-handle-cell': DefineComponent<NLDDDragHandleCellProps>;
|
|
3952
3956
|
/** A visual wrapper around a native `<select>` element. The consumer provides a native `<select>` as a slotted child — this way the browser retains full control over form submission, accessibility and keyboard navigation, including `<optgroup>`, `data-*` attributes and dynamic changes to options. A dropdown hides its options, so it is the last resort for a choice from a fixed set. Show a handful of options with nldd-segmented-control, nldd-toggle-button-group or nldd-radio-button-group, and let the user type in nldd-combo-box when there are many, a list of countries included. The design guidelines explain the order. */
|
|
3953
3957
|
'nldd-dropdown': DefineComponent<NLDDDropdownProps>;
|
|
3954
|
-
/** A file picker that reads as one control
|
|
3958
|
+
/** A file picker that reads as one control. Empty, the whole tinted surface is one button with one sentence centered in it, "Bestand kiezen of sleep het hierheen", its first part accented, so a press anywhere on it opens the file dialog. Once a file is chosen, the surface shows it with the icon of its format, its name, a button to choose another and a dismiss button to clear it again. A long name is cut in the middle, so its start and its end stay in view ("Screenshot 20…at 13.12.21.png"); it then shows whole in a tooltip, and a screen reader reads it whole either way. It wraps a hidden native `<input type="file">`, which is what makes the picker open at all — a file dialog only opens from a user gesture on a real input. Files can be dropped on the whole field. A drop goes through the same input, so it fires the same `change` with the same detail and submits the same way as a pick. `accept` and `multiple` hold for a drop too, which the native input does not do: a drop that does not fit is refused as a whole, the previous choice stays, and the field says why for a few seconds: "Sleep één bestand", or what `accept` takes, named from it ("Het bestand moet een PDF zijn"; "Dit bestandstype past niet" where a type in it has no name). A dropped folder is refused as well ("Sleep een bestand, geen map"): it arrives as a file without a type that cannot be read, and only the drop tells it apart, not the drag. The message stays for a few seconds and then gives way to the field again. While files are dragged over the page, every field marks itself as a place to put them, and the field under the pointer says it will take them (a field with a file: that they replace it), or turns critical and refuses already when the number or the type rules them out. A file dropped next to a field no longer makes the browser open it and leave the page; a drop that another drop zone or an editable field takes is left alone. On a device without hover there is no dragging, so the field there drops the hint. The surface deliberately does not look like an input field. A border with field semantics promises you can type into it; here you can only press it or drop a file on it, so it has the border of a tinted surface instead of `--semantics-input-fields-*`. Several files are summarized, not listed: "3 bestanden" with a single cross that clears all of them. Every pick replaces the whole FileList, and rebuilding it to add or drop one file means going through DataTransfer, which does not deduplicate (even the same File object twice yields two entries) — and a File has no id, so deduplicating would come down to guessing from name, size and last-modified. A list with a cross per file would promise an edit the platform does not support. A page that does want to show the files renders its own list from the `File[]` in the change event. */
|
|
3955
3959
|
'nldd-file-field': DefineComponent<NLDDFileFieldProps>;
|
|
3956
3960
|
/** Nederlandse Digitale Dienst Form Component Plain custom element (extends HTMLElement, no Lit), required for light-DOM autofill. Renders a real <form> element in the LIGHT DOM around its children. Chrome's autofill engine looks for native <input> elements that have a <form> ancestor in the light DOM; with shadow-DOM inputs it can't find them, so we keep this component shadow-less. **Differs from other nldd-* components:** - No shadowRoot: all children live in the light DOM (inside the inner <form>) - No Lit: a plain HTMLElement with manual attribute mirroring - **Requires a global stylesheet import**: the vertical rhythm rules live in `dist/css/form.css` (or `global.css`), not in a component-specific shadow stylesheet. Import it as part of your app's global CSS bundle. **When a field turns red:** on submit the form marks every control the browser rejects with `invalid`, and clears it again once the value passes. Setting `invalid` yourself is fine, but do it on submit, not while someone is still typing, or a field turns red over a value that is not finished yet. **Two usage modes:** 1. **Auto-wrap** (default): write children directly. Component creates a `<form>` element and migrates children into it via MutationObserver. Simplest API. 2. **User-provided form** (framework-friendly): write your own `<form>` as direct child. Component detects it, takes over attribute mirroring, and skips the migration. Children stay where your framework puts them, so there is no DOM shuffling to conflict with React/Vue/Angular reconciliation. **Framework interop:** In auto-wrap mode every direct child is moved into the inner form through a MutationObserver. That works fine for most React/Vue use cases, because frameworks only mutate the DOM when their virtual DOM changes. For edge cases (animation libraries that track DOM position, SSR hydration mismatches, frameworks that actively check sibling positions) use **user-provided form** mode instead. For programmatic manipulation, use the `form` getter so you work with the inner `<form>` element directly: const inner = document.querySelector('nldd-form').form; inner.checkValidity(); inner.appendChild(myInput); // skips the migration overhead */
|
|
3957
3961
|
'nldd-form': DefineComponent<NLDDFormProps>;
|
|
@@ -4006,7 +4010,7 @@ declare module 'vue' {
|
|
|
4006
4010
|
'nldd-multi-line-text-field': DefineComponent<NLDDMultiLineTextFieldProps>;
|
|
4007
4011
|
/** A four-column layout with a primary sidebar, secondary sidebar, main content area, and inspector. The sidebars show navigation or lists, the main area shows primary content, and the inspector shows additional details or properties of the selection. Panes are shown automatically when content is slotted into them. When they stop fitting, panes drop in a fixed order: the inspector goes first, then the primary sidebar collapses into the secondary sidebar. If that still does not fit, the view stacks and shows one pane at a time: main when it has content, otherwise the secondary sidebar, otherwise the primary sidebar. Use <code>nldd-split-view-pane</code> as direct children for automatic back button handling. */
|
|
4008
4012
|
'nldd-navigation-split-view': DefineComponent<NLDDNavigationSplitViewProps>;
|
|
4009
|
-
/** A short message that arrives over the interface and leaves on its own: a save that worked, a request that failed. Not a banner, which stands in the page and stays there — this one floats, stacks, and goes away. It places itself. Write it wherever it belongs in your code and it moves to one shared area: top right from md, full width across the top below that. Nothing about the position is settable, so notifications from anywhere in an application land in the same place and stack in the same order. A modal overlay is the one thing that moves it. An nldd-sheet, nldd-window or nldd-modal-dialog paints in the browser's top layer, above the whole page and out of reach of any z-index, and while one is open everything outside it is inert. So the area goes in: into the topmost overlay that is open, and back down as they close. A notification already on screen travels with it, and one raised from inside a sheet is readable and reachable where it is raised. More than one is a deck, not a list: the front one is readable and the older ones peek out below it, so a burst of messages takes the room of roughly one. The newest is in front. Behind it a notification is a bare surface, cut to the height of the one in front; dismiss the front and it slides up into the place that came free while its message fades in, because it was standing there all along. Under the front notification sits a strip as wide as the deck and as tall as the deck is when it fans out. Pointing at it fans the deck out to fill it, which is the only hint that there is more here than the message you can read; clicking it, or moving focus into the area, lays the whole deck out as a list. Clicking or tabbing away puts it back. The notification itself is not a button: a click on the message you are reading does nothing. Only the front of the deck counts down, and only while the deck is closed: open means someone is reading. The rest wait, so nothing disappears from under the one you are reading. `critical` never leaves on its own: a failure is worth reading, and the count-down would take it away while you were. That also keeps this within WCAG 2.2.1, which allows a time limit when what disappears is not essential. The clock pauses while a pointer moves over the notification and while focus is inside it, and resumes where it left off rather than starting over. A pointer that merely happens to rest where the notification appears does not count: it never moved, so nobody is reading. role follows the variant: `critical` becomes role="alert", the rest role="status". Focus never moves on its own. Escape dismisses the notification that focus is in. `NLDDNotification.show({ text, supportingText, variant, icon, duration, actions })` raises a notification without an element to manage: it creates one, shows it, and removes it once it is dismissed. An action is `{ text, onClick }`, at most 2, and a click on one also takes the notification away. It returns a handle with `dismiss()` and `update(options)`. An update changes the message, puts the notification in front and starts its clock over, so a status that changes often is one notification that keeps up instead of a new one sliding in each time; one that has already left arrives again. Use `show()` from a framework. Because a notification places itself, an element that a framework rendered is no longer where that framework left it: a keyed list (`v-for` with a `:key`) then fails on its next render, and a removed row leaves its notification on screen. */
|
|
4013
|
+
/** A short message that arrives over the interface and leaves on its own: a save that worked, a request that failed. Not a banner, which stands in the page and stays there — this one floats, stacks, and goes away. It places itself. Write it wherever it belongs in your code and it moves to one shared area: top right from md, where it slides in from the right, and full width across the top below that, where it drops in from the top. Nothing about the position is settable, so notifications from anywhere in an application land in the same place and stack in the same order. A modal overlay is the one thing that moves it. An nldd-sheet, nldd-window or nldd-modal-dialog paints in the browser's top layer, above the whole page and out of reach of any z-index, and while one is open everything outside it is inert. So the area goes in: into the topmost overlay that is open, and back down as they close. A notification already on screen travels with it, and one raised from inside a sheet is readable and reachable where it is raised. More than one is a deck, not a list: the front one is readable and the older ones peek out below it, so a burst of messages takes the room of roughly one. The newest is in front. Behind it a notification is a bare surface, cut to the height of the one in front; dismiss the front and it slides up into the place that came free while its message fades in, because it was standing there all along. Under the front notification sits a strip as wide as the deck and as tall as the deck is when it fans out. Pointing at it fans the deck out to fill it, which is the only hint that there is more here than the message you can read; clicking it, or moving focus into the area, lays the whole deck out as a list. Clicking or tabbing away puts it back. The notification itself is not a button: a click on the message you are reading does nothing. Only the front of the deck counts down, and only while the deck is closed: open means someone is reading. The rest wait, so nothing disappears from under the one you are reading. `critical` never leaves on its own: a failure is worth reading, and the count-down would take it away while you were. That also keeps this within WCAG 2.2.1, which allows a time limit when what disappears is not essential. The clock pauses while a pointer moves over the notification and while focus is inside it, and resumes where it left off rather than starting over. A pointer that merely happens to rest where the notification appears does not count: it never moved, so nobody is reading. role follows the variant: `critical` becomes role="alert", the rest role="status". Focus never moves on its own. Escape dismisses the notification that focus is in. `NLDDNotification.show({ text, supportingText, variant, icon, duration, actions })` raises a notification without an element to manage: it creates one, shows it, and removes it once it is dismissed. An action is `{ text, onClick }`, at most 2, and a click on one also takes the notification away. It returns a handle with `dismiss()` and `update(options)`. An update changes the message, puts the notification in front and starts its clock over, so a status that changes often is one notification that keeps up instead of a new one sliding in each time; one that has already left arrives again. Use `show()` from a framework. Because a notification places itself, an element that a framework rendered is no longer where that framework left it: a keyed list (`v-for` with a `:key`) then fails on its next render, and a removed row leaves its notification on screen. */
|
|
4010
4014
|
'nldd-notification': DefineComponent<NLDDNotificationProps>;
|
|
4011
4015
|
/** A numeric input field with decrement and increment buttons. */
|
|
4012
4016
|
'nldd-number-field': DefineComponent<NLDDNumberFieldProps>;
|
|
@@ -4026,7 +4030,7 @@ declare module 'vue' {
|
|
|
4026
4030
|
'nldd-pagination': DefineComponent<NLDDPaginationProps>;
|
|
4027
4031
|
/** A password input field with visibility toggle and validation states. */
|
|
4028
4032
|
'nldd-password-field': DefineComponent<NLDDPasswordFieldProps>;
|
|
4029
|
-
/** A non-modal floating panel anchored to a trigger element. Built on the native Popover API (popover="auto") with Floating UI for positioning. The browser handles opening, toggling and light dismiss; this component only handles positioning and focus. The recommended use is through popovertarget, so the browser owns the toggle: <nldd-button id="info-trigger" popovertarget="info-popover">Info</nldd-button> <nldd-popover id="info-popover" anchor="info-trigger" accessible-label="Info"> <nldd-container> <p>Content of the popover.</p> </nldd-container> </nldd-popover> To open it from your own state instead, bind `open` together with the close event: the popover clears `open` itself on light dismiss, Escape or a click on its anchor. It needs that anchor to open against. For a custom focus target inside the popover, put `autofocus` on the child you want. Without it the popover host itself takes focus. */
|
|
4033
|
+
/** A non-modal floating panel anchored to a trigger element. Built on the native Popover API (popover="auto") with Floating UI for positioning. The browser handles opening, toggling and light dismiss; this component only handles positioning and focus. The recommended use is through popovertarget, so the browser owns the toggle: <nldd-button id="info-trigger" popovertarget="info-popover">Info</nldd-button> <nldd-popover id="info-popover" anchor="info-trigger" accessible-label="Info"> <nldd-container> <p>Content of the popover.</p> </nldd-container> </nldd-popover> To open it from your own state instead, bind `open` together with the close event: the popover clears `open` itself on light dismiss, Escape or a click on its anchor. It needs that anchor to open against. For a custom focus target inside the popover, put `autofocus` on the child you want. Without it the popover host itself takes focus. On sm the popover is a bottom sheet that closes with Escape or a tap outside it. Where that is not enough, give its content a title bar of its own, as in a sheet: an nldd-page with an nldd-top-title-bar and a `dismiss-text`. The popover catches the dismiss of that bar and closes. It draws no bar itself. */
|
|
4030
4034
|
'nldd-popover': DefineComponent<NLDDPopoverProps>;
|
|
4031
4035
|
/** Exports both NLDDProgressBar and NLDDProgressBarSegmentIndicator. A progress bar that supports a single value (loading-style) or multiple segments (multi-stage progress, or distribution like storage usage). The consumer provides raw values; the component computes percentages from `max`. Two variants: - `progress` (default): segments sum toward `max`; remaining space is empty track. ARIA reads "X% voltooid". - `distribution`: segments fill the bar; ARIA enumerates segments. If the sum of segment values exceeds `max`, segments are normalized proportionally to fit and a warning is logged. */
|
|
4032
4036
|
'nldd-progress-bar': DefineComponent<NLDDProgressBarProps>;
|
|
@@ -4040,7 +4044,7 @@ declare module 'vue' {
|
|
|
4040
4044
|
'nldd-radio-button-field': DefineComponent<NLDDRadioButtonFieldProps>;
|
|
4041
4045
|
/** Groups nldd-radio-button-field elements, handles keyboard navigation, and forwards name and disabled state to all child fields. Use inside nldd-form-field which provides the group label. */
|
|
4042
4046
|
'nldd-radio-button-group': DefineComponent<NLDDRadioButtonGroupProps>;
|
|
4043
|
-
/** A container for rich text content that automatically applies responsive typography. Uses no shadow DOM so styles apply to all nested elements. Import nldd-rich-text.css globally in your application. The rich text lays out its direct children in a grid: the vertical rhythm between headings, paragraphs and lists, and the width zones below, apply to those children only. A single wrapper `div` without `class`, `style`, `role` or `data-rich-text-width`, as a markdown renderer or a component root produces it, is passed through with `display: contents`, so its children count as direct. Any other wrapper becomes a single grid item, and the paragraphs inside it lose their spacing. The headings keep one size on every width, the one they have on a phone. A heading in running text sits in a column as wide as a line of reading, on any screen, so its relation to the text beside it does not change and it has no reason to grow. Growing, an h2 on a wide screen was more than twice the size of the text, and an article broke into blocks at every heading. Page and section titles do grow: use nldd-title for those. Children are placed in three zones. A child belongs to the text unless it is listed, so it reads at the `main` size and is never wider than a line: text (headings, paragraphs, lists, blockquote, div/section) and every component that is not named below, such as nldd-box, nldd-card, nldd-banner, nldd-list and a button, and code (pre, nldd-code-viewer), which scrolls inside its block when a line is longer. Media, tables and a step bar (img, figure, video, iframe, table, nldd-table, nldd-image, nldd-step-bar) get the `wide` accent. What needs the room gets the `full` span: hr, nldd-collection and nldd-container. A child takes the room it needs inside its zone (`justify-self: start`), so the room is available without being forced. Overridable per child with `data-rich-text-width="main" | "wide" | "full"`. In the left-aligned layout, wide and full read as a bleed to the right; with `centered` they are symmetrical. */
|
|
4047
|
+
/** A container for rich text content that automatically applies responsive typography. Uses no shadow DOM so styles apply to all nested elements. Import nldd-rich-text.css globally in your application. The rich text lays out its direct children in a grid: the vertical rhythm between headings, paragraphs and lists, and the width zones below, apply to those children only. A single wrapper `div` without `class`, `style`, `role` or `data-rich-text-width`, as a markdown renderer or a component root produces it, is passed through with `display: contents`, so its children count as direct. Any other wrapper becomes a single grid item, and the paragraphs inside it lose their spacing. The headings keep one size on every width, the one they have on a phone. A heading in running text sits in a column as wide as a line of reading, on any screen, so its relation to the text beside it does not change and it has no reason to grow. Growing, an h2 on a wide screen was more than twice the size of the text, and an article broke into blocks at every heading. Page and section titles do grow: use nldd-title for those. Children are placed in three zones. A child belongs to the text unless it is listed, so it reads at the `main` size and is never wider than a line: text (headings, paragraphs, lists, blockquote, div/section) and every component that is not named below, such as nldd-box, nldd-card, nldd-banner, nldd-list and a button, and code (pre, nldd-code-viewer), which scrolls inside its block when a line is longer. Media, tables and a step bar (img, figure, video, iframe, table, nldd-table, nldd-image, nldd-step-bar) get the `wide` accent. What needs the room gets the `full` span: hr, nldd-collection and nldd-container. A child takes the room it needs inside its zone (`justify-self: start`), so the room is available without being forced. Overridable per child with `data-rich-text-width="main" | "wide" | "full"`. In the left-aligned layout, wide and full read as a bleed to the right; with `centered` they are symmetrical. An element with `data-mention` reads as a mention: the name in the mention color with the @ icon in front of it. Use `<a href="…" data-mention>` when the person has a page to go to: it becomes the tinted token nldd-text-editor shows, and the tint is what says you can follow it. Use `<span data-mention>` when not: it keeps the color and the icon, without the tint. Write the name without the `@`: the rich text draws it. A mention in the editor's value, `[@Name](user:id)`, comes out of a markdown renderer as a link to `user:id`, which goes nowhere, so turn it into one of these yourself. */
|
|
4044
4048
|
'nldd-rich-text': DefineComponent<NLDDRichTextProps>;
|
|
4045
4049
|
/** A search input with a leading search icon, an optional dismiss button, and an optional search button. */
|
|
4046
4050
|
'nldd-search-field': DefineComponent<NLDDSearchFieldProps>;
|
|
@@ -4097,7 +4101,7 @@ declare module 'vue' {
|
|
|
4097
4101
|
'nldd-text': DefineComponent<NLDDTextProps>;
|
|
4098
4102
|
/** A cell component for displaying text content in lists with configurable alignment, size and color. This is the most fundamental list cell component. `vertical-alignment="center"` (default) stretches the cell to fill the full row height and centers its content within that space. Use `min-height` to set a minimum centered region. For strict top alignment without a minimum height, use `vertical-alignment="top"`. Each text region (overline, main text, supporting text) accepts either a string attribute or slotted DOM content. The slot is the source of truth: if the consumer provides slotted content, it replaces the attribute-based render for that region. Use slots when you need inline elements like `<nldd-tag>`, `<a>` or `<nldd-icon>` mixed with text. Note that `query` highlighting and `**bold**` parsing only apply to the attribute path — slotted content is rendered as-is. */
|
|
4099
4103
|
'nldd-text-cell': DefineComponent<NLDDTextCellProps>;
|
|
4100
|
-
/** A hybrid markdown editor built on CodeMirror 6 (via NLDDCodeMirrorElement): the document stays plain markdown text, but formatting is shown inline (bold is bold, headings are larger, links are colored) while the syntax markers stay visible, only dimmed — the iA Writer / Kirby approach. No WYSIWYG tree, so the data stays portable. Default `appearance="simple"` is bare (no frame, no focus ring) for use inside a composition (e.g. a message field) that owns its chrome and focus; the caret is a prominent accent. `appearance="input-field"` adds a framed surface + focus Headless: there is no built-in toolbar. A consumer drives formatting via the command methods (toggleBold/toggleItalic/toggleInlineCode/toggleStrikethrough/ toggleHeading/toggleBulletList/toggleTaskList/toggleQuote/toggleLink/runCommand to toggle, and setHeading/setList for picker-style "set" semantics), reads the active formats with getState(), listens to the nldd-text-editor-state event to render toggle states, and forwards padding clicks with focusFromPoint(). Cmd/Ctrl+B/I/E/K are bound out of the box. Commands keep focus on the editor. An inline toggle wraps the selected text (whitespace at its edges stays outside the markers), unwraps a run the caret is in, and with the caret at the very end of a run steps out of it. Bold that a typed space has broken (`**woord **`) keeps its styling while the caret is inside; the space moves outside the markers when the caret leaves. insertAtCursor(text) puts text at the caret and replaceRange(from, to, text) writes at the same clean offsets getSelection() reads. An @-mention typeahead (mentionSource) collapses to an atomic token, further typeahead lists on their own trigger (typeaheads) write what you tell them to, and a W3C-style annotation overlay (annotations) marks ranges with a
|
|
4104
|
+
/** A hybrid markdown editor built on CodeMirror 6 (via NLDDCodeMirrorElement): the document stays plain markdown text, but formatting is shown inline (bold is bold, headings are larger, links are colored) while the syntax markers stay visible, only dimmed — the iA Writer / Kirby approach. No WYSIWYG tree, so the data stays portable. Default `appearance="simple"` is bare (no frame, no focus ring) for use inside a composition (e.g. a message field) that owns its chrome and focus; the caret is a prominent accent. `appearance="input-field"` adds a framed surface + focus Headless: there is no built-in toolbar. A consumer drives formatting via the command methods (toggleBold/toggleItalic/toggleInlineCode/toggleStrikethrough/ toggleHeading/toggleBulletList/toggleTaskList/toggleQuote/toggleLink/runCommand to toggle, and setHeading/setList for picker-style "set" semantics), reads the active formats with getState(), listens to the nldd-text-editor-state event to render toggle states, and forwards padding clicks with focusFromPoint(). Cmd/Ctrl+B/I/E/K are bound out of the box. With `syntax="hidden"` a task item (`- [ ]`, `- [x]`) reads as a box in the place of its bullet, and like every other mark shows its markdown on the line the caret is on. A click on the box checks or unchecks it without moving the caret. Cmd/Ctrl+Enter does the same for the tasks on the lines of the selection, in both syntax modes. The box is no tab stop: Tab leaves the editor. A screen reader reads "Taak, open" or "Taak, afgerond" in its place. A code block that names its language after the backticks is highlighted in it, as in nldd-code-viewer; the grammar loads with the first such block. Its opening line is the head of the block, with a "Kopieer" button at the right edge that copies the code without its fences and says "Gekopieerd" or "Kopiëren mislukt", as the code viewer does. In an editable editor the button is no tab stop (select and copy is the keyboard route); read-only or disabled it can be focused. Without a secure context there is no button. Commands keep focus on the editor. An inline toggle wraps the selected text (whitespace at its edges stays outside the markers), unwraps a run the caret is in, and with the caret at the very end of a run steps out of it. Bold that a typed space has broken (`**woord **`) keeps its styling while the caret is inside; the space moves outside the markers when the caret leaves. insertAtCursor(text) puts text at the caret and replaceRange(from, to, text) writes at the same clean offsets getSelection() reads. An @-mention typeahead (mentionSource) collapses to an atomic token, further typeahead lists on their own trigger (typeaheads) write what you tell them to, and a W3C-style annotation overlay (annotations) marks ranges with a light tint and a count badge without touching the underlying text. To show the value, render the markdown into nldd-rich-text, which uses the same type, bold and code as the editor. A mention is stored as `[@Name](user:id)`: turn it into `<a href="…" data-mention>Name</a>` (or a `span` when there is no page for the person), without the `@`. A link reads as the same token there; a span keeps the color and the icon without the tint. */
|
|
4101
4105
|
'nldd-text-editor': DefineComponent<NLDDTextEditorProps>;
|
|
4102
4106
|
'nldd-text-field': DefineComponent<NLDDTextFieldProps>;
|
|
4103
4107
|
/** A text field for a time. The value is always 24-hour `HH:mm`, which is how Dutch shows it too, so unlike nldd-date-field there is nothing to convert. Typing is not masked: input is accepted generously and normalized only when the field is left. Error messages belong to nldd-form-field, not here. This field reflects only `invalid` / `valid`, like nldd-text-field. What you do in the picker is a preview until you leave it. The field shows the time right away but commits it on close. "Klaar" and Enter keep the choice, and so does a click outside once you have picked something. Cancel and Escape put the old time back. On an empty field the wheels open at `min`, or otherwise at the current time rounded to `step`, which does not fill in the field yet. */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The color scheme and language an element had in its place on the page,
|
|
3
|
+
* carried along when a component moves it somewhere else: a submenu into
|
|
4
|
+
* `<body>` for a drill-in, an overflow menu or sheet that lives in `<body>`, a
|
|
5
|
+
* notification into the shared area.
|
|
6
|
+
*
|
|
7
|
+
* Both inherit, so a moved element takes those of its new parent. A submenu
|
|
8
|
+
* from a dark section of the page turns light, and a screen reader reads an
|
|
9
|
+
* English menu with Dutch pronunciation. A theme needs nothing: it sits on
|
|
10
|
+
* `:root`, which is the same everywhere.
|
|
11
|
+
*
|
|
12
|
+
* Only what this helper wrote itself is ever overwritten or taken back: a
|
|
13
|
+
* `lang` or `color-scheme` set on the element by its author stays.
|
|
14
|
+
*/
|
|
15
|
+
/** Gives `element` the color scheme and language of `origin`. Call it each
|
|
16
|
+
* time the element shows, since the page around the origin may have changed. */
|
|
17
|
+
export declare function carryContext(element: HTMLElement, origin: Element | null): void;
|
|
18
|
+
/** Takes back what `carryContext` wrote, for an element returned to its place. */
|
|
19
|
+
export declare function releaseContext(element: HTMLElement): void;
|
|
20
|
+
//# sourceMappingURL=carried-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carried-context.d.ts","sourceRoot":"","sources":["../../src/utilities/carried-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgBH;iFACiF;AACjF,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAgC/E;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAMzD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The color scheme and language an element had in its place on the page,
|
|
3
|
+
* carried along when a component moves it somewhere else: a submenu into
|
|
4
|
+
* `<body>` for a drill-in, an overflow menu or sheet that lives in `<body>`, a
|
|
5
|
+
* notification into the shared area.
|
|
6
|
+
*
|
|
7
|
+
* Both inherit, so a moved element takes those of its new parent. A submenu
|
|
8
|
+
* from a dark section of the page turns light, and a screen reader reads an
|
|
9
|
+
* English menu with Dutch pronunciation. A theme needs nothing: it sits on
|
|
10
|
+
* `:root`, which is the same everywhere.
|
|
11
|
+
*
|
|
12
|
+
* Only what this helper wrote itself is ever overwritten or taken back: a
|
|
13
|
+
* `lang` or `color-scheme` set on the element by its author stays.
|
|
14
|
+
*/
|
|
15
|
+
const carried = new WeakMap();
|
|
16
|
+
/** The language of an element, looking past shadow roots to their hosts. */
|
|
17
|
+
function langOf(el) {
|
|
18
|
+
let node = el;
|
|
19
|
+
while (node) {
|
|
20
|
+
const owner = node.closest('[lang]');
|
|
21
|
+
if (owner)
|
|
22
|
+
return owner.getAttribute('lang');
|
|
23
|
+
const root = node.getRootNode();
|
|
24
|
+
node = root instanceof ShadowRoot ? root.host : null;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
/** Gives `element` the color scheme and language of `origin`. Call it each
|
|
29
|
+
* time the element shows, since the page around the origin may have changed. */
|
|
30
|
+
export function carryContext(element, origin) {
|
|
31
|
+
if (!origin?.isConnected)
|
|
32
|
+
return;
|
|
33
|
+
const previous = carried.get(element) ?? { scheme: null, lang: null };
|
|
34
|
+
const next = { scheme: previous.scheme, lang: previous.lang };
|
|
35
|
+
const ownScheme = element.style.colorScheme;
|
|
36
|
+
if (!ownScheme || ownScheme === previous.scheme) {
|
|
37
|
+
const scheme = getComputedStyle(origin).colorScheme;
|
|
38
|
+
if (scheme && scheme !== 'normal') {
|
|
39
|
+
element.style.colorScheme = scheme;
|
|
40
|
+
// What the element reports back, not what was written: the two can be
|
|
41
|
+
// serialized differently, and the next call compares against this.
|
|
42
|
+
next.scheme = element.style.colorScheme;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
if (previous.scheme)
|
|
46
|
+
element.style.removeProperty('color-scheme');
|
|
47
|
+
next.scheme = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const ownLang = element.getAttribute('lang');
|
|
51
|
+
if (ownLang === null || ownLang === previous.lang) {
|
|
52
|
+
const lang = langOf(origin);
|
|
53
|
+
if (lang) {
|
|
54
|
+
element.setAttribute('lang', lang);
|
|
55
|
+
next.lang = lang;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
if (previous.lang)
|
|
59
|
+
element.removeAttribute('lang');
|
|
60
|
+
next.lang = null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
carried.set(element, next);
|
|
64
|
+
}
|
|
65
|
+
/** Takes back what `carryContext` wrote, for an element returned to its place. */
|
|
66
|
+
export function releaseContext(element) {
|
|
67
|
+
const previous = carried.get(element);
|
|
68
|
+
if (!previous)
|
|
69
|
+
return;
|
|
70
|
+
if (previous.scheme && element.style.colorScheme === previous.scheme)
|
|
71
|
+
element.style.removeProperty('color-scheme');
|
|
72
|
+
if (previous.lang && element.getAttribute('lang') === previous.lang)
|
|
73
|
+
element.removeAttribute('lang');
|
|
74
|
+
carried.delete(element);
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=carried-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carried-context.js","sourceRoot":"","sources":["../../src/utilities/carried-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,OAAO,GAAG,IAAI,OAAO,EAA+D,CAAC;AAE3F,4EAA4E;AAC5E,SAAS,MAAM,CAAC,EAAW;IAC1B,IAAI,IAAI,GAAmB,EAAE,CAAC;IAC9B,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,KAAK,GAAmB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,GAAG,IAAI,YAAY,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED;iFACiF;AACjF,MAAM,UAAU,YAAY,CAAC,OAAoB,EAAE,MAAsB;IACxE,IAAI,CAAC,MAAM,EAAE,WAAW;QAAE,OAAO;IACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACtE,MAAM,IAAI,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAE9D,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC;IAC5C,IAAI,CAAC,SAAS,IAAI,SAAS,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;QACjD,MAAM,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC;QACpD,IAAI,MAAM,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC;YACnC,sEAAsE;YACtE,mEAAmE;YACnE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC;QACzC,CAAC;aAAM,CAAC;YACP,IAAI,QAAQ,CAAC,MAAM;gBAAE,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;YAClE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACpB,CAAC;IACF,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5B,IAAI,IAAI,EAAE,CAAC;YACV,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,CAAC;aAAM,CAAC;YACP,IAAI,QAAQ,CAAC,IAAI;gBAAE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YACnD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAClB,CAAC;IACF,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,cAAc,CAAC,OAAoB;IAClD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,CAAC,QAAQ;QAAE,OAAO;IACtB,IAAI,QAAQ,CAAC,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IACnH,IAAI,QAAQ,CAAC,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC,IAAI;QAAE,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACrG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type PropertyValues } from 'lit';
|
|
2
|
+
import { EditorView } from '@codemirror/view';
|
|
3
|
+
import { type Extension } from '@codemirror/state';
|
|
4
|
+
import { type FormValue } from '../form-associated-mixin.js';
|
|
5
|
+
import { NLDDCodeMirrorElement } from './codemirror-element.js';
|
|
6
|
+
declare const NLDDCodeMirrorInput_base: typeof NLDDCodeMirrorElement & (abstract new (...args: any[]) => NLDDCodeMirrorElement & import("../form-associated-mixin.js").FormAssociatedElement) & (abstract new (...args: any[]) => import("../described-by-mixin.js").DescribedElement);
|
|
7
|
+
/**
|
|
8
|
+
* Shared base for the CodeMirror editors that are form controls
|
|
9
|
+
* (nldd-code-editor, nldd-text-editor). nldd-code-viewer is not one, so this
|
|
10
|
+
* sits between NLDDCodeMirrorElement and the two editors.
|
|
11
|
+
*
|
|
12
|
+
* It owns what a form control needs and both editors did the same way: the
|
|
13
|
+
* value and its `input`/`change` events, editable and read-only, the
|
|
14
|
+
* placeholder, the textbox attributes (label, id, aria-readonly,
|
|
15
|
+
* aria-required), form association and reset, a press on the padding that
|
|
16
|
+
* starts editing, and the warning for a missing label. A subclass adds its own
|
|
17
|
+
* extensions after `inputExtensions()` and can shape three things:
|
|
18
|
+
* `docToValue()`, `contentAttributes()` and `beforeChangeCheck()`.
|
|
19
|
+
*/
|
|
20
|
+
export declare abstract class NLDDCodeMirrorInput extends NLDDCodeMirrorInput_base {
|
|
21
|
+
static shadowRootOptions: {
|
|
22
|
+
delegatesFocus: boolean;
|
|
23
|
+
clonable?: boolean;
|
|
24
|
+
customElementRegistry?: CustomElementRegistry;
|
|
25
|
+
mode: ShadowRootMode;
|
|
26
|
+
serializable?: boolean;
|
|
27
|
+
slotAssignment?: SlotAssignmentMode;
|
|
28
|
+
};
|
|
29
|
+
/** Says this is the control an nldd-form-field is about, so the field can
|
|
30
|
+
* find it, name it and move focus into it. See nldd-form-field. */
|
|
31
|
+
static isFormInput: boolean;
|
|
32
|
+
value: string;
|
|
33
|
+
inputId: string;
|
|
34
|
+
placeholder: string;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
name: string;
|
|
37
|
+
readonly: boolean;
|
|
38
|
+
required: boolean;
|
|
39
|
+
rows: number;
|
|
40
|
+
accessibleLabel: string;
|
|
41
|
+
/**
|
|
42
|
+
* Marks the control as invalid.
|
|
43
|
+
*
|
|
44
|
+
* Announced and not drawn. What is wrong belongs in an
|
|
45
|
+
* nldd-validation-list, in words: a red ring around a single
|
|
46
|
+
* checkbox or radio would say the option is wrong, while it is the question
|
|
47
|
+
* that is unanswered. `aria-invalid` still goes on the control, because
|
|
48
|
+
* choosing not to show something is not a reason to keep quiet about it.
|
|
49
|
+
*/
|
|
50
|
+
invalid: boolean;
|
|
51
|
+
private _initialValue;
|
|
52
|
+
private _valueAtFocus;
|
|
53
|
+
private _accessibleLabelWarned;
|
|
54
|
+
private _editableCompartment;
|
|
55
|
+
private _placeholderCompartment;
|
|
56
|
+
private _attrsCompartment;
|
|
57
|
+
/** The custom property the visible row count goes into, named after the tag. */
|
|
58
|
+
protected abstract readonly rowsProperty: string;
|
|
59
|
+
/** The value for a document. Default: the document itself. */
|
|
60
|
+
protected docToValue(doc: string): string;
|
|
61
|
+
/** Attributes of the content element beyond label, id, aria-readonly and
|
|
62
|
+
* aria-required. Default: none. */
|
|
63
|
+
protected contentAttributes(): Record<string, string>;
|
|
64
|
+
/** Runs on blur, before the value is compared with the one at focus, so a
|
|
65
|
+
* subclass can settle the document first. Default: nothing. */
|
|
66
|
+
protected beforeChangeCheck(_view: EditorView): void;
|
|
67
|
+
/** The extensions every input needs. A subclass puts these in its own
|
|
68
|
+
* `buildExtensions()`, next to what is its own. */
|
|
69
|
+
protected inputExtensions(): Extension[];
|
|
70
|
+
private _editableExtension;
|
|
71
|
+
private _placeholderExtension;
|
|
72
|
+
private _attrsExtension;
|
|
73
|
+
/** Build the textbox attributes again, after something `contentAttributes()`
|
|
74
|
+
* reads has changed. */
|
|
75
|
+
protected refreshContentAttributes(): void;
|
|
76
|
+
firstUpdated(): void;
|
|
77
|
+
protected onEditorMounted(): void;
|
|
78
|
+
updated(changed: PropertyValues): void;
|
|
79
|
+
private _onDocChanged;
|
|
80
|
+
private _emitChange;
|
|
81
|
+
private _onScrollerPointerDown;
|
|
82
|
+
private _checkAccessibleLabel;
|
|
83
|
+
formValue(): FormValue;
|
|
84
|
+
formResetCallback(): void;
|
|
85
|
+
formStateRestoreCallback(state: File | string | FormData | null): void;
|
|
86
|
+
/** CodeMirror builds the textbox; the host is only its container. */
|
|
87
|
+
describedTarget(): Element | null;
|
|
88
|
+
}
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=codemirror-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemirror-input.d.ts","sourceRoot":"","sources":["../../../src/utilities/codemirror/codemirror-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAgC,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAG7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;;AAEhE;;;;;;;;;;;;GAYG;AACH,8BAAsB,mBAAoB,SAAQ,wBAAkD;IACnG,OAAgB,iBAAiB;;;;;;;MAG/B;IAEF;wEACoE;IACpE,MAAM,CAAC,WAAW,UAAQ;IAG1B,KAAK,SAAM;IAGX,OAAO,SAAM;IAGb,WAAW,SAAM;IAGjB,QAAQ,UAAS;IAGjB,IAAI,SAAM;IAGV,QAAQ,UAAS;IAGjB,QAAQ,UAAS;IAGjB,IAAI,SAAK;IAGT,eAAe,SAAM;IAErB;;;;;;;;OAQG;IAEH,OAAO,UAAS;IAEhB,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,sBAAsB,CAAS;IAEvC,OAAO,CAAC,oBAAoB,CAAqB;IACjD,OAAO,CAAC,uBAAuB,CAAqB;IACpD,OAAO,CAAC,iBAAiB,CAAqB;IAE9C,gFAAgF;IAChF,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAEjD,8DAA8D;IAC9D,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzC;wCACoC;IACpC,SAAS,CAAC,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrD;oEACgE;IAChE,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAEpD;wDACoD;IACpD,SAAS,CAAC,eAAe,IAAI,SAAS,EAAE;IAoBxC,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,eAAe;IAUvB;6BACyB;IACzB,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAIjC,YAAY,IAAI,IAAI;cAUV,eAAe,IAAI,IAAI;IAQjC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IA4B/C,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,sBAAsB,CAK5B;IAKF,OAAO,CAAC,qBAAqB;IAOpB,SAAS,IAAI,SAAS;IAI/B,iBAAiB,IAAI,IAAI;IAIzB,wBAAwB,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI;IAItE,qEAAqE;IAC5D,eAAe,IAAI,OAAO,GAAG,IAAI;CAG1C"}
|