@nldd/design-system 0.8.82 → 0.8.84
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 +3849 -542
- package/dist/components/actions/button/button.d.ts +9 -2
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +15 -2
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/button/button.template.d.ts.map +1 -1
- package/dist/components/actions/button/button.template.js +2 -0
- package/dist/components/actions/button/button.template.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +2 -2
- package/dist/components/actions/icon-button/icon-button.js +2 -2
- package/dist/components/actions/menu/menu.d.ts +3 -1
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +22 -11
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/actions/toolbar/toolbar.styles.js +2 -2
- package/dist/components/components.js +2911 -1157
- package/dist/components/content/avatar/avatar.d.ts +6 -0
- package/dist/components/content/avatar/avatar.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.js +9 -0
- package/dist/components/content/avatar/avatar.js.map +1 -1
- package/dist/components/content/avatar/avatar.styles.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.styles.js +5 -1
- package/dist/components/content/avatar/avatar.styles.js.map +1 -1
- package/dist/components/content/avatar/avatar.template.d.ts.map +1 -1
- package/dist/components/content/avatar/avatar.template.js +2 -0
- package/dist/components/content/avatar/avatar.template.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 +6 -16
- package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
- package/dist/components/content/blockquote/blockquote.d.ts +3 -4
- package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
- package/dist/components/content/blockquote/blockquote.js +3 -4
- package/dist/components/content/blockquote/blockquote.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +80 -6
- 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 +57 -94
- 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 +36 -4
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/icon/icon.d.ts +8 -2
- package/dist/components/content/icon/icon.d.ts.map +1 -1
- package/dist/components/content/icon/icon.js +17 -2
- package/dist/components/content/icon/icon.js.map +1 -1
- package/dist/components/content/icon/icon.styles.d.ts.map +1 -1
- package/dist/components/content/icon/icon.styles.js +8 -0
- package/dist/components/content/icon/icon.styles.js.map +1 -1
- package/dist/components/content/image/image.d.ts +1 -1
- package/dist/components/content/image/image.js +1 -1
- package/dist/components/content/image/image.styles.d.ts.map +1 -1
- package/dist/components/content/image/image.styles.js +11 -0
- package/dist/components/content/image/image.styles.js.map +1 -1
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +30 -30
- package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +30 -30
- package/dist/components/content/rich-text/rich-text.d.ts +20 -20
- package/dist/components/content/rich-text/rich-text.js +20 -20
- package/dist/components/content/text/text.d.ts +50 -0
- package/dist/components/content/text/text.d.ts.map +1 -0
- package/dist/components/content/text/text.js +81 -0
- package/dist/components/content/text/text.js.map +1 -0
- package/dist/components/content/text/text.styles.d.ts +2 -0
- package/dist/components/content/text/text.styles.d.ts.map +1 -0
- package/dist/components/content/text/text.styles.js +116 -0
- package/dist/components/content/text/text.styles.js.map +1 -0
- package/dist/components/content/text/text.template.d.ts +3 -0
- package/dist/components/content/text/text.template.d.ts.map +1 -0
- package/dist/components/content/text/text.template.js +7 -0
- package/dist/components/content/text/text.template.js.map +1 -0
- package/dist/components/content/title/title.d.ts +4 -4
- package/dist/components/content/title/title.js +4 -4
- package/dist/components/content/title/title.styles.d.ts.map +1 -1
- package/dist/components/content/title/title.styles.js +9 -13
- package/dist/components/content/title/title.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.d.ts +1 -1
- package/dist/components/content/tooltip/tooltip.js +1 -1
- package/dist/components/{decorate-BKn10QQi.js → decorate-lwt_OrAG.js} +1 -1
- package/dist/components/{dist-TpIL8G4G.js → dist-762GHPyH.js} +3 -3
- package/dist/components/{dist-OBifyiJS.js → dist-BB7TxeMK.js} +2 -2
- package/dist/components/{dist-CJR_Rwhh.js → dist-BJI4-6iQ.js} +1 -1
- package/dist/components/{dist-C400RcFU.js → dist-B_3OW7pC.js} +1 -1
- package/dist/components/{dist-afrAoubg.js → dist-C09E9-dJ.js} +34 -34
- package/dist/components/{dist-Ccw7ZfsU.js → dist-C6gnorjP.js} +4 -3
- package/dist/components/{dist-bO14jlsr.js → dist-CRsR6ckU.js} +1 -1
- package/dist/components/{dist-C0PiB1dr.js → dist-CjaG8dOI.js} +2 -2
- package/dist/components/{dist-CCg5Mso_.js → dist-DZoFKUO-.js} +1 -1
- package/dist/components/{dist-Bq4xc7Bm.js → dist-DaavuU6W.js} +14 -3
- package/dist/components/{dist-BYVOPNHp.js → dist-la_b3ZSq.js} +1 -1
- package/dist/components/forms/form/form.d.ts +76 -22
- package/dist/components/forms/form/form.d.ts.map +1 -1
- package/dist/components/forms/form/form.js +127 -22
- package/dist/components/forms/form/form.js.map +1 -1
- package/dist/components/forms/form-actions/form-actions.d.ts +14 -15
- package/dist/components/forms/form-actions/form-actions.d.ts.map +1 -1
- package/dist/components/forms/form-actions/form-actions.js +14 -15
- package/dist/components/forms/form-actions/form-actions.js.map +1 -1
- package/dist/components/forms/form-field/form-field.d.ts +42 -39
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +79 -111
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts +0 -1
- package/dist/components/forms/form-field/form-field.styles.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.styles.js +7 -73
- package/dist/components/forms/form-field/form-field.styles.js.map +1 -1
- package/dist/components/forms/form-field/form-field.template.d.ts +0 -2
- package/dist/components/forms/form-field/form-field.template.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.template.js +0 -15
- package/dist/components/forms/form-field/form-field.template.js.map +1 -1
- package/dist/components/forms/form-section/form-section.d.ts +26 -28
- package/dist/components/forms/form-section/form-section.d.ts.map +1 -1
- package/dist/components/forms/form-section/form-section.js +27 -29
- package/dist/components/forms/form-section/form-section.js.map +1 -1
- package/dist/components/forms/validation-list/validation-list.d.ts +193 -0
- package/dist/components/forms/validation-list/validation-list.d.ts.map +1 -0
- package/dist/components/forms/validation-list/validation-list.js +358 -0
- package/dist/components/forms/validation-list/validation-list.js.map +1 -0
- package/dist/components/forms/validation-list/validation-list.styles.d.ts +3 -0
- package/dist/components/forms/validation-list/validation-list.styles.d.ts.map +1 -0
- package/dist/components/forms/validation-list/validation-list.styles.js +58 -0
- package/dist/components/forms/validation-list/validation-list.styles.js.map +1 -0
- package/dist/components/forms/validation-list/validation-list.template.d.ts +5 -0
- package/dist/components/forms/validation-list/validation-list.template.d.ts.map +1 -0
- package/dist/components/forms/validation-list/validation-list.template.js +16 -0
- package/dist/components/forms/validation-list/validation-list.template.js.map +1 -0
- package/dist/components/{icon-CIpJq_cf.js → icon-VTLbdcvZ.js} +104 -11
- package/dist/components/{icon-button-BAkUJTn6.js → icon-button-Sne5TwRG.js} +6 -6
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts +20 -1
- package/dist/components/inputs/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.js +32 -2
- package/dist/components/inputs/checkbox/checkbox.js.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.template.d.ts.map +1 -1
- package/dist/components/inputs/checkbox/checkbox.template.js +2 -0
- package/dist/components/inputs/checkbox/checkbox.template.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts +16 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.js +27 -2
- package/dist/components/inputs/checkbox-field/checkbox-field.js.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.template.d.ts.map +1 -1
- package/dist/components/inputs/checkbox-field/checkbox-field.template.js +2 -0
- package/dist/components/inputs/checkbox-field/checkbox-field.template.js.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.d.ts +14 -1
- package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
- package/dist/components/inputs/code-editor/code-editor.js +21 -2
- package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.d.ts +15 -2
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +54 -5
- package/dist/components/inputs/combo-box/combo-box.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.styles.js +14 -0
- package/dist/components/inputs/combo-box/combo-box.styles.js.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.template.js +27 -20
- package/dist/components/inputs/combo-box/combo-box.template.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.d.ts +29 -31
- package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.js +40 -37
- package/dist/components/inputs/date-field/date-field.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.styles.js +11 -0
- package/dist/components/inputs/date-field/date-field.styles.js.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.d.ts.map +1 -1
- package/dist/components/inputs/date-field/date-field.template.js +7 -2
- package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.d.ts +34 -21
- package/dist/components/inputs/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/inputs/date-picker/date-picker.js +42 -22
- package/dist/components/inputs/date-picker/date-picker.js.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.d.ts +23 -2
- package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/inputs/dropdown/dropdown.js +36 -3
- package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +4 -3
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +8 -7
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +0 -1
- 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 +15 -4
- 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 +20 -8
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.js.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.template.d.ts.map +1 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.template.js +4 -1
- package/dist/components/inputs/multi-line-text-field/multi-line-text-field.template.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.d.ts +12 -1
- package/dist/components/inputs/number-field/number-field.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.js +18 -3
- package/dist/components/inputs/number-field/number-field.js.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/number-field/number-field.styles.js +8 -16
- package/dist/components/inputs/number-field/number-field.styles.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.d.ts +10 -3
- package/dist/components/inputs/password-field/password-field.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.js +18 -8
- package/dist/components/inputs/password-field/password-field.js.map +1 -1
- package/dist/components/inputs/password-field/password-field.template.d.ts.map +1 -1
- package/dist/components/inputs/password-field/password-field.template.js +3 -1
- package/dist/components/inputs/password-field/password-field.template.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.d.ts +18 -1
- package/dist/components/inputs/radio-button/radio-button.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.js +27 -2
- package/dist/components/inputs/radio-button/radio-button.js.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.template.d.ts.map +1 -1
- package/dist/components/inputs/radio-button/radio-button.template.js +1 -0
- package/dist/components/inputs/radio-button/radio-button.template.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.d.ts +14 -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 +22 -2
- package/dist/components/inputs/radio-button-field/radio-button-field.js.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.template.d.ts.map +1 -1
- package/dist/components/inputs/radio-button-field/radio-button-field.template.js +1 -0
- package/dist/components/inputs/radio-button-field/radio-button-field.template.js.map +1 -1
- package/dist/components/inputs/radio-button-group/radio-button-group.d.ts +11 -0
- 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 +21 -0
- package/dist/components/inputs/radio-button-group/radio-button-group.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.d.ts +23 -1
- package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.js +37 -3
- package/dist/components/inputs/search-field/search-field.js.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.d.ts.map +1 -1
- package/dist/components/inputs/search-field/search-field.template.js +4 -0
- package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.d.ts +28 -0
- package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.js +52 -2
- package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.d.ts.map +1 -1
- package/dist/components/inputs/segmented-control/segmented-control.template.js +1 -0
- package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
- package/dist/components/inputs/stepper/stepper.d.ts +14 -1
- package/dist/components/inputs/stepper/stepper.d.ts.map +1 -1
- package/dist/components/inputs/stepper/stepper.js +21 -2
- package/dist/components/inputs/stepper/stepper.js.map +1 -1
- package/dist/components/inputs/switch/switch.d.ts +20 -1
- package/dist/components/inputs/switch/switch.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.js +31 -2
- package/dist/components/inputs/switch/switch.js.map +1 -1
- package/dist/components/inputs/switch/switch.template.d.ts.map +1 -1
- package/dist/components/inputs/switch/switch.template.js +2 -0
- package/dist/components/inputs/switch/switch.template.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.d.ts +18 -1
- package/dist/components/inputs/switch-field/switch-field.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.js +25 -1
- package/dist/components/inputs/switch-field/switch-field.js.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.template.d.ts.map +1 -1
- package/dist/components/inputs/switch-field/switch-field.template.js +2 -0
- package/dist/components/inputs/switch-field/switch-field.template.js.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts +14 -1
- package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
- package/dist/components/inputs/text-editor/text-editor.js +21 -2
- package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.d.ts +31 -3
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +65 -7
- package/dist/components/inputs/text-field/text-field.js.map +1 -1
- package/dist/components/inputs/text-field/text-field.template.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.template.js +5 -1
- package/dist/components/inputs/text-field/text-field.template.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.d.ts +33 -35
- package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.js +43 -40
- package/dist/components/inputs/time-field/time-field.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.styles.js +12 -0
- package/dist/components/inputs/time-field/time-field.styles.js.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.d.ts.map +1 -1
- package/dist/components/inputs/time-field/time-field.template.js +7 -2
- package/dist/components/inputs/time-field/time-field.template.js.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.d.ts +34 -19
- package/dist/components/inputs/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/inputs/time-picker/time-picker.js +42 -22
- package/dist/components/inputs/time-picker/time-picker.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts +22 -1
- package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.js +35 -2
- package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
- package/dist/components/inputs/toggle-button/toggle-button.template.js +3 -0
- package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
- package/dist/components/inputs/toggle-button-group/toggle-button-group.d.ts +27 -0
- 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 +46 -0
- package/dist/components/inputs/toggle-button-group/toggle-button-group.js.map +1 -1
- package/dist/components/inputs/token-field/token-field.d.ts +7 -1
- package/dist/components/inputs/token-field/token-field.d.ts.map +1 -1
- package/dist/components/inputs/token-field/token-field.js +14 -1
- package/dist/components/inputs/token-field/token-field.js.map +1 -1
- package/dist/components/layout/app-view/app-view.d.ts.map +1 -1
- package/dist/components/layout/app-view/app-view.js +12 -0
- package/dist/components/layout/app-view/app-view.js.map +1 -1
- package/dist/components/layout/box/box.d.ts +4 -4
- package/dist/components/layout/box/box.d.ts.map +1 -1
- package/dist/components/layout/box/box.js +4 -4
- package/dist/components/layout/box/box.js.map +1 -1
- package/dist/components/layout/box/box.styles.d.ts.map +1 -1
- package/dist/components/layout/box/box.styles.js +4 -6
- package/dist/components/layout/box/box.styles.js.map +1 -1
- package/dist/components/layout/card/card.d.ts +18 -19
- package/dist/components/layout/card/card.d.ts.map +1 -1
- package/dist/components/layout/card/card.js +18 -19
- package/dist/components/layout/card/card.js.map +1 -1
- package/dist/components/layout/card/card.styles.d.ts.map +1 -1
- package/dist/components/layout/card/card.styles.js +1 -0
- package/dist/components/layout/card/card.styles.js.map +1 -1
- package/dist/components/layout/collection/collection.d.ts.map +1 -1
- package/dist/components/layout/collection/collection.js +6 -2
- package/dist/components/layout/collection/collection.js.map +1 -1
- package/dist/components/layout/divider/divider.d.ts +1 -1
- package/dist/components/layout/divider/divider.js +1 -1
- package/dist/components/layout/popover/popover.d.ts +1 -1
- package/dist/components/layout/popover/popover.d.ts.map +1 -1
- package/dist/components/layout/popover/popover.js +15 -2
- package/dist/components/layout/popover/popover.js.map +1 -1
- package/dist/components/layout/sheet/sheet.d.ts +1 -1
- package/dist/components/layout/sheet/sheet.js +2 -2
- package/dist/components/layout/sheet/sheet.js.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.d.ts.map +1 -1
- package/dist/components/layout/sheet/sheet.styles.js +15 -3
- package/dist/components/layout/sheet/sheet.styles.js.map +1 -1
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.d.ts +8 -0
- 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 +29 -11
- package/dist/components/layout/split-views/navigation-split-view/navigation-split-view.js.map +1 -1
- package/dist/components/layout/window/window.d.ts +20 -21
- package/dist/components/layout/window/window.d.ts.map +1 -1
- package/dist/components/layout/window/window.js +21 -22
- package/dist/components/layout/window/window.js.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts +41 -12
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js +47 -17
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.js.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.js +42 -13
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.styles.js.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.js +12 -4
- package/dist/components/lists-and-tables/cells/timeline-track-cell/timeline-track-cell.template.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.d.ts +168 -61
- package/dist/components/lists-and-tables/list/list.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.i18n.d.ts +0 -1
- package/dist/components/lists-and-tables/list/list.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.i18n.js +0 -1
- package/dist/components/lists-and-tables/list/list.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.js +361 -122
- package/dist/components/lists-and-tables/list/list.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.styles.js +5 -0
- package/dist/components/lists-and-tables/list/list.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list/list.template.d.ts +1 -3
- package/dist/components/lists-and-tables/list/list.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list/list.template.js +2 -7
- package/dist/components/lists-and-tables/list/list.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.d.ts +134 -23
- 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 +354 -61
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +116 -34
- package/dist/components/lists-and-tables/list-item/list-item.styles.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.template.js +5 -2
- package/dist/components/lists-and-tables/list-item/list-item.template.js.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +116 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -0
- package/dist/components/lists-and-tables/{list-item-action/list-item-action.js → list-item-segment/list-item-segment.js} +85 -56
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts +2 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.d.ts.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js +179 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.styles.js.map +1 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts +3 -0
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.d.ts.map +1 -0
- package/dist/components/lists-and-tables/{list-item-action/list-item-action.template.js → list-item-segment/list-item-segment.template.js} +5 -4
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.template.js.map +1 -0
- package/dist/components/lists-and-tables/table/table.d.ts +12 -9
- package/dist/components/lists-and-tables/table/table.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.i18n.d.ts +0 -1
- package/dist/components/lists-and-tables/table/table.i18n.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.i18n.js +0 -1
- package/dist/components/lists-and-tables/table/table.i18n.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.js +26 -16
- package/dist/components/lists-and-tables/table/table.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.styles.js +5 -0
- package/dist/components/lists-and-tables/table/table.styles.js.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.d.ts +1 -1
- package/dist/components/lists-and-tables/table/table.template.d.ts.map +1 -1
- package/dist/components/lists-and-tables/table/table.template.js +5 -9
- package/dist/components/lists-and-tables/table/table.template.js.map +1 -1
- package/dist/components/navigation/link/link.d.ts +30 -24
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.js +33 -24
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/link/link.template.js +1 -1
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/menu-bar/menu-bar.d.ts +7 -7
- package/dist/components/navigation/menu-bar/menu-bar.js +7 -7
- package/dist/components/navigation/menu-bar-item/menu-bar-item.d.ts +23 -23
- package/dist/components/navigation/menu-bar-item/menu-bar-item.js +23 -23
- package/dist/components/navigation/pagination/pagination.d.ts +4 -4
- package/dist/components/navigation/pagination/pagination.js +4 -4
- package/dist/components/navigation/skip-link/skip-link.d.ts +7 -7
- package/dist/components/navigation/skip-link/skip-link.js +7 -7
- package/dist/components/navigation/tab-bar/tab-bar.d.ts +5 -3
- package/dist/components/navigation/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.js +18 -13
- package/dist/components/navigation/tab-bar/tab-bar.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.styles.js +8 -8
- package/dist/components/navigation/tab-bar/tab-bar.template.js +5 -5
- package/dist/components/navigation/tab-bar/tab-bar.template.js.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.d.ts +15 -15
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.js +15 -15
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js +14 -2
- package/dist/components/navigation/top-navigation-bar/top-navigation-bar.styles.js.map +1 -1
- package/dist/components/navigation/top-title-bar/top-title-bar.d.ts +2 -2
- package/dist/components/navigation/top-title-bar/top-title-bar.js +2 -2
- package/dist/components/navigation/top-title-bar/top-title-bar.styles.js +2 -2
- package/dist/components/status-and-feedback/badge/badge.d.ts +8 -2
- package/dist/components/status-and-feedback/badge/badge.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.js +17 -1
- package/dist/components/status-and-feedback/badge/badge.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +41 -10
- package/dist/components/status-and-feedback/badge/badge.styles.js.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.template.js +1 -1
- package/dist/components/status-and-feedback/badge/badge.template.js.map +1 -1
- package/dist/components/status-and-feedback/banner/banner.styles.js +2 -2
- package/dist/components/status-and-feedback/just-in-time-education/just-in-time-education.d.ts +37 -36
- 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 +37 -36
- 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 +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js +2 -2
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.js.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js +7 -0
- package/dist/components/status-and-feedback/modal-dialog/modal-dialog.styles.js.map +1 -1
- package/dist/components/status-and-feedback/notification/notification-region.js +1 -1
- package/dist/components/status-and-feedback/status-bar/status-bar.d.ts +29 -28
- 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 +29 -28
- package/dist/components/status-and-feedback/status-bar/status-bar.js.map +1 -1
- package/dist/components/status-and-feedback/step-indicator/step-indicator.styles.js +1 -1
- package/dist/components/{visibility-mixin-GxbwkBb1.js → visibility-mixin-vbfhyo7f.js} +1 -1
- package/dist/components/{with-translations-DzAdFTK8.js → with-translations-CqUV9S5g.js} +1 -1
- package/dist/css/form-section.css +28 -46
- package/dist/css/form.css +7 -13
- package/dist/css/rich-text.css +5 -5
- package/dist/css/variables.css +133 -8
- package/dist/nldd.min.js +1382 -875
- package/dist/types/vue.d.ts +530 -336
- package/dist/utilities/codemirror/codemirror-element.d.ts.map +1 -1
- package/dist/utilities/codemirror/codemirror-element.js +5 -0
- package/dist/utilities/codemirror/codemirror-element.js.map +1 -1
- package/dist/utilities/described-by-mixin.d.ts +49 -0
- package/dist/utilities/described-by-mixin.d.ts.map +1 -0
- package/dist/utilities/described-by-mixin.js +109 -0
- package/dist/utilities/described-by-mixin.js.map +1 -0
- package/dist/utilities/form-associated-mixin.d.ts +5 -0
- package/dist/utilities/form-associated-mixin.d.ts.map +1 -1
- package/dist/utilities/form-associated-mixin.js +69 -0
- package/dist/utilities/form-associated-mixin.js.map +1 -1
- package/dist/utilities/scroll-mode-controller.d.ts +9 -1
- package/dist/utilities/scroll-mode-controller.d.ts.map +1 -1
- package/dist/utilities/scroll-mode-controller.js +10 -2
- package/dist/utilities/scroll-mode-controller.js.map +1 -1
- package/package.json +21 -9
- package/dist/components/lists-and-tables/list-item-action/list-item-action.d.ts +0 -108
- package/dist/components/lists-and-tables/list-item-action/list-item-action.d.ts.map +0 -1
- package/dist/components/lists-and-tables/list-item-action/list-item-action.js.map +0 -1
- package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.d.ts +0 -2
- package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.d.ts.map +0 -1
- package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.js +0 -145
- package/dist/components/lists-and-tables/list-item-action/list-item-action.styles.js.map +0 -1
- package/dist/components/lists-and-tables/list-item-action/list-item-action.template.d.ts +0 -3
- package/dist/components/lists-and-tables/list-item-action/list-item-action.template.d.ts.map +0 -1
- package/dist/components/lists-and-tables/list-item-action/list-item-action.template.js.map +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Nederlandse Digitale Dienst Form Component
|
|
3
3
|
*
|
|
4
|
-
* Plain custom element (extends HTMLElement, no Lit)
|
|
4
|
+
* Plain custom element (extends HTMLElement, no Lit), required for light-DOM
|
|
5
5
|
* autofill. Renders a real <form> element in the LIGHT DOM around its
|
|
6
6
|
* children. Chrome's autofill engine looks for native <input> elements that
|
|
7
7
|
* have a <form> ancestor in the light DOM; with shadow-DOM inputs it can't
|
|
8
8
|
* find them, so we keep this component shadow-less.
|
|
9
9
|
*
|
|
10
10
|
* **Differs from other nldd-* components:**
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
* - **
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* van je app's globale CSS bundle.
|
|
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.
|
|
17
16
|
*
|
|
18
17
|
* **Two usage modes:**
|
|
19
18
|
*
|
|
@@ -22,25 +21,26 @@
|
|
|
22
21
|
* Simplest API.
|
|
23
22
|
*
|
|
24
23
|
* 2. **User-provided form** (framework-friendly): write your own `<form>`
|
|
25
|
-
* as direct child. Component detects it, takes over attribute
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* as direct child. Component detects it, takes over attribute mirroring,
|
|
25
|
+
* and skips the migration. Children stay where your framework puts them,
|
|
26
|
+
* so there is no DOM shuffling to conflict with React/Vue/Angular
|
|
27
|
+
* reconciliation.
|
|
28
28
|
*
|
|
29
29
|
* **Framework interop:**
|
|
30
30
|
*
|
|
31
|
-
* In auto-wrap mode
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
31
|
+
* In auto-wrap mode every direct child is moved into the inner form through a
|
|
32
|
+
* MutationObserver. That works fine for most React/Vue use cases, because
|
|
33
|
+
* frameworks only mutate the DOM when their virtual DOM changes. For edge
|
|
34
|
+
* cases (animation libraries that track DOM position, SSR hydration
|
|
35
|
+
* mismatches, frameworks that actively check sibling positions) use
|
|
36
|
+
* **user-provided form** mode instead.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* For programmatic manipulation, use the `form` getter so you work with the
|
|
39
|
+
* inner `<form>` element directly:
|
|
40
40
|
*
|
|
41
41
|
* const inner = document.querySelector('nldd-form').form;
|
|
42
42
|
* inner.checkValidity();
|
|
43
|
-
* inner.appendChild(myInput); //
|
|
43
|
+
* inner.appendChild(myInput); // skips the migration overhead
|
|
44
44
|
*
|
|
45
45
|
* @element nldd-form
|
|
46
46
|
*
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
* @attr {string} enctype - Encoding type for submission
|
|
52
52
|
* @attr {string} target - Submit target ('_self' | '_blank' | ...)
|
|
53
53
|
* @attr {string} autocomplete - 'on' | 'off' (form-level autofill toggle)
|
|
54
|
-
* @attr {string} label-alignment - Default `label-alignment`
|
|
54
|
+
* @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.
|
|
55
55
|
*
|
|
56
|
-
* @prop {HTMLFormElement | null} form - The inner <form> element (read-only). Use
|
|
56
|
+
* @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.
|
|
57
57
|
*
|
|
58
58
|
* Events bubble naturally from the inner <form>:
|
|
59
59
|
* @fires submit
|
|
60
60
|
* @fires reset
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
|
-
*
|
|
63
|
+
* Global stylesheet import (once, in your app entry):
|
|
64
64
|
* ```js
|
|
65
65
|
* import '@nldd/design-system/styles';
|
|
66
66
|
* ```
|
|
@@ -98,6 +98,105 @@ export class NLDDForm extends HTMLElement {
|
|
|
98
98
|
super(...arguments);
|
|
99
99
|
this._form = null;
|
|
100
100
|
this._observer = null;
|
|
101
|
+
/**
|
|
102
|
+
* Marks a control as invalid at the moment the platform says so, and
|
|
103
|
+
* unmarks it as soon as it is fixed.
|
|
104
|
+
*
|
|
105
|
+
* `setValidity` and the `invalid` attribute answer different questions.
|
|
106
|
+
* The first is whether the value is acceptable, which decides whether the
|
|
107
|
+
* form goes; the second is whether to show that, which is a design
|
|
108
|
+
* decision about timing. Without something joining them, a control whose
|
|
109
|
+
* validation list refuses a value blocks the submit while the screen says
|
|
110
|
+
* nothing.
|
|
111
|
+
*
|
|
112
|
+
* The browser already picks the moment: it fires `invalid` on every failing
|
|
113
|
+
* control when the form is submitted. That event does not bubble, so this
|
|
114
|
+
* listens in the capture phase. Setting the attribute earlier stays the
|
|
115
|
+
* consumer's call.
|
|
116
|
+
*
|
|
117
|
+
* Cancelling that event takes the native validation bubble away, and that is
|
|
118
|
+
* the point. This system writes its own messages, under the field, in its
|
|
119
|
+
* own type: a second one from the browser says the same thing again, in
|
|
120
|
+
* browser chrome, above the field, and disappears on its own while ours
|
|
121
|
+
* stays. A field that then has nothing to say is a field that needs an
|
|
122
|
+
* nldd-validation-list, not a bubble.
|
|
123
|
+
*/
|
|
124
|
+
this._handleInvalid = (e) => {
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
const control = e.target;
|
|
127
|
+
if (!control)
|
|
128
|
+
return;
|
|
129
|
+
// Every control, not just this one. The browser judged the whole form,
|
|
130
|
+
// and a field that happened to pass has been asked the same question as
|
|
131
|
+
// the one that failed. Marking only the failures would leave two fields
|
|
132
|
+
// in one form behaving differently: break the one that passed and it
|
|
133
|
+
// stays quiet, while its neighbour speaks up as you type.
|
|
134
|
+
for (const el of this._form?.elements ?? [])
|
|
135
|
+
this._judged.add(el);
|
|
136
|
+
this._judged.add(control);
|
|
137
|
+
control.toggleAttribute('invalid', true);
|
|
138
|
+
// The browser fires invalid on every failing control in tree order, so
|
|
139
|
+
// the first event of a round is the field to land on. Cancelling that
|
|
140
|
+
// event above takes away the native bubble and, with it, the browser's
|
|
141
|
+
// own move to the first failing field. Without this a submit that fails
|
|
142
|
+
// leaves focus where it was, which for anyone not looking at the screen
|
|
143
|
+
// means nothing happened at all: no bubble, no focus, and no live region
|
|
144
|
+
// anywhere in a form. Deferred, so the whole round has been fired and
|
|
145
|
+
// the submit algorithm is done before focus moves.
|
|
146
|
+
if (this._focusTarget)
|
|
147
|
+
return;
|
|
148
|
+
this._focusTarget = control;
|
|
149
|
+
queueMicrotask(() => {
|
|
150
|
+
this._focusTarget?.focus?.();
|
|
151
|
+
this._focusTarget = null;
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
/** The first control to fail this round, focused once the round is over. */
|
|
155
|
+
this._focusTarget = null;
|
|
156
|
+
/**
|
|
157
|
+
* A reset takes the marks off with the values.
|
|
158
|
+
*
|
|
159
|
+
* A reset fires no `input`, so nothing above hears it and a field that was
|
|
160
|
+
* refused keeps its mark over a value the user just cleared. `judging` goes
|
|
161
|
+
* with it: the question has been withdrawn, so the hints come back and the
|
|
162
|
+
* field is what it was before anyone submitted.
|
|
163
|
+
*
|
|
164
|
+
* Deferred because the event comes first and the values go back after it,
|
|
165
|
+
* so anything read here would still be the old one.
|
|
166
|
+
*/
|
|
167
|
+
this._handleReset = () => {
|
|
168
|
+
queueMicrotask(() => {
|
|
169
|
+
this._judged = new WeakSet();
|
|
170
|
+
for (const el of this._form?.elements ?? [])
|
|
171
|
+
el.removeAttribute('invalid');
|
|
172
|
+
for (const list of this.querySelectorAll('nldd-validation-list')) {
|
|
173
|
+
list.removeAttribute('judging');
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* From the first verdict onward, the mark follows the value.
|
|
179
|
+
*
|
|
180
|
+
* The platform has no "valid" event, so without this a control that is put
|
|
181
|
+
* right keeps its mark until the next submit: you fixed it and the field
|
|
182
|
+
* still says you did not. And it has to work the other way too. Undo the
|
|
183
|
+
* fix and the value is refused again, so a form that stays quiet leaves you
|
|
184
|
+
* with a submit that does nothing and nothing on screen saying why.
|
|
185
|
+
*
|
|
186
|
+
* Only after that first verdict, which is what `_judged` remembers. Before
|
|
187
|
+
* it, a field would turn red on the first character typed into it, about a
|
|
188
|
+
* value nobody has asked for yet.
|
|
189
|
+
*/
|
|
190
|
+
this._handleInput = (e) => {
|
|
191
|
+
const control = e.target;
|
|
192
|
+
if (!control || !this._judged.has(control))
|
|
193
|
+
return;
|
|
194
|
+
const validity = control.internals?.validity ?? control.validity;
|
|
195
|
+
if (validity)
|
|
196
|
+
control.toggleAttribute('invalid', !validity.valid);
|
|
197
|
+
};
|
|
198
|
+
/** Controls the platform has judged at least once. */
|
|
199
|
+
this._judged = new WeakSet();
|
|
101
200
|
/** When true, user provided their own <form> child — skip migration. */
|
|
102
201
|
this._userProvidedForm = false;
|
|
103
202
|
}
|
|
@@ -169,12 +268,18 @@ export class NLDDForm extends HTMLElement {
|
|
|
169
268
|
// nested form-section are pulled in by the propagation as well.
|
|
170
269
|
this._observer.observe(this, { childList: true, subtree: true });
|
|
171
270
|
}
|
|
271
|
+
this.addEventListener('invalid', this._handleInvalid, true);
|
|
272
|
+
this.addEventListener('input', this._handleInput);
|
|
273
|
+
this.addEventListener('reset', this._handleReset);
|
|
172
274
|
// Propagate label-alignment to current children (initial + after reconnect)
|
|
173
275
|
this._propagateLabelAlignment(this.getAttribute('label-alignment'));
|
|
174
276
|
}
|
|
175
277
|
disconnectedCallback() {
|
|
176
278
|
this._observer?.disconnect();
|
|
177
279
|
this._observer = null;
|
|
280
|
+
this.removeEventListener('invalid', this._handleInvalid, true);
|
|
281
|
+
this.removeEventListener('input', this._handleInput);
|
|
282
|
+
this.removeEventListener('reset', this._handleReset);
|
|
178
283
|
}
|
|
179
284
|
attributeChangedCallback(name, _oldVal, newVal) {
|
|
180
285
|
if (name === 'label-alignment') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AAEH,MAAM,oBAAoB,GAAG;IAC5B,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,cAAc;CACL,CAAC;AAEX,MAAM,mBAAmB,GAAG,oCAAoC,CAAC;AAEjE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QAKS,UAAK,GAA2B,IAAI,CAAC;QACrC,cAAS,GAA4B,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/forms/form/form.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AAEH,MAAM,oBAAoB,GAAG;IAC5B,MAAM;IACN,QAAQ;I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* Nederlandse Digitale Dienst Form Actions Component (Lit + TypeScript)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `nldd-form-field`:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* zou staan.
|
|
4
|
+
* A layout wrapper for the action buttons at the bottom of a form (typically a
|
|
5
|
+
* submit button or a button group). Follows the same responsive layout as
|
|
6
|
+
* `nldd-form-field`: with `label-alignment="right"` or `"left"` the content
|
|
7
|
+
* gets the same indent as the fields above it, thanks to a `::before`
|
|
8
|
+
* pseudo-element that acts as the spacer column where the label would sit.
|
|
10
9
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* MutationObserver.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* Inherits `label-alignment` automatically from a wrapping `<nldd-form>`: the
|
|
11
|
+
* form propagates its own `label-alignment` as `form-label-alignment` to
|
|
12
|
+
* descendant `nldd-form-actions` (and `nldd-form-field`) through a
|
|
13
|
+
* MutationObserver. An explicit `label-alignment` on the form-actions itself
|
|
14
|
+
* wins through the CSS cascade, and the form code never touches the
|
|
15
|
+
* `label-alignment` attribute of the descendant.
|
|
17
16
|
*
|
|
18
17
|
* <nldd-form label-alignment="right">
|
|
19
18
|
* <nldd-form-field>...</nldd-form-field>
|
|
@@ -26,10 +25,10 @@
|
|
|
26
25
|
*
|
|
27
26
|
* @element nldd-form-actions
|
|
28
27
|
*
|
|
29
|
-
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'.
|
|
30
|
-
* @attr {string} form-label-alignment -
|
|
28
|
+
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
|
|
29
|
+
* @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
|
|
31
30
|
*
|
|
32
|
-
* @slot -
|
|
31
|
+
* @slot - Action elements (button, button-group, and so on)
|
|
33
32
|
*/
|
|
34
33
|
import { LitElement } from 'lit';
|
|
35
34
|
export type LabelAlignment = 'top' | 'left' | 'right';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA
|
|
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;AAKjC,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"}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Nederlandse Digitale Dienst Form Actions Component (Lit + TypeScript)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `nldd-form-field`:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* zou staan.
|
|
4
|
+
* A layout wrapper for the action buttons at the bottom of a form (typically a
|
|
5
|
+
* submit button or a button group). Follows the same responsive layout as
|
|
6
|
+
* `nldd-form-field`: with `label-alignment="right"` or `"left"` the content
|
|
7
|
+
* gets the same indent as the fields above it, thanks to a `::before`
|
|
8
|
+
* pseudo-element that acts as the spacer column where the label would sit.
|
|
10
9
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* MutationObserver.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* Inherits `label-alignment` automatically from a wrapping `<nldd-form>`: the
|
|
11
|
+
* form propagates its own `label-alignment` as `form-label-alignment` to
|
|
12
|
+
* descendant `nldd-form-actions` (and `nldd-form-field`) through a
|
|
13
|
+
* MutationObserver. An explicit `label-alignment` on the form-actions itself
|
|
14
|
+
* wins through the CSS cascade, and the form code never touches the
|
|
15
|
+
* `label-alignment` attribute of the descendant.
|
|
17
16
|
*
|
|
18
17
|
* <nldd-form label-alignment="right">
|
|
19
18
|
* <nldd-form-field>...</nldd-form-field>
|
|
@@ -26,10 +25,10 @@
|
|
|
26
25
|
*
|
|
27
26
|
* @element nldd-form-actions
|
|
28
27
|
*
|
|
29
|
-
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'.
|
|
30
|
-
* @attr {string} form-label-alignment -
|
|
28
|
+
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
|
|
29
|
+
* @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
|
|
31
30
|
*
|
|
32
|
-
* @slot -
|
|
31
|
+
* @slot - Action elements (button, button-group, and so on)
|
|
33
32
|
*/
|
|
34
33
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
35
34
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-actions.js","sourceRoot":"","sources":["../../../../src/components/forms/form-actions/form-actions.ts"],"names":[],"mappings":"AAAA
|
|
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,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,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"}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @element nldd-form-field
|
|
5
5
|
*
|
|
6
|
-
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'.
|
|
7
|
-
* @attr {string} form-label-alignment -
|
|
6
|
+
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
|
|
7
|
+
* @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
|
|
8
8
|
* @attr {string} label - Field label text. Omit for no-label layout.
|
|
9
9
|
* @attr {string} supporting-label - Short supporting text below the label. Same typography as optional badge.
|
|
10
10
|
* @attr {boolean} optional - Shows an optional badge next to the label.
|
|
11
11
|
* @attr {string} optional-label - Text for the optional badge. Defaults to 'Optioneel'.
|
|
12
12
|
*
|
|
13
|
-
* @slot - The slotted input (e.g. nldd-text-field)
|
|
13
|
+
* @slot - The slotted input (e.g. nldd-text-field), its nldd-validation-list and its nldd-form-field-help-text.
|
|
14
14
|
*
|
|
15
15
|
* ─────────────────────────────────────────────────────────────────────────
|
|
16
16
|
*
|
|
@@ -20,23 +20,16 @@
|
|
|
20
20
|
*
|
|
21
21
|
* ─────────────────────────────────────────────────────────────────────────
|
|
22
22
|
*
|
|
23
|
-
* @element nldd-form-field-error-text
|
|
24
|
-
*
|
|
25
|
-
* @attr {string} id - Referenced by the input's `error-message` attribute.
|
|
26
|
-
* @attr {boolean} invalid - Visibility managed automatically by nldd-form-field.
|
|
27
|
-
*
|
|
28
|
-
* @slot - The error message text.
|
|
29
|
-
*
|
|
30
|
-
* ─────────────────────────────────────────────────────────────────────────
|
|
31
|
-
*
|
|
32
23
|
* @example
|
|
33
24
|
* <nldd-form-field label="Password">
|
|
25
|
+
* <nldd-password-field invalid></nldd-password-field>
|
|
26
|
+
* <nldd-validation-list>
|
|
27
|
+
* <nldd-validation-item id="password-required" required>This field is required.</nldd-validation-item>
|
|
28
|
+
* <nldd-validation-item id="password-length" minlength="8">Must be at least 8 characters.</nldd-validation-item>
|
|
29
|
+
* </nldd-validation-list>
|
|
34
30
|
* <nldd-form-field-help-text>
|
|
35
|
-
*
|
|
31
|
+
* We only use this to sign you in. <a href="/help">Learn more</a>.
|
|
36
32
|
* </nldd-form-field-help-text>
|
|
37
|
-
* <nldd-text-field invalid error-message="error-required error-length"></nldd-text-field>
|
|
38
|
-
* <nldd-form-field-error-text id="error-required">This field is required.</nldd-form-field-error-text>
|
|
39
|
-
* <nldd-form-field-error-text id="error-length">Must be at least 8 characters.</nldd-form-field-error-text>
|
|
40
33
|
* </nldd-form-field>
|
|
41
34
|
*/
|
|
42
35
|
import { LitElement } from 'lit';
|
|
@@ -78,12 +71,10 @@ export declare class NLDDFormField extends LitElement {
|
|
|
78
71
|
/** Label text for the optional badge. Defaults to 'Optioneel'. Override for localisation. */
|
|
79
72
|
optionalLabel: string;
|
|
80
73
|
private _childObserver;
|
|
81
|
-
private _observer;
|
|
82
74
|
/** The last label this field wrote onto the control, so it only takes back its own. */
|
|
83
75
|
private _appliedLabel;
|
|
84
76
|
/** Keeps the "no input found" warning to one per field rather than one per mutation. */
|
|
85
77
|
private _warnedNoInput;
|
|
86
|
-
private _hasErrors;
|
|
87
78
|
render(): import("lit-html").TemplateResult;
|
|
88
79
|
updated(changed: Map<PropertyKey, unknown>): void;
|
|
89
80
|
connectedCallback(): void;
|
|
@@ -128,6 +119,20 @@ export declare class NLDDFormField extends LitElement {
|
|
|
128
119
|
* takes back what it did not write.
|
|
129
120
|
*/
|
|
130
121
|
private _applyAccessibleLabel;
|
|
122
|
+
/**
|
|
123
|
+
* Hands every validation list in this field the control it is about, so it
|
|
124
|
+
* does not have to go looking for one.
|
|
125
|
+
*
|
|
126
|
+
* A list with a `for` of its own is left alone: that is how you say it is
|
|
127
|
+
* about a different control than the first.
|
|
128
|
+
*
|
|
129
|
+
* More than one control in a field is allowed and sometimes right, a radio
|
|
130
|
+
* group with an "Anders" text field beside it being the case this component
|
|
131
|
+
* is built for. But a list that reads a value would then quietly read the
|
|
132
|
+
* wrong one, and nothing on screen would show it: the rules simply never
|
|
133
|
+
* match. Say so once, where it can still be fixed.
|
|
134
|
+
*/
|
|
135
|
+
private _adoptValidationLists;
|
|
131
136
|
/**
|
|
132
137
|
* The input this field is about: the first one in the light DOM, wrapped or
|
|
133
138
|
* not.
|
|
@@ -148,38 +153,36 @@ export declare class NLDDFormField extends LitElement {
|
|
|
148
153
|
*/
|
|
149
154
|
private _findInput;
|
|
150
155
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
156
|
+
* Hands the control the elements that describe it.
|
|
157
|
+
*
|
|
158
|
+
* Elements and not ids. An IDREF resolves inside the tree of the element
|
|
159
|
+
* that carries it, so an id written here cannot be found from inside a
|
|
160
|
+
* component's shadow root: the attribute lands, the id is right, and the
|
|
161
|
+
* description comes out empty. A control that renders its own input takes
|
|
162
|
+
* `describedByElements` and puts the references where they belong; anything
|
|
163
|
+
* that is the control itself, a native input or a host with a role of its
|
|
164
|
+
* own, is pointed at directly.
|
|
165
|
+
*
|
|
166
|
+
* The list once, not each of its items. The items come and go while you
|
|
167
|
+
* type, and a description rewritten per keystroke is a lot of churn in
|
|
168
|
+
* something assistive software is reading. A hidden item counts for nothing
|
|
169
|
+
* in the description, so one reference gives exactly what is on screen, and
|
|
170
|
+
* this never has to run again when the value changes.
|
|
171
|
+
*
|
|
172
|
+
* The requirements before the plain help text: what is wrong is why you are
|
|
173
|
+
* here.
|
|
160
174
|
*/
|
|
161
|
-
private
|
|
175
|
+
private _syncDescription;
|
|
162
176
|
}
|
|
163
177
|
export declare class NLDDFormFieldHelpText extends LitElement {
|
|
164
178
|
static styles: import("lit").CSSResult;
|
|
165
179
|
connectedCallback(): void;
|
|
166
180
|
render(): import("lit-html").TemplateResult;
|
|
167
181
|
}
|
|
168
|
-
export declare class NLDDFormFieldErrorText extends LitElement {
|
|
169
|
-
static styles: import("lit").CSSResult;
|
|
170
|
-
/**
|
|
171
|
-
* When present the error text is visible.
|
|
172
|
-
* Managed automatically by the parent nldd-form-field — do not set manually.
|
|
173
|
-
*/
|
|
174
|
-
invalid: boolean;
|
|
175
|
-
connectedCallback(): void;
|
|
176
|
-
render(): import("lit-html").TemplateResult;
|
|
177
|
-
}
|
|
178
182
|
declare global {
|
|
179
183
|
interface HTMLElementTagNameMap {
|
|
180
184
|
'nldd-form-field': NLDDFormField;
|
|
181
185
|
'nldd-form-field-help-text': NLDDFormFieldHelpText;
|
|
182
|
-
'nldd-form-field-error-text': NLDDFormFieldErrorText;
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
188
|
//# sourceMappingURL=form-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings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