@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
|
@@ -14,6 +14,9 @@ import { nlddListTranslations } from './list.i18n.js';
|
|
|
14
14
|
import '../../status-and-feedback/inline-dialog/inline-dialog.js';
|
|
15
15
|
import '../../content/icon/icon.js';
|
|
16
16
|
import '../../actions/icon-button/icon-button.js';
|
|
17
|
+
/** What the browser counts as a tab stop in a shadow root: focusable, enabled,
|
|
18
|
+
* and not parked at a negative tabindex. */
|
|
19
|
+
const SHADOW_TAB_STOP = ':is(a[href], button, input, select, textarea, [tabindex]):not([tabindex^="-"]):not(:disabled)';
|
|
17
20
|
/**
|
|
18
21
|
* A container for `nldd-list-item` elements.
|
|
19
22
|
*
|
|
@@ -28,6 +31,16 @@ import '../../actions/icon-button/icon-button.js';
|
|
|
28
31
|
* spacer-cell per level. Comes with its own keyboard, see "Tree" below.
|
|
29
32
|
* - `navigation` — host `role="navigation"`, items with `selected` get
|
|
30
33
|
* `aria-current="page"` on their inner `<a>` or `<button>`.
|
|
34
|
+
* - `form` — rows that are not actions themselves: the controls inside them
|
|
35
|
+
* are. A row of a label and a field, a switch, a menu button, or a value you
|
|
36
|
+
* cannot change at all. Semantically the same as `list` (`role="list"`,
|
|
37
|
+
* `role="listitem"`), and everything visual is unchanged; what falls away is
|
|
38
|
+
* the keyboard of a list you walk through. No arrow navigation, so no
|
|
39
|
+
* promise of it either, and no tab stop on the row: Tab goes straight to the
|
|
40
|
+
* controls, in source order, the way it does in any form. Rows that ARE
|
|
41
|
+
* actions (`href`, `button`, `checkbox`, or a segment) contradict that and
|
|
42
|
+
* warn in development. SwiftUI draws the same line between `List` and
|
|
43
|
+
* `Form`, for the same reason.
|
|
31
44
|
* - `listbox` — an accessible, filterable listbox (combobox pattern). The
|
|
32
45
|
* list renders its OWN search input (`role="combobox"`) pinned
|
|
33
46
|
* above the options; `.list__items` becomes `role="listbox"`
|
|
@@ -40,10 +53,11 @@ import '../../actions/icon-button/icon-button.js';
|
|
|
40
53
|
*
|
|
41
54
|
* ### Keyboard
|
|
42
55
|
*
|
|
43
|
-
*
|
|
44
|
-
* on. Whether the keys do something is not a property of one list: it
|
|
45
|
-
* reader may assume about all of them, and a per-list setting made that
|
|
46
|
-
* unknowable from the outside.
|
|
56
|
+
* A list you walk through answers to the arrow keys, and there is no attribute to
|
|
57
|
+
* switch that on. Whether the keys do something is not a property of one list: it
|
|
58
|
+
* is what a reader may assume about all of them, and a per-list setting made that
|
|
59
|
+
* unknowable from the outside. It follows the type, which you can see before you
|
|
60
|
+
* touch a key.
|
|
47
61
|
*
|
|
48
62
|
* - ArrowUp / ArrowDown — move focus between the rows there is something to do
|
|
49
63
|
* with. A row of nothing but text is skipped, because focus that leads nowhere
|
|
@@ -53,12 +67,22 @@ import '../../actions/icon-button/icon-button.js';
|
|
|
53
67
|
* Within the current row Tab walks that row's own controls: a chevron beside a
|
|
54
68
|
* checkbox, a menu button at the end. The same controls in the other rows are
|
|
55
69
|
* held out of the tab order (`tabindex="-1"`, or `no-tab` on a design-system
|
|
56
|
-
* control that keeps its tab stop in its own shadow root)
|
|
70
|
+
* control that keeps its tab stop in its own shadow root), and so are this
|
|
71
|
+
* row's once focus leaves the list, so tabbing back in lands on the row again.
|
|
72
|
+
* - Escape — out of a control the row holds, back onto the row. One level up,
|
|
73
|
+
* where Shift+Tab is one step back. On the row itself the list claims nothing,
|
|
74
|
+
* so Escape carries on to whatever holds the list, and a control showing a
|
|
75
|
+
* menu keeps the first press for closing that menu.
|
|
57
76
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
77
|
+
* While focus sits in a control a row holds, the list stands down: those keys
|
|
78
|
+
* are the control's, and a list that took them anyway would pull focus out of a
|
|
79
|
+
* combo box or a text field mid-word. What the row IS — its own link, button or
|
|
80
|
+
* segments — keeps answering here.
|
|
81
|
+
*
|
|
82
|
+
* Arrows move focus only; selection stays consumer-managed. Three types answer
|
|
83
|
+
* differently, and all three say so on screen before you touch a key: a listbox
|
|
84
|
+
* runs its keyboard from its search field, a reorderable list moves rows with the
|
|
85
|
+
* arrows, and a form has no rows to move between at all.
|
|
62
86
|
*
|
|
63
87
|
* ### Listbox
|
|
64
88
|
*
|
|
@@ -124,19 +148,17 @@ import '../../actions/icon-button/icon-button.js';
|
|
|
124
148
|
* @element nldd-list
|
|
125
149
|
*
|
|
126
150
|
* @attr {'simple'|'box-tinted'|'box-base'} variant - Visual style (default 'simple'): `simple` is a plain vertical strip with no chrome, the two `box` values a framed card with rounded corners, fill and inset border ring. `box-tinted` for a list on a plain page, `box-base` for one on an already-tinted parent (the border ring gets +2 palette steps so it still reads against a card-on-card)
|
|
127
|
-
* @attr {'list'|'navigation'|'listbox'|'tree'} type - A11y role and behavior (default 'list'). See the docblock above.
|
|
151
|
+
* @attr {'list'|'navigation'|'listbox'|'tree'|'form'} type - A11y role and behavior (default 'list'). See the docblock above.
|
|
128
152
|
* @attr {boolean} reorderable - Enables drag-to-reorder and pushes `reorderable` onto the items. Only valid with `type="list"`; there the arrow keys move rows instead of focus.
|
|
129
153
|
* @attr {'always'|'on-touch'|'never'} dividers - When to draw the lines between the items (default 'always'). `on-touch` draws them only where the primary input is touch, under `(pointer: coarse)`: a pointer has the hover highlight to tell one row from the next and a finger has nothing, so the line earns its place in the one case and is clutter in the other. `never` hides them everywhere
|
|
130
154
|
* @attr {string} height - Listbox only: caps the options' scroll region at this CSS length (e.g. '320px'). Unset means no cap.
|
|
131
|
-
* @attr {string} empty-text - Text for the default empty-state dialog (falls back to the Dutch i18n default). Ignored when `[slot=empty]` is filled.
|
|
132
|
-
* @attr {string} empty-supporting-text - Supporting text for the default empty-state dialog. Ignored when `[slot=empty]` is filled.
|
|
133
155
|
* @attr {string} accessible-label - Accessible name, forwarded to the list in `type="list"` and to the search field in `type="listbox"`. For `type="navigation"` set `aria-label` / `aria-labelledby` on the element itself. Falls back to the i18n default.
|
|
134
156
|
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
135
157
|
*
|
|
136
158
|
* @slot - List items (`nldd-list-item`)
|
|
137
159
|
* @slot toolbar - Controls below the search field (filters, sort, counts, view toggles). Available for every type; collapses when empty.
|
|
138
160
|
* @slot search-bar-end - Controls inline at the end of the search bar, beside the search field (e.g. a filter or options button). Listbox only; collapses when empty.
|
|
139
|
-
* @slot empty - Shown when no items are visible (all `[hidden]` or none).
|
|
161
|
+
* @slot empty - Shown when no items are visible (all `[hidden]` or none). Empty by default: what an empty list should say is the app's to write, so put an `nldd-inline-dialog` here. In `type="listbox"` it is suppressed while the search field is empty (no query yet), so the consumer can show just the search field or its own hint outside the list.
|
|
140
162
|
*
|
|
141
163
|
* @fires nldd-reorder - Reorderable `type="list"`: `{ fromIndex, toIndex }` on drop
|
|
142
164
|
* @fires input - `type="listbox"`: search value changed; `{ value }`. Toggle `[hidden]` on items to filter.
|
|
@@ -164,17 +186,6 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
164
186
|
* outside listbox mode.
|
|
165
187
|
*/
|
|
166
188
|
this.height = '';
|
|
167
|
-
/**
|
|
168
|
-
* Text for the default empty-state dialog. Falls back to the Dutch
|
|
169
|
-
* i18n default ("Geen items"). Ignored when consumers slot their
|
|
170
|
-
* own content into `[slot=empty]`.
|
|
171
|
-
*/
|
|
172
|
-
this.emptyText = '';
|
|
173
|
-
/**
|
|
174
|
-
* Optional supporting text for the default empty-state dialog.
|
|
175
|
-
* Ignored when consumers slot their own content into `[slot=empty]`.
|
|
176
|
-
*/
|
|
177
|
-
this.emptySupportingText = '';
|
|
178
189
|
/** Accessible name for the list, forwarded to the inner role: the list in
|
|
179
190
|
* `type=list`, the search field in `type=listbox`. For `type=navigation`,
|
|
180
191
|
* set `aria-label` / `aria-labelledby` on the element directly (it is a
|
|
@@ -209,6 +220,7 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
209
220
|
// — Observers ————————————————————————————————————————————————————————————
|
|
210
221
|
this._itemsObserver = null;
|
|
211
222
|
this._contextScheduled = false;
|
|
223
|
+
this._warnedSilentEmpty = false;
|
|
212
224
|
/** Keep the active option valid after the visible set changes (initial
|
|
213
225
|
* render, slot change, or consumer-driven `[hidden]` filtering): ensure ids,
|
|
214
226
|
* reset the active option to the first visible one when the current active is
|
|
@@ -235,7 +247,8 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
235
247
|
* bar gap) collapses when empty. Bound in the template so it follows the slot
|
|
236
248
|
* even though the search bar only renders in listbox mode. */
|
|
237
249
|
this._onSearchBarEndSlotChange = (event) => {
|
|
238
|
-
|
|
250
|
+
const slot = event.target;
|
|
251
|
+
queueMicrotask(() => { this._hasSearchBarEnd = slot.assignedElements().length > 0; });
|
|
239
252
|
};
|
|
240
253
|
this._onSearchFocus = () => {
|
|
241
254
|
this._searchFocused = true;
|
|
@@ -309,6 +322,25 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
309
322
|
this._setActiveOption(visible[next]);
|
|
310
323
|
};
|
|
311
324
|
this._rovingScheduled = false;
|
|
325
|
+
this._warnedActionRowInForm = false;
|
|
326
|
+
/**
|
|
327
|
+
* Whether the control the Escape came from had a popover open when the key
|
|
328
|
+
* went down. Read on the way in, because a control closes its own menu in its
|
|
329
|
+
* own handler and does not stop the key: by the time this list sees it on the
|
|
330
|
+
* way out, the menu is already gone and one press would do two levels at once.
|
|
331
|
+
*/
|
|
332
|
+
this._popoverWasOpen = false;
|
|
333
|
+
this._onKeyDownCapture = (event) => {
|
|
334
|
+
if (event.key !== 'Escape' || !this._arrowNavActive)
|
|
335
|
+
return;
|
|
336
|
+
const origin = this._origin(event);
|
|
337
|
+
// Asked of the whole row rather than of the control the event came from:
|
|
338
|
+
// a popover can hang anywhere between the focused node and the row — under
|
|
339
|
+
// the control, beside it in the same cell — and missing one costs a level.
|
|
340
|
+
// The other way round costs a press, once, in a row that has an open menu
|
|
341
|
+
// and a second control you are typing in.
|
|
342
|
+
this._popoverWasOpen = !!origin?.control && !!origin.row.querySelector(':popover-open');
|
|
343
|
+
};
|
|
312
344
|
this._onFocusIn = (event) => {
|
|
313
345
|
if (!this._arrowNavActive)
|
|
314
346
|
return;
|
|
@@ -317,8 +349,40 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
317
349
|
// click, or programmatic focus), so arrows continue from there.
|
|
318
350
|
if (item && !item._rovingActive && this._getInteractiveItems().includes(item)) {
|
|
319
351
|
this._setRovingActive(item);
|
|
352
|
+
return;
|
|
320
353
|
}
|
|
354
|
+
// Focus back on the row it was already on: hand its controls their stops
|
|
355
|
+
// again, since leaving the list parked them.
|
|
356
|
+
if (item?._rovingActive)
|
|
357
|
+
item._syncRovingTabStops();
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Focus gone from the list: park everything but the row.
|
|
361
|
+
*
|
|
362
|
+
* The stops a row hands out to its controls last as long as the row is the
|
|
363
|
+
* current one, so without this they are still there after you tab away, and
|
|
364
|
+
* Shift+Tab back in lands inside the control you left rather than on the row.
|
|
365
|
+
* A roving list is one stop from the outside; what is inside opens up once
|
|
366
|
+
* you are in. _onFocusIn puts them back.
|
|
367
|
+
*
|
|
368
|
+
* Deferred: focus moving between two controls of the same row fires focusout
|
|
369
|
+
* before focusin, and `relatedTarget` is retargeted at a shadow boundary, so
|
|
370
|
+
* the only reliable answer to "did focus leave" is the one you get after it
|
|
371
|
+
* has landed.
|
|
372
|
+
*/
|
|
373
|
+
this._onFocusOut = () => {
|
|
374
|
+
if (!this._arrowNavActive)
|
|
375
|
+
return;
|
|
376
|
+
queueMicrotask(() => {
|
|
377
|
+
if (!this.isConnected || this._containsFocus())
|
|
378
|
+
return;
|
|
379
|
+
this._getAllRows().forEach((row) => { row._parkControls(); });
|
|
380
|
+
});
|
|
321
381
|
};
|
|
382
|
+
/** Reported once per element: a list that gains rows would otherwise repeat
|
|
383
|
+
* the same line on every change. */
|
|
384
|
+
this._warnedUnmanaged = new WeakSet();
|
|
385
|
+
this._unmanagedWarnScheduled = false;
|
|
322
386
|
// — Drag: pointer ————————————————————————————————————————————————————————
|
|
323
387
|
this._onPointerDown = (event) => {
|
|
324
388
|
if (!this.reorderable || this.type !== 'list')
|
|
@@ -383,6 +447,10 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
383
447
|
// Arrow-navigation and reorder both claim the arrow keys; _arrowNavActive
|
|
384
448
|
// is false whenever reorderable wins, so the two never run together.
|
|
385
449
|
if (this._arrowNavActive) {
|
|
450
|
+
if (event.key === 'Escape') {
|
|
451
|
+
this._onEscape(event);
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
386
454
|
this._onArrowNav(event);
|
|
387
455
|
return;
|
|
388
456
|
}
|
|
@@ -424,25 +492,46 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
424
492
|
};
|
|
425
493
|
}
|
|
426
494
|
// — Lifecycle ————————————————————————————————————————————————————————————
|
|
495
|
+
/**
|
|
496
|
+
* What the first render needs to know, read before it happens.
|
|
497
|
+
*
|
|
498
|
+
* All three of these used to be set in `firstUpdated`, from the slots in the
|
|
499
|
+
* shadow root. Setting reactive state there asks for a second render the
|
|
500
|
+
* moment the first one finished, which Lit reports on every page as "an
|
|
501
|
+
* update scheduled after an update completed". The same three answers are in
|
|
502
|
+
* the light DOM, which is there before the first render, so they are read
|
|
503
|
+
* from the children instead. The slotchange listeners below keep them true
|
|
504
|
+
* afterwards, and by then a second render is what you actually want.
|
|
505
|
+
*/
|
|
506
|
+
willUpdate(changed) {
|
|
507
|
+
// Derived state belongs before the render that reads it. In `updated` the
|
|
508
|
+
// merge lands after the first render has finished, and asks for a second
|
|
509
|
+
// one on the spot.
|
|
510
|
+
if (changed.has('translations') || !this.hasUpdated) {
|
|
511
|
+
this._mergedTranslations = { ...nlddListTranslations, ...this.translations };
|
|
512
|
+
}
|
|
513
|
+
if (this.hasUpdated)
|
|
514
|
+
return;
|
|
515
|
+
this._updateEmpty();
|
|
516
|
+
this._hasToolbar = this.querySelector(':scope > [slot="toolbar"]') !== null;
|
|
517
|
+
this._hasSearchBarEnd = this.querySelector(':scope > [slot="search-bar-end"]') !== null;
|
|
518
|
+
}
|
|
427
519
|
firstUpdated() {
|
|
520
|
+
// Deferred: the browser fires the first slotchange the moment this render
|
|
521
|
+
// commits, and state set there is an update scheduled on top of the one
|
|
522
|
+
// that just finished. willUpdate already read these from the light DOM, so
|
|
523
|
+
// the first event has nothing to add anyway; the later ones do.
|
|
428
524
|
const slot = this.shadowRoot?.querySelector('slot:not([name])');
|
|
429
|
-
slot?.addEventListener('slotchange', () => {
|
|
525
|
+
slot?.addEventListener('slotchange', () => queueMicrotask(() => {
|
|
430
526
|
this._updateItems();
|
|
431
527
|
this._updateEmpty();
|
|
432
|
-
});
|
|
528
|
+
}));
|
|
433
529
|
this._updateItems();
|
|
434
|
-
this._updateEmpty();
|
|
435
530
|
this._warnArrowNav();
|
|
436
531
|
const toolbarSlot = this.shadowRoot?.querySelector('slot[name="toolbar"]');
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
// The search-bar-end slot only renders in listbox; sync its initial presence
|
|
441
|
-
// here. The @slotchange binding in the template keeps it updated afterwards
|
|
442
|
-
// and re-binds whenever the search bar (re)renders on a type change.
|
|
443
|
-
const searchBarEndSlot = this.shadowRoot?.querySelector('slot[name="search-bar-end"]');
|
|
444
|
-
if (searchBarEndSlot)
|
|
445
|
-
this._hasSearchBarEnd = searchBarEndSlot.assignedElements().length > 0;
|
|
532
|
+
toolbarSlot?.addEventListener('slotchange', () => queueMicrotask(() => {
|
|
533
|
+
this._hasToolbar = toolbarSlot.assignedElements().length > 0;
|
|
534
|
+
}));
|
|
446
535
|
// Watch for rows being added or removed, for `hidden` toggles on them
|
|
447
536
|
// (consumer-driven filtering) and for branches opening and closing, since
|
|
448
537
|
// all three change which row paints first and last. `subtree: true` is
|
|
@@ -468,6 +557,7 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
468
557
|
return;
|
|
469
558
|
this._updateItems();
|
|
470
559
|
this._updateEmpty();
|
|
560
|
+
this._warnUnmanagedControls();
|
|
471
561
|
});
|
|
472
562
|
this._itemsObserver.observe(this, {
|
|
473
563
|
childList: true,
|
|
@@ -487,15 +577,19 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
487
577
|
this.style.containerType = 'inline-size';
|
|
488
578
|
this.style.containerName = 'cells-container';
|
|
489
579
|
this.addEventListener('pointerdown', this._onPointerDown);
|
|
580
|
+
this.addEventListener('keydown', this._onKeyDownCapture, true);
|
|
490
581
|
this.addEventListener('keydown', this._onKeyDown);
|
|
491
582
|
this.addEventListener('focusin', this._onFocusIn);
|
|
583
|
+
this.addEventListener('focusout', this._onFocusOut);
|
|
492
584
|
this.addEventListener('click', this._onListClick);
|
|
493
585
|
}
|
|
494
586
|
disconnectedCallback() {
|
|
495
587
|
super.disconnectedCallback();
|
|
496
588
|
this.removeEventListener('pointerdown', this._onPointerDown);
|
|
589
|
+
this.removeEventListener('keydown', this._onKeyDownCapture, true);
|
|
497
590
|
this.removeEventListener('keydown', this._onKeyDown);
|
|
498
591
|
this.removeEventListener('focusin', this._onFocusIn);
|
|
592
|
+
this.removeEventListener('focusout', this._onFocusOut);
|
|
499
593
|
this.removeEventListener('click', this._onListClick);
|
|
500
594
|
this._itemsObserver?.disconnect();
|
|
501
595
|
this._itemsObserver = null;
|
|
@@ -512,9 +606,6 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
512
606
|
if (changed.has('variant')) {
|
|
513
607
|
this._updateItemContext();
|
|
514
608
|
}
|
|
515
|
-
if (changed.has('translations')) {
|
|
516
|
-
this._mergedTranslations = { ...nlddListTranslations, ...this.translations };
|
|
517
|
-
}
|
|
518
609
|
if (changed.has('type')) {
|
|
519
610
|
this._applyHostType();
|
|
520
611
|
// Leaving listbox mode: drop the active highlight and reset state so a
|
|
@@ -637,6 +728,35 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
637
728
|
_updateEmpty() {
|
|
638
729
|
const items = this._getItems();
|
|
639
730
|
this._isEmpty = items.length === 0 || items.every(item => item.hasAttribute('hidden'));
|
|
731
|
+
// Nothing in it and nothing said about that is not a thing on the page.
|
|
732
|
+
// Drawing the surface anyway makes "nothing" look different per variant:
|
|
733
|
+
// invisible on a plain list, an empty tinted bar on a boxed one, which
|
|
734
|
+
// reads as a skeleton that never loaded.
|
|
735
|
+
this.classList.toggle('is-blank', this._isEmpty && !this.querySelector(':scope > [slot="empty"]'));
|
|
736
|
+
this._warnSilentEmpty();
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* A list with nothing in it and nothing to say about that.
|
|
740
|
+
*
|
|
741
|
+
* There is no default text any more, because what an empty list means is
|
|
742
|
+
* the app's to write and a house sentence was wrong more often than right.
|
|
743
|
+
* That leaves a real risk of a blank area with nothing in the accessibility
|
|
744
|
+
* tree either, so the list asks the person building it rather than
|
|
745
|
+
* answering for them. A listbox before you have typed is left alone: an
|
|
746
|
+
* empty search is not an empty list.
|
|
747
|
+
*/
|
|
748
|
+
_warnSilentEmpty() {
|
|
749
|
+
if (!import.meta.env?.DEV)
|
|
750
|
+
return;
|
|
751
|
+
if (!this._isEmpty || this._warnedSilentEmpty)
|
|
752
|
+
return;
|
|
753
|
+
if (this.type === 'listbox' && !this._searchValue)
|
|
754
|
+
return;
|
|
755
|
+
if (this.querySelector(':scope > [slot="empty"]'))
|
|
756
|
+
return;
|
|
757
|
+
this._warnedSilentEmpty = true;
|
|
758
|
+
console.warn('nldd-list: no items and nothing in [slot="empty"], so the list renders a blank area. '
|
|
759
|
+
+ 'Put an nldd-inline-dialog in that slot saying what is not there and what the next move is.', this);
|
|
640
760
|
}
|
|
641
761
|
// — Listbox: active-option model ————————————————————————————————————————————
|
|
642
762
|
/** Every option needs a stable id for aria-activedescendant. Assign one to
|
|
@@ -725,6 +845,12 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
725
845
|
get _arrowNavActive() {
|
|
726
846
|
if (this.type === 'listbox')
|
|
727
847
|
return false;
|
|
848
|
+
// A form's rows are not somewhere to go: the controls in them are, and Tab
|
|
849
|
+
// already reaches those. Arrow keys would be a promise with nothing behind
|
|
850
|
+
// it, and the tab stop they need on the row would sit in front of every
|
|
851
|
+
// field.
|
|
852
|
+
if (this.type === 'form')
|
|
853
|
+
return false;
|
|
728
854
|
return !(this.reorderable && this.type === 'list');
|
|
729
855
|
}
|
|
730
856
|
/** Interactive, painted rows — the roving stops, in the order they appear on
|
|
@@ -770,6 +896,14 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
770
896
|
// when AT reaches the list). See _arrowNavActive — known limitation.
|
|
771
897
|
// Only where the keys go somewhere: a list of nothing but text has no stops
|
|
772
898
|
// to move between, and promising keys that do nothing is worse than silence.
|
|
899
|
+
if (import.meta.env?.DEV && this.type === 'form' && !this._warnedActionRowInForm) {
|
|
900
|
+
const action = rows.find((row) => row.href || row.button || row.checkbox
|
|
901
|
+
|| row.querySelector(':scope > nldd-list-item-segment'));
|
|
902
|
+
if (action) {
|
|
903
|
+
this._warnedActionRowInForm = true;
|
|
904
|
+
console.warn('nldd-list: type="form" says the rows are not actions and the controls inside them are, so its rows carry no keyboard of their own. This one is a link, a button, a checkbox or a set of segments, which contradicts that. Use type="list" for rows you activate, and put the action in a cell if it belongs to a form row.');
|
|
905
|
+
}
|
|
906
|
+
}
|
|
773
907
|
if (interactive.length > 0) {
|
|
774
908
|
this.setAttribute('aria-keyshortcuts', 'ArrowUp ArrowDown Home End');
|
|
775
909
|
this.setAttribute('aria-description', this._t('components.list.arrow-navigation-description-text'));
|
|
@@ -792,9 +926,8 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
792
926
|
row._syncRovingTabStops();
|
|
793
927
|
});
|
|
794
928
|
}
|
|
795
|
-
// items defaults to every row, nested ones included
|
|
796
|
-
//
|
|
797
|
-
// roving, so they stay false).
|
|
929
|
+
// items defaults to every row, nested ones included. Callers that pass a
|
|
930
|
+
// narrower set take on clearing whatever is outside it themselves.
|
|
798
931
|
_setRovingActive(activeItem, items = this._getAllRows()) {
|
|
799
932
|
items.forEach((item) => {
|
|
800
933
|
item._rovingActive = item === activeItem;
|
|
@@ -803,8 +936,36 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
803
936
|
item._syncRovingTabStops();
|
|
804
937
|
});
|
|
805
938
|
}
|
|
939
|
+
/** Whether focus is anywhere in this list, shadow boundaries included. */
|
|
940
|
+
_containsFocus() {
|
|
941
|
+
// document.activeElement only ever names the outermost host, so the answer
|
|
942
|
+
// is a walk down the chain of active elements: at every level, is this the
|
|
943
|
+
// list or inside it.
|
|
944
|
+
let node = document.activeElement;
|
|
945
|
+
while (node) {
|
|
946
|
+
if (node === this || this.contains(node))
|
|
947
|
+
return true;
|
|
948
|
+
node = node.shadowRoot?.activeElement ?? null;
|
|
949
|
+
}
|
|
950
|
+
return false;
|
|
951
|
+
}
|
|
952
|
+
/** The row an event came from, and the control of that row it started in. */
|
|
953
|
+
_origin(event) {
|
|
954
|
+
const path = event.composedPath();
|
|
955
|
+
const row = path.find((el) => el instanceof Element && el.tagName.toLowerCase() === 'nldd-list-item');
|
|
956
|
+
if (!row)
|
|
957
|
+
return null;
|
|
958
|
+
return { row, control: row._slottedControlFor(path) };
|
|
959
|
+
}
|
|
806
960
|
_onArrowNav(event) {
|
|
807
961
|
const { key } = event;
|
|
962
|
+
// Hands off while focus is in a control the row holds. What those keys do
|
|
963
|
+
// is the control's business — a combo box moves its options with them, a
|
|
964
|
+
// text field its caret — and a list that takes them anyway pulls focus out
|
|
965
|
+
// of the control mid-word. The row itself, its own action and its segments
|
|
966
|
+
// are not controls it holds, so those keep answering here.
|
|
967
|
+
if (this._origin(event)?.control)
|
|
968
|
+
return;
|
|
808
969
|
if (this.type === 'tree' && (key === 'ArrowRight' || key === 'ArrowLeft')) {
|
|
809
970
|
this._onTreeHorizontal(event, key);
|
|
810
971
|
return;
|
|
@@ -833,9 +994,38 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
833
994
|
}
|
|
834
995
|
event.preventDefault();
|
|
835
996
|
const target = items[next];
|
|
836
|
-
|
|
997
|
+
// Every row, not just the interactive ones: Escape can leave the flag on a
|
|
998
|
+
// row that holds a control but is no stop itself, and clearing only the
|
|
999
|
+
// stops would leave two rows claiming to be the current one.
|
|
1000
|
+
this._setRovingActive(target);
|
|
837
1001
|
target.focus();
|
|
838
1002
|
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Escape: out of a control, back onto the row that holds it.
|
|
1005
|
+
*
|
|
1006
|
+
* One level up, not one step back. Shift+Tab retraces the order and lands on
|
|
1007
|
+
* whatever came before, which is the row only from the first control of a
|
|
1008
|
+
* row; from the second it is the first. This is the move that works wherever
|
|
1009
|
+
* you are in the row, and it puts the arrow keys back in reach.
|
|
1010
|
+
*
|
|
1011
|
+
* It claims Escape at exactly this one level. On the row it claims nothing,
|
|
1012
|
+
* so Escape carries on to whatever holds the list — a sheet, a dialog, or
|
|
1013
|
+
* nothing at all. And a control showing a popover keeps it: that menu is the
|
|
1014
|
+
* topmost thing you opened, so it is what the first Escape closes.
|
|
1015
|
+
*/
|
|
1016
|
+
_onEscape(event) {
|
|
1017
|
+
const hadPopover = this._popoverWasOpen;
|
|
1018
|
+
this._popoverWasOpen = false;
|
|
1019
|
+
const origin = this._origin(event);
|
|
1020
|
+
if (!origin?.control)
|
|
1021
|
+
return;
|
|
1022
|
+
if (hadPopover)
|
|
1023
|
+
return;
|
|
1024
|
+
event.preventDefault();
|
|
1025
|
+
event.stopPropagation();
|
|
1026
|
+
this._setRovingActive(origin.row);
|
|
1027
|
+
origin.row.focus();
|
|
1028
|
+
}
|
|
839
1029
|
/** Tree only: Right opens a closed branch and steps into an open one, Left
|
|
840
1030
|
* closes an open branch and steps out of a leaf. Opening and closing runs
|
|
841
1031
|
* through the row's own disclosure control, so `expanded` keeps being
|
|
@@ -904,23 +1094,66 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
904
1094
|
if (this.hasAttribute('arrow-navigation')) {
|
|
905
1095
|
console.warn('nldd-list: `arrow-navigation` is the default now and the attribute does nothing; remove it.');
|
|
906
1096
|
}
|
|
907
|
-
|
|
1097
|
+
this._warnUnmanagedControls();
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* A control the row cannot reach: a custom element that keeps its tab stop in
|
|
1101
|
+
* its own shadow root and has no `no-tab` to close it. Such a control stays a
|
|
1102
|
+
* tab stop in EVERY row, which is exactly what the roving promises it is not,
|
|
1103
|
+
* and the row does not even count as a stop for the arrow keys.
|
|
1104
|
+
*
|
|
1105
|
+
* Deferred, and re-run whenever the rows change. A slotted custom element has
|
|
1106
|
+
* its shadow root the moment it connects, but Lit renders the content on the
|
|
1107
|
+
* first update, so a check that runs in `firstUpdated` looks into an empty
|
|
1108
|
+
* shadow root and finds nothing to warn about. Waiting for the element to be
|
|
1109
|
+
* defined is not enough either: it has to have rendered.
|
|
1110
|
+
*/
|
|
1111
|
+
_warnUnmanagedControls() {
|
|
1112
|
+
if (!import.meta.env?.DEV || !this._arrowNavActive)
|
|
908
1113
|
return;
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
1114
|
+
if (this._unmanagedWarnScheduled)
|
|
1115
|
+
return;
|
|
1116
|
+
this._unmanagedWarnScheduled = true;
|
|
1117
|
+
const check = async () => {
|
|
1118
|
+
this._unmanagedWarnScheduled = false;
|
|
1119
|
+
const rows = this._getPaintedRows();
|
|
1120
|
+
await Promise.all(rows.map((row) => row.updateComplete));
|
|
1121
|
+
for (const row of rows) {
|
|
1122
|
+
for (const el of Array.from(row.querySelectorAll('*'))) {
|
|
1123
|
+
if (el.closest('nldd-list-item') !== row)
|
|
1124
|
+
continue;
|
|
1125
|
+
// A segment is managed over its own channel (`_tabbable`), so it
|
|
1126
|
+
// needs no `no-tab`.
|
|
1127
|
+
if (el.tagName.toLowerCase() === 'nldd-list-item-segment')
|
|
1128
|
+
continue;
|
|
1129
|
+
if (!el.tagName.includes('-') || 'noTab' in el)
|
|
1130
|
+
continue;
|
|
1131
|
+
if (this._warnedUnmanaged.has(el))
|
|
1132
|
+
continue;
|
|
1133
|
+
const upgraded = el;
|
|
1134
|
+
if (upgraded.updateComplete)
|
|
1135
|
+
await upgraded.updateComplete;
|
|
1136
|
+
if (!el.shadowRoot?.querySelector(SHADOW_TAB_STOP))
|
|
1137
|
+
continue;
|
|
1138
|
+
// Nothing hidden on the way from the row: a menu item in a closed
|
|
1139
|
+
// menu is no tab stop of the row's, and the component that hides it
|
|
1140
|
+
// runs its own focus. Computed style, not checkVisibility(): that one
|
|
1141
|
+
// needs a laid-out box and answers false until the first layout.
|
|
1142
|
+
if (this._hiddenWithin(row, el))
|
|
1143
|
+
continue;
|
|
1144
|
+
this._warnedUnmanaged.add(el);
|
|
1145
|
+
console.warn(`nldd-list: <${el.tagName.toLowerCase()}> in a list-item keeps its tab stop in its own shadow root and has no \`no-tab\`, so the row cannot take it out of the tab order and the arrow keys skip that row. If the rows of this list are not actions themselves, it is a form: set type="form" and the roving falls away. Otherwise give the component \`no-tab\`, or wrap the control in an nldd-list-item-segment.`);
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
void check();
|
|
1150
|
+
}
|
|
1151
|
+
_hiddenWithin(row, el) {
|
|
1152
|
+
for (let node = el; node && node !== row; node = node.parentElement) {
|
|
1153
|
+
if (getComputedStyle(node).display === 'none')
|
|
1154
|
+
return true;
|
|
923
1155
|
}
|
|
1156
|
+
return false;
|
|
924
1157
|
}
|
|
925
1158
|
_getDeepActiveElement() {
|
|
926
1159
|
let active = document.activeElement;
|
|
@@ -1080,8 +1313,6 @@ let NLDDList = NLDDList_1 = class NLDDList extends LitElement {
|
|
|
1080
1313
|
hasToolbar: this._hasToolbar,
|
|
1081
1314
|
type: this.type,
|
|
1082
1315
|
isEmpty: this._isEmpty,
|
|
1083
|
-
emptyText: this.emptyText || this._t('components.list.empty-text'),
|
|
1084
|
-
emptySupportingText: this.emptySupportingText,
|
|
1085
1316
|
listbox: {
|
|
1086
1317
|
listboxId: this._listboxId,
|
|
1087
1318
|
searchValue: this._searchValue,
|
|
@@ -1121,12 +1352,6 @@ __decorate([
|
|
|
1121
1352
|
__decorate([
|
|
1122
1353
|
property({ type: String, reflect: true })
|
|
1123
1354
|
], NLDDList.prototype, "height", void 0);
|
|
1124
|
-
__decorate([
|
|
1125
|
-
property({ reflect: true, attribute: 'empty-text', converter: reflectNonDefault('') })
|
|
1126
|
-
], NLDDList.prototype, "emptyText", void 0);
|
|
1127
|
-
__decorate([
|
|
1128
|
-
property({ reflect: true, attribute: 'empty-supporting-text', converter: reflectNonDefault('') })
|
|
1129
|
-
], NLDDList.prototype, "emptySupportingText", void 0);
|
|
1130
1355
|
__decorate([
|
|
1131
1356
|
property({ type: String, attribute: 'accessible-label' })
|
|
1132
1357
|
], NLDDList.prototype, "accessibleLabel", void 0);
|