@nldd/design-system 0.13.1 → 0.14.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/NOTICES.md +18 -1
- package/README.md +36 -26
- package/custom-elements.json +2508 -179
- package/dist/components/actions/button/button.d.ts +0 -2
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +17 -33
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.template.js +2 -2
- package/dist/components/actions/button-bar/button-bar.d.ts +0 -2
- package/dist/components/actions/button-bar/button-bar.d.ts.map +1 -1
- package/dist/components/actions/button-bar/button-bar.js +2 -12
- package/dist/components/actions/button-bar/button-bar.js.map +1 -1
- package/dist/components/actions/button-group/button-group.d.ts +22 -7
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +41 -23
- 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 +43 -18
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/button-group/button-group.template.js +1 -1
- package/dist/components/actions/button-group/button-group.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +0 -1
- package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/actions/icon-button/icon-button.js +4 -11
- package/dist/components/actions/icon-button/icon-button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.template.js +2 -2
- package/dist/components/actions/menu/menu-divider.d.ts +1 -0
- package/dist/components/actions/menu/menu-divider.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-divider.js +1 -0
- package/dist/components/actions/menu/menu-divider.js.map +1 -1
- package/dist/components/actions/menu/menu-group.d.ts +1 -0
- package/dist/components/actions/menu/menu-group.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-group.js +1 -0
- package/dist/components/actions/menu/menu-group.js.map +1 -1
- package/dist/components/actions/menu/menu-item.d.ts +1 -0
- package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
- package/dist/components/actions/menu/menu-item.js +4 -7
- package/dist/components/actions/menu/menu-item.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +15 -4
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +44 -17
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
- package/dist/components/actions/split-button/split-button.js +2 -1
- package/dist/components/actions/split-button/split-button.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar-item.d.ts +0 -2
- package/dist/components/actions/toolbar/toolbar-item.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar-item.js +2 -20
- package/dist/components/actions/toolbar/toolbar-item.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar-title.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar-title.js +2 -1
- package/dist/components/actions/toolbar/toolbar-title.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/actions/toolbar/toolbar.js +2 -1
- package/dist/components/actions/toolbar/toolbar.js.map +1 -1
- package/dist/components/button.i18n-DiDGynnq.js +8 -0
- package/dist/components/components.js +2761 -780
- package/dist/components/content/avatar/avatar.d.ts +0 -2
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.js +2 -27
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts +0 -1
- package/dist/components/content/avatar-group/avatar-group.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.js +2 -24
- 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 +12 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.js +2 -1
- package/dist/components/content/blockquote/blockquote.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.d.ts +1 -0
- package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.diff.d.ts +2 -0
- package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.diff.js +1 -4
- package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -1
- package/dist/components/content/code-viewer/code-viewer.js +13 -11
- package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +10 -5
- 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 +4 -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 +4 -2
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.d.ts +3 -0
- package/dist/components/content/icon/icon.d.ts.map +1 -1
- package/dist/components/content/icon/icon.js +19 -15
- package/dist/components/content/icon/icon.js.map +1 -1
- package/dist/components/content/identity/identity.d.ts.map +1 -1
- package/dist/components/content/identity/identity.js +2 -1
- package/dist/components/content/identity/identity.js.map +1 -1
- package/dist/components/content/image/image.d.ts +5 -11
- package/dist/components/content/image/image.d.ts.map +1 -1
- package/dist/components/content/image/image.js +14 -31
- package/dist/components/content/image/image.js.map +1 -1
- package/dist/components/content/image/lqip-encoder-element.d.ts.map +1 -1
- package/dist/components/content/image/lqip-encoder-element.js +2 -1
- package/dist/components/content/image/lqip-encoder-element.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +2 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
- package/dist/components/content/rich-text/rich-text.js +2 -1
- package/dist/components/content/rich-text/rich-text.js.map +1 -1
- package/dist/components/content/tag/tag.d.ts.map +1 -1
- package/dist/components/content/tag/tag.js +5 -5
- package/dist/components/content/tag/tag.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.d.ts.map +1 -1
- package/dist/components/content/text/text.js +3 -2
- package/dist/components/content/text/text.js.map +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +104 -1
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/title/title.d.ts +1 -5
- package/dist/components/content/title/title.d.ts.map +1 -1
- package/dist/components/content/title/title.js +15 -27
- package/dist/components/content/title/title.js.map +1 -1
- package/dist/components/content/token/token.d.ts.map +1 -1
- package/dist/components/content/token/token.js +2 -1
- package/dist/components/content/token/token.js.map +1 -1
- package/dist/components/content/token/token.styles.d.ts.map +1 -1
- package/dist/components/content/token/token.styles.js +2 -1
- package/dist/components/content/token/token.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/content/tooltip/tooltip.js +2 -1
- package/dist/components/content/tooltip/tooltip.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +7 -7
- package/dist/components/content/visually-hidden/visually-hidden.js +1 -1
- package/dist/components/content/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/components/{decorate-Cz9-peTN.js → decorate-x12uDAK4.js} +9 -1
- package/dist/components/dev-checks-BgrW077W.js +2503 -0
- package/dist/components/element-state-BnarBv0M.js +42 -0
- package/dist/components/forms/form/form.d.ts +1 -96
- package/dist/components/forms/form/form.d.ts.map +1 -1
- package/dist/components/forms/form/form.js +1 -0
- package/dist/components/forms/form/form.js.map +1 -1
- package/dist/components/forms/form-actions/form-actions.d.ts.map +1 -1
- package/dist/components/forms/form-actions/form-actions.js +2 -1
- package/dist/components/forms/form-actions/form-actions.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +10 -7
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +27 -32
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/forms/form-section/form-section.d.ts +1 -67
- package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
- package/dist/components/forms/form-section/form-section.js +2 -16
- package/dist/components/forms/form-section/form-section.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -1
- package/dist/components/forms/validation-list/validation-list.js +7 -6
- package/dist/components/forms/validation-list/validation-list.js.map +1 -1
- package/dist/components/{icon-DZ1UXCzO.js → icon-IgCyk9ui.js} +29 -10
- package/dist/components/{icon-button-984CwkU1.js → icon-button-B5tH4b3c.js} +15 -24
- package/dist/components/icon-button.i18n-1_N-wN6x.js +10 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.js +2 -1
- package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.js +2 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.js +2 -1
- package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +4 -5
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +2 -1
- package/dist/components/inputs/date-field/date-field.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.js +2 -1
- package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +5 -4
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +12 -0
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.d.ts +1 -0
- package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.js +1 -0
- package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +30 -10
- 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 +91 -8
- 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 +51 -21
- package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js +2 -4
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +2 -4
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.js +2 -1
- package/dist/components/inputs/password-field/password-field.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.js +2 -1
- package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.js +2 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +0 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.js +2 -6
- package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +2 -1
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +0 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +2 -11
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/slider/slider.d.ts +161 -0
- package/dist/components/inputs/slider/slider.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.i18n.d.ts +6 -0
- package/dist/components/inputs/slider/slider.i18n.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.i18n.js +5 -0
- package/dist/components/inputs/slider/slider.i18n.js.map +1 -0
- package/dist/components/inputs/slider/slider.js +437 -0
- package/dist/components/inputs/slider/slider.js.map +1 -0
- package/dist/components/inputs/slider/slider.styles.d.ts +2 -0
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.styles.js +360 -0
- package/dist/components/inputs/slider/slider.styles.js.map +1 -0
- package/dist/components/inputs/slider/slider.template.d.ts +5 -0
- package/dist/components/inputs/slider/slider.template.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.template.js +99 -0
- package/dist/components/inputs/slider/slider.template.js.map +1 -0
- package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.js +2 -1
- package/dist/components/inputs/stepper/stepper.js.map +1 -1
- package/dist/components/inputs/switch/switch.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.js +2 -4
- package/dist/components/inputs/switch/switch.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.js +2 -1
- package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +7 -3
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +2 -0
- package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.mentions.js +14 -2
- package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts +1 -5
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +6 -23
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +2 -1
- package/dist/components/inputs/time-field/time-field.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +2 -1
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +0 -2
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +2 -23
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +0 -2
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js +2 -12
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.js +2 -1
- package/dist/components/inputs/token-field/token-field.js.map +1 -1
- package/dist/components/just-in-time-education.i18n-BJ5ovWVB.js +370 -0
- package/dist/components/layout/box/box.d.ts.map +1 -1
- package/dist/components/layout/box/box.js +2 -1
- package/dist/components/layout/box/box.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +0 -1
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +2 -15
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.template.js +2 -2
- package/dist/components/layout/collection/collection.d.ts +0 -2
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +8 -24
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/container/container.d.ts +6 -3
- package/dist/components/layout/container/container.d.ts.map +1 -1
- package/dist/components/layout/container/container.js +17 -23
- package/dist/components/layout/container/container.js.map +1 -1
- package/dist/components/layout/divider/divider.js +1 -1
- package/dist/components/layout/divider/divider.js.map +1 -1
- package/dist/components/layout/page/page.d.ts +2 -3
- package/dist/components/layout/page/page.d.ts.map +1 -1
- package/dist/components/layout/page/page.js +9 -12
- package/dist/components/layout/page/page.js.map +1 -1
- package/dist/components/layout/page-footer/page-footer.d.ts.map +1 -1
- package/dist/components/layout/page-footer/page-footer.js +6 -7
- package/dist/components/layout/page-footer/page-footer.js.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js +2 -1
- package/dist/components/layout/page-sections/full-bleed-section/full-bleed-section.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts +0 -1
- package/dist/components/layout/page-sections/hero/hero-corner.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero-corner.js +9 -28
- package/dist/components/layout/page-sections/hero/hero-corner.js.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.d.ts +1 -4
- package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
- package/dist/components/layout/page-sections/hero/hero.js +7 -29
- package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js +2 -1
- package/dist/components/layout/page-sections/one-half-one-half-section/one-half-one-half-section.js.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js +2 -1
- package/dist/components/layout/page-sections/one-third-two-thirds-section/one-third-two-thirds-section.js.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js +2 -1
- package/dist/components/layout/page-sections/sidebar-section/sidebar-section.js.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js +2 -1
- package/dist/components/layout/page-sections/simple-section/simple-section.js.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.d.ts.map +1 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js +2 -1
- package/dist/components/layout/page-sections/two-thirds-one-third-section/two-thirds-one-third-section.js.map +1 -1
- package/dist/components/layout/popover/popover.d.ts +0 -2
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +6 -25
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +0 -2
- package/dist/components/layout/sheet/sheet.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.js +9 -20
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/shell/shell.d.ts.map +1 -1
- package/dist/components/layout/shell/shell.js +2 -1
- package/dist/components/layout/shell/shell.js.map +1 -1
- package/dist/components/layout/spacer/spacer.d.ts.map +1 -1
- package/dist/components/layout/spacer/spacer.js +2 -1
- package/dist/components/layout/spacer/spacer.js.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts +6 -6
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js +9 -12
- package/dist/components/layout/split-views/bar-split-view/bar-split-view.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js +2 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js +2 -1
- package/dist/components/layout/split-views/side-by-side-split-view/side-by-side-split-view.js.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.js +2 -1
- package/dist/components/layout/split-views/split-view-divider/split-view-divider.js.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.d.ts.map +1 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js +2 -1
- package/dist/components/layout/split-views/split-view-pane/split-view-pane.js.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.d.ts.map +1 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js +2 -1
- package/dist/components/layout/split-views/stacked-split-view/stacked-split-view.js.map +1 -1
- package/dist/components/layout/task-board/task-board-column.d.ts +80 -0
- package/dist/components/layout/task-board/task-board-column.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board-column.js +205 -0
- package/dist/components/layout/task-board/task-board-column.js.map +1 -0
- package/dist/components/layout/task-board/task-board-column.template.d.ts +3 -0
- package/dist/components/layout/task-board/task-board-column.template.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board-column.template.js +45 -0
- package/dist/components/layout/task-board/task-board-column.template.js.map +1 -0
- package/dist/components/layout/task-board/task-board.d.ts +169 -0
- package/dist/components/layout/task-board/task-board.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.i18n.d.ts +11 -0
- package/dist/components/layout/task-board/task-board.i18n.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.i18n.js +10 -0
- package/dist/components/layout/task-board/task-board.i18n.js.map +1 -0
- package/dist/components/layout/task-board/task-board.js +702 -0
- package/dist/components/layout/task-board/task-board.js.map +1 -0
- package/dist/components/layout/task-board/task-board.styles.d.ts +3 -0
- package/dist/components/layout/task-board/task-board.styles.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.styles.js +259 -0
- package/dist/components/layout/task-board/task-board.styles.js.map +1 -0
- package/dist/components/layout/task-board/task-board.template.d.ts +3 -0
- package/dist/components/layout/task-board/task-board.template.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.template.js +25 -0
- package/dist/components/layout/task-board/task-board.template.js.map +1 -0
- package/dist/components/layout/window/window.d.ts +0 -1
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +4 -6
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/list-item.i18n-89uqlBMK.js +8 -0
- package/dist/components/list.i18n-nFB6dZpc.js +13 -0
- package/dist/components/lists-and-tables/cells/cell/cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/cell/cell.js +2 -1
- package/dist/components/lists-and-tables/cells/cell/cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/description-cell/description-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/drag-handle-cell/drag-handle-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts +1 -0
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js +3 -1
- package/dist/components/lists-and-tables/cells/icon-cell/icon-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/spacer-cell/spacer-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts +0 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js +5 -15
- package/dist/components/lists-and-tables/cells/step-cell/step-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/text-cell/text-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js +2 -1
- package/dist/components/lists-and-tables/cells/title-cell/title-cell.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +5 -23
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +53 -98
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +10 -15
- package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.js +40 -87
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +2 -2
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +6 -11
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.d.ts +0 -13
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +6 -41
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.js +2 -1
- package/dist/components/navigation/breadcrumbs/breadcrumbs.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 +2 -4
- package/dist/components/navigation/document-tab-bar/document-tab-bar.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +5 -0
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.js +21 -1
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/link/link.template.d.ts +1 -0
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +18 -16
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts +4 -0
- package/dist/components/navigation/menu-bar/menu-bar.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.js +13 -10
- package/dist/components/navigation/menu-bar/menu-bar.js.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts.map +1 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +2 -1
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +2 -1
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.d.ts.map +1 -1
- package/dist/components/navigation/skip-link/skip-link.js +6 -8
- package/dist/components/navigation/skip-link/skip-link.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +5 -15
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +0 -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 +6 -6
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.js +7 -6
- package/dist/components/navigation/top-title-bar/top-title-bar.js.map +1 -1
- package/dist/components/nl.generated-Ny3Kwppu.js +61 -0
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +2 -1
- package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.js +3 -6
- package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.d.ts.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.js +2 -1
- package/dist/components/status-and-feedback/banner/banner.js.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js +2 -1
- package/dist/components/status-and-feedback/inline-dialog/inline-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts.map +1 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js +2 -1
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts +0 -3
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +2 -14
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
- package/dist/components/status-and-feedback/notification/notification.js +3 -7
- package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js +4 -5
- package/dist/components/status-and-feedback/progress-bar/progress-bar.js.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.d.ts.map +1 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js +2 -1
- package/dist/components/status-and-feedback/progress-circle/progress-circle.js.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.js +8 -7
- package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts +0 -7
- package/dist/components/status-and-feedback/step-bar/step-bar.d.ts.map +1 -1
- package/dist/components/status-and-feedback/step-bar/step-bar.js +2 -24
- package/dist/components/status-and-feedback/step-bar/step-bar.js.map +1 -1
- package/dist/components/{visibility-mixin-C-K7ho5Q.js → visibility-mixin-DcwzF0_a.js} +1 -7
- package/dist/components/{with-translations-DRuOq3QK.js → with-translations-DLzmBSkU.js} +26 -5
- package/dist/css/{global-system-font.css → global-open-font.css} +2 -0
- package/dist/css/global.css +1 -0
- package/dist/css/inter-font.css +47 -0
- package/dist/css/jetbrains-mono-font.css +22 -0
- package/dist/css/rijksoverheid-fonts.css +4 -21
- package/dist/css/themes/bruin.css +1 -0
- package/dist/css/themes/donkerblauw.css +1 -0
- package/dist/css/themes/donkerbruin.css +1 -0
- package/dist/css/themes/donkergeel.css +1 -0
- package/dist/css/themes/donkergroen.css +1 -0
- package/dist/css/themes/geel.css +1 -0
- package/dist/css/themes/groen.css +1 -0
- package/dist/css/themes/hemelblauw.css +1 -0
- package/dist/css/themes/lichtblauw.css +1 -0
- package/dist/css/themes/mintgroen.css +1 -0
- package/dist/css/themes/mosgroen.css +1 -0
- package/dist/css/themes/oranje.css +1 -0
- package/dist/css/themes/paars.css +1 -0
- package/dist/css/themes/robijnrood.css +1 -0
- package/dist/css/themes/rood.css +1 -0
- package/dist/css/themes/roze.css +1 -0
- package/dist/css/themes/violet.css +1 -0
- package/dist/css/themes.css +17 -0
- package/dist/css/tokens.css +1 -0
- package/dist/css/variables.css +27 -5
- package/dist/fonts/Inter-Latin-Italic[wght].woff2 +0 -0
- package/dist/fonts/Inter-LatinExt-Italic[wght].woff2 +0 -0
- package/dist/fonts/Inter-LatinExt[wght].woff2 +0 -0
- package/dist/fonts/Inter-Latin[wght].woff2 +0 -0
- package/dist/nldd.min.js +1856 -895
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +10 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +10 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +4 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/types/vue.d.ts +183 -9
- package/dist/utilities/codemirror/codemirror-input.d.ts +0 -2
- package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -1
- package/dist/utilities/codemirror/codemirror-input.js +0 -14
- package/dist/utilities/codemirror/codemirror-input.js.map +1 -1
- package/dist/utilities/custom-element.d.ts +7 -0
- package/dist/utilities/custom-element.d.ts.map +1 -0
- package/dist/utilities/custom-element.js +7 -0
- package/dist/utilities/custom-element.js.map +1 -0
- package/dist/utilities/dev-checks-trigger.d.ts +2 -0
- package/dist/utilities/dev-checks-trigger.d.ts.map +1 -0
- package/dist/utilities/dev-checks-trigger.js +10 -0
- package/dist/utilities/dev-checks-trigger.js.map +1 -0
- package/dist/utilities/dev-checks.d.ts +40 -0
- package/dist/utilities/dev-checks.d.ts.map +1 -0
- package/dist/utilities/dev-checks.js +115 -0
- package/dist/utilities/dev-checks.js.map +1 -0
- package/dist/utilities/dev-rules.generated.d.ts +3 -0
- package/dist/utilities/dev-rules.generated.d.ts.map +1 -0
- package/dist/utilities/dev-rules.generated.js +2472 -0
- package/dist/utilities/dev-rules.generated.js.map +1 -0
- package/dist/utilities/element-state.d.ts +19 -0
- package/dist/utilities/element-state.d.ts.map +1 -0
- package/dist/utilities/element-state.js +49 -0
- package/dist/utilities/element-state.js.map +1 -0
- package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
- package/dist/utilities/form-associated-mixin.js +2 -1
- package/dist/utilities/form-associated-mixin.js.map +1 -1
- package/dist/utilities/link-hint.d.ts +2 -21
- package/dist/utilities/link-hint.d.ts.map +1 -1
- package/dist/utilities/link-hint.js +22 -8
- package/dist/utilities/link-hint.js.map +1 -1
- package/dist/utilities/spacing-scale.d.ts +4 -5
- package/dist/utilities/spacing-scale.d.ts.map +1 -1
- package/dist/utilities/spacing-scale.js +4 -23
- package/dist/utilities/spacing-scale.js.map +1 -1
- package/dist/utilities/tab-order.d.ts +11 -0
- package/dist/utilities/tab-order.d.ts.map +1 -0
- package/dist/utilities/tab-order.js +55 -0
- package/dist/utilities/tab-order.js.map +1 -0
- package/dist/utilities/translations.d.ts.map +1 -1
- package/dist/utilities/translations.js +3 -15
- package/dist/utilities/translations.js.map +1 -1
- package/dist/utilities/visibility-mixin.d.ts +7 -0
- package/dist/utilities/visibility-mixin.d.ts.map +1 -1
- package/dist/utilities/visibility-mixin.js +0 -10
- package/dist/utilities/visibility-mixin.js.map +1 -1
- package/lint/cli.js +18 -0
- package/lint/data.generated.json +1 -0
- package/lint/engine.js +191 -0
- package/lint/fix.js +293 -0
- package/lint/format.js +133 -0
- package/lint/frontends.js +483 -0
- package/lint/linter.js +262 -0
- package/lint/main.js +279 -0
- package/lint/project.js +143 -0
- package/lint/rule-data.js +83 -0
- package/lint/rule-index.js +20 -0
- package/lint/rule.schema.json +65 -0
- package/lint/tree.js +131 -0
- package/package.json +32 -6
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/utilities/element-state.ts
|
|
2
|
+
/**
|
|
3
|
+
* Makes a fact about a component visible to CSS, as `:state(name)`.
|
|
4
|
+
*
|
|
5
|
+
* Some things are not in the markup: how wide a component turned out, whether a
|
|
6
|
+
* value could be parsed. A component states that fact here and knows nothing about
|
|
7
|
+
* what it means; a rule in src/rules/ reads it with a selector. While developing
|
|
8
|
+
* only: in production this does nothing.
|
|
9
|
+
*/
|
|
10
|
+
var internals = /* @__PURE__ */ new WeakMap();
|
|
11
|
+
/** An element can attach its internals once, so everything that needs them comes here. */
|
|
12
|
+
function internalsOf(element) {
|
|
13
|
+
let result = internals.get(element);
|
|
14
|
+
if (!result) {
|
|
15
|
+
result = element.attachInternals();
|
|
16
|
+
internals.set(element, result);
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
/** Whether anything in this root states this. False where the browser has no `:state()`. */
|
|
21
|
+
function hasState(root, name) {
|
|
22
|
+
try {
|
|
23
|
+
return root.querySelector(`:state(${name})`) !== null;
|
|
24
|
+
} catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Nothing to clear means no internals: most elements never state anything, and
|
|
30
|
+
* this also runs in production. A browser that has no custom states, or takes
|
|
31
|
+
* only dashed names, throws here; a fact is not worth breaking a render for.
|
|
32
|
+
*/
|
|
33
|
+
function setState(element, name, on) {
|
|
34
|
+
if (!import.meta.env?.DEV) return;
|
|
35
|
+
if (!on && !internals.has(element)) return;
|
|
36
|
+
try {
|
|
37
|
+
const { states } = internalsOf(element);
|
|
38
|
+
if (on) states.add(name);
|
|
39
|
+
else states.delete(name);
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
export { internalsOf as n, setState as r, hasState as t };
|
|
@@ -1,99 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Nederlandse Digitale Dienst Form Component
|
|
3
|
-
*
|
|
4
|
-
* Plain custom element (extends HTMLElement, no Lit), required for light-DOM
|
|
5
|
-
* autofill. Renders a real <form> element in the LIGHT DOM around its
|
|
6
|
-
* children. Chrome's autofill engine looks for native <input> elements that
|
|
7
|
-
* have a <form> ancestor in the light DOM; with shadow-DOM inputs it can't
|
|
8
|
-
* find them, so we keep this component shadow-less.
|
|
9
|
-
*
|
|
10
|
-
* **Differs from other nldd-* components:**
|
|
11
|
-
* - No shadowRoot: all children live in the light DOM (inside the inner <form>)
|
|
12
|
-
* - No Lit: a plain HTMLElement with manual attribute mirroring
|
|
13
|
-
* - **Requires a global stylesheet import**: the vertical rhythm rules live in
|
|
14
|
-
* `dist/css/form.css` (or `global.css`), not in a component-specific shadow
|
|
15
|
-
* stylesheet. Import it as part of your app's global CSS bundle.
|
|
16
|
-
*
|
|
17
|
-
* **When a field turns red:** on submit the form marks every control the
|
|
18
|
-
* browser rejects with `invalid`, and clears it again once the value passes.
|
|
19
|
-
* Setting `invalid` yourself is fine, but do it on submit, not while someone is
|
|
20
|
-
* still typing, or a field turns red over a value that is not finished yet.
|
|
21
|
-
*
|
|
22
|
-
* **Two usage modes:**
|
|
23
|
-
*
|
|
24
|
-
* 1. **Auto-wrap** (default): write children directly. Component creates a
|
|
25
|
-
* `<form>` element and migrates children into it via MutationObserver.
|
|
26
|
-
* Simplest API.
|
|
27
|
-
*
|
|
28
|
-
* 2. **User-provided form** (framework-friendly): write your own `<form>`
|
|
29
|
-
* as direct child. Component detects it, takes over attribute mirroring,
|
|
30
|
-
* and skips the migration. Children stay where your framework puts them,
|
|
31
|
-
* so there is no DOM shuffling to conflict with React/Vue/Angular
|
|
32
|
-
* reconciliation.
|
|
33
|
-
*
|
|
34
|
-
* **Framework interop:**
|
|
35
|
-
*
|
|
36
|
-
* In auto-wrap mode every direct child is moved into the inner form through a
|
|
37
|
-
* MutationObserver. That works fine for most React/Vue use cases, because
|
|
38
|
-
* frameworks only mutate the DOM when their virtual DOM changes. For edge
|
|
39
|
-
* cases (animation libraries that track DOM position, SSR hydration
|
|
40
|
-
* mismatches, frameworks that actively check sibling positions) use
|
|
41
|
-
* **user-provided form** mode instead.
|
|
42
|
-
*
|
|
43
|
-
* For programmatic manipulation, use the `form` getter so you work with the
|
|
44
|
-
* inner `<form>` element directly:
|
|
45
|
-
*
|
|
46
|
-
* const inner = document.querySelector('nldd-form').form;
|
|
47
|
-
* inner.checkValidity();
|
|
48
|
-
* inner.appendChild(myInput); // skips the migration overhead
|
|
49
|
-
*
|
|
50
|
-
* @element nldd-form
|
|
51
|
-
*
|
|
52
|
-
* @attr {string} label-alignment - Default `label-alignment` for descendant nldd-form-field and nldd-form-actions ('top' | 'right' | 'left'). Propagated to descendants as `form-label-alignment`. A `label-alignment` of its own on the descendant takes precedence through the CSS cascade.
|
|
53
|
-
* @attr {string} name - Form name
|
|
54
|
-
* @attr {string} autocomplete - 'on' | 'off' (form-level autofill toggle)
|
|
55
|
-
* @attr {string} target - Submit target ('_self' | '_blank' | ...)
|
|
56
|
-
* @attr {string} method - HTTP method ('get' | 'post' | 'dialog')
|
|
57
|
-
* @attr {string} action - URL endpoint for submission
|
|
58
|
-
* @attr {string} enctype - Encoding type for submission
|
|
59
|
-
* @attr {boolean} novalidate - Skip native browser validation
|
|
60
|
-
*
|
|
61
|
-
* @prop {HTMLFormElement | null} form - The inner <form> element (read-only). Use it for `form.checkValidity()`, direct DOM manipulation, or as the target for framework-managed children.
|
|
62
|
-
*
|
|
63
|
-
* Events bubble naturally from the inner <form>:
|
|
64
|
-
* @fires submit
|
|
65
|
-
* @fires reset
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* Global stylesheet import (once, in your app entry):
|
|
69
|
-
* ```js
|
|
70
|
-
* import '@nldd/design-system/styles';
|
|
71
|
-
* ```
|
|
72
|
-
*
|
|
73
|
-
* Auto-wrap mode:
|
|
74
|
-
* ```html
|
|
75
|
-
* <nldd-form
|
|
76
|
-
* name="profile"
|
|
77
|
-
* novalidate
|
|
78
|
-
* >
|
|
79
|
-
* <nldd-text-field name="email" autocomplete="email"></nldd-text-field>
|
|
80
|
-
* <nldd-button type="submit" text="Verstuur"></nldd-button>
|
|
81
|
-
* </nldd-form>
|
|
82
|
-
* ```
|
|
83
|
-
*
|
|
84
|
-
* User-provided form mode (React/Vue/Angular):
|
|
85
|
-
* ```html
|
|
86
|
-
* <nldd-form
|
|
87
|
-
* name="profile"
|
|
88
|
-
* novalidate
|
|
89
|
-
* >
|
|
90
|
-
* <form>
|
|
91
|
-
* <nldd-text-field name="email" autocomplete="email"></nldd-text-field>
|
|
92
|
-
* <nldd-button type="submit" text="Verstuur"></nldd-button>
|
|
93
|
-
* </form>
|
|
94
|
-
* </nldd-form>
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
1
|
+
import '../../../utilities/custom-element.js';
|
|
97
2
|
export declare class NLDDForm extends HTMLElement {
|
|
98
3
|
static get observedAttributes(): string[];
|
|
99
4
|
private _form;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AA8G9C,qBAAa,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,CAAC,EAAE,CAAC;IACtC,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAMjC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,qBACa,eAAgB,SAAQ,UAAU;IAC9C,OAAgB,MAAM,0BAAqB;IAE3C;;;;;OAKG;IAEH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAa;IAE9C,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -37,7 +37,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
37
37
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
38
38
|
};
|
|
39
39
|
import { LitElement } from 'lit';
|
|
40
|
-
import {
|
|
40
|
+
import { property } from 'lit/decorators.js';
|
|
41
|
+
import { customElement } from '../../../utilities/custom-element.js';
|
|
41
42
|
import { formActionsStyles } from './form-actions.styles.js';
|
|
42
43
|
import { formActionsTemplate } from './form-actions.template.js';
|
|
43
44
|
let NLDDFormActions = class NLDDFormActions extends LitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAK1D,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAGN;;;;;WAKG;QAEH,mBAAc,GAA+B,SAAS,CAAC;IAKxD,CAAC;IAHS,MAAM;QACd,OAAO,mBAAmB,EAAE,CAAC;IAC9B,CAAC;;AAbe,sBAAM,GAAG,iBAAiB,AAApB,CAAqB;AAS3C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;uDACjB;AAV3C,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAe3B"}
|
|
@@ -82,10 +82,11 @@ export declare class NLDDFormField extends LitElement {
|
|
|
82
82
|
/** Label text for the optional badge. Defaults to 'Optioneel'. Override for localisation. */
|
|
83
83
|
optionalLabel: string;
|
|
84
84
|
private _childObserver;
|
|
85
|
+
/** Watches the validation lists for items that come, go, show or hide. */
|
|
86
|
+
private _listObserver;
|
|
85
87
|
/** The last label this field wrote onto the control, so it only takes back its own. */
|
|
86
88
|
private _appliedLabel;
|
|
87
89
|
/** Keeps the "no input found" warning to one per field rather than one per mutation. */
|
|
88
|
-
private _warnedNoInput;
|
|
89
90
|
render(): import("lit-html").TemplateResult;
|
|
90
91
|
updated(changed: Map<PropertyKey, unknown>): void;
|
|
91
92
|
connectedCallback(): void;
|
|
@@ -141,7 +142,7 @@ export declare class NLDDFormField extends LitElement {
|
|
|
141
142
|
* group with an "Anders" text field beside it being the case this component
|
|
142
143
|
* is built for. But a list that reads a value would then quietly read the
|
|
143
144
|
* wrong one, and nothing on screen would show it: the rules simply never
|
|
144
|
-
* match.
|
|
145
|
+
* match.
|
|
145
146
|
*/
|
|
146
147
|
private _adoptValidationLists;
|
|
147
148
|
/**
|
|
@@ -174,11 +175,13 @@ export declare class NLDDFormField extends LitElement {
|
|
|
174
175
|
* that is the control itself, a native input or a host with a role of its
|
|
175
176
|
* own, is pointed at directly.
|
|
176
177
|
*
|
|
177
|
-
* The
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
178
|
+
* The items of a validation list that are on screen, not the list. Safari
|
|
179
|
+
* passes nothing on to VoiceOver for an element whose text sits in a
|
|
180
|
+
* `role="list"`, which the list renders, so a reference to the list was an
|
|
181
|
+
* empty description there. Only the visible items, because an element
|
|
182
|
+
* referenced directly is read even while it is hidden: a met requirement
|
|
183
|
+
* would still be read out. The references change when an item shows or
|
|
184
|
+
* hides, which is when the description changes anyway.
|
|
182
185
|
*
|
|
183
186
|
* The requirements before the plain help text: what is wrong is why you are
|
|
184
187
|
* here.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":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AO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,iBAAiB,EAAE,aAAa,CAAC;QACjC,2BAA2B,EAAE,qBAAqB,CAAC;KACnD;CACD"}
|
|
@@ -50,11 +50,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
50
50
|
* </nldd-form-field>
|
|
51
51
|
*/
|
|
52
52
|
import { LitElement } from 'lit';
|
|
53
|
-
import {
|
|
53
|
+
import { property } from 'lit/decorators.js';
|
|
54
|
+
import { customElement } from '../../../utilities/custom-element.js';
|
|
54
55
|
import { setOwnedAttribute } from '../../../utilities/owned-attribute.js';
|
|
55
56
|
import { applyDescribedBy } from '../../../utilities/described-by-mixin.js';
|
|
56
57
|
import { formFieldStyles, formFieldHelpTextStyles, } from './form-field.styles.js';
|
|
57
58
|
import { formFieldTemplate, formFieldHelpTextTemplate, } from './form-field.template.js';
|
|
59
|
+
import { setState } from '../../../utilities/element-state.js';
|
|
58
60
|
// Exclude helper elements so _findInput() never returns them instead of the actual input
|
|
59
61
|
const HELPER_TAGS = ['nldd-form-field-help-text'];
|
|
60
62
|
/**
|
|
@@ -123,11 +125,12 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
123
125
|
/** Label text for the optional badge. Defaults to 'Optioneel'. Override for localisation. */
|
|
124
126
|
this.optionalLabel = 'Optioneel';
|
|
125
127
|
this._childObserver = null;
|
|
128
|
+
/** Watches the validation lists for items that come, go, show or hide. */
|
|
129
|
+
this._listObserver = null;
|
|
126
130
|
/** The last label this field wrote onto the control, so it only takes back its own. */
|
|
127
131
|
this._appliedLabel = null;
|
|
128
|
-
/** Keeps the "no input found" warning to one per field rather than one per mutation. */
|
|
129
|
-
this._warnedNoInput = false;
|
|
130
132
|
}
|
|
133
|
+
/** Keeps the "no input found" warning to one per field rather than one per mutation. */
|
|
131
134
|
render() {
|
|
132
135
|
return formFieldTemplate(this);
|
|
133
136
|
}
|
|
@@ -147,6 +150,7 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
147
150
|
disconnectedCallback() {
|
|
148
151
|
super.disconnectedCallback();
|
|
149
152
|
this._childObserver?.disconnect();
|
|
153
|
+
this._listObserver?.disconnect();
|
|
150
154
|
}
|
|
151
155
|
/**
|
|
152
156
|
* Called when the label is clicked — focuses the slotted input.
|
|
@@ -172,20 +176,11 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
172
176
|
}
|
|
173
177
|
_onSlotChange() {
|
|
174
178
|
const input = this._findInput();
|
|
179
|
+
// A consumer's own element can be an input too, which no selector can know.
|
|
180
|
+
setState(this, 'has-input', Boolean(input));
|
|
175
181
|
if (!input) {
|
|
176
|
-
// Only once there is something to look at. An empty field is usually one
|
|
177
|
-
// still being filled, and a component that forgot `static isFormInput`
|
|
178
|
-
// should be the one that stands out.
|
|
179
|
-
const hasContent = Array.from(this.children)
|
|
180
|
-
.some(el => !HELPER_TAGS.includes(el.tagName.toLowerCase()));
|
|
181
|
-
if (import.meta.env?.DEV && hasContent && !this._warnedNoInput) {
|
|
182
|
-
this._warnedNoInput = true;
|
|
183
|
-
const which = this.label ? ` (label="${this.label}")` : '';
|
|
184
|
-
console.warn(`<nldd-form-field>${which}: No form input found among its children. The label cannot name anything or move focus into it. Every nldd input carries \`static isFormInput = true\`; a component of your own says the same, or names its control itself.`);
|
|
185
|
-
}
|
|
186
182
|
return;
|
|
187
183
|
}
|
|
188
|
-
this._warnedNoInput = false;
|
|
189
184
|
// Ensure the inner native input has an id so aria-describedby can reference it.
|
|
190
185
|
// `inputId` is a component that hands out the id of the control it renders, which
|
|
191
186
|
// is a different question from how it wants to be named, so it is asked separately
|
|
@@ -248,30 +243,22 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
248
243
|
* group with an "Anders" text field beside it being the case this component
|
|
249
244
|
* is built for. But a list that reads a value would then quietly read the
|
|
250
245
|
* wrong one, and nothing on screen would show it: the rules simply never
|
|
251
|
-
* match.
|
|
246
|
+
* match.
|
|
252
247
|
*/
|
|
253
248
|
_adoptValidationLists(input) {
|
|
254
249
|
const lists = Array.from(this.children)
|
|
255
250
|
.filter((el) => el.tagName.toLowerCase() === 'nldd-validation-list');
|
|
256
|
-
if (!lists.length)
|
|
257
|
-
return;
|
|
258
251
|
for (const list of lists) {
|
|
259
252
|
if (!list.getAttribute('for'))
|
|
260
253
|
list.control = input;
|
|
261
254
|
}
|
|
262
255
|
if (!import.meta.env?.DEV)
|
|
263
256
|
return;
|
|
264
|
-
const controls = Array.from(this.children)
|
|
265
|
-
.filter(el => !HELPER_TAGS.includes(el.tagName.toLowerCase()) && isFormInput(el));
|
|
266
|
-
if (controls.length < 2)
|
|
267
|
-
return;
|
|
268
257
|
const readsValue = lists.some(list => !list.getAttribute('for') && Array.from(list.children)
|
|
269
258
|
.some(item => item.hasAttribute('match') || item.hasAttribute('minlength') || item.hasAttribute('maxlength')));
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
console.warn(`<nldd-form-field>${which}: more than one control, and the validation list has rules that read a value. `
|
|
274
|
-
+ `It is reading <${input.localName}>, the first one. Set \`for\` on the list if it should read another.`);
|
|
259
|
+
const controls = Array.from(this.children)
|
|
260
|
+
.filter(el => !HELPER_TAGS.includes(el.tagName.toLowerCase()) && isFormInput(el));
|
|
261
|
+
setState(this, 'list-reads-first-control', readsValue && controls.length > 1);
|
|
275
262
|
}
|
|
276
263
|
/**
|
|
277
264
|
* The input this field is about: the first one in the light DOM, wrapped or
|
|
@@ -314,11 +301,13 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
314
301
|
* that is the control itself, a native input or a host with a role of its
|
|
315
302
|
* own, is pointed at directly.
|
|
316
303
|
*
|
|
317
|
-
* The
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
304
|
+
* The items of a validation list that are on screen, not the list. Safari
|
|
305
|
+
* passes nothing on to VoiceOver for an element whose text sits in a
|
|
306
|
+
* `role="list"`, which the list renders, so a reference to the list was an
|
|
307
|
+
* empty description there. Only the visible items, because an element
|
|
308
|
+
* referenced directly is read even while it is hidden: a met requirement
|
|
309
|
+
* would still be read out. The references change when an item shows or
|
|
310
|
+
* hides, which is when the description changes anyway.
|
|
322
311
|
*
|
|
323
312
|
* The requirements before the plain help text: what is wrong is why you are
|
|
324
313
|
* here.
|
|
@@ -329,8 +318,14 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
329
318
|
return;
|
|
330
319
|
const children = Array.from(this.children);
|
|
331
320
|
const tag = (el) => el.tagName.toLowerCase();
|
|
321
|
+
const lists = children.filter(el => tag(el) === 'nldd-validation-list');
|
|
322
|
+
this._listObserver ?? (this._listObserver = new MutationObserver(() => this._syncDescription()));
|
|
323
|
+
this._listObserver.disconnect();
|
|
324
|
+
for (const list of lists) {
|
|
325
|
+
this._listObserver.observe(list, { childList: true, subtree: true, attributes: true, attributeFilter: ['visible'] });
|
|
326
|
+
}
|
|
332
327
|
const describedBy = [
|
|
333
|
-
...children.filter(el => tag(el) === 'nldd-validation-
|
|
328
|
+
...lists.flatMap(list => Array.from(list.children).filter(el => tag(el) === 'nldd-validation-item' && el.hasAttribute('visible'))),
|
|
334
329
|
...children.filter(el => tag(el) === 'nldd-form-field-help-text'),
|
|
335
330
|
];
|
|
336
331
|
if ('describedByElements' in input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,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,SAAQ,UAAU;IAG3C,iBAAiB;QACzB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,+FAA+F;QAC/F,6EAA6E;QAC7E,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;IACpB,CAAC;IAEQ,MAAM;QACd,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;;AAXe,4BAAM,GAAG,uBAAuB,AAA1B,CAA2B;AADrC,qBAAqB;IADjC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,qBAAqB,CAajC"}
|
|
@@ -1,75 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
* Nederlandse Digitale Dienst Form Section Component
|
|
3
|
-
*
|
|
4
|
-
* Plain custom element (extends HTMLElement, no Lit). The light-DOM render
|
|
5
|
-
* works around an NVDA + Firefox a11y bug where a shadow-DOM <fieldset> +
|
|
6
|
-
* <legend> is not reliably announced as the group label for slotted controls.
|
|
7
|
-
* A native fieldset/legend in the light DOM works correctly across all
|
|
8
|
-
* AT/browser combinations.
|
|
9
|
-
*
|
|
10
|
-
* **Differs from shadow components:**
|
|
11
|
-
* - No shadowRoot: all children live in the light DOM (inside the rendered
|
|
12
|
-
* <fieldset>).
|
|
13
|
-
* - No Lit: a plain HTMLElement with manual DOM mutation.
|
|
14
|
-
* - **Requires a global stylesheet import**: `dist/css/form-section.css` (or
|
|
15
|
-
* `global.css`). Form-section has no shadow stylesheet.
|
|
16
|
-
*
|
|
17
|
-
* Renders to:
|
|
18
|
-
*
|
|
19
|
-
* <nldd-form-section>
|
|
20
|
-
* <fieldset class="form-section">
|
|
21
|
-
* <legend class="form-section__header">
|
|
22
|
-
* <span class="form-section__title">Title</span>
|
|
23
|
-
* <span class="form-section__supporting-text">Supporting text</span>
|
|
24
|
-
* </legend>
|
|
25
|
-
* <div class="form-section__main">
|
|
26
|
-
* [user's children]
|
|
27
|
-
* </div>
|
|
28
|
-
* </fieldset>
|
|
29
|
-
* </nldd-form-section>
|
|
30
|
-
*
|
|
31
|
-
* **Accessibility note**: the title renders as a `<legend>`. Semantically that
|
|
32
|
-
* is a **group label**, not a heading. Screen readers announce it when the user
|
|
33
|
-
* enters the fieldset, but users jumping through headings with the H key skip
|
|
34
|
-
* it. Visually it looks like a heading, so use this component for *form
|
|
35
|
-
* grouping*, not as page structure. For real page headings, use a separate
|
|
36
|
-
* heading element above the form.
|
|
37
|
-
*
|
|
38
|
-
* **Supporting-text length**: the supporting text sits as a `<span>` inside the
|
|
39
|
-
* `<legend>` so a screen reader reads it along as the group label. Side effect:
|
|
40
|
-
* on every field entry within the section, the whole legend (title + supporting text)
|
|
41
|
-
* is spoken again. Keep `supporting-text` short (roughly 80 characters or less)
|
|
42
|
-
* and use it to introduce the group ("Vul je adresgegevens in"), not for
|
|
43
|
-
* detailed instructions. For a longer explanation on one specific field, use
|
|
44
|
-
* `nldd-form-field-help-text` on that field.
|
|
45
|
-
*
|
|
46
|
-
* <nldd-form>
|
|
47
|
-
* <nldd-form-section text="Persoonsgegevens" supporting-text="Vul je gegevens in.">
|
|
48
|
-
* <nldd-form-field label="Voornaam">...</nldd-form-field>
|
|
49
|
-
* <nldd-form-field label="Achternaam">...</nldd-form-field>
|
|
50
|
-
* </nldd-form-section>
|
|
51
|
-
*
|
|
52
|
-
* <nldd-form-section text="Adres">
|
|
53
|
-
* <nldd-form-field label="Straat">...</nldd-form-field>
|
|
54
|
-
* </nldd-form-section>
|
|
55
|
-
*
|
|
56
|
-
* <nldd-form-actions>...</nldd-form-actions>
|
|
57
|
-
* </nldd-form>
|
|
58
|
-
*
|
|
59
|
-
* @element nldd-form-section
|
|
60
|
-
*
|
|
61
|
-
* @attr {string} text - Heading text (rendered in the `<legend>`).
|
|
62
|
-
* @attr {string} supporting-text - Short description under the heading. Keep it to roughly 80 characters or less (see the a11y note).
|
|
63
|
-
*
|
|
64
|
-
* Children of the form-section are placed in `.form-section__main`.
|
|
65
|
-
*/
|
|
1
|
+
import '../../../utilities/custom-element.js';
|
|
66
2
|
export declare class NLDDFormSection extends HTMLElement {
|
|
67
3
|
static get observedAttributes(): string[];
|
|
68
4
|
private _fieldset;
|
|
69
5
|
private _legend;
|
|
70
6
|
private _main;
|
|
71
7
|
private _observer;
|
|
72
|
-
private _hasWarnedNoLabel;
|
|
73
8
|
get text(): string;
|
|
74
9
|
set text(value: string);
|
|
75
10
|
get supportingText(): string;
|
|
@@ -77,7 +12,6 @@ export declare class NLDDFormSection extends HTMLElement {
|
|
|
77
12
|
connectedCallback(): void;
|
|
78
13
|
disconnectedCallback(): void;
|
|
79
14
|
attributeChangedCallback(name: string): void;
|
|
80
|
-
private _warnIfNoLabel;
|
|
81
15
|
private _buildStructure;
|
|
82
16
|
private _renderLegend;
|
|
83
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-section.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-section/form-section.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form-section.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-section/form-section.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AA0E9C,qBAAa,eAAgB,SAAQ,WAAW;IAC/C,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,SAAS,CAAoC;IACrD,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,SAAS,CAAiC;IAElD,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAGrB;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IACD,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAG/B;IAED,iBAAiB,IAAI,IAAI;IAwBzB,oBAAoB,IAAI,IAAI;IAK5B,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO5C,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,aAAa;CAsCrB;AAMD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,mBAAmB,EAAE,eAAe,CAAC;KACrC;CACD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '../../../utilities/custom-element.js';
|
|
1
2
|
/**
|
|
2
3
|
* Nederlandse Digitale Dienst Form Section Component
|
|
3
4
|
*
|
|
@@ -75,7 +76,6 @@ export class NLDDFormSection extends HTMLElement {
|
|
|
75
76
|
this._legend = null;
|
|
76
77
|
this._main = null;
|
|
77
78
|
this._observer = null;
|
|
78
|
-
this._hasWarnedNoLabel = false;
|
|
79
79
|
}
|
|
80
80
|
static get observedAttributes() {
|
|
81
81
|
return ['text', 'supporting-text'];
|
|
@@ -105,7 +105,6 @@ export class NLDDFormSection extends HTMLElement {
|
|
|
105
105
|
if (!this._fieldset)
|
|
106
106
|
this._buildStructure();
|
|
107
107
|
this._renderLegend();
|
|
108
|
-
this._warnIfNoLabel();
|
|
109
108
|
// (Re-)attach observer on every connect to catch dynamically added
|
|
110
109
|
// children (which would otherwise land outside the inner fieldset).
|
|
111
110
|
if (!this._observer) {
|
|
@@ -131,23 +130,10 @@ export class NLDDFormSection extends HTMLElement {
|
|
|
131
130
|
attributeChangedCallback(name) {
|
|
132
131
|
if (name === 'text' || name === 'supporting-text') {
|
|
133
132
|
// Pas re-renderen na _buildStructure (eerste connect).
|
|
134
|
-
if (this._legend)
|
|
133
|
+
if (this._legend)
|
|
135
134
|
this._renderLegend();
|
|
136
|
-
this._warnIfNoLabel();
|
|
137
|
-
}
|
|
138
135
|
}
|
|
139
136
|
}
|
|
140
|
-
_warnIfNoLabel() {
|
|
141
|
-
// Dev only, so an end user's production console stays clean.
|
|
142
|
-
if (!import.meta.env?.DEV)
|
|
143
|
-
return;
|
|
144
|
-
if (this._hasWarnedNoLabel)
|
|
145
|
-
return;
|
|
146
|
-
if (this.text || this.supportingText)
|
|
147
|
-
return;
|
|
148
|
-
this._hasWarnedNoLabel = true;
|
|
149
|
-
console.warn('<nldd-form-section>: No `text` or `supporting-text` provided. The <fieldset> has no accessible name and screen readers may announce it as just "group" (Chrome) or nothing (Firefox). Set `text` for a group label, or document this section as purely visual grouping.');
|
|
150
|
-
}
|
|
151
137
|
_buildStructure() {
|
|
152
138
|
// Save user's existing children (light-DOM at construction time).
|
|
153
139
|
const initialChildren = Array.from(this.childNodes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-section.js","sourceRoot":"","sources":["../../../../src/components/forms/form-section/form-section.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;
|
|
1
|
+
{"version":3,"file":"form-section.js","sourceRoot":"","sources":["../../../../src/components/forms/form-section/form-section.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAGH,MAAM,cAAc,GAAG,cAAc,CAAC;AACtC,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAC5C,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,qBAAqB,GAAG,+BAA+B,CAAC;AAC9D,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAAhD;;QAKS,cAAS,GAA+B,IAAI,CAAC;QAC7C,YAAO,GAA6B,IAAI,CAAC;QACzC,UAAK,GAA0B,IAAI,CAAC;QACpC,cAAS,GAA4B,IAAI,CAAC;IAwHnD,CAAC;IA/HA,MAAM,KAAK,kBAAkB;QAC5B,OAAO,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACpC,CAAC;IAOD,IAAI,IAAI;QACP,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACxC,CAAC;IACD,IAAI,IAAI,CAAC,K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AM;YAAE,OAAO;QAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC3C,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,cAAc,CAAC;QAE9C,iCAAiC;QACjC,MAAM,CAAC,WAAW,GAAG,EAAE,CAAC;QAExB,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YACjD,SAAS,CAAC,SAAS,GAAG,WAAW,CAAC;YAClC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;YAC7B,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC;QAED,IAAI,cAAc,EAAE,CAAC;YACpB,MAAM,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;YAC1D,kBAAkB,CAAC,SAAS,GAAG,qBAAqB,CAAC;YACrD,kBAAkB,CAAC,WAAW,GAAG,cAAc,CAAC;YAChD,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QACxC,CAAC;QAED,kEAAkE;QAClE,wEAAwE;QACxE,eAAe;QACf,EAAE;QACF,oEAAoE;QACpE,4EAA4E;QAC5E,yEAAyE;QACzE,8EAA8E;QAC9E,kEAAkE;QAClE,wEAAwE;QACxE,UAAU;QACV,MAAM,CAAC,MAAM,GAAG,CAAC,UAAU,CAAC;IAC7B,CAAC;CACD;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9C,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-list.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/validation-list/validation-list.ts"],"names":[],"mappings":"AAAA;;;;;;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