@nldd/design-system 0.8.83 → 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 +3415 -476
- package/dist/components/actions/button/button.d.ts +4 -2
- package/dist/components/actions/button/button.d.ts.map +1 -1
- package/dist/components/actions/button/button.js +7 -2
- package/dist/components/actions/button/button.js.map +1 -1
- package/dist/components/actions/icon-button/icon-button.d.ts +1 -1
- package/dist/components/actions/icon-button/icon-button.js +1 -1
- 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 +2027 -941
- 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.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 +2 -0
- 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 +2 -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 +2 -0
- package/dist/components/content/icon/icon-registry.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/title/title.d.ts +4 -4
- package/dist/components/content/title/title.js +4 -4
- 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-C1Kikpol.js → icon-VTLbdcvZ.js} +4 -1
- package/dist/components/{icon-button-BYy6hnAY.js → icon-button-Sne5TwRG.js} +5 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- 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 +13 -2
- package/dist/components/inputs/combo-box/combo-box.d.ts.map +1 -1
- package/dist/components/inputs/combo-box/combo-box.js +32 -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 +9 -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 +4 -0
- 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 +0 -1
- 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 +7 -3
- 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 +12 -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 +2 -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 +10 -3
- package/dist/components/inputs/text-field/text-field.d.ts.map +1 -1
- package/dist/components/inputs/text-field/text-field.js +18 -8
- 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 +3 -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 +0 -1
- 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 +1 -1
- package/dist/components/layout/box/box.js +1 -1
- package/dist/components/layout/box/box.styles.d.ts.map +1 -1
- package/dist/components/layout/box/box.styles.js +1 -0
- 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 +5 -0
- 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 +117 -25
- 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 +292 -67
- 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 +41 -3
- 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 +82 -16
- package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
- package/dist/components/lists-and-tables/list-item/list-item.styles.js +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
- package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +8 -4
- 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 +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.styles.d.ts.map +1 -1
- package/dist/components/status-and-feedback/badge/badge.styles.js +6 -4
- 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/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 +108 -7
- package/dist/nldd.min.js +851 -753
- package/dist/types/vue.d.ts +439 -291
- 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/package.json +14 -6
|
@@ -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":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAajC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAqCtD,qBACa,aAAc,SAAQ,UAAU;IAC5C,OAAgB,MAAM,0BAAmB;IAEzC;;;;;;;;;;;;;;OAcG;IAEH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAa;IAEvD,0FAA0F;IAE1F,KAAK,SAAM;IAEX;;;OAGG;IAEH,eAAe,SAAM;IAErB;;;;;;;OAOG;IAEH,QAAQ,UAAS;IAEjB,6FAA6F;IAE7F,aAAa,SAAe;IAE5B,OAAO,CAAC,cAAc,CAAiC;IAEvD,uFAAuF;IACvF,OAAO,CAAC,aAAa,CAAuB;IAE5C,wFAAwF;IACxF,OAAO,CAAC,cAAc,CAAS;IAEtB,MAAM;IAIN,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC;IAM1C,iBAAiB;IAMjB,YAAY;IAIZ,oBAAoB;IAK7B;;;;;;;;;;;;;;OAcG;IACI,WAAW,CAAC,CAAC,EAAE,KAAK;IAQ3B,OAAO,CAAC,aAAa;IAmCrB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,qBAAqB;IAa7B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,qBAAqB;IA0B7B;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,UAAU;IAWlB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,gBAAgB;CAiBxB;AAOD,qBACa,qBAAsB,SAAQ,UAAU;IACpD,OAAgB,MAAM,0BAA2B;IAExC,iBAAiB;IAOjB,MAAM;CAGf;AAGD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,iBAAiB,EAAE,aAAa,CAAC;QACjC,2BAA2B,EAAE,qBAAqB,CAAC;KACnD;CACD"}
|
|
@@ -9,14 +9,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
9
9
|
*
|
|
10
10
|
* @element nldd-form-field
|
|
11
11
|
*
|
|
12
|
-
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'.
|
|
13
|
-
* @attr {string} form-label-alignment -
|
|
12
|
+
* @attr {string} label-alignment - 'top' (default) | 'right' | 'left'. A value of its own always wins over the inherited form-label-alignment.
|
|
13
|
+
* @attr {string} form-label-alignment - Set by a wrapping nldd-form as a fallback. Do not set it yourself in consumer code.
|
|
14
14
|
* @attr {string} label - Field label text. Omit for no-label layout.
|
|
15
15
|
* @attr {string} supporting-label - Short supporting text below the label. Same typography as optional badge.
|
|
16
16
|
* @attr {boolean} optional - Shows an optional badge next to the label.
|
|
17
17
|
* @attr {string} optional-label - Text for the optional badge. Defaults to 'Optioneel'.
|
|
18
18
|
*
|
|
19
|
-
* @slot - The slotted input (e.g. nldd-text-field)
|
|
19
|
+
* @slot - The slotted input (e.g. nldd-text-field), its nldd-validation-list and its nldd-form-field-help-text.
|
|
20
20
|
*
|
|
21
21
|
* ─────────────────────────────────────────────────────────────────────────
|
|
22
22
|
*
|
|
@@ -26,32 +26,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
26
26
|
*
|
|
27
27
|
* ─────────────────────────────────────────────────────────────────────────
|
|
28
28
|
*
|
|
29
|
-
* @element nldd-form-field-error-text
|
|
30
|
-
*
|
|
31
|
-
* @attr {string} id - Referenced by the input's `error-message` attribute.
|
|
32
|
-
* @attr {boolean} invalid - Visibility managed automatically by nldd-form-field.
|
|
33
|
-
*
|
|
34
|
-
* @slot - The error message text.
|
|
35
|
-
*
|
|
36
|
-
* ─────────────────────────────────────────────────────────────────────────
|
|
37
|
-
*
|
|
38
29
|
* @example
|
|
39
30
|
* <nldd-form-field label="Password">
|
|
31
|
+
* <nldd-password-field invalid></nldd-password-field>
|
|
32
|
+
* <nldd-validation-list>
|
|
33
|
+
* <nldd-validation-item id="password-required" required>This field is required.</nldd-validation-item>
|
|
34
|
+
* <nldd-validation-item id="password-length" minlength="8">Must be at least 8 characters.</nldd-validation-item>
|
|
35
|
+
* </nldd-validation-list>
|
|
40
36
|
* <nldd-form-field-help-text>
|
|
41
|
-
*
|
|
37
|
+
* We only use this to sign you in. <a href="/help">Learn more</a>.
|
|
42
38
|
* </nldd-form-field-help-text>
|
|
43
|
-
* <nldd-text-field invalid error-message="error-required error-length"></nldd-text-field>
|
|
44
|
-
* <nldd-form-field-error-text id="error-required">This field is required.</nldd-form-field-error-text>
|
|
45
|
-
* <nldd-form-field-error-text id="error-length">Must be at least 8 characters.</nldd-form-field-error-text>
|
|
46
39
|
* </nldd-form-field>
|
|
47
40
|
*/
|
|
48
41
|
import { LitElement } from 'lit';
|
|
49
|
-
import { customElement, property
|
|
42
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
50
43
|
import { setOwnedAttribute } from '../../../utilities/owned-attribute.js';
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
44
|
+
import { applyDescribedBy } from '../../../utilities/described-by-mixin.js';
|
|
45
|
+
import { formFieldStyles, formFieldHelpTextStyles, } from './form-field.styles.js';
|
|
46
|
+
import { formFieldTemplate, formFieldHelpTextTemplate, } from './form-field.template.js';
|
|
53
47
|
// Exclude helper elements so _findInput() never returns them instead of the actual input
|
|
54
|
-
const HELPER_TAGS = ['nldd-form-field-help-text'
|
|
48
|
+
const HELPER_TAGS = ['nldd-form-field-help-text'];
|
|
55
49
|
/**
|
|
56
50
|
* Whether this element is the input a field is about.
|
|
57
51
|
*
|
|
@@ -118,18 +112,15 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
118
112
|
/** Label text for the optional badge. Defaults to 'Optioneel'. Override for localisation. */
|
|
119
113
|
this.optionalLabel = 'Optioneel';
|
|
120
114
|
this._childObserver = null;
|
|
121
|
-
this._observer = null;
|
|
122
115
|
/** The last label this field wrote onto the control, so it only takes back its own. */
|
|
123
116
|
this._appliedLabel = null;
|
|
124
117
|
/** Keeps the "no input found" warning to one per field rather than one per mutation. */
|
|
125
118
|
this._warnedNoInput = false;
|
|
126
|
-
this._hasErrors = false;
|
|
127
119
|
}
|
|
128
120
|
render() {
|
|
129
121
|
return formFieldTemplate(this);
|
|
130
122
|
}
|
|
131
123
|
updated(changed) {
|
|
132
|
-
this.classList.toggle('has-errors', this._hasErrors);
|
|
133
124
|
if (changed.has('label')) {
|
|
134
125
|
this._onSlotChange();
|
|
135
126
|
}
|
|
@@ -145,7 +136,6 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
145
136
|
disconnectedCallback() {
|
|
146
137
|
super.disconnectedCallback();
|
|
147
138
|
this._childObserver?.disconnect();
|
|
148
|
-
this._observer?.disconnect();
|
|
149
139
|
}
|
|
150
140
|
/**
|
|
151
141
|
* Called when the label is clicked — focuses the slotted input.
|
|
@@ -170,8 +160,6 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
170
160
|
input.focus();
|
|
171
161
|
}
|
|
172
162
|
_onSlotChange() {
|
|
173
|
-
// Disconnect the previous attribute observer before wiring up a new one.
|
|
174
|
-
this._observer?.disconnect();
|
|
175
163
|
const input = this._findInput();
|
|
176
164
|
if (!input) {
|
|
177
165
|
// Only once there is something to look at. An empty field is usually one
|
|
@@ -202,17 +190,8 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
202
190
|
input.id = generateId();
|
|
203
191
|
}
|
|
204
192
|
this._applyAccessibleLabel(input);
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
.filter(el => el.tagName.toLowerCase() === 'nldd-form-field-help-text')
|
|
208
|
-
.forEach(el => { if (!el.id)
|
|
209
|
-
el.id = generateId(); });
|
|
210
|
-
this._observer = new MutationObserver(() => this._syncErrorText());
|
|
211
|
-
this._observer.observe(input, {
|
|
212
|
-
attributes: true,
|
|
213
|
-
attributeFilter: ['invalid', 'error-message'],
|
|
214
|
-
});
|
|
215
|
-
this._syncErrorText();
|
|
193
|
+
this._adoptValidationLists(input);
|
|
194
|
+
this._syncDescription();
|
|
216
195
|
}
|
|
217
196
|
/**
|
|
218
197
|
* Hands the label to the control as its accessible name, through whichever
|
|
@@ -247,6 +226,42 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
247
226
|
return;
|
|
248
227
|
this._appliedLabel = setOwnedAttribute(input, attribute, this.label, this._appliedLabel);
|
|
249
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Hands every validation list in this field the control it is about, so it
|
|
231
|
+
* does not have to go looking for one.
|
|
232
|
+
*
|
|
233
|
+
* A list with a `for` of its own is left alone: that is how you say it is
|
|
234
|
+
* about a different control than the first.
|
|
235
|
+
*
|
|
236
|
+
* More than one control in a field is allowed and sometimes right, a radio
|
|
237
|
+
* group with an "Anders" text field beside it being the case this component
|
|
238
|
+
* is built for. But a list that reads a value would then quietly read the
|
|
239
|
+
* wrong one, and nothing on screen would show it: the rules simply never
|
|
240
|
+
* match. Say so once, where it can still be fixed.
|
|
241
|
+
*/
|
|
242
|
+
_adoptValidationLists(input) {
|
|
243
|
+
const lists = Array.from(this.children)
|
|
244
|
+
.filter((el) => el.tagName.toLowerCase() === 'nldd-validation-list');
|
|
245
|
+
if (!lists.length)
|
|
246
|
+
return;
|
|
247
|
+
for (const list of lists) {
|
|
248
|
+
if (!list.getAttribute('for'))
|
|
249
|
+
list.control = input;
|
|
250
|
+
}
|
|
251
|
+
if (!import.meta.env?.DEV)
|
|
252
|
+
return;
|
|
253
|
+
const controls = Array.from(this.children)
|
|
254
|
+
.filter(el => !HELPER_TAGS.includes(el.tagName.toLowerCase()) && isFormInput(el));
|
|
255
|
+
if (controls.length < 2)
|
|
256
|
+
return;
|
|
257
|
+
const readsValue = lists.some(list => !list.getAttribute('for') && Array.from(list.children)
|
|
258
|
+
.some(item => item.hasAttribute('match') || item.hasAttribute('minlength') || item.hasAttribute('maxlength')));
|
|
259
|
+
if (!readsValue)
|
|
260
|
+
return;
|
|
261
|
+
const which = this.label ? ` (label="${this.label}")` : '';
|
|
262
|
+
console.warn(`<nldd-form-field>${which}: more than one control, and the validation list has rules that read a value. `
|
|
263
|
+
+ `It is reading <${input.localName}>, the first one. Set \`for\` on the list if it should read another.`);
|
|
264
|
+
}
|
|
250
265
|
/**
|
|
251
266
|
* The input this field is about: the first one in the light DOM, wrapped or
|
|
252
267
|
* not.
|
|
@@ -278,55 +293,41 @@ let NLDDFormField = class NLDDFormField extends LitElement {
|
|
|
278
293
|
return undefined;
|
|
279
294
|
}
|
|
280
295
|
/**
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
296
|
+
* Hands the control the elements that describe it.
|
|
297
|
+
*
|
|
298
|
+
* Elements and not ids. An IDREF resolves inside the tree of the element
|
|
299
|
+
* that carries it, so an id written here cannot be found from inside a
|
|
300
|
+
* component's shadow root: the attribute lands, the id is right, and the
|
|
301
|
+
* description comes out empty. A control that renders its own input takes
|
|
302
|
+
* `describedByElements` and puts the references where they belong; anything
|
|
303
|
+
* that is the control itself, a native input or a host with a role of its
|
|
304
|
+
* own, is pointed at directly.
|
|
284
305
|
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
306
|
+
* The list once, not each of its items. The items come and go while you
|
|
307
|
+
* type, and a description rewritten per keystroke is a lot of churn in
|
|
308
|
+
* something assistive software is reading. A hidden item counts for nothing
|
|
309
|
+
* in the description, so one reference gives exactly what is on screen, and
|
|
310
|
+
* this never has to run again when the value changes.
|
|
311
|
+
*
|
|
312
|
+
* The requirements before the plain help text: what is wrong is why you are
|
|
313
|
+
* here.
|
|
290
314
|
*/
|
|
291
|
-
|
|
315
|
+
_syncDescription() {
|
|
292
316
|
const input = this._findInput();
|
|
293
317
|
if (!input)
|
|
294
318
|
return;
|
|
295
|
-
const
|
|
296
|
-
const
|
|
297
|
-
const
|
|
298
|
-
.
|
|
299
|
-
.filter(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
.filter(el => el.tagName.toLowerCase() === 'nldd-form-field-help-text' && el.id)
|
|
304
|
-
.map(el => el.id);
|
|
305
|
-
const visibleErrorIds = [];
|
|
306
|
-
for (const el of allErrorTexts) {
|
|
307
|
-
const shouldShow = isInvalid && referencedIds.includes(el.id);
|
|
308
|
-
el.toggleAttribute('invalid', shouldShow);
|
|
309
|
-
if (shouldShow && el.id)
|
|
310
|
-
visibleErrorIds.push(el.id);
|
|
311
|
-
}
|
|
312
|
-
// Prepend help text IDs so they are announced first, then error IDs.
|
|
313
|
-
const describedByIds = [...helpIds, ...visibleErrorIds];
|
|
314
|
-
const describedByValue = describedByIds.join(' ');
|
|
315
|
-
if (isCustomInput) {
|
|
316
|
-
// For custom elements (nldd-text-field, nldd-password-field), set error-message-ids
|
|
317
|
-
// so they can forward it to the inner <input aria-describedby>. IDs do not cross
|
|
318
|
-
// shadow DOM boundaries so setting aria-describedby on the host is not sufficient.
|
|
319
|
-
input.errorMessageIds = describedByValue;
|
|
319
|
+
const children = Array.from(this.children);
|
|
320
|
+
const tag = (el) => el.tagName.toLowerCase();
|
|
321
|
+
const describedBy = [
|
|
322
|
+
...children.filter(el => tag(el) === 'nldd-validation-list'),
|
|
323
|
+
...children.filter(el => tag(el) === 'nldd-form-field-help-text'),
|
|
324
|
+
];
|
|
325
|
+
if ('describedByElements' in input) {
|
|
326
|
+
input.describedByElements = describedBy;
|
|
320
327
|
}
|
|
321
328
|
else {
|
|
322
|
-
|
|
323
|
-
input.setAttribute('aria-describedby', describedByValue);
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
input.removeAttribute('aria-describedby');
|
|
327
|
-
}
|
|
329
|
+
applyDescribedBy(input, describedBy);
|
|
328
330
|
}
|
|
329
|
-
this._hasErrors = visibleErrorIds.length > 0;
|
|
330
331
|
}
|
|
331
332
|
};
|
|
332
333
|
NLDDFormField.styles = formFieldStyles;
|
|
@@ -345,9 +346,6 @@ __decorate([
|
|
|
345
346
|
__decorate([
|
|
346
347
|
property({ type: String, attribute: 'optional-label' })
|
|
347
348
|
], NLDDFormField.prototype, "optionalLabel", void 0);
|
|
348
|
-
__decorate([
|
|
349
|
-
state()
|
|
350
|
-
], NLDDFormField.prototype, "_hasErrors", void 0);
|
|
351
349
|
NLDDFormField = __decorate([
|
|
352
350
|
customElement('nldd-form-field')
|
|
353
351
|
], NLDDFormField);
|
|
@@ -371,34 +369,4 @@ NLDDFormFieldHelpText = __decorate([
|
|
|
371
369
|
customElement('nldd-form-field-help-text')
|
|
372
370
|
], NLDDFormFieldHelpText);
|
|
373
371
|
export { NLDDFormFieldHelpText };
|
|
374
|
-
/* ============================================================
|
|
375
|
-
nldd-form-field-error-text
|
|
376
|
-
============================================================ */
|
|
377
|
-
let NLDDFormFieldErrorText = class NLDDFormFieldErrorText extends LitElement {
|
|
378
|
-
constructor() {
|
|
379
|
-
super(...arguments);
|
|
380
|
-
/**
|
|
381
|
-
* When present the error text is visible.
|
|
382
|
-
* Managed automatically by the parent nldd-form-field — do not set manually.
|
|
383
|
-
*/
|
|
384
|
-
this.invalid = false;
|
|
385
|
-
}
|
|
386
|
-
connectedCallback() {
|
|
387
|
-
super.connectedCallback();
|
|
388
|
-
// Assign to the 'errors' slot automatically so consumers don't need to set slot="errors" manually.
|
|
389
|
-
// Note: this will overwrite any explicit slot attribute set by the consumer.
|
|
390
|
-
this.slot = 'errors';
|
|
391
|
-
}
|
|
392
|
-
render() {
|
|
393
|
-
return formFieldErrorTextTemplate(this);
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
NLDDFormFieldErrorText.styles = formFieldErrorTextStyles;
|
|
397
|
-
__decorate([
|
|
398
|
-
property({ type: Boolean, reflect: true })
|
|
399
|
-
], NLDDFormFieldErrorText.prototype, "invalid", void 0);
|
|
400
|
-
NLDDFormFieldErrorText = __decorate([
|
|
401
|
-
customElement('nldd-form-field-error-text')
|
|
402
|
-
], NLDDFormFieldErrorText);
|
|
403
|
-
export { NLDDFormFieldErrorText };
|
|
404
372
|
//# sourceMappingURL=form-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":";;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.ts"],"names":[],"mappings":";;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AAM,qBAAqB,GAA3B,MAAM,qBAAsB,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"form-field.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,yBA0K3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAwDnC,CAAC"}
|
|
@@ -11,7 +11,8 @@ export const formFieldStyles = css `
|
|
|
11
11
|
/* # Host */
|
|
12
12
|
|
|
13
13
|
:host {
|
|
14
|
-
--_gap: var(--primitives-space-
|
|
14
|
+
--_gap: var(--primitives-space-4);
|
|
15
|
+
--_description-gap: var(--primitives-space-4);
|
|
15
16
|
|
|
16
17
|
${inheritedTextReset}
|
|
17
18
|
display: block;
|
|
@@ -108,7 +109,7 @@ export const formFieldStyles = css `
|
|
|
108
109
|
gap: var(--primitives-space-4);
|
|
109
110
|
align-items: baseline;
|
|
110
111
|
color: var(--semantics-content-color);
|
|
111
|
-
font: var(--primitives-font-body-md-regular-
|
|
112
|
+
font: var(--primitives-font-body-md-regular-flat);
|
|
112
113
|
text-wrap: pretty;
|
|
113
114
|
}
|
|
114
115
|
|
|
@@ -166,17 +167,11 @@ export const formFieldStyles = css `
|
|
|
166
167
|
flex-basis: 0;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
.form-field__errors {
|
|
173
|
-
display: flex;
|
|
174
|
-
flex-direction: column;
|
|
170
|
+
::slotted(nldd-validation-list) {
|
|
171
|
+
margin-block-start: var(--_description-gap);
|
|
175
172
|
}
|
|
176
173
|
|
|
177
|
-
|
|
178
|
-
margin-top: var(--primitives-space-3);
|
|
179
|
-
}
|
|
174
|
+
|
|
180
175
|
`;
|
|
181
176
|
export const formFieldHelpTextStyles = css `
|
|
182
177
|
|
|
@@ -198,73 +193,12 @@ export const formFieldHelpTextStyles = css `
|
|
|
198
193
|
/* # Help text */
|
|
199
194
|
|
|
200
195
|
.form-field__help-text {
|
|
201
|
-
margin: var(--primitives-space-
|
|
196
|
+
margin: var(--primitives-space-4) 0 0;
|
|
202
197
|
color: var(--semantics-content-color);
|
|
203
198
|
font: var(--primitives-font-body-sm-regular-tight);
|
|
204
199
|
}
|
|
205
200
|
|
|
206
201
|
|
|
207
|
-
/* # Links */
|
|
208
|
-
|
|
209
|
-
::slotted(a) {
|
|
210
|
-
${slottedReset}
|
|
211
|
-
${inheritedTextReset}
|
|
212
|
-
border-radius: var(--primitives-corner-radius-xxs) !important;
|
|
213
|
-
color: var(--semantics-links-color) !important;
|
|
214
|
-
text-decoration: underline !important;
|
|
215
|
-
text-underline-offset: var(--primitives-space-2) !important;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
@media (hover: hover) {
|
|
219
|
-
::slotted(a:hover) {
|
|
220
|
-
color: var(--semantics-links-is-hovered-color) !important;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
::slotted(a:active) {
|
|
225
|
-
color: var(--semantics-links-is-active-color) !important;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
::slotted(a:focus-visible) {
|
|
229
|
-
outline: var(--semantics-focus-ring-outline) !important;
|
|
230
|
-
outline-offset: var(--semantics-focus-ring-outline-offset) !important;
|
|
231
|
-
box-shadow: var(--semantics-focus-ring-box-shadow) !important;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
::slotted(a:focus:not(:focus-visible)) {
|
|
235
|
-
outline: none !important;
|
|
236
|
-
}
|
|
237
|
-
`;
|
|
238
|
-
export const formFieldErrorTextStyles = css `
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
/* # Host */
|
|
242
|
-
|
|
243
|
-
:host {
|
|
244
|
-
${inheritedTextReset}
|
|
245
|
-
display: none;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
:host([invalid]) {
|
|
249
|
-
display: block;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/* After the invalid rule at equal specificity: hidden must also win on an
|
|
253
|
-
error text that is currently shown. */
|
|
254
|
-
:host([hidden]) {
|
|
255
|
-
display: none;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
/* # Error text */
|
|
260
|
-
|
|
261
|
-
.form-field__error-text {
|
|
262
|
-
margin: 0;
|
|
263
|
-
color: var(--semantics-content-critical-color);
|
|
264
|
-
font: var(--primitives-font-body-sm-regular-tight);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
202
|
/* # Links */
|
|
269
203
|
|
|
270
204
|
::slotted(a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.styles.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"form-field.styles.js","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE3F,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;;;;;;;;;;;IAY9B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;2BAwBK,KAAK;;;;;;;;;;;;;;;;;;;;;;;;2BAwBL,KAAK;;;;;;;;;;;;2BAYL,KAAK;;;;;;;;2BAQL,KAAK;;;;;;;;;;;;;;2BAcL,KAAK;;;;;;;;;;;;;;;;;;;;;2BAqBL,KAAK;;;;;;;;;2BASL,KAAK;;;;;;;2BAOL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC/B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAA;;;;;;IAMtC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;IAuBlB,YAAY;IACZ,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BrB,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import type { NLDDFormField } from './form-field.js';
|
|
3
3
|
import type { NLDDFormFieldHelpText } from './form-field.js';
|
|
4
|
-
import type { NLDDFormFieldErrorText } from './form-field.js';
|
|
5
4
|
export declare function formFieldTemplate(component: NLDDFormField): TemplateResult;
|
|
6
5
|
export declare function formFieldHelpTextTemplate(_component: NLDDFormFieldHelpText): TemplateResult;
|
|
7
|
-
export declare function formFieldErrorTextTemplate(_component: NLDDFormFieldErrorText): TemplateResult;
|
|
8
6
|
//# sourceMappingURL=form-field.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"form-field.template.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/form-field/form-field.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,cAAc,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAU7D,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,aAAa,GAAG,cAAc,CA8B1E;AAMD,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,qBAAqB,GAAG,cAAc,CAM3F"}
|